@caipira/tamandua 0.0.33 → 0.0.35
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/Form.js +2 -2
- package/dist/Form.vue_vue_type_script_setup_true_lang-O6nqLPyU.js +205 -0
- package/dist/InputSelect.js +2 -2
- package/dist/{InputSelect.vue_vue_type_script_setup_true_lang-BlA3DIYZ.js → InputSelect.vue_vue_type_script_setup_true_lang-vCtwK795.js} +4 -1
- package/dist/ModalForm.js +2 -2
- package/dist/{ModalForm.vue_vue_type_script_setup_true_lang-BSEORivR.js → ModalForm.vue_vue_type_script_setup_true_lang-Da80UtoI.js} +34 -32
- package/dist/components.js +3 -3
- package/dist/{crud-lKm5HfM4.js → crud-TcRx_r8S.js} +4 -4
- package/dist/form2.js +1 -1
- package/dist/{plugin-DF8iyfN5.js → plugin-BkoyYU7S.js} +1 -1
- package/dist/{plugin-C3jERS0X.js → plugin-BqzDqLcd.js} +1 -1
- package/dist/{plugin-Daf_swsz.js → plugin-cVdTR_s6.js} +1 -1
- package/dist/{plugins-BA8tojIo.js → plugins-MQbI25Au.js} +5 -5
- package/dist/plugins.js +5 -5
- package/dist/tamandua.js +1 -1
- package/dist/types/components/Dropdown/types.d.ts +3 -3
- package/dist/types/components/Form/Form.vue.d.ts +42 -24
- package/dist/types/components/Form/types.d.ts +8 -4
- package/dist/types/components/InputPassword/InputPassword.vue.d.ts +1 -1
- package/dist/types/components/InputPassword/index.d.ts +1 -1
- package/dist/types/components/InputPassword/types.d.ts +10 -2
- package/dist/types/components/InputPrice/InputPrice.vue.d.ts +19 -3
- package/dist/types/components/InputPrice/index.d.ts +1 -1
- package/dist/types/components/InputPrice/types.d.ts +4 -0
- package/dist/types/components/InputSelect/InputSelect.story.d.ts +3 -3
- package/dist/types/components/InputSelect/InputSelect.vue.d.ts +69 -2
- package/dist/types/components/InputSelect/index.d.ts +1 -1
- package/dist/types/components/InputSelect/types.d.ts +38 -7
- package/dist/types/components/ModalForm/ModalForm.vue.d.ts +6 -1
- package/dist/types/components/ModalForm/types.d.ts +7 -5
- package/dist/types/components/index.d.ts +4 -4
- package/dist/types/composables/useForm.d.ts +20 -0
- package/dist/types/form/crud.d.ts +4 -3
- package/dist/types/form/form-transformer.d.ts +2 -2
- package/dist/types/form/form-transformer.test.d.ts +1 -0
- package/dist/types/form/form-value-transformers.d.ts +2 -1
- package/dist/types/types/address.d.ts +8 -8
- package/dist/types/types/common.d.ts +1 -0
- package/dist/types/types/form.d.ts +14 -59
- package/package.json +8 -5
- package/dist/Form.vue_vue_type_script_setup_true_lang-CbuLc6sr.js +0 -186
- /package/dist/types/{form/form.test.d.ts → composables/useForm.test.d.ts} +0 -0
package/dist/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as a } from "./plugin-
|
|
1
|
+
import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-O6nqLPyU.js";
|
|
2
|
+
import { p as a } from "./plugin-BkoyYU7S.js";
|
|
3
3
|
export {
|
|
4
4
|
m as Form,
|
|
5
5
|
a as FormPlugin
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { reactive as C, defineComponent as A, ref as y, watch as P, provide as _, resolveComponent as T, openBlock as N, createElementBlock as O, renderSlot as B, unref as J, createElementVNode as E, normalizeClass as R, withDirectives as W, createVNode as j, mergeProps as K, vShow as M } from "vue";
|
|
2
|
+
import { B as z } from "./ui-BC6H9E93.js";
|
|
3
|
+
import { F as s, a as p } from "./form-BkXpIJ0e.js";
|
|
4
|
+
import { f as L } from "./index-CjvqeRf7.js";
|
|
5
|
+
const w = (t) => t ? L(t, "yyyy-MM-dd") : "", F = (t) => [`${t?.iso}`, `${t?.value}`], h = (t) => t?.iso2 ?? "", S = async (t) => t?.hash ? t.hash : t?.raw ?? "", i = {
|
|
6
|
+
default: (t, e, r) => (e[r] = t, e),
|
|
7
|
+
price: (t, e, r, n = ["Currency", "Value"]) => {
|
|
8
|
+
const [u, a] = F(t);
|
|
9
|
+
return e[`${r}${n[0]}`] = u, e[`${r}${n[1]}`] = a, e;
|
|
10
|
+
},
|
|
11
|
+
password: async (t, e, r) => (e[r] = await S(t), e),
|
|
12
|
+
stringArray: (t, e, r) => (e[r] = t, e)
|
|
13
|
+
}, I = async (t, e, r, n) => {
|
|
14
|
+
switch (t) {
|
|
15
|
+
case s.Country:
|
|
16
|
+
return i.default(
|
|
17
|
+
h(r),
|
|
18
|
+
e,
|
|
19
|
+
n
|
|
20
|
+
);
|
|
21
|
+
case s.Documents:
|
|
22
|
+
return i.default(r, e, n);
|
|
23
|
+
case s.Date:
|
|
24
|
+
return i.default(
|
|
25
|
+
w(r),
|
|
26
|
+
e,
|
|
27
|
+
n
|
|
28
|
+
);
|
|
29
|
+
case s.Address:
|
|
30
|
+
return i.default(r, e, n);
|
|
31
|
+
case s.Price:
|
|
32
|
+
return i.price(r, e, n);
|
|
33
|
+
case s.Password:
|
|
34
|
+
return await i.password(r, e, n);
|
|
35
|
+
case s.StringArray:
|
|
36
|
+
return i.stringArray(r, e, n);
|
|
37
|
+
default:
|
|
38
|
+
return i.default(r, e, n);
|
|
39
|
+
}
|
|
40
|
+
}, f = (t) => (t == null ? t = "" : typeof t == "object" ? t = JSON.stringify(t) : typeof t == "number" ? t = t.toString() : typeof t == "boolean" && (t = t ? "1" : "0"), t), c = {
|
|
41
|
+
default: (t, e, r) => {
|
|
42
|
+
const n = f(t);
|
|
43
|
+
return t && e.append(r, n), e;
|
|
44
|
+
},
|
|
45
|
+
price: (t, e, r, n = ["Currency", "Value"]) => {
|
|
46
|
+
const [u, a] = F(t);
|
|
47
|
+
return e.append(`${r}${n[0]}`, f(u)), e.append(`${r}${n[1]}`, f(a)), e;
|
|
48
|
+
},
|
|
49
|
+
address: (t, e, r) => (e.append(
|
|
50
|
+
r,
|
|
51
|
+
JSON.stringify({
|
|
52
|
+
...t,
|
|
53
|
+
country: h(t?.country)
|
|
54
|
+
})
|
|
55
|
+
), e),
|
|
56
|
+
documents: (t, e, r) => (r.endsWith("[]") || (r = `${r}[]`), Array.from(t).forEach((n) => e.append(r, n)), e),
|
|
57
|
+
document: (t, e, r) => (e.append(r, t), e),
|
|
58
|
+
stringArray: (t, e, r) => (r.endsWith("[]") || (r = `${r}[]`), t.forEach((n) => e.append(r, f(n))), e)
|
|
59
|
+
}, Y = async (t, e, r, n) => {
|
|
60
|
+
switch (t) {
|
|
61
|
+
case s.Country:
|
|
62
|
+
return c.default(
|
|
63
|
+
h(r),
|
|
64
|
+
e,
|
|
65
|
+
n
|
|
66
|
+
);
|
|
67
|
+
case s.Document:
|
|
68
|
+
return c.document(r, e, n);
|
|
69
|
+
case s.Documents:
|
|
70
|
+
return c.documents(r, e, n);
|
|
71
|
+
case s.Date:
|
|
72
|
+
return c.default(
|
|
73
|
+
w(r),
|
|
74
|
+
e,
|
|
75
|
+
n
|
|
76
|
+
);
|
|
77
|
+
case s.Address:
|
|
78
|
+
return c.address(r, e, n);
|
|
79
|
+
case s.Price:
|
|
80
|
+
return c.price(r, e, n);
|
|
81
|
+
case s.Password:
|
|
82
|
+
return c.default(
|
|
83
|
+
await S(r),
|
|
84
|
+
e,
|
|
85
|
+
n
|
|
86
|
+
);
|
|
87
|
+
case s.StringArray:
|
|
88
|
+
return c.stringArray(r, e, n);
|
|
89
|
+
default:
|
|
90
|
+
return c.default(r, e, n);
|
|
91
|
+
}
|
|
92
|
+
}, q = async (t, e, r) => {
|
|
93
|
+
switch (r) {
|
|
94
|
+
case p.JSON:
|
|
95
|
+
let n = {};
|
|
96
|
+
for (const a in t)
|
|
97
|
+
n = await I(
|
|
98
|
+
e[a],
|
|
99
|
+
n,
|
|
100
|
+
t[a],
|
|
101
|
+
a
|
|
102
|
+
);
|
|
103
|
+
return n;
|
|
104
|
+
case p.FormData:
|
|
105
|
+
default:
|
|
106
|
+
let u = new FormData();
|
|
107
|
+
for (const a in t)
|
|
108
|
+
u = await Y(
|
|
109
|
+
e[a],
|
|
110
|
+
u,
|
|
111
|
+
t[a],
|
|
112
|
+
a
|
|
113
|
+
);
|
|
114
|
+
return u;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
function x(t) {
|
|
118
|
+
const e = C(
|
|
119
|
+
{}
|
|
120
|
+
);
|
|
121
|
+
return { form: e, setValue: (o, d) => {
|
|
122
|
+
e[o] = d;
|
|
123
|
+
}, setValues: (o) => {
|
|
124
|
+
for (const [d, b] of Object.entries(o))
|
|
125
|
+
e[d] = b;
|
|
126
|
+
}, getValue: (o) => e[o], reset: () => {
|
|
127
|
+
for (const o in e)
|
|
128
|
+
delete e[o];
|
|
129
|
+
}, submit: async () => {
|
|
130
|
+
const o = {
|
|
131
|
+
...e
|
|
132
|
+
};
|
|
133
|
+
return t?.id?.value && (o.id = t.id.value), {
|
|
134
|
+
isValid: !0,
|
|
135
|
+
form: await q(
|
|
136
|
+
o,
|
|
137
|
+
t.schema,
|
|
138
|
+
t.format ?? p.JSON
|
|
139
|
+
)
|
|
140
|
+
};
|
|
141
|
+
} };
|
|
142
|
+
}
|
|
143
|
+
const Z = /* @__PURE__ */ A({
|
|
144
|
+
name: "TForm",
|
|
145
|
+
__name: "Form",
|
|
146
|
+
props: {
|
|
147
|
+
id: { default: "" },
|
|
148
|
+
idKey: { default: "id" },
|
|
149
|
+
schema: { default: () => ({}) },
|
|
150
|
+
formStyle: { default: () => ({}) },
|
|
151
|
+
showSubmit: { type: Boolean, default: !1 },
|
|
152
|
+
submitLabel: { default: "Submit" },
|
|
153
|
+
buttonProps: {},
|
|
154
|
+
buttonVariant: { default: z.PRIMARY },
|
|
155
|
+
submissionFormat: { default: p.FormData },
|
|
156
|
+
buttonWrapperClasses: { default: "" }
|
|
157
|
+
},
|
|
158
|
+
emits: ["submit", "change"],
|
|
159
|
+
setup(t, { expose: e, emit: r }) {
|
|
160
|
+
const n = t, u = r, a = y(), { form: l, getValue: o, setValue: d, setValues: b, reset: g, submit: $ } = x({
|
|
161
|
+
id: y(n.id),
|
|
162
|
+
idKey: n.idKey,
|
|
163
|
+
schema: n.schema,
|
|
164
|
+
format: n.submissionFormat
|
|
165
|
+
}), V = async () => {
|
|
166
|
+
const m = await $();
|
|
167
|
+
return u("submit", m), m;
|
|
168
|
+
};
|
|
169
|
+
return P(l, (m) => {
|
|
170
|
+
u("change", m);
|
|
171
|
+
}), _("formStyle", n.formStyle), e({
|
|
172
|
+
submit: V,
|
|
173
|
+
reset: g,
|
|
174
|
+
setValues: b,
|
|
175
|
+
form: l,
|
|
176
|
+
setValue: d,
|
|
177
|
+
getValue: o
|
|
178
|
+
}), (m, G) => {
|
|
179
|
+
const D = T("t-button");
|
|
180
|
+
return N(), O("form", {
|
|
181
|
+
onSubmit: V,
|
|
182
|
+
ref_key: "formReference",
|
|
183
|
+
ref: a
|
|
184
|
+
}, [
|
|
185
|
+
B(m.$slots, "default", { form: J(l) }),
|
|
186
|
+
E("div", {
|
|
187
|
+
class: R([n.buttonWrapperClasses])
|
|
188
|
+
}, [
|
|
189
|
+
W(j(D, K(n.buttonProps, {
|
|
190
|
+
type: "submit",
|
|
191
|
+
class: "mt-4",
|
|
192
|
+
variant: n.buttonVariant,
|
|
193
|
+
label: n.submitLabel,
|
|
194
|
+
onClick: V
|
|
195
|
+
}), null, 16, ["variant", "label"]), [
|
|
196
|
+
[M, n.showSubmit]
|
|
197
|
+
])
|
|
198
|
+
], 2)
|
|
199
|
+
], 544);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
export {
|
|
204
|
+
Z as _
|
|
205
|
+
};
|
package/dist/InputSelect.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as r } from "./plugin-
|
|
1
|
+
import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-vCtwK795.js";
|
|
2
|
+
import { p as r } from "./plugin-cVdTR_s6.js";
|
|
3
3
|
export {
|
|
4
4
|
p as InputSelect,
|
|
5
5
|
r as InputSelectPlugin
|
|
@@ -12,7 +12,10 @@ const ce = ["placeholder", "disabled", "readonly"], de = { key: 1 }, fe = {
|
|
|
12
12
|
props: {
|
|
13
13
|
size: { default: re.Default },
|
|
14
14
|
options: { default: () => [] },
|
|
15
|
-
mapper: { type: Function, default: (f) => ({
|
|
15
|
+
mapper: { type: Function, default: (f) => ({
|
|
16
|
+
value: f.id ?? f.uuid,
|
|
17
|
+
label: f
|
|
18
|
+
}) },
|
|
16
19
|
filter: { type: Function, default: (f, T) => T.label.toLowerCase().indexOf(f.toLowerCase()) >= 0 },
|
|
17
20
|
tooltip: { default: "" },
|
|
18
21
|
disabled: { type: Boolean },
|
package/dist/ModalForm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as a } from "./ModalForm.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as l } from "./plugin-
|
|
1
|
+
import { _ as a } from "./ModalForm.vue_vue_type_script_setup_true_lang-Da80UtoI.js";
|
|
2
|
+
import { p as l } from "./plugin-BqzDqLcd.js";
|
|
3
3
|
export {
|
|
4
4
|
a as ModalForm,
|
|
5
5
|
l as ModalFormPlugin
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { C as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as M, ref as c, computed as N, resolveComponent as o, openBlock as n, createBlock as a, withCtx as l, createCommentVNode as d, createElementBlock as R, createVNode as m, normalizeClass as b, resolveDynamicComponent as $ } from "vue";
|
|
2
|
+
import { C as A } from "./crud-TcRx_r8S.js";
|
|
3
|
+
const I = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "inline-flex"
|
|
6
|
-
},
|
|
6
|
+
}, U = /* @__PURE__ */ M({
|
|
7
7
|
name: "TModalForm",
|
|
8
8
|
__name: "ModalForm",
|
|
9
9
|
props: {
|
|
@@ -13,41 +13,43 @@ const $ = {
|
|
|
13
13
|
},
|
|
14
14
|
emits: ["saved", "closed"],
|
|
15
15
|
setup(y, { expose: C, emit: k }) {
|
|
16
|
-
const i = y,
|
|
17
|
-
|
|
16
|
+
const i = y, v = k, e = c(), p = c(!1), f = c(""), r = c(), s = N(() => i.forms.find((u) => u.key === f.value)), g = (u, t) => {
|
|
17
|
+
f.value = u, e.value = new A(s.value?.title, r), t ? e.value?.edit(t) : e.value?.show();
|
|
18
18
|
}, w = () => {
|
|
19
|
-
e.value?.onSave(!
|
|
19
|
+
e.value?.onSave(!p.value), v("saved");
|
|
20
20
|
}, x = () => {
|
|
21
21
|
e.value?.delete();
|
|
22
|
-
}, S = () => {
|
|
23
|
-
|
|
22
|
+
}, S = async () => await r.value?.submit(), V = () => {
|
|
23
|
+
r.value?.reset();
|
|
24
|
+
}, D = () => {
|
|
25
|
+
e.value?.close(), v("closed");
|
|
24
26
|
};
|
|
25
|
-
return C({ open: g, delete: x }), (
|
|
26
|
-
const
|
|
27
|
-
return e.value?.visible ? (
|
|
27
|
+
return C({ open: g, delete: x, submit: S, reset: V }), (u, t) => {
|
|
28
|
+
const E = o("t-input-switch"), B = o("t-icon"), h = o("t-dropdown"), z = o("t-popover"), _ = o("t-button"), F = o("t-popconfirm"), K = o("t-modal");
|
|
29
|
+
return e.value?.visible ? (n(), a(K, {
|
|
28
30
|
key: 0,
|
|
29
31
|
title: e.value?.title,
|
|
30
|
-
onClosed:
|
|
32
|
+
onClosed: D
|
|
31
33
|
}, {
|
|
32
|
-
header:
|
|
33
|
-
s.value?.pinnable && !e.value?.isEditing ? (
|
|
34
|
+
header: l(() => [
|
|
35
|
+
s.value?.pinnable && !e.value?.isEditing ? (n(), a(E, {
|
|
34
36
|
key: 0,
|
|
35
|
-
modelValue:
|
|
36
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
37
|
+
modelValue: p.value,
|
|
38
|
+
"onUpdate:modelValue": t[0] || (t[0] = (L) => p.value = L),
|
|
37
39
|
label: "Keep open",
|
|
38
40
|
class: "mt-4"
|
|
39
41
|
}, null, 8, ["modelValue"])) : d("", !0)
|
|
40
42
|
]),
|
|
41
|
-
footer:
|
|
42
|
-
i.options.length ? (
|
|
43
|
-
|
|
44
|
-
content:
|
|
45
|
-
|
|
43
|
+
footer: l(() => [
|
|
44
|
+
i.options.length ? (n(), R("div", I, [
|
|
45
|
+
m(z, { placement: "bottom-start" }, {
|
|
46
|
+
content: l(() => [
|
|
47
|
+
m(h, {
|
|
46
48
|
items: i.options
|
|
47
49
|
}, null, 8, ["items"])
|
|
48
50
|
]),
|
|
49
|
-
default:
|
|
50
|
-
|
|
51
|
+
default: l(() => [
|
|
52
|
+
m(B, {
|
|
51
53
|
icon: "dots-vertical",
|
|
52
54
|
class: "text-lg mr-6",
|
|
53
55
|
size: "sm",
|
|
@@ -57,13 +59,13 @@ const $ = {
|
|
|
57
59
|
]),
|
|
58
60
|
_: 1
|
|
59
61
|
})
|
|
60
|
-
])) : (
|
|
62
|
+
])) : (n(), a(F, {
|
|
61
63
|
key: 1,
|
|
62
64
|
message: `Are you sure you want to delete this ${s.value?.title}?`,
|
|
63
65
|
onConfirm: t[2] || (t[2] = () => e.value?.delete())
|
|
64
66
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
e.value?.isEditing ? (
|
|
67
|
+
default: l(() => [
|
|
68
|
+
e.value?.isEditing ? (n(), a(_, {
|
|
67
69
|
key: 0,
|
|
68
70
|
variant: "danger",
|
|
69
71
|
icon: "trash-can-outline",
|
|
@@ -74,7 +76,7 @@ const $ = {
|
|
|
74
76
|
]),
|
|
75
77
|
_: 1
|
|
76
78
|
}, 8, ["message"])),
|
|
77
|
-
|
|
79
|
+
m(_, {
|
|
78
80
|
variant: "success",
|
|
79
81
|
icon: "save",
|
|
80
82
|
label: "Save",
|
|
@@ -85,13 +87,13 @@ const $ = {
|
|
|
85
87
|
onClick: t[3] || (t[3] = () => e.value?.save())
|
|
86
88
|
}, null, 8, ["is-disabled", "class"])
|
|
87
89
|
]),
|
|
88
|
-
default:
|
|
89
|
-
s.value ? (
|
|
90
|
+
default: l(() => [
|
|
91
|
+
s.value ? (n(), a($(s.value.component), {
|
|
90
92
|
key: 0,
|
|
91
93
|
id: `${e.value?.id}`,
|
|
92
94
|
class: b([i.formClass]),
|
|
93
95
|
ref_key: "formReference",
|
|
94
|
-
ref:
|
|
96
|
+
ref: r,
|
|
95
97
|
onDeleted: t[1] || (t[1] = () => e.value?.onDelete()),
|
|
96
98
|
onSaved: w
|
|
97
99
|
}, null, 40, ["id", "class"])) : d("", !0)
|
|
@@ -102,5 +104,5 @@ const $ = {
|
|
|
102
104
|
}
|
|
103
105
|
});
|
|
104
106
|
export {
|
|
105
|
-
|
|
107
|
+
U as _
|
|
106
108
|
};
|
package/dist/components.js
CHANGED
|
@@ -6,7 +6,7 @@ import { _ as n } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-DzIPu
|
|
|
6
6
|
import { D as u } from "./Drawer-omdZnBPG.js";
|
|
7
7
|
import { _ as l } from "./Dropdown.vue_vue_type_script_setup_true_lang-pjG__bX2.js";
|
|
8
8
|
import { _ as h } from "./FileDrop.vue_vue_type_script_setup_true_lang-DLEH_LLX.js";
|
|
9
|
-
import { _ as T } from "./Form.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as T } from "./Form.vue_vue_type_script_setup_true_lang-O6nqLPyU.js";
|
|
10
10
|
import { _ as y } from "./FormItem.vue_vue_type_script_setup_true_lang-CjW-P8Xf.js";
|
|
11
11
|
import { _ as C } from "./GraphyEmpty.vue_vue_type_script_setup_true_lang-B-hAjDCw.js";
|
|
12
12
|
import { _ as G } from "./GraphyLabel.vue_vue_type_script_setup_true_lang-n_0200p7.js";
|
|
@@ -24,13 +24,13 @@ import { _ as U } from "./InputPhone.vue_vue_type_script_setup_true_lang-B4TULqL
|
|
|
24
24
|
import { _ as W } from "./InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js";
|
|
25
25
|
import { _ as Y } from "./InputRadio.vue_vue_type_script_setup_true_lang-Cu7lzDAh.js";
|
|
26
26
|
import "vue";
|
|
27
|
-
import { _ as $ } from "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
27
|
+
import { _ as $ } from "./InputSelect.vue_vue_type_script_setup_true_lang-vCtwK795.js";
|
|
28
28
|
import { _ as or } from "./InputSwitch.vue_vue_type_script_setup_true_lang-Dq_U-mFJ.js";
|
|
29
29
|
import { _ as er } from "./InputText.vue_vue_type_script_setup_true_lang-Dyvx9Ob-.js";
|
|
30
30
|
import { _ as pr } from "./InputTextarea.vue_vue_type_script_setup_true_lang-DRo5eIw4.js";
|
|
31
31
|
import { _ as sr } from "./Link.vue_vue_type_script_setup_true_lang-DeBJ2UGi.js";
|
|
32
32
|
import { _ as fr } from "./Modal.vue_vue_type_script_setup_true_lang-DLl5shGS.js";
|
|
33
|
-
import { _ as nr } from "./ModalForm.vue_vue_type_script_setup_true_lang-
|
|
33
|
+
import { _ as nr } from "./ModalForm.vue_vue_type_script_setup_true_lang-Da80UtoI.js";
|
|
34
34
|
import { _ as ur } from "./Pagination.vue_vue_type_script_setup_true_lang-PLZQJUd0.js";
|
|
35
35
|
import { _ as lr } from "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
|
|
36
36
|
import { _ as hr } from "./Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js";
|
|
@@ -9,7 +9,7 @@ class h {
|
|
|
9
9
|
EDIT: "Edit "
|
|
10
10
|
};
|
|
11
11
|
isLoading = !1;
|
|
12
|
-
formReference
|
|
12
|
+
formReference;
|
|
13
13
|
constructor(e, s) {
|
|
14
14
|
this.titles.ADD = this.titles.ADD + e, this.titles.EDIT = this.titles.EDIT + e, this.formReference = s;
|
|
15
15
|
}
|
|
@@ -42,14 +42,14 @@ class h {
|
|
|
42
42
|
reset() {
|
|
43
43
|
this.id = "", this.formReference && this.formReference.reset && this.formReference?.reset(), this.isLoading && (this.isLoading = !1);
|
|
44
44
|
}
|
|
45
|
-
save() {
|
|
46
|
-
this.formReference && (this.isLoading = !0, this.formReference.submit());
|
|
45
|
+
async save() {
|
|
46
|
+
this.formReference && (this.isLoading = !0, await this.formReference.submit());
|
|
47
47
|
}
|
|
48
48
|
onSave(e = !0) {
|
|
49
49
|
e && this.close(), this.reset();
|
|
50
50
|
}
|
|
51
51
|
delete() {
|
|
52
|
-
this.formReference && (this.isLoading = !0, this.formReference.
|
|
52
|
+
this.formReference && (this.isLoading = !0, this.formReference.delete());
|
|
53
53
|
}
|
|
54
54
|
onDelete(e = !0) {
|
|
55
55
|
e && this.close(), this.reset();
|
package/dist/form2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r } from "./register-component-B-fdqewb.js";
|
|
2
|
-
import { _ as s } from "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as s } from "./InputSelect.vue_vue_type_script_setup_true_lang-vCtwK795.js";
|
|
3
3
|
const m = {
|
|
4
4
|
install(o) {
|
|
5
5
|
r(o, s);
|
|
@@ -12,8 +12,8 @@ import "./Drawer-omdZnBPG.js";
|
|
|
12
12
|
import { p as m } from "./plugin-DRcJuXpS.js";
|
|
13
13
|
import { p as u } from "./plugin-CNqL90UL.js";
|
|
14
14
|
import { p as l } from "./plugin-BscWXR9h.js";
|
|
15
|
-
import "./Form.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { p as t } from "./plugin-
|
|
15
|
+
import "./Form.vue_vue_type_script_setup_true_lang-O6nqLPyU.js";
|
|
16
|
+
import { p as t } from "./plugin-BkoyYU7S.js";
|
|
17
17
|
import { p as g } from "./plugin-DLFPglIt.js";
|
|
18
18
|
import { p as a } from "./plugin-Buc7eEox.js";
|
|
19
19
|
import { p as s } from "./plugin-D9k93Uu1.js";
|
|
@@ -32,15 +32,15 @@ import { p as y } from "./plugin-BN2jubTY.js";
|
|
|
32
32
|
import { p as T } from "./plugin-CrHDShgh.js";
|
|
33
33
|
import { p as S } from "./plugin-z8Hr_T_O.js";
|
|
34
34
|
import { p as v } from "./plugin-Bog7k3Qf.js";
|
|
35
|
-
import "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
36
|
-
import { p as C } from "./plugin-
|
|
35
|
+
import "./InputSelect.vue_vue_type_script_setup_true_lang-vCtwK795.js";
|
|
36
|
+
import { p as C } from "./plugin-cVdTR_s6.js";
|
|
37
37
|
import { p as G } from "./plugin-DT7LVAli.js";
|
|
38
38
|
import { p as k } from "./plugin-Bbt6pP0l.js";
|
|
39
39
|
import { p as w } from "./plugin-BQFwx3d5.js";
|
|
40
40
|
import "./Link.vue_vue_type_script_setup_true_lang-DeBJ2UGi.js";
|
|
41
41
|
import { p as x } from "./plugin-dL6oP11N.js";
|
|
42
42
|
import { p as D } from "./plugin-BZC231Oj.js";
|
|
43
|
-
import { p as F } from "./plugin-
|
|
43
|
+
import { p as F } from "./plugin-BqzDqLcd.js";
|
|
44
44
|
import { p as L } from "./plugin-YUomn9tF.js";
|
|
45
45
|
import "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
|
|
46
46
|
import { p as M } from "./plugin-Ee4Z5Rtp.js";
|
package/dist/plugins.js
CHANGED
|
@@ -12,8 +12,8 @@ import "./Drawer-omdZnBPG.js";
|
|
|
12
12
|
import { p as D } from "./plugin-DRcJuXpS.js";
|
|
13
13
|
import { p as L } from "./plugin-CNqL90UL.js";
|
|
14
14
|
import { p as A } from "./plugin-BscWXR9h.js";
|
|
15
|
-
import "./Form.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { p as E } from "./plugin-
|
|
15
|
+
import "./Form.vue_vue_type_script_setup_true_lang-O6nqLPyU.js";
|
|
16
|
+
import { p as E } from "./plugin-BkoyYU7S.js";
|
|
17
17
|
import { p as j } from "./plugin-DLFPglIt.js";
|
|
18
18
|
import { p as z } from "./plugin-Buc7eEox.js";
|
|
19
19
|
import { p as J } from "./plugin-D9k93Uu1.js";
|
|
@@ -32,15 +32,15 @@ import { p as nr } from "./plugin-BN2jubTY.js";
|
|
|
32
32
|
import { p as ur } from "./plugin-CrHDShgh.js";
|
|
33
33
|
import { p as Pr } from "./plugin-z8Hr_T_O.js";
|
|
34
34
|
import { p as gr } from "./plugin-Bog7k3Qf.js";
|
|
35
|
-
import "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
36
|
-
import { p as fr } from "./plugin-
|
|
35
|
+
import "./InputSelect.vue_vue_type_script_setup_true_lang-vCtwK795.js";
|
|
36
|
+
import { p as fr } from "./plugin-cVdTR_s6.js";
|
|
37
37
|
import { p as hr } from "./plugin-DT7LVAli.js";
|
|
38
38
|
import { p as Tr } from "./plugin-Bbt6pP0l.js";
|
|
39
39
|
import { p as yr } from "./plugin-BQFwx3d5.js";
|
|
40
40
|
import "./Link.vue_vue_type_script_setup_true_lang-DeBJ2UGi.js";
|
|
41
41
|
import { p as Cr } from "./plugin-dL6oP11N.js";
|
|
42
42
|
import { p as Sr } from "./plugin-BZC231Oj.js";
|
|
43
|
-
import { p as vr } from "./plugin-
|
|
43
|
+
import { p as vr } from "./plugin-BqzDqLcd.js";
|
|
44
44
|
import { p as Dr } from "./plugin-YUomn9tF.js";
|
|
45
45
|
import "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
|
|
46
46
|
import { p as Lr } from "./plugin-Ee4Z5Rtp.js";
|
package/dist/tamandua.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getCurrentInstance } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { InputSelectOption } from '../InputSelect/types.js';
|
|
3
3
|
|
|
4
4
|
export type DropdownProps = {
|
|
5
|
-
items?:
|
|
5
|
+
items?: InputSelectOption[];
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
multiple?: boolean;
|
|
8
8
|
isVisible?: boolean;
|
|
@@ -14,7 +14,7 @@ export type DropdownProps = {
|
|
|
14
14
|
};
|
|
15
15
|
interface SelectEvent {
|
|
16
16
|
index: number;
|
|
17
|
-
option:
|
|
17
|
+
option: InputSelectOption;
|
|
18
18
|
hold: boolean;
|
|
19
19
|
}
|
|
20
20
|
export type DropdownEvents = {
|