@feedmepos/mf-transaction 0.0.35 → 0.0.37

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.
@@ -1,6 +1,6 @@
1
- import { ref as d, watch as s, nextTick as l, onMounted as h, onBeforeUnmount as v, defineComponent as m, computed as x, openBlock as f, createElementBlock as y, normalizeStyle as b, renderSlot as I, resolveComponent as P, createBlock as _, withCtx as w, createElementVNode as R, createVNode as g, defineAsyncComponent as C } from "vue";
1
+ import { ref as d, watch as s, nextTick as l, onMounted as v, onBeforeUnmount as h, defineComponent as m, computed as x, openBlock as f, createElementBlock as y, normalizeStyle as b, renderSlot as P, resolveComponent as w, createBlock as I, withCtx as _, createElementVNode as R, createVNode as g, defineAsyncComponent as C } from "vue";
2
2
  import { useBreakpoints as E } from "@feedmepos/ui-library";
3
- function D(e, n) {
3
+ function D(e, i) {
4
4
  const r = d({ top: 0, bottom: 0, left: 0, right: 0 });
5
5
  function t() {
6
6
  if (e.value) {
@@ -13,42 +13,42 @@ function D(e, n) {
13
13
  };
14
14
  }
15
15
  }
16
- return s(n, async () => {
16
+ return s(i, async () => {
17
17
  await l(), t();
18
18
  }), s(e, async (o) => {
19
19
  o && (await l(), t());
20
- }), h(() => {
21
- window.addEventListener("resize", t);
22
20
  }), v(() => {
21
+ window.addEventListener("resize", t);
22
+ }), h(() => {
23
23
  window.removeEventListener("resize", t);
24
24
  }), r;
25
25
  }
26
- const N = /* @__PURE__ */ m({
26
+ const F = /* @__PURE__ */ m({
27
27
  __name: "FullWrapper",
28
28
  setup(e) {
29
- const n = E(), r = d(null), t = D(r), o = x(() => {
29
+ const i = E(), r = d(null), t = D(r), o = x(() => {
30
30
  var c;
31
- const a = n.isAtMost("sm") ? 56 : 0;
31
+ const a = i.isAtMost("sm") ? 56 : 0;
32
32
  return {
33
33
  height: `calc(100dvh - ${((c = t.value) == null ? void 0 : c.top) + 24 + a}px)`
34
34
  };
35
35
  });
36
- return (i, a) => (f(), y("div", {
36
+ return (n, a) => (f(), y("div", {
37
37
  ref_key: "wrapper",
38
38
  ref: r,
39
39
  style: b(o.value)
40
40
  }, [
41
- I(i.$slots, "default")
41
+ P(n.$slots, "default")
42
42
  ], 4));
43
43
  }
44
- }), k = { class: "flex justify-center items-center h-full w-full" }, F = /* @__PURE__ */ m({
44
+ }), N = { class: "flex justify-center items-center h-full w-full" }, S = /* @__PURE__ */ m({
45
45
  __name: "PageLoading",
46
46
  setup(e) {
47
- return (n, r) => {
48
- const t = P("FmCircularProgress");
49
- return f(), _(N, null, {
50
- default: w(() => [
51
- R("div", k, [
47
+ return (i, r) => {
48
+ const t = w("FmCircularProgress");
49
+ return f(), I(F, null, {
50
+ default: _(() => [
51
+ R("div", N, [
52
52
  g(t, { size: "xl" })
53
53
  ])
54
54
  ]),
@@ -58,8 +58,8 @@ const N = /* @__PURE__ */ m({
58
58
  }
59
59
  }), u = (e) => C({
60
60
  loader: e,
61
- loadingComponent: F
62
- }), T = {
61
+ loadingComponent: S
62
+ }), k = {
63
63
  title: "Transaction",
64
64
  receipt: {
65
65
  title: "Receipt",
@@ -113,11 +113,14 @@ const N = /* @__PURE__ */ m({
113
113
  cashier: "Cashier",
114
114
  tablePax: "Table pax",
115
115
  total: "Total"
116
+ },
117
+ preview: {
118
+ fullSizePreview: "Full size preview"
116
119
  }
117
120
  }
118
- }, S = {
119
- transaction: T
120
- }, A = {
121
+ }, z = {
122
+ transaction: k
123
+ }, T = {
121
124
  title: "ธุรกรรม",
122
125
  receipt: {
123
126
  title: "ใบเสร็จ",
@@ -170,11 +173,14 @@ const N = /* @__PURE__ */ m({
170
173
  cashier: "แคชเชียร์",
171
174
  tablePax: "จำนวนลูกค้าที่โต๊ะ",
172
175
  total: "รวม"
176
+ },
177
+ preview: {
178
+ fullSizePreview: "ตรวจสอบขนาดเต็ม"
173
179
  }
174
180
  }
181
+ }, A = {
182
+ transaction: T
175
183
  }, M = {
176
- transaction: A
177
- }, z = {
178
184
  title: "交易",
179
185
  receipt: {
180
186
  title: "收据",
@@ -228,10 +234,13 @@ const N = /* @__PURE__ */ m({
228
234
  cashier: "收银员",
229
235
  tablePax: "桌号",
230
236
  total: "总计"
237
+ },
238
+ preview: {
239
+ fullSizePreview: "全屏预览"
231
240
  }
232
241
  }
233
242
  }, B = {
234
- transaction: z
243
+ transaction: M
235
244
  }, p = "$transaction-receipt", L = [
236
245
  {
237
246
  path: "/",
@@ -240,16 +249,16 @@ const N = /* @__PURE__ */ m({
240
249
  {
241
250
  path: "/receipt",
242
251
  name: p,
243
- component: u(() => import("./Receipt-DE1YQw37.js").then((e) => e.R))
252
+ component: u(() => import("./Receipt-Cr_tx5zG.js").then((e) => e.R))
244
253
  }
245
254
  ], q = {
246
- "en-US": S,
255
+ "en-US": z,
247
256
  "zh-CN": B,
248
- "th-TH": M
249
- }, U = u(() => import("./App-BIq3mTUc.js"));
257
+ "th-TH": A
258
+ }, U = u(() => import("./App-NDNrnaMe.js"));
250
259
  export {
251
260
  U as F,
252
- N as _,
261
+ F as _,
253
262
  q as i,
254
263
  L as r
255
264
  };
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as a, i as e, r as o } from "./app-CcGprZne.js";
1
+ import { F as a, i as e, r as o } from "./app-DhU-9yYw.js";
2
2
  export {
3
3
  a as FmApp,
4
4
  e as i18nMessages,
@@ -57,6 +57,9 @@ export declare const i18nMessages: {
57
57
  tablePax: string;
58
58
  total: string;
59
59
  };
60
+ preview: {
61
+ fullSizePreview: string;
62
+ };
60
63
  };
61
64
  };
62
65
  };
@@ -116,6 +119,9 @@ export declare const i18nMessages: {
116
119
  tablePax: string;
117
120
  total: string;
118
121
  };
122
+ preview: {
123
+ fullSizePreview: string;
124
+ };
119
125
  };
120
126
  };
121
127
  };
@@ -174,6 +180,9 @@ export declare const i18nMessages: {
174
180
  tablePax: string;
175
181
  total: string;
176
182
  };
183
+ preview: {
184
+ fullSizePreview: string;
185
+ };
177
186
  };
178
187
  };
179
188
  };
@@ -1,4 +1,4 @@
1
- import { PropType } from "vue";
1
+ import { type PropType } from "vue";
2
2
  import { type Receipt } from "@/views/receipt/receipt";
3
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  receipt: {
@@ -93,7 +93,10 @@ export declare function transformPickup({ pickup }: BillVariable): {
93
93
  name: string;
94
94
  value: string;
95
95
  }[];
96
+ export declare const RECEIPT_PREVIEW_WIDTH = "370px";
97
+ export declare const RECEIPT_PREVIEW_HEIGHT = "90dvh";
96
98
  export declare function exportPDF(receipts: Receipt[], filename: string): Promise<void>;
99
+ export declare function previewPDF(receipts: Receipt[]): Promise<void>;
97
100
  interface GroupItem {
98
101
  name: string;
99
102
  quantity: number;