@feedmepos/mf-connect 0.1.38-beta.61 → 0.1.38-beta.62

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 (107) hide show
  1. package/dist/{Analytic-CM7mh-iO.js → Analytic-Ktq94hC8.js} +14 -14
  2. package/dist/{App-CeCzzsDu.js → App-Daubz7oj.js} +7 -7
  3. package/dist/{AuditLogs-VWx8DFKA.js → AuditLogs-Bwoks-rM.js} +9 -9
  4. package/dist/{Bin-vUuol_I9.js → Bin-asHUb1BJ.js} +8 -8
  5. package/dist/Broadcast-BVB-Mjqq.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CczwlN2n.js} +6 -6
  7. package/dist/{Card-CeIeGET1.js → Card-Bp4EJbgK.js} +17 -17
  8. package/dist/{Collections-CF_OcAL3.js → Collections-CyDN3QhT.js} +7 -7
  9. package/dist/Credit-DrwSgNh7.js +261 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-n8_AVbJA.js} +203 -199
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js → EffectSheet.vue_vue_type_style_index_0_lang-DnAOFGed.js} +6 -6
  12. package/dist/Experience-BBrZLaRM.js +260 -0
  13. package/dist/{FileSaver.min-lgg_oBvT.js → FileSaver.min-o8dgYPp0.js} +1 -1
  14. package/dist/Game-AxwzBRrJ.js +331 -0
  15. package/dist/{GenerateMaterial-B5A7mx2y.js → GenerateMaterial-BObD7Yrf.js} +6 -6
  16. package/dist/{Grab-BgiMqwvj.js → Grab-CiN-phhI.js} +9 -9
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js → ImageInput.vue_vue_type_script_setup_true_lang-CgdcGP3N.js} +1 -1
  18. package/dist/{Index-B85ops8K.js → Index-CQXbQ7vK.js} +10 -10
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D53NnPhs.js} +1 -1
  20. package/dist/{MainLayout-CXGVkD-W.js → MainLayout-COA3zuDN.js} +1 -1
  21. package/dist/{Marketing-Bnijl7lA.js → Marketing-_0bICW80.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-BlUKwSoP.js → MarketingMaterialEdit-L1ab7aJG.js} +4 -4
  23. package/dist/{Member-sT853g51.js → Member-C9RRcxUA.js} +11 -11
  24. package/dist/{MemberList-DYT5_fSP.js → MemberList-CSe2F9QS.js} +25 -25
  25. package/dist/{MemberTransactions-Cqce5ebe.js → MemberTransactions-Da1Nfbi4.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js → MessageInput.vue_vue_type_script_setup_true_lang-DjYaXNTE.js} +8 -8
  27. package/dist/Mission-CTJANu6a.js +335 -0
  28. package/dist/{Overview-B0rwrHR1.js → Overview-CgrXFJ5H.js} +18 -18
  29. package/dist/Point-B4g37KPT.js +263 -0
  30. package/dist/Promotion-V0MoAX2t.js +397 -0
  31. package/dist/{Queue-SVqRUlD_.js → Queue-uUrzJCdY.js} +10 -10
  32. package/dist/{Record-BTjg4ihy.js → Record-BT-4kOS8.js} +9 -9
  33. package/dist/{Reward-DW58VMRO.js → Reward-Cqfur_b7.js} +16 -16
  34. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js → RewardGroup.vue_vue_type_script_setup_true_lang-CWFxdopa.js} +11 -11
  35. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js → RuleGroup.vue_vue_type_script_setup_true_lang-C5BATPr7.js} +14 -14
  36. package/dist/{Segment-Dny8pxP1.js → Segment-DlzmOheV.js} +24 -24
  37. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js → SelectItems.vue_vue_type_script_setup_true_lang-Bur2bSCd.js} +2 -2
  38. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BqYZehIO.js} +12 -12
  39. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CXot-RF0.js} +4 -4
  40. package/dist/{Setting-CjcnxK34.js → Setting-CtIHp56x.js} +13 -13
  41. package/dist/{SettingAdvertisements-CIyDF4C8.js → SettingAdvertisements-nT78blMx.js} +11 -11
  42. package/dist/{Store-B8k5YVqU.js → Store-DA54GAU7.js} +20 -20
  43. package/dist/{StoreRewards-BW08rwpL.js → StoreRewards-BH_CG0_m.js} +14 -14
  44. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js → StoreTransactions.vue_vue_type_script_setup_true_lang-yX42EwdC.js} +19 -19
  45. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CJSNkho6.js} +1 -1
  46. package/dist/{Tier-DKzu4tYw.js → Tier-Bv9Jc58B.js} +23 -23
  47. package/dist/{Title-BK-TXatJ.js → Title-BzhaAeWE.js} +20 -20
  48. package/dist/{Transaction-Duayg1jd.js → Transaction-D6l7eUto.js} +2 -2
  49. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOlKr1u5.js} +6 -6
  50. package/dist/{Voucher-BEVAkNeJ.js → Voucher-c9rOPty1.js} +164 -142
  51. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js → VoucherEditor.vue_vue_type_script_setup_true_lang-gM2Q2SZj.js} +12 -12
  52. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js → ZodTextField.vue_vue_type_script_setup_true_lang--cPeKAQK.js} +2 -2
  53. package/dist/{app-IvbII0ql.js → app-rrEjDuDH.js} +78 -48
  54. package/dist/app.js +1 -1
  55. package/dist/{business-BFIwFfkq.js → business-BtKxs_y6.js} +1 -1
  56. package/dist/{campaign-w9j4I4jn.js → campaign-Dp6iTHEz.js} +2 -2
  57. package/dist/{campaign-RuIwxc4y.js → campaign-rXQhZIDH.js} +8 -8
  58. package/dist/{campaign.enum-IHLsfdik.js → campaign.enum-Deak-UID.js} +1 -1
  59. package/dist/{campaign.fn-B_P1MkRV.js → campaign.fn-At50e4px.js} +32 -32
  60. package/dist/{collectible.enum-CUgSjO08.js → collectible.enum-BKAKCyYj.js} +1 -1
  61. package/dist/{collection.fn-CrfnNb41.js → collection.fn-DPhZ4J5s.js} +2 -2
  62. package/dist/{dto-jwO_sX9I.js → dto-Dr0nOU62.js} +4 -4
  63. package/dist/duplicateCampaign-5fhHX37P.js +35 -0
  64. package/dist/{effect--0g8PNyt.js → effect-CFMQ5REv.js} +1 -1
  65. package/dist/{email-addresses-HtsxvXw9.js → email-addresses-RpPqY7Ns.js} +2 -2
  66. package/dist/{export-CFEwMRmd.js → export-CYQVBcQQ.js} +2 -2
  67. package/dist/{helper-CCfb24PO.js → helper-NA1sBf5O.js} +1 -1
  68. package/dist/{index-CR3f3BXQ.js → index-B5ZaTTfd.js} +4 -4
  69. package/dist/{index-CppLPpqB.js → index-B7JPvTGD.js} +3 -3
  70. package/dist/{index-CkuPY85X.js → index-CA1VTtfl.js} +1 -1
  71. package/dist/{index-wzSeRJAd.js → index-CXj0NuF-.js} +1 -1
  72. package/dist/{index-Bflu4Rft.js → index-CfdrsgL1.js} +3 -3
  73. package/dist/{index-BR3UbZ0F.js → index-Cjz7ja8g.js} +1 -1
  74. package/dist/{index-DDYH-IEX.js → index-DQBsBSAl.js} +1 -1
  75. package/dist/{index-B-AMMFfT.js → index-De8KJ5ee.js} +4 -4
  76. package/dist/{index-DdZdHioZ.js → index-DgbKnxUQ.js} +6 -6
  77. package/dist/{index-BZEM0T2A.js → index-DoQbrp4H.js} +1 -1
  78. package/dist/{index-Dic_WcAL.js → index-Du1J2M6c.js} +1 -1
  79. package/dist/{index-CZPcwcUo.js → index-FB5JDcqo.js} +3 -3
  80. package/dist/{index-DpjYgKTN.js → index-ZDRZDJJ-.js} +1 -1
  81. package/dist/{index.esm2017-CUnjzfU-.js → index.esm2017-DWyiVIYc.js} +1 -1
  82. package/dist/{loading-CivgDw5C.js → loading-BsFOHhQ7.js} +2 -2
  83. package/dist/{lodash-BSbv_9TG.js → lodash-DYYviyoC.js} +1 -1
  84. package/dist/{membership-j2w1YUO-.js → membership-UU6e1zGd.js} +3 -3
  85. package/dist/{money-DL-x8hiT.js → money-CreQ4gmS.js} +1 -1
  86. package/dist/{number-D1yoFGEr.js → number-CVU6hHec.js} +1 -1
  87. package/dist/{objectid-CHab6j3r.js → objectid-C23E4-r1.js} +13 -13
  88. package/dist/{plugins-P-V4XWmW.js → plugins-DhptoQqr.js} +3 -3
  89. package/dist/{reward-BqMlBQRu.js → reward-CawSKEN7.js} +1 -1
  90. package/dist/{rule-CztsLdki.js → rule-DfoqRN4t.js} +3 -3
  91. package/dist/{rule-builder-DANv7Rmz.js → rule-builder-TeN72YwV.js} +1 -1
  92. package/dist/{template-Dbz3FhHK.js → template-CFKkBFuQ.js} +6 -6
  93. package/dist/{timezone-BgVqObBq.js → timezone-aMH10XL_.js} +2 -2
  94. package/dist/{trigger-CbriUibd.js → trigger-wauWh36i.js} +5 -5
  95. package/dist/{usePagination-DtNK7W0U.js → usePagination-CMQVYF13.js} +1 -1
  96. package/dist/{user-CVapqHfr.js → user-DaUp8rok.js} +1 -1
  97. package/dist/{vue-i18n-tpDAnnmD.js → vue-i18n-gi9JUtvo.js} +157 -157
  98. package/dist/{xlsx-EewcN2uY.js → xlsx-BNx9zr-c.js} +1 -1
  99. package/dist/{zod-D-wiCQRJ.js → zod-_ZFtblDD.js} +1 -1
  100. package/package.json +1 -1
  101. package/dist/Broadcast-6VXz4-IG.js +0 -233
  102. package/dist/Credit-BUqGOyp_.js +0 -226
  103. package/dist/Experience-BxiFH_uV.js +0 -225
  104. package/dist/Game-BzYW0LfY.js +0 -300
  105. package/dist/Mission-Q5_sGgrm.js +0 -304
  106. package/dist/Point-BGYFMvev.js +0 -228
  107. package/dist/Promotion-0acd63nA.js +0 -364
@@ -0,0 +1,261 @@
1
+ import { defineComponent as H, ref as L, computed as q, h as w, onMounted as O, resolveComponent as m, openBlock as d, createElementBlock as _, Fragment as v, createVNode as s, unref as o, createElementVNode as n, withCtx as b, renderList as z, createBlock as x, resolveDynamicComponent as G, toDisplayString as D, createCommentVNode as J } from "vue";
2
+ import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as W, components as V } from "@feedmepos/ui-library";
4
+ import { p as X } from "./plugins-DhptoQqr.js";
5
+ import { u as Y } from "./loading-BsFOHhQ7.js";
6
+ import { u as Z } from "./business-BtKxs_y6.js";
7
+ import { u as ee } from "./campaign-Dp6iTHEz.js";
8
+ import { a as te, b as B, c as I } from "./campaign-rXQhZIDH.js";
9
+ import { c as oe, p as ae } from "./duplicateCampaign-5fhHX37P.js";
10
+ import { u as ne } from "./vue-i18n-gi9JUtvo.js";
11
+ import { _ as re } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
+ import { _ as ie } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-n8_AVbJA.js";
13
+ import { u as se } from "./template-CFKkBFuQ.js";
14
+ import { c as f } from "./index-ZDRZDJJ-.js";
15
+ const ce = { class: "px-24 flex flex-col gap-y-16" }, le = { class: "flex items-center justify-between w-full" }, me = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, ue = { class: "space-y-4" }, fe = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex items-center gap-8" }, _e = { key: 0 }, Ee = /* @__PURE__ */ H({
16
+ __name: "Credit",
17
+ setup(Ce) {
18
+ const { t: r } = ne(), T = {
19
+ label: r("connect.program.common.actions.create", {
20
+ type: r("connect.program.credit.title").toLowerCase()
21
+ }),
22
+ value: "create",
23
+ isPrimary: !0,
24
+ prependIcon: "add"
25
+ }, E = se("CREDIT", W()), R = Z(), p = ee(), { global: K, minor: k } = Y, c = L({
26
+ searchKey: "",
27
+ location: []
28
+ });
29
+ function P(e) {
30
+ const t = c.value.location;
31
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
32
+ var i;
33
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
34
+ }) : e.targetLocation.includes(t);
35
+ }
36
+ const u = q(
37
+ () => p.campaigns.credit.filter((e) => P(e))
38
+ ), $ = [
39
+ {
40
+ header: r("connect.program.common.table.title"),
41
+ accessorFn: (e) => e.name
42
+ },
43
+ {
44
+ header: r("connect.program.common.table.status"),
45
+ accessorFn: (e) => te(e),
46
+ cell(e) {
47
+ return B(e.row.original);
48
+ }
49
+ },
50
+ {
51
+ header: r("connect.program.common.table.summary"),
52
+ accessorFn: (e) => I(e)
53
+ },
54
+ {
55
+ header: r("connect.program.common.table.actions"),
56
+ cell(e) {
57
+ return w("div", { class: "flex items-center gap-8 justify-end" }, [
58
+ w(V.FmButton, {
59
+ variant: "tertiary",
60
+ icon: "content_copy",
61
+ iconColor: "neutral-gray-400",
62
+ onClick: async (t) => {
63
+ t.stopPropagation(), await S(e.row.original);
64
+ }
65
+ }),
66
+ w(V.FmButton, {
67
+ variant: "tertiary",
68
+ icon: "delete",
69
+ iconColor: "neutral-gray-400",
70
+ onClick: (t) => {
71
+ t.stopPropagation(), F(e.row.original);
72
+ }
73
+ })
74
+ ]);
75
+ }
76
+ }
77
+ ], C = L();
78
+ async function F(e) {
79
+ await X.remove(
80
+ r("connect.program.common.remove.confirm", { name: e.name })
81
+ ) && await k(
82
+ async () => {
83
+ await f.delete(e._id), await p.read("CREDIT");
84
+ },
85
+ {
86
+ message: r("connect.program.common.remove.removing", { name: e.name }),
87
+ successMessage: r("connect.program.common.remove.removed", {
88
+ name: e.name
89
+ })
90
+ }
91
+ );
92
+ }
93
+ async function g(e) {
94
+ e ? await t() : E.open(async (l) => {
95
+ await t(l);
96
+ });
97
+ async function t(l) {
98
+ var i;
99
+ (i = C.value) == null || i.showSheet(
100
+ !0,
101
+ "CREDIT",
102
+ e ? await f.readById(e._id) : void 0,
103
+ l
104
+ );
105
+ }
106
+ }
107
+ async function S(e) {
108
+ var i;
109
+ if (!await oe(e.name))
110
+ return;
111
+ const t = await f.readById(e._id), l = ae(t, {
112
+ keepCollectible: !0
113
+ });
114
+ (i = C.value) == null || i.showSheet(
115
+ !0,
116
+ "CREDIT",
117
+ l,
118
+ t.template
119
+ );
120
+ }
121
+ async function U(e) {
122
+ await k(
123
+ async () => {
124
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("CREDIT");
125
+ },
126
+ {
127
+ message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
128
+ successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
129
+ }
130
+ );
131
+ }
132
+ return O(async () => {
133
+ await K(async () => {
134
+ await p.read("CREDIT");
135
+ });
136
+ }), (e, t) => {
137
+ const l = m("FmPageHead"), i = m("FmSearch"), j = m("FmTable"), h = m("FmButton"), A = m("FmListItem"), N = m("FmList"), M = m("FmCard");
138
+ return d(), _(v, null, [
139
+ s(l, {
140
+ title: o(r)("connect.program.credit.title"),
141
+ actions: o(u).length > 0 ? [T] : [],
142
+ "onClick:action": t[0] || (t[0] = () => g())
143
+ }, null, 8, ["title", "actions"]),
144
+ n("div", ce, [
145
+ s(i, {
146
+ modelValue: o(c).searchKey,
147
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
148
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
149
+ placeholder: "search",
150
+ collapsible: ""
151
+ }, null, 8, ["modelValue"]),
152
+ o(p).campaigns.credit && o(p).campaigns.credit.length > 0 ? (d(), _(v, { key: 0 }, [
153
+ n("div", le, [
154
+ n("div", me, [
155
+ s(re, {
156
+ label: `${o(r)("connect.common.location")}: `,
157
+ "right-icon": "keyboard_arrow_down",
158
+ modelValue: o(c).location,
159
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
160
+ icon: "storefront",
161
+ "show-item-label": !0,
162
+ items: o(R).locationOptions
163
+ }, null, 8, ["label", "modelValue", "items"])
164
+ ]),
165
+ s(i, {
166
+ modelValue: o(c).searchKey,
167
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
168
+ class: "xs:hidden sm:hidden",
169
+ placeholder: "search",
170
+ collapsible: ""
171
+ }, null, 8, ["modelValue"])
172
+ ]),
173
+ s(j, {
174
+ class: "xs:hidden sm:hidden",
175
+ "row-data": o(u),
176
+ "column-defs": $,
177
+ "search-value": o(c).searchKey,
178
+ "column-filter": [],
179
+ onRowClick: t[4] || (t[4] = (a) => g(a.original)),
180
+ "hide-footer": o(u).length < 10
181
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
182
+ s(N, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
183
+ default: b(() => [
184
+ (d(!0), _(v, null, z(o(u).filter(
185
+ (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
186
+ ), (a) => (d(), x(A, {
187
+ key: a._id.toString(),
188
+ onClick: (y) => g(a),
189
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
190
+ }, {
191
+ default: b(() => [
192
+ n("div", de, [
193
+ n("div", pe, [
194
+ (d(), x(G(o(B)(a))))
195
+ ]),
196
+ n("div", ue, [
197
+ n("div", fe, D(a.name), 1),
198
+ n("div", ge, D(o(I)(a)), 1)
199
+ ])
200
+ ]),
201
+ n("div", ye, [
202
+ s(h, {
203
+ icon: "content_copy",
204
+ "icon-color": "neutral-gray-400",
205
+ variant: "tertiary",
206
+ onClick: async (y) => {
207
+ y.stopPropagation(), await S(a);
208
+ }
209
+ }, null, 8, ["onClick"]),
210
+ s(h, {
211
+ icon: "delete",
212
+ "icon-color": "neutral-gray-400",
213
+ variant: "tertiary",
214
+ onClick: (y) => (y.stopPropagation(), F(a))
215
+ }, null, 8, ["onClick"])
216
+ ])
217
+ ]),
218
+ _: 2
219
+ }, 1032, ["onClick"]))), 128))
220
+ ]),
221
+ _: 1
222
+ }),
223
+ o(u).length == 0 ? (d(), _("div", _e, [...t[6] || (t[6] = [
224
+ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
225
+ ])])) : J("", !0)
226
+ ], 64)) : (d(), x(M, {
227
+ key: 1,
228
+ variant: "outlined",
229
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
230
+ }, {
231
+ default: b(() => [
232
+ t[7] || (t[7] = n("img", {
233
+ src: Q,
234
+ class: "aspect-square w-[150px]"
235
+ }, null, -1)),
236
+ t[8] || (t[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
237
+ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
238
+ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
239
+ ], -1)),
240
+ s(h, {
241
+ variant: "primary",
242
+ label: "Create credit program",
243
+ icon: "add",
244
+ onClick: t[5] || (t[5] = (a) => g())
245
+ })
246
+ ]),
247
+ _: 1
248
+ })),
249
+ s(ie, {
250
+ ref_key: "sheetRef",
251
+ ref: C,
252
+ "onSubmit:modelValue": U
253
+ }, null, 512)
254
+ ])
255
+ ], 64);
256
+ };
257
+ }
258
+ });
259
+ export {
260
+ Ee as default
261
+ };