@caipira/tamandua 0.0.32 → 0.0.34

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.
Files changed (51) hide show
  1. package/README.md +12 -4
  2. package/dist/ChartTreemap.js +2 -2
  3. package/dist/{ChartTreemap.vue_vue_type_script_setup_true_lang-CG5aK3KH.js → ChartTreemap.vue_vue_type_script_setup_true_lang-DzIPutlk.js} +3 -1
  4. package/dist/Form.js +2 -2
  5. package/dist/Form.vue_vue_type_script_setup_true_lang-O6nqLPyU.js +205 -0
  6. package/dist/InputPassword.js +2 -2
  7. package/dist/InputPassword.vue_vue_type_script_setup_true_lang-DtP-Tv-2.js +167 -0
  8. package/dist/ModalForm.js +2 -2
  9. package/dist/{ModalForm.vue_vue_type_script_setup_true_lang-BSEORivR.js → ModalForm.vue_vue_type_script_setup_true_lang-BpkPebgZ.js} +34 -32
  10. package/dist/Tag.js +2 -2
  11. package/dist/{Tag.vue_vue_type_script_setup_true_lang-CgX-nT8V.js → Tag.vue_vue_type_script_setup_true_lang-DMigzW22.js} +16 -19
  12. package/dist/components.js +5 -5
  13. package/dist/{crud-lKm5HfM4.js → crud-TcRx_r8S.js} +4 -4
  14. package/dist/form2.js +1 -1
  15. package/dist/{plugin-DOiXH9p9.js → plugin-BN2jubTY.js} +1 -1
  16. package/dist/{plugin-DF8iyfN5.js → plugin-BkoyYU7S.js} +1 -1
  17. package/dist/{plugin-BibUAa04.js → plugin-D4x3uASg.js} +1 -1
  18. package/dist/{plugin-D8CsjFdw.js → plugin-DgCa2m12.js} +1 -1
  19. package/dist/{plugin-C3jERS0X.js → plugin-JFEZqDsu.js} +1 -1
  20. package/dist/{plugins-ChB184ip.js → plugins-Bc8aBhAD.js} +7 -7
  21. package/dist/plugins.js +7 -7
  22. package/dist/tamandua.js +1 -1
  23. package/dist/types/components/Dropdown/types.d.ts +1 -1
  24. package/dist/types/components/Form/Form.vue.d.ts +42 -24
  25. package/dist/types/components/Form/types.d.ts +8 -4
  26. package/dist/types/components/InputPassword/InputPassword.vue.d.ts +1 -1
  27. package/dist/types/components/InputPassword/types.d.ts +10 -2
  28. package/dist/types/components/InputPrice/InputPrice.vue.d.ts +19 -3
  29. package/dist/types/components/InputPrice/types.d.ts +4 -0
  30. package/dist/types/components/InputSelect/InputSelect.story.d.ts +1 -1
  31. package/dist/types/components/InputSelect/InputSelect.vue.d.ts +69 -2
  32. package/dist/types/components/InputSelect/types.d.ts +33 -2
  33. package/dist/types/components/ModalForm/ModalForm.vue.d.ts +6 -1
  34. package/dist/types/components/ModalForm/types.d.ts +6 -4
  35. package/dist/types/composables/useForm.d.ts +20 -0
  36. package/dist/types/enums/form.d.ts +3 -3
  37. package/dist/types/enums/ui.d.ts +10 -10
  38. package/dist/types/form/crud.d.ts +5 -4
  39. package/dist/types/form/form-transformer.d.ts +2 -2
  40. package/dist/types/form/form-transformer.test.d.ts +1 -0
  41. package/dist/types/form/form-value-transformers.d.ts +2 -1
  42. package/dist/types/services/password.d.ts +1 -4
  43. package/dist/types/services/password.test.d.ts +1 -0
  44. package/dist/types/types/address.d.ts +8 -8
  45. package/dist/types/types/common.d.ts +1 -0
  46. package/dist/types/types/form.d.ts +14 -59
  47. package/package.json +6 -4
  48. package/dist/Form.vue_vue_type_script_setup_true_lang-CbuLc6sr.js +0 -186
  49. package/dist/InputPassword.vue_vue_type_script_setup_true_lang-Do7d1Qfe.js +0 -172
  50. /package/dist/types/components/Form/{Form.spec.d.ts → Form.test.d.ts} +0 -0
  51. /package/dist/types/{form/form.test.d.ts → composables/useForm.test.d.ts} +0 -0
@@ -1,172 +0,0 @@
1
- import { defineComponent as te, mergeModels as j, useModel as ne, ref as V, watch as le, resolveComponent as R, openBlock as x, createElementBlock as A, Fragment as se, createElementVNode as z, normalizeClass as B, createVNode as k, unref as O, createCommentVNode as _, withKeys as oe, createBlock as ae, toDisplayString as re } from "vue";
2
- import { u as ie } from "./useClipboard-BHFD0Jvv.js";
3
- import { f as ue } from "./index-CjvqeRf7.js";
4
- const ce = (s = 18) => {
5
- const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", a = "!?@#-+<%$>[]{}";
6
- let l = "";
7
- const n = [
8
- Math.floor(Math.random() * s),
9
- Math.floor(Math.random() * s)
10
- ];
11
- for (let r = 0; r < s; r++)
12
- n.includes(r) ? l += a.charAt(
13
- Math.floor(Math.random() * a.length)
14
- ) : l += e.charAt(
15
- Math.floor(Math.random() * e.length)
16
- );
17
- return l;
18
- }, pe = (s) => {
19
- let e = 0, a = 0, l = 0, n = 0, r = 0, u = 0, c = 0, b = 0, f = 0, C = 0, d = 0, M = 0, v = 0, o = 0, m = 0, I = 0, S = 0, y = 0, $ = 2, F = 2, T = 2, E = 2, D = 3, K = 3, W = 3, Z = 4, G = 4, H = 6, L = "", q = "", N = "", g = "Too Short";
20
- const J = "abcdefghijklmnopqrstuvwxyz", Q = "01234567890", X = ")!@#$%^&*()", Y = 8, h = s.replace(/\s+/g, "").split(/\s*/), w = h.length;
21
- e = s.length * Z, a = s.length;
22
- for (let t = 0; t < w; t++) {
23
- h[t].match(/[A-Z]/g) ? (L !== "" && L + 1 == t && M++, L = t, l++) : h[t].match(/[a-z]/g) ? (q !== "" && q + 1 == t && v++, q = t, n++) : h[t].match(/[0-9]/g) ? (t > 0 && t < w - 1 && c++, N !== "" && N + 1 == t && o++, N = t, r++) : h[t].match(/[^a-zA-Z0-9_]/g) && (t > 0 && t < w - 1 && c++, u++);
24
- let i = !1;
25
- for (let p = 0; p < w; p++)
26
- h[t] == h[p] && t != p && (i = !0, d += Math.abs(w / (p - t)));
27
- i && (C++, f = w - C, d = Math.ceil(f ? d / f : d));
28
- }
29
- for (let t = 0; t < 23; t++) {
30
- let i = J.substring(t, parseInt(t + 3)), p = i.split("").reverse().join("");
31
- (s.toLowerCase().indexOf(i) != -1 || s.toLowerCase().indexOf(p) != -1) && m++;
32
- }
33
- for (let t = 0; t < 8; t++) {
34
- let i = Q.substring(t, parseInt(t + 3));
35
- var ee = i.split("").reverse().join("");
36
- (s.toLowerCase().indexOf(i) != -1 || s.toLowerCase().indexOf(ee) != -1) && I++;
37
- }
38
- for (let t = 0; t < 8; t++) {
39
- let i = X.substring(t, parseInt(t + 3)), p = i.split("").reverse().join("");
40
- (s.toLowerCase().indexOf(i) != -1 || s.toLowerCase().indexOf(p) != -1) && S++;
41
- }
42
- l > 0 && l < a && (e = parseInt(e + (a - l) * 2)), n > 0 && n < a && (e = parseInt(e + (a - n) * 2)), r > 0 && r < a && (e = parseInt(e + r * G)), u > 0 && (e = parseInt(e + u * H)), c > 0 && (e = parseInt(e + c * $)), (n > 0 || l > 0) && u === 0 && r === 0 && (e = parseInt(e - a)), n === 0 && l === 0 && u === 0 && r > 0 && (e = parseInt(e - a)), C > 0 && (e = parseInt(e - d)), M > 0 && (e = parseInt(e - M * F)), v > 0 && (e = parseInt(e - v * T)), o > 0 && (e = parseInt(e - o * E)), m > 0 && (e = parseInt(e - m * D)), I > 0 && (e = parseInt(e - I * K)), S > 0 && (e = parseInt(e - S * W)), b = y;
43
- let P = 0;
44
- return s.length >= Y ? P = 3 : P = 4, b > P && (e = parseInt(e + b * 2)), e > 100 ? e = 100 : e < 0 && (e = 0), e >= 0 && e < 20 ? g = "Very Weak" : e >= 20 && e < 40 ? g = "Weak" : e >= 40 && e < 60 ? g = "Good" : e >= 60 && e < 80 ? g = "Strong" : e >= 80 && e <= 100 && (g = "Very Strong"), {
45
- score: e,
46
- complexity: g
47
- };
48
- }, U = {
49
- generatePassword: ce,
50
- getPasswordStrength: pe
51
- }, fe = { class: "flex border h-9 relative input-roundness input-border w-full" }, de = { class: "border-l select-none input-border input-control" }, me = {
52
- key: 1,
53
- class: "inline-block float-right select-none"
54
- }, ge = /* @__PURE__ */ te({
55
- name: "TInputPassword",
56
- __name: "InputPassword",
57
- props: /* @__PURE__ */ j({
58
- autocomplete: { default: "current-password" },
59
- encryptor: { type: Function, default: void 0 },
60
- showCopy: { type: Boolean, default: !0 },
61
- showRefresh: { type: Boolean, default: !1 },
62
- showStrength: { type: Boolean, default: !1 }
63
- }, {
64
- modelValue: {
65
- default: {
66
- raw: "",
67
- strength: 0,
68
- hash: "",
69
- updatedAt: void 0
70
- }
71
- },
72
- modelModifiers: {}
73
- }),
74
- emits: /* @__PURE__ */ j(["generate", "enter"], ["update:modelValue"]),
75
- setup(s, { expose: e, emit: a }) {
76
- const l = s, n = ne(s, "modelValue"), r = a, u = V("password"), c = V(null), { copy: b } = ie(), f = V(!1), C = async (v, o) => {
77
- if (o === void 0 && !v) {
78
- n.value = { ...n.value };
79
- return;
80
- }
81
- n.value.strength = U.getPasswordStrength(
82
- n.value.raw
83
- ).score, l.encryptor && (n.value.hash = await l.encryptor(n.value.raw));
84
- }, d = () => {
85
- c.value && c.value.$el && c.value.$el.focus();
86
- }, M = async () => {
87
- n.value.raw = U.generatePassword();
88
- };
89
- return le(() => n.value.raw, C, { immediate: !0 }), e({ focus: d }), (v, o) => {
90
- const m = R("t-button"), I = R("t-input-text"), S = R("t-progress-line");
91
- return x(), A(se, null, [
92
- z("div", fe, [
93
- l.showCopy ? (x(), A("div", {
94
- key: 0,
95
- class: B(["border-r select-none input-border input-control", { "w-12": l.showCopy }])
96
- }, [
97
- k(m, {
98
- variant: "transparent",
99
- icon: "copy",
100
- size: "sm",
101
- class: "h-full w-full justify-center",
102
- animate: {
103
- target: "icon",
104
- trigger: "click",
105
- animation: {
106
- scale: 4,
107
- yoyo: !0,
108
- opacity: 0
109
- },
110
- reset: { opacity: 1, scale: 1 }
111
- },
112
- disabled: f.value,
113
- onClick: o[0] || (o[0] = (y) => O(b)(n.value.raw))
114
- }, null, 8, ["disabled"])
115
- ], 2)) : _("", !0),
116
- l.showRefresh ? (x(), A("div", {
117
- key: 1,
118
- class: B(["border-r select-none input-border input-control", { "w-12": l.showRefresh }])
119
- }, [
120
- k(m, {
121
- variant: "transparent",
122
- icon: "refresh",
123
- size: "sm",
124
- class: "h-full w-full justify-center",
125
- animate: {
126
- target: "icon",
127
- trigger: "click",
128
- animation: { rotation: 360 },
129
- reset: { rotation: 0 }
130
- },
131
- disabled: f.value,
132
- onClick: M
133
- }, null, 8, ["disabled"])
134
- ], 2)) : _("", !0),
135
- k(I, {
136
- modelValue: n.value.raw,
137
- "onUpdate:modelValue": o[1] || (o[1] = (y) => n.value.raw = y),
138
- type: u.value,
139
- autocomplete: l.autocomplete,
140
- disabled: f.value,
141
- "disable-style": !0,
142
- ref_key: "input",
143
- ref: c,
144
- class: "w-full px-2 input-bg-color input-text-color input-outline input-roundness",
145
- onKeyup: o[2] || (o[2] = oe((y) => r("enter"), ["enter"]))
146
- }, null, 8, ["modelValue", "type", "autocomplete", "disabled"]),
147
- z("div", de, [
148
- k(m, {
149
- variant: "transparent",
150
- size: "sm",
151
- class: "h-full w-full justify-center",
152
- icon: u.value === "password" ? "eye" : "eye-off",
153
- disabled: f.value,
154
- onClick: o[3] || (o[3] = (y) => u.value = u.value === "password" ? "text" : "password")
155
- }, null, 8, ["icon", "disabled"])
156
- ])
157
- ]),
158
- l.showStrength ? (x(), ae(S, {
159
- key: 0,
160
- value: n.value.strength,
161
- class: "mt-0.5",
162
- height: 2.5,
163
- "show-percentage": !1
164
- }, null, 8, ["value"])) : _("", !0),
165
- n.value.updatedAt ? (x(), A("small", me, " Last updated " + re(O(ue)(new Date(n.value.updatedAt), "MMMM do yyyy, hh:mm:ss")), 1)) : _("", !0)
166
- ], 64);
167
- };
168
- }
169
- });
170
- export {
171
- ge as _
172
- };