@fewangsit/wangsvue-fats 1.0.1-alpha.68 → 1.0.1-alpha.69
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/animation/index.es.js +9 -8
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +113 -97
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +1 -1
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/checkbox/index.es.js +5 -5
- package/config/defaultProps.es.js +3 -4
- package/datatable/index.es.js +470 -465
- package/datepicker/index.es.js +17 -17
- package/daypicker/index.es.js +21 -21
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +89 -89
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +89 -89
- package/dialogform/index.es.js +16 -16
- package/dialogfulltransferlog/index.es.js +96 -96
- package/dialoglinkedasset/index.es.js +48 -48
- package/dialogprintqr/index.es.js +70 -70
- package/dialogreportdamage/index.es.js +57 -57
- package/dialogreportmissing/index.es.js +94 -86
- package/dialogselecttree/index.es.js +18 -16
- package/dialogselectuser/index.es.js +16 -16
- package/directives/index.d.ts +1 -0
- package/directives/index.es.js +1 -0
- package/directives/safeHtml.d.ts +16 -0
- package/directives/safeHtml.es.js +12 -0
- package/disposalreport/index.es.js +1 -1
- package/disposalreportbulkaction/index.es.js +40 -41
- package/disposalreportdialogselectasset/index.es.js +72 -72
- package/disposalreporttable/index.es.js +108 -108
- package/disposalreporttablefilter/index.es.js +16 -17
- package/dropdown/index.es.js +120 -117
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +35 -31
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +26 -25
- package/imagecompressor/index.es.js +143 -143
- package/imageinputinfo/index.es.js +13 -13
- package/inlinemessage/index.es.js +12 -12
- package/inputbadge/index.es.js +42 -43
- package/inputnumber/index.es.js +7 -7
- package/inputpassword/index.es.js +9 -9
- package/inputrangenumber/index.es.js +16 -16
- package/inputsearch/index.es.js +18 -18
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +48 -40
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +16 -16
- package/multiselect/index.es.js +86 -83
- package/package.json +1 -1
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/style.css +1 -1
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +33 -30
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/treesearchinput/index.es.js +11 -11
- package/username/index.es.js +39 -39
- package/utils/baseToast.util.es.js +23 -22
- package/utils/index.es.js +1 -2
- package/utils/textFormatter.util.d.ts +32 -0
- package/utils/textFormatter.util.es.js +38 -10
- package/validatormessage/index.es.js +1 -1
- package/vendor/dompurify/dist/purify.es.es.js +553 -0
- package/wangsvue-fats.d.ts +2 -1
- package/wangsvue-fats.es.js +190 -186
- package/wangsvue-fats.esm.browser.js +17750 -17086
- package/wangsvue-fats.system.js +73 -72
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as y, ref as g, computed as w, createElementBlock as a, createCommentVNode as o, openBlock as
|
|
2
|
-
import { c as B, _ as
|
|
1
|
+
import { defineComponent as y, ref as g, computed as w, createElementBlock as a, createCommentVNode as o, openBlock as t, mergeProps as c, createElementVNode as r, createBlock as u, normalizeClass as _, unref as h, toDisplayString as l, Fragment as k, renderList as $, createVNode as C } from "vue";
|
|
2
|
+
import { c as B, _ as b } from "../button/index.es.js";
|
|
3
3
|
import { _ as m } from "../icon/index.es.js";
|
|
4
|
-
const
|
|
4
|
+
const x = { class: "flex items-center gap-3 w-full" }, I = {
|
|
5
5
|
class: "flex items-center w-full justify-between",
|
|
6
6
|
"data-wv-section": "content"
|
|
7
7
|
}, N = {
|
|
@@ -37,13 +37,13 @@ const b = { class: "flex items-center gap-3 w-full" }, I = {
|
|
|
37
37
|
return "info";
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
return (
|
|
40
|
+
return (s, n) => i.value ? (t(), a("div", c({ key: 0 }, s.$preset.inlinemessage.root({ props: e }), {
|
|
41
41
|
"aria-atomic": "true",
|
|
42
42
|
"aria-live": "assertive",
|
|
43
43
|
role: "alert"
|
|
44
44
|
}), [
|
|
45
|
-
r("div",
|
|
46
|
-
|
|
45
|
+
r("div", x, [
|
|
46
|
+
s.showIcon ? (t(), u(m, c({ key: 0 }, s.$preset.inlinemessage.icon({ props: e }), {
|
|
47
47
|
icon: p.value,
|
|
48
48
|
severity: e.severity
|
|
49
49
|
}), null, 16, ["icon", "severity"])) : o("", !0),
|
|
@@ -55,14 +55,14 @@ const b = { class: "flex items-center gap-3 w-full" }, I = {
|
|
|
55
55
|
]),
|
|
56
56
|
"data-wv-section": "messagewrapper"
|
|
57
57
|
}, [
|
|
58
|
-
|
|
59
|
-
r("span", V, l(e.loading ? `${e.message}...` : e.message), 1)
|
|
58
|
+
s.title ? (t(), a("span", N, l(s.$t(e.title)), 1)) : o("", !0),
|
|
59
|
+
r("span", V, l(s.$t(e.loading ? `${e.message}...` : e.message)), 1)
|
|
60
60
|
], 2),
|
|
61
|
-
|
|
61
|
+
s.removable ? (t(), u(b, {
|
|
62
62
|
key: 0,
|
|
63
63
|
severity: e.severity,
|
|
64
64
|
onClick: n[0] || (n[0] = () => {
|
|
65
|
-
|
|
65
|
+
s.$emit("close"), i.value = !1;
|
|
66
66
|
}),
|
|
67
67
|
class: "[&_i]:w-6 [&_i]:h-6",
|
|
68
68
|
"data-wv-section": "close",
|
|
@@ -72,8 +72,8 @@ const b = { class: "flex items-center gap-3 w-full" }, I = {
|
|
|
72
72
|
}, null, 8, ["severity"])) : o("", !0)
|
|
73
73
|
])
|
|
74
74
|
]),
|
|
75
|
-
e.lists ? (
|
|
76
|
-
(
|
|
75
|
+
e.lists ? (t(), a("div", E, [
|
|
76
|
+
(t(!0), a(k, null, $(e.lists, (f, v) => (t(), a("div", {
|
|
77
77
|
key: v,
|
|
78
78
|
class: "flex items-center gap-2",
|
|
79
79
|
"data-wv-section": "item"
|
package/inputbadge/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as H, onMounted as J, reactive as Q, onBeforeUnmount as T, inject as W, ref as V, shallowRef as X, computed as m, watch as b, watchEffect as Y, createBlock as B, openBlock as f, withCtx as
|
|
1
|
+
import { defineComponent as H, onMounted as J, reactive as Q, onBeforeUnmount as T, inject as W, ref as V, shallowRef as X, computed as m, watch as b, watchEffect as Y, createBlock as B, openBlock as f, withCtx as D, createElementVNode as M, createCommentVNode as N, mergeProps as y, unref as h, createElementBlock as R, Fragment as x, renderList as ee, withModifiers as ae, withDirectives as le, createVNode as L, vModelText as te, createTextVNode as oe, toDisplayString as ne, nextTick as ie } from "vue";
|
|
2
2
|
import { u as re } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
3
|
+
import { _ as ue } from "../badge/index.es.js";
|
|
4
|
+
import { _ as se } from "../fieldwrapper/index.es.js";
|
|
5
|
+
import { _ as de } from "../icon/index.es.js";
|
|
6
|
+
import { _ as ve } from "../overlaypanel/index.es.js";
|
|
7
|
+
import { _ as me } from "../validatormessage/index.es.js";
|
|
8
8
|
import { c as E } from "../vendor/lodash-es/cloneDeep.es.js";
|
|
9
|
-
const
|
|
9
|
+
const fe = ["id", "disabled", "placeholder"], Be = /* @__PURE__ */ H({
|
|
10
10
|
__name: "InputBadge",
|
|
11
11
|
props: {
|
|
12
12
|
type: { default: "text" },
|
|
@@ -36,17 +36,17 @@ const me = ["id", "disabled", "placeholder"], we = /* @__PURE__ */ H({
|
|
|
36
36
|
var e, l;
|
|
37
37
|
a.useValidator && (Object.assign(
|
|
38
38
|
t,
|
|
39
|
-
re(a.fieldName, (o) =>
|
|
39
|
+
re(a.fieldName, (o) => ie(() => O(o)))
|
|
40
40
|
), (e = a.initialValue) != null && e.length ? t.value = a.initialValue : (l = a.modelValue) != null && l.length && (t.value = a.modelValue));
|
|
41
41
|
}), T(() => {
|
|
42
42
|
a.useValidator && t.handleReset();
|
|
43
43
|
});
|
|
44
44
|
const p = W("preset", {}).inputbadge, c = V(null), v = V(), n = X(), t = Q({
|
|
45
45
|
value: a.initialValue ?? a.modelValue ?? []
|
|
46
|
-
}), s = V(new Set(a.removableValues ?? [])), d = V(new Set(a.editableValues ?? [])),
|
|
46
|
+
}), s = V(new Set(a.removableValues ?? [])), d = V(new Set(a.editableValues ?? [])), S = m(() => {
|
|
47
47
|
var e;
|
|
48
48
|
return ((e = a.label) == null ? void 0 : e.toLowerCase) + "-badge-input";
|
|
49
|
-
}),
|
|
49
|
+
}), U = m(() => a.invalid && typeof a.validatorMessage == "string" ? a.validatorMessage : t.errorMessage), F = m(() => a.placeholder ? a.placeholder : a.type === "email" ? "Enter valid email" : "Enter value"), O = (e) => {
|
|
50
50
|
var l;
|
|
51
51
|
if (typeof a.validatorMessage == "string" && a.invalid)
|
|
52
52
|
return a.validatorMessage;
|
|
@@ -55,11 +55,11 @@ const me = ["id", "disabled", "placeholder"], we = /* @__PURE__ */ H({
|
|
|
55
55
|
if (!(e != null && e.length) && a.mandatory)
|
|
56
56
|
return o ?? !0;
|
|
57
57
|
if ((l = a.existingValues) != null && l.length || u) {
|
|
58
|
-
let
|
|
59
|
-
return e.forEach((
|
|
60
|
-
const g = e.filter((w) => w ===
|
|
61
|
-
(a.existingValues.includes(
|
|
62
|
-
}),
|
|
58
|
+
let i = !0;
|
|
59
|
+
return e.forEach((r) => {
|
|
60
|
+
const g = e.filter((w) => w === r);
|
|
61
|
+
(a.existingValues.includes(r) || g.length > 1) && (i = u);
|
|
62
|
+
}), i;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return !0;
|
|
@@ -111,28 +111,28 @@ const me = ["id", "disabled", "placeholder"], we = /* @__PURE__ */ H({
|
|
|
111
111
|
(e) => {
|
|
112
112
|
e && e.forEach((l) => d.value.add(l));
|
|
113
113
|
}
|
|
114
|
-
), (e, l) => (f(), B(
|
|
114
|
+
), (e, l) => (f(), B(se, {
|
|
115
115
|
info: e.fieldInfo,
|
|
116
116
|
label: a.label,
|
|
117
117
|
mandatory: a.mandatory
|
|
118
118
|
}, {
|
|
119
|
-
default:
|
|
119
|
+
default: D(() => {
|
|
120
120
|
var o, u;
|
|
121
121
|
return [
|
|
122
122
|
M("div", y((o = h(p)) == null ? void 0 : o.root({ context: { invalidInput: j.value, disabled: e.disabled } }), {
|
|
123
123
|
"data-wv-name": "inputbadge",
|
|
124
124
|
"data-wv-section": "root"
|
|
125
125
|
}), [
|
|
126
|
-
(f(!0), R(
|
|
127
|
-
|
|
126
|
+
(f(!0), R(x, null, ee(t.value, (i, r) => (f(), R(x, { key: i }, [
|
|
127
|
+
i ? (f(), B(ue, {
|
|
128
128
|
key: 0,
|
|
129
129
|
"disable-remove-button": e.removeButtonVariant === "disabled",
|
|
130
|
-
editable: k(
|
|
131
|
-
label:
|
|
132
|
-
removable: I(
|
|
130
|
+
editable: k(i),
|
|
131
|
+
label: i,
|
|
132
|
+
removable: I(i),
|
|
133
133
|
"restore-on-empty": e.restoreValueOnEmpty,
|
|
134
|
-
onRemove: (g) => Z(
|
|
135
|
-
"onUpdate:label": (g, w) => G(g, w,
|
|
134
|
+
onRemove: (g) => Z(r, i),
|
|
135
|
+
"onUpdate:label": (g, w) => G(g, w, r),
|
|
136
136
|
format: "nowrap",
|
|
137
137
|
severity: "dark"
|
|
138
138
|
}, null, 8, ["disable-remove-button", "editable", "label", "removable", "restore-on-empty", "onRemove", "onUpdate:label"])) : N("", !0)
|
|
@@ -144,10 +144,10 @@ const me = ["id", "disabled", "placeholder"], we = /* @__PURE__ */ H({
|
|
|
144
144
|
}, [
|
|
145
145
|
le(M("input", y(
|
|
146
146
|
{
|
|
147
|
-
id:
|
|
147
|
+
id: S.value,
|
|
148
148
|
ref_key: "badgeInput",
|
|
149
149
|
ref: c,
|
|
150
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
150
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i)
|
|
151
151
|
},
|
|
152
152
|
(u = h(p)) == null ? void 0 : u.input({
|
|
153
153
|
context: { disabled: e.disabled, value: t.value, showPlaceholder: A.value },
|
|
@@ -156,39 +156,38 @@ const me = ["id", "disabled", "placeholder"], we = /* @__PURE__ */ H({
|
|
|
156
156
|
}),
|
|
157
157
|
{
|
|
158
158
|
disabled: e.disabled,
|
|
159
|
-
placeholder:
|
|
159
|
+
placeholder: e.$t(F.value),
|
|
160
160
|
onBlur: $,
|
|
161
|
-
onFocus: l[1] || (l[1] = (
|
|
162
|
-
var
|
|
163
|
-
return (
|
|
161
|
+
onFocus: l[1] || (l[1] = (i) => {
|
|
162
|
+
var r;
|
|
163
|
+
return (r = v.value) == null ? void 0 : r.hide();
|
|
164
164
|
}),
|
|
165
|
-
onInput: l[2] || (l[2] = (
|
|
166
|
-
var
|
|
167
|
-
return (
|
|
165
|
+
onInput: l[2] || (l[2] = (i) => {
|
|
166
|
+
var r;
|
|
167
|
+
return (r = v.value) == null ? void 0 : r.hide();
|
|
168
168
|
}),
|
|
169
169
|
onKeydown: q,
|
|
170
170
|
"data-wv-section": "input",
|
|
171
171
|
type: "text"
|
|
172
172
|
}
|
|
173
|
-
), null, 16,
|
|
173
|
+
), null, 16, fe), [
|
|
174
174
|
[te, n.value]
|
|
175
175
|
]),
|
|
176
|
-
L(
|
|
176
|
+
L(ve, y({
|
|
177
177
|
ref_key: "op",
|
|
178
178
|
ref: v
|
|
179
179
|
}, h(p).erroroverlaypanel, { dismissable: !1 }), {
|
|
180
|
-
default:
|
|
181
|
-
L(
|
|
182
|
-
|
|
180
|
+
default: D(() => [
|
|
181
|
+
L(de, y(h(p).erroricon, { icon: "error" }), null, 16),
|
|
182
|
+
oe(" " + ne(e.$t("Email format is incorrect")), 1)
|
|
183
183
|
]),
|
|
184
|
-
_: 1
|
|
185
|
-
__: [3]
|
|
184
|
+
_: 1
|
|
186
185
|
}, 16)
|
|
187
186
|
], 32)
|
|
188
187
|
], 16),
|
|
189
|
-
a.showValidatorMessage ? (f(), B(
|
|
188
|
+
a.showValidatorMessage ? (f(), B(me, {
|
|
190
189
|
key: 0,
|
|
191
|
-
message:
|
|
190
|
+
message: U.value
|
|
192
191
|
}, null, 8, ["message"])) : N("", !0)
|
|
193
192
|
];
|
|
194
193
|
}),
|
|
@@ -197,5 +196,5 @@ const me = ["id", "disabled", "placeholder"], we = /* @__PURE__ */ H({
|
|
|
197
196
|
}
|
|
198
197
|
});
|
|
199
198
|
export {
|
|
200
|
-
|
|
199
|
+
Be as _
|
|
201
200
|
};
|
package/inputnumber/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as U, useSlots as q, inject as
|
|
1
|
+
import { defineComponent as U, useSlots as q, inject as k, shallowRef as K, ref as H, reactive as J, computed as N, onMounted as Q, watch as E, createBlock as m, openBlock as u, createSlots as W, withCtx as p, createVNode as I, renderSlot as b, normalizeClass as v, createCommentVNode as V, createElementVNode as X, unref as r, mergeProps as y, createElementBlock as Y, toDisplayString as Z, nextTick as R } from "vue";
|
|
2
2
|
import { u as _ } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { u as ee } from "../plugins/WangsVue.es.js";
|
|
4
4
|
import { s as z } from "../vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js";
|
|
@@ -49,10 +49,10 @@ const ce = /* @__PURE__ */ U({
|
|
|
49
49
|
},
|
|
50
50
|
emits: ["update:modelValue", "input"],
|
|
51
51
|
setup(D, { emit: P }) {
|
|
52
|
-
const e = D, f = P, i = q(), M =
|
|
52
|
+
const e = D, f = P, i = q(), M = k(
|
|
53
53
|
"preset",
|
|
54
54
|
{}
|
|
55
|
-
).inputgroupaddon, { locale: w } = ee("InputNumber"), c =
|
|
55
|
+
).inputgroupaddon, { locale: w } = ee("InputNumber"), c = k("preset", {}).inputnumber, x = K(0), h = H(), o = J({
|
|
56
56
|
value: e.value ?? e.modelValue
|
|
57
57
|
}), F = N(
|
|
58
58
|
() => {
|
|
@@ -87,7 +87,7 @@ const ce = /* @__PURE__ */ U({
|
|
|
87
87
|
return d ?? ((n = w.alreadyExistInvalidText) == null ? void 0 : n.replace("{label}", e.label));
|
|
88
88
|
}
|
|
89
89
|
return !0;
|
|
90
|
-
},
|
|
90
|
+
}, $ = () => {
|
|
91
91
|
x.value++, R(() => {
|
|
92
92
|
var l;
|
|
93
93
|
const t = (l = h.value) == null ? void 0 : l.$el, a = t == null ? void 0 : t.querySelector("input");
|
|
@@ -103,12 +103,12 @@ const ce = /* @__PURE__ */ U({
|
|
|
103
103
|
s = l != null ? +l : void 0, A(a, s);
|
|
104
104
|
else if (s == null && typeof s != "string") {
|
|
105
105
|
const d = e.allowEmptyValue ? s : s ?? e.min ?? 0;
|
|
106
|
-
o.value = d, a === "input" ? (!e.allowEmptyValue && h.value &&
|
|
106
|
+
o.value = d, a === "input" ? (!e.allowEmptyValue && h.value && $(), f("input", d)) : f("update:modelValue", d);
|
|
107
107
|
}
|
|
108
108
|
}, A = (t, a) => {
|
|
109
109
|
const l = typeof a == "number" ? B(a) : !1;
|
|
110
110
|
let n = a == null ? void 0 : a.toString().slice(0, a < 0 ? e.maxDigit + 1 : e.maxDigit);
|
|
111
|
-
n != null && (n = +(n ?? 0)), o.value = l ? +(n ?? 0) : a, l &&
|
|
111
|
+
n != null && (n = +(n ?? 0)), o.value = l ? +(n ?? 0) : a, l && $(), f(t === "input" ? "input" : "update:modelValue", l ? +(n ?? 0) : a);
|
|
112
112
|
}, B = (t) => (
|
|
113
113
|
// eslint-disable-next-line eqeqeq
|
|
114
114
|
t != null && t.toString().length > (e.maxDigit > 16 ? 16 : e.maxDigit)
|
|
@@ -185,7 +185,7 @@ const ce = /* @__PURE__ */ U({
|
|
|
185
185
|
}, { ...e, inputNumberClass: void 0 }, {
|
|
186
186
|
"input-id": L.value,
|
|
187
187
|
"model-value": o.value,
|
|
188
|
-
placeholder: t.autoResize ? "" : F.value,
|
|
188
|
+
placeholder: t.$t(t.autoResize ? "" : F.value),
|
|
189
189
|
pt: {
|
|
190
190
|
root: {
|
|
191
191
|
class: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as M, inject as h, ref as w, reactive as B, computed as N, onMounted as
|
|
1
|
+
import { defineComponent as M, inject as h, ref as w, reactive as B, computed as N, onMounted as $, watch as v, createBlock as E, openBlock as I, withCtx as n, createVNode as i, normalizeClass as r, unref as u, createElementVNode as g, nextTick as x } from "vue";
|
|
2
2
|
import { u as P } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { s as S } from "../vendor/primevue/password/password.esm.es.js";
|
|
4
4
|
import { _ as j } from "../fieldwrapper/index.es.js";
|
|
5
|
-
import { _
|
|
5
|
+
import { _ } from "../icon/index.es.js";
|
|
6
6
|
import { _ as F } from "../inputgroup/index.es.js";
|
|
7
7
|
import { _ as T } from "../validatormessage/index.es.js";
|
|
8
8
|
const U = ["onClick"], z = ["onClick"], K = /* @__PURE__ */ M({
|
|
@@ -26,10 +26,10 @@ const U = ["onClick"], z = ["onClick"], K = /* @__PURE__ */ M({
|
|
|
26
26
|
const m = h("preset", {}).password, e = b, C = V, d = w(e.modelValue), s = B({
|
|
27
27
|
value: void 0
|
|
28
28
|
}), p = N(() => e.invalid || !!s.errorMessage);
|
|
29
|
-
|
|
29
|
+
$(() => {
|
|
30
30
|
e.useValidator && (Object.assign(
|
|
31
31
|
s,
|
|
32
|
-
P(e.fieldName ?? "password", (a) =>
|
|
32
|
+
P(e.fieldName ?? "password", (a) => x(() => y(a == null ? void 0 : a.trim())))
|
|
33
33
|
), e.modelValue != null && (s.value = e.modelValue));
|
|
34
34
|
});
|
|
35
35
|
const y = (a) => {
|
|
@@ -77,28 +77,28 @@ const U = ["onClick"], z = ["onClick"], K = /* @__PURE__ */ M({
|
|
|
77
77
|
],
|
|
78
78
|
feedback: e.feedback,
|
|
79
79
|
invalid: p.value,
|
|
80
|
-
placeholder: e.placeholder,
|
|
80
|
+
placeholder: a.$t(e.placeholder),
|
|
81
81
|
"toggle-mask": ""
|
|
82
82
|
}, {
|
|
83
83
|
showicon: n(({ toggleCallback: o }) => {
|
|
84
84
|
var t;
|
|
85
85
|
return [
|
|
86
|
-
|
|
86
|
+
g("button", {
|
|
87
87
|
class: r([(t = u(m)) == null ? void 0 : t.showicon.class, "unset"]),
|
|
88
88
|
onClick: (c) => (o(), f(c))
|
|
89
89
|
}, [
|
|
90
|
-
i(
|
|
90
|
+
i(_, { icon: "eye" })
|
|
91
91
|
], 10, U)
|
|
92
92
|
];
|
|
93
93
|
}),
|
|
94
94
|
hideicon: n(({ toggleCallback: o }) => {
|
|
95
95
|
var t;
|
|
96
96
|
return [
|
|
97
|
-
|
|
97
|
+
g("button", {
|
|
98
98
|
class: r([(t = u(m)) == null ? void 0 : t.showicon.class, "unset"]),
|
|
99
99
|
onClick: (c) => (o(), f(c))
|
|
100
100
|
}, [
|
|
101
|
-
i(
|
|
101
|
+
i(_, { icon: "eye-off" })
|
|
102
102
|
], 10, z)
|
|
103
103
|
];
|
|
104
104
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as M, reactive as c, onMounted as N, computed as x, watch as s, createBlock as B, openBlock as F, withCtx as u, createElementVNode as P, createVNode as t, createTextVNode as $, unref as n, mergeProps as g, nextTick as _ } from "vue";
|
|
2
2
|
import { u as V } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
-
import { u as
|
|
3
|
+
import { u as I } from "../plugins/WangsVue.es.js";
|
|
4
4
|
import { s as h } from "../vendor/primevue/inputnumber/inputnumber.esm.es.js";
|
|
5
5
|
import { _ as k } from "../fieldwrapper/index.es.js";
|
|
6
6
|
import { _ as w } from "../inputgroup/index.es.js";
|
|
@@ -8,7 +8,7 @@ import { _ as O } from "../validatormessage/index.es.js";
|
|
|
8
8
|
const T = {
|
|
9
9
|
class: "flex gap-2 w-full items-center",
|
|
10
10
|
"data-wv-section": "inputwrapper"
|
|
11
|
-
}, q = /* @__PURE__ */
|
|
11
|
+
}, q = /* @__PURE__ */ M({
|
|
12
12
|
__name: "InputRangeNumber",
|
|
13
13
|
props: {
|
|
14
14
|
modelValue: {},
|
|
@@ -28,34 +28,34 @@ const T = {
|
|
|
28
28
|
},
|
|
29
29
|
emits: ["update:modelValue", "submit"],
|
|
30
30
|
setup(y, { emit: b }) {
|
|
31
|
-
const a = y, d = b, { locale: m } =
|
|
31
|
+
const a = y, d = b, { locale: m } = I("InputRangeNumber"), l = c({
|
|
32
32
|
value: void 0
|
|
33
|
-
}), o =
|
|
33
|
+
}), o = c({
|
|
34
34
|
value: void 0
|
|
35
35
|
});
|
|
36
|
-
|
|
36
|
+
N(() => {
|
|
37
37
|
a.useValidator && (Object.assign(
|
|
38
38
|
l,
|
|
39
39
|
V(
|
|
40
40
|
a.minFieldName ?? "minNumberInput",
|
|
41
|
-
(e) =>
|
|
41
|
+
(e) => f(e),
|
|
42
42
|
{ initialValue: void 0 }
|
|
43
43
|
)
|
|
44
44
|
), Object.assign(
|
|
45
45
|
o,
|
|
46
46
|
V(
|
|
47
47
|
a.maxFieldName ?? "maxNumberInput",
|
|
48
|
-
(e) =>
|
|
48
|
+
(e) => f(e),
|
|
49
49
|
{ initialValue: void 0 }
|
|
50
50
|
)
|
|
51
51
|
), a.value && (l.value = a.value[0], o.value = a.value[1])), a.invalid && a.useValidator && (l.validate(), o.validate());
|
|
52
52
|
});
|
|
53
|
-
const p =
|
|
53
|
+
const p = x(
|
|
54
54
|
() => a.invalid || !!l.errorMessage || !!o.errorMessage
|
|
55
55
|
), v = (e) => {
|
|
56
56
|
e.key === "Enter" && d("submit");
|
|
57
|
-
},
|
|
58
|
-
if (await
|
|
57
|
+
}, f = async (e) => {
|
|
58
|
+
if (await _(), typeof a.validatorMessage == "string" && a.invalid)
|
|
59
59
|
return a.validatorMessage;
|
|
60
60
|
if (typeof a.validatorMessage != "string") {
|
|
61
61
|
const { empty: i } = a.validatorMessage ?? {};
|
|
@@ -83,19 +83,19 @@ const T = {
|
|
|
83
83
|
(e) => {
|
|
84
84
|
l.value = e ? e[0] : void 0, o.value = e ? e[1] : void 0;
|
|
85
85
|
}
|
|
86
|
-
), (e, i) => (
|
|
86
|
+
), (e, i) => (F(), B(k, {
|
|
87
87
|
label: a.label,
|
|
88
88
|
"show-optional-text": e.showOptionalText
|
|
89
89
|
}, {
|
|
90
90
|
default: u(() => [
|
|
91
|
-
|
|
91
|
+
P("div", T, [
|
|
92
92
|
t(w, { invalid: p.value }, {
|
|
93
93
|
default: u(() => [
|
|
94
94
|
t(n(h), g(e.$props, {
|
|
95
95
|
modelValue: l.value,
|
|
96
96
|
"onUpdate:modelValue": i[0] || (i[0] = (r) => l.value = r),
|
|
97
97
|
max: o.value,
|
|
98
|
-
placeholder: e.placeholder ?? e.minPlaceholder ?? n(m).minPlaceholder,
|
|
98
|
+
placeholder: e.$t(e.placeholder ?? e.minPlaceholder ?? n(m).minPlaceholder),
|
|
99
99
|
"use-grouping": !1,
|
|
100
100
|
onKeydown: v,
|
|
101
101
|
class: "w-full",
|
|
@@ -104,14 +104,14 @@ const T = {
|
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
106
|
}, 8, ["invalid"]),
|
|
107
|
-
i[2] || (i[2] =
|
|
107
|
+
i[2] || (i[2] = $(" - ")),
|
|
108
108
|
t(w, { invalid: p.value }, {
|
|
109
109
|
default: u(() => [
|
|
110
110
|
t(n(h), g(e.$props, {
|
|
111
111
|
modelValue: o.value,
|
|
112
112
|
"onUpdate:modelValue": i[1] || (i[1] = (r) => o.value = r),
|
|
113
113
|
min: l.value,
|
|
114
|
-
placeholder: e.placeholder ?? e.maxPlaceholder ?? n(m).maxPlaceholder,
|
|
114
|
+
placeholder: e.$t(e.placeholder ?? e.maxPlaceholder ?? n(m).maxPlaceholder),
|
|
115
115
|
"use-grouping": !1,
|
|
116
116
|
onKeydown: v,
|
|
117
117
|
class: "w-full",
|
package/inputsearch/index.es.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as g, shallowRef as c, createElementBlock as
|
|
2
|
-
import { s as
|
|
1
|
+
import { defineComponent as g, shallowRef as c, createElementBlock as h, openBlock as x, withModifiers as v, normalizeClass as l, createElementVNode as f, createVNode as r, unref as k } from "vue";
|
|
2
|
+
import { s as _ } from "../vendor/primevue/inputtext/inputtext.esm.es.js";
|
|
3
3
|
import { _ as d } from "../icon/index.es.js";
|
|
4
|
-
const w = { class: "w-full" },
|
|
4
|
+
const w = { class: "w-full" }, S = /* @__PURE__ */ g({
|
|
5
5
|
__name: "InputSearch",
|
|
6
6
|
emits: ["search"],
|
|
7
7
|
setup(b, { emit: i }) {
|
|
8
|
-
const u = i, n = c(), e = c(), p = (
|
|
9
|
-
n.value =
|
|
8
|
+
const u = i, n = c(), e = c(), p = (t) => {
|
|
9
|
+
n.value = t.target.value || void 0, e.value = t.target.value || void 0;
|
|
10
10
|
};
|
|
11
|
-
return (
|
|
11
|
+
return (t, a) => {
|
|
12
12
|
var o, s;
|
|
13
|
-
return
|
|
14
|
-
class:
|
|
13
|
+
return x(), h("form", {
|
|
14
|
+
class: l([
|
|
15
15
|
"text-xs flex gap-1 h-[34px] px-[21px] items-center",
|
|
16
16
|
"rounded-[18px] bg-general-50 dark:!bg-general-200"
|
|
17
17
|
]),
|
|
18
|
-
onSubmit:
|
|
18
|
+
onSubmit: a[1] || (a[1] = v((m) => u("search", n.value), ["prevent"]))
|
|
19
19
|
}, [
|
|
20
20
|
f("div", w, [
|
|
21
|
-
r(_
|
|
22
|
-
class:
|
|
21
|
+
r(k(_), {
|
|
22
|
+
class: l([
|
|
23
23
|
"h-auto !shadow-none !p-0 !text-general-800 dark:!text-general-900 placeholder:text-general-200 dark:placeholder:text-general-500 !bg-general-50 dark:!bg-general-200"
|
|
24
24
|
]),
|
|
25
25
|
"model-value": e.value,
|
|
26
|
+
placeholder: t.$t("Search asset"),
|
|
26
27
|
onInput: p,
|
|
27
|
-
autocomplete: "off"
|
|
28
|
-
|
|
29
|
-
}, null, 8, ["model-value"])
|
|
28
|
+
autocomplete: "off"
|
|
29
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
30
30
|
]),
|
|
31
31
|
r(d, {
|
|
32
|
-
class:
|
|
32
|
+
class: l([
|
|
33
33
|
"text-md !text-general-400 dark:!text-general-900 !w-4 !h-4",
|
|
34
34
|
{ hidden: (o = e.value) == null ? void 0 : o.length }
|
|
35
35
|
]),
|
|
36
36
|
icon: "search"
|
|
37
37
|
}, null, 8, ["class"]),
|
|
38
38
|
r(d, {
|
|
39
|
-
class:
|
|
39
|
+
class: l([
|
|
40
40
|
"text-md !text-general-400 dark:!text-general-900 !w-4 !h-4",
|
|
41
41
|
{ hidden: !((s = e.value) != null && s.length) }
|
|
42
42
|
]),
|
|
43
|
-
onClick:
|
|
43
|
+
onClick: a[0] || (a[0] = (m) => e.value = void 0),
|
|
44
44
|
"data-ts-section": "reset-filter-icon",
|
|
45
45
|
icon: "close"
|
|
46
46
|
}, null, 8, ["class"])
|
|
@@ -49,5 +49,5 @@ const w = { class: "w-full" }, $ = /* @__PURE__ */ g({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
S as _
|
|
53
53
|
};
|