@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.
- package/animation/index.es.js +9 -8
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +113 -97
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +1 -1
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/checkbox/index.es.js +5 -5
- package/config/defaultProps.es.js +3 -4
- package/datatable/index.es.js +470 -465
- package/datepicker/index.es.js +17 -17
- package/daypicker/index.es.js +21 -21
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +89 -89
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +89 -89
- package/dialogform/index.es.js +16 -16
- package/dialogfulltransferlog/index.es.js +96 -96
- package/dialoglinkedasset/index.es.js +48 -48
- package/dialogprintqr/index.es.js +70 -70
- package/dialogreportdamage/index.es.js +57 -57
- package/dialogreportmissing/index.es.js +94 -86
- package/dialogselecttree/index.es.js +18 -16
- package/dialogselectuser/index.es.js +16 -16
- package/directives/index.d.ts +1 -0
- package/directives/index.es.js +1 -0
- package/directives/safeHtml.d.ts +16 -0
- package/directives/safeHtml.es.js +12 -0
- package/disposalreport/index.es.js +1 -1
- package/disposalreportbulkaction/index.es.js +40 -41
- package/disposalreportdialogselectasset/index.es.js +72 -72
- package/disposalreporttable/index.es.js +108 -108
- package/disposalreporttablefilter/index.es.js +16 -17
- package/dropdown/index.es.js +120 -117
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +35 -31
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +26 -25
- package/imagecompressor/index.es.js +143 -143
- package/imageinputinfo/index.es.js +13 -13
- package/inlinemessage/index.es.js +12 -12
- package/inputbadge/index.es.js +42 -43
- package/inputnumber/index.es.js +7 -7
- package/inputpassword/index.es.js +9 -9
- package/inputrangenumber/index.es.js +16 -16
- package/inputsearch/index.es.js +18 -18
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +48 -40
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +16 -16
- package/multiselect/index.es.js +86 -83
- package/package.json +1 -1
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/style.css +1 -1
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +33 -30
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/treesearchinput/index.es.js +11 -11
- package/username/index.es.js +39 -39
- package/utils/baseToast.util.es.js +23 -22
- package/utils/index.es.js +1 -2
- package/utils/textFormatter.util.d.ts +32 -0
- package/utils/textFormatter.util.es.js +38 -10
- package/validatormessage/index.es.js +1 -1
- package/vendor/dompurify/dist/purify.es.es.js +553 -0
- package/wangsvue-fats.d.ts +2 -1
- package/wangsvue-fats.es.js +190 -186
- package/wangsvue-fats.esm.browser.js +17750 -17086
- package/wangsvue-fats.system.js +73 -72
package/animation/index.es.js
CHANGED
|
@@ -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
|
|
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
|
-
},
|
|
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
|
};
|
package/assetinfo/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
package/assetinfo/index.es.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import { AssetServices as
|
|
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
|
|
5
|
-
import { u as
|
|
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
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
10
|
-
loading:
|
|
11
|
-
message:
|
|
12
|
-
setLoading: (
|
|
13
|
-
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
18
|
+
}, re = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "flex gap-3"
|
|
21
|
-
},
|
|
21
|
+
}, ue = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "flex gap-3"
|
|
24
|
-
},
|
|
24
|
+
}, de = {
|
|
25
25
|
key: 3,
|
|
26
26
|
class: "flex gap-3"
|
|
27
|
-
},
|
|
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(
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
41
|
+
const C = P(), { setLoading: b } = X(), A = JSON.parse(localStorage.getItem("user") ?? "{}"), t = B(), h = r(() => {
|
|
42
42
|
var e;
|
|
43
|
-
return (e =
|
|
44
|
-
}),
|
|
45
|
-
const {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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 =
|
|
61
|
-
}),
|
|
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 =
|
|
64
|
-
}),
|
|
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
|
-
]),
|
|
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
|
-
|
|
72
|
-
const { data: e } = await
|
|
73
|
-
e && (
|
|
89
|
+
b(!0);
|
|
90
|
+
const { data: e } = await R.getAssetDetail(s.id);
|
|
91
|
+
e && (t.value = e.data);
|
|
74
92
|
} catch (e) {
|
|
75
|
-
|
|
93
|
+
C.add({ error: e, message: "Error, failed to load asset details." });
|
|
76
94
|
} finally {
|
|
77
|
-
|
|
95
|
+
b(!1);
|
|
78
96
|
}
|
|
79
97
|
};
|
|
80
|
-
return
|
|
81
|
-
() =>
|
|
98
|
+
return K(
|
|
99
|
+
() => s.transactionDetail,
|
|
82
100
|
(e) => {
|
|
83
|
-
|
|
101
|
+
t.value = e;
|
|
84
102
|
},
|
|
85
103
|
{ deep: !0 }
|
|
86
|
-
),
|
|
87
|
-
var n, o,
|
|
88
|
-
return
|
|
89
|
-
p(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
e.useTagType ? (
|
|
97
|
-
a[0] || (a[0] =
|
|
98
|
-
p(
|
|
99
|
-
type:
|
|
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
|
-
|
|
123
|
+
$(A).userType !== "Basic" ? (c(), d("a", {
|
|
106
124
|
key: 0,
|
|
107
|
-
href: `/assets/detail/${((
|
|
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
|
-
}, "
|
|
128
|
+
}, u(e.$t("Asset Detail >")), 9, ne)) : f("", !0)
|
|
111
129
|
]),
|
|
112
|
-
|
|
113
|
-
!
|
|
114
|
-
|
|
115
|
-
class: y(
|
|
116
|
-
}, "
|
|
117
|
-
a[1] || (a[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:
|
|
137
|
+
label: E.value,
|
|
120
138
|
severity: "dark"
|
|
121
139
|
}, null, 8, ["label"])
|
|
122
140
|
])) : f("", !0),
|
|
123
|
-
!
|
|
124
|
-
|
|
125
|
-
class: y(
|
|
126
|
-
}, "
|
|
127
|
-
a[2] || (a[2] =
|
|
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:
|
|
147
|
+
label: F.value,
|
|
130
148
|
severity: "dark"
|
|
131
149
|
}, null, 8, ["label"])
|
|
132
150
|
])) : f("", !0),
|
|
133
|
-
!
|
|
134
|
-
|
|
135
|
-
class: y(
|
|
136
|
-
}, "
|
|
137
|
-
a[3] || (a[3] =
|
|
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
|
-
(
|
|
143
|
-
|
|
144
|
-
class: y(
|
|
145
|
-
}, "
|
|
146
|
-
a[4] || (a[4] =
|
|
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:
|
|
149
|
-
severity:
|
|
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
|
-
|
|
161
|
-
|
|
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
|
|
4
|
-
const
|
|
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
|
-
},
|
|
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 } =
|
|
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",
|
|
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",
|
|
26
|
+
return o.value = !0, l.value = "wheel", n(), !1;
|
|
27
27
|
o.value = !1;
|
|
28
28
|
}
|
|
29
29
|
e.preventDefault(), e.stopPropagation();
|
|
30
|
-
},
|
|
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":
|
|
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(
|
|
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
|
-
}),
|
|
55
|
+
}), $ = /* @__PURE__ */ R(_, [["__scopeId", "data-v-6f59d31e"]]);
|
|
54
56
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
$ as B,
|
|
58
|
+
R as _
|
|
57
59
|
};
|
package/button/index.es.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
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,
|
|
31
|
+
const e = s, b = $("preset", {}).button, { t: k } = h(), a = P(() => ({
|
|
31
32
|
icon: e.icon ?? "check",
|
|
32
33
|
class: [
|
|
33
|
-
...(
|
|
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
|
-
...
|
|
37
|
+
...A(e.iconClass)
|
|
37
38
|
]
|
|
38
|
-
}))
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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:
|
|
46
|
-
o.icon ? (
|
|
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:
|
|
49
|
-
|
|
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
|
-
|
|
55
|
-
|
|
61
|
+
p,
|
|
62
|
+
r.value,
|
|
56
63
|
void 0,
|
|
57
64
|
{ top: !0 }
|
|
58
65
|
]
|
|
59
|
-
]) : o.tooltipPos === "left" ? c((
|
|
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:
|
|
64
|
-
o.icon ? (
|
|
71
|
+
icon: n(() => [
|
|
72
|
+
o.icon ? (t(), l(y, m(i({ key: 0 }, a.value)), null, 16)) : f("", !0)
|
|
65
73
|
]),
|
|
66
|
-
default:
|
|
67
|
-
|
|
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
|
-
|
|
73
|
-
|
|
80
|
+
p,
|
|
81
|
+
r.value,
|
|
74
82
|
void 0,
|
|
75
83
|
{ left: !0 }
|
|
76
84
|
]
|
|
77
|
-
]) : o.tooltipPos === "right" ? c((
|
|
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:
|
|
82
|
-
o.icon ? (
|
|
90
|
+
icon: n(() => [
|
|
91
|
+
o.icon ? (t(), l(y, m(i({ key: 0 }, a.value)), null, 16)) : f("", !0)
|
|
83
92
|
]),
|
|
84
|
-
default:
|
|
85
|
-
|
|
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
|
-
|
|
91
|
-
|
|
99
|
+
p,
|
|
100
|
+
r.value,
|
|
92
101
|
void 0,
|
|
93
102
|
{ right: !0 }
|
|
94
103
|
]
|
|
95
|
-
]) : c((
|
|
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:
|
|
100
|
-
o.icon ? (
|
|
109
|
+
icon: n(() => [
|
|
110
|
+
o.icon ? (t(), l(y, m(i({ key: 0 }, a.value)), null, 16)) : f("", !0)
|
|
101
111
|
]),
|
|
102
|
-
default:
|
|
103
|
-
|
|
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
|
-
|
|
109
|
-
|
|
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
|
-
|
|
119
|
-
|
|
128
|
+
j as _,
|
|
129
|
+
A as c
|
|
120
130
|
};
|