@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.50

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 (112) hide show
  1. package/dist/Analytic-D-yp03jJ.js +427 -0
  2. package/dist/{App-C8Qfnkhz.js → App-CeQWTGNK.js} +441 -420
  3. package/dist/AuditLogs-2qzwcMXR.js +1885 -0
  4. package/dist/Bin-D1b2NbbA.js +191 -0
  5. package/dist/{Broadcast-BK-1MQkL.js → Broadcast-bKF9mIns.js} +13 -12
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -8
  7. package/dist/Card-BCAyfBLi.js +896 -0
  8. package/dist/{Collections-TA4iW1r0.js → Collections-Yz3F55bv.js} +27 -31
  9. package/dist/{Credit-Df9iFQjZ.js → Credit-Ceptt_g_.js} +17 -16
  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-CLFeMi0j.js +169 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +6 -6
  14. package/dist/{Experience-ByLFXKn6.js → Experience-DskHKzfo.js} +26 -25
  15. package/dist/{Game-B6Ez0pfW.js → Game-IJ6X0AXM.js} +21 -20
  16. package/dist/Index-CEl2y9X6.js +259 -0
  17. package/dist/Marketing-CWekLb4c.js +20071 -0
  18. package/dist/{Member-TobP1ISp.js → Member-BUZPQ5Lb.js} +4 -4
  19. package/dist/MemberList-BmVNqvbm.js +1598 -0
  20. package/dist/MemberTransactions-B3XhEOK_.js +45 -0
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +6 -6
  22. package/dist/{Mission-D9uTVo0G.js → Mission-Ci9ed_ph.js} +97 -84
  23. package/dist/Overview-CU9uhC-k.js +1078 -0
  24. package/dist/{Point-4rDr-53e.js → Point-wuuR7AEb.js} +26 -25
  25. package/dist/{Promotion-BKO_dtQk.js → Promotion-BMi3kyE8.js} +55 -48
  26. package/dist/Record-Wmh-g8WY.js +340 -0
  27. package/dist/Reward-BL4lxhIB.js +442 -0
  28. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js +150 -0
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js +1637 -0
  30. package/dist/Segment-DObdjyYi.js +568 -0
  31. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js +181 -0
  32. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
  33. package/dist/{Setting-B7oISD0D.js → Setting-Dqgnd7TR.js} +610 -586
  34. package/dist/Store--Z4So__g.js +1744 -0
  35. package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-DPFVXWwm.js} +33 -32
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js +939 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
  38. package/dist/{Tier-DkxdNj-K.js → Tier-36IfhsnP.js} +327 -318
  39. package/dist/{Title-VFpCOsMO.js → Title-XH56OOug.js} +199 -184
  40. package/dist/{Transaction-BgKD8n2L.js → Transaction-BUQcSmBs.js} +2 -2
  41. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js +130 -0
  42. package/dist/Voucher-CvmH0kcF.js +353 -0
  43. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js +419 -0
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
  45. package/dist/{app-DUl5dav5.js → app-DeW5_DB0.js} +1754 -1496
  46. package/dist/{app-DA-t-2Zt.js → app-TN8KEPMu.js} +1 -1
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CeCitOY4.js → business-D1mLhSME.js} +1 -1
  49. package/dist/campaign-0tnkhu78.js +1810 -0
  50. package/dist/{campaign-CcLM6e4s.js → campaign-B-12Im0w.js} +2 -2
  51. package/dist/campaign.enum-C8m-HHZE.js +20 -0
  52. package/dist/campaign.fn-CxkhbK9i.js +758 -0
  53. package/dist/collectible.enum-6Syq-vQ6.js +19 -0
  54. package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUj75Jp2.js} +2 -2
  55. package/dist/dto-8wODhIIC.js +214 -0
  56. package/dist/{effect-Dt7rXOBy.js → effect-BEZEjcJu.js} +9 -9
  57. package/dist/email-addresses-PwjkdYYD.js +705 -0
  58. package/dist/{export-CyioiboQ.js → export-BB-0vgwy.js} +5 -5
  59. package/dist/{helper-FA_9AhGV.js → helper-DOt8-wns.js} +1 -1
  60. package/dist/{index-DLN4Kzz_.js → index-B1qUjniH.js} +1 -1
  61. package/dist/index-BTMIZz4v.js +44 -0
  62. package/dist/{index-igxrd5jC.js → index-By-GlmG7.js} +1500 -1479
  63. package/dist/index-C7zBkoZ4.js +115 -0
  64. package/dist/{index-CyNdsVrw.js → index-CNlHabtk.js} +1 -1
  65. package/dist/{index-DbbO3wip.js → index-CXGiIgdK.js} +48 -4
  66. package/dist/{index-C20XBD7G.js → index-Cjn1LVjC.js} +2192 -931
  67. package/dist/index-CpfUrdgw.js +29000 -0
  68. package/dist/index-CsaQJMAR.js +66 -0
  69. package/dist/index-DZuEmMyY.js +54 -0
  70. package/dist/{index-CCdXvb92.js → index-D_zwqIhq.js} +1 -1
  71. package/dist/index-DabUEw_c.js +32 -0
  72. package/dist/{index-BiFueJiF.js → index-X-FfC49l.js} +258 -192
  73. package/dist/index-vh86FiIQ.js +10 -0
  74. package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-DJOUiVjR.js} +33 -33
  75. package/dist/loading-aCWVsOPY.js +71 -0
  76. package/dist/{membership-DFiY8aVd.js → membership-1etsHC5G.js} +54 -46
  77. package/dist/money-DzWRURZ5.js +15 -0
  78. package/dist/number-BxIQO1i3.js +12 -0
  79. package/dist/objectid-DjhmYkn-.js +145 -0
  80. package/dist/{loading-CZ0fiViM.js → plugins-CSPFAU50.js} +2990 -3062
  81. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  82. package/dist/reward-Bh4Li9f0.js +36 -0
  83. package/dist/{rule-C3e1xTqN.js → rule-CHTTTUFB.js} +180 -177
  84. package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-OHfUJTIA.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{template-C2OKWd_e.js → template-ZGxXqkaC.js} +5 -5
  87. package/dist/trigger-Ogu5FDs0.js +144 -0
  88. package/dist/user-DBuU81tO.js +54 -0
  89. package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-CKpKQ6iE.js} +216 -216
  90. package/dist/{xlsx-CtXdl3ls.js → xlsx-DJDZBIeg.js} +1 -1
  91. package/package.json +9 -7
  92. package/dist/Analytic-C_ZFR5jh.js +0 -622
  93. package/dist/Card-C7dUFJKe.js +0 -825
  94. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
  95. package/dist/Marketing-BaqZUeVI.js +0 -316
  96. package/dist/MemberList-B9cutmEh.js +0 -1733
  97. package/dist/MemberTransactions-DRHA7AOF.js +0 -38
  98. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
  99. package/dist/Segment-Dj8nc3AE.js +0 -437
  100. package/dist/Store-CJ3wcohQ.js +0 -1511
  101. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
  102. package/dist/Voucher-BbTLt8Pt.js +0 -490
  103. package/dist/dto-CRJma6eX.js +0 -2770
  104. package/dist/index-B1e0LtDe.js +0 -99
  105. package/dist/index-Be2ZYDy_.js +0 -298
  106. package/dist/index-CDkITvze.js +0 -762
  107. package/dist/index-CuvNtC_M.js +0 -61
  108. package/dist/index-DPP5F3bT.js +0 -206
  109. package/dist/index-Dbo3DDwp.js +0 -29193
  110. package/dist/money-D8hUEfP4.js +0 -15
  111. package/dist/number-DL3GAeVt.js +0 -12
  112. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,316 +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, u as Q } from "./loading-CZ0fiViM.js";
5
- import { defineStore as W } from "pinia";
6
- import { F as C } from "./index-DLN4Kzz_.js";
7
- import { useCoreStore as Z } from "@feedmepos/mf-common";
8
- import { g as y, S as ee, b as te } from "./index-Dbo3DDwp.js";
9
- import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as ae } from "./campaign-CcLM6e4s.js";
11
- import { h as oe } from "./moment-BWErdI6_.js";
12
- import { u as re } from "./vue-i18n-CjxDUnX6.js";
13
- var se = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
14
- const h = () => {
15
- const o = ee.getBusinessId();
16
- if (!o) throw new Error("Invalid business ID");
17
- return te(`businesses/${o}/marketing-materials/`, {
18
- url: se.backendUrl,
19
- noIdRequired: !0
20
- });
21
- }, L = {
22
- async read() {
23
- return y(await h().get(""));
24
- },
25
- async createMarketing(o) {
26
- return y(await h().post("", o));
27
- },
28
- // add id
29
- async updateMarketing(o, t) {
30
- return y(
31
- await h().put(o, t)
32
- );
33
- },
34
- async deleteMarketing(o) {
35
- return y(await h().delete(o));
36
- }
37
- }, I = W("mf-connect-marketing", {
38
- state: () => {
39
- var o, t;
40
- return {
41
- marketing: [],
42
- defaultMarketing: {
43
- _id: void 0,
44
- business: ((t = (o = Z().currentBusiness) == null ? void 0 : o.value) == null ? void 0 : t._id) ?? "",
45
- name: "",
46
- campaign: null,
47
- keywords: "",
48
- image: "",
49
- headline: {
50
- content: "",
51
- key: void 0
52
- },
53
- assets: [
54
- {
55
- platform: C.enum.FACEBOOK,
56
- contents: [
57
- {
58
- type: "POST",
59
- size: {
60
- width: 1920,
61
- height: 1080
62
- },
63
- images: []
64
- },
65
- {
66
- type: "STORY",
67
- size: {
68
- width: 1080,
69
- height: 1920
70
- },
71
- images: []
72
- }
73
- ]
74
- },
75
- {
76
- platform: C.enum.INSTAGRAM,
77
- contents: [
78
- {
79
- type: "POST",
80
- size: {
81
- width: 1080,
82
- height: 1080
83
- },
84
- images: []
85
- },
86
- {
87
- type: "STORY",
88
- size: {
89
- width: 1080,
90
- height: 1920
91
- },
92
- images: []
93
- },
94
- {
95
- type: "REEL",
96
- size: {
97
- width: 1080,
98
- height: 1920
99
- },
100
- images: []
101
- }
102
- ]
103
- },
104
- {
105
- platform: C.enum.BRAND_APP,
106
- contents: [
107
- {
108
- type: "IMAGE",
109
- size: {
110
- width: 1080,
111
- height: 1920
112
- },
113
- images: []
114
- }
115
- ]
116
- }
117
- ],
118
- captions: [{ language: "en", content: "" }]
119
- }
120
- };
121
- },
122
- actions: {
123
- async readMarketingMaterial() {
124
- const o = await L.read();
125
- this.marketing = o;
126
- }
127
- },
128
- getters: {
129
- state(o) {
130
- return o;
131
- }
132
- }
133
- }), ie = {};
134
- function le(o, t) {
135
- return m(), p("div");
136
- }
137
- 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 }, ye = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, Ve = /* @__PURE__ */ z({
138
- __name: "Marketing",
139
- setup(o) {
140
- const { t } = re(), O = {
141
- label: t("connect.marketing.create"),
142
- value: "create",
143
- isPrimary: !0,
144
- prependIcon: "add"
145
- }, k = S(!1), _ = I(), v = ae(), { global: N, minor: U } = Q;
146
- Y(async () => {
147
- await N(async () => {
148
- await v.read(), await _.readMarketingMaterial();
149
- });
150
- });
151
- const d = H(() => _.marketing.filter(
152
- (n) => n.name.includes(l.value.searchKey.toLowerCase())
153
- )), u = S(
154
- I().defaultMarketing
155
- ), D = [
156
- {
157
- header: t("connect.marketing.table.name"),
158
- accessorFn: (n) => n.name
159
- },
160
- {
161
- header: t("connect.marketing.table.campaign"),
162
- accessorFn: (n) => {
163
- var e;
164
- return n.campaign === null || n.campaign === void 0 ? "-" : (e = v.campaigns.all.find(
165
- (b) => b._id === n.campaign
166
- )) == null ? void 0 : e.name;
167
- }
168
- },
169
- {
170
- header: t("connect.marketing.table.createdDate"),
171
- accessorFn: (n) => {
172
- const e = new Date(
173
- parseInt(n._id.toString().substring(0, 8), 16) * 1e3
174
- );
175
- return oe(e).format("DD MMM YYYY");
176
- }
177
- },
178
- {
179
- header: t("connect.marketing.table.actions"),
180
- cell(n) {
181
- return J(G.FmButton, {
182
- variant: "tertiary",
183
- icon: "delete",
184
- iconColor: "neutral-gray-400",
185
- onClick: (e) => {
186
- e.stopPropagation(), V(n.row.original);
187
- }
188
- });
189
- }
190
- }
191
- ];
192
- async function V(n) {
193
- await X.remove(
194
- t("marketing.delete.confirm", { name: n.name })
195
- ) && await U(
196
- async () => {
197
- await L.deleteMarketing(n._id), await _.readMarketingMaterial();
198
- },
199
- {
200
- message: t("marketing.delete.removing", { name: n.name }),
201
- successMessage: t("marketing.delete.success", { name: n.name })
202
- }
203
- );
204
- }
205
- async function g(n) {
206
- n ? u.value = JSON.parse(JSON.stringify(n)) : u.value = JSON.parse(
207
- JSON.stringify(I().defaultMarketing)
208
- ), k.value = !0;
209
- }
210
- const l = S({
211
- searchKey: ""
212
- });
213
- return (n, e) => {
214
- const b = c("FmPageHead"), P = c("FmSearch"), E = c("FmTable"), T = c("FmButton"), K = c("FmListItem"), A = c("FmList"), R = c("FmCard");
215
- return m(), p(x, null, [
216
- i(b, {
217
- title: r(t)("connect.marketing.title"),
218
- class: "xs:hidden",
219
- actions: r(d).length > 0 ? [O] : [],
220
- "onClick:action": e[0] || (e[0] = () => g())
221
- }, null, 8, ["title", "actions"]),
222
- s("div", me, [
223
- i(P, {
224
- modelValue: l.value.searchKey,
225
- "onUpdate:modelValue": e[1] || (e[1] = (a) => l.value.searchKey = a),
226
- placeholder: r(t)("connect.marketing.search"),
227
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
228
- collapsible: ""
229
- }, null, 8, ["modelValue", "placeholder"]),
230
- i(ce, {
231
- modelValue: u.value,
232
- "onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
233
- "is-open": k.value,
234
- "onUpdate:isOpen": e[3] || (e[3] = (a) => k.value = a)
235
- }, null, 8, ["modelValue", "is-open"]),
236
- r(d).length > 0 ? (m(), p(x, { key: 0 }, [
237
- s("div", de, [
238
- i(P, {
239
- modelValue: l.value.searchKey,
240
- "onUpdate:modelValue": e[4] || (e[4] = (a) => l.value.searchKey = a),
241
- class: "xs:hidden",
242
- placeholder: r(t)("connect.marketing.search"),
243
- collapsible: ""
244
- }, null, 8, ["modelValue", "placeholder"])
245
- ]),
246
- i(E, {
247
- class: "xs:hidden",
248
- "row-data": r(d),
249
- "column-defs": D,
250
- "search-value": l.value.searchKey,
251
- "column-filter": [],
252
- onRowClick: e[5] || (e[5] = (a) => g(a.original)),
253
- "hide-footer": !0
254
- }, null, 8, ["row-data", "search-value"]),
255
- i(A, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
256
- default: F(() => [
257
- (m(!0), p(x, null, $(r(d).filter(
258
- (a) => a.name.toLowerCase().includes(l.value.searchKey.toLowerCase())
259
- ), (a) => (m(), B(K, {
260
- key: a._id.toString(),
261
- onClick: (w) => g(a),
262
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
263
- }, {
264
- default: F(() => {
265
- var w;
266
- return [
267
- s("div", pe, [
268
- s("div", ue, f(a.name), 1),
269
- s("div", ge, f(a.campaign === null || a.campaign === void 0 ? "-" : (w = r(v).campaigns.all.find(
270
- (M) => M._id === a.campaign
271
- )) == null ? void 0 : w.name), 1)
272
- ]),
273
- i(T, {
274
- icon: "delete",
275
- "icon-color": "neutral-gray-400",
276
- variant: "tertiary",
277
- onClick: (M) => (M.stopPropagation(), V(a))
278
- }, null, 8, ["onClick"])
279
- ];
280
- }),
281
- _: 2
282
- }, 1032, ["onClick"]))), 128))
283
- ]),
284
- _: 1
285
- }),
286
- r(d).length == 0 ? (m(), p("div", fe, e[7] || (e[7] = [
287
- s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
288
- ]))) : j("", !0)
289
- ], 64)) : (m(), B(R, {
290
- key: 1,
291
- variant: "outlined",
292
- class: "w-full justify-center items-center flex flex-col p-[24px] gap-[24px]"
293
- }, {
294
- default: F(() => [
295
- e[8] || (e[8] = s("img", {
296
- src: q,
297
- class: "w-[150px]"
298
- }, null, -1)),
299
- s("p", ye, f(r(t)("connect.marketing.emptyState.title")), 1),
300
- s("p", he, f(r(t)("connect.marketing.emptyState.description")), 1),
301
- i(T, {
302
- label: r(t)("connect.marketing.emptyState.action"),
303
- "prepend-icon": "add",
304
- onClick: e[6] || (e[6] = (a) => g())
305
- }, null, 8, ["label"])
306
- ]),
307
- _: 1
308
- }))
309
- ])
310
- ], 64);
311
- };
312
- }
313
- });
314
- export {
315
- Ve as default
316
- };