@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,4 +1,4 @@
1
- import { defineComponent as De, mergeModels as ve, inject as Oe, useModel as ge, onMounted as je, reactive as Ke, shallowRef as x, ref as R, computed as X, watch as be, resolveDirective as We, createElementBlock as E, openBlock as f, Fragment as Y, createVNode as c, withCtx as v, createElementVNode as d, normalizeClass as _, createCommentVNode as U, createBlock as D, renderList as he, mergeProps as ze, unref as s, createTextVNode as Ge, toDisplayString as ye, withDirectives as qe, nextTick as Je } from "vue";
1
+ import { defineComponent as De, mergeModels as ve, inject as Oe, useModel as ge, onMounted as je, reactive as Ke, shallowRef as x, ref as R, computed as X, watch as be, resolveDirective as We, createElementBlock as E, openBlock as f, Fragment as Y, createVNode as c, withCtx as v, createElementVNode as d, normalizeClass as _, createCommentVNode as U, createBlock as D, renderList as he, mergeProps as ze, unref as r, createTextVNode as Ge, toDisplayString as ye, withDirectives as qe, nextTick as Je } from "vue";
2
2
  import { u as Qe } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
3
3
  import { B as Xe } from "../vendor/@tiptap/extension-bold/dist/index.es.js";
4
4
  import { B as Ye } from "../vendor/@tiptap/extension-bullet-list/dist/index.es.js";
@@ -10,8 +10,8 @@ import { H as ot } from "../vendor/@tiptap/extension-history/dist/index.es.js";
10
10
  import { I as lt } from "../vendor/@tiptap/extension-image/dist/index.es.js";
11
11
  import { I as nt } from "../vendor/@tiptap/extension-italic/dist/index.es.js";
12
12
  import { L as it } from "../vendor/@tiptap/extension-link/dist/index.es.js";
13
- import { L as st } from "../vendor/@tiptap/extension-list-item/dist/index.es.js";
14
- import { M as rt } from "../vendor/@tiptap/extension-mention/dist/index.es.js";
13
+ import { L as rt } from "../vendor/@tiptap/extension-list-item/dist/index.es.js";
14
+ import { M as st } from "../vendor/@tiptap/extension-mention/dist/index.es.js";
15
15
  import { O as dt } from "../vendor/@tiptap/extension-ordered-list/dist/index.es.js";
16
16
  import { P as ct } from "../vendor/@tiptap/extension-paragraph/dist/index.es.js";
17
17
  import { P as ut } from "../vendor/@tiptap/extension-placeholder/dist/index.es.js";
@@ -53,19 +53,19 @@ const It = ke.create({
53
53
  }
54
54
  ];
55
55
  },
56
- renderHTML({ HTMLAttributes: r }) {
57
- return ["codeSnippet", Ce(r)];
56
+ renderHTML({ HTMLAttributes: s }) {
57
+ return ["codeSnippet", Ce(s)];
58
58
  },
59
59
  addNodeView() {
60
60
  return _e(bt);
61
61
  },
62
62
  addCommands() {
63
63
  return {
64
- insertCodeSnippet: () => ({ commands: r }) => r.insertContent({
64
+ insertCodeSnippet: () => ({ commands: s }) => s.insertContent({
65
65
  type: "codeSnippet",
66
66
  attrs: { code: "" }
67
67
  }),
68
- deleteCodeSnippet: () => ({ commands: r }) => r.deleteSelection()
68
+ deleteCodeSnippet: () => ({ commands: s }) => s.deleteSelection()
69
69
  };
70
70
  }
71
71
  }), Bt = ke.create({
@@ -89,30 +89,30 @@ const It = ke.create({
89
89
  }
90
90
  ];
91
91
  },
92
- renderHTML({ HTMLAttributes: r }) {
93
- return ["mentionSection", Ce(r)];
92
+ renderHTML({ HTMLAttributes: s }) {
93
+ return ["mentionSection", Ce(s)];
94
94
  },
95
95
  addNodeView() {
96
96
  return _e(ht);
97
97
  },
98
98
  addCommands() {
99
99
  return {
100
- insertMentionSection: (r) => ({ commands: g }) => g.insertContent({
100
+ insertMentionSection: (s) => ({ commands: g }) => g.insertContent({
101
101
  type: "mentionSection",
102
102
  attrs: {
103
- title: r,
103
+ title: s,
104
104
  bodyText: null
105
105
  }
106
106
  }),
107
- deleteMentionSection: () => ({ commands: r }) => r.deleteSelection()
107
+ deleteMentionSection: () => ({ commands: s }) => s.deleteSelection()
108
108
  };
109
109
  }
110
110
  }), Ht = () => ({
111
111
  render: () => {
112
- let r, g;
112
+ let s, g;
113
113
  return {
114
114
  onStart(m) {
115
- r = new ft(xt, {
115
+ s = new ft(xt, {
116
116
  props: {
117
117
  items: m.items,
118
118
  command: m.command
@@ -121,7 +121,7 @@ const It = ke.create({
121
121
  }), m.clientRect && (g = yt("body", {
122
122
  getReferenceClientRect: m.clientRect,
123
123
  appendTo: () => document.body,
124
- content: r.element,
124
+ content: s.element,
125
125
  showOnCreate: !0,
126
126
  interactive: !0,
127
127
  trigger: "manual",
@@ -129,15 +129,15 @@ const It = ke.create({
129
129
  }));
130
130
  },
131
131
  onUpdate(m) {
132
- r.updateProps(m), m.clientRect && g[0].setProps({
132
+ s.updateProps(m), m.clientRect && g[0].setProps({
133
133
  getReferenceClientRect: m.clientRect
134
134
  });
135
135
  },
136
136
  onKeyDown(m) {
137
- return m.event.key === "Escape" ? (g[0].hide(), !0) : r.ref.onKeyDown(m.event);
137
+ return m.event.key === "Escape" ? (g[0].hide(), !0) : s.ref.onKeyDown(m.event);
138
138
  },
139
139
  onExit() {
140
- g[0].destroy(), r.destroy();
140
+ g[0].destroy(), s.destroy();
141
141
  }
142
142
  };
143
143
  }
@@ -196,10 +196,10 @@ const It = ke.create({
196
196
  mentionedListModifiers: {}
197
197
  }),
198
198
  emits: /* @__PURE__ */ ve(["update:modelValue", "postImageLocal", "deleteImageLocal", "blur", "focus", "update:mentionedList"], ["update:modelValue", "update:mentionedList"]),
199
- setup(r, { expose: g, emit: m }) {
200
- const we = Oe("preset", {}).menu, l = r, V = m;
201
- ge(r, "modelValue");
202
- const Se = ge(r, "mentionedList");
199
+ setup(s, { expose: g, emit: m }) {
200
+ const we = Oe("preset", {}).menu, l = s, V = m;
201
+ ge(s, "modelValue");
202
+ const Se = ge(s, "mentionedList");
203
203
  je(() => {
204
204
  l.useValidator && (Object.assign(
205
205
  b,
@@ -259,7 +259,7 @@ const It = ke.create({
259
259
  editable: l.editorState === "editable",
260
260
  extensions: [
261
261
  ut.configure({
262
- emptyEditorClass: "is-editor-empty !text-general-200 !font-light",
262
+ emptyEditorClass: "is-editor-empty !text-general-200 dark:!text-general-600 !font-light",
263
263
  placeholder: Ae.value,
264
264
  includeChildren: !1
265
265
  }),
@@ -309,7 +309,7 @@ const It = ke.create({
309
309
  class: "list-disc px-3 py-1"
310
310
  }
311
311
  }),
312
- st,
312
+ rt,
313
313
  // Marks
314
314
  Xe,
315
315
  nt,
@@ -325,9 +325,9 @@ const It = ke.create({
325
325
  openOnClick: !1
326
326
  }),
327
327
  ot,
328
- rt.configure({
328
+ st.configure({
329
329
  HTMLAttributes: {
330
- class: "bg-primary-200 text-primary-800 rounded-[50px] px-1"
330
+ class: "bg-primary-200 dark:bg-primary-300 text-primary-800 dark:text-primary-800 rounded-[50px] px-1"
331
331
  },
332
332
  suggestion: {
333
333
  items({ query: t }) {
@@ -344,7 +344,7 @@ const It = ke.create({
344
344
  tt
345
345
  ]
346
346
  }), Le = X(() => {
347
- var S, y, A, L, I, B, H, F, W, re, de, ce, ue, me, pe, fe;
347
+ var S, y, A, L, I, B, H, F, W, se, de, ce, ue, me, pe, fe;
348
348
  if (!a.value) return [];
349
349
  const {
350
350
  toggleBold: t,
@@ -424,7 +424,7 @@ const It = ke.create({
424
424
  },
425
425
  {
426
426
  icon: "code-line",
427
- active: (re = a.value) == null ? void 0 : re.isActive("code"),
427
+ active: (se = a.value) == null ? void 0 : se.isActive("code"),
428
428
  tooltipText: "Inline Code | Ctrl + E",
429
429
  onClick: () => {
430
430
  e(), u();
@@ -586,7 +586,7 @@ const It = ke.create({
586
586
  /* @__PURE__ */ new Set([...P.value, t])
587
587
  )), T.value && ((i = a.value) == null || i.commands.setImage({ src: T.value }), P.value = Array.from(
588
588
  /* @__PURE__ */ new Set([...P.value, T.value])
589
- )), T.value = void 0, se();
589
+ )), T.value = void 0, re();
590
590
  }, ne = () => {
591
591
  var t;
592
592
  N.value && N.value.title === "localImage" && V("deleteImageLocal", N.value), (t = a.value) == null || t.commands.deleteSelection();
@@ -611,7 +611,7 @@ const It = ke.create({
611
611
  var n, o;
612
612
  const { insertCodeSnippet: t, deleteCodeSnippet: e } = (n = a.value) == null ? void 0 : n.commands;
613
613
  return (o = a.value) != null && o.isActive("codeSnippet") ? e() : t(), !1;
614
- }, se = () => {
614
+ }, re = () => {
615
615
  a.value.commands.createParagraphNear();
616
616
  }, Ee = (t) => {
617
617
  var e;
@@ -651,11 +651,12 @@ const It = ke.create({
651
651
  ref_key: "root",
652
652
  ref: ae,
653
653
  class: _([
654
- "rounded-b text-grayscale-900 w-full",
654
+ "rounded-b text-grayscale-900 dark:text-grayscale-100 w-full",
655
655
  "[&:has(:focus)]:border-general-200 border-general-100",
656
656
  `${t.borderLess || t.editorState === "readonly" ? "border-none" : "border-[0.5px]"}`,
657
657
  // Inline Code
658
658
  "[&_code]:bg-primary-100",
659
+ // TODO: Dark mode
659
660
  "[&_code]:rounded-md",
660
661
  "[&_code]:p-[0.25em_0.3em]",
661
662
  "[&_code]:text-[0.85rem]",
@@ -667,7 +668,7 @@ const It = ke.create({
667
668
  l.editorState === "editable" ? (f(), E("div", {
668
669
  key: 0,
669
670
  class: _([
670
- "border-b-[0.5px] border-inherit px-3 py-1 flex gap-1 bg-general-50",
671
+ "border-b-[0.5px] border-inherit px-3 py-1 flex gap-1 bg-general-50 dark:bg-grayscale-800",
671
672
  `${l.toolbarWrapperClass}`
672
673
  ]),
673
674
  "data-wv-section": "toolbar"
@@ -677,11 +678,12 @@ const It = ke.create({
677
678
  class: [{ "!bg-primary-50 ": o.active }, o.class]
678
679
  }), null, 16, ["class"]))), 128))
679
680
  ], 2)) : U("", !0),
680
- k.value ? U("", !0) : (f(), D(s(gt), {
681
+ k.value ? U("", !0) : (f(), D(r(gt), {
681
682
  key: 1,
682
683
  class: _([
683
684
  `${l.editorState === "editable" ? "px-3 py-2" : ""} [&_*]:outline-none`,
684
685
  "[&_.is-editor-empty:first-child::before]:text-general-200",
686
+ "dark:[&_.is-editor-empty:first-child::before]:text-general-600",
685
687
  "[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]",
686
688
  "[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]",
687
689
  "[&_.is-editor-empty:first-child::before]:font-normal",
@@ -705,10 +707,10 @@ const It = ke.create({
705
707
  "[&_*:has(code)]:my-[0.25rem]",
706
708
  `${l.contentWrapperClass}`
707
709
  ]),
708
- editor: s(a),
710
+ editor: r(a),
709
711
  spellcheck: "false"
710
712
  }, null, 8, ["class", "editor"])),
711
- c(s(kt), {
713
+ c(r(kt), {
712
714
  ref_key: "headingMenu",
713
715
  ref: te,
714
716
  model: Me.value,
@@ -719,11 +721,12 @@ const It = ke.create({
719
721
  return [
720
722
  d("a", {
721
723
  class: _([
722
- ...(i = s(we)) == null ? void 0 : i.action.class,
724
+ ...(i = r(we)) == null ? void 0 : i.action.class,
723
725
  o.class,
724
726
  "flex items-center !justify-between h-[30px]",
725
727
  {
726
- "bg-primary-50": ((u = s(a)) == null ? void 0 : u.isActive("heading", { level: 1 })) && o.label === "Heading 1" || ((p = s(a)) == null ? void 0 : p.isActive("heading", { level: 2 })) && o.label === "Heading 2" || ((C = s(a)) == null ? void 0 : C.isActive("heading", { level: 3 })) && o.label === "Heading 3" || ((w = s(a)) == null ? void 0 : w.isActive("heading", { level: 4 })) && o.label === "Heading 4" || ((h = s(a)) == null ? void 0 : h.isActive("heading", { level: 5 })) && o.label === "Heading 5" || ((S = s(a)) == null ? void 0 : S.isActive("heading", { level: 6 })) && o.label === "Heading 6" || ((y = s(a)) == null ? void 0 : y.isActive("paragraph")) && o.label === "Paragraf"
728
+ // TODO: Dark mode
729
+ "bg-primary-50": ((u = r(a)) == null ? void 0 : u.isActive("heading", { level: 1 })) && o.label === "Heading 1" || ((p = r(a)) == null ? void 0 : p.isActive("heading", { level: 2 })) && o.label === "Heading 2" || ((C = r(a)) == null ? void 0 : C.isActive("heading", { level: 3 })) && o.label === "Heading 3" || ((w = r(a)) == null ? void 0 : w.isActive("heading", { level: 4 })) && o.label === "Heading 4" || ((h = r(a)) == null ? void 0 : h.isActive("heading", { level: 5 })) && o.label === "Heading 5" || ((S = r(a)) == null ? void 0 : S.isActive("heading", { level: 6 })) && o.label === "Heading 6" || ((y = r(a)) == null ? void 0 : y.isActive("paragraph")) && o.label === "Paragraf"
727
730
  }
728
731
  ]),
729
732
  title: o.label,
@@ -739,12 +742,12 @@ const It = ke.create({
739
742
  }),
740
743
  _: 1
741
744
  }, 8, ["model"]),
742
- s(a) && l.editorState === "editable" ? (f(), D(s(Z), {
745
+ r(a) && l.editorState === "editable" ? (f(), D(r(Z), {
743
746
  key: 2,
744
- editor: s(a),
747
+ editor: r(a),
745
748
  "should-show": () => {
746
749
  var o, i;
747
- return ((o = s(a)) == null ? void 0 : o.isActive("codeSnippet")) || ((i = s(a)) == null ? void 0 : i.isActive("mentionSection"));
750
+ return ((o = r(a)) == null ? void 0 : o.isActive("codeSnippet")) || ((i = r(a)) == null ? void 0 : i.isActive("mentionSection"));
748
751
  },
749
752
  "tippy-options": { placement: "top", zIndex: 9 },
750
753
  class: "-mt-1.5 shadow-panel",
@@ -753,7 +756,7 @@ const It = ke.create({
753
756
  default: v(() => [
754
757
  d("div", Nt, [
755
758
  c(M, {
756
- onClick: se,
759
+ onClick: re,
757
760
  icon: "close",
758
761
  severity: "secondary",
759
762
  text: "",
@@ -763,12 +766,12 @@ const It = ke.create({
763
766
  ]),
764
767
  _: 1
765
768
  }, 8, ["editor", "should-show"])) : U("", !0),
766
- s(a) && !O.value && l.editorState === "editable" ? (f(), D(s(Z), {
769
+ r(a) && !O.value && l.editorState === "editable" ? (f(), D(r(Z), {
767
770
  key: 3,
768
- editor: s(a),
771
+ editor: r(a),
769
772
  "should-show": () => {
770
773
  var o;
771
- return (o = s(a)) == null ? void 0 : o.isActive("link");
774
+ return (o = r(a)) == null ? void 0 : o.isActive("link");
772
775
  },
773
776
  "tippy-options": { placement: "bottom", zIndex: 9 },
774
777
  class: "-mt-1.5 shadow-panel",
@@ -871,12 +874,12 @@ const It = ke.create({
871
874
  ]),
872
875
  _: 1
873
876
  }, 8, ["visible"]),
874
- s(a) && l.editorState === "editable" ? (f(), D(s(Z), {
877
+ r(a) && l.editorState === "editable" ? (f(), D(r(Z), {
875
878
  key: 4,
876
- editor: s(a),
879
+ editor: r(a),
877
880
  "should-show": () => {
878
881
  var o;
879
- return !!((o = s(a)) != null && o.isActive("image"));
882
+ return !!((o = r(a)) != null && o.isActive("image"));
880
883
  },
881
884
  "tippy-options": { placement: "top", zIndex: 9 },
882
885
  class: "-mt-1.5 shadow-panel",
@@ -943,7 +946,7 @@ const It = ke.create({
943
946
  "use-validator": ""
944
947
  }, null, 8, ["value"]),
945
948
  c(ee, {
946
- label: (i = s(a)) != null && i.isActive("link") ? "Simpan" : "Tambahkan",
949
+ label: (i = r(a)) != null && i.isActive("link") ? "Simpan" : "Tambahkan",
947
950
  class: "w-max ml-auto",
948
951
  severity: "secondary",
949
952
  type: "submit"
@@ -1,8 +1,8 @@
1
- import { defineComponent as $, useSlots as b, computed as w, createElementBlock as l, renderSlot as p, openBlock as o, normalizeProps as t, mergeProps as r, createCommentVNode as a, Fragment as g, createTextVNode as v, createBlock as C, toDisplayString as i, unref as u } from "vue";
1
+ import { defineComponent as y, useSlots as b, computed as w, createElementBlock as l, renderSlot as p, openBlock as o, normalizeProps as t, mergeProps as r, createCommentVNode as a, Fragment as g, createTextVNode as v, createBlock as C, toDisplayString as i, unref as u } from "vue";
2
2
  import { u as B } from "../plugins/WangsVue.es.js";
3
3
  import { m as P } from "../utils/mergePropsWithDefaults.util.es.js";
4
4
  import { _ as h } from "../icon/index.es.js";
5
- const T = /* @__PURE__ */ $({
5
+ const V = /* @__PURE__ */ y({
6
6
  __name: "FieldWrapper",
7
7
  props: {
8
8
  label: {},
@@ -15,19 +15,19 @@ const T = /* @__PURE__ */ $({
15
15
  },
16
16
  emits: ["infoClick"],
17
17
  setup(k) {
18
- const n = k, f = b(), { defaultProps: y, locale: d } = B("FieldWrapper"), s = w(() => P(n, y));
18
+ const n = k, f = b(), { defaultProps: $, locale: d } = B("FieldWrapper"), s = w(() => P(n, $));
19
19
  return (e, m) => e.$attrs["use-field-wrapper"] != !1 ? (o(), l("div", t(r({ key: 0 }, e.$preset.fieldwrapper.root)), [
20
20
  e.label || f["label-addon"] ? (o(), l("label", t(r({ key: 0 }, e.$preset.fieldwrapper.label({ props: n, slots: f }))), [
21
21
  e.label ? (o(), l(g, { key: 0 }, [
22
- v(i(e.label) + " ", 1),
23
- e.mandatory && s.value.showAsterisk ? (o(), l("span", t(r({ key: 0 }, e.$preset.fieldwrapper.arterisksign)), i(u(d).labelRequired), 17)) : a("", !0),
22
+ v(i(e.$t(e.label)) + " ", 1),
23
+ e.mandatory && s.value.showAsterisk ? (o(), l("span", t(r({ key: 0 }, e.$preset.fieldwrapper.arterisksign)), i(e.$t(u(d).labelRequired)), 17)) : a("", !0),
24
24
  e.info ? (o(), C(h, r({
25
25
  key: 1,
26
26
  info: e.info,
27
27
  "tooltip-pos": s.value.tooltipPos,
28
28
  onClick: m[0] || (m[0] = (W) => e.$emit("infoClick"))
29
29
  }, e.$preset.fieldwrapper.info, { icon: "info" }), null, 16, ["info", "tooltip-pos"])) : a("", !0),
30
- e.mandatory == !1 && s.value.showOptionalText ? (o(), l("span", t(r({ key: 2 }, e.$preset.fieldwrapper.optionaltext)), i(u(d).labelOptional), 17)) : a("", !0)
30
+ e.mandatory == !1 && s.value.showOptionalText ? (o(), l("span", t(r({ key: 2 }, e.$preset.fieldwrapper.optionaltext)), i(e.$t(u(d).labelOptional)), 17)) : a("", !0)
31
31
  ], 64)) : a("", !0),
32
32
  p(e.$slots, "label-addon")
33
33
  ], 16)) : a("", !0),
@@ -36,5 +36,5 @@ const T = /* @__PURE__ */ $({
36
36
  }
37
37
  });
38
38
  export {
39
- T as _
39
+ V as _
40
40
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, mergeModels as $, useModel as G, inject as Y, shallowRef as y, ref as z, reactive as H, computed as Z, onMounted as J, watch as x, createBlock as A, openBlock as f, unref as m, mergeProps as g, withCtx as M, createTextVNode as h, toDisplayString as B, createElementVNode as N, normalizeClass as k, createVNode as w, createCommentVNode as S, createElementBlock as F, withModifiers as Q, normalizeProps as W, Fragment as C } from "vue";
1
+ import { defineComponent as D, mergeModels as U, useModel as G, inject as Y, shallowRef as g, ref as z, reactive as H, computed as Z, onMounted as J, watch as k, createBlock as A, openBlock as f, unref as m, mergeProps as y, withCtx as M, createTextVNode as b, toDisplayString as h, createElementVNode as C, normalizeClass as B, createVNode as w, createCommentVNode as x, createElementBlock as F, withModifiers as Q, normalizeProps as W, Fragment as N } from "vue";
2
2
  import { u as X } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
3
3
  import { u as ee } from "../utils/baseToast.util.es.js";
4
4
  import { s as ae } from "../vendor/primevue/fileupload/fileupload.esm.es.js";
@@ -6,9 +6,9 @@ import { _ as le } from "../fieldwrapper/index.es.js";
6
6
  import { _ as se } from "../inputtext/index.es.js";
7
7
  import { _ as ie } from "../button/index.es.js";
8
8
  import { _ as oe } from "../validatormessage/index.es.js";
9
- const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 1048576, ye = /* @__PURE__ */ D({
9
+ const te = { class: "'!mt-0 font-light text-xs text-general-500 dark:text-general-100'" }, re = 1048576, ge = /* @__PURE__ */ D({
10
10
  __name: "FileUpload",
11
- props: /* @__PURE__ */ $({
11
+ props: /* @__PURE__ */ U({
12
12
  accept: {},
13
13
  disabled: { type: Boolean },
14
14
  maxFileSize: {},
@@ -33,9 +33,9 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
33
33
  modelValue: {},
34
34
  modelModifiers: {}
35
35
  }),
36
- emits: /* @__PURE__ */ $(["select", "update:modelValue", "upload", "error"], ["update:modelValue"]),
37
- setup(T, { emit: R }) {
38
- const V = ee(), r = G(T, "modelValue"), a = T, _ = R, { fileupload: c = {} } = Y("preset", {}), i = y(), t = y(), o = y(), E = z(), n = H({ value: void 0 }), q = Z(() => !!n.errorMessage || (u.value ? u.value.length > 0 : !1)), d = y(!1);
36
+ emits: /* @__PURE__ */ U(["select", "update:modelValue", "upload", "error"], ["update:modelValue"]),
37
+ setup(S, { emit: R }) {
38
+ const V = ee(), r = G(S, "modelValue"), a = S, E = R, { fileupload: c = {} } = Y("preset", {}), i = g(), t = g(), o = g(), _ = z(), n = H({ value: void 0 }), q = Z(() => !!n.errorMessage || (u.value ? u.value.length > 0 : !1)), d = g(!1);
39
39
  J(() => {
40
40
  a.useValidator && Object.assign(
41
41
  n,
@@ -61,11 +61,11 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
61
61
  try {
62
62
  if (!e.files || e.files.length === 0)
63
63
  return;
64
- a.multiple ? (o.value = e.files, i.value = e.files.map((s) => s.name), _("select", e.files)) : (o.value = e.files[0], i.value = (l = e.files[0]) == null ? void 0 : l.name, _("select", e.files[0]));
64
+ a.multiple ? (o.value = e.files, i.value = e.files.map((s) => s.name), E("select", e.files)) : (o.value = e.files[0], i.value = (l = e.files[0]) == null ? void 0 : l.name, E("select", e.files[0]));
65
65
  } catch (s) {
66
66
  console.error(s);
67
67
  }
68
- }, U = (e, l) => {
68
+ }, T = (e, l) => {
69
69
  a.disabled || d.value || (u.value = void 0, new Promise((s, p) => {
70
70
  try {
71
71
  l(), s();
@@ -84,34 +84,36 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
84
84
  }, u = z(), P = (e) => {
85
85
  u.value = e;
86
86
  }, K = (e, l, s) => {
87
- (e.key === "Enter" || e.key === " ") && U(l, s);
87
+ (e.key === "Enter" || e.key === " ") && T(l, s);
88
88
  };
89
- return x(o, (e) => {
89
+ return k(o, (e) => {
90
90
  n.value = e, r.value = e, u.value = void 0, t.value = void 0;
91
- }), x(r, (e) => {
92
- Array.isArray(e) && a.multiple ? (o.value = e, i.value = e.map((l) => l.name)) : e instanceof File ? (o.value = e, i.value = e.name) : (o.value = void 0, i.value = void 0), n.value = e, "messages" in E.value && (E.value.messages = []), u.value = void 0, t.value = void 0;
93
- }), x(u, (e) => {
91
+ }), k(r, (e) => {
92
+ Array.isArray(e) && a.multiple ? (o.value = e, i.value = e.map((l) => l.name)) : e instanceof File ? (o.value = e, i.value = e.name) : (o.value = void 0, i.value = void 0), n.value = e, "messages" in _.value && (_.value.messages = []), u.value = void 0, t.value = void 0;
93
+ }), k(u, (e) => {
94
94
  if (e && e.length > 0) {
95
95
  const l = e[0].replace("{2}", a.accept || "").replace("{2.1}", a.fileExtensions || "");
96
- l.includes("Invalid file size") && _("error", "FILE_SIZE_TOO_LARGE"), j(l), a.useErrorToast && V.add({
96
+ l.includes("Invalid file size") && E("error", "FILE_SIZE_TOO_LARGE"), j(l), a.useErrorToast && V.add({
97
97
  message: l,
98
98
  severity: "error"
99
99
  }), o.value = void 0, i.value = void 0;
100
100
  } else
101
101
  t.value = void 0;
102
- }), (e, l) => (f(), A(m(ae), g(a, {
102
+ }), (e, l) => (f(), A(m(ae), y(a, {
103
103
  ref_key: "fileUpload",
104
- ref: E,
104
+ ref: _,
105
+ "cancel-label": e.$t("Cancel"),
105
106
  "file-limit": e.multiple ? void 0 : 1,
106
107
  pt: { input: { style: "display: none" } },
108
+ "upload-label": e.$t(a.uploadLabel),
107
109
  onSelect: L,
108
110
  onUpload: l[0] || (l[0] = (s) => e.$emit("upload", s))
109
111
  }), {
110
112
  header: M(({ files: s, chooseCallback: p, clearCallback: v }) => [
111
- N("div", {
112
- class: k([{ "grid-cols-[auto,max-content]": a.withUpload }, "grid gap-3 items-end"])
113
+ C("div", {
114
+ class: B([{ "grid-cols-[auto,max-content]": a.withUpload }, "grid gap-3 items-end"])
113
115
  }, [
114
- w(le, g(m(c).wrapper, {
116
+ w(le, y(m(c).wrapper, {
115
117
  "error-messages": u.value,
116
118
  label: a.label,
117
119
  mandatory: a.mandatory
@@ -123,54 +125,56 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
123
125
  invalid: q.value,
124
126
  "model-value": Array.isArray(i.value) ? i.value.join(", ") : i.value,
125
127
  placeholder: a.placeholder,
126
- onClick: (b) => U(p, v),
127
- onKeydown: Q((b) => K(b, p, v), ["prevent"])
128
+ onClick: ($) => T(p, v),
129
+ onKeydown: Q(($) => K($, p, v), ["prevent"])
128
130
  }, {
129
- "addon-left": M(() => l[1] || (l[1] = [
130
- h(" Browse")
131
- ])),
131
+ "addon-left": M(() => [
132
+ b(h(e.$t("Browse")), 1)
133
+ ]),
132
134
  _: 2
133
135
  }, 1032, ["disabled", "input-class", "invalid", "model-value", "placeholder", "onClick", "onKeydown"]),
134
136
  a.fileExtensions || a.fileRequirements || n.errorMessage || t.value || a.validatorMessage ? (f(), F("div", {
135
137
  key: 0,
136
- class: k([{
138
+ class: B([{
137
139
  "justify-between": n.errorMessage || t.value,
138
140
  "justify-end": (!n.errorMessage || !t.value) && a.validatorMessage
139
141
  }, "flex w-full"])
140
142
  }, [
141
143
  w(oe, {
142
- class: k(a.validatorMessageClass),
144
+ class: B(a.validatorMessageClass),
143
145
  message: t.value ?? n.errorMessage
144
146
  }, null, 8, ["class", "message"]),
145
- a.fileExtensions || a.fileRequirements ? (f(), F("div", W(g({ key: 0 }, m(c).requirements)), [
146
- N("small", te, [
147
- e.fileRequirements ? (f(), F(C, { key: 0 }, [
148
- h(B(e.fileRequirements), 1)
149
- ], 64)) : (f(), F(C, { key: 1 }, [
150
- h(B(a.maxFileSize ? `${a.fileExtensions}. max file ${Math.round(a.maxFileSize / re)} MB` : `${a.fileExtensions} file`), 1)
147
+ a.fileExtensions || a.fileRequirements ? (f(), F("div", W(y({ key: 0 }, m(c).requirements)), [
148
+ C("small", te, [
149
+ e.fileRequirements ? (f(), F(N, { key: 0 }, [
150
+ b(h(e.$t(e.fileRequirements)), 1)
151
+ ], 64)) : (f(), F(N, { key: 1 }, [
152
+ b(h(e.$t(
153
+ a.maxFileSize ? `${a.fileExtensions}. max file ${Math.round(a.maxFileSize / re)} MB` : `${a.fileExtensions} file`
154
+ )), 1)
151
155
  ], 64))
152
156
  ])
153
- ], 16)) : S("", !0)
154
- ], 2)) : S("", !0)
157
+ ], 16)) : x("", !0)
158
+ ], 2)) : x("", !0)
155
159
  ]),
156
160
  _: 2
157
161
  }, 1040, ["error-messages", "label", "mandatory"]),
158
- a.withUpload ? (f(), A(ie, g({ key: 0 }, m(c).buttonupload({ props: a }), {
162
+ a.withUpload ? (f(), A(ie, y({ key: 0 }, m(c).buttonupload({ props: a }), {
159
163
  disabled: a.disabled || d.value || !o.value,
160
164
  label: a.uploadLabel,
161
- onClick: (b) => O(s, v),
165
+ onClick: ($) => O(s, v),
162
166
  severity: "success",
163
167
  type: "button"
164
- }), null, 16, ["disabled", "label", "onClick"])) : S("", !0)
168
+ }), null, 16, ["disabled", "label", "onClick"])) : x("", !0)
165
169
  ], 2)
166
170
  ]),
167
171
  content: M(({ messages: s }) => [
168
- h(B(P(s)), 1)
172
+ b(h(P(s)), 1)
169
173
  ]),
170
174
  _: 1
171
- }, 16, ["file-limit"]));
175
+ }, 16, ["cancel-label", "file-limit", "upload-label"]));
172
176
  }
173
177
  });
174
178
  export {
175
- ye as _
179
+ ge as _
176
180
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as G, onMounted as K, shallowRef as u, computed as m, ref as X, watch as ee, createBlock as g, openBlock as p, createSlots as ae, withCtx as E, createCommentVNode as b, createVNode as C, createElementVNode as V, normalizeClass as M, createElementBlock as ne, Fragment as te, toDisplayString as se } from "vue";
1
+ import { defineComponent as G, onMounted as K, shallowRef as u, computed as m, ref as X, watch as ee, createBlock as g, openBlock as p, createSlots as ae, withCtx as E, createCommentVNode as b, createVNode as C, createElementVNode as V, normalizeClass as $, createElementBlock as ne, Fragment as te, toDisplayString as se } from "vue";
2
2
  import { u as le } from "../utils/baseToast.util.es.js";
3
3
  import { u as oe, W as re, g as ie } from "../buttonscan/index.es.js";
4
4
  import { _ as R } from "../button/index.es.js";
5
5
  import { _ as ce } from "../dialog/index.es.js";
6
- import { _ as $ } from "../dropdown/index.es.js";
6
+ import { _ as M } from "../dropdown/index.es.js";
7
7
  import { _ as ue } from "../icon/index.es.js";
8
8
  import { _ as de } from "../inlinemessage/index.es.js";
9
9
  const De = /* @__PURE__ */ G({
@@ -16,15 +16,15 @@ const De = /* @__PURE__ */ G({
16
16
  withoutScanBtn: { type: Boolean }
17
17
  },
18
18
  emits: ["update:visible", "scan"],
19
- setup(W, { emit: x }) {
20
- const o = W, k = x, P = le();
19
+ setup(W, { emit: P }) {
20
+ const o = W, k = P, U = le();
21
21
  K(() => {
22
22
  O();
23
23
  });
24
24
  const {
25
25
  device: _,
26
26
  devices: I,
27
- saveDevices: U,
27
+ saveDevices: x,
28
28
  setDevice: Q,
29
29
  loadDevices: z
30
30
  } = oe(), i = {
@@ -44,7 +44,7 @@ const De = /* @__PURE__ */ G({
44
44
  () => o.errorCode === "NOT_SUPPORTED_SYSTEM"
45
45
  ), H = m(() => o.searchBy === "RFID" && l.value.device), Y = m(() => o.searchBy === "QR" && r.value.device), D = m(() => !!o.searchBy && o.errorCode !== "HARDWARE_NOT_SYNCHRONIZED"), B = async (n) => {
46
46
  try {
47
- U(n);
47
+ x(n);
48
48
  const a = f.value.some(
49
49
  (s) => {
50
50
  var t, v, S;
@@ -113,7 +113,7 @@ const De = /* @__PURE__ */ G({
113
113
  B(t);
114
114
  const { error: v } = (e == null ? void 0 : e.data) ?? {};
115
115
  v === "Driver not connected to server" ? (d.value = !1, c.value = h("DRIVER_NOT_FOUND")) : t.length || (d.value = !1, c.value = h("DEVICE_NOT_CONNECTED"));
116
- } else e.status === "error_sync" && (d.value = !1, B([]), P.add({ message: "Failed to connecting scanner", severity: "error" }));
116
+ } else e.status === "error_sync" && (d.value = !1, B([]), U.add({ message: "Failed to connecting scanner", severity: "error" }));
117
117
  }, window.scannerWorker.postMessage({
118
118
  command: "sync",
119
119
  userId: (n = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : n._id,
@@ -168,7 +168,7 @@ const De = /* @__PURE__ */ G({
168
168
  default: E(() => [
169
169
  c.value ? (p(), g(de, {
170
170
  key: 0,
171
- class: M(["p-[9.52px] transition"]),
171
+ class: $(["p-[9.52px] transition"]),
172
172
  message: c.value.detail,
173
173
  removable: !1,
174
174
  "show-icon": !1,
@@ -186,13 +186,13 @@ const De = /* @__PURE__ */ G({
186
186
  outlined: ""
187
187
  }, null, 8, ["disabled", "loading"]),
188
188
  V("section", {
189
- class: M([
189
+ class: $([
190
190
  "grid grid-cols-2 gap-3 justify-start w-full",
191
191
  { "opacity-60 pointer-events-none": w.value }
192
192
  ]),
193
193
  "data-ts-section": "scanner-list"
194
194
  }, [
195
- C($, {
195
+ C(M, {
196
196
  modelValue: l.value,
197
197
  "onUpdate:modelValue": [
198
198
  a[0] || (a[0] = (e) => l.value = e),
@@ -202,7 +202,7 @@ const De = /* @__PURE__ */ G({
202
202
  label: "RFID Scanner",
203
203
  "option-label": "label"
204
204
  }, null, 8, ["modelValue", "options"]),
205
- C($, {
205
+ C(M, {
206
206
  modelValue: r.value,
207
207
  "onUpdate:modelValue": [
208
208
  a[1] || (a[1] = (e) => r.value = e),
@@ -224,7 +224,7 @@ const De = /* @__PURE__ */ G({
224
224
  C(ue, {
225
225
  icon: (e = n.searchBy) == null ? void 0 : e.toLowerCase()
226
226
  }, null, 8, ["icon"]),
227
- V("h3", null, "Scan " + se(n.searchBy), 1)
227
+ V("h3", null, se(n.$t(`Scan ${n.searchBy}`)), 1)
228
228
  ];
229
229
  }),
230
230
  key: "0"
@@ -1,4 +1,4 @@
1
- import { defineComponent as n, createElementBlock as t, openBlock as o, normalizeClass as c, createElementVNode as r, normalizeProps as p, guardReactiveProps as i, createBlock as s, createCommentVNode as a, createTextVNode as d, toDisplayString as f } from "vue";
1
+ import { defineComponent as n, createElementBlock as t, openBlock as o, normalizeClass as p, createElementVNode as r, normalizeProps as c, guardReactiveProps as i, createBlock as s, createCommentVNode as a, createTextVNode as d, toDisplayString as f } from "vue";
2
2
  import { _ as l } from "../icon/index.es.js";
3
3
  const m = ["colspan", "rowspan"], u = { class: "flex" }, k = /* @__PURE__ */ n({
4
4
  __name: "HeaderCell",
@@ -11,13 +11,13 @@ const m = ["colspan", "rowspan"], u = { class: "flex" }, k = /* @__PURE__ */ n({
11
11
  },
12
12
  setup(y) {
13
13
  return (e, h) => (o(), t("th", {
14
- class: c([e.col.headerClass, e.col.class]),
14
+ class: p([e.col.headerClass, e.col.class]),
15
15
  colspan: e.col.colspan,
16
16
  rowspan: e.col.rowspan ?? e.defaultHeaderRowSpan
17
17
  }, [
18
- r("span", p(i(e.preset.headercellcontent)), [
18
+ r("span", c(i(e.preset.headercellcontent)), [
19
19
  r("span", u, [
20
- d(f(e.col.header) + " ", 1),
20
+ d(f(e.$t(e.col.header)) + " ", 1),
21
21
  e.col.info ? (o(), s(l, {
22
22
  key: 0,
23
23
  info: e.col.info,