@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.
- package/animation/index.es.js +30 -20
- package/approverinfo/index.es.js +50 -50
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +116 -100
- package/assets/lottiejs/loading-page-dark.es.js +4 -0
- package/assets/lottiejs/loading-table-dark.es.js +4 -0
- package/assets/lottiejs/no-data-dark.es.js +4 -0
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttoncopy/index.es.js +8 -8
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +48 -48
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/carousel/index.es.js +24 -24
- package/checkbox/index.es.js +5 -5
- package/columnlist/index.es.js +142 -132
- package/config/defaultProps.es.js +15 -11
- package/datatable/index.d.ts +14 -0
- package/datatable/index.es.js +520 -509
- package/datepicker/index.es.js +24 -24
- package/daypicker/index.es.js +29 -29
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +100 -100
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +106 -103
- package/dialogform/index.es.js +25 -25
- package/dialogfulltransferlog/index.es.js +98 -98
- package/dialoglinkedasset/index.es.js +61 -61
- package/dialogprintqr/index.es.js +78 -80
- 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 +17 -17
- 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 +3 -3
- 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/editor/index.es.js +51 -48
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +44 -40
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +36 -35
- package/imagecompressor/index.es.js +155 -155
- 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 +27 -27
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +47 -39
- package/loading-page-dark-e0SrRAHc.js +4 -0
- package/loading-page-dark-mz8tLHZ3.js +1 -0
- package/loading-table-dark-BGh0tAPM.js +4 -0
- package/loading-table-dark-Cky7AB_C.js +1 -0
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +17 -16
- package/multiselect/index.es.js +86 -83
- package/no-data-dark-DERIJ8Ml.js +1 -0
- package/no-data-dark-nK4e4RAM.js +4 -0
- package/package.json +1 -1
- package/plugins/WangsVue.es.js +11 -9
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/steps/index.es.js +18 -16
- package/style.css +2 -2
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +35 -32
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/transactionroles/index.es.js +4 -1
- package/treesearchinput/index.es.js +15 -15
- package/username/index.es.js +37 -37
- 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 +22487 -21781
- package/wangsvue-fats.system.js +72 -71
package/buttonradio/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as k, defineComponent as C, inject as V, computed as S, createBlock as f, openBlock as d, unref as l, mergeProps as p, withCtx as P, createElementVNode as i, renderSlot as w, createCommentVNode as m, normalizeProps as c, guardReactiveProps as b, normalizeStyle as E, normalizeClass as z, createElementBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { i as
|
|
4
|
-
const
|
|
1
|
+
import { h as k, defineComponent as C, inject as V, computed as S, createBlock as f, openBlock as d, unref as l, mergeProps as p, withCtx as P, createElementVNode as i, renderSlot as w, createCommentVNode as m, normalizeProps as c, guardReactiveProps as b, normalizeStyle as E, normalizeClass as z, createElementBlock as $, toDisplayString as j } from "vue";
|
|
2
|
+
import { _ as q } from "../icon/index.es.js";
|
|
3
|
+
import { i as A } from "../vendor/lodash-es/isEqual.es.js";
|
|
4
|
+
const I = (r, s) => {
|
|
5
5
|
const { attrs: t, slots: a } = s || {};
|
|
6
6
|
return r.label ? k("label", t, a.default()) : a.default();
|
|
7
|
-
},
|
|
7
|
+
}, L = ["id", "aria-invalid", "checked", "disabled", "name", "readonly", "tabindex", "value"], F = /* @__PURE__ */ C({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "ButtonRadio",
|
|
10
10
|
props: {
|
|
@@ -26,7 +26,7 @@ const L = (r, s) => {
|
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
28
28
|
setup(r, { emit: s }) {
|
|
29
|
-
const t = r, a = s, n = V("preset", {}).buttonradio, u = S(() => t.modelValue != null && (t.binary ? y() :
|
|
29
|
+
const t = r, a = s, n = V("preset", {}).buttonradio, u = S(() => t.modelValue != null && (t.binary ? y() : A(t.modelValue, t.value))), y = () => {
|
|
30
30
|
const { modelValue: e, value: o } = t;
|
|
31
31
|
return typeof e != "boolean" ? !!e : typeof o == "boolean" ? e === o : typeof o == "number" ? !!e == !!o : typeof o == "string" ? (e == null ? void 0 : e.toString()) === o : !1;
|
|
32
32
|
}, v = (e) => {
|
|
@@ -46,7 +46,7 @@ const L = (r, s) => {
|
|
|
46
46
|
}, g = (e) => {
|
|
47
47
|
a("blur", e);
|
|
48
48
|
};
|
|
49
|
-
return (e, o) => (d(), f(l(
|
|
49
|
+
return (e, o) => (d(), f(l(I), p(l(n).label, { label: e.label }), {
|
|
50
50
|
default: P(() => [
|
|
51
51
|
i("span", c(b(l(n).root({ props: t, state: { checked: u.value } }))), [
|
|
52
52
|
i("input", {
|
|
@@ -64,18 +64,18 @@ const L = (r, s) => {
|
|
|
64
64
|
onChange: h,
|
|
65
65
|
onFocus: B,
|
|
66
66
|
type: "radio"
|
|
67
|
-
}, null, 46,
|
|
67
|
+
}, null, 46, L),
|
|
68
68
|
i("span", c(b(l(n).box({ props: t, state: { checked: u.value } }))), [
|
|
69
69
|
i("span", c(b(l(n).icon)), null, 16)
|
|
70
70
|
], 16)
|
|
71
71
|
], 16),
|
|
72
72
|
w(e.$slots, "label", {}, () => [
|
|
73
|
-
e.label ? (d(),
|
|
73
|
+
e.label ? (d(), $("span", p({
|
|
74
74
|
key: 0,
|
|
75
75
|
"data-wv-section": "labeltext"
|
|
76
|
-
}, l(n).labeltext),
|
|
76
|
+
}, l(n).labeltext), j(e.$t(e.label)), 17)) : m("", !0)
|
|
77
77
|
]),
|
|
78
|
-
e.tooltip ? (d(), f(
|
|
78
|
+
e.tooltip ? (d(), f(q, p({
|
|
79
79
|
key: 0,
|
|
80
80
|
info: e.tooltip,
|
|
81
81
|
"tooltip-pos": e.tooltipPos
|
package/buttonscan/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosError as Re } from "axios";
|
|
2
|
-
import { ref as ce, defineComponent as _e, onBeforeUnmount as De, shallowRef as m, computed as E, createElementBlock as D, openBlock as d, Fragment as F, createVNode as b, createBlock as U, createCommentVNode as V, mergeProps as
|
|
2
|
+
import { ref as ce, defineComponent as _e, onBeforeUnmount as De, shallowRef as m, computed as E, createElementBlock as D, openBlock as d, Fragment as F, createVNode as b, createBlock as U, createCommentVNode as V, mergeProps as ke, withCtx as Ne, createElementVNode as O, normalizeClass as se, createTextVNode as ne, toDisplayString as A, Teleport as he } from "vue";
|
|
3
3
|
import { ChangelogServices as Ce } from "@tagsamurai/fats-api-services";
|
|
4
4
|
import { u as Ie } from "../utils/baseToast.util.es.js";
|
|
5
5
|
import { _ as oe } from "../button/index.es.js";
|
|
@@ -8,21 +8,21 @@ import { _ as Oe } from "../hardwaresync/index.es.js";
|
|
|
8
8
|
import { _ as J } from "../icon/index.es.js";
|
|
9
9
|
import { _ as z } from "../toast/index.es.js";
|
|
10
10
|
import { v as G } from "../vendor/uuid/dist/esm-browser/v4.es.js";
|
|
11
|
-
const Te = (
|
|
12
|
-
if (
|
|
13
|
-
return
|
|
14
|
-
if (
|
|
15
|
-
|
|
11
|
+
const Te = (a) => {
|
|
12
|
+
if (a instanceof Re)
|
|
13
|
+
return a.response ? "DEVICE_NOT_CONNECTED" : "DRIVER_NOT_FOUND";
|
|
14
|
+
if (a instanceof Error && ["NOT_SUPPORTED_SYSTEM", "HARDWARE_NOT_SYNCHRONIZED"].includes(
|
|
15
|
+
a.message
|
|
16
16
|
))
|
|
17
|
-
return
|
|
18
|
-
}, ie = `(function(){"use strict";let n=null,t=null,a,c,r="";self.onmessage=s=>{const e=s.data;switch(c=e.companyCode,e.command){case"sync":l(e);break;case"connect":g(e);break;case"scan":S(e);break;case"stopscan":p(e);break}};const d=s=>{let e="established";n&&n.readyState===WebSocket.OPEN?(e="reused",s.onopen(n,e),m(s.timeout)):n=new WebSocket("wss://dev-api.tagsamurai.com/rfid-reader-go"),n.onopen=()=>{r=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),e="established",n&&s.onopen(n,e),m(s.timeout)},n.onmessage=o=>{s.onmessage(o),m(s.timeout)},n.onerror=o=>{console.error("🚀 ~ Scanner Worker: openConnection ~ error:",o),s.onerror(o),n==null||n.close(),n=null,t&&clearTimeout(t)}},u=()=>{p({userId:a}),a=void 0,n&&n.close(),n=null,t&&clearTimeout(t),console.info("Socket connection has been closed!")},m=(s=0)=>{s&&(t&&clearTimeout(t),t=setTimeout(u,s))},l=({userId:s})=>{a=s,d({onopen:e=>{e.send(JSON.stringify({data:{command:"connect",userId:s,sessionId:r,companyCode:c,source:"app"},event:"reader"}))},onmessage:e=>{postMessage({status:"synced",...JSON.parse(e.data)})},onerror:e=>{postMessage({status:"sync_error",error:e})}})},g=({userId:s})=>{a=s,d({onopen:(e,o)=>{o==="established"?e.send(JSON.stringify({data:{command:"connect",userId:s,source:"app",sessionId:r,companyCode:c},event:"reader"})):postMessage({status:"connection_reused"})},onmessage:e=>{postMessage({status:"connection_established",...JSON.parse(e.data)})},onerror:e=>{postMessage({status:"error_connecting",error:e})}})},S=({scanCommand:s,userId:e,serialNumber:o,jenisDevice:f})=>{a=e,d({onopen:i=>{i.send(JSON.stringify({data:{command:s,userId:e,sessionId:r,companyCode:c,source:"app",serialNumber:o,jenisDevice:f},event:"reader"})),postMessage({status:"scan_started"})},onmessage:i=>{postMessage({status:"scanned",...JSON.parse(i.data)})},onerror:i=>{postMessage({status:"scan_error",error:i})}})},p=({userId:s})=>{n&&n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({data:{command:"stopscan",userId:s,source:"app",sessionId:r,companyCode:c},event:"reader"})),postMessage({status:"scan_stopped"}),console.info("Scan Process Stopped!"))}})();
|
|
19
|
-
`,
|
|
20
|
-
function xe(
|
|
17
|
+
return a.message;
|
|
18
|
+
}, ie = `(function(){"use strict";let n=null,t=null,a,c,r="";self.onmessage=s=>{const e=s.data;switch(c=e.companyCode,e.command){case"sync":l(e);break;case"connect":g(e);break;case"scan":S(e);break;case"stopscan":p(e);break}};const d=s=>{let e="established";n&&n.readyState===WebSocket.OPEN?(e="reused",s.onopen(n,e),m(s.timeout)):n=new WebSocket("wss://dev-api.tagsamurai.com/rfid-reader-go/"),n.onopen=()=>{r=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),e="established",n&&s.onopen(n,e),m(s.timeout)},n.onmessage=o=>{s.onmessage(o),m(s.timeout)},n.onerror=o=>{console.error("🚀 ~ Scanner Worker: openConnection ~ error:",o),s.onerror(o),n==null||n.close(),n=null,t&&clearTimeout(t)}},u=()=>{p({userId:a}),a=void 0,n&&n.close(),n=null,t&&clearTimeout(t),console.info("Socket connection has been closed!")},m=(s=0)=>{s&&(t&&clearTimeout(t),t=setTimeout(u,s))},l=({userId:s})=>{a=s,d({onopen:e=>{e.send(JSON.stringify({data:{command:"connect",userId:s,sessionId:r,companyCode:c,source:"app"},event:"reader"}))},onmessage:e=>{postMessage({status:"synced",...JSON.parse(e.data)})},onerror:e=>{postMessage({status:"sync_error",error:e})}})},g=({userId:s})=>{a=s,d({onopen:(e,o)=>{o==="established"?e.send(JSON.stringify({data:{command:"connect",userId:s,source:"app",sessionId:r,companyCode:c},event:"reader"})):postMessage({status:"connection_reused"})},onmessage:e=>{postMessage({status:"connection_established",...JSON.parse(e.data)})},onerror:e=>{postMessage({status:"error_connecting",error:e})}})},S=({scanCommand:s,userId:e,serialNumber:o,jenisDevice:f})=>{a=e,d({onopen:i=>{i.send(JSON.stringify({data:{command:s,userId:e,sessionId:r,companyCode:c,source:"app",serialNumber:o,jenisDevice:f},event:"reader"})),postMessage({status:"scan_started"})},onmessage:i=>{postMessage({status:"scanned",...JSON.parse(i.data)})},onerror:i=>{postMessage({status:"scan_error",error:i})}})},p=({userId:s})=>{n&&n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({data:{command:"stopscan",userId:s,source:"app",sessionId:r,companyCode:c},event:"reader"})),postMessage({status:"scan_stopped"}),console.info("Scan Process Stopped!"))}})();
|
|
19
|
+
`, te = typeof self < "u" && self.Blob && new Blob([ie], { type: "text/javascript;charset=utf-8" });
|
|
20
|
+
function xe(a) {
|
|
21
21
|
let u;
|
|
22
22
|
try {
|
|
23
|
-
if (u =
|
|
23
|
+
if (u = te && (self.URL || self.webkitURL).createObjectURL(te), !u) throw "";
|
|
24
24
|
const p = new Worker(u, {
|
|
25
|
-
name:
|
|
25
|
+
name: a == null ? void 0 : a.name
|
|
26
26
|
});
|
|
27
27
|
return p.addEventListener("error", () => {
|
|
28
28
|
(self.URL || self.webkitURL).revokeObjectURL(u);
|
|
@@ -31,25 +31,25 @@ function xe(t) {
|
|
|
31
31
|
return new Worker(
|
|
32
32
|
"data:text/javascript;charset=utf-8," + encodeURIComponent(ie),
|
|
33
33
|
{
|
|
34
|
-
name:
|
|
34
|
+
name: a == null ? void 0 : a.name
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
} finally {
|
|
38
38
|
u && (self.URL || self.webkitURL).revokeObjectURL(u);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null, QR: null },
|
|
42
|
-
const
|
|
41
|
+
const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null, QR: null }, ae = ce(le()), re = ce(Be()), Le = () => {
|
|
42
|
+
const a = (s) => {
|
|
43
43
|
window.devices = s, p();
|
|
44
44
|
}, u = (s) => {
|
|
45
45
|
window.device = s, re.value = s;
|
|
46
46
|
}, p = () => {
|
|
47
|
-
|
|
47
|
+
ae.value = le();
|
|
48
48
|
};
|
|
49
49
|
return {
|
|
50
|
-
devices:
|
|
50
|
+
devices: ae,
|
|
51
51
|
device: re,
|
|
52
|
-
saveDevices:
|
|
52
|
+
saveDevices: a,
|
|
53
53
|
setDevice: u,
|
|
54
54
|
loadDevices: p
|
|
55
55
|
};
|
|
@@ -91,21 +91,21 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
91
91
|
plain: { type: Boolean }
|
|
92
92
|
},
|
|
93
93
|
emits: ["update:modelValue", "connect", "connected", "scan", "stop", "error", "beforeStartScan"],
|
|
94
|
-
setup(
|
|
95
|
-
const s =
|
|
94
|
+
setup(a, { expose: u, emit: p }) {
|
|
95
|
+
const s = a, c = p;
|
|
96
96
|
De(() => {
|
|
97
97
|
ee();
|
|
98
98
|
});
|
|
99
|
-
const i = Ie(), { devices: ue, device: y, saveDevices: de, setDevice: H } = Le(), w = m(!1), T = m(!1),
|
|
100
|
-
() =>
|
|
99
|
+
const i = Ie(), { devices: ue, device: y, saveDevices: de, setDevice: H } = Le(), w = m(!1), T = m(!1), k = m(!1), N = m(!1), R = m(!1), P = m(!1), g = m(), q = m(0), t = m(s.type ?? "RFID"), Q = [], x = E(
|
|
100
|
+
() => t.value === "RFID" ? "RFID_Scanning" : "QR_Scanning"
|
|
101
101
|
), S = E(
|
|
102
|
-
() =>
|
|
102
|
+
() => t.value === "RFID" ? "RFID_Connecting" : "QR_Connecting"
|
|
103
103
|
);
|
|
104
|
-
E(() => `The scanner could not identify the ${
|
|
104
|
+
E(() => `The scanner could not identify the ${t.value} code. It may be damaged or improperly positioned. Please check the code and try again.`);
|
|
105
105
|
const ve = () => {
|
|
106
106
|
window.scannerWorker ?? (window.scannerWorker = new xe());
|
|
107
107
|
}, B = () => {
|
|
108
|
-
const { serialNumber: e = "" } = y.value[
|
|
108
|
+
const { serialNumber: e = "" } = y.value[t.value] ?? {};
|
|
109
109
|
return e;
|
|
110
110
|
}, Y = async () => {
|
|
111
111
|
try {
|
|
@@ -118,17 +118,17 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
118
118
|
try {
|
|
119
119
|
if (!Se())
|
|
120
120
|
throw new Error("NOT_SUPPORTED_SYSTEM");
|
|
121
|
-
if (c("connect"), !ue.value.length || !y.value[
|
|
121
|
+
if (c("connect"), !ue.value.length || !y.value[t.value])
|
|
122
122
|
throw new Error("HARDWARE_NOT_SYNCHRONIZED");
|
|
123
123
|
i.add({
|
|
124
124
|
customMessage: !0,
|
|
125
|
-
message:
|
|
125
|
+
message: t.value === "QR" ? "Connecting QR Scanner..." : "Connecting RFID Scanner...",
|
|
126
126
|
severity: "info",
|
|
127
127
|
life: 0,
|
|
128
128
|
group: S.value
|
|
129
|
-
}),
|
|
129
|
+
}), k.value = !0;
|
|
130
130
|
const n = () => {
|
|
131
|
-
c("connected", y.value[
|
|
131
|
+
c("connected", y.value[t.value]), setTimeout(() => {
|
|
132
132
|
$();
|
|
133
133
|
}, 0);
|
|
134
134
|
};
|
|
@@ -167,10 +167,10 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
167
167
|
}, $ = (e = !1, o = !1) => {
|
|
168
168
|
var r, I;
|
|
169
169
|
P.value = !1, i.removeGroup(S.value), localStorage.devmode || (window.addEventListener("blur", M), window.addEventListener("beforeunload", M));
|
|
170
|
-
const n = y.value[
|
|
170
|
+
const n = y.value[t.value];
|
|
171
171
|
if (n) {
|
|
172
172
|
let f = "";
|
|
173
|
-
s.bulk ? f = `bulkscan-${
|
|
173
|
+
s.bulk ? f = `bulkscan-${t.value.toLowerCase()}` : f = `scan-${t.value.toLowerCase()}`, window.scannerWorker.onmessage = async ({ data: l }) => {
|
|
174
174
|
var _;
|
|
175
175
|
if (l.status === "scan_started")
|
|
176
176
|
o || (q.value++, setTimeout(() => {
|
|
@@ -190,7 +190,7 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
190
190
|
R.value = !!s.scanValidation;
|
|
191
191
|
const j = await ((_ = s.scanValidation) == null ? void 0 : _.call(
|
|
192
192
|
s,
|
|
193
|
-
|
|
193
|
+
t.value,
|
|
194
194
|
v,
|
|
195
195
|
B()
|
|
196
196
|
)) ?? !0;
|
|
@@ -226,10 +226,10 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}, Z = (e) => {
|
|
229
|
-
H({ RFID: void 0, QR: void 0 }),
|
|
229
|
+
H({ RFID: void 0, QR: void 0 }), N.value = !0, g.value = e instanceof Error ? e.message : Te(e), k.value = !1, c("error", e), i.removeGroup(S.value);
|
|
230
230
|
}, pe = (e, o = []) => {
|
|
231
231
|
let n = "";
|
|
232
|
-
g.value = void 0, C(!0), e === "Time out" ? n = "The scanning process has timed out. Please try again." : e === "Driver not connected to server" ? g.value = "DRIVER_NOT_FOUND" : e === "Device disconnected" && (g.value = "DEVICE_DISCONNECTED", de(o), H({ RFID: void 0, QR: void 0 })), c("error", e),
|
|
232
|
+
g.value = void 0, C(!0), e === "Time out" ? n = "The scanning process has timed out. Please try again." : e === "Driver not connected to server" ? g.value = "DRIVER_NOT_FOUND" : e === "Device disconnected" && (g.value = "DEVICE_DISCONNECTED", de(o), H({ RFID: void 0, QR: void 0 })), c("error", e), N.value = !!g.value, n && i.add({
|
|
233
233
|
customMessage: !0,
|
|
234
234
|
message: n,
|
|
235
235
|
error: e,
|
|
@@ -269,7 +269,7 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
269
269
|
R.value = !!s.scanValidation;
|
|
270
270
|
const n = await ((e = s.scanValidation) == null ? void 0 : e.call(
|
|
271
271
|
s,
|
|
272
|
-
|
|
272
|
+
t.value,
|
|
273
273
|
o,
|
|
274
274
|
B()
|
|
275
275
|
)) ?? !0;
|
|
@@ -279,7 +279,7 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
279
279
|
}, X = () => {
|
|
280
280
|
i.removeGroup("RFID_Scanning"), i.removeGroup("QR_Scanning");
|
|
281
281
|
}, h = (e = !1) => {
|
|
282
|
-
X(),
|
|
282
|
+
X(), k.value = !1, ee(), e && c("stop"), Q.splice(0);
|
|
283
283
|
}, C = (e = !1) => {
|
|
284
284
|
var o, n;
|
|
285
285
|
window.scannerWorker.onmessage = null, window.scannerWorker.postMessage({
|
|
@@ -288,7 +288,7 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
288
288
|
companyCode: (n = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : n.companyCode
|
|
289
289
|
}), h(e), P.value = !0, w.value = !1;
|
|
290
290
|
}, ge = () => {
|
|
291
|
-
s.bulk || (y.value[
|
|
291
|
+
s.bulk || (y.value[t.value] ? (t.value = t.value === "QR" ? "RFID" : "QR", $()) : (h(), N.value = !0, g.value = "HARDWARE_NOT_SYNCHRONIZED", k.value = !1));
|
|
292
292
|
}, M = (e) => {
|
|
293
293
|
T.value = !0, C(!0), e.preventDefault();
|
|
294
294
|
}, ee = () => {
|
|
@@ -298,14 +298,14 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
298
298
|
return e.includes("Windows");
|
|
299
299
|
}, be = E(() => {
|
|
300
300
|
if (!s.labelOnly)
|
|
301
|
-
return s.icon ? s.icon : s.autoSwitch ? "qr-scan" :
|
|
302
|
-
}), ye = E(() => s.label ? s.label : s.autoSwitch ? "SCAN TAG" :
|
|
301
|
+
return s.icon ? s.icon : s.autoSwitch ? "qr-scan" : t.value === "QR" ? "qr" : "rfid";
|
|
302
|
+
}), ye = E(() => s.label ? s.label : s.autoSwitch ? "SCAN TAG" : t.value === "QR" ? "Scan QR" : "Scan RFID");
|
|
303
303
|
return u({
|
|
304
304
|
onBeforeStartScan: L,
|
|
305
305
|
startScan: Y,
|
|
306
306
|
stopScan: C
|
|
307
307
|
}), (e, o) => (d(), D(F, null, [
|
|
308
|
-
b(oe,
|
|
308
|
+
b(oe, ke(e.$attrs, {
|
|
309
309
|
class: [
|
|
310
310
|
{
|
|
311
311
|
"[&_i]:w-2 [&_i]:h-2": e.type === "QR",
|
|
@@ -323,11 +323,11 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
323
323
|
onClick: L
|
|
324
324
|
}), null, 16, ["class", "disabled", "icon", "label", "outlined", "severity", "size"]),
|
|
325
325
|
b(Oe, {
|
|
326
|
-
visible:
|
|
327
|
-
"onUpdate:visible": o[0] || (o[0] = (n) =>
|
|
326
|
+
visible: N.value,
|
|
327
|
+
"onUpdate:visible": o[0] || (o[0] = (n) => N.value = n),
|
|
328
328
|
bulk: e.bulk,
|
|
329
329
|
"error-code": g.value,
|
|
330
|
-
"search-by":
|
|
330
|
+
"search-by": t.value,
|
|
331
331
|
onScan: L
|
|
332
332
|
}, null, 8, ["visible", "bulk", "error-code", "search-by"]),
|
|
333
333
|
w.value ? (d(), U(z, {
|
|
@@ -348,10 +348,10 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
348
348
|
group: x.value,
|
|
349
349
|
class: "[&_[data-pc-section=buttoncontainer]]"
|
|
350
350
|
}, {
|
|
351
|
-
message:
|
|
351
|
+
message: Ne(({ message: n }) => [
|
|
352
352
|
O("div", {
|
|
353
353
|
class: se(
|
|
354
|
-
n.detail == "scanning" ? "w-full -mr-8 z-10 flex gap-2 justify-between items-center text-general-800 text-xs font-normal" : "w-full"
|
|
354
|
+
n.detail == "scanning" ? "w-full -mr-8 z-10 flex gap-2 justify-between items-center text-general-800 dark:text-white text-xs font-normal" : "w-full"
|
|
355
355
|
)
|
|
356
356
|
}, [
|
|
357
357
|
n.detail === "scanning" ? (d(), D(F, { key: 0 }, [
|
|
@@ -361,7 +361,7 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
361
361
|
icon: "loader-4"
|
|
362
362
|
}),
|
|
363
363
|
O("span", We, [
|
|
364
|
-
|
|
364
|
+
t.value === "RFID" ? (d(), D(F, { key: 0 }, [
|
|
365
365
|
b(J, {
|
|
366
366
|
class: "text-base !w-4 !h-4",
|
|
367
367
|
icon: "rfid"
|
|
@@ -392,14 +392,14 @@ const le = () => window.devices ?? [], Be = () => window.device ?? { RFID: null,
|
|
|
392
392
|
b(Ee, {
|
|
393
393
|
visible: T.value,
|
|
394
394
|
"onUpdate:visible": o[2] || (o[2] = (n) => T.value = n),
|
|
395
|
-
header: `${
|
|
395
|
+
header: `${t.value} SCAN STOPPED`,
|
|
396
396
|
onConfirm: o[3] || (o[3] = (n) => (T.value = !1, L())),
|
|
397
397
|
"confirm-label": "Continue",
|
|
398
398
|
message: "The scan process was interrupted because you want to leave this window.",
|
|
399
399
|
severity: "danger"
|
|
400
400
|
}, null, 8, ["visible", "header"]),
|
|
401
401
|
(d(), U(he, { to: "body" }, [
|
|
402
|
-
|
|
402
|
+
k.value ? (d(), D("div", {
|
|
403
403
|
key: 0,
|
|
404
404
|
class: se([
|
|
405
405
|
e.$preset.dialog.mask({ props: { modal: !0 } }).class,
|
package/buttonsearch/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, inject as P, shallowRef as g, ref as V, createElementBlock as w, openBlock as I, mergeProps as o, unref as e, createVNode as u, withModifiers as q, createElementVNode as i, nextTick as E } from "vue";
|
|
2
2
|
import { e as N } from "../event-bus/index.es.js";
|
|
3
3
|
import { u as T } from "../plugins/WangsVue.es.js";
|
|
4
|
-
import { s as
|
|
4
|
+
import { s as j } from "../vendor/primevue/inputtext/inputtext.esm.es.js";
|
|
5
5
|
import { _ as c } from "../icon/index.es.js";
|
|
6
6
|
const D = /* @__PURE__ */ x({
|
|
7
7
|
__name: "ButtonSearch",
|
|
@@ -9,45 +9,45 @@ const D = /* @__PURE__ */ x({
|
|
|
9
9
|
tableName: { default: "datatable" }
|
|
10
10
|
},
|
|
11
11
|
emits: ["search", "collapsed"],
|
|
12
|
-
setup(
|
|
13
|
-
const t = P("preset", {}).buttonsearch, { locale: $ } = T("ButtonSearch"),
|
|
12
|
+
setup(F) {
|
|
13
|
+
const t = P("preset", {}).buttonsearch, { locale: $ } = T("ButtonSearch"), a = g(), s = V(), r = g(!1), B = () => {
|
|
14
14
|
r.value = !0, p();
|
|
15
15
|
}, p = () => {
|
|
16
16
|
E(() => {
|
|
17
17
|
s.value && s.value.$el.focus();
|
|
18
18
|
});
|
|
19
|
-
}, C = (
|
|
20
|
-
|
|
19
|
+
}, C = (n) => {
|
|
20
|
+
a.value = n.target.value || void 0;
|
|
21
21
|
};
|
|
22
|
-
return (
|
|
22
|
+
return (n, l) => {
|
|
23
23
|
var m, v, b, f, h, d, y, k, S;
|
|
24
24
|
return r.value ? (I(), w("form", o({ key: 1 }, (b = e(t)) == null ? void 0 : b.form({ context: { showSearchInput: r.value } }), {
|
|
25
25
|
onSubmit: l[2] || (l[2] = q(
|
|
26
26
|
() => {
|
|
27
|
-
e(N).emit("search-table", { tableName:
|
|
27
|
+
e(N).emit("search-table", { tableName: n.tableName, search: a.value }), n.$emit("search", a.value);
|
|
28
28
|
},
|
|
29
29
|
["prevent"]
|
|
30
30
|
))
|
|
31
31
|
}), [
|
|
32
32
|
i("button", o({
|
|
33
33
|
onClick: l[0] || (l[0] = () => {
|
|
34
|
-
|
|
34
|
+
a.value = void 0, r.value = !1, n.$emit("collapsed"), e(N).emit("search-table", { tableName: n.tableName, search: void 0 }), n.$emit("search", void 0);
|
|
35
35
|
})
|
|
36
36
|
}, (f = e(t)) == null ? void 0 : f.collapsebutton.root({ context: { showSearchInput: r.value } }), { type: "button" }), [
|
|
37
37
|
u(c, o((h = e(t)) == null ? void 0 : h.collapsebutton.icon, { icon: "arrow-left" }), null, 16)
|
|
38
38
|
], 16),
|
|
39
|
-
u(e(
|
|
39
|
+
u(e(j), o((d = e(t)) == null ? void 0 : d.inputtext, {
|
|
40
40
|
ref_key: "inputtext",
|
|
41
41
|
ref: s,
|
|
42
|
-
"model-value":
|
|
43
|
-
placeholder: e($).searchPlaceholder,
|
|
42
|
+
"model-value": a.value,
|
|
43
|
+
placeholder: n.$t(e($).searchPlaceholder),
|
|
44
44
|
onInput: C
|
|
45
45
|
}), null, 16, ["model-value", "placeholder"]),
|
|
46
46
|
i("button", o({
|
|
47
|
-
onClick: l[1] || (l[1] = (
|
|
48
|
-
|
|
47
|
+
onClick: l[1] || (l[1] = (M) => {
|
|
48
|
+
a.value = void 0, p();
|
|
49
49
|
})
|
|
50
|
-
}, (y = e(t)) == null ? void 0 : y.resetbutton.root({ query:
|
|
50
|
+
}, (y = e(t)) == null ? void 0 : y.resetbutton.root({ query: a.value }), { type: "button" }), [
|
|
51
51
|
u(c, o((k = e(t)) == null ? void 0 : k.resetbutton.icon, { icon: "close" }), null, 16)
|
|
52
52
|
], 16),
|
|
53
53
|
i("button", o((S = e(t)) == null ? void 0 : S.hiddensubmit, { type: "submit" }), null, 16)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as V, computed as U, ref as
|
|
1
|
+
import { defineComponent as V, computed as U, ref as v, createElementBlock as c, openBlock as a, Fragment as y, createBlock as h, createVNode as s, createElementVNode as u, toDisplayString as m, withCtx as _ } from "vue";
|
|
2
2
|
import { _ as N } from "../badge/index.es.js";
|
|
3
3
|
import { _ as b } from "../button/index.es.js";
|
|
4
4
|
import { _ as O } from "../dialogconfirm/index.es.js";
|
|
@@ -23,38 +23,38 @@ const D = {
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue", "confirm"],
|
|
25
25
|
setup(B, { emit: g }) {
|
|
26
|
-
const e = B,
|
|
26
|
+
const e = B, $ = g, i = U(() => e.modelValue ?? void 0), l = v(!1), r = v(!1), k = async (n) => {
|
|
27
27
|
if (e.fetchFunction)
|
|
28
|
-
return await e.fetchFunction(
|
|
28
|
+
return await e.fetchFunction(n);
|
|
29
29
|
}, w = async () => {
|
|
30
30
|
if (e.fetchOptionFunction)
|
|
31
31
|
return await e.fetchOptionFunction();
|
|
32
|
+
}, x = () => {
|
|
33
|
+
e.confirmBeforeReselect ? r.value = !0 : l.value = !0;
|
|
32
34
|
}, C = () => {
|
|
33
|
-
|
|
34
|
-
}, $ = () => {
|
|
35
|
-
x("confirm"), i.value = !0;
|
|
35
|
+
$("confirm"), l.value = !0;
|
|
36
36
|
};
|
|
37
|
-
return (
|
|
38
|
-
var
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
e.useBadge ? (
|
|
37
|
+
return (n, t) => {
|
|
38
|
+
var f, p, d;
|
|
39
|
+
return a(), c(y, null, [
|
|
40
|
+
i.value ? (a(), c("div", D, [
|
|
41
|
+
e.useBadge ? (a(), h(N, {
|
|
42
42
|
key: 0,
|
|
43
|
-
label: ((
|
|
43
|
+
label: ((f = i.value) == null ? void 0 : f.fullName) ?? ((p = i.value) == null ? void 0 : p.name),
|
|
44
44
|
format: "username"
|
|
45
|
-
}, null, 8, ["label"])) : (
|
|
45
|
+
}, null, 8, ["label"])) : (a(), c(y, { key: 1 }, [
|
|
46
46
|
s(F, {
|
|
47
47
|
class: "!text-general-200",
|
|
48
48
|
icon: "user"
|
|
49
49
|
}),
|
|
50
|
-
|
|
50
|
+
u("span", E, m(i.value.fullName ?? ((d = i.value) == null ? void 0 : d.name)), 1)
|
|
51
51
|
], 64)),
|
|
52
52
|
s(b, {
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: x,
|
|
54
54
|
class: "p-0 m-0 !min-w-0 !min-h-0 !h-max !w-max",
|
|
55
55
|
text: ""
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
57
|
+
default: _(() => [
|
|
58
58
|
s(F, {
|
|
59
59
|
icon: "pencil",
|
|
60
60
|
severity: "primary"
|
|
@@ -62,33 +62,33 @@ const D = {
|
|
|
62
62
|
]),
|
|
63
63
|
_: 1
|
|
64
64
|
})
|
|
65
|
-
])) : (
|
|
65
|
+
])) : (a(), h(b, {
|
|
66
66
|
key: 1,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
})),
|
|
67
|
+
label: n.$t("Select User"),
|
|
68
|
+
onClick: t[0] || (t[0] = (o) => l.value = !0)
|
|
69
|
+
}, null, 8, ["label"])),
|
|
70
70
|
s(S, {
|
|
71
|
-
visible:
|
|
72
|
-
"onUpdate:visible": t[1] || (t[1] = (
|
|
71
|
+
visible: l.value,
|
|
72
|
+
"onUpdate:visible": t[1] || (t[1] = (o) => l.value = o),
|
|
73
73
|
description: e.description,
|
|
74
74
|
"fetch-function": k,
|
|
75
75
|
"fetch-option-function": w,
|
|
76
76
|
header: e.header,
|
|
77
77
|
list: e.list,
|
|
78
|
-
onSelected: t[2] || (t[2] = (
|
|
78
|
+
onSelected: t[2] || (t[2] = (o) => n.$emit("update:modelValue", o)),
|
|
79
79
|
"selection-type": "single"
|
|
80
80
|
}, null, 8, ["visible", "description", "header", "list"]),
|
|
81
81
|
s(O, {
|
|
82
|
-
visible:
|
|
83
|
-
"onUpdate:visible": t[3] || (t[3] = (
|
|
82
|
+
visible: r.value,
|
|
83
|
+
"onUpdate:visible": t[3] || (t[3] = (o) => r.value = o),
|
|
84
84
|
header: e.confirmHeader ?? "-",
|
|
85
|
-
onConfirm:
|
|
85
|
+
onConfirm: C,
|
|
86
86
|
"confirm-label": "Continue",
|
|
87
87
|
severity: "danger"
|
|
88
88
|
}, {
|
|
89
|
-
body:
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
body: _(() => [
|
|
90
|
+
u("p", null, m(n.$t(e.confirmBody)), 1),
|
|
91
|
+
u("p", null, m(n.$t("Are you sure you want to continue?")), 1)
|
|
92
92
|
]),
|
|
93
93
|
_: 1
|
|
94
94
|
}, 8, ["visible", "header"])
|
package/carousel/index.es.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { defineComponent as _, shallowRef as i, onMounted as h, onUnmounted as k, createElementBlock as
|
|
1
|
+
import { defineComponent as _, shallowRef as i, onMounted as h, onUnmounted as k, createElementBlock as n, openBlock as l, createElementVNode as d, normalizeStyle as y, normalizeClass as m, Fragment as v, renderList as p, createBlock as I } from "vue";
|
|
2
2
|
import { _ as C } from "../image/index.es.js";
|
|
3
|
-
const
|
|
3
|
+
const b = {
|
|
4
4
|
class: "flex flex-col gap-1 items-center justify-center w-[125px] overflow-hidden",
|
|
5
5
|
"data-ts-name": "carousel",
|
|
6
6
|
"data-ts-section": "root"
|
|
7
|
-
},
|
|
7
|
+
}, x = {
|
|
8
8
|
class: "flex gap-1",
|
|
9
9
|
"data-ts-section": "indicators"
|
|
10
|
-
},
|
|
10
|
+
}, B = ["onClick"], T = /* @__PURE__ */ _({
|
|
11
11
|
__name: "Carousel",
|
|
12
12
|
props: {
|
|
13
13
|
value: {}
|
|
14
14
|
},
|
|
15
15
|
setup(f) {
|
|
16
|
-
const
|
|
16
|
+
const g = f, a = i(0), r = i(), c = i();
|
|
17
17
|
h(() => {
|
|
18
18
|
u();
|
|
19
19
|
}), k(() => {
|
|
20
|
-
|
|
20
|
+
o();
|
|
21
21
|
});
|
|
22
22
|
const u = () => {
|
|
23
|
-
|
|
23
|
+
o(), r.value = window.setInterval(() => {
|
|
24
24
|
var e;
|
|
25
|
-
a.value = (a.value + 1) % (((e =
|
|
25
|
+
a.value = (a.value + 1) % (((e = g.value) == null ? void 0 : e.length) ?? 0);
|
|
26
26
|
}, 3e3);
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
27
|
+
}, o = () => {
|
|
28
|
+
r.value && (window.clearInterval(r.value), r.value = void 0);
|
|
29
|
+
}, w = (e) => {
|
|
30
|
+
o(), a.value = e, c.value ? window.clearTimeout(c.value) : window.setTimeout(u, 3e3);
|
|
31
31
|
};
|
|
32
|
-
return (e,
|
|
32
|
+
return (e, $) => (l(), n("div", b, [
|
|
33
33
|
d("div", {
|
|
34
|
-
class:
|
|
35
|
-
style:
|
|
34
|
+
class: m(["relative w-full h-max flex transition-transform duration-300"]),
|
|
35
|
+
style: y(`transform: translateX(${a.value * -100}%)`),
|
|
36
36
|
"data-ts-section": "carousel-image-wrapper"
|
|
37
37
|
}, [
|
|
38
|
-
(l(!0),
|
|
38
|
+
(l(!0), n(v, null, p(e.value, (s) => {
|
|
39
39
|
var t;
|
|
40
|
-
return l(),
|
|
40
|
+
return l(), I(C, {
|
|
41
41
|
key: (t = s.src) == null ? void 0 : t.toString(),
|
|
42
42
|
galleries: e.value,
|
|
43
43
|
src: s.src,
|
|
@@ -45,17 +45,17 @@ const x = {
|
|
|
45
45
|
}, null, 8, ["galleries", "src"]);
|
|
46
46
|
}), 128))
|
|
47
47
|
], 4),
|
|
48
|
-
d("div",
|
|
49
|
-
(l(!0),
|
|
48
|
+
d("div", x, [
|
|
49
|
+
(l(!0), n(v, null, p(e.value, (s, t) => (l(), n("span", {
|
|
50
50
|
key: t,
|
|
51
|
-
class:
|
|
52
|
-
"w-1.5 h-1.5 bg-general-100 rounded-full",
|
|
51
|
+
class: m([
|
|
52
|
+
"w-1.5 h-1.5 bg-general-100 dark:bg-grayscale-700 rounded-full",
|
|
53
53
|
"cursor-pointer",
|
|
54
|
-
{ "!bg-primary-500": t === a.value }
|
|
54
|
+
{ "!bg-primary-500 dark:!bg-primary-300": t === a.value }
|
|
55
55
|
]),
|
|
56
|
-
onClick: (z) =>
|
|
56
|
+
onClick: (z) => w(t),
|
|
57
57
|
"data-ts-section": "indicator-item"
|
|
58
|
-
}, null, 10,
|
|
58
|
+
}, null, 10, B))), 128))
|
|
59
59
|
])
|
|
60
60
|
]));
|
|
61
61
|
}
|
package/checkbox/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as S, mergeModels as y, inject as w, useModel as N, reactive as q, onMounted as M, computed as V, watch as h, createElementBlock as L, openBlock as k, mergeProps as d, unref as u, createElementVNode as c, renderSlot as P, createVNode as I, normalizeClass as
|
|
1
|
+
import { defineComponent as S, mergeModels as y, inject as w, useModel as N, reactive as q, onMounted as M, computed as V, watch as h, createElementBlock as L, openBlock as k, mergeProps as d, unref as u, createElementVNode as c, renderSlot as P, createVNode as I, normalizeClass as $, createTextVNode as j, createBlock as A, createCommentVNode as E, toDisplayString as F } from "vue";
|
|
2
2
|
import { u as O } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
-
import { c as T, e as
|
|
3
|
+
import { c as T, e as x } from "../utils/object.util.es.js";
|
|
4
4
|
import { _ as B } from "../icon/index.es.js";
|
|
5
5
|
const z = ["data-p-disabled", "data-p-highlight"], D = ["id", "aria-invalid", "aria-label", "aria-labelledby", "checked", "disabled", "input-id", "name", "readonly", "required", "tabindex", "value"], Q = /* @__PURE__ */ S({
|
|
6
6
|
__name: "Checkbox",
|
|
@@ -51,7 +51,7 @@ const z = ["data-p-disabled", "data-p-highlight"], D = ["id", "aria-invalid", "a
|
|
|
51
51
|
let t;
|
|
52
52
|
e.binary && !e.triState ? t = o.value ? e.falseValue : e.trueValue : e.triState ? t = // eslint-disable-next-line no-nested-ternary
|
|
53
53
|
l.value == null ? !1 : l.value === !1 ? !0 : null : Array.isArray(e.modelValue) && (o.value ? t = e.modelValue.filter(
|
|
54
|
-
(r) =>
|
|
54
|
+
(r) => !x(r, e.value)
|
|
55
55
|
) : t = e.modelValue ? [...e.modelValue, e.value] : [e.value]), b.value = t, l.value = t, s("change", a);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
@@ -109,14 +109,14 @@ const z = ["data-p-disabled", "data-p-highlight"], D = ["id", "aria-invalid", "a
|
|
|
109
109
|
var n;
|
|
110
110
|
return [
|
|
111
111
|
I(B, {
|
|
112
|
-
class:
|
|
112
|
+
class: $([...(n = u(i)) == null ? void 0 : n.icon.class, { "text-transparent": !o.value }]),
|
|
113
113
|
icon: o.value ? "check" : v.value ? "subtract" : null
|
|
114
114
|
}, null, 8, ["class", "icon"])
|
|
115
115
|
];
|
|
116
116
|
})
|
|
117
117
|
], 16),
|
|
118
118
|
c("span", d(u(i).label({ props: e }), { "data-wv-section": "checkbox-label" }), [
|
|
119
|
-
|
|
119
|
+
j(F(a.$t(a.label)) + " ", 1),
|
|
120
120
|
a.tooltip ? (k(), A(B, d({
|
|
121
121
|
key: 0,
|
|
122
122
|
info: a.tooltip,
|