@feedmepos/mf-connect 0.1.98-beta.40 → 0.1.98-beta.41

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 (151) hide show
  1. package/dist/App-C6JJ9uQ8.js +4785 -0
  2. package/dist/AuditLogs-CAlgtDgx.js +2014 -0
  3. package/dist/Bin-D8jwhwER.js +166 -0
  4. package/dist/Broadcast-CP8DRfkT.js +269 -0
  5. package/dist/CampaignAnalytic-MVjYBFvu.js +1826 -0
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DeLURz87.js +122 -0
  7. package/dist/Card-QribXJwZ.js +911 -0
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  9. package/dist/Collections-X9xbt43V.js +541 -0
  10. package/dist/Credit-QmbsW1eb.js +286 -0
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  12. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js +3382 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js +351 -0
  15. package/dist/Experience-CPGMg847.js +285 -0
  16. package/dist/FileSaver.min-CK67LsPG.js +74 -0
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-BrkiEFCS.js +356 -0
  20. package/dist/GiftCardSetup-DXNBHF1A.js +542 -0
  21. package/dist/Grab-BgtDzK1B.js +301 -0
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-Dzv2AkKN.js +145 -0
  23. package/dist/Index-KJgzalOd.js +259 -0
  24. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  25. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js +48 -0
  26. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js +18737 -0
  27. package/dist/LoyaltyDashboard-B2JpbC01.js +1345 -0
  28. package/dist/MainLayout-DlfTKHQ-.js +143 -0
  29. package/dist/Marketing-Crx_JQpi.js +236 -0
  30. package/dist/MarketingMaterialEdit-BfsdcMXJ.js +1036 -0
  31. package/dist/Member-C50Nrsko.js +281 -0
  32. package/dist/MemberList-C9uUKw1o.js +1603 -0
  33. package/dist/MemberOverview-wL_ailso.js +58 -0
  34. package/dist/MemberTransactions-DZ7zPOHX.js +45 -0
  35. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Du_ZGsbX.js +60957 -0
  36. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  37. package/dist/Mission-D_km8zi6.js +360 -0
  38. package/dist/Overview-BBieK6qQ.js +1080 -0
  39. package/dist/Overview-B_kmLOcc.js +1316 -0
  40. package/dist/Point-D0q9N7f9.js +288 -0
  41. package/dist/Promotion-DoFTy-NK.js +423 -0
  42. package/dist/Queue-Dh5sDRHW.js +261 -0
  43. package/dist/Record-0owEBKqN.js +342 -0
  44. package/dist/Review-DV2fnpOH.js +45 -0
  45. package/dist/ReviewFacebookCallback-D8mnAPzR.js +238 -0
  46. package/dist/ReviewGoogleCallback-CLzt_ox2.js +213 -0
  47. package/dist/Reward-Co20Xrss.js +442 -0
  48. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-0qU49c47.js +150 -0
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-qdvaXPhJ.js +1913 -0
  50. package/dist/Segment-7dQKeHWK.js +1017 -0
  51. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BUVrUifO.js +181 -0
  52. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js +189 -0
  53. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DqPZpddc.js +226 -0
  54. package/dist/Setting-Bvahxs-y.js +2047 -0
  55. package/dist/SettingAdvertisements-fbXLRwfb.js +264 -0
  56. package/dist/Settings-C_HWDFN8.js +179 -0
  57. package/dist/Store-8yBKDR1b.js +2413 -0
  58. package/dist/StoreRewards-DKaJvoJs.js +540 -0
  59. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D23XzJD7.js +1075 -0
  60. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-JaFhCK_L.js +7007 -0
  61. package/dist/Tier-CD-CjXC3.js +972 -0
  62. package/dist/Title-C_lcgye8.js +569 -0
  63. package/dist/Transaction-BvUYm-rT.js +39 -0
  64. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js +130 -0
  65. package/dist/Voucher-CYaG0GLU.js +444 -0
  66. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js +421 -0
  67. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js +56 -0
  68. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  69. package/dist/app-CE5hQ4Uq.js +60740 -0
  70. package/dist/app-wDQR6dpb.js +39 -0
  71. package/dist/app.js +7 -0
  72. package/dist/business-CE_4siXc.js +82 -0
  73. package/dist/campaign-BP6rvSpg.js +255 -0
  74. package/dist/campaign-CXQtKpeb.js +100 -0
  75. package/dist/campaign-CpzFl8Vr.js +4 -0
  76. package/dist/campaign.enum-Dx-Zo68Q.js +26 -0
  77. package/dist/campaign.fn-DKnBpE1N.js +776 -0
  78. package/dist/collectible.enum-Liy2wH3s.js +19 -0
  79. package/dist/collection.fn-Cg16QZSp.js +26 -0
  80. package/dist/duplicateCampaign-DbtVAGsT.js +51 -0
  81. package/dist/effect-CLI8NI4O.js +89 -0
  82. package/dist/email-addresses-DlLiZ1io.js +705 -0
  83. package/dist/export-6Hr34dBU.js +97 -0
  84. package/dist/feedme.ico +0 -0
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/helper-vkjFqj70.js +86 -0
  87. package/dist/index-BIyKgw4m.js +72 -0
  88. package/dist/index-BLQJ-rv3.js +31 -0
  89. package/dist/index-BbTIqReL.js +67 -0
  90. package/dist/index-BuMfQxMf.js +897 -0
  91. package/dist/index-C8cXXcLk.js +45 -0
  92. package/dist/index-CSVhIZSY.js +8919 -0
  93. package/dist/index-CVHacTbc.js +151 -0
  94. package/dist/index-C_H8jFYf.js +2743 -0
  95. package/dist/index-CmNsGhDf.js +2706 -0
  96. package/dist/index-CnTeeRyJ.js +53 -0
  97. package/dist/index-CuvNtC_M.js +61 -0
  98. package/dist/index-CzbNobLv.js +1139 -0
  99. package/dist/index-D06n1h1b.js +146 -0
  100. package/dist/index-D4SDAfbP.js +27550 -0
  101. package/dist/index-DVnYQ3Hs.js +85 -0
  102. package/dist/index-DcjnS5Sv.js +28900 -0
  103. package/dist/index-Dx9h0FNH.js +3 -0
  104. package/dist/index-YgP4ihQL.js +32 -0
  105. package/dist/index-kedErkLZ.js +2963 -0
  106. package/dist/index-lnQT4P3d.js +55 -0
  107. package/dist/index-vh86FiIQ.js +10 -0
  108. package/dist/index.esm2017-Jhv2lkrq.js +3069 -0
  109. package/dist/loading-NY-FPxVY.js +72 -0
  110. package/dist/lodash-BC_P6kLg.js +3678 -0
  111. package/dist/membership-BWaK-9FY.js +255 -0
  112. package/dist/moment-D7p2TMB-.js +2583 -0
  113. package/dist/money-COoh4GXK.js +15 -0
  114. package/dist/number-BX5OEXgq.js +12 -0
  115. package/dist/object-BYyQ0PZp.js +18 -0
  116. package/dist/objectId-dwaoBfJX.js +7 -0
  117. package/dist/objectid-1SUSRtmY.js +145 -0
  118. package/dist/plugins-ur-FAoye.js +1788 -0
  119. package/dist/remy-Qz_pNsUS.js +13 -0
  120. package/dist/reward-DSsylZ22.js +36 -0
  121. package/dist/rule-BM9GUd1C.js +1969 -0
  122. package/dist/rule-builder-gC9LH2AC.js +126 -0
  123. package/dist/string-Gcy5IM_H.js +32 -0
  124. package/dist/style.css +4 -0
  125. package/dist/template-CUV3AMFI.js +188 -0
  126. package/dist/tier-BJDhpH6X.js +4 -0
  127. package/dist/tiers/tier=1.png +0 -0
  128. package/dist/tiers/tier=2.png +0 -0
  129. package/dist/tiers/tier=3.png +0 -0
  130. package/dist/tiers/tier=4.png +0 -0
  131. package/dist/timezone-BFZhekOU.js +20 -0
  132. package/dist/titles/type=diamond.png +0 -0
  133. package/dist/titles/type=drinks.png +0 -0
  134. package/dist/titles/type=food.png +0 -0
  135. package/dist/titles/type=heart.png +0 -0
  136. package/dist/titles/type=medal.png +0 -0
  137. package/dist/titles/type=spend.png +0 -0
  138. package/dist/titles/type=thank-you.png +0 -0
  139. package/dist/titles/type=thumbs-up.png +0 -0
  140. package/dist/titles/type=years.png +0 -0
  141. package/dist/transaction.fn-C5MlkEIC.js +64 -0
  142. package/dist/trigger-CbjiuoSo.js +213 -0
  143. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  144. package/dist/type_drinks-D6jnpvwV.js +4 -0
  145. package/dist/useMarketingMaterialActions-BLisTieA.js +96 -0
  146. package/dist/usePagination-Caah4sJr.js +220 -0
  147. package/dist/user-BZC4P_jL.js +55 -0
  148. package/dist/vue-i18n-BYz7XAr_.js +2365 -0
  149. package/dist/xlsx-Bn7BqUFA.js +15491 -0
  150. package/dist/zod-DHH42rXG.js +91 -0
  151. package/package.json +1 -1
@@ -0,0 +1,281 @@
1
+ import { defineComponent as L, ref as F, watch as P, resolveComponent as m, openBlock as x, createElementBlock as C, Fragment as R, createElementVNode as b, createVNode as u, unref as n, withCtx as M, renderList as $, createBlock as D, toDisplayString as O, normalizeClass as U, computed as Y, createCommentVNode as q } from "vue";
2
+ import "./index-Dx9h0FNH.js";
3
+ import { useDialogChild as H, FmButtonVariant as S, useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
4
+ import { u as N } from "./vue-i18n-BYz7XAr_.js";
5
+ import "./index-CmNsGhDf.js";
6
+ import "./index-kedErkLZ.js";
7
+ import "./index-CSVhIZSY.js";
8
+ import "./index-D4SDAfbP.js";
9
+ import { a as A } from "./index-BuMfQxMf.js";
10
+ import "./index-lnQT4P3d.js";
11
+ import { u as g, w as j } from "./xlsx-Bn7BqUFA.js";
12
+ import { F as z } from "./FileSaver.min-CK67LsPG.js";
13
+ import { useCoreStore as G } from "@feedmepos/mf-common";
14
+ import { useRouter as W } from "vue-router";
15
+ import { m as I } from "./index-DVnYQ3Hs.js";
16
+ import { R as E } from "./app-CE5hQ4Uq.js";
17
+ const K = { class: "space-y-8 mb-10" }, X = { class: "flex justify-end" }, Z = {
18
+ key: 1,
19
+ class: /* @__PURE__ */ U([
20
+ "flex items-center",
21
+ "border border-fm-color-neutral-gray-300",
22
+ "p-16 space-x-16 rounded-md"
23
+ ])
24
+ }, ee = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, te = /* @__PURE__ */ L({
25
+ __name: "ImportMemberDialog",
26
+ setup(V) {
27
+ const { t: a } = N(), { emitData: v } = H(), c = F(null), _ = F(null), w = F({
28
+ resetCollectionExpiryBalance: !0
29
+ }), s = [
30
+ "Id",
31
+ "Name",
32
+ "Phone",
33
+ "Email",
34
+ "Gender",
35
+ "CardNo",
36
+ "Birthday",
37
+ "Credit",
38
+ "CreditExpiryDate",
39
+ "Exp",
40
+ "Point",
41
+ "Tier",
42
+ "Titles",
43
+ "TotalTransaction",
44
+ "AvgSpent",
45
+ "TotalSpent",
46
+ "LastVisit",
47
+ "Feedback",
48
+ "LastSeasonTierEarned",
49
+ "LastSeasonPointEarned",
50
+ "JoinedAt",
51
+ "JoinedAtLocation",
52
+ "VisitFrequency"
53
+ ], p = [
54
+ {
55
+ label: "CSV",
56
+ icon: "csv",
57
+ value: "csv"
58
+ /* csv */
59
+ },
60
+ {
61
+ label: "Excel",
62
+ icon: "description",
63
+ value: "xlsx"
64
+ /* xlsx */
65
+ }
66
+ ];
67
+ async function d(i) {
68
+ var t, f;
69
+ c.value = ((f = (t = i.target) == null ? void 0 : t.files) == null ? void 0 : f[0]) ?? null;
70
+ }
71
+ async function y(i) {
72
+ switch (i) {
73
+ case "csv":
74
+ T();
75
+ break;
76
+ case "xlsx":
77
+ h();
78
+ break;
79
+ }
80
+ }
81
+ function T() {
82
+ const i = new Blob([s.join(",")], {
83
+ type: "text/csv;charset=utf-8;"
84
+ });
85
+ z.saveAs(i, "ImportMemberTemplate.csv");
86
+ }
87
+ function h() {
88
+ const i = g.aoa_to_sheet([s]), t = g.book_new();
89
+ g.book_append_sheet(t, i, "Sheet1"), j(t, "ImportMemberTemplate.xlsx");
90
+ }
91
+ return P(c, () => {
92
+ v({ file: c.value, config: w.value });
93
+ }), (i, t) => {
94
+ const f = m("FmSwitch"), k = m("FmButton"), o = m("FmMenuItem"), l = m("FmMenu"), r = m("FmDropField");
95
+ return x(), C(R, null, [
96
+ b("div", K, [
97
+ t[3] || (t[3] = b("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1)),
98
+ u(f, {
99
+ "model-value": n(w).resetCollectionExpiryBalance ?? !0,
100
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => n(w).resetCollectionExpiryBalance = e),
101
+ label: "Replace Existing Free Credit",
102
+ sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
103
+ "label-placement": "right"
104
+ }, null, 8, ["model-value"])
105
+ ]),
106
+ b("div", X, [
107
+ u(l, null, {
108
+ "menu-button": M(() => [
109
+ u(k, {
110
+ variant: "tertiary",
111
+ icon: "download",
112
+ label: "Download Template"
113
+ })
114
+ ]),
115
+ default: M(() => [
116
+ (x(), C(R, null, $(p, (e) => u(o, {
117
+ key: e.value,
118
+ icon: e.icon,
119
+ label: e.label,
120
+ onClick: (B) => y(e.value),
121
+ selectable: ""
122
+ }, null, 8, ["icon", "label", "onClick"])), 64))
123
+ ]),
124
+ _: 1
125
+ })
126
+ ]),
127
+ n(c) ? (x(), C("div", Z, [
128
+ u(k, {
129
+ variant: n(S).Tertiary,
130
+ "prepend-icon": "attach_file"
131
+ }, null, 8, ["variant"]),
132
+ b("p", ee, O(n(c).name), 1),
133
+ b("label", {
134
+ ref_key: "fileLabelRef",
135
+ ref: _,
136
+ htmlFor: "file"
137
+ }, [
138
+ u(k, {
139
+ variant: n(S).Plain,
140
+ label: n(a)("Replace File"),
141
+ onClick: t[2] || (t[2] = () => {
142
+ var e;
143
+ return (e = n(_)) == null ? void 0 : e.click();
144
+ })
145
+ }, null, 8, ["variant", "label"]),
146
+ b("input", {
147
+ id: "file",
148
+ accept: ".csv, .xlsx",
149
+ class: "hidden",
150
+ type: "file",
151
+ multiple: "",
152
+ onChange: d
153
+ }, null, 32)
154
+ ], 512)
155
+ ])) : (x(), D(r, {
156
+ key: 0,
157
+ onFileUpload: t[1] || (t[1] = (e) => c.value = e),
158
+ accept: ".csv, .xlsx",
159
+ "max-file-size": 5e6
160
+ }))
161
+ ], 64);
162
+ };
163
+ }
164
+ }), ne = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ke = /* @__PURE__ */ L({
165
+ __name: "Member",
166
+ setup(V) {
167
+ var t, f, k;
168
+ const a = W(), { t: v } = N(), c = J(), _ = Q(), w = G();
169
+ v("connect.loyalty.member.import"), v("connect.navigation.queue");
170
+ const s = [
171
+ {
172
+ label: v("connect.loyalty.member.tabs.member_list"),
173
+ value: E["$connect-LOYALTY_MEMBER_LIST"],
174
+ actions: (k = (f = (t = w.sessionUser) == null ? void 0 : t.value) == null ? void 0 : f.role) != null && k.isAdmin ? [] : []
175
+ }
176
+ ], p = Y(() => {
177
+ var l, r, e;
178
+ return a.currentRoute.value.name != E["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
179
+ title: d.value.label,
180
+ actions: d.value.actions,
181
+ description: void 0
182
+ } : (d.value = s[1], {
183
+ backButton: !0,
184
+ title: v("connect.loyalty.member.title"),
185
+ actions: [],
186
+ description: `${(l = y.value) == null ? void 0 : l.name} (${(r = y.value) == null ? void 0 : r._id}) (${(e = y.value) == null ? void 0 : e.phoneNumber})`,
187
+ onBackButton: async () => {
188
+ await a.push({ name: E["$connect-LOYALTY_MEMBER_LIST"] });
189
+ }
190
+ });
191
+ }), d = F(
192
+ s.find((o) => o.value === a.currentRoute.value.name) ?? s[0]
193
+ ), y = F();
194
+ async function T(o) {
195
+ await a.push({ name: o });
196
+ }
197
+ async function h() {
198
+ c.open({
199
+ title: "Upload File",
200
+ closeButton: !0,
201
+ dismissAway: !1,
202
+ contentComponent: te,
203
+ primaryActions: { text: "Import", close: !1 }
204
+ }).onPrimary(async (o) => {
205
+ if (!o) {
206
+ _.open({
207
+ type: "error",
208
+ title: "Please upload a file"
209
+ });
210
+ return;
211
+ }
212
+ const { file: l, config: r } = o;
213
+ if (!l)
214
+ _.open({
215
+ type: "error",
216
+ title: "Please upload a file"
217
+ });
218
+ else {
219
+ const e = new FormData();
220
+ e.append("file", l), e.append("config", JSON.stringify(r)), await I.import(e), _.open({
221
+ type: "info",
222
+ title: "Import begins soon. Check Queue for updates.",
223
+ action: "View",
224
+ onAction: async () => {
225
+ await a.push({
226
+ name: E["$connect-QUEUE"],
227
+ query: { type: [A.enum.MEMBER_IMPORTED] }
228
+ });
229
+ }
230
+ }), c.close();
231
+ }
232
+ });
233
+ }
234
+ function i(o) {
235
+ switch (o) {
236
+ case "import":
237
+ h();
238
+ break;
239
+ case "queue":
240
+ a.push({
241
+ name: E["$connect-QUEUE"],
242
+ query: { type: [A.enum.MEMBER_IMPORTED] }
243
+ });
244
+ break;
245
+ }
246
+ }
247
+ return P(
248
+ () => a.currentRoute.value.name,
249
+ async (o) => {
250
+ d.value = s.find((r) => r.value === o) ?? s[0];
251
+ const l = a.currentRoute.value.params.id;
252
+ l && (y.value = await I.readById(l));
253
+ },
254
+ { immediate: !0 }
255
+ ), (o, l) => {
256
+ const r = m("FmPageHead"), e = m("FmTabs"), B = m("RouterView");
257
+ return x(), C(R, null, [
258
+ u(r, {
259
+ actions: n(p).actions,
260
+ title: n(p).title,
261
+ description: n(p).description,
262
+ "back-button": n(p).backButton,
263
+ "onClick:back": n(p).onBackButton,
264
+ "onClick:action": i
265
+ }, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
266
+ b("div", ne, [
267
+ n(a).currentRoute.value.name != n(E)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (x(), D(e, {
268
+ key: 0,
269
+ "model-value": n(d).value,
270
+ items: s,
271
+ "onUpdate:modelValue": T
272
+ }, null, 8, ["model-value"])) : q("", !0),
273
+ u(B)
274
+ ])
275
+ ], 64);
276
+ };
277
+ }
278
+ });
279
+ export {
280
+ ke as default
281
+ };