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