@caipira/tamandua 0.0.40 → 0.0.42
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-CaCu47jH.js +217 -0
- package/dist/Link.js +2 -2
- package/dist/Link.vue_vue_type_script_setup_true_lang-C6zadagH.js +50 -0
- package/dist/{ProgressLine-CY6aDj-H.js → ProgressLine-bKh0terH.js} +9 -9
- package/dist/ProgressLine.css +1 -1
- package/dist/ProgressLine.js +2 -2
- package/dist/Tab.js +2 -2
- package/dist/{Tab.vue_vue_type_script_setup_true_lang-VzvYvoqa.js → Tab.vue_vue_type_script_setup_true_lang-Bk9igf63.js} +15 -15
- package/dist/components.js +4 -4
- package/dist/form2.js +15 -13
- package/dist/{plugin-5vn4G57V.js → plugin-BV-k02s1.js} +1 -1
- package/dist/{plugin-dL6oP11N.js → plugin-Dy-OWJTa.js} +1 -1
- package/dist/{plugin-Bk8QZgpY.js → plugin-VQZG4jD0.js} +1 -1
- package/dist/{plugin-BFAUI0U3.js → plugin-uMlQixCx.js} +1 -1
- package/dist/{plugins-B14K99ho.js → plugins-_YmkTecN.js} +7 -7
- package/dist/plugins.js +7 -7
- package/dist/tamandua.js +1 -1
- package/dist/transformers-DLw_G6c6.js +15 -0
- package/dist/types/components/ChartLine/ChartLine.vue.d.ts +32 -2
- package/dist/types/components/ProgressLine/ProgressLine.vue.d.ts +52 -2
- package/dist/types/components/SensitiveInfo/SensitiveInfo.vue.d.ts +12 -3
- package/dist/types/components/Skeleton/Skeleton.vue.d.ts +7 -3
- package/dist/types/components/Tab/Tab.vue.d.ts +26 -3
- package/dist/types/components/Toast/Toast.vue.d.ts +16 -3
- package/dist/types/form/index.d.ts +3 -4
- package/dist/types/form/json-transformers.d.ts +4 -3
- package/dist/types/form/transformers.d.ts +9 -0
- package/dist/types/types/form.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Form.vue_vue_type_script_setup_true_lang-Cf0LqvyX.js +0 -203
- package/dist/Link.vue_vue_type_script_setup_true_lang-DeBJ2UGi.js +0 -50
- package/dist/types/form/form-value-transformers.d.ts +0 -9
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-CaCu47jH.js";
|
|
2
|
+
import { p as a } from "./plugin-uMlQixCx.js";
|
|
3
3
|
export {
|
|
4
4
|
m as Form,
|
|
5
5
|
a as FormPlugin
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { reactive as $, defineComponent as C, ref as _, computed as A, watch as N, provide as P, resolveComponent as O, openBlock as B, createElementBlock as J, renderSlot as E, unref as R, createElementVNode as T, normalizeClass as W, withDirectives as j, createVNode as z, mergeProps as L, vShow as I } from "vue";
|
|
2
|
+
import { B as M } from "./ui-BC6H9E93.js";
|
|
3
|
+
import { F as s, a as f } from "./form-BkXpIJ0e.js";
|
|
4
|
+
import { d as h, c as w, p as S, a as F } from "./transformers-DLw_G6c6.js";
|
|
5
|
+
const i = {
|
|
6
|
+
default: (e, t, r) => (t[r] = e, t),
|
|
7
|
+
price: (e, t, r, n = ["Currency", "Value"]) => {
|
|
8
|
+
const [c, a] = S(e);
|
|
9
|
+
return t[`${r}${n[0]}`] = c, t[`${r}${n[1]}`] = a, t;
|
|
10
|
+
},
|
|
11
|
+
password: async (e, t, r) => (t[r] = F(e), t)
|
|
12
|
+
}, Y = async (e, t, r, n) => {
|
|
13
|
+
switch (e) {
|
|
14
|
+
case s.Address:
|
|
15
|
+
return i.default(
|
|
16
|
+
r,
|
|
17
|
+
t,
|
|
18
|
+
n
|
|
19
|
+
);
|
|
20
|
+
case s.Boolean:
|
|
21
|
+
return i.default(
|
|
22
|
+
r,
|
|
23
|
+
t,
|
|
24
|
+
n
|
|
25
|
+
);
|
|
26
|
+
case s.Country:
|
|
27
|
+
return i.default(
|
|
28
|
+
w(r),
|
|
29
|
+
t,
|
|
30
|
+
n
|
|
31
|
+
);
|
|
32
|
+
case s.Date:
|
|
33
|
+
return i.default(
|
|
34
|
+
h(r),
|
|
35
|
+
t,
|
|
36
|
+
n
|
|
37
|
+
);
|
|
38
|
+
case s.Document:
|
|
39
|
+
case s.Documents:
|
|
40
|
+
throw new Error("Cannot append files to JSON!");
|
|
41
|
+
case s.Price:
|
|
42
|
+
return i.price(
|
|
43
|
+
r,
|
|
44
|
+
t,
|
|
45
|
+
n
|
|
46
|
+
);
|
|
47
|
+
case s.Password:
|
|
48
|
+
return await i.password(
|
|
49
|
+
r,
|
|
50
|
+
t,
|
|
51
|
+
n
|
|
52
|
+
);
|
|
53
|
+
case s.StringArray:
|
|
54
|
+
return i.default(
|
|
55
|
+
r,
|
|
56
|
+
t,
|
|
57
|
+
n
|
|
58
|
+
);
|
|
59
|
+
default:
|
|
60
|
+
return i.default(
|
|
61
|
+
r,
|
|
62
|
+
t,
|
|
63
|
+
n
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}, p = (e) => (e == null ? e = "" : typeof e == "object" ? e = JSON.stringify(e) : typeof e == "number" ? e = e.toString() : typeof e == "boolean" && (e = e ? "1" : "0"), e), u = {
|
|
67
|
+
default: (e, t, r) => {
|
|
68
|
+
const n = p(e);
|
|
69
|
+
return e && t.append(r, n), t;
|
|
70
|
+
},
|
|
71
|
+
price: (e, t, r, n = ["Currency", "Value"]) => {
|
|
72
|
+
const [c, a] = S(e);
|
|
73
|
+
return t.append(`${r}${n[0]}`, p(c)), t.append(`${r}${n[1]}`, p(a)), t;
|
|
74
|
+
},
|
|
75
|
+
address: (e, t, r) => (t.append(
|
|
76
|
+
r,
|
|
77
|
+
JSON.stringify({
|
|
78
|
+
...e,
|
|
79
|
+
country: w(e?.country)
|
|
80
|
+
})
|
|
81
|
+
), t),
|
|
82
|
+
documents: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), Array.from(e).forEach((n) => t.append(r, n)), t),
|
|
83
|
+
document: (e, t, r) => (t.append(r, e), t),
|
|
84
|
+
stringArray: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), e.forEach((n) => t.append(r, p(n))), t)
|
|
85
|
+
}, q = async (e, t, r, n) => {
|
|
86
|
+
switch (e) {
|
|
87
|
+
case s.Country:
|
|
88
|
+
return u.default(w(r), t, n);
|
|
89
|
+
case s.Document:
|
|
90
|
+
return u.document(r, t, n);
|
|
91
|
+
case s.Documents:
|
|
92
|
+
return u.documents(r, t, n);
|
|
93
|
+
case s.Date:
|
|
94
|
+
return u.default(h(r), t, n);
|
|
95
|
+
case s.Address:
|
|
96
|
+
return u.address(r, t, n);
|
|
97
|
+
case s.Price:
|
|
98
|
+
return u.price(r, t, n);
|
|
99
|
+
case s.Password:
|
|
100
|
+
return u.default(F(r), t, n);
|
|
101
|
+
case s.StringArray:
|
|
102
|
+
return u.stringArray(r, t, n);
|
|
103
|
+
default:
|
|
104
|
+
return u.default(r, t, n);
|
|
105
|
+
}
|
|
106
|
+
}, x = async (e, t, r) => {
|
|
107
|
+
switch (r) {
|
|
108
|
+
case f.JSON:
|
|
109
|
+
let n = {};
|
|
110
|
+
for (const a in e)
|
|
111
|
+
n = await Y(
|
|
112
|
+
t[a],
|
|
113
|
+
n,
|
|
114
|
+
e[a],
|
|
115
|
+
a
|
|
116
|
+
);
|
|
117
|
+
return n;
|
|
118
|
+
case f.FormData:
|
|
119
|
+
default:
|
|
120
|
+
let c = new FormData();
|
|
121
|
+
for (const a in e)
|
|
122
|
+
c = await q(
|
|
123
|
+
t[a],
|
|
124
|
+
c,
|
|
125
|
+
e[a],
|
|
126
|
+
a
|
|
127
|
+
);
|
|
128
|
+
return c;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
function G(e) {
|
|
132
|
+
const t = $(
|
|
133
|
+
{}
|
|
134
|
+
);
|
|
135
|
+
return { form: t, setValue: (o, d) => {
|
|
136
|
+
t[o] = d;
|
|
137
|
+
}, setValues: (o) => {
|
|
138
|
+
for (const [d, b] of Object.entries(o))
|
|
139
|
+
t[d] = b;
|
|
140
|
+
}, getValue: (o) => t[o], reset: () => {
|
|
141
|
+
for (const o in t)
|
|
142
|
+
delete t[o];
|
|
143
|
+
}, submit: async () => {
|
|
144
|
+
const o = {
|
|
145
|
+
...t
|
|
146
|
+
};
|
|
147
|
+
return e.id && e.id.value && (o.id = e.id.value), {
|
|
148
|
+
isValid: !0,
|
|
149
|
+
form: await x(
|
|
150
|
+
o,
|
|
151
|
+
e.schema,
|
|
152
|
+
e.format ?? f.JSON
|
|
153
|
+
)
|
|
154
|
+
};
|
|
155
|
+
} };
|
|
156
|
+
}
|
|
157
|
+
const Z = /* @__PURE__ */ C({
|
|
158
|
+
name: "TForm",
|
|
159
|
+
__name: "Form",
|
|
160
|
+
props: {
|
|
161
|
+
id: { default: "" },
|
|
162
|
+
schema: { default: () => ({}) },
|
|
163
|
+
formStyle: { default: () => ({}) },
|
|
164
|
+
showSubmit: { type: Boolean, default: !1 },
|
|
165
|
+
submitLabel: { default: "Submit" },
|
|
166
|
+
buttonProps: {},
|
|
167
|
+
buttonVariant: { default: M.PRIMARY },
|
|
168
|
+
submissionFormat: { default: f.FormData },
|
|
169
|
+
buttonWrapperClasses: { default: "" }
|
|
170
|
+
},
|
|
171
|
+
emits: ["submit", "change"],
|
|
172
|
+
setup(e, { expose: t, emit: r }) {
|
|
173
|
+
const n = e, c = r, a = _(), { form: m, getValue: o, setValue: d, setValues: b, reset: g, submit: D } = G({
|
|
174
|
+
id: A(() => n.id),
|
|
175
|
+
schema: n.schema,
|
|
176
|
+
format: n.submissionFormat
|
|
177
|
+
}), V = async () => {
|
|
178
|
+
const l = await D();
|
|
179
|
+
return c("submit", l), l;
|
|
180
|
+
};
|
|
181
|
+
return N(m, (l) => {
|
|
182
|
+
c("change", l);
|
|
183
|
+
}), P("formStyle", n.formStyle), t({
|
|
184
|
+
submit: V,
|
|
185
|
+
reset: g,
|
|
186
|
+
setValues: b,
|
|
187
|
+
form: m,
|
|
188
|
+
setValue: d,
|
|
189
|
+
getValue: o
|
|
190
|
+
}), (l, H) => {
|
|
191
|
+
const y = O("t-button");
|
|
192
|
+
return B(), J("form", {
|
|
193
|
+
onSubmit: V,
|
|
194
|
+
ref_key: "formReference",
|
|
195
|
+
ref: a
|
|
196
|
+
}, [
|
|
197
|
+
E(l.$slots, "default", { form: R(m) }),
|
|
198
|
+
T("div", {
|
|
199
|
+
class: W([n.buttonWrapperClasses])
|
|
200
|
+
}, [
|
|
201
|
+
j(z(y, L(n.buttonProps, {
|
|
202
|
+
type: "submit",
|
|
203
|
+
class: "mt-4",
|
|
204
|
+
variant: n.buttonVariant,
|
|
205
|
+
label: n.submitLabel,
|
|
206
|
+
onClick: V
|
|
207
|
+
}), null, 16, ["variant", "label"]), [
|
|
208
|
+
[I, n.showSubmit]
|
|
209
|
+
])
|
|
210
|
+
], 2)
|
|
211
|
+
], 544);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
export {
|
|
216
|
+
Z as _
|
|
217
|
+
};
|
package/dist/Link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as i } from "./Link.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p } from "./plugin-
|
|
1
|
+
import { _ as i } from "./Link.vue_vue_type_script_setup_true_lang-C6zadagH.js";
|
|
2
|
+
import { p } from "./plugin-Dy-OWJTa.js";
|
|
3
3
|
export {
|
|
4
4
|
i as Link,
|
|
5
5
|
p as LinkPlugin
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as c, computed as p, resolveComponent as a, openBlock as o, createBlock as r, resolveDynamicComponent as f, unref as l, withCtx as m, renderSlot as u, createElementBlock as _, Fragment as y, createTextVNode as k, toDisplayString as b, createCommentVNode as g } from "vue";
|
|
2
|
+
import { L as t } from "./ui-BC6H9E93.js";
|
|
3
|
+
const B = /* @__PURE__ */ c({
|
|
4
|
+
name: "TLink",
|
|
5
|
+
__name: "Link",
|
|
6
|
+
props: {
|
|
7
|
+
to: {},
|
|
8
|
+
href: {},
|
|
9
|
+
type: { default: t.Default },
|
|
10
|
+
label: { default: "" },
|
|
11
|
+
target: { default: "_self" },
|
|
12
|
+
disabled: { type: Boolean, default: !1 }
|
|
13
|
+
},
|
|
14
|
+
setup(i, { emit: h }) {
|
|
15
|
+
const e = i, s = p(() => {
|
|
16
|
+
switch (e.type) {
|
|
17
|
+
case t.Router:
|
|
18
|
+
return a("RouterLink");
|
|
19
|
+
default:
|
|
20
|
+
return "a";
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return (n, v) => {
|
|
24
|
+
const d = a("t-icon");
|
|
25
|
+
return o(), r(f(s.value), {
|
|
26
|
+
href: e.type === l(t).Default ? e.href : void 0,
|
|
27
|
+
to: e.type === l(t).Router ? e.to : void 0,
|
|
28
|
+
disabled: e.disabled,
|
|
29
|
+
target: e.target,
|
|
30
|
+
class: "color-caipira-primary-inverted underline font-bold inline-flex items-baseline"
|
|
31
|
+
}, {
|
|
32
|
+
default: m(() => [
|
|
33
|
+
n.$slots.default ? u(n.$slots, "default", { key: 0 }) : (o(), _(y, { key: 1 }, [
|
|
34
|
+
k(b(e.label), 1)
|
|
35
|
+
], 64)),
|
|
36
|
+
e.target === "_blank" ? (o(), r(d, {
|
|
37
|
+
key: 2,
|
|
38
|
+
size: 15,
|
|
39
|
+
class: "ml-1",
|
|
40
|
+
icon: "open-in-new"
|
|
41
|
+
})) : g("", !0)
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 8, ["href", "to", "disabled", "target"]);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
B as _
|
|
50
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './ProgressLine.css';
|
|
2
|
-
import { defineComponent as d, ref as u, watch as c, computed as
|
|
2
|
+
import { defineComponent as d, ref as u, watch as c, computed as f, openBlock as l, createElementBlock as o, normalizeClass as t, createElementVNode as s, renderSlot as h, toDisplayString as v, createCommentVNode as p } from "vue";
|
|
3
3
|
import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const m = ["aria-valuenow"], _ = ["height"], C = ["rx", "fill"], b = ["width", "rx", "fill"], w = {
|
|
5
5
|
key: 1,
|
|
@@ -12,8 +12,8 @@ const m = ["aria-valuenow"], _ = ["height"], C = ["rx", "fill"], b = ["width", "
|
|
|
12
12
|
height: { default: 10 },
|
|
13
13
|
borderRadius: { default: 2 },
|
|
14
14
|
showPercentage: { type: Boolean, default: !0 },
|
|
15
|
-
svgClass: {},
|
|
16
|
-
labelClass: {},
|
|
15
|
+
svgClass: { default: "" },
|
|
16
|
+
labelClass: { default: "" },
|
|
17
17
|
overColor: { default: "var(--caipira-red)" },
|
|
18
18
|
progressColor: { default: "var(--caipira-blue)" },
|
|
19
19
|
finishedColor: { default: "var(--caipira-green)" },
|
|
@@ -28,15 +28,15 @@ const m = ["aria-valuenow"], _ = ["height"], C = ["rx", "fill"], b = ["width", "
|
|
|
28
28
|
},
|
|
29
29
|
{ immediate: !0 }
|
|
30
30
|
);
|
|
31
|
-
const n =
|
|
32
|
-
return (r, k) => (
|
|
31
|
+
const n = f(() => a.value === 100 ? e.finishedColor : a.value > 100 ? e.overColor : e.progressColor);
|
|
32
|
+
return (r, k) => (l(), o("div", {
|
|
33
33
|
class: "flex items-center",
|
|
34
34
|
role: "progressbar",
|
|
35
35
|
"aria-valuemax": "100",
|
|
36
36
|
"aria-valuemin": "0",
|
|
37
37
|
"aria-valuenow": a.value
|
|
38
38
|
}, [
|
|
39
|
-
(
|
|
39
|
+
(l(), o("svg", {
|
|
40
40
|
width: "100%",
|
|
41
41
|
height: e.height,
|
|
42
42
|
class: t(["inline-block flex-grow", e.svgClass])
|
|
@@ -54,15 +54,15 @@ const m = ["aria-valuenow"], _ = ["height"], C = ["rx", "fill"], b = ["width", "
|
|
|
54
54
|
fill: n.value
|
|
55
55
|
}, null, 8, b)
|
|
56
56
|
], 10, _)),
|
|
57
|
-
e.showPercentage ? (
|
|
57
|
+
e.showPercentage ? (l(), o("div", {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: t(["flex-none ml-2", r.labelClass])
|
|
60
60
|
}, [
|
|
61
|
-
r.$slots.label ?
|
|
61
|
+
r.$slots.label ? h(r.$slots, "label", { key: 0 }, void 0, !0) : (l(), o("span", w, v(a.value) + "% ", 1))
|
|
62
62
|
], 2)) : p("", !0)
|
|
63
63
|
], 8, m));
|
|
64
64
|
}
|
|
65
|
-
}), B = /* @__PURE__ */ g(x, [["__scopeId", "data-v-
|
|
65
|
+
}), B = /* @__PURE__ */ g(x, [["__scopeId", "data-v-e90993ab"]]);
|
|
66
66
|
export {
|
|
67
67
|
B as P
|
|
68
68
|
};
|
package/dist/ProgressLine.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
svg rect[data-v-
|
|
1
|
+
svg rect[data-v-e90993ab]{transition:width .3s linear}
|
package/dist/ProgressLine.js
CHANGED
package/dist/Tab.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as r } from "./Tab.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as b } from "./plugin-
|
|
1
|
+
import { _ as r } from "./Tab.vue_vue_type_script_setup_true_lang-Bk9igf63.js";
|
|
2
|
+
import { p as b } from "./plugin-BV-k02s1.js";
|
|
3
3
|
export {
|
|
4
4
|
r as Tab,
|
|
5
5
|
b as TabPlugin
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as d, ref as m, openBlock as t, createElementBlock as a, Fragment as o, createElementVNode as n, renderList as c, normalizeClass as i, toDisplayString as b, renderSlot as _, createCommentVNode as f } from "vue";
|
|
2
|
+
const k = {
|
|
3
3
|
class: "flex flex-col md:flex-row flex-wrap rounded-sm list-none mb-6 pt-1 bg-caipira-tertiary",
|
|
4
4
|
role: "tablist"
|
|
5
|
-
},
|
|
5
|
+
}, v = ["onClick"], y = {
|
|
6
6
|
class: "tab-content",
|
|
7
7
|
id: "tabs-tabContent"
|
|
8
|
-
},
|
|
8
|
+
}, x = /* @__PURE__ */ d({
|
|
9
9
|
name: "TTab",
|
|
10
10
|
__name: "Tab",
|
|
11
11
|
props: {
|
|
12
12
|
tabs: { default: () => [] }
|
|
13
13
|
},
|
|
14
14
|
setup(p) {
|
|
15
|
-
const s = p, l =
|
|
16
|
-
return (u, h) => (t(), a(
|
|
17
|
-
|
|
18
|
-
(t(!0), a(
|
|
15
|
+
const s = p, l = m(0);
|
|
16
|
+
return (u, h) => (t(), a(o, null, [
|
|
17
|
+
n("ul", k, [
|
|
18
|
+
(t(!0), a(o, null, c(s.tabs, (r, e) => (t(), a("li", {
|
|
19
19
|
role: "presentation",
|
|
20
20
|
key: e
|
|
21
21
|
}, [
|
|
22
|
-
|
|
22
|
+
n("a", {
|
|
23
23
|
class: i(["block uppercase py-2 px-4", {
|
|
24
24
|
"bg-caipira-primary": e === l.value
|
|
25
25
|
}]),
|
|
26
26
|
href: "#",
|
|
27
27
|
role: "tab",
|
|
28
28
|
"aria-selected": "true",
|
|
29
|
-
onClick: (
|
|
30
|
-
},
|
|
29
|
+
onClick: (C) => l.value = e
|
|
30
|
+
}, b(r?.title), 11, v)
|
|
31
31
|
]))), 128))
|
|
32
32
|
]),
|
|
33
|
-
|
|
34
|
-
(t(!0), a(
|
|
33
|
+
n("div", y, [
|
|
34
|
+
(t(!0), a(o, null, c(s.tabs, (r, e) => (t(), a("div", {
|
|
35
35
|
key: e,
|
|
36
36
|
class: i(["", { hidden: e !== l.value }]),
|
|
37
37
|
role: "tabpanel"
|
|
38
38
|
}, [
|
|
39
|
-
_(u.$slots, r.slot)
|
|
39
|
+
r?.slot ? _(u.$slots, r.slot, { key: 0 }) : f("", !0)
|
|
40
40
|
], 2))), 128))
|
|
41
41
|
])
|
|
42
42
|
], 64));
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
x as _
|
|
47
47
|
};
|
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-CaCu47jH.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";
|
|
@@ -28,17 +28,17 @@ import { _ as $ } from "./InputSelect.vue_vue_type_script_setup_true_lang-vCtwK7
|
|
|
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
|
-
import { _ as sr } from "./Link.vue_vue_type_script_setup_true_lang-
|
|
31
|
+
import { _ as sr } from "./Link.vue_vue_type_script_setup_true_lang-C6zadagH.js";
|
|
32
32
|
import { _ as fr } from "./Modal.vue_vue_type_script_setup_true_lang-aQ-G7tuI.js";
|
|
33
33
|
import { _ as nr } from "./ModalForm.vue_vue_type_script_setup_true_lang-B4dU1AzJ.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";
|
|
37
37
|
import { P as Tr } from "./ProgressCircle-BY2eeyGY.js";
|
|
38
|
-
import { P as yr } from "./ProgressLine-
|
|
38
|
+
import { P as yr } from "./ProgressLine-bKh0terH.js";
|
|
39
39
|
import { _ as Cr } from "./SensitiveInfo.vue_vue_type_script_setup_true_lang-lCdRDxvZ.js";
|
|
40
40
|
import { _ as Gr } from "./Skeleton.vue_vue_type_script_setup_true_lang-BZItfVoN.js";
|
|
41
|
-
import { _ as gr } from "./Tab.vue_vue_type_script_setup_true_lang-
|
|
41
|
+
import { _ as gr } from "./Tab.vue_vue_type_script_setup_true_lang-Bk9igf63.js";
|
|
42
42
|
import { T as vr } from "./Table-C0Sr_Lfm.js";
|
|
43
43
|
import { _ as Fr } from "./Tag.vue_vue_type_script_setup_true_lang-DatNytmx.js";
|
|
44
44
|
import { _ as Br } from "./Toast.vue_vue_type_script_setup_true_lang-Dezwl4qF.js";
|
package/dist/form2.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as s } from "./transformers-DLw_G6c6.js";
|
|
2
|
+
import { C as m } from "./crud-n73o4CzO.js";
|
|
2
3
|
const e = (r) => {
|
|
3
|
-
const
|
|
4
|
+
const a = new FormData();
|
|
4
5
|
if (r)
|
|
5
|
-
for (const
|
|
6
|
-
r[
|
|
7
|
-
|
|
8
|
-
}) :
|
|
9
|
-
return
|
|
6
|
+
for (const o in r)
|
|
7
|
+
r[o] !== null && r[o] !== void 0 && (Array.isArray(r[o]) ? r[o].forEach((t) => {
|
|
8
|
+
a.append(`${o}[]`, t);
|
|
9
|
+
}) : a.append(o, r[o]));
|
|
10
|
+
return a;
|
|
10
11
|
}, f = (r) => {
|
|
11
|
-
const
|
|
12
|
-
return r.forEach((
|
|
13
|
-
|
|
14
|
-
}),
|
|
12
|
+
const a = {};
|
|
13
|
+
return r.forEach((o, t) => {
|
|
14
|
+
a[t] = o;
|
|
15
|
+
}), a;
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
m as CrudService,
|
|
18
19
|
f as formDataToJson,
|
|
19
|
-
e as jsonToFormData
|
|
20
|
+
e as jsonToFormData,
|
|
21
|
+
s as transformers
|
|
20
22
|
};
|
|
@@ -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-CaCu47jH.js";
|
|
16
|
+
import { p as t } from "./plugin-uMlQixCx.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";
|
|
@@ -37,8 +37,8 @@ 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
|
-
import "./Link.vue_vue_type_script_setup_true_lang-
|
|
41
|
-
import { p as x } from "./plugin-
|
|
40
|
+
import "./Link.vue_vue_type_script_setup_true_lang-C6zadagH.js";
|
|
41
|
+
import { p as x } from "./plugin-Dy-OWJTa.js";
|
|
42
42
|
import { p as D } from "./plugin-GUvrG7aO.js";
|
|
43
43
|
import { p as F } from "./plugin-DmPqmScT.js";
|
|
44
44
|
import { p as L } from "./plugin-YUomn9tF.js";
|
|
@@ -48,11 +48,11 @@ import "./Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js";
|
|
|
48
48
|
import { p as _ } from "./plugin-CdJ1wBq2.js";
|
|
49
49
|
import "./ProgressCircle-BY2eeyGY.js";
|
|
50
50
|
import { p as j } from "./plugin-DXSsGfRI.js";
|
|
51
|
-
import "./ProgressLine-
|
|
52
|
-
import { p as A } from "./plugin-
|
|
51
|
+
import "./ProgressLine-bKh0terH.js";
|
|
52
|
+
import { p as A } from "./plugin-VQZG4jD0.js";
|
|
53
53
|
import { p as B } from "./plugin-cvHKUGjm.js";
|
|
54
54
|
import { p as z } from "./plugin-B9wG8DUw.js";
|
|
55
|
-
import { p as E } from "./plugin-
|
|
55
|
+
import { p as E } from "./plugin-BV-k02s1.js";
|
|
56
56
|
import "./Table-C0Sr_Lfm.js";
|
|
57
57
|
import { p as O } from "./plugin-CTMcmMdr.js";
|
|
58
58
|
import "./Tag.vue_vue_type_script_setup_true_lang-DatNytmx.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-CaCu47jH.js";
|
|
16
|
+
import { p as E } from "./plugin-uMlQixCx.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";
|
|
@@ -37,8 +37,8 @@ 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
|
-
import "./Link.vue_vue_type_script_setup_true_lang-
|
|
41
|
-
import { p as Cr } from "./plugin-
|
|
40
|
+
import "./Link.vue_vue_type_script_setup_true_lang-C6zadagH.js";
|
|
41
|
+
import { p as Cr } from "./plugin-Dy-OWJTa.js";
|
|
42
42
|
import { p as Sr } from "./plugin-GUvrG7aO.js";
|
|
43
43
|
import { p as vr } from "./plugin-DmPqmScT.js";
|
|
44
44
|
import { p as Dr } from "./plugin-YUomn9tF.js";
|
|
@@ -48,11 +48,11 @@ import "./Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js";
|
|
|
48
48
|
import { p as Ar } from "./plugin-CdJ1wBq2.js";
|
|
49
49
|
import "./ProgressCircle-BY2eeyGY.js";
|
|
50
50
|
import { p as Er } from "./plugin-DXSsGfRI.js";
|
|
51
|
-
import "./ProgressLine-
|
|
52
|
-
import { p as jr } from "./plugin-
|
|
51
|
+
import "./ProgressLine-bKh0terH.js";
|
|
52
|
+
import { p as jr } from "./plugin-VQZG4jD0.js";
|
|
53
53
|
import { p as zr } from "./plugin-cvHKUGjm.js";
|
|
54
54
|
import { p as Jr } from "./plugin-B9wG8DUw.js";
|
|
55
|
-
import { p as Nr } from "./plugin-
|
|
55
|
+
import { p as Nr } from "./plugin-BV-k02s1.js";
|
|
56
56
|
import "./Table-C0Sr_Lfm.js";
|
|
57
57
|
import { p as Qr } from "./plugin-CTMcmMdr.js";
|
|
58
58
|
import "./Tag.vue_vue_type_script_setup_true_lang-DatNytmx.js";
|
package/dist/tamandua.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { f as t } from "./index-CjvqeRf7.js";
|
|
2
|
+
const o = (r) => r ? t(r, "yyyy-MM-dd") : "", e = (r) => [`${r?.iso}`, `${r?.value}`], n = (r) => r?.iso2 ?? "", s = (r) => r?.hash ? r.hash : r?.raw ?? "", c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
|
+
__proto__: null,
|
|
4
|
+
country: n,
|
|
5
|
+
date: o,
|
|
6
|
+
password: s,
|
|
7
|
+
price: e
|
|
8
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
9
|
+
export {
|
|
10
|
+
s as a,
|
|
11
|
+
n as c,
|
|
12
|
+
o as d,
|
|
13
|
+
e as p,
|
|
14
|
+
c as t
|
|
15
|
+
};
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ChartLineProps } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChartLineProps>, {
|
|
4
|
+
options: () => {
|
|
5
|
+
scatterplot: boolean;
|
|
6
|
+
};
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChartLineProps>, {
|
|
8
|
+
options: () => {
|
|
9
|
+
scatterplot: boolean;
|
|
10
|
+
};
|
|
11
|
+
}>>>, {
|
|
12
|
+
options: {
|
|
13
|
+
scatterplot?: boolean | undefined;
|
|
14
|
+
grid?: boolean | undefined;
|
|
15
|
+
};
|
|
3
16
|
}, {}>;
|
|
4
17
|
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: import('vue').PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_WithDefaults<P, D> = {
|
|
28
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
+
default: D[K];
|
|
30
|
+
}> : P[K];
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Prettify<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|
|
@@ -1,9 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ProgressLineProps } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ProgressLineProps>, {
|
|
4
|
+
value: number;
|
|
5
|
+
height: number;
|
|
6
|
+
borderRadius: number;
|
|
7
|
+
showPercentage: boolean;
|
|
8
|
+
svgClass: string;
|
|
9
|
+
labelClass: string;
|
|
10
|
+
overColor: string;
|
|
11
|
+
progressColor: string;
|
|
12
|
+
finishedColor: string;
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ProgressLineProps>, {
|
|
15
|
+
value: number;
|
|
16
|
+
height: number;
|
|
17
|
+
borderRadius: number;
|
|
18
|
+
showPercentage: boolean;
|
|
19
|
+
svgClass: string;
|
|
20
|
+
labelClass: string;
|
|
21
|
+
overColor: string;
|
|
22
|
+
progressColor: string;
|
|
23
|
+
finishedColor: string;
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
}>>>, {
|
|
26
|
+
value: number;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
height: number;
|
|
30
|
+
showPercentage: boolean;
|
|
31
|
+
svgClass: string;
|
|
32
|
+
labelClass: string;
|
|
33
|
+
overColor: string;
|
|
34
|
+
progressColor: string;
|
|
35
|
+
finishedColor: string;
|
|
3
36
|
}, {}>, {
|
|
4
37
|
label?(_: {}): any;
|
|
5
38
|
}>;
|
|
6
39
|
export default _default;
|
|
40
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
41
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
42
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
43
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
44
|
+
} : {
|
|
45
|
+
type: import('vue').PropType<T[K]>;
|
|
46
|
+
required: true;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type __VLS_WithDefaults<P, D> = {
|
|
50
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
51
|
+
default: D[K];
|
|
52
|
+
}> : P[K];
|
|
53
|
+
};
|
|
54
|
+
type __VLS_Prettify<T> = {
|
|
55
|
+
[K in keyof T]: T[K];
|
|
56
|
+
} & {};
|
|
7
57
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
58
|
new (): {
|
|
9
59
|
$slots: S;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}, {}>, {
|
|
1
|
+
import { SensitiveInfoProps } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<SensitiveInfoProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SensitiveInfoProps>>>, {}, {}>, {
|
|
4
4
|
default?(_: {}): any;
|
|
5
5
|
}>;
|
|
6
6
|
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
7
16
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
17
|
new (): {
|
|
9
18
|
$slots: S;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<
|
|
2
|
-
[x: string]:
|
|
3
|
-
}, {}
|
|
1
|
+
declare const _default: import('vue').DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, readonly string[] | Readonly<import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
}>>>>, {
|
|
6
|
+
readonly [x: number]: string;
|
|
7
|
+
} | {}, {}>;
|
|
4
8
|
export default _default;
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { TabProps } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TabProps>, {
|
|
4
|
+
tabs: () => never[];
|
|
5
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TabProps>, {
|
|
6
|
+
tabs: () => never[];
|
|
7
|
+
}>>>, {
|
|
8
|
+
tabs: import("../../index.js").Tab[];
|
|
9
|
+
}, {}>, Partial<Record<string, (_: {}) => any>>>;
|
|
4
10
|
export default _default;
|
|
11
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
13
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
+
} : {
|
|
16
|
+
type: import('vue').PropType<T[K]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
type __VLS_WithDefaults<P, D> = {
|
|
21
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
22
|
+
default: D[K];
|
|
23
|
+
}> : P[K];
|
|
24
|
+
};
|
|
25
|
+
type __VLS_Prettify<T> = {
|
|
26
|
+
[K in keyof T]: T[K];
|
|
27
|
+
} & {};
|
|
5
28
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
6
29
|
new (): {
|
|
7
30
|
$slots: S;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}, {}
|
|
1
|
+
import { ToastProps } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<ToastProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
close: (val: number) => void;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ToastProps>>> & {
|
|
6
|
+
onClose?: ((val: number) => any) | undefined;
|
|
7
|
+
}, {}, {}>;
|
|
4
8
|
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { CrudService, jsonToFormData, formDataToJson };
|
|
1
|
+
export * as transformers from './transformers.js';
|
|
2
|
+
export { jsonToFormData, formDataToJson } from './convertors.js';
|
|
3
|
+
export { default as CrudService } from './crud.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { JSONForm,
|
|
2
|
-
import {
|
|
1
|
+
import { JSONForm, TransformedForm, FormSchemaValueMap } from '../types/form.js';
|
|
2
|
+
import { FormSubmissionFormat } from '../enums/form.js';
|
|
3
|
+
import { Maybe } from '../types/common.js';
|
|
3
4
|
|
|
4
|
-
export declare const formValueToJSONFormValue: <T extends
|
|
5
|
+
export declare const formValueToJSONFormValue: <T extends keyof FormSchemaValueMap>(schema: T, form: TransformedForm<FormSubmissionFormat.JSON>, value: Maybe<FormSchemaValueMap[T]>, key: string) => Promise<JSONForm>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputPasswordModel } from '../components/InputPassword/types.js';
|
|
2
|
+
import { InputPriceModel } from '../components/InputPrice/types.js';
|
|
3
|
+
import { Country } from '../types/address.js';
|
|
4
|
+
|
|
5
|
+
declare const date: (date: Date) => string;
|
|
6
|
+
declare const price: (priceValue: InputPriceModel) => string[];
|
|
7
|
+
declare const country: (country?: Country) => string;
|
|
8
|
+
declare const password: (password?: InputPasswordModel) => string;
|
|
9
|
+
export { date, price, country, password };
|
|
@@ -31,7 +31,7 @@ export type FormDataForm = InstanceType<typeof FormData>;
|
|
|
31
31
|
* Form in the JSON format
|
|
32
32
|
*/
|
|
33
33
|
export type JSONForm = {
|
|
34
|
-
[prop: string]: string | number | boolean | string[];
|
|
34
|
+
[prop: string]: string | number | boolean | string[] | object;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Form submission format map
|
package/package.json
CHANGED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { reactive as D, defineComponent as C, ref as A, computed as P, watch as _, provide as T, resolveComponent as N, openBlock as O, createElementBlock as B, renderSlot as J, unref as E, createElementVNode as R, normalizeClass as W, withDirectives as j, createVNode as M, mergeProps as z, vShow as L } from "vue";
|
|
2
|
-
import { B as I } from "./ui-BC6H9E93.js";
|
|
3
|
-
import { F as s, a as p } from "./form-BkXpIJ0e.js";
|
|
4
|
-
import { f as Y } from "./index-CjvqeRf7.js";
|
|
5
|
-
const w = (t) => t ? Y(t, "yyyy-MM-dd") : "", y = (t) => [`${t?.iso}`, `${t?.value}`], h = (t) => t?.iso2 ?? "", F = async (t) => t?.hash ? t.hash : t?.raw ?? "", i = {
|
|
6
|
-
default: (t, r, e) => (r[e] = t, r),
|
|
7
|
-
price: (t, r, e, n = ["Currency", "Value"]) => {
|
|
8
|
-
const [u, a] = y(t);
|
|
9
|
-
return r[`${e}${n[0]}`] = u, r[`${e}${n[1]}`] = a, r;
|
|
10
|
-
},
|
|
11
|
-
password: async (t, r, e) => (r[e] = await F(t), r),
|
|
12
|
-
stringArray: (t, r, e) => (r[e] = t, r)
|
|
13
|
-
}, q = async (t, r, e, n) => {
|
|
14
|
-
switch (t) {
|
|
15
|
-
case s.Country:
|
|
16
|
-
return i.default(
|
|
17
|
-
h(e),
|
|
18
|
-
r,
|
|
19
|
-
n
|
|
20
|
-
);
|
|
21
|
-
case s.Documents:
|
|
22
|
-
return i.default(e, r, n);
|
|
23
|
-
case s.Date:
|
|
24
|
-
return i.default(
|
|
25
|
-
w(e),
|
|
26
|
-
r,
|
|
27
|
-
n
|
|
28
|
-
);
|
|
29
|
-
case s.Address:
|
|
30
|
-
return i.default(e, r, n);
|
|
31
|
-
case s.Price:
|
|
32
|
-
return i.price(e, r, n);
|
|
33
|
-
case s.Password:
|
|
34
|
-
return await i.password(e, r, n);
|
|
35
|
-
case s.StringArray:
|
|
36
|
-
return i.stringArray(e, r, n);
|
|
37
|
-
default:
|
|
38
|
-
return i.default(e, r, 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, r, e) => {
|
|
42
|
-
const n = f(t);
|
|
43
|
-
return t && r.append(e, n), r;
|
|
44
|
-
},
|
|
45
|
-
price: (t, r, e, n = ["Currency", "Value"]) => {
|
|
46
|
-
const [u, a] = y(t);
|
|
47
|
-
return r.append(`${e}${n[0]}`, f(u)), r.append(`${e}${n[1]}`, f(a)), r;
|
|
48
|
-
},
|
|
49
|
-
address: (t, r, e) => (r.append(
|
|
50
|
-
e,
|
|
51
|
-
JSON.stringify({
|
|
52
|
-
...t,
|
|
53
|
-
country: h(t?.country)
|
|
54
|
-
})
|
|
55
|
-
), r),
|
|
56
|
-
documents: (t, r, e) => (e.endsWith("[]") || (e = `${e}[]`), Array.from(t).forEach((n) => r.append(e, n)), r),
|
|
57
|
-
document: (t, r, e) => (r.append(e, t), r),
|
|
58
|
-
stringArray: (t, r, e) => (e.endsWith("[]") || (e = `${e}[]`), t.forEach((n) => r.append(e, f(n))), r)
|
|
59
|
-
}, x = async (t, r, e, n) => {
|
|
60
|
-
switch (t) {
|
|
61
|
-
case s.Country:
|
|
62
|
-
return c.default(
|
|
63
|
-
h(e),
|
|
64
|
-
r,
|
|
65
|
-
n
|
|
66
|
-
);
|
|
67
|
-
case s.Document:
|
|
68
|
-
return c.document(e, r, n);
|
|
69
|
-
case s.Documents:
|
|
70
|
-
return c.documents(e, r, n);
|
|
71
|
-
case s.Date:
|
|
72
|
-
return c.default(
|
|
73
|
-
w(e),
|
|
74
|
-
r,
|
|
75
|
-
n
|
|
76
|
-
);
|
|
77
|
-
case s.Address:
|
|
78
|
-
return c.address(e, r, n);
|
|
79
|
-
case s.Price:
|
|
80
|
-
return c.price(e, r, n);
|
|
81
|
-
case s.Password:
|
|
82
|
-
return c.default(
|
|
83
|
-
await F(e),
|
|
84
|
-
r,
|
|
85
|
-
n
|
|
86
|
-
);
|
|
87
|
-
case s.StringArray:
|
|
88
|
-
return c.stringArray(e, r, n);
|
|
89
|
-
default:
|
|
90
|
-
return c.default(e, r, n);
|
|
91
|
-
}
|
|
92
|
-
}, G = async (t, r, e) => {
|
|
93
|
-
switch (e) {
|
|
94
|
-
case p.JSON:
|
|
95
|
-
let n = {};
|
|
96
|
-
for (const a in t)
|
|
97
|
-
n = await q(
|
|
98
|
-
r[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 x(
|
|
109
|
-
r[a],
|
|
110
|
-
u,
|
|
111
|
-
t[a],
|
|
112
|
-
a
|
|
113
|
-
);
|
|
114
|
-
return u;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
function H(t) {
|
|
118
|
-
const r = D(
|
|
119
|
-
{}
|
|
120
|
-
);
|
|
121
|
-
return { form: r, setValue: (o, m) => {
|
|
122
|
-
r[o] = m;
|
|
123
|
-
}, setValues: (o) => {
|
|
124
|
-
for (const [m, b] of Object.entries(o))
|
|
125
|
-
r[m] = b;
|
|
126
|
-
}, getValue: (o) => r[o], reset: () => {
|
|
127
|
-
for (const o in r)
|
|
128
|
-
delete r[o];
|
|
129
|
-
}, submit: async () => {
|
|
130
|
-
const o = {
|
|
131
|
-
...r
|
|
132
|
-
};
|
|
133
|
-
return t.id && t.id.value && (o.id = t.id.value), {
|
|
134
|
-
isValid: !0,
|
|
135
|
-
form: await G(
|
|
136
|
-
o,
|
|
137
|
-
t.schema,
|
|
138
|
-
t.format ?? p.JSON
|
|
139
|
-
)
|
|
140
|
-
};
|
|
141
|
-
} };
|
|
142
|
-
}
|
|
143
|
-
const v = /* @__PURE__ */ C({
|
|
144
|
-
name: "TForm",
|
|
145
|
-
__name: "Form",
|
|
146
|
-
props: {
|
|
147
|
-
id: { default: "" },
|
|
148
|
-
schema: { default: () => ({}) },
|
|
149
|
-
formStyle: { default: () => ({}) },
|
|
150
|
-
showSubmit: { type: Boolean, default: !1 },
|
|
151
|
-
submitLabel: { default: "Submit" },
|
|
152
|
-
buttonProps: {},
|
|
153
|
-
buttonVariant: { default: I.PRIMARY },
|
|
154
|
-
submissionFormat: { default: p.FormData },
|
|
155
|
-
buttonWrapperClasses: { default: "" }
|
|
156
|
-
},
|
|
157
|
-
emits: ["submit", "change"],
|
|
158
|
-
setup(t, { expose: r, emit: e }) {
|
|
159
|
-
const n = t, u = e, a = A(), { form: l, getValue: o, setValue: m, setValues: b, reset: S, submit: g } = H({
|
|
160
|
-
id: P(() => n.id),
|
|
161
|
-
schema: n.schema,
|
|
162
|
-
format: n.submissionFormat
|
|
163
|
-
}), V = async () => {
|
|
164
|
-
const d = await g();
|
|
165
|
-
return u("submit", d), d;
|
|
166
|
-
};
|
|
167
|
-
return _(l, (d) => {
|
|
168
|
-
u("change", d);
|
|
169
|
-
}), T("formStyle", n.formStyle), r({
|
|
170
|
-
submit: V,
|
|
171
|
-
reset: S,
|
|
172
|
-
setValues: b,
|
|
173
|
-
form: l,
|
|
174
|
-
setValue: m,
|
|
175
|
-
getValue: o
|
|
176
|
-
}), (d, K) => {
|
|
177
|
-
const $ = N("t-button");
|
|
178
|
-
return O(), B("form", {
|
|
179
|
-
onSubmit: V,
|
|
180
|
-
ref_key: "formReference",
|
|
181
|
-
ref: a
|
|
182
|
-
}, [
|
|
183
|
-
J(d.$slots, "default", { form: E(l) }),
|
|
184
|
-
R("div", {
|
|
185
|
-
class: W([n.buttonWrapperClasses])
|
|
186
|
-
}, [
|
|
187
|
-
j(M($, z(n.buttonProps, {
|
|
188
|
-
type: "submit",
|
|
189
|
-
class: "mt-4",
|
|
190
|
-
variant: n.buttonVariant,
|
|
191
|
-
label: n.submitLabel,
|
|
192
|
-
onClick: V
|
|
193
|
-
}), null, 16, ["variant", "label"]), [
|
|
194
|
-
[L, n.showSubmit]
|
|
195
|
-
])
|
|
196
|
-
], 2)
|
|
197
|
-
], 544);
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
export {
|
|
202
|
-
v as _
|
|
203
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { defineComponent as s, computed as d, resolveComponent as c, openBlock as o, createBlock as n, resolveDynamicComponent as m, withCtx as u, renderSlot as p, createElementBlock as f, Fragment as _, createTextVNode as k, toDisplayString as y, createCommentVNode as b } from "vue";
|
|
2
|
-
import { L as l } from "./ui-BC6H9E93.js";
|
|
3
|
-
const B = /* @__PURE__ */ s({
|
|
4
|
-
name: "TLink",
|
|
5
|
-
__name: "Link",
|
|
6
|
-
props: {
|
|
7
|
-
to: {},
|
|
8
|
-
href: {},
|
|
9
|
-
type: { default: l.Default },
|
|
10
|
-
label: { default: "" },
|
|
11
|
-
target: { default: "_self" },
|
|
12
|
-
disabled: { type: Boolean, default: !1 }
|
|
13
|
-
},
|
|
14
|
-
setup(r, { emit: v }) {
|
|
15
|
-
const e = r, t = d(() => {
|
|
16
|
-
switch (e.type) {
|
|
17
|
-
case l.Router:
|
|
18
|
-
return "router-link";
|
|
19
|
-
default:
|
|
20
|
-
return "a";
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return (a, g) => {
|
|
24
|
-
const i = c("t-icon");
|
|
25
|
-
return o(), n(m(t.value), {
|
|
26
|
-
href: t.value === "a" ? e.href : void 0,
|
|
27
|
-
to: t.value === "router-link" ? e.to : void 0,
|
|
28
|
-
disabled: e.disabled,
|
|
29
|
-
target: e.target,
|
|
30
|
-
class: "color-caipira-primary-inverted underline font-bold inline-flex items-baseline"
|
|
31
|
-
}, {
|
|
32
|
-
default: u(() => [
|
|
33
|
-
a.$slots.default ? p(a.$slots, "default", { key: 0 }) : (o(), f(_, { key: 1 }, [
|
|
34
|
-
k(y(e.label), 1)
|
|
35
|
-
], 64)),
|
|
36
|
-
e.target === "_blank" ? (o(), n(i, {
|
|
37
|
-
key: 2,
|
|
38
|
-
size: 15,
|
|
39
|
-
class: "ml-1",
|
|
40
|
-
icon: "open-in-new"
|
|
41
|
-
})) : b("", !0)
|
|
42
|
-
]),
|
|
43
|
-
_: 3
|
|
44
|
-
}, 8, ["href", "to", "disabled", "target"]);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export {
|
|
49
|
-
B as _
|
|
50
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InputPasswordModel } from '../components/InputPassword/types.js';
|
|
2
|
-
import { InputPriceModel } from '../components/InputPrice/types.js';
|
|
3
|
-
import { Country } from '../types/address.js';
|
|
4
|
-
|
|
5
|
-
declare const formValueDateTransformer: (date: Date) => string;
|
|
6
|
-
declare const formValuePriceTransformer: (price: InputPriceModel) => string[];
|
|
7
|
-
declare const formValueCountryTransformer: (country?: Country) => string;
|
|
8
|
-
declare const formValuePasswordTransformer: (password?: InputPasswordModel) => Promise<string>;
|
|
9
|
-
export { formValueDateTransformer, formValuePriceTransformer, formValueCountryTransformer, formValuePasswordTransformer, };
|