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

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-B3CAyfBN.js +4785 -0
  2. package/dist/AuditLogs-6Nx6aZDu.js +2014 -0
  3. package/dist/Bin-CvxKrShs.js +166 -0
  4. package/dist/Broadcast-DtGZvaI8.js +269 -0
  5. package/dist/CampaignAnalytic-Ch3r1Rvg.js +1826 -0
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D5V8gcBo.js +122 -0
  7. package/dist/Card-sfr6w0_O.js +911 -0
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  9. package/dist/Collections-BXBpPmnS.js +541 -0
  10. package/dist/Credit-C733PkQ7.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-DL93wXB3.js +3382 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-78ACNCQb.js +351 -0
  15. package/dist/Experience-B5TE29sq.js +285 -0
  16. package/dist/FileSaver.min-uNXEaKFf.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-sVgPJlky.js +356 -0
  20. package/dist/GiftCardSetup-DnDJAEkL.js +542 -0
  21. package/dist/Grab-s5MAs0OX.js +301 -0
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-CmLV1NBe.js +145 -0
  23. package/dist/Index-ClMsQE_a.js +259 -0
  24. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  25. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-Bhhtt6Tx.js +48 -0
  26. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-BubkhiNi.js +18737 -0
  27. package/dist/LoyaltyDashboard-1HbbXSc2.js +1345 -0
  28. package/dist/MainLayout-CxHx8E6E.js +143 -0
  29. package/dist/Marketing-JoBpCgYv.js +236 -0
  30. package/dist/MarketingMaterialEdit-CWZYM5Yk.js +1036 -0
  31. package/dist/Member-97blstVa.js +281 -0
  32. package/dist/MemberList-CdcutIMW.js +1603 -0
  33. package/dist/MemberOverview-wL_ailso.js +58 -0
  34. package/dist/MemberTransactions-CXW1gGcm.js +45 -0
  35. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BYF5TTe5.js +60957 -0
  36. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  37. package/dist/Mission-BHjuhYLP.js +360 -0
  38. package/dist/Overview-BAY6pqBp.js +1316 -0
  39. package/dist/Overview-D8fc_MlB.js +1080 -0
  40. package/dist/Point-DbRROw9n.js +288 -0
  41. package/dist/Promotion-Il9bEPzn.js +423 -0
  42. package/dist/Queue-BCMs3-Kw.js +261 -0
  43. package/dist/Record-DIHRf5iG.js +342 -0
  44. package/dist/Review-CcS_JCae.js +45 -0
  45. package/dist/ReviewFacebookCallback-QzevpKzX.js +238 -0
  46. package/dist/ReviewGoogleCallback-K8bqS2A4.js +213 -0
  47. package/dist/Reward-B8L_xU15.js +442 -0
  48. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-9oZZkhfs.js +150 -0
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DJZIbazu.js +1913 -0
  50. package/dist/Segment-DmepUJOa.js +1017 -0
  51. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BNyULlPJ.js +181 -0
  52. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-ClXst_jA.js +189 -0
  53. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfpKPA2p.js +226 -0
  54. package/dist/Setting-CtHKuMIu.js +2047 -0
  55. package/dist/SettingAdvertisements-BrLybMH8.js +264 -0
  56. package/dist/Settings-BlZVvVtV.js +179 -0
  57. package/dist/Store-Ce2SbX0d.js +2413 -0
  58. package/dist/StoreRewards-Bm81xn3d.js +540 -0
  59. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-R5MWAGzJ.js +1075 -0
  60. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BMujGIhR.js +7007 -0
  61. package/dist/Tier-DiPQgsjw.js +972 -0
  62. package/dist/Title-CMPiLqUp.js +569 -0
  63. package/dist/Transaction-DA2jVRko.js +39 -0
  64. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-4ys1liCk.js +130 -0
  65. package/dist/Voucher-CZMOj1Xu.js +444 -0
  66. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BGbrah1l.js +421 -0
  67. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-DvYcjxky.js +56 -0
  68. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  69. package/dist/app-B3qT3nsb.js +60740 -0
  70. package/dist/app-wDQR6dpb.js +39 -0
  71. package/dist/app.js +7 -0
  72. package/dist/business-BbVttO00.js +82 -0
  73. package/dist/campaign-BNM35vw2.js +255 -0
  74. package/dist/campaign-C6p9x-9d.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-TfiVDVkR.js +776 -0
  78. package/dist/collectible.enum-Liy2wH3s.js +19 -0
  79. package/dist/collection.fn-CKl_NLpS.js +26 -0
  80. package/dist/duplicateCampaign-BFg9AZ-l.js +51 -0
  81. package/dist/effect-CGbgx9kS.js +89 -0
  82. package/dist/email-addresses-CzatVfeH.js +705 -0
  83. package/dist/export-DjvICnFV.js +97 -0
  84. package/dist/feedme.ico +0 -0
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/helper-HQorVUMh.js +86 -0
  87. package/dist/index-BNKPvyUY.js +28900 -0
  88. package/dist/index-BNzGRDns.js +53 -0
  89. package/dist/index-BPtDWOrz.js +1139 -0
  90. package/dist/index-Bf2N1qeK.js +32 -0
  91. package/dist/index-C4pslTm_.js +897 -0
  92. package/dist/index-C8cXXcLk.js +45 -0
  93. package/dist/index-CGiyd5Q7.js +31 -0
  94. package/dist/index-CKxNuOh2.js +151 -0
  95. package/dist/index-C_-av7al.js +72 -0
  96. package/dist/index-C_H8jFYf.js +2743 -0
  97. package/dist/index-CuvNtC_M.js +61 -0
  98. package/dist/index-DC9OMIQu.js +27550 -0
  99. package/dist/index-DI9TwnmP.js +67 -0
  100. package/dist/index-DWYB78be.js +3 -0
  101. package/dist/index-DjjsQxLD.js +2963 -0
  102. package/dist/index-DwcKpsO0.js +8919 -0
  103. package/dist/index-OsrR99nz.js +2706 -0
  104. package/dist/index-Ym4KAIL3.js +146 -0
  105. package/dist/index-auyC0MNX.js +85 -0
  106. package/dist/index-bXngr6rb.js +55 -0
  107. package/dist/index-vh86FiIQ.js +10 -0
  108. package/dist/index.esm2017-DjodoeJW.js +3069 -0
  109. package/dist/loading-DYYV5H0l.js +72 -0
  110. package/dist/lodash-CChygi2L.js +3678 -0
  111. package/dist/membership-DwhS8gsL.js +255 -0
  112. package/dist/moment-D7p2TMB-.js +2583 -0
  113. package/dist/money-19HRkrob.js +15 -0
  114. package/dist/number-blMtEdkv.js +12 -0
  115. package/dist/object-BYyQ0PZp.js +18 -0
  116. package/dist/objectId-dwaoBfJX.js +7 -0
  117. package/dist/objectid-BetMyH-a.js +145 -0
  118. package/dist/plugins-Ci4CKjMq.js +1788 -0
  119. package/dist/remy-Qz_pNsUS.js +13 -0
  120. package/dist/reward-DsENxEEE.js +36 -0
  121. package/dist/rule-Dtk4Xv3Y.js +1969 -0
  122. package/dist/rule-builder-CvACRFlj.js +126 -0
  123. package/dist/string-Gcy5IM_H.js +32 -0
  124. package/dist/style.css +4 -0
  125. package/dist/template-yQY1n3kU.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-DSXtFjzU.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-V-QeX59p.js +64 -0
  142. package/dist/trigger-C-KQqjJ5.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-CwlbleSs.js +96 -0
  146. package/dist/usePagination-CyrlK5t1.js +220 -0
  147. package/dist/user-e-9bpi9B.js +55 -0
  148. package/dist/vue-i18n-BllhhX6m.js +2365 -0
  149. package/dist/xlsx-D_mKpQNd.js +15491 -0
  150. package/dist/zod-BJAeJJJS.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-DWYB78be.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-BllhhX6m.js";
5
+ import "./index-OsrR99nz.js";
6
+ import "./index-DjjsQxLD.js";
7
+ import "./index-DwcKpsO0.js";
8
+ import "./index-DC9OMIQu.js";
9
+ import { a as A } from "./index-C4pslTm_.js";
10
+ import "./index-bXngr6rb.js";
11
+ import { u as g, w as j } from "./xlsx-D_mKpQNd.js";
12
+ import { F as z } from "./FileSaver.min-uNXEaKFf.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-auyC0MNX.js";
16
+ import { R as E } from "./app-B3qT3nsb.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
+ };