@fewangsit/wangsvue-fats 1.0.1-alpha.67 → 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 +30 -20
- package/approverinfo/index.es.js +50 -50
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +116 -100
- package/assets/lottiejs/loading-page-dark.es.js +4 -0
- package/assets/lottiejs/loading-table-dark.es.js +4 -0
- package/assets/lottiejs/no-data-dark.es.js +4 -0
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttoncopy/index.es.js +8 -8
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +48 -48
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/carousel/index.es.js +24 -24
- package/checkbox/index.es.js +5 -5
- package/columnlist/index.es.js +142 -132
- package/config/defaultProps.es.js +15 -11
- package/datatable/index.d.ts +14 -0
- package/datatable/index.es.js +520 -509
- package/datepicker/index.es.js +24 -24
- package/daypicker/index.es.js +29 -29
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +100 -100
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +106 -103
- package/dialogform/index.es.js +25 -25
- package/dialogfulltransferlog/index.es.js +98 -98
- package/dialoglinkedasset/index.es.js +61 -61
- package/dialogprintqr/index.es.js +78 -80
- 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 +17 -17
- 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 +3 -3
- 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/editor/index.es.js +51 -48
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +44 -40
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +36 -35
- package/imagecompressor/index.es.js +155 -155
- 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 +27 -27
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +47 -39
- package/loading-page-dark-e0SrRAHc.js +4 -0
- package/loading-page-dark-mz8tLHZ3.js +1 -0
- package/loading-table-dark-BGh0tAPM.js +4 -0
- package/loading-table-dark-Cky7AB_C.js +1 -0
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +17 -16
- package/multiselect/index.es.js +86 -83
- package/no-data-dark-DERIJ8Ml.js +1 -0
- package/no-data-dark-nK4e4RAM.js +4 -0
- package/package.json +1 -1
- package/plugins/WangsVue.es.js +11 -9
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/steps/index.es.js +18 -16
- package/style.css +2 -2
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +35 -32
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/transactionroles/index.es.js +4 -1
- package/treesearchinput/index.es.js +15 -15
- package/username/index.es.js +37 -37
- 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 +22487 -21781
- package/wangsvue-fats.system.js +72 -71
package/dropdown/index.es.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { s as
|
|
9
|
-
import {
|
|
10
|
-
import { _ as
|
|
1
|
+
import { defineComponent as le, onMounted as oe, computed as u, inject as I, ref as ae, shallowRef as T, reactive as te, watch as w, createBlock as m, openBlock as s, withCtx as r, createVNode as d, normalizeClass as ie, createCommentVNode as j, unref as i, renderSlot as p, mergeProps as D, createSlots as re, normalizeProps as v, guardReactiveProps as c, createElementVNode as ne, toDisplayString as k, createElementBlock as E, Fragment as R, createTextVNode as K, nextTick as se } from "vue";
|
|
2
|
+
import { u as de } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
+
import { u as ue } from "../plugins/basei18n.es.js";
|
|
4
|
+
import { u as pe } from "../plugins/WangsVue.es.js";
|
|
5
|
+
import { f as fe } from "../utils/filterOptions.util.es.js";
|
|
6
|
+
import { m as me } from "../utils/mergePropsWithDefaults.util.es.js";
|
|
7
|
+
import { a as ve } from "../utils/textFormatter.util.es.js";
|
|
8
|
+
import { s as ce } from "../vendor/primevue/dropdown/dropdown.esm.es.js";
|
|
9
|
+
import { s as z } from "../vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js";
|
|
10
|
+
import { _ as ge } from "../badge/index.es.js";
|
|
11
|
+
import { _ as ye } from "../fieldwrapper/index.es.js";
|
|
11
12
|
import { _ as B } from "../icon/index.es.js";
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { i as
|
|
15
|
-
import { c as
|
|
16
|
-
const
|
|
13
|
+
import { _ as be } from "../inputgroup/index.es.js";
|
|
14
|
+
import { _ as Ve } from "../validatormessage/index.es.js";
|
|
15
|
+
import { i as F } from "../vendor/lodash-es/isEqual.es.js";
|
|
16
|
+
import { c as W } from "../vendor/lodash-es/cloneDeep.es.js";
|
|
17
|
+
const Ee = /* @__PURE__ */ le({
|
|
17
18
|
__name: "Dropdown",
|
|
18
19
|
props: {
|
|
19
20
|
modelValue: { type: [String, Number, Boolean, Object], default: void 0 },
|
|
@@ -44,124 +45,126 @@ const Te = /* @__PURE__ */ ee({
|
|
|
44
45
|
panelMaxContent: { type: Boolean, default: !1 }
|
|
45
46
|
},
|
|
46
47
|
emits: ["update:modelValue", "show", "fieldInfoClick"],
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
setup(q, { expose: A, emit: G }) {
|
|
49
|
+
const l = q, O = G;
|
|
50
|
+
oe(() => {
|
|
51
|
+
Y();
|
|
51
52
|
});
|
|
52
|
-
const { locale: f, defaultProps:
|
|
53
|
+
const { t: M } = ue(), { locale: f, defaultProps: H } = pe("Dropdown"), U = u(() => me(l, H)), n = I("preset", {}).dropdown, J = I(
|
|
53
54
|
"preset",
|
|
54
55
|
{}
|
|
55
|
-
).inputgroupaddon, g =
|
|
56
|
-
value:
|
|
57
|
-
}),
|
|
58
|
-
var
|
|
59
|
-
return f.emptySelectionErrorMessage.replace("{label}",
|
|
56
|
+
).inputgroupaddon, g = ae(), y = T(!1), b = T(!1), C = u(() => l.invalid || !!o.errorMessage), o = te({
|
|
57
|
+
value: l.initialValue !== void 0 ? l.initialValue : l.modelValue
|
|
58
|
+
}), Q = u(() => {
|
|
59
|
+
var e;
|
|
60
|
+
return f.emptySelectionErrorMessage.replace("{label}", l.label).replace(
|
|
60
61
|
"{formattedLabel}",
|
|
61
|
-
(
|
|
62
|
+
(e = ve(l.label)) == null ? void 0 : e.toLowerCase()
|
|
62
63
|
);
|
|
63
|
-
}), V = u(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
e.
|
|
64
|
+
}), V = u(
|
|
65
|
+
() => fe(l.options).map((e) => typeof e == "string" ? M(e) : { ...e, label: M(e.label) })
|
|
66
|
+
), X = u(() => {
|
|
67
|
+
var e;
|
|
68
|
+
return l.loading ? f.loadingPlaceholder : l.placeholder ?? ((e = f.inputPlaceholder) == null ? void 0 : e.replace("{label}", l.label ?? "").replace("{lowercaseLabel}", (l.label ?? "").toLowerCase()));
|
|
69
|
+
}), Y = () => {
|
|
70
|
+
l.useValidator && (Object.assign(
|
|
68
71
|
o,
|
|
69
|
-
|
|
70
|
-
),
|
|
71
|
-
},
|
|
72
|
-
const { value: a } =
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
72
|
+
de(l.fieldName ?? "dropdown", (e) => !(e != null && e !== "") && l.mandatory ? typeof l.validatorMessage == "object" && "empty" in l.validatorMessage ? l.validatorMessage.empty : l.validatorMessage ?? Q.value : se(Z))
|
|
73
|
+
), l.initialValue !== void 0 && (o.value = l.initialValue), l.invalid && o.validate());
|
|
74
|
+
}, Z = () => l.validatorMessage && l.invalid ? l.validatorMessage : !0, _ = (e) => {
|
|
75
|
+
const { value: a } = e;
|
|
76
|
+
l.unselectOnReselect ? b.value = !0 : O("update:modelValue", a);
|
|
77
|
+
}, $ = () => {
|
|
78
|
+
if (l.optionValue) {
|
|
79
|
+
const e = V.value.find((a) => {
|
|
77
80
|
if (typeof a != "string")
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
return l.dataKey ? o.value[l.dataKey] === a[l.optionValue ?? ""][l.dataKey] : F(
|
|
82
|
+
W(a[l.optionValue ?? ""]),
|
|
83
|
+
W(o.value)
|
|
81
84
|
);
|
|
82
85
|
});
|
|
83
|
-
if (
|
|
84
|
-
return l
|
|
85
|
-
} else if (o.value && typeof o.value == "object" &&
|
|
86
|
-
return o.value[
|
|
86
|
+
if (e && typeof e != "string")
|
|
87
|
+
return e[l.optionLabel ?? ""];
|
|
88
|
+
} else if (o.value && typeof o.value == "object" && l.optionLabel && l.optionLabel in o.value)
|
|
89
|
+
return o.value[l.optionLabel];
|
|
87
90
|
return o.value;
|
|
88
|
-
},
|
|
91
|
+
}, x = () => {
|
|
89
92
|
g.value && g.value.show();
|
|
90
93
|
};
|
|
91
|
-
return
|
|
92
|
-
() =>
|
|
93
|
-
(
|
|
94
|
-
o.value =
|
|
94
|
+
return w(
|
|
95
|
+
() => l.initialValue,
|
|
96
|
+
(e) => {
|
|
97
|
+
o.value = e;
|
|
95
98
|
},
|
|
96
99
|
{ once: !0 }
|
|
97
|
-
),
|
|
98
|
-
() =>
|
|
99
|
-
(
|
|
100
|
-
o.value =
|
|
100
|
+
), w(
|
|
101
|
+
() => l.modelValue,
|
|
102
|
+
(e) => {
|
|
103
|
+
o.value = e;
|
|
101
104
|
}
|
|
102
|
-
),
|
|
105
|
+
), w(
|
|
103
106
|
() => o.value,
|
|
104
|
-
(
|
|
107
|
+
(e, a) => {
|
|
105
108
|
setTimeout(() => {
|
|
106
|
-
|
|
109
|
+
l.unselectOnReselect && b.value && (F(e, a) && e !== void 0 && (o.value = void 0), b.value = !1, O("update:modelValue", o.value));
|
|
107
110
|
}, 0);
|
|
108
111
|
}
|
|
109
|
-
),
|
|
110
|
-
showOverlay:
|
|
111
|
-
}), (
|
|
112
|
-
info:
|
|
113
|
-
label:
|
|
114
|
-
mandatory:
|
|
115
|
-
"show-optional-text":
|
|
116
|
-
onInfoClick: a[3] || (a[3] = (
|
|
112
|
+
), A({
|
|
113
|
+
showOverlay: x
|
|
114
|
+
}), (e, a) => (s(), m(ye, {
|
|
115
|
+
info: e.fieldInfo,
|
|
116
|
+
label: l.label,
|
|
117
|
+
mandatory: l.mandatory,
|
|
118
|
+
"show-optional-text": e.showOptionalText,
|
|
119
|
+
onInfoClick: a[3] || (a[3] = (h) => e.$emit("fieldInfoClick"))
|
|
117
120
|
}, {
|
|
118
121
|
default: r(() => [
|
|
119
|
-
d(
|
|
120
|
-
class:
|
|
122
|
+
d(be, {
|
|
123
|
+
class: ie([
|
|
121
124
|
{
|
|
122
|
-
"grid grid-cols-[max-content,1fr,max-content]":
|
|
123
|
-
"grid grid-cols-[1fr,max-content]": !
|
|
124
|
-
"grid grid-cols-[max-content,1fr]":
|
|
125
|
+
"grid grid-cols-[max-content,1fr,max-content]": e.$slots["addon-left"] && e.$slots["addon-right"],
|
|
126
|
+
"grid grid-cols-[1fr,max-content]": !e.$slots["addon-left"] && e.$slots["addon-right"],
|
|
127
|
+
"grid grid-cols-[max-content,1fr]": e.$slots["addon-left"] && !e.$slots["addon-right"]
|
|
125
128
|
}
|
|
126
129
|
]),
|
|
127
|
-
disabled:
|
|
128
|
-
invalid:
|
|
129
|
-
ring:
|
|
130
|
+
disabled: l.disabled,
|
|
131
|
+
invalid: C.value,
|
|
132
|
+
ring: e.inputBorder
|
|
130
133
|
}, {
|
|
131
134
|
default: r(() => {
|
|
132
|
-
var
|
|
135
|
+
var h, S, P, L, N;
|
|
133
136
|
return [
|
|
134
|
-
|
|
137
|
+
e.$slots["addon-left"] ? (s(), m(i(z), {
|
|
135
138
|
key: 0,
|
|
136
|
-
disabled:
|
|
139
|
+
disabled: l.disabled
|
|
137
140
|
}, {
|
|
138
141
|
default: r(() => [
|
|
139
|
-
p(
|
|
142
|
+
p(e.$slots, "addon-left")
|
|
140
143
|
]),
|
|
141
144
|
_: 3
|
|
142
|
-
}, 8, ["disabled"])) :
|
|
143
|
-
d(i(
|
|
145
|
+
}, 8, ["disabled"])) : j("", !0),
|
|
146
|
+
d(i(ce), D({
|
|
144
147
|
ref_key: "dropdown",
|
|
145
148
|
ref: g
|
|
146
|
-
},
|
|
149
|
+
}, l, {
|
|
147
150
|
modelValue: o.value,
|
|
148
151
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => o.value = t),
|
|
149
|
-
"aria-describedby":
|
|
150
|
-
"filter-placeholder": e.filterPlaceholder || i(f).filterPlaceholder,
|
|
151
|
-
invalid:
|
|
152
|
+
"aria-describedby": l.label + "error",
|
|
153
|
+
"filter-placeholder": e.$t(l.filterPlaceholder || i(f).filterPlaceholder),
|
|
154
|
+
invalid: C.value,
|
|
152
155
|
options: V.value,
|
|
153
|
-
placeholder:
|
|
156
|
+
placeholder: e.$t(X.value),
|
|
154
157
|
pt: {
|
|
155
|
-
list: (
|
|
156
|
-
panel: (
|
|
157
|
-
virtualScroller: (
|
|
158
|
-
wrapper: (
|
|
158
|
+
list: (h = i(n)) == null ? void 0 : h.list({ props: l }),
|
|
159
|
+
panel: (S = i(n)) == null ? void 0 : S.panel({ props: l }),
|
|
160
|
+
virtualScroller: (P = i(n)) == null ? void 0 : P.virtualScroller({ props: l }),
|
|
161
|
+
wrapper: (L = i(n)) == null ? void 0 : L.wrapper({ props: l })
|
|
159
162
|
},
|
|
160
|
-
"virtual-scroller-options": ((
|
|
161
|
-
onChange:
|
|
163
|
+
"virtual-scroller-options": ((N = V.value) == null ? void 0 : N.length) > 10 ? { itemSize: 32 } : void 0,
|
|
164
|
+
onChange: _,
|
|
162
165
|
onHide: a[1] || (a[1] = (t) => y.value = !1),
|
|
163
|
-
onShow: a[2] || (a[2] = (t) => (
|
|
164
|
-
}),
|
|
166
|
+
onShow: a[2] || (a[2] = (t) => (e.$emit("show"), y.value = !0))
|
|
167
|
+
}), re({
|
|
165
168
|
dropdownicon: r(() => [
|
|
166
169
|
d(B, v(c(i(n).dropdownicon({ state: { isShowOverlay: y.value } }))), null, 16)
|
|
167
170
|
]),
|
|
@@ -173,57 +176,57 @@ const Te = /* @__PURE__ */ ee({
|
|
|
173
176
|
]),
|
|
174
177
|
_: 2
|
|
175
178
|
}, [
|
|
176
|
-
|
|
179
|
+
e.loading ? {
|
|
177
180
|
name: "value",
|
|
178
181
|
fn: r(({ placeholder: t }) => [
|
|
179
|
-
|
|
182
|
+
ne("span", v(c(i(n).loadingplaceholder)), k(e.$t(t)), 17)
|
|
180
183
|
]),
|
|
181
184
|
key: "0"
|
|
182
185
|
} : {
|
|
183
186
|
name: "value",
|
|
184
187
|
fn: r((t) => [
|
|
185
|
-
(
|
|
188
|
+
(U.value.allowNullOption ? t.value !== void 0 : t.value != null) ? p(e.$slots, "value", {
|
|
186
189
|
key: 0,
|
|
187
190
|
originalValue: t.value,
|
|
188
|
-
value:
|
|
191
|
+
value: e.$t($())
|
|
189
192
|
}, () => [
|
|
190
|
-
|
|
191
|
-
label:
|
|
192
|
-
}), null, 16, ["label"])) : (s(),
|
|
193
|
-
|
|
193
|
+
e.valueType === "badge" ? (s(), m(ge, D({ key: 0 }, e.badgeValueProps, {
|
|
194
|
+
label: e.$t($())
|
|
195
|
+
}), null, 16, ["label"])) : (s(), E(R, { key: 1 }, [
|
|
196
|
+
K(k(e.$t($())), 1)
|
|
194
197
|
], 64))
|
|
195
|
-
]) : (s(),
|
|
196
|
-
|
|
198
|
+
]) : (s(), E(R, { key: 1 }, [
|
|
199
|
+
K(k(e.$t(t.placeholder)), 1)
|
|
197
200
|
], 64))
|
|
198
201
|
]),
|
|
199
202
|
key: "1"
|
|
200
203
|
},
|
|
201
|
-
|
|
204
|
+
e.$slots.option ? {
|
|
202
205
|
name: "option",
|
|
203
206
|
fn: r(({ option: t }) => [
|
|
204
|
-
p(
|
|
207
|
+
p(e.$slots, "option", { option: t })
|
|
205
208
|
]),
|
|
206
209
|
key: "2"
|
|
207
210
|
} : void 0,
|
|
208
|
-
|
|
211
|
+
e.$slots.footer ? {
|
|
209
212
|
name: "footer",
|
|
210
|
-
fn: r(({ value: t, options:
|
|
211
|
-
p(
|
|
212
|
-
options:
|
|
213
|
+
fn: r(({ value: t, options: ee }) => [
|
|
214
|
+
p(e.$slots, "footer", {
|
|
215
|
+
options: ee,
|
|
213
216
|
value: t
|
|
214
217
|
})
|
|
215
218
|
]),
|
|
216
219
|
key: "3"
|
|
217
220
|
} : void 0
|
|
218
221
|
]), 1040, ["modelValue", "aria-describedby", "filter-placeholder", "invalid", "options", "placeholder", "pt", "virtual-scroller-options"]),
|
|
219
|
-
|
|
222
|
+
e.$slots["addon-right"] ? (s(), m(i(z), {
|
|
220
223
|
key: 1,
|
|
221
224
|
pt: {
|
|
222
|
-
root: i(
|
|
225
|
+
root: i(J).root({
|
|
223
226
|
props: {
|
|
224
227
|
class: [
|
|
225
228
|
{
|
|
226
|
-
"!text-general-200":
|
|
229
|
+
"!text-general-200": l.disabled
|
|
227
230
|
}
|
|
228
231
|
]
|
|
229
232
|
}
|
|
@@ -231,16 +234,16 @@ const Te = /* @__PURE__ */ ee({
|
|
|
231
234
|
}
|
|
232
235
|
}, {
|
|
233
236
|
default: r(() => [
|
|
234
|
-
p(
|
|
237
|
+
p(e.$slots, "addon-right")
|
|
235
238
|
]),
|
|
236
239
|
_: 3
|
|
237
|
-
}, 8, ["pt"])) :
|
|
240
|
+
}, 8, ["pt"])) : j("", !0)
|
|
238
241
|
];
|
|
239
242
|
}),
|
|
240
243
|
_: 3
|
|
241
244
|
}, 8, ["class", "disabled", "invalid", "ring"]),
|
|
242
|
-
d(
|
|
243
|
-
id:
|
|
245
|
+
d(Ve, {
|
|
246
|
+
id: l.label + "error",
|
|
244
247
|
message: o.errorMessage
|
|
245
248
|
}, null, 8, ["id", "message"])
|
|
246
249
|
]),
|
|
@@ -249,5 +252,5 @@ const Te = /* @__PURE__ */ ee({
|
|
|
249
252
|
}
|
|
250
253
|
});
|
|
251
254
|
export {
|
|
252
|
-
|
|
255
|
+
Ee as _
|
|
253
256
|
};
|