@feedmepos/mf-transaction 0.0.43 → 0.0.44
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/{App-CcCJ3z9B.js → App-GiXgz4_b.js} +1 -1
- package/dist/{Receipt-DE1_RbrX.js → Receipt-Bfl-9Uwa.js} +8452 -8360
- package/dist/{app-Llc8NB1Q.js → app-BY2n-TE8.js} +61 -41
- package/dist/app.js +1 -1
- package/dist/apps/mf-transaction/src/app.d.ts +20 -0
- package/dist/apps/mf-transaction/src/helpers/canvas.d.ts +11 -0
- package/dist/apps/mf-transaction/src/views/receipt/receipt.d.ts +1 -1
- package/dist/apps/mf-transaction/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{config-lJqN3yej.js → config-orKIAxd-.js} +3738 -3710
- package/dist/{index.es-M4w1ilKE.js → index.es-CSew1qc9.js} +3 -3
- package/dist/packages/shared/src/composable/search.d.ts +5 -0
- package/package.json +6 -5
- package/dist/apps/mf-transaction/src/components/RestaurantSelector.vue.d.ts +0 -6
- package/dist/packages/shared/src/components/form/RestaurantSelector.vue.d.ts +0 -37
- package/dist/packages/shared/src/components/form/RestaurantSelectorMultiple.vue.d.ts +0 -22
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { ref as d, watch as
|
|
2
|
-
import { useBreakpoints as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
1
|
+
import { ref as d, watch as c, nextTick as l, onMounted as v, onBeforeUnmount as h, defineComponent as f, computed as P, createElementBlock as x, openBlock as m, normalizeStyle as y, renderSlot as b, resolveComponent as g, createBlock as w, withCtx as I, createElementVNode as F, createVNode as D, defineAsyncComponent as _ } from "vue";
|
|
2
|
+
import { useBreakpoints as E } from "@feedmepos/ui-library";
|
|
3
|
+
function R(e, i) {
|
|
4
|
+
const o = d({ top: 0, bottom: 0, left: 0, right: 0 });
|
|
5
5
|
function t() {
|
|
6
6
|
if (e.value) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
top:
|
|
10
|
-
bottom:
|
|
11
|
-
left:
|
|
12
|
-
right:
|
|
7
|
+
const r = e.value.getBoundingClientRect();
|
|
8
|
+
o.value = {
|
|
9
|
+
top: r.top,
|
|
10
|
+
bottom: r.bottom,
|
|
11
|
+
left: r.left,
|
|
12
|
+
right: r.right
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
return
|
|
16
|
+
return c(i, async () => {
|
|
17
17
|
await l(), t();
|
|
18
|
-
}),
|
|
19
|
-
|
|
18
|
+
}), c(e, async (r) => {
|
|
19
|
+
r && (await l(), t());
|
|
20
20
|
}), v(() => {
|
|
21
21
|
window.addEventListener("resize", t);
|
|
22
22
|
}), h(() => {
|
|
23
23
|
window.removeEventListener("resize", t);
|
|
24
|
-
}),
|
|
24
|
+
}), o;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const S = /* @__PURE__ */ f({
|
|
27
27
|
__name: "FullWrapper",
|
|
28
28
|
setup(e) {
|
|
29
|
-
const i =
|
|
30
|
-
var
|
|
31
|
-
const
|
|
29
|
+
const i = E(), o = d(null), t = R(o), r = P(() => {
|
|
30
|
+
var a;
|
|
31
|
+
const n = i.isAtMost("sm") ? 56 : 0;
|
|
32
32
|
return {
|
|
33
|
-
height: `calc(100dvh - ${((
|
|
33
|
+
height: `calc(100dvh - ${((a = t.value) == null ? void 0 : a.top) + 24 + n}px)`
|
|
34
34
|
};
|
|
35
35
|
});
|
|
36
|
-
return (
|
|
36
|
+
return (s, n) => (m(), x("div", {
|
|
37
37
|
ref_key: "wrapper",
|
|
38
|
-
ref:
|
|
39
|
-
style: y(
|
|
38
|
+
ref: o,
|
|
39
|
+
style: y(r.value)
|
|
40
40
|
}, [
|
|
41
|
-
|
|
41
|
+
b(s.$slots, "default")
|
|
42
42
|
], 4));
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), C = { class: "flex justify-center items-center h-full w-full" }, N = /* @__PURE__ */ f({
|
|
45
45
|
__name: "PageLoading",
|
|
46
46
|
setup(e) {
|
|
47
|
-
return (i,
|
|
48
|
-
const t =
|
|
49
|
-
return
|
|
50
|
-
default:
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
return (i, o) => {
|
|
48
|
+
const t = g("FmCircularProgress");
|
|
49
|
+
return m(), w(S, null, {
|
|
50
|
+
default: I(() => [
|
|
51
|
+
F("div", C, [
|
|
52
|
+
D(t, { size: "xl" })
|
|
53
53
|
])
|
|
54
54
|
]),
|
|
55
55
|
_: 1
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
}), u = (e) =>
|
|
59
|
+
}), u = (e) => _({
|
|
60
60
|
loader: e,
|
|
61
|
-
loadingComponent:
|
|
61
|
+
loadingComponent: N
|
|
62
62
|
}), z = {
|
|
63
63
|
title: "Transaction",
|
|
64
64
|
receipt: {
|
|
@@ -72,7 +72,12 @@ const F = /* @__PURE__ */ m({
|
|
|
72
72
|
excel: "Export as Excel",
|
|
73
73
|
noReceipts: "No receipts to export",
|
|
74
74
|
success: "Receipts exported",
|
|
75
|
-
export: "Export"
|
|
75
|
+
export: "Export",
|
|
76
|
+
starting: "Starting export of {count} receipts...",
|
|
77
|
+
progress: "Processing receipts {progress}",
|
|
78
|
+
pdfSuccess: "PDF exported successfully! Downloading {filename}.pdf",
|
|
79
|
+
pdfFailed: "Export failed: {error}",
|
|
80
|
+
defaultError: "Failed to export PDF"
|
|
76
81
|
},
|
|
77
82
|
columns: {
|
|
78
83
|
receipt: "Receipt",
|
|
@@ -133,7 +138,12 @@ const F = /* @__PURE__ */ m({
|
|
|
133
138
|
excel: "ส่งออกเป็น Excel",
|
|
134
139
|
noReceipts: "ไม่มีใบเสร็จที่จะส่งออก",
|
|
135
140
|
success: "ส่งออกใบเสร็จ",
|
|
136
|
-
export: "ส่งออก"
|
|
141
|
+
export: "ส่งออก",
|
|
142
|
+
starting: "เริ่มต้นส่งออกใบเสร็จ {count} ใบ...",
|
|
143
|
+
progress: "กำลังประมวลผลใบเสร็จ {progress}",
|
|
144
|
+
pdfSuccess: "ส่งออก PDF สำเร็จ! กำลังดาวน์โหลด {filename}.pdf",
|
|
145
|
+
pdfFailed: "การส่งออกล้มเหลว: {error}",
|
|
146
|
+
defaultError: "ส่งออก PDF ล้มเหลว"
|
|
137
147
|
},
|
|
138
148
|
columns: {
|
|
139
149
|
receipt: "ใบเสร็จ",
|
|
@@ -193,7 +203,12 @@ const F = /* @__PURE__ */ m({
|
|
|
193
203
|
excel: "导出为 Excel",
|
|
194
204
|
noReceipts: "没有收据可导出",
|
|
195
205
|
success: "收据已导出",
|
|
196
|
-
export: "导出"
|
|
206
|
+
export: "导出",
|
|
207
|
+
starting: "开始导出 {count} 张收据...",
|
|
208
|
+
progress: "正在处理收据 {progress}",
|
|
209
|
+
pdfSuccess: "PDF 导出成功!正在下载 {filename}.pdf",
|
|
210
|
+
pdfFailed: "导出失败:{error}",
|
|
211
|
+
defaultError: "导出 PDF 失败"
|
|
197
212
|
},
|
|
198
213
|
columns: {
|
|
199
214
|
receipt: "收据",
|
|
@@ -232,7 +247,7 @@ const F = /* @__PURE__ */ m({
|
|
|
232
247
|
invoiceNo: "发票号",
|
|
233
248
|
date: "日期",
|
|
234
249
|
cashier: "收银员",
|
|
235
|
-
tablePax: "
|
|
250
|
+
tablePax: "人数",
|
|
236
251
|
total: "总计"
|
|
237
252
|
},
|
|
238
253
|
preview: {
|
|
@@ -254,7 +269,12 @@ const F = /* @__PURE__ */ m({
|
|
|
254
269
|
excel: "導出為 Excel",
|
|
255
270
|
noReceipts: "沒有收據可導出",
|
|
256
271
|
success: "收據已導出",
|
|
257
|
-
export: "導出"
|
|
272
|
+
export: "導出",
|
|
273
|
+
starting: "開始導出 {count} 張收據...",
|
|
274
|
+
progress: "正在處理收據 {progress}",
|
|
275
|
+
pdfSuccess: "PDF 導出成功!正在下載 {filename}.pdf",
|
|
276
|
+
pdfFailed: "導出失敗:{error}",
|
|
277
|
+
defaultError: "導出 PDF 失敗"
|
|
258
278
|
},
|
|
259
279
|
columns: {
|
|
260
280
|
receipt: "收據",
|
|
@@ -293,7 +313,7 @@ const F = /* @__PURE__ */ m({
|
|
|
293
313
|
invoiceNo: "發票號",
|
|
294
314
|
date: "日期",
|
|
295
315
|
cashier: "收銀員",
|
|
296
|
-
tablePax: "
|
|
316
|
+
tablePax: "人數",
|
|
297
317
|
total: "總計"
|
|
298
318
|
},
|
|
299
319
|
preview: {
|
|
@@ -310,17 +330,17 @@ const F = /* @__PURE__ */ m({
|
|
|
310
330
|
{
|
|
311
331
|
path: "/receipt",
|
|
312
332
|
name: p,
|
|
313
|
-
component: u(() => import("./Receipt-
|
|
333
|
+
component: u(() => import("./Receipt-Bfl-9Uwa.js").then((e) => e.R))
|
|
314
334
|
}
|
|
315
335
|
], U = {
|
|
316
336
|
"en-US": k,
|
|
317
337
|
"zh-CN": $,
|
|
318
338
|
"th-TH": A,
|
|
319
339
|
"zh-Hant": O
|
|
320
|
-
}, V = u(() => import("./App-
|
|
340
|
+
}, V = u(() => import("./App-GiXgz4_b.js"));
|
|
321
341
|
export {
|
|
322
342
|
V as F,
|
|
323
|
-
|
|
343
|
+
S as _,
|
|
324
344
|
U as i,
|
|
325
345
|
L as r
|
|
326
346
|
};
|
package/dist/app.js
CHANGED
|
@@ -16,6 +16,11 @@ export declare const i18nMessages: {
|
|
|
16
16
|
noReceipts: string;
|
|
17
17
|
success: string;
|
|
18
18
|
export: string;
|
|
19
|
+
starting: string;
|
|
20
|
+
progress: string;
|
|
21
|
+
pdfSuccess: string;
|
|
22
|
+
pdfFailed: string;
|
|
23
|
+
defaultError: string;
|
|
19
24
|
};
|
|
20
25
|
columns: {
|
|
21
26
|
receipt: string;
|
|
@@ -78,6 +83,11 @@ export declare const i18nMessages: {
|
|
|
78
83
|
noReceipts: string;
|
|
79
84
|
success: string;
|
|
80
85
|
export: string;
|
|
86
|
+
starting: string;
|
|
87
|
+
progress: string;
|
|
88
|
+
pdfSuccess: string;
|
|
89
|
+
pdfFailed: string;
|
|
90
|
+
defaultError: string;
|
|
81
91
|
};
|
|
82
92
|
columns: {
|
|
83
93
|
receipt: string;
|
|
@@ -140,6 +150,11 @@ export declare const i18nMessages: {
|
|
|
140
150
|
noReceipts: string;
|
|
141
151
|
success: string;
|
|
142
152
|
export: string;
|
|
153
|
+
starting: string;
|
|
154
|
+
progress: string;
|
|
155
|
+
pdfSuccess: string;
|
|
156
|
+
pdfFailed: string;
|
|
157
|
+
defaultError: string;
|
|
143
158
|
};
|
|
144
159
|
columns: {
|
|
145
160
|
receipt: string;
|
|
@@ -201,6 +216,11 @@ export declare const i18nMessages: {
|
|
|
201
216
|
noReceipts: string;
|
|
202
217
|
success: string;
|
|
203
218
|
export: string;
|
|
219
|
+
starting: string;
|
|
220
|
+
progress: string;
|
|
221
|
+
pdfSuccess: string;
|
|
222
|
+
pdfFailed: string;
|
|
223
|
+
defaultError: string;
|
|
204
224
|
};
|
|
205
225
|
columns: {
|
|
206
226
|
receipt: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CompressionOptions {
|
|
2
|
+
quality?: number;
|
|
3
|
+
format?: "jpeg" | "png";
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Compress canvas image to reduce file size
|
|
7
|
+
* @param originalCanvas - The original canvas element
|
|
8
|
+
* @param options - Compression options
|
|
9
|
+
* @returns Compressed image data URL
|
|
10
|
+
*/
|
|
11
|
+
export declare function compressCanvas(originalCanvas: HTMLCanvasElement, options?: CompressionOptions): string;
|
|
@@ -95,7 +95,7 @@ export declare function transformPickup({ pickup }: BillVariable): {
|
|
|
95
95
|
}[];
|
|
96
96
|
export declare const RECEIPT_PREVIEW_WIDTH = "370px";
|
|
97
97
|
export declare const RECEIPT_PREVIEW_HEIGHT = "90dvh";
|
|
98
|
-
export declare function exportPDF(receipts: Receipt[], filename: string): Promise<void>;
|
|
98
|
+
export declare function exportPDF(receipts: Receipt[], filename: string, onProgress?: (current: number, total: number) => void): Promise<void>;
|
|
99
99
|
export declare function previewPDF(receipts: Receipt[]): Promise<void>;
|
|
100
100
|
interface GroupItem {
|
|
101
101
|
name: string;
|