@feedmepos/mf-connect 0.1.98-beta.21 → 0.1.98-beta.23

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 (117) hide show
  1. package/dist/{App-B3f8GWoR.js → App-BIYX7Etx.js} +10 -9
  2. package/dist/{AuditLogs-LRHzzpqj.js → AuditLogs-DE4OshWT.js} +9 -9
  3. package/dist/{Bin-Y761Ua4-.js → Bin-Dij5sB7P.js} +8 -8
  4. package/dist/{Broadcast-CdRuG42N.js → Broadcast-LrxTPewm.js} +13 -12
  5. package/dist/CampaignAnalytic-Cd4NmVCa.js +1656 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CsULDH9l.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-NOjmA60-.js} +6 -5
  7. package/dist/{Card-GZ3ZLnBl.js → Card-RUIOZRGb.js} +18 -18
  8. package/dist/{Collections-B59fL-oS.js → Collections-D0Dm4XVh.js} +14 -13
  9. package/dist/{Credit-DJxzXBam.js → Credit-04KV7cl_.js} +119 -93
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C3d8frgZ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D0_4f-Lw.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DKUFvacX.js → EffectSheet.vue_vue_type_style_index_0_lang-GJYjey-R.js} +6 -6
  12. package/dist/{Experience-lzpvYFPP.js → Experience-Tnx0sYuU.js} +112 -86
  13. package/dist/{FileSaver.min-BXoEv5ve.js → FileSaver.min-DO-YYoNK.js} +1 -1
  14. package/dist/Game-BQF1HhbF.js +356 -0
  15. package/dist/{Grab-BQgS104D.js → Grab-CbpfBdSQ.js} +32 -31
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Cz9iB9ox.js → ImageInput.vue_vue_type_script_setup_true_lang-Dm76lZPy.js} +1 -1
  17. package/dist/{Index-B5UTBbUy.js → Index-Bs2XB4kq.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CLLhy4-v.js → LocationPicker.vue_vue_type_script_setup_true_lang--zUjb2sx.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BiIqs4zW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dix9t18W.js} +1 -1
  20. package/dist/LoyaltyDashboard-D-2cCqT1.js +1339 -0
  21. package/dist/{MainLayout-AvQ4_-oT.js → MainLayout-BtjswcYZ.js} +1 -1
  22. package/dist/{Marketing-Bn1ygF8d.js → Marketing-BX2dspqc.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-Cw-VPVqE.js → MarketingMaterialEdit-BnERWjgD.js} +6 -6
  24. package/dist/{Member-CpEXFHIF.js → Member-BH8ly91d.js} +11 -11
  25. package/dist/{MemberList-gSEw_idJ.js → MemberList-vNI7GD9Z.js} +36 -35
  26. package/dist/{MemberTransactions-DEMzj9-y.js → MemberTransactions-CQUJBCJK.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B4Y5KPpw.js → MessageInput.vue_vue_type_script_setup_true_lang-BzJzMifM.js} +4400 -4431
  28. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-B1Yj3odA.js +38 -0
  29. package/dist/Mission-Rzjonu46.js +360 -0
  30. package/dist/{Overview-CMudFYOc.js → Overview-B1b0Krzj.js} +3 -3
  31. package/dist/{Overview-DjNcF88f.js → Overview-BYCWa5kg.js} +18 -18
  32. package/dist/Point-LhcogofH.js +288 -0
  33. package/dist/Promotion-CyHJ_Rj7.js +423 -0
  34. package/dist/{Queue-BjoAJoVe.js → Queue-B3TbSBGL.js} +16 -16
  35. package/dist/{Record-CfZFuwy_.js → Record-CMaloGsO.js} +9 -9
  36. package/dist/{Review-pIAxbjVU.js → Review-Cht29ZqH.js} +2 -2
  37. package/dist/{ReviewFacebookCallback-BRW4T-5-.js → ReviewFacebookCallback-w9E0tBZK.js} +5 -5
  38. package/dist/{ReviewGoogleCallback-B-6EojXR.js → ReviewGoogleCallback-wyDB2Q4d.js} +5 -5
  39. package/dist/{Reward-_pdE2XZp.js → Reward-CHUkCgCF.js} +16 -16
  40. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S5dh0IGc.js → RewardGroup.vue_vue_type_script_setup_true_lang-Dop7KXro.js} +11 -11
  41. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-C9B7NmF0.js → RuleGroup.vue_vue_type_script_setup_true_lang-pgKnyxcj.js} +16 -15
  42. package/dist/{Segment-B1EMe-LZ.js → Segment-CQM0X0t8.js} +39 -37
  43. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DAmjk8b3.js → SelectItems.vue_vue_type_script_setup_true_lang-Dgk1XFW-.js} +2 -2
  44. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C7sgPf8l.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-WLoT1Yuh.js} +12 -12
  45. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DVYTZr_E.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CiIXMw2K.js} +4 -4
  46. package/dist/{Setting-CQQ6zacB.js → Setting-BNb9cKHW.js} +40 -40
  47. package/dist/{SettingAdvertisements-9Wl9VWbM.js → SettingAdvertisements-DCfDKajW.js} +12 -12
  48. package/dist/{Settings-Bvj2ChDR.js → Settings-D9x31jyY.js} +5 -5
  49. package/dist/{Store-BdUZ22g6.js → Store-CHIRPbf9.js} +21 -21
  50. package/dist/{StoreRewards-DsUS_Lu1.js → StoreRewards-oDCchD1I.js} +15 -15
  51. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Zw-lIDCN.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bs6DBPCp.js} +21 -21
  52. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BECp3eqQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dg7rFNPR.js} +2 -2
  53. package/dist/{Tier-2-mJ3SNK.js → Tier-BnxtqLlp.js} +36 -34
  54. package/dist/{Title-BjeEDjxl.js → Title-Ca909tVJ.js} +39 -37
  55. package/dist/{Transaction--U_kJKec.js → Transaction-CXqSR6Vb.js} +2 -2
  56. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BkLyvjA5.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DXKIcUhs.js} +6 -6
  57. package/dist/{Voucher-INa3N_6V.js → Voucher-0JvEJ4Jp.js} +156 -133
  58. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-4Quzmc7-.js → VoucherEditor.vue_vue_type_script_setup_true_lang-vBymX-zC.js} +12 -12
  59. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CPCnBExY.js → ZodTextField.vue_vue_type_script_setup_true_lang-CaLyPkwJ.js} +2 -2
  60. package/dist/{app-Dlqr-LX4.js → app-bITyvnZM.js} +3155 -3011
  61. package/dist/app.js +1 -1
  62. package/dist/{business-DWrfGEe_.js → business-eD0ch267.js} +1 -1
  63. package/dist/campaign-BFg0mmEh.js +100 -0
  64. package/dist/{campaign-DtNt-BqN.js → campaign-Ba602jpT.js} +74 -96
  65. package/dist/{campaign.enum-B9-ZpK0C.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  66. package/dist/{campaign.fn-COxaWmi_.js → campaign.fn-DF0snp1T.js} +62 -62
  67. package/dist/{collectible.enum-CF0VF-r7.js → collectible.enum-Liy2wH3s.js} +1 -1
  68. package/dist/collection.fn-CBfMIjXE.js +26 -0
  69. package/dist/{duplicateCampaign-8ciT68QF.js → duplicateCampaign-VP_ls1ud.js} +2 -2
  70. package/dist/{effect-CaSn-84h.js → effect-ddINAhuZ.js} +1 -1
  71. package/dist/{email-addresses-BiMQ8xIx.js → email-addresses-dgDgXrMO.js} +2 -2
  72. package/dist/{export-BwBNgCo5.js → export-Ds2K5BsU.js} +3 -3
  73. package/dist/{helper-CajV_0CM.js → helper-BuMn1yMd.js} +1 -1
  74. package/dist/{index-CjW6Mj-1.js → index-116bBmSO.js} +1 -1
  75. package/dist/{index-CQj9BQlQ.js → index-2WBZTpTO.js} +105 -123
  76. package/dist/{index-D1--K-QL.js → index-C7yjfEJp.js} +1 -1
  77. package/dist/index-C8cXXcLk.js +45 -0
  78. package/dist/{index-Bqcfsd4p.js → index-CDY4-3Oh.js} +8 -7
  79. package/dist/index-C_H8jFYf.js +2743 -0
  80. package/dist/{index-B6tm_U_M.js → index-CssCQw59.js} +18 -17
  81. package/dist/{index-DWBKko92.js → index-D-VV6TQr.js} +6 -6
  82. package/dist/{index-CQIciFrH.js → index-D5CuHi7m.js} +1 -1
  83. package/dist/{index-J8pSZ3WO.js → index-D7zaIqw5.js} +1 -1
  84. package/dist/{index-D1vhLY7l.js → index-DeBtRbNM.js} +1 -1
  85. package/dist/index-DtvL6ok7.js +146 -0
  86. package/dist/{index-D90p28Hr.js → index-Dvs0-jZv.js} +205 -229
  87. package/dist/{index-BP5rdioN.js → index-IC2b3X3d.js} +8027 -10766
  88. package/dist/{index-DBUTFa2h.js → index-KbYR_xHX.js} +2 -2
  89. package/dist/{index-B6ldAC8Y.js → index-ObbBk7ec.js} +1 -1
  90. package/dist/{index-B0ohh62P.js → index-uwROagPY.js} +230 -351
  91. package/dist/{index.esm2017-QlPanYiW.js → index.esm2017-skDxCJ1A.js} +1 -1
  92. package/dist/{loading-CqqkzWSm.js → loading-LvohTBxf.js} +1 -1
  93. package/dist/{lodash-DmbW2QhA.js → lodash-Di4dt__i.js} +1 -1
  94. package/dist/{membership-Dcwyu-rr.js → membership-7dDyl1PB.js} +3 -3
  95. package/dist/{money-DWr1gi--.js → money-DLO_8Rz5.js} +1 -1
  96. package/dist/{number-CHhHAd1q.js → number-DI2NyHxA.js} +1 -1
  97. package/dist/{objectid-BsiuHVH8.js → objectid-BR7nqOFr.js} +8 -8
  98. package/dist/{plugins-BxmMI8fo.js → plugins-DiV6DB6H.js} +3 -3
  99. package/dist/{reward-DX0FjsNT.js → reward-CEQA8YFb.js} +1 -1
  100. package/dist/{rule-DDLcqiHH.js → rule-CK-xQMWg.js} +3 -3
  101. package/dist/rule-builder-DW8QDYRH.js +126 -0
  102. package/dist/{template-C0lF82yv.js → template-ASiRYpll.js} +6 -6
  103. package/dist/timezone-Bt1TXRp3.js +20 -0
  104. package/dist/{trigger-CsJcg_RY.js → trigger-C1t6y-O_.js} +5 -5
  105. package/dist/{useMarketingMaterialActions-B0iV6YzB.js → useMarketingMaterialActions-CflpOyai.js} +3 -3
  106. package/dist/{usePagination-4EISkyGW.js → usePagination-BtKUQnLA.js} +1 -1
  107. package/dist/{user-DZuSeqRY.js → user-Dv4jKByC.js} +1 -1
  108. package/dist/{vue-i18n-BKcwYlp1.js → vue-i18n-xbxyJhj4.js} +436 -436
  109. package/dist/{xlsx-C-7dia55.js → xlsx-rKKsRfvM.js} +440 -440
  110. package/dist/{zod-DPxXVSRw.js → zod-DpLFpQ43.js} +1 -1
  111. package/package.json +1 -1
  112. package/dist/Game-KCxIpXEC.js +0 -330
  113. package/dist/LoyaltyDashboard-DPHWpaNJ.js +0 -1082
  114. package/dist/Mission-DMtpauNQ.js +0 -334
  115. package/dist/Point-CgdTrgXc.js +0 -262
  116. package/dist/Promotion-DDQodFDb.js +0 -397
  117. package/dist/campaign-un9Ji1KF.js +0 -219
@@ -0,0 +1,356 @@
1
+ import { defineComponent as J, ref as A, computed as Q, onMounted as X, resolveComponent as m, openBlock as f, createElementBlock as P, Fragment as R, createVNode as r, unref as o, withCtx as b, createElementVNode as n, toDisplayString as g, renderList as Z, createBlock as V, resolveDynamicComponent as ee, h as l } from "vue";
2
+ import { _ as te } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as oe, components as y } from "@feedmepos/ui-library";
4
+ import { c as ae, p as ne } from "./plugins-DiV6DB6H.js";
5
+ import { u as ie } from "./loading-LvohTBxf.js";
6
+ import { u as re } from "./business-eD0ch267.js";
7
+ import { u as se } from "./campaign-BFg0mmEh.js";
8
+ import { b as T, c as U, a as le } from "./campaign-Ba602jpT.js";
9
+ import { c as ce, p as me } from "./duplicateCampaign-VP_ls1ud.js";
10
+ import { _ as de } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as ue } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D0_4f-Lw.js";
12
+ import { u as pe } from "./template-ASiRYpll.js";
13
+ import { u as fe } from "./vue-i18n-xbxyJhj4.js";
14
+ import { _ as ge } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-WLoT1Yuh.js";
15
+ import "./index-D5CuHi7m.js";
16
+ import { useRouter as ye } from "vue-router";
17
+ import { c as h } from "./index-DtvL6ok7.js";
18
+ import { R as _e } from "./app-bITyvnZM.js";
19
+ const he = { class: "flex items-center" }, we = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Ce = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, xe = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, Fe = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "flex items-center gap-8" }, Ve = { class: "flex flex-col gap-16 text-center" }, Le = { class: "fm-typo-en-title-sm-800" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ J({
20
+ __name: "Game",
21
+ setup(Ee) {
22
+ const { t: d } = fe(), D = ye(), I = {
23
+ label: d("connect.program.common.actions.create", {
24
+ type: d("connect.program.game.title").toLowerCase()
25
+ }),
26
+ value: "create",
27
+ isPrimary: !0,
28
+ prependIcon: "add"
29
+ }, L = oe(), K = pe("GAME", L), w = re(), u = se(), { global: j, minor: B } = ie, c = A({
30
+ searchKey: "",
31
+ location: []
32
+ });
33
+ function N(e) {
34
+ const t = c.value.location;
35
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((s) => {
36
+ var i;
37
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
38
+ }) : e.targetLocation.includes(t);
39
+ }
40
+ const C = Q(
41
+ () => u.campaigns.token.filter((e) => N(e))
42
+ ), O = [
43
+ {
44
+ header: "Program title",
45
+ accessorKey: "name",
46
+ // accessorFn: (v) => v.name,
47
+ cell(e) {
48
+ return l("div", { class: "flex items-center justify-between gap-4" }, [
49
+ l("div", { class: "flex items-center" }, [
50
+ l(
51
+ y.FmTooltip,
52
+ {
53
+ content: e.row.original._id,
54
+ onClick: (t) => {
55
+ t.stopPropagation(), ae(e.row.original._id);
56
+ }
57
+ },
58
+ [
59
+ l(y.FmIcon, {
60
+ name: "info",
61
+ outline: !0,
62
+ size: "sm"
63
+ })
64
+ ]
65
+ )
66
+ ]),
67
+ l("div", { class: "flex-1" }, e.row.original.name)
68
+ ]);
69
+ }
70
+ },
71
+ {
72
+ header: "Status",
73
+ accessorFn: (e) => le(e),
74
+ cell(e) {
75
+ return T(e.row.original);
76
+ }
77
+ },
78
+ {
79
+ header: "Summary",
80
+ accessorFn: (e) => U(e)
81
+ //v.effect,
82
+ },
83
+ {
84
+ header: "Token received",
85
+ accessorFn: (e) => {
86
+ var t;
87
+ return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
88
+ }
89
+ },
90
+ {
91
+ header: "Actions",
92
+ cell(e) {
93
+ return l("div", { class: "flex items-center gap-8" }, [
94
+ l(y.FmButton, {
95
+ variant: "tertiary",
96
+ icon: "insights",
97
+ iconColor: "neutral-gray-400",
98
+ onClick: async (t) => {
99
+ t.stopPropagation(), await G(e.row.original);
100
+ }
101
+ }),
102
+ l(y.FmButton, {
103
+ variant: "tertiary",
104
+ icon: "content_copy",
105
+ iconColor: "neutral-gray-400",
106
+ onClick: async (t) => {
107
+ t.stopPropagation(), await $(e.row.original);
108
+ }
109
+ }),
110
+ l(y.FmButton, {
111
+ variant: "tertiary",
112
+ icon: "send",
113
+ iconColor: "neutral-gray-400",
114
+ onClick: (t) => {
115
+ t.stopPropagation(), q(e.row.original);
116
+ }
117
+ }),
118
+ l(y.FmButton, {
119
+ variant: "tertiary",
120
+ icon: "delete",
121
+ iconColor: "neutral-gray-400",
122
+ onClick: (t) => {
123
+ t.stopPropagation(), M(e.row.original);
124
+ }
125
+ })
126
+ ]);
127
+ }
128
+ }
129
+ ], k = A(), E = A();
130
+ async function M(e) {
131
+ await ne.remove(`Are you sure you want to remove ${e.name}?`) && await B(
132
+ async () => {
133
+ await h.delete(e._id), await u.read("GAME");
134
+ },
135
+ {
136
+ message: `Removing ${e.name}`,
137
+ successMessage: `Removed ${e.name} successfully`
138
+ }
139
+ );
140
+ }
141
+ async function v(e) {
142
+ e ? await t() : K.open(async (s) => {
143
+ await t(s);
144
+ });
145
+ async function t(s) {
146
+ var i;
147
+ (i = k.value) == null || i.showSheet(
148
+ !0,
149
+ "GAME",
150
+ e ? await h.readById(e._id) : void 0,
151
+ s
152
+ );
153
+ }
154
+ }
155
+ async function $(e) {
156
+ var i;
157
+ if (!await ce(e.name))
158
+ return;
159
+ const t = await h.readById(e._id), s = me(t);
160
+ (i = k.value) == null || i.showSheet(
161
+ !0,
162
+ "GAME",
163
+ s,
164
+ t.template
165
+ );
166
+ }
167
+ async function H(e) {
168
+ var t, s, i;
169
+ e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
170
+ (p) => p.type === "VOUCHER"
171
+ )) && await new Promise((p) => {
172
+ L.open({
173
+ title: "Confirmation",
174
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
175
+ primaryActions: { text: "Update all", close: !0 },
176
+ secondaryActions: { text: "Update future only", close: !0 }
177
+ }).onPrimary(async () => {
178
+ e.updateCollections = !0, p();
179
+ }).onSecondary(async () => {
180
+ p();
181
+ });
182
+ }), await B(
183
+ async () => {
184
+ e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await u.read("GAME");
185
+ },
186
+ {
187
+ message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
188
+ successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
189
+ }
190
+ );
191
+ }
192
+ function q(e) {
193
+ var t;
194
+ (t = E.value) == null || t.showSheet({
195
+ campaign: e
196
+ });
197
+ }
198
+ async function G(e) {
199
+ await D.push({
200
+ name: _e["$connect-PROGRAM_GAME_ANALYTIC"],
201
+ params: { id: e._id }
202
+ });
203
+ }
204
+ return X(async () => {
205
+ await j(async () => {
206
+ await u.read("GAME"), await w.readPremium();
207
+ });
208
+ }), (e, t) => {
209
+ const s = m("FmPill"), i = m("FmPageHead"), F = m("FmSearch"), p = m("FmTable"), x = m("FmButton"), z = m("FmListItem"), W = m("FmList"), Y = m("FmCard");
210
+ return f(), P(R, null, [
211
+ r(i, {
212
+ actions: o(C).length > 0 && o(w).isPremium ? [I] : [],
213
+ "onClick:action": t[0] || (t[0] = () => v())
214
+ }, {
215
+ title: b(() => [
216
+ n("div", he, [
217
+ n("span", we, g(o(d)("connect.program.game.title")), 1),
218
+ r(s, { variant: "premium" })
219
+ ])
220
+ ]),
221
+ _: 1
222
+ }, 8, ["actions"]),
223
+ n("div", Ce, [
224
+ r(F, {
225
+ modelValue: o(c).searchKey,
226
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
227
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
228
+ placeholder: "search",
229
+ collapsible: ""
230
+ }, null, 8, ["modelValue"]),
231
+ o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), P(R, { key: 0 }, [
232
+ n("div", ve, [
233
+ n("div", xe, [
234
+ r(de, {
235
+ label: `${o(d)("connect.common.location")}: `,
236
+ "right-icon": "keyboard_arrow_down",
237
+ modelValue: o(c).location,
238
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
239
+ icon: "storefront",
240
+ "show-item-label": !0,
241
+ items: o(w).locationOptions
242
+ }, null, 8, ["label", "modelValue", "items"])
243
+ ]),
244
+ r(F, {
245
+ modelValue: o(c).searchKey,
246
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
247
+ class: "xs:hidden sm:hidden",
248
+ placeholder: "search",
249
+ collapsible: ""
250
+ }, null, 8, ["modelValue"])
251
+ ]),
252
+ r(p, {
253
+ class: "xs:hidden sm:hidden",
254
+ "row-data": o(C),
255
+ "column-defs": O,
256
+ "search-value": o(c).searchKey,
257
+ "column-filter": [],
258
+ onRowClick: t[4] || (t[4] = (a) => v(a.original)),
259
+ "hide-footer": o(C).length < 10
260
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
261
+ r(W, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
262
+ default: b(() => [
263
+ (f(!0), P(R, null, Z(o(C).filter(
264
+ (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
265
+ ), (a) => (f(), V(z, {
266
+ key: a._id.toString(),
267
+ onClick: (S) => v(a),
268
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
269
+ }, {
270
+ default: b(() => {
271
+ var S;
272
+ return [
273
+ n("div", be, [
274
+ n("div", ke, [
275
+ (f(), V(ee(o(T)(a))))
276
+ ]),
277
+ n("div", Fe, [
278
+ n("div", Se, g(a.name), 1),
279
+ n("div", Ae, g(o(U)(a)), 1)
280
+ ]),
281
+ n("div", Pe, g(o(d)("connect.program.game.token_received", {
282
+ count: ((S = a.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0
283
+ })), 1)
284
+ ]),
285
+ n("div", Re, [
286
+ r(x, {
287
+ icon: "insights",
288
+ "icon-color": "neutral-gray-400",
289
+ variant: "tertiary",
290
+ onClick: async (_) => {
291
+ _.stopPropagation(), await G(a);
292
+ }
293
+ }, null, 8, ["onClick"]),
294
+ r(x, {
295
+ icon: "content_copy",
296
+ "icon-color": "neutral-gray-400",
297
+ variant: "tertiary",
298
+ onClick: async (_) => {
299
+ _.stopPropagation(), await $(a);
300
+ }
301
+ }, null, 8, ["onClick"]),
302
+ r(x, {
303
+ icon: "delete",
304
+ "icon-color": "neutral-gray-400",
305
+ variant: "tertiary",
306
+ onClick: (_) => (_.stopPropagation(), M(a))
307
+ }, null, 8, ["onClick"])
308
+ ])
309
+ ];
310
+ }),
311
+ _: 2
312
+ }, 1032, ["onClick"]))), 128))
313
+ ]),
314
+ _: 1
315
+ })
316
+ ], 64)) : (f(), V(Y, {
317
+ key: 1,
318
+ variant: "outlined",
319
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
320
+ }, {
321
+ default: b(() => [
322
+ t[6] || (t[6] = n("img", {
323
+ src: te,
324
+ class: "aspect-square w-[150px]"
325
+ }, null, -1)),
326
+ n("div", Ve, [
327
+ n("div", Le, g(o(d)("connect.program.game.empty_state.title")), 1),
328
+ n("div", Be, g(o(d)("connect.program.game.empty_state.description")), 1)
329
+ ]),
330
+ r(x, {
331
+ variant: "primary",
332
+ label: "Create game program",
333
+ icon: "add",
334
+ disabled: !o(w).isPremium,
335
+ onClick: t[5] || (t[5] = (a) => v())
336
+ }, null, 8, ["disabled"])
337
+ ]),
338
+ _: 1
339
+ })),
340
+ r(ue, {
341
+ ref_key: "sheetRef",
342
+ ref: k,
343
+ "onSubmit:modelValue": H
344
+ }, null, 512),
345
+ r(ge, {
346
+ ref_key: "sendCollectionSheetRef",
347
+ ref: E
348
+ }, null, 512)
349
+ ])
350
+ ], 64);
351
+ };
352
+ }
353
+ });
354
+ export {
355
+ Xe as default
356
+ };
@@ -1,20 +1,21 @@
1
1
  import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
2
2
  import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as ee, components as te } from "@feedmepos/ui-library";
4
- import { p as P } from "./plugins-BxmMI8fo.js";
5
- import { u as oe } from "./loading-CqqkzWSm.js";
6
- import { u as ne } from "./business-DWrfGEe_.js";
7
- import { u as ae, c as C } from "./campaign-un9Ji1KF.js";
8
- import { u as se } from "./vue-i18n-BKcwYlp1.js";
4
+ import { p as P } from "./plugins-DiV6DB6H.js";
5
+ import { u as oe } from "./loading-LvohTBxf.js";
6
+ import { u as ne } from "./business-eD0ch267.js";
7
+ import { u as ae } from "./campaign-BFg0mmEh.js";
8
+ import { u as re } from "./vue-i18n-xbxyJhj4.js";
9
9
  import { h as d } from "./moment-D7p2TMB-.js";
10
- import { a as re, b as V } from "./campaign-DtNt-BqN.js";
11
- import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C3d8frgZ.js";
12
- import { u as le } from "./template-C0lF82yv.js";
10
+ import { a as se, b as V } from "./campaign-Ba602jpT.js";
11
+ import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D0_4f-Lw.js";
12
+ import { u as le } from "./template-ASiRYpll.js";
13
13
  import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
14
- const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ q({
14
+ import { c as C } from "./index-DtvL6ok7.js";
15
+ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
15
16
  __name: "Grab",
16
17
  setup(_e) {
17
- const { t: o } = se(), I = {
18
+ const { t: o } = re(), I = {
18
19
  label: o("connect.grab.createCampaign"),
19
20
  value: "create",
20
21
  isPrimary: !0,
@@ -36,15 +37,15 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
36
37
  function E(e) {
37
38
  const t = c.value.location;
38
39
  return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
39
- var r;
40
- return (r = e == null ? void 0 : e.targetLocation) == null ? void 0 : r.includes(a);
40
+ var s;
41
+ return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(a);
41
42
  }) : e.targetLocation.includes(t);
42
43
  }
43
44
  function j(e) {
44
- var r, s;
45
+ var s, r;
45
46
  const t = c.value.effectType;
46
47
  if (!t || t.length === 0) return !0;
47
- const a = (s = (r = e.effect) == null ? void 0 : r.options) == null ? void 0 : s.target;
48
+ const a = (r = (s = e.effect) == null ? void 0 : s.options) == null ? void 0 : r.target;
48
49
  return t.includes(a);
49
50
  }
50
51
  const p = z(
@@ -65,7 +66,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
65
66
  },
66
67
  {
67
68
  header: o("connect.grab.status"),
68
- accessorFn: (e) => re(e),
69
+ accessorFn: (e) => se(e),
69
70
  cell(e) {
70
71
  return V(e.row.original);
71
72
  }
@@ -109,8 +110,8 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
109
110
  await t(a);
110
111
  });
111
112
  async function t(a) {
112
- var r;
113
- (r = B.value) == null || r.showSheet(
113
+ var s;
114
+ (s = B.value) == null || s.showSheet(
114
115
  !0,
115
116
  "GRAB",
116
117
  e ? await C.readById(e._id) : void 0,
@@ -122,14 +123,14 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
122
123
  var a;
123
124
  const t = await U(e.campaign);
124
125
  if (t.length > 0) {
125
- const r = t.map(
126
- (s) => `"${s.name}" (${d(s.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(s.timeframeOptions.end).format("DD/MM/YYYY")})`
126
+ const s = t.map(
127
+ (r) => `"${r.name}" (${d(r.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(r.timeframeOptions.end).format("DD/MM/YYYY")})`
127
128
  ).join(`
128
129
  `);
129
130
  return await ((a = P.dialog) == null ? void 0 : a.open({
130
131
  title: o("connect.grab.conflictDetected"),
131
132
  message: o("connect.grab.conflictMessage", {
132
- conflicts: r
133
+ conflicts: s
133
134
  }),
134
135
  closeButton: !0,
135
136
  overlay: !0,
@@ -152,13 +153,13 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
152
153
  );
153
154
  }
154
155
  async function U(e) {
155
- const t = g.campaigns.grab, a = [], r = !!e._id;
156
- for (const s of t) {
157
- if (r && s._id === e._id) continue;
158
- const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(s.timeframeOptions.start), v = d(s.timeframeOptions.end);
156
+ const t = g.campaigns.grab, a = [], s = !!e._id;
157
+ for (const r of t) {
158
+ if (s && r._id === e._id) continue;
159
+ const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(r.timeframeOptions.start), v = d(r.timeframeOptions.end);
159
160
  if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
160
- const n = e.discount, w = s.discount;
161
- n.scope.type === w.scope.type && a.push(s);
161
+ const n = e.discount, w = r.discount;
162
+ n.scope.type === w.scope.type && a.push(r);
162
163
  }
163
164
  }
164
165
  return a;
@@ -175,9 +176,9 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
175
176
  await S.readLocations(), await g.read("PROMOTION");
176
177
  });
177
178
  }), (e, t) => {
178
- const a = u("FmPill"), r = u("FmPageHead"), s = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
179
+ const a = u("FmPill"), s = u("FmPageHead"), r = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
179
180
  return f(), k(F, null, [
180
- l(r, {
181
+ l(s, {
181
182
  title: i(o)("connect.grab.title"),
182
183
  actions: i(p).length > 0 ? [I] : [],
183
184
  "onClick:action": H
@@ -189,7 +190,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
189
190
  _: 1
190
191
  }, 8, ["title", "actions"]),
191
192
  m("div", me, [
192
- l(s, {
193
+ l(r, {
193
194
  modelValue: c.value.searchKey,
194
195
  "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
195
196
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
@@ -218,7 +219,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
218
219
  items: K
219
220
  }, null, 8, ["modelValue"])
220
221
  ]),
221
- l(s, {
222
+ l(r, {
222
223
  modelValue: c.value.searchKey,
223
224
  "onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
224
225
  class: "xs:hidden",
@@ -296,5 +297,5 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-
296
297
  }
297
298
  });
298
299
  export {
299
- Ye as default
300
+ Pe as default
300
301
  };
@@ -1,5 +1,5 @@
1
1
  import { openBlock as l, createElementBlock as o, createElementVNode as r, defineComponent as $, ref as b, onMounted as I, resolveComponent as f, renderSlot as x, toDisplayString as s, createCommentVNode as h, normalizeStyle as V, unref as i, Fragment as w, createVNode as F, withCtx as g, createTextVNode as p, normalizeClass as z, createBlock as k } from "vue";
2
- import { u as R } from "./vue-i18n-BKcwYlp1.js";
2
+ import { u as R } from "./vue-i18n-xbxyJhj4.js";
3
3
  import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const N = {}, D = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
5
5
  function L(e, d) {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as B, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
2
- import { u as H } from "./vue-i18n-BKcwYlp1.js";
3
- import "./index-CQIciFrH.js";
2
+ import { u as H } from "./vue-i18n-xbxyJhj4.js";
3
+ import "./index-D5CuHi7m.js";
4
4
  import { useRouter as K } from "vue-router";
5
- import { u as Q } from "./loading-CqqkzWSm.js";
6
- import { f as V, p as X } from "./plugins-BxmMI8fo.js";
7
- import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-S5dh0IGc.js";
5
+ import { u as Q } from "./loading-LvohTBxf.js";
6
+ import { f as V, p as X } from "./plugins-DiV6DB6H.js";
7
+ import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-Dop7KXro.js";
8
8
  import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
9
- import { r as N } from "./index-D1--K-QL.js";
10
- import { u as ae } from "./reward-DX0FjsNT.js";
11
- import { u as oe } from "./business-DWrfGEe_.js";
12
- import { u as te } from "./membership-Dcwyu-rr.js";
13
- import { R as $ } from "./app-Dlqr-LX4.js";
9
+ import { r as N } from "./index-C7yjfEJp.js";
10
+ import { u as ae } from "./reward-CEQA8YFb.js";
11
+ import { u as oe } from "./business-eD0ch267.js";
12
+ import { u as te } from "./membership-7dDyl1PB.js";
13
+ import { R as $ } from "./app-bITyvnZM.js";
14
14
  const re = { class: "space-y-24" }, le = {
15
15
  key: 0,
16
16
  class: /* @__PURE__ */ G([
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as g, openBlock as t, createElementBlock as o, createElementVNode as i, toDisplayString as r, unref as c, createCommentVNode as m, Fragment as y, renderList as _, normalizeClass as d, createVNode as b } from "vue";
2
- import { u as x } from "./vue-i18n-BKcwYlp1.js";
2
+ import { u as x } from "./vue-i18n-xbxyJhj4.js";
3
3
  import { components as h } from "@feedmepos/ui-library";
4
4
  const k = { class: "border-t border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-50 p-12 flex flex-col gap-8" }, v = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-500 px-4" }, S = {
5
5
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, watchEffect, computed, watch, openBlock, createElementBlock, normalizeStyle, onBeforeUnmount, resolveComponent, unref, createBlock } from "vue";
2
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./app-Dlqr-LX4.js";
2
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./app-bITyvnZM.js";
3
3
  const v = "4.8.0", meta = {
4
4
  g: "LottieFiles AE ",
5
5
  a: "",