bt-core-app 2.2.33 → 2.2.36
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/dist/components/BT-Assistant-Menu.vue.mjs +21 -18
- package/dist/components/BT-Dialog-Confirm.vue.mjs +7 -7
- package/dist/components/BT-Dialog-Date.vue.mjs +32 -31
- package/dist/composables/dialog-items.d.ts +12 -0
- package/dist/composables/dialog-items.mjs +12 -0
- package/dist/composables.mjs +183 -182
- package/dist/index.mjs +227 -226
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
26
26
|
}, be = {
|
|
27
27
|
key: 2,
|
|
28
28
|
class: "text-body-2 text-center"
|
|
29
|
-
}, Ve = { class: "d-flex align-center justify-space-between" },
|
|
29
|
+
}, Ve = { class: "d-flex align-center justify-space-between" }, he = { class: "d-flex align-center mb-1" }, xe = { class: "text-center" }, ke = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "text-h5"
|
|
32
32
|
}, Se = {
|
|
@@ -48,7 +48,7 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
48
48
|
hideDialogTemporarily: Z,
|
|
49
49
|
menuRouteName: T,
|
|
50
50
|
tab: r
|
|
51
|
-
} = se(), v = ie(), c = k([]), g = k([]), y = k(!1), D = k(!1), b = k(), V = k(),
|
|
51
|
+
} = se(), v = ie(), c = k([]), g = k([]), y = k(!1), D = k(!1), b = k(), V = k(), h = k(), { sendAsync: ee } = de(), O = ae(() => !re(V.value) || b.value != null);
|
|
52
52
|
async function j() {
|
|
53
53
|
try {
|
|
54
54
|
var n = await ee({
|
|
@@ -58,7 +58,7 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
58
58
|
});
|
|
59
59
|
r.value = 2, setTimeout(() => {
|
|
60
60
|
r.value = 1, P();
|
|
61
|
-
}, 3e3), n ? (V.value = void 0, b.value = void 0) :
|
|
61
|
+
}, 3e3), n ? (V.value = void 0, b.value = void 0) : h.value = "Sorry! Something seems to have gone wrong. Perhaps try again later.";
|
|
62
62
|
} catch (l) {
|
|
63
63
|
console.log(l);
|
|
64
64
|
}
|
|
@@ -157,8 +157,8 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
157
157
|
variant: "text"
|
|
158
158
|
}, null, 8, ["to"])) : p("", !0)
|
|
159
159
|
]),
|
|
160
|
-
(u(!0), m(U, null, C(c.value, (t,
|
|
161
|
-
key:
|
|
160
|
+
(u(!0), m(U, null, C(c.value, (t, x) => (u(), s(e(i), {
|
|
161
|
+
key: x,
|
|
162
162
|
"prepend-icon": t.icon,
|
|
163
163
|
class: "ma-1",
|
|
164
164
|
href: t.url,
|
|
@@ -174,8 +174,8 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
174
174
|
])),
|
|
175
175
|
_: 1
|
|
176
176
|
})) : p("", !0),
|
|
177
|
-
(u(!0), m(U, null, C(g.value, (t,
|
|
178
|
-
key:
|
|
177
|
+
(u(!0), m(U, null, C(g.value, (t, x) => (u(), s(e(i), {
|
|
178
|
+
key: x,
|
|
179
179
|
"prepend-icon": t.icon,
|
|
180
180
|
class: "ma-1",
|
|
181
181
|
href: t.url,
|
|
@@ -246,13 +246,13 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
246
246
|
"max-width": "330"
|
|
247
247
|
}, {
|
|
248
248
|
default: o(() => [
|
|
249
|
-
|
|
249
|
+
h.value == null ? (u(), s(e($), {
|
|
250
250
|
key: 0,
|
|
251
251
|
icon: "$party",
|
|
252
252
|
size: "x-large",
|
|
253
253
|
start: ""
|
|
254
254
|
})) : p("", !0),
|
|
255
|
-
|
|
255
|
+
h.value == null ? (u(), m("div", ye, "Thankyou so much!")) : (u(), m("p", be, I(h.value), 1))
|
|
256
256
|
]),
|
|
257
257
|
_: 1
|
|
258
258
|
})
|
|
@@ -274,7 +274,10 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
274
274
|
"max-width": "450"
|
|
275
275
|
}, {
|
|
276
276
|
default: o(() => [
|
|
277
|
-
a(e(i),
|
|
277
|
+
a(e(i), {
|
|
278
|
+
class: "overflow-y-auto",
|
|
279
|
+
"max-height": "80vh"
|
|
280
|
+
}, {
|
|
278
281
|
default: o(() => [
|
|
279
282
|
S("div", Ve, [
|
|
280
283
|
a(e(E), {
|
|
@@ -325,7 +328,7 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
325
328
|
title: "Tips Assistant"
|
|
326
329
|
}, {
|
|
327
330
|
default: o(() => [
|
|
328
|
-
S("div",
|
|
331
|
+
S("div", he, [
|
|
329
332
|
a(e(f), {
|
|
330
333
|
class: "mx-1",
|
|
331
334
|
onClick: P,
|
|
@@ -361,8 +364,8 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
361
364
|
])),
|
|
362
365
|
_: 1
|
|
363
366
|
})) : p("", !0),
|
|
364
|
-
(u(!0), m(U, null, C(c.value, (t,
|
|
365
|
-
key:
|
|
367
|
+
(u(!0), m(U, null, C(c.value, (t, x) => (u(), s(e(i), {
|
|
368
|
+
key: x,
|
|
366
369
|
"prepend-icon": t.icon,
|
|
367
370
|
class: "ma-1",
|
|
368
371
|
href: t.url,
|
|
@@ -378,8 +381,8 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
378
381
|
])),
|
|
379
382
|
_: 1
|
|
380
383
|
})) : p("", !0),
|
|
381
|
-
(u(!0), m(U, null, C(g.value, (t,
|
|
382
|
-
key:
|
|
384
|
+
(u(!0), m(U, null, C(g.value, (t, x) => (u(), s(e(i), {
|
|
385
|
+
key: x,
|
|
383
386
|
"prepend-icon": t.icon,
|
|
384
387
|
class: "ma-1",
|
|
385
388
|
href: t.url,
|
|
@@ -419,7 +422,7 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
419
422
|
])),
|
|
420
423
|
_: 1
|
|
421
424
|
}),
|
|
422
|
-
S("div",
|
|
425
|
+
S("div", xe, [
|
|
423
426
|
a(e(W), {
|
|
424
427
|
"active-color": "primary",
|
|
425
428
|
hover: "",
|
|
@@ -448,13 +451,13 @@ const ve = { class: "d-flex align-center" }, ce = { class: "d-flex align-center"
|
|
|
448
451
|
"min-height": "300"
|
|
449
452
|
}, {
|
|
450
453
|
default: o(() => [
|
|
451
|
-
|
|
454
|
+
h.value == null ? (u(), s(e($), {
|
|
452
455
|
key: 0,
|
|
453
456
|
icon: "$party",
|
|
454
457
|
size: "x-large",
|
|
455
458
|
start: ""
|
|
456
459
|
})) : p("", !0),
|
|
457
|
-
|
|
460
|
+
h.value == null ? (u(), m("div", ke, "Thankyou so much!")) : (u(), m("div", Se, I(h.value), 1))
|
|
458
461
|
]),
|
|
459
462
|
_: 1
|
|
460
463
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as
|
|
1
|
+
import { defineComponent as g, ref as n, onUnmounted as D, openBlock as f, createBlock as d, unref as u, withCtx as m, createVNode as i, createSlots as s, resolveDynamicComponent as V } from "vue";
|
|
2
2
|
import { registerDialog as T } from "../composables/dialog-items.mjs";
|
|
3
3
|
import { VDialog as k } from "../bt-core/core/node_modules/vuetify/lib/components/VDialog/VDialog.mjs";
|
|
4
4
|
import { VCard as h } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs";
|
|
@@ -6,12 +6,12 @@ import { VBtn as v } from "../bt-core/core/node_modules/vuetify/lib/components/V
|
|
|
6
6
|
const O = /* @__PURE__ */ g({
|
|
7
7
|
__name: "BT-Dialog-Confirm",
|
|
8
8
|
setup(w) {
|
|
9
|
-
const a =
|
|
9
|
+
const a = n(!1), l = n({});
|
|
10
10
|
let r;
|
|
11
11
|
const c = T({
|
|
12
12
|
dialogType: "confirm",
|
|
13
13
|
open: (e, t) => {
|
|
14
|
-
e.height ?? (e.height = "65vh"), e.maxWidth ?? (e.maxWidth = "350px"), e.cancelText ?? (e.cancelText = "Cancel"), e.confirmText ?? (e.confirmText = "Confirm"), e.text ?? (e.text = "Are you sure?"), l.value = e, a.value = !0, r = t;
|
|
14
|
+
e.height ?? (e.height = "65vh"), e.maxWidth ?? (e.maxWidth = "350px"), e.cancelText ?? (e.cancelText = "Cancel"), e.confirmText ?? (e.confirmText = "Confirm"), e.itemComponent == null && (e.text ?? (e.text = "Are you sure?")), l.value = e, a.value = !0, r = t;
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
function x() {
|
|
@@ -29,9 +29,9 @@ const O = /* @__PURE__ */ g({
|
|
|
29
29
|
isError: !1
|
|
30
30
|
}), a.value = !1;
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return D(() => {
|
|
33
33
|
c();
|
|
34
|
-
}), (e, t) => (
|
|
34
|
+
}), (e, t) => (f(), d(u(k), {
|
|
35
35
|
"max-width": l.value.maxWidth,
|
|
36
36
|
modelValue: a.value,
|
|
37
37
|
"onUpdate:modelValue": t[2] || (t[2] = (C) => a.value = C)
|
|
@@ -41,7 +41,7 @@ const O = /* @__PURE__ */ g({
|
|
|
41
41
|
subtitle: l.value.subtitle,
|
|
42
42
|
text: l.value.text,
|
|
43
43
|
title: l.value.title
|
|
44
|
-
},
|
|
44
|
+
}, s({
|
|
45
45
|
actions: m(() => [
|
|
46
46
|
i(u(v), {
|
|
47
47
|
onClick: t[0] || (t[0] = () => o()),
|
|
@@ -57,7 +57,7 @@ const O = /* @__PURE__ */ g({
|
|
|
57
57
|
l.value.itemComponent != null ? {
|
|
58
58
|
name: "default",
|
|
59
59
|
fn: m(() => [
|
|
60
|
-
(
|
|
60
|
+
(f(), d(V(l.value.itemComponent), {
|
|
61
61
|
item: l.value.item
|
|
62
62
|
}, null, 8, ["item"]))
|
|
63
63
|
]),
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { registerDialog as
|
|
3
|
-
import { VDialog as
|
|
4
|
-
import { VCard as
|
|
1
|
+
import { defineComponent as C, ref as f, computed as D, onUnmounted as V, resolveComponent as T, openBlock as w, createBlock as b, unref as m, withCtx as i, createVNode as d } from "vue";
|
|
2
|
+
import { registerDialog as h } from "../composables/dialog-items.mjs";
|
|
3
|
+
import { VDialog as y } from "../bt-core/core/node_modules/vuetify/lib/components/VDialog/VDialog.mjs";
|
|
4
|
+
import { VCard as B } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs";
|
|
5
5
|
import { VBtn as v } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
|
|
6
|
-
const
|
|
6
|
+
const U = /* @__PURE__ */ C({
|
|
7
7
|
__name: "BT-Dialog-Date",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
const o =
|
|
8
|
+
setup(_) {
|
|
9
|
+
const r = f(!1), l = f({}), t = f();
|
|
10
|
+
let u;
|
|
11
|
+
const o = h({
|
|
12
12
|
dialogType: "date",
|
|
13
13
|
open: (e, a) => {
|
|
14
|
-
e.format ?? (e.format = "ccc dd/LL/yyyy"), e.height ?? (e.height = "65vh"), e.maxWidth ?? (e.maxWidth = "300px"), e.cancelText ?? (e.cancelText = "Cancel"), e.confirmText ?? (e.confirmText = "Confirm"), e.range ?? (e.range = !1), l.value = e,
|
|
14
|
+
e.format ?? (e.format = "ccc dd/LL/yyyy"), e.height ?? (e.height = "65vh"), e.maxWidth ?? (e.maxWidth = "300px"), e.cancelText ?? (e.cancelText = "Cancel"), e.confirmText ?? (e.confirmText = "Confirm"), e.range ?? (e.range = !1), l.value = e, r.value = !0, u = a, t.value = e.startingDate;
|
|
15
15
|
}
|
|
16
|
-
});
|
|
17
|
-
function
|
|
18
|
-
|
|
16
|
+
}), c = D(() => l.value.range ? Array.isArray(t.value) && t.value.length == 2 : t.value != null);
|
|
17
|
+
function g() {
|
|
18
|
+
u != null && u({
|
|
19
19
|
isCancelled: !1,
|
|
20
20
|
isConfirmed: !0,
|
|
21
21
|
isError: !1,
|
|
22
|
-
result:
|
|
22
|
+
result: t.value
|
|
23
23
|
// dateOptions.value.range !== false ? (isArrayOfLength(mSelected.value, 0) ? undefined : mSelected.value) : mSelected.value //(isLengthyArray(mSelected.value) ? mSelected.value[0] : undefined)
|
|
24
|
-
}),
|
|
24
|
+
}), r.value = !1;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function x() {
|
|
27
|
+
u != null && u({
|
|
28
28
|
isCancelled: !0,
|
|
29
29
|
isConfirmed: !1,
|
|
30
30
|
isError: !1
|
|
31
|
-
}),
|
|
31
|
+
}), r.value = !1;
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return V(() => {
|
|
34
34
|
o();
|
|
35
35
|
}), (e, a) => {
|
|
36
|
-
const
|
|
37
|
-
return
|
|
36
|
+
const s = T("bt-date");
|
|
37
|
+
return w(), b(m(y), {
|
|
38
38
|
"max-width": l.value.maxWidth,
|
|
39
|
-
modelValue:
|
|
40
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
39
|
+
modelValue: r.value,
|
|
40
|
+
"onUpdate:modelValue": a[3] || (a[3] = (n) => r.value = n)
|
|
41
41
|
}, {
|
|
42
42
|
default: i(() => [
|
|
43
|
-
d(m(
|
|
43
|
+
d(m(B), {
|
|
44
44
|
subtitle: l.value.subtitle,
|
|
45
45
|
text: l.value.text,
|
|
46
46
|
title: l.value.title
|
|
47
47
|
}, {
|
|
48
48
|
default: i(() => [
|
|
49
|
-
d(
|
|
49
|
+
d(s, {
|
|
50
50
|
dateFrom: l.value.dateFrom,
|
|
51
51
|
dateRules: l.value.dateRules,
|
|
52
52
|
format: l.value.format,
|
|
@@ -55,19 +55,20 @@ const F = /* @__PURE__ */ s({
|
|
|
55
55
|
range: l.value.range,
|
|
56
56
|
startingDate: l.value.startingDate,
|
|
57
57
|
useTime: l.value.useTime,
|
|
58
|
-
modelValue:
|
|
59
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
58
|
+
modelValue: t.value,
|
|
59
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => t.value = n)
|
|
60
60
|
}, null, 8, ["dateFrom", "dateRules", "format", "fromNow", "horizontal", "range", "startingDate", "useTime", "modelValue"])
|
|
61
61
|
]),
|
|
62
62
|
actions: i(() => [
|
|
63
63
|
d(m(v), {
|
|
64
|
-
onClick: a[1] || (a[1] = () =>
|
|
64
|
+
onClick: a[1] || (a[1] = () => x()),
|
|
65
65
|
text: l.value.cancelText
|
|
66
66
|
}, null, 8, ["text"]),
|
|
67
67
|
d(m(v), {
|
|
68
|
-
onClick: a[2] || (a[2] = () =>
|
|
68
|
+
onClick: a[2] || (a[2] = () => g()),
|
|
69
|
+
disabled: !c.value,
|
|
69
70
|
text: l.value.confirmText
|
|
70
|
-
}, null, 8, ["text"])
|
|
71
|
+
}, null, 8, ["disabled", "text"])
|
|
71
72
|
]),
|
|
72
73
|
_: 1
|
|
73
74
|
}, 8, ["subtitle", "text", "title"])
|
|
@@ -78,5 +79,5 @@ const F = /* @__PURE__ */ s({
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
+
U as default
|
|
82
83
|
};
|
|
@@ -118,3 +118,15 @@ export interface UseDialogConfirmOptions {
|
|
|
118
118
|
title?: string;
|
|
119
119
|
}
|
|
120
120
|
export declare function useDialogConfirm(options: UseDialogConfirmOptions): Promise<DialogReturn<string>>;
|
|
121
|
+
export interface UseDialogItemOptions {
|
|
122
|
+
cancelText?: string;
|
|
123
|
+
confirmText?: string;
|
|
124
|
+
height?: string;
|
|
125
|
+
item?: any;
|
|
126
|
+
itemComponent?: any;
|
|
127
|
+
maxWidth?: string;
|
|
128
|
+
subtitle?: string;
|
|
129
|
+
text?: string;
|
|
130
|
+
title?: string;
|
|
131
|
+
}
|
|
132
|
+
export declare function useDialogItem<T>(options: UseDialogConfirmOptions): Promise<DialogReturn<T>>;
|
|
@@ -62,10 +62,22 @@ function d(s) {
|
|
|
62
62
|
o.open(s, e);
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
+
function u(s) {
|
|
66
|
+
const o = i == null ? void 0 : i.options.find((e) => e.dialogType == "confirm");
|
|
67
|
+
return o == null ? Promise.resolve({
|
|
68
|
+
isError: !0,
|
|
69
|
+
isCancelled: !1,
|
|
70
|
+
isConfirmed: !1,
|
|
71
|
+
result: void 0
|
|
72
|
+
}) : new Promise((e) => {
|
|
73
|
+
o.open(s, e);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
65
76
|
export {
|
|
66
77
|
n as registerDialog,
|
|
67
78
|
d as useDialogConfirm,
|
|
68
79
|
l as useDialogDate,
|
|
80
|
+
u as useDialogItem,
|
|
69
81
|
t as useDialogNumber,
|
|
70
82
|
r as useDialogSelect,
|
|
71
83
|
f as useDialogString
|