@boobooking/dashboard-ui-components 0.11.1 → 0.13.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 +243 -62
- package/dist/index.js +813 -357
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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,
|
|
2
|
-
import
|
|
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, effectScope as c, mergeProps as l, normalizeClass as u, openBlock as d, renderList as f, renderSlot as p, resolveComponent as m, shallowReactive as h, toDisplayString as g, useId as _, vModelText as v, vShow as y, watch as ee, withCtx as b, withDirectives as x, withKeys as te, withModifiers as S } from "vue";
|
|
2
|
+
import ne from "imask";
|
|
3
3
|
//#region src/i18n.js
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
4
|
+
var C = ["ru", "en"];
|
|
5
|
+
function w(e) {
|
|
6
|
+
return C.includes(e);
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var re = {
|
|
9
9
|
ru: {
|
|
10
10
|
cancel: "Отмена",
|
|
11
11
|
download: "Скачать",
|
|
@@ -102,26 +102,152 @@ var w = {
|
|
|
102
102
|
back: "Back",
|
|
103
103
|
close: "Close"
|
|
104
104
|
}
|
|
105
|
-
}
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/windows.js
|
|
108
|
+
function T(e, t) {
|
|
109
|
+
if (e == null || e === "") return null;
|
|
110
|
+
let n = new URL(String(e), t);
|
|
111
|
+
return n.pathname + n.search;
|
|
112
|
+
}
|
|
113
|
+
function ie(e) {
|
|
114
|
+
return e === null ? null : e.split("?")[0];
|
|
115
|
+
}
|
|
116
|
+
function ae() {
|
|
117
|
+
return {
|
|
118
|
+
windows: [],
|
|
119
|
+
cards: /* @__PURE__ */ new Map(),
|
|
120
|
+
shown: null,
|
|
121
|
+
transition: {
|
|
122
|
+
number: 0,
|
|
123
|
+
fromAddress: null,
|
|
124
|
+
fromWindow: null,
|
|
125
|
+
assigned: /* @__PURE__ */ new Map()
|
|
126
|
+
},
|
|
127
|
+
nextId: 1
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function E(e, t) {
|
|
131
|
+
return e.windows.includes(t);
|
|
132
|
+
}
|
|
133
|
+
function oe(e) {
|
|
134
|
+
return e.returnAddress ?? e.fallbackAddress;
|
|
135
|
+
}
|
|
136
|
+
function se(e) {
|
|
137
|
+
let t = null;
|
|
138
|
+
for (let n of e.cards.values()) t = n.window;
|
|
139
|
+
return t;
|
|
140
|
+
}
|
|
141
|
+
function D(e, t) {
|
|
142
|
+
let n = t;
|
|
143
|
+
for (; n !== null && !E(e, n);) n = n.parent;
|
|
144
|
+
return n;
|
|
145
|
+
}
|
|
146
|
+
function ce(e, t) {
|
|
147
|
+
return e.transition = {
|
|
148
|
+
number: e.transition.number + 1,
|
|
149
|
+
fromAddress: e.shown,
|
|
150
|
+
fromWindow: se(e),
|
|
151
|
+
assigned: /* @__PURE__ */ new Map()
|
|
152
|
+
}, e.shown = t, e.transition.number;
|
|
153
|
+
}
|
|
154
|
+
function le(e, t, n) {
|
|
155
|
+
let r = e.transition, i = r.assigned.get(t);
|
|
156
|
+
if (i !== void 0 && E(e, i)) return i;
|
|
157
|
+
let a = r.fromWindow, o = r.fromAddress;
|
|
158
|
+
a !== null && !E(e, a) && (a = D(e, a), o = null), a !== null && oe(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : D(e, a.parent), o = null);
|
|
159
|
+
for (let n = a; n !== null; n = n.parent) if (n.key === t && E(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
|
|
160
|
+
a === null ? e.windows = [] : e.windows.splice(e.windows.indexOf(a) + 1);
|
|
161
|
+
let s = {
|
|
162
|
+
id: e.nextId,
|
|
163
|
+
key: t,
|
|
164
|
+
parent: a,
|
|
165
|
+
returnAddress: o,
|
|
166
|
+
fallbackAddress: n
|
|
167
|
+
};
|
|
168
|
+
return e.nextId += 1, e.windows.push(s), s;
|
|
169
|
+
}
|
|
170
|
+
function O(e, t, n, r) {
|
|
171
|
+
let i = le(e, n, r);
|
|
172
|
+
return i.fallbackAddress = r, e.transition.assigned.set(n, i), e.cards.delete(t), e.cards.set(t, {
|
|
173
|
+
key: n,
|
|
174
|
+
window: i,
|
|
175
|
+
processed: e.transition.number
|
|
176
|
+
}), i;
|
|
177
|
+
}
|
|
178
|
+
function ue(e, t, n, r) {
|
|
179
|
+
let i = e.cards.get(t);
|
|
180
|
+
return i === void 0 ? {
|
|
181
|
+
window: O(e, t, n, r),
|
|
182
|
+
rejected: !1,
|
|
183
|
+
key: n
|
|
184
|
+
} : i.key === n ? (i.processed = e.transition.number, {
|
|
185
|
+
window: i.window,
|
|
186
|
+
rejected: !1,
|
|
187
|
+
key: n
|
|
188
|
+
}) : i.processed === e.transition.number ? {
|
|
189
|
+
window: i.window,
|
|
190
|
+
rejected: !0,
|
|
191
|
+
key: i.key
|
|
192
|
+
} : (e.cards.delete(t), {
|
|
193
|
+
window: O(e, t, n, r),
|
|
194
|
+
rejected: !1,
|
|
195
|
+
key: n
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function de(e, t) {
|
|
199
|
+
e.cards.delete(t);
|
|
200
|
+
}
|
|
201
|
+
function fe(e, t, n) {
|
|
202
|
+
let r = e.cards.get(t);
|
|
203
|
+
r !== void 0 && (r.window.fallbackAddress = n);
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/plugin.js
|
|
207
|
+
var k = Symbol("dashboardUi"), pe = Object.freeze({
|
|
106
208
|
lang: "ru",
|
|
107
|
-
navigate: null
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
209
|
+
navigate: null,
|
|
210
|
+
windows: null
|
|
211
|
+
}), A = { uiSettings: {
|
|
212
|
+
from: k,
|
|
213
|
+
default: () => pe
|
|
214
|
+
} };
|
|
215
|
+
function me(e, t) {
|
|
216
|
+
let n = ae(), r = h({
|
|
217
|
+
number: 0,
|
|
218
|
+
address: null
|
|
219
|
+
}), i = c(!0);
|
|
220
|
+
return i.run(() => {
|
|
221
|
+
ee(t, (e) => {
|
|
222
|
+
let t = T(e, window.location.origin);
|
|
223
|
+
t !== null && t !== r.address && (r.number = ce(n, t), r.address = t);
|
|
224
|
+
}, {
|
|
225
|
+
flush: "sync",
|
|
226
|
+
immediate: !0
|
|
227
|
+
});
|
|
228
|
+
}), e.onUnmount(() => i.stop()), {
|
|
229
|
+
state: n,
|
|
230
|
+
page: r
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
var he = { install(e, t) {
|
|
112
234
|
let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
|
|
113
|
-
if (!
|
|
235
|
+
if (!w(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${C.join(", ")}`);
|
|
114
236
|
let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
|
|
115
237
|
if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
|
|
116
|
-
|
|
238
|
+
let o = Object.hasOwn(n, "currentUrl"), s = o ? n.currentUrl : null;
|
|
239
|
+
if (o && typeof s != "function") throw Error("dashboardUi: currentUrl должен быть функцией () => адрес страницы");
|
|
240
|
+
let c = s !== null && typeof window < "u" ? me(e, s) : null;
|
|
241
|
+
e.provide(k, Object.freeze({
|
|
117
242
|
lang: r,
|
|
118
|
-
navigate: a
|
|
243
|
+
navigate: a,
|
|
244
|
+
windows: c
|
|
119
245
|
}));
|
|
120
|
-
} },
|
|
246
|
+
} }, j = (e, t) => {
|
|
121
247
|
let n = e.__vccOpts || e;
|
|
122
248
|
for (let [e, r] of t) n[e] = r;
|
|
123
249
|
return n;
|
|
124
|
-
},
|
|
250
|
+
}, ge = {
|
|
125
251
|
props: {
|
|
126
252
|
isOpen: {
|
|
127
253
|
type: Boolean,
|
|
@@ -148,21 +274,21 @@ var w = {
|
|
|
148
274
|
document.removeEventListener("keydown", this.handleEscape);
|
|
149
275
|
}
|
|
150
276
|
};
|
|
151
|
-
function
|
|
152
|
-
return
|
|
277
|
+
function _e(e, t, n, r, a, o) {
|
|
278
|
+
return x((d(), i("button", {
|
|
153
279
|
tabindex: "-1",
|
|
154
|
-
onClick: t[0] ||=
|
|
155
|
-
class:
|
|
280
|
+
onClick: t[0] ||= S((...e) => o.closeOverlay && o.closeOverlay(...e), ["prevent"]),
|
|
281
|
+
class: u(["bb:fixed bb:inset-0 bb:w-full bb:h-full bb:cursor-default bb:flex bb:items-start", {
|
|
156
282
|
"bb:z-20": n.isOpen,
|
|
157
283
|
"bb:bg-transparent": n.isTransparent,
|
|
158
284
|
"bb:bg-gray-900 bb:opacity-75": !n.isTransparent
|
|
159
285
|
}])
|
|
160
|
-
}, null, 2)), [[
|
|
286
|
+
}, null, 2)), [[y, n.isOpen]]);
|
|
161
287
|
}
|
|
162
288
|
//#endregion
|
|
163
289
|
//#region src/components/Popup.vue
|
|
164
|
-
var
|
|
165
|
-
components: { Overlay: /* @__PURE__ */
|
|
290
|
+
var ve = {
|
|
291
|
+
components: { Overlay: /* @__PURE__ */ j(ge, [["render", _e]]) },
|
|
166
292
|
inheritAttrs: !1,
|
|
167
293
|
emits: ["update:modelValue"],
|
|
168
294
|
props: {
|
|
@@ -195,12 +321,12 @@ var ne = {
|
|
|
195
321
|
return this.align === "right";
|
|
196
322
|
}
|
|
197
323
|
}
|
|
198
|
-
},
|
|
199
|
-
function
|
|
200
|
-
let
|
|
201
|
-
return
|
|
202
|
-
"is-open":
|
|
203
|
-
"onUpdate:isOpen": n[0] ||= (e) =>
|
|
324
|
+
}, ye = { class: "bb-dashboard-ui bb:relative" };
|
|
325
|
+
function be(e, n, r, o, c, u) {
|
|
326
|
+
let f = m("overlay");
|
|
327
|
+
return d(), i("div", ye, [s(f, {
|
|
328
|
+
"is-open": c.overlayIsOpen,
|
|
329
|
+
"onUpdate:isOpen": n[0] ||= (e) => c.overlayIsOpen = e
|
|
204
330
|
}, null, 8, ["is-open"]), s(t, {
|
|
205
331
|
"enter-active-class": "bb:transition bb:ease-out bb:duration-100",
|
|
206
332
|
"enter-from-class": "bb:opacity-0 bb:scale-95",
|
|
@@ -209,14 +335,14 @@ function ie(e, n, r, o, l, d) {
|
|
|
209
335
|
"leave-from-class": "bb:opacity-100 bb:scale-100",
|
|
210
336
|
"leave-to-class": "bb:opacity-0 bb:scale-95"
|
|
211
337
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
"bb:left-0":
|
|
214
|
-
"bb:right-0":
|
|
215
|
-
}] }), [
|
|
338
|
+
default: b(() => [x(a("div", l(e.$attrs, { class: ["bb:absolute bb:z-20", {
|
|
339
|
+
"bb:left-0": u.alignLeft,
|
|
340
|
+
"bb:right-0": u.alignRight
|
|
341
|
+
}] }), [p(e.$slots, "default")], 16), [[y, r.modelValue]])]),
|
|
216
342
|
_: 3
|
|
217
343
|
})]);
|
|
218
344
|
}
|
|
219
|
-
var
|
|
345
|
+
var M = /*#__PURE__*/ j(ve, [["render", be]]), xe = {
|
|
220
346
|
props: {
|
|
221
347
|
withPulse: {
|
|
222
348
|
type: Boolean,
|
|
@@ -237,8 +363,8 @@ var j = /*#__PURE__*/ O(ne, [["render", ie]]), ae = {
|
|
|
237
363
|
}
|
|
238
364
|
}
|
|
239
365
|
};
|
|
240
|
-
function
|
|
241
|
-
return
|
|
366
|
+
function Se(e, t, n, r, o, s) {
|
|
367
|
+
return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", {
|
|
242
368
|
"bb:text-red-500": s.isRed,
|
|
243
369
|
"bb:text-green-500": s.isGreen,
|
|
244
370
|
"bb:animate-pulse": n.withPulse
|
|
@@ -251,13 +377,13 @@ function oe(e, t, n, r, o, s) {
|
|
|
251
377
|
r: "45"
|
|
252
378
|
})], -1)]], 2);
|
|
253
379
|
}
|
|
254
|
-
var
|
|
380
|
+
var N = /*#__PURE__*/ j(xe, [["render", Se]]), Ce = {}, we = {
|
|
255
381
|
type: "button",
|
|
256
382
|
tabindex: "-1",
|
|
257
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"
|
|
258
384
|
};
|
|
259
|
-
function
|
|
260
|
-
return
|
|
385
|
+
function Te(e, t, n, r, o, s) {
|
|
386
|
+
return d(), i("button", we, [...t[0] ||= [a("svg", {
|
|
261
387
|
class: "bb:w-6 bb:h-6 bb:stroke-current",
|
|
262
388
|
fill: "none",
|
|
263
389
|
viewBox: "0 0 24 24"
|
|
@@ -268,13 +394,13 @@ function le(e, t, n, r, o, s) {
|
|
|
268
394
|
d: "M6 18L18 6M6 6l12 12"
|
|
269
395
|
})], -1)]]);
|
|
270
396
|
}
|
|
271
|
-
var
|
|
397
|
+
var P = /*#__PURE__*/ j(Ce, [["render", Te]]);
|
|
272
398
|
//#endregion
|
|
273
399
|
//#region src/date.js
|
|
274
|
-
function
|
|
400
|
+
function F(e) {
|
|
275
401
|
return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
|
|
276
402
|
}
|
|
277
|
-
function
|
|
403
|
+
function I(e) {
|
|
278
404
|
let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
|
|
279
405
|
if (t === null) return null;
|
|
280
406
|
let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
|
|
@@ -282,27 +408,27 @@ function F(e) {
|
|
|
282
408
|
}
|
|
283
409
|
//#endregion
|
|
284
410
|
//#region src/lang.js
|
|
285
|
-
var
|
|
286
|
-
inject:
|
|
411
|
+
var L = {
|
|
412
|
+
inject: A,
|
|
287
413
|
props: { lang: {
|
|
288
414
|
type: String,
|
|
289
415
|
default: null,
|
|
290
|
-
validator: (e) => e === null ||
|
|
416
|
+
validator: (e) => e === null || w(e)
|
|
291
417
|
} },
|
|
292
418
|
computed: {
|
|
293
419
|
resolvedLang() {
|
|
294
|
-
return
|
|
420
|
+
return w(this.lang) ? this.lang : this.uiSettings.lang;
|
|
295
421
|
},
|
|
296
422
|
texts() {
|
|
297
|
-
return
|
|
423
|
+
return re[this.resolvedLang];
|
|
298
424
|
}
|
|
299
425
|
}
|
|
300
|
-
},
|
|
426
|
+
}, Ee = {
|
|
301
427
|
components: {
|
|
302
|
-
Popup:
|
|
303
|
-
Eraser:
|
|
428
|
+
Popup: M,
|
|
429
|
+
Eraser: P
|
|
304
430
|
},
|
|
305
|
-
mixins: [
|
|
431
|
+
mixins: [L],
|
|
306
432
|
emits: ["update:modelValue", "changed"],
|
|
307
433
|
props: {
|
|
308
434
|
modelValue: {
|
|
@@ -329,8 +455,8 @@ var I = {
|
|
|
329
455
|
keyboardInput: !1,
|
|
330
456
|
bound: !1,
|
|
331
457
|
firstDay: 1,
|
|
332
|
-
parse: (e) =>
|
|
333
|
-
toString: (e) =>
|
|
458
|
+
parse: (e) => I(e),
|
|
459
|
+
toString: (e) => F(e),
|
|
334
460
|
i18n: {
|
|
335
461
|
previousMonth: this.texts.previousMonth,
|
|
336
462
|
nextMonth: this.texts.nextMonth,
|
|
@@ -339,7 +465,7 @@ var I = {
|
|
|
339
465
|
weekdaysShort: this.texts.weekdaysShort
|
|
340
466
|
},
|
|
341
467
|
onSelect: (e) => {
|
|
342
|
-
this.popupIsOpen = !1, this.$emit("update:modelValue",
|
|
468
|
+
this.popupIsOpen = !1, this.$emit("update:modelValue", F(e)), this.$emit("changed");
|
|
343
469
|
}
|
|
344
470
|
}));
|
|
345
471
|
},
|
|
@@ -359,7 +485,7 @@ var I = {
|
|
|
359
485
|
methods: {
|
|
360
486
|
syncPicker(e) {
|
|
361
487
|
if (this.picker === null) return;
|
|
362
|
-
let t =
|
|
488
|
+
let t = I(e);
|
|
363
489
|
if (t === null) {
|
|
364
490
|
this.picker.clear();
|
|
365
491
|
return;
|
|
@@ -378,42 +504,42 @@ var I = {
|
|
|
378
504
|
return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
|
|
379
505
|
}
|
|
380
506
|
}
|
|
381
|
-
},
|
|
507
|
+
}, De = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, Oe = { class: "bb:relative bb:flex bb:h-full bb:cursor-pointer bb:leading-none" }, ke = { class: "bb:min-w-24 bb:w-full bb:h-full" }, Ae = [
|
|
382
508
|
"disabled",
|
|
383
509
|
"value",
|
|
384
510
|
"placeholder"
|
|
385
|
-
],
|
|
511
|
+
], je = {
|
|
386
512
|
ref: "container",
|
|
387
513
|
class: "bb:flex bb:mt-1 bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg"
|
|
388
514
|
};
|
|
389
|
-
function
|
|
390
|
-
let
|
|
391
|
-
return
|
|
515
|
+
function Me(e, t, o, c, l, f) {
|
|
516
|
+
let p = m("eraser"), h = m("popup");
|
|
517
|
+
return d(), i("div", De, [a("div", Oe, [a("button", {
|
|
392
518
|
ref: "trigger",
|
|
393
519
|
type: "button",
|
|
394
|
-
class:
|
|
395
|
-
onClick: t[0] ||= (e) =>
|
|
396
|
-
}, [a("label",
|
|
397
|
-
disabled:
|
|
520
|
+
class: u(["bb:flex bb:w-full bb:items-center bb:focus:outline-hidden", { "bb:z-20": l.popupIsOpen }]),
|
|
521
|
+
onClick: t[0] ||= (e) => l.popupIsOpen = !l.popupIsOpen
|
|
522
|
+
}, [a("label", ke, [a("input", {
|
|
523
|
+
disabled: l.popupIsOpen,
|
|
398
524
|
ref: "field",
|
|
399
525
|
type: "text",
|
|
400
|
-
value:
|
|
526
|
+
value: l.dayValue,
|
|
401
527
|
placeholder: o.placeholderText,
|
|
402
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"
|
|
403
|
-
}, null, 8,
|
|
529
|
+
}, null, 8, Ae)])], 2), f.needsEraser ? (d(), n(p, {
|
|
404
530
|
key: 0,
|
|
405
531
|
onClick: f.clearPicker,
|
|
406
532
|
class: "bb:z-10 bb:h-full bb:pr-2"
|
|
407
533
|
}, null, 8, ["onClick"])) : r("", !0)]), s(h, {
|
|
408
|
-
modelValue:
|
|
409
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
534
|
+
modelValue: l.popupIsOpen,
|
|
535
|
+
"onUpdate:modelValue": t[1] ||= (e) => l.popupIsOpen = e
|
|
410
536
|
}, {
|
|
411
|
-
default:
|
|
537
|
+
default: b(() => [a("div", je, null, 512)]),
|
|
412
538
|
_: 1
|
|
413
539
|
}, 8, ["modelValue"])]);
|
|
414
540
|
}
|
|
415
|
-
var
|
|
416
|
-
components: { Dot:
|
|
541
|
+
var R = /*#__PURE__*/ j(Ee, [["render", Me]]), Ne = {
|
|
542
|
+
components: { Dot: N },
|
|
417
543
|
props: {
|
|
418
544
|
text: {
|
|
419
545
|
type: String,
|
|
@@ -428,43 +554,43 @@ var W = /*#__PURE__*/ O(L, [["render", U]]), ue = {
|
|
|
428
554
|
default: !1
|
|
429
555
|
}
|
|
430
556
|
}
|
|
431
|
-
},
|
|
432
|
-
function
|
|
433
|
-
let l =
|
|
434
|
-
return
|
|
557
|
+
}, Pe = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, Fe = ["textContent"];
|
|
558
|
+
function Ie(e, t, n, r, o, c) {
|
|
559
|
+
let l = m("dot");
|
|
560
|
+
return d(), i("div", Pe, [
|
|
435
561
|
a("div", {
|
|
436
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",
|
|
437
|
-
textContent:
|
|
438
|
-
}, null, 8,
|
|
439
|
-
|
|
563
|
+
textContent: g(n.text)
|
|
564
|
+
}, null, 8, Fe),
|
|
565
|
+
x(s(l, {
|
|
440
566
|
color: "red",
|
|
441
567
|
"with-pulse": !0,
|
|
442
568
|
class: "bb:ml-3"
|
|
443
|
-
}, null, 512), [[
|
|
444
|
-
|
|
569
|
+
}, null, 512), [[y, n.isLoading]]),
|
|
570
|
+
x(s(l, {
|
|
445
571
|
color: "red",
|
|
446
572
|
class: "bb:ml-3"
|
|
447
|
-
}, null, 512), [[
|
|
573
|
+
}, null, 512), [[y, n.isRequired]])
|
|
448
574
|
]);
|
|
449
575
|
}
|
|
450
|
-
var
|
|
451
|
-
function
|
|
576
|
+
var z = /*#__PURE__*/ j(Ne, [["render", Ie]]), Le = 10;
|
|
577
|
+
function Re(e) {
|
|
452
578
|
let t = e.replace(/\D/g, "");
|
|
453
|
-
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, Le);
|
|
454
580
|
}
|
|
455
|
-
function
|
|
581
|
+
function B(e) {
|
|
456
582
|
return e === "" ? "" : `7${e}`;
|
|
457
583
|
}
|
|
458
|
-
function
|
|
584
|
+
function V(e) {
|
|
459
585
|
let t = e ?? "", n = t.startsWith("+") ? t.slice(1) : t;
|
|
460
586
|
return n.startsWith("7") ? n.slice(1) : n;
|
|
461
587
|
}
|
|
462
588
|
//#endregion
|
|
463
589
|
//#region src/components/RussianMobileFilter.vue
|
|
464
|
-
var
|
|
590
|
+
var ze = 400, Be = 3, Ve = {
|
|
465
591
|
components: {
|
|
466
|
-
ElementHeader:
|
|
467
|
-
Eraser:
|
|
592
|
+
ElementHeader: z,
|
|
593
|
+
Eraser: P
|
|
468
594
|
},
|
|
469
595
|
emits: ["update:modelValue", "changed"],
|
|
470
596
|
props: {
|
|
@@ -486,32 +612,32 @@ var ge = 400, _e = 3, ve = {
|
|
|
486
612
|
}
|
|
487
613
|
},
|
|
488
614
|
data() {
|
|
489
|
-
return { digits:
|
|
615
|
+
return { digits: V(this.modelValue) };
|
|
490
616
|
},
|
|
491
617
|
created() {
|
|
492
|
-
this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted =
|
|
618
|
+
this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = V(this.modelValue), this.isUnmounted = !1;
|
|
493
619
|
},
|
|
494
620
|
mounted() {
|
|
495
|
-
this.mask =
|
|
621
|
+
this.mask = ne(this.$refs.input, {
|
|
496
622
|
mask: "+7 (000) 000 00 00",
|
|
497
623
|
lazy: !0,
|
|
498
624
|
prepare: (e, t) => t.unmaskedValue === "" && (e === "7" || e === "8") ? "" : e
|
|
499
625
|
}), this.mask.on("accept", () => {
|
|
500
|
-
this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue",
|
|
626
|
+
this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", B(this.digits)), this.scheduleCommit());
|
|
501
627
|
}), this.syncFromModelValue(this.modelValue);
|
|
502
628
|
},
|
|
503
629
|
beforeUnmount() {
|
|
504
630
|
this.isUnmounted = !0, clearTimeout(this.debounceTimer), this.mask?.destroy();
|
|
505
631
|
},
|
|
506
632
|
watch: { modelValue(e) {
|
|
507
|
-
e !==
|
|
633
|
+
e !== B(this.digits) && this.syncFromModelValue(e);
|
|
508
634
|
} },
|
|
509
635
|
methods: {
|
|
510
636
|
syncFromModelValue(e) {
|
|
511
|
-
this.writeToMask(
|
|
637
|
+
this.writeToMask(V(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
|
|
512
638
|
},
|
|
513
639
|
applyUserDigits(e) {
|
|
514
|
-
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", B(this.digits));
|
|
515
641
|
},
|
|
516
642
|
writeToMask(e) {
|
|
517
643
|
if (this.isWritingProgrammatically = !0, e === "") this.mask.value = "";
|
|
@@ -534,7 +660,7 @@ var ge = 400, _e = 3, ve = {
|
|
|
534
660
|
this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
|
|
535
661
|
},
|
|
536
662
|
onPaste(e) {
|
|
537
|
-
this.applyUserDigits(
|
|
663
|
+
this.applyUserDigits(Re(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
|
|
538
664
|
},
|
|
539
665
|
clear() {
|
|
540
666
|
this.applyUserDigits(""), this.commit();
|
|
@@ -544,16 +670,16 @@ var ge = 400, _e = 3, ve = {
|
|
|
544
670
|
this.commit();
|
|
545
671
|
return;
|
|
546
672
|
}
|
|
547
|
-
this.digits.length <
|
|
673
|
+
this.digits.length < Be || (this.debounceTimer = setTimeout(() => this.commit(), ze));
|
|
548
674
|
},
|
|
549
675
|
commit() {
|
|
550
676
|
clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
|
|
551
677
|
}
|
|
552
678
|
}
|
|
553
|
-
},
|
|
554
|
-
function
|
|
555
|
-
let l =
|
|
556
|
-
return
|
|
679
|
+
}, He = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ue = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, We = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ge = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
680
|
+
function Ke(e, t, n, r, o, c) {
|
|
681
|
+
let l = m("element-header"), u = m("eraser");
|
|
682
|
+
return d(), i("div", He, [a("div", Ue, [s(l, {
|
|
557
683
|
text: n.header,
|
|
558
684
|
"is-required": n.isRequired,
|
|
559
685
|
"is-loading": n.isLoading
|
|
@@ -561,7 +687,7 @@ function Ce(e, t, n, r, o, c) {
|
|
|
561
687
|
"text",
|
|
562
688
|
"is-required",
|
|
563
689
|
"is-loading"
|
|
564
|
-
]), a("div",
|
|
690
|
+
]), a("div", We, [a("label", Ge, [a("input", {
|
|
565
691
|
ref: "input",
|
|
566
692
|
type: "tel",
|
|
567
693
|
inputmode: "tel",
|
|
@@ -569,18 +695,18 @@ function Ce(e, t, n, r, o, c) {
|
|
|
569
695
|
class: "bb:flex bb:w-phone bb:h-full bb:px-3 bb:py-2 bb:cursor-pointer bb:truncate bb:focus:outline-hidden bb:border-none",
|
|
570
696
|
onFocus: t[0] ||= (...e) => c.onFocus && c.onFocus(...e),
|
|
571
697
|
onBlur: t[1] ||= (...e) => c.onBlur && c.onBlur(...e),
|
|
572
|
-
onKeydown: t[2] ||=
|
|
573
|
-
onPaste: t[3] ||=
|
|
574
|
-
}, null, 544),
|
|
575
|
-
onMousedown: t[4] ||=
|
|
698
|
+
onKeydown: t[2] ||= te((...e) => c.commit && c.commit(...e), ["enter"]),
|
|
699
|
+
onPaste: t[3] ||= S((...e) => c.onPaste && c.onPaste(...e), ["prevent"])
|
|
700
|
+
}, null, 544), x(s(u, {
|
|
701
|
+
onMousedown: t[4] ||= S(() => {}, ["prevent"]),
|
|
576
702
|
onClick: c.clear,
|
|
577
703
|
class: "bb:pr-2 bb:h-full"
|
|
578
|
-
}, null, 8, ["onClick"]), [[
|
|
704
|
+
}, null, 8, ["onClick"]), [[y, o.digits.length > 0]])])])])]);
|
|
579
705
|
}
|
|
580
|
-
var
|
|
706
|
+
var qe = /*#__PURE__*/ j(Ve, [["render", Ke]]), Je = {
|
|
581
707
|
components: {
|
|
582
|
-
ElementHeader:
|
|
583
|
-
Eraser:
|
|
708
|
+
ElementHeader: z,
|
|
709
|
+
Eraser: P
|
|
584
710
|
},
|
|
585
711
|
emits: ["update:modelValue", "changed"],
|
|
586
712
|
props: {
|
|
@@ -618,10 +744,10 @@ var we = /*#__PURE__*/ O(ve, [["render", Ce]]), Te = {
|
|
|
618
744
|
this.$emit("update:modelValue", this.search), this.$emit("changed");
|
|
619
745
|
}
|
|
620
746
|
}
|
|
621
|
-
},
|
|
622
|
-
function
|
|
623
|
-
let l =
|
|
624
|
-
return
|
|
747
|
+
}, Ye = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Xe = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ze = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Qe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
748
|
+
function $e(e, t, n, r, o, c) {
|
|
749
|
+
let l = m("element-header"), u = m("eraser");
|
|
750
|
+
return d(), i("div", Ye, [a("div", Xe, [s(l, {
|
|
625
751
|
text: n.header,
|
|
626
752
|
"is-required": n.isRequired,
|
|
627
753
|
"is-loading": n.isLoading
|
|
@@ -629,26 +755,26 @@ function Ae(e, t, n, r, o, c) {
|
|
|
629
755
|
"text",
|
|
630
756
|
"is-required",
|
|
631
757
|
"is-loading"
|
|
632
|
-
]), a("div",
|
|
758
|
+
]), a("div", Ze, [a("label", Qe, [x(a("input", {
|
|
633
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",
|
|
634
760
|
"onUpdate:modelValue": t[0] ||= (e) => o.search = e,
|
|
635
761
|
onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
|
|
636
762
|
}, null, 544), [[
|
|
637
|
-
|
|
763
|
+
v,
|
|
638
764
|
o.search,
|
|
639
765
|
void 0,
|
|
640
766
|
{ trim: !0 }
|
|
641
|
-
]]),
|
|
767
|
+
]]), x(s(u, {
|
|
642
768
|
onClick: c.clearInput,
|
|
643
769
|
class: "bb:pr-2 bb:h-full"
|
|
644
|
-
}, null, 8, ["onClick"]), [[
|
|
770
|
+
}, null, 8, ["onClick"]), [[y, c.inputNeedsEraser]])])])])]);
|
|
645
771
|
}
|
|
646
|
-
var
|
|
772
|
+
var et = /*#__PURE__*/ j(Je, [["render", $e]]), tt = {
|
|
647
773
|
components: {
|
|
648
|
-
ElementHeader:
|
|
649
|
-
PickDay:
|
|
774
|
+
ElementHeader: z,
|
|
775
|
+
PickDay: R
|
|
650
776
|
},
|
|
651
|
-
mixins: [
|
|
777
|
+
mixins: [L],
|
|
652
778
|
emits: [
|
|
653
779
|
"update:dateFrom",
|
|
654
780
|
"update:dateTo",
|
|
@@ -696,10 +822,10 @@ var je = /*#__PURE__*/ O(Te, [["render", Ae]]), Me = {
|
|
|
696
822
|
this.$emit("update:dateTo", e), this.dateTo !== e && this.$emit("changed");
|
|
697
823
|
}
|
|
698
824
|
}
|
|
699
|
-
},
|
|
700
|
-
function
|
|
701
|
-
let l =
|
|
702
|
-
return
|
|
825
|
+
}, nt = { class: "bb-dashboard-ui bb:flex" }, rt = { class: "bb:flex bb:border bb:border-white" }, it = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, at = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
|
|
826
|
+
function ot(e, t, n, r, o, c) {
|
|
827
|
+
let l = m("element-header"), u = m("pick-day");
|
|
828
|
+
return d(), i("div", nt, [a("div", rt, [a("div", it, [s(l, {
|
|
703
829
|
text: n.header,
|
|
704
830
|
"is-required": n.isRequired,
|
|
705
831
|
"is-loading": n.isLoading
|
|
@@ -707,7 +833,7 @@ function Le(e, t, n, r, o, c) {
|
|
|
707
833
|
"text",
|
|
708
834
|
"is-required",
|
|
709
835
|
"is-loading"
|
|
710
|
-
]), a("div",
|
|
836
|
+
]), a("div", at, [s(u, {
|
|
711
837
|
modelValue: o.userDateFrom,
|
|
712
838
|
"onUpdate:modelValue": t[0] ||= (e) => o.userDateFrom = e,
|
|
713
839
|
class: "bb:flex-1 bb:min-w-36 bb:pl-3",
|
|
@@ -717,7 +843,7 @@ function Le(e, t, n, r, o, c) {
|
|
|
717
843
|
"modelValue",
|
|
718
844
|
"placeholder-text",
|
|
719
845
|
"lang"
|
|
720
|
-
]), s(
|
|
846
|
+
]), s(u, {
|
|
721
847
|
modelValue: o.userDateTo,
|
|
722
848
|
"onUpdate:modelValue": t[1] ||= (e) => o.userDateTo = e,
|
|
723
849
|
class: "bb:flex-1 bb:min-w-36 bb:pl-3",
|
|
@@ -729,10 +855,10 @@ function Le(e, t, n, r, o, c) {
|
|
|
729
855
|
"lang"
|
|
730
856
|
])])])])]);
|
|
731
857
|
}
|
|
732
|
-
var
|
|
858
|
+
var st = /*#__PURE__*/ j(tt, [["render", ot]]), ct = {
|
|
733
859
|
components: {
|
|
734
|
-
Popup:
|
|
735
|
-
Eraser:
|
|
860
|
+
Popup: M,
|
|
861
|
+
Eraser: P
|
|
736
862
|
},
|
|
737
863
|
emits: ["update:isOpen", "erased"],
|
|
738
864
|
props: {
|
|
@@ -763,29 +889,29 @@ var Re = /*#__PURE__*/ O(Me, [["render", Le]]), ze = {
|
|
|
763
889
|
computed: { needsEraser() {
|
|
764
890
|
return !this.isOpen && this.hasValue;
|
|
765
891
|
} }
|
|
766
|
-
},
|
|
767
|
-
function
|
|
768
|
-
let
|
|
769
|
-
return
|
|
892
|
+
}, lt = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, ut = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, dt = ["textContent"];
|
|
893
|
+
function ft(e, t, o, c, l, f) {
|
|
894
|
+
let h = m("eraser"), _ = m("popup");
|
|
895
|
+
return d(), i("div", lt, [a("div", ut, [a("button", {
|
|
770
896
|
type: "button",
|
|
771
|
-
class:
|
|
772
|
-
onClick: t[0] ||=
|
|
897
|
+
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
|
+
onClick: t[0] ||= S((t) => e.$emit("update:isOpen", !o.isOpen), ["prevent"])
|
|
773
899
|
}, [a("span", {
|
|
774
900
|
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
|
-
textContent:
|
|
776
|
-
}, null, 8,
|
|
901
|
+
textContent: g(o.title)
|
|
902
|
+
}, null, 8, dt)], 2), f.needsEraser ? (d(), n(h, {
|
|
777
903
|
key: 0,
|
|
778
904
|
onClick: t[1] ||= (t) => e.$emit("erased"),
|
|
779
905
|
class: "bb:pr-2 bb:h-full"
|
|
780
906
|
})) : r("", !0)]), s(_, {
|
|
781
|
-
modelValue:
|
|
782
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
907
|
+
modelValue: l.popupIsOpen,
|
|
908
|
+
"onUpdate:modelValue": t[2] ||= (e) => l.popupIsOpen = e
|
|
783
909
|
}, {
|
|
784
|
-
default:
|
|
910
|
+
default: b(() => [p(e.$slots, "default")]),
|
|
785
911
|
_: 3
|
|
786
912
|
}, 8, ["modelValue"])]);
|
|
787
913
|
}
|
|
788
|
-
var
|
|
914
|
+
var pt = /*#__PURE__*/ j(ct, [["render", ft]]), mt = {
|
|
789
915
|
props: {
|
|
790
916
|
isChecked: {
|
|
791
917
|
type: Boolean,
|
|
@@ -797,31 +923,31 @@ var We = /*#__PURE__*/ O(ze, [["render", Ue]]), Ge = {
|
|
|
797
923
|
methods: { toggle() {
|
|
798
924
|
this.$emit("clicked");
|
|
799
925
|
} }
|
|
800
|
-
},
|
|
926
|
+
}, ht = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, gt = {
|
|
801
927
|
class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
|
|
802
928
|
viewBox: "0 0 20 20"
|
|
803
|
-
},
|
|
804
|
-
function
|
|
805
|
-
return
|
|
929
|
+
}, _t = ["textContent"];
|
|
930
|
+
function vt(e, t, n, r, o, s) {
|
|
931
|
+
return d(), i("button", {
|
|
806
932
|
type: "button",
|
|
807
|
-
onClick: t[0] ||=
|
|
933
|
+
onClick: t[0] ||= S((...e) => s.toggle && s.toggle(...e), ["prevent"]),
|
|
808
934
|
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",
|
|
935
|
+
}, [a("span", ht, [x((d(), i("svg", gt, [...t[1] ||= [a("path", {
|
|
810
936
|
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
937
|
"clip-rule": "evenodd",
|
|
812
938
|
"fill-rule": "evenodd"
|
|
813
|
-
}, null, -1)]], 512)), [[
|
|
939
|
+
}, null, -1)]], 512)), [[y, n.isChecked]])]), a("span", {
|
|
814
940
|
class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none",
|
|
815
|
-
textContent:
|
|
816
|
-
}, null, 8,
|
|
941
|
+
textContent: g(n.name)
|
|
942
|
+
}, null, 8, _t)]);
|
|
817
943
|
}
|
|
818
944
|
//#endregion
|
|
819
945
|
//#region src/components/SelectSingle.vue
|
|
820
|
-
var
|
|
946
|
+
var yt = {
|
|
821
947
|
components: {
|
|
822
|
-
ElementHeader:
|
|
823
|
-
DropdownButton:
|
|
824
|
-
ListElement: /* @__PURE__ */
|
|
948
|
+
ElementHeader: z,
|
|
949
|
+
DropdownButton: pt,
|
|
950
|
+
ListElement: /* @__PURE__ */ j(mt, [["render", vt]])
|
|
825
951
|
},
|
|
826
952
|
emits: ["update:modelValue", "changed"],
|
|
827
953
|
props: {
|
|
@@ -874,10 +1000,10 @@ var Xe = {
|
|
|
874
1000
|
this.$emit("update:modelValue", null), this.$emit("changed");
|
|
875
1001
|
}
|
|
876
1002
|
}
|
|
877
|
-
},
|
|
878
|
-
function
|
|
879
|
-
let h =
|
|
880
|
-
return
|
|
1003
|
+
}, bt = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, xt = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, St = { 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" };
|
|
1004
|
+
function Ct(t, o, c, l, u, p) {
|
|
1005
|
+
let h = m("element-header"), g = m("list-element"), _ = m("dropdown-button");
|
|
1006
|
+
return d(), i("div", bt, [a("div", xt, [s(h, {
|
|
881
1007
|
text: c.header,
|
|
882
1008
|
"is-required": c.isRequired,
|
|
883
1009
|
"is-loading": c.isLoading
|
|
@@ -885,19 +1011,19 @@ function et(t, o, c, l, f, m) {
|
|
|
885
1011
|
"text",
|
|
886
1012
|
"is-required",
|
|
887
1013
|
"is-loading"
|
|
888
|
-
]),
|
|
1014
|
+
]), p.hasItems ? (d(), n(_, {
|
|
889
1015
|
key: 0,
|
|
890
|
-
title:
|
|
891
|
-
"is-open":
|
|
892
|
-
"onUpdate:isOpen": o[0] ||= (e) =>
|
|
893
|
-
"has-value":
|
|
894
|
-
onErased:
|
|
1016
|
+
title: p.activeItemName,
|
|
1017
|
+
"is-open": u.isOpen,
|
|
1018
|
+
"onUpdate:isOpen": o[0] ||= (e) => u.isOpen = e,
|
|
1019
|
+
"has-value": p.hasValue,
|
|
1020
|
+
onErased: p.clear
|
|
895
1021
|
}, {
|
|
896
|
-
default:
|
|
1022
|
+
default: b(() => [a("div", St, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
|
|
897
1023
|
name: e.name,
|
|
898
1024
|
key: e.id,
|
|
899
1025
|
"is-checked": e.id === c.modelValue,
|
|
900
|
-
onClicked: (t) =>
|
|
1026
|
+
onClicked: (t) => p.itemClicked(e)
|
|
901
1027
|
}, null, 8, [
|
|
902
1028
|
"name",
|
|
903
1029
|
"is-checked",
|
|
@@ -911,7 +1037,7 @@ function et(t, o, c, l, f, m) {
|
|
|
911
1037
|
"onErased"
|
|
912
1038
|
])) : r("", !0)])]);
|
|
913
1039
|
}
|
|
914
|
-
var
|
|
1040
|
+
var wt = /*#__PURE__*/ j(yt, [["render", Ct]]), Tt = {
|
|
915
1041
|
props: {
|
|
916
1042
|
text: {
|
|
917
1043
|
type: String,
|
|
@@ -950,10 +1076,10 @@ var tt = /*#__PURE__*/ O(Xe, [["render", et]]), nt = {
|
|
|
950
1076
|
return this.color === "yellow";
|
|
951
1077
|
}
|
|
952
1078
|
}
|
|
953
|
-
},
|
|
954
|
-
function
|
|
955
|
-
return
|
|
956
|
-
class:
|
|
1079
|
+
}, Et = ["textContent"];
|
|
1080
|
+
function Dt(e, t, n, r, a, o) {
|
|
1081
|
+
return d(), i("span", {
|
|
1082
|
+
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", {
|
|
957
1083
|
"bb:bg-green-50 bb:text-gray-700": o.isGreen,
|
|
958
1084
|
"bb:bg-indigo-100 bb:text-gray-700": o.isIndigo,
|
|
959
1085
|
"bb:bg-gray-200 bb:text-gray-700": o.isGray,
|
|
@@ -961,10 +1087,10 @@ function it(e, t, n, r, a, o) {
|
|
|
961
1087
|
"bb:bg-red-100 bb:text-red-800": o.isRed,
|
|
962
1088
|
"bb:bg-yellow-100 bb:text-yellow-800": o.isYellow
|
|
963
1089
|
}]),
|
|
964
|
-
textContent:
|
|
965
|
-
}, null, 10,
|
|
1090
|
+
textContent: g(n.text)
|
|
1091
|
+
}, null, 10, Et);
|
|
966
1092
|
}
|
|
967
|
-
var
|
|
1093
|
+
var H = /*#__PURE__*/ j(Tt, [["render", Dt]]), Ot = {
|
|
968
1094
|
props: {
|
|
969
1095
|
messages: {
|
|
970
1096
|
type: [Object, Array],
|
|
@@ -984,32 +1110,32 @@ var at = /*#__PURE__*/ O(nt, [["render", it]]), ot = {
|
|
|
984
1110
|
return this.type === "dangerous";
|
|
985
1111
|
}
|
|
986
1112
|
}
|
|
987
|
-
},
|
|
988
|
-
function
|
|
989
|
-
return
|
|
1113
|
+
}, kt = { class: "bb:flex" }, At = { class: "bb:shrink-0" }, jt = { class: "bb:ml-3" }, Mt = ["textContent"];
|
|
1114
|
+
function Nt(t, n, o, s, c, l) {
|
|
1115
|
+
return l.hasErrors ? (d(), i("div", {
|
|
990
1116
|
key: 0,
|
|
991
|
-
class:
|
|
992
|
-
}, [a("div",
|
|
993
|
-
class:
|
|
1117
|
+
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", kt, [a("div", At, [(d(), i("svg", {
|
|
1119
|
+
class: u(["bb:h-5 bb:w-5", l.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
|
|
994
1120
|
viewBox: "0 0 20 20",
|
|
995
1121
|
fill: "currentColor"
|
|
996
1122
|
}, [...n[0] ||= [a("path", {
|
|
997
1123
|
"fill-rule": "evenodd",
|
|
998
1124
|
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
1125
|
"clip-rule": "evenodd"
|
|
1000
|
-
}, null, -1)]], 2))]), a("div",
|
|
1001
|
-
class:
|
|
1126
|
+
}, null, -1)]], 2))]), a("div", jt, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
|
|
1127
|
+
class: u(["bb:text-sm bb:leading-5", l.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
|
|
1002
1128
|
key: t,
|
|
1003
|
-
textContent:
|
|
1004
|
-
}, null, 10,
|
|
1129
|
+
textContent: g(e)
|
|
1130
|
+
}, null, 10, Mt))), 128))])])], 2)) : r("", !0);
|
|
1005
1131
|
}
|
|
1006
|
-
var
|
|
1007
|
-
function
|
|
1008
|
-
return
|
|
1132
|
+
var Pt = /*#__PURE__*/ j(Ot, [["render", Nt]]), Ft = { emits: ["clicked"] };
|
|
1133
|
+
function It(e, t, n, r, o, s) {
|
|
1134
|
+
return d(), i("button", {
|
|
1009
1135
|
type: "button",
|
|
1010
1136
|
tabindex: "-1",
|
|
1011
1137
|
class: "bb-dashboard-ui bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-400 bb:focus:outline-hidden bb:hover:text-gray-600",
|
|
1012
|
-
onClick: t[0] ||=
|
|
1138
|
+
onClick: t[0] ||= S((t) => e.$emit("clicked"), ["prevent"])
|
|
1013
1139
|
}, [...t[1] ||= [a("svg", {
|
|
1014
1140
|
class: "bb:w-full bb:h-full bb:stroke-current",
|
|
1015
1141
|
fill: "none",
|
|
@@ -1021,15 +1147,15 @@ function mt(e, t, n, r, o, s) {
|
|
|
1021
1147
|
d: "M6 18L18 6M6 6l12 12"
|
|
1022
1148
|
})], -1)]]);
|
|
1023
1149
|
}
|
|
1024
|
-
var
|
|
1150
|
+
var U = /*#__PURE__*/ j(Ft, [["render", It]]), Lt = {}, Rt = {
|
|
1025
1151
|
class: "bb:w-4 bb:h-4",
|
|
1026
1152
|
fill: "none",
|
|
1027
1153
|
stroke: "currentColor",
|
|
1028
1154
|
viewBox: "0 0 24 24",
|
|
1029
1155
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1030
1156
|
};
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
1157
|
+
function zt(e, t, n, r, o, s) {
|
|
1158
|
+
return d(), i("svg", Rt, [...t[0] ||= [a("path", {
|
|
1033
1159
|
"stroke-linecap": "round",
|
|
1034
1160
|
"stroke-linejoin": "round",
|
|
1035
1161
|
"stroke-width": "2",
|
|
@@ -1038,9 +1164,9 @@ function _t(e, t, n, r, o, s) {
|
|
|
1038
1164
|
}
|
|
1039
1165
|
//#endregion
|
|
1040
1166
|
//#region src/components/DownloadLink.vue
|
|
1041
|
-
var
|
|
1042
|
-
components: { "download-icon": /* @__PURE__ */
|
|
1043
|
-
mixins: [
|
|
1167
|
+
var Bt = {
|
|
1168
|
+
components: { "download-icon": /* @__PURE__ */ j(Lt, [["render", zt]]) },
|
|
1169
|
+
mixins: [L],
|
|
1044
1170
|
props: {
|
|
1045
1171
|
url: {
|
|
1046
1172
|
type: String,
|
|
@@ -1054,16 +1180,16 @@ var vt = {
|
|
|
1054
1180
|
computed: { label() {
|
|
1055
1181
|
return this.title ?? this.texts.download;
|
|
1056
1182
|
} }
|
|
1057
|
-
},
|
|
1058
|
-
function
|
|
1059
|
-
let l =
|
|
1060
|
-
return
|
|
1183
|
+
}, Vt = ["href", "title"], Ht = { class: "bb:ml-1" };
|
|
1184
|
+
function Ut(e, t, n, r, o, c) {
|
|
1185
|
+
let l = m("download-icon");
|
|
1186
|
+
return d(), i("a", {
|
|
1061
1187
|
href: n.url,
|
|
1062
1188
|
title: c.label,
|
|
1063
1189
|
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",
|
|
1190
|
+
}, [s(l), a("span", Ht, g(c.label), 1)], 8, Vt);
|
|
1065
1191
|
}
|
|
1066
|
-
var
|
|
1192
|
+
var Wt = /*#__PURE__*/ j(Bt, [["render", Ut]]), Gt = { props: {
|
|
1067
1193
|
isOpen: {
|
|
1068
1194
|
type: Boolean,
|
|
1069
1195
|
default: !1
|
|
@@ -1072,9 +1198,9 @@ var St = /*#__PURE__*/ O(vt, [["render", xt]]), Ct = { props: {
|
|
|
1072
1198
|
type: String,
|
|
1073
1199
|
required: !0
|
|
1074
1200
|
}
|
|
1075
|
-
} },
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1201
|
+
} }, 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" }, qt = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Jt = ["aria-labelledby"];
|
|
1202
|
+
function Yt(e, n, r, o, c, l) {
|
|
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", Kt, [
|
|
1078
1204
|
s(t, {
|
|
1079
1205
|
"enter-active-class": "bb:ease-out bb:duration-300",
|
|
1080
1206
|
"enter-from-class": "bb:opacity-0",
|
|
@@ -1083,7 +1209,7 @@ function Dt(e, n, r, o, c, d) {
|
|
|
1083
1209
|
"leave-from-class": "bb:opacity-100",
|
|
1084
1210
|
"leave-to-class": "bb:opacity-0"
|
|
1085
1211
|
}, {
|
|
1086
|
-
default:
|
|
1212
|
+
default: b(() => [x(a("div", qt, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
|
|
1087
1213
|
_: 1
|
|
1088
1214
|
}),
|
|
1089
1215
|
n[1] ||= a("span", { class: "bb:hidden bb:sm:inline-block bb:sm:align-middle bb:sm:h-screen" }, null, -1),
|
|
@@ -1095,17 +1221,17 @@ function Dt(e, n, r, o, c, d) {
|
|
|
1095
1221
|
"leave-from-class": "bb:opacity-100 bb:translate-y-0 bb:sm:scale-100",
|
|
1096
1222
|
"leave-to-class": "bb:opacity-0 bb:translate-y-4 bb:sm:translate-y-0 bb:sm:scale-95"
|
|
1097
1223
|
}, {
|
|
1098
|
-
default:
|
|
1224
|
+
default: b(() => [x(a("div", {
|
|
1099
1225
|
class: "bb:relative bb:inline-block bb:align-bottom bb:bg-white bb:rounded-lg bb:text-left bb:overflow-visible bb:shadow-xl bb:transition-all bb:sm:my-8 bb:sm:align-middle bb:sm:max-w-lg bb:sm:w-full",
|
|
1100
1226
|
role: "dialog",
|
|
1101
1227
|
"aria-modal": "true",
|
|
1102
1228
|
"aria-labelledby": r.headingId
|
|
1103
|
-
}, [
|
|
1229
|
+
}, [p(e.$slots, "default")], 8, Jt), [[y, r.isOpen]])]),
|
|
1104
1230
|
_: 3
|
|
1105
1231
|
})
|
|
1106
1232
|
])], 2);
|
|
1107
1233
|
}
|
|
1108
|
-
var
|
|
1234
|
+
var Xt = /*#__PURE__*/ j(Gt, [["render", Yt]]), Zt = {}, Qt = {
|
|
1109
1235
|
class: "bb:h-7 bb:w-7 bb:text-red-600",
|
|
1110
1236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1111
1237
|
fill: "none",
|
|
@@ -1113,35 +1239,35 @@ var Ot = /*#__PURE__*/ O(Ct, [["render", Dt]]), kt = {}, At = {
|
|
|
1113
1239
|
stroke: "currentColor",
|
|
1114
1240
|
"aria-hidden": "true"
|
|
1115
1241
|
};
|
|
1116
|
-
function
|
|
1117
|
-
return
|
|
1242
|
+
function $t(e, t, n, r, o, s) {
|
|
1243
|
+
return d(), i("svg", Qt, [...t[0] ||= [a("path", {
|
|
1118
1244
|
"stroke-linecap": "round",
|
|
1119
1245
|
"stroke-linejoin": "round",
|
|
1120
1246
|
"stroke-width": "2",
|
|
1121
1247
|
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
1248
|
}, null, -1)]]);
|
|
1123
1249
|
}
|
|
1124
|
-
var
|
|
1250
|
+
var W = /*#__PURE__*/ j(Zt, [["render", $t]]), en = {}, tn = {
|
|
1125
1251
|
class: "bb:h-7 bb:w-7 bb:text-yellow-400",
|
|
1126
1252
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1127
1253
|
viewBox: "0 0 20 20",
|
|
1128
1254
|
fill: "currentColor",
|
|
1129
1255
|
"aria-hidden": "true"
|
|
1130
1256
|
};
|
|
1131
|
-
function
|
|
1132
|
-
return
|
|
1257
|
+
function nn(e, t, n, r, o, s) {
|
|
1258
|
+
return d(), i("svg", tn, [...t[0] ||= [a("path", {
|
|
1133
1259
|
"fill-rule": "evenodd",
|
|
1134
1260
|
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
1261
|
"clip-rule": "evenodd"
|
|
1136
1262
|
}, null, -1)]]);
|
|
1137
1263
|
}
|
|
1138
|
-
var
|
|
1264
|
+
var G = /*#__PURE__*/ j(en, [["render", nn]]), rn = {
|
|
1139
1265
|
components: {
|
|
1140
|
-
Modal:
|
|
1141
|
-
Dangerous:
|
|
1142
|
-
Warning:
|
|
1266
|
+
Modal: Xt,
|
|
1267
|
+
Dangerous: W,
|
|
1268
|
+
Warning: G
|
|
1143
1269
|
},
|
|
1144
|
-
mixins: [
|
|
1270
|
+
mixins: [L],
|
|
1145
1271
|
emits: ["actionConfirmed", "actionCanceled"],
|
|
1146
1272
|
props: {
|
|
1147
1273
|
isOpen: {
|
|
@@ -1171,7 +1297,7 @@ var X = /*#__PURE__*/ O(Mt, [["render", Pt]]), Ft = {
|
|
|
1171
1297
|
}
|
|
1172
1298
|
},
|
|
1173
1299
|
setup() {
|
|
1174
|
-
return { headingId:
|
|
1300
|
+
return { headingId: _() };
|
|
1175
1301
|
},
|
|
1176
1302
|
computed: {
|
|
1177
1303
|
isDangerous() {
|
|
@@ -1181,69 +1307,130 @@ var X = /*#__PURE__*/ O(Mt, [["render", Pt]]), Ft = {
|
|
|
1181
1307
|
return this.type === "warning";
|
|
1182
1308
|
}
|
|
1183
1309
|
}
|
|
1184
|
-
},
|
|
1185
|
-
function
|
|
1186
|
-
let
|
|
1187
|
-
return
|
|
1310
|
+
}, an = { 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" }, on = { class: "bb:sm:flex bb:sm:items-start" }, sn = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, cn = ["id"], ln = { class: "bb:mt-2" }, un = { class: "bb:text-sm bb:text-gray-500" }, dn = { 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" };
|
|
1311
|
+
function fn(e, t, i, o, s, c) {
|
|
1312
|
+
let l = m("warning"), f = m("dangerous"), p = m("modal");
|
|
1313
|
+
return d(), n(p, {
|
|
1188
1314
|
"is-open": i.isOpen,
|
|
1189
1315
|
"heading-id": o.headingId
|
|
1190
1316
|
}, {
|
|
1191
|
-
default:
|
|
1317
|
+
default: b(() => [a("div", an, [a("div", on, [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", {
|
|
1192
1318
|
"bb:bg-red-100": c.isDangerous,
|
|
1193
1319
|
"bb:bg-yellow-100": c.isWarning
|
|
1194
|
-
}]) }, [c.isWarning ? (
|
|
1320
|
+
}]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", sn, [a("h3", {
|
|
1195
1321
|
class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
|
|
1196
1322
|
id: o.headingId
|
|
1197
|
-
},
|
|
1323
|
+
}, g(i.confirmationHeading), 9, cn), a("div", ln, [a("p", un, g(i.confirmationText), 1)])])])]), a("div", dn, [a("button", {
|
|
1198
1324
|
type: "button",
|
|
1199
|
-
class:
|
|
1325
|
+
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", {
|
|
1200
1326
|
"bb:bg-red-600 bb:hover:bg-red-700 bb:focus:ring-red-500": c.isDangerous,
|
|
1201
1327
|
"bb:bg-yellow-400 bb:hover:bg-yellow-500 bb:focus:ring-yellow-300": c.isWarning
|
|
1202
1328
|
}]),
|
|
1203
|
-
onClick: t[0] ||=
|
|
1204
|
-
},
|
|
1329
|
+
onClick: t[0] ||= S((t) => e.$emit("actionConfirmed"), ["prevent"])
|
|
1330
|
+
}, g(i.actionButtonText), 3), a("button", {
|
|
1205
1331
|
type: "button",
|
|
1206
1332
|
class: "bb:mt-3 bb:w-full bb:inline-flex bb:justify-center bb:rounded-md bb:border bb:border-gray-300 bb:shadow-xs bb:px-4 bb:py-2 bb:bg-white bb:text-base bb:font-medium bb:text-gray-700 bb:hover:bg-gray-50 bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:focus:ring-indigo-500 bb:sm:mt-0 bb:sm:ml-3 bb:sm:w-auto bb:sm:text-sm",
|
|
1207
|
-
onClick: t[1] ||=
|
|
1208
|
-
},
|
|
1333
|
+
onClick: t[1] ||= S((t) => e.$emit("actionCanceled"), ["prevent"])
|
|
1334
|
+
}, g(i.cancelButtonText ?? e.texts.cancel), 1)])]),
|
|
1209
1335
|
_: 1
|
|
1210
1336
|
}, 8, ["is-open", "heading-id"]);
|
|
1211
1337
|
}
|
|
1212
|
-
var
|
|
1213
|
-
|
|
1214
|
-
|
|
1338
|
+
var pn = /*#__PURE__*/ j(rn, [["render", fn]]), K = 4, q = 8;
|
|
1339
|
+
function J(e) {
|
|
1340
|
+
return typeof e?.showPopover == "function";
|
|
1341
|
+
}
|
|
1342
|
+
function Y(e) {
|
|
1343
|
+
return J(e) && e.matches(":popover-open");
|
|
1344
|
+
}
|
|
1345
|
+
function mn(e, t, { maxWidth: n = null } = {}) {
|
|
1346
|
+
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;
|
|
1347
|
+
Object.assign(t.style, {
|
|
1348
|
+
top: u ? `${r.bottom + K}px` : "auto",
|
|
1349
|
+
bottom: u ? "auto" : `${a - r.top + K}px`,
|
|
1350
|
+
right: `${o}px`,
|
|
1351
|
+
left: "auto",
|
|
1352
|
+
maxHeight: `${u ? c : l}px`
|
|
1353
|
+
}), n !== null && (t.style.maxWidth = `${Math.min(n, s)}px`);
|
|
1354
|
+
}
|
|
1355
|
+
function hn(e, t) {
|
|
1356
|
+
let n = (n) => {
|
|
1357
|
+
e.contains(n.target) || t();
|
|
1358
|
+
};
|
|
1359
|
+
return window.addEventListener("scroll", n, {
|
|
1360
|
+
capture: !0,
|
|
1361
|
+
passive: !0
|
|
1362
|
+
}), window.addEventListener("resize", t), () => {
|
|
1363
|
+
window.removeEventListener("scroll", n, { capture: !0 }), window.removeEventListener("resize", t);
|
|
1364
|
+
};
|
|
1365
|
+
}
|
|
1366
|
+
//#endregion
|
|
1367
|
+
//#region src/components/DropdownButtonWithAction.vue
|
|
1368
|
+
var gn = 224, _n = {
|
|
1369
|
+
mixins: [L],
|
|
1215
1370
|
emits: ["update:modelValue"],
|
|
1216
1371
|
props: { modelValue: {
|
|
1217
1372
|
type: Boolean,
|
|
1218
1373
|
default: !1
|
|
1219
1374
|
} },
|
|
1220
1375
|
setup() {
|
|
1221
|
-
return {
|
|
1376
|
+
return {
|
|
1377
|
+
menuButtonId: _(),
|
|
1378
|
+
menuId: _()
|
|
1379
|
+
};
|
|
1222
1380
|
},
|
|
1223
1381
|
data() {
|
|
1224
|
-
return {
|
|
1382
|
+
return { menuIsOpen: this.modelValue };
|
|
1225
1383
|
},
|
|
1226
1384
|
watch: { modelValue(e) {
|
|
1227
|
-
this.
|
|
1385
|
+
this.menuIsOpen = e, this.applyMenuState();
|
|
1228
1386
|
} },
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1387
|
+
created() {
|
|
1388
|
+
this.stopClosing = null;
|
|
1389
|
+
},
|
|
1390
|
+
mounted() {
|
|
1391
|
+
this.applyMenuState();
|
|
1392
|
+
},
|
|
1393
|
+
beforeUnmount() {
|
|
1394
|
+
this.stopListening();
|
|
1395
|
+
},
|
|
1396
|
+
methods: {
|
|
1397
|
+
applyMenuState() {
|
|
1398
|
+
let e = this.$refs.menu;
|
|
1399
|
+
J(e) && e.isConnected && (this.menuIsOpen && !Y(e) && e.showPopover(), !this.menuIsOpen && Y(e) && e.hidePopover());
|
|
1400
|
+
},
|
|
1401
|
+
close() {
|
|
1402
|
+
let e = this.$refs.menu;
|
|
1403
|
+
Y(e) && e.hidePopover();
|
|
1404
|
+
},
|
|
1405
|
+
onBeforeToggle(e) {
|
|
1406
|
+
e.newState === "open" && mn(this.$refs.arrow, this.$refs.menu, { maxWidth: gn });
|
|
1407
|
+
},
|
|
1408
|
+
onToggle(e) {
|
|
1409
|
+
this.stopListening();
|
|
1410
|
+
let t = this.$refs.menu;
|
|
1411
|
+
Y(t) && (this.stopClosing = hn(t, this.close));
|
|
1412
|
+
let n = e.newState === "open";
|
|
1413
|
+
n !== this.menuIsOpen && (this.menuIsOpen = n, this.$emit("update:modelValue", n));
|
|
1414
|
+
},
|
|
1415
|
+
stopListening() {
|
|
1416
|
+
this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
}, vn = { class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md" }, yn = {
|
|
1233
1420
|
key: 0,
|
|
1234
1421
|
class: "bb:-ml-px bb:relative bb:block"
|
|
1235
|
-
},
|
|
1236
|
-
function
|
|
1237
|
-
|
|
1238
|
-
return u(), i("span", Kt, [a("button", {
|
|
1422
|
+
}, bn = ["id", "popovertarget"], xn = { class: "bb:sr-only" }, Sn = ["id", "aria-labelledby"];
|
|
1423
|
+
function Cn(e, t, n, o, s, c) {
|
|
1424
|
+
return d(), i("span", vn, [a("button", {
|
|
1239
1425
|
type: "button",
|
|
1240
|
-
class:
|
|
1241
|
-
}, [
|
|
1242
|
-
|
|
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": !e.$slots.actions }])
|
|
1427
|
+
}, [p(e.$slots, "button")], 2), e.$slots.actions ? (d(), i("span", yn, [a("button", {
|
|
1428
|
+
ref: "arrow",
|
|
1243
1429
|
id: o.menuButtonId,
|
|
1244
1430
|
type: "button",
|
|
1431
|
+
popovertarget: o.menuId,
|
|
1245
1432
|
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",
|
|
1433
|
+
}, [a("span", xn, g(e.texts.openMenu), 1), t[3] ||= a("svg", {
|
|
1247
1434
|
class: "bb:h-5 bb:w-5",
|
|
1248
1435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1249
1436
|
viewBox: "0 0 20 20",
|
|
@@ -1253,72 +1440,70 @@ function Zt(e, t, n, o, c, d) {
|
|
|
1253
1440
|
"fill-rule": "evenodd",
|
|
1254
1441
|
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
1442
|
"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)]);
|
|
1443
|
+
})], -1)], 8, bn), a("div", {
|
|
1444
|
+
ref: "menu",
|
|
1445
|
+
id: o.menuId,
|
|
1446
|
+
popover: "auto",
|
|
1447
|
+
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",
|
|
1448
|
+
role: "menu",
|
|
1449
|
+
"aria-orientation": "vertical",
|
|
1450
|
+
"aria-labelledby": o.menuButtonId,
|
|
1451
|
+
onBeforetoggle: t[0] ||= (...e) => c.onBeforeToggle && c.onBeforeToggle(...e),
|
|
1452
|
+
onToggle: t[1] ||= (...e) => c.onToggle && c.onToggle(...e),
|
|
1453
|
+
onClick: t[2] ||= (...e) => c.close && c.close(...e)
|
|
1454
|
+
}, [p(e.$slots, "actions")], 40, Sn)])) : r("", !0)]);
|
|
1270
1455
|
}
|
|
1271
|
-
var
|
|
1456
|
+
var wn = /*#__PURE__*/ j(_n, [["render", Cn]]), Tn = {}, En = {
|
|
1272
1457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1273
1458
|
viewBox: "0 0 20 20",
|
|
1274
1459
|
fill: "currentColor",
|
|
1275
1460
|
"aria-hidden": "true"
|
|
1276
1461
|
};
|
|
1277
|
-
function
|
|
1278
|
-
return
|
|
1462
|
+
function Dn(e, t, n, r, o, s) {
|
|
1463
|
+
return d(), i("svg", En, [...t[0] ||= [a("path", {
|
|
1279
1464
|
"fill-rule": "evenodd",
|
|
1280
1465
|
"clip-rule": "evenodd",
|
|
1281
1466
|
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
1467
|
}, null, -1)]]);
|
|
1283
1468
|
}
|
|
1284
|
-
var
|
|
1469
|
+
var On = /*#__PURE__*/ j(Tn, [["render", Dn]]), kn = {}, An = {
|
|
1285
1470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1286
1471
|
viewBox: "0 0 20 20",
|
|
1287
1472
|
fill: "currentColor",
|
|
1288
1473
|
"aria-hidden": "true"
|
|
1289
1474
|
};
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1475
|
+
function jn(e, t, n, r, o, s) {
|
|
1476
|
+
return d(), i("svg", An, [...t[0] ||= [a("path", {
|
|
1292
1477
|
"fill-rule": "evenodd",
|
|
1293
1478
|
"clip-rule": "evenodd",
|
|
1294
1479
|
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
1480
|
}, null, -1)]]);
|
|
1296
1481
|
}
|
|
1297
|
-
var
|
|
1482
|
+
var Mn = /*#__PURE__*/ j(kn, [["render", jn]]);
|
|
1298
1483
|
//#endregion
|
|
1299
1484
|
//#region src/navigation.js
|
|
1300
|
-
function
|
|
1485
|
+
function Nn(e) {
|
|
1301
1486
|
let t = e.currentTarget?.target ?? "";
|
|
1302
1487
|
return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
|
|
1303
1488
|
}
|
|
1304
|
-
var
|
|
1305
|
-
inject:
|
|
1489
|
+
var X = {
|
|
1490
|
+
inject: A,
|
|
1306
1491
|
methods: { followLink(e, t) {
|
|
1307
1492
|
let n = this.uiSettings.navigate;
|
|
1308
|
-
n !== null &&
|
|
1493
|
+
n !== null && Nn(e) && (e.preventDefault(), n(t));
|
|
1309
1494
|
} }
|
|
1310
1495
|
};
|
|
1311
1496
|
//#endregion
|
|
1312
1497
|
//#region src/components/Pagination.vue
|
|
1313
|
-
function
|
|
1498
|
+
function Z(e) {
|
|
1314
1499
|
return typeof e == "string" && e !== "" ? e : null;
|
|
1315
1500
|
}
|
|
1316
|
-
var
|
|
1501
|
+
var Pn = {
|
|
1317
1502
|
components: {
|
|
1318
|
-
ArrowNarrowLeft:
|
|
1319
|
-
ArrowNarrowRight:
|
|
1503
|
+
ArrowNarrowLeft: On,
|
|
1504
|
+
ArrowNarrowRight: Mn
|
|
1320
1505
|
},
|
|
1321
|
-
mixins: [
|
|
1506
|
+
mixins: [L, X],
|
|
1322
1507
|
props: {
|
|
1323
1508
|
links: {
|
|
1324
1509
|
type: Object,
|
|
@@ -1346,45 +1531,231 @@ var ln = {
|
|
|
1346
1531
|
return typeof this.from == "number" && typeof this.to == "number";
|
|
1347
1532
|
},
|
|
1348
1533
|
previousPageUrl() {
|
|
1349
|
-
return
|
|
1534
|
+
return Z(this.links?.prev);
|
|
1350
1535
|
},
|
|
1351
1536
|
nextPageUrl() {
|
|
1352
|
-
return
|
|
1537
|
+
return Z(this.links?.next);
|
|
1353
1538
|
}
|
|
1354
1539
|
}
|
|
1355
|
-
},
|
|
1540
|
+
}, Fn = {
|
|
1356
1541
|
key: 0,
|
|
1357
1542
|
class: "bb-dashboard-ui bb:px-4 bb:flex bb:items-center bb:justify-between bb:sm:px-0"
|
|
1358
|
-
},
|
|
1543
|
+
}, In = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Ln = ["href"], Rn = {
|
|
1359
1544
|
key: 0,
|
|
1360
1545
|
class: "bb:hidden bb:md:-mt-px bb:md:flex bb:text-gray-400 bb:text-sm bb:leading-5"
|
|
1361
|
-
},
|
|
1362
|
-
function
|
|
1363
|
-
let f =
|
|
1364
|
-
return
|
|
1365
|
-
a("div",
|
|
1546
|
+
}, zn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Bn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Vn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, Hn = ["href"];
|
|
1547
|
+
function Un(e, t, n, c, l, u) {
|
|
1548
|
+
let f = m("arrow-narrow-left"), p = m("arrow-narrow-right");
|
|
1549
|
+
return u.hasResults ? (d(), i("nav", Fn, [
|
|
1550
|
+
a("div", In, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
|
|
1366
1551
|
key: 0,
|
|
1367
|
-
href:
|
|
1552
|
+
href: u.previousPageUrl,
|
|
1368
1553
|
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
|
-
onClick: t[0] ||= (t) => e.followLink(t,
|
|
1370
|
-
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " +
|
|
1371
|
-
|
|
1372
|
-
o(
|
|
1373
|
-
a("span",
|
|
1374
|
-
o(" " +
|
|
1375
|
-
a("span",
|
|
1376
|
-
o(" " +
|
|
1554
|
+
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, Ln))]),
|
|
1556
|
+
u.hasRange ? (d(), i("div", Rn, [
|
|
1557
|
+
o(g(e.texts.resultsBefore) + " ", 1),
|
|
1558
|
+
a("span", zn, g(u.from) + " - " + g(u.to), 1),
|
|
1559
|
+
o(" " + g(e.texts.resultsOf) + " ", 1),
|
|
1560
|
+
a("span", Bn, g(u.total), 1),
|
|
1561
|
+
o(" " + g(e.texts.resultsAfter), 1)
|
|
1377
1562
|
])) : r("", !0),
|
|
1378
|
-
a("div",
|
|
1563
|
+
a("div", Vn, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
|
|
1379
1564
|
key: 0,
|
|
1380
|
-
href:
|
|
1565
|
+
href: u.nextPageUrl,
|
|
1381
1566
|
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
|
-
onClick: t[1] ||= (t) => e.followLink(t,
|
|
1383
|
-
}, [o(
|
|
1567
|
+
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, Hn))])
|
|
1384
1569
|
])) : r("", !0);
|
|
1385
1570
|
}
|
|
1386
|
-
var
|
|
1387
|
-
|
|
1571
|
+
var Wn = /*#__PURE__*/ j(Pn, [["render", Un]]), Gn = [
|
|
1572
|
+
"left",
|
|
1573
|
+
"center",
|
|
1574
|
+
"right"
|
|
1575
|
+
], Kn = ["red", "green"];
|
|
1576
|
+
function qn(e) {
|
|
1577
|
+
if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
|
|
1578
|
+
let t = e.key;
|
|
1579
|
+
return {
|
|
1580
|
+
key: t,
|
|
1581
|
+
label: typeof e.label == "string" ? e.label : "",
|
|
1582
|
+
value: typeof e.value == "function" ? e.value : (e) => e?.[t],
|
|
1583
|
+
secondary: typeof e.secondary == "function" ? e.secondary : null,
|
|
1584
|
+
muted: e.muted === !0,
|
|
1585
|
+
align: Gn.includes(e.align) ? e.align : "left",
|
|
1586
|
+
wrap: e.wrap === !0,
|
|
1587
|
+
narrow: e.narrow === !0,
|
|
1588
|
+
visible: e.visible !== !1
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
function Q(e) {
|
|
1592
|
+
return typeof e == "string" && e !== "" ? e : null;
|
|
1593
|
+
}
|
|
1594
|
+
var Jn = {
|
|
1595
|
+
components: {
|
|
1596
|
+
Pagination: Wn,
|
|
1597
|
+
SmallBadge: H
|
|
1598
|
+
},
|
|
1599
|
+
mixins: [L],
|
|
1600
|
+
props: {
|
|
1601
|
+
rows: {
|
|
1602
|
+
type: Array,
|
|
1603
|
+
required: !0
|
|
1604
|
+
},
|
|
1605
|
+
columns: {
|
|
1606
|
+
type: Array,
|
|
1607
|
+
required: !0
|
|
1608
|
+
},
|
|
1609
|
+
rowKey: {
|
|
1610
|
+
type: [String, Function],
|
|
1611
|
+
required: !0
|
|
1612
|
+
},
|
|
1613
|
+
meta: {
|
|
1614
|
+
type: Object,
|
|
1615
|
+
default: null
|
|
1616
|
+
},
|
|
1617
|
+
links: {
|
|
1618
|
+
type: Object,
|
|
1619
|
+
default: null
|
|
1620
|
+
},
|
|
1621
|
+
foundText: {
|
|
1622
|
+
type: String,
|
|
1623
|
+
default: null
|
|
1624
|
+
},
|
|
1625
|
+
emptyText: {
|
|
1626
|
+
type: String,
|
|
1627
|
+
default: null
|
|
1628
|
+
},
|
|
1629
|
+
variant: {
|
|
1630
|
+
type: String,
|
|
1631
|
+
default: "page",
|
|
1632
|
+
validator: (e) => ["page", "card"].indexOf(e) !== -1
|
|
1633
|
+
},
|
|
1634
|
+
rowColor: {
|
|
1635
|
+
type: Function,
|
|
1636
|
+
default: null
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
computed: {
|
|
1640
|
+
normalizedRows() {
|
|
1641
|
+
return Array.isArray(this.rows) ? this.rows : [];
|
|
1642
|
+
},
|
|
1643
|
+
visibleColumns() {
|
|
1644
|
+
return (Array.isArray(this.columns) ? this.columns : []).map(qn).filter((e) => e !== null && e.visible);
|
|
1645
|
+
},
|
|
1646
|
+
isCard() {
|
|
1647
|
+
return this.variant === "card";
|
|
1648
|
+
},
|
|
1649
|
+
hasMeta() {
|
|
1650
|
+
return this.meta !== null && typeof this.meta == "object";
|
|
1651
|
+
},
|
|
1652
|
+
recordCount() {
|
|
1653
|
+
return this.hasMeta && typeof this.meta.total == "number" ? this.meta.total : this.normalizedRows.length;
|
|
1654
|
+
},
|
|
1655
|
+
hasRecords() {
|
|
1656
|
+
return this.recordCount > 0;
|
|
1657
|
+
},
|
|
1658
|
+
badgeText() {
|
|
1659
|
+
if (this.hasRecords) {
|
|
1660
|
+
let e = Q(this.foundText);
|
|
1661
|
+
return e === null ? null : `${e}: ${this.recordCount}`;
|
|
1662
|
+
}
|
|
1663
|
+
return Q(this.emptyText);
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
methods: {
|
|
1667
|
+
hasBadgeRow() {
|
|
1668
|
+
return this.badgeText !== null || this.hasRecords && this.$slots["results-actions"] !== void 0;
|
|
1669
|
+
},
|
|
1670
|
+
keyOf(e, t) {
|
|
1671
|
+
let n;
|
|
1672
|
+
if (typeof this.rowKey == "function") try {
|
|
1673
|
+
n = this.rowKey(e);
|
|
1674
|
+
} catch {
|
|
1675
|
+
n = void 0;
|
|
1676
|
+
}
|
|
1677
|
+
else typeof this.rowKey == "string" && (n = e?.[this.rowKey]);
|
|
1678
|
+
return n ?? `row-${t}`;
|
|
1679
|
+
},
|
|
1680
|
+
colorOf(e) {
|
|
1681
|
+
if (typeof this.rowColor != "function") return null;
|
|
1682
|
+
let t = this.rowColor(e);
|
|
1683
|
+
return Kn.includes(t) ? t : null;
|
|
1684
|
+
},
|
|
1685
|
+
textOf(e, t) {
|
|
1686
|
+
let n = e(t);
|
|
1687
|
+
return n == null ? "" : String(n);
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
}, Yn = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, Xn = { class: "bb:bg-gray-50" }, Zn = ["textContent"], Qn = { class: "bb:divide-y bb:divide-gray-200" }, $n = ["textContent"], er = ["textContent"];
|
|
1691
|
+
function tr(t, o, s, c, l, h) {
|
|
1692
|
+
let _ = m("small-badge"), v = m("pagination");
|
|
1693
|
+
return d(), i("div", null, [
|
|
1694
|
+
h.hasBadgeRow() ? (d(), i("div", {
|
|
1695
|
+
key: 0,
|
|
1696
|
+
class: u(["bb:flex bb:justify-center bb:items-center bb:space-x-2", h.isCard ? "" : "bb:my-4"])
|
|
1697
|
+
}, [h.badgeText === null ? r("", !0) : (d(), n(_, {
|
|
1698
|
+
key: 0,
|
|
1699
|
+
text: h.badgeText,
|
|
1700
|
+
color: "indigo"
|
|
1701
|
+
}, null, 8, ["text"])), h.hasRecords ? p(t.$slots, "results-actions", {}, void 0, void 0, 1) : r("", !0)], 2)) : r("", !0),
|
|
1702
|
+
h.normalizedRows.length > 0 ? (d(), i("div", {
|
|
1703
|
+
key: 1,
|
|
1704
|
+
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", Yn, [a("thead", null, [a("tr", Xn, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
|
|
1706
|
+
key: e.key,
|
|
1707
|
+
scope: "col",
|
|
1708
|
+
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", [{
|
|
1709
|
+
"bb:text-left": e.align === "left",
|
|
1710
|
+
"bb:text-center": e.align === "center",
|
|
1711
|
+
"bb:text-right": e.align === "right"
|
|
1712
|
+
}, { "bb:w-px": e.narrow }]]),
|
|
1713
|
+
textContent: g(e.label)
|
|
1714
|
+
}, null, 10, Zn))), 128))])]), a("tbody", Qn, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
|
|
1715
|
+
key: h.keyOf(n, o),
|
|
1716
|
+
class: u({
|
|
1717
|
+
"bb:bg-white bb:even:bg-gray-50": h.colorOf(n) === null,
|
|
1718
|
+
"bb:bg-red-50": h.colorOf(n) === "red",
|
|
1719
|
+
"bb:bg-green-50": h.colorOf(n) === "green"
|
|
1720
|
+
})
|
|
1721
|
+
}, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("td", {
|
|
1722
|
+
key: e.key,
|
|
1723
|
+
class: u(["bb:px-6 bb:py-4 bb:align-top bb:relative bb:text-sm bb:leading-5", [
|
|
1724
|
+
{ "bb:whitespace-nowrap": !e.wrap },
|
|
1725
|
+
{
|
|
1726
|
+
"bb:text-left": e.align === "left",
|
|
1727
|
+
"bb:text-center": e.align === "center",
|
|
1728
|
+
"bb:text-right": e.align === "right"
|
|
1729
|
+
},
|
|
1730
|
+
{ "bb:w-px": e.narrow }
|
|
1731
|
+
]])
|
|
1732
|
+
}, [p(t.$slots, `cell-${e.key}`, {
|
|
1733
|
+
row: n,
|
|
1734
|
+
index: o
|
|
1735
|
+
}, () => [a("div", {
|
|
1736
|
+
class: u(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
|
|
1737
|
+
textContent: g(h.textOf(e.value, n))
|
|
1738
|
+
}, null, 10, $n), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
|
|
1739
|
+
key: 0,
|
|
1740
|
+
class: "bb:text-gray-400",
|
|
1741
|
+
textContent: g(h.textOf(e.secondary, n))
|
|
1742
|
+
}, null, 8, er)) : r("", !0)])], 2))), 128))], 2))), 128))])])], 2)], 2)) : r("", !0),
|
|
1743
|
+
h.hasMeta ? (d(), n(v, {
|
|
1744
|
+
key: 2,
|
|
1745
|
+
meta: s.meta,
|
|
1746
|
+
links: s.links ?? {},
|
|
1747
|
+
lang: t.lang,
|
|
1748
|
+
class: u(h.isCard ? "bb:mt-4" : "bb:mt-6")
|
|
1749
|
+
}, null, 8, [
|
|
1750
|
+
"meta",
|
|
1751
|
+
"links",
|
|
1752
|
+
"lang",
|
|
1753
|
+
"class"
|
|
1754
|
+
])) : r("", !0)
|
|
1755
|
+
]);
|
|
1756
|
+
}
|
|
1757
|
+
var nr = /*#__PURE__*/ j(Jn, [["render", tr]]), rr = {
|
|
1758
|
+
mixins: [X],
|
|
1388
1759
|
props: {
|
|
1389
1760
|
url: {
|
|
1390
1761
|
type: String,
|
|
@@ -1399,39 +1770,124 @@ var yn = /*#__PURE__*/ O(ln, [["render", vn]]), bn = {
|
|
|
1399
1770
|
default: !1
|
|
1400
1771
|
}
|
|
1401
1772
|
}
|
|
1402
|
-
},
|
|
1403
|
-
function
|
|
1404
|
-
return
|
|
1773
|
+
}, ir = ["href", "textContent"];
|
|
1774
|
+
function ar(e, t, n, r, a, o) {
|
|
1775
|
+
return d(), i("a", {
|
|
1405
1776
|
href: n.url,
|
|
1406
|
-
class:
|
|
1777
|
+
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"]),
|
|
1407
1778
|
onClick: t[0] ||= (t) => e.followLink(t, n.url),
|
|
1408
|
-
textContent:
|
|
1409
|
-
}, null, 10,
|
|
1779
|
+
textContent: g(n.name)
|
|
1780
|
+
}, null, 10, ir);
|
|
1410
1781
|
}
|
|
1411
|
-
var
|
|
1412
|
-
|
|
1413
|
-
|
|
1782
|
+
var or = /*#__PURE__*/ j(rr, [["render", ar]]), $ = [
|
|
1783
|
+
"xl",
|
|
1784
|
+
"4xl",
|
|
1785
|
+
"7xl"
|
|
1786
|
+
], sr = {
|
|
1787
|
+
components: { Closer: U },
|
|
1788
|
+
mixins: [L],
|
|
1789
|
+
inheritAttrs: !1,
|
|
1790
|
+
props: {
|
|
1791
|
+
width: {
|
|
1792
|
+
type: String,
|
|
1793
|
+
default: "xl",
|
|
1794
|
+
validator: (e) => $.includes(e)
|
|
1795
|
+
},
|
|
1796
|
+
fallbackUrl: {
|
|
1797
|
+
type: String,
|
|
1798
|
+
default: null
|
|
1799
|
+
},
|
|
1800
|
+
windowKey: {
|
|
1801
|
+
type: String,
|
|
1802
|
+
default: null
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1414
1805
|
data() {
|
|
1415
|
-
return {
|
|
1806
|
+
return { returnAddress: null };
|
|
1807
|
+
},
|
|
1808
|
+
computed: {
|
|
1809
|
+
resolvedWidth() {
|
|
1810
|
+
return $.includes(this.width) ? this.width : "xl";
|
|
1811
|
+
},
|
|
1812
|
+
windows() {
|
|
1813
|
+
return this.uiSettings.windows;
|
|
1814
|
+
},
|
|
1815
|
+
resolvedKey() {
|
|
1816
|
+
return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ie(this.windows.page.address);
|
|
1817
|
+
},
|
|
1818
|
+
target() {
|
|
1819
|
+
return this.returnAddress === null ? this.fallbackUrl === null || this.fallbackUrl === "" ? null : this.fallbackUrl : this.returnAddress;
|
|
1820
|
+
},
|
|
1821
|
+
canClose() {
|
|
1822
|
+
return this.target !== null;
|
|
1823
|
+
}
|
|
1416
1824
|
},
|
|
1825
|
+
watch: { fallbackUrl() {
|
|
1826
|
+
this.windows !== null && fe(this.windows.state, this, this.fallbackAddress());
|
|
1827
|
+
} },
|
|
1417
1828
|
mounted() {
|
|
1418
|
-
this.
|
|
1829
|
+
this.windows !== null && (this.returnAddress = O(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
|
|
1419
1830
|
},
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
}
|
|
1831
|
+
beforeUnmount() {
|
|
1832
|
+
this.windows !== null && de(this.windows.state, this);
|
|
1833
|
+
},
|
|
1834
|
+
methods: {
|
|
1835
|
+
fallbackAddress() {
|
|
1836
|
+
return T(this.fallbackUrl, window.location.origin);
|
|
1837
|
+
},
|
|
1838
|
+
forwardedAttrs() {
|
|
1839
|
+
return Object.fromEntries(Object.entries(this.$attrs).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")));
|
|
1840
|
+
},
|
|
1841
|
+
syncWindow() {
|
|
1842
|
+
let e = ue(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
|
|
1843
|
+
e.rejected && console.warn(`PageCard: ключ окна сменился на «${this.resolvedKey}» без смены страницы — карточка остаётся в окне «${e.key}»`), this.returnAddress = e.window.returnAddress;
|
|
1844
|
+
},
|
|
1845
|
+
close() {
|
|
1846
|
+
let e = this.target;
|
|
1847
|
+
if (e === null) return;
|
|
1848
|
+
let t = this.uiSettings.navigate;
|
|
1849
|
+
if (t === null) {
|
|
1850
|
+
window.location.assign(e);
|
|
1851
|
+
return;
|
|
1852
|
+
}
|
|
1853
|
+
t(e);
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1423
1856
|
};
|
|
1424
|
-
function
|
|
1425
|
-
let
|
|
1426
|
-
return
|
|
1857
|
+
function cr(e, t, a, o, s, c) {
|
|
1858
|
+
let f = m("closer");
|
|
1859
|
+
return d(), i("div", l({
|
|
1860
|
+
class: ["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:sm:rounded-lg", [
|
|
1861
|
+
{
|
|
1862
|
+
"bb:sm:max-w-xl": c.resolvedWidth === "xl",
|
|
1863
|
+
"bb:sm:max-w-4xl": c.resolvedWidth === "4xl",
|
|
1864
|
+
"bb:sm:max-w-7xl": c.resolvedWidth === "7xl"
|
|
1865
|
+
},
|
|
1866
|
+
c.canClose ? {
|
|
1867
|
+
"bb:[--bb-closer-space:3.5rem] bb:md:[--bb-closer-space:0px]": c.resolvedWidth === "xl",
|
|
1868
|
+
"bb:[--bb-closer-space:3.5rem] bb:lg:[--bb-closer-space:0px]": c.resolvedWidth === "4xl",
|
|
1869
|
+
"bb:[--bb-closer-space:3.5rem] bb:2xl:[--bb-closer-space:0px]": c.resolvedWidth === "7xl"
|
|
1870
|
+
} : "bb:[--bb-closer-space:0px]",
|
|
1871
|
+
e.$attrs.class
|
|
1872
|
+
]],
|
|
1873
|
+
style: e.$attrs.style
|
|
1874
|
+
}, { ...c.forwardedAttrs() }), [p(e.$slots, "default", { close: c.close }), c.canClose ? (d(), n(f, {
|
|
1427
1875
|
key: 0,
|
|
1428
|
-
class: "bb:absolute bb:top-0 bb:right-0 bb:mt-4 bb:mr-4 bb:w-8 bb:h-8 bb:sm:mt-6 bb:
|
|
1876
|
+
class: u(["bb:absolute bb:top-0 bb:right-0 bb:mt-4 bb:mr-4 bb:w-8 bb:h-8 bb:sm:mt-6 bb:rounded-md bb:focus-visible:ring-2 bb:focus-visible:ring-indigo-500", {
|
|
1877
|
+
"bb:md:right-auto bb:md:left-full bb:md:mr-0 bb:md:ml-4": c.resolvedWidth === "xl",
|
|
1878
|
+
"bb:lg:right-auto bb:lg:left-full bb:lg:mr-0 bb:lg:ml-4": c.resolvedWidth === "4xl",
|
|
1879
|
+
"bb:2xl:right-auto bb:2xl:left-full bb:2xl:mr-0 bb:2xl:ml-4": c.resolvedWidth === "7xl"
|
|
1880
|
+
}]),
|
|
1429
1881
|
tabindex: "0",
|
|
1430
1882
|
"aria-label": e.texts.back,
|
|
1431
|
-
onClicked: c.
|
|
1432
|
-
}, null, 8, [
|
|
1883
|
+
onClicked: c.close
|
|
1884
|
+
}, null, 8, [
|
|
1885
|
+
"class",
|
|
1886
|
+
"aria-label",
|
|
1887
|
+
"onClicked"
|
|
1888
|
+
])) : r("", !0)], 16);
|
|
1433
1889
|
}
|
|
1434
|
-
var
|
|
1890
|
+
var lr = /*#__PURE__*/ j(sr, [["render", cr]]), ur = {}, dr = {
|
|
1435
1891
|
class: "bb:h-7 bb:w-7 bb:text-green-600",
|
|
1436
1892
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1437
1893
|
fill: "none",
|
|
@@ -1440,22 +1896,22 @@ var En = /*#__PURE__*/ O(wn, [["render", Tn]]), $ = {}, Dn = {
|
|
|
1440
1896
|
stroke: "currentColor",
|
|
1441
1897
|
"aria-hidden": "true"
|
|
1442
1898
|
};
|
|
1443
|
-
function
|
|
1444
|
-
return
|
|
1899
|
+
function fr(e, t, n, r, o, s) {
|
|
1900
|
+
return d(), i("svg", dr, [...t[0] ||= [a("path", {
|
|
1445
1901
|
"stroke-linecap": "round",
|
|
1446
1902
|
"stroke-linejoin": "round",
|
|
1447
1903
|
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
1904
|
}, null, -1)]]);
|
|
1449
1905
|
}
|
|
1450
|
-
var
|
|
1906
|
+
var pr = /*#__PURE__*/ j(ur, [["render", fr]]), mr = {}, hr = {
|
|
1451
1907
|
class: "bb:h-5 bb:w-5",
|
|
1452
1908
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1453
1909
|
viewBox: "0 0 20 20",
|
|
1454
1910
|
fill: "currentColor",
|
|
1455
1911
|
"aria-hidden": "true"
|
|
1456
1912
|
};
|
|
1457
|
-
function
|
|
1458
|
-
return
|
|
1913
|
+
function gr(e, t, n, r, o, s) {
|
|
1914
|
+
return d(), i("svg", hr, [...t[0] ||= [a("path", {
|
|
1459
1915
|
"fill-rule": "evenodd",
|
|
1460
1916
|
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
1917
|
"clip-rule": "evenodd"
|
|
@@ -1463,14 +1919,14 @@ function Mn(e, t, n, r, o, s) {
|
|
|
1463
1919
|
}
|
|
1464
1920
|
//#endregion
|
|
1465
1921
|
//#region src/components/NotificationMessage.vue
|
|
1466
|
-
var
|
|
1922
|
+
var _r = {
|
|
1467
1923
|
components: {
|
|
1468
|
-
Check:
|
|
1469
|
-
Close: /* @__PURE__ */
|
|
1470
|
-
Dangerous:
|
|
1471
|
-
Warning:
|
|
1924
|
+
Check: pr,
|
|
1925
|
+
Close: /* @__PURE__ */ j(mr, [["render", gr]]),
|
|
1926
|
+
Dangerous: W,
|
|
1927
|
+
Warning: G
|
|
1472
1928
|
},
|
|
1473
|
-
mixins: [
|
|
1929
|
+
mixins: [L],
|
|
1474
1930
|
emits: ["update:modelValue"],
|
|
1475
1931
|
props: {
|
|
1476
1932
|
modelValue: {
|
|
@@ -1508,37 +1964,37 @@ var Nn = {
|
|
|
1508
1964
|
return this.type === "confirmation";
|
|
1509
1965
|
}
|
|
1510
1966
|
}
|
|
1511
|
-
},
|
|
1512
|
-
function
|
|
1513
|
-
let
|
|
1514
|
-
return
|
|
1967
|
+
}, vr = ["role"], yr = { class: "bb:p-4" }, br = { class: "bb:flex bb:items-start" }, xr = { class: "bb:shrink-0" }, Sr = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, Cr = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, wr = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, Tr = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Er = { class: "bb:sr-only" };
|
|
1968
|
+
function Dr(e, t, o, c, l, f) {
|
|
1969
|
+
let p = m("warning"), h = m("dangerous"), _ = m("check"), v = m("close");
|
|
1970
|
+
return d(), i("div", {
|
|
1515
1971
|
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",
|
|
1516
1972
|
role: f.isDangerous ? "alert" : "status"
|
|
1517
|
-
}, [f.hasMessage ? (
|
|
1973
|
+
}, [f.hasMessage ? (d(), i("div", {
|
|
1518
1974
|
key: 0,
|
|
1519
|
-
class:
|
|
1975
|
+
class: u(["bb:max-w-sm bb:w-full bb:shadow-lg bb:rounded-lg bb:pointer-events-auto bb:ring-1 bb:ring-black/5 bb:overflow-hidden", {
|
|
1520
1976
|
"bb:bg-red-50": f.isDangerous,
|
|
1521
1977
|
"bb:bg-yellow-50": f.isWarning,
|
|
1522
1978
|
"bb:bg-gray-50": f.isConfirmation
|
|
1523
1979
|
}])
|
|
1524
|
-
}, [a("div",
|
|
1525
|
-
a("div",
|
|
1526
|
-
f.isWarning ? (
|
|
1527
|
-
f.isDangerous ? (
|
|
1528
|
-
f.isConfirmation ? (
|
|
1980
|
+
}, [a("div", yr, [a("div", br, [
|
|
1981
|
+
a("div", xr, [
|
|
1982
|
+
f.isWarning ? (d(), n(p, { key: 0 })) : r("", !0),
|
|
1983
|
+
f.isDangerous ? (d(), n(h, { key: 1 })) : r("", !0),
|
|
1984
|
+
f.isConfirmation ? (d(), n(_, { key: 2 })) : r("", !0)
|
|
1529
1985
|
]),
|
|
1530
|
-
a("div",
|
|
1531
|
-
a("div",
|
|
1986
|
+
a("div", Sr, [a("p", Cr, g(o.notificationHeading), 1), a("p", wr, g(f.text), 1)]),
|
|
1987
|
+
a("div", Tr, [a("button", {
|
|
1532
1988
|
type: "button",
|
|
1533
|
-
class:
|
|
1989
|
+
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", {
|
|
1534
1990
|
"bb:bg-red-50": f.isDangerous,
|
|
1535
1991
|
"bb:bg-yellow-50": f.isWarning,
|
|
1536
1992
|
"bb:bg-gray-50": f.isConfirmation
|
|
1537
1993
|
}]),
|
|
1538
|
-
onClick: t[0] ||=
|
|
1539
|
-
}, [a("span",
|
|
1540
|
-
])])], 2)) : r("", !0)], 8,
|
|
1994
|
+
onClick: t[0] ||= S((t) => e.$emit("update:modelValue", ""), ["prevent"])
|
|
1995
|
+
}, [a("span", Er, g(e.texts.close), 1), s(v)], 2)])
|
|
1996
|
+
])])], 2)) : r("", !0)], 8, vr);
|
|
1541
1997
|
}
|
|
1542
|
-
var
|
|
1998
|
+
var Or = /*#__PURE__*/ j(_r, [["render", Dr]]);
|
|
1543
1999
|
//#endregion
|
|
1544
|
-
export {
|
|
2000
|
+
export { U as Closer, pn as ConfirmationModal, nr as DataTable, N as Dot, Wt as DownloadLink, wn as DropdownButtonWithAction, Pt as ErrorMessages, or as NavigationMenuElement, Or as NotificationMessage, lr as PageCard, R as PickDay, M as Popup, qe as RussianMobileFilter, et as Search, st as SelectDateInterval, wt as SelectSingle, H as SmallBadge, he as dashboardUi };
|