@boobooking/dashboard-ui-components 0.15.0 → 0.16.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 +171 -51
- package/dist/index.js +612 -409
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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, 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
2
|
import ne from "imask";
|
|
3
3
|
//#region src/i18n.js
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
4
|
+
var re = ["ru", "en"];
|
|
5
|
+
function C(e) {
|
|
6
|
+
return re.includes(e);
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var ie = {
|
|
9
9
|
ru: {
|
|
10
10
|
cancel: "Отмена",
|
|
11
|
-
download: "Скачать",
|
|
12
11
|
openMenu: "Открыть меню",
|
|
13
12
|
previousMonth: "Предыдущий месяц",
|
|
14
13
|
nextMonth: "Следующий месяц",
|
|
@@ -52,11 +51,12 @@ var re = {
|
|
|
52
51
|
resultsOf: "из",
|
|
53
52
|
resultsAfter: "",
|
|
54
53
|
back: "Назад",
|
|
55
|
-
close: "Закрыть"
|
|
54
|
+
close: "Закрыть",
|
|
55
|
+
showText: "Показать текст",
|
|
56
|
+
fullText: "Полный текст"
|
|
56
57
|
},
|
|
57
58
|
en: {
|
|
58
59
|
cancel: "Cancel",
|
|
59
|
-
download: "Download",
|
|
60
60
|
openMenu: "Open menu",
|
|
61
61
|
previousMonth: "Previous month",
|
|
62
62
|
nextMonth: "Next month",
|
|
@@ -100,20 +100,22 @@ var re = {
|
|
|
100
100
|
resultsOf: "of",
|
|
101
101
|
resultsAfter: "results",
|
|
102
102
|
back: "Back",
|
|
103
|
-
close: "Close"
|
|
103
|
+
close: "Close",
|
|
104
|
+
showText: "Show text",
|
|
105
|
+
fullText: "Full text"
|
|
104
106
|
}
|
|
105
107
|
};
|
|
106
108
|
//#endregion
|
|
107
109
|
//#region src/windows.js
|
|
108
|
-
function
|
|
110
|
+
function w(e, t) {
|
|
109
111
|
if (e == null || e === "") return null;
|
|
110
112
|
let n = new URL(String(e), t);
|
|
111
113
|
return n.pathname + n.search;
|
|
112
114
|
}
|
|
113
|
-
function
|
|
115
|
+
function ae(e) {
|
|
114
116
|
return e === null ? null : e.split("?")[0];
|
|
115
117
|
}
|
|
116
|
-
function
|
|
118
|
+
function oe() {
|
|
117
119
|
return {
|
|
118
120
|
windows: [],
|
|
119
121
|
cards: /* @__PURE__ */ new Map(),
|
|
@@ -127,36 +129,36 @@ function ae() {
|
|
|
127
129
|
nextId: 1
|
|
128
130
|
};
|
|
129
131
|
}
|
|
130
|
-
function
|
|
132
|
+
function T(e, t) {
|
|
131
133
|
return e.windows.includes(t);
|
|
132
134
|
}
|
|
133
|
-
function
|
|
135
|
+
function se(e) {
|
|
134
136
|
return e.returnAddress ?? e.fallbackAddress;
|
|
135
137
|
}
|
|
136
|
-
function
|
|
138
|
+
function ce(e) {
|
|
137
139
|
let t = null;
|
|
138
140
|
for (let n of e.cards.values()) t = n.window;
|
|
139
141
|
return t;
|
|
140
142
|
}
|
|
141
|
-
function
|
|
143
|
+
function le(e, t) {
|
|
142
144
|
let n = t;
|
|
143
|
-
for (; n !== null && !
|
|
145
|
+
for (; n !== null && !T(e, n);) n = n.parent;
|
|
144
146
|
return n;
|
|
145
147
|
}
|
|
146
|
-
function
|
|
148
|
+
function ue(e, t) {
|
|
147
149
|
return e.transition = {
|
|
148
150
|
number: e.transition.number + 1,
|
|
149
151
|
fromAddress: e.shown,
|
|
150
|
-
fromWindow:
|
|
152
|
+
fromWindow: ce(e),
|
|
151
153
|
assigned: /* @__PURE__ */ new Map()
|
|
152
154
|
}, e.shown = t, e.transition.number;
|
|
153
155
|
}
|
|
154
|
-
function
|
|
156
|
+
function de(e, t, n) {
|
|
155
157
|
let r = e.transition, i = r.assigned.get(t);
|
|
156
|
-
if (i !== void 0 &&
|
|
158
|
+
if (i !== void 0 && T(e, i)) return i;
|
|
157
159
|
let a = r.fromWindow, o = r.fromAddress;
|
|
158
|
-
a !== null && !
|
|
159
|
-
for (let n = a; n !== null; n = n.parent) if (n.key === t &&
|
|
160
|
+
a !== null && !T(e, a) && (a = le(e, a), o = null), a !== null && se(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : le(e, a.parent), o = null);
|
|
161
|
+
for (let n = a; n !== null; n = n.parent) if (n.key === t && T(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
|
|
160
162
|
a === null ? e.windows = [] : e.windows.splice(e.windows.indexOf(a) + 1);
|
|
161
163
|
let s = {
|
|
162
164
|
id: e.nextId,
|
|
@@ -167,18 +169,18 @@ function le(e, t, n) {
|
|
|
167
169
|
};
|
|
168
170
|
return e.nextId += 1, e.windows.push(s), s;
|
|
169
171
|
}
|
|
170
|
-
function
|
|
171
|
-
let i =
|
|
172
|
+
function E(e, t, n, r) {
|
|
173
|
+
let i = de(e, n, r);
|
|
172
174
|
return i.fallbackAddress = r, e.transition.assigned.set(n, i), e.cards.delete(t), e.cards.set(t, {
|
|
173
175
|
key: n,
|
|
174
176
|
window: i,
|
|
175
177
|
processed: e.transition.number
|
|
176
178
|
}), i;
|
|
177
179
|
}
|
|
178
|
-
function
|
|
180
|
+
function fe(e, t, n, r) {
|
|
179
181
|
let i = e.cards.get(t);
|
|
180
182
|
return i === void 0 ? {
|
|
181
|
-
window:
|
|
183
|
+
window: E(e, t, n, r),
|
|
182
184
|
rejected: !1,
|
|
183
185
|
key: n
|
|
184
186
|
} : i.key === n ? (i.processed = e.transition.number, {
|
|
@@ -190,37 +192,37 @@ function ue(e, t, n, r) {
|
|
|
190
192
|
rejected: !0,
|
|
191
193
|
key: i.key
|
|
192
194
|
} : (e.cards.delete(t), {
|
|
193
|
-
window:
|
|
195
|
+
window: E(e, t, n, r),
|
|
194
196
|
rejected: !1,
|
|
195
197
|
key: n
|
|
196
198
|
});
|
|
197
199
|
}
|
|
198
|
-
function
|
|
200
|
+
function pe(e, t) {
|
|
199
201
|
e.cards.delete(t);
|
|
200
202
|
}
|
|
201
|
-
function
|
|
203
|
+
function me(e, t, n) {
|
|
202
204
|
let r = e.cards.get(t);
|
|
203
205
|
r !== void 0 && (r.window.fallbackAddress = n);
|
|
204
206
|
}
|
|
205
207
|
//#endregion
|
|
206
208
|
//#region src/plugin.js
|
|
207
|
-
var
|
|
209
|
+
var he = Symbol("dashboardUi"), ge = Object.freeze({
|
|
208
210
|
lang: "ru",
|
|
209
211
|
navigate: null,
|
|
210
212
|
windows: null
|
|
211
|
-
}),
|
|
212
|
-
from:
|
|
213
|
-
default: () =>
|
|
213
|
+
}), _e = { uiSettings: {
|
|
214
|
+
from: he,
|
|
215
|
+
default: () => ge
|
|
214
216
|
} };
|
|
215
|
-
function
|
|
216
|
-
let n =
|
|
217
|
+
function ve(e, t) {
|
|
218
|
+
let n = oe(), r = h({
|
|
217
219
|
number: 0,
|
|
218
220
|
address: null
|
|
219
221
|
}), i = c(!0);
|
|
220
222
|
return i.run(() => {
|
|
221
223
|
ee(t, (e) => {
|
|
222
|
-
let t =
|
|
223
|
-
t !== null && t !== r.address && (r.number =
|
|
224
|
+
let t = w(e, window.location.origin);
|
|
225
|
+
t !== null && t !== r.address && (r.number = ue(n, t), r.address = t);
|
|
224
226
|
}, {
|
|
225
227
|
flush: "sync",
|
|
226
228
|
immediate: !0
|
|
@@ -230,24 +232,104 @@ function me(e, t) {
|
|
|
230
232
|
page: r
|
|
231
233
|
};
|
|
232
234
|
}
|
|
233
|
-
var
|
|
235
|
+
var ye = { install(e, t) {
|
|
234
236
|
let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
|
|
235
|
-
if (!
|
|
237
|
+
if (!C(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${re.join(", ")}`);
|
|
236
238
|
let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
|
|
237
239
|
if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
|
|
238
240
|
let o = Object.hasOwn(n, "currentUrl"), s = o ? n.currentUrl : null;
|
|
239
241
|
if (o && typeof s != "function") throw Error("dashboardUi: currentUrl должен быть функцией () => адрес страницы");
|
|
240
|
-
let c = s !== null && typeof window < "u" ?
|
|
241
|
-
e.provide(
|
|
242
|
+
let c = s !== null && typeof window < "u" ? ve(e, s) : null;
|
|
243
|
+
e.provide(he, Object.freeze({
|
|
242
244
|
lang: r,
|
|
243
245
|
navigate: a,
|
|
244
246
|
windows: c
|
|
245
247
|
}));
|
|
246
|
-
} },
|
|
248
|
+
} }, be = 4e4;
|
|
249
|
+
function xe(e) {
|
|
250
|
+
if (typeof e != "string") return null;
|
|
251
|
+
let t = /filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e);
|
|
252
|
+
if (t !== null) try {
|
|
253
|
+
return decodeURIComponent(t[1].trim());
|
|
254
|
+
} catch {}
|
|
255
|
+
let n = /filename\s*=\s*"([^"]+)"/i.exec(e);
|
|
256
|
+
if (n !== null) return n[1];
|
|
257
|
+
let r = /filename\s*=\s*([^;"\s]+)/i.exec(e);
|
|
258
|
+
return r === null ? null : r[1];
|
|
259
|
+
}
|
|
260
|
+
function Se(e) {
|
|
261
|
+
try {
|
|
262
|
+
let t = new URL(e, window.location.href).pathname.split("/").filter((e) => e !== "");
|
|
263
|
+
return t.length === 0 ? null : decodeURIComponent(t[t.length - 1]);
|
|
264
|
+
} catch {
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
async function Ce(e) {
|
|
269
|
+
let t = await fetch(e, { credentials: "same-origin" });
|
|
270
|
+
if (t.redirected) throw Error(`downloadFile: сервер перенаправил запрос ${e}`);
|
|
271
|
+
if (!t.ok) throw Error(`downloadFile: ответ ${t.status} на ${e}`);
|
|
272
|
+
let n = xe(t.headers.get("Content-Disposition")) ?? Se(e) ?? "download", r = URL.createObjectURL(await t.blob()), i = document.createElement("a");
|
|
273
|
+
i.href = r, i.download = n, i.style.display = "none", document.body.appendChild(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), be);
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/colors.js
|
|
277
|
+
var D = {
|
|
278
|
+
gray: {
|
|
279
|
+
pill: "bb:bg-gray-100 bb:text-gray-800",
|
|
280
|
+
pillHover: "bb:hover:text-gray-600",
|
|
281
|
+
button: "bb:bg-gray-100 bb:border-gray-300 bb:text-gray-800 bb:hover:bg-gray-200",
|
|
282
|
+
menuItem: "bb:text-gray-800 bb:focus:bg-gray-100",
|
|
283
|
+
mark: "bb:text-gray-500"
|
|
284
|
+
},
|
|
285
|
+
green: {
|
|
286
|
+
pill: "bb:bg-green-100 bb:text-green-800",
|
|
287
|
+
pillHover: "bb:hover:text-green-600",
|
|
288
|
+
button: "bb:bg-green-100 bb:border-green-300 bb:text-green-800 bb:hover:bg-green-200",
|
|
289
|
+
menuItem: "bb:text-green-800 bb:focus:bg-green-100",
|
|
290
|
+
mark: "bb:text-green-500"
|
|
291
|
+
},
|
|
292
|
+
yellow: {
|
|
293
|
+
pill: "bb:bg-yellow-100 bb:text-yellow-800",
|
|
294
|
+
pillHover: "bb:hover:text-yellow-600",
|
|
295
|
+
button: "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200",
|
|
296
|
+
menuItem: "bb:text-yellow-800 bb:focus:bg-yellow-100",
|
|
297
|
+
mark: "bb:text-yellow-500"
|
|
298
|
+
},
|
|
299
|
+
red: {
|
|
300
|
+
pill: "bb:bg-red-100 bb:text-red-800",
|
|
301
|
+
pillHover: "bb:hover:text-red-600",
|
|
302
|
+
button: "bb:bg-red-100 bb:border-red-300 bb:text-red-800 bb:hover:bg-red-200",
|
|
303
|
+
menuItem: "bb:text-red-800 bb:focus:bg-red-100",
|
|
304
|
+
mark: "bb:text-red-500"
|
|
305
|
+
},
|
|
306
|
+
indigo: {
|
|
307
|
+
pill: "bb:bg-indigo-100 bb:text-indigo-800",
|
|
308
|
+
pillHover: "bb:hover:text-indigo-600",
|
|
309
|
+
button: "bb:bg-indigo-100 bb:border-indigo-300 bb:text-indigo-800 bb:hover:bg-indigo-200",
|
|
310
|
+
menuItem: "bb:text-indigo-800 bb:focus:bg-indigo-100",
|
|
311
|
+
mark: "bb:text-indigo-500"
|
|
312
|
+
},
|
|
313
|
+
purple: {
|
|
314
|
+
pill: "bb:bg-purple-100 bb:text-purple-800",
|
|
315
|
+
pillHover: "bb:hover:text-purple-600",
|
|
316
|
+
button: "bb:bg-purple-100 bb:border-purple-300 bb:text-purple-800 bb:hover:bg-purple-200",
|
|
317
|
+
menuItem: "bb:text-purple-800 bb:focus:bg-purple-100",
|
|
318
|
+
mark: "bb:text-purple-500"
|
|
319
|
+
}
|
|
320
|
+
}, we = Object.keys(D);
|
|
321
|
+
function O(e) {
|
|
322
|
+
return we.includes(e);
|
|
323
|
+
}
|
|
324
|
+
function Te(e, t) {
|
|
325
|
+
return O(e) ? D[e][t] ?? "" : "";
|
|
326
|
+
}
|
|
327
|
+
var k = { methods: { colorClass: Te } }, A = (e, t) => {
|
|
247
328
|
let n = e.__vccOpts || e;
|
|
248
329
|
for (let [e, r] of t) n[e] = r;
|
|
249
330
|
return n;
|
|
250
|
-
},
|
|
331
|
+
}, Ee = {
|
|
332
|
+
mixins: [k],
|
|
251
333
|
props: {
|
|
252
334
|
withPulse: {
|
|
253
335
|
type: Boolean,
|
|
@@ -256,24 +338,12 @@ var he = { install(e, t) {
|
|
|
256
338
|
color: {
|
|
257
339
|
type: String,
|
|
258
340
|
required: !0,
|
|
259
|
-
validator:
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
computed: {
|
|
263
|
-
isRed() {
|
|
264
|
-
return this.color === "red";
|
|
265
|
-
},
|
|
266
|
-
isGreen() {
|
|
267
|
-
return this.color === "green";
|
|
341
|
+
validator: O
|
|
268
342
|
}
|
|
269
343
|
}
|
|
270
344
|
};
|
|
271
|
-
function
|
|
272
|
-
return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", {
|
|
273
|
-
"bb:text-red-500": s.isRed,
|
|
274
|
-
"bb:text-green-500": s.isGreen,
|
|
275
|
-
"bb:animate-pulse": n.withPulse
|
|
276
|
-
}]) }, [...t[0] ||= [a("svg", {
|
|
345
|
+
function De(e, t, n, r, o, s) {
|
|
346
|
+
return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", [e.colorClass(n.color, "mark"), { "bb:animate-pulse": n.withPulse }]]) }, [...t[0] ||= [a("svg", {
|
|
277
347
|
class: "bb:fill-current bb:w-2 bb:h-2",
|
|
278
348
|
viewBox: "0 0 120 120"
|
|
279
349
|
}, [a("circle", {
|
|
@@ -282,8 +352,8 @@ function _e(e, t, n, r, o, s) {
|
|
|
282
352
|
r: "45"
|
|
283
353
|
})], -1)]], 2);
|
|
284
354
|
}
|
|
285
|
-
var
|
|
286
|
-
components: { Dot:
|
|
355
|
+
var j = /*#__PURE__*/ A(Ee, [["render", De]]), Oe = {
|
|
356
|
+
components: { Dot: j },
|
|
287
357
|
props: {
|
|
288
358
|
text: {
|
|
289
359
|
type: String,
|
|
@@ -298,14 +368,14 @@ var ve = /*#__PURE__*/ j(ge, [["render", _e]]), ye = {
|
|
|
298
368
|
default: !1
|
|
299
369
|
}
|
|
300
370
|
}
|
|
301
|
-
},
|
|
302
|
-
function
|
|
371
|
+
}, ke = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, Ae = ["textContent"];
|
|
372
|
+
function je(e, t, n, r, o, c) {
|
|
303
373
|
let l = m("dot");
|
|
304
|
-
return d(), i("div",
|
|
374
|
+
return d(), i("div", ke, [
|
|
305
375
|
a("div", {
|
|
306
376
|
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",
|
|
307
377
|
textContent: g(n.text)
|
|
308
|
-
}, null, 8,
|
|
378
|
+
}, null, 8, Ae),
|
|
309
379
|
x(s(l, {
|
|
310
380
|
color: "red",
|
|
311
381
|
"with-pulse": !0,
|
|
@@ -317,13 +387,13 @@ function Se(e, t, n, r, o, c) {
|
|
|
317
387
|
}, null, 512), [[y, n.isRequired]])
|
|
318
388
|
]);
|
|
319
389
|
}
|
|
320
|
-
var M = /*#__PURE__*/
|
|
390
|
+
var M = /*#__PURE__*/ A(Oe, [["render", je]]), Me = {}, Ne = {
|
|
321
391
|
type: "button",
|
|
322
392
|
tabindex: "-1",
|
|
323
393
|
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"
|
|
324
394
|
};
|
|
325
|
-
function
|
|
326
|
-
return d(), i("button",
|
|
395
|
+
function Pe(e, t, n, r, o, s) {
|
|
396
|
+
return d(), i("button", Ne, [...t[0] ||= [a("svg", {
|
|
327
397
|
class: "bb:w-6 bb:h-6 bb:stroke-current",
|
|
328
398
|
fill: "none",
|
|
329
399
|
viewBox: "0 0 24 24"
|
|
@@ -334,10 +404,10 @@ function Te(e, t, n, r, o, s) {
|
|
|
334
404
|
d: "M6 18L18 6M6 6l12 12"
|
|
335
405
|
})], -1)]]);
|
|
336
406
|
}
|
|
337
|
-
var N = /*#__PURE__*/
|
|
338
|
-
function
|
|
407
|
+
var N = /*#__PURE__*/ A(Me, [["render", Pe]]), Fe = 10;
|
|
408
|
+
function Ie(e) {
|
|
339
409
|
let t = e.replace(/\D/g, "");
|
|
340
|
-
return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0,
|
|
410
|
+
return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Fe);
|
|
341
411
|
}
|
|
342
412
|
function P(e) {
|
|
343
413
|
return e === "" ? "" : `7${e}`;
|
|
@@ -348,7 +418,7 @@ function F(e) {
|
|
|
348
418
|
}
|
|
349
419
|
//#endregion
|
|
350
420
|
//#region src/components/RussianMobileFilter.vue
|
|
351
|
-
var
|
|
421
|
+
var Le = 400, Re = 3, ze = {
|
|
352
422
|
components: {
|
|
353
423
|
ElementHeader: M,
|
|
354
424
|
Eraser: N
|
|
@@ -421,7 +491,7 @@ var Oe = 400, ke = 3, Ae = {
|
|
|
421
491
|
this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
|
|
422
492
|
},
|
|
423
493
|
onPaste(e) {
|
|
424
|
-
this.applyUserDigits(
|
|
494
|
+
this.applyUserDigits(Ie(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
|
|
425
495
|
},
|
|
426
496
|
clear() {
|
|
427
497
|
this.applyUserDigits(""), this.commit();
|
|
@@ -431,16 +501,16 @@ var Oe = 400, ke = 3, Ae = {
|
|
|
431
501
|
this.commit();
|
|
432
502
|
return;
|
|
433
503
|
}
|
|
434
|
-
this.digits.length <
|
|
504
|
+
this.digits.length < Re || (this.debounceTimer = setTimeout(() => this.commit(), Le));
|
|
435
505
|
},
|
|
436
506
|
commit() {
|
|
437
507
|
clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
|
|
438
508
|
}
|
|
439
509
|
}
|
|
440
|
-
},
|
|
441
|
-
function
|
|
510
|
+
}, Be = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Ve = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, He = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ue = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
511
|
+
function We(e, t, n, r, o, c) {
|
|
442
512
|
let l = m("element-header"), u = m("eraser");
|
|
443
|
-
return d(), i("div",
|
|
513
|
+
return d(), i("div", Be, [a("div", Ve, [s(l, {
|
|
444
514
|
text: n.header,
|
|
445
515
|
"is-required": n.isRequired,
|
|
446
516
|
"is-loading": n.isLoading
|
|
@@ -448,7 +518,7 @@ function Fe(e, t, n, r, o, c) {
|
|
|
448
518
|
"text",
|
|
449
519
|
"is-required",
|
|
450
520
|
"is-loading"
|
|
451
|
-
]), a("div",
|
|
521
|
+
]), a("div", He, [a("label", Ue, [a("input", {
|
|
452
522
|
ref: "input",
|
|
453
523
|
type: "tel",
|
|
454
524
|
inputmode: "tel",
|
|
@@ -464,7 +534,7 @@ function Fe(e, t, n, r, o, c) {
|
|
|
464
534
|
class: "bb:pr-2 bb:h-full"
|
|
465
535
|
}, null, 8, ["onClick"]), [[y, o.digits.length > 0]])])])])]);
|
|
466
536
|
}
|
|
467
|
-
var
|
|
537
|
+
var Ge = /*#__PURE__*/ A(ze, [["render", We]]), Ke = {
|
|
468
538
|
components: {
|
|
469
539
|
ElementHeader: M,
|
|
470
540
|
Eraser: N
|
|
@@ -505,10 +575,10 @@ var Ie = /*#__PURE__*/ j(Ae, [["render", Fe]]), Le = {
|
|
|
505
575
|
this.$emit("update:modelValue", this.search), this.$emit("changed");
|
|
506
576
|
}
|
|
507
577
|
}
|
|
508
|
-
},
|
|
509
|
-
function
|
|
578
|
+
}, qe = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Je = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ye = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Xe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
|
|
579
|
+
function Ze(e, t, n, r, o, c) {
|
|
510
580
|
let l = m("element-header"), u = m("eraser");
|
|
511
|
-
return d(), i("div",
|
|
581
|
+
return d(), i("div", qe, [a("div", Je, [s(l, {
|
|
512
582
|
text: n.header,
|
|
513
583
|
"is-required": n.isRequired,
|
|
514
584
|
"is-loading": n.isLoading
|
|
@@ -516,7 +586,7 @@ function He(e, t, n, r, o, c) {
|
|
|
516
586
|
"text",
|
|
517
587
|
"is-required",
|
|
518
588
|
"is-loading"
|
|
519
|
-
]), a("div",
|
|
589
|
+
]), a("div", Ye, [a("label", Xe, [x(a("input", {
|
|
520
590
|
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",
|
|
521
591
|
"onUpdate:modelValue": t[0] ||= (e) => o.search = e,
|
|
522
592
|
onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
|
|
@@ -530,12 +600,12 @@ function He(e, t, n, r, o, c) {
|
|
|
530
600
|
class: "bb:pr-2 bb:h-full"
|
|
531
601
|
}, null, 8, ["onClick"]), [[y, c.inputNeedsEraser]])])])])]);
|
|
532
602
|
}
|
|
533
|
-
var
|
|
534
|
-
function
|
|
603
|
+
var Qe = /*#__PURE__*/ A(Ke, [["render", Ze]]), I = 4, L = 8;
|
|
604
|
+
function $e(e) {
|
|
535
605
|
return typeof e?.showPopover == "function";
|
|
536
606
|
}
|
|
537
607
|
function R(e) {
|
|
538
|
-
return
|
|
608
|
+
return $e(e) && e.matches(":popover-open");
|
|
539
609
|
}
|
|
540
610
|
function z(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fitsRight: a = !0 } = {}) {
|
|
541
611
|
let o = e.getBoundingClientRect(), s = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = Math.max(L, o.left), u = Math.max(L, s - o.right), d = Math.max(0, s - l - L), f = Math.max(0, s - u - L), p = r === "start" && (a || d >= f), m = Math.max(0, c - o.bottom - I - L), h = Math.max(0, o.top - I - L), g = i || m >= h, _ = "";
|
|
@@ -552,7 +622,7 @@ function z(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fits
|
|
|
552
622
|
maxWidth: _
|
|
553
623
|
});
|
|
554
624
|
}
|
|
555
|
-
function
|
|
625
|
+
function et(e, t, n = {}) {
|
|
556
626
|
let r = t.scrollHeight <= t.clientHeight + 1, i = t.scrollWidth <= t.clientWidth + 1;
|
|
557
627
|
r && i || z(e, t, {
|
|
558
628
|
...n,
|
|
@@ -560,7 +630,7 @@ function Ge(e, t, n = {}) {
|
|
|
560
630
|
fitsRight: i
|
|
561
631
|
});
|
|
562
632
|
}
|
|
563
|
-
function
|
|
633
|
+
function tt(e, t) {
|
|
564
634
|
let n = (n) => {
|
|
565
635
|
e.contains(n.target) || t();
|
|
566
636
|
};
|
|
@@ -574,7 +644,7 @@ function Ke(e, t) {
|
|
|
574
644
|
//#endregion
|
|
575
645
|
//#region src/menuFocus.js
|
|
576
646
|
var B = "a[href], button";
|
|
577
|
-
function
|
|
647
|
+
function nt(e, t = () => null) {
|
|
578
648
|
let n = (n) => {
|
|
579
649
|
if (n.key !== "ArrowDown" && n.key !== "ArrowUp") return;
|
|
580
650
|
let r = [...e.querySelectorAll(B)];
|
|
@@ -592,8 +662,8 @@ function qe(e, t = () => null) {
|
|
|
592
662
|
}
|
|
593
663
|
//#endregion
|
|
594
664
|
//#region src/components/PopoverPanel.vue
|
|
595
|
-
var
|
|
596
|
-
emits: ["update:modelValue"],
|
|
665
|
+
var rt = {
|
|
666
|
+
emits: ["update:modelValue", "toggle"],
|
|
597
667
|
props: {
|
|
598
668
|
modelValue: {
|
|
599
669
|
type: Boolean,
|
|
@@ -632,6 +702,14 @@ var Je = {
|
|
|
632
702
|
type: String,
|
|
633
703
|
default: null
|
|
634
704
|
},
|
|
705
|
+
panelLabel: {
|
|
706
|
+
type: String,
|
|
707
|
+
default: null
|
|
708
|
+
},
|
|
709
|
+
panelFocusable: {
|
|
710
|
+
type: Boolean,
|
|
711
|
+
default: !1
|
|
712
|
+
},
|
|
635
713
|
returnFocus: {
|
|
636
714
|
type: Boolean,
|
|
637
715
|
default: !1
|
|
@@ -657,12 +735,12 @@ var Je = {
|
|
|
657
735
|
this.applyPanelState();
|
|
658
736
|
return;
|
|
659
737
|
}
|
|
660
|
-
this.stopListening(), this.panelIsOpen && (this.panelIsOpen = !1, this.$emit("update:modelValue", !1));
|
|
738
|
+
this.stopListening(), this.reportPanelShown(!1), this.panelIsOpen && (this.panelIsOpen = !1, this.$emit("update:modelValue", !1));
|
|
661
739
|
}
|
|
662
740
|
}
|
|
663
741
|
},
|
|
664
742
|
created() {
|
|
665
|
-
this.stopClosing = null, this.stopArrows = null, this.focusWasInside = !1;
|
|
743
|
+
this.stopClosing = null, this.stopArrows = null, this.focusWasInside = !1, this.panelShown = !1;
|
|
666
744
|
},
|
|
667
745
|
mounted() {
|
|
668
746
|
this.applyPanelState();
|
|
@@ -673,12 +751,15 @@ var Je = {
|
|
|
673
751
|
methods: {
|
|
674
752
|
applyPanelState() {
|
|
675
753
|
let e = this.$refs.panel;
|
|
676
|
-
|
|
754
|
+
$e(e) && e.isConnected && (this.panelIsOpen && !R(e) && e.showPopover(), !this.panelIsOpen && R(e) && e.hidePopover());
|
|
677
755
|
},
|
|
678
756
|
close() {
|
|
679
757
|
let e = this.$refs.panel;
|
|
680
758
|
R(e) && e.hidePopover();
|
|
681
759
|
},
|
|
760
|
+
reportPanelShown(e) {
|
|
761
|
+
this.panelShown !== e && (this.panelShown = e, this.$emit("toggle", e));
|
|
762
|
+
},
|
|
682
763
|
onClick() {
|
|
683
764
|
this.closeOnClick && this.close();
|
|
684
765
|
},
|
|
@@ -690,7 +771,7 @@ var Je = {
|
|
|
690
771
|
};
|
|
691
772
|
z(e, this.$refs.panel, t), requestAnimationFrame(() => {
|
|
692
773
|
let n = this.$refs.panel;
|
|
693
|
-
R(n) &&
|
|
774
|
+
R(n) && et(e, n, t);
|
|
694
775
|
});
|
|
695
776
|
return;
|
|
696
777
|
}
|
|
@@ -700,7 +781,7 @@ var Je = {
|
|
|
700
781
|
onToggle() {
|
|
701
782
|
this.stopListening();
|
|
702
783
|
let e = this.$refs.panel, t = R(e);
|
|
703
|
-
t && (this.stopClosing =
|
|
784
|
+
t && (this.stopClosing = tt(e, this.close), this.arrows && (this.stopArrows = nt(e, this.findSelected))), t || this.restoreFocus(e), this.reportPanelShown(t), t !== this.panelIsOpen && (this.panelIsOpen = t, this.$emit("update:modelValue", t));
|
|
704
785
|
},
|
|
705
786
|
restoreFocus(e) {
|
|
706
787
|
let t = this.focusWasInside;
|
|
@@ -712,17 +793,19 @@ var Je = {
|
|
|
712
793
|
this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null), this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
|
|
713
794
|
}
|
|
714
795
|
}
|
|
715
|
-
},
|
|
796
|
+
}, it = {
|
|
716
797
|
key: 0,
|
|
717
798
|
class: "bb:relative"
|
|
718
|
-
},
|
|
799
|
+
}, at = [
|
|
719
800
|
"id",
|
|
720
801
|
"role",
|
|
721
802
|
"aria-orientation",
|
|
722
|
-
"aria-labelledby"
|
|
803
|
+
"aria-labelledby",
|
|
804
|
+
"aria-label",
|
|
805
|
+
"tabindex"
|
|
723
806
|
];
|
|
724
|
-
function
|
|
725
|
-
return n.hasContent ? (d(), i("span",
|
|
807
|
+
function ot(e, t, n, o, s, c) {
|
|
808
|
+
return n.hasContent ? (d(), i("span", it, [p(e.$slots, "trigger", {
|
|
726
809
|
id: o.buttonId,
|
|
727
810
|
popovertarget: o.panelId
|
|
728
811
|
}), a("div", {
|
|
@@ -732,13 +815,15 @@ function Ze(e, t, n, o, s, c) {
|
|
|
732
815
|
class: u(["bb:m-0 bb:inset-auto", n.panelClass]),
|
|
733
816
|
role: n.panelRole,
|
|
734
817
|
"aria-orientation": n.panelRole === "menu" ? "vertical" : null,
|
|
735
|
-
"aria-labelledby": o.buttonId,
|
|
818
|
+
"aria-labelledby": n.panelLabel === null ? o.buttonId : null,
|
|
819
|
+
"aria-label": n.panelLabel,
|
|
820
|
+
tabindex: n.panelFocusable ? 0 : null,
|
|
736
821
|
onBeforetoggle: t[0] ||= (...e) => c.onBeforeToggle && c.onBeforeToggle(...e),
|
|
737
822
|
onToggle: t[1] ||= (...e) => c.onToggle && c.onToggle(...e),
|
|
738
823
|
onClick: t[2] ||= (...e) => c.onClick && c.onClick(...e)
|
|
739
|
-
}, [p(e.$slots, "default")], 42,
|
|
824
|
+
}, [p(e.$slots, "default")], 42, at)])) : r("", !0);
|
|
740
825
|
}
|
|
741
|
-
var V = /*#__PURE__*/
|
|
826
|
+
var V = /*#__PURE__*/ A(rt, [["render", ot]]);
|
|
742
827
|
//#endregion
|
|
743
828
|
//#region src/date.js
|
|
744
829
|
function H(e) {
|
|
@@ -753,21 +838,21 @@ function U(e) {
|
|
|
753
838
|
//#endregion
|
|
754
839
|
//#region src/lang.js
|
|
755
840
|
var W = {
|
|
756
|
-
inject:
|
|
841
|
+
inject: _e,
|
|
757
842
|
props: { lang: {
|
|
758
843
|
type: String,
|
|
759
844
|
default: null,
|
|
760
|
-
validator: (e) => e === null ||
|
|
845
|
+
validator: (e) => e === null || C(e)
|
|
761
846
|
} },
|
|
762
847
|
computed: {
|
|
763
848
|
resolvedLang() {
|
|
764
|
-
return
|
|
849
|
+
return C(this.lang) ? this.lang : this.uiSettings.lang;
|
|
765
850
|
},
|
|
766
851
|
texts() {
|
|
767
|
-
return
|
|
852
|
+
return ie[this.resolvedLang];
|
|
768
853
|
}
|
|
769
854
|
}
|
|
770
|
-
},
|
|
855
|
+
}, st = {
|
|
771
856
|
components: {
|
|
772
857
|
PopoverPanel: V,
|
|
773
858
|
Eraser: N
|
|
@@ -848,17 +933,17 @@ var W = {
|
|
|
848
933
|
return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
|
|
849
934
|
}
|
|
850
935
|
}
|
|
851
|
-
},
|
|
936
|
+
}, ct = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, lt = { class: "bb:relative bb:flex bb:h-full" }, ut = ["id", "popovertarget"], dt = { class: "bb:min-w-24 bb:w-full bb:h-full bb:pointer-events-none" }, ft = [
|
|
852
937
|
"disabled",
|
|
853
938
|
"value",
|
|
854
939
|
"placeholder"
|
|
855
|
-
],
|
|
940
|
+
], pt = {
|
|
856
941
|
ref: "container",
|
|
857
942
|
class: "bb:flex"
|
|
858
943
|
};
|
|
859
|
-
function
|
|
944
|
+
function mt(e, t, o, c, l, u) {
|
|
860
945
|
let f = m("popover-panel"), p = m("eraser");
|
|
861
|
-
return d(), i("div",
|
|
946
|
+
return d(), i("div", ct, [a("div", lt, [s(f, {
|
|
862
947
|
class: "bb:flex bb:w-full",
|
|
863
948
|
modelValue: l.popupIsOpen,
|
|
864
949
|
"onUpdate:modelValue": t[0] ||= (e) => l.popupIsOpen = e,
|
|
@@ -871,15 +956,15 @@ function at(e, t, o, c, l, u) {
|
|
|
871
956
|
id: e.id,
|
|
872
957
|
popovertarget: e.popovertarget,
|
|
873
958
|
class: "bb:flex bb:w-full bb:items-center bb:cursor-pointer bb:leading-none bb:focus:outline-hidden"
|
|
874
|
-
}, [a("label",
|
|
959
|
+
}, [a("label", dt, [a("input", {
|
|
875
960
|
disabled: l.popupIsOpen,
|
|
876
961
|
ref: "field",
|
|
877
962
|
type: "text",
|
|
878
963
|
value: l.dayValue,
|
|
879
964
|
placeholder: o.placeholderText,
|
|
880
965
|
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"
|
|
881
|
-
}, null, 8,
|
|
882
|
-
default: b(() => [a("div",
|
|
966
|
+
}, null, 8, ft)])], 8, ut)]),
|
|
967
|
+
default: b(() => [a("div", pt, null, 512)]),
|
|
883
968
|
_: 1
|
|
884
969
|
}, 8, ["modelValue"]), u.needsEraser ? (d(), n(p, {
|
|
885
970
|
key: 0,
|
|
@@ -889,10 +974,10 @@ function at(e, t, o, c, l, u) {
|
|
|
889
974
|
}
|
|
890
975
|
//#endregion
|
|
891
976
|
//#region src/components/SelectDateInterval.vue
|
|
892
|
-
var
|
|
977
|
+
var ht = {
|
|
893
978
|
components: {
|
|
894
979
|
ElementHeader: M,
|
|
895
|
-
PickDay: /* @__PURE__ */
|
|
980
|
+
PickDay: /* @__PURE__ */ A(st, [["render", mt]])
|
|
896
981
|
},
|
|
897
982
|
mixins: [W],
|
|
898
983
|
emits: [
|
|
@@ -942,10 +1027,10 @@ var ot = {
|
|
|
942
1027
|
this.$emit("update:dateTo", e), this.dateTo !== e && this.$emit("changed");
|
|
943
1028
|
}
|
|
944
1029
|
}
|
|
945
|
-
},
|
|
946
|
-
function
|
|
1030
|
+
}, gt = { class: "bb-dashboard-ui bb:flex" }, _t = { class: "bb:flex bb:border bb:border-white" }, vt = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, yt = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
|
|
1031
|
+
function bt(e, t, n, r, o, c) {
|
|
947
1032
|
let l = m("element-header"), u = m("pick-day");
|
|
948
|
-
return d(), i("div",
|
|
1033
|
+
return d(), i("div", gt, [a("div", _t, [a("div", vt, [s(l, {
|
|
949
1034
|
text: n.header,
|
|
950
1035
|
"is-required": n.isRequired,
|
|
951
1036
|
"is-loading": n.isLoading
|
|
@@ -953,7 +1038,7 @@ function dt(e, t, n, r, o, c) {
|
|
|
953
1038
|
"text",
|
|
954
1039
|
"is-required",
|
|
955
1040
|
"is-loading"
|
|
956
|
-
]), a("div",
|
|
1041
|
+
]), a("div", yt, [s(u, {
|
|
957
1042
|
modelValue: o.userDateFrom,
|
|
958
1043
|
"onUpdate:modelValue": t[0] ||= (e) => o.userDateFrom = e,
|
|
959
1044
|
class: "bb:flex-1 bb:min-w-36 bb:pl-3",
|
|
@@ -975,7 +1060,7 @@ function dt(e, t, n, r, o, c) {
|
|
|
975
1060
|
"lang"
|
|
976
1061
|
])])])])]);
|
|
977
1062
|
}
|
|
978
|
-
var
|
|
1063
|
+
var xt = /*#__PURE__*/ A(ht, [["render", bt]]), St = {
|
|
979
1064
|
components: {
|
|
980
1065
|
PopoverPanel: V,
|
|
981
1066
|
Eraser: N
|
|
@@ -1002,10 +1087,10 @@ var ft = /*#__PURE__*/ j(ot, [["render", dt]]), pt = {
|
|
|
1002
1087
|
computed: { needsEraser() {
|
|
1003
1088
|
return !this.isOpen && this.hasValue;
|
|
1004
1089
|
} }
|
|
1005
|
-
},
|
|
1006
|
-
function
|
|
1090
|
+
}, Ct = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, wt = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, Tt = ["id", "popovertarget"], Et = ["textContent"];
|
|
1091
|
+
function Dt(e, t, o, c, l, u) {
|
|
1007
1092
|
let f = m("popover-panel"), h = m("eraser");
|
|
1008
|
-
return d(), i("div",
|
|
1093
|
+
return d(), i("div", Ct, [a("div", wt, [s(f, {
|
|
1009
1094
|
class: "bb:flex bb:w-full bb:h-full",
|
|
1010
1095
|
"model-value": o.isOpen,
|
|
1011
1096
|
align: "start",
|
|
@@ -1023,7 +1108,7 @@ function vt(e, t, o, c, l, u) {
|
|
|
1023
1108
|
}, [a("span", {
|
|
1024
1109
|
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",
|
|
1025
1110
|
textContent: g(o.title)
|
|
1026
|
-
}, null, 8,
|
|
1111
|
+
}, null, 8, Et)], 8, Tt)]),
|
|
1027
1112
|
default: b(() => [p(e.$slots, "default")]),
|
|
1028
1113
|
_: 3
|
|
1029
1114
|
}, 8, ["model-value", "find-selected"]), u.needsEraser ? (d(), n(h, {
|
|
@@ -1032,7 +1117,7 @@ function vt(e, t, o, c, l, u) {
|
|
|
1032
1117
|
class: "bb:pr-2 bb:h-full"
|
|
1033
1118
|
})) : r("", !0)])]);
|
|
1034
1119
|
}
|
|
1035
|
-
var
|
|
1120
|
+
var Ot = /*#__PURE__*/ A(St, [["render", Dt]]), kt = {
|
|
1036
1121
|
props: {
|
|
1037
1122
|
isChecked: {
|
|
1038
1123
|
type: Boolean,
|
|
@@ -1044,31 +1129,31 @@ var yt = /*#__PURE__*/ j(pt, [["render", vt]]), bt = {
|
|
|
1044
1129
|
methods: { toggle() {
|
|
1045
1130
|
this.$emit("clicked");
|
|
1046
1131
|
} }
|
|
1047
|
-
},
|
|
1132
|
+
}, At = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, jt = {
|
|
1048
1133
|
class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
|
|
1049
1134
|
viewBox: "0 0 20 20"
|
|
1050
|
-
},
|
|
1051
|
-
function
|
|
1135
|
+
}, Mt = ["textContent"];
|
|
1136
|
+
function Nt(e, t, n, r, o, s) {
|
|
1052
1137
|
return d(), i("button", {
|
|
1053
1138
|
type: "button",
|
|
1054
1139
|
onClick: t[0] ||= S((...e) => s.toggle && s.toggle(...e), ["prevent"]),
|
|
1055
1140
|
class: "bb:flex bb:w-full bb:bg-white bb:cursor-pointer bb:focus:outline-hidden bb:focus:bg-indigo-100"
|
|
1056
|
-
}, [a("span",
|
|
1141
|
+
}, [a("span", At, [x((d(), i("svg", jt, [...t[1] ||= [a("path", {
|
|
1057
1142
|
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",
|
|
1058
1143
|
"clip-rule": "evenodd",
|
|
1059
1144
|
"fill-rule": "evenodd"
|
|
1060
1145
|
}, null, -1)]], 512)), [[y, n.isChecked]])]), a("span", {
|
|
1061
1146
|
class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none",
|
|
1062
1147
|
textContent: g(n.name)
|
|
1063
|
-
}, null, 8,
|
|
1148
|
+
}, null, 8, Mt)]);
|
|
1064
1149
|
}
|
|
1065
1150
|
//#endregion
|
|
1066
1151
|
//#region src/components/SelectSingle.vue
|
|
1067
|
-
var
|
|
1152
|
+
var Pt = {
|
|
1068
1153
|
components: {
|
|
1069
1154
|
ElementHeader: M,
|
|
1070
|
-
DropdownButton:
|
|
1071
|
-
ListElement: /* @__PURE__ */
|
|
1155
|
+
DropdownButton: Ot,
|
|
1156
|
+
ListElement: /* @__PURE__ */ A(kt, [["render", Nt]])
|
|
1072
1157
|
},
|
|
1073
1158
|
emits: ["update:modelValue", "changed"],
|
|
1074
1159
|
props: {
|
|
@@ -1128,13 +1213,13 @@ var Tt = {
|
|
|
1128
1213
|
return e === -1 ? null : this.$refs.list.querySelectorAll("button")[e];
|
|
1129
1214
|
}
|
|
1130
1215
|
}
|
|
1131
|
-
},
|
|
1216
|
+
}, Ft = { 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" }, Lt = {
|
|
1132
1217
|
ref: "list",
|
|
1133
1218
|
class: "bb:flex bb:flex-col bb:py-1 bb:divide-y bb:divide-gray-200 bb:divide-dashed"
|
|
1134
1219
|
};
|
|
1135
|
-
function
|
|
1220
|
+
function Rt(t, o, c, l, u, p) {
|
|
1136
1221
|
let h = m("element-header"), g = m("list-element"), _ = m("dropdown-button");
|
|
1137
|
-
return d(), i("div",
|
|
1222
|
+
return d(), i("div", Ft, [a("div", It, [s(h, {
|
|
1138
1223
|
text: c.header,
|
|
1139
1224
|
"is-required": c.isRequired,
|
|
1140
1225
|
"is-loading": c.isLoading
|
|
@@ -1151,7 +1236,7 @@ function kt(t, o, c, l, u, p) {
|
|
|
1151
1236
|
"find-selected": p.activeItemElement,
|
|
1152
1237
|
onErased: p.clear
|
|
1153
1238
|
}, {
|
|
1154
|
-
default: b(() => [a("div",
|
|
1239
|
+
default: b(() => [a("div", Lt, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
|
|
1155
1240
|
name: e.name,
|
|
1156
1241
|
key: e.id,
|
|
1157
1242
|
"is-checked": e.id === c.modelValue,
|
|
@@ -1170,7 +1255,8 @@ function kt(t, o, c, l, u, p) {
|
|
|
1170
1255
|
"onErased"
|
|
1171
1256
|
])) : r("", !0)])]);
|
|
1172
1257
|
}
|
|
1173
|
-
var
|
|
1258
|
+
var zt = /*#__PURE__*/ A(Pt, [["render", Rt]]), Bt = {
|
|
1259
|
+
mixins: [k],
|
|
1174
1260
|
props: {
|
|
1175
1261
|
text: {
|
|
1176
1262
|
type: String,
|
|
@@ -1179,51 +1265,17 @@ var At = /*#__PURE__*/ j(Tt, [["render", kt]]), jt = {
|
|
|
1179
1265
|
color: {
|
|
1180
1266
|
type: String,
|
|
1181
1267
|
required: !0,
|
|
1182
|
-
validator:
|
|
1183
|
-
"green",
|
|
1184
|
-
"indigo",
|
|
1185
|
-
"gray",
|
|
1186
|
-
"blue",
|
|
1187
|
-
"red",
|
|
1188
|
-
"yellow"
|
|
1189
|
-
].indexOf(e) !== -1
|
|
1190
|
-
}
|
|
1191
|
-
},
|
|
1192
|
-
computed: {
|
|
1193
|
-
isGreen() {
|
|
1194
|
-
return this.color === "green";
|
|
1195
|
-
},
|
|
1196
|
-
isIndigo() {
|
|
1197
|
-
return this.color === "indigo";
|
|
1198
|
-
},
|
|
1199
|
-
isGray() {
|
|
1200
|
-
return this.color === "gray";
|
|
1201
|
-
},
|
|
1202
|
-
isBlue() {
|
|
1203
|
-
return this.color === "blue";
|
|
1204
|
-
},
|
|
1205
|
-
isRed() {
|
|
1206
|
-
return this.color === "red";
|
|
1207
|
-
},
|
|
1208
|
-
isYellow() {
|
|
1209
|
-
return this.color === "yellow";
|
|
1268
|
+
validator: O
|
|
1210
1269
|
}
|
|
1211
1270
|
}
|
|
1212
|
-
},
|
|
1213
|
-
function
|
|
1271
|
+
}, Vt = ["textContent"];
|
|
1272
|
+
function Ht(e, t, n, r, a, o) {
|
|
1214
1273
|
return d(), i("span", {
|
|
1215
|
-
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",
|
|
1216
|
-
"bb:bg-green-50 bb:text-gray-700": o.isGreen,
|
|
1217
|
-
"bb:bg-indigo-100 bb:text-gray-700": o.isIndigo,
|
|
1218
|
-
"bb:bg-gray-200 bb:text-gray-700": o.isGray,
|
|
1219
|
-
"bb:bg-blue-100 bb:text-blue-800": o.isBlue,
|
|
1220
|
-
"bb:bg-red-100 bb:text-red-800": o.isRed,
|
|
1221
|
-
"bb:bg-yellow-100 bb:text-yellow-800": o.isYellow
|
|
1222
|
-
}]),
|
|
1274
|
+
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", e.colorClass(n.color, "pill")]),
|
|
1223
1275
|
textContent: g(n.text)
|
|
1224
|
-
}, null, 10,
|
|
1276
|
+
}, null, 10, Vt);
|
|
1225
1277
|
}
|
|
1226
|
-
var G = /*#__PURE__*/
|
|
1278
|
+
var G = /*#__PURE__*/ A(Bt, [["render", Ht]]), Ut = {
|
|
1227
1279
|
props: {
|
|
1228
1280
|
messages: {
|
|
1229
1281
|
type: [Object, Array],
|
|
@@ -1243,12 +1295,12 @@ var G = /*#__PURE__*/ j(jt, [["render", Nt]]), Pt = {
|
|
|
1243
1295
|
return this.type === "dangerous";
|
|
1244
1296
|
}
|
|
1245
1297
|
}
|
|
1246
|
-
},
|
|
1247
|
-
function
|
|
1298
|
+
}, Wt = { class: "bb:flex" }, Gt = { class: "bb:shrink-0" }, Kt = { class: "bb:ml-3" }, qt = ["textContent"];
|
|
1299
|
+
function Jt(t, n, o, s, c, l) {
|
|
1248
1300
|
return l.hasErrors ? (d(), i("div", {
|
|
1249
1301
|
key: 0,
|
|
1250
1302
|
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"])
|
|
1251
|
-
}, [a("div",
|
|
1303
|
+
}, [a("div", Wt, [a("div", Gt, [(d(), i("svg", {
|
|
1252
1304
|
class: u(["bb:h-5 bb:w-5", l.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
|
|
1253
1305
|
viewBox: "0 0 20 20",
|
|
1254
1306
|
fill: "currentColor"
|
|
@@ -1256,55 +1308,137 @@ function zt(t, n, o, s, c, l) {
|
|
|
1256
1308
|
"fill-rule": "evenodd",
|
|
1257
1309
|
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",
|
|
1258
1310
|
"clip-rule": "evenodd"
|
|
1259
|
-
}, null, -1)]], 2))]), a("div",
|
|
1311
|
+
}, null, -1)]], 2))]), a("div", Kt, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
|
|
1260
1312
|
class: u(["bb:text-sm bb:leading-5", l.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
|
|
1261
1313
|
key: t,
|
|
1262
1314
|
textContent: g(e)
|
|
1263
|
-
}, null, 10,
|
|
1315
|
+
}, null, 10, qt))), 128))])])], 2)) : r("", !0);
|
|
1264
1316
|
}
|
|
1265
|
-
var
|
|
1317
|
+
var Yt = /*#__PURE__*/ A(Ut, [["render", Jt]]), Xt = {}, Zt = {
|
|
1318
|
+
class: "bb:w-4 bb:h-4",
|
|
1319
|
+
fill: "none",
|
|
1320
|
+
stroke: "currentColor",
|
|
1321
|
+
"stroke-width": "2",
|
|
1322
|
+
"stroke-linecap": "round",
|
|
1323
|
+
viewBox: "0 0 24 24",
|
|
1324
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1325
|
+
"aria-hidden": "true"
|
|
1326
|
+
};
|
|
1327
|
+
function Qt(e, t, n, r, o, s) {
|
|
1328
|
+
return d(), i("svg", Zt, [...t[0] ||= [
|
|
1329
|
+
a("circle", {
|
|
1330
|
+
cx: "12",
|
|
1331
|
+
cy: "12",
|
|
1332
|
+
r: "9"
|
|
1333
|
+
}, null, -1),
|
|
1334
|
+
a("line", {
|
|
1335
|
+
class: "bb:origin-center bb:animate-[spin_12s_linear_infinite] bb:motion-reduce:animate-none",
|
|
1336
|
+
x1: "12",
|
|
1337
|
+
y1: "12",
|
|
1338
|
+
x2: "15",
|
|
1339
|
+
y2: "12"
|
|
1340
|
+
}, null, -1),
|
|
1341
|
+
a("line", {
|
|
1342
|
+
class: "bb:origin-center bb:animate-spin bb:motion-reduce:animate-none",
|
|
1343
|
+
x1: "12",
|
|
1344
|
+
y1: "12",
|
|
1345
|
+
x2: "12",
|
|
1346
|
+
y2: "6.5"
|
|
1347
|
+
}, null, -1)
|
|
1348
|
+
]]);
|
|
1349
|
+
}
|
|
1350
|
+
var $t = /*#__PURE__*/ A(Xt, [["render", Qt]]), en = {}, tn = {
|
|
1266
1351
|
class: "bb:w-4 bb:h-4",
|
|
1267
1352
|
fill: "none",
|
|
1268
1353
|
stroke: "currentColor",
|
|
1269
1354
|
viewBox: "0 0 24 24",
|
|
1270
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
1355
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1356
|
+
"aria-hidden": "true"
|
|
1271
1357
|
};
|
|
1272
|
-
function
|
|
1273
|
-
return d(), i("svg",
|
|
1358
|
+
function nn(e, t, n, r, o, s) {
|
|
1359
|
+
return d(), i("svg", tn, [...t[0] ||= [a("path", {
|
|
1274
1360
|
"stroke-linecap": "round",
|
|
1275
1361
|
"stroke-linejoin": "round",
|
|
1276
1362
|
"stroke-width": "2",
|
|
1277
1363
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
1278
1364
|
}, null, -1)]]);
|
|
1279
1365
|
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1366
|
+
var rn = /*#__PURE__*/ A(en, [["render", nn]]), an = {}, on = {
|
|
1367
|
+
class: "bb:w-4 bb:h-4",
|
|
1368
|
+
fill: "none",
|
|
1369
|
+
stroke: "currentColor",
|
|
1370
|
+
viewBox: "0 0 24 24",
|
|
1371
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1372
|
+
"aria-hidden": "true"
|
|
1373
|
+
};
|
|
1374
|
+
function sn(e, t, n, r, o, s) {
|
|
1375
|
+
return d(), i("svg", on, [...t[0] ||= [a("path", {
|
|
1376
|
+
"stroke-linecap": "round",
|
|
1377
|
+
"stroke-linejoin": "round",
|
|
1378
|
+
"stroke-width": "2",
|
|
1379
|
+
d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
1380
|
+
}, null, -1)]]);
|
|
1381
|
+
}
|
|
1382
|
+
var cn = /*#__PURE__*/ A(an, [["render", sn]]), ln = ["download", "refresh"], un = {
|
|
1383
|
+
components: {
|
|
1384
|
+
"clock-icon": $t,
|
|
1385
|
+
"download-icon": rn,
|
|
1386
|
+
"refresh-icon": cn
|
|
1387
|
+
},
|
|
1388
|
+
mixins: [k],
|
|
1389
|
+
emits: ["click"],
|
|
1285
1390
|
props: {
|
|
1286
|
-
|
|
1391
|
+
title: {
|
|
1287
1392
|
type: String,
|
|
1288
1393
|
required: !0
|
|
1289
1394
|
},
|
|
1290
|
-
|
|
1395
|
+
icon: {
|
|
1396
|
+
type: String,
|
|
1397
|
+
required: !0,
|
|
1398
|
+
validator: (e) => ln.includes(e)
|
|
1399
|
+
},
|
|
1400
|
+
color: {
|
|
1401
|
+
type: String,
|
|
1402
|
+
default: "purple",
|
|
1403
|
+
validator: O
|
|
1404
|
+
},
|
|
1405
|
+
isLoading: {
|
|
1406
|
+
type: Boolean,
|
|
1407
|
+
default: !1
|
|
1408
|
+
},
|
|
1409
|
+
loadingText: {
|
|
1291
1410
|
type: String,
|
|
1292
1411
|
default: null
|
|
1293
1412
|
}
|
|
1294
1413
|
},
|
|
1295
1414
|
computed: { label() {
|
|
1296
|
-
|
|
1415
|
+
let e = this.isLoading && typeof this.loadingText == "string" && this.loadingText !== "" ? this.loadingText : this.title;
|
|
1416
|
+
return typeof e == "string" ? e : "";
|
|
1297
1417
|
} }
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1418
|
+
}, dn = [
|
|
1419
|
+
"title",
|
|
1420
|
+
"disabled",
|
|
1421
|
+
"aria-busy"
|
|
1422
|
+
], fn = ["textContent"];
|
|
1423
|
+
function pn(e, t, o, s, c, l) {
|
|
1424
|
+
let f = m("clock-icon"), p = m("download-icon"), h = m("refresh-icon");
|
|
1425
|
+
return d(), i("button", {
|
|
1426
|
+
type: "button",
|
|
1427
|
+
class: u(["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:whitespace-nowrap", [
|
|
1428
|
+
e.colorClass(o.color, "pill"),
|
|
1429
|
+
o.isLoading ? "bb:opacity-60 bb:cursor-not-allowed" : "bb:cursor-pointer",
|
|
1430
|
+
o.isLoading ? "" : e.colorClass(o.color, "pillHover")
|
|
1431
|
+
]]),
|
|
1432
|
+
title: l.label,
|
|
1433
|
+
disabled: o.isLoading,
|
|
1434
|
+
"aria-busy": o.isLoading ? "true" : null,
|
|
1435
|
+
onClick: t[0] ||= (t) => e.$emit("click")
|
|
1436
|
+
}, [o.isLoading ? (d(), n(f, { key: 0 })) : o.icon === "download" ? (d(), n(p, { key: 1 })) : o.icon === "refresh" ? (d(), n(h, { key: 2 })) : r("", !0), a("span", {
|
|
1437
|
+
class: "bb:ml-1",
|
|
1438
|
+
textContent: g(l.label)
|
|
1439
|
+
}, null, 8, fn)], 10, dn);
|
|
1440
|
+
}
|
|
1441
|
+
var mn = /*#__PURE__*/ A(un, [["render", pn]]), hn = { props: {
|
|
1308
1442
|
isOpen: {
|
|
1309
1443
|
type: Boolean,
|
|
1310
1444
|
default: !1
|
|
@@ -1313,9 +1447,9 @@ var Jt = /*#__PURE__*/ j(Wt, [["render", qt]]), Yt = { props: {
|
|
|
1313
1447
|
type: String,
|
|
1314
1448
|
required: !0
|
|
1315
1449
|
}
|
|
1316
|
-
} },
|
|
1317
|
-
function
|
|
1318
|
-
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",
|
|
1450
|
+
} }, gn = { 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" }, _n = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, vn = ["aria-labelledby"];
|
|
1451
|
+
function yn(e, n, r, o, c, l) {
|
|
1452
|
+
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", gn, [
|
|
1319
1453
|
s(t, {
|
|
1320
1454
|
"enter-active-class": "bb:ease-out bb:duration-300",
|
|
1321
1455
|
"enter-from-class": "bb:opacity-0",
|
|
@@ -1324,7 +1458,7 @@ function $t(e, n, r, o, c, l) {
|
|
|
1324
1458
|
"leave-from-class": "bb:opacity-100",
|
|
1325
1459
|
"leave-to-class": "bb:opacity-0"
|
|
1326
1460
|
}, {
|
|
1327
|
-
default: b(() => [x(a("div",
|
|
1461
|
+
default: b(() => [x(a("div", _n, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
|
|
1328
1462
|
_: 1
|
|
1329
1463
|
}),
|
|
1330
1464
|
n[1] ||= a("span", { class: "bb:hidden bb:sm:inline-block bb:sm:align-middle bb:sm:h-screen" }, null, -1),
|
|
@@ -1341,12 +1475,12 @@ function $t(e, n, r, o, c, l) {
|
|
|
1341
1475
|
role: "dialog",
|
|
1342
1476
|
"aria-modal": "true",
|
|
1343
1477
|
"aria-labelledby": r.headingId
|
|
1344
|
-
}, [p(e.$slots, "default")], 8,
|
|
1478
|
+
}, [p(e.$slots, "default")], 8, vn), [[y, r.isOpen]])]),
|
|
1345
1479
|
_: 3
|
|
1346
1480
|
})
|
|
1347
1481
|
])], 2);
|
|
1348
1482
|
}
|
|
1349
|
-
var
|
|
1483
|
+
var bn = /*#__PURE__*/ A(hn, [["render", yn]]), xn = {}, Sn = {
|
|
1350
1484
|
class: "bb:h-7 bb:w-7 bb:text-red-600",
|
|
1351
1485
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1352
1486
|
fill: "none",
|
|
@@ -1354,31 +1488,31 @@ var en = /*#__PURE__*/ j(Yt, [["render", $t]]), tn = {}, nn = {
|
|
|
1354
1488
|
stroke: "currentColor",
|
|
1355
1489
|
"aria-hidden": "true"
|
|
1356
1490
|
};
|
|
1357
|
-
function
|
|
1358
|
-
return d(), i("svg",
|
|
1491
|
+
function Cn(e, t, n, r, o, s) {
|
|
1492
|
+
return d(), i("svg", Sn, [...t[0] ||= [a("path", {
|
|
1359
1493
|
"stroke-linecap": "round",
|
|
1360
1494
|
"stroke-linejoin": "round",
|
|
1361
1495
|
"stroke-width": "2",
|
|
1362
1496
|
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"
|
|
1363
1497
|
}, null, -1)]]);
|
|
1364
1498
|
}
|
|
1365
|
-
var K = /*#__PURE__*/
|
|
1499
|
+
var K = /*#__PURE__*/ A(xn, [["render", Cn]]), wn = {}, Tn = {
|
|
1366
1500
|
class: "bb:h-7 bb:w-7 bb:text-yellow-400",
|
|
1367
1501
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1368
1502
|
viewBox: "0 0 20 20",
|
|
1369
1503
|
fill: "currentColor",
|
|
1370
1504
|
"aria-hidden": "true"
|
|
1371
1505
|
};
|
|
1372
|
-
function
|
|
1373
|
-
return d(), i("svg",
|
|
1506
|
+
function En(e, t, n, r, o, s) {
|
|
1507
|
+
return d(), i("svg", Tn, [...t[0] ||= [a("path", {
|
|
1374
1508
|
"fill-rule": "evenodd",
|
|
1375
1509
|
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",
|
|
1376
1510
|
"clip-rule": "evenodd"
|
|
1377
1511
|
}, null, -1)]]);
|
|
1378
1512
|
}
|
|
1379
|
-
var q = /*#__PURE__*/
|
|
1513
|
+
var q = /*#__PURE__*/ A(wn, [["render", En]]), Dn = {
|
|
1380
1514
|
components: {
|
|
1381
|
-
Modal:
|
|
1515
|
+
Modal: bn,
|
|
1382
1516
|
Dangerous: K,
|
|
1383
1517
|
Warning: q
|
|
1384
1518
|
},
|
|
@@ -1422,20 +1556,20 @@ var q = /*#__PURE__*/ j(an, [["render", sn]]), cn = {
|
|
|
1422
1556
|
return this.type === "warning";
|
|
1423
1557
|
}
|
|
1424
1558
|
}
|
|
1425
|
-
},
|
|
1426
|
-
function
|
|
1559
|
+
}, On = { 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" }, kn = { class: "bb:sm:flex bb:sm:items-start" }, An = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, jn = ["id"], Mn = { class: "bb:mt-2" }, Nn = { class: "bb:text-sm bb:text-gray-500" }, Pn = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-4 bb:py-3 bb:sm:px-6 bb:sm:flex bb:sm:flex-row-reverse" };
|
|
1560
|
+
function Fn(e, t, i, o, s, c) {
|
|
1427
1561
|
let l = m("warning"), f = m("dangerous"), p = m("modal");
|
|
1428
1562
|
return d(), n(p, {
|
|
1429
1563
|
"is-open": i.isOpen,
|
|
1430
1564
|
"heading-id": o.headingId
|
|
1431
1565
|
}, {
|
|
1432
|
-
default: b(() => [a("div",
|
|
1566
|
+
default: b(() => [a("div", On, [a("div", kn, [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", {
|
|
1433
1567
|
"bb:bg-red-100": c.isDangerous,
|
|
1434
1568
|
"bb:bg-yellow-100": c.isWarning
|
|
1435
|
-
}]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div",
|
|
1569
|
+
}]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", An, [a("h3", {
|
|
1436
1570
|
class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
|
|
1437
1571
|
id: o.headingId
|
|
1438
|
-
}, g(i.confirmationHeading), 9,
|
|
1572
|
+
}, g(i.confirmationHeading), 9, jn), a("div", Mn, [a("p", Nn, g(i.confirmationText), 1)])])])]), a("div", Pn, [a("button", {
|
|
1439
1573
|
type: "button",
|
|
1440
1574
|
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", {
|
|
1441
1575
|
"bb:bg-red-600 bb:hover:bg-red-700 bb:focus:ring-red-500": c.isDangerous,
|
|
@@ -1450,50 +1584,38 @@ function gn(e, t, i, o, s, c) {
|
|
|
1450
1584
|
_: 1
|
|
1451
1585
|
}, 8, ["is-open", "heading-id"]);
|
|
1452
1586
|
}
|
|
1453
|
-
var
|
|
1454
|
-
|
|
1455
|
-
|
|
1587
|
+
var In = /*#__PURE__*/ A(Dn, [["render", Fn]]);
|
|
1588
|
+
//#endregion
|
|
1589
|
+
//#region src/menuItems.js
|
|
1590
|
+
function J(e) {
|
|
1591
|
+
if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.color !== void 0 && !O(e.color)) return !1;
|
|
1456
1592
|
let t = typeof e.href == "string" && e.href !== "" && e.onSelect === void 0, n = typeof e.onSelect == "function" && e.href === void 0;
|
|
1457
1593
|
return t || n;
|
|
1458
1594
|
}
|
|
1459
|
-
function
|
|
1595
|
+
function Y(e) {
|
|
1460
1596
|
return Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e) : [];
|
|
1461
1597
|
}
|
|
1462
|
-
function
|
|
1598
|
+
function Ln(e) {
|
|
1463
1599
|
return typeof e.href == "string" && e.href !== "";
|
|
1464
1600
|
}
|
|
1465
|
-
function
|
|
1466
|
-
return
|
|
1467
|
-
}
|
|
1468
|
-
function vn(e) {
|
|
1469
|
-
return {
|
|
1470
|
-
data() {
|
|
1471
|
-
return { dangerWarned: !1 };
|
|
1472
|
-
},
|
|
1473
|
-
watch: { actions: {
|
|
1474
|
-
immediate: !0,
|
|
1475
|
-
deep: !0,
|
|
1476
|
-
handler(t) {
|
|
1477
|
-
process.env.NODE_ENV === "production" || this.dangerWarned || X(t).some((e) => e.danger !== void 0) && (this.dangerWarned = !0, console.warn(`[dashboard-ui-components] ${e}: поле danger убрано, красный пункт — color: 'red'`));
|
|
1478
|
-
}
|
|
1479
|
-
} }
|
|
1480
|
-
};
|
|
1601
|
+
function Rn(e) {
|
|
1602
|
+
return O(e.color) ? e.color : null;
|
|
1481
1603
|
}
|
|
1482
1604
|
//#endregion
|
|
1483
1605
|
//#region src/navigation.js
|
|
1484
|
-
function
|
|
1606
|
+
function zn(e) {
|
|
1485
1607
|
let t = e.currentTarget?.target ?? "";
|
|
1486
1608
|
return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
|
|
1487
1609
|
}
|
|
1488
|
-
var
|
|
1489
|
-
inject:
|
|
1610
|
+
var X = {
|
|
1611
|
+
inject: _e,
|
|
1490
1612
|
methods: { followLink(e, t) {
|
|
1491
1613
|
let n = this.uiSettings.navigate;
|
|
1492
|
-
n !== null &&
|
|
1614
|
+
n !== null && zn(e) && (e.preventDefault(), n(t));
|
|
1493
1615
|
} }
|
|
1494
|
-
},
|
|
1616
|
+
}, Bn = {
|
|
1495
1617
|
components: { PopoverPanel: V },
|
|
1496
|
-
mixins: [
|
|
1618
|
+
mixins: [X, k],
|
|
1497
1619
|
emits: ["update:modelValue"],
|
|
1498
1620
|
props: {
|
|
1499
1621
|
actions: { default: () => [] },
|
|
@@ -1504,7 +1626,7 @@ var $ = {
|
|
|
1504
1626
|
},
|
|
1505
1627
|
computed: {
|
|
1506
1628
|
actionItems() {
|
|
1507
|
-
return
|
|
1629
|
+
return Y(this.actions);
|
|
1508
1630
|
},
|
|
1509
1631
|
hasActions() {
|
|
1510
1632
|
return this.actionItems.length > 0;
|
|
@@ -1512,21 +1634,21 @@ var $ = {
|
|
|
1512
1634
|
},
|
|
1513
1635
|
methods: {
|
|
1514
1636
|
color(e) {
|
|
1515
|
-
return
|
|
1637
|
+
return Rn(e);
|
|
1516
1638
|
},
|
|
1517
1639
|
isLink(e) {
|
|
1518
|
-
return
|
|
1640
|
+
return Ln(e);
|
|
1519
1641
|
},
|
|
1520
1642
|
select(e) {
|
|
1521
1643
|
if (typeof e.onSelect == "function") return e.onSelect();
|
|
1522
1644
|
}
|
|
1523
1645
|
}
|
|
1524
|
-
},
|
|
1646
|
+
}, Vn = [
|
|
1525
1647
|
"href",
|
|
1526
1648
|
"onClick",
|
|
1527
1649
|
"textContent"
|
|
1528
|
-
],
|
|
1529
|
-
function
|
|
1650
|
+
], Hn = ["onClick", "textContent"];
|
|
1651
|
+
function Un(t, r, a, o, s, c) {
|
|
1530
1652
|
let l = m("popover-panel");
|
|
1531
1653
|
return d(), n(l, {
|
|
1532
1654
|
"model-value": a.modelValue,
|
|
@@ -1547,41 +1669,33 @@ function Cn(t, r, a, o, s, c) {
|
|
|
1547
1669
|
key: 0,
|
|
1548
1670
|
href: n.href,
|
|
1549
1671
|
role: "menuitem",
|
|
1550
|
-
class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden",
|
|
1551
|
-
"bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900": c.color(n) === null,
|
|
1552
|
-
"bb:text-yellow-800 bb:focus:bg-yellow-100": c.color(n) === "yellow",
|
|
1553
|
-
"bb:text-red-700 bb:focus:bg-red-50": c.color(n) === "red"
|
|
1554
|
-
}]),
|
|
1672
|
+
class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", c.color(n) === null ? "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900" : t.colorClass(c.color(n), "menuItem")]),
|
|
1555
1673
|
onClick: (e) => t.followLink(e, n.href),
|
|
1556
1674
|
textContent: g(n.label)
|
|
1557
|
-
}, null, 10,
|
|
1675
|
+
}, null, 10, Vn)) : (d(), i("button", {
|
|
1558
1676
|
key: 1,
|
|
1559
1677
|
type: "button",
|
|
1560
1678
|
role: "menuitem",
|
|
1561
|
-
class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden",
|
|
1562
|
-
"bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900": c.color(n) === null,
|
|
1563
|
-
"bb:text-yellow-800 bb:focus:bg-yellow-100": c.color(n) === "yellow",
|
|
1564
|
-
"bb:text-red-700 bb:focus:bg-red-50": c.color(n) === "red"
|
|
1565
|
-
}]),
|
|
1679
|
+
class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", c.color(n) === null ? "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900" : t.colorClass(c.color(n), "menuItem")]),
|
|
1566
1680
|
onClick: (e) => c.select(n),
|
|
1567
1681
|
textContent: g(n.label)
|
|
1568
|
-
}, null, 10,
|
|
1682
|
+
}, null, 10, Hn))], 64))), 128))]),
|
|
1569
1683
|
_: 3
|
|
1570
1684
|
}, 8, ["model-value", "has-content"]);
|
|
1571
1685
|
}
|
|
1572
|
-
var
|
|
1573
|
-
components: { PopoverMenu:
|
|
1686
|
+
var Z = /*#__PURE__*/ A(Bn, [["render", Un]]), Wn = {
|
|
1687
|
+
components: { PopoverMenu: Z },
|
|
1574
1688
|
mixins: [
|
|
1575
1689
|
W,
|
|
1576
|
-
|
|
1577
|
-
|
|
1690
|
+
X,
|
|
1691
|
+
k
|
|
1578
1692
|
],
|
|
1579
1693
|
emits: ["update:modelValue"],
|
|
1580
1694
|
props: {
|
|
1581
1695
|
actions: {
|
|
1582
1696
|
type: Array,
|
|
1583
1697
|
default: () => [],
|
|
1584
|
-
validator: (e) => e.every(
|
|
1698
|
+
validator: (e) => e.every(J)
|
|
1585
1699
|
},
|
|
1586
1700
|
modelValue: {
|
|
1587
1701
|
type: Boolean,
|
|
@@ -1593,7 +1707,7 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
|
|
|
1593
1707
|
},
|
|
1594
1708
|
computed: {
|
|
1595
1709
|
items() {
|
|
1596
|
-
return
|
|
1710
|
+
return Y(this.actions);
|
|
1597
1711
|
},
|
|
1598
1712
|
hasActions() {
|
|
1599
1713
|
return this.items.length > 0;
|
|
@@ -1602,7 +1716,7 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
|
|
|
1602
1716
|
return this.items[0];
|
|
1603
1717
|
},
|
|
1604
1718
|
mainColor() {
|
|
1605
|
-
return this.hasActions ?
|
|
1719
|
+
return this.hasActions ? Rn(this.mainAction) : null;
|
|
1606
1720
|
},
|
|
1607
1721
|
menuActions() {
|
|
1608
1722
|
return this.items.slice(1);
|
|
@@ -1622,12 +1736,9 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
|
|
|
1622
1736
|
}
|
|
1623
1737
|
}
|
|
1624
1738
|
},
|
|
1625
|
-
created() {
|
|
1626
|
-
process.env.NODE_ENV !== "production" && this.$slots.actions && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот actions убран, пункты меню передаются пропом actions"), process.env.NODE_ENV !== "production" && this.$slots.button && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот button убран, основная кнопка — первый пункт actions");
|
|
1627
|
-
},
|
|
1628
1739
|
methods: {
|
|
1629
1740
|
isLink(e) {
|
|
1630
|
-
return
|
|
1741
|
+
return Ln(e);
|
|
1631
1742
|
},
|
|
1632
1743
|
select(e) {
|
|
1633
1744
|
if (typeof e.onSelect == "function") return e.onSelect();
|
|
@@ -1636,37 +1747,31 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
|
|
|
1636
1747
|
this.menuIsOpen = e, this.$emit("update:modelValue", e);
|
|
1637
1748
|
}
|
|
1638
1749
|
}
|
|
1639
|
-
},
|
|
1750
|
+
}, Gn = {
|
|
1640
1751
|
key: 0,
|
|
1641
1752
|
class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md"
|
|
1642
|
-
},
|
|
1643
|
-
function
|
|
1753
|
+
}, Kn = ["href", "textContent"], qn = ["textContent"], Jn = ["id", "popovertarget"], Yn = { class: "bb:sr-only" };
|
|
1754
|
+
function Xn(e, t, n, o, c, l) {
|
|
1644
1755
|
let f = m("popover-menu");
|
|
1645
|
-
return l.hasActions ? (d(), i("span",
|
|
1756
|
+
return l.hasActions ? (d(), i("span", Gn, [l.isLink(l.mainAction) ? (d(), i("a", {
|
|
1646
1757
|
key: 0,
|
|
1647
1758
|
href: l.mainAction.href,
|
|
1648
|
-
class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
|
|
1759
|
+
class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", [{
|
|
1649
1760
|
"bb:rounded-l-md": l.hasMenu,
|
|
1650
|
-
"bb:rounded-md": !l.hasMenu
|
|
1651
|
-
|
|
1652
|
-
"bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
|
|
1653
|
-
"bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
|
|
1654
|
-
}]),
|
|
1761
|
+
"bb:rounded-md": !l.hasMenu
|
|
1762
|
+
}, l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")]]),
|
|
1655
1763
|
onClick: t[0] ||= (t) => e.followLink(t, l.mainAction.href),
|
|
1656
1764
|
textContent: g(l.mainAction.label)
|
|
1657
|
-
}, null, 10,
|
|
1765
|
+
}, null, 10, Kn)) : (d(), i("button", {
|
|
1658
1766
|
key: 1,
|
|
1659
1767
|
type: "button",
|
|
1660
|
-
class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
|
|
1768
|
+
class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", [{
|
|
1661
1769
|
"bb:rounded-l-md": l.hasMenu,
|
|
1662
|
-
"bb:rounded-md": !l.hasMenu
|
|
1663
|
-
|
|
1664
|
-
"bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
|
|
1665
|
-
"bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
|
|
1666
|
-
}]),
|
|
1770
|
+
"bb:rounded-md": !l.hasMenu
|
|
1771
|
+
}, l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")]]),
|
|
1667
1772
|
onClick: t[1] ||= (e) => l.select(l.mainAction),
|
|
1668
1773
|
textContent: g(l.mainAction.label)
|
|
1669
|
-
}, null, 10,
|
|
1774
|
+
}, null, 10, qn)), s(f, {
|
|
1670
1775
|
class: "bb:-ml-px bb:flex",
|
|
1671
1776
|
actions: l.menuActions,
|
|
1672
1777
|
"model-value": n.modelValue,
|
|
@@ -1676,12 +1781,8 @@ function jn(e, t, n, o, c, l) {
|
|
|
1676
1781
|
type: "button",
|
|
1677
1782
|
id: n.id,
|
|
1678
1783
|
popovertarget: n.popovertarget,
|
|
1679
|
-
class: u(["bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:text-sm bb:font-medium bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500",
|
|
1680
|
-
|
|
1681
|
-
"bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
|
|
1682
|
-
"bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
|
|
1683
|
-
}])
|
|
1684
|
-
}, [a("span", An, g(e.texts.openMenu), 1), t[2] ||= a("svg", {
|
|
1784
|
+
class: u(["bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:text-sm bb:font-medium bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-500 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")])
|
|
1785
|
+
}, [a("span", Yn, g(e.texts.openMenu), 1), t[2] ||= a("svg", {
|
|
1685
1786
|
class: "bb:h-5 bb:w-5",
|
|
1686
1787
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1687
1788
|
viewBox: "0 0 20 20",
|
|
@@ -1691,7 +1792,7 @@ function jn(e, t, n, o, c, l) {
|
|
|
1691
1792
|
"fill-rule": "evenodd",
|
|
1692
1793
|
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",
|
|
1693
1794
|
"clip-rule": "evenodd"
|
|
1694
|
-
})], -1)], 10,
|
|
1795
|
+
})], -1)], 10, Jn)]),
|
|
1695
1796
|
_: 1
|
|
1696
1797
|
}, 8, [
|
|
1697
1798
|
"actions",
|
|
@@ -1699,16 +1800,16 @@ function jn(e, t, n, o, c, l) {
|
|
|
1699
1800
|
"onUpdate:modelValue"
|
|
1700
1801
|
])])) : r("", !0);
|
|
1701
1802
|
}
|
|
1702
|
-
var
|
|
1703
|
-
components: { PopoverMenu:
|
|
1704
|
-
mixins: [W
|
|
1803
|
+
var Zn = /*#__PURE__*/ A(Wn, [["render", Xn]]), Qn = {
|
|
1804
|
+
components: { PopoverMenu: Z },
|
|
1805
|
+
mixins: [W],
|
|
1705
1806
|
props: { actions: {
|
|
1706
1807
|
type: Array,
|
|
1707
1808
|
default: () => [],
|
|
1708
|
-
validator: (e) => e.every(
|
|
1809
|
+
validator: (e) => e.every(J)
|
|
1709
1810
|
} }
|
|
1710
|
-
},
|
|
1711
|
-
function
|
|
1811
|
+
}, $n = ["id", "popovertarget"], er = { class: "bb:sr-only" };
|
|
1812
|
+
function tr(e, t, r, i, o, s) {
|
|
1712
1813
|
let c = m("popover-menu");
|
|
1713
1814
|
return d(), n(c, {
|
|
1714
1815
|
class: "bb-dashboard-ui bb:inline-flex",
|
|
@@ -1719,7 +1820,7 @@ function In(e, t, r, i, o, s) {
|
|
|
1719
1820
|
id: n.id,
|
|
1720
1821
|
popovertarget: n.popovertarget,
|
|
1721
1822
|
class: "bb:relative bb:inline-flex bb:items-center bb:justify-center bb:p-2 bb:rounded-md bb:text-gray-400 bb:hover:text-gray-500 bb:hover:bg-gray-100 bb:focus:outline-hidden bb:focus:bg-gray-100 bb:focus:text-gray-500 bb:transition bb:duration-150 bb:ease-in-out"
|
|
1722
|
-
}, [a("span",
|
|
1823
|
+
}, [a("span", er, g(e.texts.openMenu), 1), t[0] ||= a("svg", {
|
|
1723
1824
|
class: "bb:h-6 bb:w-6",
|
|
1724
1825
|
fill: "none",
|
|
1725
1826
|
viewBox: "0 0 24 24",
|
|
@@ -1730,48 +1831,48 @@ function In(e, t, r, i, o, s) {
|
|
|
1730
1831
|
"stroke-linejoin": "round",
|
|
1731
1832
|
"stroke-width": "2",
|
|
1732
1833
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
1733
|
-
})], -1)], 8,
|
|
1834
|
+
})], -1)], 8, $n)]),
|
|
1734
1835
|
_: 1
|
|
1735
1836
|
}, 8, ["actions"]);
|
|
1736
1837
|
}
|
|
1737
|
-
var
|
|
1838
|
+
var nr = /*#__PURE__*/ A(Qn, [["render", tr]]), rr = {}, ir = {
|
|
1738
1839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1739
1840
|
viewBox: "0 0 20 20",
|
|
1740
1841
|
fill: "currentColor",
|
|
1741
1842
|
"aria-hidden": "true"
|
|
1742
1843
|
};
|
|
1743
|
-
function
|
|
1744
|
-
return d(), i("svg",
|
|
1844
|
+
function ar(e, t, n, r, o, s) {
|
|
1845
|
+
return d(), i("svg", ir, [...t[0] ||= [a("path", {
|
|
1745
1846
|
"fill-rule": "evenodd",
|
|
1746
1847
|
"clip-rule": "evenodd",
|
|
1747
1848
|
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"
|
|
1748
1849
|
}, null, -1)]]);
|
|
1749
1850
|
}
|
|
1750
|
-
var
|
|
1851
|
+
var or = /*#__PURE__*/ A(rr, [["render", ar]]), sr = {}, cr = {
|
|
1751
1852
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1752
1853
|
viewBox: "0 0 20 20",
|
|
1753
1854
|
fill: "currentColor",
|
|
1754
1855
|
"aria-hidden": "true"
|
|
1755
1856
|
};
|
|
1756
|
-
function
|
|
1757
|
-
return d(), i("svg",
|
|
1857
|
+
function lr(e, t, n, r, o, s) {
|
|
1858
|
+
return d(), i("svg", cr, [...t[0] ||= [a("path", {
|
|
1758
1859
|
"fill-rule": "evenodd",
|
|
1759
1860
|
"clip-rule": "evenodd",
|
|
1760
1861
|
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"
|
|
1761
1862
|
}, null, -1)]]);
|
|
1762
1863
|
}
|
|
1763
|
-
var
|
|
1864
|
+
var ur = /*#__PURE__*/ A(sr, [["render", lr]]);
|
|
1764
1865
|
//#endregion
|
|
1765
1866
|
//#region src/components/Pagination.vue
|
|
1766
|
-
function
|
|
1867
|
+
function dr(e) {
|
|
1767
1868
|
return typeof e == "string" && e !== "" ? e : null;
|
|
1768
1869
|
}
|
|
1769
|
-
var
|
|
1870
|
+
var fr = {
|
|
1770
1871
|
components: {
|
|
1771
|
-
ArrowNarrowLeft:
|
|
1772
|
-
ArrowNarrowRight:
|
|
1872
|
+
ArrowNarrowLeft: or,
|
|
1873
|
+
ArrowNarrowRight: ur
|
|
1773
1874
|
},
|
|
1774
|
-
mixins: [W,
|
|
1875
|
+
mixins: [W, X],
|
|
1775
1876
|
props: {
|
|
1776
1877
|
links: {
|
|
1777
1878
|
type: Object,
|
|
@@ -1799,49 +1900,49 @@ var qn = {
|
|
|
1799
1900
|
return typeof this.from == "number" && typeof this.to == "number";
|
|
1800
1901
|
},
|
|
1801
1902
|
previousPageUrl() {
|
|
1802
|
-
return
|
|
1903
|
+
return dr(this.links?.prev);
|
|
1803
1904
|
},
|
|
1804
1905
|
nextPageUrl() {
|
|
1805
|
-
return
|
|
1906
|
+
return dr(this.links?.next);
|
|
1806
1907
|
}
|
|
1807
1908
|
}
|
|
1808
|
-
},
|
|
1909
|
+
}, pr = {
|
|
1809
1910
|
key: 0,
|
|
1810
1911
|
class: "bb-dashboard-ui bb:px-4 bb:flex bb:items-center bb:justify-between bb:sm:px-0"
|
|
1811
|
-
},
|
|
1912
|
+
}, mr = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, hr = ["href"], gr = {
|
|
1812
1913
|
key: 0,
|
|
1813
1914
|
class: "bb:hidden bb:md:-mt-px bb:md:flex bb:text-gray-400 bb:text-sm bb:leading-5"
|
|
1814
|
-
},
|
|
1815
|
-
function
|
|
1915
|
+
}, _r = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, vr = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, yr = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, br = ["href"];
|
|
1916
|
+
function xr(e, t, n, c, l, u) {
|
|
1816
1917
|
let f = m("arrow-narrow-left"), p = m("arrow-narrow-right");
|
|
1817
|
-
return u.hasResults ? (d(), i("nav",
|
|
1818
|
-
a("div",
|
|
1918
|
+
return u.hasResults ? (d(), i("nav", pr, [
|
|
1919
|
+
a("div", mr, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
|
|
1819
1920
|
key: 0,
|
|
1820
1921
|
href: u.previousPageUrl,
|
|
1821
1922
|
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",
|
|
1822
1923
|
onClick: t[0] ||= (t) => e.followLink(t, u.previousPageUrl)
|
|
1823
|
-
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8,
|
|
1824
|
-
u.hasRange ? (d(), i("div",
|
|
1924
|
+
}, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8, hr))]),
|
|
1925
|
+
u.hasRange ? (d(), i("div", gr, [
|
|
1825
1926
|
o(g(e.texts.resultsBefore) + " ", 1),
|
|
1826
|
-
a("span",
|
|
1927
|
+
a("span", _r, g(u.from) + " - " + g(u.to), 1),
|
|
1827
1928
|
o(" " + g(e.texts.resultsOf) + " ", 1),
|
|
1828
|
-
a("span",
|
|
1929
|
+
a("span", vr, g(u.total), 1),
|
|
1829
1930
|
o(" " + g(e.texts.resultsAfter), 1)
|
|
1830
1931
|
])) : r("", !0),
|
|
1831
|
-
a("div",
|
|
1932
|
+
a("div", yr, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
|
|
1832
1933
|
key: 0,
|
|
1833
1934
|
href: u.nextPageUrl,
|
|
1834
1935
|
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",
|
|
1835
1936
|
onClick: t[1] ||= (t) => e.followLink(t, u.nextPageUrl)
|
|
1836
|
-
}, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8,
|
|
1937
|
+
}, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8, br))])
|
|
1837
1938
|
])) : r("", !0);
|
|
1838
1939
|
}
|
|
1839
|
-
var
|
|
1940
|
+
var Sr = /*#__PURE__*/ A(fr, [["render", xr]]), Cr = [
|
|
1840
1941
|
"left",
|
|
1841
1942
|
"center",
|
|
1842
1943
|
"right"
|
|
1843
|
-
]
|
|
1844
|
-
function
|
|
1944
|
+
];
|
|
1945
|
+
function wr(e) {
|
|
1845
1946
|
if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
|
|
1846
1947
|
let t = e.key;
|
|
1847
1948
|
return {
|
|
@@ -1850,21 +1951,21 @@ function or(e) {
|
|
|
1850
1951
|
value: typeof e.value == "function" ? e.value : (e) => e?.[t],
|
|
1851
1952
|
secondary: typeof e.secondary == "function" ? e.secondary : null,
|
|
1852
1953
|
muted: e.muted === !0,
|
|
1853
|
-
align:
|
|
1954
|
+
align: Cr.includes(e.align) ? e.align : "left",
|
|
1854
1955
|
wrap: e.wrap === !0,
|
|
1855
1956
|
narrow: e.narrow === !0,
|
|
1856
1957
|
visible: e.visible !== !1
|
|
1857
1958
|
};
|
|
1858
1959
|
}
|
|
1859
|
-
function
|
|
1960
|
+
function Tr(e) {
|
|
1860
1961
|
return typeof e == "string" && e !== "" ? e : null;
|
|
1861
1962
|
}
|
|
1862
|
-
var
|
|
1963
|
+
var Er = {
|
|
1863
1964
|
components: {
|
|
1864
|
-
Pagination:
|
|
1865
|
-
|
|
1965
|
+
Pagination: Sr,
|
|
1966
|
+
InfoPill: G
|
|
1866
1967
|
},
|
|
1867
|
-
mixins: [W],
|
|
1968
|
+
mixins: [W, k],
|
|
1868
1969
|
props: {
|
|
1869
1970
|
rows: {
|
|
1870
1971
|
type: Array,
|
|
@@ -1899,7 +2000,7 @@ var cr = {
|
|
|
1899
2000
|
default: "page",
|
|
1900
2001
|
validator: (e) => ["page", "card"].indexOf(e) !== -1
|
|
1901
2002
|
},
|
|
1902
|
-
|
|
2003
|
+
rowStripe: {
|
|
1903
2004
|
type: Function,
|
|
1904
2005
|
default: null
|
|
1905
2006
|
}
|
|
@@ -1909,7 +2010,10 @@ var cr = {
|
|
|
1909
2010
|
return Array.isArray(this.rows) ? this.rows : [];
|
|
1910
2011
|
},
|
|
1911
2012
|
visibleColumns() {
|
|
1912
|
-
return (Array.isArray(this.columns) ? this.columns : []).map(
|
|
2013
|
+
return (Array.isArray(this.columns) ? this.columns : []).map(wr).filter((e) => e !== null && e.visible);
|
|
2014
|
+
},
|
|
2015
|
+
rowStripes() {
|
|
2016
|
+
return this.normalizedRows.map((e) => this.stripeOf(e));
|
|
1913
2017
|
},
|
|
1914
2018
|
isCard() {
|
|
1915
2019
|
return this.variant === "card";
|
|
@@ -1925,10 +2029,10 @@ var cr = {
|
|
|
1925
2029
|
},
|
|
1926
2030
|
badgeText() {
|
|
1927
2031
|
if (this.hasRecords) {
|
|
1928
|
-
let e =
|
|
2032
|
+
let e = Tr(this.foundText);
|
|
1929
2033
|
return e === null ? null : `${e}: ${this.recordCount}`;
|
|
1930
2034
|
}
|
|
1931
|
-
return
|
|
2035
|
+
return Tr(this.emptyText);
|
|
1932
2036
|
}
|
|
1933
2037
|
},
|
|
1934
2038
|
methods: {
|
|
@@ -1945,19 +2049,19 @@ var cr = {
|
|
|
1945
2049
|
else typeof this.rowKey == "string" && (n = e?.[this.rowKey]);
|
|
1946
2050
|
return n ?? `row-${t}`;
|
|
1947
2051
|
},
|
|
1948
|
-
|
|
1949
|
-
if (typeof this.
|
|
1950
|
-
let t = this.
|
|
1951
|
-
return
|
|
2052
|
+
stripeOf(e) {
|
|
2053
|
+
if (typeof this.rowStripe != "function") return null;
|
|
2054
|
+
let t = this.rowStripe(e);
|
|
2055
|
+
return O(t) ? t : null;
|
|
1952
2056
|
},
|
|
1953
2057
|
textOf(e, t) {
|
|
1954
2058
|
let n = e(t);
|
|
1955
2059
|
return n == null ? "" : String(n);
|
|
1956
2060
|
}
|
|
1957
2061
|
}
|
|
1958
|
-
},
|
|
1959
|
-
function
|
|
1960
|
-
let _ = m("
|
|
2062
|
+
}, Dr = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, Or = { class: "bb:bg-gray-50" }, kr = ["textContent"], Ar = { class: "bb:divide-y bb:divide-gray-200" }, jr = ["textContent"], Mr = ["textContent"];
|
|
2063
|
+
function Nr(t, o, s, c, l, h) {
|
|
2064
|
+
let _ = m("info-pill"), v = m("pagination");
|
|
1961
2065
|
return d(), i("div", null, [
|
|
1962
2066
|
h.hasBadgeRow() ? (d(), i("div", {
|
|
1963
2067
|
key: 0,
|
|
@@ -1970,7 +2074,7 @@ function hr(t, o, s, c, l, h) {
|
|
|
1970
2074
|
h.normalizedRows.length > 0 ? (d(), i("div", {
|
|
1971
2075
|
key: 1,
|
|
1972
2076
|
class: u(h.isCard && h.hasBadgeRow() ? "bb:mt-4" : "")
|
|
1973
|
-
}, [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",
|
|
2077
|
+
}, [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", Dr, [a("thead", null, [a("tr", Or, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
|
|
1974
2078
|
key: e.key,
|
|
1975
2079
|
scope: "col",
|
|
1976
2080
|
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", [{
|
|
@@ -1979,14 +2083,10 @@ function hr(t, o, s, c, l, h) {
|
|
|
1979
2083
|
"bb:text-right": e.align === "right"
|
|
1980
2084
|
}, { "bb:w-px": e.narrow }]]),
|
|
1981
2085
|
textContent: g(e.label)
|
|
1982
|
-
}, null, 10,
|
|
2086
|
+
}, null, 10, kr))), 128))])]), a("tbody", Ar, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
|
|
1983
2087
|
key: h.keyOf(n, o),
|
|
1984
|
-
class:
|
|
1985
|
-
|
|
1986
|
-
"bb:bg-red-50": h.colorOf(n) === "red",
|
|
1987
|
-
"bb:bg-green-50": h.colorOf(n) === "green"
|
|
1988
|
-
})
|
|
1989
|
-
}, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("td", {
|
|
2088
|
+
class: "bb:bg-white bb:even:bg-gray-50"
|
|
2089
|
+
}, [(d(!0), i(e, null, f(h.visibleColumns, (e, s) => (d(), i("td", {
|
|
1990
2090
|
key: e.key,
|
|
1991
2091
|
class: u(["bb:px-6 bb:py-4 bb:align-top bb:relative bb:text-sm bb:leading-5", [
|
|
1992
2092
|
{ "bb:whitespace-nowrap": !e.wrap },
|
|
@@ -1997,17 +2097,21 @@ function hr(t, o, s, c, l, h) {
|
|
|
1997
2097
|
},
|
|
1998
2098
|
{ "bb:w-px": e.narrow }
|
|
1999
2099
|
]])
|
|
2000
|
-
}, [
|
|
2100
|
+
}, [s === 0 && h.rowStripes[o] !== null ? (d(), i("span", {
|
|
2101
|
+
key: 0,
|
|
2102
|
+
class: u(["bb:absolute bb:left-0 bb:inset-y-0 bb:w-1 bb:bg-current", t.colorClass(h.rowStripes[o], "mark")]),
|
|
2103
|
+
"aria-hidden": "true"
|
|
2104
|
+
}, null, 2)) : r("", !0), p(t.$slots, `cell-${e.key}`, {
|
|
2001
2105
|
row: n,
|
|
2002
2106
|
index: o
|
|
2003
2107
|
}, () => [a("div", {
|
|
2004
2108
|
class: u(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
|
|
2005
2109
|
textContent: g(h.textOf(e.value, n))
|
|
2006
|
-
}, null, 10,
|
|
2110
|
+
}, null, 10, jr), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
|
|
2007
2111
|
key: 0,
|
|
2008
2112
|
class: "bb:text-gray-400",
|
|
2009
2113
|
textContent: g(h.textOf(e.secondary, n))
|
|
2010
|
-
}, null, 8,
|
|
2114
|
+
}, null, 8, Mr)) : r("", !0)])], 2))), 128))]))), 128))])])], 2)], 2)) : r("", !0),
|
|
2011
2115
|
h.hasMeta ? (d(), n(v, {
|
|
2012
2116
|
key: 2,
|
|
2013
2117
|
meta: s.meta,
|
|
@@ -2022,8 +2126,8 @@ function hr(t, o, s, c, l, h) {
|
|
|
2022
2126
|
])) : r("", !0)
|
|
2023
2127
|
]);
|
|
2024
2128
|
}
|
|
2025
|
-
var
|
|
2026
|
-
mixins: [
|
|
2129
|
+
var Pr = /*#__PURE__*/ A(Er, [["render", Nr]]), Fr = {
|
|
2130
|
+
mixins: [X],
|
|
2027
2131
|
props: {
|
|
2028
2132
|
url: {
|
|
2029
2133
|
type: String,
|
|
@@ -2038,17 +2142,17 @@ var gr = /*#__PURE__*/ j(cr, [["render", hr]]), _r = {
|
|
|
2038
2142
|
default: !1
|
|
2039
2143
|
}
|
|
2040
2144
|
}
|
|
2041
|
-
},
|
|
2042
|
-
function
|
|
2145
|
+
}, Ir = ["href", "textContent"];
|
|
2146
|
+
function Lr(e, t, n, r, a, o) {
|
|
2043
2147
|
return d(), i("a", {
|
|
2044
2148
|
href: n.url,
|
|
2045
2149
|
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"]),
|
|
2046
2150
|
onClick: t[0] ||= (t) => e.followLink(t, n.url),
|
|
2047
2151
|
textContent: g(n.name)
|
|
2048
|
-
}, null, 10,
|
|
2152
|
+
}, null, 10, Ir);
|
|
2049
2153
|
}
|
|
2050
|
-
var
|
|
2051
|
-
function
|
|
2154
|
+
var Rr = /*#__PURE__*/ A(Fr, [["render", Lr]]), zr = { emits: ["clicked"] };
|
|
2155
|
+
function Br(e, t, n, r, o, s) {
|
|
2052
2156
|
return d(), i("button", {
|
|
2053
2157
|
type: "button",
|
|
2054
2158
|
tabindex: "-1",
|
|
@@ -2065,19 +2169,19 @@ function Sr(e, t, n, r, o, s) {
|
|
|
2065
2169
|
d: "M6 18L18 6M6 6l12 12"
|
|
2066
2170
|
})], -1)]]);
|
|
2067
2171
|
}
|
|
2068
|
-
var
|
|
2172
|
+
var Vr = /*#__PURE__*/ A(zr, [["render", Br]]), Hr = [
|
|
2069
2173
|
"xl",
|
|
2070
2174
|
"4xl",
|
|
2071
2175
|
"7xl"
|
|
2072
|
-
],
|
|
2073
|
-
components: { Closer:
|
|
2176
|
+
], Ur = {
|
|
2177
|
+
components: { Closer: Vr },
|
|
2074
2178
|
mixins: [W],
|
|
2075
2179
|
inheritAttrs: !1,
|
|
2076
2180
|
props: {
|
|
2077
2181
|
width: {
|
|
2078
2182
|
type: String,
|
|
2079
2183
|
default: "xl",
|
|
2080
|
-
validator: (e) =>
|
|
2184
|
+
validator: (e) => Hr.includes(e)
|
|
2081
2185
|
},
|
|
2082
2186
|
fallbackUrl: {
|
|
2083
2187
|
type: String,
|
|
@@ -2093,13 +2197,13 @@ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
|
|
|
2093
2197
|
},
|
|
2094
2198
|
computed: {
|
|
2095
2199
|
resolvedWidth() {
|
|
2096
|
-
return
|
|
2200
|
+
return Hr.includes(this.width) ? this.width : "xl";
|
|
2097
2201
|
},
|
|
2098
2202
|
windows() {
|
|
2099
2203
|
return this.uiSettings.windows;
|
|
2100
2204
|
},
|
|
2101
2205
|
resolvedKey() {
|
|
2102
|
-
return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null :
|
|
2206
|
+
return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ae(this.windows.page.address);
|
|
2103
2207
|
},
|
|
2104
2208
|
target() {
|
|
2105
2209
|
return this.returnAddress === null ? this.fallbackUrl === null || this.fallbackUrl === "" ? null : this.fallbackUrl : this.returnAddress;
|
|
@@ -2109,23 +2213,23 @@ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
|
|
|
2109
2213
|
}
|
|
2110
2214
|
},
|
|
2111
2215
|
watch: { fallbackUrl() {
|
|
2112
|
-
this.windows !== null &&
|
|
2216
|
+
this.windows !== null && me(this.windows.state, this, this.fallbackAddress());
|
|
2113
2217
|
} },
|
|
2114
2218
|
mounted() {
|
|
2115
|
-
this.windows !== null && (this.returnAddress =
|
|
2219
|
+
this.windows !== null && (this.returnAddress = E(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
|
|
2116
2220
|
},
|
|
2117
2221
|
beforeUnmount() {
|
|
2118
|
-
this.windows !== null &&
|
|
2222
|
+
this.windows !== null && pe(this.windows.state, this);
|
|
2119
2223
|
},
|
|
2120
2224
|
methods: {
|
|
2121
2225
|
fallbackAddress() {
|
|
2122
|
-
return
|
|
2226
|
+
return w(this.fallbackUrl, window.location.origin);
|
|
2123
2227
|
},
|
|
2124
2228
|
forwardedAttrs() {
|
|
2125
2229
|
return Object.fromEntries(Object.entries(this.$attrs).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")));
|
|
2126
2230
|
},
|
|
2127
2231
|
syncWindow() {
|
|
2128
|
-
let e =
|
|
2232
|
+
let e = fe(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
|
|
2129
2233
|
e.rejected && console.warn(`PageCard: ключ окна сменился на «${this.resolvedKey}» без смены страницы — карточка остаётся в окне «${e.key}»`), this.returnAddress = e.window.returnAddress;
|
|
2130
2234
|
},
|
|
2131
2235
|
close() {
|
|
@@ -2140,7 +2244,7 @@ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
|
|
|
2140
2244
|
}
|
|
2141
2245
|
}
|
|
2142
2246
|
};
|
|
2143
|
-
function
|
|
2247
|
+
function Wr(e, t, a, o, s, c) {
|
|
2144
2248
|
let f = m("closer");
|
|
2145
2249
|
return d(), i("div", l({
|
|
2146
2250
|
class: ["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:sm:rounded-lg", [
|
|
@@ -2173,7 +2277,7 @@ function Er(e, t, a, o, s, c) {
|
|
|
2173
2277
|
"onClicked"
|
|
2174
2278
|
])) : r("", !0)], 16);
|
|
2175
2279
|
}
|
|
2176
|
-
var
|
|
2280
|
+
var Gr = /*#__PURE__*/ A(Ur, [["render", Wr]]), Kr = {}, qr = {
|
|
2177
2281
|
class: "bb:h-7 bb:w-7 bb:text-green-600",
|
|
2178
2282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2179
2283
|
fill: "none",
|
|
@@ -2182,22 +2286,22 @@ var Dr = /*#__PURE__*/ j(Tr, [["render", Er]]), Or = {}, kr = {
|
|
|
2182
2286
|
stroke: "currentColor",
|
|
2183
2287
|
"aria-hidden": "true"
|
|
2184
2288
|
};
|
|
2185
|
-
function
|
|
2186
|
-
return d(), i("svg",
|
|
2289
|
+
function Jr(e, t, n, r, o, s) {
|
|
2290
|
+
return d(), i("svg", qr, [...t[0] ||= [a("path", {
|
|
2187
2291
|
"stroke-linecap": "round",
|
|
2188
2292
|
"stroke-linejoin": "round",
|
|
2189
2293
|
d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
2190
2294
|
}, null, -1)]]);
|
|
2191
2295
|
}
|
|
2192
|
-
var
|
|
2296
|
+
var Yr = /*#__PURE__*/ A(Kr, [["render", Jr]]), Xr = {}, Zr = {
|
|
2193
2297
|
class: "bb:h-5 bb:w-5",
|
|
2194
2298
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2195
2299
|
viewBox: "0 0 20 20",
|
|
2196
2300
|
fill: "currentColor",
|
|
2197
2301
|
"aria-hidden": "true"
|
|
2198
2302
|
};
|
|
2199
|
-
function
|
|
2200
|
-
return d(), i("svg",
|
|
2303
|
+
function Qr(e, t, n, r, o, s) {
|
|
2304
|
+
return d(), i("svg", Zr, [...t[0] ||= [a("path", {
|
|
2201
2305
|
"fill-rule": "evenodd",
|
|
2202
2306
|
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",
|
|
2203
2307
|
"clip-rule": "evenodd"
|
|
@@ -2205,10 +2309,10 @@ function Pr(e, t, n, r, o, s) {
|
|
|
2205
2309
|
}
|
|
2206
2310
|
//#endregion
|
|
2207
2311
|
//#region src/components/NotificationMessage.vue
|
|
2208
|
-
var
|
|
2312
|
+
var $r = {
|
|
2209
2313
|
components: {
|
|
2210
|
-
Check:
|
|
2211
|
-
Close: /* @__PURE__ */
|
|
2314
|
+
Check: Yr,
|
|
2315
|
+
Close: /* @__PURE__ */ A(Xr, [["render", Qr]]),
|
|
2212
2316
|
Dangerous: K,
|
|
2213
2317
|
Warning: q
|
|
2214
2318
|
},
|
|
@@ -2250,8 +2354,8 @@ var Fr = {
|
|
|
2250
2354
|
return this.type === "confirmation";
|
|
2251
2355
|
}
|
|
2252
2356
|
}
|
|
2253
|
-
},
|
|
2254
|
-
function
|
|
2357
|
+
}, ei = ["role"], ti = { class: "bb:p-4" }, ni = { class: "bb:flex bb:items-start" }, ri = { class: "bb:shrink-0" }, ii = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, ai = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, oi = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, si = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, ci = { class: "bb:sr-only" };
|
|
2358
|
+
function li(e, t, o, c, l, f) {
|
|
2255
2359
|
let p = m("warning"), h = m("dangerous"), _ = m("check"), v = m("close");
|
|
2256
2360
|
return d(), i("div", {
|
|
2257
2361
|
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",
|
|
@@ -2263,14 +2367,14 @@ function Gr(e, t, o, c, l, f) {
|
|
|
2263
2367
|
"bb:bg-yellow-50": f.isWarning,
|
|
2264
2368
|
"bb:bg-gray-50": f.isConfirmation
|
|
2265
2369
|
}])
|
|
2266
|
-
}, [a("div",
|
|
2267
|
-
a("div",
|
|
2370
|
+
}, [a("div", ti, [a("div", ni, [
|
|
2371
|
+
a("div", ri, [
|
|
2268
2372
|
f.isWarning ? (d(), n(p, { key: 0 })) : r("", !0),
|
|
2269
2373
|
f.isDangerous ? (d(), n(h, { key: 1 })) : r("", !0),
|
|
2270
2374
|
f.isConfirmation ? (d(), n(_, { key: 2 })) : r("", !0)
|
|
2271
2375
|
]),
|
|
2272
|
-
a("div",
|
|
2273
|
-
a("div",
|
|
2376
|
+
a("div", ii, [a("p", ai, g(o.notificationHeading), 1), a("p", oi, g(f.text), 1)]),
|
|
2377
|
+
a("div", si, [a("button", {
|
|
2274
2378
|
type: "button",
|
|
2275
2379
|
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", {
|
|
2276
2380
|
"bb:bg-red-50": f.isDangerous,
|
|
@@ -2278,9 +2382,108 @@ function Gr(e, t, o, c, l, f) {
|
|
|
2278
2382
|
"bb:bg-gray-50": f.isConfirmation
|
|
2279
2383
|
}]),
|
|
2280
2384
|
onClick: t[0] ||= S((t) => e.$emit("update:modelValue", ""), ["prevent"])
|
|
2281
|
-
}, [a("span",
|
|
2282
|
-
])])], 2)) : r("", !0)], 8,
|
|
2385
|
+
}, [a("span", ci, g(e.texts.close), 1), s(v)], 2)])
|
|
2386
|
+
])])], 2)) : r("", !0)], 8, ei);
|
|
2387
|
+
}
|
|
2388
|
+
var ui = /*#__PURE__*/ A($r, [["render", li]]), di = {}, fi = {
|
|
2389
|
+
class: "bb:h-5 bb:w-5",
|
|
2390
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2391
|
+
fill: "none",
|
|
2392
|
+
viewBox: "0 0 24 24",
|
|
2393
|
+
stroke: "currentColor",
|
|
2394
|
+
"stroke-width": "2",
|
|
2395
|
+
"aria-hidden": "true"
|
|
2396
|
+
};
|
|
2397
|
+
function pi(e, t, n, r, o, s) {
|
|
2398
|
+
return d(), i("svg", fi, [...t[0] ||= [a("path", {
|
|
2399
|
+
"stroke-linecap": "round",
|
|
2400
|
+
"stroke-linejoin": "round",
|
|
2401
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
2402
|
+
}, null, -1), a("path", {
|
|
2403
|
+
"stroke-linecap": "round",
|
|
2404
|
+
"stroke-linejoin": "round",
|
|
2405
|
+
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
|
2406
|
+
}, null, -1)]]);
|
|
2407
|
+
}
|
|
2408
|
+
var mi = /*#__PURE__*/ A(di, [["render", pi]]), Q = 0, $ = null, hi = {
|
|
2409
|
+
components: {
|
|
2410
|
+
PopoverPanel: V,
|
|
2411
|
+
Eye: mi
|
|
2412
|
+
},
|
|
2413
|
+
mixins: [W],
|
|
2414
|
+
emits: ["update:modelValue"],
|
|
2415
|
+
props: {
|
|
2416
|
+
text: {
|
|
2417
|
+
type: String,
|
|
2418
|
+
required: !0
|
|
2419
|
+
},
|
|
2420
|
+
modelValue: {
|
|
2421
|
+
type: Boolean,
|
|
2422
|
+
default: !1
|
|
2423
|
+
}
|
|
2424
|
+
},
|
|
2425
|
+
data() {
|
|
2426
|
+
return { holdsPageSelectionLock: !1 };
|
|
2427
|
+
},
|
|
2428
|
+
computed: {
|
|
2429
|
+
normalizedText() {
|
|
2430
|
+
return typeof this.text == "string" ? this.text : "";
|
|
2431
|
+
},
|
|
2432
|
+
isEmpty() {
|
|
2433
|
+
return this.normalizedText === "";
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
beforeUnmount() {
|
|
2437
|
+
this.unlockPageSelection();
|
|
2438
|
+
},
|
|
2439
|
+
methods: {
|
|
2440
|
+
onPanelToggle(e) {
|
|
2441
|
+
e ? this.lockPageSelection() : this.unlockPageSelection();
|
|
2442
|
+
},
|
|
2443
|
+
lockPageSelection() {
|
|
2444
|
+
if (!this.holdsPageSelectionLock && (this.holdsPageSelectionLock = !0, Q += 1, Q === 1)) {
|
|
2445
|
+
let e = document.documentElement.style;
|
|
2446
|
+
$ = {
|
|
2447
|
+
userSelect: e.userSelect,
|
|
2448
|
+
webkitUserSelect: e.webkitUserSelect
|
|
2449
|
+
}, e.userSelect = "none", e.webkitUserSelect = "none";
|
|
2450
|
+
}
|
|
2451
|
+
},
|
|
2452
|
+
unlockPageSelection() {
|
|
2453
|
+
this.holdsPageSelectionLock && (this.holdsPageSelectionLock = !1, --Q, Q === 0 && (Object.assign(document.documentElement.style, $), $ = null));
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}, gi = ["id", "popovertarget"], _i = { class: "bb:sr-only" };
|
|
2457
|
+
function vi(e, t, r, i, c, l) {
|
|
2458
|
+
let u = m("eye"), f = m("popover-panel");
|
|
2459
|
+
return d(), n(f, {
|
|
2460
|
+
class: "bb-dashboard-ui bb:inline-flex",
|
|
2461
|
+
"has-content": !l.isEmpty,
|
|
2462
|
+
"model-value": r.modelValue,
|
|
2463
|
+
align: "end",
|
|
2464
|
+
"max-width": 384,
|
|
2465
|
+
"panel-role": "region",
|
|
2466
|
+
"panel-label": e.texts.fullText,
|
|
2467
|
+
"panel-focusable": "",
|
|
2468
|
+
"panel-class": "bb:p-3 bb:rounded-md bb:border bb:border-gray-200 bb:bg-white bb:shadow-lg bb:text-left bb:text-sm bb:leading-5 bb:text-gray-700 bb:whitespace-normal bb:break-words bb:overscroll-contain bb:select-text bb:focus:outline-hidden bb:focus-visible:ring-2 bb:focus-visible:ring-indigo-500",
|
|
2469
|
+
"onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t),
|
|
2470
|
+
onToggle: l.onPanelToggle
|
|
2471
|
+
}, {
|
|
2472
|
+
trigger: b((t) => [a("button", {
|
|
2473
|
+
type: "button",
|
|
2474
|
+
id: t.id,
|
|
2475
|
+
popovertarget: t.popovertarget,
|
|
2476
|
+
class: "bb:relative bb:text-gray-400 bb:hover:text-gray-600 bb:rounded-md bb:focus:outline-hidden bb:focus-visible:ring-2 bb:focus-visible:ring-indigo-500"
|
|
2477
|
+
}, [a("span", _i, g(e.texts.showText), 1), s(u)], 8, gi)]),
|
|
2478
|
+
default: b(() => [o(g(l.normalizedText), 1)]),
|
|
2479
|
+
_: 1
|
|
2480
|
+
}, 8, [
|
|
2481
|
+
"has-content",
|
|
2482
|
+
"model-value",
|
|
2483
|
+
"panel-label",
|
|
2484
|
+
"onToggle"
|
|
2485
|
+
]);
|
|
2283
2486
|
}
|
|
2284
|
-
var
|
|
2487
|
+
var yi = /*#__PURE__*/ A(hi, [["render", vi]]);
|
|
2285
2488
|
//#endregion
|
|
2286
|
-
export {
|
|
2489
|
+
export { mn as ActionPill, In as ConfirmationModal, Pr as DataTable, j as Dot, Zn as DropdownButtonWithAction, Yt as ErrorMessages, nr as HamburgerMenu, G as InfoPill, Rr as NavigationMenuElement, ui as NotificationMessage, Gr as PageCard, Ge as RussianMobileFilter, Qe as Search, xt as SelectDateInterval, zt as SelectSingle, yi as TextPopover, ye as dashboardUi, Ce as downloadFile };
|