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

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 (113) hide show
  1. package/dist/Analytic-O-qZWrFp.js +761 -0
  2. package/dist/{App-Bpo0XZSs.js → App-BWZ2EE71.js} +364 -352
  3. package/dist/AuditLogs-DlmcFEta.js +1887 -0
  4. package/dist/{Bin-ohZ2CZZR.js → Bin-C-Ha-4yF.js} +8 -8
  5. package/dist/{Broadcast-D5x0_-zC.js → Broadcast-Bo3QS8lS.js} +40 -40
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js} +18 -18
  7. package/dist/{Card-BM-Lrm5y.js → Card-Bs1TDE0e.js} +159 -159
  8. package/dist/{Collections-Cr4aoJer.js → Collections-Dy5RN7Js.js} +103 -91
  9. package/dist/{Credit-DzDVFv4H.js → Credit-Bqc4dw1s.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-D6AmN3o3.js} +490 -488
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js} +91 -89
  13. package/dist/{Experience-CjaDdbvZ.js → Experience-C2e2T7B-.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-C86eEhcx.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-BRGweFco.js} +10 -10
  18. package/dist/Marketing-CnnrnXbS.js +20073 -0
  19. package/dist/{Member-B4S0UNGq.js → Member-B3o0Zhcw.js} +76 -76
  20. package/dist/MemberList-BpE1IjED.js +1606 -0
  21. package/dist/MemberOverview-wL_ailso.js +58 -0
  22. package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-C4hao-d9.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js → MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js} +36 -36
  24. package/dist/{Mission-BtypT2uF.js → Mission-BURXfzjd.js} +21 -21
  25. package/dist/{Overview-Be7bUtRO.js → Overview-D_hrrM4O.js} +335 -335
  26. package/dist/{Point-Bw4lnLqp.js → Point-CJXkJY5Q.js} +41 -41
  27. package/dist/Promotion-CunJrh42.js +289 -0
  28. package/dist/{Queue-CpPEVgn8.js → Queue-v5Itg9J4.js} +52 -52
  29. package/dist/{Record-DQq4P69i.js → Record-DJe4tg9R.js} +9 -9
  30. package/dist/{Reward-DJH0eM8u.js → Reward-Y9aHpny5.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-1KAjCblO.js} +11 -11
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js} +635 -548
  33. package/dist/Segment-DVT8uDn8.js +882 -0
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.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-b5bjfBvc.js} +11 -11
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js} +3 -3
  37. package/dist/{Setting-GRIUo7vg.js → Setting-BU5778gG.js} +432 -432
  38. package/dist/{Store-H0UDQpln.js → Store-IWg0POAU.js} +211 -211
  39. package/dist/StoreRewards-CIjHcVoh.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.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-BcOvr526.js} +1 -1
  42. package/dist/{Tier-CJufQcIz.js → Tier-iN30KD7g.js} +106 -106
  43. package/dist/{Title-BBMgGUld.js → Title-Duh_Srek.js} +133 -131
  44. package/dist/{Transaction-DsucPnfp.js → Transaction-DLBA7Svl.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js} +6 -6
  46. package/dist/{Voucher-BPvxKO_w.js → Voucher-cTvlMN0Y.js} +153 -123
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js} +1 -1
  49. package/dist/{app-Bo0JpadQ.js → app-A3oEKLq5.js} +1 -1
  50. package/dist/{app-D3MT1deX.js → app-De-yQ1CJ.js} +164 -125
  51. package/dist/app.js +4 -3
  52. package/dist/business-B2JBpm4y.js +79 -0
  53. package/dist/{campaign-Z3l7BoMg.js → campaign-Bhur0NJx.js} +9 -9
  54. package/dist/{campaign-j1c3ou7l.js → campaign-vkzui6F2.js} +5 -3
  55. package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-DCYkKGhd.js} +1 -1
  56. package/dist/{campaign.fn-rsRhHYZP.js → campaign.fn--affTEi5.js} +75 -75
  57. package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-CLBCnfev.js} +1 -1
  58. package/dist/{collection.fn-Bz38mGMa.js → collection.fn-bA8q0KYy.js} +2 -2
  59. package/dist/{dto-D648NN4s.js → dto-RCcWeYE0.js} +4 -4
  60. package/dist/{effect-DbMAmVSR.js → effect-D7qRfPe_.js} +1 -1
  61. package/dist/{email-addresses-KOVDrRiK.js → email-addresses-a8PqViID.js} +1 -1
  62. package/dist/{export-cTZf8Avd.js → export-BneqNRn4.js} +3 -3
  63. package/dist/{helper-BYyfcLqw.js → helper-DfvvxOyO.js} +1 -1
  64. package/dist/{index-E-0tTd0_.js → index-2LpkG8Ye.js} +1 -1
  65. package/dist/{index-BMl2KZts.js → index-4kMeSNTr.js} +11447 -10969
  66. package/dist/{index-BrKXRxe_.js → index-B0T9GDIZ.js} +1 -1
  67. package/dist/{index-B3p0hmIV.js → index-BWTvsoH0.js} +1 -1
  68. package/dist/index-CMBPIb8x.js +32260 -0
  69. package/dist/{index-DPBHiqsJ.js → index-CTKMdxSm.js} +1 -1
  70. package/dist/index-CVAWGMus.js +56 -0
  71. package/dist/index-CbsJ6vMJ.js +31 -0
  72. package/dist/{index-BTb8I_eB.js → index-CrFUhsZO.js} +1 -1
  73. package/dist/index-CsaQJMAR.js +66 -0
  74. package/dist/{index-CvoShC5J.js → index-CtDqXnOp.js} +535 -460
  75. package/dist/{index-BIaCtk8e.js → index-D0GnMoag.js} +181 -79
  76. package/dist/{index-nF9iYTlh.js → index-DMrIQqFt.js} +1 -1
  77. package/dist/{index-B4MqsaBz.js → index-DeXvASjP.js} +3 -3
  78. package/dist/{index-CTPMbFf5.js → index-y-7yUm2e.js} +10 -9
  79. package/dist/{index.esm2017-DFYwde30.js → index.esm2017-JtyypweZ.js} +127 -127
  80. package/dist/{loading-vUArhX_O.js → loading-a-FqrwqI.js} +1 -1
  81. package/dist/{membership-BHKv29yt.js → membership-CGVtil5J.js} +3 -3
  82. package/dist/{money-Bl3_QRkE.js → money-CTc1l_Cq.js} +1 -1
  83. package/dist/{number-hh_S9w7k.js → number-W3R-0nYP.js} +1 -1
  84. package/dist/objectid-BU0Y8iAN.js +145 -0
  85. package/dist/{plugins-CVes2wzE.js → plugins-D2sSgTSl.js} +2 -2
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/{reward-ANZOdWzf.js → reward-atP8vnNn.js} +1 -1
  88. package/dist/{rule-builder-BSN777PN.js → rule-builder-BB29ZJ_C.js} +17 -17
  89. package/dist/{rule-BvFk5bQg.js → rule-eA5IvnjB.js} +3 -3
  90. package/dist/style.css +1 -1
  91. package/dist/{template-Dh9lDLs_.js → template-DhBeDaAm.js} +64 -64
  92. package/dist/{trigger-C7THbt7R.js → trigger-Bq_pZj1J.js} +7 -7
  93. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  94. package/dist/{user-DtNR9JY2.js → user-B-bhVFIG.js} +1 -1
  95. package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-D-h8VDSx.js} +310 -310
  96. package/dist/{xlsx-7u9SB0oa.js → xlsx-DsByAcZl.js} +226 -226
  97. package/package.json +5 -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/MemberList-CfnUJ3mh.js +0 -1606
  102. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  103. package/dist/Promotion-Bg6x0rAh.js +0 -255
  104. package/dist/Segment-BLB4VWNJ.js +0 -882
  105. package/dist/StoreRewards--TNIFaCo.js +0 -423
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
  107. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
  108. package/dist/business-DMALI7ZO.js +0 -78
  109. package/dist/index-BsCGyJMY.js +0 -29566
  110. package/dist/index-CuvNtC_M.js +0 -61
  111. package/dist/index-DFKmjCG1.js +0 -44
  112. package/dist/index-Dbd4WA4r.js +0 -61
  113. package/dist/objectid-CEyMlMge.js +0 -145
@@ -1,319 +0,0 @@
1
- import { openBlock as m, createElementBlock as p, defineComponent as z, ref as S, onMounted as Y, computed as H, h as J, resolveComponent as c, Fragment as x, createVNode as i, unref as r, createElementVNode as s, withCtx as F, renderList as $, createBlock as B, toDisplayString as f, createCommentVNode as j } from "vue";
2
- import { _ as q } from "./campaign-CpzFl8Vr.js";
3
- import { components as G } from "@feedmepos/ui-library";
4
- import { p as X } from "./plugins-CVes2wzE.js";
5
- import { u as Q } from "./loading-vUArhX_O.js";
6
- import { defineStore as W } from "pinia";
7
- import { F as C } from "./index-BrKXRxe_.js";
8
- import { useCoreStore as Z } from "@feedmepos/mf-common";
9
- import { g as h, S as ee, b as te } from "./index-BMl2KZts.js";
10
- import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { u as ae } from "./campaign-j1c3ou7l.js";
12
- import { h as oe } from "./moment-BWErdI6_.js";
13
- import { u as re } from "./vue-i18n-BWyHnm4m.js";
14
- var se = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc" };
15
- const y = () => {
16
- const o = ee.getBusinessId();
17
- if (!o) throw new Error("Invalid business ID");
18
- return te(`businesses/${o}/marketing-materials/`, {
19
- url: se.backendUrl,
20
- noIdRequired: !0
21
- });
22
- }, L = {
23
- async read() {
24
- return h(await y().get(""));
25
- },
26
- async createMarketing(o) {
27
- return h(await y().post("", o));
28
- },
29
- // add id
30
- async updateMarketing(o, t) {
31
- return h(
32
- await y().put(o, t)
33
- );
34
- },
35
- async deleteMarketing(o) {
36
- return h(await y().delete(o));
37
- }
38
- }, I = W("mf-connect-marketing", {
39
- state: () => {
40
- var o, t;
41
- return {
42
- marketing: [],
43
- defaultMarketing: {
44
- _id: void 0,
45
- business: ((t = (o = Z().currentBusiness) == null ? void 0 : o.value) == null ? void 0 : t._id) ?? "",
46
- name: "",
47
- campaign: null,
48
- keywords: "",
49
- image: "",
50
- headline: {
51
- content: "",
52
- key: void 0
53
- },
54
- assets: [
55
- {
56
- platform: C.enum.FACEBOOK,
57
- contents: [
58
- {
59
- type: "POST",
60
- size: {
61
- width: 1920,
62
- height: 1080
63
- },
64
- images: []
65
- },
66
- {
67
- type: "STORY",
68
- size: {
69
- width: 1080,
70
- height: 1920
71
- },
72
- images: []
73
- }
74
- ]
75
- },
76
- {
77
- platform: C.enum.INSTAGRAM,
78
- contents: [
79
- {
80
- type: "POST",
81
- size: {
82
- width: 1080,
83
- height: 1080
84
- },
85
- images: []
86
- },
87
- {
88
- type: "STORY",
89
- size: {
90
- width: 1080,
91
- height: 1920
92
- },
93
- images: []
94
- },
95
- {
96
- type: "REEL",
97
- size: {
98
- width: 1080,
99
- height: 1920
100
- },
101
- images: []
102
- }
103
- ]
104
- },
105
- {
106
- platform: C.enum.BRAND_APP,
107
- contents: [
108
- {
109
- type: "IMAGE",
110
- size: {
111
- width: 1080,
112
- height: 1920
113
- },
114
- images: []
115
- }
116
- ]
117
- }
118
- ],
119
- captions: [{ language: "en", content: "" }]
120
- }
121
- };
122
- },
123
- actions: {
124
- async readMarketingMaterial() {
125
- const o = await L.read();
126
- this.marketing = o;
127
- }
128
- },
129
- getters: {
130
- state(o) {
131
- return o;
132
- }
133
- }
134
- }), ie = {};
135
- function le(o, t) {
136
- return m(), p("div");
137
- }
138
- const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "space-y-8" }, ue = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-lg-600" }, fe = { key: 0 }, he = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), ye = [
139
- he
140
- ], ke = /* @__PURE__ */ s("img", {
141
- src: q,
142
- class: "w-[150px]"
143
- }, null, -1), _e = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, Le = /* @__PURE__ */ z({
144
- __name: "Marketing",
145
- setup(o) {
146
- const { t } = re(), O = {
147
- label: t("connect.marketing.create"),
148
- value: "create",
149
- isPrimary: !0,
150
- prependIcon: "add"
151
- }, k = S(!1), _ = I(), b = ae(), { global: N, minor: U } = Q;
152
- Y(async () => {
153
- await N(async () => {
154
- await b.read(), await _.readMarketingMaterial();
155
- });
156
- });
157
- const d = H(() => _.marketing.filter(
158
- (n) => n.name.includes(l.value.searchKey.toLowerCase())
159
- )), u = S(
160
- I().defaultMarketing
161
- ), D = [
162
- {
163
- header: t("connect.marketing.table.name"),
164
- accessorFn: (n) => n.name
165
- },
166
- {
167
- header: t("connect.marketing.table.campaign"),
168
- accessorFn: (n) => {
169
- var e;
170
- return n.campaign === null || n.campaign === void 0 ? "-" : (e = b.campaigns.all.find(
171
- (v) => v._id === n.campaign
172
- )) == null ? void 0 : e.name;
173
- }
174
- },
175
- {
176
- header: t("connect.marketing.table.createdDate"),
177
- accessorFn: (n) => {
178
- const e = new Date(
179
- parseInt(n._id.toString().substring(0, 8), 16) * 1e3
180
- );
181
- return oe(e).format("DD MMM YYYY");
182
- }
183
- },
184
- {
185
- header: t("connect.marketing.table.actions"),
186
- cell(n) {
187
- return J(G.FmButton, {
188
- variant: "tertiary",
189
- icon: "delete",
190
- iconColor: "neutral-gray-400",
191
- onClick: (e) => {
192
- e.stopPropagation(), P(n.row.original);
193
- }
194
- });
195
- }
196
- }
197
- ];
198
- async function P(n) {
199
- await X.remove(
200
- t("connect.marketing.delete.confirm", { name: n.name })
201
- ) && await U(
202
- async () => {
203
- await L.deleteMarketing(n._id), await _.readMarketingMaterial();
204
- },
205
- {
206
- message: t("connect.marketing.delete.removing", { name: n.name }),
207
- successMessage: t("connect.marketing.delete.success", {
208
- name: n.name
209
- })
210
- }
211
- );
212
- }
213
- async function g(n) {
214
- n ? u.value = JSON.parse(JSON.stringify(n)) : u.value = JSON.parse(
215
- JSON.stringify(I().defaultMarketing)
216
- ), k.value = !0;
217
- }
218
- const l = S({
219
- searchKey: ""
220
- });
221
- return (n, e) => {
222
- const v = c("FmPageHead"), V = c("FmSearch"), E = c("FmTable"), T = c("FmButton"), K = c("FmListItem"), A = c("FmList"), R = c("FmCard");
223
- return m(), p(x, null, [
224
- i(v, {
225
- title: r(t)("connect.marketing.title"),
226
- class: "xs:hidden",
227
- actions: r(d).length > 0 ? [O] : [],
228
- "onClick:action": e[0] || (e[0] = () => g())
229
- }, null, 8, ["title", "actions"]),
230
- s("div", me, [
231
- i(V, {
232
- modelValue: l.value.searchKey,
233
- "onUpdate:modelValue": e[1] || (e[1] = (a) => l.value.searchKey = a),
234
- placeholder: r(t)("connect.marketing.search"),
235
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
236
- collapsible: ""
237
- }, null, 8, ["modelValue", "placeholder"]),
238
- i(ce, {
239
- modelValue: u.value,
240
- "onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
241
- "is-open": k.value,
242
- "onUpdate:isOpen": e[3] || (e[3] = (a) => k.value = a)
243
- }, null, 8, ["modelValue", "is-open"]),
244
- r(d).length > 0 ? (m(), p(x, { key: 0 }, [
245
- s("div", de, [
246
- i(V, {
247
- modelValue: l.value.searchKey,
248
- "onUpdate:modelValue": e[4] || (e[4] = (a) => l.value.searchKey = a),
249
- class: "xs:hidden",
250
- placeholder: r(t)("connect.marketing.search"),
251
- collapsible: ""
252
- }, null, 8, ["modelValue", "placeholder"])
253
- ]),
254
- i(E, {
255
- class: "xs:hidden",
256
- "row-data": r(d),
257
- "column-defs": D,
258
- "search-value": l.value.searchKey,
259
- "column-filter": [],
260
- onRowClick: e[5] || (e[5] = (a) => g(a.original)),
261
- "hide-footer": !0
262
- }, null, 8, ["row-data", "search-value"]),
263
- i(A, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
264
- default: F(() => [
265
- (m(!0), p(x, null, $(r(d).filter(
266
- (a) => a.name.toLowerCase().includes(l.value.searchKey.toLowerCase())
267
- ), (a) => (m(), B(K, {
268
- key: a._id.toString(),
269
- onClick: (w) => g(a),
270
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
271
- }, {
272
- default: F(() => {
273
- var w;
274
- return [
275
- s("div", pe, [
276
- s("div", ue, f(a.name), 1),
277
- s("div", ge, f(a.campaign === null || a.campaign === void 0 ? "-" : (w = r(b).campaigns.all.find(
278
- (M) => M._id === a.campaign
279
- )) == null ? void 0 : w.name), 1)
280
- ]),
281
- i(T, {
282
- icon: "delete",
283
- "icon-color": "neutral-gray-400",
284
- variant: "tertiary",
285
- onClick: (M) => (M.stopPropagation(), P(a))
286
- }, null, 8, ["onClick"])
287
- ];
288
- }),
289
- _: 2
290
- }, 1032, ["onClick"]))), 128))
291
- ]),
292
- _: 1
293
- }),
294
- r(d).length == 0 ? (m(), p("div", fe, ye)) : j("", !0)
295
- ], 64)) : (m(), B(R, {
296
- key: 1,
297
- variant: "outlined",
298
- class: "w-full justify-center items-center flex flex-col p-[24px] gap-[24px]"
299
- }, {
300
- default: F(() => [
301
- ke,
302
- s("p", _e, f(r(t)("connect.marketing.emptyState.title")), 1),
303
- s("p", be, f(r(t)("connect.marketing.emptyState.description")), 1),
304
- i(T, {
305
- label: r(t)("connect.marketing.emptyState.action"),
306
- "prepend-icon": "add",
307
- onClick: e[6] || (e[6] = (a) => g())
308
- }, null, 8, ["label"])
309
- ]),
310
- _: 1
311
- }))
312
- ])
313
- ], 64);
314
- };
315
- }
316
- });
317
- export {
318
- Le as default
319
- };