@boobooking/dashboard-ui-components 0.11.0 → 0.12.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 +110 -24
- package/dist/index.js +493 -248
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Fragment as e, Transition as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, mergeProps as c, normalizeClass as l, openBlock as u, renderList as d, renderSlot as f, resolveComponent as p, toDisplayString as m, useId as h, vModelText as g, vShow as _, withCtx as v, withDirectives as y, withKeys as ee, withModifiers as b } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import te from "imask";
|
|
3
3
|
//#region src/i18n.js
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
4
|
+
var x = ["ru", "en"];
|
|
5
|
+
function S(e) {
|
|
6
|
+
return x.includes(e);
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var ne = {
|
|
9
9
|
ru: {
|
|
10
10
|
cancel: "Отмена",
|
|
11
11
|
download: "Скачать",
|
|
@@ -102,26 +102,26 @@ var w = {
|
|
|
102
102
|
back: "Back",
|
|
103
103
|
close: "Close"
|
|
104
104
|
}
|
|
105
|
-
},
|
|
105
|
+
}, C = Symbol("dashboardUi"), re = Object.freeze({
|
|
106
106
|
lang: "ru",
|
|
107
107
|
navigate: null
|
|
108
|
-
}),
|
|
109
|
-
from:
|
|
110
|
-
default: () =>
|
|
111
|
-
} },
|
|
108
|
+
}), w = { uiSettings: {
|
|
109
|
+
from: C,
|
|
110
|
+
default: () => re
|
|
111
|
+
} }, ie = { install(e, t) {
|
|
112
112
|
let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
|
|
113
|
-
if (!
|
|
113
|
+
if (!S(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${x.join(", ")}`);
|
|
114
114
|
let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
|
|
115
115
|
if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
|
|
116
|
-
e.provide(
|
|
116
|
+
e.provide(C, Object.freeze({
|
|
117
117
|
lang: r,
|
|
118
118
|
navigate: a
|
|
119
119
|
}));
|
|
120
|
-
} },
|
|
120
|
+
} }, T = (e, t) => {
|
|
121
121
|
let n = e.__vccOpts || e;
|
|
122
122
|
for (let [e, r] of t) n[e] = r;
|
|
123
123
|
return n;
|
|
124
|
-
},
|
|
124
|
+
}, ae = {
|
|
125
125
|
props: {
|
|
126
126
|
isOpen: {
|
|
127
127
|
type: Boolean,
|
|
@@ -148,7 +148,7 @@ var w = {
|
|
|
148
148
|
document.removeEventListener("keydown", this.handleEscape);
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function E(e, t, n, r, a, o) {
|
|
152
152
|
return y((u(), i("button", {
|
|
153
153
|
tabindex: "-1",
|
|
154
154
|
onClick: t[0] ||= b((...e) => o.closeOverlay && o.closeOverlay(...e), ["prevent"]),
|
|
@@ -161,8 +161,8 @@ function A(e, t, n, r, a, o) {
|
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region src/components/Popup.vue
|
|
164
|
-
var
|
|
165
|
-
components: { Overlay: /* @__PURE__ */
|
|
164
|
+
var oe = {
|
|
165
|
+
components: { Overlay: /* @__PURE__ */ T(ae, [["render", E]]) },
|
|
166
166
|
inheritAttrs: !1,
|
|
167
167
|
emits: ["update:modelValue"],
|
|
168
168
|
props: {
|
|
@@ -195,10 +195,10 @@ var ne = {
|
|
|
195
195
|
return this.align === "right";
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
},
|
|
199
|
-
function
|
|
198
|
+
}, se = { class: "bb-dashboard-ui bb:relative" };
|
|
199
|
+
function ce(e, n, r, o, l, d) {
|
|
200
200
|
let m = p("overlay");
|
|
201
|
-
return u(), i("div",
|
|
201
|
+
return u(), i("div", se, [s(m, {
|
|
202
202
|
"is-open": l.overlayIsOpen,
|
|
203
203
|
"onUpdate:isOpen": n[0] ||= (e) => l.overlayIsOpen = e
|
|
204
204
|
}, null, 8, ["is-open"]), s(t, {
|
|
@@ -216,7 +216,7 @@ function ie(e, n, r, o, l, d) {
|
|
|
216
216
|
_: 3
|
|
217
217
|
})]);
|
|
218
218
|
}
|
|
219
|
-
var
|
|
219
|
+
var D = /*#__PURE__*/ T(oe, [["render", ce]]), le = {
|
|
220
220
|
props: {
|
|
221
221
|
withPulse: {
|
|
222
222
|
type: Boolean,
|
|
@@ -237,7 +237,7 @@ var j = /*#__PURE__*/ O(ne, [["render", ie]]), ae = {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
};
|
|
240
|
-
function
|
|
240
|
+
function ue(e, t, n, r, o, s) {
|
|
241
241
|
return u(), i("div", { class: l(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", {
|
|
242
242
|
"bb:text-red-500": s.isRed,
|
|
243
243
|
"bb:text-green-500": s.isGreen,
|
|
@@ -251,13 +251,13 @@ function oe(e, t, n, r, o, s) {
|
|
|
251
251
|
r: "45"
|
|
252
252
|
})], -1)]], 2);
|
|
253
253
|
}
|
|
254
|
-
var
|
|
254
|
+
var O = /*#__PURE__*/ T(le, [["render", ue]]), de = {}, fe = {
|
|
255
255
|
type: "button",
|
|
256
256
|
tabindex: "-1",
|
|
257
257
|
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"
|
|
258
258
|
};
|
|
259
|
-
function
|
|
260
|
-
return u(), i("button",
|
|
259
|
+
function pe(e, t, n, r, o, s) {
|
|
260
|
+
return u(), i("button", fe, [...t[0] ||= [a("svg", {
|
|
261
261
|
class: "bb:w-6 bb:h-6 bb:stroke-current",
|
|
262
262
|
fill: "none",
|
|
263
263
|
viewBox: "0 0 24 24"
|
|
@@ -268,13 +268,13 @@ function le(e, t, n, r, o, s) {
|
|
|
268
268
|
d: "M6 18L18 6M6 6l12 12"
|
|
269
269
|
})], -1)]]);
|
|
270
270
|
}
|
|
271
|
-
var
|
|
271
|
+
var k = /*#__PURE__*/ T(de, [["render", pe]]);
|
|
272
272
|
//#endregion
|
|
273
273
|
//#region src/date.js
|
|
274
|
-
function
|
|
274
|
+
function A(e) {
|
|
275
275
|
return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function j(e) {
|
|
278
278
|
let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
|
|
279
279
|
if (t === null) return null;
|
|
280
280
|
let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
|
|
@@ -282,27 +282,27 @@ function F(e) {
|
|
|
282
282
|
}
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region src/lang.js
|
|
285
|
-
var
|
|
286
|
-
inject:
|
|
285
|
+
var M = {
|
|
286
|
+
inject: w,
|
|
287
287
|
props: { lang: {
|
|
288
288
|
type: String,
|
|
289
289
|
default: null,
|
|
290
|
-
validator: (e) => e === null ||
|
|
290
|
+
validator: (e) => e === null || S(e)
|
|
291
291
|
} },
|
|
292
292
|
computed: {
|
|
293
293
|
resolvedLang() {
|
|
294
|
-
return
|
|
294
|
+
return S(this.lang) ? this.lang : this.uiSettings.lang;
|
|
295
295
|
},
|
|
296
296
|
texts() {
|
|
297
|
-
return
|
|
297
|
+
return ne[this.resolvedLang];
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
},
|
|
300
|
+
}, me = {
|
|
301
301
|
components: {
|
|
302
|
-
Popup:
|
|
303
|
-
Eraser:
|
|
302
|
+
Popup: D,
|
|
303
|
+
Eraser: k
|
|
304
304
|
},
|
|
305
|
-
mixins: [
|
|
305
|
+
mixins: [M],
|
|
306
306
|
emits: ["update:modelValue", "changed"],
|
|
307
307
|
props: {
|
|
308
308
|
modelValue: {
|
|
@@ -329,8 +329,8 @@ var I = {
|
|
|
329
329
|
keyboardInput: !1,
|
|
330
330
|
bound: !1,
|
|
331
331
|
firstDay: 1,
|
|
332
|
-
parse: (e) =>
|
|
333
|
-
toString: (e) =>
|
|
332
|
+
parse: (e) => j(e),
|
|
333
|
+
toString: (e) => A(e),
|
|
334
334
|
i18n: {
|
|
335
335
|
previousMonth: this.texts.previousMonth,
|
|
336
336
|
nextMonth: this.texts.nextMonth,
|
|
@@ -339,7 +339,7 @@ var I = {
|
|
|
339
339
|
weekdaysShort: this.texts.weekdaysShort
|
|
340
340
|
},
|
|
341
341
|
onSelect: (e) => {
|
|
342
|
-
this.popupIsOpen = !1, this.$emit("update:modelValue",
|
|
342
|
+
this.popupIsOpen = !1, this.$emit("update:modelValue", A(e)), this.$emit("changed");
|
|
343
343
|
}
|
|
344
344
|
}));
|
|
345
345
|
},
|
|
@@ -359,7 +359,7 @@ var I = {
|
|
|
359
359
|
methods: {
|
|
360
360
|
syncPicker(e) {
|
|
361
361
|
if (this.picker === null) return;
|
|
362
|
-
let t =
|
|
362
|
+
let t = j(e);
|
|
363
363
|
if (t === null) {
|
|
364
364
|
this.picker.clear();
|
|
365
365
|
return;
|
|
@@ -378,29 +378,29 @@ var I = {
|
|
|
378
378
|
return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
},
|
|
381
|
+
}, he = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, N = { class: "bb:relative bb:flex bb:h-full bb:cursor-pointer bb:leading-none" }, P = { class: "bb:min-w-24 bb:w-full bb:h-full" }, F = [
|
|
382
382
|
"disabled",
|
|
383
383
|
"value",
|
|
384
384
|
"placeholder"
|
|
385
|
-
],
|
|
385
|
+
], I = {
|
|
386
386
|
ref: "container",
|
|
387
387
|
class: "bb:flex bb:mt-1 bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg"
|
|
388
388
|
};
|
|
389
|
-
function
|
|
389
|
+
function L(e, t, o, c, d, f) {
|
|
390
390
|
let m = p("eraser"), h = p("popup");
|
|
391
|
-
return u(), i("div",
|
|
391
|
+
return u(), i("div", he, [a("div", N, [a("button", {
|
|
392
392
|
ref: "trigger",
|
|
393
393
|
type: "button",
|
|
394
394
|
class: l(["bb:flex bb:w-full bb:items-center bb:focus:outline-hidden", { "bb:z-20": d.popupIsOpen }]),
|
|
395
395
|
onClick: t[0] ||= (e) => d.popupIsOpen = !d.popupIsOpen
|
|
396
|
-
}, [a("label",
|
|
396
|
+
}, [a("label", P, [a("input", {
|
|
397
397
|
disabled: d.popupIsOpen,
|
|
398
398
|
ref: "field",
|
|
399
399
|
type: "text",
|
|
400
400
|
value: d.dayValue,
|
|
401
401
|
placeholder: o.placeholderText,
|
|
402
402
|
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"
|
|
403
|
-
}, null, 8,
|
|
403
|
+
}, null, 8, F)])], 2), f.needsEraser ? (u(), n(m, {
|
|
404
404
|
key: 0,
|
|
405
405
|
onClick: f.clearPicker,
|
|
406
406
|
class: "bb:z-10 bb:h-full bb:pr-2"
|
|
@@ -408,12 +408,12 @@ function U(e, t, o, c, d, f) {
|
|
|
408
408
|
modelValue: d.popupIsOpen,
|
|
409
409
|
"onUpdate:modelValue": t[1] ||= (e) => d.popupIsOpen = e
|
|
410
410
|
}, {
|
|
411
|
-
default: v(() => [a("div",
|
|
411
|
+
default: v(() => [a("div", I, null, 512)]),
|
|
412
412
|
_: 1
|
|
413
413
|
}, 8, ["modelValue"])]);
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
components: { Dot:
|
|
415
|
+
var R = /*#__PURE__*/ T(me, [["render", L]]), ge = {
|
|
416
|
+
components: { Dot: O },
|
|
417
417
|
props: {
|
|
418
418
|
text: {
|
|
419
419
|
type: String,
|
|
@@ -428,14 +428,14 @@ var W = /*#__PURE__*/ O(L, [["render", U]]), ue = {
|
|
|
428
428
|
default: !1
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
},
|
|
432
|
-
function
|
|
431
|
+
}, _e = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, ve = ["textContent"];
|
|
432
|
+
function ye(e, t, n, r, o, c) {
|
|
433
433
|
let l = p("dot");
|
|
434
|
-
return u(), i("div",
|
|
434
|
+
return u(), i("div", _e, [
|
|
435
435
|
a("div", {
|
|
436
436
|
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",
|
|
437
437
|
textContent: m(n.text)
|
|
438
|
-
}, null, 8,
|
|
438
|
+
}, null, 8, ve),
|
|
439
439
|
y(s(l, {
|
|
440
440
|
color: "red",
|
|
441
441
|
"with-pulse": !0,
|
|
@@ -447,24 +447,24 @@ function pe(e, t, n, r, o, c) {
|
|
|
447
447
|
}, null, 512), [[_, n.isRequired]])
|
|
448
448
|
]);
|
|
449
449
|
}
|
|
450
|
-
var
|
|
451
|
-
function
|
|
450
|
+
var z = /*#__PURE__*/ T(ge, [["render", ye]]), be = 10;
|
|
451
|
+
function xe(e) {
|
|
452
452
|
let t = e.replace(/\D/g, "");
|
|
453
|
-
return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0,
|
|
453
|
+
return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, be);
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function B(e) {
|
|
456
456
|
return e === "" ? "" : `7${e}`;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function V(e) {
|
|
459
459
|
let t = e ?? "", n = t.startsWith("+") ? t.slice(1) : t;
|
|
460
460
|
return n.startsWith("7") ? n.slice(1) : n;
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/components/RussianMobileFilter.vue
|
|
464
|
-
var
|
|
464
|
+
var Se = 400, Ce = 3, we = {
|
|
465
465
|
components: {
|
|
466
|
-
ElementHeader:
|
|
467
|
-
Eraser:
|
|
466
|
+
ElementHeader: z,
|
|
467
|
+
Eraser: k
|
|
468
468
|
},
|
|
469
469
|
emits: ["update:modelValue", "changed"],
|
|
470
470
|
props: {
|
|
@@ -486,32 +486,32 @@ var ge = 400, _e = 3, ve = {
|
|
|
486
486
|
}
|
|
487
487
|
},
|
|
488
488
|
data() {
|
|
489
|
-
return { digits:
|
|
489
|
+
return { digits: V(this.modelValue) };
|
|
490
490
|
},
|
|
491
491
|
created() {
|
|
492
|
-
this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted =
|
|
492
|
+
this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = V(this.modelValue), this.isUnmounted = !1;
|
|
493
493
|
},
|
|
494
494
|
mounted() {
|
|
495
|
-
this.mask =
|
|
495
|
+
this.mask = te(this.$refs.input, {
|
|
496
496
|
mask: "+7 (000) 000 00 00",
|
|
497
497
|
lazy: !0,
|
|
498
498
|
prepare: (e, t) => t.unmaskedValue === "" && (e === "7" || e === "8") ? "" : e
|
|
499
499
|
}), this.mask.on("accept", () => {
|
|
500
|
-
this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue",
|
|
500
|
+
this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", B(this.digits)), this.scheduleCommit());
|
|
501
501
|
}), this.syncFromModelValue(this.modelValue);
|
|
502
502
|
},
|
|
503
503
|
beforeUnmount() {
|
|
504
|
-
clearTimeout(this.debounceTimer), this.mask?.destroy();
|
|
504
|
+
this.isUnmounted = !0, clearTimeout(this.debounceTimer), this.mask?.destroy();
|
|
505
505
|
},
|
|
506
506
|
watch: { modelValue(e) {
|
|
507
|
-
e !==
|
|
507
|
+
e !== B(this.digits) && this.syncFromModelValue(e);
|
|
508
508
|
} },
|
|
509
509
|
methods: {
|
|
510
510
|
syncFromModelValue(e) {
|
|
511
|
-
this.writeToMask(
|
|
511
|
+
this.writeToMask(V(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
|
|
512
512
|
},
|
|
513
513
|
applyUserDigits(e) {
|
|
514
|
-
this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue",
|
|
514
|
+
this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", B(this.digits));
|
|
515
515
|
},
|
|
516
516
|
writeToMask(e) {
|
|
517
517
|
if (this.isWritingProgrammatically = !0, e === "") this.mask.value = "";
|
|
@@ -531,10 +531,10 @@ var ge = 400, _e = 3, ve = {
|
|
|
531
531
|
});
|
|
532
532
|
},
|
|
533
533
|
onBlur() {
|
|
534
|
-
this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit();
|
|
534
|
+
this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
|
|
535
535
|
},
|
|
536
536
|
onPaste(e) {
|
|
537
|
-
this.applyUserDigits(
|
|
537
|
+
this.applyUserDigits(xe(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
|
|
538
538
|
},
|
|
539
539
|
clear() {
|
|
540
540
|
this.applyUserDigits(""), this.commit();
|
|
@@ -544,16 +544,16 @@ var ge = 400, _e = 3, ve = {
|
|
|
544
544
|
this.commit();
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
this.digits.length <
|
|
547
|
+
this.digits.length < Ce || (this.debounceTimer = setTimeout(() => this.commit(), Se));
|
|
548
548
|
},
|
|
549
549
|
commit() {
|
|
550
550
|
clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
},
|
|
554
|
-
function
|
|
553
|
+
}, Te = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ee = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, De = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Oe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
554
|
+
function ke(e, t, n, r, o, c) {
|
|
555
555
|
let l = p("element-header"), d = p("eraser");
|
|
556
|
-
return u(), i("div",
|
|
556
|
+
return u(), i("div", Te, [a("div", Ee, [s(l, {
|
|
557
557
|
text: n.header,
|
|
558
558
|
"is-required": n.isRequired,
|
|
559
559
|
"is-loading": n.isLoading
|
|
@@ -561,7 +561,7 @@ function Ce(e, t, n, r, o, c) {
|
|
|
561
561
|
"text",
|
|
562
562
|
"is-required",
|
|
563
563
|
"is-loading"
|
|
564
|
-
]), a("div",
|
|
564
|
+
]), a("div", De, [a("label", Oe, [a("input", {
|
|
565
565
|
ref: "input",
|
|
566
566
|
type: "tel",
|
|
567
567
|
inputmode: "tel",
|
|
@@ -577,10 +577,10 @@ function Ce(e, t, n, r, o, c) {
|
|
|
577
577
|
class: "bb:pr-2 bb:h-full"
|
|
578
578
|
}, null, 8, ["onClick"]), [[_, o.digits.length > 0]])])])])]);
|
|
579
579
|
}
|
|
580
|
-
var
|
|
580
|
+
var Ae = /*#__PURE__*/ T(we, [["render", ke]]), je = {
|
|
581
581
|
components: {
|
|
582
|
-
ElementHeader:
|
|
583
|
-
Eraser:
|
|
582
|
+
ElementHeader: z,
|
|
583
|
+
Eraser: k
|
|
584
584
|
},
|
|
585
585
|
emits: ["update:modelValue", "changed"],
|
|
586
586
|
props: {
|
|
@@ -618,10 +618,10 @@ var we = /*#__PURE__*/ O(ve, [["render", Ce]]), Te = {
|
|
|
618
618
|
this.$emit("update:modelValue", this.search), this.$emit("changed");
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
},
|
|
622
|
-
function
|
|
621
|
+
}, Me = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ne = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Pe = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Fe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
622
|
+
function Ie(e, t, n, r, o, c) {
|
|
623
623
|
let l = p("element-header"), d = p("eraser");
|
|
624
|
-
return u(), i("div",
|
|
624
|
+
return u(), i("div", Me, [a("div", Ne, [s(l, {
|
|
625
625
|
text: n.header,
|
|
626
626
|
"is-required": n.isRequired,
|
|
627
627
|
"is-loading": n.isLoading
|
|
@@ -629,7 +629,7 @@ function Ae(e, t, n, r, o, c) {
|
|
|
629
629
|
"text",
|
|
630
630
|
"is-required",
|
|
631
631
|
"is-loading"
|
|
632
|
-
]), a("div",
|
|
632
|
+
]), a("div", Pe, [a("label", Fe, [y(a("input", {
|
|
633
633
|
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",
|
|
634
634
|
"onUpdate:modelValue": t[0] ||= (e) => o.search = e,
|
|
635
635
|
onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
|
|
@@ -643,12 +643,12 @@ function Ae(e, t, n, r, o, c) {
|
|
|
643
643
|
class: "bb:pr-2 bb:h-full"
|
|
644
644
|
}, null, 8, ["onClick"]), [[_, c.inputNeedsEraser]])])])])]);
|
|
645
645
|
}
|
|
646
|
-
var
|
|
646
|
+
var Le = /*#__PURE__*/ T(je, [["render", Ie]]), Re = {
|
|
647
647
|
components: {
|
|
648
|
-
ElementHeader:
|
|
649
|
-
PickDay:
|
|
648
|
+
ElementHeader: z,
|
|
649
|
+
PickDay: R
|
|
650
650
|
},
|
|
651
|
-
mixins: [
|
|
651
|
+
mixins: [M],
|
|
652
652
|
emits: [
|
|
653
653
|
"update:dateFrom",
|
|
654
654
|
"update:dateTo",
|
|
@@ -696,10 +696,10 @@ var je = /*#__PURE__*/ O(Te, [["render", Ae]]), Me = {
|
|
|
696
696
|
this.$emit("update:dateTo", e), this.dateTo !== e && this.$emit("changed");
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
},
|
|
700
|
-
function
|
|
699
|
+
}, ze = { class: "bb-dashboard-ui bb:flex" }, Be = { class: "bb:flex bb:border bb:border-white" }, Ve = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, He = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
|
|
700
|
+
function Ue(e, t, n, r, o, c) {
|
|
701
701
|
let l = p("element-header"), d = p("pick-day");
|
|
702
|
-
return u(), i("div",
|
|
702
|
+
return u(), i("div", ze, [a("div", Be, [a("div", Ve, [s(l, {
|
|
703
703
|
text: n.header,
|
|
704
704
|
"is-required": n.isRequired,
|
|
705
705
|
"is-loading": n.isLoading
|
|
@@ -707,7 +707,7 @@ function Le(e, t, n, r, o, c) {
|
|
|
707
707
|
"text",
|
|
708
708
|
"is-required",
|
|
709
709
|
"is-loading"
|
|
710
|
-
]), a("div",
|
|
710
|
+
]), a("div", He, [s(d, {
|
|
711
711
|
modelValue: o.userDateFrom,
|
|
712
712
|
"onUpdate:modelValue": t[0] ||= (e) => o.userDateFrom = e,
|
|
713
713
|
class: "bb:flex-1 bb:min-w-36 bb:pl-3",
|
|
@@ -729,10 +729,10 @@ function Le(e, t, n, r, o, c) {
|
|
|
729
729
|
"lang"
|
|
730
730
|
])])])])]);
|
|
731
731
|
}
|
|
732
|
-
var
|
|
732
|
+
var We = /*#__PURE__*/ T(Re, [["render", Ue]]), Ge = {
|
|
733
733
|
components: {
|
|
734
|
-
Popup:
|
|
735
|
-
Eraser:
|
|
734
|
+
Popup: D,
|
|
735
|
+
Eraser: k
|
|
736
736
|
},
|
|
737
737
|
emits: ["update:isOpen", "erased"],
|
|
738
738
|
props: {
|
|
@@ -763,17 +763,17 @@ var Re = /*#__PURE__*/ O(Me, [["render", Le]]), ze = {
|
|
|
763
763
|
computed: { needsEraser() {
|
|
764
764
|
return !this.isOpen && this.hasValue;
|
|
765
765
|
} }
|
|
766
|
-
},
|
|
767
|
-
function
|
|
766
|
+
}, Ke = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, qe = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, Je = ["textContent"];
|
|
767
|
+
function Ye(e, t, o, c, d, h) {
|
|
768
768
|
let g = p("eraser"), _ = p("popup");
|
|
769
|
-
return u(), i("div",
|
|
769
|
+
return u(), i("div", Ke, [a("div", qe, [a("button", {
|
|
770
770
|
type: "button",
|
|
771
771
|
class: l(["bb:flex bb:w-full bb:h-full bb:items-center bb:focus:outline-hidden bb:cursor-pointer", { "bb:z-20": o.isOpen }]),
|
|
772
772
|
onClick: t[0] ||= b((t) => e.$emit("update:isOpen", !o.isOpen), ["prevent"])
|
|
773
773
|
}, [a("span", {
|
|
774
774
|
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",
|
|
775
775
|
textContent: m(o.title)
|
|
776
|
-
}, null, 8,
|
|
776
|
+
}, null, 8, Je)], 2), h.needsEraser ? (u(), n(g, {
|
|
777
777
|
key: 0,
|
|
778
778
|
onClick: t[1] ||= (t) => e.$emit("erased"),
|
|
779
779
|
class: "bb:pr-2 bb:h-full"
|
|
@@ -785,7 +785,7 @@ function Ue(e, t, o, c, d, h) {
|
|
|
785
785
|
_: 3
|
|
786
786
|
}, 8, ["modelValue"])]);
|
|
787
787
|
}
|
|
788
|
-
var
|
|
788
|
+
var Xe = /*#__PURE__*/ T(Ge, [["render", Ye]]), Ze = {
|
|
789
789
|
props: {
|
|
790
790
|
isChecked: {
|
|
791
791
|
type: Boolean,
|
|
@@ -797,31 +797,31 @@ var We = /*#__PURE__*/ O(ze, [["render", Ue]]), Ge = {
|
|
|
797
797
|
methods: { toggle() {
|
|
798
798
|
this.$emit("clicked");
|
|
799
799
|
} }
|
|
800
|
-
},
|
|
800
|
+
}, Qe = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, $e = {
|
|
801
801
|
class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
|
|
802
802
|
viewBox: "0 0 20 20"
|
|
803
|
-
},
|
|
804
|
-
function
|
|
803
|
+
}, et = ["textContent"];
|
|
804
|
+
function tt(e, t, n, r, o, s) {
|
|
805
805
|
return u(), i("button", {
|
|
806
806
|
type: "button",
|
|
807
807
|
onClick: t[0] ||= b((...e) => s.toggle && s.toggle(...e), ["prevent"]),
|
|
808
808
|
class: "bb:flex bb:w-full bb:bg-white bb:hover:bg-indigo-100 bb:cursor-pointer bb:focus:outline-hidden bb:focus:ring-3 bb:focus:z-10 bb:focus:ring-blue-500/50"
|
|
809
|
-
}, [a("span",
|
|
809
|
+
}, [a("span", Qe, [y((u(), i("svg", $e, [...t[1] ||= [a("path", {
|
|
810
810
|
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",
|
|
811
811
|
"clip-rule": "evenodd",
|
|
812
812
|
"fill-rule": "evenodd"
|
|
813
813
|
}, null, -1)]], 512)), [[_, n.isChecked]])]), a("span", {
|
|
814
814
|
class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none",
|
|
815
815
|
textContent: m(n.name)
|
|
816
|
-
}, null, 8,
|
|
816
|
+
}, null, 8, et)]);
|
|
817
817
|
}
|
|
818
818
|
//#endregion
|
|
819
819
|
//#region src/components/SelectSingle.vue
|
|
820
|
-
var
|
|
820
|
+
var nt = {
|
|
821
821
|
components: {
|
|
822
|
-
ElementHeader:
|
|
823
|
-
DropdownButton:
|
|
824
|
-
ListElement: /* @__PURE__ */
|
|
822
|
+
ElementHeader: z,
|
|
823
|
+
DropdownButton: Xe,
|
|
824
|
+
ListElement: /* @__PURE__ */ T(Ze, [["render", tt]])
|
|
825
825
|
},
|
|
826
826
|
emits: ["update:modelValue", "changed"],
|
|
827
827
|
props: {
|
|
@@ -874,10 +874,10 @@ var Xe = {
|
|
|
874
874
|
this.$emit("update:modelValue", null), this.$emit("changed");
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
|
-
},
|
|
878
|
-
function
|
|
877
|
+
}, rt = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, it = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, at = { 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" };
|
|
878
|
+
function ot(t, o, c, l, f, m) {
|
|
879
879
|
let h = p("element-header"), g = p("list-element"), _ = p("dropdown-button");
|
|
880
|
-
return u(), i("div",
|
|
880
|
+
return u(), i("div", rt, [a("div", it, [s(h, {
|
|
881
881
|
text: c.header,
|
|
882
882
|
"is-required": c.isRequired,
|
|
883
883
|
"is-loading": c.isLoading
|
|
@@ -893,7 +893,7 @@ function et(t, o, c, l, f, m) {
|
|
|
893
893
|
"has-value": m.hasValue,
|
|
894
894
|
onErased: m.clear
|
|
895
895
|
}, {
|
|
896
|
-
default: v(() => [a("div",
|
|
896
|
+
default: v(() => [a("div", at, [(u(!0), i(e, null, d(m.itemList, (e) => (u(), n(g, {
|
|
897
897
|
name: e.name,
|
|
898
898
|
key: e.id,
|
|
899
899
|
"is-checked": e.id === c.modelValue,
|
|
@@ -911,7 +911,7 @@ function et(t, o, c, l, f, m) {
|
|
|
911
911
|
"onErased"
|
|
912
912
|
])) : r("", !0)])]);
|
|
913
913
|
}
|
|
914
|
-
var
|
|
914
|
+
var st = /*#__PURE__*/ T(nt, [["render", ot]]), ct = {
|
|
915
915
|
props: {
|
|
916
916
|
text: {
|
|
917
917
|
type: String,
|
|
@@ -950,8 +950,8 @@ var tt = /*#__PURE__*/ O(Xe, [["render", et]]), nt = {
|
|
|
950
950
|
return this.color === "yellow";
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
},
|
|
954
|
-
function
|
|
953
|
+
}, lt = ["textContent"];
|
|
954
|
+
function ut(e, t, n, r, a, o) {
|
|
955
955
|
return u(), i("span", {
|
|
956
956
|
class: l(["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", {
|
|
957
957
|
"bb:bg-green-50 bb:text-gray-700": o.isGreen,
|
|
@@ -962,9 +962,9 @@ function it(e, t, n, r, a, o) {
|
|
|
962
962
|
"bb:bg-yellow-100 bb:text-yellow-800": o.isYellow
|
|
963
963
|
}]),
|
|
964
964
|
textContent: m(n.text)
|
|
965
|
-
}, null, 10,
|
|
965
|
+
}, null, 10, lt);
|
|
966
966
|
}
|
|
967
|
-
var
|
|
967
|
+
var H = /*#__PURE__*/ T(ct, [["render", ut]]), dt = {
|
|
968
968
|
props: {
|
|
969
969
|
messages: {
|
|
970
970
|
type: [Object, Array],
|
|
@@ -984,12 +984,12 @@ var at = /*#__PURE__*/ O(nt, [["render", it]]), ot = {
|
|
|
984
984
|
return this.type === "dangerous";
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
-
},
|
|
988
|
-
function
|
|
987
|
+
}, ft = { class: "bb:flex" }, pt = { class: "bb:shrink-0" }, mt = { class: "bb:ml-3" }, ht = ["textContent"];
|
|
988
|
+
function gt(t, n, o, s, c, f) {
|
|
989
989
|
return f.hasErrors ? (u(), i("div", {
|
|
990
990
|
key: 0,
|
|
991
991
|
class: l(["bb-dashboard-ui bb:border-l-4 bb:p-4", f.isDangerous ? "bb:bg-red-50 bb:border-red-400" : "bb:bg-yellow-50 bb:border-yellow-400"])
|
|
992
|
-
}, [a("div",
|
|
992
|
+
}, [a("div", ft, [a("div", pt, [(u(), i("svg", {
|
|
993
993
|
class: l(["bb:h-5 bb:w-5", f.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
|
|
994
994
|
viewBox: "0 0 20 20",
|
|
995
995
|
fill: "currentColor"
|
|
@@ -997,14 +997,14 @@ function dt(t, n, o, s, c, f) {
|
|
|
997
997
|
"fill-rule": "evenodd",
|
|
998
998
|
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",
|
|
999
999
|
"clip-rule": "evenodd"
|
|
1000
|
-
}, null, -1)]], 2))]), a("div",
|
|
1000
|
+
}, null, -1)]], 2))]), a("div", mt, [(u(!0), i(e, null, d(o.messages, (e, t) => (u(), i("p", {
|
|
1001
1001
|
class: l(["bb:text-sm bb:leading-5", f.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
|
|
1002
1002
|
key: t,
|
|
1003
1003
|
textContent: m(e)
|
|
1004
|
-
}, null, 10,
|
|
1004
|
+
}, null, 10, ht))), 128))])])], 2)) : r("", !0);
|
|
1005
1005
|
}
|
|
1006
|
-
var
|
|
1007
|
-
function
|
|
1006
|
+
var _t = /*#__PURE__*/ T(dt, [["render", gt]]), vt = { emits: ["clicked"] };
|
|
1007
|
+
function yt(e, t, n, r, o, s) {
|
|
1008
1008
|
return u(), i("button", {
|
|
1009
1009
|
type: "button",
|
|
1010
1010
|
tabindex: "-1",
|
|
@@ -1021,15 +1021,15 @@ function mt(e, t, n, r, o, s) {
|
|
|
1021
1021
|
d: "M6 18L18 6M6 6l12 12"
|
|
1022
1022
|
})], -1)]]);
|
|
1023
1023
|
}
|
|
1024
|
-
var
|
|
1024
|
+
var U = /*#__PURE__*/ T(vt, [["render", yt]]), bt = {}, xt = {
|
|
1025
1025
|
class: "bb:w-4 bb:h-4",
|
|
1026
1026
|
fill: "none",
|
|
1027
1027
|
stroke: "currentColor",
|
|
1028
1028
|
viewBox: "0 0 24 24",
|
|
1029
1029
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1030
1030
|
};
|
|
1031
|
-
function
|
|
1032
|
-
return u(), i("svg",
|
|
1031
|
+
function St(e, t, n, r, o, s) {
|
|
1032
|
+
return u(), i("svg", xt, [...t[0] ||= [a("path", {
|
|
1033
1033
|
"stroke-linecap": "round",
|
|
1034
1034
|
"stroke-linejoin": "round",
|
|
1035
1035
|
"stroke-width": "2",
|
|
@@ -1038,9 +1038,9 @@ function _t(e, t, n, r, o, s) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
//#endregion
|
|
1040
1040
|
//#region src/components/DownloadLink.vue
|
|
1041
|
-
var
|
|
1042
|
-
components: { "download-icon": /* @__PURE__ */
|
|
1043
|
-
mixins: [
|
|
1041
|
+
var Ct = {
|
|
1042
|
+
components: { "download-icon": /* @__PURE__ */ T(bt, [["render", St]]) },
|
|
1043
|
+
mixins: [M],
|
|
1044
1044
|
props: {
|
|
1045
1045
|
url: {
|
|
1046
1046
|
type: String,
|
|
@@ -1054,16 +1054,16 @@ var vt = {
|
|
|
1054
1054
|
computed: { label() {
|
|
1055
1055
|
return this.title ?? this.texts.download;
|
|
1056
1056
|
} }
|
|
1057
|
-
},
|
|
1058
|
-
function
|
|
1057
|
+
}, wt = ["href", "title"], Tt = { class: "bb:ml-1" };
|
|
1058
|
+
function Et(e, t, n, r, o, c) {
|
|
1059
1059
|
let l = p("download-icon");
|
|
1060
1060
|
return u(), i("a", {
|
|
1061
1061
|
href: n.url,
|
|
1062
1062
|
title: c.label,
|
|
1063
1063
|
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"
|
|
1064
|
-
}, [s(l), a("span",
|
|
1064
|
+
}, [s(l), a("span", Tt, m(c.label), 1)], 8, wt);
|
|
1065
1065
|
}
|
|
1066
|
-
var
|
|
1066
|
+
var Dt = /*#__PURE__*/ T(Ct, [["render", Et]]), Ot = { props: {
|
|
1067
1067
|
isOpen: {
|
|
1068
1068
|
type: Boolean,
|
|
1069
1069
|
default: !1
|
|
@@ -1072,9 +1072,9 @@ var St = /*#__PURE__*/ O(vt, [["render", xt]]), Ct = { props: {
|
|
|
1072
1072
|
type: String,
|
|
1073
1073
|
required: !0
|
|
1074
1074
|
}
|
|
1075
|
-
} },
|
|
1076
|
-
function
|
|
1077
|
-
return u(), i("div", { class: l(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div",
|
|
1075
|
+
} }, kt = { 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" }, At = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, jt = ["aria-labelledby"];
|
|
1076
|
+
function Mt(e, n, r, o, c, d) {
|
|
1077
|
+
return u(), i("div", { class: l(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", kt, [
|
|
1078
1078
|
s(t, {
|
|
1079
1079
|
"enter-active-class": "bb:ease-out bb:duration-300",
|
|
1080
1080
|
"enter-from-class": "bb:opacity-0",
|
|
@@ -1083,7 +1083,7 @@ function Dt(e, n, r, o, c, d) {
|
|
|
1083
1083
|
"leave-from-class": "bb:opacity-100",
|
|
1084
1084
|
"leave-to-class": "bb:opacity-0"
|
|
1085
1085
|
}, {
|
|
1086
|
-
default: v(() => [y(a("div",
|
|
1086
|
+
default: v(() => [y(a("div", At, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[_, r.isOpen]])]),
|
|
1087
1087
|
_: 1
|
|
1088
1088
|
}),
|
|
1089
1089
|
n[1] ||= a("span", { class: "bb:hidden bb:sm:inline-block bb:sm:align-middle bb:sm:h-screen" }, null, -1),
|
|
@@ -1100,12 +1100,12 @@ function Dt(e, n, r, o, c, d) {
|
|
|
1100
1100
|
role: "dialog",
|
|
1101
1101
|
"aria-modal": "true",
|
|
1102
1102
|
"aria-labelledby": r.headingId
|
|
1103
|
-
}, [f(e.$slots, "default")], 8,
|
|
1103
|
+
}, [f(e.$slots, "default")], 8, jt), [[_, r.isOpen]])]),
|
|
1104
1104
|
_: 3
|
|
1105
1105
|
})
|
|
1106
1106
|
])], 2);
|
|
1107
1107
|
}
|
|
1108
|
-
var
|
|
1108
|
+
var Nt = /*#__PURE__*/ T(Ot, [["render", Mt]]), Pt = {}, Ft = {
|
|
1109
1109
|
class: "bb:h-7 bb:w-7 bb:text-red-600",
|
|
1110
1110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1111
1111
|
fill: "none",
|
|
@@ -1113,35 +1113,35 @@ var Ot = /*#__PURE__*/ O(Ct, [["render", Dt]]), kt = {}, At = {
|
|
|
1113
1113
|
stroke: "currentColor",
|
|
1114
1114
|
"aria-hidden": "true"
|
|
1115
1115
|
};
|
|
1116
|
-
function
|
|
1117
|
-
return u(), i("svg",
|
|
1116
|
+
function It(e, t, n, r, o, s) {
|
|
1117
|
+
return u(), i("svg", Ft, [...t[0] ||= [a("path", {
|
|
1118
1118
|
"stroke-linecap": "round",
|
|
1119
1119
|
"stroke-linejoin": "round",
|
|
1120
1120
|
"stroke-width": "2",
|
|
1121
1121
|
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"
|
|
1122
1122
|
}, null, -1)]]);
|
|
1123
1123
|
}
|
|
1124
|
-
var
|
|
1124
|
+
var W = /*#__PURE__*/ T(Pt, [["render", It]]), Lt = {}, Rt = {
|
|
1125
1125
|
class: "bb:h-7 bb:w-7 bb:text-yellow-400",
|
|
1126
1126
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1127
1127
|
viewBox: "0 0 20 20",
|
|
1128
1128
|
fill: "currentColor",
|
|
1129
1129
|
"aria-hidden": "true"
|
|
1130
1130
|
};
|
|
1131
|
-
function
|
|
1132
|
-
return u(), i("svg",
|
|
1131
|
+
function zt(e, t, n, r, o, s) {
|
|
1132
|
+
return u(), i("svg", Rt, [...t[0] ||= [a("path", {
|
|
1133
1133
|
"fill-rule": "evenodd",
|
|
1134
1134
|
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",
|
|
1135
1135
|
"clip-rule": "evenodd"
|
|
1136
1136
|
}, null, -1)]]);
|
|
1137
1137
|
}
|
|
1138
|
-
var
|
|
1138
|
+
var G = /*#__PURE__*/ T(Lt, [["render", zt]]), Bt = {
|
|
1139
1139
|
components: {
|
|
1140
|
-
Modal:
|
|
1141
|
-
Dangerous:
|
|
1142
|
-
Warning:
|
|
1140
|
+
Modal: Nt,
|
|
1141
|
+
Dangerous: W,
|
|
1142
|
+
Warning: G
|
|
1143
1143
|
},
|
|
1144
|
-
mixins: [
|
|
1144
|
+
mixins: [M],
|
|
1145
1145
|
emits: ["actionConfirmed", "actionCanceled"],
|
|
1146
1146
|
props: {
|
|
1147
1147
|
isOpen: {
|
|
@@ -1181,20 +1181,20 @@ var X = /*#__PURE__*/ O(Mt, [["render", Pt]]), Ft = {
|
|
|
1181
1181
|
return this.type === "warning";
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
},
|
|
1185
|
-
function
|
|
1184
|
+
}, Vt = { 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" }, Ht = { class: "bb:sm:flex bb:sm:items-start" }, Ut = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, Wt = ["id"], Gt = { class: "bb:mt-2" }, Kt = { class: "bb:text-sm bb:text-gray-500" }, qt = { 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" };
|
|
1185
|
+
function Jt(e, t, i, o, s, c) {
|
|
1186
1186
|
let d = p("warning"), f = p("dangerous"), h = p("modal");
|
|
1187
1187
|
return u(), n(h, {
|
|
1188
1188
|
"is-open": i.isOpen,
|
|
1189
1189
|
"heading-id": o.headingId
|
|
1190
1190
|
}, {
|
|
1191
|
-
default: v(() => [a("div",
|
|
1191
|
+
default: v(() => [a("div", Vt, [a("div", Ht, [a("div", { class: l(["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", {
|
|
1192
1192
|
"bb:bg-red-100": c.isDangerous,
|
|
1193
1193
|
"bb:bg-yellow-100": c.isWarning
|
|
1194
|
-
}]) }, [c.isWarning ? (u(), n(d, { key: 0 })) : r("", !0), c.isDangerous ? (u(), n(f, { key: 1 })) : r("", !0)], 2), a("div",
|
|
1194
|
+
}]) }, [c.isWarning ? (u(), n(d, { key: 0 })) : r("", !0), c.isDangerous ? (u(), n(f, { key: 1 })) : r("", !0)], 2), a("div", Ut, [a("h3", {
|
|
1195
1195
|
class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
|
|
1196
1196
|
id: o.headingId
|
|
1197
|
-
}, m(i.confirmationHeading), 9,
|
|
1197
|
+
}, m(i.confirmationHeading), 9, Wt), a("div", Gt, [a("p", Kt, m(i.confirmationText), 1)])])])]), a("div", qt, [a("button", {
|
|
1198
1198
|
type: "button",
|
|
1199
1199
|
class: l(["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", {
|
|
1200
1200
|
"bb:bg-red-600 bb:hover:bg-red-700 bb:focus:ring-red-500": c.isDangerous,
|
|
@@ -1209,41 +1209,102 @@ function Ut(e, t, i, o, s, c) {
|
|
|
1209
1209
|
_: 1
|
|
1210
1210
|
}, 8, ["is-open", "heading-id"]);
|
|
1211
1211
|
}
|
|
1212
|
-
var
|
|
1213
|
-
|
|
1214
|
-
|
|
1212
|
+
var Yt = /*#__PURE__*/ T(Bt, [["render", Jt]]), K = 4, q = 8;
|
|
1213
|
+
function J(e) {
|
|
1214
|
+
return typeof e?.showPopover == "function";
|
|
1215
|
+
}
|
|
1216
|
+
function Y(e) {
|
|
1217
|
+
return J(e) && e.matches(":popover-open");
|
|
1218
|
+
}
|
|
1219
|
+
function Xt(e, t, { maxWidth: n = null } = {}) {
|
|
1220
|
+
let r = e.getBoundingClientRect(), i = document.documentElement.clientWidth, a = document.documentElement.clientHeight, o = Math.max(q, i - r.right), s = Math.max(0, i - o - q), c = Math.max(0, a - r.bottom - K - q), l = Math.max(0, r.top - K - q), u = c >= l;
|
|
1221
|
+
Object.assign(t.style, {
|
|
1222
|
+
top: u ? `${r.bottom + K}px` : "auto",
|
|
1223
|
+
bottom: u ? "auto" : `${a - r.top + K}px`,
|
|
1224
|
+
right: `${o}px`,
|
|
1225
|
+
left: "auto",
|
|
1226
|
+
maxHeight: `${u ? c : l}px`
|
|
1227
|
+
}), n !== null && (t.style.maxWidth = `${Math.min(n, s)}px`);
|
|
1228
|
+
}
|
|
1229
|
+
function Zt(e, t) {
|
|
1230
|
+
let n = (n) => {
|
|
1231
|
+
e.contains(n.target) || t();
|
|
1232
|
+
};
|
|
1233
|
+
return window.addEventListener("scroll", n, {
|
|
1234
|
+
capture: !0,
|
|
1235
|
+
passive: !0
|
|
1236
|
+
}), window.addEventListener("resize", t), () => {
|
|
1237
|
+
window.removeEventListener("scroll", n, { capture: !0 }), window.removeEventListener("resize", t);
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
//#endregion
|
|
1241
|
+
//#region src/components/DropdownButtonWithAction.vue
|
|
1242
|
+
var Qt = 224, $t = {
|
|
1243
|
+
mixins: [M],
|
|
1215
1244
|
emits: ["update:modelValue"],
|
|
1216
1245
|
props: { modelValue: {
|
|
1217
1246
|
type: Boolean,
|
|
1218
1247
|
default: !1
|
|
1219
1248
|
} },
|
|
1220
1249
|
setup() {
|
|
1221
|
-
return {
|
|
1250
|
+
return {
|
|
1251
|
+
menuButtonId: h(),
|
|
1252
|
+
menuId: h()
|
|
1253
|
+
};
|
|
1222
1254
|
},
|
|
1223
1255
|
data() {
|
|
1224
|
-
return {
|
|
1256
|
+
return { menuIsOpen: this.modelValue };
|
|
1225
1257
|
},
|
|
1226
1258
|
watch: { modelValue(e) {
|
|
1227
|
-
this.
|
|
1259
|
+
this.menuIsOpen = e, this.applyMenuState();
|
|
1228
1260
|
} },
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1261
|
+
created() {
|
|
1262
|
+
this.stopClosing = null;
|
|
1263
|
+
},
|
|
1264
|
+
mounted() {
|
|
1265
|
+
this.applyMenuState();
|
|
1266
|
+
},
|
|
1267
|
+
beforeUnmount() {
|
|
1268
|
+
this.stopListening();
|
|
1269
|
+
},
|
|
1270
|
+
methods: {
|
|
1271
|
+
applyMenuState() {
|
|
1272
|
+
let e = this.$refs.menu;
|
|
1273
|
+
J(e) && e.isConnected && (this.menuIsOpen && !Y(e) && e.showPopover(), !this.menuIsOpen && Y(e) && e.hidePopover());
|
|
1274
|
+
},
|
|
1275
|
+
close() {
|
|
1276
|
+
let e = this.$refs.menu;
|
|
1277
|
+
Y(e) && e.hidePopover();
|
|
1278
|
+
},
|
|
1279
|
+
onBeforeToggle(e) {
|
|
1280
|
+
e.newState === "open" && Xt(this.$refs.arrow, this.$refs.menu, { maxWidth: Qt });
|
|
1281
|
+
},
|
|
1282
|
+
onToggle(e) {
|
|
1283
|
+
this.stopListening();
|
|
1284
|
+
let t = this.$refs.menu;
|
|
1285
|
+
Y(t) && (this.stopClosing = Zt(t, this.close));
|
|
1286
|
+
let n = e.newState === "open";
|
|
1287
|
+
n !== this.menuIsOpen && (this.menuIsOpen = n, this.$emit("update:modelValue", n));
|
|
1288
|
+
},
|
|
1289
|
+
stopListening() {
|
|
1290
|
+
this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}, en = { class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md" }, tn = {
|
|
1233
1294
|
key: 0,
|
|
1234
1295
|
class: "bb:-ml-px bb:relative bb:block"
|
|
1235
|
-
},
|
|
1236
|
-
function
|
|
1237
|
-
|
|
1238
|
-
return u(), i("span", Kt, [a("button", {
|
|
1296
|
+
}, nn = ["id", "popovertarget"], rn = { class: "bb:sr-only" }, an = ["id", "aria-labelledby"];
|
|
1297
|
+
function on(e, t, n, o, s, c) {
|
|
1298
|
+
return u(), i("span", en, [a("button", {
|
|
1239
1299
|
type: "button",
|
|
1240
1300
|
class: l(["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": !e.$slots.actions }])
|
|
1241
|
-
}, [f(e.$slots, "button")], 2), e.$slots.actions ? (u(), i("span",
|
|
1242
|
-
|
|
1301
|
+
}, [f(e.$slots, "button")], 2), e.$slots.actions ? (u(), i("span", tn, [a("button", {
|
|
1302
|
+
ref: "arrow",
|
|
1243
1303
|
id: o.menuButtonId,
|
|
1244
1304
|
type: "button",
|
|
1305
|
+
popovertarget: o.menuId,
|
|
1245
1306
|
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"
|
|
1246
|
-
}, [a("span",
|
|
1307
|
+
}, [a("span", rn, m(e.texts.openMenu), 1), t[3] ||= a("svg", {
|
|
1247
1308
|
class: "bb:h-5 bb:w-5",
|
|
1248
1309
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1249
1310
|
viewBox: "0 0 20 20",
|
|
@@ -1253,72 +1314,70 @@ function Zt(e, t, n, o, c, d) {
|
|
|
1253
1314
|
"fill-rule": "evenodd",
|
|
1254
1315
|
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",
|
|
1255
1316
|
"clip-rule": "evenodd"
|
|
1256
|
-
})], -1)], 8,
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
_: 3
|
|
1269
|
-
}, 8, ["model-value", "onUpdate:modelValue"])])) : r("", !0)]);
|
|
1317
|
+
})], -1)], 8, nn), a("div", {
|
|
1318
|
+
ref: "menu",
|
|
1319
|
+
id: o.menuId,
|
|
1320
|
+
popover: "auto",
|
|
1321
|
+
class: "bb:m-0 bb:inset-auto bb:w-56 bb:rounded-md bb:shadow-lg bb:bg-white bb:text-inherit bb:ring-1 bb:ring-black/5",
|
|
1322
|
+
role: "menu",
|
|
1323
|
+
"aria-orientation": "vertical",
|
|
1324
|
+
"aria-labelledby": o.menuButtonId,
|
|
1325
|
+
onBeforetoggle: t[0] ||= (...e) => c.onBeforeToggle && c.onBeforeToggle(...e),
|
|
1326
|
+
onToggle: t[1] ||= (...e) => c.onToggle && c.onToggle(...e),
|
|
1327
|
+
onClick: t[2] ||= (...e) => c.close && c.close(...e)
|
|
1328
|
+
}, [f(e.$slots, "actions")], 40, an)])) : r("", !0)]);
|
|
1270
1329
|
}
|
|
1271
|
-
var
|
|
1330
|
+
var sn = /*#__PURE__*/ T($t, [["render", on]]), cn = {}, ln = {
|
|
1272
1331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1273
1332
|
viewBox: "0 0 20 20",
|
|
1274
1333
|
fill: "currentColor",
|
|
1275
1334
|
"aria-hidden": "true"
|
|
1276
1335
|
};
|
|
1277
|
-
function
|
|
1278
|
-
return u(), i("svg",
|
|
1336
|
+
function un(e, t, n, r, o, s) {
|
|
1337
|
+
return u(), i("svg", ln, [...t[0] ||= [a("path", {
|
|
1279
1338
|
"fill-rule": "evenodd",
|
|
1280
1339
|
"clip-rule": "evenodd",
|
|
1281
1340
|
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"
|
|
1282
1341
|
}, null, -1)]]);
|
|
1283
1342
|
}
|
|
1284
|
-
var
|
|
1343
|
+
var dn = /*#__PURE__*/ T(cn, [["render", un]]), fn = {}, pn = {
|
|
1285
1344
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1286
1345
|
viewBox: "0 0 20 20",
|
|
1287
1346
|
fill: "currentColor",
|
|
1288
1347
|
"aria-hidden": "true"
|
|
1289
1348
|
};
|
|
1290
|
-
function
|
|
1291
|
-
return u(), i("svg",
|
|
1349
|
+
function mn(e, t, n, r, o, s) {
|
|
1350
|
+
return u(), i("svg", pn, [...t[0] ||= [a("path", {
|
|
1292
1351
|
"fill-rule": "evenodd",
|
|
1293
1352
|
"clip-rule": "evenodd",
|
|
1294
1353
|
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"
|
|
1295
1354
|
}, null, -1)]]);
|
|
1296
1355
|
}
|
|
1297
|
-
var
|
|
1356
|
+
var hn = /*#__PURE__*/ T(fn, [["render", mn]]);
|
|
1298
1357
|
//#endregion
|
|
1299
1358
|
//#region src/navigation.js
|
|
1300
|
-
function
|
|
1359
|
+
function gn(e) {
|
|
1301
1360
|
let t = e.currentTarget?.target ?? "";
|
|
1302
1361
|
return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
|
|
1303
1362
|
}
|
|
1304
|
-
var
|
|
1305
|
-
inject:
|
|
1363
|
+
var X = {
|
|
1364
|
+
inject: w,
|
|
1306
1365
|
methods: { followLink(e, t) {
|
|
1307
1366
|
let n = this.uiSettings.navigate;
|
|
1308
|
-
n !== null &&
|
|
1367
|
+
n !== null && gn(e) && (e.preventDefault(), n(t));
|
|
1309
1368
|
} }
|
|
1310
1369
|
};
|
|
1311
1370
|
//#endregion
|
|
1312
1371
|
//#region src/components/Pagination.vue
|
|
1313
|
-
function
|
|
1372
|
+
function Z(e) {
|
|
1314
1373
|
return typeof e == "string" && e !== "" ? e : null;
|
|
1315
1374
|
}
|
|
1316
|
-
var
|
|
1375
|
+
var _n = {
|
|
1317
1376
|
components: {
|
|
1318
|
-
ArrowNarrowLeft:
|
|
1319
|
-
ArrowNarrowRight:
|
|
1377
|
+
ArrowNarrowLeft: dn,
|
|
1378
|
+
ArrowNarrowRight: hn
|
|
1320
1379
|
},
|
|
1321
|
-
mixins: [
|
|
1380
|
+
mixins: [M, X],
|
|
1322
1381
|
props: {
|
|
1323
1382
|
links: {
|
|
1324
1383
|
type: Object,
|
|
@@ -1346,45 +1405,231 @@ var ln = {
|
|
|
1346
1405
|
return typeof this.from == "number" && typeof this.to == "number";
|
|
1347
1406
|
},
|
|
1348
1407
|
previousPageUrl() {
|
|
1349
|
-
return
|
|
1408
|
+
return Z(this.links?.prev);
|
|
1350
1409
|
},
|
|
1351
1410
|
nextPageUrl() {
|
|
1352
|
-
return
|
|
1411
|
+
return Z(this.links?.next);
|
|
1353
1412
|
}
|
|
1354
1413
|
}
|
|
1355
|
-
},
|
|
1414
|
+
}, vn = {
|
|
1356
1415
|
key: 0,
|
|
1357
1416
|
class: "bb-dashboard-ui bb:px-4 bb:flex bb:items-center bb:justify-between bb:sm:px-0"
|
|
1358
|
-
},
|
|
1417
|
+
}, yn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, bn = ["href"], xn = {
|
|
1359
1418
|
key: 0,
|
|
1360
1419
|
class: "bb:hidden bb:md:-mt-px bb:md:flex bb:text-gray-400 bb:text-sm bb:leading-5"
|
|
1361
|
-
},
|
|
1362
|
-
function
|
|
1420
|
+
}, Sn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Cn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, wn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, Tn = ["href"];
|
|
1421
|
+
function En(e, t, n, c, l, d) {
|
|
1363
1422
|
let f = p("arrow-narrow-left"), h = p("arrow-narrow-right");
|
|
1364
|
-
return d.hasResults ? (u(), i("nav",
|
|
1365
|
-
a("div",
|
|
1423
|
+
return d.hasResults ? (u(), i("nav", vn, [
|
|
1424
|
+
a("div", yn, [d.previousPageUrl === null ? r("", !0) : (u(), i("a", {
|
|
1366
1425
|
key: 0,
|
|
1367
1426
|
href: d.previousPageUrl,
|
|
1368
1427
|
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",
|
|
1369
1428
|
onClick: t[0] ||= (t) => e.followLink(t, d.previousPageUrl)
|
|
1370
|
-
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + m(e.texts.previousPage), 1)], 8,
|
|
1371
|
-
d.hasRange ? (u(), i("div",
|
|
1429
|
+
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + m(e.texts.previousPage), 1)], 8, bn))]),
|
|
1430
|
+
d.hasRange ? (u(), i("div", xn, [
|
|
1372
1431
|
o(m(e.texts.resultsBefore) + " ", 1),
|
|
1373
|
-
a("span",
|
|
1432
|
+
a("span", Sn, m(d.from) + " - " + m(d.to), 1),
|
|
1374
1433
|
o(" " + m(e.texts.resultsOf) + " ", 1),
|
|
1375
|
-
a("span",
|
|
1434
|
+
a("span", Cn, m(d.total), 1),
|
|
1376
1435
|
o(" " + m(e.texts.resultsAfter), 1)
|
|
1377
1436
|
])) : r("", !0),
|
|
1378
|
-
a("div",
|
|
1437
|
+
a("div", wn, [d.nextPageUrl === null ? r("", !0) : (u(), i("a", {
|
|
1379
1438
|
key: 0,
|
|
1380
1439
|
href: d.nextPageUrl,
|
|
1381
1440
|
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",
|
|
1382
1441
|
onClick: t[1] ||= (t) => e.followLink(t, d.nextPageUrl)
|
|
1383
|
-
}, [o(m(e.texts.nextPage) + " ", 1), s(h, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8,
|
|
1442
|
+
}, [o(m(e.texts.nextPage) + " ", 1), s(h, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8, Tn))])
|
|
1384
1443
|
])) : r("", !0);
|
|
1385
1444
|
}
|
|
1386
|
-
var
|
|
1387
|
-
|
|
1445
|
+
var Dn = /*#__PURE__*/ T(_n, [["render", En]]), On = [
|
|
1446
|
+
"left",
|
|
1447
|
+
"center",
|
|
1448
|
+
"right"
|
|
1449
|
+
], kn = ["red", "green"];
|
|
1450
|
+
function An(e) {
|
|
1451
|
+
if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
|
|
1452
|
+
let t = e.key;
|
|
1453
|
+
return {
|
|
1454
|
+
key: t,
|
|
1455
|
+
label: typeof e.label == "string" ? e.label : "",
|
|
1456
|
+
value: typeof e.value == "function" ? e.value : (e) => e?.[t],
|
|
1457
|
+
secondary: typeof e.secondary == "function" ? e.secondary : null,
|
|
1458
|
+
muted: e.muted === !0,
|
|
1459
|
+
align: On.includes(e.align) ? e.align : "left",
|
|
1460
|
+
wrap: e.wrap === !0,
|
|
1461
|
+
narrow: e.narrow === !0,
|
|
1462
|
+
visible: e.visible !== !1
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
function Q(e) {
|
|
1466
|
+
return typeof e == "string" && e !== "" ? e : null;
|
|
1467
|
+
}
|
|
1468
|
+
var jn = {
|
|
1469
|
+
components: {
|
|
1470
|
+
Pagination: Dn,
|
|
1471
|
+
SmallBadge: H
|
|
1472
|
+
},
|
|
1473
|
+
mixins: [M],
|
|
1474
|
+
props: {
|
|
1475
|
+
rows: {
|
|
1476
|
+
type: Array,
|
|
1477
|
+
required: !0
|
|
1478
|
+
},
|
|
1479
|
+
columns: {
|
|
1480
|
+
type: Array,
|
|
1481
|
+
required: !0
|
|
1482
|
+
},
|
|
1483
|
+
rowKey: {
|
|
1484
|
+
type: [String, Function],
|
|
1485
|
+
required: !0
|
|
1486
|
+
},
|
|
1487
|
+
meta: {
|
|
1488
|
+
type: Object,
|
|
1489
|
+
default: null
|
|
1490
|
+
},
|
|
1491
|
+
links: {
|
|
1492
|
+
type: Object,
|
|
1493
|
+
default: null
|
|
1494
|
+
},
|
|
1495
|
+
foundText: {
|
|
1496
|
+
type: String,
|
|
1497
|
+
default: null
|
|
1498
|
+
},
|
|
1499
|
+
emptyText: {
|
|
1500
|
+
type: String,
|
|
1501
|
+
default: null
|
|
1502
|
+
},
|
|
1503
|
+
variant: {
|
|
1504
|
+
type: String,
|
|
1505
|
+
default: "page",
|
|
1506
|
+
validator: (e) => ["page", "card"].indexOf(e) !== -1
|
|
1507
|
+
},
|
|
1508
|
+
rowColor: {
|
|
1509
|
+
type: Function,
|
|
1510
|
+
default: null
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
computed: {
|
|
1514
|
+
normalizedRows() {
|
|
1515
|
+
return Array.isArray(this.rows) ? this.rows : [];
|
|
1516
|
+
},
|
|
1517
|
+
visibleColumns() {
|
|
1518
|
+
return (Array.isArray(this.columns) ? this.columns : []).map(An).filter((e) => e !== null && e.visible);
|
|
1519
|
+
},
|
|
1520
|
+
isCard() {
|
|
1521
|
+
return this.variant === "card";
|
|
1522
|
+
},
|
|
1523
|
+
hasMeta() {
|
|
1524
|
+
return this.meta !== null && typeof this.meta == "object";
|
|
1525
|
+
},
|
|
1526
|
+
recordCount() {
|
|
1527
|
+
return this.hasMeta && typeof this.meta.total == "number" ? this.meta.total : this.normalizedRows.length;
|
|
1528
|
+
},
|
|
1529
|
+
hasRecords() {
|
|
1530
|
+
return this.recordCount > 0;
|
|
1531
|
+
},
|
|
1532
|
+
badgeText() {
|
|
1533
|
+
if (this.hasRecords) {
|
|
1534
|
+
let e = Q(this.foundText);
|
|
1535
|
+
return e === null ? null : `${e}: ${this.recordCount}`;
|
|
1536
|
+
}
|
|
1537
|
+
return Q(this.emptyText);
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
methods: {
|
|
1541
|
+
hasBadgeRow() {
|
|
1542
|
+
return this.badgeText !== null || this.hasRecords && this.$slots["results-actions"] !== void 0;
|
|
1543
|
+
},
|
|
1544
|
+
keyOf(e, t) {
|
|
1545
|
+
let n;
|
|
1546
|
+
if (typeof this.rowKey == "function") try {
|
|
1547
|
+
n = this.rowKey(e);
|
|
1548
|
+
} catch {
|
|
1549
|
+
n = void 0;
|
|
1550
|
+
}
|
|
1551
|
+
else typeof this.rowKey == "string" && (n = e?.[this.rowKey]);
|
|
1552
|
+
return n ?? `row-${t}`;
|
|
1553
|
+
},
|
|
1554
|
+
colorOf(e) {
|
|
1555
|
+
if (typeof this.rowColor != "function") return null;
|
|
1556
|
+
let t = this.rowColor(e);
|
|
1557
|
+
return kn.includes(t) ? t : null;
|
|
1558
|
+
},
|
|
1559
|
+
textOf(e, t) {
|
|
1560
|
+
let n = e(t);
|
|
1561
|
+
return n == null ? "" : String(n);
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}, Mn = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, Nn = { class: "bb:bg-gray-50" }, Pn = ["textContent"], Fn = { class: "bb:divide-y bb:divide-gray-200" }, In = ["textContent"], Ln = ["textContent"];
|
|
1565
|
+
function Rn(t, o, s, c, h, g) {
|
|
1566
|
+
let _ = p("small-badge"), v = p("pagination");
|
|
1567
|
+
return u(), i("div", null, [
|
|
1568
|
+
g.hasBadgeRow() ? (u(), i("div", {
|
|
1569
|
+
key: 0,
|
|
1570
|
+
class: l(["bb:flex bb:justify-center bb:items-center bb:space-x-2", g.isCard ? "" : "bb:my-4"])
|
|
1571
|
+
}, [g.badgeText === null ? r("", !0) : (u(), n(_, {
|
|
1572
|
+
key: 0,
|
|
1573
|
+
text: g.badgeText,
|
|
1574
|
+
color: "indigo"
|
|
1575
|
+
}, null, 8, ["text"])), g.hasRecords ? f(t.$slots, "results-actions", {}, void 0, void 0, 1) : r("", !0)], 2)) : r("", !0),
|
|
1576
|
+
g.normalizedRows.length > 0 ? (u(), i("div", {
|
|
1577
|
+
key: 1,
|
|
1578
|
+
class: l(g.isCard && g.hasBadgeRow() ? "bb:mt-4" : "")
|
|
1579
|
+
}, [a("div", { class: l(["bb:overflow-x-auto", g.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table", Mn, [a("thead", null, [a("tr", Nn, [(u(!0), i(e, null, d(g.visibleColumns, (e) => (u(), i("th", {
|
|
1580
|
+
key: e.key,
|
|
1581
|
+
scope: "col",
|
|
1582
|
+
class: l(["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", [{
|
|
1583
|
+
"bb:text-left": e.align === "left",
|
|
1584
|
+
"bb:text-center": e.align === "center",
|
|
1585
|
+
"bb:text-right": e.align === "right"
|
|
1586
|
+
}, { "bb:w-px": e.narrow }]]),
|
|
1587
|
+
textContent: m(e.label)
|
|
1588
|
+
}, null, 10, Pn))), 128))])]), a("tbody", Fn, [(u(!0), i(e, null, d(g.normalizedRows, (n, o) => (u(), i("tr", {
|
|
1589
|
+
key: g.keyOf(n, o),
|
|
1590
|
+
class: l({
|
|
1591
|
+
"bb:bg-white bb:even:bg-gray-50": g.colorOf(n) === null,
|
|
1592
|
+
"bb:bg-red-50": g.colorOf(n) === "red",
|
|
1593
|
+
"bb:bg-green-50": g.colorOf(n) === "green"
|
|
1594
|
+
})
|
|
1595
|
+
}, [(u(!0), i(e, null, d(g.visibleColumns, (e) => (u(), i("td", {
|
|
1596
|
+
key: e.key,
|
|
1597
|
+
class: l(["bb:px-6 bb:py-4 bb:align-top bb:relative bb:text-sm bb:leading-5", [
|
|
1598
|
+
{ "bb:whitespace-nowrap": !e.wrap },
|
|
1599
|
+
{
|
|
1600
|
+
"bb:text-left": e.align === "left",
|
|
1601
|
+
"bb:text-center": e.align === "center",
|
|
1602
|
+
"bb:text-right": e.align === "right"
|
|
1603
|
+
},
|
|
1604
|
+
{ "bb:w-px": e.narrow }
|
|
1605
|
+
]])
|
|
1606
|
+
}, [f(t.$slots, `cell-${e.key}`, {
|
|
1607
|
+
row: n,
|
|
1608
|
+
index: o
|
|
1609
|
+
}, () => [a("div", {
|
|
1610
|
+
class: l(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
|
|
1611
|
+
textContent: m(g.textOf(e.value, n))
|
|
1612
|
+
}, null, 10, In), e.secondary !== null && g.textOf(e.secondary, n) !== "" ? (u(), i("div", {
|
|
1613
|
+
key: 0,
|
|
1614
|
+
class: "bb:text-gray-400",
|
|
1615
|
+
textContent: m(g.textOf(e.secondary, n))
|
|
1616
|
+
}, null, 8, Ln)) : r("", !0)])], 2))), 128))], 2))), 128))])])], 2)], 2)) : r("", !0),
|
|
1617
|
+
g.hasMeta ? (u(), n(v, {
|
|
1618
|
+
key: 2,
|
|
1619
|
+
meta: s.meta,
|
|
1620
|
+
links: s.links ?? {},
|
|
1621
|
+
lang: t.lang,
|
|
1622
|
+
class: l(g.isCard ? "bb:mt-4" : "bb:mt-6")
|
|
1623
|
+
}, null, 8, [
|
|
1624
|
+
"meta",
|
|
1625
|
+
"links",
|
|
1626
|
+
"lang",
|
|
1627
|
+
"class"
|
|
1628
|
+
])) : r("", !0)
|
|
1629
|
+
]);
|
|
1630
|
+
}
|
|
1631
|
+
var zn = /*#__PURE__*/ T(jn, [["render", Rn]]), Bn = {
|
|
1632
|
+
mixins: [X],
|
|
1388
1633
|
props: {
|
|
1389
1634
|
url: {
|
|
1390
1635
|
type: String,
|
|
@@ -1399,18 +1644,18 @@ var yn = /*#__PURE__*/ O(ln, [["render", vn]]), bn = {
|
|
|
1399
1644
|
default: !1
|
|
1400
1645
|
}
|
|
1401
1646
|
}
|
|
1402
|
-
},
|
|
1403
|
-
function
|
|
1647
|
+
}, Vn = ["href", "textContent"];
|
|
1648
|
+
function Hn(e, t, n, r, a, o) {
|
|
1404
1649
|
return u(), i("a", {
|
|
1405
1650
|
href: n.url,
|
|
1406
1651
|
class: l([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"]),
|
|
1407
1652
|
onClick: t[0] ||= (t) => e.followLink(t, n.url),
|
|
1408
1653
|
textContent: m(n.name)
|
|
1409
|
-
}, null, 10,
|
|
1654
|
+
}, null, 10, Vn);
|
|
1410
1655
|
}
|
|
1411
|
-
var
|
|
1412
|
-
components: { Closer:
|
|
1413
|
-
mixins: [
|
|
1656
|
+
var Un = /*#__PURE__*/ T(Bn, [["render", Hn]]), Wn = {
|
|
1657
|
+
components: { Closer: U },
|
|
1658
|
+
mixins: [M],
|
|
1414
1659
|
data() {
|
|
1415
1660
|
return { canGoBack: !1 };
|
|
1416
1661
|
},
|
|
@@ -1421,7 +1666,7 @@ var Cn = /*#__PURE__*/ O(bn, [["render", Sn]]), wn = {
|
|
|
1421
1666
|
window.history.back();
|
|
1422
1667
|
} }
|
|
1423
1668
|
};
|
|
1424
|
-
function
|
|
1669
|
+
function Gn(e, t, a, o, s, c) {
|
|
1425
1670
|
let d = p("closer");
|
|
1426
1671
|
return u(), i("div", { class: l(["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:sm:max-w-xl bb:sm:rounded-lg", s.canGoBack ? "bb:[--bb-closer-space:3.5rem] bb:md:[--bb-closer-space:0px]" : "bb:[--bb-closer-space:0px]"]) }, [f(e.$slots, "default"), s.canGoBack ? (u(), n(d, {
|
|
1427
1672
|
key: 0,
|
|
@@ -1431,7 +1676,7 @@ function Tn(e, t, a, o, s, c) {
|
|
|
1431
1676
|
onClicked: c.goBack
|
|
1432
1677
|
}, null, 8, ["aria-label", "onClicked"])) : r("", !0)], 2);
|
|
1433
1678
|
}
|
|
1434
|
-
var
|
|
1679
|
+
var Kn = /*#__PURE__*/ T(Wn, [["render", Gn]]), qn = {}, $ = {
|
|
1435
1680
|
class: "bb:h-7 bb:w-7 bb:text-green-600",
|
|
1436
1681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1437
1682
|
fill: "none",
|
|
@@ -1440,22 +1685,22 @@ var En = /*#__PURE__*/ O(wn, [["render", Tn]]), $ = {}, Dn = {
|
|
|
1440
1685
|
stroke: "currentColor",
|
|
1441
1686
|
"aria-hidden": "true"
|
|
1442
1687
|
};
|
|
1443
|
-
function
|
|
1444
|
-
return u(), i("svg",
|
|
1688
|
+
function Jn(e, t, n, r, o, s) {
|
|
1689
|
+
return u(), i("svg", $, [...t[0] ||= [a("path", {
|
|
1445
1690
|
"stroke-linecap": "round",
|
|
1446
1691
|
"stroke-linejoin": "round",
|
|
1447
1692
|
d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
1448
1693
|
}, null, -1)]]);
|
|
1449
1694
|
}
|
|
1450
|
-
var
|
|
1695
|
+
var Yn = /*#__PURE__*/ T(qn, [["render", Jn]]), Xn = {}, Zn = {
|
|
1451
1696
|
class: "bb:h-5 bb:w-5",
|
|
1452
1697
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1453
1698
|
viewBox: "0 0 20 20",
|
|
1454
1699
|
fill: "currentColor",
|
|
1455
1700
|
"aria-hidden": "true"
|
|
1456
1701
|
};
|
|
1457
|
-
function
|
|
1458
|
-
return u(), i("svg",
|
|
1702
|
+
function Qn(e, t, n, r, o, s) {
|
|
1703
|
+
return u(), i("svg", Zn, [...t[0] ||= [a("path", {
|
|
1459
1704
|
"fill-rule": "evenodd",
|
|
1460
1705
|
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",
|
|
1461
1706
|
"clip-rule": "evenodd"
|
|
@@ -1463,14 +1708,14 @@ function Mn(e, t, n, r, o, s) {
|
|
|
1463
1708
|
}
|
|
1464
1709
|
//#endregion
|
|
1465
1710
|
//#region src/components/NotificationMessage.vue
|
|
1466
|
-
var
|
|
1711
|
+
var $n = {
|
|
1467
1712
|
components: {
|
|
1468
|
-
Check:
|
|
1469
|
-
Close: /* @__PURE__ */
|
|
1470
|
-
Dangerous:
|
|
1471
|
-
Warning:
|
|
1713
|
+
Check: Yn,
|
|
1714
|
+
Close: /* @__PURE__ */ T(Xn, [["render", Qn]]),
|
|
1715
|
+
Dangerous: W,
|
|
1716
|
+
Warning: G
|
|
1472
1717
|
},
|
|
1473
|
-
mixins: [
|
|
1718
|
+
mixins: [M],
|
|
1474
1719
|
emits: ["update:modelValue"],
|
|
1475
1720
|
props: {
|
|
1476
1721
|
modelValue: {
|
|
@@ -1508,8 +1753,8 @@ var Nn = {
|
|
|
1508
1753
|
return this.type === "confirmation";
|
|
1509
1754
|
}
|
|
1510
1755
|
}
|
|
1511
|
-
},
|
|
1512
|
-
function
|
|
1756
|
+
}, er = ["role"], tr = { class: "bb:p-4" }, nr = { class: "bb:flex bb:items-start" }, rr = { class: "bb:shrink-0" }, ir = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, ar = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, or = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, sr = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, cr = { class: "bb:sr-only" };
|
|
1757
|
+
function lr(e, t, o, c, d, f) {
|
|
1513
1758
|
let h = p("warning"), g = p("dangerous"), _ = p("check"), v = p("close");
|
|
1514
1759
|
return u(), i("div", {
|
|
1515
1760
|
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",
|
|
@@ -1521,14 +1766,14 @@ function Un(e, t, o, c, d, f) {
|
|
|
1521
1766
|
"bb:bg-yellow-50": f.isWarning,
|
|
1522
1767
|
"bb:bg-gray-50": f.isConfirmation
|
|
1523
1768
|
}])
|
|
1524
|
-
}, [a("div",
|
|
1525
|
-
a("div",
|
|
1769
|
+
}, [a("div", tr, [a("div", nr, [
|
|
1770
|
+
a("div", rr, [
|
|
1526
1771
|
f.isWarning ? (u(), n(h, { key: 0 })) : r("", !0),
|
|
1527
1772
|
f.isDangerous ? (u(), n(g, { key: 1 })) : r("", !0),
|
|
1528
1773
|
f.isConfirmation ? (u(), n(_, { key: 2 })) : r("", !0)
|
|
1529
1774
|
]),
|
|
1530
|
-
a("div",
|
|
1531
|
-
a("div",
|
|
1775
|
+
a("div", ir, [a("p", ar, m(o.notificationHeading), 1), a("p", or, m(f.text), 1)]),
|
|
1776
|
+
a("div", sr, [a("button", {
|
|
1532
1777
|
type: "button",
|
|
1533
1778
|
class: l(["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", {
|
|
1534
1779
|
"bb:bg-red-50": f.isDangerous,
|
|
@@ -1536,9 +1781,9 @@ function Un(e, t, o, c, d, f) {
|
|
|
1536
1781
|
"bb:bg-gray-50": f.isConfirmation
|
|
1537
1782
|
}]),
|
|
1538
1783
|
onClick: t[0] ||= b((t) => e.$emit("update:modelValue", ""), ["prevent"])
|
|
1539
|
-
}, [a("span",
|
|
1540
|
-
])])], 2)) : r("", !0)], 8,
|
|
1784
|
+
}, [a("span", cr, m(e.texts.close), 1), s(v)], 2)])
|
|
1785
|
+
])])], 2)) : r("", !0)], 8, er);
|
|
1541
1786
|
}
|
|
1542
|
-
var
|
|
1787
|
+
var ur = /*#__PURE__*/ T($n, [["render", lr]]);
|
|
1543
1788
|
//#endregion
|
|
1544
|
-
export {
|
|
1789
|
+
export { U as Closer, Yt as ConfirmationModal, zn as DataTable, O as Dot, Dt as DownloadLink, sn as DropdownButtonWithAction, _t as ErrorMessages, Un as NavigationMenuElement, ur as NotificationMessage, Kn as PageCard, R as PickDay, D as Popup, Ae as RussianMobileFilter, Le as Search, We as SelectDateInterval, st as SelectSingle, H as SmallBadge, ie as dashboardUi };
|