@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.70

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 (123) hide show
  1. package/dist/Analytic-DEQUEGlq.js +427 -0
  2. package/dist/{App-DalxIjTu.js → App-CcoU2SAx.js} +445 -420
  3. package/dist/AuditLogs-CiB6u06w.js +1886 -0
  4. package/dist/Bin-C2_1m5RT.js +166 -0
  5. package/dist/{Broadcast-uMAvsC--.js → Broadcast-TotIXDuJ.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CixQu3Pr.js} +6 -8
  7. package/dist/Card-Ce-_xMgS.js +896 -0
  8. package/dist/Collections-DKva6Doi.js +459 -0
  9. package/dist/{Credit-QlnatflM.js → Credit-BVUxIJ6C.js} +36 -34
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKEumoan.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-ah4bz-qR.js} +49 -49
  14. package/dist/{Experience-Czy41ifp.js → Experience-DV3384o0.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/Game-DY83ti52.js +278 -0
  17. package/dist/Index-DEIaZ-2H.js +259 -0
  18. package/dist/Marketing-C2RwIlrg.js +20071 -0
  19. package/dist/Member-D4fc-wzd.js +333 -0
  20. package/dist/MemberList-DSMI6t_D.js +1598 -0
  21. package/dist/MemberTransactions-wXUlbbRq.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-DYS0klKm.js} +135 -120
  23. package/dist/Mission-P_KLDEpg.js +296 -0
  24. package/dist/Overview-8vc0f1D7.js +1078 -0
  25. package/dist/{Point-By6ogYy_.js → Point-B4Y0Pq60.js} +55 -53
  26. package/dist/{Promotion-DKcBr-RI.js → Promotion-C1CbesgZ.js} +65 -57
  27. package/dist/Queue-BlPA7PNH.js +244 -0
  28. package/dist/Record-Cl1qXSSk.js +340 -0
  29. package/dist/Reward-jy6-W1Eh.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-d5JNNNHf.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DYul_Nu8.js +1640 -0
  32. package/dist/Segment-B36Nrvxs.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-jN0xUFNR.js +181 -0
  34. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js +186 -0
  35. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-H_Sehhgf.js +147 -0
  36. package/dist/Setting-AgQf2X4W.js +1931 -0
  37. package/dist/Store-D3Mm0pan.js +1841 -0
  38. package/dist/StoreRewards-L0VLWz8l.js +423 -0
  39. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js +1028 -0
  40. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b4mfueTj.js} +1 -1
  41. package/dist/{Tier-DvAs0-yx.js → Tier-DQq-375x.js} +327 -318
  42. package/dist/{Title-B_Trr39o.js → Title-OJxuBvaa.js} +224 -209
  43. package/dist/{Transaction-DCJw-b3H.js → Transaction-vgsYRfD7.js} +2 -2
  44. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Cwi0mvC3.js +130 -0
  45. package/dist/Voucher-BFwLaoxe.js +354 -0
  46. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNUBaNtJ.js +419 -0
  47. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-ms40eptZ.js} +1 -1
  48. package/dist/app-BQFTJ_hE.js +33357 -0
  49. package/dist/app-D7C3Fxfi.js +7077 -0
  50. package/dist/app.js +1 -1
  51. package/dist/{business-BC4-i1cU.js → business-vzpvmTdG.js} +1 -1
  52. package/dist/{campaign--0_yMbMV.js → campaign-BkxTDfsK.js} +2 -2
  53. package/dist/campaign-UQ8kMVeC.js +1810 -0
  54. package/dist/campaign.enum-BdT-e9h9.js +20 -0
  55. package/dist/campaign.fn-lc4ZhFCU.js +758 -0
  56. package/dist/collectible.enum-C8kd17Tz.js +19 -0
  57. package/dist/{collection.fn-3TwPe7aF.js → collection.fn-BIw1Y_tv.js} +2 -2
  58. package/dist/dto-CwzAhB8x.js +214 -0
  59. package/dist/{effect-BeR0LK61.js → effect-CJcvLlKG.js} +33 -16
  60. package/dist/email-addresses-BCJTQPT0.js +705 -0
  61. package/dist/{export-xeLLhqvh.js → export-URRwle1z.js} +5 -5
  62. package/dist/{helper-B5iqfKh8.js → helper-DccnE6zn.js} +1 -1
  63. package/dist/index-BiIZ7X6d.js +29556 -0
  64. package/dist/{index-CyKZ-SsN.js → index-BsRJ4kVb.js} +1 -1
  65. package/dist/{index-CU_d8jjU.js → index-C3lpXz_P.js} +1 -1
  66. package/dist/{index-Ct_wR519.js → index-CFA3EqId.js} +24 -21
  67. package/dist/{index-DP-dGMJC.js → index-CPRN3irj.js} +2230 -871
  68. package/dist/index-CaxFS90M.js +56 -0
  69. package/dist/index-CsaQJMAR.js +66 -0
  70. package/dist/index-D4MX9e5q.js +115 -0
  71. package/dist/index-DrE9VkxR.js +32 -0
  72. package/dist/index-EOPRlB9V.js +54 -0
  73. package/dist/{index-CAn5heDe.js → index-FcxOGFKj.js} +48 -4
  74. package/dist/{index-Bh-uaaBG.js → index-OScGm4mF.js} +1506 -1480
  75. package/dist/{index-BOdtpNkP.js → index-ghSGvG-m.js} +266 -173
  76. package/dist/index-vh86FiIQ.js +10 -0
  77. package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CE1CQHrP.js} +121 -121
  78. package/dist/loading-B8zghYbj.js +71 -0
  79. package/dist/{membership-D0nqqWNZ.js → membership-DoJMF2T6.js} +54 -46
  80. package/dist/money-CTR0rXZw.js +15 -0
  81. package/dist/number-Bhgz9eFP.js +12 -0
  82. package/dist/objectid-DdVJrRBw.js +145 -0
  83. package/dist/{loading-C-JDVajU.js → plugins-B5mQ7CHT.js} +3871 -3943
  84. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  85. package/dist/reward-DicsEEHe.js +36 -0
  86. package/dist/{rule-builder-BXt29Es4.js → rule-builder-BWb4JTrd.js} +1 -1
  87. package/dist/{rule-Dn_GgBCe.js → rule-s8siRar1.js} +185 -178
  88. package/dist/style.css +1 -1
  89. package/dist/{template-D2Oi3dxP.js → template-Qb5ozfLa.js} +5 -5
  90. package/dist/trigger-Bsb3Kj35.js +144 -0
  91. package/dist/user-DJ8aHRaM.js +54 -0
  92. package/dist/{vue-i18n-Dud8fvmw.js → vue-i18n-BG2U7GtN.js} +282 -282
  93. package/dist/{xlsx-CCRCidY2.js → xlsx-2QxyDFwt.js} +1 -1
  94. package/package.json +11 -7
  95. package/dist/Analytic-BMpS6jWb.js +0 -622
  96. package/dist/Card-DV8-g69L.js +0 -825
  97. package/dist/Collections-DRafEHT1.js +0 -453
  98. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
  99. package/dist/Game-CD3zSitz.js +0 -255
  100. package/dist/Marketing-NNes8z6Q.js +0 -316
  101. package/dist/Member-CTqBgYuV.js +0 -69
  102. package/dist/MemberList-B99tS5ce.js +0 -1733
  103. package/dist/MemberTransactions-D1YCXPOg.js +0 -38
  104. package/dist/Mission-XbBVKBiE.js +0 -261
  105. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
  106. package/dist/Segment-B8cszL-F.js +0 -437
  107. package/dist/Setting-aZYABlMW.js +0 -1901
  108. package/dist/Store-Bx2tyJwe.js +0 -1511
  109. package/dist/StoreRewards-DTp9G6gw.js +0 -401
  110. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
  111. package/dist/Voucher-jqv3ji90.js +0 -490
  112. package/dist/app-WlcUVbFb.js +0 -5764
  113. package/dist/app-_w0hjM7u.js +0 -53428
  114. package/dist/dto-Ns2dLn1B.js +0 -2770
  115. package/dist/index-BWb9vRCi.js +0 -29193
  116. package/dist/index-CpU9aqyW.js +0 -206
  117. package/dist/index-CqO_ZvtD.js +0 -99
  118. package/dist/index-CuvNtC_M.js +0 -61
  119. package/dist/index-DsNsA2uX.js +0 -298
  120. package/dist/index-WAMr3npT.js +0 -762
  121. package/dist/money-hdbrblud.js +0 -15
  122. package/dist/number-CRWGOZaW.js +0 -12
  123. package/dist/user-Bm4KttFq.js +0 -37
@@ -0,0 +1,296 @@
1
+ import { defineComponent as H, ref as w, computed as q, h as l, onMounted as z, resolveComponent as m, openBlock as p, createElementBlock as x, Fragment as v, createVNode as c, unref as t, createElementVNode as s, withCtx as C, renderList as W, createBlock as b, resolveDynamicComponent as G, toDisplayString as u } from "vue";
2
+ import { _ as J } from "./campaign-CpzFl8Vr.js";
3
+ import { u as Q } from "./loading-B8zghYbj.js";
4
+ import { g as X, a as B, b as P } from "./campaign-UQ8kMVeC.js";
5
+ import { a as Y, p as Z } from "./plugins-B5mQ7CHT.js";
6
+ import { u as ee } from "./business-vzpvmTdG.js";
7
+ import { u as oe } from "./campaign-BkxTDfsK.js";
8
+ import { useDialog as te, components as _ } from "@feedmepos/ui-library";
9
+ import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { u as ae } from "./template-Qb5ozfLa.js";
11
+ import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKEumoan.js";
12
+ import { s as ie } from "./index-CsaQJMAR.js";
13
+ import { u as ce } from "./vue-i18n-BG2U7GtN.js";
14
+ import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js";
15
+ import { c as h } from "./index-D4MX9e5q.js";
16
+ const le = { class: "px-24 flex flex-col gap-y-16" }, me = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, ue = { class: "flex w-full gap-4 items-center" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ H({
17
+ __name: "Mission",
18
+ setup(Ce) {
19
+ const { t: n } = ce(), R = {
20
+ label: n("connect.program.common.actions.create", {
21
+ type: n("connect.program.mission.title").toLowerCase()
22
+ }),
23
+ value: "create",
24
+ isPrimary: !0,
25
+ prependIcon: "add"
26
+ }, S = te(), K = ae("MISSION", S), N = ee(), d = oe(), { global: T, minor: F } = Q, i = w({
27
+ searchKey: "",
28
+ location: null
29
+ }), f = q(
30
+ () => d.campaigns.mission.filter(
31
+ (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
32
+ )
33
+ ), U = [
34
+ {
35
+ header: n("connect.program.common.table.title"),
36
+ accessorKey: "name",
37
+ // accessorFn: (v) => v.name,
38
+ cell(e) {
39
+ return l("div", { class: "flex items-center justify-between gap-4" }, [
40
+ l("div", { class: "flex items-center" }, [
41
+ l(
42
+ _.FmTooltip,
43
+ {
44
+ content: e.row.original._id,
45
+ onClick: (o) => {
46
+ o.stopPropagation(), Y(e.row.original._id);
47
+ }
48
+ },
49
+ [
50
+ l(_.FmIcon, {
51
+ name: "info",
52
+ outline: !0,
53
+ size: "sm"
54
+ })
55
+ ]
56
+ )
57
+ ]),
58
+ l("div", { class: "flex-1" }, e.row.original.name)
59
+ ]);
60
+ }
61
+ },
62
+ {
63
+ header: n("connect.campaign.mission.type"),
64
+ accessorFn: (e) => ie(e.mission.type)
65
+ //v.effect,
66
+ },
67
+ {
68
+ header: n("connect.program.common.table.status"),
69
+ accessorFn: (e) => X(e),
70
+ cell(e) {
71
+ return B(e.row.original);
72
+ }
73
+ },
74
+ {
75
+ header: n("connect.program.common.table.summary"),
76
+ accessorFn: (e) => P(e)
77
+ //v.effect,
78
+ },
79
+ {
80
+ header: n("connect.campaign.mission.received"),
81
+ accessorFn: (e) => {
82
+ var o;
83
+ return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
84
+ }
85
+ },
86
+ {
87
+ header: n("connect.program.common.table.actions"),
88
+ cell(e) {
89
+ return l("div", { class: "flex items-center gap-8" }, [
90
+ l(_.FmButton, {
91
+ variant: "tertiary",
92
+ icon: "send",
93
+ iconColor: "neutral-gray-400",
94
+ onClick: (o) => {
95
+ o.stopPropagation(), A(e.row.original);
96
+ }
97
+ }),
98
+ l(_.FmButton, {
99
+ variant: "tertiary",
100
+ icon: "delete",
101
+ iconColor: "neutral-gray-400",
102
+ onClick: (o) => {
103
+ o.stopPropagation(), V(e.row.original);
104
+ }
105
+ })
106
+ ]);
107
+ }
108
+ }
109
+ ], k = w(), I = w();
110
+ async function V(e) {
111
+ await Z.remove(
112
+ n("connect.program.common.remove.confirm", { name: e.name })
113
+ ) && await F(
114
+ async () => {
115
+ await h.delete(e._id), await d.read("MISSION");
116
+ },
117
+ {
118
+ message: n("connect.program.common.remove.removing", { name: e.name }),
119
+ successMessage: n("connect.program.common.remove.removed", {
120
+ name: e.name
121
+ })
122
+ }
123
+ );
124
+ }
125
+ async function y(e) {
126
+ e ? await o() : K.open(async (r) => {
127
+ await o(r);
128
+ });
129
+ async function o(r) {
130
+ var g;
131
+ (g = k.value) == null || g.showSheet(
132
+ !0,
133
+ "MISSION",
134
+ e ? await h.readById(e._id) : void 0,
135
+ r
136
+ );
137
+ }
138
+ }
139
+ async function O(e) {
140
+ e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
141
+ S.open({
142
+ title: "Confirmation",
143
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
144
+ primaryActions: { text: "Update all", close: !0 },
145
+ secondaryActions: { text: "Update future only", close: !0 }
146
+ }).onPrimary(async () => {
147
+ var r;
148
+ e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
149
+ }).onSecondary(async () => {
150
+ o();
151
+ });
152
+ }), await F(
153
+ async () => {
154
+ e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await d.read("MISSION");
155
+ },
156
+ {
157
+ message: n(
158
+ e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
159
+ { type: "Mission" }
160
+ ),
161
+ successMessage: n("connect.program.common.update.success", {
162
+ type: "Mission",
163
+ action: e.campaign._id ? "updated" : "created"
164
+ })
165
+ }
166
+ );
167
+ }
168
+ function A(e) {
169
+ var o;
170
+ (o = I.value) == null || o.showSheet({
171
+ campaign: e
172
+ });
173
+ }
174
+ return z(async () => {
175
+ await T(async () => {
176
+ await d.read("MISSION"), console.log(f);
177
+ });
178
+ }), (e, o) => {
179
+ const r = m("FmPageHead"), g = m("FmSearch"), D = m("FmTable"), M = m("FmButton"), $ = m("FmListItem"), j = m("FmList"), E = m("FmCard");
180
+ return p(), x(v, null, [
181
+ c(r, {
182
+ title: t(n)("connect.campaign.mission.title"),
183
+ actions: t(f).length > 0 ? [R] : [],
184
+ "onClick:action": o[0] || (o[0] = () => y())
185
+ }, null, 8, ["title", "actions"]),
186
+ s("div", le, [
187
+ c(g, {
188
+ modelValue: t(i).searchKey,
189
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
190
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
191
+ placeholder: t(n)("connect.program.common.search"),
192
+ collapsible: ""
193
+ }, null, 8, ["modelValue", "placeholder"]),
194
+ t(d).campaigns.mission && t(d).campaigns.mission.length > 0 ? (p(), x(v, { key: 0 }, [
195
+ s("div", me, [
196
+ s("div", de, [
197
+ c(ne, {
198
+ modelValue: t(i).location,
199
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
200
+ label: t(n)("connect.program.common.location"),
201
+ "show-item-label": !0,
202
+ icon: "storefront",
203
+ placement: "bottom-start",
204
+ items: t(N).locationItems
205
+ }, null, 8, ["modelValue", "label", "items"])
206
+ ]),
207
+ c(g, {
208
+ modelValue: t(i).searchKey,
209
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
210
+ class: "xs:hidden",
211
+ placeholder: "search",
212
+ collapsible: ""
213
+ }, null, 8, ["modelValue"])
214
+ ]),
215
+ c(D, {
216
+ class: "xs:hidden",
217
+ "row-data": t(f),
218
+ "column-defs": U,
219
+ "search-value": t(i).searchKey,
220
+ "column-filter": [],
221
+ onRowClick: o[4] || (o[4] = (a) => y(a.original)),
222
+ "hide-footer": t(f).length < 10
223
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
224
+ c(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
225
+ default: C(() => [
226
+ (p(!0), x(v, null, W(t(f).filter(
227
+ (a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
228
+ ), (a) => (p(), b($, {
229
+ key: a._id.toString(),
230
+ onClick: (L) => y(a),
231
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
232
+ }, {
233
+ default: C(() => [
234
+ s("div", pe, [
235
+ s("div", ue, [
236
+ (p(), b(G(t(B)(a)))),
237
+ s("div", fe, u(a.currentReceive ?? 0) + " used ", 1)
238
+ ]),
239
+ s("div", ge, [
240
+ s("div", ye, u(a.name), 1),
241
+ s("div", _e, u(t(P)(a)), 1)
242
+ ]),
243
+ s("div", he, " Token received: " + u(a.currentReceive ?? 0), 1)
244
+ ]),
245
+ c(M, {
246
+ icon: "delete",
247
+ "icon-color": "neutral-gray-400",
248
+ variant: "tertiary",
249
+ onClick: (L) => (L.stopPropagation(), V(a))
250
+ }, null, 8, ["onClick"])
251
+ ]),
252
+ _: 2
253
+ }, 1032, ["onClick"]))), 128))
254
+ ]),
255
+ _: 1
256
+ })
257
+ ], 64)) : (p(), b(E, {
258
+ key: 1,
259
+ variant: "outlined",
260
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
261
+ }, {
262
+ default: C(() => [
263
+ o[6] || (o[6] = s("img", {
264
+ src: J,
265
+ class: "aspect-square w-[150px]"
266
+ }, null, -1)),
267
+ s("div", we, [
268
+ s("div", xe, u(t(n)("connect.campaign.mission.createProgram")), 1),
269
+ s("div", ve, u(t(n)("connect.campaign.mission.description")), 1)
270
+ ]),
271
+ c(M, {
272
+ variant: "primary",
273
+ label: t(n)("connect.campaign.mission.create"),
274
+ icon: "add",
275
+ onClick: o[5] || (o[5] = (a) => y())
276
+ }, null, 8, ["label"])
277
+ ]),
278
+ _: 1
279
+ })),
280
+ c(se, {
281
+ ref_key: "sheetRef",
282
+ ref: k,
283
+ "onSubmit:modelValue": O
284
+ }, null, 512),
285
+ c(re, {
286
+ ref_key: "sendCollectionSheetRef",
287
+ ref: I
288
+ }, null, 512)
289
+ ])
290
+ ], 64);
291
+ };
292
+ }
293
+ });
294
+ export {
295
+ Oe as default
296
+ };