@boobooking/dashboard-ui-components 0.13.0 → 0.14.0
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 +84 -3
- package/dist/index.js +415 -318
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -105,15 +105,15 @@ var re = {
|
|
|
105
105
|
};
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region src/windows.js
|
|
108
|
-
function
|
|
108
|
+
function ie(e, t) {
|
|
109
109
|
if (e == null || e === "") return null;
|
|
110
110
|
let n = new URL(String(e), t);
|
|
111
111
|
return n.pathname + n.search;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ae(e) {
|
|
114
114
|
return e === null ? null : e.split("?")[0];
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function oe() {
|
|
117
117
|
return {
|
|
118
118
|
windows: [],
|
|
119
119
|
cards: /* @__PURE__ */ new Map(),
|
|
@@ -127,36 +127,36 @@ function ae() {
|
|
|
127
127
|
nextId: 1
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function T(e, t) {
|
|
131
131
|
return e.windows.includes(t);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function se(e) {
|
|
134
134
|
return e.returnAddress ?? e.fallbackAddress;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ce(e) {
|
|
137
137
|
let t = null;
|
|
138
138
|
for (let n of e.cards.values()) t = n.window;
|
|
139
139
|
return t;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function E(e, t) {
|
|
142
142
|
let n = t;
|
|
143
|
-
for (; n !== null && !
|
|
143
|
+
for (; n !== null && !T(e, n);) n = n.parent;
|
|
144
144
|
return n;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function le(e, t) {
|
|
147
147
|
return e.transition = {
|
|
148
148
|
number: e.transition.number + 1,
|
|
149
149
|
fromAddress: e.shown,
|
|
150
|
-
fromWindow:
|
|
150
|
+
fromWindow: ce(e),
|
|
151
151
|
assigned: /* @__PURE__ */ new Map()
|
|
152
152
|
}, e.shown = t, e.transition.number;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function ue(e, t, n) {
|
|
155
155
|
let r = e.transition, i = r.assigned.get(t);
|
|
156
|
-
if (i !== void 0 &&
|
|
156
|
+
if (i !== void 0 && T(e, i)) return i;
|
|
157
157
|
let a = r.fromWindow, o = r.fromAddress;
|
|
158
|
-
a !== null && !
|
|
159
|
-
for (let n = a; n !== null; n = n.parent) if (n.key === t &&
|
|
158
|
+
a !== null && !T(e, a) && (a = E(e, a), o = null), a !== null && se(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : E(e, a.parent), o = null);
|
|
159
|
+
for (let n = a; n !== null; n = n.parent) if (n.key === t && T(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
|
|
160
160
|
a === null ? e.windows = [] : e.windows.splice(e.windows.indexOf(a) + 1);
|
|
161
161
|
let s = {
|
|
162
162
|
id: e.nextId,
|
|
@@ -167,18 +167,18 @@ function le(e, t, n) {
|
|
|
167
167
|
};
|
|
168
168
|
return e.nextId += 1, e.windows.push(s), s;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
let i =
|
|
170
|
+
function D(e, t, n, r) {
|
|
171
|
+
let i = ue(e, n, r);
|
|
172
172
|
return i.fallbackAddress = r, e.transition.assigned.set(n, i), e.cards.delete(t), e.cards.set(t, {
|
|
173
173
|
key: n,
|
|
174
174
|
window: i,
|
|
175
175
|
processed: e.transition.number
|
|
176
176
|
}), i;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function de(e, t, n, r) {
|
|
179
179
|
let i = e.cards.get(t);
|
|
180
180
|
return i === void 0 ? {
|
|
181
|
-
window:
|
|
181
|
+
window: D(e, t, n, r),
|
|
182
182
|
rejected: !1,
|
|
183
183
|
key: n
|
|
184
184
|
} : i.key === n ? (i.processed = e.transition.number, {
|
|
@@ -190,37 +190,37 @@ function ue(e, t, n, r) {
|
|
|
190
190
|
rejected: !0,
|
|
191
191
|
key: i.key
|
|
192
192
|
} : (e.cards.delete(t), {
|
|
193
|
-
window:
|
|
193
|
+
window: D(e, t, n, r),
|
|
194
194
|
rejected: !1,
|
|
195
195
|
key: n
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function fe(e, t) {
|
|
199
199
|
e.cards.delete(t);
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function pe(e, t, n) {
|
|
202
202
|
let r = e.cards.get(t);
|
|
203
203
|
r !== void 0 && (r.window.fallbackAddress = n);
|
|
204
204
|
}
|
|
205
205
|
//#endregion
|
|
206
206
|
//#region src/plugin.js
|
|
207
|
-
var
|
|
207
|
+
var O = Symbol("dashboardUi"), me = Object.freeze({
|
|
208
208
|
lang: "ru",
|
|
209
209
|
navigate: null,
|
|
210
210
|
windows: null
|
|
211
|
-
}),
|
|
212
|
-
from:
|
|
213
|
-
default: () =>
|
|
211
|
+
}), k = { uiSettings: {
|
|
212
|
+
from: O,
|
|
213
|
+
default: () => me
|
|
214
214
|
} };
|
|
215
|
-
function
|
|
216
|
-
let n =
|
|
215
|
+
function he(e, t) {
|
|
216
|
+
let n = oe(), r = h({
|
|
217
217
|
number: 0,
|
|
218
218
|
address: null
|
|
219
219
|
}), i = c(!0);
|
|
220
220
|
return i.run(() => {
|
|
221
221
|
ee(t, (e) => {
|
|
222
|
-
let t =
|
|
223
|
-
t !== null && t !== r.address && (r.number =
|
|
222
|
+
let t = ie(e, window.location.origin);
|
|
223
|
+
t !== null && t !== r.address && (r.number = le(n, t), r.address = t);
|
|
224
224
|
}, {
|
|
225
225
|
flush: "sync",
|
|
226
226
|
immediate: !0
|
|
@@ -230,24 +230,24 @@ function me(e, t) {
|
|
|
230
230
|
page: r
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
var
|
|
233
|
+
var ge = { install(e, t) {
|
|
234
234
|
let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
|
|
235
235
|
if (!w(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${C.join(", ")}`);
|
|
236
236
|
let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
|
|
237
237
|
if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
|
|
238
238
|
let o = Object.hasOwn(n, "currentUrl"), s = o ? n.currentUrl : null;
|
|
239
239
|
if (o && typeof s != "function") throw Error("dashboardUi: currentUrl должен быть функцией () => адрес страницы");
|
|
240
|
-
let c = s !== null && typeof window < "u" ?
|
|
241
|
-
e.provide(
|
|
240
|
+
let c = s !== null && typeof window < "u" ? he(e, s) : null;
|
|
241
|
+
e.provide(O, Object.freeze({
|
|
242
242
|
lang: r,
|
|
243
243
|
navigate: a,
|
|
244
244
|
windows: c
|
|
245
245
|
}));
|
|
246
|
-
} },
|
|
246
|
+
} }, A = (e, t) => {
|
|
247
247
|
let n = e.__vccOpts || e;
|
|
248
248
|
for (let [e, r] of t) n[e] = r;
|
|
249
249
|
return n;
|
|
250
|
-
},
|
|
250
|
+
}, _e = {
|
|
251
251
|
props: {
|
|
252
252
|
isOpen: {
|
|
253
253
|
type: Boolean,
|
|
@@ -268,13 +268,13 @@ var he = { install(e, t) {
|
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
mounted() {
|
|
271
|
-
document.addEventListener("keydown", this.handleEscape);
|
|
271
|
+
document.addEventListener("keydown", this.handleEscape, !0);
|
|
272
272
|
},
|
|
273
273
|
beforeUnmount() {
|
|
274
|
-
document.removeEventListener("keydown", this.handleEscape);
|
|
274
|
+
document.removeEventListener("keydown", this.handleEscape, !0);
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
|
-
function
|
|
277
|
+
function ve(e, t, n, r, a, o) {
|
|
278
278
|
return x((d(), i("button", {
|
|
279
279
|
tabindex: "-1",
|
|
280
280
|
onClick: t[0] ||= S((...e) => o.closeOverlay && o.closeOverlay(...e), ["prevent"]),
|
|
@@ -287,8 +287,8 @@ function _e(e, t, n, r, a, o) {
|
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region src/components/Popup.vue
|
|
290
|
-
var
|
|
291
|
-
components: { Overlay: /* @__PURE__ */
|
|
290
|
+
var ye = {
|
|
291
|
+
components: { Overlay: /* @__PURE__ */ A(_e, [["render", ve]]) },
|
|
292
292
|
inheritAttrs: !1,
|
|
293
293
|
emits: ["update:modelValue"],
|
|
294
294
|
props: {
|
|
@@ -321,10 +321,10 @@ var ve = {
|
|
|
321
321
|
return this.align === "right";
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
},
|
|
325
|
-
function
|
|
324
|
+
}, be = { class: "bb-dashboard-ui bb:relative" };
|
|
325
|
+
function xe(e, n, r, o, c, u) {
|
|
326
326
|
let f = m("overlay");
|
|
327
|
-
return d(), i("div",
|
|
327
|
+
return d(), i("div", be, [s(f, {
|
|
328
328
|
"is-open": c.overlayIsOpen,
|
|
329
329
|
"onUpdate:isOpen": n[0] ||= (e) => c.overlayIsOpen = e
|
|
330
330
|
}, null, 8, ["is-open"]), s(t, {
|
|
@@ -342,7 +342,7 @@ function be(e, n, r, o, c, u) {
|
|
|
342
342
|
_: 3
|
|
343
343
|
})]);
|
|
344
344
|
}
|
|
345
|
-
var
|
|
345
|
+
var j = /*#__PURE__*/ A(ye, [["render", xe]]), Se = {
|
|
346
346
|
props: {
|
|
347
347
|
withPulse: {
|
|
348
348
|
type: Boolean,
|
|
@@ -363,7 +363,7 @@ var M = /*#__PURE__*/ j(ve, [["render", be]]), xe = {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
};
|
|
366
|
-
function
|
|
366
|
+
function Ce(e, t, n, r, o, s) {
|
|
367
367
|
return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", {
|
|
368
368
|
"bb:text-red-500": s.isRed,
|
|
369
369
|
"bb:text-green-500": s.isGreen,
|
|
@@ -377,13 +377,13 @@ function Se(e, t, n, r, o, s) {
|
|
|
377
377
|
r: "45"
|
|
378
378
|
})], -1)]], 2);
|
|
379
379
|
}
|
|
380
|
-
var
|
|
380
|
+
var M = /*#__PURE__*/ A(Se, [["render", Ce]]), we = {}, Te = {
|
|
381
381
|
type: "button",
|
|
382
382
|
tabindex: "-1",
|
|
383
383
|
class: "bb:absolute bb:right-0 bb:top-0 bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-300 bb:hover:text-gray-400 bb:focus:outline-hidden"
|
|
384
384
|
};
|
|
385
|
-
function
|
|
386
|
-
return d(), i("button",
|
|
385
|
+
function Ee(e, t, n, r, o, s) {
|
|
386
|
+
return d(), i("button", Te, [...t[0] ||= [a("svg", {
|
|
387
387
|
class: "bb:w-6 bb:h-6 bb:stroke-current",
|
|
388
388
|
fill: "none",
|
|
389
389
|
viewBox: "0 0 24 24"
|
|
@@ -394,13 +394,13 @@ function Te(e, t, n, r, o, s) {
|
|
|
394
394
|
d: "M6 18L18 6M6 6l12 12"
|
|
395
395
|
})], -1)]]);
|
|
396
396
|
}
|
|
397
|
-
var
|
|
397
|
+
var N = /*#__PURE__*/ A(we, [["render", Ee]]);
|
|
398
398
|
//#endregion
|
|
399
399
|
//#region src/date.js
|
|
400
|
-
function
|
|
400
|
+
function P(e) {
|
|
401
401
|
return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function F(e) {
|
|
404
404
|
let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
|
|
405
405
|
if (t === null) return null;
|
|
406
406
|
let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
|
|
@@ -408,8 +408,8 @@ function I(e) {
|
|
|
408
408
|
}
|
|
409
409
|
//#endregion
|
|
410
410
|
//#region src/lang.js
|
|
411
|
-
var
|
|
412
|
-
inject:
|
|
411
|
+
var I = {
|
|
412
|
+
inject: k,
|
|
413
413
|
props: { lang: {
|
|
414
414
|
type: String,
|
|
415
415
|
default: null,
|
|
@@ -423,12 +423,12 @@ var L = {
|
|
|
423
423
|
return re[this.resolvedLang];
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
},
|
|
426
|
+
}, De = {
|
|
427
427
|
components: {
|
|
428
|
-
Popup:
|
|
429
|
-
Eraser:
|
|
428
|
+
Popup: j,
|
|
429
|
+
Eraser: N
|
|
430
430
|
},
|
|
431
|
-
mixins: [
|
|
431
|
+
mixins: [I],
|
|
432
432
|
emits: ["update:modelValue", "changed"],
|
|
433
433
|
props: {
|
|
434
434
|
modelValue: {
|
|
@@ -455,8 +455,8 @@ var L = {
|
|
|
455
455
|
keyboardInput: !1,
|
|
456
456
|
bound: !1,
|
|
457
457
|
firstDay: 1,
|
|
458
|
-
parse: (e) =>
|
|
459
|
-
toString: (e) =>
|
|
458
|
+
parse: (e) => F(e),
|
|
459
|
+
toString: (e) => P(e),
|
|
460
460
|
i18n: {
|
|
461
461
|
previousMonth: this.texts.previousMonth,
|
|
462
462
|
nextMonth: this.texts.nextMonth,
|
|
@@ -465,7 +465,7 @@ var L = {
|
|
|
465
465
|
weekdaysShort: this.texts.weekdaysShort
|
|
466
466
|
},
|
|
467
467
|
onSelect: (e) => {
|
|
468
|
-
this.popupIsOpen = !1, this.$emit("update:modelValue",
|
|
468
|
+
this.popupIsOpen = !1, this.$emit("update:modelValue", P(e)), this.$emit("changed");
|
|
469
469
|
}
|
|
470
470
|
}));
|
|
471
471
|
},
|
|
@@ -485,7 +485,7 @@ var L = {
|
|
|
485
485
|
methods: {
|
|
486
486
|
syncPicker(e) {
|
|
487
487
|
if (this.picker === null) return;
|
|
488
|
-
let t =
|
|
488
|
+
let t = F(e);
|
|
489
489
|
if (t === null) {
|
|
490
490
|
this.picker.clear();
|
|
491
491
|
return;
|
|
@@ -504,29 +504,29 @@ var L = {
|
|
|
504
504
|
return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
},
|
|
507
|
+
}, Oe = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, ke = { class: "bb:relative bb:flex bb:h-full bb:cursor-pointer bb:leading-none" }, Ae = { class: "bb:min-w-24 bb:w-full bb:h-full" }, je = [
|
|
508
508
|
"disabled",
|
|
509
509
|
"value",
|
|
510
510
|
"placeholder"
|
|
511
|
-
],
|
|
511
|
+
], Me = {
|
|
512
512
|
ref: "container",
|
|
513
513
|
class: "bb:flex bb:mt-1 bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg"
|
|
514
514
|
};
|
|
515
|
-
function
|
|
515
|
+
function Ne(e, t, o, c, l, f) {
|
|
516
516
|
let p = m("eraser"), h = m("popup");
|
|
517
|
-
return d(), i("div",
|
|
517
|
+
return d(), i("div", Oe, [a("div", ke, [a("button", {
|
|
518
518
|
ref: "trigger",
|
|
519
519
|
type: "button",
|
|
520
520
|
class: u(["bb:flex bb:w-full bb:items-center bb:focus:outline-hidden", { "bb:z-20": l.popupIsOpen }]),
|
|
521
521
|
onClick: t[0] ||= (e) => l.popupIsOpen = !l.popupIsOpen
|
|
522
|
-
}, [a("label",
|
|
522
|
+
}, [a("label", Ae, [a("input", {
|
|
523
523
|
disabled: l.popupIsOpen,
|
|
524
524
|
ref: "field",
|
|
525
525
|
type: "text",
|
|
526
526
|
value: l.dayValue,
|
|
527
527
|
placeholder: o.placeholderText,
|
|
528
528
|
class: "bb:w-full bb:h-full bb:py-2 bb:pr-3 bb:leading-none bb:border bb:border-transparent bb:whitespace-nowrap bb:bg-transparent bb:placeholder:text-sm bb:placeholder-gray-300 bb:cursor-pointer bb:focus:outline-hidden"
|
|
529
|
-
}, null, 8,
|
|
529
|
+
}, null, 8, je)])], 2), f.needsEraser ? (d(), n(p, {
|
|
530
530
|
key: 0,
|
|
531
531
|
onClick: f.clearPicker,
|
|
532
532
|
class: "bb:z-10 bb:h-full bb:pr-2"
|
|
@@ -534,12 +534,12 @@ function Me(e, t, o, c, l, f) {
|
|
|
534
534
|
modelValue: l.popupIsOpen,
|
|
535
535
|
"onUpdate:modelValue": t[1] ||= (e) => l.popupIsOpen = e
|
|
536
536
|
}, {
|
|
537
|
-
default: b(() => [a("div",
|
|
537
|
+
default: b(() => [a("div", Me, null, 512)]),
|
|
538
538
|
_: 1
|
|
539
539
|
}, 8, ["modelValue"])]);
|
|
540
540
|
}
|
|
541
|
-
var
|
|
542
|
-
components: { Dot:
|
|
541
|
+
var L = /*#__PURE__*/ A(De, [["render", Ne]]), Pe = {
|
|
542
|
+
components: { Dot: M },
|
|
543
543
|
props: {
|
|
544
544
|
text: {
|
|
545
545
|
type: String,
|
|
@@ -554,14 +554,14 @@ var R = /*#__PURE__*/ j(Ee, [["render", Me]]), Ne = {
|
|
|
554
554
|
default: !1
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
},
|
|
558
|
-
function
|
|
557
|
+
}, Fe = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, Ie = ["textContent"];
|
|
558
|
+
function Le(e, t, n, r, o, c) {
|
|
559
559
|
let l = m("dot");
|
|
560
|
-
return d(), i("div",
|
|
560
|
+
return d(), i("div", Fe, [
|
|
561
561
|
a("div", {
|
|
562
562
|
class: "bb:flex bb:flex-1 bb:h-full bb:items-center bb:text-xs bb:text-gray-500 bb:whitespace-nowrap bb:truncate bb:leading-tight bb:select-none",
|
|
563
563
|
textContent: g(n.text)
|
|
564
|
-
}, null, 8,
|
|
564
|
+
}, null, 8, Ie),
|
|
565
565
|
x(s(l, {
|
|
566
566
|
color: "red",
|
|
567
567
|
"with-pulse": !0,
|
|
@@ -573,24 +573,24 @@ function Ie(e, t, n, r, o, c) {
|
|
|
573
573
|
}, null, 512), [[y, n.isRequired]])
|
|
574
574
|
]);
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
576
|
+
var R = /*#__PURE__*/ A(Pe, [["render", Le]]), Re = 10;
|
|
577
|
+
function ze(e) {
|
|
578
578
|
let t = e.replace(/\D/g, "");
|
|
579
|
-
return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0,
|
|
579
|
+
return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Re);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function z(e) {
|
|
582
582
|
return e === "" ? "" : `7${e}`;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function B(e) {
|
|
585
585
|
let t = e ?? "", n = t.startsWith("+") ? t.slice(1) : t;
|
|
586
586
|
return n.startsWith("7") ? n.slice(1) : n;
|
|
587
587
|
}
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region src/components/RussianMobileFilter.vue
|
|
590
|
-
var
|
|
590
|
+
var Be = 400, Ve = 3, He = {
|
|
591
591
|
components: {
|
|
592
|
-
ElementHeader:
|
|
593
|
-
Eraser:
|
|
592
|
+
ElementHeader: R,
|
|
593
|
+
Eraser: N
|
|
594
594
|
},
|
|
595
595
|
emits: ["update:modelValue", "changed"],
|
|
596
596
|
props: {
|
|
@@ -612,10 +612,10 @@ var ze = 400, Be = 3, Ve = {
|
|
|
612
612
|
}
|
|
613
613
|
},
|
|
614
614
|
data() {
|
|
615
|
-
return { digits:
|
|
615
|
+
return { digits: B(this.modelValue) };
|
|
616
616
|
},
|
|
617
617
|
created() {
|
|
618
|
-
this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted =
|
|
618
|
+
this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = B(this.modelValue), this.isUnmounted = !1;
|
|
619
619
|
},
|
|
620
620
|
mounted() {
|
|
621
621
|
this.mask = ne(this.$refs.input, {
|
|
@@ -623,21 +623,21 @@ var ze = 400, Be = 3, Ve = {
|
|
|
623
623
|
lazy: !0,
|
|
624
624
|
prepare: (e, t) => t.unmaskedValue === "" && (e === "7" || e === "8") ? "" : e
|
|
625
625
|
}), this.mask.on("accept", () => {
|
|
626
|
-
this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue",
|
|
626
|
+
this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", z(this.digits)), this.scheduleCommit());
|
|
627
627
|
}), this.syncFromModelValue(this.modelValue);
|
|
628
628
|
},
|
|
629
629
|
beforeUnmount() {
|
|
630
630
|
this.isUnmounted = !0, clearTimeout(this.debounceTimer), this.mask?.destroy();
|
|
631
631
|
},
|
|
632
632
|
watch: { modelValue(e) {
|
|
633
|
-
e !==
|
|
633
|
+
e !== z(this.digits) && this.syncFromModelValue(e);
|
|
634
634
|
} },
|
|
635
635
|
methods: {
|
|
636
636
|
syncFromModelValue(e) {
|
|
637
|
-
this.writeToMask(
|
|
637
|
+
this.writeToMask(B(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
|
|
638
638
|
},
|
|
639
639
|
applyUserDigits(e) {
|
|
640
|
-
this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue",
|
|
640
|
+
this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", z(this.digits));
|
|
641
641
|
},
|
|
642
642
|
writeToMask(e) {
|
|
643
643
|
if (this.isWritingProgrammatically = !0, e === "") this.mask.value = "";
|
|
@@ -660,7 +660,7 @@ var ze = 400, Be = 3, Ve = {
|
|
|
660
660
|
this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
|
|
661
661
|
},
|
|
662
662
|
onPaste(e) {
|
|
663
|
-
this.applyUserDigits(
|
|
663
|
+
this.applyUserDigits(ze(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
|
|
664
664
|
},
|
|
665
665
|
clear() {
|
|
666
666
|
this.applyUserDigits(""), this.commit();
|
|
@@ -670,16 +670,16 @@ var ze = 400, Be = 3, Ve = {
|
|
|
670
670
|
this.commit();
|
|
671
671
|
return;
|
|
672
672
|
}
|
|
673
|
-
this.digits.length <
|
|
673
|
+
this.digits.length < Ve || (this.debounceTimer = setTimeout(() => this.commit(), Be));
|
|
674
674
|
},
|
|
675
675
|
commit() {
|
|
676
676
|
clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
},
|
|
680
|
-
function
|
|
679
|
+
}, Ue = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, We = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ge = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ke = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
680
|
+
function qe(e, t, n, r, o, c) {
|
|
681
681
|
let l = m("element-header"), u = m("eraser");
|
|
682
|
-
return d(), i("div",
|
|
682
|
+
return d(), i("div", Ue, [a("div", We, [s(l, {
|
|
683
683
|
text: n.header,
|
|
684
684
|
"is-required": n.isRequired,
|
|
685
685
|
"is-loading": n.isLoading
|
|
@@ -687,7 +687,7 @@ function Ke(e, t, n, r, o, c) {
|
|
|
687
687
|
"text",
|
|
688
688
|
"is-required",
|
|
689
689
|
"is-loading"
|
|
690
|
-
]), a("div",
|
|
690
|
+
]), a("div", Ge, [a("label", Ke, [a("input", {
|
|
691
691
|
ref: "input",
|
|
692
692
|
type: "tel",
|
|
693
693
|
inputmode: "tel",
|
|
@@ -703,10 +703,10 @@ function Ke(e, t, n, r, o, c) {
|
|
|
703
703
|
class: "bb:pr-2 bb:h-full"
|
|
704
704
|
}, null, 8, ["onClick"]), [[y, o.digits.length > 0]])])])])]);
|
|
705
705
|
}
|
|
706
|
-
var
|
|
706
|
+
var Je = /*#__PURE__*/ A(He, [["render", qe]]), Ye = {
|
|
707
707
|
components: {
|
|
708
|
-
ElementHeader:
|
|
709
|
-
Eraser:
|
|
708
|
+
ElementHeader: R,
|
|
709
|
+
Eraser: N
|
|
710
710
|
},
|
|
711
711
|
emits: ["update:modelValue", "changed"],
|
|
712
712
|
props: {
|
|
@@ -744,10 +744,10 @@ var qe = /*#__PURE__*/ j(Ve, [["render", Ke]]), Je = {
|
|
|
744
744
|
this.$emit("update:modelValue", this.search), this.$emit("changed");
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
},
|
|
748
|
-
function
|
|
747
|
+
}, Xe = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ze = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Qe = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, $e = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
748
|
+
function et(e, t, n, r, o, c) {
|
|
749
749
|
let l = m("element-header"), u = m("eraser");
|
|
750
|
-
return d(), i("div",
|
|
750
|
+
return d(), i("div", Xe, [a("div", Ze, [s(l, {
|
|
751
751
|
text: n.header,
|
|
752
752
|
"is-required": n.isRequired,
|
|
753
753
|
"is-loading": n.isLoading
|
|
@@ -755,7 +755,7 @@ function $e(e, t, n, r, o, c) {
|
|
|
755
755
|
"text",
|
|
756
756
|
"is-required",
|
|
757
757
|
"is-loading"
|
|
758
|
-
]), a("div",
|
|
758
|
+
]), a("div", Qe, [a("label", $e, [x(a("input", {
|
|
759
759
|
class: "bb:flex bb:w-full bb:h-full bb:px-3 bb:py-2 bb:cursor-pointer bb:truncate bb:focus:outline-hidden bb:border-none",
|
|
760
760
|
"onUpdate:modelValue": t[0] ||= (e) => o.search = e,
|
|
761
761
|
onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
|
|
@@ -769,12 +769,12 @@ function $e(e, t, n, r, o, c) {
|
|
|
769
769
|
class: "bb:pr-2 bb:h-full"
|
|
770
770
|
}, null, 8, ["onClick"]), [[y, c.inputNeedsEraser]])])])])]);
|
|
771
771
|
}
|
|
772
|
-
var
|
|
772
|
+
var tt = /*#__PURE__*/ A(Ye, [["render", et]]), nt = {
|
|
773
773
|
components: {
|
|
774
|
-
ElementHeader:
|
|
775
|
-
PickDay:
|
|
774
|
+
ElementHeader: R,
|
|
775
|
+
PickDay: L
|
|
776
776
|
},
|
|
777
|
-
mixins: [
|
|
777
|
+
mixins: [I],
|
|
778
778
|
emits: [
|
|
779
779
|
"update:dateFrom",
|
|
780
780
|
"update:dateTo",
|
|
@@ -822,10 +822,10 @@ var et = /*#__PURE__*/ j(Je, [["render", $e]]), tt = {
|
|
|
822
822
|
this.$emit("update:dateTo", e), this.dateTo !== e && this.$emit("changed");
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
|
-
},
|
|
826
|
-
function
|
|
825
|
+
}, rt = { class: "bb-dashboard-ui bb:flex" }, it = { class: "bb:flex bb:border bb:border-white" }, at = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, ot = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
|
|
826
|
+
function st(e, t, n, r, o, c) {
|
|
827
827
|
let l = m("element-header"), u = m("pick-day");
|
|
828
|
-
return d(), i("div",
|
|
828
|
+
return d(), i("div", rt, [a("div", it, [a("div", at, [s(l, {
|
|
829
829
|
text: n.header,
|
|
830
830
|
"is-required": n.isRequired,
|
|
831
831
|
"is-loading": n.isLoading
|
|
@@ -833,7 +833,7 @@ function ot(e, t, n, r, o, c) {
|
|
|
833
833
|
"text",
|
|
834
834
|
"is-required",
|
|
835
835
|
"is-loading"
|
|
836
|
-
]), a("div",
|
|
836
|
+
]), a("div", ot, [s(u, {
|
|
837
837
|
modelValue: o.userDateFrom,
|
|
838
838
|
"onUpdate:modelValue": t[0] ||= (e) => o.userDateFrom = e,
|
|
839
839
|
class: "bb:flex-1 bb:min-w-36 bb:pl-3",
|
|
@@ -855,10 +855,10 @@ function ot(e, t, n, r, o, c) {
|
|
|
855
855
|
"lang"
|
|
856
856
|
])])])])]);
|
|
857
857
|
}
|
|
858
|
-
var
|
|
858
|
+
var ct = /*#__PURE__*/ A(nt, [["render", st]]), lt = {
|
|
859
859
|
components: {
|
|
860
|
-
Popup:
|
|
861
|
-
Eraser:
|
|
860
|
+
Popup: j,
|
|
861
|
+
Eraser: N
|
|
862
862
|
},
|
|
863
863
|
emits: ["update:isOpen", "erased"],
|
|
864
864
|
props: {
|
|
@@ -880,7 +880,7 @@ var st = /*#__PURE__*/ j(tt, [["render", ot]]), ct = {
|
|
|
880
880
|
},
|
|
881
881
|
watch: {
|
|
882
882
|
isOpen(e) {
|
|
883
|
-
this.popupIsOpen = e;
|
|
883
|
+
this.popupIsOpen = e, !e && this.$el.contains(document.activeElement) && this.$refs.trigger.focus();
|
|
884
884
|
},
|
|
885
885
|
popupIsOpen(e) {
|
|
886
886
|
this.$emit("update:isOpen", e);
|
|
@@ -889,17 +889,18 @@ var st = /*#__PURE__*/ j(tt, [["render", ot]]), ct = {
|
|
|
889
889
|
computed: { needsEraser() {
|
|
890
890
|
return !this.isOpen && this.hasValue;
|
|
891
891
|
} }
|
|
892
|
-
},
|
|
893
|
-
function
|
|
892
|
+
}, ut = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, dt = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, ft = ["textContent"];
|
|
893
|
+
function pt(e, t, o, c, l, f) {
|
|
894
894
|
let h = m("eraser"), _ = m("popup");
|
|
895
|
-
return d(), i("div",
|
|
895
|
+
return d(), i("div", ut, [a("div", dt, [a("button", {
|
|
896
|
+
ref: "trigger",
|
|
896
897
|
type: "button",
|
|
897
898
|
class: u(["bb:flex bb:w-full bb:h-full bb:items-center bb:focus:outline-hidden bb:cursor-pointer", { "bb:z-20": o.isOpen }]),
|
|
898
899
|
onClick: t[0] ||= S((t) => e.$emit("update:isOpen", !o.isOpen), ["prevent"])
|
|
899
900
|
}, [a("span", {
|
|
900
901
|
class: "bb:flex bb:w-full bb:h-full bb:pl-3 bb:pr-12 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none",
|
|
901
902
|
textContent: g(o.title)
|
|
902
|
-
}, null, 8,
|
|
903
|
+
}, null, 8, ft)], 2), f.needsEraser ? (d(), n(h, {
|
|
903
904
|
key: 0,
|
|
904
905
|
onClick: t[1] ||= (t) => e.$emit("erased"),
|
|
905
906
|
class: "bb:pr-2 bb:h-full"
|
|
@@ -911,7 +912,7 @@ function ft(e, t, o, c, l, f) {
|
|
|
911
912
|
_: 3
|
|
912
913
|
}, 8, ["modelValue"])]);
|
|
913
914
|
}
|
|
914
|
-
var
|
|
915
|
+
var mt = /*#__PURE__*/ A(lt, [["render", pt]]), ht = {
|
|
915
916
|
props: {
|
|
916
917
|
isChecked: {
|
|
917
918
|
type: Boolean,
|
|
@@ -923,31 +924,48 @@ var pt = /*#__PURE__*/ j(ct, [["render", ft]]), mt = {
|
|
|
923
924
|
methods: { toggle() {
|
|
924
925
|
this.$emit("clicked");
|
|
925
926
|
} }
|
|
926
|
-
},
|
|
927
|
+
}, gt = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, _t = {
|
|
927
928
|
class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
|
|
928
929
|
viewBox: "0 0 20 20"
|
|
929
|
-
},
|
|
930
|
-
function
|
|
930
|
+
}, vt = ["textContent"];
|
|
931
|
+
function yt(e, t, n, r, o, s) {
|
|
931
932
|
return d(), i("button", {
|
|
932
933
|
type: "button",
|
|
933
934
|
onClick: t[0] ||= S((...e) => s.toggle && s.toggle(...e), ["prevent"]),
|
|
934
|
-
class: "bb:flex bb:w-full bb:bg-white bb:
|
|
935
|
-
}, [a("span",
|
|
935
|
+
class: "bb:flex bb:w-full bb:bg-white bb:cursor-pointer bb:focus:outline-hidden bb:focus:bg-indigo-100"
|
|
936
|
+
}, [a("span", gt, [x((d(), i("svg", _t, [...t[1] ||= [a("path", {
|
|
936
937
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
937
938
|
"clip-rule": "evenodd",
|
|
938
939
|
"fill-rule": "evenodd"
|
|
939
940
|
}, null, -1)]], 512)), [[y, n.isChecked]])]), a("span", {
|
|
940
941
|
class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none",
|
|
941
942
|
textContent: g(n.name)
|
|
942
|
-
}, null, 8,
|
|
943
|
+
}, null, 8, vt)]);
|
|
944
|
+
}
|
|
945
|
+
var bt = /*#__PURE__*/ A(ht, [["render", yt]]), V = "a[href], button";
|
|
946
|
+
function H(e, t = () => null) {
|
|
947
|
+
let n = (n) => {
|
|
948
|
+
if (n.key !== "ArrowDown" && n.key !== "ArrowUp") return;
|
|
949
|
+
let r = [...e.querySelectorAll(V)];
|
|
950
|
+
if (r.length === 0) return;
|
|
951
|
+
n.preventDefault();
|
|
952
|
+
let i = n.key === "ArrowDown" ? 1 : -1, a = r.indexOf(document.activeElement);
|
|
953
|
+
a === -1 && (a = r.indexOf(t())), r[a === -1 ? i === 1 ? 0 : r.length - 1 : (a + i + r.length) % r.length].focus();
|
|
954
|
+
}, r = (e) => {
|
|
955
|
+
let t = e.target.closest(V);
|
|
956
|
+
t !== null && t.focus({ preventScroll: !0 });
|
|
957
|
+
};
|
|
958
|
+
return document.addEventListener("keydown", n, !0), e.addEventListener("mousemove", r), () => {
|
|
959
|
+
document.removeEventListener("keydown", n, !0), e.removeEventListener("mousemove", r);
|
|
960
|
+
};
|
|
943
961
|
}
|
|
944
962
|
//#endregion
|
|
945
963
|
//#region src/components/SelectSingle.vue
|
|
946
|
-
var
|
|
964
|
+
var xt = {
|
|
947
965
|
components: {
|
|
948
|
-
ElementHeader:
|
|
949
|
-
DropdownButton:
|
|
950
|
-
ListElement:
|
|
966
|
+
ElementHeader: R,
|
|
967
|
+
DropdownButton: mt,
|
|
968
|
+
ListElement: bt
|
|
951
969
|
},
|
|
952
970
|
emits: ["update:modelValue", "changed"],
|
|
953
971
|
props: {
|
|
@@ -975,6 +993,20 @@ var yt = {
|
|
|
975
993
|
data() {
|
|
976
994
|
return { isOpen: !1 };
|
|
977
995
|
},
|
|
996
|
+
watch: {
|
|
997
|
+
isOpen(e) {
|
|
998
|
+
this.stopMovingFocus(), e && (this.stopArrows = H(this.$refs.list, this.activeItemElement));
|
|
999
|
+
},
|
|
1000
|
+
hasItems(e) {
|
|
1001
|
+
e || (this.isOpen = !1);
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
created() {
|
|
1005
|
+
this.stopArrows = null;
|
|
1006
|
+
},
|
|
1007
|
+
beforeUnmount() {
|
|
1008
|
+
this.stopMovingFocus();
|
|
1009
|
+
},
|
|
978
1010
|
computed: {
|
|
979
1011
|
itemList() {
|
|
980
1012
|
return this.items ?? [];
|
|
@@ -998,12 +1030,22 @@ var yt = {
|
|
|
998
1030
|
},
|
|
999
1031
|
clear() {
|
|
1000
1032
|
this.$emit("update:modelValue", null), this.$emit("changed");
|
|
1033
|
+
},
|
|
1034
|
+
activeItemElement() {
|
|
1035
|
+
let e = this.itemList.indexOf(this.activeItem);
|
|
1036
|
+
return e === -1 ? null : this.$refs.list.querySelectorAll("button")[e];
|
|
1037
|
+
},
|
|
1038
|
+
stopMovingFocus() {
|
|
1039
|
+
this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
|
|
1001
1040
|
}
|
|
1002
1041
|
}
|
|
1003
|
-
},
|
|
1004
|
-
|
|
1042
|
+
}, St = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ct = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, wt = {
|
|
1043
|
+
ref: "list",
|
|
1044
|
+
class: "bb:flex bb:flex-col bb:py-1 bb:mt-1 bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg bb:divide-y bb:divide-gray-200 bb:divide-dashed"
|
|
1045
|
+
};
|
|
1046
|
+
function Tt(t, o, c, l, u, p) {
|
|
1005
1047
|
let h = m("element-header"), g = m("list-element"), _ = m("dropdown-button");
|
|
1006
|
-
return d(), i("div",
|
|
1048
|
+
return d(), i("div", St, [a("div", Ct, [s(h, {
|
|
1007
1049
|
text: c.header,
|
|
1008
1050
|
"is-required": c.isRequired,
|
|
1009
1051
|
"is-loading": c.isLoading
|
|
@@ -1019,7 +1061,7 @@ function Ct(t, o, c, l, u, p) {
|
|
|
1019
1061
|
"has-value": p.hasValue,
|
|
1020
1062
|
onErased: p.clear
|
|
1021
1063
|
}, {
|
|
1022
|
-
default: b(() => [a("div",
|
|
1064
|
+
default: b(() => [a("div", wt, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
|
|
1023
1065
|
name: e.name,
|
|
1024
1066
|
key: e.id,
|
|
1025
1067
|
"is-checked": e.id === c.modelValue,
|
|
@@ -1028,7 +1070,7 @@ function Ct(t, o, c, l, u, p) {
|
|
|
1028
1070
|
"name",
|
|
1029
1071
|
"is-checked",
|
|
1030
1072
|
"onClicked"
|
|
1031
|
-
]))), 128))])]),
|
|
1073
|
+
]))), 128))], 512)]),
|
|
1032
1074
|
_: 1
|
|
1033
1075
|
}, 8, [
|
|
1034
1076
|
"title",
|
|
@@ -1037,7 +1079,7 @@ function Ct(t, o, c, l, u, p) {
|
|
|
1037
1079
|
"onErased"
|
|
1038
1080
|
])) : r("", !0)])]);
|
|
1039
1081
|
}
|
|
1040
|
-
var
|
|
1082
|
+
var Et = /*#__PURE__*/ A(xt, [["render", Tt]]), Dt = {
|
|
1041
1083
|
props: {
|
|
1042
1084
|
text: {
|
|
1043
1085
|
type: String,
|
|
@@ -1076,8 +1118,8 @@ var wt = /*#__PURE__*/ j(yt, [["render", Ct]]), Tt = {
|
|
|
1076
1118
|
return this.color === "yellow";
|
|
1077
1119
|
}
|
|
1078
1120
|
}
|
|
1079
|
-
},
|
|
1080
|
-
function
|
|
1121
|
+
}, Ot = ["textContent"];
|
|
1122
|
+
function kt(e, t, n, r, a, o) {
|
|
1081
1123
|
return d(), i("span", {
|
|
1082
1124
|
class: u(["bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-2 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:whitespace-nowrap", {
|
|
1083
1125
|
"bb:bg-green-50 bb:text-gray-700": o.isGreen,
|
|
@@ -1088,9 +1130,9 @@ function Dt(e, t, n, r, a, o) {
|
|
|
1088
1130
|
"bb:bg-yellow-100 bb:text-yellow-800": o.isYellow
|
|
1089
1131
|
}]),
|
|
1090
1132
|
textContent: g(n.text)
|
|
1091
|
-
}, null, 10,
|
|
1133
|
+
}, null, 10, Ot);
|
|
1092
1134
|
}
|
|
1093
|
-
var
|
|
1135
|
+
var U = /*#__PURE__*/ A(Dt, [["render", kt]]), At = {
|
|
1094
1136
|
props: {
|
|
1095
1137
|
messages: {
|
|
1096
1138
|
type: [Object, Array],
|
|
@@ -1110,12 +1152,12 @@ var H = /*#__PURE__*/ j(Tt, [["render", Dt]]), Ot = {
|
|
|
1110
1152
|
return this.type === "dangerous";
|
|
1111
1153
|
}
|
|
1112
1154
|
}
|
|
1113
|
-
},
|
|
1114
|
-
function
|
|
1155
|
+
}, jt = { class: "bb:flex" }, Mt = { class: "bb:shrink-0" }, Nt = { class: "bb:ml-3" }, Pt = ["textContent"];
|
|
1156
|
+
function Ft(t, n, o, s, c, l) {
|
|
1115
1157
|
return l.hasErrors ? (d(), i("div", {
|
|
1116
1158
|
key: 0,
|
|
1117
1159
|
class: u(["bb-dashboard-ui bb:border-l-4 bb:p-4", l.isDangerous ? "bb:bg-red-50 bb:border-red-400" : "bb:bg-yellow-50 bb:border-yellow-400"])
|
|
1118
|
-
}, [a("div",
|
|
1160
|
+
}, [a("div", jt, [a("div", Mt, [(d(), i("svg", {
|
|
1119
1161
|
class: u(["bb:h-5 bb:w-5", l.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
|
|
1120
1162
|
viewBox: "0 0 20 20",
|
|
1121
1163
|
fill: "currentColor"
|
|
@@ -1123,14 +1165,14 @@ function Nt(t, n, o, s, c, l) {
|
|
|
1123
1165
|
"fill-rule": "evenodd",
|
|
1124
1166
|
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
1125
1167
|
"clip-rule": "evenodd"
|
|
1126
|
-
}, null, -1)]], 2))]), a("div",
|
|
1168
|
+
}, null, -1)]], 2))]), a("div", Nt, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
|
|
1127
1169
|
class: u(["bb:text-sm bb:leading-5", l.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
|
|
1128
1170
|
key: t,
|
|
1129
1171
|
textContent: g(e)
|
|
1130
|
-
}, null, 10,
|
|
1172
|
+
}, null, 10, Pt))), 128))])])], 2)) : r("", !0);
|
|
1131
1173
|
}
|
|
1132
|
-
var
|
|
1133
|
-
function
|
|
1174
|
+
var It = /*#__PURE__*/ A(At, [["render", Ft]]), Lt = { emits: ["clicked"] };
|
|
1175
|
+
function Rt(e, t, n, r, o, s) {
|
|
1134
1176
|
return d(), i("button", {
|
|
1135
1177
|
type: "button",
|
|
1136
1178
|
tabindex: "-1",
|
|
@@ -1147,15 +1189,15 @@ function It(e, t, n, r, o, s) {
|
|
|
1147
1189
|
d: "M6 18L18 6M6 6l12 12"
|
|
1148
1190
|
})], -1)]]);
|
|
1149
1191
|
}
|
|
1150
|
-
var
|
|
1192
|
+
var W = /*#__PURE__*/ A(Lt, [["render", Rt]]), zt = {}, Bt = {
|
|
1151
1193
|
class: "bb:w-4 bb:h-4",
|
|
1152
1194
|
fill: "none",
|
|
1153
1195
|
stroke: "currentColor",
|
|
1154
1196
|
viewBox: "0 0 24 24",
|
|
1155
1197
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1156
1198
|
};
|
|
1157
|
-
function
|
|
1158
|
-
return d(), i("svg",
|
|
1199
|
+
function Vt(e, t, n, r, o, s) {
|
|
1200
|
+
return d(), i("svg", Bt, [...t[0] ||= [a("path", {
|
|
1159
1201
|
"stroke-linecap": "round",
|
|
1160
1202
|
"stroke-linejoin": "round",
|
|
1161
1203
|
"stroke-width": "2",
|
|
@@ -1164,9 +1206,9 @@ function zt(e, t, n, r, o, s) {
|
|
|
1164
1206
|
}
|
|
1165
1207
|
//#endregion
|
|
1166
1208
|
//#region src/components/DownloadLink.vue
|
|
1167
|
-
var
|
|
1168
|
-
components: { "download-icon": /* @__PURE__ */
|
|
1169
|
-
mixins: [
|
|
1209
|
+
var Ht = {
|
|
1210
|
+
components: { "download-icon": /* @__PURE__ */ A(zt, [["render", Vt]]) },
|
|
1211
|
+
mixins: [I],
|
|
1170
1212
|
props: {
|
|
1171
1213
|
url: {
|
|
1172
1214
|
type: String,
|
|
@@ -1180,16 +1222,16 @@ var Bt = {
|
|
|
1180
1222
|
computed: { label() {
|
|
1181
1223
|
return this.title ?? this.texts.download;
|
|
1182
1224
|
} }
|
|
1183
|
-
},
|
|
1184
|
-
function
|
|
1225
|
+
}, Ut = ["href", "title"], Wt = { class: "bb:ml-1" };
|
|
1226
|
+
function Gt(e, t, n, r, o, c) {
|
|
1185
1227
|
let l = m("download-icon");
|
|
1186
1228
|
return d(), i("a", {
|
|
1187
1229
|
href: n.url,
|
|
1188
1230
|
title: c.label,
|
|
1189
1231
|
class: "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-1.5 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:bg-purple-100 bb:text-purple-800 bb:hover:text-purple-600"
|
|
1190
|
-
}, [s(l), a("span",
|
|
1232
|
+
}, [s(l), a("span", Wt, g(c.label), 1)], 8, Ut);
|
|
1191
1233
|
}
|
|
1192
|
-
var
|
|
1234
|
+
var Kt = /*#__PURE__*/ A(Ht, [["render", Gt]]), qt = { props: {
|
|
1193
1235
|
isOpen: {
|
|
1194
1236
|
type: Boolean,
|
|
1195
1237
|
default: !1
|
|
@@ -1198,9 +1240,9 @@ var Wt = /*#__PURE__*/ j(Bt, [["render", Ut]]), Gt = { props: {
|
|
|
1198
1240
|
type: String,
|
|
1199
1241
|
required: !0
|
|
1200
1242
|
}
|
|
1201
|
-
} },
|
|
1202
|
-
function
|
|
1203
|
-
return d(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div",
|
|
1243
|
+
} }, Jt = { class: "bb:flex bb:items-end bb:justify-center bb:min-h-screen bb:pt-4 bb:px-4 bb:pb-20 bb:text-center bb:sm:block bb:sm:p-0" }, Yt = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Xt = ["aria-labelledby"];
|
|
1244
|
+
function Zt(e, n, r, o, c, l) {
|
|
1245
|
+
return d(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", Jt, [
|
|
1204
1246
|
s(t, {
|
|
1205
1247
|
"enter-active-class": "bb:ease-out bb:duration-300",
|
|
1206
1248
|
"enter-from-class": "bb:opacity-0",
|
|
@@ -1209,7 +1251,7 @@ function Yt(e, n, r, o, c, l) {
|
|
|
1209
1251
|
"leave-from-class": "bb:opacity-100",
|
|
1210
1252
|
"leave-to-class": "bb:opacity-0"
|
|
1211
1253
|
}, {
|
|
1212
|
-
default: b(() => [x(a("div",
|
|
1254
|
+
default: b(() => [x(a("div", Yt, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
|
|
1213
1255
|
_: 1
|
|
1214
1256
|
}),
|
|
1215
1257
|
n[1] ||= a("span", { class: "bb:hidden bb:sm:inline-block bb:sm:align-middle bb:sm:h-screen" }, null, -1),
|
|
@@ -1226,12 +1268,12 @@ function Yt(e, n, r, o, c, l) {
|
|
|
1226
1268
|
role: "dialog",
|
|
1227
1269
|
"aria-modal": "true",
|
|
1228
1270
|
"aria-labelledby": r.headingId
|
|
1229
|
-
}, [p(e.$slots, "default")], 8,
|
|
1271
|
+
}, [p(e.$slots, "default")], 8, Xt), [[y, r.isOpen]])]),
|
|
1230
1272
|
_: 3
|
|
1231
1273
|
})
|
|
1232
1274
|
])], 2);
|
|
1233
1275
|
}
|
|
1234
|
-
var
|
|
1276
|
+
var Qt = /*#__PURE__*/ A(qt, [["render", Zt]]), $t = {}, en = {
|
|
1235
1277
|
class: "bb:h-7 bb:w-7 bb:text-red-600",
|
|
1236
1278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1237
1279
|
fill: "none",
|
|
@@ -1239,35 +1281,35 @@ var Xt = /*#__PURE__*/ j(Gt, [["render", Yt]]), Zt = {}, Qt = {
|
|
|
1239
1281
|
stroke: "currentColor",
|
|
1240
1282
|
"aria-hidden": "true"
|
|
1241
1283
|
};
|
|
1242
|
-
function
|
|
1243
|
-
return d(), i("svg",
|
|
1284
|
+
function tn(e, t, n, r, o, s) {
|
|
1285
|
+
return d(), i("svg", en, [...t[0] ||= [a("path", {
|
|
1244
1286
|
"stroke-linecap": "round",
|
|
1245
1287
|
"stroke-linejoin": "round",
|
|
1246
1288
|
"stroke-width": "2",
|
|
1247
1289
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
1248
1290
|
}, null, -1)]]);
|
|
1249
1291
|
}
|
|
1250
|
-
var
|
|
1292
|
+
var G = /*#__PURE__*/ A($t, [["render", tn]]), nn = {}, rn = {
|
|
1251
1293
|
class: "bb:h-7 bb:w-7 bb:text-yellow-400",
|
|
1252
1294
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1253
1295
|
viewBox: "0 0 20 20",
|
|
1254
1296
|
fill: "currentColor",
|
|
1255
1297
|
"aria-hidden": "true"
|
|
1256
1298
|
};
|
|
1257
|
-
function
|
|
1258
|
-
return d(), i("svg",
|
|
1299
|
+
function an(e, t, n, r, o, s) {
|
|
1300
|
+
return d(), i("svg", rn, [...t[0] ||= [a("path", {
|
|
1259
1301
|
"fill-rule": "evenodd",
|
|
1260
1302
|
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
1261
1303
|
"clip-rule": "evenodd"
|
|
1262
1304
|
}, null, -1)]]);
|
|
1263
1305
|
}
|
|
1264
|
-
var
|
|
1306
|
+
var K = /*#__PURE__*/ A(nn, [["render", an]]), on = {
|
|
1265
1307
|
components: {
|
|
1266
|
-
Modal:
|
|
1267
|
-
Dangerous:
|
|
1268
|
-
Warning:
|
|
1308
|
+
Modal: Qt,
|
|
1309
|
+
Dangerous: G,
|
|
1310
|
+
Warning: K
|
|
1269
1311
|
},
|
|
1270
|
-
mixins: [
|
|
1312
|
+
mixins: [I],
|
|
1271
1313
|
emits: ["actionConfirmed", "actionCanceled"],
|
|
1272
1314
|
props: {
|
|
1273
1315
|
isOpen: {
|
|
@@ -1307,20 +1349,20 @@ var G = /*#__PURE__*/ j(en, [["render", nn]]), rn = {
|
|
|
1307
1349
|
return this.type === "warning";
|
|
1308
1350
|
}
|
|
1309
1351
|
}
|
|
1310
|
-
},
|
|
1311
|
-
function
|
|
1352
|
+
}, sn = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:px-4 bb:pt-5 bb:pb-4 bb:sm:p-6 bb:sm:pb-4" }, cn = { class: "bb:sm:flex bb:sm:items-start" }, ln = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, un = ["id"], dn = { class: "bb:mt-2" }, fn = { class: "bb:text-sm bb:text-gray-500" }, pn = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-4 bb:py-3 bb:sm:px-6 bb:sm:flex bb:sm:flex-row-reverse" };
|
|
1353
|
+
function mn(e, t, i, o, s, c) {
|
|
1312
1354
|
let l = m("warning"), f = m("dangerous"), p = m("modal");
|
|
1313
1355
|
return d(), n(p, {
|
|
1314
1356
|
"is-open": i.isOpen,
|
|
1315
1357
|
"heading-id": o.headingId
|
|
1316
1358
|
}, {
|
|
1317
|
-
default: b(() => [a("div",
|
|
1359
|
+
default: b(() => [a("div", sn, [a("div", cn, [a("div", { class: u(["bb:mx-auto bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-12 bb:w-12 bb:rounded-full bb:sm:mx-0 bb:sm:h-10 bb:sm:w-10", {
|
|
1318
1360
|
"bb:bg-red-100": c.isDangerous,
|
|
1319
1361
|
"bb:bg-yellow-100": c.isWarning
|
|
1320
|
-
}]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div",
|
|
1362
|
+
}]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", ln, [a("h3", {
|
|
1321
1363
|
class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
|
|
1322
1364
|
id: o.headingId
|
|
1323
|
-
}, g(i.confirmationHeading), 9,
|
|
1365
|
+
}, g(i.confirmationHeading), 9, un), a("div", dn, [a("p", fn, g(i.confirmationText), 1)])])])]), a("div", pn, [a("button", {
|
|
1324
1366
|
type: "button",
|
|
1325
1367
|
class: u(["bb:w-full bb:inline-flex bb:justify-center bb:rounded-md bb:border bb:border-transparent bb:shadow-xs bb:px-4 bb:py-2 bb:text-base bb:font-medium bb:text-white bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:sm:ml-3 bb:sm:w-auto bb:sm:text-sm", {
|
|
1326
1368
|
"bb:bg-red-600 bb:hover:bg-red-700 bb:focus:ring-red-500": c.isDangerous,
|
|
@@ -1335,24 +1377,37 @@ function fn(e, t, i, o, s, c) {
|
|
|
1335
1377
|
_: 1
|
|
1336
1378
|
}, 8, ["is-open", "heading-id"]);
|
|
1337
1379
|
}
|
|
1338
|
-
var
|
|
1339
|
-
|
|
1380
|
+
var hn = /*#__PURE__*/ A(on, [["render", mn]]);
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region src/navigation.js
|
|
1383
|
+
function gn(e) {
|
|
1384
|
+
let t = e.currentTarget?.target ?? "";
|
|
1385
|
+
return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
|
|
1386
|
+
}
|
|
1387
|
+
var q = {
|
|
1388
|
+
inject: k,
|
|
1389
|
+
methods: { followLink(e, t) {
|
|
1390
|
+
let n = this.uiSettings.navigate;
|
|
1391
|
+
n !== null && gn(e) && (e.preventDefault(), n(t));
|
|
1392
|
+
} }
|
|
1393
|
+
}, J = 4, Y = 8;
|
|
1394
|
+
function X(e) {
|
|
1340
1395
|
return typeof e?.showPopover == "function";
|
|
1341
1396
|
}
|
|
1342
|
-
function
|
|
1343
|
-
return
|
|
1397
|
+
function Z(e) {
|
|
1398
|
+
return X(e) && e.matches(":popover-open");
|
|
1344
1399
|
}
|
|
1345
|
-
function
|
|
1346
|
-
let r = e.getBoundingClientRect(), i = document.documentElement.clientWidth, a = document.documentElement.clientHeight, o = Math.max(
|
|
1400
|
+
function _n(e, t, { maxWidth: n = null } = {}) {
|
|
1401
|
+
let r = e.getBoundingClientRect(), i = document.documentElement.clientWidth, a = document.documentElement.clientHeight, o = Math.max(Y, i - r.right), s = Math.max(0, i - o - Y), c = Math.max(0, a - r.bottom - J - Y), l = Math.max(0, r.top - J - Y), u = c >= l;
|
|
1347
1402
|
Object.assign(t.style, {
|
|
1348
|
-
top: u ? `${r.bottom +
|
|
1349
|
-
bottom: u ? "auto" : `${a - r.top +
|
|
1403
|
+
top: u ? `${r.bottom + J}px` : "auto",
|
|
1404
|
+
bottom: u ? "auto" : `${a - r.top + J}px`,
|
|
1350
1405
|
right: `${o}px`,
|
|
1351
1406
|
left: "auto",
|
|
1352
1407
|
maxHeight: `${u ? c : l}px`
|
|
1353
1408
|
}), n !== null && (t.style.maxWidth = `${Math.min(n, s)}px`);
|
|
1354
1409
|
}
|
|
1355
|
-
function
|
|
1410
|
+
function vn(e, t) {
|
|
1356
1411
|
let n = (n) => {
|
|
1357
1412
|
e.contains(n.target) || t();
|
|
1358
1413
|
};
|
|
@@ -1365,13 +1420,26 @@ function hn(e, t) {
|
|
|
1365
1420
|
}
|
|
1366
1421
|
//#endregion
|
|
1367
1422
|
//#region src/components/DropdownButtonWithAction.vue
|
|
1368
|
-
var
|
|
1369
|
-
|
|
1423
|
+
var yn = 224;
|
|
1424
|
+
function bn(e) {
|
|
1425
|
+
if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.danger !== void 0 && typeof e.danger != "boolean") return !1;
|
|
1426
|
+
let t = typeof e.href == "string" && e.href !== "" && e.onSelect === void 0, n = typeof e.onSelect == "function" && e.href === void 0;
|
|
1427
|
+
return t || n;
|
|
1428
|
+
}
|
|
1429
|
+
var xn = {
|
|
1430
|
+
mixins: [I, q],
|
|
1370
1431
|
emits: ["update:modelValue"],
|
|
1371
|
-
props: {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1432
|
+
props: {
|
|
1433
|
+
actions: {
|
|
1434
|
+
type: Array,
|
|
1435
|
+
default: () => [],
|
|
1436
|
+
validator: (e) => e.every(bn)
|
|
1437
|
+
},
|
|
1438
|
+
modelValue: {
|
|
1439
|
+
type: Boolean,
|
|
1440
|
+
default: !1
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1375
1443
|
setup() {
|
|
1376
1444
|
return {
|
|
1377
1445
|
menuButtonId: _(),
|
|
@@ -1381,11 +1449,31 @@ var gn = 224, _n = {
|
|
|
1381
1449
|
data() {
|
|
1382
1450
|
return { menuIsOpen: this.modelValue };
|
|
1383
1451
|
},
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1452
|
+
computed: {
|
|
1453
|
+
actionItems() {
|
|
1454
|
+
return Array.isArray(this.actions) ? this.actions.filter((e) => typeof e == "object" && !!e) : [];
|
|
1455
|
+
},
|
|
1456
|
+
hasActions() {
|
|
1457
|
+
return this.actionItems.length > 0;
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
watch: {
|
|
1461
|
+
modelValue(e) {
|
|
1462
|
+
this.menuIsOpen = e, this.applyMenuState();
|
|
1463
|
+
},
|
|
1464
|
+
hasActions: {
|
|
1465
|
+
flush: "post",
|
|
1466
|
+
handler(e) {
|
|
1467
|
+
if (e) {
|
|
1468
|
+
this.applyMenuState();
|
|
1469
|
+
return;
|
|
1470
|
+
}
|
|
1471
|
+
this.stopListening(), this.menuIsOpen && (this.menuIsOpen = !1, this.$emit("update:modelValue", !1));
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1387
1475
|
created() {
|
|
1388
|
-
this.stopClosing = null;
|
|
1476
|
+
this.stopClosing = null, this.stopArrows = null, process.env.NODE_ENV !== "production" && this.$slots.actions && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот actions убран, пункты меню передаются пропом actions");
|
|
1389
1477
|
},
|
|
1390
1478
|
mounted() {
|
|
1391
1479
|
this.applyMenuState();
|
|
@@ -1394,43 +1482,51 @@ var gn = 224, _n = {
|
|
|
1394
1482
|
this.stopListening();
|
|
1395
1483
|
},
|
|
1396
1484
|
methods: {
|
|
1485
|
+
isLink(e) {
|
|
1486
|
+
return typeof e.href == "string" && e.href !== "";
|
|
1487
|
+
},
|
|
1488
|
+
select(e) {
|
|
1489
|
+
if (typeof e.onSelect == "function") return e.onSelect();
|
|
1490
|
+
},
|
|
1397
1491
|
applyMenuState() {
|
|
1398
1492
|
let e = this.$refs.menu;
|
|
1399
|
-
|
|
1493
|
+
X(e) && e.isConnected && (this.menuIsOpen && !Z(e) && e.showPopover(), !this.menuIsOpen && Z(e) && e.hidePopover());
|
|
1400
1494
|
},
|
|
1401
1495
|
close() {
|
|
1402
1496
|
let e = this.$refs.menu;
|
|
1403
|
-
|
|
1497
|
+
Z(e) && e.hidePopover();
|
|
1404
1498
|
},
|
|
1405
1499
|
onBeforeToggle(e) {
|
|
1406
|
-
e.newState === "open" &&
|
|
1500
|
+
e.newState === "open" && _n(this.$refs.arrow, this.$refs.menu, { maxWidth: yn });
|
|
1407
1501
|
},
|
|
1408
|
-
onToggle(
|
|
1502
|
+
onToggle() {
|
|
1409
1503
|
this.stopListening();
|
|
1410
|
-
let
|
|
1411
|
-
|
|
1412
|
-
let n = e.newState === "open";
|
|
1413
|
-
n !== this.menuIsOpen && (this.menuIsOpen = n, this.$emit("update:modelValue", n));
|
|
1504
|
+
let e = this.$refs.menu, t = Z(e);
|
|
1505
|
+
t && (this.stopClosing = vn(e, this.close), this.stopArrows = H(e)), t !== this.menuIsOpen && (this.menuIsOpen = t, this.$emit("update:modelValue", t));
|
|
1414
1506
|
},
|
|
1415
1507
|
stopListening() {
|
|
1416
|
-
this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null);
|
|
1508
|
+
this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null), this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
|
|
1417
1509
|
}
|
|
1418
1510
|
}
|
|
1419
|
-
},
|
|
1511
|
+
}, Sn = { class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md" }, Cn = {
|
|
1420
1512
|
key: 0,
|
|
1421
1513
|
class: "bb:-ml-px bb:relative bb:block"
|
|
1422
|
-
},
|
|
1423
|
-
|
|
1424
|
-
|
|
1514
|
+
}, wn = ["id", "popovertarget"], Tn = { class: "bb:sr-only" }, En = ["id", "aria-labelledby"], Dn = [
|
|
1515
|
+
"href",
|
|
1516
|
+
"onClick",
|
|
1517
|
+
"textContent"
|
|
1518
|
+
], On = ["onClick", "textContent"];
|
|
1519
|
+
function kn(t, n, o, s, c, l) {
|
|
1520
|
+
return d(), i("span", Sn, [a("button", {
|
|
1425
1521
|
type: "button",
|
|
1426
|
-
class: u(["bb:relative bb:inline-flex bb:items-center bb:rounded-l-md bb:border bb:border-gray-300 bb:bg-white bb:hover:bg-gray-50 bb:focus:outline-hidden", { "bb:rounded-r-md": !
|
|
1427
|
-
}, [p(
|
|
1522
|
+
class: u(["bb:relative bb:inline-flex bb:items-center bb:rounded-l-md bb:border bb:border-gray-300 bb:bg-white bb:hover:bg-gray-50 bb:focus:outline-hidden", { "bb:rounded-r-md": !l.hasActions }])
|
|
1523
|
+
}, [p(t.$slots, "button")], 2), l.hasActions ? (d(), i("span", Cn, [a("button", {
|
|
1428
1524
|
ref: "arrow",
|
|
1429
|
-
id:
|
|
1525
|
+
id: s.menuButtonId,
|
|
1430
1526
|
type: "button",
|
|
1431
|
-
popovertarget:
|
|
1527
|
+
popovertarget: s.menuId,
|
|
1432
1528
|
class: "bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:bg-gray-50 bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500"
|
|
1433
|
-
}, [a("span",
|
|
1529
|
+
}, [a("span", Tn, g(t.texts.openMenu), 1), n[3] ||= a("svg", {
|
|
1434
1530
|
class: "bb:h-5 bb:w-5",
|
|
1435
1531
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1436
1532
|
viewBox: "0 0 20 20",
|
|
@@ -1440,70 +1536,71 @@ function Cn(e, t, n, o, s, c) {
|
|
|
1440
1536
|
"fill-rule": "evenodd",
|
|
1441
1537
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
1442
1538
|
"clip-rule": "evenodd"
|
|
1443
|
-
})], -1)], 8,
|
|
1539
|
+
})], -1)], 8, wn), a("div", {
|
|
1444
1540
|
ref: "menu",
|
|
1445
|
-
id:
|
|
1541
|
+
id: s.menuId,
|
|
1446
1542
|
popover: "auto",
|
|
1447
|
-
class: "bb:m-0 bb:inset-auto bb:w-56 bb:rounded-md bb:shadow-lg bb:bg-white bb:
|
|
1543
|
+
class: "bb:m-0 bb:inset-auto bb:w-56 bb:rounded-md bb:shadow-lg bb:bg-white bb:ring-1 bb:ring-black/5",
|
|
1448
1544
|
role: "menu",
|
|
1449
1545
|
"aria-orientation": "vertical",
|
|
1450
|
-
"aria-labelledby":
|
|
1451
|
-
onBeforetoggle:
|
|
1452
|
-
onToggle:
|
|
1453
|
-
onClick:
|
|
1454
|
-
}, [
|
|
1546
|
+
"aria-labelledby": s.menuButtonId,
|
|
1547
|
+
onBeforetoggle: n[0] ||= (...e) => l.onBeforeToggle && l.onBeforeToggle(...e),
|
|
1548
|
+
onToggle: n[1] ||= (...e) => l.onToggle && l.onToggle(...e),
|
|
1549
|
+
onClick: n[2] ||= (...e) => l.close && l.close(...e)
|
|
1550
|
+
}, [(d(!0), i(e, null, f(l.actionItems, (n, r) => (d(), i(e, { key: r }, [l.isLink(n) ? (d(), i("a", {
|
|
1551
|
+
key: 0,
|
|
1552
|
+
href: n.href,
|
|
1553
|
+
role: "menuitem",
|
|
1554
|
+
class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", n.danger === !0 ? "bb:bg-red-400 bb:text-white bb:focus:bg-red-500" : "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900"]),
|
|
1555
|
+
onClick: (e) => t.followLink(e, n.href),
|
|
1556
|
+
textContent: g(n.label)
|
|
1557
|
+
}, null, 10, Dn)) : (d(), i("button", {
|
|
1558
|
+
key: 1,
|
|
1559
|
+
type: "button",
|
|
1560
|
+
role: "menuitem",
|
|
1561
|
+
class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", n.danger === !0 ? "bb:bg-red-400 bb:text-white bb:focus:bg-red-500" : "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900"]),
|
|
1562
|
+
onClick: (e) => l.select(n),
|
|
1563
|
+
textContent: g(n.label)
|
|
1564
|
+
}, null, 10, On))], 64))), 128))], 40, En)])) : r("", !0)]);
|
|
1455
1565
|
}
|
|
1456
|
-
var
|
|
1566
|
+
var An = /*#__PURE__*/ A(xn, [["render", kn]]), jn = {}, Mn = {
|
|
1457
1567
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1458
1568
|
viewBox: "0 0 20 20",
|
|
1459
1569
|
fill: "currentColor",
|
|
1460
1570
|
"aria-hidden": "true"
|
|
1461
1571
|
};
|
|
1462
|
-
function
|
|
1463
|
-
return d(), i("svg",
|
|
1572
|
+
function Nn(e, t, n, r, o, s) {
|
|
1573
|
+
return d(), i("svg", Mn, [...t[0] ||= [a("path", {
|
|
1464
1574
|
"fill-rule": "evenodd",
|
|
1465
1575
|
"clip-rule": "evenodd",
|
|
1466
1576
|
d: "M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z"
|
|
1467
1577
|
}, null, -1)]]);
|
|
1468
1578
|
}
|
|
1469
|
-
var
|
|
1579
|
+
var Pn = /*#__PURE__*/ A(jn, [["render", Nn]]), Fn = {}, In = {
|
|
1470
1580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1471
1581
|
viewBox: "0 0 20 20",
|
|
1472
1582
|
fill: "currentColor",
|
|
1473
1583
|
"aria-hidden": "true"
|
|
1474
1584
|
};
|
|
1475
|
-
function
|
|
1476
|
-
return d(), i("svg",
|
|
1585
|
+
function Ln(e, t, n, r, o, s) {
|
|
1586
|
+
return d(), i("svg", In, [...t[0] ||= [a("path", {
|
|
1477
1587
|
"fill-rule": "evenodd",
|
|
1478
1588
|
"clip-rule": "evenodd",
|
|
1479
1589
|
d: "M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
|
|
1480
1590
|
}, null, -1)]]);
|
|
1481
1591
|
}
|
|
1482
|
-
var
|
|
1483
|
-
//#endregion
|
|
1484
|
-
//#region src/navigation.js
|
|
1485
|
-
function Nn(e) {
|
|
1486
|
-
let t = e.currentTarget?.target ?? "";
|
|
1487
|
-
return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
|
|
1488
|
-
}
|
|
1489
|
-
var X = {
|
|
1490
|
-
inject: A,
|
|
1491
|
-
methods: { followLink(e, t) {
|
|
1492
|
-
let n = this.uiSettings.navigate;
|
|
1493
|
-
n !== null && Nn(e) && (e.preventDefault(), n(t));
|
|
1494
|
-
} }
|
|
1495
|
-
};
|
|
1592
|
+
var Rn = /*#__PURE__*/ A(Fn, [["render", Ln]]);
|
|
1496
1593
|
//#endregion
|
|
1497
1594
|
//#region src/components/Pagination.vue
|
|
1498
|
-
function
|
|
1595
|
+
function Q(e) {
|
|
1499
1596
|
return typeof e == "string" && e !== "" ? e : null;
|
|
1500
1597
|
}
|
|
1501
|
-
var
|
|
1598
|
+
var zn = {
|
|
1502
1599
|
components: {
|
|
1503
|
-
ArrowNarrowLeft:
|
|
1504
|
-
ArrowNarrowRight:
|
|
1600
|
+
ArrowNarrowLeft: Pn,
|
|
1601
|
+
ArrowNarrowRight: Rn
|
|
1505
1602
|
},
|
|
1506
|
-
mixins: [
|
|
1603
|
+
mixins: [I, q],
|
|
1507
1604
|
props: {
|
|
1508
1605
|
links: {
|
|
1509
1606
|
type: Object,
|
|
@@ -1531,49 +1628,49 @@ var Pn = {
|
|
|
1531
1628
|
return typeof this.from == "number" && typeof this.to == "number";
|
|
1532
1629
|
},
|
|
1533
1630
|
previousPageUrl() {
|
|
1534
|
-
return
|
|
1631
|
+
return Q(this.links?.prev);
|
|
1535
1632
|
},
|
|
1536
1633
|
nextPageUrl() {
|
|
1537
|
-
return
|
|
1634
|
+
return Q(this.links?.next);
|
|
1538
1635
|
}
|
|
1539
1636
|
}
|
|
1540
|
-
},
|
|
1637
|
+
}, Bn = {
|
|
1541
1638
|
key: 0,
|
|
1542
1639
|
class: "bb-dashboard-ui bb:px-4 bb:flex bb:items-center bb:justify-between bb:sm:px-0"
|
|
1543
|
-
},
|
|
1640
|
+
}, Vn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Hn = ["href"], Un = {
|
|
1544
1641
|
key: 0,
|
|
1545
1642
|
class: "bb:hidden bb:md:-mt-px bb:md:flex bb:text-gray-400 bb:text-sm bb:leading-5"
|
|
1546
|
-
},
|
|
1547
|
-
function
|
|
1643
|
+
}, Wn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Gn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Kn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, qn = ["href"];
|
|
1644
|
+
function Jn(e, t, n, c, l, u) {
|
|
1548
1645
|
let f = m("arrow-narrow-left"), p = m("arrow-narrow-right");
|
|
1549
|
-
return u.hasResults ? (d(), i("nav",
|
|
1550
|
-
a("div",
|
|
1646
|
+
return u.hasResults ? (d(), i("nav", Bn, [
|
|
1647
|
+
a("div", Vn, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
|
|
1551
1648
|
key: 0,
|
|
1552
1649
|
href: u.previousPageUrl,
|
|
1553
1650
|
class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pr-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700",
|
|
1554
1651
|
onClick: t[0] ||= (t) => e.followLink(t, u.previousPageUrl)
|
|
1555
|
-
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8,
|
|
1556
|
-
u.hasRange ? (d(), i("div",
|
|
1652
|
+
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8, Hn))]),
|
|
1653
|
+
u.hasRange ? (d(), i("div", Un, [
|
|
1557
1654
|
o(g(e.texts.resultsBefore) + " ", 1),
|
|
1558
|
-
a("span",
|
|
1655
|
+
a("span", Wn, g(u.from) + " - " + g(u.to), 1),
|
|
1559
1656
|
o(" " + g(e.texts.resultsOf) + " ", 1),
|
|
1560
|
-
a("span",
|
|
1657
|
+
a("span", Gn, g(u.total), 1),
|
|
1561
1658
|
o(" " + g(e.texts.resultsAfter), 1)
|
|
1562
1659
|
])) : r("", !0),
|
|
1563
|
-
a("div",
|
|
1660
|
+
a("div", Kn, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
|
|
1564
1661
|
key: 0,
|
|
1565
1662
|
href: u.nextPageUrl,
|
|
1566
1663
|
class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pl-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700",
|
|
1567
1664
|
onClick: t[1] ||= (t) => e.followLink(t, u.nextPageUrl)
|
|
1568
|
-
}, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8,
|
|
1665
|
+
}, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8, qn))])
|
|
1569
1666
|
])) : r("", !0);
|
|
1570
1667
|
}
|
|
1571
|
-
var
|
|
1668
|
+
var Yn = /*#__PURE__*/ A(zn, [["render", Jn]]), Xn = [
|
|
1572
1669
|
"left",
|
|
1573
1670
|
"center",
|
|
1574
1671
|
"right"
|
|
1575
|
-
],
|
|
1576
|
-
function
|
|
1672
|
+
], Zn = ["red", "green"];
|
|
1673
|
+
function Qn(e) {
|
|
1577
1674
|
if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
|
|
1578
1675
|
let t = e.key;
|
|
1579
1676
|
return {
|
|
@@ -1582,21 +1679,21 @@ function qn(e) {
|
|
|
1582
1679
|
value: typeof e.value == "function" ? e.value : (e) => e?.[t],
|
|
1583
1680
|
secondary: typeof e.secondary == "function" ? e.secondary : null,
|
|
1584
1681
|
muted: e.muted === !0,
|
|
1585
|
-
align:
|
|
1682
|
+
align: Xn.includes(e.align) ? e.align : "left",
|
|
1586
1683
|
wrap: e.wrap === !0,
|
|
1587
1684
|
narrow: e.narrow === !0,
|
|
1588
1685
|
visible: e.visible !== !1
|
|
1589
1686
|
};
|
|
1590
1687
|
}
|
|
1591
|
-
function
|
|
1688
|
+
function $(e) {
|
|
1592
1689
|
return typeof e == "string" && e !== "" ? e : null;
|
|
1593
1690
|
}
|
|
1594
|
-
var
|
|
1691
|
+
var $n = {
|
|
1595
1692
|
components: {
|
|
1596
|
-
Pagination:
|
|
1597
|
-
SmallBadge:
|
|
1693
|
+
Pagination: Yn,
|
|
1694
|
+
SmallBadge: U
|
|
1598
1695
|
},
|
|
1599
|
-
mixins: [
|
|
1696
|
+
mixins: [I],
|
|
1600
1697
|
props: {
|
|
1601
1698
|
rows: {
|
|
1602
1699
|
type: Array,
|
|
@@ -1641,7 +1738,7 @@ var Jn = {
|
|
|
1641
1738
|
return Array.isArray(this.rows) ? this.rows : [];
|
|
1642
1739
|
},
|
|
1643
1740
|
visibleColumns() {
|
|
1644
|
-
return (Array.isArray(this.columns) ? this.columns : []).map(
|
|
1741
|
+
return (Array.isArray(this.columns) ? this.columns : []).map(Qn).filter((e) => e !== null && e.visible);
|
|
1645
1742
|
},
|
|
1646
1743
|
isCard() {
|
|
1647
1744
|
return this.variant === "card";
|
|
@@ -1657,10 +1754,10 @@ var Jn = {
|
|
|
1657
1754
|
},
|
|
1658
1755
|
badgeText() {
|
|
1659
1756
|
if (this.hasRecords) {
|
|
1660
|
-
let e =
|
|
1757
|
+
let e = $(this.foundText);
|
|
1661
1758
|
return e === null ? null : `${e}: ${this.recordCount}`;
|
|
1662
1759
|
}
|
|
1663
|
-
return
|
|
1760
|
+
return $(this.emptyText);
|
|
1664
1761
|
}
|
|
1665
1762
|
},
|
|
1666
1763
|
methods: {
|
|
@@ -1680,15 +1777,15 @@ var Jn = {
|
|
|
1680
1777
|
colorOf(e) {
|
|
1681
1778
|
if (typeof this.rowColor != "function") return null;
|
|
1682
1779
|
let t = this.rowColor(e);
|
|
1683
|
-
return
|
|
1780
|
+
return Zn.includes(t) ? t : null;
|
|
1684
1781
|
},
|
|
1685
1782
|
textOf(e, t) {
|
|
1686
1783
|
let n = e(t);
|
|
1687
1784
|
return n == null ? "" : String(n);
|
|
1688
1785
|
}
|
|
1689
1786
|
}
|
|
1690
|
-
},
|
|
1691
|
-
function
|
|
1787
|
+
}, er = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, tr = { class: "bb:bg-gray-50" }, nr = ["textContent"], rr = { class: "bb:divide-y bb:divide-gray-200" }, ir = ["textContent"], ar = ["textContent"];
|
|
1788
|
+
function or(t, o, s, c, l, h) {
|
|
1692
1789
|
let _ = m("small-badge"), v = m("pagination");
|
|
1693
1790
|
return d(), i("div", null, [
|
|
1694
1791
|
h.hasBadgeRow() ? (d(), i("div", {
|
|
@@ -1702,7 +1799,7 @@ function tr(t, o, s, c, l, h) {
|
|
|
1702
1799
|
h.normalizedRows.length > 0 ? (d(), i("div", {
|
|
1703
1800
|
key: 1,
|
|
1704
1801
|
class: u(h.isCard && h.hasBadgeRow() ? "bb:mt-4" : "")
|
|
1705
|
-
}, [a("div", { class: u(["bb:overflow-x-auto", h.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table",
|
|
1802
|
+
}, [a("div", { class: u(["bb:overflow-x-auto", h.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table", er, [a("thead", null, [a("tr", tr, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
|
|
1706
1803
|
key: e.key,
|
|
1707
1804
|
scope: "col",
|
|
1708
1805
|
class: u(["bb:px-6 bb:py-3 bb:text-xs bb:leading-4 bb:font-medium bb:text-gray-500 bb:uppercase bb:tracking-wider bb:whitespace-nowrap", [{
|
|
@@ -1711,7 +1808,7 @@ function tr(t, o, s, c, l, h) {
|
|
|
1711
1808
|
"bb:text-right": e.align === "right"
|
|
1712
1809
|
}, { "bb:w-px": e.narrow }]]),
|
|
1713
1810
|
textContent: g(e.label)
|
|
1714
|
-
}, null, 10,
|
|
1811
|
+
}, null, 10, nr))), 128))])]), a("tbody", rr, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
|
|
1715
1812
|
key: h.keyOf(n, o),
|
|
1716
1813
|
class: u({
|
|
1717
1814
|
"bb:bg-white bb:even:bg-gray-50": h.colorOf(n) === null,
|
|
@@ -1735,11 +1832,11 @@ function tr(t, o, s, c, l, h) {
|
|
|
1735
1832
|
}, () => [a("div", {
|
|
1736
1833
|
class: u(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
|
|
1737
1834
|
textContent: g(h.textOf(e.value, n))
|
|
1738
|
-
}, null, 10,
|
|
1835
|
+
}, null, 10, ir), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
|
|
1739
1836
|
key: 0,
|
|
1740
1837
|
class: "bb:text-gray-400",
|
|
1741
1838
|
textContent: g(h.textOf(e.secondary, n))
|
|
1742
|
-
}, null, 8,
|
|
1839
|
+
}, null, 8, ar)) : r("", !0)])], 2))), 128))], 2))), 128))])])], 2)], 2)) : r("", !0),
|
|
1743
1840
|
h.hasMeta ? (d(), n(v, {
|
|
1744
1841
|
key: 2,
|
|
1745
1842
|
meta: s.meta,
|
|
@@ -1754,8 +1851,8 @@ function tr(t, o, s, c, l, h) {
|
|
|
1754
1851
|
])) : r("", !0)
|
|
1755
1852
|
]);
|
|
1756
1853
|
}
|
|
1757
|
-
var
|
|
1758
|
-
mixins: [
|
|
1854
|
+
var sr = /*#__PURE__*/ A($n, [["render", or]]), cr = {
|
|
1855
|
+
mixins: [q],
|
|
1759
1856
|
props: {
|
|
1760
1857
|
url: {
|
|
1761
1858
|
type: String,
|
|
@@ -1770,28 +1867,28 @@ var nr = /*#__PURE__*/ j(Jn, [["render", tr]]), rr = {
|
|
|
1770
1867
|
default: !1
|
|
1771
1868
|
}
|
|
1772
1869
|
}
|
|
1773
|
-
},
|
|
1774
|
-
function
|
|
1870
|
+
}, lr = ["href", "textContent"];
|
|
1871
|
+
function ur(e, t, n, r, a, o) {
|
|
1775
1872
|
return d(), i("a", {
|
|
1776
1873
|
href: n.url,
|
|
1777
1874
|
class: u([n.isActive ? "bb:border-indigo-400 bb:text-gray-600 bb:focus:border-indigo-700" : "bb:border-transparent bb:text-gray-500 bb:hover:text-gray-600 bb:hover:border-gray-300 bb:focus:text-gray-700 bb:focus:border-gray-300", "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-1 bb:pt-1 bb:border-b-2 bb:text-sm bb:font-medium bb:leading-5 bb:focus:outline-hidden bb:transition bb:duration-150 bb:ease-in-out"]),
|
|
1778
1875
|
onClick: t[0] ||= (t) => e.followLink(t, n.url),
|
|
1779
1876
|
textContent: g(n.name)
|
|
1780
|
-
}, null, 10,
|
|
1877
|
+
}, null, 10, lr);
|
|
1781
1878
|
}
|
|
1782
|
-
var
|
|
1879
|
+
var dr = /*#__PURE__*/ A(cr, [["render", ur]]), fr = [
|
|
1783
1880
|
"xl",
|
|
1784
1881
|
"4xl",
|
|
1785
1882
|
"7xl"
|
|
1786
|
-
],
|
|
1787
|
-
components: { Closer:
|
|
1788
|
-
mixins: [
|
|
1883
|
+
], pr = {
|
|
1884
|
+
components: { Closer: W },
|
|
1885
|
+
mixins: [I],
|
|
1789
1886
|
inheritAttrs: !1,
|
|
1790
1887
|
props: {
|
|
1791
1888
|
width: {
|
|
1792
1889
|
type: String,
|
|
1793
1890
|
default: "xl",
|
|
1794
|
-
validator: (e) =>
|
|
1891
|
+
validator: (e) => fr.includes(e)
|
|
1795
1892
|
},
|
|
1796
1893
|
fallbackUrl: {
|
|
1797
1894
|
type: String,
|
|
@@ -1807,13 +1904,13 @@ var or = /*#__PURE__*/ j(rr, [["render", ar]]), $ = [
|
|
|
1807
1904
|
},
|
|
1808
1905
|
computed: {
|
|
1809
1906
|
resolvedWidth() {
|
|
1810
|
-
return
|
|
1907
|
+
return fr.includes(this.width) ? this.width : "xl";
|
|
1811
1908
|
},
|
|
1812
1909
|
windows() {
|
|
1813
1910
|
return this.uiSettings.windows;
|
|
1814
1911
|
},
|
|
1815
1912
|
resolvedKey() {
|
|
1816
|
-
return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null :
|
|
1913
|
+
return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ae(this.windows.page.address);
|
|
1817
1914
|
},
|
|
1818
1915
|
target() {
|
|
1819
1916
|
return this.returnAddress === null ? this.fallbackUrl === null || this.fallbackUrl === "" ? null : this.fallbackUrl : this.returnAddress;
|
|
@@ -1823,23 +1920,23 @@ var or = /*#__PURE__*/ j(rr, [["render", ar]]), $ = [
|
|
|
1823
1920
|
}
|
|
1824
1921
|
},
|
|
1825
1922
|
watch: { fallbackUrl() {
|
|
1826
|
-
this.windows !== null &&
|
|
1923
|
+
this.windows !== null && pe(this.windows.state, this, this.fallbackAddress());
|
|
1827
1924
|
} },
|
|
1828
1925
|
mounted() {
|
|
1829
|
-
this.windows !== null && (this.returnAddress =
|
|
1926
|
+
this.windows !== null && (this.returnAddress = D(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
|
|
1830
1927
|
},
|
|
1831
1928
|
beforeUnmount() {
|
|
1832
|
-
this.windows !== null &&
|
|
1929
|
+
this.windows !== null && fe(this.windows.state, this);
|
|
1833
1930
|
},
|
|
1834
1931
|
methods: {
|
|
1835
1932
|
fallbackAddress() {
|
|
1836
|
-
return
|
|
1933
|
+
return ie(this.fallbackUrl, window.location.origin);
|
|
1837
1934
|
},
|
|
1838
1935
|
forwardedAttrs() {
|
|
1839
1936
|
return Object.fromEntries(Object.entries(this.$attrs).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")));
|
|
1840
1937
|
},
|
|
1841
1938
|
syncWindow() {
|
|
1842
|
-
let e =
|
|
1939
|
+
let e = de(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
|
|
1843
1940
|
e.rejected && console.warn(`PageCard: ключ окна сменился на «${this.resolvedKey}» без смены страницы — карточка остаётся в окне «${e.key}»`), this.returnAddress = e.window.returnAddress;
|
|
1844
1941
|
},
|
|
1845
1942
|
close() {
|
|
@@ -1854,7 +1951,7 @@ var or = /*#__PURE__*/ j(rr, [["render", ar]]), $ = [
|
|
|
1854
1951
|
}
|
|
1855
1952
|
}
|
|
1856
1953
|
};
|
|
1857
|
-
function
|
|
1954
|
+
function mr(e, t, a, o, s, c) {
|
|
1858
1955
|
let f = m("closer");
|
|
1859
1956
|
return d(), i("div", l({
|
|
1860
1957
|
class: ["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:sm:rounded-lg", [
|
|
@@ -1887,7 +1984,7 @@ function cr(e, t, a, o, s, c) {
|
|
|
1887
1984
|
"onClicked"
|
|
1888
1985
|
])) : r("", !0)], 16);
|
|
1889
1986
|
}
|
|
1890
|
-
var
|
|
1987
|
+
var hr = /*#__PURE__*/ A(pr, [["render", mr]]), gr = {}, _r = {
|
|
1891
1988
|
class: "bb:h-7 bb:w-7 bb:text-green-600",
|
|
1892
1989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1893
1990
|
fill: "none",
|
|
@@ -1896,22 +1993,22 @@ var lr = /*#__PURE__*/ j(sr, [["render", cr]]), ur = {}, dr = {
|
|
|
1896
1993
|
stroke: "currentColor",
|
|
1897
1994
|
"aria-hidden": "true"
|
|
1898
1995
|
};
|
|
1899
|
-
function
|
|
1900
|
-
return d(), i("svg",
|
|
1996
|
+
function vr(e, t, n, r, o, s) {
|
|
1997
|
+
return d(), i("svg", _r, [...t[0] ||= [a("path", {
|
|
1901
1998
|
"stroke-linecap": "round",
|
|
1902
1999
|
"stroke-linejoin": "round",
|
|
1903
2000
|
d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
1904
2001
|
}, null, -1)]]);
|
|
1905
2002
|
}
|
|
1906
|
-
var
|
|
2003
|
+
var yr = /*#__PURE__*/ A(gr, [["render", vr]]), br = {}, xr = {
|
|
1907
2004
|
class: "bb:h-5 bb:w-5",
|
|
1908
2005
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1909
2006
|
viewBox: "0 0 20 20",
|
|
1910
2007
|
fill: "currentColor",
|
|
1911
2008
|
"aria-hidden": "true"
|
|
1912
2009
|
};
|
|
1913
|
-
function
|
|
1914
|
-
return d(), i("svg",
|
|
2010
|
+
function Sr(e, t, n, r, o, s) {
|
|
2011
|
+
return d(), i("svg", xr, [...t[0] ||= [a("path", {
|
|
1915
2012
|
"fill-rule": "evenodd",
|
|
1916
2013
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1917
2014
|
"clip-rule": "evenodd"
|
|
@@ -1919,14 +2016,14 @@ function gr(e, t, n, r, o, s) {
|
|
|
1919
2016
|
}
|
|
1920
2017
|
//#endregion
|
|
1921
2018
|
//#region src/components/NotificationMessage.vue
|
|
1922
|
-
var
|
|
2019
|
+
var Cr = {
|
|
1923
2020
|
components: {
|
|
1924
|
-
Check:
|
|
1925
|
-
Close: /* @__PURE__ */
|
|
1926
|
-
Dangerous:
|
|
1927
|
-
Warning:
|
|
2021
|
+
Check: yr,
|
|
2022
|
+
Close: /* @__PURE__ */ A(br, [["render", Sr]]),
|
|
2023
|
+
Dangerous: G,
|
|
2024
|
+
Warning: K
|
|
1928
2025
|
},
|
|
1929
|
-
mixins: [
|
|
2026
|
+
mixins: [I],
|
|
1930
2027
|
emits: ["update:modelValue"],
|
|
1931
2028
|
props: {
|
|
1932
2029
|
modelValue: {
|
|
@@ -1964,8 +2061,8 @@ var _r = {
|
|
|
1964
2061
|
return this.type === "confirmation";
|
|
1965
2062
|
}
|
|
1966
2063
|
}
|
|
1967
|
-
},
|
|
1968
|
-
function
|
|
2064
|
+
}, wr = ["role"], Tr = { class: "bb:p-4" }, Er = { class: "bb:flex bb:items-start" }, Dr = { class: "bb:shrink-0" }, Or = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, kr = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, Ar = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, jr = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Mr = { class: "bb:sr-only" };
|
|
2065
|
+
function Nr(e, t, o, c, l, f) {
|
|
1969
2066
|
let p = m("warning"), h = m("dangerous"), _ = m("check"), v = m("close");
|
|
1970
2067
|
return d(), i("div", {
|
|
1971
2068
|
class: "bb-dashboard-ui bb:fixed bb:inset-0 bb:flex bb:items-end bb:justify-center bb:px-4 bb:py-6 bb:pointer-events-none bb:sm:p-6 bb:sm:items-start bb:sm:justify-end",
|
|
@@ -1977,14 +2074,14 @@ function Dr(e, t, o, c, l, f) {
|
|
|
1977
2074
|
"bb:bg-yellow-50": f.isWarning,
|
|
1978
2075
|
"bb:bg-gray-50": f.isConfirmation
|
|
1979
2076
|
}])
|
|
1980
|
-
}, [a("div",
|
|
1981
|
-
a("div",
|
|
2077
|
+
}, [a("div", Tr, [a("div", Er, [
|
|
2078
|
+
a("div", Dr, [
|
|
1982
2079
|
f.isWarning ? (d(), n(p, { key: 0 })) : r("", !0),
|
|
1983
2080
|
f.isDangerous ? (d(), n(h, { key: 1 })) : r("", !0),
|
|
1984
2081
|
f.isConfirmation ? (d(), n(_, { key: 2 })) : r("", !0)
|
|
1985
2082
|
]),
|
|
1986
|
-
a("div",
|
|
1987
|
-
a("div",
|
|
2083
|
+
a("div", Or, [a("p", kr, g(o.notificationHeading), 1), a("p", Ar, g(f.text), 1)]),
|
|
2084
|
+
a("div", jr, [a("button", {
|
|
1988
2085
|
type: "button",
|
|
1989
2086
|
class: u(["bb:rounded-md bb:inline-flex bb:text-gray-400 bb:hover:text-gray-500 bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:focus:ring-indigo-500", {
|
|
1990
2087
|
"bb:bg-red-50": f.isDangerous,
|
|
@@ -1992,9 +2089,9 @@ function Dr(e, t, o, c, l, f) {
|
|
|
1992
2089
|
"bb:bg-gray-50": f.isConfirmation
|
|
1993
2090
|
}]),
|
|
1994
2091
|
onClick: t[0] ||= S((t) => e.$emit("update:modelValue", ""), ["prevent"])
|
|
1995
|
-
}, [a("span",
|
|
1996
|
-
])])], 2)) : r("", !0)], 8,
|
|
2092
|
+
}, [a("span", Mr, g(e.texts.close), 1), s(v)], 2)])
|
|
2093
|
+
])])], 2)) : r("", !0)], 8, wr);
|
|
1997
2094
|
}
|
|
1998
|
-
var
|
|
2095
|
+
var Pr = /*#__PURE__*/ A(Cr, [["render", Nr]]);
|
|
1999
2096
|
//#endregion
|
|
2000
|
-
export {
|
|
2097
|
+
export { W as Closer, hn as ConfirmationModal, sr as DataTable, M as Dot, Kt as DownloadLink, An as DropdownButtonWithAction, It as ErrorMessages, dr as NavigationMenuElement, Pr as NotificationMessage, hr as PageCard, L as PickDay, j as Popup, Je as RussianMobileFilter, tt as Search, ct as SelectDateInterval, Et as SelectSingle, U as SmallBadge, ge as dashboardUi };
|