@fewangsit/wangsvue-fats 1.0.1-rc.0 → 1.0.1-rc.11

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 (242) hide show
  1. package/animation/index.es.js +50 -0
  2. package/approverinfo/index.es.js +6 -6
  3. package/assetinfo/index.es.js +160 -2
  4. package/backgroundimagecropper/{BackgroundImageCropper.es.js → index.es.js} +1 -1
  5. package/badge/index.es.js +7 -7
  6. package/badgegroup/index.es.js +7 -7
  7. package/basecalendar/{BaseCalendar.es.js → index.es.js} +6 -6
  8. package/basetree/index.es.js +14 -14
  9. package/breadcrumb/index.es.js +6 -6
  10. package/button/index.es.js +118 -2
  11. package/buttonaddbyscan/index.es.js +13 -13
  12. package/buttonbulkaction/index.es.js +184 -2
  13. package/buttoncopy/index.es.js +6 -6
  14. package/buttondownload/index.es.js +15 -15
  15. package/buttonfilter/index.es.js +6 -6
  16. package/buttonradio/index.es.js +2 -2
  17. package/buttonscan/index.es.js +414 -2
  18. package/buttonsearch/index.es.js +9 -9
  19. package/buttonsearchbyscan/index.es.js +7 -7
  20. package/buttonselecttree/index.es.js +22 -22
  21. package/buttonselectuser/index.es.js +25 -25
  22. package/buttonsync/index.es.js +12 -12
  23. package/buttontoggle/index.es.js +6 -6
  24. package/buttonviewlog/index.es.js +2 -2
  25. package/calendar/index.es.js +4 -4
  26. package/card/index.es.js +4 -4
  27. package/carousel/index.es.js +7 -7
  28. package/checkbox/index.es.js +2 -2
  29. package/codesnippet/{CodeSnippet.es.js → index.es.js} +1 -1
  30. package/codesnippetadapter/{CodeSnippetAdapter.es.js → index.es.js} +1 -1
  31. package/columnlist/{ColumnList.es.js → index.es.js} +8 -8
  32. package/config/defaultProps.es.js +133 -0
  33. package/config/index.es.js +10 -218
  34. package/config/locale.es.js +85 -0
  35. package/customcolumn/index.es.js +8 -8
  36. package/datatable/index.es.js +108 -107
  37. package/datepicker/index.es.js +138 -2
  38. package/daypicker/index.es.js +6 -6
  39. package/dialog/index.es.js +4 -4
  40. package/dialogassetnamedetail/index.es.js +11 -11
  41. package/dialogbasictransferlog/{DialogBasicTransferLog.es.js → index.es.js} +17 -17
  42. package/dialogconfirm/index.es.js +17 -17
  43. package/dialogdamagelog/index.es.js +14 -14
  44. package/dialogform/index.es.js +32 -32
  45. package/dialogfulltransferlog/{DialogFullTransferLog.es.js → index.es.js} +16 -16
  46. package/dialoglinkedasset/index.es.js +9 -9
  47. package/dialogprintqr/index.es.js +332 -2
  48. package/dialogreportdamage/index.es.js +12 -12
  49. package/dialogreportmissing/index.es.js +12 -12
  50. package/dialogreporttag/index.es.js +8 -8
  51. package/dialogselecttree/index.es.js +13 -13
  52. package/dialogselectuser/index.d.ts +2 -2
  53. package/dialogselectuser/index.es.js +18 -18
  54. package/dialogselectuserfilter/{DialogSelectUserFilter.es.js → index.es.js} +2 -2
  55. package/dialogtransferlog/index.es.js +9 -9
  56. package/directives/{focus/index.es.js → focus.es.js} +2 -2
  57. package/directives/index.es.js +2 -0
  58. package/directives/tooltip.es.js +1 -0
  59. package/disposalreport/index.es.js +8 -8
  60. package/disposalreportbulkaction/{DisposalReportBulkAction.es.js → index.es.js} +9 -8
  61. package/disposalreporttable/{DisposalReportTable.es.js → index.es.js} +16 -16
  62. package/disposalreporttablefilter/{DisposalReportTableFilter.es.js → index.es.js} +5 -5
  63. package/dropdown/index.es.js +37 -37
  64. package/editor/{Editor.es.js → index.es.js} +57 -57
  65. package/editorbutton/{EditorButton.es.js → index.es.js} +1 -1
  66. package/event-bus/index.es.js +4 -3
  67. package/event-bus/mitt.es.js +53 -0
  68. package/fieldwrapper/{FieldWrapper.es.js → index.es.js} +2 -2
  69. package/fileupload/index.es.js +13 -13
  70. package/filtercontainer/index.es.js +34 -34
  71. package/form/index.es.js +23 -23
  72. package/hardwaresync/{HardwareSync.es.js → index.es.js} +42 -42
  73. package/icon/index.es.js +4 -4
  74. package/image/index.es.js +14 -14
  75. package/imagecompressor/index.es.js +14 -14
  76. package/imageinputinfo/{ImageInputInfo.es.js → index.es.js} +2 -2
  77. package/inlinemessage/index.es.js +7 -7
  78. package/inputbadge/index.es.js +14 -14
  79. package/inputcurrency/index.es.js +147 -2
  80. package/inputemail/index.es.js +4 -4
  81. package/inputnumber/index.es.js +6 -6
  82. package/inputotp/index.es.js +1 -1
  83. package/inputpassword/index.es.js +10 -10
  84. package/inputphonenumber/index.es.js +28 -28
  85. package/inputrangenumber/index.es.js +9 -9
  86. package/inputsearch/index.es.js +2 -2
  87. package/inputtext/index.es.js +11 -11
  88. package/inputurl/index.es.js +5 -5
  89. package/invisiblefield/index.es.js +8 -8
  90. package/languagedropdownoption/{LanguageDropdownOption.es.js → index.es.js} +3 -3
  91. package/languageswitcher/index.es.js +7 -7
  92. package/litedropdown/index.es.js +10 -10
  93. package/loading/index.es.js +8 -8
  94. package/mentionlist/{MentionList.es.js → index.es.js} +4 -4
  95. package/menu/index.es.js +20 -19
  96. package/menuitem/{MenuItem.es.js → index.es.js} +1 -1
  97. package/multiselect/index.es.js +27 -27
  98. package/overlaypanel/index.es.js +6 -6
  99. package/package.json +1 -5
  100. package/paginator/index.es.js +11 -11
  101. package/plugins/VueHtmlToPaper.es.js +40 -0
  102. package/{animation/Animation.es.js → plugins/WangsVue.es.js} +38 -83
  103. package/plugins/basei18n.d.ts +103 -0
  104. package/plugins/basei18n.es.js +88 -0
  105. package/plugins/{formValidation/index.es.js → formValidation.es.js} +4 -4
  106. package/plugins/i18n.d.ts +5 -102
  107. package/plugins/i18n.es.js +6 -0
  108. package/stats.html +1 -1
  109. package/steps/index.es.js +4 -4
  110. package/tabmenu/index.es.js +1 -1
  111. package/tagtype/index.es.js +6 -6
  112. package/textarea/index.es.js +5 -5
  113. package/timeline/index.es.js +5 -5
  114. package/timelinecontentbytype/{TimelineContentByType.es.js → index.es.js} +9 -9
  115. package/toast/index.es.js +3 -3
  116. package/toggleswitch/index.es.js +2 -2
  117. package/transactionroles/index.es.js +2 -2
  118. package/tree/index.es.js +117 -107
  119. package/treenode/{TreeNode.es.js → index.es.js} +4 -4
  120. package/treesearchinput/{TreeSearchInput.es.js → index.es.js} +4 -4
  121. package/username/index.es.js +20 -20
  122. package/userwithicon/index.es.js +4 -4
  123. package/utils/baseToast.util.es.js +1 -1
  124. package/utils/date.util.es.js +2 -2
  125. package/utils/index.es.js +3 -36
  126. package/utils/role.util.es.js +2 -2
  127. package/validatormessage/index.es.js +4 -4
  128. package/vendor/highlight.js/es/core.es.js +1 -1
  129. package/vendor/lodash/_freeGlobal.es.js +1 -1
  130. package/vendor/simplebar-core/dist/index.es.js +1 -1
  131. package/wangsvue-fats.d.ts +1 -2
  132. package/wangsvue-fats.es.js +219 -256
  133. package/wangsvue-fats.system.js +56 -56
  134. package/approverinfo/package.json +0 -4
  135. package/assetinfo/AssetInfo.es.js +0 -179
  136. package/assetinfo/package.json +0 -4
  137. package/badge/package.json +0 -4
  138. package/badgegroup/package.json +0 -4
  139. package/basetree/package.json +0 -4
  140. package/breadcrumb/package.json +0 -4
  141. package/button/Button.es.js +0 -120
  142. package/button/package.json +0 -4
  143. package/buttonaddbyscan/package.json +0 -4
  144. package/buttonbulkaction/ButtonBulkAction.es.js +0 -238
  145. package/buttonbulkaction/package.json +0 -4
  146. package/buttoncopy/package.json +0 -4
  147. package/buttondownload/package.json +0 -4
  148. package/buttonfilter/package.json +0 -4
  149. package/buttonradio/package.json +0 -4
  150. package/buttonscan/ButtonScan.es.js +0 -416
  151. package/buttonscan/package.json +0 -4
  152. package/buttonsearch/package.json +0 -4
  153. package/buttonsearchbyscan/package.json +0 -4
  154. package/buttonselecttree/package.json +0 -4
  155. package/buttonselectuser/package.json +0 -4
  156. package/buttonsync/package.json +0 -4
  157. package/buttontoggle/package.json +0 -4
  158. package/buttonviewlog/package.json +0 -4
  159. package/calendar/package.json +0 -4
  160. package/card/package.json +0 -4
  161. package/carousel/package.json +0 -4
  162. package/checkbox/package.json +0 -4
  163. package/config/package.json +0 -4
  164. package/customcolumn/package.json +0 -4
  165. package/datatable/package.json +0 -4
  166. package/datepicker/DatePicker.es.js +0 -224
  167. package/datepicker/package.json +0 -4
  168. package/daypicker/package.json +0 -4
  169. package/dialog/package.json +0 -4
  170. package/dialogassetnamedetail/package.json +0 -4
  171. package/dialogconfirm/package.json +0 -4
  172. package/dialogdamagelog/package.json +0 -4
  173. package/dialogform/package.json +0 -4
  174. package/dialoglinkedasset/package.json +0 -4
  175. package/dialogprintqr/DialogPrintQR.es.js +0 -334
  176. package/dialogprintqr/package.json +0 -4
  177. package/dialogreportdamage/package.json +0 -4
  178. package/dialogreportmissing/package.json +0 -4
  179. package/dialogreporttag/package.json +0 -4
  180. package/dialogselecttree/package.json +0 -4
  181. package/dialogselectuser/package.json +0 -4
  182. package/dialogtransferlog/package.json +0 -4
  183. package/directives/focus/package.json +0 -4
  184. package/directives/tooltip/index.es.js +0 -4
  185. package/directives/tooltip/package.json +0 -4
  186. package/disposalreport/package.json +0 -4
  187. package/dropdown/package.json +0 -4
  188. package/event-bus/package.json +0 -4
  189. package/fileupload/package.json +0 -4
  190. package/filtercontainer/package.json +0 -4
  191. package/form/package.json +0 -4
  192. package/icon/package.json +0 -4
  193. package/image/package.json +0 -4
  194. package/imagecompressor/package.json +0 -4
  195. package/index.d.ts +0 -2
  196. package/inlinemessage/package.json +0 -4
  197. package/inputbadge/package.json +0 -4
  198. package/inputcurrency/InputCurrency.es.js +0 -150
  199. package/inputcurrency/helpers/index.es.js +0 -5
  200. package/inputcurrency/helpers/package.json +0 -4
  201. package/inputcurrency/package.json +0 -4
  202. package/inputemail/package.json +0 -4
  203. package/inputnumber/package.json +0 -4
  204. package/inputotp/package.json +0 -4
  205. package/inputpassword/package.json +0 -4
  206. package/inputphonenumber/package.json +0 -4
  207. package/inputrangenumber/package.json +0 -4
  208. package/inputsearch/package.json +0 -4
  209. package/inputtext/package.json +0 -4
  210. package/inputurl/package.json +0 -4
  211. package/invisiblefield/package.json +0 -4
  212. package/languageswitcher/package.json +0 -4
  213. package/litedropdown/package.json +0 -4
  214. package/loading/package.json +0 -4
  215. package/loading/store/index.es.js +0 -5
  216. package/loading/store/package.json +0 -4
  217. package/menu/package.json +0 -4
  218. package/multiselect/package.json +0 -4
  219. package/overlaypanel/package.json +0 -4
  220. package/paginator/package.json +0 -4
  221. package/plugins/formValidation/package.json +0 -4
  222. package/plugins/i18n/index.es.js +0 -8
  223. package/plugins/i18n/package.json +0 -4
  224. package/plugins/i18n-extension.d.ts +0 -4
  225. package/steps/package.json +0 -4
  226. package/tabmenu/package.json +0 -4
  227. package/tagtype/package.json +0 -4
  228. package/textarea/package.json +0 -4
  229. package/timeline/package.json +0 -4
  230. package/toast/package.json +0 -4
  231. package/toast/service/index.es.js +0 -5
  232. package/toast/service/package.json +0 -4
  233. package/toggleswitch/package.json +0 -4
  234. package/transactionroles/package.json +0 -4
  235. package/tree/package.json +0 -4
  236. package/username/package.json +0 -4
  237. package/userwithicon/package.json +0 -4
  238. package/utils/package.json +0 -4
  239. package/validatormessage/package.json +0 -4
  240. /package/inputgroup/{InputGroup.es.js → index.es.js} +0 -0
  241. /package/mentionsection/{MentionSection.es.js → index.es.js} +0 -0
  242. /package/multirow/{MultiRow.es.js → index.es.js} +0 -0
@@ -1,15 +1,15 @@
1
- import { defineComponent as z, onMounted as E, onUnmounted as T, inject as U, shallowRef as A, ref as R, reactive as D, computed as h, watch as v, createBlock as V, openBlock as w, withCtx as t, createVNode as i, normalizeClass as F, renderSlot as H, unref as s, mergeProps as k, createSlots as W, normalizeProps as p, guardReactiveProps as f, withModifiers as q, createElementVNode as G, toDisplayString as J, createCommentVNode as K } from "vue";
1
+ import { defineComponent as z, onMounted as E, onUnmounted as T, inject as U, shallowRef as A, ref as R, reactive as D, computed as h, watch as v, createBlock as V, openBlock as w, withCtx as t, createVNode as i, normalizeClass as F, renderSlot as H, unref as r, mergeProps as k, createSlots as W, normalizeProps as p, guardReactiveProps as f, withModifiers as q, createElementVNode as G, toDisplayString as J, createCommentVNode as K } from "vue";
2
2
  import { u as Q } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
3
- import { e as S } from "../buttonbulkaction/ButtonBulkAction.es.js";
4
- import { u as X } from "../animation/Animation.es.js";
3
+ import { e as S } from "../event-bus/index.es.js";
4
+ import { u as X } from "../plugins/WangsVue.es.js";
5
5
  import { f as Y } from "../utils/filterOptions.util.es.js";
6
6
  import { a as Z } from "../utils/textFormatter.util.es.js";
7
7
  import { s as ee } from "../vendor/primevue/multiselect/multiselect.esm.es.js";
8
- import { _ as M } from "../button/Button.es.js";
9
- import { _ as le } from "../fieldwrapper/FieldWrapper.es.js";
10
- import c from "../icon/index.es.js";
11
- import { _ as oe } from "../inputgroup/InputGroup.es.js";
12
- import ae from "../validatormessage/index.es.js";
8
+ import { _ as M } from "../button/index.es.js";
9
+ import { _ as le } from "../fieldwrapper/index.es.js";
10
+ import { _ as c } from "../icon/index.es.js";
11
+ import { _ as oe } from "../inputgroup/index.es.js";
12
+ import { _ as ae } from "../validatormessage/index.es.js";
13
13
  const he = /* @__PURE__ */ z({
14
14
  __name: "MultiSelect",
15
15
  props: {
@@ -45,20 +45,20 @@ const he = /* @__PURE__ */ z({
45
45
  });
46
46
  const { locale: m } = X("MultiSelect"), n = U("preset", {}).multiselect, u = A(!1), d = R(), a = D({
47
47
  value: e.initialValue ? e.initialValue : e.modelValue
48
- }), $ = h(() => Y(e.options)), O = h(() => {
48
+ }), _ = h(() => Y(e.options)), $ = h(() => {
49
49
  var l;
50
50
  return m.emptySelectionErrorMessage.replace("{label}", e.label).replace(
51
51
  "{formattedLabel}",
52
52
  (l = Z(e.label)) == null ? void 0 : l.toLowerCase()
53
53
  );
54
- }), _ = h(() => {
54
+ }), O = h(() => {
55
55
  var l;
56
56
  return e.loading ? m.loadingPlaceholder : e.placeholder ?? ((l = m.inputPlaceholder) == null ? void 0 : l.replace("{label}", e.label ?? "").replace("{lowercaseLabel}", (e.label ?? "").toLowerCase()));
57
57
  }), x = () => {
58
58
  var l;
59
59
  e.useValidator && (Object.assign(
60
60
  a,
61
- Q(e.fieldName ?? "multiSelect", (o) => !(Array.isArray(o) && o.length) && e.mandatory ? typeof e.validatorMessage == "object" && "empty" in e.validatorMessage ? e.validatorMessage.empty : e.validatorMessage ?? O.value : !0)
61
+ Q(e.fieldName ?? "multiSelect", (o) => !(Array.isArray(o) && o.length) && e.mandatory ? typeof e.validatorMessage == "object" && "empty" in e.validatorMessage ? e.validatorMessage.empty : e.validatorMessage ?? $.value : !0)
62
62
  ), (l = e.initialValue) != null && l.length && (a.value = e.initialValue));
63
63
  }, g = () => {
64
64
  d.value && d.value.show();
@@ -103,11 +103,11 @@ const he = /* @__PURE__ */ z({
103
103
  default: t(() => {
104
104
  var b;
105
105
  return [
106
- i(s(ee), k(e, {
106
+ i(r(ee), k(e, {
107
107
  ref_key: "multiselect",
108
108
  ref: d,
109
109
  modelValue: a.value,
110
- "onUpdate:modelValue": o[0] || (o[0] = (r) => a.value = r),
110
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => a.value = s),
111
111
  "aria-describedby": e.label + "error",
112
112
  class: [
113
113
  {
@@ -115,18 +115,18 @@ const he = /* @__PURE__ */ z({
115
115
  }
116
116
  ],
117
117
  display: e.display,
118
- "filter-placeholder": e.filterPlaceholder || s(m).filterPlaceholder,
118
+ "filter-placeholder": e.filterPlaceholder || r(m).filterPlaceholder,
119
119
  "max-selected-labels": e.maxSelectedLabels,
120
- options: $.value,
121
- placeholder: _.value,
120
+ options: _.value,
121
+ placeholder: O.value,
122
122
  "selected-items-label": e.selectedItemsLabel,
123
123
  "show-toggle-all": e.filter,
124
124
  "virtual-scroller-options": (((b = l.options) == null ? void 0 : b.length) ?? 0) > 10 ? { itemSize: 32 } : void 0,
125
- onHide: o[1] || (o[1] = (r) => (u.value = !1, l.$emit("hide"))),
126
- onShow: o[2] || (o[2] = (r) => (l.$emit("show"), u.value = !0))
125
+ onHide: o[1] || (o[1] = (s) => (u.value = !1, l.$emit("hide"))),
126
+ onShow: o[2] || (o[2] = (s) => (l.$emit("show"), u.value = !0))
127
127
  }), W({
128
128
  dropdownicon: t(() => [
129
- i(c, p(f(s(n).dropdownicon({ state: { isShowOverlay: u.value } }))), null, 16)
129
+ i(c, p(f(r(n).dropdownicon({ state: { isShowOverlay: u.value } }))), null, 16)
130
130
  ]),
131
131
  headercheckboxicon: t(() => [
132
132
  i(c, { icon: "check" })
@@ -135,12 +135,12 @@ const he = /* @__PURE__ */ z({
135
135
  i(c, { icon: "check" })
136
136
  ]),
137
137
  filtericon: t(() => [
138
- i(c, p(f(s(n).filtericon)), null, 16)
138
+ i(c, p(f(r(n).filtericon)), null, 16)
139
139
  ]),
140
- removetokenicon: t(({ removeCallback: r, item: N }) => [
140
+ removetokenicon: t(({ removeCallback: s, item: N }) => [
141
141
  i(M, k({
142
- onClick: q((j) => r(j, N), ["stop"])
143
- }, s(n).removeTokenIcon, {
142
+ onClick: q((j) => s(j, N), ["stop"])
143
+ }, r(n).removeTokenIcon, {
144
144
  icon: "close",
145
145
  rounded: "",
146
146
  severity: "dark",
@@ -148,14 +148,14 @@ const he = /* @__PURE__ */ z({
148
148
  }), null, 16, ["onClick"])
149
149
  ]),
150
150
  loadingicon: t(() => [
151
- i(c, p(f(s(n).loadingicon)), null, 16)
151
+ i(c, p(f(r(n).loadingicon)), null, 16)
152
152
  ]),
153
153
  _: 2
154
154
  }, [
155
155
  l.loading ? {
156
156
  name: "value",
157
- fn: t(({ placeholder: r }) => [
158
- G("span", p(f(s(n).loadingplaceholder)), J(r), 17)
157
+ fn: t(({ placeholder: s }) => [
158
+ G("span", p(f(r(n).loadingplaceholder)), J(s), 17)
159
159
  ]),
160
160
  key: "0"
161
161
  } : void 0
@@ -185,5 +185,5 @@ const he = /* @__PURE__ */ z({
185
185
  }
186
186
  });
187
187
  export {
188
- he as default
188
+ he as _
189
189
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as u, ref as i, createBlock as f, openBlock as c, unref as y, mergeProps as v, withCtx as h, renderSlot as m } from "vue";
2
- import { e as s } from "../buttonbulkaction/ButtonBulkAction.es.js";
1
+ import { defineComponent as i, ref as u, createBlock as f, openBlock as c, unref as y, mergeProps as v, withCtx as h, renderSlot as m } from "vue";
2
+ import { e as s } from "../event-bus/index.es.js";
3
3
  import { s as w } from "../vendor/primevue/overlaypanel/overlaypanel.esm.es.js";
4
- const x = /* @__PURE__ */ u({
4
+ const x = /* @__PURE__ */ i({
5
5
  __name: "OverlayPanel",
6
6
  props: {
7
7
  dismissable: { type: Boolean, default: !0 },
@@ -17,7 +17,7 @@ const x = /* @__PURE__ */ u({
17
17
  closeOnEscape: { type: Boolean, default: !0 }
18
18
  },
19
19
  setup(l, { expose: n }) {
20
- const t = +/* @__PURE__ */ new Date(), o = i(), r = l, p = () => {
20
+ const t = +/* @__PURE__ */ new Date(), o = u(), r = l, p = () => {
21
21
  s.off("overlay:show", a);
22
22
  }, a = (e) => {
23
23
  o.value && e.overlayId !== t && r.dismissableOverlay && o.value.hide();
@@ -30,7 +30,7 @@ const x = /* @__PURE__ */ u({
30
30
  o.value.hide();
31
31
  }, show: (e) => {
32
32
  o.value.show(e);
33
- } }), (e, I) => (c(), f(y(w), v(e.$props, {
33
+ } }), (e, _) => (c(), f(y(w), v(e.$props, {
34
34
  id: t,
35
35
  ref_key: "op",
36
36
  ref: o,
@@ -45,5 +45,5 @@ const x = /* @__PURE__ */ u({
45
45
  }
46
46
  });
47
47
  export {
48
- x as default
48
+ x as _
49
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-fats",
3
- "version": "1.0.1-rc.0",
3
+ "version": "1.0.1-rc.11",
4
4
  "author": "Wangsit FE Developer",
5
5
  "description": "Fixed Asset Tagsamurai VueJS Component Library",
6
6
  "type": "module",
@@ -12,10 +12,6 @@
12
12
  "types": "./wangsvue-fats.d.ts",
13
13
  "import": "./wangsvue-fats.es.js"
14
14
  },
15
- "./**/*": {
16
- "types": "./*/index.d.ts",
17
- "import": "./*/index.es.js"
18
- },
19
15
  "./style.css": "./style.css"
20
16
  },
21
17
  "dependencies": {
@@ -1,6 +1,6 @@
1
- import { defineComponent as m, mergeModels as i, useModel as c, inject as w, createBlock as u, openBlock as g, unref as p, mergeProps as f, withCtx as r, createVNode as t } from "vue";
1
+ import { defineComponent as m, mergeModels as i, useModel as c, inject as w, createBlock as g, openBlock as u, unref as p, mergeProps as f, withCtx as r, createVNode as t } from "vue";
2
2
  import { s as k } from "../vendor/primevue/paginator/paginator.esm.es.js";
3
- import a from "../icon/index.es.js";
3
+ import { _ as a } from "../icon/index.es.js";
4
4
  const R = /* @__PURE__ */ m({
5
5
  __name: "Paginator",
6
6
  props: /* @__PURE__ */ i({
@@ -20,14 +20,14 @@ const R = /* @__PURE__ */ m({
20
20
  }),
21
21
  emits: /* @__PURE__ */ i(["page", "update:rows"], ["update:rows"]),
22
22
  setup(l) {
23
- const s = c(l, "rows"), d = w("preset", {}).datatable;
24
- return (e, o) => (g(), u(p(k), f({
25
- rows: s.value,
26
- "onUpdate:rows": o[0] || (o[0] = (n) => s.value = n)
27
- }, p(d).paginator({ context: { totalRecords: e.totalRecords } }), {
28
- template: e.template,
29
- "total-records": e.totalRecords,
30
- onPage: o[1] || (o[1] = (n) => e.$emit("page", n))
23
+ const n = c(l, "rows"), d = w("preset", {}).datatable;
24
+ return (o, e) => (u(), g(p(k), f({
25
+ rows: n.value,
26
+ "onUpdate:rows": e[0] || (e[0] = (s) => n.value = s)
27
+ }, p(d).paginator({ context: { totalRecords: o.totalRecords } }), {
28
+ template: o.template,
29
+ "total-records": o.totalRecords,
30
+ onPage: e[1] || (e[1] = (s) => o.$emit("page", s))
31
31
  }), {
32
32
  firstpagelinkicon: r(() => [
33
33
  t(a, { icon: "round-keyboard-double-arrow-left" })
@@ -46,5 +46,5 @@ const R = /* @__PURE__ */ m({
46
46
  }
47
47
  });
48
48
  export {
49
- R as default
49
+ R as _
50
50
  };
@@ -0,0 +1,40 @@
1
+ const u = (s, l) => {
2
+ l.forEach((n) => {
3
+ const t = s.document.createElement("link");
4
+ t.setAttribute("rel", "stylesheet"), t.setAttribute("type", "text/css"), t.setAttribute("href", n), s.document.head.appendChild(t);
5
+ });
6
+ }, y = {
7
+ install(s, l = {}) {
8
+ s.config.globalProperties.$htmlToPaper = (n, t, a = () => {
9
+ }) => {
10
+ var r;
11
+ const o = {
12
+ name: "_blank",
13
+ specs: ["fullscreen=yes", "titlebar=yes", "scrollbars=yes"],
14
+ styles: [],
15
+ ...l,
16
+ ...t
17
+ }, d = ((r = o.specs) == null ? void 0 : r.join(",")) || "", c = document.getElementById(n);
18
+ if (!c) {
19
+ alert(`Element to print #${n} not found!`);
20
+ return;
21
+ }
22
+ const e = window.open("", o.name, d);
23
+ return e && (e.document.write(`
24
+ <html>
25
+ <head>
26
+ <title>${document.title}</title>
27
+ </head>
28
+ <body>
29
+ ${c.innerHTML}
30
+ </body>
31
+ </html>
32
+ `), u(e, o.styles || []), setTimeout(() => {
33
+ e.document.close(), e.focus(), e.print(), e.close(), a();
34
+ }, 1e3)), !0;
35
+ };
36
+ }
37
+ };
38
+ export {
39
+ y as V
40
+ };
@@ -1,9 +1,8 @@
1
- import { inject as c, defineComponent as p, computed as m, ref as g, onMounted as h, createElementBlock as b, openBlock as f, mergeProps as v, createElementVNode as M } from "vue";
2
- import { x as T } from "../vendor/@wangs-ui/vue/dist/index.es.js";
3
- import { d as P } from "../utils/object.util.es.js";
4
- import { P as x } from "../vendor/primevue/config/config.esm.es.js";
5
- import { m as y } from "../utils/mergePropsWithDefaults.util.es.js";
6
- const w = {
1
+ import { inject as c } from "vue";
2
+ import { x as m } from "../vendor/@wangs-ui/vue/dist/index.es.js";
3
+ import { d as g } from "../utils/object.util.es.js";
4
+ import { P as p } from "../vendor/primevue/config/config.esm.es.js";
5
+ const h = {
7
6
  startsWith: "Starts with",
8
7
  contains: "Contains",
9
8
  notContains: "Not contains",
@@ -150,7 +149,7 @@ const w = {
150
149
  }
151
150
  }, u = {
152
151
  locale: {
153
- global: w,
152
+ global: h,
154
153
  components: {
155
154
  FieldWrapper: {
156
155
  labelOptional: "(opsional)",
@@ -295,96 +294,52 @@ const w = {
295
294
  formatUserName: !0
296
295
  }
297
296
  }
298
- }, d = Symbol("WangsVue"), L = (r) => {
299
- const a = c(d);
300
- if (!a)
297
+ }, d = Symbol("WangsVue"), x = (t) => {
298
+ const l = c(d);
299
+ if (!l)
301
300
  throw new Error("WangsVue is not installed!");
302
- return r ? a.getComponentConfig(r) : a.config;
303
- }, C = (r, a) => P(r, a), I = (r = u, a = !0) => {
304
- const n = a ? C(u, r) : r;
301
+ return t ? l.getComponentConfig(t) : l.config;
302
+ }, b = (t, l) => g(t, l), P = (t = u, l = !0) => {
303
+ const r = l ? b(u, t) : t;
305
304
  return {
306
- install: (o, t) => {
307
- var i;
308
- const l = {
309
- ...n,
310
- ...t,
311
- preset: t.preset ?? t.pt,
305
+ install: (o, e) => {
306
+ var s;
307
+ const a = {
308
+ ...r,
309
+ ...e,
310
+ preset: e.preset ?? e.pt,
312
311
  locale: {
313
- ...n.locale,
314
- ...t == null ? void 0 : t.locale,
312
+ ...r.locale,
313
+ ...e == null ? void 0 : e.locale,
315
314
  components: {
316
- ...n.locale.components,
317
- ...((i = t == null ? void 0 : t.locale) == null ? void 0 : i.components) || {}
315
+ ...r.locale.components,
316
+ ...((s = e == null ? void 0 : e.locale) == null ? void 0 : s.components) || {}
318
317
  }
319
318
  },
320
319
  defaultProps: {
321
- ...n.defaultProps,
322
- ...(t == null ? void 0 : t.defaultProps) || {}
320
+ ...r.defaultProps,
321
+ ...(e == null ? void 0 : e.defaultProps) || {}
323
322
  },
324
- useToastConfig: n.useToastConfig
325
- }, s = {
326
- config: l,
327
- getComponentConfig: (e) => ({
328
- defaultProps: l.defaultProps[e] || {},
323
+ useToastConfig: r.useToastConfig
324
+ }, n = {
325
+ config: a,
326
+ getComponentConfig: (i) => ({
327
+ defaultProps: a.defaultProps[i] || {},
329
328
  locale: {
330
- ...l.locale.components[e] || {},
331
- global: l.locale.global
329
+ ...a.locale.components[i] || {},
330
+ global: a.locale.global
332
331
  }
333
332
  })
334
333
  };
335
- o.config.globalProperties.$wangsvue = s, o.config.globalProperties.$preset = s.config.preset, o.provide(d, s), o.provide("preset", l.preset), o.provide("useToastConfig", l.useToastConfig), o.use(x, {
334
+ o.config.globalProperties.$wangsvue = n, o.config.globalProperties.$preset = n.config.preset, o.provide(d, n), o.provide("preset", a.preset), o.provide("useToastConfig", a.useToastConfig), o.use(p, {
336
335
  unstyled: !0,
337
- pt: l.preset,
338
- locale: l.locale.global
339
- }), o.use(T);
336
+ pt: a.preset,
337
+ locale: a.locale.global
338
+ }), o.use(m);
340
339
  }
341
340
  };
342
- }, S = (r, a, n) => {
343
- const o = r[a];
344
- return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((t, l) => {
345
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
346
- l.bind(
347
- null,
348
- new Error(
349
- "Unknown variable dynamic import: " + a + (a.split("/").length !== n ? ". Note that variables only represent file names one level deep." : "")
350
- )
351
- )
352
- );
353
- });
354
- }, D = /* @__PURE__ */ p({
355
- __name: "Animation",
356
- props: {
357
- animation: {},
358
- autoplay: { type: Boolean, default: !0 },
359
- loop: { type: Boolean, default: !0 }
360
- },
361
- setup(r) {
362
- const a = r, { defaultProps: n } = L("Animation"), o = m(() => y(a, n)), t = g(null);
363
- h(async () => {
364
- const s = await S(/* @__PURE__ */ Object.assign({ "../../assets/lottie/admin/loading-page.lottie": () => import("../assets/lottiejs/loading-page.es.js").then((e) => e.l), "../../assets/lottie/admin/loading-table.lottie": () => import("../assets/lottiejs/loading-table.es.js").then((e) => e.l), "../../assets/lottie/admin/no-data.lottie": () => import("../assets/lottiejs/no-data.es.js").then((e) => e.n), "../../assets/lottie/supplyasset/loading-page.lottie": () => import("../assets/lottiejs/loading-page.es.js").then((e) => e.a), "../../assets/lottie/supplyasset/loading-table.lottie": () => import("../assets/lottiejs/loading-table.es.js").then((e) => e.a), "../../assets/lottie/supplyasset/no-data.lottie": () => import("../assets/lottiejs/no-data.es.js").then((e) => e.a), "../../assets/lottie/workspace/loading-page.lottie": () => import("../assets/lottiejs/loading-page.es.js").then((e) => e.b), "../../assets/lottie/workspace/loading-plane.lottie": () => import("../assets/lottiejs/loading-plane.es.js"), "../../assets/lottie/workspace/loading-table.lottie": () => import("../assets/lottiejs/loading-table.es.js").then((e) => e.b), "../../assets/lottie/workspace/no-data.lottie": () => import("../assets/lottiejs/no-data.es.js").then((e) => e.b) }), `../../assets/lottie/${o.value.libPath}/${a.animation}.lottie`, 6), { DotLottie: i } = await l();
365
- t.value && new i({
366
- canvas: t.value,
367
- src: s.default,
368
- autoplay: a.autoplay,
369
- loop: a.loop
370
- });
371
- });
372
- const l = () => import(
373
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
374
- // @ts-ignore
375
- "https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.38.2/+esm"
376
- );
377
- return (s, i) => (f(), b("div", v({ "data-wv-name": "animation" }, s.$attrs), [
378
- M("canvas", {
379
- ref_key: "canvasRef",
380
- ref: t,
381
- style: { width: "100%", height: "100%" }
382
- }, null, 512)
383
- ], 16));
384
- }
385
- });
341
+ };
386
342
  export {
387
- D as _,
388
- I as c,
389
- L as u
343
+ P as c,
344
+ x as u
390
345
  };
@@ -0,0 +1,103 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { App, Ref } from 'vue';
3
+ export type Locale = string;
4
+ export interface LanguageOption {
5
+ /**
6
+ * ISO 639-1 language code (e.g., "en" for English, "fr" for French).
7
+ */
8
+ isoCode?: string;
9
+ /**
10
+ * The name of the language in English (e.g., "English", "Français").
11
+ */
12
+ name: string;
13
+ /**
14
+ * The URL of the country's flag image.
15
+ * Flags are sourced from https://flagcdn.com and are typically in SVG format for high-quality resolution.
16
+ */
17
+ flag?: string;
18
+ }
19
+ export interface I18n {
20
+ /**
21
+ * Locale message translation
22
+ *
23
+ * @param key - The translation key
24
+ * @param params - A values of named interpolation
25
+ * @param args - Positional interpolation values
26
+ *
27
+ * @returns translation message
28
+ * @example `t('Hello {user}!', { user: 'John Doe' })` - returns: 'Hello John Doe!'
29
+ * @example `t('Hello %s! I am %s.', "John Doe", "Peter Smith")` - returns: 'Hello John Doe! I am Peter Smith.'
30
+ */
31
+ t: {
32
+ (key: string, params: Record<string, any>): string;
33
+ (key: string, ...args: (string | number | boolean)[]): string;
34
+ };
35
+ /**
36
+ * Change the locale dynamically
37
+ *
38
+ * @param newLocale - The locale to switch to
39
+ */
40
+ setLocale: (newLocale: Locale) => Promise<void>;
41
+ /**
42
+ * Get the current locale
43
+ *
44
+ * @returns Current locale
45
+ */
46
+ locale: Ref<Locale>;
47
+ /**
48
+ * Service methods handle fetch requests
49
+ */
50
+ service?: I18nService;
51
+ }
52
+ type MessageMap = Record<string, string>;
53
+ export interface I18nService {
54
+ /**
55
+ * Fetch all translation messages for a specific locale.
56
+ * @param locale The locale code (e.g., 'en', 'id').
57
+ * @returns A promise resolving to a key-value record of messages.
58
+ */
59
+ getMessages(locale: string): Promise<
60
+ AxiosResponse<{
61
+ data: MessageMap;
62
+ }>
63
+ >;
64
+ /**
65
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
66
+ *
67
+ * @returns Promise Array of options
68
+ */
69
+ getLanguageOptions(): Promise<LanguageOption[]>;
70
+ /**
71
+ * Fetch single lang option meta data
72
+ *
73
+ * @param locale The locale code (e.g., 'en', 'id').
74
+ * @returns Promise LanguageMeta
75
+ */
76
+ getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
77
+ /**
78
+ * Translate a specific text to the target locale.
79
+ * @param key Unique translation key.
80
+ * @param locale Target locale code.
81
+ * @returns A promise resolving to the translated string.
82
+ */
83
+ translateText(key: string, locale: string): Promise<string>;
84
+ }
85
+ export declare const useI18n: () => I18n;
86
+ declare const i18n: {
87
+ install: (app: App) => void;
88
+ };
89
+ export declare const createI18nWithExtension: (
90
+ service: I18nService,
91
+ ) => typeof i18n;
92
+ export default i18n;
93
+ declare module 'vue' {
94
+ interface ComponentCustomProperties {
95
+ $i18n: I18n;
96
+ $t: I18n['t'];
97
+ }
98
+ }
99
+ declare global {
100
+ interface Window {
101
+ i18n: I18n;
102
+ }
103
+ }
@@ -0,0 +1,88 @@
1
+ import { shallowRef as P, shallowReactive as I, inject as M } from "vue";
2
+ import { u as b } from "../assetinfo/index.es.js";
3
+ const n = P(), u = "messages";
4
+ let r;
5
+ const f = () => {
6
+ try {
7
+ const t = localStorage.getItem(u);
8
+ return t ? JSON.parse(t) : {};
9
+ } catch {
10
+ return {};
11
+ }
12
+ }, g = I(f()), a = new Proxy(g, {
13
+ get: (t, e) => {
14
+ const l = f()[e];
15
+ return g[e] = l, l;
16
+ },
17
+ set: (t, e, s) => (g[e] = s, m(g), !0)
18
+ }), m = (t) => {
19
+ localStorage.setItem(u, JSON.stringify(t));
20
+ }, y = async (t) => {
21
+ var e;
22
+ if (!(t in a)) {
23
+ const { setLoading: s } = b();
24
+ s(!0, "Loading language package...");
25
+ let l = {};
26
+ try {
27
+ const { data: c } = await (((e = r == null ? void 0 : r.getMessages) == null ? void 0 : e.call(r, t)) ?? {});
28
+ l = c.data;
29
+ } catch {
30
+ } finally {
31
+ s(!1);
32
+ }
33
+ return l;
34
+ }
35
+ return a[t];
36
+ }, d = (t, ...e) => {
37
+ var c;
38
+ if (!n.value && !localStorage.lang) return t;
39
+ let s = (c = a[n.value]) == null ? void 0 : c[t];
40
+ const l = s === t && n.value !== "en";
41
+ if ((!s || l) && (s = t, r == null || r.translateText(t, n.value).then((o) => {
42
+ a[n.value] ? a[n.value] = {
43
+ ...a[n.value],
44
+ [t]: o
45
+ } : a[n.value] = {
46
+ [t]: o
47
+ };
48
+ }).catch((o) => {
49
+ console.error("Translation error:", o);
50
+ })), e.length === 1 && typeof e[0] == "object" && !Array.isArray(e[0])) {
51
+ const o = e[0];
52
+ return Object.keys(o).reduce(
53
+ (h, i) => h.replaceAll(`{${i}}`, o[i]),
54
+ s
55
+ );
56
+ }
57
+ if (e.length > 0) {
58
+ let o = 0;
59
+ return s.replace(/%s/g, () => String(e[o++] ?? ""));
60
+ }
61
+ return s;
62
+ }, v = async (t) => {
63
+ if (n.value !== t) {
64
+ const e = await y(t);
65
+ n.value = t, a[t] = e, localStorage.lang = t;
66
+ }
67
+ }, O = () => (M("i18n") || console.error("I18n Plugin not installed!"), {
68
+ t: d,
69
+ locale: n,
70
+ setLocale: v,
71
+ service: r
72
+ }), S = () => {
73
+ const t = {
74
+ t: d,
75
+ locale: n,
76
+ setLocale: v,
77
+ service: r
78
+ };
79
+ return {
80
+ install(e) {
81
+ e.config.globalProperties.$i18n = t, e.config.globalProperties.$t = t.t, e.provide("i18n", t);
82
+ }
83
+ };
84
+ }, T = (t) => (r = t, S());
85
+ export {
86
+ T as c,
87
+ O as u
88
+ };
@@ -1,4 +1,4 @@
1
- import { a as u, u as n } from "../../vendor/vee-validate/dist/vee-validate.esm.es.js";
1
+ import { a as u, u as a } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
2
2
  const l = () => {
3
3
  const { values: e, handleSubmit: s, setValues: t, setFieldValue: o, errors: r } = u();
4
4
  return {
@@ -8,8 +8,8 @@ const l = () => {
8
8
  setFieldValue: o,
9
9
  errors: r
10
10
  };
11
- }, c = (e, s, t) => n(e, s, t);
11
+ }, c = (e, s, t) => a(e, s, t);
12
12
  export {
13
- c as useField,
14
- l as useForm
13
+ c as a,
14
+ l as u
15
15
  };