tsv2-library 1.0.61-alpha.52 → 1.0.61-alpha.54
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/dist/tsv2-library.es.js +28 -29
- package/dist/tsv2-library.umd.js +2 -2
- package/package.json +1 -1
package/dist/tsv2-library.es.js
CHANGED
|
@@ -19187,17 +19187,13 @@ function generateXlsxFile(data30, _ref2) {
|
|
|
19187
19187
|
const prepareRows = (headers, data30) => {
|
|
19188
19188
|
const rows3 = [];
|
|
19189
19189
|
const isObjectArray = Array.isArray(data30) && data30.length > 0 && !Array.isArray(data30[0]);
|
|
19190
|
-
console.log("👽 isObjectArray:", isObjectArray);
|
|
19191
19190
|
if (isObjectArray) {
|
|
19192
|
-
console.log("👽👽");
|
|
19193
19191
|
if (headers) {
|
|
19194
19192
|
rows3.push(headers.map((h2) => ({ value: h2 })));
|
|
19195
19193
|
}
|
|
19196
19194
|
if (data30.length > 0) {
|
|
19197
|
-
console.log("👽👽 masuk if");
|
|
19198
19195
|
const keys2 = Object.keys(data30[0]);
|
|
19199
19196
|
data30.forEach((row2) => {
|
|
19200
|
-
console.log("👽👽 foreach", row2);
|
|
19201
19197
|
rows3.push(
|
|
19202
19198
|
keys2.map((key) => ({
|
|
19203
19199
|
value: row2[key] ?? "-"
|
|
@@ -19206,9 +19202,7 @@ const prepareRows = (headers, data30) => {
|
|
|
19206
19202
|
);
|
|
19207
19203
|
});
|
|
19208
19204
|
}
|
|
19209
|
-
console.log("👽👽", rows3);
|
|
19210
19205
|
} else if (Array.isArray(data30) && Array.isArray(data30[0])) {
|
|
19211
|
-
console.log("👽👽👽");
|
|
19212
19206
|
const arrayData = data30;
|
|
19213
19207
|
if (headers) {
|
|
19214
19208
|
rows3.push(headers.map((h2) => ({ value: h2 })));
|
|
@@ -19220,7 +19214,6 @@ const prepareRows = (headers, data30) => {
|
|
|
19220
19214
|
rows3.push(row2.map((cell) => ({ value: cell })));
|
|
19221
19215
|
}
|
|
19222
19216
|
});
|
|
19223
|
-
console.log("👽👽👽", rows3);
|
|
19224
19217
|
}
|
|
19225
19218
|
return rows3;
|
|
19226
19219
|
};
|
|
@@ -28216,11 +28209,11 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
28216
28209
|
return openBlock(), createBlock(unref(_sfc_main$1k), {
|
|
28217
28210
|
visible: visible4.value,
|
|
28218
28211
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible4.value = $event),
|
|
28219
|
-
header: "Approval List",
|
|
28220
28212
|
class: "w-[400px]",
|
|
28221
28213
|
closable: "",
|
|
28222
28214
|
"data-ts-name": "dialog-approval-list",
|
|
28223
28215
|
"data-ts-section": "root",
|
|
28216
|
+
header: "Approval List",
|
|
28224
28217
|
modal: ""
|
|
28225
28218
|
}, {
|
|
28226
28219
|
default: withCtx(() => [
|
|
@@ -36071,7 +36064,7 @@ const DeviceIOTServices = {
|
|
|
36071
36064
|
}).get("/reader");
|
|
36072
36065
|
}
|
|
36073
36066
|
};
|
|
36074
|
-
const encodedJs = "
|
|
36067
|
+
const encodedJs = "IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBlLHMsbz1udWxsLG49bnVsbCxhPSIiO3NlbGYub25tZXNzYWdlPWU9Pntjb25zdCBvPWUuZGF0YTtzd2l0Y2gocz1vLmNvbXBhbnlDb2RlLG8uY29tbWFuZCl7Y2FzZSJzeW5jIjpkKG8pO2JyZWFrO2Nhc2UiY29ubmVjdCI6aShvKTticmVhaztjYXNlInNjYW4iOnUobyk7YnJlYWs7Y2FzZSJzdG9wc2NhbiI6cChvKX19O2NvbnN0IHI9ZT0+e2xldCBzPSJlc3RhYmxpc2hlZCI7byYmby5yZWFkeVN0YXRlPT09V2ViU29ja2V0Lk9QRU4/KHM9InJldXNlZCIsZS5vbm9wZW4obyxzKSxjKGUudGltZW91dCkpOm89bmV3IFdlYlNvY2tldCgid3NzOi8vZGV2LWFwaS50YWdzYW11cmFpLmNv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c3RyaW5naWZ5KHtkYXRhOntjb21tYW5kOiJzdG9wc2NhbiIsdXNlcklkOmUsc291cmNlOiJhcHAiLHNlc3Npb25JZDphLGNvbXBhbnlDb2RlOnN9LGV2ZW50OiJyZWFkZXIifSkpLHBvc3RNZXNzYWdlKHtzdGF0dXM6InNjYW5fc3RvcHBlZCJ9KSxjb25zb2xlLmluZm8oIlNjYW4gUHJvY2VzcyBTdG9wcGVkISIpKX19KCk7Cg==";
|
|
36075
36068
|
const blob = typeof window !== "undefined" && window.Blob && new Blob([atob(encodedJs)], { type: "text/javascript;charset=utf-8" });
|
|
36076
36069
|
function WorkerWrapper() {
|
|
36077
36070
|
let objURL;
|
|
@@ -36265,7 +36258,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
36265
36258
|
emit("scan");
|
|
36266
36259
|
};
|
|
36267
36260
|
const synchronize = () => {
|
|
36268
|
-
var _a;
|
|
36261
|
+
var _a, _b;
|
|
36269
36262
|
isSynchronizing.value = true;
|
|
36270
36263
|
errorMessage.value = void 0;
|
|
36271
36264
|
window.scannerWorker.onmessage = ({ data: data30 }) => {
|
|
@@ -36289,7 +36282,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
36289
36282
|
};
|
|
36290
36283
|
window.scannerWorker.postMessage({
|
|
36291
36284
|
command: "sync",
|
|
36292
|
-
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id
|
|
36285
|
+
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id,
|
|
36286
|
+
companyCode: (_b = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _b.companyCode
|
|
36293
36287
|
});
|
|
36294
36288
|
};
|
|
36295
36289
|
const setupWorker = () => {
|
|
@@ -36642,7 +36636,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
36642
36636
|
}
|
|
36643
36637
|
};
|
|
36644
36638
|
const connect = async () => {
|
|
36645
|
-
var _a;
|
|
36639
|
+
var _a, _b;
|
|
36646
36640
|
try {
|
|
36647
36641
|
if (!isWindows()) {
|
|
36648
36642
|
throw new Error("NOT_SUPPORTED_SYSTEM");
|
|
@@ -36697,14 +36691,15 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
36697
36691
|
};
|
|
36698
36692
|
window.scannerWorker.postMessage({
|
|
36699
36693
|
command: "connect",
|
|
36700
|
-
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id
|
|
36694
|
+
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id,
|
|
36695
|
+
companyCode: (_b = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _b.companyCode
|
|
36701
36696
|
});
|
|
36702
36697
|
} catch (error) {
|
|
36703
36698
|
handleConnectError(error);
|
|
36704
36699
|
}
|
|
36705
36700
|
};
|
|
36706
36701
|
const scan = (newConnection = false, reScan = false) => {
|
|
36707
|
-
var _a;
|
|
36702
|
+
var _a, _b;
|
|
36708
36703
|
scanStopped.value = false;
|
|
36709
36704
|
toast2.removeGroup(toastConnectingGroup.value);
|
|
36710
36705
|
if (!localStorage.devmode) {
|
|
@@ -36781,6 +36776,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
36781
36776
|
command: "scan",
|
|
36782
36777
|
scanCommand,
|
|
36783
36778
|
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id,
|
|
36779
|
+
companyCode: (_b = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _b.companyCode,
|
|
36784
36780
|
source: "app",
|
|
36785
36781
|
jenisDevice: scanDevice.jenisDevice,
|
|
36786
36782
|
serialNumber: scanDevice.serialNumber,
|
|
@@ -36887,11 +36883,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
36887
36883
|
bulkScannedCode.splice(0);
|
|
36888
36884
|
};
|
|
36889
36885
|
const stopScan = (afterScan = false) => {
|
|
36890
|
-
var _a;
|
|
36886
|
+
var _a, _b;
|
|
36891
36887
|
window.scannerWorker.onmessage = null;
|
|
36892
36888
|
window.scannerWorker.postMessage({
|
|
36893
36889
|
command: "stopscan",
|
|
36894
|
-
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id
|
|
36890
|
+
userId: (_a = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _a._id,
|
|
36891
|
+
companyCode: (_b = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : _b.companyCode
|
|
36895
36892
|
});
|
|
36896
36893
|
handleScanStopped(afterScan);
|
|
36897
36894
|
scanStopped.value = true;
|
|
@@ -61627,8 +61624,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
61627
61624
|
ref: inputtext,
|
|
61628
61625
|
class: normalizeClass(unref(Preset$3).inputtext.class),
|
|
61629
61626
|
"model-value": selectedDateText.value,
|
|
61630
|
-
placeholder: "Select date",
|
|
61631
61627
|
onKeydown: onKeydown3,
|
|
61628
|
+
placeholder: "Select date",
|
|
61632
61629
|
readonly: ""
|
|
61633
61630
|
}, null, 8, ["class", "model-value"]),
|
|
61634
61631
|
createVNode(_sfc_main$1n, {
|
|
@@ -66409,14 +66406,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
66409
66406
|
key: 0,
|
|
66410
66407
|
modelValue: noteInput.value,
|
|
66411
66408
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => noteInput.value = $event),
|
|
66412
|
-
placeholder: "Enter note",
|
|
66413
66409
|
rows: 1,
|
|
66414
66410
|
"textarea-pt": {
|
|
66415
66411
|
root: {
|
|
66416
66412
|
maxlength: 30
|
|
66417
66413
|
}
|
|
66418
66414
|
},
|
|
66419
|
-
class: "!max-w-[250px]"
|
|
66415
|
+
class: "!max-w-[250px]",
|
|
66416
|
+
placeholder: "Enter note"
|
|
66420
66417
|
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
66421
66418
|
]),
|
|
66422
66419
|
_: 1
|
|
@@ -66424,11 +66421,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
66424
66421
|
createVNode(unref(_sfc_main$13), {
|
|
66425
66422
|
visible: showRemoveDialog.value,
|
|
66426
66423
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showRemoveDialog.value = $event),
|
|
66424
|
+
lists: selectedData.value,
|
|
66425
|
+
onConfirm: removeFromList,
|
|
66427
66426
|
body: "Are you sure you want to remove it?",
|
|
66428
66427
|
"confirm-label": "Remove",
|
|
66429
66428
|
header: "Remove from List",
|
|
66430
|
-
lists: selectedData.value,
|
|
66431
|
-
onConfirm: removeFromList,
|
|
66432
66429
|
"list-label": "name.nameWithSequence",
|
|
66433
66430
|
severity: "danger"
|
|
66434
66431
|
}, null, 8, ["visible", "lists"])
|
|
@@ -66867,20 +66864,20 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
66867
66864
|
createVNode(unref(_sfc_main$13), {
|
|
66868
66865
|
visible: showRemoveDialog.value,
|
|
66869
66866
|
"onUpdate:visible": _cache[7] || (_cache[7] = ($event) => showRemoveDialog.value = $event),
|
|
66867
|
+
lists: [selectedItem.value],
|
|
66868
|
+
onConfirm: removeFromList,
|
|
66870
66869
|
body: "Are you sure you want to remove it?",
|
|
66871
66870
|
"confirm-label": "Remove",
|
|
66872
66871
|
header: "Remove from List",
|
|
66873
|
-
lists: [selectedItem.value],
|
|
66874
|
-
onConfirm: removeFromList,
|
|
66875
66872
|
"list-label": "name.nameWithSequence",
|
|
66876
66873
|
severity: "danger"
|
|
66877
66874
|
}, null, 8, ["visible", "lists"]),
|
|
66878
66875
|
createVNode(unref(_sfc_main$13), {
|
|
66879
66876
|
visible: showCancelReport.value,
|
|
66880
66877
|
"onUpdate:visible": _cache[8] || (_cache[8] = ($event) => showCancelReport.value = $event),
|
|
66878
|
+
onConfirm: onCancelReport,
|
|
66881
66879
|
"confirm-label": "Continue",
|
|
66882
66880
|
header: "Cancel Report",
|
|
66883
|
-
onConfirm: onCancelReport,
|
|
66884
66881
|
severity: "danger"
|
|
66885
66882
|
}, {
|
|
66886
66883
|
body: withCtx(() => [
|
|
@@ -66891,14 +66888,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
66891
66888
|
}, 8, ["visible"]),
|
|
66892
66889
|
createElementVNode("div", _hoisted_5$4, [
|
|
66893
66890
|
createVNode(unref(_sfc_main$1m), {
|
|
66894
|
-
label: "Cancel",
|
|
66895
66891
|
onClick: _cache[9] || (_cache[9] = ($event) => showCancelReport.value = true),
|
|
66892
|
+
label: "Cancel",
|
|
66896
66893
|
severity: "dark",
|
|
66897
66894
|
text: ""
|
|
66898
66895
|
}),
|
|
66899
66896
|
createVNode(unref(_sfc_main$1m), {
|
|
66900
|
-
label: "Submit",
|
|
66901
66897
|
onClick: submitDiposalReport,
|
|
66898
|
+
label: "Submit",
|
|
66902
66899
|
severity: "success"
|
|
66903
66900
|
})
|
|
66904
66901
|
])
|
|
@@ -73785,9 +73782,11 @@ const printOptions = {
|
|
|
73785
73782
|
const TSi18n = createI18n({
|
|
73786
73783
|
locale: "en",
|
|
73787
73784
|
fallbackLocale: "en",
|
|
73788
|
-
|
|
73789
|
-
|
|
73790
|
-
|
|
73785
|
+
/*
|
|
73786
|
+
* Messages: {
|
|
73787
|
+
* en: localeEN,
|
|
73788
|
+
* },
|
|
73789
|
+
*/
|
|
73791
73790
|
legacy: false
|
|
73792
73791
|
});
|
|
73793
73792
|
const buildEntry = {
|