@fewangsit/wangsvue-fats 1.0.1-alpha.66 → 1.0.1-alpha.68
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 +29 -20
- package/approverinfo/index.es.js +50 -50
- package/assetinfo/index.es.js +8 -8
- 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/buttoncopy/index.es.js +8 -8
- package/buttonscan/index.es.js +48 -48
- package/buttonselecttree/index.d.ts +4 -2
- package/buttonselecttree/index.es.js +50 -50
- package/carousel/index.es.js +24 -24
- package/columnlist/index.es.js +142 -132
- package/config/defaultProps.es.js +14 -9
- package/datatable/index.d.ts +14 -0
- package/datatable/index.es.js +416 -410
- package/datepicker/index.es.js +22 -22
- package/daypicker/index.es.js +13 -13
- package/dialogbasictransferlog/index.es.js +25 -25
- package/dialogdamagelog/index.es.js +69 -66
- package/dialogform/index.es.js +11 -11
- package/dialogfulltransferlog/index.es.js +11 -11
- package/dialoglinkedasset/index.es.js +35 -35
- package/dialogprintqr/index.es.js +33 -35
- package/dialogselecttree/index.es.js +4 -4
- package/dialogselectuser/index.es.js +1 -1
- package/disposalreport/index.es.js +2 -2
- package/editor/index.es.js +51 -48
- package/fileupload/index.es.js +14 -14
- package/icon/index.es.js +27 -27
- package/imagecompressor/index.es.js +82 -82
- package/imageinputinfo/index.es.js +9 -9
- package/inputsearch/index.es.js +27 -27
- package/litedropdown/index.es.js +26 -26
- 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/multirow/index.es.js +11 -10
- 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/stats.html +1 -1
- package/steps/index.es.js +18 -16
- package/style.css +2 -2
- package/tagtype/index.es.js +13 -13
- package/transactionroles/index.es.js +4 -1
- package/treesearchinput/index.es.js +7 -7
- package/username/index.es.js +8 -8
- package/wangsvue-fats.esm.browser.js +19472 -19430
- package/wangsvue-fats.system.js +72 -72
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
|
|
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,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Slot } from 'vue';
|
|
1
|
+
import { ShallowRef, Slot } from 'vue';
|
|
2
2
|
|
|
3
3
|
import { TreeNode } from '../basetree';
|
|
4
4
|
import { QueryParams, ShortFetchResponse } from '../datatable';
|
|
@@ -199,7 +199,9 @@ declare class ButtonSelectTree extends ClassComponent<
|
|
|
199
199
|
ButtonSelectTreeProps,
|
|
200
200
|
ButtonSelectTreeSlots,
|
|
201
201
|
ButtonSelectTreeEmits
|
|
202
|
-
> {
|
|
202
|
+
> {
|
|
203
|
+
dialogTreeKey: ShallowRef<number>;
|
|
204
|
+
}
|
|
203
205
|
|
|
204
206
|
declare module '@vue/runtime-core' {
|
|
205
207
|
interface GlobalComponents {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
1
|
+
import { defineComponent as L, onMounted as W, reactive as F, ref as d, computed as p, watch as A, createElementBlock as M, openBlock as i, Fragment as z, createVNode as u, createBlock as c, mergeProps as Y, withCtx as y, createCommentVNode as N, normalizeStyle as j, normalizeClass as J, createSlots as P, renderSlot as U, nextTick as q } from "vue";
|
|
2
|
+
import { u as Q } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
+
import { _ as X } from "../badge/index.es.js";
|
|
4
|
+
import { _ as k } from "../button/index.es.js";
|
|
5
|
+
import { _ as Z } from "../dialogselecttree/index.es.js";
|
|
6
|
+
import { _ as ee } from "../fieldwrapper/index.es.js";
|
|
7
7
|
import { _ as D } from "../icon/index.es.js";
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
8
|
+
import { _ as le } from "../validatormessage/index.es.js";
|
|
9
|
+
const te = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "inline-flex gap-1 items-center"
|
|
12
|
-
},
|
|
12
|
+
}, fe = /* @__PURE__ */ L({
|
|
13
13
|
__name: "ButtonSelectTree",
|
|
14
14
|
props: {
|
|
15
15
|
type: {},
|
|
@@ -47,31 +47,31 @@ const le = {
|
|
|
47
47
|
fetchTreeOnButtonRender: { type: Boolean, default: !1 }
|
|
48
48
|
},
|
|
49
49
|
emits: ["update:value", "dialogShown", "dialogHidden", "reset"],
|
|
50
|
-
setup($, {
|
|
51
|
-
const f =
|
|
52
|
-
|
|
50
|
+
setup($, { expose: K, emit: x }) {
|
|
51
|
+
const f = x, l = $;
|
|
52
|
+
W(() => {
|
|
53
53
|
var e, a;
|
|
54
54
|
l.useValidator && (Object.assign(
|
|
55
55
|
s,
|
|
56
|
-
|
|
57
|
-
), l.value && ((a = (e =
|
|
56
|
+
Q(l.fieldName, (t) => V(t))
|
|
57
|
+
), l.value && ((a = (e = w.value) == null ? void 0 : e.treeComponent) == null || a.fetchTreeList(), s.value = l.value));
|
|
58
58
|
});
|
|
59
|
-
const s =
|
|
59
|
+
const s = F({
|
|
60
60
|
value: l.value
|
|
61
|
-
}),
|
|
61
|
+
}), w = d(), m = d(l.fetchTreeOnButtonRender), b = d(l.fetchTreeOnButtonRender), v = d(0), n = d(
|
|
62
62
|
!Array.isArray(l.value) && typeof l.value != "number" && typeof l.value != "string" ? l.value : void 0
|
|
63
|
-
),
|
|
63
|
+
), g = p({
|
|
64
64
|
get: () => n.value,
|
|
65
65
|
set: (e) => {
|
|
66
|
-
n.value = e, f("update:value",
|
|
66
|
+
n.value = e, f("update:value", h(e, l.fieldDataKey));
|
|
67
67
|
}
|
|
68
|
-
}), B =
|
|
68
|
+
}), B = p(() => _(s.value ?? l.value)), C = p(() => {
|
|
69
69
|
var t;
|
|
70
70
|
const a = (l.selectionMode === "checkbox" ? ((t = B.value) == null ? void 0 : t.filter((o) => (o == null ? void 0 : o.toString()) != "-1")) ?? [] : []).length;
|
|
71
71
|
return a && l.selectionMode === "checkbox" ? a + (l.type === "group" ? " group(s) selected" : " category(s) selected") : l.label ? l.label : l.type === "group" ? "Select Group" : "Select Category";
|
|
72
|
-
}),
|
|
72
|
+
}), E = p(
|
|
73
73
|
() => l.width ? `width: ${l.width}px !important` : void 0
|
|
74
|
-
),
|
|
74
|
+
), _ = (e) => {
|
|
75
75
|
const a = JSON.parse(
|
|
76
76
|
sessionStorage.getItem(`flatten${l.type}nodes`) ?? "[]"
|
|
77
77
|
);
|
|
@@ -84,28 +84,28 @@ const le = {
|
|
|
84
84
|
}
|
|
85
85
|
return t.key;
|
|
86
86
|
}) : [];
|
|
87
|
-
},
|
|
87
|
+
}, h = (e, a) => {
|
|
88
88
|
if (Array.isArray(e) && l.selectionMode === "checkbox")
|
|
89
89
|
return e.map((t) => a ? t == null ? void 0 : t[a] : t);
|
|
90
90
|
if (e && l.selectionMode === "single")
|
|
91
91
|
return a ? e == null ? void 0 : e[a] : e;
|
|
92
|
-
},
|
|
92
|
+
}, V = async (e) => (await q(), (Array.isArray(e) && !(e != null && e.length) || !Array.isArray(e) && !e) && l.mandatory ? l.validatorMessage ? l.validatorMessage : l.type === "group" ? "You must pick a group" : "You must pick a category" : l.invalid && l.validatorMessage ? l.validatorMessage : !0), O = (e) => {
|
|
93
93
|
var a;
|
|
94
94
|
if (e) {
|
|
95
|
-
const { keys: t, singleNode: o, selectedNodes: r } = e,
|
|
95
|
+
const { keys: t, singleNode: o, selectedNodes: r } = e, H = ((a = t[-1]) == null ? void 0 : a.checked) ?? !1;
|
|
96
96
|
if (l.selectionMode === "single")
|
|
97
|
-
|
|
97
|
+
g.value = o, s.value = h(g.value, l.fieldDataKey);
|
|
98
98
|
else {
|
|
99
|
-
const
|
|
99
|
+
const I = r == null ? void 0 : r.filter((G) => {
|
|
100
100
|
var T;
|
|
101
|
-
return !((T = l.excludedKeys) != null && T.includes(
|
|
101
|
+
return !((T = l.excludedKeys) != null && T.includes(G.key));
|
|
102
102
|
});
|
|
103
|
-
s.value =
|
|
103
|
+
s.value = h(I, l.fieldDataKey) ?? [];
|
|
104
104
|
}
|
|
105
|
-
f("update:value", s.value,
|
|
105
|
+
f("update:value", s.value, H);
|
|
106
106
|
}
|
|
107
|
-
},
|
|
108
|
-
|
|
107
|
+
}, R = () => {
|
|
108
|
+
g.value = void 0, v.value++, f("reset");
|
|
109
109
|
}, S = () => {
|
|
110
110
|
m.value = !0, b.value = !1, f("dialogShown");
|
|
111
111
|
};
|
|
@@ -120,20 +120,20 @@ const le = {
|
|
|
120
120
|
l.selectionMode === "single" && (n.value = e);
|
|
121
121
|
},
|
|
122
122
|
{ immediate: !0 }
|
|
123
|
-
), (e, a) => (i(), M(
|
|
124
|
-
u(
|
|
123
|
+
), K({ dialogTreeKey: v }), (e, a) => (i(), M(z, null, [
|
|
124
|
+
u(ee, Y(e.$attrs, {
|
|
125
125
|
info: e.fieldInfo,
|
|
126
126
|
label: l.fieldLabel,
|
|
127
127
|
mandatory: l.mandatory,
|
|
128
128
|
"show-optional-text": e.$attrs["show-optional-text"] != !1
|
|
129
129
|
}), {
|
|
130
130
|
default: y(() => [
|
|
131
|
-
n.value ? (i(), M("span",
|
|
132
|
-
u(
|
|
131
|
+
n.value ? (i(), M("span", te, [
|
|
132
|
+
u(X, {
|
|
133
133
|
label: n.value.name,
|
|
134
134
|
format: "nowrap"
|
|
135
135
|
}, null, 8, ["label"]),
|
|
136
|
-
e.singleEditable ? (i(),
|
|
136
|
+
e.singleEditable ? (i(), c(k, {
|
|
137
137
|
key: 0,
|
|
138
138
|
onClick: S,
|
|
139
139
|
class: "p-0 m-0 !min-w-0 !min-h-0 !h-4 !w-4 focus-visible:ring-0 focus-visible:bg-primary-50",
|
|
@@ -148,9 +148,9 @@ const le = {
|
|
|
148
148
|
]),
|
|
149
149
|
_: 1
|
|
150
150
|
})) : N("", !0),
|
|
151
|
-
e.singleResetable ? (i(),
|
|
151
|
+
e.singleResetable ? (i(), c(k, {
|
|
152
152
|
key: 1,
|
|
153
|
-
onClick:
|
|
153
|
+
onClick: R,
|
|
154
154
|
class: "p-0 m-0 !min-w-0 !min-h-0 !h-4 !w-4 focus-visible:ring-0 focus-visible:bg-danger-50",
|
|
155
155
|
text: ""
|
|
156
156
|
}, {
|
|
@@ -163,24 +163,24 @@ const le = {
|
|
|
163
163
|
]),
|
|
164
164
|
_: 1
|
|
165
165
|
})) : N("", !0)
|
|
166
|
-
])) : (i(),
|
|
166
|
+
])) : (i(), c(k, {
|
|
167
167
|
key: 1,
|
|
168
|
-
class:
|
|
168
|
+
class: J({ "!w-full": !l.width }),
|
|
169
169
|
disabled: e.disabled,
|
|
170
|
-
label:
|
|
171
|
-
style:
|
|
170
|
+
label: C.value,
|
|
171
|
+
style: j(E.value),
|
|
172
172
|
onClick: S
|
|
173
173
|
}, null, 8, ["class", "disabled", "label", "style"])),
|
|
174
|
-
u(
|
|
174
|
+
u(le, {
|
|
175
175
|
message: s.errorMessage
|
|
176
176
|
}, null, 8, ["message"])
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
179
|
}, 16, ["info", "label", "mandatory", "show-optional-text"]),
|
|
180
|
-
(i(),
|
|
181
|
-
key:
|
|
180
|
+
(i(), c(Z, {
|
|
181
|
+
key: v.value + +b.value,
|
|
182
182
|
ref_key: "dialogTreeInstance",
|
|
183
|
-
ref:
|
|
183
|
+
ref: w,
|
|
184
184
|
visible: m.value,
|
|
185
185
|
"onUpdate:visible": a[0] || (a[0] = (t) => m.value = t),
|
|
186
186
|
"allow-empty-selection": e.allowEmptySelection,
|
|
@@ -202,12 +202,12 @@ const le = {
|
|
|
202
202
|
"show-disposable-groups": l.showDisposableGroups,
|
|
203
203
|
type: l.type,
|
|
204
204
|
onHide: a[1] || (a[1] = (t) => e.$emit("dialogHidden")),
|
|
205
|
-
onSelect:
|
|
206
|
-
},
|
|
205
|
+
onSelect: O
|
|
206
|
+
}, P({ _: 2 }, [
|
|
207
207
|
e.$slots.treenode ? {
|
|
208
208
|
name: "treenode",
|
|
209
209
|
fn: y(({ node: t }) => [
|
|
210
|
-
|
|
210
|
+
U(e.$slots, "treenode", { node: t })
|
|
211
211
|
]),
|
|
212
212
|
key: "0"
|
|
213
213
|
} : void 0
|
|
@@ -216,5 +216,5 @@ const le = {
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
export {
|
|
219
|
-
|
|
219
|
+
fe as _
|
|
220
220
|
};
|
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
|
}
|