@fewangsit/wangsvue-fats 1.0.1-alpha.21 → 1.0.1-alpha.23
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/backgroundimagecropper/index.es.js +2 -2
- package/buttonscan/index.d.ts +1 -1
- package/buttonscan/index.es.js +23 -22
- package/datatable/index.d.ts +8 -1
- package/datatable/index.es.js +367 -363
- package/dialogprintqr/index.es.js +2 -2
- package/languageswitcher/index.es.js +30 -29
- package/package.json +1 -1
- package/plugins/basei18n.es.js +59 -58
- package/stats.html +1 -1
- package/style.css +1 -1
- package/utils/cookie.util.d.ts +18 -0
- package/utils/cookie.util.es.js +19 -0
- package/wangsvue-fats.esm.browser.js +4207 -4188
- package/wangsvue-fats.system.js +70 -70
|
@@ -50,8 +50,8 @@ const I = (i, s) => {
|
|
|
50
50
|
_: 3
|
|
51
51
|
}, 8, ["mouse-move", "touch-move", "touch-resize", "wheel-resize"]));
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), S = /* @__PURE__ */ I(R, [["__scopeId", "data-v-9031c32d"]]);
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
S as B,
|
|
56
56
|
I as _
|
|
57
57
|
};
|
package/buttonscan/index.d.ts
CHANGED
package/buttonscan/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AxiosError as ye } from "axios";
|
|
2
|
-
import { ref as re, defineComponent as
|
|
2
|
+
import { ref as re, defineComponent as Re, onBeforeUnmount as _e, shallowRef as v, computed as E, createElementBlock as D, openBlock as u, Fragment as F, createVNode as b, createBlock as M, createCommentVNode as U, mergeProps as De, withCtx as ke, createElementVNode as C, normalizeClass as ee, createTextVNode as se, toDisplayString as j, Teleport as Ne } from "vue";
|
|
3
3
|
import { ChangelogServices as he } from "@tagsamurai/fats-api-services";
|
|
4
4
|
import { u as Ie } from "../utils/baseToast.util.es.js";
|
|
5
5
|
import { _ as ne } from "../button/index.es.js";
|
|
6
6
|
import { _ as Ee } from "../dialogconfirm/index.es.js";
|
|
7
7
|
import { _ as Ce } from "../hardwaresync/index.es.js";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as A } from "../icon/index.es.js";
|
|
9
9
|
import { _ as z } from "../toast/index.es.js";
|
|
10
10
|
import { v as J } from "../vendor/uuid/dist/esm-browser/v4.es.js";
|
|
11
11
|
const Oe = (a) => {
|
|
@@ -56,7 +56,7 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
56
56
|
}, Le = { class: "flex gap-2 items-center" }, We = { class: "flex gap-0.5 items-center leading-4" }, Fe = { class: "flex gap-5 items-center" }, Me = {
|
|
57
57
|
key: 1,
|
|
58
58
|
class: "text-xs font-medium leading-[16.39px] tracking-[0.02em]"
|
|
59
|
-
}, He = /* @__PURE__ */
|
|
59
|
+
}, He = /* @__PURE__ */ Re({
|
|
60
60
|
__name: "ButtonScan",
|
|
61
61
|
props: {
|
|
62
62
|
label: {},
|
|
@@ -93,7 +93,7 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
93
93
|
emits: ["update:modelValue", "connect", "connected", "scan", "stop", "error", "beforeStartScan"],
|
|
94
94
|
setup(a, { expose: l, emit: m }) {
|
|
95
95
|
const s = a, r = m;
|
|
96
|
-
|
|
96
|
+
_e(() => {
|
|
97
97
|
X();
|
|
98
98
|
});
|
|
99
99
|
const c = Ie(), { devices: le, device: S, saveDevices: ue, setDevice: G } = Be(), w = v(!1), O = v(!1), k = v(!1), N = v(!1), y = v(!1), V = v(!1), f = v(), H = v(0), o = v(s.type ?? "RFID"), P = [], T = E(
|
|
@@ -133,11 +133,11 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
133
133
|
}, 0);
|
|
134
134
|
};
|
|
135
135
|
window.scannerWorker.onmessage = ({ data: n }) => {
|
|
136
|
-
var
|
|
136
|
+
var R;
|
|
137
137
|
if (n.status === "connection_established")
|
|
138
138
|
try {
|
|
139
|
-
const { error: p } = (n == null ? void 0 : n.data) ?? {}, i = ((
|
|
140
|
-
(W) => W.serialNumber === (
|
|
139
|
+
const { error: p } = (n == null ? void 0 : n.data) ?? {}, i = ((R = n == null ? void 0 : n.data) == null ? void 0 : R.deviceList) ?? [], _ = S.value[s.type], d = i.some(
|
|
140
|
+
(W) => W.serialNumber === (_ == null ? void 0 : _.serialNumber)
|
|
141
141
|
);
|
|
142
142
|
if (i.length && d)
|
|
143
143
|
t();
|
|
@@ -164,13 +164,13 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
164
164
|
Y(t);
|
|
165
165
|
}
|
|
166
166
|
}, Q = (e = !1, t = !1) => {
|
|
167
|
-
var
|
|
167
|
+
var R;
|
|
168
168
|
V.value = !1, c.removeGroup(g.value), localStorage.devmode || (window.addEventListener("blur", L), window.addEventListener("beforeunload", L));
|
|
169
169
|
const n = S.value[o.value];
|
|
170
170
|
if (n) {
|
|
171
171
|
let p = "";
|
|
172
172
|
s.bulk ? p = `bulkscan-${o.value.toLowerCase()}` : p = `scan-${o.value.toLowerCase()}`, window.scannerWorker.onmessage = async ({ data: i }) => {
|
|
173
|
-
var
|
|
173
|
+
var _;
|
|
174
174
|
if (i.status === "scan_started")
|
|
175
175
|
t || (H.value++, setTimeout(() => {
|
|
176
176
|
c.add({
|
|
@@ -187,13 +187,13 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
187
187
|
if (d) {
|
|
188
188
|
if (["scan-rfid", "scan-qr"].includes(p)) {
|
|
189
189
|
y.value = !!s.scanValidation;
|
|
190
|
-
const
|
|
190
|
+
const $ = await ((_ = s.scanValidation) == null ? void 0 : _.call(
|
|
191
191
|
s,
|
|
192
192
|
o.value,
|
|
193
193
|
d,
|
|
194
194
|
x()
|
|
195
195
|
)) ?? !0;
|
|
196
|
-
if (y.value = !1,
|
|
196
|
+
if (y.value = !1, $)
|
|
197
197
|
s.autoSwitch ? (K(), fe()) : h(!0);
|
|
198
198
|
else {
|
|
199
199
|
V.value || Q(!1, !0);
|
|
@@ -206,8 +206,8 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
206
206
|
tag: d,
|
|
207
207
|
serialNumber: x()
|
|
208
208
|
});
|
|
209
|
-
} catch (
|
|
210
|
-
console.error(
|
|
209
|
+
} catch ($) {
|
|
210
|
+
console.error($);
|
|
211
211
|
}
|
|
212
212
|
r("update:modelValue", d), r("scan", d, x()), s.bulk && P.push(d);
|
|
213
213
|
}
|
|
@@ -216,7 +216,7 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
216
216
|
}, window.scannerWorker.onerror = Z, window.scannerWorker.postMessage({
|
|
217
217
|
command: "scan",
|
|
218
218
|
scanCommand: p,
|
|
219
|
-
userId: (
|
|
219
|
+
userId: (R = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : R._id,
|
|
220
220
|
source: "app",
|
|
221
221
|
jenisDevice: n.jenisDevice,
|
|
222
222
|
serialNumber: n.serialNumber,
|
|
@@ -308,7 +308,8 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
308
308
|
"[&_i]:w-2 [&_i]:h-2": e.type === "QR",
|
|
309
309
|
"[&_i]:w-[11px] [&_i]:h-[7px]": e.type === "RFID"
|
|
310
310
|
},
|
|
311
|
-
"!px-1.5"
|
|
311
|
+
"!px-1.5",
|
|
312
|
+
s.class || e.$attrs.class
|
|
312
313
|
],
|
|
313
314
|
disabled: s.disabled,
|
|
314
315
|
icon: be.value,
|
|
@@ -352,35 +353,35 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
352
353
|
}, [
|
|
353
354
|
n.detail === "scanning" ? (u(), D(F, { key: 0 }, [
|
|
354
355
|
C("section", Le, [
|
|
355
|
-
b(
|
|
356
|
+
b(A, {
|
|
356
357
|
class: "animate-spin text-base",
|
|
357
358
|
icon: "loader-4"
|
|
358
359
|
}),
|
|
359
360
|
C("span", We, [
|
|
360
361
|
o.value === "RFID" ? (u(), D(F, { key: 0 }, [
|
|
361
|
-
b(
|
|
362
|
+
b(A, {
|
|
362
363
|
class: "text-base !w-4 !h-4",
|
|
363
364
|
icon: "rfid"
|
|
364
365
|
}),
|
|
365
|
-
se(" " +
|
|
366
|
+
se(" " + j(y.value ? "Validating RFID..." : "RFID Scanning..."), 1)
|
|
366
367
|
], 64)) : (u(), D(F, { key: 1 }, [
|
|
367
|
-
b(
|
|
368
|
+
b(A, {
|
|
368
369
|
class: "text-sm",
|
|
369
370
|
icon: "qr"
|
|
370
371
|
}),
|
|
371
|
-
se(" " +
|
|
372
|
+
se(" " + j(y.value ? "Validating QR..." : "QR Scanning..."), 1)
|
|
372
373
|
], 64))
|
|
373
374
|
])
|
|
374
375
|
]),
|
|
375
376
|
C("section", Fe, [
|
|
376
377
|
t[4] || (t[4] = C("span", null, "do not leave this page", -1)),
|
|
377
378
|
b(ne, {
|
|
378
|
-
onClick: t[1] || (t[1] = (
|
|
379
|
+
onClick: t[1] || (t[1] = (R) => I(!0)),
|
|
379
380
|
label: "Stop Scan",
|
|
380
381
|
severity: "danger"
|
|
381
382
|
})
|
|
382
383
|
])
|
|
383
|
-
], 64)) : (u(), D("span", Me,
|
|
384
|
+
], 64)) : (u(), D("span", Me, j(n.detail), 1))
|
|
384
385
|
], 2)
|
|
385
386
|
]),
|
|
386
387
|
_: 1
|
package/datatable/index.d.ts
CHANGED
|
@@ -733,6 +733,13 @@ export type TreeTableEmits = BaseDataTableEmits & {
|
|
|
733
733
|
|
|
734
734
|
export type DataTableEmits = TreeTableEmits;
|
|
735
735
|
|
|
736
|
+
export type DataTableSlots = {
|
|
737
|
+
/**
|
|
738
|
+
* Slot for rendering sub content below a table row.
|
|
739
|
+
*/
|
|
740
|
+
'row-subcontent': (props: { item: Data }) => any;
|
|
741
|
+
};
|
|
742
|
+
|
|
736
743
|
/**
|
|
737
744
|
* **WangsVue - DataTable**
|
|
738
745
|
*
|
|
@@ -746,7 +753,7 @@ export type DataTableEmits = TreeTableEmits;
|
|
|
746
753
|
*/
|
|
747
754
|
declare class DataTable extends ClassComponent<
|
|
748
755
|
DataTableProps,
|
|
749
|
-
|
|
756
|
+
DataTableSlots,
|
|
750
757
|
DataTableEmits
|
|
751
758
|
> {}
|
|
752
759
|
|