@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.11

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.
Files changed (86) hide show
  1. package/dist/{Analytic-BVk0jPDU.js → Analytic-Gq7PoNer.js} +32 -20
  2. package/dist/{App-BbAalq1k.js → App-Cikl5jnp.js} +33 -27
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +18 -11
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  7. package/dist/Collections-B1SC1rr7.js +453 -0
  8. package/dist/{Credit-Bc9EzdsC.js → Credit-BgwI8DR3.js} +78 -69
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js +2788 -0
  10. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js +344 -0
  11. package/dist/{Experience-CgKak5ik.js → Experience-C2Q-zqV6.js} +64 -55
  12. package/dist/{Game-QhfKqrN_.js → Game-DU2pZDGk.js} +54 -45
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  14. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  15. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  16. package/dist/MainLayout-B1aJoR95.js +41 -0
  17. package/dist/{Marketing-CSx4N7UJ.js → Marketing-DWiTQp9I.js} +79 -72
  18. package/dist/{Member-CY6WMD8D.js → Member-BEXKBFry.js} +25 -22
  19. package/dist/{MemberList-8iRwm7Sz.js → MemberList-DzMdajIf.js} +321 -307
  20. package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js +432 -0
  22. package/dist/{Mission-BTy1p7lU.js → Mission-KzwRlaA5.js} +50 -40
  23. package/dist/{Point-A6B_ggSy.js → Point-CSKvZXHc.js} +67 -58
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js +1751 -0
  26. package/dist/{Segment-CFVXtyEj.js → Segment-2Q0PonBb.js} +145 -130
  27. package/dist/{Setting-Jmtw-_DV.js → Setting-Df5vVRt4.js} +167 -154
  28. package/dist/{Store-DQypT-7e.js → Store-C0WXCKs6.js} +504 -489
  29. package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-eSSIO0nk.js} +124 -108
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +131 -123
  31. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js +139 -0
  32. package/dist/{Tier-D1jymeLK.js → Tier-v-1FkRU-.js} +144 -125
  33. package/dist/{Title-DN9DIP2k.js → Title-CQ2JWqBW.js} +107 -90
  34. package/dist/{Transaction-BAJvAoU6.js → Transaction-0OouN_6s.js} +2 -2
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
  37. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  38. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  39. package/dist/app-Bd19eW7X.js +5381 -0
  40. package/dist/app-CfS25Z66.js +34797 -0
  41. package/dist/app-wDQR6dpb.js +39 -0
  42. package/dist/app.js +2 -1
  43. package/dist/business-dQh3AEot.js +78 -0
  44. package/dist/campaign-BOl8AgKA.js +96 -0
  45. package/dist/campaign-CpzFl8Vr.js +4 -0
  46. package/dist/collection.fn-B_YsXmrP.js +26 -0
  47. package/dist/dto-B8NfyVPG.js +1169 -0
  48. package/dist/effect-C2jCStXO.js +61 -0
  49. package/dist/{export-DjeNY5Pc.js → export-BtZc3Yzh.js} +19 -16
  50. package/dist/helper-8oGsrM56.js +71 -0
  51. package/dist/index-6FkKY3q0.js +73 -0
  52. package/dist/index-C7oeXRUl.js +95 -0
  53. package/dist/index-CZKYIefW.js +203 -0
  54. package/dist/index-C_0IFnwi.js +2071 -0
  55. package/dist/index-CuvNtC_M.js +61 -0
  56. package/dist/index-DCixRRvz.js +761 -0
  57. package/dist/index-DFgt4-VW.js +38 -0
  58. package/dist/index-DYDhH9bi.js +8832 -0
  59. package/dist/index-Dbd4WA4r.js +61 -0
  60. package/dist/index-Di-kWSmf.js +1737 -0
  61. package/dist/index-Dn0jdj0o.js +28058 -0
  62. package/dist/index-DwKqFNF6.js +3 -0
  63. package/dist/index-HoacsZDk.js +291 -0
  64. package/dist/index-UTQHDUdW.js +94 -0
  65. package/dist/loading-D_AN6p24.js +32697 -0
  66. package/dist/lodash-B5I3zXaY.js +3678 -0
  67. package/dist/membership-Ccrx9R6r.js +221 -0
  68. package/dist/moment-BWErdI6_.js +2578 -0
  69. package/dist/money-waD-f-Zz.js +15 -0
  70. package/dist/number-CwTGGsh9.js +12 -0
  71. package/dist/object-qECH92oz.js +26 -0
  72. package/dist/objectId-dwaoBfJX.js +7 -0
  73. package/dist/rule-DJ07h3Gh.js +1973 -0
  74. package/dist/rule-builder-DJ-acvVD.js +89 -0
  75. package/dist/template-clxvNnbF.js +190 -0
  76. package/dist/usePagination-BeF5K3M7.js +223 -0
  77. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  78. package/dist/xlsx-BB366cdN.js +15491 -0
  79. package/dist/zod-W_PvIofQ.js +90 -0
  80. package/package.json +2 -2
  81. package/dist/Card-B5in1RMa.js +0 -805
  82. package/dist/Collections-CFCZ9YIG.js +0 -4
  83. package/dist/MainLayout-JbHzENFy.js +0 -4
  84. package/dist/app-BpzzygYP.js +0 -87765
  85. package/dist/money-DKGIIplY.js +0 -15
  86. package/dist/number-tPodRxTN.js +0 -12
@@ -1,805 +0,0 @@
1
- import { defineComponent as ee, ref as b, computed as G, watch as he, onMounted as ne, resolveComponent as g, openBlock as _, createBlock as I, unref as n, isRef as Q, withCtx as k, createElementVNode as m, createVNode as d, createElementBlock as x, Fragment as M, renderList as Z, createCommentVNode as O, normalizeClass as Ee, createSlots as ye, h as X, toDisplayString as q, withModifiers as Se } from "vue";
2
- import { i as te, a as ke, a8 as ie, B as Te, t as oe, e as ae, T as Re, o as le, a9 as Ae, aa as Ce, D as de, b as Oe, u as Ie, U as pe, a0 as xe, a2 as Ne, a3 as De, j as Ue, a4 as we } from "./app-BpzzygYP.js";
3
- import { useDialog as He, components as Fe } from "@feedmepos/ui-library";
4
- import { e as Be, C as Pe } from "./export-DjeNY5Pc.js";
5
- const Me = { class: "space-y-16" }, Ve = { class: "gap-16 grid grid-cols-2" }, Ge = { class: "space-y-16" }, Le = {
6
- key: 0,
7
- class: "flex flex-col gap-[16px] w-full"
8
- }, je = { class: "flex flex-col gap-[8px]" }, $e = ["src"], Ke = { class: "flex pt-[24px] gap-[24px]" }, Ye = ["src", "onClick", "alt"], We = { class: "flex items-center gap-8" }, Xe = /* @__PURE__ */ ee({
9
- __name: "CreateCardSheet",
10
- emits: ["success", "export"],
11
- setup(e, { expose: i, emit: N }) {
12
- const { minor: U } = ae, E = te(), R = b(), v = b(!1), c = N, h = b(!1);
13
- function L(l) {
14
- h.value = l, l && (r.value = {
15
- quantity: 1,
16
- code: "",
17
- codeConfig: {
18
- length: 12,
19
- charset: "1234567890",
20
- prefix: "",
21
- suffix: "",
22
- pattern: "####-####-####-####"
23
- }
24
- });
25
- }
26
- const r = b({
27
- quantity: 1,
28
- code: "",
29
- codeConfig: {
30
- length: 12,
31
- charset: "1234567890",
32
- prefix: "",
33
- suffix: "",
34
- pattern: "####-####-####-####"
35
- },
36
- setCardOnBind: !1,
37
- bundle: void 0
38
- }), S = [
39
- {
40
- label: "Bulk number",
41
- value: "bulk",
42
- sublabel: "Bulk generate unique number"
43
- },
44
- {
45
- label: "Custom number",
46
- value: "single",
47
- sublabel: "Enter your own custom number"
48
- }
49
- ], V = [
50
- {
51
- label: "Alphanumeric",
52
- value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
53
- },
54
- {
55
- label: "Alphabetic",
56
- value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
57
- },
58
- { label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
59
- { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
60
- { label: "Numbers", value: "0123456789" },
61
- { label: "Custom", value: "" }
62
- ], w = b(V[0].value), T = b("bulk"), A = b(0), B = G(
63
- () => {
64
- var l;
65
- return (l = E.membership.design) == null ? void 0 : l[A.value];
66
- }
67
- ), u = b(!1), s = G(
68
- () => E.sortedStoreCategories.flatMap((l) => l.bundles)
69
- );
70
- async function o(l) {
71
- var D, H;
72
- if (await ((D = R.value) == null ? void 0 : D.validateInputs()), !v.value) return;
73
- l.design = (H = B.value) == null ? void 0 : H.image;
74
- const t = await Te.confirm(
75
- "",
76
- "Do you want to export generated card(s)?",
77
- "Export",
78
- "Generate and without export"
79
- );
80
- console.log(t), await U(
81
- async () => {
82
- const P = await oe.createCards(l);
83
- console.log(P), await c("success"), t && await c("export", P);
84
- },
85
- {
86
- message: "Creating card(s)",
87
- successMessage: "Card(s) created"
88
- }
89
- );
90
- }
91
- return i({
92
- showSheet: L
93
- }), he(
94
- () => r.value.codeConfig.length,
95
- (l, t) => {
96
- l != t && (r.value.codeConfig.pattern = "#".repeat(Number(l)));
97
- }
98
- ), ne(async () => {
99
- await E.readMemberStore();
100
- }), (l, t) => {
101
- const D = g("FmRadio"), H = g("FmRadioGroup"), P = g("FmSwitch"), f = g("FmStepperField"), $ = g("FmSelect"), F = g("FmTextField"), fe = g("FmTextarea"), K = g("FmButton"), be = g("FmForm"), ve = g("FmSideSheet");
102
- return _(), I(ve, {
103
- "max-width": 560,
104
- "dismiss-away": !0,
105
- header: "Create collection",
106
- modelValue: n(h),
107
- "onUpdate:modelValue": [
108
- t[19] || (t[19] = (C) => Q(h) ? h.value = C : null),
109
- t[20] || (t[20] = (C) => h.value = C)
110
- ]
111
- }, {
112
- "side-sheet-footer": k(() => [
113
- m("div", We, [
114
- d(K, {
115
- label: "Save",
116
- onClick: t[17] || (t[17] = (C) => o(n(r))),
117
- loading: n(ke)().isLoading
118
- }, null, 8, ["loading"]),
119
- d(K, {
120
- label: "Cancel",
121
- type: "button",
122
- variant: "tertiary",
123
- onClick: t[18] || (t[18] = (C) => h.value = !1)
124
- })
125
- ])
126
- ]),
127
- default: k(() => [
128
- d(be, {
129
- ref_key: "form",
130
- ref: R,
131
- class: "space-y-40",
132
- onValidationSuccess: t[15] || (t[15] = (C) => v.value = !0),
133
- onValidationFailed: t[16] || (t[16] = (C) => v.value = !1)
134
- }, {
135
- default: k(() => {
136
- var C, se, re;
137
- return [
138
- m("div", null, [
139
- t[21] || (t[21] = m("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1)),
140
- d(H, {
141
- modelValue: n(T),
142
- "onUpdate:modelValue": t[0] || (t[0] = (a) => Q(T) ? T.value = a : null),
143
- inline: !1
144
- }, {
145
- default: k(() => [
146
- (_(), x(M, null, Z(S, (a) => d(D, {
147
- key: a.value,
148
- value: a.value,
149
- label: a.label,
150
- sublabel: a.sublabel
151
- }, null, 8, ["value", "label", "sublabel"])), 64))
152
- ]),
153
- _: 1
154
- }, 8, ["modelValue"])
155
- ]),
156
- m("div", Me, [
157
- t[22] || (t[22] = m("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1)),
158
- n(T) === "bulk" ? (_(), x(M, { key: 0 }, [
159
- d(P, {
160
- "model-value": n(u),
161
- "label-placement": "right",
162
- value: "true",
163
- label: "Advance number setting",
164
- required: !0,
165
- "onUpdate:modelValue": t[1] || (t[1] = () => u.value = !n(u))
166
- }, null, 8, ["model-value"]),
167
- n(u) ? (_(), x(M, { key: 0 }, [
168
- d(f, {
169
- "model-value": n(r).codeConfig.length || null,
170
- "onUpdate:modelValue": t[2] || (t[2] = (a) => n(r).codeConfig.length = a),
171
- label: "Code length",
172
- rules: [(a) => Number(a) >= 1 || "Code length must at least 1"],
173
- required: !0
174
- }, null, 8, ["model-value", "rules"]),
175
- d($, {
176
- label: "Charset",
177
- "model-value": n(w),
178
- items: V,
179
- "helper-text": n(r).codeConfig.charset.length > 62 ? `${n(r).codeConfig.charset.substring(0, 62)}...` : n(r).codeConfig.charset,
180
- "onUpdate:modelValue": t[3] || (t[3] = (a) => {
181
- w.value = a, n(r).codeConfig.charset = a;
182
- })
183
- }, null, 8, ["model-value", "helper-text"]),
184
- n(w) === "" ? (_(), I(F, {
185
- key: 0,
186
- modelValue: n(r).codeConfig.charset,
187
- "onUpdate:modelValue": t[4] || (t[4] = (a) => n(r).codeConfig.charset = a),
188
- label: "Custom Charset",
189
- required: ""
190
- }, null, 8, ["modelValue"])) : O("", !0),
191
- m("div", Ve, [
192
- d(F, {
193
- modelValue: n(r).codeConfig.prefix,
194
- "onUpdate:modelValue": t[5] || (t[5] = (a) => n(r).codeConfig.prefix = a),
195
- label: "Prefix (Optional)"
196
- }, null, 8, ["modelValue"]),
197
- d(F, {
198
- modelValue: n(r).codeConfig.suffix,
199
- "onUpdate:modelValue": t[6] || (t[6] = (a) => n(r).codeConfig.suffix = a),
200
- label: "Suffix (Optional)"
201
- }, null, 8, ["modelValue"])
202
- ]),
203
- d(F, {
204
- modelValue: n(r).codeConfig.pattern,
205
- "onUpdate:modelValue": t[7] || (t[7] = (a) => n(r).codeConfig.pattern = a),
206
- label: "Pattern",
207
- required: !0
208
- }, null, 8, ["modelValue"])
209
- ], 64)) : O("", !0),
210
- d(F, {
211
- modelValue: n(r).quantity,
212
- "onUpdate:modelValue": t[8] || (t[8] = (a) => n(r).quantity = a),
213
- label: "Number of code",
214
- rules: [
215
- (a) => a >= 1 || "Quantity cannot be less than 1",
216
- (a) => a <= 1e4 || "Quantity cannot more than 10,000"
217
- ],
218
- required: !0,
219
- "helper-text": `${n(r).quantity} card will be created`
220
- }, null, 8, ["modelValue", "rules", "helper-text"])
221
- ], 64)) : O("", !0),
222
- n(T) !== "bulk" ? (_(), I(fe, {
223
- key: 1,
224
- modelValue: n(r).code,
225
- "onUpdate:modelValue": t[9] || (t[9] = (a) => n(r).code = a),
226
- label: "Custom Card Number",
227
- rules: [(a) => n(T) != "single" || !!a || "Custom code is required"],
228
- placeholder: "(For multiple numbers, please enter in the new row.)"
229
- }, null, 8, ["modelValue", "rules"])) : O("", !0)
230
- ]),
231
- m("div", Ge, [
232
- t[23] || (t[23] = m("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1)),
233
- d(P, {
234
- "label-placement": "right",
235
- label: "Set card number on bind",
236
- "model-value": n(r).setCardOnBind || !1,
237
- "onUpdate:modelValue": t[10] || (t[10] = (a) => n(r).setCardOnBind = a)
238
- }, null, 8, ["model-value"]),
239
- d(ie, {
240
- label: "Activate bundle on bind",
241
- placeholder: "Select bundle",
242
- items: n(s).filter((a) => !a.stripePriceId).map((a) => ({ label: a.name, value: a._id })),
243
- modelValue: n(r).bundle,
244
- "onUpdate:modelValue": t[12] || (t[12] = (a) => n(r).bundle = a)
245
- }, {
246
- append: k(() => [
247
- n(r).bundle ? (_(), I(K, {
248
- key: 0,
249
- icon: "link_off",
250
- variant: "plain",
251
- onClick: t[11] || (t[11] = (a) => n(r).bundle = void 0)
252
- })) : O("", !0)
253
- ]),
254
- _: 1
255
- }, 8, ["items", "modelValue"]),
256
- (se = (C = n(E).store) == null ? void 0 : C.stripe) != null && se.apiKey ? (_(), I(ie, {
257
- key: 0,
258
- label: "Linked subscription bundle",
259
- placeholder: "Select bundle",
260
- items: n(s).filter((a) => a.stripePriceId).map((a) => ({ label: a.name, value: a._id })),
261
- modelValue: n(r).subscriptionBundle,
262
- "onUpdate:modelValue": t[14] || (t[14] = (a) => n(r).subscriptionBundle = a)
263
- }, {
264
- append: k(() => [
265
- n(r).subscriptionBundle ? (_(), I(K, {
266
- key: 0,
267
- icon: "link_off",
268
- variant: "plain",
269
- onClick: t[13] || (t[13] = (a) => n(r).subscriptionBundle = void 0)
270
- })) : O("", !0)
271
- ]),
272
- _: 1
273
- }, 8, ["items", "modelValue"])) : O("", !0)
274
- ]),
275
- n(E).membership.design ? (_(), x("div", Le, [
276
- m("div", je, [
277
- t[24] || (t[24] = m("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
278
- m("img", {
279
- src: (re = n(B)) == null ? void 0 : re.image,
280
- class: "aspect-[16/9]"
281
- }, null, 8, $e),
282
- m("div", Ke, [
283
- (_(!0), x(M, null, Z(n(E).membership.design, (a, Y) => (_(), x("img", {
284
- src: a.image,
285
- key: `image_${Y}`,
286
- class: Ee(["w-[112px] h-[63px] cursor-pointer", `${n(A) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
287
- onClick: (_n) => A.value = Y,
288
- alt: `ai_image_predict_${Y}`,
289
- style: { objectFit: "cover" }
290
- }, null, 10, Ye))), 128))
291
- ])
292
- ])
293
- ])) : O("", !0)
294
- ];
295
- }),
296
- _: 1
297
- }, 512)
298
- ]),
299
- _: 1
300
- }, 8, ["modelValue"]);
301
- };
302
- }
303
- });
304
- var z = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_ef23f16d-b59a-4a91-8330-b10907a9f5b5", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.36", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", USER: "runner", npm_config_user_agent: "pnpm/9.15.4 npm/? node/v20.18.1 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_ef23f16d-b59a-4a91-8330-b10907a9f5b5", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.1", npm_node_execpath: "/opt/hostedtoolcache/node/20.18.1/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-8.12", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.15.0-beta.5", npm_package_dependencies_fabric: "^6.4.2", npm_package_dependencies_zod_i18n_map: "^2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "706", npm_package_dependencies__feedmepos_ui_library: "1.3.5", npm_package_dependencies_dayjs: "^1.11.11", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies_i18next: "^24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.4", npm_package_devDependencies_typescript: "^5.4.5", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.21", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20250105.1.0", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies__feedmepos_custom_attributes: "0.0.0-rc.3", npm_package_dependencies_unplugin_auto_import: "^0.17.6", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.10/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.4/x64", JOURNAL_STREAM: "8:5740", GITHUB_WORKFLOW: "Publish mf-connect - dev", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.111.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "12882174518", STATS_VMFE: "true", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.5", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "c91ba3f32aa737511901800c5a01e6e10324655b", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[DEV] publish-mf-connect.yml@refs/heads/dev", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.18.1/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_a1ca9c20-1d53-4c34-9d08-f51c17e109be", INVOCATION_ID: "d09b735b78fe443ab094a44150463e53", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.18.1/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "43", GITHUB_TRIGGERING_ACTOR: "qaijunse", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.15", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 403", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/marketing-services", STATS_D_D: "false", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "^2.10.4", npm_lifecycle_script: "vite build --mode fmmf", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", STATS_PIP: "false", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.0.16-beta.10", npm_lifecycle_event: "build:mf:dev", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "c91ba3f32aa737511901800c5a01e6e10324655b", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.3", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_dependencies_firebase: "^10.12.2", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_ef23f16d-b59a-4a91-8330-b10907a9f5b5", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "39590157", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.4/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_ef23f16d-b59a-4a91-8330-b10907a9f5b5", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.38", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", npm_package_pnpm_overrides__feedmepos_mf_common: "1.15.0-beta.5", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_ef23f16d-b59a-4a91-8330-b10907a9f5b5", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "dev", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", AUTH_URL: "https://portal-v2-dev.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedmedev.cc", CRM_APP_URL: "crm.feedmedev.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedmedev.cc", CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", PAYMENT_PORTAL_URL: "https://portal.feedmedev.cc/payment/payout-account" } }, J = Math.floor(Math.random() * 16777215), ce = p.index = parseInt(Math.random() * 16777215, 10), me = (typeof z > "u" || typeof z.pid != "number" ? Math.floor(Math.random() * 1e5) : z.pid) % 65535, ue = (() => {
305
- try {
306
- return _Buffer;
307
- } catch {
308
- try {
309
- return Buffer;
310
- } catch {
311
- return null;
312
- }
313
- }
314
- })(), W = function(e) {
315
- return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
316
- }, ge = [];
317
- for (var y = 0; y < 256; y++)
318
- ge[y] = (y <= 15 ? "0" : "") + y.toString(16);
319
- var _e = new RegExp("^[0-9a-fA-F]{24}$"), j = [];
320
- y = 0;
321
- for (; y < 10; ) j[48 + y] = y++;
322
- for (; y < 16; ) j[55 + y] = j[87 + y] = y++;
323
- function p(e) {
324
- if (!(this instanceof p)) return new p(e);
325
- if (e && (e instanceof p || e._bsontype === "ObjectID"))
326
- return e;
327
- if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
328
- this.id = this.generate(e);
329
- return;
330
- }
331
- var i = p.isValid(e);
332
- if (!i && e != null)
333
- throw new Error(
334
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
335
- );
336
- if (i && typeof e == "string" && e.length === 24)
337
- return p.createFromHexString(e);
338
- if (e != null && e.length === 12)
339
- this.id = e;
340
- else {
341
- if (e != null && typeof e.toHexString == "function")
342
- return e;
343
- throw new Error(
344
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
345
- );
346
- }
347
- }
348
- var qe = p;
349
- p.default = p;
350
- p.createFromTime = function(e) {
351
- return e = parseInt(e, 10) % 4294967295, new p(Je(8, e) + "0000000000000000");
352
- };
353
- p.createFromHexString = function(e) {
354
- if (typeof e > "u" || e != null && e.length !== 24)
355
- throw new Error(
356
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
357
- );
358
- for (var i = "", N = 0; N < 24; )
359
- i += String.fromCharCode(j[e.charCodeAt(N++)] << 4 | j[e.charCodeAt(N++)]);
360
- return new p(i);
361
- };
362
- p.isValid = function(e) {
363
- return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && _e.test(e) : e instanceof p ? !0 : W(e) ? p.isValid(e.toString("hex")) : typeof e.toHexString == "function" && ue && (e.id instanceof ue || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && _e.test(e.id) : !1;
364
- };
365
- p.prototype = {
366
- constructor: p,
367
- /**
368
- * Return the ObjectID id as a 24 byte hex string representation
369
- *
370
- * @return {String} return the 24 byte hex string representation.
371
- * @api public
372
- */
373
- toHexString: function() {
374
- if (!this.id || !this.id.length)
375
- throw new Error(
376
- "invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
377
- );
378
- if (this.id.length === 24)
379
- return this.id;
380
- if (W(this.id))
381
- return this.id.toString("hex");
382
- for (var e = "", i = 0; i < this.id.length; i++)
383
- e += ge[this.id.charCodeAt(i)];
384
- return e;
385
- },
386
- /**
387
- * Compares the equality of this ObjectID with `otherID`.
388
- *
389
- * @param {Object} otherId ObjectID instance to compare against.
390
- * @return {Boolean} the result of comparing two ObjectID's
391
- * @api public
392
- */
393
- equals: function(e) {
394
- return e instanceof p ? this.toString() === e.toString() : typeof e == "string" && p.isValid(e) && e.length === 12 && W(this.id) ? e === this.id.toString("binary") : typeof e == "string" && p.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && p.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof p || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
395
- },
396
- /**
397
- * Returns the generation date (accurate up to the second) that this ID was generated.
398
- *
399
- * @return {Date} the generation date
400
- * @api public
401
- */
402
- getTimestamp: function() {
403
- var e = /* @__PURE__ */ new Date(), i;
404
- return W(this.id) ? i = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : i = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(i) * 1e3), e;
405
- },
406
- /**
407
- * Generate a 12 byte id buffer used in ObjectID's
408
- *
409
- * @method
410
- * @param {number} [time] optional parameter allowing to pass in a second based timestamp.
411
- * @return {string} return the 12 byte id buffer string.
412
- */
413
- generate: function(e) {
414
- typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
415
- var i = ze();
416
- return String.fromCharCode(
417
- e >> 24 & 255,
418
- e >> 16 & 255,
419
- e >> 8 & 255,
420
- e & 255,
421
- J >> 16 & 255,
422
- J >> 8 & 255,
423
- J & 255,
424
- me >> 8 & 255,
425
- me & 255,
426
- i >> 16 & 255,
427
- i >> 8 & 255,
428
- i & 255
429
- );
430
- }
431
- };
432
- function ze() {
433
- return ce = (ce + 1) % 16777215;
434
- }
435
- function Je(e, i) {
436
- return i = i.toString(16), i.length === e ? i : "00000000".substring(i.length, e) + i;
437
- }
438
- var Qe = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
439
- p.prototype[Qe] = function() {
440
- return "ObjectID(" + this + ")";
441
- };
442
- p.prototype.toJSON = p.prototype.toHexString;
443
- p.prototype.toString = p.prototype.toHexString;
444
- const Ze = /* @__PURE__ */ Re(qe), en = {
445
- key: 0,
446
- class: "grid grid-cols-1 gap-8"
447
- }, nn = { class: "flex items-center gap-8" }, tn = { class: "flex items-center gap-8" }, on = 5, an = /* @__PURE__ */ ee({
448
- __name: "CardDesignSheet",
449
- emits: ["success"],
450
- setup(e, { expose: i, emit: N }) {
451
- const { minor: U } = ae, E = te(), R = He(), v = b(!1);
452
- b(), b(!1);
453
- const c = b(), h = b(null);
454
- G(() => {
455
- var u, s;
456
- return Math.min((((s = (u = c.value) == null ? void 0 : u.design) == null ? void 0 : s.length) ?? 0) + 1, on);
457
- });
458
- const L = N, r = G(() => {
459
- var u, s;
460
- return ((s = (u = E.membership) == null ? void 0 : u.design) == null ? void 0 : s.filter((o) => o.image)) || [];
461
- }), S = b(!1);
462
- function V(u) {
463
- S.value = u;
464
- }
465
- function w() {
466
- v.value = !0;
467
- }
468
- async function T() {
469
- await U(
470
- async () => {
471
- var o;
472
- const u = Ae(c.value), s = Ce.parse(u);
473
- if (s.design = (s == null ? void 0 : s.design) || [], h.value) {
474
- const l = Ze().toHexString(), t = await de.update(
475
- de.designPath(l, h.value),
476
- h.value
477
- );
478
- (o = s.design) == null || o.push({
479
- _id: l,
480
- image: t
481
- });
482
- }
483
- await oe.update(s), await B(), await L("success"), h.value = null, v.value = !1;
484
- },
485
- {
486
- message: "Saving card design",
487
- successMessage: "Card design saved"
488
- }
489
- );
490
- }
491
- async function A(u, s) {
492
- u ? h.value = u : s && R.open({
493
- title: "Delete Design",
494
- message: "Are you sure you want to delete this design?",
495
- primaryActions: { text: "Delete", close: !0 },
496
- secondaryActions: { text: "Cancel", close: !1 }
497
- }).onPrimary(async () => {
498
- var l, t;
499
- const o = (l = c.value.design) == null ? void 0 : l.findIndex((D) => D._id == s);
500
- console.log(o), o !== -1 && ((t = c.value.design) == null || t.splice(o, 1)), await T();
501
- }).onSecondary(() => {
502
- R.close();
503
- });
504
- }
505
- async function B() {
506
- await E.readMembership(), c.value = E.membership;
507
- }
508
- return i({
509
- showSheet: V
510
- }), ne(async () => {
511
- await B(), r.value.length || (v.value = !0);
512
- }), (u, s) => {
513
- const o = g("FmButton"), l = g("FmSideSheet");
514
- return _(), I(l, {
515
- "max-width": 560,
516
- "dismiss-away": !0,
517
- header: "Manage Design",
518
- modelValue: n(S),
519
- "onUpdate:modelValue": [
520
- s[2] || (s[2] = (t) => Q(S) ? S.value = t : null),
521
- s[3] || (s[3] = (t) => S.value = t)
522
- ]
523
- }, ye({
524
- default: k(() => [
525
- n(v) ? O("", !0) : (_(), x("div", en, [
526
- (_(!0), x(M, null, Z(n(r), (t) => (_(), I(le, {
527
- key: String(t._id),
528
- "image-fit": "cover",
529
- label: "",
530
- "aspect-ratio": "16/9",
531
- thumbnail: t.image,
532
- accept: ".png, .jpg, .jpeg, .gif",
533
- "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
534
- file: void 0,
535
- "delete-button": !1
536
- }, {
537
- "delete-button": k(() => [
538
- d(o, {
539
- class: "!text-neutral-50 !bg-neutral-700",
540
- icon: "delete",
541
- variant: "tertiary",
542
- onClick: (D) => A(null, t._id)
543
- }, null, 8, ["onClick"])
544
- ]),
545
- _: 2
546
- }, 1032, ["thumbnail"]))), 128))
547
- ])),
548
- n(v) ? (_(), I(le, {
549
- key: 1,
550
- "image-fit": "cover",
551
- label: "",
552
- "aspect-ratio": "16/9",
553
- accept: ".png, .jpg, .jpeg, .gif",
554
- "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
555
- "onUpdate:file": A
556
- })) : O("", !0)
557
- ]),
558
- _: 2
559
- }, [
560
- n(v) ? {
561
- name: "side-sheet-footer",
562
- fn: k(() => [
563
- m("div", tn, [
564
- d(o, {
565
- label: "Save",
566
- onClick: T,
567
- disabled: !n(h)
568
- }, null, 8, ["disabled"]),
569
- d(o, {
570
- label: "Cancel",
571
- type: "button",
572
- variant: "tertiary",
573
- onClick: s[1] || (s[1] = (t) => v.value = !1)
574
- })
575
- ])
576
- ]),
577
- key: "1"
578
- } : {
579
- name: "side-sheet-footer",
580
- fn: k(() => [
581
- m("div", nn, [
582
- d(o, {
583
- label: "Add Design",
584
- onClick: w
585
- }),
586
- d(o, {
587
- label: "Cancel",
588
- type: "button",
589
- variant: "tertiary",
590
- onClick: s[0] || (s[0] = (t) => S.value = !1)
591
- })
592
- ])
593
- ]),
594
- key: "0"
595
- }
596
- ]), 1032, ["modelValue"]);
597
- };
598
- }
599
- }), sn = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ln = { class: "px-24 flex flex-col pb-24 gap-y-16" }, dn = { class: "flex items-center justify-end" }, pn = { class: "flex flex-col gap-16 text-center" }, cn = { class: "fm-typo-en-title-sm-800" }, mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, un = { class: "flex gap-x-8" }, hn = /* @__PURE__ */ ee({
600
- __name: "Card",
601
- setup(e) {
602
- const { minor: i, global: N } = ae, U = b(), E = b(), R = Oe(), v = te(), { t: c } = Ie(), h = G(
603
- () => v.sortedStoreCategories.flatMap((s) => s.bundles)
604
- ), L = [
605
- {
606
- header: c("connect.loyalty.card.table.card_number"),
607
- accessorFn: (s) => s.serialNumber
608
- },
609
- {
610
- header: c("connect.loyalty.card.table.redeemed_by"),
611
- accessorKey: "user",
612
- enableSorting: !1,
613
- cell(s) {
614
- const o = s.row.original.pf_member;
615
- return X(
616
- "div",
617
- {
618
- class: "flex items-center gap-x-8"
619
- },
620
- [
621
- X(Fe.FmAvatar, {
622
- name: o != null && o.photoUrl || o == null ? void 0 : o.name,
623
- src: (o == null ? void 0 : o.photoUrl) ?? void 0,
624
- size: "sm"
625
- }),
626
- X("span", { class: "fm-typo-en-body-sm-400" }, o == null ? void 0 : o.name)
627
- ]
628
- );
629
- }
630
- },
631
- {
632
- header: c("connect.loyalty.card.table.phone"),
633
- accessorFn: (s) => {
634
- var o;
635
- return ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "-";
636
- },
637
- accessorKey: "pf_member.phoneNumber"
638
- },
639
- {
640
- header: c("connect.loyalty.card.table.created_at"),
641
- accessorKey: "_id",
642
- accessorFn: (s) => pe(xe(s._id.toString())).format("DD MMM YYYY hh:mmA")
643
- },
644
- {
645
- header: c("connect.loyalty.card.table.bundle"),
646
- accessorFn: (s) => {
647
- var o;
648
- return ((o = h.value.find((l) => l._id === s.bundle)) == null ? void 0 : o.name) || "-";
649
- }
650
- },
651
- {
652
- header: c("connect.loyalty.card.table.redeemed_at"),
653
- accessorKey: "redeemedAt",
654
- accessorFn: (s) => s.redeemedAt ? pe(s.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
655
- }
656
- ], { tableMeta: r, rowData: S, onSort: V, debouncedFetchData: w, onSearch: T } = Ne(oe.readCards);
657
- async function A() {
658
- var s;
659
- await w(), (s = U.value) == null || s.showSheet(!1);
660
- }
661
- const B = G(() => R.isPremium ? [
662
- {
663
- label: c("connect.loyalty.card.actions.create"),
664
- value: "create",
665
- isPrimary: !0
666
- },
667
- {
668
- label: c("connect.loyalty.card.actions.manage_design"),
669
- value: "design",
670
- isPrimary: !0
671
- }
672
- ] : []);
673
- async function u(s) {
674
- const o = new Pe(), l = s.map((t) => ({
675
- CardNumber: t
676
- }));
677
- o.addRecords(l), await we(
678
- o.buildExcel(),
679
- `cards-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
680
- {
681
- bookType: "xlsx",
682
- bookSST: !1,
683
- type: "array"
684
- }
685
- );
686
- }
687
- return ne(async () => {
688
- await N(async () => {
689
- await R.readPremium(), await v.readMemberStore(), await v.readMembership(), await A();
690
- });
691
- }), (s, o) => {
692
- const l = g("FmPill"), t = g("FmPageHead"), D = g("FmSearch"), H = g("FmButton"), P = g("FmCard");
693
- return _(), x(M, null, [
694
- d(t, {
695
- title: n(c)("connect.loyalty.card.title"),
696
- actions: n(B),
697
- "onClick:action": o[0] || (o[0] = (f) => {
698
- var $, F;
699
- console.log(f), f === "design" && (($ = n(E)) == null || $.showSheet(!0)), f === "create" && ((F = n(U)) == null || F.showSheet(!0));
700
- })
701
- }, {
702
- title: k(() => [
703
- m("div", sn, [
704
- m("span", rn, q(n(c)("connect.loyalty.card.title")), 1),
705
- d(l, {
706
- class: "ml-8",
707
- variant: "premium"
708
- })
709
- ])
710
- ]),
711
- _: 1
712
- }, 8, ["title", "actions"]),
713
- m("div", ln, [
714
- n(S).length > 0 || n(S).length <= 0 && n(r).searchValue || n(r).pageCount > 0 ? (_(), x(M, { key: 0 }, [
715
- m("div", dn, [
716
- d(D, {
717
- class: "mt-4",
718
- modelValue: n(r).searchValue,
719
- "onUpdate:modelValue": [
720
- o[1] || (o[1] = (f) => n(r).searchValue = f),
721
- n(T)
722
- ],
723
- placeholder: "Search",
724
- collapsible: ""
725
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
726
- d(H, {
727
- icon: "ios_share",
728
- variant: "tertiary",
729
- onClick: Se(n(Be), ["prevent"])
730
- }, null, 8, ["onClick"])
731
- ]),
732
- d(De, {
733
- loading: n(r).isLoading,
734
- "row-data": n(S),
735
- "row-count": n(r).totalRows,
736
- "column-defs": L,
737
- "shrink-at": !1,
738
- "page-count": n(r).pageCount,
739
- "page-index": n(r).pageIndex,
740
- "page-size": n(r).pageSize,
741
- onSortChange: n(V),
742
- onPageChange: o[2] || (o[2] = (f) => {
743
- n(w)({
744
- pageSize: f.pageSize,
745
- pageIndex: f.pageIndex
746
- });
747
- })
748
- }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
749
- ], 64)) : (_(), I(P, {
750
- key: 1,
751
- variant: "outlined",
752
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
753
- }, {
754
- default: k(() => [
755
- o[5] || (o[5] = m("img", {
756
- src: Ue,
757
- class: "aspect-square w-[150px]"
758
- }, null, -1)),
759
- m("div", pn, [
760
- m("div", cn, q(n(c)("connect.loyalty.card.empty_state.title")), 1),
761
- m("div", mn, q(n(c)("connect.loyalty.card.empty_state.description")), 1)
762
- ]),
763
- m("div", un, [
764
- d(H, {
765
- variant: "primary",
766
- label: n(c)("connect.loyalty.card.actions.add"),
767
- icon: "add",
768
- disabled: !n(R).isPremium,
769
- onClick: o[3] || (o[3] = () => {
770
- var f;
771
- return (f = n(U)) == null ? void 0 : f.showSheet(!0);
772
- })
773
- }, null, 8, ["label", "disabled"]),
774
- d(H, {
775
- variant: "secondary",
776
- label: n(c)("connect.loyalty.card.actions.manage_design"),
777
- disabled: !n(R).isPremium,
778
- onClick: o[4] || (o[4] = () => {
779
- var f;
780
- return (f = n(E)) == null ? void 0 : f.showSheet(!0);
781
- })
782
- }, null, 8, ["label", "disabled"])
783
- ])
784
- ]),
785
- _: 1
786
- })),
787
- d(Xe, {
788
- ref_key: "sheetRef",
789
- ref: U,
790
- onSuccess: A,
791
- onExport: u
792
- }, null, 512),
793
- d(an, {
794
- ref_key: "designSheetRef",
795
- ref: E,
796
- onSuccess: A
797
- }, null, 512)
798
- ])
799
- ], 64);
800
- };
801
- }
802
- });
803
- export {
804
- hn as default
805
- };