@fewangsit/wangsvue-fats 1.0.1-alpha.66 → 1.0.1-alpha.68

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/animation/index.es.js +29 -20
  2. package/approverinfo/index.es.js +50 -50
  3. package/assetinfo/index.es.js +8 -8
  4. package/assets/lottiejs/loading-page-dark.es.js +4 -0
  5. package/assets/lottiejs/loading-table-dark.es.js +4 -0
  6. package/assets/lottiejs/no-data-dark.es.js +4 -0
  7. package/buttoncopy/index.es.js +8 -8
  8. package/buttonscan/index.es.js +48 -48
  9. package/buttonselecttree/index.d.ts +4 -2
  10. package/buttonselecttree/index.es.js +50 -50
  11. package/carousel/index.es.js +24 -24
  12. package/columnlist/index.es.js +142 -132
  13. package/config/defaultProps.es.js +14 -9
  14. package/datatable/index.d.ts +14 -0
  15. package/datatable/index.es.js +416 -410
  16. package/datepicker/index.es.js +22 -22
  17. package/daypicker/index.es.js +13 -13
  18. package/dialogbasictransferlog/index.es.js +25 -25
  19. package/dialogdamagelog/index.es.js +69 -66
  20. package/dialogform/index.es.js +11 -11
  21. package/dialogfulltransferlog/index.es.js +11 -11
  22. package/dialoglinkedasset/index.es.js +35 -35
  23. package/dialogprintqr/index.es.js +33 -35
  24. package/dialogselecttree/index.es.js +4 -4
  25. package/dialogselectuser/index.es.js +1 -1
  26. package/disposalreport/index.es.js +2 -2
  27. package/editor/index.es.js +51 -48
  28. package/fileupload/index.es.js +14 -14
  29. package/icon/index.es.js +27 -27
  30. package/imagecompressor/index.es.js +82 -82
  31. package/imageinputinfo/index.es.js +9 -9
  32. package/inputsearch/index.es.js +27 -27
  33. package/litedropdown/index.es.js +26 -26
  34. package/loading-page-dark-e0SrRAHc.js +4 -0
  35. package/loading-page-dark-mz8tLHZ3.js +1 -0
  36. package/loading-table-dark-BGh0tAPM.js +4 -0
  37. package/loading-table-dark-Cky7AB_C.js +1 -0
  38. package/multirow/index.es.js +11 -10
  39. package/no-data-dark-DERIJ8Ml.js +1 -0
  40. package/no-data-dark-nK4e4RAM.js +4 -0
  41. package/package.json +1 -1
  42. package/plugins/WangsVue.es.js +11 -9
  43. package/stats.html +1 -1
  44. package/steps/index.es.js +18 -16
  45. package/style.css +2 -2
  46. package/tagtype/index.es.js +13 -13
  47. package/transactionroles/index.es.js +4 -1
  48. package/treesearchinput/index.es.js +7 -7
  49. package/username/index.es.js +8 -8
  50. package/wangsvue-fats.esm.browser.js +19472 -19430
  51. package/wangsvue-fats.system.js +72 -72
@@ -1,4 +1,4 @@
1
- import { defineComponent as oe, useSlots as ie, inject as G, ref as D, shallowRef as P, computed as re, createBlock as m, openBlock as n, unref as t, mergeProps as i, withCtx as J, createElementVNode as B, normalizeProps as p, guardReactiveProps as $, createElementBlock as Q, createCommentVNode as d, createVNode as X, renderSlot as S, toDisplayString as ne, withDirectives as ue, vShow as de } from "vue";
1
+ import { defineComponent as oe, useSlots as ie, inject as G, ref as D, shallowRef as P, computed as re, createBlock as m, openBlock as n, unref as t, mergeProps as i, withCtx as J, createElementVNode as k, normalizeProps as p, guardReactiveProps as $, createElementBlock as Q, createCommentVNode as d, createVNode as X, renderSlot as S, toDisplayString as ne, withDirectives as ue, vShow as de } from "vue";
2
2
  import { u as me } from "../plugins/WangsVue.es.js";
3
3
  import { s as ce } from "../vendor/primevue/dialog/dialog.esm.es.js";
4
4
  import { _ as w } from "../button/index.es.js";
@@ -117,18 +117,18 @@ const Le = /* @__PURE__ */ oe({
117
117
  container: J(() => {
118
118
  var f, M, I, H, N, O, U, j, z, K;
119
119
  return [
120
- B("div", p($((f = t(l)) == null ? void 0 : f.container(b.value))), [
121
- B("section", i((M = t(l)) == null ? void 0 : M.mainsection, { id: "main" }), [
122
- B("div", p($((I = t(l)) == null ? void 0 : I.header)), [
120
+ k("div", p($((f = t(l)) == null ? void 0 : f.container(b.value))), [
121
+ k("section", i((M = t(l)) == null ? void 0 : M.mainsection, { id: "main" }), [
122
+ k("div", p($((I = t(l)) == null ? void 0 : I.header)), [
123
123
  S(e.$slots, "header", {}, () => {
124
- var u, h, g, k;
124
+ var u, h, g, B;
125
125
  return [
126
126
  e.headerIcon ? (n(), m(fe, i({ key: 0 }, (u = t(l)) == null ? void 0 : u.headericon, {
127
127
  icon: e.headerIcon,
128
128
  severity: e.severity,
129
129
  "aria-label": "Header Icon"
130
130
  }), null, 16, ["icon", "severity"])) : d("", !0),
131
- B("h3", p($((h = t(l)) == null ? void 0 : h.headertitle)), ne(e.header), 17),
131
+ k("h3", p($((h = t(l)) == null ? void 0 : h.headertitle)), ne(e.header), 17),
132
132
  e.$slots["aside-right"] ? (n(), m(w, i({ key: 1 }, (g = t(l)) == null ? void 0 : g.expandasidebutton, {
133
133
  label: b.value ? t(c).asideRightExpandedButtonLabel : t(c).asideRightCollapsedButtonLabel,
134
134
  onClick: a[0] || (a[0] = (R) => b.value = !b.value),
@@ -137,7 +137,7 @@ const Le = /* @__PURE__ */ oe({
137
137
  e.closable ? (n(), m(w, i({
138
138
  key: 2,
139
139
  onClick: le
140
- }, (k = t(l)) == null ? void 0 : k.closedialog, {
140
+ }, (B = t(l)) == null ? void 0 : B.closedialog, {
141
141
  icon: "close",
142
142
  "icon-class": "w-[22px] h-[22px]",
143
143
  rounded: "",
@@ -169,7 +169,7 @@ const Le = /* @__PURE__ */ oe({
169
169
  submit: A,
170
170
  visible: V.value
171
171
  }),
172
- B("div", p($((N = t(l)) == null ? void 0 : N.footer)), [
172
+ k("div", p($((N = t(l)) == null ? void 0 : N.footer)), [
173
173
  e.showStayCheckbox ? (n(), m(be, i({ key: 0 }, (O = t(l)) == null ? void 0 : O.staycheckbox, {
174
174
  label: e.stayCheckboxLabel ?? t(c).stayCheckboxLabel,
175
175
  "model-value": (U = o.value) == null ? void 0 : U.stayAfterSubmit,
@@ -183,15 +183,15 @@ const Le = /* @__PURE__ */ oe({
183
183
  ]),
184
184
  s.buttonsTemplate.length ? (n(), Q("div", p(i({ key: 1 }, (z = t(l)) == null ? void 0 : z.footerbutton)), [
185
185
  S(e.$slots, "actionButtons", { submit: W }, () => {
186
- var u, h, g, k, R, q;
186
+ var u, h, g, B, R, q;
187
187
  return [
188
188
  (u = s.buttonsTemplate) != null && u.includes("cancel") ? (n(), m(w, i({ key: 0 }, (h = t(l)) == null ? void 0 : h.cancelbtn, {
189
189
  label: e.cancelBtnLabel ?? t(c).cancelBtnLabel,
190
190
  onClick: a[2] || (a[2] = (ye) => (r("close"), r("update:visible", !1))),
191
- severity: "dark",
191
+ severity: "secondary",
192
192
  text: ""
193
193
  }), null, 16, ["label"])) : d("", !0),
194
- (g = s.buttonsTemplate) != null && g.includes("clear") ? (n(), m(w, i({ key: 1 }, (k = t(l)) == null ? void 0 : k.clearfield, {
194
+ (g = s.buttonsTemplate) != null && g.includes("clear") ? (n(), m(w, i({ key: 1 }, (B = t(l)) == null ? void 0 : B.clearfield, {
195
195
  label: e.clearBtnLabel ?? t(c).clearBtnLabel,
196
196
  onClick: F,
197
197
  class: "whitespace-nowrap",
@@ -22,7 +22,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
22
22
  }, ue = { class: "flex flex-row items-center gap-1" }, de = {
23
23
  key: 2,
24
24
  class: "flex flex-row items-center gap-1"
25
- }, ce = { class: "text-xs font-medium text-general-400" }, fe = {
25
+ }, ce = { class: "text-xs font-medium text-general-400 dark:text-general-200" }, fe = {
26
26
  key: 1,
27
27
  class: "text-xs font-medium"
28
28
  }, je = /* @__PURE__ */ G({
@@ -35,11 +35,11 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
35
35
  }),
36
36
  emits: ["update:visible"],
37
37
  setup(k) {
38
- const A = k, _ = O(k, "visible"), I = H();
38
+ const A = k, g = O(k, "visible"), I = H();
39
39
  S(() => {
40
40
  window.Cypress && (r.value = ["66406b090d664c625212ac1a", "66406b090d664c625212ac22"]);
41
41
  });
42
- const s = m(), w = m(), u = m(), h = m(0), r = K("requestIds") ?? m([]), g = p(() => {
42
+ const s = m(), w = m(), u = m(), h = m(0), r = K("requestIds") ?? m([]), _ = p(() => {
43
43
  var t;
44
44
  return (t = r.value) != null && t.length ? r.value.findIndex((e) => u.value === e) : -1;
45
45
  }), $ = p(() => {
@@ -100,18 +100,18 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
100
100
  });
101
101
  }
102
102
  }, T = (t) => {
103
- if (g.value === -1 || t === "prev" && $.value || t === "next" && j.value)
103
+ if (_.value === -1 || t === "prev" && $.value || t === "next" && j.value)
104
104
  return;
105
- const e = t === "prev" ? g.value - 1 : g.value + 1;
105
+ const e = t === "prev" ? _.value - 1 : _.value + 1;
106
106
  u.value = r.value[e];
107
107
  };
108
- return C(_, (t) => {
108
+ return C(g, (t) => {
109
109
  t && (u.value = A.id);
110
110
  }), C(u, (t) => {
111
111
  t && F();
112
112
  }), (t, e) => (o(), x(R, {
113
- visible: _.value,
114
- "onUpdate:visible": e[2] || (e[2] = (l) => _.value = l),
113
+ visible: g.value,
114
+ "onUpdate:visible": e[2] || (e[2] = (l) => g.value = l),
115
115
  draggable: !1,
116
116
  class: "!w-[600px]",
117
117
  "footer-class": "flex items-end justify-end gap-1",
@@ -200,19 +200,19 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
200
200
  }, {
201
201
  detail: b((n) => [
202
202
  n.key === "To" ? (o(), v("div", re, [
203
- e[7] || (e[7] = a("span", { class: "text-xs font-medium text-general-400" }, " Destination Group: ", -1)),
203
+ e[7] || (e[7] = a("span", { class: "text-xs font-medium text-general-400 dark:text-general-200" }, " Destination Group: ", -1)),
204
204
  i(f, {
205
205
  label: n.value
206
206
  }, null, 8, ["label"])
207
207
  ])) : n.key === "From" ? (o(), v("div", oe, [
208
208
  a("div", ue, [
209
- e[8] || (e[8] = a("span", { class: "text-xs font-medium text-general-400" }, " Destination Group: ", -1)),
209
+ e[8] || (e[8] = a("span", { class: "text-xs font-medium text-general-400 dark:text-general-200" }, " Destination Group: ", -1)),
210
210
  i(f, {
211
211
  label: n.value
212
212
  }, null, 8, ["label"])
213
213
  ]),
214
214
  i(U, {
215
- class: "!text-general-800 !text-xs -rotate-90",
215
+ class: "!text-general-800 dark:!text-general-400 !text-xs -rotate-90",
216
216
  icon: "arrow-left"
217
217
  })
218
218
  ])) : (o(), v("div", de, [
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, computed as b, ref as k, watch as T, createBlock as L, openBlock as n, mergeProps as j, createSlots as G, withCtx as C, createElementVNode as m, createVNode as S, createElementBlock as i, createCommentVNode as $, Fragment as u, renderList as w, toDisplayString as p } from "vue";
1
+ import { defineComponent as W, computed as _, ref as b, watch as T, createBlock as L, openBlock as o, mergeProps as j, createSlots as G, withCtx as C, createElementVNode as d, createVNode as S, createElementBlock as i, createCommentVNode as $, Fragment as u, renderList as x, toDisplayString as p } from "vue";
2
2
  import { AssetServices as J } from "@tagsamurai/fats-api-services";
3
3
  import "../utils/role.util.es.js";
4
4
  import { u as O } from "../utils/toast.util.es.js";
@@ -7,14 +7,14 @@ import { _ as R } from "../dialogconfirm/index.es.js";
7
7
  import { _ as U } from "../icon/index.es.js";
8
8
  import { _ as z } from "../toast/index.es.js";
9
9
  const D = { class: "flex flex-col gap-3 justify-between" }, H = { class: "flex flex-col max-h-20 overflow-y-auto" }, K = {
10
- class: "text-general-800 font-medium",
10
+ class: "text-general-800 dark:text-general-100 font-medium",
11
11
  "data-ts-section": "assetparent"
12
12
  }, M = {
13
13
  class: "flex flex-col max-h-20",
14
14
  "data-ts-section": "linked-asset-family"
15
15
  }, Q = {
16
16
  key: 3,
17
- class: "text-general-800 font-medium",
17
+ class: "text-general-800 dark:text-general-100 font-medium",
18
18
  "data-ts-section": "confirmbody"
19
19
  }, ae = /* @__PURE__ */ W({
20
20
  __name: "DialogLinkedAsset",
@@ -42,29 +42,29 @@ const D = { class: "flex flex-col gap-3 justify-between" }, H = { class: "flex f
42
42
  },
43
43
  emits: ["confirm", "update:visible"],
44
44
  setup(E) {
45
- var x;
46
- const B = O(), t = E, I = b(() => t.confirmLabel ? t.confirmLabel : t.severity === "danger" ? "Remove" : "Submit"), N = b(() => t.confirmBody ? t.confirmBody : t.severity === "success" ? "All related data will be transacted. Are you sure want to submit?" : "All related data will be removed from the list. Are you want to remove it?"), F = b(() => !!t.headerIcon || t.severity === "danger"), y = k(!1), v = k([]), h = k(!!((x = t.list) != null && x.length));
45
+ var B;
46
+ const w = O(), t = E, I = _(() => t.confirmLabel ? t.confirmLabel : t.severity === "danger" ? "Remove" : "Submit"), N = _(() => t.confirmBody ? t.confirmBody : t.severity === "success" ? "All related data will be transacted. Are you sure want to submit?" : "All related data will be removed from the list. Are you want to remove it?"), F = _(() => !!t.headerIcon || t.severity === "danger"), y = b(!1), v = b([]), g = b(!!((B = t.list) != null && B.length));
47
47
  T(
48
48
  () => t.list,
49
49
  () => {
50
- h.value = !0;
50
+ g.value = !0;
51
51
  }
52
52
  );
53
53
  const q = async () => {
54
- var o;
54
+ var n;
55
55
  try {
56
- if (!h.value) return;
56
+ if (!g.value) return;
57
57
  y.value = !0;
58
- const e = [], s = (r) => r.family.length > 1, d = ({ parent: r, children: a, family: c }, l) => {
59
- const g = (_) => _.map((A) => ({ _id: A._id, name: A.name })), { _id: f, name: V } = r ?? l;
58
+ const e = [], s = (r) => r.family.length > 1, m = ({ parent: r, children: a, family: c }, l) => {
59
+ const h = (k) => k.map((A) => ({ _id: A._id, name: A.name })), { _id: f, name: V } = r ?? l;
60
60
  return {
61
61
  parent: { _id: f, name: V },
62
62
  // If parent null | undefined, it means the current asset is parent
63
- children: a.length ? g(a) : g(c.filter((_) => _._id !== f))
63
+ children: a.length ? h(a) : h(c.filter((k) => k._id !== f))
64
64
  // Parent will always exist if children is empty
65
65
  };
66
66
  };
67
- if ((o = t.list) != null && o.length) {
67
+ if ((n = t.list) != null && n.length) {
68
68
  const { data: r } = await J.getLinkedAssetFamily(
69
69
  JSON.stringify(t.list.map((a) => a._id))
70
70
  );
@@ -73,7 +73,7 @@ const D = { class: "flex flex-col gap-3 justify-between" }, H = { class: "flex f
73
73
  (l) => l._id === a._id
74
74
  );
75
75
  if (s(a) && c) {
76
- const l = d(
76
+ const l = m(
77
77
  a,
78
78
  c
79
79
  );
@@ -85,54 +85,54 @@ const D = { class: "flex flex-col gap-3 justify-between" }, H = { class: "flex f
85
85
  }
86
86
  v.value = e;
87
87
  } catch (e) {
88
- B.removeGroup("linkedasset"), B.add({
88
+ w.removeGroup("linkedasset"), w.add({
89
89
  error: e,
90
90
  message: "Error, failed to fetch linked assets.",
91
91
  group: "linkedasset"
92
92
  });
93
93
  } finally {
94
- y.value = !1, h.value = !1;
94
+ y.value = !1, g.value = !1;
95
95
  }
96
96
  };
97
- return (o, e) => (n(), L(R, j(o.$props, {
97
+ return (n, e) => (o(), L(R, j(n.$props, {
98
98
  "confirm-label": I.value,
99
99
  list: void 0,
100
100
  "show-icon": F.value,
101
- onConfirm: e[1] || (e[1] = (s) => o.$emit("confirm", v.value)),
101
+ onConfirm: e[1] || (e[1] = (s) => n.$emit("confirm", v.value)),
102
102
  onShow: q,
103
- "onUpdate:visible": e[2] || (e[2] = (s) => o.$emit("update:visible", s)),
103
+ "onUpdate:visible": e[2] || (e[2] = (s) => n.$emit("update:visible", s)),
104
104
  "data-ts-name": "dialoglinkedasset"
105
105
  }), G({
106
106
  body: C(() => [
107
- m("div", D, [
108
- o.type === "confirmation" ? (n(), i(u, { key: 0 }, [
109
- m("ul", H, [
110
- (n(!0), i(u, null, w(o.list, (s) => (n(), i("li", {
107
+ d("div", D, [
108
+ n.type === "confirmation" ? (o(), i(u, { key: 0 }, [
109
+ d("ul", H, [
110
+ (o(!0), i(u, null, x(n.list, (s) => (o(), i("li", {
111
111
  key: s._id,
112
- class: "text-general-800 font-medium",
112
+ class: "text-general-800 dark:text-general-100 font-medium",
113
113
  "data-ts-section": "assetlistitem"
114
114
  }, p(s.name.nameWithSequence), 1))), 128))
115
115
  ]),
116
- e[3] || (e[3] = m("p", { class: "text-general-800 font-medium" }, " The following assets have other assets linked to them: ", -1))
116
+ e[3] || (e[3] = d("p", { class: "text-general-800 dark:text-general-100 font-medium" }, " The following assets have other assets linked to them: ", -1))
117
117
  ], 64)) : $("", !0),
118
- y.value ? (n(), L(U, {
118
+ y.value ? (o(), L(U, {
119
119
  key: 1,
120
- class: "animate-spin h-6 w-6 self-center cursor-default !text-general-200 py-4",
120
+ class: "animate-spin h-6 w-6 self-center cursor-default !text-general-200 dark:!text-general-500 py-4",
121
121
  icon: "loader-4"
122
- })) : (n(!0), i(u, { key: 2 }, w(v.value, (s) => (n(), i("div", {
122
+ })) : (o(!0), i(u, { key: 2 }, x(v.value, (s) => (o(), i("div", {
123
123
  key: s.parent._id,
124
124
  class: "flex flex-col gap-0.5"
125
125
  }, [
126
- m("span", K, p(s.parent.name.nameWithSequence) + ": ", 1),
127
- m("ul", M, [
128
- (n(!0), i(u, null, w(s.children, (d) => (n(), i("li", {
129
- key: d._id,
130
- class: "text-general-800 font-medium",
126
+ d("span", K, p(s.parent.name.nameWithSequence) + ": ", 1),
127
+ d("ul", M, [
128
+ (o(!0), i(u, null, x(s.children, (m) => (o(), i("li", {
129
+ key: m._id,
130
+ class: "text-general-800 dark:text-general-100 font-medium",
131
131
  "data-ts-section": "assetchild"
132
- }, p(d.name.nameWithSequence), 1))), 128))
132
+ }, p(m.name.nameWithSequence), 1))), 128))
133
133
  ])
134
134
  ]))), 128)),
135
- o.type === "confirmation" ? (n(), i("p", Q, p(N.value), 1)) : $("", !0)
135
+ n.type === "confirmation" ? (o(), i("p", Q, p(N.value), 1)) : $("", !0)
136
136
  ]),
137
137
  S(z, { group: "linkedasset" })
138
138
  ]),
@@ -142,7 +142,7 @@ const D = { class: "flex flex-col gap-3 justify-between" }, H = { class: "flex f
142
142
  name: "footer",
143
143
  fn: C(() => [
144
144
  S(P, {
145
- onClick: e[0] || (e[0] = (s) => o.$emit("update:visible", !1)),
145
+ onClick: e[0] || (e[0] = (s) => n.$emit("update:visible", !1)),
146
146
  "data-ts-section": "closebutton",
147
147
  label: "Close",
148
148
  outlined: ""