@fewangsit/wangsvue-fats 1.0.1-alpha.68 → 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 (78) hide show
  1. package/animation/index.es.js +9 -8
  2. package/assetinfo/index.d.ts +5 -4
  3. package/assetinfo/index.es.js +113 -97
  4. package/backgroundimagecropper/index.es.js +14 -12
  5. package/button/index.es.js +58 -48
  6. package/buttonbulkaction/index.es.js +67 -59
  7. package/buttondownload/index.es.js +18 -18
  8. package/buttonradio/index.es.js +11 -11
  9. package/buttonscan/index.es.js +1 -1
  10. package/buttonsearch/index.es.js +14 -14
  11. package/buttonselectuser/index.es.js +29 -29
  12. package/checkbox/index.es.js +5 -5
  13. package/config/defaultProps.es.js +3 -4
  14. package/datatable/index.es.js +470 -465
  15. package/datepicker/index.es.js +17 -17
  16. package/daypicker/index.es.js +21 -21
  17. package/dialog/index.es.js +17 -15
  18. package/dialogbasictransferlog/index.es.js +89 -89
  19. package/dialogconfirm/index.es.js +33 -33
  20. package/dialogdamagelog/index.es.js +89 -89
  21. package/dialogform/index.es.js +16 -16
  22. package/dialogfulltransferlog/index.es.js +96 -96
  23. package/dialoglinkedasset/index.es.js +48 -48
  24. package/dialogprintqr/index.es.js +70 -70
  25. package/dialogreportdamage/index.es.js +57 -57
  26. package/dialogreportmissing/index.es.js +94 -86
  27. package/dialogselecttree/index.es.js +18 -16
  28. package/dialogselectuser/index.es.js +16 -16
  29. package/directives/index.d.ts +1 -0
  30. package/directives/index.es.js +1 -0
  31. package/directives/safeHtml.d.ts +16 -0
  32. package/directives/safeHtml.es.js +12 -0
  33. package/disposalreport/index.es.js +1 -1
  34. package/disposalreportbulkaction/index.es.js +40 -41
  35. package/disposalreportdialogselectasset/index.es.js +72 -72
  36. package/disposalreporttable/index.es.js +108 -108
  37. package/disposalreporttablefilter/index.es.js +16 -17
  38. package/dropdown/index.es.js +120 -117
  39. package/fieldwrapper/index.es.js +7 -7
  40. package/fileupload/index.es.js +35 -31
  41. package/hardwaresync/index.es.js +12 -12
  42. package/headercell/index.es.js +4 -4
  43. package/icon/index.es.js +26 -25
  44. package/imagecompressor/index.es.js +143 -143
  45. package/imageinputinfo/index.es.js +13 -13
  46. package/inlinemessage/index.es.js +12 -12
  47. package/inputbadge/index.es.js +42 -43
  48. package/inputnumber/index.es.js +7 -7
  49. package/inputpassword/index.es.js +9 -9
  50. package/inputrangenumber/index.es.js +16 -16
  51. package/inputsearch/index.es.js +18 -18
  52. package/inputtext/index.es.js +33 -33
  53. package/litedropdown/index.es.js +48 -40
  54. package/menuitem/index.es.js +27 -26
  55. package/multirow/index.es.js +16 -16
  56. package/multiselect/index.es.js +86 -83
  57. package/package.json +1 -1
  58. package/plugins/basei18n.d.ts +2 -2
  59. package/plugins/basei18n.es.js +48 -42
  60. package/stats.html +1 -1
  61. package/style.css +1 -1
  62. package/tabmenu/index.es.js +14 -9
  63. package/tagtype/index.es.js +33 -30
  64. package/textarea/index.es.js +3 -3
  65. package/toggledarkmode/store/index.d.ts +7 -0
  66. package/toggleswitch/index.es.js +3 -3
  67. package/treesearchinput/index.es.js +11 -11
  68. package/username/index.es.js +39 -39
  69. package/utils/baseToast.util.es.js +23 -22
  70. package/utils/index.es.js +1 -2
  71. package/utils/textFormatter.util.d.ts +32 -0
  72. package/utils/textFormatter.util.es.js +38 -10
  73. package/validatormessage/index.es.js +1 -1
  74. package/vendor/dompurify/dist/purify.es.es.js +553 -0
  75. package/wangsvue-fats.d.ts +2 -1
  76. package/wangsvue-fats.es.js +190 -186
  77. package/wangsvue-fats.esm.browser.js +17750 -17086
  78. package/wangsvue-fats.system.js +73 -72
@@ -1,7 +1,12 @@
1
1
  import { shallowRef as u, defineComponent as g, computed as f, ref as k, watch as h, createElementBlock as w, openBlock as b, mergeProps as y, createElementVNode as v } from "vue";
2
2
  import { u as _ } from "../plugins/WangsVue.es.js";
3
3
  import { m as D } from "../utils/mergePropsWithDefaults.util.es.js";
4
- const m = (s, e, n) => {
4
+ const l = u(!1), P = () => ({
5
+ darkMode: l,
6
+ toggleDarkMode: (e) => {
7
+ l.value = e, document.documentElement.classList.toggle("dark", l.value), localStorage.setItem("dark-mode", JSON.stringify(l.value));
8
+ }
9
+ }), m = (s, e, n) => {
5
10
  const o = s[e];
6
11
  return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((r, a) => {
7
12
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
@@ -13,12 +18,7 @@ const m = (s, e, n) => {
13
18
  )
14
19
  );
15
20
  });
16
- }, l = u(!1), P = () => ({
17
- darkMode: l,
18
- toggleDarkMode: (e) => {
19
- l.value = e, document.documentElement.classList.toggle("dark", l.value), localStorage.setItem("dark-mode", JSON.stringify(l.value));
20
- }
21
- }), B = /* @__PURE__ */ g({
21
+ }, B = /* @__PURE__ */ g({
22
22
  __name: "Animation",
23
23
  props: {
24
24
  animation: {},
@@ -59,5 +59,6 @@ const m = (s, e, n) => {
59
59
  }
60
60
  });
61
61
  export {
62
- B as _
62
+ B as _,
63
+ P as u
63
64
  };
@@ -9,12 +9,13 @@ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers.d';
9
9
  type Field = 'brand' | 'model' | 'group' | 'status';
10
10
 
11
11
  export type AssetGeneralInfo = Partial<AssetDetailDataType> & {
12
- assetName?: AssetBrandModelValue;
13
12
  assetTagType?: AssetTagType;
14
- assetBrand?: AssetBrandModelValue;
15
- assetModel?: AssetBrandModelValue;
16
- assetGroup?: AssetBrandModelValue;
13
+ assetName?: AssetBrandModelValue | string;
14
+ assetBrand?: AssetBrandModelValue | string;
15
+ assetModel?: AssetBrandModelValue | string;
16
+ assetGroup?: AssetBrandModelValue | string;
17
17
  asset?: string;
18
+ nameWithSequence?: string;
18
19
  assetImage?: string;
19
20
  };
20
21
 
@@ -1,30 +1,30 @@
1
- import { shallowRef as K, ref as X, defineComponent as Y, onMounted as Z, computed as c, watch as ee, createElementBlock as u, openBlock as d, createVNode as p, createElementVNode as l, createCommentVNode as f, toDisplayString as x, Fragment as se, unref as q, normalizeClass as y } from "vue";
2
- import { AssetServices as ae } from "@tagsamurai/fats-api-services";
1
+ import { shallowRef as B, ref as j, defineComponent as z, onMounted as J, computed as r, watch as K, createElementBlock as d, openBlock as c, createVNode as p, createElementVNode as i, createCommentVNode as f, toDisplayString as u, Fragment as O, unref as $, normalizeClass as y } from "vue";
2
+ import { AssetServices as R } from "@tagsamurai/fats-api-services";
3
3
  import "../utils/role.util.es.js";
4
- import { g as te } from "../utils/getStatusSeverity.util.es.js";
5
- import { u as le } from "../utils/toast.util.es.js";
4
+ import { g as H } from "../utils/getStatusSeverity.util.es.js";
5
+ import { u as P } from "../utils/toast.util.es.js";
6
6
  import { _ } from "../badge/index.es.js";
7
- import { _ as ne } from "../image/index.es.js";
8
- import { _ as oe } from "../tagtype/index.es.js";
9
- const z = K(!1), J = X(), ie = () => ({
10
- loading: z,
11
- message: J,
12
- setLoading: (m, t) => {
13
- z.value = m, J.value = t, document.body.classList[m ? "add" : "remove"]("loading");
7
+ import { _ as Q } from "../image/index.es.js";
8
+ import { _ as U } from "../tagtype/index.es.js";
9
+ const I = B(!1), N = j(), X = () => ({
10
+ loading: I,
11
+ message: N,
12
+ setLoading: (v, s) => {
13
+ I.value = v, N.value = s, document.body.classList[v ? "add" : "remove"]("loading");
14
14
  }
15
- }), re = { class: "flex justify-between gap-[18px] dark:text-general-100" }, ue = { class: "w-full flex flex-col gap-[6px]" }, de = { class: "flex justify-between" }, ce = { class: "" }, pe = { class: "text-[16px] font-bold leading-[19.12px]" }, fe = { class: "flex items-center gap-[6px]" }, me = { class: "text-general-400 dark:text-general-200 leading-[16.39px]" }, ve = ["href"], ge = { class: "flex flex-col gap-1" }, ye = {
15
+ }), Y = { class: "flex justify-between gap-[18px] dark:text-general-100" }, Z = { class: "w-full flex flex-col gap-[6px]" }, ee = { class: "flex justify-between" }, ae = { class: "" }, se = { class: "text-[16px] font-bold leading-[19.12px]" }, te = { class: "flex items-center gap-[6px]" }, le = { class: "text-general-400 dark:text-general-200 leading-[16.39px]" }, ne = ["href"], oe = { class: "flex flex-col gap-1" }, ie = {
16
16
  key: 0,
17
17
  class: "flex gap-3"
18
- }, _e = {
18
+ }, re = {
19
19
  key: 1,
20
20
  class: "flex gap-3"
21
- }, xe = {
21
+ }, ue = {
22
22
  key: 2,
23
23
  class: "flex gap-3"
24
- }, be = {
24
+ }, de = {
25
25
  key: 3,
26
26
  class: "flex gap-3"
27
- }, Ne = /* @__PURE__ */ Y({
27
+ }, xe = /* @__PURE__ */ z({
28
28
  __name: "AssetInfo",
29
29
  props: {
30
30
  id: {},
@@ -33,120 +33,136 @@ const z = K(!1), J = X(), ie = () => ({
33
33
  useNfc: { type: Boolean, default: !0 },
34
34
  useTagType: { type: Boolean, default: !0 }
35
35
  },
36
- setup(b, { expose: m }) {
37
- const t = b;
38
- Z(async () => {
39
- t.transactionDetail ? s.value = t.transactionDetail : await U();
36
+ setup(x, { expose: v }) {
37
+ const s = x;
38
+ J(async () => {
39
+ s.transactionDetail ? t.value = s.transactionDetail : await V();
40
40
  });
41
- const O = le(), { setLoading: k } = ie(), R = JSON.parse(localStorage.getItem("user") ?? "{}"), s = K(), h = c(() => {
41
+ const C = P(), { setLoading: b } = X(), A = JSON.parse(localStorage.getItem("user") ?? "{}"), t = B(), h = r(() => {
42
42
  var e;
43
- return (e = t.fields) == null ? void 0 : e.includes("status");
44
- }), H = c(() => {
45
- const {
46
- setDefault: e,
47
- firstImageBig: a,
48
- secondImageBig: n,
49
- assetImage: o,
50
- firstImage: i,
51
- secondImage: r
52
- } = s.value ?? {}, g = e === "firstImage";
53
- return t.transactionDetail ? o : g ? i ?? a : r ?? n;
54
- }), T = c(() => {
55
- var a, n, o, i, r;
56
- const e = t.transactionDetail ? "assetName" : "name";
57
- return (o = (n = (a = s.value) == null ? void 0 : a[e]) == null ? void 0 : n.aliasCode) != null && o.length ? `${(r = (i = s.value) == null ? void 0 : i[e]) == null ? void 0 : r.aliasCode}` : void 0;
58
- }), P = c(() => {
43
+ return (e = s.fields) == null ? void 0 : e.includes("status");
44
+ }), L = r(() => {
45
+ const { setDefault: e, assetImage: a, firstImage: l, secondImage: n } = t.value ?? {}, o = e === "firstImage";
46
+ return s.transactionDetail ? a : o ? l : n;
47
+ }), D = r(() => {
48
+ var a, l, n, o, m;
49
+ const e = s.transactionDetail ? "assetName" : "name";
50
+ return (n = (l = (a = t.value) == null ? void 0 : a[e]) == null ? void 0 : l.aliasCode) != null && n.length ? `${(m = (o = t.value) == null ? void 0 : o[e]) == null ? void 0 : m.aliasCode}` : void 0;
51
+ }), M = r(() => {
59
52
  var e, a;
60
- return ((e = s.value) == null ? void 0 : e.assetTagType) ?? ((a = s.value) == null ? void 0 : a.tagType);
61
- }), Q = c(() => {
53
+ return ((e = t.value) == null ? void 0 : e.assetTagType) ?? ((a = t.value) == null ? void 0 : a.tagType);
54
+ }), W = r(() => {
62
55
  var e, a;
63
- return ((e = s.value) == null ? void 0 : e.assetName) ?? ((a = s.value) == null ? void 0 : a.name);
64
- }), v = c(() => [
56
+ return ((e = t.value) == null ? void 0 : e.assetName) ?? ((a = t.value) == null ? void 0 : a.name);
57
+ }), g = r(() => [
65
58
  {
66
59
  "w-[69px]": !h.value,
67
60
  "w-[76px]": h.value
68
61
  }
69
- ]), U = async () => {
62
+ ]), q = r(
63
+ () => {
64
+ var e, a;
65
+ return ((e = W.value) == null ? void 0 : e.nameWithSequence) ?? ((a = s.transactionDetail) == null ? void 0 : a.nameWithSequence) ?? "-";
66
+ }
67
+ ), E = r(
68
+ () => {
69
+ var e, a, l, n, o;
70
+ return ((a = (e = t.value) == null ? void 0 : e.assetBrand) == null ? void 0 : a.name) ?? ((n = (l = t.value) == null ? void 0 : l.brand) == null ? void 0 : n.name) ?? ((o = s.transactionDetail) == null ? void 0 : o.assetBrand) ?? "-";
71
+ }
72
+ ), F = r(
73
+ () => {
74
+ var e, a, l, n, o;
75
+ return ((a = (e = t.value) == null ? void 0 : e.assetModel) == null ? void 0 : a.name) ?? ((n = (l = t.value) == null ? void 0 : l.model) == null ? void 0 : n.name) ?? ((o = s.transactionDetail) == null ? void 0 : o.assetModel) ?? "-";
76
+ }
77
+ ), G = r(
78
+ () => {
79
+ var e, a, l, n, o;
80
+ return ((a = (e = t.value) == null ? void 0 : e.assetGroup) == null ? void 0 : a.name) ?? ((n = (l = t.value) == null ? void 0 : l.group) == null ? void 0 : n.name) ?? ((o = s.transactionDetail) == null ? void 0 : o.assetGroup) ?? "-";
81
+ }
82
+ ), k = r(
83
+ () => {
84
+ var e, a;
85
+ return ((e = t.value) == null ? void 0 : e.status) ?? ((a = s.transactionDetail) == null ? void 0 : a.status) ?? "-";
86
+ }
87
+ ), V = async () => {
70
88
  try {
71
- k(!0);
72
- const { data: e } = await ae.getAssetDetail(t.id);
73
- e && (s.value = e.data);
89
+ b(!0);
90
+ const { data: e } = await R.getAssetDetail(s.id);
91
+ e && (t.value = e.data);
74
92
  } catch (e) {
75
- O.add({ error: e, message: "Error, failed to load asset details." });
93
+ C.add({ error: e, message: "Error, failed to load asset details." });
76
94
  } finally {
77
- k(!1);
95
+ b(!1);
78
96
  }
79
97
  };
80
- return ee(
81
- () => t.transactionDetail,
98
+ return K(
99
+ () => s.transactionDetail,
82
100
  (e) => {
83
- s.value = e;
101
+ t.value = e;
84
102
  },
85
103
  { deep: !0 }
86
- ), m({ asset: s }), (e, a) => {
87
- var n, o, i, r, g, w, D, I, S, B, N, C, A, $, L, E, F, M, V, j, G, W;
88
- return d(), u("div", re, [
89
- p(ne, { src: H.value }, null, 8, ["src"]),
90
- l("div", ue, [
91
- l("div", de, [
92
- l("div", ce, [
93
- l("div", pe, x(((n = Q.value) == null ? void 0 : n.nameWithSequence) ?? "-"), 1),
94
- l("div", fe, [
95
- l("span", me, x((o = s.value) == null ? void 0 : o.assetId) + " " + x(T.value ? `(${T.value})` : ""), 1),
96
- e.useTagType ? (d(), u(se, { key: 0 }, [
97
- a[0] || (a[0] = l("div", { class: "w-[6px] h-[6px] rounded-full bg-general-100 dark:bg-general-500" }, null, -1)),
98
- p(oe, {
99
- type: P.value,
104
+ ), v({ asset: t }), (e, a) => {
105
+ var l, n, o, m, S, T, w;
106
+ return c(), d("div", Y, [
107
+ p(Q, { src: L.value }, null, 8, ["src"]),
108
+ i("div", Z, [
109
+ i("div", ee, [
110
+ i("div", ae, [
111
+ i("div", se, u(q.value), 1),
112
+ i("div", te, [
113
+ i("span", le, u((l = t.value) == null ? void 0 : l.assetId) + " " + u(D.value ? `(${D.value})` : ""), 1),
114
+ e.useTagType ? (c(), d(O, { key: 0 }, [
115
+ a[0] || (a[0] = i("div", { class: "w-[6px] h-[6px] rounded-full bg-general-100 dark:bg-general-500" }, null, -1)),
116
+ p(U, {
117
+ type: M.value,
100
118
  "use-nfc": e.useNfc
101
119
  }, null, 8, ["type", "use-nfc"])
102
120
  ], 64)) : f("", !0)
103
121
  ])
104
122
  ]),
105
- q(R).userType !== "Basic" ? (d(), u("a", {
123
+ $(A).userType !== "Basic" ? (c(), d("a", {
106
124
  key: 0,
107
- href: `/assets/detail/${((i = s.value) == null ? void 0 : i.asset) ?? ((r = s.value) == null ? void 0 : r._id)}`,
125
+ href: `/assets/detail/${((n = t.value) == null ? void 0 : n.asset) ?? ((o = t.value) == null ? void 0 : o._id)}`,
108
126
  class: "text-primary-500 dark:text-primary-300",
109
127
  target: "_blank"
110
- }, " Asset Detail > ", 8, ve)) : f("", !0)
128
+ }, u(e.$t("Asset Detail >")), 9, ne)) : f("", !0)
111
129
  ]),
112
- l("div", ge, [
113
- !t.fields || (g = t.fields) != null && g.includes("brand") ? (d(), u("div", ye, [
114
- l("span", {
115
- class: y(v.value)
116
- }, " Brand ", 2),
117
- a[1] || (a[1] = l("span", null, ":", -1)),
130
+ i("div", oe, [
131
+ !s.fields || (m = s.fields) != null && m.includes("brand") ? (c(), d("div", ie, [
132
+ i("span", {
133
+ class: y(g.value)
134
+ }, u(e.$t("Brand")), 3),
135
+ a[1] || (a[1] = i("span", null, ":", -1)),
118
136
  p(_, {
119
- label: ((D = (w = s.value) == null ? void 0 : w.assetBrand) == null ? void 0 : D.name) ?? ((S = (I = s.value) == null ? void 0 : I.brand) == null ? void 0 : S.name) ?? "-",
137
+ label: E.value,
120
138
  severity: "dark"
121
139
  }, null, 8, ["label"])
122
140
  ])) : f("", !0),
123
- !t.fields || (B = t.fields) != null && B.includes("model") ? (d(), u("div", _e, [
124
- l("span", {
125
- class: y(v.value)
126
- }, " Model/Type ", 2),
127
- a[2] || (a[2] = l("span", null, ":", -1)),
141
+ !s.fields || (S = s.fields) != null && S.includes("model") ? (c(), d("div", re, [
142
+ i("span", {
143
+ class: y(g.value)
144
+ }, u(e.$t("Model/Type")), 3),
145
+ a[2] || (a[2] = i("span", null, ":", -1)),
128
146
  p(_, {
129
- label: ((C = (N = s.value) == null ? void 0 : N.assetModel) == null ? void 0 : C.name) ?? (($ = (A = s.value) == null ? void 0 : A.model) == null ? void 0 : $.name) ?? "-",
147
+ label: F.value,
130
148
  severity: "dark"
131
149
  }, null, 8, ["label"])
132
150
  ])) : f("", !0),
133
- !t.fields || (L = t.fields) != null && L.includes("group") ? (d(), u("div", xe, [
134
- l("span", {
135
- class: y(v.value)
136
- }, " Group ", 2),
137
- a[3] || (a[3] = l("span", null, ":", -1)),
138
- p(_, {
139
- label: ((F = (E = s.value) == null ? void 0 : E.assetGroup) == null ? void 0 : F.name) ?? ((V = (M = s.value) == null ? void 0 : M.group) == null ? void 0 : V.name) ?? "-"
140
- }, null, 8, ["label"])
151
+ !s.fields || (T = s.fields) != null && T.includes("group") ? (c(), d("div", ue, [
152
+ i("span", {
153
+ class: y(g.value)
154
+ }, u(e.$t("Group")), 3),
155
+ a[3] || (a[3] = i("span", null, ":", -1)),
156
+ p(_, { label: G.value }, null, 8, ["label"])
141
157
  ])) : f("", !0),
142
- (j = t.fields) != null && j.includes("status") ? (d(), u("div", be, [
143
- l("span", {
144
- class: y(v.value)
145
- }, " Asset Status ", 2),
146
- a[4] || (a[4] = l("span", null, ":", -1)),
158
+ (w = s.fields) != null && w.includes("status") ? (c(), d("div", de, [
159
+ i("span", {
160
+ class: y(g.value)
161
+ }, u(e.$t("Asset Status")), 3),
162
+ a[4] || (a[4] = i("span", null, ":", -1)),
147
163
  p(_, {
148
- label: ((G = s.value) == null ? void 0 : G.status) ?? "-",
149
- severity: q(te)((W = s.value) == null ? void 0 : W.status),
164
+ label: k.value ?? "-",
165
+ severity: $(H)(k.value),
150
166
  format: "nowrap"
151
167
  }, null, 8, ["label", "severity"])
152
168
  ])) : f("", !0)
@@ -157,6 +173,6 @@ const z = K(!1), J = X(), ie = () => ({
157
173
  }
158
174
  });
159
175
  export {
160
- Ne as _,
161
- ie as u
176
+ xe as _,
177
+ X as u
162
178
  };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as p, shallowRef as f, ref as m, createBlock as h, openBlock as v, unref as a, withCtx as d, renderSlot as z, createElementVNode as g, normalizeClass as w, toDisplayString as C } from "vue";
2
2
  import { o as y } from "../vendor/vue-advanced-cropper/dist/index.esm-bundler.es.js";
3
- import { u as _ } from "../plugins/WangsVue.es.js";
4
- const I = (i, s) => {
3
+ import { u as I } from "../plugins/WangsVue.es.js";
4
+ const R = (i, s) => {
5
5
  const r = i.__vccOpts || i;
6
6
  for (const [o, l] of s)
7
7
  r[o] = l;
8
8
  return r;
9
- }, R = /* @__PURE__ */ p({
9
+ }, _ = /* @__PURE__ */ p({
10
10
  __name: "BackgroundImageCropper",
11
11
  props: {
12
12
  touchMove: {},
@@ -16,24 +16,24 @@ const I = (i, s) => {
16
16
  },
17
17
  emits: ["move", "resize"],
18
18
  setup(i) {
19
- const s = i, { locale: r } = _("ImageCompressor"), o = f(!1), l = m(), n = (e, t) => {
19
+ const s = i, { locale: r } = I("ImageCompressor"), o = f(!1), l = m(), c = (e, t) => {
20
20
  if (e.type === "touchstart" || e.type === "touchmove") {
21
21
  if (e.touches.length === 1 && !t)
22
- return o.value = !0, l.value = "touch", c(), !1;
22
+ return o.value = !0, l.value = "touch", n(), !1;
23
23
  o.value = !1;
24
24
  } else if (e.type === "wheel") {
25
25
  if (!t && !e.ctrlKey)
26
- return o.value = !0, l.value = "wheel", c(), !1;
26
+ return o.value = !0, l.value = "wheel", n(), !1;
27
27
  o.value = !1;
28
28
  }
29
29
  e.preventDefault(), e.stopPropagation();
30
- }, c = () => {
30
+ }, n = () => {
31
31
  setTimeout(() => {
32
32
  o.value = !1;
33
33
  }, 1e3);
34
34
  };
35
35
  return (e, t) => (v(), h(a(y), {
36
- "events-filter": n,
36
+ "events-filter": c,
37
37
  "mouse-move": s.mouseMove,
38
38
  "touch-move": s.touchMove,
39
39
  "touch-resize": s.touchResize,
@@ -45,13 +45,15 @@ const I = (i, s) => {
45
45
  z(e.$slots, "default", {}, void 0, !0),
46
46
  g("div", {
47
47
  class: w([{ "cropper-event-notification--visible": o.value }, "cropper-event-notification"])
48
- }, C(l.value === "wheel" ? a(r).cropperCtrlScrollInfo : a(r).cropperTwoFingerInfo), 3)
48
+ }, C(e.$t(
49
+ l.value === "wheel" ? a(r).cropperCtrlScrollInfo : a(r).cropperTwoFingerInfo
50
+ )), 3)
49
51
  ]),
50
52
  _: 3
51
53
  }, 8, ["mouse-move", "touch-move", "touch-resize", "wheel-resize"]));
52
54
  }
53
- }), S = /* @__PURE__ */ I(R, [["__scopeId", "data-v-9031c32d"]]);
55
+ }), $ = /* @__PURE__ */ R(_, [["__scopeId", "data-v-6f59d31e"]]);
54
56
  export {
55
- S as B,
56
- I as _
57
+ $ as B,
58
+ R as _
57
59
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as P, inject as B, computed as b, resolveDirective as g, withDirectives as c, createBlock as i, openBlock as n, unref as p, mergeProps as t, withCtx as l, renderSlot as u, createCommentVNode as d, normalizeProps as v } from "vue";
2
- import { s as y } from "../vendor/primevue/button/button.esm.es.js";
3
- import { _ as f } from "../icon/index.es.js";
4
- const C = (s) => s ? Array.isArray(s) ? s : [s] : [], z = /* @__PURE__ */ P({
1
+ import { defineComponent as g, inject as $, computed as P, resolveDirective as C, withDirectives as c, createBlock as l, openBlock as t, unref as u, mergeProps as i, withCtx as n, renderSlot as d, createCommentVNode as f, normalizeProps as m } from "vue";
2
+ import { u as h } from "../plugins/basei18n.es.js";
3
+ import { s as v } from "../vendor/primevue/button/button.esm.es.js";
4
+ import { _ as y } from "../icon/index.es.js";
5
+ const A = (s) => s ? Array.isArray(s) ? s : [s] : [], j = /* @__PURE__ */ g({
5
6
  __name: "Button",
6
7
  props: {
7
8
  style: {},
@@ -27,86 +28,95 @@ const C = (s) => s ? Array.isArray(s) ? s : [s] : [], z = /* @__PURE__ */ P({
27
28
  plain: { type: Boolean }
28
29
  },
29
30
  setup(s) {
30
- const e = s, m = B("preset", {}).button, r = b(() => ({
31
+ const e = s, b = $("preset", {}).button, { t: k } = h(), a = P(() => ({
31
32
  icon: e.icon ?? "check",
32
33
  class: [
33
- ...(m == null ? void 0 : m.icon({ props: e }).class) ?? {},
34
+ ...(b == null ? void 0 : b.icon({ props: e }).class) ?? {},
34
35
  { "text-base": e.icon && !e.label },
35
36
  // Need to use attrs, because props.label is always undefined.
36
- ...C(e.iconClass)
37
+ ...A(e.iconClass)
37
38
  ]
38
- }));
39
- return (o, h) => {
40
- const a = g("tooltip");
41
- return o.tooltipPos === "top" ? c((n(), i(p(y), t({ key: 0 }, e, {
39
+ })), r = P(() => {
40
+ if (typeof e.tooltip == "string")
41
+ return k(e.tooltip);
42
+ if (e.tooltip)
43
+ return { ...e.tooltip, value: k(e.tooltip.value) };
44
+ });
45
+ return (o, w) => {
46
+ const p = C("tooltip");
47
+ return o.tooltipPos === "top" ? c((t(), l(u(v), i({ key: 0 }, e, {
42
48
  icon: o.icon,
43
- "icon-pos": o.iconPos
49
+ "icon-pos": o.iconPos,
50
+ label: o.$t(e.label)
44
51
  }), {
45
- icon: l(({ class: k }) => [
46
- o.icon ? (n(), i(f, t({ key: 0 }, r.value, { class: k }), null, 16, ["class"])) : d("", !0)
52
+ icon: n(({ class: B }) => [
53
+ o.icon ? (t(), l(y, i({ key: 0 }, a.value, { class: B }), null, 16, ["class"])) : f("", !0)
47
54
  ]),
48
- default: l(() => [
49
- u(o.$slots, "default")
55
+ default: n(() => [
56
+ d(o.$slots, "default")
50
57
  ]),
51
58
  _: 3
52
- }, 16, ["icon", "icon-pos"])), [
59
+ }, 16, ["icon", "icon-pos", "label"])), [
53
60
  [
54
- a,
55
- o.tooltip,
61
+ p,
62
+ r.value,
56
63
  void 0,
57
64
  { top: !0 }
58
65
  ]
59
- ]) : o.tooltipPos === "left" ? c((n(), i(p(y), t({ key: 1 }, e, {
66
+ ]) : o.tooltipPos === "left" ? c((t(), l(u(v), i({ key: 1 }, e, {
60
67
  icon: o.icon,
61
- "icon-pos": o.iconPos
68
+ "icon-pos": o.iconPos,
69
+ label: o.$t(e.label)
62
70
  }), {
63
- icon: l(() => [
64
- o.icon ? (n(), i(f, v(t({ key: 0 }, r.value)), null, 16)) : d("", !0)
71
+ icon: n(() => [
72
+ o.icon ? (t(), l(y, m(i({ key: 0 }, a.value)), null, 16)) : f("", !0)
65
73
  ]),
66
- default: l(() => [
67
- u(o.$slots, "default")
74
+ default: n(() => [
75
+ d(o.$slots, "default")
68
76
  ]),
69
77
  _: 3
70
- }, 16, ["icon", "icon-pos"])), [
78
+ }, 16, ["icon", "icon-pos", "label"])), [
71
79
  [
72
- a,
73
- o.tooltip,
80
+ p,
81
+ r.value,
74
82
  void 0,
75
83
  { left: !0 }
76
84
  ]
77
- ]) : o.tooltipPos === "right" ? c((n(), i(p(y), t({ key: 2 }, e, {
85
+ ]) : o.tooltipPos === "right" ? c((t(), l(u(v), i({ key: 2 }, e, {
78
86
  icon: o.icon,
79
- "icon-pos": o.iconPos
87
+ "icon-pos": o.iconPos,
88
+ label: o.$t(e.label)
80
89
  }), {
81
- icon: l(() => [
82
- o.icon ? (n(), i(f, v(t({ key: 0 }, r.value)), null, 16)) : d("", !0)
90
+ icon: n(() => [
91
+ o.icon ? (t(), l(y, m(i({ key: 0 }, a.value)), null, 16)) : f("", !0)
83
92
  ]),
84
- default: l(() => [
85
- u(o.$slots, "default")
93
+ default: n(() => [
94
+ d(o.$slots, "default")
86
95
  ]),
87
96
  _: 3
88
- }, 16, ["icon", "icon-pos"])), [
97
+ }, 16, ["icon", "icon-pos", "label"])), [
89
98
  [
90
- a,
91
- o.tooltip,
99
+ p,
100
+ r.value,
92
101
  void 0,
93
102
  { right: !0 }
94
103
  ]
95
- ]) : c((n(), i(p(y), t({ key: 3 }, e, {
104
+ ]) : c((t(), l(u(v), i({ key: 3 }, e, {
96
105
  icon: o.icon,
97
- "icon-pos": o.iconPos
106
+ "icon-pos": o.iconPos,
107
+ label: o.$t(e.label)
98
108
  }), {
99
- icon: l(() => [
100
- o.icon ? (n(), i(f, v(t({ key: 0 }, r.value)), null, 16)) : d("", !0)
109
+ icon: n(() => [
110
+ o.icon ? (t(), l(y, m(i({ key: 0 }, a.value)), null, 16)) : f("", !0)
101
111
  ]),
102
- default: l(() => [
103
- u(o.$slots, "default")
112
+ default: n(() => [
113
+ d(o.$slots, "default")
104
114
  ]),
105
115
  _: 3
106
- }, 16, ["icon", "icon-pos"])), [
116
+ }, 16, ["icon", "icon-pos", "label"])), [
107
117
  [
108
- a,
109
- o.tooltip,
118
+ p,
119
+ r.value,
110
120
  void 0,
111
121
  { bottom: !0 }
112
122
  ]
@@ -115,6 +125,6 @@ const C = (s) => s ? Array.isArray(s) ? s : [s] : [], z = /* @__PURE__ */ P({
115
125
  }
116
126
  });
117
127
  export {
118
- z as _,
119
- C as c
128
+ j as _,
129
+ A as c
120
130
  };