@fewangsit/wangsvue-fats 1.0.1-alpha.67 → 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 +47 -47
- 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 +18613 -18571
- 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
|
|
17
|
+
return a.message;
|
|
18
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(
|
|
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/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
|
}
|