@blackcube/aurelia-kit 1.0.0-rc1 → 1.0.0-rc10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +250 -16
- package/dist/index.es.js +1619 -590
- package/dist/index.es.js.map +1 -1
- package/dist/types/abstracts/components/abstract-dialog.d.ts +41 -0
- package/dist/types/abstracts/components/abstract-dialog.d.ts.map +1 -0
- package/dist/types/abstracts/components/abstract-dropdown.d.ts +117 -0
- package/dist/types/abstracts/components/abstract-dropdown.d.ts.map +1 -0
- package/dist/types/abstracts/components/abstract-pager.d.ts +51 -0
- package/dist/types/abstracts/components/abstract-pager.d.ts.map +1 -0
- package/dist/types/abstracts/components/abstract-toaster.d.ts +42 -0
- package/dist/types/abstracts/components/abstract-toaster.d.ts.map +1 -0
- package/dist/types/abstracts/components/index.d.ts +7 -0
- package/dist/types/abstracts/components/index.d.ts.map +1 -0
- package/dist/types/attributes/ajaxify-trigger.d.ts.map +1 -1
- package/dist/types/attributes/alert.d.ts.map +1 -1
- package/dist/types/attributes/badge.d.ts.map +1 -1
- package/dist/types/attributes/burger.d.ts.map +1 -1
- package/dist/types/attributes/dropdown.d.ts.map +1 -1
- package/dist/types/attributes/first-error.d.ts +19 -0
- package/dist/types/attributes/first-error.d.ts.map +1 -0
- package/dist/types/attributes/focus.d.ts +13 -0
- package/dist/types/attributes/focus.d.ts.map +1 -0
- package/dist/types/attributes/index.d.ts +2 -0
- package/dist/types/attributes/index.d.ts.map +1 -1
- package/dist/types/attributes/menu.d.ts +23 -1
- package/dist/types/attributes/menu.d.ts.map +1 -1
- package/dist/types/attributes/modal-trigger.d.ts +0 -1
- package/dist/types/attributes/modal-trigger.d.ts.map +1 -1
- package/dist/types/attributes/overlay.d.ts.map +1 -1
- package/dist/types/attributes/pager.d.ts.map +1 -1
- package/dist/types/attributes/password.d.ts.map +1 -1
- package/dist/types/attributes/popover-trigger.d.ts.map +1 -1
- package/dist/types/attributes/popover.d.ts.map +1 -1
- package/dist/types/attributes/profile.d.ts.map +1 -1
- package/dist/types/attributes/tabs.d.ts.map +1 -1
- package/dist/types/attributes/toast.d.ts +2 -2
- package/dist/types/attributes/toast.d.ts.map +1 -1
- package/dist/types/attributes/toaster-trigger.d.ts +3 -3
- package/dist/types/attributes/toaster-trigger.d.ts.map +1 -1
- package/dist/types/attributes/toaster.d.ts +2 -7
- package/dist/types/attributes/toaster.d.ts.map +1 -1
- package/dist/types/components/bleet-ajaxify.d.ts.map +1 -1
- package/dist/types/components/bleet-dialog.d.ts +15 -26
- package/dist/types/components/bleet-dialog.d.ts.map +1 -1
- package/dist/types/enums/event-aggregator.d.ts +14 -7
- package/dist/types/enums/event-aggregator.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/interfaces/dialog.d.ts +1 -2
- package/dist/types/interfaces/dialog.d.ts.map +1 -1
- package/dist/types/interfaces/event-aggregator.d.ts +12 -4
- package/dist/types/interfaces/event-aggregator.d.ts.map +1 -1
- package/dist/types/services/storage-service.d.ts.map +1 -1
- package/dist/types/services/transition-service.d.ts.map +1 -1
- package/dist/types/services/trap-focus-service.d.ts +17 -1
- package/dist/types/services/trap-focus-service.d.ts.map +1 -1
- package/dist/types/utils/toaster.d.ts +25 -0
- package/dist/types/utils/toaster.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { AjaxifyCodec as e, ApiConfiguration as t, IApiService as n } from "@blackcube/aurelia-api";
|
|
2
|
-
import {
|
|
3
|
-
import { CustomElement as
|
|
2
|
+
import { BindingMode as r, DI as i, IEventAggregator as a, ILogger as o, INode as s, IPlatform as c, bindable as l, customAttribute as u, customElement as d, observable as f, queueTask as p, resolve as m } from "aurelia";
|
|
3
|
+
import { CustomElement as h } from "@aurelia/runtime-html";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
|
5
|
-
var
|
|
5
|
+
var g = Object.defineProperty, _ = (e, t) => {
|
|
6
6
|
let n = {};
|
|
7
|
-
for (var r in e)
|
|
7
|
+
for (var r in e) g(n, r, {
|
|
8
8
|
get: e[r],
|
|
9
9
|
enumerable: !0
|
|
10
10
|
});
|
|
11
|
-
return t ||
|
|
12
|
-
},
|
|
11
|
+
return t || g(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
|
+
}, v = /*@__PURE__*/ i.createInterface("IStorageService", (e) => e.singleton(y)), y = class {
|
|
13
13
|
logger;
|
|
14
14
|
p;
|
|
15
|
-
constructor(e =
|
|
15
|
+
constructor(e = m(o).scopeTo("StorageService"), t = m(c)) {
|
|
16
16
|
this.logger = e, this.p = t, this.logger.trace("constructor");
|
|
17
17
|
}
|
|
18
18
|
load(e, t = null) {
|
|
@@ -31,11 +31,11 @@ var m = Object.defineProperty, h = (e, t) => {
|
|
|
31
31
|
remove(e) {
|
|
32
32
|
this.logger.trace("remove", e), localStorage.removeItem(e);
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, b = /*@__PURE__*/ i.createInterface("ITransitionService", (e) => e.singleton(x)), x = class {
|
|
35
35
|
logger;
|
|
36
36
|
p;
|
|
37
37
|
securityTimeout = 2e3;
|
|
38
|
-
constructor(e =
|
|
38
|
+
constructor(e = m(o).scopeTo("TransitionService"), t = m(c)) {
|
|
39
39
|
this.logger = e, this.p = t, this.logger.trace("constructor");
|
|
40
40
|
}
|
|
41
41
|
run(e, t, n) {
|
|
@@ -46,7 +46,7 @@ var m = Object.defineProperty, h = (e, t) => {
|
|
|
46
46
|
this.logger.trace("before()"), t(e);
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, S = /*@__PURE__*/ i.createInterface("ITrapFocusService", (e) => e.transient(C)), C = class {
|
|
50
50
|
logger;
|
|
51
51
|
p;
|
|
52
52
|
focusableElementsQuerySelector = "[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"]), [accesskey], summary, canvas, audio, video, details, iframe, [contenteditable]";
|
|
@@ -58,7 +58,7 @@ var m = Object.defineProperty, h = (e, t) => {
|
|
|
58
58
|
focusableElements = [];
|
|
59
59
|
lastFocusedElement = null;
|
|
60
60
|
started = !1;
|
|
61
|
-
constructor(e =
|
|
61
|
+
constructor(e = m(o).scopeTo("TrapFocusService"), t = m(c)) {
|
|
62
62
|
this.logger = e, this.p = t, this.logger.trace("constructor");
|
|
63
63
|
}
|
|
64
64
|
buildFocusableElements() {
|
|
@@ -96,27 +96,25 @@ var m = Object.defineProperty, h = (e, t) => {
|
|
|
96
96
|
this.logger.trace("cleanup"), this.started &&= (this.opener = null, this.startCallback = null, this.stopCallback = null, this.target = null, this.lastFocusedElement = null, this.focusableElements = [], !1);
|
|
97
97
|
}
|
|
98
98
|
focusedElementIndex() {
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
this.buildFocusableElements();
|
|
100
|
+
let e = this.p.document.activeElement;
|
|
101
|
+
return e !== null && this.focusableElements.includes(e) === !0 && (this.lastFocusedElement = e), this.lastFocusedElement === null ? -1 : this.focusableElements.indexOf(this.lastFocusedElement);
|
|
101
102
|
}
|
|
102
103
|
focusPreviousElement(e = !0) {
|
|
103
|
-
let t = this.focusedElementIndex();
|
|
104
|
-
|
|
105
|
-
let n = !1;
|
|
106
|
-
return t === 0 && e === !0 ? (this.lastFocusedElement = this.focusableElements[this.focusableElements.length - 1], n = !0) : t > 0 && (this.lastFocusedElement = this.focusableElements[t - 1], n = !0), n === !0 && this.p.requestAnimationFrame(() => {
|
|
107
|
-
this.logger.trace("focusPreviousElement: focusing", this.lastFocusedElement), this.lastFocusedElement?.focus();
|
|
108
|
-
}), this.lastFocusedElement;
|
|
104
|
+
let t = this.focusedElementIndex(), n = this.focusableElements.length - 1, r = -1;
|
|
105
|
+
return t === -1 || t === 0 && e === !0 ? r = n : t > 0 && (r = t - 1), this.focusAt(r);
|
|
109
106
|
}
|
|
110
107
|
focusNextElement(e = !0) {
|
|
111
|
-
let t = this.focusedElementIndex();
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
let t = this.focusedElementIndex(), n = this.focusableElements.length - 1, r = -1;
|
|
109
|
+
return t === -1 || t === n && e === !0 ? r = 0 : t < n && (r = t + 1), this.focusAt(r);
|
|
110
|
+
}
|
|
111
|
+
focusAt(e) {
|
|
112
|
+
return e >= 0 && e < this.focusableElements.length && (this.lastFocusedElement = this.focusableElements[e], this.p.requestAnimationFrame(() => {
|
|
113
|
+
this.logger.trace("focusAt: focusing", this.lastFocusedElement), this.lastFocusedElement?.focus();
|
|
114
|
+
})), this.lastFocusedElement;
|
|
117
115
|
}
|
|
118
116
|
onKeyDown = (e) => {
|
|
119
|
-
e.key === "Tab" ?
|
|
117
|
+
e.key === "Tab" ? (e.preventDefault(), e.shiftKey ? this.focusPreviousElement(!0) : this.focusNextElement(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), this.focusPreviousElement(!1)) : e.key === "ArrowDown" ? (e.preventDefault(), this.focusNextElement(!1)) : e.key === "Escape" && (e.preventDefault(), this.stop());
|
|
120
118
|
};
|
|
121
119
|
onClickOutside = (e) => {
|
|
122
120
|
this.logger.trace("onClickOutside", e), this.started && this.globalElement && e.target && (this.logger.trace("onClickOutside: checking if click is outside globalElement", e.target, this.globalElement), this.globalElement.contains(e.target) || this.stop());
|
|
@@ -124,11 +122,11 @@ var m = Object.defineProperty, h = (e, t) => {
|
|
|
124
122
|
};
|
|
125
123
|
//#endregion
|
|
126
124
|
//#region src/utils/state-classes.ts
|
|
127
|
-
function
|
|
125
|
+
function w(e, t, n, r = e) {
|
|
128
126
|
let i = n === "show" ? "hide" : "show";
|
|
129
|
-
e.classList.remove(...
|
|
127
|
+
e.classList.remove(...T(r, t, i)), e.classList.add(...T(r, t, n));
|
|
130
128
|
}
|
|
131
|
-
function
|
|
129
|
+
function T(e, t, n) {
|
|
132
130
|
let r = [];
|
|
133
131
|
return (e.getAttribute(`data-${t}-${n}`) ?? "").split(" ").forEach((e) => {
|
|
134
132
|
e !== "" && r.push(e);
|
|
@@ -136,47 +134,49 @@ function C(e, t, n) {
|
|
|
136
134
|
}
|
|
137
135
|
//#endregion
|
|
138
136
|
//#region src/enums/event-aggregator.ts
|
|
139
|
-
var
|
|
140
|
-
return e.Overlay = "bleet:overlay", e.OverlayStatus = "bleet:overlay:status", e.Modal = "bleet:modal", e.ModalStatus = "bleet:modal:status", e.Toaster = "bleet:toaster", e.ToasterStatus = "bleet:toaster:status", e.Menu = "bleet:menu", e.MenuStatus = "bleet:menu:status", e.Badge = "bleet:badge", e.Profile = "bleet:profile", e.ProfileStatus = "bleet:profile:status", e.Ajaxify = "bleet:ajaxify", e.Popover = "bleet:popover", e.PopoverStatus = "bleet:popover:status", e.Upload = "bleet:upload", e;
|
|
141
|
-
}({}),
|
|
137
|
+
var E = /* @__PURE__ */ function(e) {
|
|
138
|
+
return e.Overlay = "bleet:overlay", e.OverlayStatus = "bleet:overlay:status", e.Modal = "bleet:modal", e.ModalStatus = "bleet:modal:status", e.Toaster = "bleet:toaster", e.ToasterStatus = "bleet:toaster:status", e.Menu = "bleet:menu", e.MenuStatus = "bleet:menu:status", e.Badge = "bleet:badge", e.Profile = "bleet:profile", e.ProfileStatus = "bleet:profile:status", e.Ajaxify = "bleet:ajaxify", e.Popover = "bleet:popover", e.PopoverStatus = "bleet:popover:status", e.Upload = "bleet:upload", e.Form = "bleet:form", e;
|
|
139
|
+
}({}), D = /* @__PURE__ */ function(e) {
|
|
142
140
|
return e.Reset = "reset", e;
|
|
143
|
-
}({}),
|
|
141
|
+
}({}), O = /* @__PURE__ */ function(e) {
|
|
142
|
+
return e.FirstError = "firstError", e;
|
|
143
|
+
}({}), k = /* @__PURE__ */ function(e) {
|
|
144
144
|
return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
|
|
145
|
-
}({}),
|
|
145
|
+
}({}), A = /* @__PURE__ */ function(e) {
|
|
146
146
|
return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
|
|
147
|
-
}({}),
|
|
147
|
+
}({}), j = /* @__PURE__ */ function(e) {
|
|
148
148
|
return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
|
|
149
|
-
}({}),
|
|
149
|
+
}({}), M = /* @__PURE__ */ function(e) {
|
|
150
150
|
return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
|
|
151
|
-
}({}),
|
|
151
|
+
}({}), N = /* @__PURE__ */ function(e) {
|
|
152
152
|
return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
|
|
153
|
-
}({}),
|
|
153
|
+
}({}), P = /* @__PURE__ */ function(e) {
|
|
154
154
|
return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
|
|
155
|
-
}({}),
|
|
155
|
+
}({}), F = /* @__PURE__ */ function(e) {
|
|
156
156
|
return e.Refresh = "refresh", e.Run = "run", e;
|
|
157
|
-
}({}),
|
|
157
|
+
}({}), ee = /* @__PURE__ */ function(e) {
|
|
158
158
|
return e.Classic = "classic", e.PublishOnly = "publishOnly", e;
|
|
159
|
-
}({}),
|
|
159
|
+
}({}), I = /* @__PURE__ */ function(e) {
|
|
160
160
|
return e.Add = "add", e.Remove = "remove", e;
|
|
161
|
-
}({}), ee = /* @__PURE__ */ function(e) {
|
|
162
|
-
return e.Added = "added", e.Removed = "removed", e;
|
|
163
|
-
}({}), F = /* @__PURE__ */ function(e) {
|
|
164
|
-
return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
|
|
165
161
|
}({}), te = /* @__PURE__ */ function(e) {
|
|
166
|
-
return e.
|
|
167
|
-
}({}), I = /* @__PURE__ */ function(e) {
|
|
168
|
-
return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
|
|
162
|
+
return e.Added = "added", e.Removed = "removed", e;
|
|
169
163
|
}({}), L = /* @__PURE__ */ function(e) {
|
|
170
164
|
return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
|
|
171
165
|
}({}), ne = /* @__PURE__ */ function(e) {
|
|
172
|
-
return e.
|
|
166
|
+
return e.Remove = "remove", e;
|
|
173
167
|
}({}), R = /* @__PURE__ */ function(e) {
|
|
174
|
-
return e.
|
|
168
|
+
return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
|
|
175
169
|
}({}), z = /* @__PURE__ */ function(e) {
|
|
170
|
+
return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
|
|
171
|
+
}({}), B = /* @__PURE__ */ function(e) {
|
|
172
|
+
return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
|
|
173
|
+
}({}), V = /* @__PURE__ */ function(e) {
|
|
174
|
+
return e.Info = "info", e.Success = "success", e.Warning = "warning", e.Danger = "danger", e;
|
|
175
|
+
}({}), H = /* @__PURE__ */ function(e) {
|
|
176
176
|
return e.Info = "information-circle", e.Success = "check-circle", e.Warning = "exclamation-triangle", e.Danger = "x-circle", e;
|
|
177
177
|
}({}), re = /* @__PURE__ */ function(e) {
|
|
178
178
|
return e.Info = "information-circle", e.Success = "check-circle", e.Warning = "exclamation-triangle", e.Danger = "x-circle", e.InformationCircle = "information-circle", e.CheckCircle = "check-circle", e.ExclamationTriangle = "exclamation-triangle", e.XCircle = "x-circle", e;
|
|
179
|
-
}({}),
|
|
179
|
+
}({}), U = /* @__PURE__ */ function(e) {
|
|
180
180
|
return e.Keep = "keep", e.Close = "close", e.RefreshAndClose = "refreshAndClose", e;
|
|
181
181
|
}({});
|
|
182
182
|
//#endregion
|
|
@@ -311,15 +311,15 @@ function ce(e, t, n, r, i, a) {
|
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
var le =
|
|
314
|
+
var le = u("bleet-burger"), ue, W;
|
|
315
315
|
(class {
|
|
316
316
|
logger;
|
|
317
317
|
ea;
|
|
318
318
|
element;
|
|
319
319
|
static {
|
|
320
|
-
({c: [
|
|
320
|
+
({c: [W, ue]} = ce(this, [le], []));
|
|
321
321
|
}
|
|
322
|
-
constructor(e =
|
|
322
|
+
constructor(e = m(o).scopeTo("bleet-burger"), t = m(a), n = m(s)) {
|
|
323
323
|
this.logger = e, this.ea = t, this.element = n, this.logger.trace("constructor");
|
|
324
324
|
}
|
|
325
325
|
attached() {
|
|
@@ -329,7 +329,7 @@ var le = l("bleet-burger"), ue, V;
|
|
|
329
329
|
this.logger.trace("detaching"), this.element.removeEventListener("click", this.onClickButton);
|
|
330
330
|
}
|
|
331
331
|
onClickButton = (e) => {
|
|
332
|
-
this.logger.trace("onClickButton", e), e.preventDefault(), this.ea.publish(
|
|
332
|
+
this.logger.trace("onClickButton", e), e.preventDefault(), this.ea.publish(E.Menu, { action: L.Open });
|
|
333
333
|
};
|
|
334
334
|
static {
|
|
335
335
|
ue();
|
|
@@ -467,7 +467,7 @@ function he(e, t, n, r, i, a) {
|
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
var ge =
|
|
470
|
+
var ge = u("bleet-menu"), _e, G;
|
|
471
471
|
(class {
|
|
472
472
|
logger;
|
|
473
473
|
ea;
|
|
@@ -475,11 +475,12 @@ var ge = l("bleet-menu"), _e, H;
|
|
|
475
475
|
p;
|
|
476
476
|
transitionService;
|
|
477
477
|
storageService;
|
|
478
|
+
trapFocusService;
|
|
478
479
|
static {
|
|
479
|
-
({c: [
|
|
480
|
+
({c: [G, _e]} = he(this, [ge], []));
|
|
480
481
|
}
|
|
481
|
-
constructor(e =
|
|
482
|
-
this.logger = e, this.ea = t, this.element = n, this.p = r, this.transitionService =
|
|
482
|
+
constructor(e = m(o).scopeTo("bleet-menu"), t = m(a), n = m(s), r = m(c), i = m(b), l = m(v), u = m(S)) {
|
|
483
|
+
this.logger = e, this.ea = t, this.element = n, this.p = r, this.transitionService = i, this.storageService = l, this.trapFocusService = u, this.logger.trace("constructor");
|
|
483
484
|
}
|
|
484
485
|
disposable;
|
|
485
486
|
disposableOverlay;
|
|
@@ -487,35 +488,54 @@ var ge = l("bleet-menu"), _e, H;
|
|
|
487
488
|
toggleButtons;
|
|
488
489
|
sublists = /* @__PURE__ */ new Map();
|
|
489
490
|
isOpen = !1;
|
|
491
|
+
closingFromOverlay = !1;
|
|
490
492
|
attaching() {
|
|
491
493
|
this.logger.trace("attaching"), this.closeButton = this.element.querySelector("[data-menu=close]"), this.toggleButtons = this.element.querySelectorAll("[data-menu^=\"toggle-button\"]"), this.initMenuButtons();
|
|
492
494
|
}
|
|
493
495
|
attached() {
|
|
494
|
-
this.logger.trace("attached"), this.disposable = this.ea.subscribe(
|
|
496
|
+
this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Menu, this.onMenuEvent), this.disposableOverlay = this.ea.subscribe(E.OverlayStatus, this.onOverlayStatus), this.closeButton?.addEventListener("click", this.onClickClose), this.element.addEventListener("click", this.onClickToggleButtons), this.element.addEventListener("click", this.onClickLink);
|
|
495
497
|
}
|
|
496
498
|
detaching() {
|
|
497
|
-
this.logger.trace("detaching"), this.closeButton?.removeEventListener("click", this.onClickClose), this.element.removeEventListener("click", this.onClickToggleButtons), this.
|
|
499
|
+
this.logger.trace("detaching"), this.closeButton?.removeEventListener("click", this.onClickClose), this.element.removeEventListener("click", this.onClickToggleButtons), this.element.removeEventListener("click", this.onClickLink), this.isOpen === !0 && this.trapFocusService.stop().catch((e) => {
|
|
500
|
+
this.logger.trace("detaching: no trap to stop", e);
|
|
501
|
+
}), this.disposableOverlay?.dispose(), this.disposable?.dispose();
|
|
498
502
|
}
|
|
499
503
|
dispose() {
|
|
500
504
|
this.logger.trace("dispose"), this.disposableOverlay?.dispose(), this.disposable?.dispose();
|
|
501
505
|
}
|
|
502
506
|
open(e = !1) {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
this.
|
|
507
|
-
|
|
507
|
+
if (!this.isOpen) {
|
|
508
|
+
this.logger.trace("open"), this.isOpen = !0;
|
|
509
|
+
let t = this.p.document.activeElement;
|
|
510
|
+
this.transitionService.run(this.element, (n) => {
|
|
511
|
+
e || this.ea.publish(E.Overlay, { action: k.Open }), this.ea.publish(E.MenuStatus, { status: R.Opening }), w(n, "menu", "show"), w(this.p.document.body, "menu-page", "show", n), n.ariaHidden = "false", this.isOpen === !0 && this.trapFocusService.start(t, n, this.p.document.body, void 0, this.onStopTrapFocus, this.closeButton);
|
|
512
|
+
}, (e) => {
|
|
513
|
+
this.ea.publish(E.MenuStatus, { status: R.Opened });
|
|
514
|
+
});
|
|
515
|
+
}
|
|
508
516
|
}
|
|
509
517
|
close(e = !1) {
|
|
510
|
-
this.isOpen && (this.logger.trace("close"), this.
|
|
511
|
-
this.
|
|
512
|
-
}, (e) => {
|
|
513
|
-
this.ea.publish(w.MenuStatus, { status: I.Closed });
|
|
518
|
+
this.isOpen && (this.logger.trace("close"), this.closingFromOverlay = e, this.trapFocusService.stop().catch((e) => {
|
|
519
|
+
this.logger.trace("close: no trap started", e), this.hide();
|
|
514
520
|
}));
|
|
515
521
|
}
|
|
522
|
+
hide() {
|
|
523
|
+
this.logger.trace("hide");
|
|
524
|
+
let e = this.closingFromOverlay;
|
|
525
|
+
this.isOpen = !1, this.closingFromOverlay = !1, this.transitionService.run(this.element, (t) => {
|
|
526
|
+
this.ea.publish(E.MenuStatus, { status: R.Closing }), e || this.ea.publish(E.Overlay, { action: k.Close }), w(t, "menu", "hide"), w(this.p.document.body, "menu-page", "hide", t), t.ariaHidden = "true";
|
|
527
|
+
}, (e) => {
|
|
528
|
+
this.ea.publish(E.MenuStatus, { status: R.Closed });
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
onStopTrapFocus = () => (this.logger.trace("onStopTrapFocus"), this.hide(), Promise.resolve());
|
|
516
532
|
onClickClose = (e) => {
|
|
517
533
|
this.logger.trace("onClickClose", e), e.preventDefault(), this.close();
|
|
518
534
|
};
|
|
535
|
+
onClickLink = (e) => {
|
|
536
|
+
let t = e.target.closest("a");
|
|
537
|
+
t !== null && this.isOpen === !0 && (this.logger.trace("onClickLink", t), this.close());
|
|
538
|
+
};
|
|
519
539
|
onClickToggleButtons = (e) => {
|
|
520
540
|
let t = e.target.closest("[data-menu^=\"toggle-button\"]");
|
|
521
541
|
t && t.matches("[data-menu^=\"toggle-button\"]") && (e.preventDefault(), this.toggleButton(t));
|
|
@@ -551,14 +571,14 @@ var ge = l("bleet-menu"), _e, H;
|
|
|
551
571
|
let n = this.sublists.get(e);
|
|
552
572
|
if (n !== void 0) {
|
|
553
573
|
let r = e.dataset.menu?.replace("toggle-button-", "");
|
|
554
|
-
n.list.hidden = t === !1,
|
|
574
|
+
n.list.hidden = t === !1, w(n.svg, "menu", t === !0 ? "show" : "hide"), e.ariaExpanded = t === !0 ? "true" : "false", this.storageService.save(`toggle-list-${r}`, t);
|
|
555
575
|
}
|
|
556
576
|
}
|
|
557
577
|
onMenuEvent = (e) => {
|
|
558
|
-
this.logger.trace("onMenuEvent", e), e.action ===
|
|
578
|
+
this.logger.trace("onMenuEvent", e), e.action === L.Close ? (this.logger.trace("Menu Close action received"), this.close()) : e.action === L.Open ? (this.logger.trace("Menu Open action received"), this.open()) : e.action === L.Toggle && (this.logger.trace("Menu Toggle action received"), this.isOpen === !0 ? this.close() : this.open());
|
|
559
579
|
};
|
|
560
580
|
onOverlayStatus = (e) => {
|
|
561
|
-
e.status ===
|
|
581
|
+
e.status === A.Closing ? (this.logger.trace("Overlay Close action received"), this.close(!0)) : this.logger.trace("onOverlayStatus unhandled", e);
|
|
562
582
|
};
|
|
563
583
|
static {
|
|
564
584
|
_e();
|
|
@@ -696,22 +716,22 @@ function Se(e, t, n, r, i, a) {
|
|
|
696
716
|
}
|
|
697
717
|
};
|
|
698
718
|
}
|
|
699
|
-
var Ce =
|
|
719
|
+
var Ce = u({
|
|
700
720
|
name: "bleet-badge",
|
|
701
721
|
defaultProperty: "id"
|
|
702
|
-
}), we, Te, Ee,
|
|
722
|
+
}), we, Te, Ee, K;
|
|
703
723
|
(class {
|
|
704
724
|
logger;
|
|
705
725
|
ea;
|
|
706
726
|
element;
|
|
707
727
|
static {
|
|
708
|
-
({e: [Te, Ee], c: [
|
|
709
|
-
|
|
728
|
+
({e: [Te, Ee], c: [K, we]} = Se(this, [Ce], [[
|
|
729
|
+
l,
|
|
710
730
|
0,
|
|
711
731
|
"id"
|
|
712
732
|
]]));
|
|
713
733
|
}
|
|
714
|
-
constructor(e =
|
|
734
|
+
constructor(e = m(o).scopeTo("bleet-badge"), t = m(a), n = m(s)) {
|
|
715
735
|
this.logger = e, this.ea = t, this.element = n, this.logger.trace("constructor");
|
|
716
736
|
}
|
|
717
737
|
closeButton;
|
|
@@ -723,8 +743,8 @@ var Ce = l({
|
|
|
723
743
|
this.logger.trace("detaching"), this.closeButton?.removeEventListener("click", this.onClickRemove);
|
|
724
744
|
}
|
|
725
745
|
onClickRemove = (Ee(this), (e) => {
|
|
726
|
-
this.logger.trace("onClickRemove", e), e.preventDefault(), this.ea.publish(
|
|
727
|
-
action:
|
|
746
|
+
this.logger.trace("onClickRemove", e), e.preventDefault(), this.ea.publish(E.Badge, {
|
|
747
|
+
action: ne.Remove,
|
|
728
748
|
id: this.id
|
|
729
749
|
}), this.element.remove();
|
|
730
750
|
});
|
|
@@ -864,15 +884,15 @@ function je(e, t, n, r, i, a) {
|
|
|
864
884
|
}
|
|
865
885
|
};
|
|
866
886
|
}
|
|
867
|
-
var Me =
|
|
887
|
+
var Me = u("bleet-dropdown"), Ne, q;
|
|
868
888
|
(class {
|
|
869
889
|
logger;
|
|
870
890
|
element;
|
|
871
891
|
trapFocusService;
|
|
872
892
|
static {
|
|
873
|
-
({c: [
|
|
893
|
+
({c: [q, Ne]} = je(this, [Me], []));
|
|
874
894
|
}
|
|
875
|
-
constructor(e =
|
|
895
|
+
constructor(e = m(o).scopeTo("bleet-dropdown"), t = m(s), n = m(S)) {
|
|
876
896
|
this.logger = e, this.element = t, this.trapFocusService = n, this.logger.trace("constructor");
|
|
877
897
|
}
|
|
878
898
|
select;
|
|
@@ -1010,7 +1030,7 @@ var Me = l("bleet-dropdown"), Ne, W;
|
|
|
1010
1030
|
let t = this.itemsContainer?.querySelector(`[data-value="${CSS.escape(e.value)}"]`);
|
|
1011
1031
|
if (!t) return;
|
|
1012
1032
|
let n = t.querySelector("[data-dropdown=item-check]");
|
|
1013
|
-
e.selected ? (
|
|
1033
|
+
e.selected ? (w(t, "dropdown", "show"), n && w(n, "dropdown", "show"), t.setAttribute("aria-selected", "true"), this.button?.setAttribute("aria-activedescendant", t.id)) : (w(t, "dropdown", "hide"), n && w(n, "dropdown", "hide"), t.setAttribute("aria-selected", "false"));
|
|
1014
1034
|
}), this.updateDisplay();
|
|
1015
1035
|
}
|
|
1016
1036
|
preparePanel() {
|
|
@@ -1174,14 +1194,14 @@ function Re(e, t, n, r, i, a) {
|
|
|
1174
1194
|
}
|
|
1175
1195
|
};
|
|
1176
1196
|
}
|
|
1177
|
-
var ze =
|
|
1197
|
+
var ze = u("bleet-password"), Be, J;
|
|
1178
1198
|
(class {
|
|
1179
1199
|
logger;
|
|
1180
1200
|
element;
|
|
1181
1201
|
static {
|
|
1182
|
-
({c: [
|
|
1202
|
+
({c: [J, Be]} = Re(this, [ze], []));
|
|
1183
1203
|
}
|
|
1184
|
-
constructor(e =
|
|
1204
|
+
constructor(e = m(o).scopeTo("bleet-password"), t = m(s)) {
|
|
1185
1205
|
this.logger = e, this.element = t;
|
|
1186
1206
|
}
|
|
1187
1207
|
button;
|
|
@@ -1200,7 +1220,7 @@ var ze = l("bleet-password"), Be, G;
|
|
|
1200
1220
|
onToggle = (e) => {
|
|
1201
1221
|
e.preventDefault();
|
|
1202
1222
|
let t = this.input?.type === "password";
|
|
1203
|
-
this.input && (this.input.type = t ? "text" : "password"), this.iconHidden &&
|
|
1223
|
+
this.input && (this.input.type = t ? "text" : "password"), this.iconHidden && w(this.iconHidden, "password", t ? "hide" : "show"), this.iconVisible && w(this.iconVisible, "password", t ? "show" : "hide");
|
|
1204
1224
|
};
|
|
1205
1225
|
static {
|
|
1206
1226
|
Be();
|
|
@@ -1338,15 +1358,15 @@ function Ge(e, t, n, r, i, a) {
|
|
|
1338
1358
|
}
|
|
1339
1359
|
};
|
|
1340
1360
|
}
|
|
1341
|
-
var Ke =
|
|
1361
|
+
var Ke = u("bleet-tabs"), qe, Y;
|
|
1342
1362
|
(class {
|
|
1343
1363
|
logger;
|
|
1344
1364
|
element;
|
|
1345
1365
|
p;
|
|
1346
1366
|
static {
|
|
1347
|
-
({c: [
|
|
1367
|
+
({c: [Y, qe]} = Ge(this, [Ke], []));
|
|
1348
1368
|
}
|
|
1349
|
-
constructor(e =
|
|
1369
|
+
constructor(e = m(o).scopeTo("bleet-tabs"), t = m(s), n = m(c)) {
|
|
1350
1370
|
this.logger = e, this.element = t, this.p = n, this.logger.trace("constructor");
|
|
1351
1371
|
}
|
|
1352
1372
|
activeClasses = "";
|
|
@@ -1517,10 +1537,10 @@ function Qe(e, t, n, r, i, a) {
|
|
|
1517
1537
|
}
|
|
1518
1538
|
};
|
|
1519
1539
|
}
|
|
1520
|
-
var $e =
|
|
1540
|
+
var $e = u({
|
|
1521
1541
|
name: "bleet-profile",
|
|
1522
1542
|
defaultProperty: "id"
|
|
1523
|
-
}), et, tt, nt,
|
|
1543
|
+
}), et, tt, nt, X;
|
|
1524
1544
|
(class {
|
|
1525
1545
|
logger;
|
|
1526
1546
|
ea;
|
|
@@ -1529,14 +1549,14 @@ var $e = l({
|
|
|
1529
1549
|
p;
|
|
1530
1550
|
trapFocusService;
|
|
1531
1551
|
static {
|
|
1532
|
-
({e: [tt, nt], c: [
|
|
1533
|
-
|
|
1552
|
+
({e: [tt, nt], c: [X, et]} = Qe(this, [$e], [[
|
|
1553
|
+
l,
|
|
1534
1554
|
0,
|
|
1535
1555
|
"id"
|
|
1536
1556
|
]]));
|
|
1537
1557
|
}
|
|
1538
|
-
constructor(e =
|
|
1539
|
-
this.logger = e, this.ea = t, this.element = n, this.transitionService = r, this.p =
|
|
1558
|
+
constructor(e = m(o).scopeTo("bleet-profile"), t = m(a), n = m(s), r = m(b), i = m(c), l = m(S)) {
|
|
1559
|
+
this.logger = e, this.ea = t, this.element = n, this.transitionService = r, this.p = i, this.trapFocusService = l, this.logger.trace("constructor");
|
|
1540
1560
|
}
|
|
1541
1561
|
id = tt(this, "");
|
|
1542
1562
|
disposable = (nt(this), void 0);
|
|
@@ -1547,7 +1567,7 @@ var $e = l({
|
|
|
1547
1567
|
this.logger.trace("attaching"), this.toggleButton = this.element.querySelector("[data-profile=toggle]"), this.panel = this.element.querySelector("[data-profile=panel]");
|
|
1548
1568
|
}
|
|
1549
1569
|
attached() {
|
|
1550
|
-
this.logger.trace("attached"), this.disposable = this.ea.subscribe(
|
|
1570
|
+
this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Profile, this.onProfileEvent), this.toggleButton?.addEventListener("click", this.onClickToggle);
|
|
1551
1571
|
}
|
|
1552
1572
|
detaching() {
|
|
1553
1573
|
this.logger.trace("detaching"), this.toggleButton?.removeEventListener("click", this.onClickToggle), this.isOpen && this.trapFocusService.stop(), this.disposable?.dispose();
|
|
@@ -1559,18 +1579,18 @@ var $e = l({
|
|
|
1559
1579
|
this.logger.trace("onClickToggle", e), e.preventDefault(), this.isOpen ? this.close() : this.open();
|
|
1560
1580
|
};
|
|
1561
1581
|
onStopTrapFocus = () => (this.logger.trace("onStopTrapFocus"), this.isOpen = !1, this.toggleButton?.setAttribute("aria-expanded", "false"), this.transitionService.run(this.panel, (e) => {
|
|
1562
|
-
this.ea.publish(
|
|
1563
|
-
action:
|
|
1582
|
+
this.ea.publish(E.Profile, {
|
|
1583
|
+
action: j.Close,
|
|
1564
1584
|
id: this.id
|
|
1565
|
-
}), this.ea.publish(
|
|
1566
|
-
status:
|
|
1585
|
+
}), this.ea.publish(E.ProfileStatus, {
|
|
1586
|
+
status: M.Closing,
|
|
1567
1587
|
id: this.id
|
|
1568
1588
|
}), this.p.requestAnimationFrame(() => {
|
|
1569
|
-
|
|
1589
|
+
w(e, "profile", "hide");
|
|
1570
1590
|
});
|
|
1571
1591
|
}, (e) => {
|
|
1572
|
-
e.hidden = !0, this.ea.publish(
|
|
1573
|
-
status:
|
|
1592
|
+
e.hidden = !0, this.ea.publish(E.ProfileStatus, {
|
|
1593
|
+
status: M.Closed,
|
|
1574
1594
|
id: this.id
|
|
1575
1595
|
});
|
|
1576
1596
|
}), Promise.resolve());
|
|
@@ -1579,18 +1599,18 @@ var $e = l({
|
|
|
1579
1599
|
let e = this.panel?.querySelector("a, button");
|
|
1580
1600
|
return this.trapFocusService.start(this.toggleButton, this.panel, this.element, void 0, this.onStopTrapFocus, e).then(() => {
|
|
1581
1601
|
this.panel.hidden = !1, this.transitionService.run(this.panel, (e) => {
|
|
1582
|
-
this.ea.publish(
|
|
1583
|
-
action:
|
|
1602
|
+
this.ea.publish(E.Profile, {
|
|
1603
|
+
action: j.Open,
|
|
1584
1604
|
id: this.id
|
|
1585
|
-
}), this.ea.publish(
|
|
1586
|
-
status:
|
|
1605
|
+
}), this.ea.publish(E.ProfileStatus, {
|
|
1606
|
+
status: M.Opening,
|
|
1587
1607
|
id: this.id
|
|
1588
1608
|
}), this.p.requestAnimationFrame(() => {
|
|
1589
|
-
|
|
1609
|
+
w(e, "profile", "show");
|
|
1590
1610
|
});
|
|
1591
1611
|
}, () => {
|
|
1592
|
-
this.ea.publish(
|
|
1593
|
-
status:
|
|
1612
|
+
this.ea.publish(E.ProfileStatus, {
|
|
1613
|
+
status: M.Opened,
|
|
1594
1614
|
id: this.id
|
|
1595
1615
|
});
|
|
1596
1616
|
});
|
|
@@ -1602,7 +1622,7 @@ var $e = l({
|
|
|
1602
1622
|
onProfileEvent = (e) => {
|
|
1603
1623
|
this.logger.trace("onProfileEvent", e);
|
|
1604
1624
|
let t = e.id === void 0 || e.id === this.id;
|
|
1605
|
-
e.action ===
|
|
1625
|
+
e.action === j.Close && t && this.isOpen && (this.logger.trace("Profile Close action received"), this.close());
|
|
1606
1626
|
};
|
|
1607
1627
|
static {
|
|
1608
1628
|
et();
|
|
@@ -1740,25 +1760,25 @@ function st(e, t, n, r, i, a) {
|
|
|
1740
1760
|
}
|
|
1741
1761
|
};
|
|
1742
1762
|
}
|
|
1743
|
-
var ct =
|
|
1763
|
+
var ct = u({
|
|
1744
1764
|
name: "bleet-toaster-trigger",
|
|
1745
1765
|
defaultProperty: "id"
|
|
1746
|
-
}), lt, ut =
|
|
1766
|
+
}), lt, ut = l(), dt = l(), ft = l(), pt = l(), mt = l(), ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt, Et, Z;
|
|
1747
1767
|
(class {
|
|
1748
1768
|
logger;
|
|
1749
1769
|
element;
|
|
1750
1770
|
ea;
|
|
1751
1771
|
static {
|
|
1752
|
-
({e: [ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt, Et], c: [
|
|
1772
|
+
({e: [ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt, Et], c: [Z, lt]} = st(this, [ct], [
|
|
1753
1773
|
[
|
|
1754
|
-
|
|
1774
|
+
l,
|
|
1755
1775
|
0,
|
|
1756
1776
|
"id"
|
|
1757
1777
|
],
|
|
1758
1778
|
[
|
|
1759
1779
|
ut,
|
|
1760
1780
|
0,
|
|
1761
|
-
"
|
|
1781
|
+
"level"
|
|
1762
1782
|
],
|
|
1763
1783
|
[
|
|
1764
1784
|
dt,
|
|
@@ -1782,12 +1802,12 @@ var ct = l({
|
|
|
1782
1802
|
]
|
|
1783
1803
|
]));
|
|
1784
1804
|
}
|
|
1785
|
-
constructor(e =
|
|
1805
|
+
constructor(e = m(o).scopeTo("bleet-toaster-trigger"), t = m(s), n = m(a)) {
|
|
1786
1806
|
this.logger = e, this.element = t, this.ea = n, this.logger.trace("constructor");
|
|
1787
1807
|
}
|
|
1788
1808
|
id = ht(this, "");
|
|
1789
|
-
|
|
1790
|
-
icon = (vt(this), yt(this,
|
|
1809
|
+
level = (gt(this), _t(this, V.Info));
|
|
1810
|
+
icon = (vt(this), yt(this, H.Info));
|
|
1791
1811
|
title = (bt(this), xt(this, ""));
|
|
1792
1812
|
content = (St(this), Ct(this, ""));
|
|
1793
1813
|
duration = (wt(this), Tt(this, 0));
|
|
@@ -1801,12 +1821,12 @@ var ct = l({
|
|
|
1801
1821
|
this.logger.trace("detaching"), this.element.removeEventListener("click", this.onClick);
|
|
1802
1822
|
}
|
|
1803
1823
|
onClick = (Et(this), (e) => {
|
|
1804
|
-
this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(
|
|
1805
|
-
action:
|
|
1824
|
+
this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(E.Toaster, {
|
|
1825
|
+
action: I.Add,
|
|
1806
1826
|
toast: {
|
|
1807
1827
|
id: this.id,
|
|
1808
1828
|
duration: this.duration,
|
|
1809
|
-
|
|
1829
|
+
level: this.level,
|
|
1810
1830
|
icon: this.icon,
|
|
1811
1831
|
title: this.title,
|
|
1812
1832
|
content: this.content
|
|
@@ -1949,16 +1969,16 @@ function jt(e, t, n, r, i, a) {
|
|
|
1949
1969
|
}
|
|
1950
1970
|
};
|
|
1951
1971
|
}
|
|
1952
|
-
var Mt =
|
|
1972
|
+
var Mt = u("bleet-alert"), Nt, Q;
|
|
1953
1973
|
(class {
|
|
1954
1974
|
logger;
|
|
1955
1975
|
element;
|
|
1956
1976
|
p;
|
|
1957
1977
|
transitionService;
|
|
1958
1978
|
static {
|
|
1959
|
-
({c: [
|
|
1979
|
+
({c: [Q, Nt]} = jt(this, [Mt], []));
|
|
1960
1980
|
}
|
|
1961
|
-
constructor(e =
|
|
1981
|
+
constructor(e = m(o).scopeTo("bleet-alert"), t = m(s), n = m(c), r = m(b)) {
|
|
1962
1982
|
this.logger = e, this.element = t, this.p = n, this.transitionService = r, this.logger.trace("constructor");
|
|
1963
1983
|
}
|
|
1964
1984
|
closeButton;
|
|
@@ -1974,7 +1994,7 @@ var Mt = l("bleet-alert"), Nt, Y;
|
|
|
1974
1994
|
onClose = (e) => {
|
|
1975
1995
|
this.logger.trace("onClose", e), e.preventDefault(), this.transitionService.run(this.element, (e) => {
|
|
1976
1996
|
let t = e.scrollHeight;
|
|
1977
|
-
e.style.height = t + "px", e.offsetHeight, e.style.height = "0px",
|
|
1997
|
+
e.style.height = t + "px", e.offsetHeight, e.style.height = "0px", w(e, "alert", "hide");
|
|
1978
1998
|
}, (e) => {
|
|
1979
1999
|
e.hidden = !0, this.p.requestAnimationFrame(() => {
|
|
1980
2000
|
e.style.height = "", e.remove();
|
|
@@ -2117,39 +2137,30 @@ function Rt(e, t, n, r, i, a) {
|
|
|
2117
2137
|
}
|
|
2118
2138
|
};
|
|
2119
2139
|
}
|
|
2120
|
-
var zt =
|
|
2140
|
+
var zt = u({
|
|
2121
2141
|
name: "bleet-modal-trigger",
|
|
2122
2142
|
defaultProperty: "id"
|
|
2123
|
-
}), Bt, Vt =
|
|
2143
|
+
}), Bt, Vt = l(), Ht, Ut, Wt, Gt, $;
|
|
2124
2144
|
(class {
|
|
2125
2145
|
logger;
|
|
2126
2146
|
element;
|
|
2127
2147
|
ea;
|
|
2128
2148
|
static {
|
|
2129
|
-
({e: [Ut, Wt, Gt
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
"url"
|
|
2139
|
-
],
|
|
2140
|
-
[
|
|
2141
|
-
Ht,
|
|
2142
|
-
0,
|
|
2143
|
-
"color"
|
|
2144
|
-
]
|
|
2145
|
-
]));
|
|
2149
|
+
({e: [Ht, Ut, Wt, Gt], c: [$, Bt]} = Rt(this, [zt], [[
|
|
2150
|
+
l,
|
|
2151
|
+
0,
|
|
2152
|
+
"id"
|
|
2153
|
+
], [
|
|
2154
|
+
Vt,
|
|
2155
|
+
0,
|
|
2156
|
+
"url"
|
|
2157
|
+
]]));
|
|
2146
2158
|
}
|
|
2147
|
-
constructor(e =
|
|
2159
|
+
constructor(e = m(o).scopeTo("bleet-modal-trigger"), t = m(s), n = m(a)) {
|
|
2148
2160
|
this.logger = e, this.element = t, this.ea = n, this.logger.trace("constructor");
|
|
2149
2161
|
}
|
|
2150
|
-
id =
|
|
2151
|
-
url = (
|
|
2152
|
-
color = (Kt(this), qt(this, "primary"));
|
|
2162
|
+
id = Ht(this, "");
|
|
2163
|
+
url = (Ut(this), Wt(this, ""));
|
|
2153
2164
|
attaching() {
|
|
2154
2165
|
this.logger.trace("attaching");
|
|
2155
2166
|
}
|
|
@@ -2162,12 +2173,11 @@ var zt = l({
|
|
|
2162
2173
|
dispose() {
|
|
2163
2174
|
this.logger.trace("dispose");
|
|
2164
2175
|
}
|
|
2165
|
-
onClick = (
|
|
2166
|
-
this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(
|
|
2167
|
-
action:
|
|
2176
|
+
onClick = (Gt(this), (e) => {
|
|
2177
|
+
this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(E.Modal, {
|
|
2178
|
+
action: N.Toggle,
|
|
2168
2179
|
id: this.id,
|
|
2169
|
-
url: this.url
|
|
2170
|
-
color: this.color
|
|
2180
|
+
url: this.url
|
|
2171
2181
|
});
|
|
2172
2182
|
});
|
|
2173
2183
|
static {
|
|
@@ -2176,7 +2186,7 @@ var zt = l({
|
|
|
2176
2186
|
});
|
|
2177
2187
|
//#endregion
|
|
2178
2188
|
//#region src/attributes/pager.ts
|
|
2179
|
-
function
|
|
2189
|
+
function Kt(e, t) {
|
|
2180
2190
|
if (typeof e != "object" || !e) return e;
|
|
2181
2191
|
var n = e[Symbol.toPrimitive];
|
|
2182
2192
|
if (n !== void 0) {
|
|
@@ -2186,15 +2196,15 @@ function Yt(e, t) {
|
|
|
2186
2196
|
}
|
|
2187
2197
|
return (t === "string" ? String : Number)(e);
|
|
2188
2198
|
}
|
|
2189
|
-
function
|
|
2190
|
-
var t =
|
|
2199
|
+
function qt(e) {
|
|
2200
|
+
var t = Kt(e, "string");
|
|
2191
2201
|
return typeof t == "symbol" ? t : String(t);
|
|
2192
2202
|
}
|
|
2193
|
-
function
|
|
2203
|
+
function Jt(e) {
|
|
2194
2204
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
2195
2205
|
return e;
|
|
2196
2206
|
}
|
|
2197
|
-
function
|
|
2207
|
+
function Yt(e, t, n) {
|
|
2198
2208
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
2199
2209
|
try {
|
|
2200
2210
|
Object.defineProperty(e, "name", {
|
|
@@ -2204,7 +2214,7 @@ function Qt(e, t, n) {
|
|
|
2204
2214
|
} catch {}
|
|
2205
2215
|
return e;
|
|
2206
2216
|
}
|
|
2207
|
-
function
|
|
2217
|
+
function Xt(e, t, n, r, i, a) {
|
|
2208
2218
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
2209
2219
|
function p(t, n, r) {
|
|
2210
2220
|
return function(i, a) {
|
|
@@ -2229,13 +2239,13 @@ function $t(e, t, n, r, i, a) {
|
|
|
2229
2239
|
}
|
|
2230
2240
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
2231
2241
|
if (!b && (d ? (h || x ? E = {
|
|
2232
|
-
get:
|
|
2242
|
+
get: Yt(function() {
|
|
2233
2243
|
return y(this);
|
|
2234
2244
|
}, r, "get"),
|
|
2235
2245
|
set: function(e) {
|
|
2236
2246
|
t[4](this, e);
|
|
2237
2247
|
}
|
|
2238
|
-
} : E[O] = y, h ||
|
|
2248
|
+
} : E[O] = y, h || Yt(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
2239
2249
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
2240
2250
|
u[+c][r] = i < 3 ? 1 : i;
|
|
2241
2251
|
}
|
|
@@ -2283,8 +2293,8 @@ function $t(e, t, n, r, i, a) {
|
|
|
2283
2293
|
var l = n[c], u = l[1], d = u & 7;
|
|
2284
2294
|
if ((u & 8) == o && !d == s) {
|
|
2285
2295
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
2286
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
2287
|
-
return
|
|
2296
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : qt(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
2297
|
+
return Jt(t) === e;
|
|
2288
2298
|
} : i);
|
|
2289
2299
|
}
|
|
2290
2300
|
}
|
|
@@ -2306,15 +2316,15 @@ function $t(e, t, n, r, i, a) {
|
|
|
2306
2316
|
}
|
|
2307
2317
|
};
|
|
2308
2318
|
}
|
|
2309
|
-
var
|
|
2319
|
+
var Zt = u("bleet-pager"), Qt, $t;
|
|
2310
2320
|
(class {
|
|
2311
2321
|
logger;
|
|
2312
2322
|
element;
|
|
2313
2323
|
p;
|
|
2314
2324
|
static {
|
|
2315
|
-
({c: [
|
|
2325
|
+
({c: [$t, Qt]} = Xt(this, [Zt], []));
|
|
2316
2326
|
}
|
|
2317
|
-
constructor(e =
|
|
2327
|
+
constructor(e = m(o).scopeTo("bleet-pager"), t = m(s), n = m(c)) {
|
|
2318
2328
|
this.logger = e, this.element = t, this.p = n, this.logger.trace("constructor");
|
|
2319
2329
|
}
|
|
2320
2330
|
select;
|
|
@@ -2333,12 +2343,12 @@ var en = l("bleet-pager"), tn, Z;
|
|
|
2333
2343
|
n && n.click();
|
|
2334
2344
|
};
|
|
2335
2345
|
static {
|
|
2336
|
-
|
|
2346
|
+
Qt();
|
|
2337
2347
|
}
|
|
2338
2348
|
});
|
|
2339
2349
|
//#endregion
|
|
2340
2350
|
//#region src/attributes/ajaxify-trigger.ts
|
|
2341
|
-
function
|
|
2351
|
+
function en(e, t) {
|
|
2342
2352
|
if (typeof e != "object" || !e) return e;
|
|
2343
2353
|
var n = e[Symbol.toPrimitive];
|
|
2344
2354
|
if (n !== void 0) {
|
|
@@ -2348,15 +2358,15 @@ function nn(e, t) {
|
|
|
2348
2358
|
}
|
|
2349
2359
|
return (t === "string" ? String : Number)(e);
|
|
2350
2360
|
}
|
|
2351
|
-
function
|
|
2352
|
-
var t =
|
|
2361
|
+
function tn(e) {
|
|
2362
|
+
var t = en(e, "string");
|
|
2353
2363
|
return typeof t == "symbol" ? t : String(t);
|
|
2354
2364
|
}
|
|
2355
|
-
function
|
|
2365
|
+
function nn(e) {
|
|
2356
2366
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
2357
2367
|
return e;
|
|
2358
2368
|
}
|
|
2359
|
-
function
|
|
2369
|
+
function rn(e, t, n) {
|
|
2360
2370
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
2361
2371
|
try {
|
|
2362
2372
|
Object.defineProperty(e, "name", {
|
|
@@ -2366,7 +2376,7 @@ function on(e, t, n) {
|
|
|
2366
2376
|
} catch {}
|
|
2367
2377
|
return e;
|
|
2368
2378
|
}
|
|
2369
|
-
function
|
|
2379
|
+
function an(e, t, n, r, i, a) {
|
|
2370
2380
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
2371
2381
|
function p(t, n, r) {
|
|
2372
2382
|
return function(i, a) {
|
|
@@ -2391,13 +2401,13 @@ function sn(e, t, n, r, i, a) {
|
|
|
2391
2401
|
}
|
|
2392
2402
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
2393
2403
|
if (!b && (d ? (h || x ? E = {
|
|
2394
|
-
get:
|
|
2404
|
+
get: rn(function() {
|
|
2395
2405
|
return y(this);
|
|
2396
2406
|
}, r, "get"),
|
|
2397
2407
|
set: function(e) {
|
|
2398
2408
|
t[4](this, e);
|
|
2399
2409
|
}
|
|
2400
|
-
} : E[O] = y, h ||
|
|
2410
|
+
} : E[O] = y, h || rn(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
2401
2411
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
2402
2412
|
u[+c][r] = i < 3 ? 1 : i;
|
|
2403
2413
|
}
|
|
@@ -2445,8 +2455,8 @@ function sn(e, t, n, r, i, a) {
|
|
|
2445
2455
|
var l = n[c], u = l[1], d = u & 7;
|
|
2446
2456
|
if ((u & 8) == o && !d == s) {
|
|
2447
2457
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
2448
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
2449
|
-
return
|
|
2458
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : tn(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
2459
|
+
return nn(t) === e;
|
|
2450
2460
|
} : i);
|
|
2451
2461
|
}
|
|
2452
2462
|
}
|
|
@@ -2468,10 +2478,10 @@ function sn(e, t, n, r, i, a) {
|
|
|
2468
2478
|
}
|
|
2469
2479
|
};
|
|
2470
2480
|
}
|
|
2471
|
-
var
|
|
2481
|
+
var on = u({
|
|
2472
2482
|
name: "bleet-ajaxify-trigger",
|
|
2473
2483
|
defaultProperty: "url"
|
|
2474
|
-
}),
|
|
2484
|
+
}), sn, cn = l(), ln = l(), un = l(), dn = l(), fn = l(), pn = l(), mn = l(), hn = l(), gn, _n, vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn;
|
|
2475
2485
|
(class {
|
|
2476
2486
|
logger;
|
|
2477
2487
|
element;
|
|
@@ -2479,66 +2489,66 @@ var cn = l({
|
|
|
2479
2489
|
apiService;
|
|
2480
2490
|
p;
|
|
2481
2491
|
static {
|
|
2482
|
-
({e: [vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn
|
|
2492
|
+
({e: [gn, _n, vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn], c: [Pn, sn]} = an(this, [on], [
|
|
2483
2493
|
[
|
|
2484
|
-
|
|
2494
|
+
l,
|
|
2485
2495
|
0,
|
|
2486
2496
|
"url"
|
|
2487
2497
|
],
|
|
2488
2498
|
[
|
|
2489
|
-
|
|
2499
|
+
cn,
|
|
2490
2500
|
0,
|
|
2491
2501
|
"verb"
|
|
2492
2502
|
],
|
|
2493
2503
|
[
|
|
2494
|
-
|
|
2504
|
+
ln,
|
|
2495
2505
|
0,
|
|
2496
2506
|
"event"
|
|
2497
2507
|
],
|
|
2498
2508
|
[
|
|
2499
|
-
|
|
2509
|
+
un,
|
|
2500
2510
|
0,
|
|
2501
2511
|
"id"
|
|
2502
2512
|
],
|
|
2503
2513
|
[
|
|
2504
|
-
|
|
2514
|
+
dn,
|
|
2505
2515
|
0,
|
|
2506
2516
|
"mode"
|
|
2507
2517
|
],
|
|
2508
2518
|
[
|
|
2509
|
-
|
|
2519
|
+
fn,
|
|
2510
2520
|
0,
|
|
2511
2521
|
"target"
|
|
2512
2522
|
],
|
|
2513
2523
|
[
|
|
2514
|
-
|
|
2524
|
+
pn,
|
|
2515
2525
|
0,
|
|
2516
2526
|
"method"
|
|
2517
2527
|
],
|
|
2518
2528
|
[
|
|
2519
|
-
|
|
2529
|
+
mn,
|
|
2520
2530
|
0,
|
|
2521
2531
|
"errorTitle"
|
|
2522
2532
|
],
|
|
2523
2533
|
[
|
|
2524
|
-
|
|
2534
|
+
hn,
|
|
2525
2535
|
0,
|
|
2526
2536
|
"errorContent"
|
|
2527
2537
|
]
|
|
2528
2538
|
]));
|
|
2529
2539
|
}
|
|
2530
|
-
constructor(e =
|
|
2531
|
-
this.logger = e, this.element = t, this.ea = r, this.apiService =
|
|
2532
|
-
}
|
|
2533
|
-
url =
|
|
2534
|
-
verb = (
|
|
2535
|
-
event = (
|
|
2536
|
-
id = (
|
|
2537
|
-
mode = (
|
|
2538
|
-
target = (
|
|
2539
|
-
method = (
|
|
2540
|
-
errorTitle = (
|
|
2541
|
-
errorContent = (
|
|
2540
|
+
constructor(e = m(o).scopeTo("bleet-ajaxify-trigger"), t = m(s), r = m(a), i = m(n), l = m(c)) {
|
|
2541
|
+
this.logger = e, this.element = t, this.ea = r, this.apiService = i, this.p = l, this.logger.trace("constructor");
|
|
2542
|
+
}
|
|
2543
|
+
url = gn(this, "");
|
|
2544
|
+
verb = (_n(this), vn(this, ""));
|
|
2545
|
+
event = (yn(this), bn(this, "click"));
|
|
2546
|
+
id = (xn(this), Sn(this, ""));
|
|
2547
|
+
mode = (Cn(this), wn(this, ee.Classic));
|
|
2548
|
+
target = (Tn(this), En(this, ""));
|
|
2549
|
+
method = (Dn(this), On(this, "POST"));
|
|
2550
|
+
errorTitle = (kn(this), An(this, ""));
|
|
2551
|
+
errorContent = (jn(this), Mn(this, ""));
|
|
2542
2552
|
attached() {
|
|
2543
2553
|
this.logger.trace("attached", {
|
|
2544
2554
|
url: this.url,
|
|
@@ -2550,8 +2560,8 @@ var cn = l({
|
|
|
2550
2560
|
detaching() {
|
|
2551
2561
|
this.logger.trace("detaching"), this.element.removeEventListener(this.event, this.onTrigger);
|
|
2552
2562
|
}
|
|
2553
|
-
onTrigger = (
|
|
2554
|
-
e.preventDefault(), e.stopPropagation(), this.logger.trace("onTrigger", e), this.mode ===
|
|
2563
|
+
onTrigger = (Nn(this), (e) => {
|
|
2564
|
+
e.preventDefault(), e.stopPropagation(), this.logger.trace("onTrigger", e), this.mode === ee.PublishOnly ? this.onTriggerPublishOnly() : this.onTriggerClassic(e);
|
|
2555
2565
|
});
|
|
2556
2566
|
onTriggerPublishOnly() {
|
|
2557
2567
|
if (this.logger.debug("onTriggerPublishOnly", {
|
|
@@ -2572,8 +2582,8 @@ var cn = l({
|
|
|
2572
2582
|
}
|
|
2573
2583
|
let e = this.element.querySelectorAll("input:disabled, select:disabled, textarea:disabled");
|
|
2574
2584
|
for (let t of Array.from(e)) t.disabled = !1;
|
|
2575
|
-
this.ea.publish(
|
|
2576
|
-
action:
|
|
2585
|
+
this.ea.publish(E.Ajaxify, {
|
|
2586
|
+
action: F.Run,
|
|
2577
2587
|
id: this.target,
|
|
2578
2588
|
url: this.url || void 0,
|
|
2579
2589
|
method: this.method
|
|
@@ -2591,15 +2601,15 @@ var cn = l({
|
|
|
2591
2601
|
});
|
|
2592
2602
|
let i = this.buildFormData(e);
|
|
2593
2603
|
this.apiService.url(n).fromMultipart(i).request(r).then((e) => {
|
|
2594
|
-
this.logger.debug("response", e.body), e.body.element && this.updateElement(e.body.element), e.body.toast && this.ea.publish(
|
|
2595
|
-
action:
|
|
2604
|
+
this.logger.debug("response", e.body), e.body.element && this.updateElement(e.body.element), e.body.toast && this.ea.publish(E.Toaster, {
|
|
2605
|
+
action: I.Add,
|
|
2596
2606
|
toast: e.body.toast
|
|
2597
|
-
}), e.body.ajaxify && this.ea.publish(
|
|
2607
|
+
}), e.body.ajaxify && this.ea.publish(E.Ajaxify, e.body.ajaxify);
|
|
2598
2608
|
}).catch((e) => {
|
|
2599
|
-
this.logger.error("AJAX request failed", e), this.errorContent !== "" && this.ea.publish(
|
|
2600
|
-
action:
|
|
2609
|
+
this.logger.error("AJAX request failed", e), this.errorContent !== "" && this.ea.publish(E.Toaster, {
|
|
2610
|
+
action: I.Add,
|
|
2601
2611
|
toast: {
|
|
2602
|
-
|
|
2612
|
+
level: V.Danger,
|
|
2603
2613
|
title: this.errorTitle,
|
|
2604
2614
|
content: this.errorContent,
|
|
2605
2615
|
duration: 5e3
|
|
@@ -2646,12 +2656,12 @@ var cn = l({
|
|
|
2646
2656
|
for (let e = 0; e < r.length; e++) e < n.length && this.syncElement(n[e], r[e]);
|
|
2647
2657
|
}
|
|
2648
2658
|
static {
|
|
2649
|
-
|
|
2659
|
+
sn();
|
|
2650
2660
|
}
|
|
2651
2661
|
});
|
|
2652
2662
|
//#endregion
|
|
2653
2663
|
//#region src/attributes/popover.ts
|
|
2654
|
-
function
|
|
2664
|
+
function Fn(e, t) {
|
|
2655
2665
|
if (typeof e != "object" || !e) return e;
|
|
2656
2666
|
var n = e[Symbol.toPrimitive];
|
|
2657
2667
|
if (n !== void 0) {
|
|
@@ -2661,15 +2671,15 @@ function In(e, t) {
|
|
|
2661
2671
|
}
|
|
2662
2672
|
return (t === "string" ? String : Number)(e);
|
|
2663
2673
|
}
|
|
2664
|
-
function
|
|
2665
|
-
var t =
|
|
2674
|
+
function In(e) {
|
|
2675
|
+
var t = Fn(e, "string");
|
|
2666
2676
|
return typeof t == "symbol" ? t : String(t);
|
|
2667
2677
|
}
|
|
2668
|
-
function
|
|
2678
|
+
function Ln(e) {
|
|
2669
2679
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
2670
2680
|
return e;
|
|
2671
2681
|
}
|
|
2672
|
-
function
|
|
2682
|
+
function Rn(e, t, n) {
|
|
2673
2683
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
2674
2684
|
try {
|
|
2675
2685
|
Object.defineProperty(e, "name", {
|
|
@@ -2679,7 +2689,7 @@ function zn(e, t, n) {
|
|
|
2679
2689
|
} catch {}
|
|
2680
2690
|
return e;
|
|
2681
2691
|
}
|
|
2682
|
-
function
|
|
2692
|
+
function zn(e, t, n, r, i, a) {
|
|
2683
2693
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
2684
2694
|
function p(t, n, r) {
|
|
2685
2695
|
return function(i, a) {
|
|
@@ -2704,13 +2714,13 @@ function Bn(e, t, n, r, i, a) {
|
|
|
2704
2714
|
}
|
|
2705
2715
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
2706
2716
|
if (!b && (d ? (h || x ? E = {
|
|
2707
|
-
get:
|
|
2717
|
+
get: Rn(function() {
|
|
2708
2718
|
return y(this);
|
|
2709
2719
|
}, r, "get"),
|
|
2710
2720
|
set: function(e) {
|
|
2711
2721
|
t[4](this, e);
|
|
2712
2722
|
}
|
|
2713
|
-
} : E[O] = y, h ||
|
|
2723
|
+
} : E[O] = y, h || Rn(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
2714
2724
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
2715
2725
|
u[+c][r] = i < 3 ? 1 : i;
|
|
2716
2726
|
}
|
|
@@ -2758,8 +2768,8 @@ function Bn(e, t, n, r, i, a) {
|
|
|
2758
2768
|
var l = n[c], u = l[1], d = u & 7;
|
|
2759
2769
|
if ((u & 8) == o && !d == s) {
|
|
2760
2770
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
2761
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
2762
|
-
return
|
|
2771
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : In(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
2772
|
+
return Ln(t) === e;
|
|
2763
2773
|
} : i);
|
|
2764
2774
|
}
|
|
2765
2775
|
}
|
|
@@ -2781,30 +2791,30 @@ function Bn(e, t, n, r, i, a) {
|
|
|
2781
2791
|
}
|
|
2782
2792
|
};
|
|
2783
2793
|
}
|
|
2784
|
-
var
|
|
2794
|
+
var Bn = u({
|
|
2785
2795
|
name: "bleet-popover",
|
|
2786
2796
|
defaultProperty: "id"
|
|
2787
|
-
}), Hn, Un, Wn
|
|
2797
|
+
}), Vn, Hn, Un, Wn;
|
|
2788
2798
|
(class {
|
|
2789
2799
|
logger;
|
|
2790
2800
|
element;
|
|
2791
2801
|
ea;
|
|
2792
2802
|
p;
|
|
2793
2803
|
static {
|
|
2794
|
-
({e: [
|
|
2795
|
-
|
|
2804
|
+
({e: [Hn, Un], c: [Wn, Vn]} = zn(this, [Bn], [[
|
|
2805
|
+
l,
|
|
2796
2806
|
0,
|
|
2797
2807
|
"id"
|
|
2798
2808
|
]]));
|
|
2799
2809
|
}
|
|
2800
|
-
constructor(e =
|
|
2810
|
+
constructor(e = m(o).scopeTo("bleet-popover"), t = m(s), n = m(a), r = m(c)) {
|
|
2801
2811
|
this.logger = e, this.element = t, this.ea = n, this.p = r, this.logger.trace("constructor");
|
|
2802
2812
|
}
|
|
2803
|
-
id =
|
|
2804
|
-
isOpen = (
|
|
2813
|
+
id = Hn(this, "");
|
|
2814
|
+
isOpen = (Un(this), !1);
|
|
2805
2815
|
subscription = null;
|
|
2806
2816
|
attaching() {
|
|
2807
|
-
this.logger.trace("attaching"), this.subscription = this.ea.subscribe(
|
|
2817
|
+
this.logger.trace("attaching"), this.subscription = this.ea.subscribe(E.Popover, this.onPopover);
|
|
2808
2818
|
}
|
|
2809
2819
|
attached() {
|
|
2810
2820
|
this.logger.trace("attached");
|
|
@@ -2817,24 +2827,24 @@ var Vn = l({
|
|
|
2817
2827
|
}
|
|
2818
2828
|
onPopover = (e) => {
|
|
2819
2829
|
if (e.id === this.id) switch (e.action) {
|
|
2820
|
-
case
|
|
2830
|
+
case z.Open:
|
|
2821
2831
|
this.open(e.rect);
|
|
2822
2832
|
break;
|
|
2823
|
-
case
|
|
2833
|
+
case z.Close:
|
|
2824
2834
|
this.close();
|
|
2825
2835
|
break;
|
|
2826
|
-
case
|
|
2836
|
+
case z.Toggle: this.isOpen ? this.close() : this.open(e.rect);
|
|
2827
2837
|
}
|
|
2828
2838
|
};
|
|
2829
2839
|
open(e) {
|
|
2830
|
-
this.isOpen = !0,
|
|
2831
|
-
status:
|
|
2840
|
+
this.isOpen = !0, w(this.element, "popover", "show"), e && this.positionAt(e), this.ea.publish(E.PopoverStatus, {
|
|
2841
|
+
status: B.Opened,
|
|
2832
2842
|
id: this.id
|
|
2833
2843
|
});
|
|
2834
2844
|
}
|
|
2835
2845
|
close() {
|
|
2836
|
-
this.isOpen = !1,
|
|
2837
|
-
status:
|
|
2846
|
+
this.isOpen = !1, w(this.element, "popover", "hide"), this.ea.publish(E.PopoverStatus, {
|
|
2847
|
+
status: B.Closed,
|
|
2838
2848
|
id: this.id
|
|
2839
2849
|
});
|
|
2840
2850
|
}
|
|
@@ -2844,7 +2854,7 @@ var Vn = l({
|
|
|
2844
2854
|
n < 4 && (n = e.bottom + 10), r < 4 && (r = 4), r + t.width > this.p.window.innerWidth - 4 && (r = this.p.window.innerWidth - t.width - 4), this.element.style.top = `${n}px`, this.element.style.left = `${r}px`, this.element.style.visibility = "", this.element.style.display = "";
|
|
2845
2855
|
}
|
|
2846
2856
|
static {
|
|
2847
|
-
|
|
2857
|
+
Vn();
|
|
2848
2858
|
}
|
|
2849
2859
|
});
|
|
2850
2860
|
//#endregion
|
|
@@ -2979,17 +2989,17 @@ function Yn(e, t, n, r, i, a) {
|
|
|
2979
2989
|
}
|
|
2980
2990
|
};
|
|
2981
2991
|
}
|
|
2982
|
-
var Xn =
|
|
2992
|
+
var Xn = u({
|
|
2983
2993
|
name: "bleet-popover-trigger",
|
|
2984
2994
|
defaultProperty: "id"
|
|
2985
|
-
}), Zn, Qn =
|
|
2995
|
+
}), Zn, Qn = l(), $n, er, tr, nr, rr;
|
|
2986
2996
|
(class {
|
|
2987
2997
|
logger;
|
|
2988
2998
|
element;
|
|
2989
2999
|
ea;
|
|
2990
3000
|
static {
|
|
2991
3001
|
({e: [$n, er, tr, nr], c: [rr, Zn]} = Yn(this, [Xn], [[
|
|
2992
|
-
|
|
3002
|
+
l,
|
|
2993
3003
|
0,
|
|
2994
3004
|
"id"
|
|
2995
3005
|
], [
|
|
@@ -2998,7 +3008,7 @@ var Xn = l({
|
|
|
2998
3008
|
"absolute"
|
|
2999
3009
|
]]));
|
|
3000
3010
|
}
|
|
3001
|
-
constructor(e =
|
|
3011
|
+
constructor(e = m(o).scopeTo("bleet-popover-trigger"), t = m(s), n = m(a)) {
|
|
3002
3012
|
this.logger = e, this.element = t, this.ea = n, this.logger.trace("constructor");
|
|
3003
3013
|
}
|
|
3004
3014
|
id = $n(this, "");
|
|
@@ -3013,16 +3023,16 @@ var Xn = l({
|
|
|
3013
3023
|
this.logger.trace("dispose");
|
|
3014
3024
|
}
|
|
3015
3025
|
onMouseEnter = (nr(this), () => {
|
|
3016
|
-
this.ea.publish(
|
|
3026
|
+
this.ea.publish(E.Popover, {
|
|
3017
3027
|
id: this.id,
|
|
3018
|
-
action:
|
|
3028
|
+
action: z.Open,
|
|
3019
3029
|
rect: this.absolute ? this.element.getBoundingClientRect() : void 0
|
|
3020
3030
|
});
|
|
3021
3031
|
});
|
|
3022
3032
|
onMouseLeave = () => {
|
|
3023
|
-
this.ea.publish(
|
|
3033
|
+
this.ea.publish(E.Popover, {
|
|
3024
3034
|
id: this.id,
|
|
3025
|
-
action:
|
|
3035
|
+
action: z.Close
|
|
3026
3036
|
});
|
|
3027
3037
|
};
|
|
3028
3038
|
static {
|
|
@@ -3030,8 +3040,25 @@ var Xn = l({
|
|
|
3030
3040
|
}
|
|
3031
3041
|
});
|
|
3032
3042
|
//#endregion
|
|
3043
|
+
//#region src/utils/toaster.ts
|
|
3044
|
+
function ir(e) {
|
|
3045
|
+
return {
|
|
3046
|
+
...e,
|
|
3047
|
+
id: e.id || `toast-${Math.random().toString(36).substring(2, 15)}`,
|
|
3048
|
+
level: e.level || V.Info,
|
|
3049
|
+
icon: e.icon || H.Info,
|
|
3050
|
+
duration: e.duration || 0
|
|
3051
|
+
};
|
|
3052
|
+
}
|
|
3053
|
+
function ar(e) {
|
|
3054
|
+
e.hasAttribute("popover") === !0 && (e.matches(":popover-open") === !0 && e.hidePopover(), e.showPopover());
|
|
3055
|
+
}
|
|
3056
|
+
function or(e) {
|
|
3057
|
+
e.hasAttribute("popover") === !0 && e.matches(":popover-open") === !0 && e.hidePopover();
|
|
3058
|
+
}
|
|
3059
|
+
//#endregion
|
|
3033
3060
|
//#region src/attributes/toaster.ts
|
|
3034
|
-
function
|
|
3061
|
+
function sr(e, t) {
|
|
3035
3062
|
if (typeof e != "object" || !e) return e;
|
|
3036
3063
|
var n = e[Symbol.toPrimitive];
|
|
3037
3064
|
if (n !== void 0) {
|
|
@@ -3041,15 +3068,15 @@ function ir(e, t) {
|
|
|
3041
3068
|
}
|
|
3042
3069
|
return (t === "string" ? String : Number)(e);
|
|
3043
3070
|
}
|
|
3044
|
-
function
|
|
3045
|
-
var t =
|
|
3071
|
+
function cr(e) {
|
|
3072
|
+
var t = sr(e, "string");
|
|
3046
3073
|
return typeof t == "symbol" ? t : String(t);
|
|
3047
3074
|
}
|
|
3048
|
-
function
|
|
3075
|
+
function lr(e) {
|
|
3049
3076
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
3050
3077
|
return e;
|
|
3051
3078
|
}
|
|
3052
|
-
function
|
|
3079
|
+
function ur(e, t, n) {
|
|
3053
3080
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
3054
3081
|
try {
|
|
3055
3082
|
Object.defineProperty(e, "name", {
|
|
@@ -3059,7 +3086,7 @@ function sr(e, t, n) {
|
|
|
3059
3086
|
} catch {}
|
|
3060
3087
|
return e;
|
|
3061
3088
|
}
|
|
3062
|
-
function
|
|
3089
|
+
function dr(e, t, n, r, i, a) {
|
|
3063
3090
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
3064
3091
|
function p(t, n, r) {
|
|
3065
3092
|
return function(i, a) {
|
|
@@ -3084,13 +3111,13 @@ function cr(e, t, n, r, i, a) {
|
|
|
3084
3111
|
}
|
|
3085
3112
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
3086
3113
|
if (!b && (d ? (h || x ? E = {
|
|
3087
|
-
get:
|
|
3114
|
+
get: ur(function() {
|
|
3088
3115
|
return y(this);
|
|
3089
3116
|
}, r, "get"),
|
|
3090
3117
|
set: function(e) {
|
|
3091
3118
|
t[4](this, e);
|
|
3092
3119
|
}
|
|
3093
|
-
} : E[O] = y, h ||
|
|
3120
|
+
} : E[O] = y, h || ur(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
3094
3121
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
3095
3122
|
u[+c][r] = i < 3 ? 1 : i;
|
|
3096
3123
|
}
|
|
@@ -3138,8 +3165,8 @@ function cr(e, t, n, r, i, a) {
|
|
|
3138
3165
|
var l = n[c], u = l[1], d = u & 7;
|
|
3139
3166
|
if ((u & 8) == o && !d == s) {
|
|
3140
3167
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
3141
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
3142
|
-
return
|
|
3168
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : cr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
3169
|
+
return lr(t) === e;
|
|
3143
3170
|
} : i);
|
|
3144
3171
|
}
|
|
3145
3172
|
}
|
|
@@ -3161,7 +3188,7 @@ function cr(e, t, n, r, i, a) {
|
|
|
3161
3188
|
}
|
|
3162
3189
|
};
|
|
3163
3190
|
}
|
|
3164
|
-
var
|
|
3191
|
+
var fr = u("bleet-toaster"), pr, mr;
|
|
3165
3192
|
(class {
|
|
3166
3193
|
logger;
|
|
3167
3194
|
element;
|
|
@@ -3169,15 +3196,15 @@ var lr = l("bleet-toaster"), ur, dr;
|
|
|
3169
3196
|
p;
|
|
3170
3197
|
transitionService;
|
|
3171
3198
|
static {
|
|
3172
|
-
({c: [
|
|
3199
|
+
({c: [mr, pr]} = dr(this, [fr], []));
|
|
3173
3200
|
}
|
|
3174
|
-
constructor(e =
|
|
3175
|
-
this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService =
|
|
3201
|
+
constructor(e = m(o).scopeTo("bleet-toaster"), t = m(s), n = m(a), r = m(c), i = m(b)) {
|
|
3202
|
+
this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = i, this.logger.trace("constructor");
|
|
3176
3203
|
}
|
|
3177
3204
|
disposable;
|
|
3178
3205
|
toasts = /* @__PURE__ */ new Map();
|
|
3179
3206
|
attaching() {
|
|
3180
|
-
this.logger.trace("attaching"), this.disposable = this.ea.subscribe(
|
|
3207
|
+
this.logger.trace("attaching"), this.disposable = this.ea.subscribe(E.Toaster, this.onToasterEvent);
|
|
3181
3208
|
}
|
|
3182
3209
|
detaching() {
|
|
3183
3210
|
this.logger.trace("detaching"), this.disposable?.dispose(), this.toasts.forEach((e) => {
|
|
@@ -3185,21 +3212,14 @@ var lr = l("bleet-toaster"), ur, dr;
|
|
|
3185
3212
|
});
|
|
3186
3213
|
}
|
|
3187
3214
|
onToasterEvent = (e) => {
|
|
3188
|
-
if (this.logger.trace("onToasterEvent", e), e.action ===
|
|
3189
|
-
let t =
|
|
3190
|
-
id: e.toast.id || `toast-${Math.random().toString(36).substring(2, 15)}`,
|
|
3191
|
-
color: e.toast.color || R.Info,
|
|
3192
|
-
icon: e.toast.icon || z.Info,
|
|
3193
|
-
duration: e.toast.duration || 0,
|
|
3194
|
-
title: e.toast.title,
|
|
3195
|
-
content: e.toast.content
|
|
3196
|
-
};
|
|
3215
|
+
if (this.logger.trace("onToasterEvent", e), e.action === I.Add && e.toast) {
|
|
3216
|
+
let t = ir(e.toast);
|
|
3197
3217
|
this.toasts.has(t.id) || this.add(t);
|
|
3198
|
-
} else e.action ===
|
|
3218
|
+
} else e.action === I.Remove && e.toast?.id && this.close(e.toast.id);
|
|
3199
3219
|
};
|
|
3200
3220
|
add(e) {
|
|
3201
|
-
let t = this.element.querySelector(`template[data-toaster="${e.
|
|
3202
|
-
if (t === null) this.logger.warn(`No toast template for
|
|
3221
|
+
let t = this.element.querySelector(`template[data-toaster="${e.level}"]`);
|
|
3222
|
+
if (t === null) this.logger.warn(`No toast template for level ${e.level}`);
|
|
3203
3223
|
else {
|
|
3204
3224
|
let n = t.content.cloneNode(!0).firstElementChild, r = this.element.querySelector(`template[data-toaster="icon-${e.icon}"]`), i = n.querySelector("[data-toaster=\"icon\"]");
|
|
3205
3225
|
r !== null && i !== null && i.appendChild(r.content.cloneNode(!0));
|
|
@@ -3213,34 +3233,28 @@ var lr = l("bleet-toaster"), ur, dr;
|
|
|
3213
3233
|
element: n,
|
|
3214
3234
|
closing: !1
|
|
3215
3235
|
};
|
|
3216
|
-
this.toasts.set(e.id, s), this.element.appendChild(n), this.
|
|
3236
|
+
this.toasts.set(e.id, s), this.element.appendChild(n), ar(this.element), this.logger.debug(`Toast added with ID: ${e.id}`), this.transitionService.run(n, (t) => {
|
|
3217
3237
|
e.duration > 0 && (s.closeTimeout = this.p.setTimeout(() => {
|
|
3218
3238
|
this.close(e.id);
|
|
3219
|
-
}, e.duration)),
|
|
3239
|
+
}, e.duration)), w(t, "toaster", "show");
|
|
3220
3240
|
});
|
|
3221
3241
|
}
|
|
3222
3242
|
}
|
|
3223
3243
|
close(e) {
|
|
3224
3244
|
let t = this.toasts.get(e);
|
|
3225
3245
|
t !== void 0 && t.closing === !1 && (t.closing = !0, t.closeTimeout !== void 0 && this.p.clearTimeout(t.closeTimeout), this.transitionService.run(t.element, (e) => {
|
|
3226
|
-
|
|
3246
|
+
w(e, "toaster", "hide");
|
|
3227
3247
|
}, (t) => {
|
|
3228
|
-
t.remove(), this.toasts.delete(e), this.toasts.size === 0 && this.
|
|
3248
|
+
t.remove(), this.toasts.delete(e), this.toasts.size === 0 && or(this.element), this.logger.debug(`Toast removed with ID: ${e}`);
|
|
3229
3249
|
}));
|
|
3230
3250
|
}
|
|
3231
|
-
raise() {
|
|
3232
|
-
this.element.hasAttribute("popover") === !0 && (this.element.matches(":popover-open") === !0 && this.element.hidePopover(), this.element.showPopover());
|
|
3233
|
-
}
|
|
3234
|
-
lower() {
|
|
3235
|
-
this.element.hasAttribute("popover") === !0 && this.element.matches(":popover-open") === !0 && this.element.hidePopover();
|
|
3236
|
-
}
|
|
3237
3251
|
static {
|
|
3238
|
-
|
|
3252
|
+
pr();
|
|
3239
3253
|
}
|
|
3240
3254
|
});
|
|
3241
3255
|
//#endregion
|
|
3242
3256
|
//#region src/attributes/toast.ts
|
|
3243
|
-
function
|
|
3257
|
+
function hr(e, t) {
|
|
3244
3258
|
if (typeof e != "object" || !e) return e;
|
|
3245
3259
|
var n = e[Symbol.toPrimitive];
|
|
3246
3260
|
if (n !== void 0) {
|
|
@@ -3250,15 +3264,15 @@ function fr(e, t) {
|
|
|
3250
3264
|
}
|
|
3251
3265
|
return (t === "string" ? String : Number)(e);
|
|
3252
3266
|
}
|
|
3253
|
-
function
|
|
3254
|
-
var t =
|
|
3267
|
+
function gr(e) {
|
|
3268
|
+
var t = hr(e, "string");
|
|
3255
3269
|
return typeof t == "symbol" ? t : String(t);
|
|
3256
3270
|
}
|
|
3257
|
-
function
|
|
3271
|
+
function _r(e) {
|
|
3258
3272
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
3259
3273
|
return e;
|
|
3260
3274
|
}
|
|
3261
|
-
function
|
|
3275
|
+
function vr(e, t, n) {
|
|
3262
3276
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
3263
3277
|
try {
|
|
3264
3278
|
Object.defineProperty(e, "name", {
|
|
@@ -3268,7 +3282,7 @@ function hr(e, t, n) {
|
|
|
3268
3282
|
} catch {}
|
|
3269
3283
|
return e;
|
|
3270
3284
|
}
|
|
3271
|
-
function
|
|
3285
|
+
function yr(e, t, n, r, i, a) {
|
|
3272
3286
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
3273
3287
|
function p(t, n, r) {
|
|
3274
3288
|
return function(i, a) {
|
|
@@ -3293,13 +3307,13 @@ function gr(e, t, n, r, i, a) {
|
|
|
3293
3307
|
}
|
|
3294
3308
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
3295
3309
|
if (!b && (d ? (h || x ? E = {
|
|
3296
|
-
get:
|
|
3310
|
+
get: vr(function() {
|
|
3297
3311
|
return y(this);
|
|
3298
3312
|
}, r, "get"),
|
|
3299
3313
|
set: function(e) {
|
|
3300
3314
|
t[4](this, e);
|
|
3301
3315
|
}
|
|
3302
|
-
} : E[O] = y, h ||
|
|
3316
|
+
} : E[O] = y, h || vr(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
3303
3317
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
3304
3318
|
u[+c][r] = i < 3 ? 1 : i;
|
|
3305
3319
|
}
|
|
@@ -3347,8 +3361,8 @@ function gr(e, t, n, r, i, a) {
|
|
|
3347
3361
|
var l = n[c], u = l[1], d = u & 7;
|
|
3348
3362
|
if ((u & 8) == o && !d == s) {
|
|
3349
3363
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
3350
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
3351
|
-
return
|
|
3364
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : gr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
3365
|
+
return _r(t) === e;
|
|
3352
3366
|
} : i);
|
|
3353
3367
|
}
|
|
3354
3368
|
}
|
|
@@ -3370,70 +3384,70 @@ function gr(e, t, n, r, i, a) {
|
|
|
3370
3384
|
}
|
|
3371
3385
|
};
|
|
3372
3386
|
}
|
|
3373
|
-
var
|
|
3387
|
+
var br = u({
|
|
3374
3388
|
name: "bleet-toast",
|
|
3375
3389
|
defaultProperty: "id"
|
|
3376
|
-
}),
|
|
3390
|
+
}), xr, Sr = l(), Cr = l(), wr = l(), Tr = l(), Er = l(), Dr, Or, kr, Ar, jr, Mr, Nr, Pr, Fr, Ir, Lr, Rr, zr;
|
|
3377
3391
|
(class {
|
|
3378
3392
|
logger;
|
|
3379
3393
|
ea;
|
|
3380
3394
|
p;
|
|
3381
3395
|
static {
|
|
3382
|
-
({e: [
|
|
3396
|
+
({e: [Dr, Or, kr, Ar, jr, Mr, Nr, Pr, Fr, Ir, Lr, Rr], c: [zr, xr]} = yr(this, [br], [
|
|
3383
3397
|
[
|
|
3384
|
-
|
|
3398
|
+
l,
|
|
3385
3399
|
0,
|
|
3386
3400
|
"id"
|
|
3387
3401
|
],
|
|
3388
3402
|
[
|
|
3389
|
-
|
|
3403
|
+
Sr,
|
|
3390
3404
|
0,
|
|
3391
|
-
"
|
|
3405
|
+
"level"
|
|
3392
3406
|
],
|
|
3393
3407
|
[
|
|
3394
|
-
|
|
3408
|
+
Cr,
|
|
3395
3409
|
0,
|
|
3396
3410
|
"icon"
|
|
3397
3411
|
],
|
|
3398
3412
|
[
|
|
3399
|
-
|
|
3413
|
+
wr,
|
|
3400
3414
|
0,
|
|
3401
3415
|
"title"
|
|
3402
3416
|
],
|
|
3403
3417
|
[
|
|
3404
|
-
|
|
3418
|
+
Tr,
|
|
3405
3419
|
0,
|
|
3406
3420
|
"content"
|
|
3407
3421
|
],
|
|
3408
3422
|
[
|
|
3409
|
-
|
|
3423
|
+
Er,
|
|
3410
3424
|
0,
|
|
3411
3425
|
"duration"
|
|
3412
3426
|
]
|
|
3413
3427
|
]));
|
|
3414
3428
|
}
|
|
3415
|
-
constructor(e =
|
|
3429
|
+
constructor(e = m(o).scopeTo("bleet-toast"), t = m(a), n = m(c)) {
|
|
3416
3430
|
this.logger = e, this.ea = t, this.p = n, this.logger.trace("constructor");
|
|
3417
3431
|
}
|
|
3418
|
-
id =
|
|
3419
|
-
|
|
3420
|
-
icon = (
|
|
3421
|
-
title = (
|
|
3422
|
-
content = (
|
|
3423
|
-
duration = (
|
|
3432
|
+
id = Dr(this, "");
|
|
3433
|
+
level = (Or(this), kr(this, V.Info));
|
|
3434
|
+
icon = (Ar(this), jr(this, H.Info));
|
|
3435
|
+
title = (Mr(this), Nr(this, ""));
|
|
3436
|
+
content = (Pr(this), Fr(this, ""));
|
|
3437
|
+
duration = (Ir(this), Lr(this, 0));
|
|
3424
3438
|
attached() {
|
|
3425
3439
|
this.logger.trace("attached"), this.p.document.readyState === "loading" ? this.p.document.addEventListener("DOMContentLoaded", () => {
|
|
3426
3440
|
this.publish();
|
|
3427
3441
|
}, { once: !0 }) : this.publish();
|
|
3428
3442
|
}
|
|
3429
|
-
publish = (
|
|
3430
|
-
this.logger.trace("publish"),
|
|
3431
|
-
this.ea.publish(
|
|
3432
|
-
action:
|
|
3443
|
+
publish = (Rr(this), () => {
|
|
3444
|
+
this.logger.trace("publish"), p(() => {
|
|
3445
|
+
this.ea.publish(E.Toaster, {
|
|
3446
|
+
action: I.Add,
|
|
3433
3447
|
toast: {
|
|
3434
3448
|
id: this.id,
|
|
3435
3449
|
duration: this.duration,
|
|
3436
|
-
|
|
3450
|
+
level: this.level,
|
|
3437
3451
|
icon: this.icon,
|
|
3438
3452
|
title: this.title,
|
|
3439
3453
|
content: this.content
|
|
@@ -3442,12 +3456,12 @@ var _r = l({
|
|
|
3442
3456
|
});
|
|
3443
3457
|
});
|
|
3444
3458
|
static {
|
|
3445
|
-
|
|
3459
|
+
xr();
|
|
3446
3460
|
}
|
|
3447
3461
|
});
|
|
3448
3462
|
//#endregion
|
|
3449
3463
|
//#region src/attributes/overlay.ts
|
|
3450
|
-
function
|
|
3464
|
+
function Br(e, t) {
|
|
3451
3465
|
if (typeof e != "object" || !e) return e;
|
|
3452
3466
|
var n = e[Symbol.toPrimitive];
|
|
3453
3467
|
if (n !== void 0) {
|
|
@@ -3457,15 +3471,15 @@ function Lr(e, t) {
|
|
|
3457
3471
|
}
|
|
3458
3472
|
return (t === "string" ? String : Number)(e);
|
|
3459
3473
|
}
|
|
3460
|
-
function
|
|
3461
|
-
var t =
|
|
3474
|
+
function Vr(e) {
|
|
3475
|
+
var t = Br(e, "string");
|
|
3462
3476
|
return typeof t == "symbol" ? t : String(t);
|
|
3463
3477
|
}
|
|
3464
|
-
function
|
|
3478
|
+
function Hr(e) {
|
|
3465
3479
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
3466
3480
|
return e;
|
|
3467
3481
|
}
|
|
3468
|
-
function
|
|
3482
|
+
function Ur(e, t, n) {
|
|
3469
3483
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
3470
3484
|
try {
|
|
3471
3485
|
Object.defineProperty(e, "name", {
|
|
@@ -3475,7 +3489,7 @@ function Br(e, t, n) {
|
|
|
3475
3489
|
} catch {}
|
|
3476
3490
|
return e;
|
|
3477
3491
|
}
|
|
3478
|
-
function
|
|
3492
|
+
function Wr(e, t, n, r, i, a) {
|
|
3479
3493
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
3480
3494
|
function p(t, n, r) {
|
|
3481
3495
|
return function(i, a) {
|
|
@@ -3500,13 +3514,13 @@ function Vr(e, t, n, r, i, a) {
|
|
|
3500
3514
|
}
|
|
3501
3515
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
3502
3516
|
if (!b && (d ? (h || x ? E = {
|
|
3503
|
-
get:
|
|
3517
|
+
get: Ur(function() {
|
|
3504
3518
|
return y(this);
|
|
3505
3519
|
}, r, "get"),
|
|
3506
3520
|
set: function(e) {
|
|
3507
3521
|
t[4](this, e);
|
|
3508
3522
|
}
|
|
3509
|
-
} : E[O] = y, h ||
|
|
3523
|
+
} : E[O] = y, h || Ur(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
3510
3524
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
3511
3525
|
u[+c][r] = i < 3 ? 1 : i;
|
|
3512
3526
|
}
|
|
@@ -3554,8 +3568,8 @@ function Vr(e, t, n, r, i, a) {
|
|
|
3554
3568
|
var l = n[c], u = l[1], d = u & 7;
|
|
3555
3569
|
if ((u & 8) == o && !d == s) {
|
|
3556
3570
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
3557
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
3558
|
-
return
|
|
3571
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : Vr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
3572
|
+
return Hr(t) === e;
|
|
3559
3573
|
} : i);
|
|
3560
3574
|
}
|
|
3561
3575
|
}
|
|
@@ -3577,7 +3591,7 @@ function Vr(e, t, n, r, i, a) {
|
|
|
3577
3591
|
}
|
|
3578
3592
|
};
|
|
3579
3593
|
}
|
|
3580
|
-
var
|
|
3594
|
+
var Gr = u("bleet-overlay"), Kr, qr;
|
|
3581
3595
|
(class {
|
|
3582
3596
|
logger;
|
|
3583
3597
|
element;
|
|
@@ -3585,14 +3599,14 @@ var Hr = l("bleet-overlay"), Ur, Wr;
|
|
|
3585
3599
|
p;
|
|
3586
3600
|
transitionService;
|
|
3587
3601
|
static {
|
|
3588
|
-
({c: [
|
|
3602
|
+
({c: [qr, Kr]} = Wr(this, [Gr], []));
|
|
3589
3603
|
}
|
|
3590
|
-
constructor(e =
|
|
3591
|
-
this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService =
|
|
3604
|
+
constructor(e = m(o).scopeTo("bleet-overlay"), t = m(s), n = m(a), r = m(c), i = m(b)) {
|
|
3605
|
+
this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = i, this.logger.trace("constructor");
|
|
3592
3606
|
}
|
|
3593
3607
|
disposable;
|
|
3594
3608
|
attached() {
|
|
3595
|
-
this.logger.trace("attached"), this.disposable = this.ea.subscribe(
|
|
3609
|
+
this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Overlay, this.onOverlayEvent), this.element.addEventListener("click", this.onClickOverlay);
|
|
3596
3610
|
}
|
|
3597
3611
|
detaching() {
|
|
3598
3612
|
this.logger.trace("detaching"), this.element.removeEventListener("click", this.onClickOverlay), this.disposable?.dispose();
|
|
@@ -3602,51 +3616,33 @@ var Hr = l("bleet-overlay"), Ur, Wr;
|
|
|
3602
3616
|
}
|
|
3603
3617
|
open(e = !1) {
|
|
3604
3618
|
this.element.hidden && (this.logger.trace("open"), this.transitionService.run(this.element, (t) => {
|
|
3605
|
-
e && this.ea.publish(
|
|
3606
|
-
|
|
3619
|
+
e && this.ea.publish(E.Overlay, { action: k.Open }), this.ea.publish(E.OverlayStatus, { status: A.Opening }), t.hidden = !1, this.p.requestAnimationFrame(() => {
|
|
3620
|
+
w(t, "overlay", "show");
|
|
3607
3621
|
}), this.logger.trace("open before()");
|
|
3608
3622
|
}, (e) => {
|
|
3609
|
-
this.ea.publish(
|
|
3623
|
+
this.ea.publish(E.OverlayStatus, { status: A.Opened }), this.logger.trace("open after()");
|
|
3610
3624
|
}));
|
|
3611
3625
|
}
|
|
3612
3626
|
close(e = !1) {
|
|
3613
3627
|
this.element.hidden || this.transitionService.run(this.element, (t) => {
|
|
3614
|
-
e && this.ea.publish(
|
|
3628
|
+
e && this.ea.publish(E.Overlay, { action: k.Close }), this.ea.publish(E.OverlayStatus, { status: A.Closing }), w(t, "overlay", "hide"), this.logger.trace("close before()");
|
|
3615
3629
|
}, (e) => {
|
|
3616
|
-
e.hidden = !0, this.logger.trace("close after()"), this.ea.publish(
|
|
3630
|
+
e.hidden = !0, this.logger.trace("close after()"), this.ea.publish(E.OverlayStatus, { status: A.Closed });
|
|
3617
3631
|
});
|
|
3618
3632
|
}
|
|
3619
3633
|
onOverlayEvent = (e) => {
|
|
3620
|
-
e.action ===
|
|
3634
|
+
e.action === k.Open ? (this.logger.trace("onOverlayEvent", e), this.open()) : e.action === k.Close ? (this.logger.trace("onOverlayEvent", e), this.close()) : e.action === k.Toggle ? (this.logger.trace("onOverlayEvent", e), this.toggle()) : this.logger.trace("onOverlayEvent unhandled", e);
|
|
3621
3635
|
};
|
|
3622
3636
|
onClickOverlay = (e) => {
|
|
3623
3637
|
this.logger.trace("onClickOverlay", e), e.preventDefault(), this.close(!0);
|
|
3624
3638
|
};
|
|
3625
3639
|
static {
|
|
3626
|
-
|
|
3640
|
+
Kr();
|
|
3627
3641
|
}
|
|
3628
3642
|
});
|
|
3629
3643
|
//#endregion
|
|
3630
|
-
//#region src/
|
|
3631
|
-
|
|
3632
|
-
bindables: () => Yr,
|
|
3633
|
-
default: () => qr,
|
|
3634
|
-
dependencies: () => Jr,
|
|
3635
|
-
name: () => Kr,
|
|
3636
|
-
register: () => Zr,
|
|
3637
|
-
template: () => qr
|
|
3638
|
-
}), Kr = "bleet-ajaxify", qr = "<template>\n <au-slot if.bind=\"!ajaxedView\"></au-slot>\n <au-compose if.bind=\"ajaxedView\" template.bind=\"ajaxedView\"></au-compose>\n</template>\n", Jr = [], Yr = {}, Xr;
|
|
3639
|
-
function Zr(e) {
|
|
3640
|
-
Xr ||= p.define({
|
|
3641
|
-
name: Kr,
|
|
3642
|
-
template: qr,
|
|
3643
|
-
dependencies: Jr,
|
|
3644
|
-
bindables: Yr
|
|
3645
|
-
}), e.register(Xr);
|
|
3646
|
-
}
|
|
3647
|
-
//#endregion
|
|
3648
|
-
//#region src/components/bleet-ajaxify.ts
|
|
3649
|
-
function Qr(e, t) {
|
|
3644
|
+
//#region src/attributes/focus.ts
|
|
3645
|
+
function Jr(e, t) {
|
|
3650
3646
|
if (typeof e != "object" || !e) return e;
|
|
3651
3647
|
var n = e[Symbol.toPrimitive];
|
|
3652
3648
|
if (n !== void 0) {
|
|
@@ -3656,15 +3652,15 @@ function Qr(e, t) {
|
|
|
3656
3652
|
}
|
|
3657
3653
|
return (t === "string" ? String : Number)(e);
|
|
3658
3654
|
}
|
|
3659
|
-
function
|
|
3660
|
-
var t =
|
|
3655
|
+
function Yr(e) {
|
|
3656
|
+
var t = Jr(e, "string");
|
|
3661
3657
|
return typeof t == "symbol" ? t : String(t);
|
|
3662
3658
|
}
|
|
3663
|
-
function
|
|
3659
|
+
function Xr(e) {
|
|
3664
3660
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
3665
3661
|
return e;
|
|
3666
3662
|
}
|
|
3667
|
-
function
|
|
3663
|
+
function Zr(e, t, n) {
|
|
3668
3664
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
3669
3665
|
try {
|
|
3670
3666
|
Object.defineProperty(e, "name", {
|
|
@@ -3674,7 +3670,7 @@ function ti(e, t, n) {
|
|
|
3674
3670
|
} catch {}
|
|
3675
3671
|
return e;
|
|
3676
3672
|
}
|
|
3677
|
-
function
|
|
3673
|
+
function Qr(e, t, n, r, i, a) {
|
|
3678
3674
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
3679
3675
|
function p(t, n, r) {
|
|
3680
3676
|
return function(i, a) {
|
|
@@ -3699,13 +3695,13 @@ function ni(e, t, n, r, i, a) {
|
|
|
3699
3695
|
}
|
|
3700
3696
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
3701
3697
|
if (!b && (d ? (h || x ? E = {
|
|
3702
|
-
get:
|
|
3698
|
+
get: Zr(function() {
|
|
3703
3699
|
return y(this);
|
|
3704
3700
|
}, r, "get"),
|
|
3705
3701
|
set: function(e) {
|
|
3706
3702
|
t[4](this, e);
|
|
3707
3703
|
}
|
|
3708
|
-
} : E[O] = y, h ||
|
|
3704
|
+
} : E[O] = y, h || Zr(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
3709
3705
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
3710
3706
|
u[+c][r] = i < 3 ? 1 : i;
|
|
3711
3707
|
}
|
|
@@ -3753,8 +3749,8 @@ function ni(e, t, n, r, i, a) {
|
|
|
3753
3749
|
var l = n[c], u = l[1], d = u & 7;
|
|
3754
3750
|
if ((u & 8) == o && !d == s) {
|
|
3755
3751
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
3756
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
3757
|
-
return
|
|
3752
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : Yr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
3753
|
+
return Xr(t) === e;
|
|
3758
3754
|
} : i);
|
|
3759
3755
|
}
|
|
3760
3756
|
}
|
|
@@ -3776,105 +3772,29 @@ function ni(e, t, n, r, i, a) {
|
|
|
3776
3772
|
}
|
|
3777
3773
|
};
|
|
3778
3774
|
}
|
|
3779
|
-
var
|
|
3780
|
-
...Gr,
|
|
3781
|
-
name: "bleet-ajaxify"
|
|
3782
|
-
}), ii, ai = c(), oi = c(), si, ci, li, ui, di;
|
|
3775
|
+
var $r = u("bleet-focus"), ei, ti;
|
|
3783
3776
|
(class {
|
|
3784
|
-
ea;
|
|
3785
3777
|
logger;
|
|
3786
|
-
apiService;
|
|
3787
3778
|
element;
|
|
3779
|
+
p;
|
|
3788
3780
|
static {
|
|
3789
|
-
({
|
|
3790
|
-
ai,
|
|
3791
|
-
0,
|
|
3792
|
-
"id"
|
|
3793
|
-
], [
|
|
3794
|
-
oi,
|
|
3795
|
-
0,
|
|
3796
|
-
"url"
|
|
3797
|
-
]]));
|
|
3798
|
-
}
|
|
3799
|
-
constructor(e = f(i), t = f(a).scopeTo("<bleet-ajaxify>"), r = f(n), s = f(o)) {
|
|
3800
|
-
this.ea = e, this.logger = t, this.apiService = r, this.element = s, this.logger.trace("constructor");
|
|
3801
|
-
}
|
|
3802
|
-
id = si(this, "");
|
|
3803
|
-
url = (ci(this), li(this));
|
|
3804
|
-
ajaxedView = (ui(this), null);
|
|
3805
|
-
disposable;
|
|
3806
|
-
attaching() {
|
|
3807
|
-
this.logger.trace("attaching"), this.disposable = this.ea.subscribe(w.Ajaxify, this.onEvent);
|
|
3808
|
-
}
|
|
3809
|
-
detaching() {
|
|
3810
|
-
this.logger.trace("detaching"), this.disposable?.dispose();
|
|
3811
|
-
}
|
|
3812
|
-
dispose() {
|
|
3813
|
-
this.logger.trace("dispose"), this.disposable?.dispose();
|
|
3814
|
-
}
|
|
3815
|
-
findForm() {
|
|
3816
|
-
return this.element.querySelector("form") ?? this.element.closest("form");
|
|
3781
|
+
({c: [ti, ei]} = Qr(this, [$r], []));
|
|
3817
3782
|
}
|
|
3818
|
-
|
|
3819
|
-
this.logger
|
|
3820
|
-
};
|
|
3821
|
-
handleRefresh(t) {
|
|
3822
|
-
let n = t.url ? t.url : this.url;
|
|
3823
|
-
!n || n.length <= 1 || (this.logger.debug(`Refresh id=${this.id} from url=${n}`), this.apiService.url(n).withInputCodec(e.codec).toText().get().then((e) => {
|
|
3824
|
-
this.logger.debug(`Received for id=${this.id}`), this.ajaxedView = e.body;
|
|
3825
|
-
}).catch((e) => {
|
|
3826
|
-
this.logger.error(`Error for id=${this.id}: `, e);
|
|
3827
|
-
}));
|
|
3783
|
+
constructor(e = m(o).scopeTo("bleet-focus"), t = m(s), n = m(c)) {
|
|
3784
|
+
this.logger = e, this.element = t, this.p = n, this.logger.trace("constructor");
|
|
3828
3785
|
}
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
let e = this.findForm();
|
|
3833
|
-
e && (n = e.action);
|
|
3834
|
-
}
|
|
3835
|
-
if (!n || n.length <= 1) {
|
|
3836
|
-
this.logger.warn(`No URL found for Run id=${this.id}`);
|
|
3837
|
-
return;
|
|
3838
|
-
}
|
|
3839
|
-
let r = (t.method || "POST").toUpperCase();
|
|
3840
|
-
this.logger.debug(`Run id=${this.id} method=${r} url=${n}`);
|
|
3841
|
-
let i = this.apiService.url(n).withInputCodec(e.codec).toText();
|
|
3842
|
-
if (t.body !== void 0) i = t.body instanceof FormData ? i.fromMultipart(t.body) : i.fromJson(t.body);
|
|
3843
|
-
else {
|
|
3844
|
-
let e = this.findForm();
|
|
3845
|
-
e && (i = i.fromMultipart(new FormData(e)));
|
|
3846
|
-
}
|
|
3847
|
-
i.request(r).then((e) => {
|
|
3848
|
-
this.logger.debug(`Received for id=${this.id}`), this.ajaxedView = e.body;
|
|
3849
|
-
}).catch((e) => {
|
|
3850
|
-
this.logger.error(`Error for id=${this.id}: `, e);
|
|
3786
|
+
attached() {
|
|
3787
|
+
this.logger.trace("attached"), this.p.requestAnimationFrame(() => {
|
|
3788
|
+
this.element.focus();
|
|
3851
3789
|
});
|
|
3852
3790
|
}
|
|
3853
3791
|
static {
|
|
3854
|
-
|
|
3792
|
+
ei();
|
|
3855
3793
|
}
|
|
3856
3794
|
});
|
|
3857
3795
|
//#endregion
|
|
3858
|
-
//#region src/
|
|
3859
|
-
|
|
3860
|
-
bindables: () => gi,
|
|
3861
|
-
default: () => mi,
|
|
3862
|
-
dependencies: () => hi,
|
|
3863
|
-
name: () => pi,
|
|
3864
|
-
register: () => vi,
|
|
3865
|
-
template: () => mi
|
|
3866
|
-
}), pi = "bleet-dialog", mi = "<template>\n <dialog ref=\"dialogElement\" class.bind=\"dialogClass\">\n <au-slot name=\"loader\" if.bind=\"loading\"><progress></progress></au-slot>\n <template else>\n <au-compose if.bind=\"contentView\" template.bind=\"contentView\"></au-compose>\n </template>\n </dialog>\n</template>\n", hi = [], gi = {}, _i;
|
|
3867
|
-
function vi(e) {
|
|
3868
|
-
_i ||= p.define({
|
|
3869
|
-
name: pi,
|
|
3870
|
-
template: mi,
|
|
3871
|
-
dependencies: hi,
|
|
3872
|
-
bindables: gi
|
|
3873
|
-
}), e.register(_i);
|
|
3874
|
-
}
|
|
3875
|
-
//#endregion
|
|
3876
|
-
//#region src/components/bleet-dialog.ts
|
|
3877
|
-
function yi(e, t) {
|
|
3796
|
+
//#region src/attributes/first-error.ts
|
|
3797
|
+
function ni(e, t) {
|
|
3878
3798
|
if (typeof e != "object" || !e) return e;
|
|
3879
3799
|
var n = e[Symbol.toPrimitive];
|
|
3880
3800
|
if (n !== void 0) {
|
|
@@ -3884,15 +3804,15 @@ function yi(e, t) {
|
|
|
3884
3804
|
}
|
|
3885
3805
|
return (t === "string" ? String : Number)(e);
|
|
3886
3806
|
}
|
|
3887
|
-
function
|
|
3888
|
-
var t =
|
|
3807
|
+
function ri(e) {
|
|
3808
|
+
var t = ni(e, "string");
|
|
3889
3809
|
return typeof t == "symbol" ? t : String(t);
|
|
3890
3810
|
}
|
|
3891
|
-
function
|
|
3811
|
+
function ii(e) {
|
|
3892
3812
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
3893
3813
|
return e;
|
|
3894
3814
|
}
|
|
3895
|
-
function
|
|
3815
|
+
function ai(e, t, n) {
|
|
3896
3816
|
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
3897
3817
|
try {
|
|
3898
3818
|
Object.defineProperty(e, "name", {
|
|
@@ -3902,7 +3822,7 @@ function Si(e, t, n) {
|
|
|
3902
3822
|
} catch {}
|
|
3903
3823
|
return e;
|
|
3904
3824
|
}
|
|
3905
|
-
function
|
|
3825
|
+
function oi(e, t, n, r, i, a) {
|
|
3906
3826
|
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
3907
3827
|
function p(t, n, r) {
|
|
3908
3828
|
return function(i, a) {
|
|
@@ -3927,13 +3847,13 @@ function Ci(e, t, n, r, i, a) {
|
|
|
3927
3847
|
}
|
|
3928
3848
|
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
3929
3849
|
if (!b && (d ? (h || x ? E = {
|
|
3930
|
-
get:
|
|
3850
|
+
get: ai(function() {
|
|
3931
3851
|
return y(this);
|
|
3932
3852
|
}, r, "get"),
|
|
3933
3853
|
set: function(e) {
|
|
3934
3854
|
t[4](this, e);
|
|
3935
3855
|
}
|
|
3936
|
-
} : E[O] = y, h ||
|
|
3856
|
+
} : E[O] = y, h || ai(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
3937
3857
|
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
3938
3858
|
u[+c][r] = i < 3 ? 1 : i;
|
|
3939
3859
|
}
|
|
@@ -3981,8 +3901,8 @@ function Ci(e, t, n, r, i, a) {
|
|
|
3981
3901
|
var l = n[c], u = l[1], d = u & 7;
|
|
3982
3902
|
if ((u & 8) == o && !d == s) {
|
|
3983
3903
|
var f = l[2], p = !!l[3], m = u & 16;
|
|
3984
|
-
h(o ? e : e.prototype, l, m, p ? "#" + f :
|
|
3985
|
-
return
|
|
3904
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : ri(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
3905
|
+
return ii(t) === e;
|
|
3986
3906
|
} : i);
|
|
3987
3907
|
}
|
|
3988
3908
|
}
|
|
@@ -4004,93 +3924,1228 @@ function Ci(e, t, n, r, i, a) {
|
|
|
4004
3924
|
}
|
|
4005
3925
|
};
|
|
4006
3926
|
}
|
|
4007
|
-
var
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
}),
|
|
3927
|
+
var si = u({
|
|
3928
|
+
name: "bleet-first-error",
|
|
3929
|
+
defaultProperty: "id"
|
|
3930
|
+
}), ci, li, ui, di;
|
|
4011
3931
|
(class {
|
|
4012
3932
|
logger;
|
|
4013
|
-
element;
|
|
4014
3933
|
ea;
|
|
3934
|
+
element;
|
|
4015
3935
|
p;
|
|
4016
|
-
transitionService;
|
|
4017
|
-
apiService;
|
|
4018
3936
|
static {
|
|
4019
|
-
({e: [
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
],
|
|
4025
|
-
[
|
|
4026
|
-
Ei,
|
|
4027
|
-
0,
|
|
4028
|
-
"dialogClass"
|
|
4029
|
-
],
|
|
4030
|
-
[
|
|
4031
|
-
c,
|
|
4032
|
-
0,
|
|
4033
|
-
"loadError"
|
|
4034
|
-
],
|
|
4035
|
-
[
|
|
4036
|
-
c,
|
|
4037
|
-
0,
|
|
4038
|
-
"submitError"
|
|
4039
|
-
]
|
|
4040
|
-
]));
|
|
3937
|
+
({e: [li, ui], c: [di, ci]} = oi(this, [si], [[
|
|
3938
|
+
l,
|
|
3939
|
+
0,
|
|
3940
|
+
"id"
|
|
3941
|
+
]]));
|
|
4041
3942
|
}
|
|
4042
|
-
constructor(e =
|
|
4043
|
-
this.logger = e, this.
|
|
3943
|
+
constructor(e = m(o).scopeTo("bleet-first-error"), t = m(a), n = m(s), r = m(c)) {
|
|
3944
|
+
this.logger = e, this.ea = t, this.element = n, this.p = r, this.logger.trace("constructor");
|
|
4044
3945
|
}
|
|
4045
|
-
id = Di(this, "");
|
|
4046
|
-
dialogClass = (Oi(this), ki(this, ""));
|
|
4047
|
-
loadError = (Ai(this), ji(this, ""));
|
|
4048
|
-
submitError = (Mi(this), Ni(this, ""));
|
|
4049
|
-
dialogElement = (Pi(this), void 0);
|
|
4050
3946
|
disposable;
|
|
4051
|
-
|
|
4052
|
-
closing = !1;
|
|
4053
|
-
contentView = null;
|
|
3947
|
+
id = li(this, "");
|
|
4054
3948
|
attached() {
|
|
4055
|
-
this.disposable = this.ea.subscribe(
|
|
3949
|
+
this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Form, this.onFormEvent);
|
|
4056
3950
|
}
|
|
4057
3951
|
detaching() {
|
|
4058
|
-
this.
|
|
3952
|
+
this.logger.trace("detaching"), this.disposable?.dispose();
|
|
4059
3953
|
}
|
|
4060
|
-
|
|
4061
|
-
|
|
3954
|
+
onFormEvent = (ui(this), (e) => {
|
|
3955
|
+
e.action === O.FirstError && (e.id === void 0 || e.id === this.id) ? (this.logger.trace("onFormEvent", e), this.p.requestAnimationFrame(() => {
|
|
3956
|
+
this.element.querySelector("[aria-invalid=true]")?.focus();
|
|
3957
|
+
})) : this.logger.trace("onFormEvent unhandled", e);
|
|
3958
|
+
});
|
|
3959
|
+
static {
|
|
3960
|
+
ci();
|
|
4062
3961
|
}
|
|
4063
|
-
|
|
4064
|
-
|
|
3962
|
+
});
|
|
3963
|
+
//#endregion
|
|
3964
|
+
//#region src/components/bleet-ajaxify.$au.ts
|
|
3965
|
+
var fi = /* @__PURE__ */ _({
|
|
3966
|
+
bindables: () => gi,
|
|
3967
|
+
default: () => mi,
|
|
3968
|
+
dependencies: () => hi,
|
|
3969
|
+
name: () => pi,
|
|
3970
|
+
register: () => vi,
|
|
3971
|
+
template: () => mi
|
|
3972
|
+
}), pi = "bleet-ajaxify", mi = "<template>\n <au-slot if.bind=\"!ajaxedView\"></au-slot>\n <au-compose if.bind=\"ajaxedView\" template.bind=\"ajaxedView\"></au-compose>\n</template>\n", hi = [], gi = {}, _i;
|
|
3973
|
+
function vi(e) {
|
|
3974
|
+
_i ||= h.define({
|
|
3975
|
+
name: pi,
|
|
3976
|
+
template: mi,
|
|
3977
|
+
dependencies: hi,
|
|
3978
|
+
bindables: gi
|
|
3979
|
+
}), e.register(_i);
|
|
3980
|
+
}
|
|
3981
|
+
//#endregion
|
|
3982
|
+
//#region src/components/bleet-ajaxify.ts
|
|
3983
|
+
function yi(e, t) {
|
|
3984
|
+
if (typeof e != "object" || !e) return e;
|
|
3985
|
+
var n = e[Symbol.toPrimitive];
|
|
3986
|
+
if (n !== void 0) {
|
|
3987
|
+
var r = n.call(e, t || "default");
|
|
3988
|
+
if (typeof r != "object") return r;
|
|
3989
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
4065
3990
|
}
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
3991
|
+
return (t === "string" ? String : Number)(e);
|
|
3992
|
+
}
|
|
3993
|
+
function bi(e) {
|
|
3994
|
+
var t = yi(e, "string");
|
|
3995
|
+
return typeof t == "symbol" ? t : String(t);
|
|
3996
|
+
}
|
|
3997
|
+
function xi(e) {
|
|
3998
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
3999
|
+
return e;
|
|
4000
|
+
}
|
|
4001
|
+
function Si(e, t, n) {
|
|
4002
|
+
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
4003
|
+
try {
|
|
4004
|
+
Object.defineProperty(e, "name", {
|
|
4005
|
+
configurable: !0,
|
|
4006
|
+
value: n ? n + " " + t : t
|
|
4007
|
+
});
|
|
4008
|
+
} catch {}
|
|
4009
|
+
return e;
|
|
4010
|
+
}
|
|
4011
|
+
function Ci(e, t, n, r, i, a) {
|
|
4012
|
+
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
4013
|
+
function p(t, n, r) {
|
|
4014
|
+
return function(i, a) {
|
|
4015
|
+
n && (a = i, i = e);
|
|
4016
|
+
for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
|
|
4017
|
+
return r ? a : i;
|
|
4018
|
+
};
|
|
4019
|
+
}
|
|
4020
|
+
function m(e, t, n, r) {
|
|
4021
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
4022
|
+
return e;
|
|
4023
|
+
}
|
|
4024
|
+
function h(e, t, n, r, i, a, o, c, d, h, g) {
|
|
4025
|
+
function _(e) {
|
|
4026
|
+
if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
4027
|
+
}
|
|
4028
|
+
var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
|
|
4029
|
+
function T(t, n, r) {
|
|
4030
|
+
return function(i, a) {
|
|
4031
|
+
return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
|
|
4032
|
+
};
|
|
4033
|
+
}
|
|
4034
|
+
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
4035
|
+
if (!b && (d ? (h || x ? E = {
|
|
4036
|
+
get: Si(function() {
|
|
4037
|
+
return y(this);
|
|
4038
|
+
}, r, "get"),
|
|
4039
|
+
set: function(e) {
|
|
4040
|
+
t[4](this, e);
|
|
4041
|
+
}
|
|
4042
|
+
} : E[O] = y, h || Si(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
4043
|
+
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
4044
|
+
u[+c][r] = i < 3 ? 1 : i;
|
|
4045
|
+
}
|
|
4046
|
+
for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
|
|
4047
|
+
var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
|
|
4048
|
+
kind: [
|
|
4049
|
+
"field",
|
|
4050
|
+
"accessor",
|
|
4051
|
+
"method",
|
|
4052
|
+
"getter",
|
|
4053
|
+
"setter",
|
|
4054
|
+
"class"
|
|
4055
|
+
][i],
|
|
4056
|
+
name: r,
|
|
4057
|
+
metadata: l,
|
|
4058
|
+
addInitializer: (function(e, t) {
|
|
4059
|
+
if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
|
|
4060
|
+
m(t, "An initializer", "be", !0), a.push(t);
|
|
4061
|
+
}).bind(null, N)
|
|
4062
|
+
};
|
|
4063
|
+
if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
|
|
4064
|
+
else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
|
|
4065
|
+
return r in e;
|
|
4066
|
+
} }, C || (f.get = d ? w ? function(e) {
|
|
4067
|
+
return _(e), E.value;
|
|
4068
|
+
} : T("get", 0, _) : function(e) {
|
|
4069
|
+
return e[r];
|
|
4070
|
+
}), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
|
|
4071
|
+
e[r] = t;
|
|
4072
|
+
}), k = j.call(M, x ? {
|
|
4073
|
+
get: E.get,
|
|
4074
|
+
set: E.set
|
|
4075
|
+
} : E[O], P), N.v = 1, x) {
|
|
4076
|
+
if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
|
|
4077
|
+
else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
|
|
4078
|
+
} else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
|
|
4079
|
+
}
|
|
4080
|
+
return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
|
|
4081
|
+
}
|
|
4082
|
+
function g() {
|
|
4083
|
+
var t = [], r, a, o = function(e) {
|
|
4084
|
+
e && t.push(p(e));
|
|
4085
|
+
}, s = function(o, s) {
|
|
4086
|
+
for (var c = 0; c < n.length; c++) {
|
|
4087
|
+
var l = n[c], u = l[1], d = u & 7;
|
|
4088
|
+
if ((u & 8) == o && !d == s) {
|
|
4089
|
+
var f = l[2], p = !!l[3], m = u & 16;
|
|
4090
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : bi(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
4091
|
+
return xi(t) === e;
|
|
4092
|
+
} : i);
|
|
4093
|
+
}
|
|
4094
|
+
}
|
|
4095
|
+
};
|
|
4096
|
+
return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
|
|
4097
|
+
}
|
|
4098
|
+
function _(e) {
|
|
4099
|
+
return s(e, o, {
|
|
4100
|
+
configurable: !0,
|
|
4101
|
+
enumerable: !0,
|
|
4102
|
+
value: l
|
|
4103
|
+
});
|
|
4104
|
+
}
|
|
4105
|
+
return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
|
|
4106
|
+
e: f,
|
|
4107
|
+
get c() {
|
|
4108
|
+
var n = [];
|
|
4109
|
+
return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
|
|
4110
|
+
}
|
|
4111
|
+
};
|
|
4112
|
+
}
|
|
4113
|
+
var wi = d({
|
|
4114
|
+
...fi,
|
|
4115
|
+
name: "bleet-ajaxify"
|
|
4116
|
+
}), Ti, Ei = l(), Di = l(), Oi, ki, Ai, ji, Mi;
|
|
4117
|
+
(class {
|
|
4118
|
+
ea;
|
|
4119
|
+
logger;
|
|
4120
|
+
apiService;
|
|
4121
|
+
element;
|
|
4122
|
+
static {
|
|
4123
|
+
({e: [Oi, ki, Ai, ji], c: [Mi, Ti]} = Ci(this, [wi], [[
|
|
4124
|
+
Ei,
|
|
4125
|
+
0,
|
|
4126
|
+
"id"
|
|
4127
|
+
], [
|
|
4128
|
+
Di,
|
|
4129
|
+
0,
|
|
4130
|
+
"url"
|
|
4131
|
+
]]));
|
|
4132
|
+
}
|
|
4133
|
+
constructor(e = m(a), t = m(o).scopeTo("<bleet-ajaxify>"), r = m(n), i = m(s)) {
|
|
4134
|
+
this.ea = e, this.logger = t, this.apiService = r, this.element = i, this.logger.trace("constructor");
|
|
4135
|
+
}
|
|
4136
|
+
id = Oi(this, "");
|
|
4137
|
+
url = (ki(this), Ai(this));
|
|
4138
|
+
ajaxedView = (ji(this), null);
|
|
4139
|
+
disposable;
|
|
4140
|
+
attaching() {
|
|
4141
|
+
this.logger.trace("attaching"), this.disposable = this.ea.subscribe(E.Ajaxify, this.onEvent);
|
|
4142
|
+
}
|
|
4143
|
+
detaching() {
|
|
4144
|
+
this.logger.trace("detaching"), this.disposable?.dispose();
|
|
4145
|
+
}
|
|
4146
|
+
dispose() {
|
|
4147
|
+
this.logger.trace("dispose"), this.disposable?.dispose();
|
|
4148
|
+
}
|
|
4149
|
+
findForm() {
|
|
4150
|
+
return this.element.querySelector("form") ?? this.element.closest("form");
|
|
4151
|
+
}
|
|
4152
|
+
onEvent = (e) => {
|
|
4153
|
+
this.logger.trace("onEvent", e), e.id && e.id == this.id && (e.action === F.Refresh ? this.handleRefresh(e) : e.action === F.Run && this.handleRun(e));
|
|
4154
|
+
};
|
|
4155
|
+
handleRefresh(t) {
|
|
4156
|
+
let n = t.url ? t.url : this.url;
|
|
4157
|
+
!n || n.length <= 1 || (this.logger.debug(`Refresh id=${this.id} from url=${n}`), this.apiService.url(n).withInputCodec(e.codec).toText().get().then((e) => {
|
|
4158
|
+
this.logger.debug(`Received for id=${this.id}`), this.ajaxedView = e.body;
|
|
4159
|
+
}).catch((e) => {
|
|
4160
|
+
this.logger.error(`Error for id=${this.id}: `, e);
|
|
4161
|
+
}));
|
|
4162
|
+
}
|
|
4163
|
+
handleRun(t) {
|
|
4164
|
+
let n = t.url || this.url;
|
|
4165
|
+
if (!n || n.length <= 1) {
|
|
4166
|
+
let e = this.findForm();
|
|
4167
|
+
e && (n = e.action);
|
|
4168
|
+
}
|
|
4169
|
+
if (!n || n.length <= 1) {
|
|
4170
|
+
this.logger.warn(`No URL found for Run id=${this.id}`);
|
|
4171
|
+
return;
|
|
4172
|
+
}
|
|
4173
|
+
let r = (t.method || "POST").toUpperCase();
|
|
4174
|
+
this.logger.debug(`Run id=${this.id} method=${r} url=${n}`);
|
|
4175
|
+
let i = this.apiService.url(n).withInputCodec(e.codec).toText();
|
|
4176
|
+
if (t.body !== void 0) i = t.body instanceof FormData ? i.fromMultipart(t.body) : i.fromJson(t.body);
|
|
4177
|
+
else {
|
|
4178
|
+
let e = this.findForm();
|
|
4179
|
+
e && (i = i.fromMultipart(new FormData(e)));
|
|
4180
|
+
}
|
|
4181
|
+
i.request(r).then((e) => {
|
|
4182
|
+
this.logger.debug(`Received for id=${this.id}`), this.ajaxedView = e.body;
|
|
4183
|
+
}).catch((e) => {
|
|
4184
|
+
this.logger.error(`Error for id=${this.id}: `, e);
|
|
4185
|
+
});
|
|
4186
|
+
}
|
|
4187
|
+
static {
|
|
4188
|
+
Ti();
|
|
4189
|
+
}
|
|
4190
|
+
});
|
|
4191
|
+
//#endregion
|
|
4192
|
+
//#region src/components/bleet-dialog.$au.ts
|
|
4193
|
+
var Ni = /* @__PURE__ */ _({
|
|
4194
|
+
bindables: () => Li,
|
|
4195
|
+
default: () => Fi,
|
|
4196
|
+
dependencies: () => Ii,
|
|
4197
|
+
name: () => Pi,
|
|
4198
|
+
register: () => zi,
|
|
4199
|
+
template: () => Fi
|
|
4200
|
+
}), Pi = "bleet-dialog", Fi = "<template>\n <dialog ref=\"dialogElement\" class.bind=\"dialogClass\" aria-label.bind=\"title || null\">\n <au-slot name=\"loader\" if.bind=\"loading\"><progress></progress></au-slot>\n <template else>\n <au-compose if.bind=\"contentView\" template.bind=\"contentView\"></au-compose>\n <au-slot else></au-slot>\n </template>\n </dialog>\n</template>\n", Ii = [], Li = {}, Ri;
|
|
4201
|
+
function zi(e) {
|
|
4202
|
+
Ri ||= h.define({
|
|
4203
|
+
name: Pi,
|
|
4204
|
+
template: Fi,
|
|
4205
|
+
dependencies: Ii,
|
|
4206
|
+
bindables: Li
|
|
4207
|
+
}), e.register(Ri);
|
|
4208
|
+
}
|
|
4209
|
+
//#endregion
|
|
4210
|
+
//#region src/abstracts/components/abstract-dialog.ts
|
|
4211
|
+
function Bi(e, t) {
|
|
4212
|
+
if (typeof e != "object" || !e) return e;
|
|
4213
|
+
var n = e[Symbol.toPrimitive];
|
|
4214
|
+
if (n !== void 0) {
|
|
4215
|
+
var r = n.call(e, t || "default");
|
|
4216
|
+
if (typeof r != "object") return r;
|
|
4217
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
4218
|
+
}
|
|
4219
|
+
return (t === "string" ? String : Number)(e);
|
|
4220
|
+
}
|
|
4221
|
+
function Vi(e) {
|
|
4222
|
+
var t = Bi(e, "string");
|
|
4223
|
+
return typeof t == "symbol" ? t : String(t);
|
|
4224
|
+
}
|
|
4225
|
+
function Hi(e) {
|
|
4226
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
4227
|
+
return e;
|
|
4228
|
+
}
|
|
4229
|
+
function Ui(e, t, n) {
|
|
4230
|
+
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
4231
|
+
try {
|
|
4232
|
+
Object.defineProperty(e, "name", {
|
|
4233
|
+
configurable: !0,
|
|
4234
|
+
value: n ? n + " " + t : t
|
|
4235
|
+
});
|
|
4236
|
+
} catch {}
|
|
4237
|
+
return e;
|
|
4238
|
+
}
|
|
4239
|
+
function Wi(e, t, n, r, i, a) {
|
|
4240
|
+
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
4241
|
+
function p(t, n, r) {
|
|
4242
|
+
return function(i, a) {
|
|
4243
|
+
n && (a = i, i = e);
|
|
4244
|
+
for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
|
|
4245
|
+
return r ? a : i;
|
|
4246
|
+
};
|
|
4247
|
+
}
|
|
4248
|
+
function m(e, t, n, r) {
|
|
4249
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
4250
|
+
return e;
|
|
4251
|
+
}
|
|
4252
|
+
function h(e, t, n, r, i, a, o, c, d, h, g) {
|
|
4253
|
+
function _(e) {
|
|
4254
|
+
if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
4255
|
+
}
|
|
4256
|
+
var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
|
|
4257
|
+
function T(t, n, r) {
|
|
4258
|
+
return function(i, a) {
|
|
4259
|
+
return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
|
|
4260
|
+
};
|
|
4261
|
+
}
|
|
4262
|
+
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
4263
|
+
if (!b && (d ? (h || x ? E = {
|
|
4264
|
+
get: Ui(function() {
|
|
4265
|
+
return y(this);
|
|
4266
|
+
}, r, "get"),
|
|
4267
|
+
set: function(e) {
|
|
4268
|
+
t[4](this, e);
|
|
4269
|
+
}
|
|
4270
|
+
} : E[O] = y, h || Ui(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
4271
|
+
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
4272
|
+
u[+c][r] = i < 3 ? 1 : i;
|
|
4273
|
+
}
|
|
4274
|
+
for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
|
|
4275
|
+
var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
|
|
4276
|
+
kind: [
|
|
4277
|
+
"field",
|
|
4278
|
+
"accessor",
|
|
4279
|
+
"method",
|
|
4280
|
+
"getter",
|
|
4281
|
+
"setter",
|
|
4282
|
+
"class"
|
|
4283
|
+
][i],
|
|
4284
|
+
name: r,
|
|
4285
|
+
metadata: l,
|
|
4286
|
+
addInitializer: (function(e, t) {
|
|
4287
|
+
if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
|
|
4288
|
+
m(t, "An initializer", "be", !0), a.push(t);
|
|
4289
|
+
}).bind(null, N)
|
|
4290
|
+
};
|
|
4291
|
+
if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
|
|
4292
|
+
else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
|
|
4293
|
+
return r in e;
|
|
4294
|
+
} }, C || (f.get = d ? w ? function(e) {
|
|
4295
|
+
return _(e), E.value;
|
|
4296
|
+
} : T("get", 0, _) : function(e) {
|
|
4297
|
+
return e[r];
|
|
4298
|
+
}), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
|
|
4299
|
+
e[r] = t;
|
|
4300
|
+
}), k = j.call(M, x ? {
|
|
4301
|
+
get: E.get,
|
|
4302
|
+
set: E.set
|
|
4303
|
+
} : E[O], P), N.v = 1, x) {
|
|
4304
|
+
if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
|
|
4305
|
+
else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
|
|
4306
|
+
} else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
|
|
4307
|
+
}
|
|
4308
|
+
return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
|
|
4309
|
+
}
|
|
4310
|
+
function g() {
|
|
4311
|
+
var t = [], r, a, o = function(e) {
|
|
4312
|
+
e && t.push(p(e));
|
|
4313
|
+
}, s = function(o, s) {
|
|
4314
|
+
for (var c = 0; c < n.length; c++) {
|
|
4315
|
+
var l = n[c], u = l[1], d = u & 7;
|
|
4316
|
+
if ((u & 8) == o && !d == s) {
|
|
4317
|
+
var f = l[2], p = !!l[3], m = u & 16;
|
|
4318
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : Vi(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
4319
|
+
return Hi(t) === e;
|
|
4320
|
+
} : i);
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
};
|
|
4324
|
+
return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
|
|
4325
|
+
}
|
|
4326
|
+
function _(e) {
|
|
4327
|
+
return s(e, o, {
|
|
4328
|
+
configurable: !0,
|
|
4329
|
+
enumerable: !0,
|
|
4330
|
+
value: l
|
|
4331
|
+
});
|
|
4332
|
+
}
|
|
4333
|
+
return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
|
|
4334
|
+
e: f,
|
|
4335
|
+
get c() {
|
|
4336
|
+
var n = [];
|
|
4337
|
+
return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
|
|
4338
|
+
}
|
|
4339
|
+
};
|
|
4340
|
+
}
|
|
4341
|
+
var Gi, Ki, qi = class {
|
|
4342
|
+
element;
|
|
4343
|
+
ea;
|
|
4344
|
+
p;
|
|
4345
|
+
transitionService;
|
|
4346
|
+
static {
|
|
4347
|
+
({e: [Gi, Ki]} = Wi(this, [], [[
|
|
4348
|
+
l,
|
|
4349
|
+
0,
|
|
4350
|
+
"id"
|
|
4351
|
+
]]));
|
|
4352
|
+
}
|
|
4353
|
+
id = Gi(this, "");
|
|
4354
|
+
title = (Ki(this), "");
|
|
4355
|
+
dialogElement;
|
|
4356
|
+
disposable;
|
|
4357
|
+
closing = !1;
|
|
4358
|
+
constructor(e = m(s), t = m(a), n = m(c), r = m(b)) {
|
|
4359
|
+
this.element = e, this.ea = t, this.p = n, this.transitionService = r;
|
|
4360
|
+
}
|
|
4361
|
+
attached() {
|
|
4362
|
+
this.disposable = this.ea.subscribe(E.Modal, this.onModalEvent), this.dialogElement.addEventListener("cancel", this.onCancelEvent), this.dialogElement.addEventListener("click", this.onDialogClick);
|
|
4363
|
+
}
|
|
4364
|
+
detaching() {
|
|
4365
|
+
this.dialogElement.removeEventListener("cancel", this.onCancelEvent), this.dialogElement.removeEventListener("click", this.onDialogClick), this.disposable?.dispose();
|
|
4366
|
+
}
|
|
4367
|
+
show(e) {
|
|
4368
|
+
this.title = e.title ?? "", this.open();
|
|
4369
|
+
}
|
|
4370
|
+
clear() {}
|
|
4371
|
+
close() {
|
|
4372
|
+
this.closing = !0, this.transitionService.run(this.dialogElement, (e) => {
|
|
4373
|
+
this.closing === !0 && (this.ea.publish(E.ModalStatus, {
|
|
4374
|
+
status: P.Closing,
|
|
4375
|
+
id: this.id
|
|
4376
|
+
}), this.ea.publish(E.Overlay, { action: k.Close }), w(e, "dialog", "hide", this.element));
|
|
4377
|
+
}, (e) => {
|
|
4378
|
+
this.closing === !0 && (this.closing = !1, e.close(), this.title = "", this.clear(), this.ea.publish(E.ModalStatus, {
|
|
4379
|
+
status: P.Closed,
|
|
4380
|
+
id: this.id
|
|
4381
|
+
}));
|
|
4382
|
+
});
|
|
4383
|
+
}
|
|
4384
|
+
open() {
|
|
4385
|
+
this.closing = !1, this.transitionService.run(this.dialogElement, (e) => {
|
|
4386
|
+
this.ea.publish(E.Overlay, { action: k.Open }), this.ea.publish(E.ModalStatus, {
|
|
4387
|
+
status: P.Opening,
|
|
4388
|
+
id: this.id
|
|
4389
|
+
}), e.showModal(), this.p.requestAnimationFrame(() => {
|
|
4390
|
+
w(e, "dialog", "show", this.element);
|
|
4391
|
+
});
|
|
4392
|
+
}, () => {
|
|
4393
|
+
this.ea.publish(E.ModalStatus, {
|
|
4394
|
+
status: P.Opened,
|
|
4395
|
+
id: this.id
|
|
4396
|
+
});
|
|
4397
|
+
});
|
|
4398
|
+
}
|
|
4399
|
+
onModalEvent = (e) => {
|
|
4400
|
+
if (this.id !== "" && e.id === this.id) {
|
|
4401
|
+
let t = this.dialogElement.open === !0 && this.closing === !1;
|
|
4402
|
+
e.action === N.Open && t === !1 ? this.show(e) : e.action === N.Open ? this.title = e.title ?? "" : e.action === N.Close && t === !0 ? this.close() : e.action === N.Toggle && (t === !0 ? this.close() : this.show(e));
|
|
4403
|
+
}
|
|
4404
|
+
};
|
|
4405
|
+
onCancelEvent = (e) => {
|
|
4406
|
+
if (e.target === this.dialogElement) {
|
|
4407
|
+
let t = this.dialogElement.querySelector("[aria-expanded=\"true\"]");
|
|
4408
|
+
e.preventDefault(), t === null ? this.close() : t.click();
|
|
4409
|
+
}
|
|
4410
|
+
};
|
|
4411
|
+
onDialogClick = (e) => {
|
|
4412
|
+
e.target.closest("[data-dialog=\"close\"]") && (e.preventDefault(), this.close());
|
|
4413
|
+
};
|
|
4414
|
+
};
|
|
4415
|
+
//#endregion
|
|
4416
|
+
//#region src/abstracts/components/abstract-dropdown.ts
|
|
4417
|
+
function Ji(e, t) {
|
|
4418
|
+
if (typeof e != "object" || !e) return e;
|
|
4419
|
+
var n = e[Symbol.toPrimitive];
|
|
4420
|
+
if (n !== void 0) {
|
|
4421
|
+
var r = n.call(e, t || "default");
|
|
4422
|
+
if (typeof r != "object") return r;
|
|
4423
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
4424
|
+
}
|
|
4425
|
+
return (t === "string" ? String : Number)(e);
|
|
4426
|
+
}
|
|
4427
|
+
function Yi(e) {
|
|
4428
|
+
var t = Ji(e, "string");
|
|
4429
|
+
return typeof t == "symbol" ? t : String(t);
|
|
4430
|
+
}
|
|
4431
|
+
function Xi(e) {
|
|
4432
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
4433
|
+
return e;
|
|
4434
|
+
}
|
|
4435
|
+
function Zi(e, t, n) {
|
|
4436
|
+
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
4437
|
+
try {
|
|
4438
|
+
Object.defineProperty(e, "name", {
|
|
4439
|
+
configurable: !0,
|
|
4440
|
+
value: n ? n + " " + t : t
|
|
4441
|
+
});
|
|
4442
|
+
} catch {}
|
|
4443
|
+
return e;
|
|
4444
|
+
}
|
|
4445
|
+
function Qi(e, t, n, r, i, a) {
|
|
4446
|
+
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
4447
|
+
function p(t, n, r) {
|
|
4448
|
+
return function(i, a) {
|
|
4449
|
+
n && (a = i, i = e);
|
|
4450
|
+
for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
|
|
4451
|
+
return r ? a : i;
|
|
4452
|
+
};
|
|
4453
|
+
}
|
|
4454
|
+
function m(e, t, n, r) {
|
|
4455
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
4456
|
+
return e;
|
|
4457
|
+
}
|
|
4458
|
+
function h(e, t, n, r, i, a, o, c, d, h, g) {
|
|
4459
|
+
function _(e) {
|
|
4460
|
+
if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
4461
|
+
}
|
|
4462
|
+
var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
|
|
4463
|
+
function T(t, n, r) {
|
|
4464
|
+
return function(i, a) {
|
|
4465
|
+
return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
|
|
4466
|
+
};
|
|
4467
|
+
}
|
|
4468
|
+
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
4469
|
+
if (!b && (d ? (h || x ? E = {
|
|
4470
|
+
get: Zi(function() {
|
|
4471
|
+
return y(this);
|
|
4472
|
+
}, r, "get"),
|
|
4473
|
+
set: function(e) {
|
|
4474
|
+
t[4](this, e);
|
|
4475
|
+
}
|
|
4476
|
+
} : E[O] = y, h || Zi(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
4477
|
+
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
4478
|
+
u[+c][r] = i < 3 ? 1 : i;
|
|
4479
|
+
}
|
|
4480
|
+
for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
|
|
4481
|
+
var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
|
|
4482
|
+
kind: [
|
|
4483
|
+
"field",
|
|
4484
|
+
"accessor",
|
|
4485
|
+
"method",
|
|
4486
|
+
"getter",
|
|
4487
|
+
"setter",
|
|
4488
|
+
"class"
|
|
4489
|
+
][i],
|
|
4490
|
+
name: r,
|
|
4491
|
+
metadata: l,
|
|
4492
|
+
addInitializer: (function(e, t) {
|
|
4493
|
+
if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
|
|
4494
|
+
m(t, "An initializer", "be", !0), a.push(t);
|
|
4495
|
+
}).bind(null, N)
|
|
4496
|
+
};
|
|
4497
|
+
if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
|
|
4498
|
+
else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
|
|
4499
|
+
return r in e;
|
|
4500
|
+
} }, C || (f.get = d ? w ? function(e) {
|
|
4501
|
+
return _(e), E.value;
|
|
4502
|
+
} : T("get", 0, _) : function(e) {
|
|
4503
|
+
return e[r];
|
|
4504
|
+
}), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
|
|
4505
|
+
e[r] = t;
|
|
4506
|
+
}), k = j.call(M, x ? {
|
|
4507
|
+
get: E.get,
|
|
4508
|
+
set: E.set
|
|
4509
|
+
} : E[O], P), N.v = 1, x) {
|
|
4510
|
+
if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
|
|
4511
|
+
else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
|
|
4512
|
+
} else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
|
|
4513
|
+
}
|
|
4514
|
+
return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
|
|
4515
|
+
}
|
|
4516
|
+
function g() {
|
|
4517
|
+
var t = [], r, a, o = function(e) {
|
|
4518
|
+
e && t.push(p(e));
|
|
4519
|
+
}, s = function(o, s) {
|
|
4520
|
+
for (var c = 0; c < n.length; c++) {
|
|
4521
|
+
var l = n[c], u = l[1], d = u & 7;
|
|
4522
|
+
if ((u & 8) == o && !d == s) {
|
|
4523
|
+
var f = l[2], p = !!l[3], m = u & 16;
|
|
4524
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : Yi(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
4525
|
+
return Xi(t) === e;
|
|
4526
|
+
} : i);
|
|
4527
|
+
}
|
|
4528
|
+
}
|
|
4529
|
+
};
|
|
4530
|
+
return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
|
|
4531
|
+
}
|
|
4532
|
+
function _(e) {
|
|
4533
|
+
return s(e, o, {
|
|
4534
|
+
configurable: !0,
|
|
4535
|
+
enumerable: !0,
|
|
4536
|
+
value: l
|
|
4537
|
+
});
|
|
4538
|
+
}
|
|
4539
|
+
return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
|
|
4540
|
+
e: f,
|
|
4541
|
+
get c() {
|
|
4542
|
+
var n = [];
|
|
4543
|
+
return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
|
|
4544
|
+
}
|
|
4545
|
+
};
|
|
4546
|
+
}
|
|
4547
|
+
var $i = l({ mode: r.twoWay }), ea = l({ mode: r.twoWay }), ta, na, ra, ia, aa, oa, sa, ca, la, ua, da, fa, pa, ma, ha = class {
|
|
4548
|
+
element;
|
|
4549
|
+
p;
|
|
4550
|
+
trapFocusService;
|
|
4551
|
+
static {
|
|
4552
|
+
({e: [ta, na, ra, ia, aa, oa, sa, ca, la, ua, da, fa, pa, ma]} = Qi(this, [], [
|
|
4553
|
+
[
|
|
4554
|
+
l,
|
|
4555
|
+
0,
|
|
4556
|
+
"options"
|
|
4557
|
+
],
|
|
4558
|
+
[
|
|
4559
|
+
$i,
|
|
4560
|
+
0,
|
|
4561
|
+
"value"
|
|
4562
|
+
],
|
|
4563
|
+
[
|
|
4564
|
+
ea,
|
|
4565
|
+
0,
|
|
4566
|
+
"values"
|
|
4567
|
+
],
|
|
4568
|
+
[
|
|
4569
|
+
l,
|
|
4570
|
+
0,
|
|
4571
|
+
"multiple"
|
|
4572
|
+
],
|
|
4573
|
+
[
|
|
4574
|
+
l,
|
|
4575
|
+
0,
|
|
4576
|
+
"disabled"
|
|
4577
|
+
],
|
|
4578
|
+
[
|
|
4579
|
+
l,
|
|
4580
|
+
0,
|
|
4581
|
+
"placeholder"
|
|
4582
|
+
],
|
|
4583
|
+
[
|
|
4584
|
+
f,
|
|
4585
|
+
0,
|
|
4586
|
+
"query"
|
|
4587
|
+
]
|
|
4588
|
+
]));
|
|
4589
|
+
}
|
|
4590
|
+
options = ta(this, []);
|
|
4591
|
+
value = (na(this), ra(this, null));
|
|
4592
|
+
values = (ia(this), aa(this, []));
|
|
4593
|
+
multiple = (oa(this), sa(this, !1));
|
|
4594
|
+
disabled = (ca(this), la(this, !1));
|
|
4595
|
+
placeholder = (ua(this), da(this, ""));
|
|
4596
|
+
open = (fa(this), !1);
|
|
4597
|
+
groups = [];
|
|
4598
|
+
selection = [];
|
|
4599
|
+
empty = !1;
|
|
4600
|
+
button;
|
|
4601
|
+
panel;
|
|
4602
|
+
search = null;
|
|
4603
|
+
entries = [];
|
|
4604
|
+
placeholderRow = null;
|
|
4605
|
+
built = [];
|
|
4606
|
+
query = pa(this, "");
|
|
4607
|
+
constructor(e = m(s), t = m(c), n = m(S)) {
|
|
4608
|
+
this.element = e, this.p = t, this.trapFocusService = n;
|
|
4609
|
+
}
|
|
4610
|
+
bound() {
|
|
4611
|
+
this.build();
|
|
4612
|
+
}
|
|
4613
|
+
detaching() {
|
|
4614
|
+
let e = Promise.resolve();
|
|
4615
|
+
return this.open === !0 && (e = this.trapFocusService.stop()), e;
|
|
4616
|
+
}
|
|
4617
|
+
optionsChanged() {
|
|
4618
|
+
this.isBuiltFrom(this.options) === !1 && this.build();
|
|
4619
|
+
}
|
|
4620
|
+
placeholderChanged() {
|
|
4621
|
+
this.build();
|
|
4622
|
+
}
|
|
4623
|
+
valueChanged() {
|
|
4624
|
+
this.select();
|
|
4625
|
+
}
|
|
4626
|
+
valuesChanged() {
|
|
4627
|
+
this.select();
|
|
4628
|
+
}
|
|
4629
|
+
queryChanged() {
|
|
4630
|
+
this.filter();
|
|
4631
|
+
}
|
|
4632
|
+
onClickToggle(e) {
|
|
4633
|
+
let t = Promise.resolve();
|
|
4634
|
+
return e.preventDefault(), this.open === !0 ? t = this.trapFocusService.stop() : this.disabled === !1 && (t = this.openPanel()), t;
|
|
4635
|
+
}
|
|
4636
|
+
onClickItem(e, t) {
|
|
4637
|
+
let n = Promise.resolve();
|
|
4638
|
+
return e.preventDefault(), t.disabled === !1 && (this.multiple === !0 ? this.values = t.selected === !0 ? this.values.filter((e) => e !== t.value) : [...this.values, t.value] : (this.value = t.value, n = this.trapFocusService.stop())), n;
|
|
4639
|
+
}
|
|
4640
|
+
onClickRemove(e, t) {
|
|
4641
|
+
e.preventDefault(), e.stopPropagation(), this.values = this.values.filter((e) => e !== t.value);
|
|
4642
|
+
}
|
|
4643
|
+
openPanel() {
|
|
4644
|
+
let e = this.search ?? this.panel.querySelector("[aria-selected=\"true\"]") ?? void 0;
|
|
4645
|
+
return this.open = !0, this.trapFocusService.start(this.button, this.panel, this.element, void 0, this.onStopTrapFocus, e).then(() => {
|
|
4646
|
+
this.p.requestAnimationFrame(() => {
|
|
4647
|
+
this.panel.querySelector("[aria-selected=\"true\"]")?.scrollIntoView({ block: "nearest" });
|
|
4648
|
+
});
|
|
4649
|
+
});
|
|
4650
|
+
}
|
|
4651
|
+
onStopTrapFocus = (ma(this), () => {
|
|
4652
|
+
this.open = !1, this.query = "";
|
|
4653
|
+
});
|
|
4654
|
+
build() {
|
|
4655
|
+
this.placeholderRow = this.multiple === !1 && this.placeholder !== "" ? {
|
|
4656
|
+
value: null,
|
|
4657
|
+
label: this.placeholder,
|
|
4658
|
+
disabled: !1,
|
|
4659
|
+
selected: !1
|
|
4660
|
+
} : null, this.entries = this.options.map((e) => ({
|
|
4661
|
+
group: e.group ?? "",
|
|
4662
|
+
row: {
|
|
4663
|
+
value: e.value,
|
|
4664
|
+
label: e.label,
|
|
4665
|
+
disabled: e.disabled === !0,
|
|
4666
|
+
selected: !1
|
|
4667
|
+
}
|
|
4668
|
+
})), this.built = this.options.map((e) => ({
|
|
4669
|
+
value: e.value,
|
|
4670
|
+
label: e.label,
|
|
4671
|
+
group: e.group,
|
|
4672
|
+
disabled: e.disabled
|
|
4673
|
+
})), this.select(), this.filter();
|
|
4674
|
+
}
|
|
4675
|
+
isBuiltFrom(e) {
|
|
4676
|
+
return e.length === this.built.length && e.every((e, t) => {
|
|
4677
|
+
let n = this.built[t];
|
|
4678
|
+
return e.value === n.value && e.label === n.label && (e.group ?? "") === (n.group ?? "") && e.disabled === !0 == (n.disabled === !0);
|
|
4679
|
+
});
|
|
4680
|
+
}
|
|
4681
|
+
select() {
|
|
4682
|
+
this.placeholderRow !== null && (this.placeholderRow.selected = this.value === null), this.entries.forEach((e) => {
|
|
4683
|
+
e.row.selected = this.multiple === !0 ? this.values.includes(e.row.value) : this.value === e.row.value;
|
|
4684
|
+
}), this.selection = this.entries.map((e) => e.row).filter((e) => e.selected === !0);
|
|
4685
|
+
}
|
|
4686
|
+
filter() {
|
|
4687
|
+
let e = this.query.toLowerCase().trim(), t = [];
|
|
4688
|
+
this.placeholderRow !== null && e === "" && t.push({
|
|
4689
|
+
label: "",
|
|
4690
|
+
rows: [this.placeholderRow]
|
|
4691
|
+
}), this.entries.forEach((n) => {
|
|
4692
|
+
if (e === "" || n.row.label.toLowerCase().includes(e) === !0) {
|
|
4693
|
+
let e = t.find((e) => e.label === n.group);
|
|
4694
|
+
e === void 0 ? t.push({
|
|
4695
|
+
label: n.group,
|
|
4696
|
+
rows: [n.row]
|
|
4697
|
+
}) : e.rows.push(n.row);
|
|
4698
|
+
}
|
|
4699
|
+
}), this.groups = t, this.empty = e !== "" && t.length === 0;
|
|
4700
|
+
}
|
|
4701
|
+
};
|
|
4702
|
+
//#endregion
|
|
4703
|
+
//#region src/abstracts/components/abstract-pager.ts
|
|
4704
|
+
function ga(e, t) {
|
|
4705
|
+
if (typeof e != "object" || !e) return e;
|
|
4706
|
+
var n = e[Symbol.toPrimitive];
|
|
4707
|
+
if (n !== void 0) {
|
|
4708
|
+
var r = n.call(e, t || "default");
|
|
4709
|
+
if (typeof r != "object") return r;
|
|
4710
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
4711
|
+
}
|
|
4712
|
+
return (t === "string" ? String : Number)(e);
|
|
4713
|
+
}
|
|
4714
|
+
function _a(e) {
|
|
4715
|
+
var t = ga(e, "string");
|
|
4716
|
+
return typeof t == "symbol" ? t : String(t);
|
|
4717
|
+
}
|
|
4718
|
+
function va(e) {
|
|
4719
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
4720
|
+
return e;
|
|
4721
|
+
}
|
|
4722
|
+
function ya(e, t, n) {
|
|
4723
|
+
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
4724
|
+
try {
|
|
4725
|
+
Object.defineProperty(e, "name", {
|
|
4726
|
+
configurable: !0,
|
|
4727
|
+
value: n ? n + " " + t : t
|
|
4728
|
+
});
|
|
4729
|
+
} catch {}
|
|
4730
|
+
return e;
|
|
4731
|
+
}
|
|
4732
|
+
function ba(e, t, n, r, i, a) {
|
|
4733
|
+
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
4734
|
+
function p(t, n, r) {
|
|
4735
|
+
return function(i, a) {
|
|
4736
|
+
n && (a = i, i = e);
|
|
4737
|
+
for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
|
|
4738
|
+
return r ? a : i;
|
|
4739
|
+
};
|
|
4740
|
+
}
|
|
4741
|
+
function m(e, t, n, r) {
|
|
4742
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
4743
|
+
return e;
|
|
4744
|
+
}
|
|
4745
|
+
function h(e, t, n, r, i, a, o, c, d, h, g) {
|
|
4746
|
+
function _(e) {
|
|
4747
|
+
if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
4748
|
+
}
|
|
4749
|
+
var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
|
|
4750
|
+
function T(t, n, r) {
|
|
4751
|
+
return function(i, a) {
|
|
4752
|
+
return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
|
|
4753
|
+
};
|
|
4754
|
+
}
|
|
4755
|
+
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
4756
|
+
if (!b && (d ? (h || x ? E = {
|
|
4757
|
+
get: ya(function() {
|
|
4758
|
+
return y(this);
|
|
4759
|
+
}, r, "get"),
|
|
4760
|
+
set: function(e) {
|
|
4761
|
+
t[4](this, e);
|
|
4762
|
+
}
|
|
4763
|
+
} : E[O] = y, h || ya(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
4764
|
+
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
4765
|
+
u[+c][r] = i < 3 ? 1 : i;
|
|
4766
|
+
}
|
|
4767
|
+
for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
|
|
4768
|
+
var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
|
|
4769
|
+
kind: [
|
|
4770
|
+
"field",
|
|
4771
|
+
"accessor",
|
|
4772
|
+
"method",
|
|
4773
|
+
"getter",
|
|
4774
|
+
"setter",
|
|
4775
|
+
"class"
|
|
4776
|
+
][i],
|
|
4777
|
+
name: r,
|
|
4778
|
+
metadata: l,
|
|
4779
|
+
addInitializer: (function(e, t) {
|
|
4780
|
+
if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
|
|
4781
|
+
m(t, "An initializer", "be", !0), a.push(t);
|
|
4782
|
+
}).bind(null, N)
|
|
4783
|
+
};
|
|
4784
|
+
if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
|
|
4785
|
+
else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
|
|
4786
|
+
return r in e;
|
|
4787
|
+
} }, C || (f.get = d ? w ? function(e) {
|
|
4788
|
+
return _(e), E.value;
|
|
4789
|
+
} : T("get", 0, _) : function(e) {
|
|
4790
|
+
return e[r];
|
|
4791
|
+
}), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
|
|
4792
|
+
e[r] = t;
|
|
4793
|
+
}), k = j.call(M, x ? {
|
|
4794
|
+
get: E.get,
|
|
4795
|
+
set: E.set
|
|
4796
|
+
} : E[O], P), N.v = 1, x) {
|
|
4797
|
+
if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
|
|
4798
|
+
else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
|
|
4799
|
+
} else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
|
|
4800
|
+
}
|
|
4801
|
+
return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
|
|
4802
|
+
}
|
|
4803
|
+
function g() {
|
|
4804
|
+
var t = [], r, a, o = function(e) {
|
|
4805
|
+
e && t.push(p(e));
|
|
4806
|
+
}, s = function(o, s) {
|
|
4807
|
+
for (var c = 0; c < n.length; c++) {
|
|
4808
|
+
var l = n[c], u = l[1], d = u & 7;
|
|
4809
|
+
if ((u & 8) == o && !d == s) {
|
|
4810
|
+
var f = l[2], p = !!l[3], m = u & 16;
|
|
4811
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : _a(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
4812
|
+
return va(t) === e;
|
|
4813
|
+
} : i);
|
|
4814
|
+
}
|
|
4815
|
+
}
|
|
4816
|
+
};
|
|
4817
|
+
return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
|
|
4818
|
+
}
|
|
4819
|
+
function _(e) {
|
|
4820
|
+
return s(e, o, {
|
|
4821
|
+
configurable: !0,
|
|
4822
|
+
enumerable: !0,
|
|
4823
|
+
value: l
|
|
4824
|
+
});
|
|
4825
|
+
}
|
|
4826
|
+
return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
|
|
4827
|
+
e: f,
|
|
4828
|
+
get c() {
|
|
4829
|
+
var n = [];
|
|
4830
|
+
return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
|
|
4831
|
+
}
|
|
4832
|
+
};
|
|
4833
|
+
}
|
|
4834
|
+
var xa, Sa, Ca, wa, Ta, Ea, Da = /*#__PURE__*/ function(e) {
|
|
4835
|
+
return e.Change = "bleet-page", e;
|
|
4836
|
+
}({}), Oa = /*#__PURE__*/ function(e) {
|
|
4837
|
+
return e[e.MaxButtonCount = 10] = "MaxButtonCount", e;
|
|
4838
|
+
}(Oa || {}), ka = class {
|
|
4839
|
+
element;
|
|
4840
|
+
static {
|
|
4841
|
+
({e: [xa, Sa, Ca, wa, Ta, Ea]} = ba(this, [], [
|
|
4842
|
+
[
|
|
4843
|
+
l,
|
|
4844
|
+
0,
|
|
4845
|
+
"pagination"
|
|
4846
|
+
],
|
|
4847
|
+
[
|
|
4848
|
+
l,
|
|
4849
|
+
0,
|
|
4850
|
+
"maxButtonCount"
|
|
4851
|
+
],
|
|
4852
|
+
[
|
|
4853
|
+
f,
|
|
4854
|
+
0,
|
|
4855
|
+
"selectedPage"
|
|
4856
|
+
]
|
|
4857
|
+
]));
|
|
4858
|
+
}
|
|
4859
|
+
pagination = xa(this, {
|
|
4860
|
+
limit: 0,
|
|
4861
|
+
currentPage: 1,
|
|
4862
|
+
totalPages: 1,
|
|
4863
|
+
totalCount: 0
|
|
4864
|
+
});
|
|
4865
|
+
maxButtonCount = (Sa(this), Ca(this, Oa.MaxButtonCount));
|
|
4866
|
+
page = (wa(this), 1);
|
|
4867
|
+
numbers = [];
|
|
4868
|
+
begin = 0;
|
|
4869
|
+
end = 0;
|
|
4870
|
+
selectedPage = Ta(this, null);
|
|
4871
|
+
constructor(e = m(s)) {
|
|
4872
|
+
this.element = e, Ea(this);
|
|
4873
|
+
}
|
|
4874
|
+
bound() {
|
|
4875
|
+
this.page = this.pagination.currentPage, this.refresh();
|
|
4876
|
+
}
|
|
4877
|
+
paginationChanged() {
|
|
4878
|
+
this.page = this.pagination.currentPage, this.refresh();
|
|
4879
|
+
}
|
|
4880
|
+
selectedPageChanged() {
|
|
4881
|
+
this.selectedPage !== null && this.go(this.selectedPage);
|
|
4882
|
+
}
|
|
4883
|
+
onClickPage(e, t) {
|
|
4884
|
+
e.preventDefault(), this.go(t);
|
|
4885
|
+
}
|
|
4886
|
+
refreshed() {}
|
|
4887
|
+
go(e) {
|
|
4888
|
+
e !== this.page && e >= 1 && e <= this.pagination.totalPages && (this.page = e, this.refresh(), this.element.dispatchEvent(new CustomEvent(Da.Change, {
|
|
4889
|
+
bubbles: !0,
|
|
4890
|
+
detail: { page: e }
|
|
4891
|
+
})));
|
|
4892
|
+
}
|
|
4893
|
+
refresh() {
|
|
4894
|
+
let { limit: e, totalPages: t, totalCount: n } = this.pagination, r = Math.floor(this.maxButtonCount / 2), i = Math.max(1, this.page - r), a = i + this.maxButtonCount - 1;
|
|
4895
|
+
a > t && (a = t, i = Math.max(1, a - this.maxButtonCount + 1)), this.numbers = Array.from({ length: Math.max(0, a - i + 1) }, (e, t) => i + t), this.selectedPage = this.page, this.begin = n === 0 ? 0 : (this.page - 1) * e + 1, this.end = Math.min(this.page * e, n), this.refreshed();
|
|
4896
|
+
}
|
|
4897
|
+
}, Aa = class {
|
|
4898
|
+
logger;
|
|
4899
|
+
element;
|
|
4900
|
+
ea;
|
|
4901
|
+
p;
|
|
4902
|
+
transitionService;
|
|
4903
|
+
toasts = [];
|
|
4904
|
+
entries = /* @__PURE__ */ new Map();
|
|
4905
|
+
disposable;
|
|
4906
|
+
constructor(e = m(o).scopeTo("toaster"), t = m(s), n = m(a), r = m(c), i = m(b)) {
|
|
4907
|
+
this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = i;
|
|
4908
|
+
}
|
|
4909
|
+
attached() {
|
|
4910
|
+
this.disposable = this.ea.subscribe(E.Toaster, this.onToasterEvent);
|
|
4911
|
+
}
|
|
4912
|
+
detaching() {
|
|
4913
|
+
this.disposable?.dispose(), this.entries.forEach((e) => {
|
|
4914
|
+
e.closeTimeout !== void 0 && this.p.clearTimeout(e.closeTimeout);
|
|
4915
|
+
});
|
|
4916
|
+
}
|
|
4917
|
+
onClickClose(e, t) {
|
|
4918
|
+
e.preventDefault(), this.close(t);
|
|
4919
|
+
}
|
|
4920
|
+
close(e) {
|
|
4921
|
+
let t = this.entries.get(e);
|
|
4922
|
+
if (t !== void 0 && t.closing === !1) {
|
|
4923
|
+
let n = this.findToastElement(e);
|
|
4924
|
+
t.closing = !0, t.closeTimeout !== void 0 && this.p.clearTimeout(t.closeTimeout), n === null ? this.remove(e) : this.transitionService.run(n, (e) => {
|
|
4925
|
+
w(e, "toaster", "hide");
|
|
4926
|
+
}, () => {
|
|
4927
|
+
this.remove(e);
|
|
4928
|
+
});
|
|
4929
|
+
}
|
|
4930
|
+
}
|
|
4931
|
+
onToasterEvent = (e) => {
|
|
4932
|
+
if (e.action === I.Add && e.toast) {
|
|
4933
|
+
let t = ir(e.toast);
|
|
4934
|
+
this.entries.has(t.id) === !1 && this.add(t);
|
|
4935
|
+
} else e.action === I.Remove && e.toast?.id && this.close(e.toast.id);
|
|
4936
|
+
};
|
|
4937
|
+
add(e) {
|
|
4938
|
+
let t = { closing: !1 };
|
|
4939
|
+
this.entries.set(e.id, t), this.toasts = [...this.toasts, e], ar(this.element), this.p.requestAnimationFrame(() => {
|
|
4940
|
+
let n = this.findToastElement(e.id);
|
|
4941
|
+
n === null ? this.logger.warn(`No rendered toast carries data-toaster-id="${e.id}"`) : this.transitionService.run(n, (n) => {
|
|
4942
|
+
e.duration > 0 && (t.closeTimeout = this.p.setTimeout(() => {
|
|
4943
|
+
this.close(e.id);
|
|
4944
|
+
}, e.duration)), w(n, "toaster", "show");
|
|
4945
|
+
});
|
|
4946
|
+
});
|
|
4947
|
+
}
|
|
4948
|
+
remove(e) {
|
|
4949
|
+
this.entries.delete(e), this.toasts = this.toasts.filter((t) => t.id !== e), this.entries.size === 0 && or(this.element);
|
|
4950
|
+
}
|
|
4951
|
+
findToastElement(e) {
|
|
4952
|
+
return this.element.querySelector(`[data-toaster-id="${e}"]`);
|
|
4953
|
+
}
|
|
4954
|
+
};
|
|
4955
|
+
//#endregion
|
|
4956
|
+
//#region src/components/bleet-dialog.ts
|
|
4957
|
+
function ja(e, t) {
|
|
4958
|
+
if (typeof e != "object" || !e) return e;
|
|
4959
|
+
var n = e[Symbol.toPrimitive];
|
|
4960
|
+
if (n !== void 0) {
|
|
4961
|
+
var r = n.call(e, t || "default");
|
|
4962
|
+
if (typeof r != "object") return r;
|
|
4963
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
4964
|
+
}
|
|
4965
|
+
return (t === "string" ? String : Number)(e);
|
|
4966
|
+
}
|
|
4967
|
+
function Ma(e) {
|
|
4968
|
+
var t = ja(e, "string");
|
|
4969
|
+
return typeof t == "symbol" ? t : String(t);
|
|
4970
|
+
}
|
|
4971
|
+
function Na(e) {
|
|
4972
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
4973
|
+
return e;
|
|
4974
|
+
}
|
|
4975
|
+
function Pa(e, t, n) {
|
|
4976
|
+
typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
|
|
4977
|
+
try {
|
|
4978
|
+
Object.defineProperty(e, "name", {
|
|
4979
|
+
configurable: !0,
|
|
4980
|
+
value: n ? n + " " + t : t
|
|
4981
|
+
});
|
|
4982
|
+
} catch {}
|
|
4983
|
+
return e;
|
|
4984
|
+
}
|
|
4985
|
+
function Fa(e, t, n, r, i, a) {
|
|
4986
|
+
var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
|
|
4987
|
+
function p(t, n, r) {
|
|
4988
|
+
return function(i, a) {
|
|
4989
|
+
n && (a = i, i = e);
|
|
4990
|
+
for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
|
|
4991
|
+
return r ? a : i;
|
|
4992
|
+
};
|
|
4993
|
+
}
|
|
4994
|
+
function m(e, t, n, r) {
|
|
4995
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
4996
|
+
return e;
|
|
4997
|
+
}
|
|
4998
|
+
function h(e, t, n, r, i, a, o, c, d, h, g) {
|
|
4999
|
+
function _(e) {
|
|
5000
|
+
if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
5001
|
+
}
|
|
5002
|
+
var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
|
|
5003
|
+
function T(t, n, r) {
|
|
5004
|
+
return function(i, a) {
|
|
5005
|
+
return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
|
|
5006
|
+
};
|
|
5007
|
+
}
|
|
5008
|
+
var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
|
|
5009
|
+
if (!b && (d ? (h || x ? E = {
|
|
5010
|
+
get: Pa(function() {
|
|
5011
|
+
return y(this);
|
|
5012
|
+
}, r, "get"),
|
|
5013
|
+
set: function(e) {
|
|
5014
|
+
t[4](this, e);
|
|
5015
|
+
}
|
|
5016
|
+
} : E[O] = y, h || Pa(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
|
|
5017
|
+
if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
|
|
5018
|
+
u[+c][r] = i < 3 ? 1 : i;
|
|
5019
|
+
}
|
|
5020
|
+
for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
|
|
5021
|
+
var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
|
|
5022
|
+
kind: [
|
|
5023
|
+
"field",
|
|
5024
|
+
"accessor",
|
|
5025
|
+
"method",
|
|
5026
|
+
"getter",
|
|
5027
|
+
"setter",
|
|
5028
|
+
"class"
|
|
5029
|
+
][i],
|
|
5030
|
+
name: r,
|
|
5031
|
+
metadata: l,
|
|
5032
|
+
addInitializer: (function(e, t) {
|
|
5033
|
+
if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
|
|
5034
|
+
m(t, "An initializer", "be", !0), a.push(t);
|
|
5035
|
+
}).bind(null, N)
|
|
5036
|
+
};
|
|
5037
|
+
if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
|
|
5038
|
+
else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
|
|
5039
|
+
return r in e;
|
|
5040
|
+
} }, C || (f.get = d ? w ? function(e) {
|
|
5041
|
+
return _(e), E.value;
|
|
5042
|
+
} : T("get", 0, _) : function(e) {
|
|
5043
|
+
return e[r];
|
|
5044
|
+
}), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
|
|
5045
|
+
e[r] = t;
|
|
5046
|
+
}), k = j.call(M, x ? {
|
|
5047
|
+
get: E.get,
|
|
5048
|
+
set: E.set
|
|
5049
|
+
} : E[O], P), N.v = 1, x) {
|
|
5050
|
+
if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
|
|
5051
|
+
else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
|
|
5052
|
+
} else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
|
|
5053
|
+
}
|
|
5054
|
+
return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
|
|
5055
|
+
}
|
|
5056
|
+
function g() {
|
|
5057
|
+
var t = [], r, a, o = function(e) {
|
|
5058
|
+
e && t.push(p(e));
|
|
5059
|
+
}, s = function(o, s) {
|
|
5060
|
+
for (var c = 0; c < n.length; c++) {
|
|
5061
|
+
var l = n[c], u = l[1], d = u & 7;
|
|
5062
|
+
if ((u & 8) == o && !d == s) {
|
|
5063
|
+
var f = l[2], p = !!l[3], m = u & 16;
|
|
5064
|
+
h(o ? e : e.prototype, l, m, p ? "#" + f : Ma(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
|
|
5065
|
+
return Na(t) === e;
|
|
5066
|
+
} : i);
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
};
|
|
5070
|
+
return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
|
|
5071
|
+
}
|
|
5072
|
+
function _(e) {
|
|
5073
|
+
return s(e, o, {
|
|
5074
|
+
configurable: !0,
|
|
5075
|
+
enumerable: !0,
|
|
5076
|
+
value: l
|
|
5077
|
+
});
|
|
5078
|
+
}
|
|
5079
|
+
return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
|
|
5080
|
+
e: f,
|
|
5081
|
+
get c() {
|
|
5082
|
+
var n = [];
|
|
5083
|
+
return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
|
|
5084
|
+
}
|
|
5085
|
+
};
|
|
5086
|
+
}
|
|
5087
|
+
var Ia = d({
|
|
5088
|
+
...Ni,
|
|
5089
|
+
name: "bleet-dialog"
|
|
5090
|
+
}), La, Ra = qi, za = l({ attribute: "data-dialog-class" }), Ba, Va, Ha, Ua, Wa, Ga, Ka;
|
|
5091
|
+
(class extends Ra {
|
|
5092
|
+
logger;
|
|
5093
|
+
apiService;
|
|
5094
|
+
static {
|
|
5095
|
+
({e: [Ba, Va, Ha, Ua, Wa, Ga], c: [Ka, La]} = Fa(this, [Ia], [
|
|
5096
|
+
[
|
|
5097
|
+
za,
|
|
5098
|
+
0,
|
|
5099
|
+
"dialogClass"
|
|
5100
|
+
],
|
|
5101
|
+
[
|
|
5102
|
+
l,
|
|
5103
|
+
0,
|
|
5104
|
+
"loadError"
|
|
5105
|
+
],
|
|
5106
|
+
[
|
|
5107
|
+
l,
|
|
5108
|
+
0,
|
|
5109
|
+
"submitError"
|
|
5110
|
+
]
|
|
5111
|
+
], 0, void 0, Ra));
|
|
5112
|
+
}
|
|
5113
|
+
constructor(e = m(o).scopeTo("<bleet-dialog>"), t = m(n)) {
|
|
5114
|
+
super(), this.logger = e, this.apiService = t;
|
|
5115
|
+
}
|
|
5116
|
+
dialogClass = Ba(this, "");
|
|
5117
|
+
loadError = (Va(this), Ha(this, ""));
|
|
5118
|
+
submitError = (Ua(this), Wa(this, ""));
|
|
5119
|
+
loading = (Ga(this), !1);
|
|
5120
|
+
contentView = null;
|
|
5121
|
+
attached() {
|
|
5122
|
+
super.attached(), this.dialogElement.addEventListener("submit", this.onFormSubmit);
|
|
5123
|
+
}
|
|
5124
|
+
detaching() {
|
|
5125
|
+
this.dialogElement.removeEventListener("submit", this.onFormSubmit), super.detaching();
|
|
5126
|
+
}
|
|
5127
|
+
show(e) {
|
|
5128
|
+
e.url ? this.loadFromUrl(e.url) : this.contentView = e.content ?? null, super.show(e);
|
|
5129
|
+
}
|
|
5130
|
+
clear() {
|
|
5131
|
+
this.contentView = null, this.loading = !1;
|
|
5132
|
+
}
|
|
5133
|
+
onFormSubmit = (e) => {
|
|
5134
|
+
let t = e.target.closest("form");
|
|
5135
|
+
if (t && this.contentView !== null && t.getAttribute("data-dialog") !== "native") {
|
|
5136
|
+
e.preventDefault();
|
|
5137
|
+
let n = new FormData(t);
|
|
5138
|
+
e.submitter instanceof HTMLButtonElement && e.submitter.name && n.append(e.submitter.name, e.submitter.value || "");
|
|
5139
|
+
let r = n.get("_method") || t.getAttribute("method") || "POST";
|
|
5140
|
+
this.apiService.url(t.action).fromMultipart(n).request(r).then((e) => {
|
|
5141
|
+
this.applyResponse(e.body);
|
|
5142
|
+
}).catch((e) => {
|
|
4088
5143
|
this.logger.error("form submit failed", e), this.publishError(this.submitError);
|
|
4089
5144
|
});
|
|
4090
5145
|
}
|
|
4091
5146
|
};
|
|
4092
5147
|
loadFromUrl(e) {
|
|
4093
|
-
this.loading = !0, this.
|
|
5148
|
+
this.loading = !0, this.apiService.url(e).get().then((e) => {
|
|
4094
5149
|
this.applyResponse(e.body);
|
|
4095
5150
|
}).catch((e) => {
|
|
4096
5151
|
this.logger.error("loadFromUrl failed", e), this.close(), this.publishError(this.loadError);
|
|
@@ -4102,88 +5157,62 @@ var wi = u({
|
|
|
4102
5157
|
e.content && (this.contentView = e.content), this.executeActions(e);
|
|
4103
5158
|
}
|
|
4104
5159
|
executeActions(e) {
|
|
4105
|
-
let t = e.refresh === !0 || e.action ===
|
|
4106
|
-
(e.action ===
|
|
4107
|
-
action:
|
|
5160
|
+
let t = e.refresh === !0 || e.action === U.RefreshAndClose;
|
|
5161
|
+
(e.action === U.Close || e.action === U.RefreshAndClose) && this.close(), e.toast && this.ea.publish(E.Toaster, {
|
|
5162
|
+
action: I.Add,
|
|
4108
5163
|
toast: e.toast
|
|
4109
|
-
}), e.ajaxify ? this.ea.publish(
|
|
5164
|
+
}), e.ajaxify ? this.ea.publish(E.Ajaxify, e.ajaxify) : e.redirect ? this.p.window.location.href = e.redirect : t === !0 && this.p.window.location.reload();
|
|
4110
5165
|
}
|
|
4111
5166
|
publishError(e) {
|
|
4112
|
-
e !== "" && this.ea.publish(
|
|
4113
|
-
action:
|
|
5167
|
+
e !== "" && this.ea.publish(E.Toaster, {
|
|
5168
|
+
action: I.Add,
|
|
4114
5169
|
toast: {
|
|
4115
|
-
|
|
5170
|
+
level: V.Danger,
|
|
4116
5171
|
content: e
|
|
4117
5172
|
}
|
|
4118
5173
|
});
|
|
4119
5174
|
}
|
|
4120
|
-
open() {
|
|
4121
|
-
this.closing = !1, this.bindDialogEvents(), this.transitionService.run(this.dialogElement, (e) => {
|
|
4122
|
-
this.ea.publish(w.Overlay, { action: E.Open }), this.ea.publish(w.ModalStatus, {
|
|
4123
|
-
status: j.Opening,
|
|
4124
|
-
id: this.id
|
|
4125
|
-
}), e.showModal(), this.p.requestAnimationFrame(() => {
|
|
4126
|
-
S(e, "dialog", "show", this.element);
|
|
4127
|
-
});
|
|
4128
|
-
}, () => {
|
|
4129
|
-
this.ea.publish(w.ModalStatus, {
|
|
4130
|
-
status: j.Opened,
|
|
4131
|
-
id: this.id
|
|
4132
|
-
});
|
|
4133
|
-
});
|
|
4134
|
-
}
|
|
4135
|
-
close() {
|
|
4136
|
-
this.closing = !0, this.transitionService.run(this.dialogElement, (e) => {
|
|
4137
|
-
this.closing === !0 && (this.ea.publish(w.ModalStatus, {
|
|
4138
|
-
status: j.Closing,
|
|
4139
|
-
id: this.id
|
|
4140
|
-
}), this.ea.publish(w.Overlay, { action: E.Close }), S(e, "dialog", "hide", this.element));
|
|
4141
|
-
}, (e) => {
|
|
4142
|
-
this.closing === !0 && (this.closing = !1, e.close(), this.unbindDialogEvents(), this.contentView = null, this.loading = !1, this.ea.publish(w.ModalStatus, {
|
|
4143
|
-
status: j.Closed,
|
|
4144
|
-
id: this.id
|
|
4145
|
-
}));
|
|
4146
|
-
});
|
|
4147
|
-
}
|
|
4148
5175
|
static {
|
|
4149
|
-
|
|
5176
|
+
La();
|
|
4150
5177
|
}
|
|
4151
5178
|
});
|
|
4152
5179
|
//#endregion
|
|
4153
5180
|
//#region src/index.ts
|
|
4154
|
-
var
|
|
4155
|
-
|
|
4156
|
-
V,
|
|
5181
|
+
var qa = [
|
|
5182
|
+
Q,
|
|
4157
5183
|
W,
|
|
4158
|
-
H,
|
|
4159
|
-
X,
|
|
4160
|
-
Z,
|
|
4161
5184
|
q,
|
|
4162
5185
|
G,
|
|
4163
|
-
U,
|
|
4164
|
-
K,
|
|
4165
|
-
J,
|
|
4166
|
-
Q,
|
|
4167
5186
|
$,
|
|
5187
|
+
$t,
|
|
5188
|
+
X,
|
|
5189
|
+
J,
|
|
5190
|
+
K,
|
|
5191
|
+
Y,
|
|
5192
|
+
Z,
|
|
5193
|
+
Pn,
|
|
5194
|
+
Wn,
|
|
4168
5195
|
rr,
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
5196
|
+
mr,
|
|
5197
|
+
zr,
|
|
5198
|
+
qr,
|
|
5199
|
+
ti,
|
|
4172
5200
|
di,
|
|
4173
|
-
|
|
5201
|
+
Mi,
|
|
5202
|
+
Ka
|
|
4174
5203
|
];
|
|
4175
|
-
function
|
|
5204
|
+
function Ja(e) {
|
|
4176
5205
|
return {
|
|
4177
5206
|
register(n) {
|
|
4178
|
-
return (e ? t.customize(e) : t).register(n), n.register(...
|
|
5207
|
+
return (e ? t.customize(e) : t).register(n), n.register(...qa);
|
|
4179
5208
|
},
|
|
4180
5209
|
customize(e) {
|
|
4181
|
-
return
|
|
5210
|
+
return Ja(e);
|
|
4182
5211
|
}
|
|
4183
5212
|
};
|
|
4184
5213
|
}
|
|
4185
|
-
var
|
|
5214
|
+
var Ya = Ja();
|
|
4186
5215
|
//#endregion
|
|
4187
|
-
export {
|
|
5216
|
+
export { qi as AbstractDialog, ha as AbstractDropdown, ka as AbstractPager, Aa as AbstractToaster, F as AjaxifyAction, ee as AjaxifyTriggerMode, ne as BadgeAction, Mi as BleetAjaxify, Pn as BleetAjaxifyTriggerCustomAttribute, Q as BleetAlertCustomAttribute, K as BleetBadgeCustomAttribute, W as BleetBurgerCustomAttribute, Ya as BleetConfiguration, Ka as BleetDialog, q as BleetDropdownCustomAttribute, di as BleetFirstErrorCustomAttribute, ti as BleetFocusCustomAttribute, G as BleetMenuCustomAttribute, $ as BleetModalTriggerCustomAttribute, qr as BleetOverlayCustomAttribute, $t as BleetPagerCustomAttribute, J as BleetPasswordCustomAttribute, Wn as BleetPopoverCustomAttribute, rr as BleetPopoverTriggerCustomAttribute, X as BleetProfileCustomAttribute, Y as BleetTabsCustomAttribute, zr as BleetToastCustomAttribute, mr as BleetToasterCustomAttribute, Z as BleetToasterTriggerCustomAttribute, E as Channels, U as DialogAction, O as FormAction, v as IStorageService, b as ITransitionService, S as ITrapFocusService, L as MenuAction, R as MenuStatus, N as ModalAction, P as ModalStatus, k as OverlayAction, A as OverlayStatus, Da as PagerEvent, z as PopoverAction, B as PopoverStatus, j as ProfileAction, M as ProfileStatus, I as ToasterAction, te as ToasterStatus, re as UiIcon, V as UiLevel, H as UiToastIcon, D as UploadAction, w as setState };
|
|
4188
5217
|
|
|
4189
5218
|
//# sourceMappingURL=index.es.js.map
|