@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,11 +1,11 @@
1
- import { defineComponent as j, computed as v, ref as B, shallowRef as $, watch as V, createElementBlock as R, openBlock as u, Fragment as J, createVNode as l, withCtx as S, createElementVNode as b, createCommentVNode as m, unref as q, createBlock as k, createTextVNode as O, toDisplayString as H } from "vue";
1
+ import { defineComponent as J, computed as v, ref as V, shallowRef as x, watch as q, createElementBlock as R, openBlock as u, Fragment as O, createVNode as l, withCtx as S, createElementVNode as b, createCommentVNode as m, unref as I, createBlock as k, createTextVNode as H, toDisplayString as F } from "vue";
2
2
  import { DamageServices as K, AssetServices as P } from "@tagsamurai/fats-api-services";
3
3
  import { u as X, _ as Y } from "../assetinfo/index.es.js";
4
4
  import { a as Z } from "../utils/role.util.es.js";
5
5
  import { u as ee } from "../utils/toast.util.es.js";
6
- import { _ as I } from "../badge/index.es.js";
6
+ import { _ as E } from "../badge/index.es.js";
7
7
  import { _ as te } from "../button/index.es.js";
8
- import { _ as E } from "../buttonscan/index.es.js";
8
+ import { _ as Q } from "../buttonscan/index.es.js";
9
9
  import { _ as ae } from "../dialogconfirm/index.es.js";
10
10
  import { _ as se } from "../dialogform/index.es.js";
11
11
  import { _ as oe } from "../icon/index.es.js";
@@ -22,7 +22,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
22
22
  }, pe = { class: "flex" }, fe = {
23
23
  key: 0,
24
24
  class: "flex mr-1"
25
- }, Ue = /* @__PURE__ */ j({
25
+ }, Ue = /* @__PURE__ */ J({
26
26
  __name: "DialogReportDamage",
27
27
  props: {
28
28
  id: {},
@@ -33,49 +33,49 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
33
33
  submitFunction: { type: Function }
34
34
  },
35
35
  emits: ["update:visible", "reported"],
36
- setup(Q, { emit: G }) {
37
- const r = Q, g = G, { plan: L } = JSON.parse(
36
+ setup(G, { emit: L }) {
37
+ const r = G, g = L, { plan: M } = JSON.parse(
38
38
  localStorage.getItem("user") ?? "{}"
39
- ), { setLoading: F } = X(), c = ee(), h = v(() => r.visible), w = v(
39
+ ), { setLoading: T } = X(), c = ee(), h = v(() => r.visible), w = v(
40
40
  () => {
41
- var s, e, t, a;
42
- return ((e = (s = i.value) == null ? void 0 : s.asset) == null ? void 0 : e.rfid) || ((a = (t = i.value) == null ? void 0 : t.asset) == null ? void 0 : a.qr);
41
+ var a, e, t, s;
42
+ return ((e = (a = i.value) == null ? void 0 : a.asset) == null ? void 0 : e.rfid) || ((s = (t = i.value) == null ? void 0 : t.asset) == null ? void 0 : s.qr);
43
43
  }
44
- ), T = B(), i = B(), x = $(!1), n = $(!1), D = $(), p = v(() => {
45
- var s, e;
46
- return ((e = (s = i.value) == null ? void 0 : s.asset) == null ? void 0 : e.tagReported) ?? {};
47
- }), M = v(() => {
48
- var o, d, f, _, C, N;
49
- const s = (o = p.value) == null ? void 0 : o.qr, e = (d = p.value) == null ? void 0 : d.rfid, t = !!((_ = (f = i.value) == null ? void 0 : f.asset) != null && _.qr), a = !!((N = (C = i.value) == null ? void 0 : C.asset) != null && N.rfid);
50
- return (!e && !s || !s && t || !e && a) && !n.value;
51
- }), U = v(() => {
52
- const { qr: s, rfid: e } = p.value ?? {};
53
- return s && e ? "RFID & QR Reported" : e ? "RFID Reported" : s ? "QR Reported" : "";
54
- }), W = async (s) => {
44
+ ), U = V(), i = V(), $ = x(!1), n = x(!1), D = x(), p = v(() => {
45
+ var a, e;
46
+ return ((e = (a = i.value) == null ? void 0 : a.asset) == null ? void 0 : e.tagReported) ?? {};
47
+ }), W = v(() => {
48
+ var o, d, f, _, N, B;
49
+ const a = (o = p.value) == null ? void 0 : o.qr, e = (d = p.value) == null ? void 0 : d.rfid, t = !!((_ = (f = i.value) == null ? void 0 : f.asset) != null && _.qr), s = !!((B = (N = i.value) == null ? void 0 : N.asset) != null && B.rfid);
50
+ return (!e && !a || !a && t || !e && s) && !n.value;
51
+ }), A = v(() => {
52
+ const { qr: a, rfid: e } = p.value ?? {};
53
+ return a && e ? "RFID & QR Reported" : e ? "RFID Reported" : a ? "QR Reported" : "";
54
+ }), z = async (a) => {
55
55
  try {
56
- F(!0);
56
+ T(!0);
57
57
  const e = {
58
- notes: s.formValues.notes,
59
- image: s.formValues.image,
58
+ notes: a.formValues.notes,
59
+ image: a.formValues.image,
60
60
  reportSource: r.reportSource,
61
61
  serialNumber: D.value
62
62
  }, t = "Success, damaged asset report has been submitted.";
63
63
  if (r.submitFunction)
64
64
  await r.submitFunction(e) && (c.add({ message: r.successMessage ?? t }), g("reported"), y());
65
65
  else {
66
- const { data: a } = await K.putReportDamage(r.id, e);
67
- a && (c.add({ message: r.successMessage ?? t }), g("reported"), y());
66
+ const { data: s } = await K.putReportDamage(r.id, e);
67
+ s && (c.add({ message: r.successMessage ?? t }), g("reported"), y());
68
68
  }
69
69
  } catch (e) {
70
70
  c.add({ error: e, message: "Error, failed to report damaged asset." });
71
71
  } finally {
72
- F(!1);
72
+ T(!1);
73
73
  }
74
- }, A = async (s, e, t) => {
75
- var a;
74
+ }, C = async (a, e, t) => {
75
+ var s;
76
76
  try {
77
77
  const { data: o } = await P.matchAssetWithTag(r.id, e);
78
- return D.value = t, (a = o == null ? void 0 : o.data) != null && a.totalRecords ? !0 : (c.add({
78
+ return D.value = t, (s = o == null ? void 0 : o.data) != null && s.totalRecords ? !0 : (c.add({
79
79
  severity: "error",
80
80
  message: "Error, failed to verify. TAG doesn't match.",
81
81
  group: "scan-error-validation"
@@ -88,20 +88,20 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
88
88
  });
89
89
  }
90
90
  return !1;
91
- }, z = () => {
92
- x.value = !0, y();
91
+ }, j = () => {
92
+ $.value = !0, y();
93
93
  }, y = () => {
94
94
  g("update:visible", !1);
95
95
  };
96
- return V(h, () => {
96
+ return q(h, () => {
97
97
  n.value = !!r.byUser, D.value = void 0;
98
- }), V(n, (s) => {
98
+ }), q(n, (a) => {
99
99
  var e;
100
- s || (e = T.value.form) == null || e.clearField();
101
- }), (s, e) => (u(), R(J, null, [
100
+ a || (e = U.value.form) == null || e.clearField();
101
+ }), (a, e) => (u(), R(O, null, [
102
102
  l(se, {
103
103
  ref_key: "dialogForm",
104
- ref: T,
104
+ ref: U,
105
105
  visible: h.value,
106
106
  "onUpdate:visible": e[2] || (e[2] = (t) => h.value = t),
107
107
  "buttons-template": ["cancel", "submit"],
@@ -118,8 +118,8 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
118
118
  confirm: S((t) => [
119
119
  l(ae, {
120
120
  visible: t.visible,
121
- onConfirm: (a) => t.submit(W),
122
- "onUpdate:visible": (a) => !a && t.hide(),
121
+ onConfirm: (s) => t.submit(z),
122
+ "onUpdate:visible": (s) => !s && t.hide(),
123
123
  body: "Are you sure want to continue?",
124
124
  "confirm-label": "Continue",
125
125
  "data-ts-section": "confirm-dialog",
@@ -127,35 +127,35 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
127
127
  severity: "danger"
128
128
  }, {
129
129
  body: S(() => {
130
- var a, o, d;
130
+ var s, o, d;
131
131
  return [
132
132
  b("p", null, [
133
- b("span", de, H(((d = (o = (a = i.value) == null ? void 0 : a.asset) == null ? void 0 : o.name) == null ? void 0 : d.nameWithSequence) ?? "-"), 1),
134
- e[5] || (e[5] = O(" will be reported as damaged asset. "))
133
+ b("span", de, F(((d = (o = (s = i.value) == null ? void 0 : s.asset) == null ? void 0 : o.name) == null ? void 0 : d.nameWithSequence) ?? "-"), 1),
134
+ H(" " + F(a.$t("will be reported as damaged asset.")), 1)
135
135
  ]),
136
- e[6] || (e[6] = b("p", null, "Are you sure want to continue?", -1))
136
+ b("p", null, F(a.$t("Are you sure want to continue?")), 1)
137
137
  ];
138
138
  }),
139
139
  _: 2
140
140
  }, 1032, ["visible", "onConfirm", "onUpdate:visible"])
141
141
  ]),
142
142
  fields: S(() => {
143
- var t, a, o, d, f;
143
+ var t, s, o, d, f;
144
144
  return [
145
145
  b("div", ue, [
146
146
  l(Y, {
147
147
  id: r.id,
148
148
  ref_key: "assetInfo",
149
149
  ref: i,
150
- "use-tag-type": q(Z)() !== "Basic"
150
+ "use-tag-type": I(Z)() !== "Basic"
151
151
  }, null, 8, ["id", "use-tag-type"]),
152
152
  (t = i.value) != null && t.asset ? (u(), R("div", me, [
153
- !r.byUser && w.value && q(L) !== "Basic" ? (u(), R("div", ce, [
153
+ !r.byUser && w.value && I(M) !== "Basic" ? (u(), R("div", ce, [
154
154
  b("div", pe, [
155
- (o = (a = i.value) == null ? void 0 : a.asset) != null && o.rfid ? (u(), R("div", fe, [
156
- l(E, {
155
+ (o = (s = i.value) == null ? void 0 : s.asset) != null && o.rfid ? (u(), R("div", fe, [
156
+ l(Q, {
157
157
  disabled: p.value.rfid,
158
- "scan-validation": A,
158
+ "scan-validation": C,
159
159
  onScan: e[0] || (e[0] = (_) => n.value = !0),
160
160
  size: "small"
161
161
  }, null, 8, ["disabled"]),
@@ -166,28 +166,28 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
166
166
  severity: "primary"
167
167
  })
168
168
  ])) : m("", !0),
169
- (f = (d = i.value) == null ? void 0 : d.asset) != null && f.qr ? (u(), k(E, {
169
+ (f = (d = i.value) == null ? void 0 : d.asset) != null && f.qr ? (u(), k(Q, {
170
170
  key: 1,
171
171
  disabled: p.value.qr,
172
- "scan-validation": A,
172
+ "scan-validation": C,
173
173
  onScan: e[1] || (e[1] = (_) => n.value = !0),
174
174
  size: "small",
175
175
  type: "QR"
176
176
  }, null, 8, ["disabled"])) : m("", !0)
177
177
  ]),
178
- l(I, {
178
+ l(E, {
179
179
  label: n.value ? "Verified" : "Unverified",
180
180
  severity: n.value ? "success" : "warning"
181
181
  }, null, 8, ["label", "severity"]),
182
- U.value ? (u(), k(I, {
182
+ A.value ? (u(), k(E, {
183
183
  key: 0,
184
- label: U.value,
184
+ label: A.value,
185
185
  format: "nowrap",
186
186
  severity: "danger"
187
187
  }, null, 8, ["label"])) : m("", !0),
188
- M.value ? (u(), k(te, {
188
+ W.value ? (u(), k(te, {
189
189
  key: 1,
190
- onClick: z,
190
+ onClick: j,
191
191
  label: "Report TAG",
192
192
  text: ""
193
193
  })) : m("", !0)
@@ -230,8 +230,8 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
230
230
  }, 8, ["visible"]),
231
231
  l(ne, {
232
232
  id: r.id,
233
- visible: x.value,
234
- "onUpdate:visible": e[3] || (e[3] = (t) => x.value = t),
233
+ visible: $.value,
234
+ "onUpdate:visible": e[3] || (e[3] = (t) => $.value = t),
235
235
  onReported: e[4] || (e[4] = (t) => g("reported"))
236
236
  }, null, 8, ["id", "visible"])
237
237
  ], 64));
@@ -1,12 +1,12 @@
1
- import { defineComponent as x, computed as r, ref as k, createBlock as f, openBlock as b, withCtx as l, createElementVNode as o, createVNode as y, unref as R, createTextVNode as B, toDisplayString as v } from "vue";
2
- import { TrackingServices as C, MissingServices as $ } from "@tagsamurai/fats-api-services";
3
- import { u as F, _ as N } from "../assetinfo/index.es.js";
4
- import { a as A } from "../utils/role.util.es.js";
5
- import { u as E } from "../utils/toast.util.es.js";
6
- import { _ as I } from "../dialogconfirm/index.es.js";
7
- import { _ as U } from "../dialogform/index.es.js";
8
- import { _ as V } from "../textarea/index.es.js";
9
- const T = { class: "font-bold" }, W = { class: "flex flex-col gap-3" }, J = /* @__PURE__ */ x({
1
+ import { defineComponent as $, computed as l, ref as k, resolveDirective as R, createBlock as b, openBlock as y, withCtx as m, createElementVNode as p, createVNode as v, unref as x, withDirectives as B, toDisplayString as C } from "vue";
2
+ import { TrackingServices as F, MissingServices as A } from "@tagsamurai/fats-api-services";
3
+ import { u as D, _ as E } from "../assetinfo/index.es.js";
4
+ import { a as I } from "../utils/role.util.es.js";
5
+ import { u as N } from "../utils/toast.util.es.js";
6
+ import { _ as U } from "../dialogconfirm/index.es.js";
7
+ import { _ as V } from "../dialogform/index.es.js";
8
+ import { _ as W } from "../textarea/index.es.js";
9
+ const H = { class: "flex flex-col gap-3" }, K = /* @__PURE__ */ $({
10
10
  __name: "DialogReportMissing",
11
11
  props: {
12
12
  id: {},
@@ -20,99 +20,107 @@ const T = { class: "font-bold" }, W = { class: "flex flex-col gap-3" }, J = /* @
20
20
  },
21
21
  emits: ["update:visible", "reported"],
22
22
  setup(_, { emit: M }) {
23
- const e = _, a = M, { setLoading: m } = F(), n = E(), p = r(() => e.visible), h = r(
23
+ const e = _, i = M, { setLoading: c } = D(), o = N(), d = l(() => e.visible), h = l(
24
24
  () => e.permanentlyMissing ? "Report Permanently Missing" : "Report Missing"
25
- ), S = r(
25
+ ), S = l(
26
26
  () => e.permanentlyMissing ? "Report as Permanenly Missing" : "Report Missing Asset"
27
- ), d = k(), w = async (c) => {
27
+ ), u = k(), w = async (r) => {
28
28
  try {
29
- m(!0);
29
+ c(!0);
30
30
  const s = {
31
- notes: c.formValues.notes,
31
+ notes: r.formValues.notes,
32
32
  reportSource: e.reportSource
33
- }, t = e.permanentlyMissing ? "Success, asset has been reported as permanently missing." : "Success, missing asset has been reported.";
33
+ }, a = e.permanentlyMissing ? "Success, asset has been reported as permanently missing." : "Success, missing asset has been reported.";
34
34
  if (e.submitWithoutApi)
35
- n.add({ message: e.successMessage ?? t }), a("reported", s), a("update:visible", !1);
35
+ o.add({ message: e.successMessage ?? a }), i("reported", s), i("update:visible", !1);
36
36
  else if (e.submitFunction)
37
- await e.submitFunction(s) && (n.add({ message: e.successMessage ?? t }), a("reported"), a("update:visible", !1));
37
+ await e.submitFunction(s) && (o.add({ message: e.successMessage ?? a }), i("reported"), i("update:visible", !1));
38
38
  else {
39
- const { data: i } = e.permanentlyMissing ? await C.putReportPermanentlyMissing(
39
+ const { data: t } = e.permanentlyMissing ? await F.putReportPermanentlyMissing(
40
40
  e.trackingId ?? "",
41
41
  s
42
- ) : await $.putReportMissing(e.id, s);
43
- i && (n.add({ message: e.successMessage ?? t }), a("reported"), a("update:visible", !1));
42
+ ) : await A.putReportMissing(e.id, s);
43
+ t && (o.add({ message: e.successMessage ?? a }), i("reported"), i("update:visible", !1));
44
44
  }
45
45
  } catch (s) {
46
- const t = e.permanentlyMissing ? "Error, failed to report asset as permanently missing." : "Error, failed to report missing asset.";
47
- n.add({ error: s, message: t });
46
+ const a = e.permanentlyMissing ? "Error, failed to report asset as permanently missing." : "Error, failed to report missing asset.";
47
+ o.add({ error: s, message: a });
48
48
  } finally {
49
- m(!1);
49
+ c(!1);
50
50
  }
51
51
  };
52
- return (c, s) => (b(), f(U, {
53
- visible: p.value,
54
- "onUpdate:visible": s[0] || (s[0] = (t) => p.value = t),
55
- "buttons-template": ["cancel", "submit"],
56
- header: h.value,
57
- "reset-after-submit": !1,
58
- "show-stay-checkbox": !1,
59
- "use-clear-btn": !1,
60
- onClose: s[1] || (s[1] = (t) => a("update:visible", !1)),
61
- action: "Submit",
62
- closable: "",
63
- "data-ts-name": "report-missing",
64
- width: "large"
65
- }, {
66
- confirm: l((t) => [
67
- y(I, {
68
- header: S.value,
69
- visible: t.visible,
70
- onConfirm: (i) => t.submit(w),
71
- "onUpdate:visible": (i) => !i && t.hide(),
72
- "confirm-label": "Report",
73
- "data-ts-section": "confirm-dialog",
74
- severity: "danger"
75
- }, {
76
- body: l(() => {
77
- var i, u, g;
78
- return [
79
- o("p", null, [
80
- o("span", T, v(((g = (u = (i = d.value) == null ? void 0 : i.asset) == null ? void 0 : u.name) == null ? void 0 : g.nameWithSequence) ?? "-"), 1),
81
- B(" will be reported as " + v(e.permanentlyMissing ? "permanently missing asset" : "missing asset") + ". ", 1)
82
- ]),
83
- s[2] || (s[2] = o("p", null, "Are you sure you want to report it?", -1))
84
- ];
85
- }),
86
- _: 2
87
- }, 1032, ["header", "visible", "onConfirm", "onUpdate:visible"])
88
- ]),
89
- fields: l(() => [
90
- o("div", W, [
91
- (b(), f(N, {
92
- id: e.id,
93
- key: e.id,
94
- ref_key: "assetInfo",
95
- ref: d,
96
- "use-tag-type": R(A)() !== "Basic"
97
- }, null, 8, ["id", "use-tag-type"])),
98
- y(V, {
99
- "custom-validation": { empty: "Note must not be empty" },
100
- "max-input": 120,
101
- rows: 3,
102
- "data-ts-section": "notes-input",
103
- "field-name": "notes",
104
- "input-class": "!min-h-[67px]",
105
- label: "Note",
106
- mandatory: "",
107
- placeholder: "Enter note",
108
- "use-validator": ""
109
- })
110
- ])
111
- ]),
112
- _: 1
113
- }, 8, ["visible", "header"]));
52
+ return (r, s) => {
53
+ const a = R("safe-html");
54
+ return y(), b(V, {
55
+ visible: d.value,
56
+ "onUpdate:visible": s[0] || (s[0] = (t) => d.value = t),
57
+ "buttons-template": ["cancel", "submit"],
58
+ header: h.value,
59
+ "reset-after-submit": !1,
60
+ "show-stay-checkbox": !1,
61
+ "use-clear-btn": !1,
62
+ onClose: s[1] || (s[1] = (t) => i("update:visible", !1)),
63
+ action: "Submit",
64
+ closable: "",
65
+ "data-ts-name": "report-missing",
66
+ width: "large"
67
+ }, {
68
+ confirm: m((t) => [
69
+ v(U, {
70
+ header: S.value,
71
+ visible: t.visible,
72
+ onConfirm: (n) => t.submit(w),
73
+ "onUpdate:visible": (n) => !n && t.hide(),
74
+ "confirm-label": "Report",
75
+ "data-ts-section": "confirm-dialog",
76
+ severity: "danger"
77
+ }, {
78
+ body: m(() => {
79
+ var n, f, g;
80
+ return [
81
+ B(p("p", null, null, 512), [
82
+ [
83
+ a,
84
+ r.$t(
85
+ `|%s| will be reported as ${e.permanentlyMissing ? "permanently missing asset" : "missing asset"}`,
86
+ ((g = (f = (n = u.value) == null ? void 0 : n.asset) == null ? void 0 : f.name) == null ? void 0 : g.nameWithSequence) ?? "-"
87
+ )
88
+ ]
89
+ ]),
90
+ p("p", null, C(r.$t("Are you sure you want to report it?")), 1)
91
+ ];
92
+ }),
93
+ _: 2
94
+ }, 1032, ["header", "visible", "onConfirm", "onUpdate:visible"])
95
+ ]),
96
+ fields: m(() => [
97
+ p("div", H, [
98
+ (y(), b(E, {
99
+ id: e.id,
100
+ key: e.id,
101
+ ref_key: "assetInfo",
102
+ ref: u,
103
+ "use-tag-type": x(I)() !== "Basic"
104
+ }, null, 8, ["id", "use-tag-type"])),
105
+ v(W, {
106
+ "custom-validation": { empty: "Note must not be empty" },
107
+ "max-input": 120,
108
+ rows: 3,
109
+ "data-ts-section": "notes-input",
110
+ "field-name": "notes",
111
+ "input-class": "!min-h-[67px]",
112
+ label: "Note",
113
+ mandatory: "",
114
+ placeholder: "Enter note",
115
+ "use-validator": ""
116
+ })
117
+ ])
118
+ ]),
119
+ _: 1
120
+ }, 8, ["visible", "header"]);
121
+ };
114
122
  }
115
123
  });
116
124
  export {
117
- J as _
125
+ K as _
118
126
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as G, mergeModels as T, useModel as P, inject as U, ref as o, computed as W, watch as b, createBlock as N, openBlock as d, unref as f, createSlots as O, withCtx as g, createVNode as B, mergeProps as z, renderSlot as D, createElementVNode as K, createElementBlock as k, createCommentVNode as h, normalizeClass as V, toDisplayString as L, Fragment as I, renderList as Y, withDirectives as q, vShow as J } from "vue";
1
+ import { defineComponent as P, mergeModels as T, useModel as U, inject as W, ref as o, computed as x, watch as b, createBlock as N, openBlock as d, unref as f, createSlots as O, withCtx as g, createVNode as B, mergeProps as z, renderSlot as $, createElementVNode as D, createElementBlock as k, createCommentVNode as h, normalizeClass as V, toDisplayString as K, Fragment as I, renderList as Y, withDirectives as q, vShow as J } from "vue";
2
2
  import { g as Q } from "../utils/object.util.es.js";
3
3
  import { _ as j } from "../button/index.es.js";
4
4
  import { _ as R } from "../dialog/index.es.js";
@@ -15,7 +15,7 @@ const ee = {
15
15
  }, te = {
16
16
  class: "flex gap-1 items-center justify-end",
17
17
  "data-wv-section": "footer-button"
18
- }, ue = /* @__PURE__ */ G({
18
+ }, ue = /* @__PURE__ */ P({
19
19
  __name: "DialogSelectTree",
20
20
  props: /* @__PURE__ */ T({
21
21
  fetchTree: {},
@@ -77,8 +77,8 @@ const ee = {
77
77
  visibleModifiers: {}
78
78
  }),
79
79
  emits: /* @__PURE__ */ T(["select", "hide"], ["update:visible"]),
80
- setup($, { expose: A, emit: x }) {
81
- const s = $, C = x, n = P($, "visible"), v = U("preset", {}).dialog, r = o(), p = o(""), y = o(""), m = o([]), c = o(), S = o(), E = o(!1), u = o(), w = o(), H = W(() => s.header ? s.header : s.type === "group" ? "Select Group" : "Select Category"), M = (e = !0) => {
80
+ setup(L, { expose: A, emit: F }) {
81
+ const s = L, C = F, n = U(L, "visible"), v = W("preset", {}).dialog, r = o(), p = o(""), y = o(""), m = o([]), c = o(), S = o(), E = o(!1), u = o(), w = o(), H = x(() => s.header ? s.header : s.type === "group" ? "Select Group" : "Select Category"), M = (e = !0) => {
82
82
  c.value = u.value, S.value = w.value, Object.keys(c.value ?? {}).length ? (C("select", {
83
83
  keys: c.value,
84
84
  selectedNodes: m.value,
@@ -148,7 +148,7 @@ const ee = {
148
148
  header: g(() => {
149
149
  var t;
150
150
  return [
151
- D(e.$slots, "header", {
151
+ $(e.$slots, "header", {
152
152
  dialogHeader: H.value,
153
153
  filter: p.value,
154
154
  isLoading: !!((t = r.value) != null && t.isLoading),
@@ -159,20 +159,22 @@ const ee = {
159
159
  }, () => {
160
160
  var a;
161
161
  return [
162
- K("div", ee, [
163
- K("h3", {
162
+ D("div", ee, [
163
+ D("h3", {
164
164
  class: V([...f(v).title.class, "!leading-6"])
165
- }, L(H.value), 3),
165
+ }, K(e.$t(H.value)), 3),
166
166
  e.lists ? (d(), k("ul", le, [
167
- (d(!0), k(I, null, Y(e.lists, (i, F) => (d(), k("li", {
168
- key: F,
169
- class: "text-xs leading-[16.39px] tracking-[0.02em] font-medium text-general-800 list-disc ps-[6px]"
170
- }, L(e.listLabel && typeof i != "string" ? f(Q)(i, e.listLabel) : i), 1))), 128))
167
+ (d(!0), k(I, null, Y(e.lists, (i, G) => (d(), k("li", {
168
+ key: G,
169
+ class: "text-xs leading-[16.39px] tracking-[0.02em] font-medium text-general-800 dark:text-white list-disc ps-[6px]"
170
+ }, K(e.$t(
171
+ e.listLabel && typeof i != "string" ? f(Q)(i, e.listLabel) : i
172
+ )), 1))), 128))
171
173
  ])) : h("", !0),
172
174
  e.subHeader ? (d(), k("h4", {
173
175
  key: 1,
174
176
  class: V([...f(v).title.class, "!leading-6 text-sm"])
175
- }, L(e.subHeader), 3)) : h("", !0),
177
+ }, K(e.$t(e.subHeader)), 3)) : h("", !0),
176
178
  (a = r.value) != null && a.isLoading ? h("", !0) : (d(), N(Z, {
177
179
  key: 2,
178
180
  modelValue: p.value,
@@ -217,7 +219,7 @@ const ee = {
217
219
  e.$slots.treenode ? {
218
220
  name: "default",
219
221
  fn: g(({ node: t, checked: a, disabled: i }) => [
220
- D(e.$slots, "treenode", {
222
+ $(e.$slots, "treenode", {
221
223
  checked: a,
222
224
  disabled: i,
223
225
  node: t
@@ -232,7 +234,7 @@ const ee = {
232
234
  s.readonly ? void 0 : {
233
235
  name: "footer",
234
236
  fn: g(() => [
235
- D(e.$slots, "footer", {}, () => {
237
+ $(e.$slots, "footer", {}, () => {
236
238
  var t;
237
239
  return [
238
240
  e.allowEmptySelection ? h("", !0) : q((d(), N(_, {
@@ -242,7 +244,7 @@ const ee = {
242
244
  }, null, 8, ["message"])), [
243
245
  [J, !!y.value]
244
246
  ]),
245
- K("div", te, [
247
+ D("div", te, [
246
248
  B(j, {
247
249
  onClick: l[5] || (l[5] = (a) => n.value = !1),
248
250
  label: "Cancel",
@@ -1,4 +1,4 @@
1
- import { ref as u, defineComponent as S, computed as $, watch as C, createBlock as N, openBlock as c, withCtx as v, createElementVNode as i, createElementBlock as f, createCommentVNode as y, createVNode as n, Fragment as U, renderList as D, toDisplayString as h, unref as B, renderSlot as P } from "vue";
1
+ import { ref as c, defineComponent as F, computed as S, watch as C, createBlock as N, openBlock as u, withCtx as y, createElementVNode as i, createElementBlock as f, createCommentVNode as h, createVNode as n, Fragment as U, renderList as D, toDisplayString as b, unref as B, renderSlot as P } from "vue";
2
2
  import { _ as E } from "../image/index.es.js";
3
3
  import { _ } from "../button/index.es.js";
4
4
  import { _ as O } from "../buttonfilter/index.es.js";
@@ -6,7 +6,7 @@ import { _ as j } from "../buttonsearch/index.es.js";
6
6
  import { D as I } from "../datatable/index.es.js";
7
7
  import { _ as L } from "../dialog/index.es.js";
8
8
  import { _ as V } from "../dialogselectuserfilter/index.es.js";
9
- const z = () => u([
9
+ const z = () => c([
10
10
  {
11
11
  field: "profilePictureSmall",
12
12
  header: "Photo",
@@ -77,9 +77,9 @@ const z = () => u([
77
77
  "data-ts-section": "dialog-asset-name-detail-action-group"
78
78
  }, q = { class: "" }, A = { class: "flex justify-end items-center gap-1" }, G = { class: "flex flex-col justify-end gap-1" }, H = {
79
79
  key: 0,
80
- class: "text-danger-500 text-[12px] font-light",
80
+ class: "text-danger-500 dark:text-danger-300 text-[12px] font-light",
81
81
  "data-ts-section": "warning-message"
82
- }, le = /* @__PURE__ */ S({
82
+ }, le = /* @__PURE__ */ F({
83
83
  __name: "DialogSelectUser",
84
84
  props: {
85
85
  header: { default: "Select User" },
@@ -93,21 +93,21 @@ const z = () => u([
93
93
  },
94
94
  emits: ["update:visible", "selected"],
95
95
  setup(e, { emit: g }) {
96
- const t = e, m = g, p = $(() => t.visible), d = u(!1), b = u(), r = u([]), a = u(), k = z(), x = () => {
96
+ const t = e, m = g, p = S(() => t.visible), d = c(!1), v = c(), r = c([]), a = c(), k = z(), x = () => {
97
97
  !r.value.length && !a.value ? d.value = !0 : (t.selectionType === "checkbox" ? m("selected", r.value) : m("selected", a.value), m("update:visible", !1));
98
98
  }, w = () => {
99
99
  r.value = [], a.value = void 0, d.value = !1;
100
- }, T = async (o) => {
100
+ }, $ = async (o) => {
101
101
  if (t.fetchFunction)
102
102
  return await t.fetchFunction(o);
103
103
  };
104
104
  return C(
105
105
  p,
106
106
  async (o) => {
107
- w(), o && t.fetchOptionFunction && (b.value = await t.fetchOptionFunction());
107
+ w(), o && t.fetchOptionFunction && (v.value = await t.fetchOptionFunction());
108
108
  },
109
109
  { immediate: !0 }
110
- ), (o, l) => (c(), N(L, {
110
+ ), (o, l) => (u(), N(L, {
111
111
  visible: p.value,
112
112
  "onUpdate:visible": [
113
113
  l[3] || (l[3] = (s) => p.value = s),
@@ -120,10 +120,10 @@ const z = () => u([
120
120
  "data-ts-name": "dialog-asset-name-detail",
121
121
  modal: ""
122
122
  }, {
123
- footer: v(() => [
123
+ footer: y(() => [
124
124
  P(o.$slots, "footer", {}, () => [
125
125
  i("div", G, [
126
- d.value ? (c(), f("span", H, " You must pick a user ")) : y("", !0),
126
+ d.value ? (u(), f("span", H, b(o.$t("You must pick a user")), 1)) : h("", !0),
127
127
  i("div", null, [
128
128
  n(_, {
129
129
  onClick: l[2] || (l[2] = (s) => o.$emit("update:visible", !1)),
@@ -141,27 +141,27 @@ const z = () => u([
141
141
  ])
142
142
  ])
143
143
  ]),
144
- default: v(() => [
144
+ default: y(() => [
145
145
  i("div", R, [
146
- t.list && t.list.length ? (c(), f("ul", W, [
147
- (c(!0), f(U, null, D(t.list, (s, F) => (c(), f("li", { key: F }, h(s), 1))), 128))
148
- ])) : y("", !0),
146
+ t.list && t.list.length ? (u(), f("ul", W, [
147
+ (u(!0), f(U, null, D(t.list, (s, T) => (u(), f("li", { key: T }, b(s), 1))), 128))
148
+ ])) : h("", !0),
149
149
  i("div", Y, [
150
- i("div", q, h(o.description), 1),
150
+ i("div", q, b(o.$t(o.description)), 1),
151
151
  i("div", A, [
152
152
  n(j, { "table-name": "dialog-select-user-table" }),
153
153
  n(O, { "table-name": "dialog-select-user-table" })
154
154
  ])
155
155
  ]),
156
156
  n(V, {
157
- "filter-options": b.value,
157
+ "filter-options": v.value,
158
158
  "table-name": "dialog-select-user-table"
159
159
  }, null, 8, ["filter-options"]),
160
160
  n(I, {
161
161
  "selected-data": r.value,
162
162
  "onUpdate:selectedData": l[0] || (l[0] = (s) => r.value = s),
163
163
  columns: B(k),
164
- "fetch-function": T,
164
+ "fetch-function": $,
165
165
  rows: 10,
166
166
  "selection-type": t.selectionType,
167
167
  "use-option": !1,
@@ -1,2 +1,3 @@
1
1
  export { default as Focus } from './focus';
2
2
  export { default as Tooltip } from './tooltip';
3
+ export { default as SafeHtml } from './safeHtml';