@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.2

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 (116) hide show
  1. package/dist/Analytic-BjSfI2Ff.js +761 -0
  2. package/dist/{App-Bpo0XZSs.js → App-D11A2JY1.js} +364 -352
  3. package/dist/AuditLogs-DWCFYoRg.js +1887 -0
  4. package/dist/{Bin-ohZ2CZZR.js → Bin-9wV4Ah3M.js} +8 -8
  5. package/dist/{Broadcast-D5x0_-zC.js → Broadcast-I3BtSk8V.js} +40 -40
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js} +18 -18
  7. package/dist/{Card-BM-Lrm5y.js → Card-CqALG5RM.js} +159 -159
  8. package/dist/{Collections-Cr4aoJer.js → Collections-rg3SzoUb.js} +103 -91
  9. package/dist/{Credit-DzDVFv4H.js → Credit-BNn1sYZv.js} +74 -74
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js} +491 -488
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js} +91 -89
  13. package/dist/{Experience-CjaDdbvZ.js → Experience-D_Qm8SUj.js} +41 -41
  14. package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
  15. package/dist/{Game-BuiTygow.js → Game-CKXgXm6Q.js} +31 -31
  16. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  17. package/dist/{Index-CQGzUU-w.js → Index-D4DGfUHd.js} +10 -10
  18. package/dist/Marketing-Dn9A1vgH.js +20073 -0
  19. package/dist/Member-B55vWHDd.js +279 -0
  20. package/dist/MemberList-BWTG9Ohy.js +1606 -0
  21. package/dist/MemberOverview-wL_ailso.js +58 -0
  22. package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-CP5EI-W0.js} +1 -1
  23. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +60279 -0
  24. package/dist/{Mission-BtypT2uF.js → Mission-CFvhROuB.js} +21 -21
  25. package/dist/{Overview-Be7bUtRO.js → Overview-4273yNwL.js} +335 -335
  26. package/dist/{Point-Bw4lnLqp.js → Point-B_-_C919.js} +41 -41
  27. package/dist/Promotion-D2S3COxk.js +289 -0
  28. package/dist/{Queue-CpPEVgn8.js → Queue-BmS1Oi-C.js} +52 -52
  29. package/dist/{Record-DQq4P69i.js → Record-DRBl0M8g.js} +9 -9
  30. package/dist/{Reward-DJH0eM8u.js → Reward-8056NmfK.js} +173 -173
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js} +11 -11
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js} +635 -548
  33. package/dist/Segment-Bzq-pyhc.js +882 -0
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js} +11 -11
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js} +3 -3
  37. package/dist/{Setting-GRIUo7vg.js → Setting-BrJfYoru.js} +432 -432
  38. package/dist/{Store-H0UDQpln.js → Store-Bpl_4yZW.js} +211 -211
  39. package/dist/StoreRewards-Cu7n7Pjz.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +1029 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js} +1 -1
  42. package/dist/{Tier-CJufQcIz.js → Tier-_LnXg3n6.js} +106 -106
  43. package/dist/{Title-BBMgGUld.js → Title-B7AGStvx.js} +133 -131
  44. package/dist/{Transaction-DsucPnfp.js → Transaction-Chxv6V7u.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js} +6 -6
  46. package/dist/{Voucher-BPvxKO_w.js → Voucher-C5z2kOq9.js} +153 -123
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js} +1 -1
  49. package/dist/{app-D3MT1deX.js → app-7cvPyHJ7.js} +164 -125
  50. package/dist/{app-Bo0JpadQ.js → app-BVojNX0w.js} +1 -1
  51. package/dist/app.js +4 -3
  52. package/dist/business-CmxV69wT.js +79 -0
  53. package/dist/{campaign-Z3l7BoMg.js → campaign-CT_cNJEL.js} +9 -9
  54. package/dist/{campaign-j1c3ou7l.js → campaign-Dq5C_no-.js} +5 -3
  55. package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-dp7yHKzF.js} +1 -1
  56. package/dist/campaign.fn-BYZgKDN7.js +758 -0
  57. package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-DxbB4DxT.js} +1 -1
  58. package/dist/{collection.fn-Bz38mGMa.js → collection.fn-CNZRdUgy.js} +2 -2
  59. package/dist/{dto-D648NN4s.js → dto-CT9zZbv9.js} +4 -4
  60. package/dist/{effect-DbMAmVSR.js → effect-FIlOEC4H.js} +1 -1
  61. package/dist/{email-addresses-KOVDrRiK.js → email-addresses-Ba7xImfX.js} +1 -1
  62. package/dist/{export-cTZf8Avd.js → export-uzjZFNF9.js} +3 -3
  63. package/dist/{helper-BYyfcLqw.js → helper-D4sAZde0.js} +1 -1
  64. package/dist/{index-BIaCtk8e.js → index-B9pl4zRZ.js} +192 -79
  65. package/dist/{index-B4MqsaBz.js → index-BI3m1Ehv.js} +3 -3
  66. package/dist/{index-E-0tTd0_.js → index-BXz54M1s.js} +1 -1
  67. package/dist/{index-BMl2KZts.js → index-BjU8LVUC.js} +11447 -10969
  68. package/dist/index-CH3z92VV.js +31 -0
  69. package/dist/{index-BTb8I_eB.js → index-CNJLP3D5.js} +1 -1
  70. package/dist/{index-BrKXRxe_.js → index-CONvJfKv.js} +1 -1
  71. package/dist/index-CS3Jmojj.js +32260 -0
  72. package/dist/{index-CTPMbFf5.js → index-CUfS9Kp1.js} +10 -9
  73. package/dist/index-CsaQJMAR.js +66 -0
  74. package/dist/{index-nF9iYTlh.js → index-CvBcve-r.js} +1 -1
  75. package/dist/index-CwsMG2cV.js +56 -0
  76. package/dist/{index-B3p0hmIV.js → index-D5rvMvzx.js} +1 -1
  77. package/dist/{index-CvoShC5J.js → index-DNxa8Rqx.js} +536 -461
  78. package/dist/{index-DPBHiqsJ.js → index-l2F5MnLF.js} +1 -1
  79. package/dist/{index.esm2017-DFYwde30.js → index.esm2017-ATcsD5N4.js} +127 -127
  80. package/dist/{loading-vUArhX_O.js → loading-BWGQSrCB.js} +1 -1
  81. package/dist/{membership-BHKv29yt.js → membership-Cc4OZ8-U.js} +3 -3
  82. package/dist/{money-Bl3_QRkE.js → money-D7p8nfun.js} +1 -1
  83. package/dist/{number-hh_S9w7k.js → number-CMJjC4qz.js} +1 -1
  84. package/dist/objectid-D5T27iny.js +145 -0
  85. package/dist/{plugins-CVes2wzE.js → plugins-eQis66QR.js} +2 -2
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/{reward-ANZOdWzf.js → reward-DrnzbG20.js} +1 -1
  88. package/dist/{rule-BvFk5bQg.js → rule-CtRxkYXB.js} +3 -3
  89. package/dist/{rule-builder-BSN777PN.js → rule-builder-Di9RIYHF.js} +17 -17
  90. package/dist/style.css +1 -1
  91. package/dist/{template-Dh9lDLs_.js → template-C3UfY0v5.js} +64 -64
  92. package/dist/{trigger-C7THbt7R.js → trigger-C9U7Zgad.js} +7 -7
  93. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  94. package/dist/{user-DtNR9JY2.js → user-D7n9yYmO.js} +1 -1
  95. package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-Bz45zC04.js} +387 -387
  96. package/dist/{xlsx-7u9SB0oa.js → xlsx-D4S4qbcZ.js} +226 -226
  97. package/package.json +9 -3
  98. package/dist/Analytic-CavR2bzs.js +0 -427
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/Marketing-BSspYuhg.js +0 -319
  101. package/dist/Member-B4S0UNGq.js +0 -287
  102. package/dist/MemberList-CfnUJ3mh.js +0 -1606
  103. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  104. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js +0 -455
  105. package/dist/Promotion-Bg6x0rAh.js +0 -255
  106. package/dist/Segment-BLB4VWNJ.js +0 -882
  107. package/dist/StoreRewards--TNIFaCo.js +0 -423
  108. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
  109. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
  110. package/dist/business-DMALI7ZO.js +0 -78
  111. package/dist/campaign.fn-rsRhHYZP.js +0 -758
  112. package/dist/index-BsCGyJMY.js +0 -29566
  113. package/dist/index-CuvNtC_M.js +0 -61
  114. package/dist/index-DFKmjCG1.js +0 -44
  115. package/dist/index-Dbd4WA4r.js +0 -61
  116. package/dist/objectid-CEyMlMge.js +0 -145
@@ -0,0 +1,279 @@
1
+ import { defineComponent as L, ref as F, watch as P, resolveComponent as m, openBlock as x, createElementBlock as h, 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-CNJLP3D5.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-Bz45zC04.js";
5
+ import "./index-B9pl4zRZ.js";
6
+ import { c as A } from "./index-DNxa8Rqx.js";
7
+ import "./index-CUfS9Kp1.js";
8
+ import "./index-CONvJfKv.js";
9
+ import "./index-BI3m1Ehv.js";
10
+ import { u as g, w as j } from "./xlsx-D4S4qbcZ.js";
11
+ import { F as z } from "./FileSaver.min-NlMItPOc.js";
12
+ import { useCoreStore as G } from "@feedmepos/mf-common";
13
+ import { useRouter as W } from "vue-router";
14
+ import { m as I } from "./index-CvBcve-r.js";
15
+ import { R as E } from "./app-7cvPyHJ7.js";
16
+ const K = { class: "space-y-8 mb-10" }, X = { class: "flex justify-end" }, Z = {
17
+ key: 1,
18
+ class: /* @__PURE__ */ U([
19
+ "flex items-center",
20
+ "border border-fm-color-neutral-gray-300",
21
+ "p-16 space-x-16 rounded-md"
22
+ ])
23
+ }, ee = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, te = /* @__PURE__ */ L({
24
+ __name: "ImportMemberDialog",
25
+ setup(V) {
26
+ const { t: a } = N(), { emitData: _ } = H(), c = F(null), v = F(null), w = F({
27
+ resetCollectionExpiryBalance: !0
28
+ }), s = [
29
+ "Id",
30
+ "Name",
31
+ "Phone",
32
+ "Email",
33
+ "Gender",
34
+ "CardNo",
35
+ "Birthday",
36
+ "Credit",
37
+ "CreditExpiryDate",
38
+ "Exp",
39
+ "Point",
40
+ "Tier",
41
+ "Titles",
42
+ "TotalTransaction",
43
+ "AvgSpent",
44
+ "TotalSpent",
45
+ "LastVisit",
46
+ "Feedback",
47
+ "LastSeasonTierEarned",
48
+ "LastSeasonPointEarned",
49
+ "JoinedAt",
50
+ "JoinedAtLocation",
51
+ "VisitFrequency"
52
+ ], p = [
53
+ {
54
+ label: "CSV",
55
+ icon: "csv",
56
+ value: "csv"
57
+ /* csv */
58
+ },
59
+ {
60
+ label: "Excel",
61
+ icon: "description",
62
+ value: "xlsx"
63
+ /* xlsx */
64
+ }
65
+ ];
66
+ async function d(i) {
67
+ var t, f;
68
+ c.value = ((f = (t = i.target) == null ? void 0 : t.files) == null ? void 0 : f[0]) ?? null;
69
+ }
70
+ async function y(i) {
71
+ switch (i) {
72
+ case "csv":
73
+ C();
74
+ break;
75
+ case "xlsx":
76
+ T();
77
+ break;
78
+ }
79
+ }
80
+ function C() {
81
+ const i = new Blob([s.join(",")], {
82
+ type: "text/csv;charset=utf-8;"
83
+ });
84
+ z.saveAs(i, "ImportMemberTemplate.csv");
85
+ }
86
+ function T() {
87
+ const i = g.aoa_to_sheet([s]), t = g.book_new();
88
+ g.book_append_sheet(t, i, "Sheet1"), j(t, "ImportMemberTemplate.xlsx");
89
+ }
90
+ return P(c, () => {
91
+ _({ file: c.value, config: w.value });
92
+ }), (i, t) => {
93
+ const f = m("FmSwitch"), k = m("FmButton"), o = m("FmMenuItem"), l = m("FmMenu"), r = m("FmDropField");
94
+ return x(), h(R, null, [
95
+ b("div", K, [
96
+ t[3] || (t[3] = b("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1)),
97
+ u(f, {
98
+ "model-value": n(w).resetCollectionExpiryBalance ?? !0,
99
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => n(w).resetCollectionExpiryBalance = e),
100
+ label: "Replace Existing Free Credit",
101
+ sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
102
+ "label-placement": "right"
103
+ }, null, 8, ["model-value"])
104
+ ]),
105
+ b("div", X, [
106
+ u(l, null, {
107
+ "menu-button": M(() => [
108
+ u(k, {
109
+ variant: "tertiary",
110
+ icon: "download",
111
+ label: "Download Template"
112
+ })
113
+ ]),
114
+ default: M(() => [
115
+ (x(), h(R, null, $(p, (e) => u(o, {
116
+ key: e.value,
117
+ icon: e.icon,
118
+ label: e.label,
119
+ onClick: (B) => y(e.value),
120
+ selectable: ""
121
+ }, null, 8, ["icon", "label", "onClick"])), 64))
122
+ ]),
123
+ _: 1
124
+ })
125
+ ]),
126
+ n(c) ? (x(), h("div", Z, [
127
+ u(k, {
128
+ variant: n(S).Tertiary,
129
+ "prepend-icon": "attach_file"
130
+ }, null, 8, ["variant"]),
131
+ b("p", ee, O(n(c).name), 1),
132
+ b("label", {
133
+ ref_key: "fileLabelRef",
134
+ ref: v,
135
+ htmlFor: "file"
136
+ }, [
137
+ u(k, {
138
+ variant: n(S).Plain,
139
+ label: n(a)("Replace File"),
140
+ onClick: t[2] || (t[2] = () => {
141
+ var e;
142
+ return (e = n(v)) == null ? void 0 : e.click();
143
+ })
144
+ }, null, 8, ["variant", "label"]),
145
+ b("input", {
146
+ id: "file",
147
+ accept: ".csv, .xlsx",
148
+ class: "hidden",
149
+ type: "file",
150
+ multiple: "",
151
+ onChange: d
152
+ }, null, 32)
153
+ ], 512)
154
+ ])) : (x(), D(r, {
155
+ key: 0,
156
+ onFileUpload: t[1] || (t[1] = (e) => c.value = e),
157
+ accept: ".csv, .xlsx",
158
+ "max-file-size": 5e6
159
+ }))
160
+ ], 64);
161
+ };
162
+ }
163
+ }), ne = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ye = /* @__PURE__ */ L({
164
+ __name: "Member",
165
+ setup(V) {
166
+ var t, f, k;
167
+ const a = W(), { t: _ } = N(), c = J(), v = Q(), w = G();
168
+ _("connect.loyalty.member.import"), _("connect.navigation.queue");
169
+ const s = [
170
+ {
171
+ label: _("connect.loyalty.member.tabs.member_list"),
172
+ value: E["$connect-LOYALTY_MEMBER_LIST"],
173
+ actions: (k = (f = (t = w.sessionUser) == null ? void 0 : t.value) == null ? void 0 : f.role) != null && k.isAdmin ? [] : []
174
+ }
175
+ ], p = Y(() => {
176
+ var l, r, e;
177
+ return a.currentRoute.value.name != E["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
178
+ title: d.value.label,
179
+ actions: d.value.actions,
180
+ description: void 0
181
+ } : (d.value = s[1], {
182
+ backButton: !0,
183
+ title: _("connect.loyalty.member.title"),
184
+ actions: [],
185
+ 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})`,
186
+ onBackButton: async () => {
187
+ await a.push({ name: E["$connect-LOYALTY_MEMBER_LIST"] });
188
+ }
189
+ });
190
+ }), d = F(
191
+ s.find((o) => o.value === a.currentRoute.value.name) ?? s[0]
192
+ ), y = F();
193
+ async function C(o) {
194
+ await a.push({ name: o });
195
+ }
196
+ async function T() {
197
+ c.open({
198
+ title: "Upload File",
199
+ closeButton: !0,
200
+ dismissAway: !1,
201
+ contentComponent: te,
202
+ primaryActions: { text: "Import", close: !1 }
203
+ }).onPrimary(async (o) => {
204
+ if (!o) {
205
+ v.open({
206
+ type: "error",
207
+ title: "Please upload a file"
208
+ });
209
+ return;
210
+ }
211
+ const { file: l, config: r } = o;
212
+ if (!l)
213
+ v.open({
214
+ type: "error",
215
+ title: "Please upload a file"
216
+ });
217
+ else {
218
+ const e = new FormData();
219
+ e.append("file", l), e.append("config", JSON.stringify(r)), await I.import(e), v.open({
220
+ type: "info",
221
+ title: "Import begins soon. Check Queue for updates.",
222
+ action: "View",
223
+ onAction: async () => {
224
+ await a.push({
225
+ name: E["$connect-QUEUE"],
226
+ query: { type: [A.enum.MEMBER_IMPORTED] }
227
+ });
228
+ }
229
+ }), c.close();
230
+ }
231
+ });
232
+ }
233
+ function i(o) {
234
+ switch (o) {
235
+ case "import":
236
+ T();
237
+ break;
238
+ case "queue":
239
+ a.push({
240
+ name: E["$connect-QUEUE"],
241
+ query: { type: [A.enum.MEMBER_IMPORTED] }
242
+ });
243
+ break;
244
+ }
245
+ }
246
+ return P(
247
+ () => a.currentRoute.value.name,
248
+ async (o) => {
249
+ d.value = s.find((r) => r.value === o) ?? s[0];
250
+ const l = a.currentRoute.value.params.id;
251
+ l && (y.value = await I.readById(l)), await a.push({ name: o });
252
+ }
253
+ ), (o, l) => {
254
+ const r = m("FmPageHead"), e = m("FmTabs"), B = m("RouterView");
255
+ return x(), h(R, null, [
256
+ u(r, {
257
+ actions: n(p).actions,
258
+ title: n(p).title,
259
+ description: n(p).description,
260
+ "back-button": n(p).backButton,
261
+ "onClick:back": n(p).onBackButton,
262
+ "onClick:action": i
263
+ }, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
264
+ b("div", ne, [
265
+ n(a).currentRoute.value.name != n(E)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (x(), D(e, {
266
+ key: 0,
267
+ "model-value": n(d).value,
268
+ items: s,
269
+ "onUpdate:modelValue": C
270
+ }, null, 8, ["model-value"])) : q("", !0),
271
+ u(B)
272
+ ])
273
+ ], 64);
274
+ };
275
+ }
276
+ });
277
+ export {
278
+ ye as default
279
+ };