Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Sep 8, 2023
1 parent 8f67b3a commit d94fb94
Show file tree
Hide file tree
Showing 7 changed files with 3,679 additions and 3,582 deletions.
2 changes: 1 addition & 1 deletion MyApp/wwwroot/lib/mjs/servicestack-client.min.mjs

Large diffs are not rendered by default.

29 changes: 22 additions & 7 deletions MyApp/wwwroot/lib/mjs/servicestack-client.mjs
Expand Up @@ -997,7 +997,7 @@ export class JsonServiceClient {
}).catch(error => {
// No responseStatus body, set from `res` Body object
if (error instanceof Error
|| (typeof window != "undefined" && error instanceof window.DOMException /*MS Edge*/)) {
|| (typeof window != "undefined" && window.DOMException && error instanceof window.DOMException /*MS Edge*/)) {
throw this.raiseError(res, createErrorResponse(res.status, res.statusText, type));
}
throw this.raiseError(res, error);
Expand Down Expand Up @@ -1694,14 +1694,17 @@ function bsAlert(msg) { return '<div class="alert alert-danger">' + msg + '</div
function attr(e, name) { return e.getAttribute(name); }
function sattr(e, name, value) { return e.setAttribute(name, value); }
function rattr(e, name) { return e.removeAttribute(name); }
export function createElement(tagName, options, attrs) {
export function createElement(tagName, options) {
const keyAliases = { className: 'class', htmlFor: 'for' };
const el = document.createElement(tagName);
if (attrs) {
for (const key in attrs) {
sattr(el, keyAliases[key] || key, attrs[key]);
if (options?.attrs) {
for (const key in options.attrs) {
sattr(el, keyAliases[key] || key, options.attrs[key]);
}
}
if (options?.events) {
on(el, options.events);
}
if (options && options.insertAfter) {
options.insertAfter.parentNode.insertBefore(el, options.insertAfter.nextSibling);
}
Expand All @@ -1723,7 +1726,7 @@ function showInvalidInputs() {
: this;
const elError = elLast != null && elLast.nextElementSibling && hasClass(elLast.nextElementSibling, 'invalid-feedback')
? elLast.nextElementSibling
: createElement("div", { insertAfter: elLast }, { className: 'invalid-feedback' });
: createElement("div", { insertAfter: elLast, attrs: { className: 'invalid-feedback' } });
elError.innerHTML = errorMsg;
}
}
Expand Down Expand Up @@ -1766,10 +1769,22 @@ export function on(sel, handlers) {
Object.keys(handlers).forEach(function (evt) {
let fn = handlers[evt];
if (typeof evt === 'string' && typeof fn === 'function') {
e.addEventListener(evt, fn.bind(e));
e.addEventListener(evt, handlers[evt] = fn.bind(e));
}
});
});
return handlers;
}
export function addScript(src) {
return new Promise((resolve, reject) => {
document.body.appendChild(createElement('script', {
attrs: { src },
events: {
load: resolve,
error: reject,
}
}));
});
}
export function delaySet(f, opt) {
let duration = opt && opt.duration || 300;
Expand Down
48 changes: 24 additions & 24 deletions MyApp/wwwroot/lib/mjs/servicestack-vue.min.mjs

Large diffs are not rendered by default.

0 comments on commit d94fb94

Please sign in to comment.