@caipira/tamandua 0.0.101 → 0.0.102
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/DialogProvider.js +2 -2
- package/dist/DialogProvider.vue_vue_type_script_setup_true_lang-DdpepOBn.js +24 -0
- package/dist/Modal.js +2 -2
- package/dist/Modal.vue_vue_type_script_setup_true_lang-BULzzlLD.js +89 -0
- package/dist/components.js +2 -2
- package/dist/composables.js +1 -1
- package/dist/{plugin-Cy5TXn1Y.js → plugin-BbE8ivq1.js} +1 -1
- package/dist/{plugin-DXPPWWyR.js → plugin-NlTwzbQb.js} +1 -1
- package/dist/{plugins-C-OK-RIJ.js → plugins-iuR3SgQL.js} +3 -3
- package/dist/plugins.js +3 -3
- package/dist/tamandua.js +1 -1
- package/dist/types/components/Alert/Alert.story.d.ts +1 -1
- package/dist/types/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/types/components/InputSelect/InputSelect.vue.d.ts +12 -12
- package/dist/types/components/Modal/Modal.story.d.ts +21 -0
- package/dist/types/components/Modal/Modal.vue.d.ts +17 -10
- package/dist/types/components/Modal/types.d.ts +23 -0
- package/dist/types/composables/useDialog.d.ts +438 -0
- package/dist/useDialog-BOJPIAnz.js +42 -0
- package/package.json +1 -1
- package/dist/DialogProvider.vue_vue_type_script_setup_true_lang-ejMXvlRv.js +0 -21
- package/dist/Modal.vue_vue_type_script_setup_true_lang-gKqoL70h.js +0 -83
- package/dist/useDialog-Cl-wVLea.js +0 -28
package/dist/DialogProvider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as i } from "./DialogProvider.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as e } from "./plugin-
|
|
1
|
+
import { _ as i } from "./DialogProvider.vue_vue_type_script_setup_true_lang-DdpepOBn.js";
|
|
2
|
+
import { p as e } from "./plugin-NlTwzbQb.js";
|
|
3
3
|
export {
|
|
4
4
|
i as DialogProvider,
|
|
5
5
|
e as DialogProviderPlugin
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as p, resolveComponent as t, openBlock as e, createElementBlock as n, Fragment as r, renderList as l, unref as s, createBlock as m, mergeProps as i } from "vue";
|
|
2
|
+
import { u as d } from "./useDialog-BOJPIAnz.js";
|
|
3
|
+
const B = /* @__PURE__ */ p({
|
|
4
|
+
name: "TDialogProvider",
|
|
5
|
+
__name: "DialogProvider",
|
|
6
|
+
setup(C) {
|
|
7
|
+
const { modals: a, alerts: c } = d();
|
|
8
|
+
return (f, v) => {
|
|
9
|
+
const u = t("t-modal"), _ = t("t-alert");
|
|
10
|
+
return e(), n("div", null, [
|
|
11
|
+
(e(!0), n(r, null, l(s(a), (o) => (e(), m(u, i(o.options, {
|
|
12
|
+
onClosed: o.events.onClose
|
|
13
|
+
}), null, 16, ["onClosed"]))), 256)),
|
|
14
|
+
(e(!0), n(r, null, l(s(c), (o) => (e(), m(_, i(o.options, {
|
|
15
|
+
onClosed: o.events.onClose,
|
|
16
|
+
onConfirmed: o.events.onConfirm
|
|
17
|
+
}), null, 16, ["onClosed", "onConfirmed"]))), 256))
|
|
18
|
+
]);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
B as _
|
|
24
|
+
};
|
package/dist/Modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as r } from "./Modal.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p } from "./plugin-
|
|
1
|
+
import { _ as r } from "./Modal.vue_vue_type_script_setup_true_lang-BULzzlLD.js";
|
|
2
|
+
import { p } from "./plugin-BbE8ivq1.js";
|
|
3
3
|
export {
|
|
4
4
|
r as Modal,
|
|
5
5
|
p as ModalPlugin
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent as b, ref as h, onMounted as k, provide as v, resolveComponent as _, openBlock as t, createElementBlock as a, normalizeClass as r, withKeys as w, createBlock as n, createCommentVNode as l, createElementVNode as u, toDisplayString as C, renderSlot as i, resolveDynamicComponent as B, mergeProps as S } from "vue";
|
|
2
|
+
import { _ as $ } from "./Backdrop.vue_vue_type_script_setup_true_lang-Dyo6_-EM.js";
|
|
3
|
+
const x = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "p-4 border-b border-color"
|
|
6
|
+
}, j = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "block font-semibold uppercase"
|
|
9
|
+
}, g = ["id"];
|
|
10
|
+
let z = 0;
|
|
11
|
+
const F = /* @__PURE__ */ b({
|
|
12
|
+
name: "TModal",
|
|
13
|
+
__name: "Modal",
|
|
14
|
+
props: {
|
|
15
|
+
is: { default: void 0 },
|
|
16
|
+
props: { default: () => ({}) },
|
|
17
|
+
title: { default: "" },
|
|
18
|
+
canClose: { type: Boolean, default: !0 },
|
|
19
|
+
showHeader: { type: Boolean, default: !0 },
|
|
20
|
+
showFooter: { type: Boolean, default: !1 },
|
|
21
|
+
injectStyle: { default: () => ({ wrapper: "", body: "", container: "" }) },
|
|
22
|
+
hasBackdrop: { type: Boolean, default: !0 },
|
|
23
|
+
disableStyle: { type: Boolean, default: !1 }
|
|
24
|
+
},
|
|
25
|
+
emits: ["closed"],
|
|
26
|
+
setup(p, { emit: f }) {
|
|
27
|
+
const e = p, m = f, d = h(null), c = `tamandua-modal-${++z}`, s = (o) => {
|
|
28
|
+
o?.stopPropagation(), m("closed");
|
|
29
|
+
};
|
|
30
|
+
return k(() => {
|
|
31
|
+
d.value?.focus();
|
|
32
|
+
}), v("tamandua-modal-id", c), (o, M) => {
|
|
33
|
+
const y = _("t-button");
|
|
34
|
+
return t(), a("div", {
|
|
35
|
+
class: r(["fixed inset-0 focus-visible:outline-hidden z-10", {
|
|
36
|
+
"flex items-center": !e.disableStyle,
|
|
37
|
+
[e.injectStyle.wrapper]: !0
|
|
38
|
+
}]),
|
|
39
|
+
tabindex: "-1",
|
|
40
|
+
ref_key: "modal",
|
|
41
|
+
ref: d,
|
|
42
|
+
onKeyup: w(s, ["esc"])
|
|
43
|
+
}, [
|
|
44
|
+
e.hasBackdrop ? (t(), n($, {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "z-10",
|
|
47
|
+
onClick: s
|
|
48
|
+
})) : l("", !0),
|
|
49
|
+
u("div", {
|
|
50
|
+
class: r(["z-10 w-full md:w-[36rem] mx-auto", {
|
|
51
|
+
"relative floatable": !e.disableStyle,
|
|
52
|
+
[e.injectStyle.container]: !0
|
|
53
|
+
}])
|
|
54
|
+
}, [
|
|
55
|
+
e.canClose ? (t(), n(y, {
|
|
56
|
+
key: 0,
|
|
57
|
+
variant: "transparent",
|
|
58
|
+
icon: "close",
|
|
59
|
+
size: "",
|
|
60
|
+
class: "absolute justify-center top-0 right-0 h-14 w-14",
|
|
61
|
+
onClick: s
|
|
62
|
+
})) : l("", !0),
|
|
63
|
+
e.showHeader ? (t(), a("div", x, [
|
|
64
|
+
e.title ? (t(), a("span", j, C(e.title), 1)) : l("", !0),
|
|
65
|
+
o.$slots.header ? i(o.$slots, "header", { key: 1 }) : l("", !0)
|
|
66
|
+
])) : l("", !0),
|
|
67
|
+
u("div", {
|
|
68
|
+
class: r(["flex flex-col flex-1 overflow-y-auto scrollbar", {
|
|
69
|
+
[e.injectStyle.body]: !0
|
|
70
|
+
}]),
|
|
71
|
+
style: { "max-height": "80vh" }
|
|
72
|
+
}, [
|
|
73
|
+
e.is ? (t(), n(B(e.is), S({ key: 0 }, e.props, { onClosed: s }), null, 16)) : i(o.$slots, "default", { key: 1 })
|
|
74
|
+
], 2),
|
|
75
|
+
e.showFooter || o.$slots.footer ? (t(), a("div", {
|
|
76
|
+
key: 2,
|
|
77
|
+
class: "flex flex-row items-center justify-between p-4 border-t border-color",
|
|
78
|
+
id: `${c}-footer`
|
|
79
|
+
}, [
|
|
80
|
+
i(o.$slots, "footer")
|
|
81
|
+
], 8, g)) : l("", !0)
|
|
82
|
+
], 2)
|
|
83
|
+
], 34);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export {
|
|
88
|
+
F as _
|
|
89
|
+
};
|
package/dist/components.js
CHANGED
|
@@ -4,7 +4,7 @@ import { _ as s } from "./Backdrop.vue_vue_type_script_setup_true_lang-Dyo6_-EM.
|
|
|
4
4
|
import { _ as f } from "./Button.vue_vue_type_script_setup_true_lang-zvMC7Ucn.js";
|
|
5
5
|
import { _ as n } from "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
|
|
6
6
|
import { _ as u } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-CLi_IXfP.js";
|
|
7
|
-
import { _ as l } from "./DialogProvider.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as l } from "./DialogProvider.vue_vue_type_script_setup_true_lang-DdpepOBn.js";
|
|
8
8
|
import { D as c } from "./Drawer-y5xBARd2.js";
|
|
9
9
|
import { _ as T } from "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
|
|
10
10
|
import { _ as d } from "./FileDrop.vue_vue_type_script_setup_true_lang-Bq0lAgZ7.js";
|
|
@@ -32,7 +32,7 @@ import { _ as sr } from "./InputSwitch.vue_vue_type_script_setup_true_lang-BVGfQ
|
|
|
32
32
|
import { _ as fr } from "./InputText.vue_vue_type_script_setup_true_lang-D2cGaq7X.js";
|
|
33
33
|
import { _ as nr } from "./InputTextarea.vue_vue_type_script_setup_true_lang-C8f2hfeZ.js";
|
|
34
34
|
import { _ as ur } from "./Link.vue_vue_type_script_setup_true_lang-BFFw1dPV.js";
|
|
35
|
-
import { _ as lr } from "./Modal.vue_vue_type_script_setup_true_lang-
|
|
35
|
+
import { _ as lr } from "./Modal.vue_vue_type_script_setup_true_lang-BULzzlLD.js";
|
|
36
36
|
import { _ as cr } from "./ModalForm.vue_vue_type_script_setup_true_lang-C1Xl4TmQ.js";
|
|
37
37
|
import { _ as Tr } from "./Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js";
|
|
38
38
|
import { _ as dr } from "./Popconfirm.vue_vue_type_script_setup_true_lang-CR0OJ8Ao.js";
|
package/dist/composables.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as o, getCurrentInstance as l } from "vue";
|
|
2
2
|
import { u as O } from "./useClipboard-BHFD0Jvv.js";
|
|
3
|
-
import { u as R } from "./useDialog-
|
|
3
|
+
import { u as R } from "./useDialog-BOJPIAnz.js";
|
|
4
4
|
const f = 640, d = 768, c = 1024, n = o(window.innerWidth), s = o(!1), i = o(!1), a = o(!1), u = (e) => {
|
|
5
5
|
n.value = e ? e.target.innerWidth : window.innerWidth, s.value = n.value >= f, i.value = n.value >= d, a.value = n.value >= c;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r } from "./register-component-B-fdqewb.js";
|
|
2
|
-
import { _ as s } from "./DialogProvider.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as s } from "./DialogProvider.vue_vue_type_script_setup_true_lang-DdpepOBn.js";
|
|
3
3
|
const m = {
|
|
4
4
|
install(o) {
|
|
5
5
|
r(o, s);
|
|
@@ -9,8 +9,8 @@ import "./transform-DSaNEFMr.js";
|
|
|
9
9
|
import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
|
|
10
10
|
import { p as n } from "./plugin-DDXOF4cU.js";
|
|
11
11
|
import { p as m } from "./plugin-CyDnzy2n.js";
|
|
12
|
-
import "./useDialog-
|
|
13
|
-
import { p as t } from "./plugin-
|
|
12
|
+
import "./useDialog-BOJPIAnz.js";
|
|
13
|
+
import { p as t } from "./plugin-NlTwzbQb.js";
|
|
14
14
|
import "./Drawer-y5xBARd2.js";
|
|
15
15
|
import { p as u } from "./plugin-JMSzJgz5.js";
|
|
16
16
|
import "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
|
|
@@ -49,7 +49,7 @@ import { p as F } from "./plugin-cOJ_nFaw.js";
|
|
|
49
49
|
import "./Link.vue_vue_type_script_setup_true_lang-BFFw1dPV.js";
|
|
50
50
|
import { p as A } from "./plugin-bSqyo8FU.js";
|
|
51
51
|
import { p as L } from "./plugin-uxc8N8iO.js";
|
|
52
|
-
import { p as M } from "./plugin-
|
|
52
|
+
import { p as M } from "./plugin-BbE8ivq1.js";
|
|
53
53
|
import { p as _ } from "./plugin-jyvJNavM.js";
|
|
54
54
|
import "./Popconfirm.vue_vue_type_script_setup_true_lang-CR0OJ8Ao.js";
|
|
55
55
|
import { p as j } from "./plugin-Bhokj2iJ.js";
|
package/dist/plugins.js
CHANGED
|
@@ -9,8 +9,8 @@ import "./transform-DSaNEFMr.js";
|
|
|
9
9
|
import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
|
|
10
10
|
import { p as M } from "./plugin-DDXOF4cU.js";
|
|
11
11
|
import { p as E } from "./plugin-CyDnzy2n.js";
|
|
12
|
-
import "./useDialog-
|
|
13
|
-
import { p as j } from "./plugin-
|
|
12
|
+
import "./useDialog-BOJPIAnz.js";
|
|
13
|
+
import { p as j } from "./plugin-NlTwzbQb.js";
|
|
14
14
|
import "./Drawer-y5xBARd2.js";
|
|
15
15
|
import { p as z } from "./plugin-JMSzJgz5.js";
|
|
16
16
|
import "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
|
|
@@ -49,7 +49,7 @@ import { p as Mr } from "./plugin-cOJ_nFaw.js";
|
|
|
49
49
|
import "./Link.vue_vue_type_script_setup_true_lang-BFFw1dPV.js";
|
|
50
50
|
import { p as Er } from "./plugin-bSqyo8FU.js";
|
|
51
51
|
import { p as jr } from "./plugin-uxc8N8iO.js";
|
|
52
|
-
import { p as zr } from "./plugin-
|
|
52
|
+
import { p as zr } from "./plugin-BbE8ivq1.js";
|
|
53
53
|
import { p as Jr } from "./plugin-jyvJNavM.js";
|
|
54
54
|
import "./Popconfirm.vue_vue_type_script_setup_true_lang-CR0OJ8Ao.js";
|
|
55
55
|
import { p as Nr } from "./plugin-Bhokj2iJ.js";
|
package/dist/tamandua.js
CHANGED
|
@@ -9,11 +9,11 @@ export declare const Alert: (args: any) => {
|
|
|
9
9
|
open: import('vue').Ref<boolean>;
|
|
10
10
|
title: import('vue').Ref<string>;
|
|
11
11
|
message: import('vue').Ref<string>;
|
|
12
|
+
confirm: import('vue').Ref<boolean>;
|
|
12
13
|
alert: (options: import('./types.js').AlertProps & {
|
|
13
14
|
onConfirm?: () => void;
|
|
14
15
|
onClose?: () => void;
|
|
15
16
|
}) => void;
|
|
16
|
-
confirm: import('vue').Ref<boolean>;
|
|
17
17
|
};
|
|
18
18
|
template: string;
|
|
19
19
|
};
|
|
@@ -63,8 +63,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
63
63
|
wrapperRoundnessClass: string;
|
|
64
64
|
}>>> & {
|
|
65
65
|
onChange?: ((val: import("./types.js").SelectEvent) => any) | undefined;
|
|
66
|
-
"onEnd-reached"?: (() => any) | undefined;
|
|
67
66
|
onCreated?: ((val: import("vue").ComponentInternalInstance | null) => any) | undefined;
|
|
67
|
+
"onEnd-reached"?: (() => any) | undefined;
|
|
68
68
|
}, {
|
|
69
69
|
loading: boolean;
|
|
70
70
|
size: `${FormControlSize}`;
|
|
@@ -55,6 +55,12 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
55
55
|
type: import("vue").PropType<InputSelectOption[]>;
|
|
56
56
|
default: () => never[];
|
|
57
57
|
};
|
|
58
|
+
resource: {
|
|
59
|
+
type: import("vue").PropType<(filters?: APISearchFilters | undefined) => Promise<{
|
|
60
|
+
items: unknown[];
|
|
61
|
+
pagination: Pagination;
|
|
62
|
+
}>>;
|
|
63
|
+
};
|
|
58
64
|
initialValue: {
|
|
59
65
|
type: import("vue").PropType<any>;
|
|
60
66
|
};
|
|
@@ -62,12 +68,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
62
68
|
type: import("vue").PropType<string>;
|
|
63
69
|
default: string;
|
|
64
70
|
};
|
|
65
|
-
resource: {
|
|
66
|
-
type: import("vue").PropType<(filters?: APISearchFilters | undefined) => Promise<{
|
|
67
|
-
items: unknown[];
|
|
68
|
-
pagination: Pagination;
|
|
69
|
-
}>>;
|
|
70
|
-
};
|
|
71
71
|
mapper: {
|
|
72
72
|
type: import("vue").PropType<(i: any) => InputSelectOption>;
|
|
73
73
|
default: (i: any) => InputSelectOption;
|
|
@@ -122,6 +122,12 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
122
122
|
type: import("vue").PropType<InputSelectOption[]>;
|
|
123
123
|
default: () => never[];
|
|
124
124
|
};
|
|
125
|
+
resource: {
|
|
126
|
+
type: import("vue").PropType<(filters?: APISearchFilters | undefined) => Promise<{
|
|
127
|
+
items: unknown[];
|
|
128
|
+
pagination: Pagination;
|
|
129
|
+
}>>;
|
|
130
|
+
};
|
|
125
131
|
initialValue: {
|
|
126
132
|
type: import("vue").PropType<any>;
|
|
127
133
|
};
|
|
@@ -129,12 +135,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
129
135
|
type: import("vue").PropType<string>;
|
|
130
136
|
default: string;
|
|
131
137
|
};
|
|
132
|
-
resource: {
|
|
133
|
-
type: import("vue").PropType<(filters?: APISearchFilters | undefined) => Promise<{
|
|
134
|
-
items: unknown[];
|
|
135
|
-
pagination: Pagination;
|
|
136
|
-
}>>;
|
|
137
|
-
};
|
|
138
138
|
mapper: {
|
|
139
139
|
type: import("vue").PropType<(i: any) => InputSelectOption>;
|
|
140
140
|
default: (i: any) => InputSelectOption;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
args: {};
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Modal: (args: any) => {
|
|
7
|
+
setup(): {
|
|
8
|
+
args: any;
|
|
9
|
+
open: import('vue').Ref<boolean>;
|
|
10
|
+
title: import('vue').Ref<string>;
|
|
11
|
+
canClose: import('vue').Ref<boolean>;
|
|
12
|
+
modal: (options: import('./types.js').ModalProps & {
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}) => void;
|
|
15
|
+
CustomModalBody: import('vue').Raw<import("vue").DefineComponent<{}, {
|
|
16
|
+
props: import("@vue/shared").LooseRequired<{} & {}>;
|
|
17
|
+
emit: (event: string, ...args: any[]) => void;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
|
|
19
|
+
};
|
|
20
|
+
template: string;
|
|
21
|
+
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { ModalProps } from './types.js';
|
|
2
2
|
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
footer?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps>, {
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps>, {
|
|
4
|
+
is: undefined;
|
|
5
|
+
props: () => {};
|
|
9
6
|
title: string;
|
|
10
7
|
canClose: boolean;
|
|
11
8
|
showHeader: boolean;
|
|
9
|
+
showFooter: boolean;
|
|
12
10
|
injectStyle: () => {
|
|
13
11
|
wrapper: string;
|
|
14
12
|
body: string;
|
|
@@ -19,9 +17,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
19
17
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
18
|
closed: () => void;
|
|
21
19
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps>, {
|
|
20
|
+
is: undefined;
|
|
21
|
+
props: () => {};
|
|
22
22
|
title: string;
|
|
23
23
|
canClose: boolean;
|
|
24
24
|
showHeader: boolean;
|
|
25
|
+
showFooter: boolean;
|
|
25
26
|
injectStyle: () => {
|
|
26
27
|
wrapper: string;
|
|
27
28
|
body: string;
|
|
@@ -33,13 +34,19 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
33
34
|
onClosed?: (() => any) | undefined;
|
|
34
35
|
}, {
|
|
35
36
|
title: string;
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
props: Record<string, any>;
|
|
38
|
+
is: import("vue").Component;
|
|
38
39
|
canClose: boolean;
|
|
40
|
+
showHeader: boolean;
|
|
41
|
+
showFooter: boolean;
|
|
39
42
|
injectStyle: any;
|
|
40
43
|
hasBackdrop: boolean;
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
disableStyle: boolean;
|
|
45
|
+
}, {}>, {
|
|
46
|
+
header?(_: {}): any;
|
|
47
|
+
default?(_: {}): any;
|
|
48
|
+
footer?(_: {}): any;
|
|
49
|
+
}>;
|
|
43
50
|
export default _default;
|
|
44
51
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
45
52
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
|
|
1
3
|
export type ModalProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Component to be rendered inside the modal body
|
|
6
|
+
*/
|
|
7
|
+
is?: Component;
|
|
8
|
+
/**
|
|
9
|
+
* Body component props
|
|
10
|
+
*/
|
|
11
|
+
props?: Record<string, any>;
|
|
12
|
+
/**
|
|
13
|
+
* Modal title
|
|
14
|
+
*/
|
|
2
15
|
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the modal can be closed by the user
|
|
18
|
+
*/
|
|
3
19
|
canClose?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to show the header section
|
|
22
|
+
*/
|
|
4
23
|
showHeader?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to show the footer section
|
|
26
|
+
*/
|
|
27
|
+
showFooter?: boolean;
|
|
5
28
|
injectStyle?: any;
|
|
6
29
|
hasBackdrop?: boolean;
|
|
7
30
|
disableStyle?: boolean;
|
|
@@ -1,10 +1,447 @@
|
|
|
1
1
|
import { AlertProps } from '../components/Alert/types.js';
|
|
2
|
+
import { ModalProps } from '../components/Modal/types.js';
|
|
2
3
|
|
|
4
|
+
type ModalOptions = ModalProps & {
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
};
|
|
3
7
|
type AlertOptions = AlertProps & {
|
|
4
8
|
onConfirm?: () => void;
|
|
5
9
|
onClose?: () => void;
|
|
6
10
|
};
|
|
7
11
|
export default function useDialog(): {
|
|
12
|
+
modals: import('vue').Ref<{
|
|
13
|
+
id: string;
|
|
14
|
+
events: {
|
|
15
|
+
is?: import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
16
|
+
new (...args: any[]): any;
|
|
17
|
+
__isFragment?: never;
|
|
18
|
+
__isTeleport?: never;
|
|
19
|
+
__isSuspense?: never;
|
|
20
|
+
} | {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: {
|
|
23
|
+
attrs: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
slots: Readonly<{
|
|
27
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
30
|
+
expose: (exposed?: Record<string, any>) => void;
|
|
31
|
+
}) => any) | undefined;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
template?: string | object | undefined;
|
|
34
|
+
render?: Function | undefined;
|
|
35
|
+
components?: Record<string, import("vue").Component> | undefined;
|
|
36
|
+
directives?: Record<string, import("vue").Directive> | undefined;
|
|
37
|
+
inheritAttrs?: boolean | undefined;
|
|
38
|
+
emits?: any;
|
|
39
|
+
slots?: {} | undefined;
|
|
40
|
+
expose?: string[] | undefined;
|
|
41
|
+
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
42
|
+
compilerOptions?: {
|
|
43
|
+
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
44
|
+
whitespace?: "preserve" | "condense" | undefined;
|
|
45
|
+
comments?: boolean | undefined;
|
|
46
|
+
delimiters?: [string, string] | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
49
|
+
__isFragment?: never | undefined;
|
|
50
|
+
__isTeleport?: never | undefined;
|
|
51
|
+
__isSuspense?: never | undefined;
|
|
52
|
+
__defaults?: any;
|
|
53
|
+
compatConfig?: {
|
|
54
|
+
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
55
|
+
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
56
|
+
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
57
|
+
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
58
|
+
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
59
|
+
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
60
|
+
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
61
|
+
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
62
|
+
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
63
|
+
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
64
|
+
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
65
|
+
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
66
|
+
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
67
|
+
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
68
|
+
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
69
|
+
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
70
|
+
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
71
|
+
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
72
|
+
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
73
|
+
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
74
|
+
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
75
|
+
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
76
|
+
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
77
|
+
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
78
|
+
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
79
|
+
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
80
|
+
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
81
|
+
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
82
|
+
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
83
|
+
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
84
|
+
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
85
|
+
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
86
|
+
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
87
|
+
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
88
|
+
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
89
|
+
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
90
|
+
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
91
|
+
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
92
|
+
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
93
|
+
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
94
|
+
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
95
|
+
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
96
|
+
MODE?: 2 | 3 | ((comp: import("vue").Component | null) => 2 | 3) | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
data?: ((this: any, vm: any) => any) | undefined;
|
|
99
|
+
computed?: import("vue").ComputedOptions | undefined;
|
|
100
|
+
methods?: import("vue").MethodOptions | undefined;
|
|
101
|
+
watch?: {
|
|
102
|
+
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
103
|
+
handler: import("vue").WatchCallback | string;
|
|
104
|
+
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
105
|
+
handler: import("vue").WatchCallback | string;
|
|
106
|
+
} & import("vue").WatchOptions<boolean>))[];
|
|
107
|
+
} | undefined;
|
|
108
|
+
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
109
|
+
inject?: {} | string[] | undefined;
|
|
110
|
+
filters?: Record<string, Function> | undefined;
|
|
111
|
+
mixins?: any[] | undefined;
|
|
112
|
+
extends?: any;
|
|
113
|
+
beforeCreate?: (() => void) | undefined;
|
|
114
|
+
created?: (() => void) | undefined;
|
|
115
|
+
beforeMount?: (() => void) | undefined;
|
|
116
|
+
mounted?: (() => void) | undefined;
|
|
117
|
+
beforeUpdate?: (() => void) | undefined;
|
|
118
|
+
updated?: (() => void) | undefined;
|
|
119
|
+
activated?: (() => void) | undefined;
|
|
120
|
+
deactivated?: (() => void) | undefined;
|
|
121
|
+
beforeDestroy?: (() => void) | undefined;
|
|
122
|
+
beforeUnmount?: (() => void) | undefined;
|
|
123
|
+
destroyed?: (() => void) | undefined;
|
|
124
|
+
unmounted?: (() => void) | undefined;
|
|
125
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
126
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
127
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
|
|
128
|
+
delimiters?: [string, string] | undefined;
|
|
129
|
+
__differentiator?: string | number | symbol | undefined;
|
|
130
|
+
__isBuiltIn?: boolean | undefined;
|
|
131
|
+
__file?: string | undefined;
|
|
132
|
+
__name?: string | undefined;
|
|
133
|
+
i18n?: {
|
|
134
|
+
locale?: string | undefined;
|
|
135
|
+
fallbackLocale?: string | false | string[] | {
|
|
136
|
+
[x: string]: string[];
|
|
137
|
+
} | undefined;
|
|
138
|
+
messages?: {
|
|
139
|
+
[x: string]: import("@intlify/core-base").LocaleMessage<import("vue-i18n").VueMessageType>;
|
|
140
|
+
} | undefined;
|
|
141
|
+
flatJson?: boolean | undefined;
|
|
142
|
+
datetimeFormats?: {
|
|
143
|
+
[x: string]: import("vue-i18n").IntlDateTimeFormat;
|
|
144
|
+
} | undefined;
|
|
145
|
+
numberFormats?: {
|
|
146
|
+
[x: string]: import("vue-i18n").IntlNumberFormat;
|
|
147
|
+
} | undefined;
|
|
148
|
+
availableLocales?: import("vue-i18n").Locale[] | undefined;
|
|
149
|
+
modifiers?: import("vue-i18n").LinkedModifiers<import("vue-i18n").VueMessageType> | undefined;
|
|
150
|
+
formatter?: {
|
|
151
|
+
interpolate: (message: string, values: any, path: string) => Array<any> | null;
|
|
152
|
+
} | undefined;
|
|
153
|
+
missing?: import("vue-i18n").MissingHandler | undefined;
|
|
154
|
+
fallbackRoot?: boolean | undefined;
|
|
155
|
+
silentTranslationWarn?: boolean | {
|
|
156
|
+
exec: (string: string) => RegExpExecArray | null;
|
|
157
|
+
test: (string: string) => boolean;
|
|
158
|
+
readonly source: string;
|
|
159
|
+
readonly global: boolean;
|
|
160
|
+
readonly ignoreCase: boolean;
|
|
161
|
+
readonly multiline: boolean;
|
|
162
|
+
lastIndex: number;
|
|
163
|
+
compile: (pattern: string, flags?: string) => RegExp;
|
|
164
|
+
readonly flags: string;
|
|
165
|
+
readonly sticky: boolean;
|
|
166
|
+
readonly unicode: boolean;
|
|
167
|
+
readonly dotAll: boolean;
|
|
168
|
+
readonly hasIndices: boolean;
|
|
169
|
+
readonly unicodeSets: boolean;
|
|
170
|
+
[Symbol.match]: (string: string) => RegExpMatchArray | null;
|
|
171
|
+
[Symbol.replace]: {
|
|
172
|
+
(string: string, replaceValue: string): string;
|
|
173
|
+
(string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
174
|
+
};
|
|
175
|
+
[Symbol.search]: (string: string) => number;
|
|
176
|
+
[Symbol.split]: (string: string, limit?: number) => string[];
|
|
177
|
+
[Symbol.matchAll]: (str: string) => RegExpStringIterator<RegExpMatchArray>;
|
|
178
|
+
} | undefined;
|
|
179
|
+
silentFallbackWarn?: boolean | {
|
|
180
|
+
exec: (string: string) => RegExpExecArray | null;
|
|
181
|
+
test: (string: string) => boolean;
|
|
182
|
+
readonly source: string;
|
|
183
|
+
readonly global: boolean;
|
|
184
|
+
readonly ignoreCase: boolean;
|
|
185
|
+
readonly multiline: boolean;
|
|
186
|
+
lastIndex: number;
|
|
187
|
+
compile: (pattern: string, flags?: string) => RegExp;
|
|
188
|
+
readonly flags: string;
|
|
189
|
+
readonly sticky: boolean;
|
|
190
|
+
readonly unicode: boolean;
|
|
191
|
+
readonly dotAll: boolean;
|
|
192
|
+
readonly hasIndices: boolean;
|
|
193
|
+
readonly unicodeSets: boolean;
|
|
194
|
+
[Symbol.match]: (string: string) => RegExpMatchArray | null;
|
|
195
|
+
[Symbol.replace]: {
|
|
196
|
+
(string: string, replaceValue: string): string;
|
|
197
|
+
(string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
198
|
+
};
|
|
199
|
+
[Symbol.search]: (string: string) => number;
|
|
200
|
+
[Symbol.split]: (string: string, limit?: number) => string[];
|
|
201
|
+
[Symbol.matchAll]: (str: string) => RegExpStringIterator<RegExpMatchArray>;
|
|
202
|
+
} | undefined;
|
|
203
|
+
formatFallbackMessages?: boolean | undefined;
|
|
204
|
+
preserveDirectiveContent?: boolean | undefined;
|
|
205
|
+
warnHtmlInMessage?: import("vue-i18n").WarnHtmlInMessageLevel | undefined;
|
|
206
|
+
escapeParameterHtml?: boolean | undefined;
|
|
207
|
+
sharedMessages?: import("vue-i18n").LocaleMessages<import("vue-i18n").VueMessageType> | undefined;
|
|
208
|
+
pluralizationRules?: import("@intlify/core-base").PluralizationRules | undefined;
|
|
209
|
+
postTranslation?: import("vue-i18n").PostTranslationHandler<import("vue-i18n").VueMessageType> | undefined;
|
|
210
|
+
sync?: boolean | undefined;
|
|
211
|
+
messageResolver?: import("vue-i18n").MessageResolver | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
__i18n?: {
|
|
214
|
+
locale: import("vue-i18n").Locale;
|
|
215
|
+
resource: import("vue-i18n").LocaleMessages<import("vue-i18n").VueMessageType>;
|
|
216
|
+
}[] | undefined;
|
|
217
|
+
__INTLIFY_META__?: string | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
props?: Record<string, any> | undefined;
|
|
220
|
+
title?: string | undefined;
|
|
221
|
+
canClose?: boolean | undefined;
|
|
222
|
+
showHeader?: boolean | undefined;
|
|
223
|
+
showFooter?: boolean | undefined;
|
|
224
|
+
injectStyle?: any;
|
|
225
|
+
hasBackdrop?: boolean | undefined;
|
|
226
|
+
disableStyle?: boolean | undefined;
|
|
227
|
+
onClose?: (() => void) | undefined;
|
|
228
|
+
};
|
|
229
|
+
options: {
|
|
230
|
+
is?: import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
231
|
+
new (...args: any[]): any;
|
|
232
|
+
__isFragment?: never;
|
|
233
|
+
__isTeleport?: never;
|
|
234
|
+
__isSuspense?: never;
|
|
235
|
+
} | {
|
|
236
|
+
[x: string]: any;
|
|
237
|
+
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: {
|
|
238
|
+
attrs: {
|
|
239
|
+
[x: string]: unknown;
|
|
240
|
+
};
|
|
241
|
+
slots: Readonly<{
|
|
242
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
243
|
+
}>;
|
|
244
|
+
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
245
|
+
expose: (exposed?: Record<string, any>) => void;
|
|
246
|
+
}) => any) | undefined;
|
|
247
|
+
name?: string | undefined;
|
|
248
|
+
template?: string | object | undefined;
|
|
249
|
+
render?: Function | undefined;
|
|
250
|
+
components?: Record<string, import("vue").Component> | undefined;
|
|
251
|
+
directives?: Record<string, import("vue").Directive> | undefined;
|
|
252
|
+
inheritAttrs?: boolean | undefined;
|
|
253
|
+
emits?: any;
|
|
254
|
+
slots?: {} | undefined;
|
|
255
|
+
expose?: string[] | undefined;
|
|
256
|
+
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
257
|
+
compilerOptions?: {
|
|
258
|
+
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
259
|
+
whitespace?: "preserve" | "condense" | undefined;
|
|
260
|
+
comments?: boolean | undefined;
|
|
261
|
+
delimiters?: [string, string] | undefined;
|
|
262
|
+
} | undefined;
|
|
263
|
+
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
264
|
+
__isFragment?: never | undefined;
|
|
265
|
+
__isTeleport?: never | undefined;
|
|
266
|
+
__isSuspense?: never | undefined;
|
|
267
|
+
__defaults?: any;
|
|
268
|
+
compatConfig?: {
|
|
269
|
+
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
270
|
+
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
271
|
+
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
272
|
+
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
273
|
+
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
274
|
+
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
275
|
+
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
276
|
+
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
277
|
+
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
278
|
+
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
279
|
+
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
280
|
+
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
281
|
+
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
282
|
+
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
283
|
+
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
284
|
+
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
285
|
+
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
286
|
+
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
287
|
+
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
288
|
+
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
289
|
+
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
290
|
+
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
291
|
+
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
292
|
+
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
293
|
+
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
294
|
+
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
295
|
+
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
296
|
+
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
297
|
+
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
298
|
+
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
299
|
+
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
300
|
+
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
301
|
+
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
302
|
+
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
303
|
+
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
304
|
+
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
305
|
+
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
306
|
+
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
307
|
+
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
308
|
+
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
309
|
+
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
310
|
+
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
311
|
+
MODE?: 2 | 3 | ((comp: import("vue").Component | null) => 2 | 3) | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
data?: ((this: any, vm: any) => any) | undefined;
|
|
314
|
+
computed?: import("vue").ComputedOptions | undefined;
|
|
315
|
+
methods?: import("vue").MethodOptions | undefined;
|
|
316
|
+
watch?: {
|
|
317
|
+
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
318
|
+
handler: import("vue").WatchCallback | string;
|
|
319
|
+
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
320
|
+
handler: import("vue").WatchCallback | string;
|
|
321
|
+
} & import("vue").WatchOptions<boolean>))[];
|
|
322
|
+
} | undefined;
|
|
323
|
+
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
324
|
+
inject?: {} | string[] | undefined;
|
|
325
|
+
filters?: Record<string, Function> | undefined;
|
|
326
|
+
mixins?: any[] | undefined;
|
|
327
|
+
extends?: any;
|
|
328
|
+
beforeCreate?: (() => void) | undefined;
|
|
329
|
+
created?: (() => void) | undefined;
|
|
330
|
+
beforeMount?: (() => void) | undefined;
|
|
331
|
+
mounted?: (() => void) | undefined;
|
|
332
|
+
beforeUpdate?: (() => void) | undefined;
|
|
333
|
+
updated?: (() => void) | undefined;
|
|
334
|
+
activated?: (() => void) | undefined;
|
|
335
|
+
deactivated?: (() => void) | undefined;
|
|
336
|
+
beforeDestroy?: (() => void) | undefined;
|
|
337
|
+
beforeUnmount?: (() => void) | undefined;
|
|
338
|
+
destroyed?: (() => void) | undefined;
|
|
339
|
+
unmounted?: (() => void) | undefined;
|
|
340
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
341
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
342
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
|
|
343
|
+
delimiters?: [string, string] | undefined;
|
|
344
|
+
__differentiator?: string | number | symbol | undefined;
|
|
345
|
+
__isBuiltIn?: boolean | undefined;
|
|
346
|
+
__file?: string | undefined;
|
|
347
|
+
__name?: string | undefined;
|
|
348
|
+
i18n?: {
|
|
349
|
+
locale?: string | undefined;
|
|
350
|
+
fallbackLocale?: string | false | string[] | {
|
|
351
|
+
[x: string]: string[];
|
|
352
|
+
} | undefined;
|
|
353
|
+
messages?: {
|
|
354
|
+
[x: string]: import("@intlify/core-base").LocaleMessage<import("vue-i18n").VueMessageType>;
|
|
355
|
+
} | undefined;
|
|
356
|
+
flatJson?: boolean | undefined;
|
|
357
|
+
datetimeFormats?: {
|
|
358
|
+
[x: string]: import("vue-i18n").IntlDateTimeFormat;
|
|
359
|
+
} | undefined;
|
|
360
|
+
numberFormats?: {
|
|
361
|
+
[x: string]: import("vue-i18n").IntlNumberFormat;
|
|
362
|
+
} | undefined;
|
|
363
|
+
availableLocales?: import("vue-i18n").Locale[] | undefined;
|
|
364
|
+
modifiers?: import("vue-i18n").LinkedModifiers<import("vue-i18n").VueMessageType> | undefined;
|
|
365
|
+
formatter?: {
|
|
366
|
+
interpolate: (message: string, values: any, path: string) => Array<any> | null;
|
|
367
|
+
} | undefined;
|
|
368
|
+
missing?: import("vue-i18n").MissingHandler | undefined;
|
|
369
|
+
fallbackRoot?: boolean | undefined;
|
|
370
|
+
silentTranslationWarn?: boolean | {
|
|
371
|
+
exec: (string: string) => RegExpExecArray | null;
|
|
372
|
+
test: (string: string) => boolean;
|
|
373
|
+
readonly source: string;
|
|
374
|
+
readonly global: boolean;
|
|
375
|
+
readonly ignoreCase: boolean;
|
|
376
|
+
readonly multiline: boolean;
|
|
377
|
+
lastIndex: number;
|
|
378
|
+
compile: (pattern: string, flags?: string) => RegExp;
|
|
379
|
+
readonly flags: string;
|
|
380
|
+
readonly sticky: boolean;
|
|
381
|
+
readonly unicode: boolean;
|
|
382
|
+
readonly dotAll: boolean;
|
|
383
|
+
readonly hasIndices: boolean;
|
|
384
|
+
readonly unicodeSets: boolean;
|
|
385
|
+
[Symbol.match]: (string: string) => RegExpMatchArray | null;
|
|
386
|
+
[Symbol.replace]: {
|
|
387
|
+
(string: string, replaceValue: string): string;
|
|
388
|
+
(string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
389
|
+
};
|
|
390
|
+
[Symbol.search]: (string: string) => number;
|
|
391
|
+
[Symbol.split]: (string: string, limit?: number) => string[];
|
|
392
|
+
[Symbol.matchAll]: (str: string) => RegExpStringIterator<RegExpMatchArray>;
|
|
393
|
+
} | undefined;
|
|
394
|
+
silentFallbackWarn?: boolean | {
|
|
395
|
+
exec: (string: string) => RegExpExecArray | null;
|
|
396
|
+
test: (string: string) => boolean;
|
|
397
|
+
readonly source: string;
|
|
398
|
+
readonly global: boolean;
|
|
399
|
+
readonly ignoreCase: boolean;
|
|
400
|
+
readonly multiline: boolean;
|
|
401
|
+
lastIndex: number;
|
|
402
|
+
compile: (pattern: string, flags?: string) => RegExp;
|
|
403
|
+
readonly flags: string;
|
|
404
|
+
readonly sticky: boolean;
|
|
405
|
+
readonly unicode: boolean;
|
|
406
|
+
readonly dotAll: boolean;
|
|
407
|
+
readonly hasIndices: boolean;
|
|
408
|
+
readonly unicodeSets: boolean;
|
|
409
|
+
[Symbol.match]: (string: string) => RegExpMatchArray | null;
|
|
410
|
+
[Symbol.replace]: {
|
|
411
|
+
(string: string, replaceValue: string): string;
|
|
412
|
+
(string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
413
|
+
};
|
|
414
|
+
[Symbol.search]: (string: string) => number;
|
|
415
|
+
[Symbol.split]: (string: string, limit?: number) => string[];
|
|
416
|
+
[Symbol.matchAll]: (str: string) => RegExpStringIterator<RegExpMatchArray>;
|
|
417
|
+
} | undefined;
|
|
418
|
+
formatFallbackMessages?: boolean | undefined;
|
|
419
|
+
preserveDirectiveContent?: boolean | undefined;
|
|
420
|
+
warnHtmlInMessage?: import("vue-i18n").WarnHtmlInMessageLevel | undefined;
|
|
421
|
+
escapeParameterHtml?: boolean | undefined;
|
|
422
|
+
sharedMessages?: import("vue-i18n").LocaleMessages<import("vue-i18n").VueMessageType> | undefined;
|
|
423
|
+
pluralizationRules?: import("@intlify/core-base").PluralizationRules | undefined;
|
|
424
|
+
postTranslation?: import("vue-i18n").PostTranslationHandler<import("vue-i18n").VueMessageType> | undefined;
|
|
425
|
+
sync?: boolean | undefined;
|
|
426
|
+
messageResolver?: import("vue-i18n").MessageResolver | undefined;
|
|
427
|
+
} | undefined;
|
|
428
|
+
__i18n?: {
|
|
429
|
+
locale: import("vue-i18n").Locale;
|
|
430
|
+
resource: import("vue-i18n").LocaleMessages<import("vue-i18n").VueMessageType>;
|
|
431
|
+
}[] | undefined;
|
|
432
|
+
__INTLIFY_META__?: string | undefined;
|
|
433
|
+
} | undefined;
|
|
434
|
+
props?: Record<string, any> | undefined;
|
|
435
|
+
title?: string | undefined;
|
|
436
|
+
canClose?: boolean | undefined;
|
|
437
|
+
showHeader?: boolean | undefined;
|
|
438
|
+
showFooter?: boolean | undefined;
|
|
439
|
+
injectStyle?: any;
|
|
440
|
+
hasBackdrop?: boolean | undefined;
|
|
441
|
+
disableStyle?: boolean | undefined;
|
|
442
|
+
onClose?: (() => void) | undefined;
|
|
443
|
+
};
|
|
444
|
+
}[]>;
|
|
8
445
|
alerts: import('vue').Ref<{
|
|
9
446
|
id: string;
|
|
10
447
|
events: {
|
|
@@ -28,6 +465,7 @@ export default function useDialog(): {
|
|
|
28
465
|
onClose?: (() => void) | undefined;
|
|
29
466
|
};
|
|
30
467
|
}[]>;
|
|
468
|
+
modal: (options: ModalOptions) => void;
|
|
31
469
|
alert: (options: AlertOptions) => void;
|
|
32
470
|
};
|
|
33
471
|
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ref as c, markRaw as r } from "vue";
|
|
2
|
+
const i = c([]), t = c([]);
|
|
3
|
+
function u() {
|
|
4
|
+
const a = () => Date.now().toString(), l = (e, n) => {
|
|
5
|
+
const s = e.findIndex((o) => o.id === n);
|
|
6
|
+
s !== -1 && e.splice(s, 1);
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
modals: i,
|
|
10
|
+
alerts: t,
|
|
11
|
+
modal: (e) => {
|
|
12
|
+
const n = a(), s = {
|
|
13
|
+
onClose: () => {
|
|
14
|
+
e?.onClose && e.onClose(), l(i.value, n);
|
|
15
|
+
}
|
|
16
|
+
}, o = { ...e };
|
|
17
|
+
delete o?.onClose, "is" in o && o.is && (o.is = r(o.is)), i.value.push({
|
|
18
|
+
id: n,
|
|
19
|
+
events: s,
|
|
20
|
+
options: o
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
alert: (e) => {
|
|
24
|
+
const n = a(), s = {
|
|
25
|
+
onClose: () => {
|
|
26
|
+
e?.onClose && e.onClose(), l(t.value, n);
|
|
27
|
+
},
|
|
28
|
+
onConfirm: () => {
|
|
29
|
+
e?.onConfirm && e.onConfirm(), l(t.value, n);
|
|
30
|
+
}
|
|
31
|
+
}, o = { ...e };
|
|
32
|
+
delete o?.onClose, delete o?.onConfirm, t.value.push({
|
|
33
|
+
id: n,
|
|
34
|
+
events: s,
|
|
35
|
+
options: o
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
u
|
|
42
|
+
};
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { defineComponent as s, resolveComponent as l, openBlock as o, createElementBlock as n, Fragment as m, renderList as i, unref as a, createBlock as c, mergeProps as p } from "vue";
|
|
2
|
-
import { u as _ } from "./useDialog-Cl-wVLea.js";
|
|
3
|
-
const g = /* @__PURE__ */ s({
|
|
4
|
-
name: "TDialogProvider",
|
|
5
|
-
__name: "DialogProvider",
|
|
6
|
-
setup(u) {
|
|
7
|
-
const { alerts: r } = _();
|
|
8
|
-
return (d, f) => {
|
|
9
|
-
const t = l("t-alert");
|
|
10
|
-
return o(), n("div", null, [
|
|
11
|
-
(o(!0), n(m, null, i(a(r), (e) => (o(), c(t, p(e.options, {
|
|
12
|
-
onClosed: e.events.onClose,
|
|
13
|
-
onConfirmed: e.events.onConfirm
|
|
14
|
-
}), null, 16, ["onClosed", "onConfirmed"]))), 256))
|
|
15
|
-
]);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
g as _
|
|
21
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, ref as b, onMounted as h, resolveComponent as k, openBlock as o, createElementBlock as s, normalizeClass as a, withKeys as _, createBlock as i, createCommentVNode as l, createElementVNode as d, toDisplayString as v, renderSlot as n } from "vue";
|
|
2
|
-
import { _ as w } from "./Backdrop.vue_vue_type_script_setup_true_lang-Dyo6_-EM.js";
|
|
3
|
-
const B = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "p-4 border-b border-color"
|
|
6
|
-
}, C = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "block font-semibold uppercase"
|
|
9
|
-
}, S = {
|
|
10
|
-
key: 2,
|
|
11
|
-
class: "flex flex-row items-center justify-between p-4 border-t border-color"
|
|
12
|
-
}, z = /* @__PURE__ */ y({
|
|
13
|
-
name: "TModal",
|
|
14
|
-
__name: "Modal",
|
|
15
|
-
props: {
|
|
16
|
-
title: { default: "" },
|
|
17
|
-
canClose: { type: Boolean, default: !0 },
|
|
18
|
-
showHeader: { type: Boolean, default: !0 },
|
|
19
|
-
injectStyle: { default: () => ({ wrapper: "", body: "", container: "" }) },
|
|
20
|
-
hasBackdrop: { type: Boolean, default: !0 },
|
|
21
|
-
disableStyle: { type: Boolean, default: !1 }
|
|
22
|
-
},
|
|
23
|
-
emits: ["closed"],
|
|
24
|
-
setup(u, { emit: f }) {
|
|
25
|
-
const e = u, p = f, c = b(null), r = (t) => {
|
|
26
|
-
t.stopPropagation(), p("closed");
|
|
27
|
-
};
|
|
28
|
-
return h(() => {
|
|
29
|
-
c.value?.focus();
|
|
30
|
-
}), (t, x) => {
|
|
31
|
-
const m = k("t-button");
|
|
32
|
-
return o(), s("div", {
|
|
33
|
-
class: a(["fixed inset-0 focus-visible:outline-hidden z-10", {
|
|
34
|
-
"flex items-center": !e.disableStyle,
|
|
35
|
-
[e.injectStyle.wrapper]: !0
|
|
36
|
-
}]),
|
|
37
|
-
tabindex: "-1",
|
|
38
|
-
ref_key: "modal",
|
|
39
|
-
ref: c,
|
|
40
|
-
onKeyup: _(r, ["esc"])
|
|
41
|
-
}, [
|
|
42
|
-
e.hasBackdrop ? (o(), i(w, {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: "z-10",
|
|
45
|
-
onClick: r
|
|
46
|
-
})) : l("", !0),
|
|
47
|
-
d("div", {
|
|
48
|
-
class: a(["z-10 w-full md:w-[36rem] mx-auto", {
|
|
49
|
-
"relative floatable": !e.disableStyle,
|
|
50
|
-
[e.injectStyle.container]: !0
|
|
51
|
-
}])
|
|
52
|
-
}, [
|
|
53
|
-
e.canClose ? (o(), i(m, {
|
|
54
|
-
key: 0,
|
|
55
|
-
variant: "transparent",
|
|
56
|
-
icon: "close",
|
|
57
|
-
size: "",
|
|
58
|
-
class: "absolute justify-center top-0 right-0 h-14 w-14",
|
|
59
|
-
onClick: r
|
|
60
|
-
})) : l("", !0),
|
|
61
|
-
e.showHeader ? (o(), s("div", B, [
|
|
62
|
-
e.title ? (o(), s("span", C, v(e.title), 1)) : l("", !0),
|
|
63
|
-
t.$slots.header ? n(t.$slots, "header", { key: 1 }) : l("", !0)
|
|
64
|
-
])) : l("", !0),
|
|
65
|
-
d("div", {
|
|
66
|
-
class: a(["flex flex-col flex-1 overflow-y-auto scrollbar", {
|
|
67
|
-
[e.injectStyle.body]: !0
|
|
68
|
-
}]),
|
|
69
|
-
style: { "max-height": "80vh" }
|
|
70
|
-
}, [
|
|
71
|
-
n(t.$slots, "default")
|
|
72
|
-
], 2),
|
|
73
|
-
t.$slots.footer ? (o(), s("div", S, [
|
|
74
|
-
n(t.$slots, "footer")
|
|
75
|
-
])) : l("", !0)
|
|
76
|
-
], 2)
|
|
77
|
-
], 34);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
export {
|
|
82
|
-
z as _
|
|
83
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ref as f } from "vue";
|
|
2
|
-
const n = f([]);
|
|
3
|
-
function u() {
|
|
4
|
-
return {
|
|
5
|
-
alerts: n,
|
|
6
|
-
alert: (e) => {
|
|
7
|
-
const t = Date.now().toString(), s = () => {
|
|
8
|
-
const l = n.value.findIndex((r) => r.id === t);
|
|
9
|
-
l !== -1 && n.value.splice(l, 1);
|
|
10
|
-
}, i = {
|
|
11
|
-
onClose: () => {
|
|
12
|
-
e?.onClose && e.onClose(), s();
|
|
13
|
-
},
|
|
14
|
-
onConfirm: () => {
|
|
15
|
-
e?.onConfirm && e.onConfirm(), s();
|
|
16
|
-
}
|
|
17
|
-
}, o = { ...e };
|
|
18
|
-
delete o?.onClose, delete o?.onConfirm, n.value.push({
|
|
19
|
-
id: t,
|
|
20
|
-
events: i,
|
|
21
|
-
options: o
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
u
|
|
28
|
-
};
|