@feedmepos/mf-connect 0.0.39-prod → 0.1.0-beta.2

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 (101) hide show
  1. package/dist/Analytic-DSD9TsKr.js +622 -0
  2. package/dist/{App-X3fNEBF3.js → App-D8a5eW51.js} +250 -249
  3. package/dist/Broadcast-C8jgMe6g.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CRYS_tzZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-pG8WvV4I.js} +20 -20
  5. package/dist/Card-C1K7ULPo.js +825 -0
  6. package/dist/Collections-lMrdPUuM.js +453 -0
  7. package/dist/Credit-CJfU5tP4.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYoaa_-x.js} +1042 -1011
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CzEtOmp0.js +345 -0
  10. package/dist/Experience-Bp2ki8gU.js +221 -0
  11. package/dist/Game-BpTf6ebE.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
  14. package/dist/MainLayout-B1aJoR95.js +41 -0
  15. package/dist/Marketing-BiKE2gxA.js +316 -0
  16. package/dist/Member-BSWyy32a.js +69 -0
  17. package/dist/MemberList-CHlGREyR.js +1733 -0
  18. package/dist/MemberOverview-wL_ailso.js +58 -0
  19. package/dist/{MemberTransactions-DueaXBCy.js → MemberTransactions-BzHiXCnp.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-e-zWg08J.js +432 -0
  21. package/dist/Mission-8IGT3T2C.js +261 -0
  22. package/dist/Point-CbbJ6ohd.js +222 -0
  23. package/dist/Promotion-BYXCJa_S.js +247 -0
  24. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-_RX1J0Br.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bruh-umZ.js} +557 -557
  25. package/dist/Segment-DXDNM0yd.js +437 -0
  26. package/dist/Setting-CLpvvZTv.js +1901 -0
  27. package/dist/Store-C6-P6bwc.js +1511 -0
  28. package/dist/StoreRewards-CUM2irXK.js +401 -0
  29. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CLFiuO5k.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JaRdmqif.js} +10 -10
  30. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CoMQBL4P.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DEb4OBcX.js} +1 -1
  31. package/dist/{Tier-CftEoP_R.js → Tier-DZTDxWBo.js} +481 -453
  32. package/dist/{Title-BsavXbYh.js → Title-C2Dr5ceK.js} +314 -295
  33. package/dist/Transaction-BL4mS29d.js +39 -0
  34. package/dist/Voucher-Cx0r2-df.js +490 -0
  35. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-DWuAODUF.js +56 -0
  36. package/dist/{app-BNmAx3zq.js → app-B_xuZ5HB.js} +1 -1
  37. package/dist/app-wE5HTF_Y.js +5762 -0
  38. package/dist/app.js +5 -3
  39. package/dist/{business-DGL4Ayx0.js → business-DSv8zM8C.js} +1 -1
  40. package/dist/{campaign-D94sS1kM.js → campaign-7y5qquHZ.js} +5 -3
  41. package/dist/{collection.fn-BHJ1ISqO.js → collection.fn-BxVZQAx0.js} +2 -2
  42. package/dist/dto-Ew1QwLci.js +2778 -0
  43. package/dist/{effect-CFRICzlM.js → effect-BzPh8fRI.js} +9 -9
  44. package/dist/{export-w2o9NYcy.js → export-C9tDplkA.js} +3 -3
  45. package/dist/{helper-CUDWQ8vq.js → helper-Sz7oQ0F4.js} +1 -1
  46. package/dist/{index-BGuLhEym.js → index-BQm0C3Jm.js} +3 -3
  47. package/dist/{index-BjwyxNSp.js → index-C-SOz7jt.js} +1 -1
  48. package/dist/{index-BcWJcD9f.js → index-C0lpADCo.js} +1 -1
  49. package/dist/{index-DIq2KVis.js → index-C3_4GUiI.js} +1 -1
  50. package/dist/{index-BPEV5Tzg.js → index-D-2nFLsg.js} +59 -47
  51. package/dist/{index-CFMBSL24.js → index-DBMaUGYI.js} +2 -2
  52. package/dist/{index-CpwFQFTV.js → index-DH_1nOJ_.js} +3 -3
  53. package/dist/index-Dy4pmQpt.js +29193 -0
  54. package/dist/{index-BQ6isIeo.js → index-_3qBsogG.js} +1 -1
  55. package/dist/index-gIRszcHf.js +3 -0
  56. package/dist/{index-VjUw31dN.js → index-tv4t0Pnh.js} +1 -1
  57. package/dist/{index-tZ1aqhks.js → index-z0IfdrZk.js} +319 -281
  58. package/dist/{index.esm2017-zciuPty-.js → index.esm2017-BnKJDxUo.js} +55 -55
  59. package/dist/{loading-GuXe5bYG.js → loading-Ds-yFYhc.js} +469 -460
  60. package/dist/{membership-BHWJVI3e.js → membership-DaiVw9qF.js} +3 -3
  61. package/dist/money-BHtBdZoz.js +15 -0
  62. package/dist/number-CZhcB8ef.js +12 -0
  63. package/dist/{rule-MgNa_8FF.js → rule-Cd2M6Ri2.js} +2 -2
  64. package/dist/{rule-builder-BsBCWzq_.js → rule-builder-B6og27Q1.js} +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/{template-D6k3lusq.js → template-DouRWBpv.js} +63 -63
  67. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  68. package/dist/vue-i18n-BTlOChXs.js +2365 -0
  69. package/dist/{xlsx-ClrA4KOh.js → xlsx-SahfXQ70.js} +517 -517
  70. package/dist/zod-Bg2FbC-D.js +90 -0
  71. package/package.json +7 -4
  72. package/dist/Analytic-DMFueUju.js +0 -620
  73. package/dist/Broadcast-YIfWIXeA.js +0 -216
  74. package/dist/Card-BIxlgQm7.js +0 -824
  75. package/dist/Collections-M6DaHM2W.js +0 -441
  76. package/dist/Credit-BtRy-xoY.js +0 -214
  77. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D5DNTBSQ.js +0 -344
  78. package/dist/Experience-DGm1lnqj.js +0 -211
  79. package/dist/Game-B8-lG7qq.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  81. package/dist/Marketing-DtG3AIWr.js +0 -309
  82. package/dist/Member-K443-9Vy.js +0 -92
  83. package/dist/MemberList-CYXHXFTL.js +0 -1735
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bk2HLVmt.js +0 -203
  86. package/dist/Mission-CN5umXXA.js +0 -248
  87. package/dist/Point-XAm6H2p_.js +0 -220
  88. package/dist/Promotion-DsrA4KiE.js +0 -244
  89. package/dist/Segment-CZGGHoAu.js +0 -435
  90. package/dist/Setting-BjfxLKyp.js +0 -1870
  91. package/dist/Store-D_B-vhh3.js +0 -1513
  92. package/dist/StoreRewards-BjHffUKj.js +0 -429
  93. package/dist/Transaction-CdxzoKDG.js +0 -36
  94. package/dist/Voucher-B_9Nv1Mr.js +0 -485
  95. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  96. package/dist/app--1Ks5Hms.js +0 -2974
  97. package/dist/dto-X0Eeujxx.js +0 -1151
  98. package/dist/index-BPNG8N-w.js +0 -11
  99. package/dist/index-DWM9MWGj.js +0 -28058
  100. package/dist/money-CrttVpCp.js +0 -15
  101. package/dist/number-CIndGU4O.js +0 -12
@@ -1,309 +0,0 @@
1
- import { openBlock as c, createElementBlock as u, defineComponent as D, ref as M, onMounted as z, computed as $, resolveComponent as l, Fragment as C, createVNode as r, unref as m, createElementVNode as o, withCtx as x, renderList as Y, createBlock as A, toDisplayString as B, createCommentVNode as H, h as G } from "vue";
2
- import { _ as J } from "./campaign-CpzFl8Vr.js";
3
- import { components as j } from "@feedmepos/ui-library";
4
- import { u as q, p as X } from "./loading-GuXe5bYG.js";
5
- import { defineStore as Q } from "pinia";
6
- import { F } from "./index-BcWJcD9f.js";
7
- import { useCoreStore as W } from "@feedmepos/mf-common";
8
- import { g as y, S as Z, b as ee } from "./index-DWM9MWGj.js";
9
- import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as ae } from "./campaign-D94sS1kM.js";
11
- import { h as ne } from "./moment-BWErdI6_.js";
12
- var oe = { 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", marketingV1Portal: "https://marketing-v1.feedme.cc" };
13
- const h = () => {
14
- const n = Z.getBusinessId();
15
- if (!n) throw new Error("Invalid business ID");
16
- return ee(`businesses/${n}/marketing-materials/`, {
17
- url: oe.backendUrl,
18
- noIdRequired: !0
19
- });
20
- }, N = {
21
- async read() {
22
- return y(await h().get(""));
23
- },
24
- async createMarketing(n) {
25
- return y(await h().post("", n));
26
- },
27
- // add id
28
- async updateMarketing(n, s) {
29
- return y(
30
- await h().put(n, s)
31
- );
32
- },
33
- async deleteMarketing(n) {
34
- return y(await h().delete(n));
35
- }
36
- }, S = Q("mf-connect-marketing", {
37
- state: () => {
38
- var n, s;
39
- return {
40
- marketing: [],
41
- defaultMarketing: {
42
- _id: void 0,
43
- business: ((s = (n = W().currentBusiness) == null ? void 0 : n.value) == null ? void 0 : s._id) ?? "",
44
- name: "",
45
- campaign: null,
46
- keywords: "",
47
- image: "",
48
- headline: {
49
- content: "",
50
- key: void 0
51
- },
52
- assets: [
53
- {
54
- platform: F.enum.FACEBOOK,
55
- contents: [
56
- {
57
- type: "POST",
58
- size: {
59
- width: 1920,
60
- height: 1080
61
- },
62
- images: []
63
- },
64
- {
65
- type: "STORY",
66
- size: {
67
- width: 1080,
68
- height: 1920
69
- },
70
- images: []
71
- }
72
- ]
73
- },
74
- {
75
- platform: F.enum.INSTAGRAM,
76
- contents: [
77
- {
78
- type: "POST",
79
- size: {
80
- width: 1080,
81
- height: 1080
82
- },
83
- images: []
84
- },
85
- {
86
- type: "STORY",
87
- size: {
88
- width: 1080,
89
- height: 1920
90
- },
91
- images: []
92
- },
93
- {
94
- type: "REEL",
95
- size: {
96
- width: 1080,
97
- height: 1920
98
- },
99
- images: []
100
- }
101
- ]
102
- },
103
- {
104
- platform: F.enum.BRAND_APP,
105
- contents: [
106
- {
107
- type: "IMAGE",
108
- size: {
109
- width: 1080,
110
- height: 1920
111
- },
112
- images: []
113
- }
114
- ]
115
- }
116
- ],
117
- captions: [{ language: "en", content: "" }]
118
- }
119
- };
120
- },
121
- actions: {
122
- async readMarketingMaterial() {
123
- const n = await N.read();
124
- this.marketing = n;
125
- }
126
- },
127
- getters: {
128
- state(n) {
129
- return n;
130
- }
131
- }
132
- }), re = {};
133
- function se(n, s) {
134
- return c(), u("div");
135
- }
136
- const ie = /* @__PURE__ */ te(re, [["render", se]]), le = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, me = { class: "space-y-8" }, de = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { key: 0 }, ge = /* @__PURE__ */ o("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), fe = [
137
- ge
138
- ], ye = /* @__PURE__ */ o("img", {
139
- src: J,
140
- class: "w-[150px]"
141
- }, null, -1), he = /* @__PURE__ */ o("p", { class: "fm-typo-en-title-sm-800" }, "Create marketing material", -1), _e = /* @__PURE__ */ o("p", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, " Boost your marketing efforts effortlessly with our AI-powered tools. Generate stunning images and captivating captions for your desired platform. ", -1), Ve = /* @__PURE__ */ D({
142
- __name: "Marketing",
143
- setup(n) {
144
- const s = {
145
- label: "Create marketing material",
146
- value: "create",
147
- isPrimary: !0,
148
- prependIcon: "add"
149
- }, p = M(!1), _ = S(), k = ae(), { global: P, minor: T } = q;
150
- z(async () => {
151
- await P(async () => {
152
- await k.read(), await _.readMarketingMaterial();
153
- });
154
- });
155
- const d = $(() => _.marketing.filter(
156
- (t) => t.name.includes(i.value.searchKey.toLowerCase())
157
- )), g = M(
158
- S().defaultMarketing
159
- ), L = [
160
- {
161
- header: "Name",
162
- accessorFn: (t) => t.name
163
- },
164
- {
165
- header: "Campaign",
166
- accessorFn: (t) => {
167
- var e;
168
- return t.campaign === null || t.campaign === void 0 ? "-" : (e = k.campaigns.all.find(
169
- (v) => v._id === t.campaign
170
- )) == null ? void 0 : e.name;
171
- }
172
- },
173
- {
174
- header: "Created date",
175
- accessorFn: (t) => {
176
- const e = new Date(parseInt(t._id.toString().substring(0, 8), 16) * 1e3);
177
- return ne(e).format("DD MMM YYYY");
178
- }
179
- },
180
- {
181
- header: "Actions",
182
- cell(t) {
183
- return G(j.FmButton, {
184
- variant: "tertiary",
185
- icon: "delete",
186
- iconColor: "neutral-gray-400",
187
- onClick: (e) => {
188
- e.stopPropagation(), I(t.row.original);
189
- }
190
- });
191
- }
192
- }
193
- ];
194
- async function I(t) {
195
- await X.remove(`Are you sure you want to remove ${t.name}?`) && await T(
196
- async () => {
197
- await N.deleteMarketing(t._id), await _.readMarketingMaterial();
198
- },
199
- {
200
- message: `Removing ${t.name}`,
201
- successMessage: `Removed ${t.name} successfully`
202
- }
203
- );
204
- }
205
- async function f(t) {
206
- t ? g.value = JSON.parse(JSON.stringify(t)) : g.value = JSON.parse(JSON.stringify(S().defaultMarketing)), p.value = !0;
207
- }
208
- const i = M({
209
- searchKey: ""
210
- });
211
- return (t, e) => {
212
- const v = l("FmPageHead"), O = l("FmSearch"), R = l("FmTable"), V = l("FmButton"), U = l("FmListItem"), E = l("FmList"), K = l("FmCard");
213
- return c(), u(C, null, [
214
- r(v, {
215
- title: "Marketing material",
216
- class: "xs:hidden",
217
- actions: m(d).length > 0 ? [s] : [],
218
- "onClick:action": e[0] || (e[0] = () => f())
219
- }, null, 8, ["actions"]),
220
- o("div", le, [
221
- r(O, {
222
- modelValue: i.value.searchKey,
223
- "onUpdate:modelValue": e[1] || (e[1] = (a) => i.value.searchKey = a),
224
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
225
- placeholder: "search",
226
- collapsible: ""
227
- }, null, 8, ["modelValue"]),
228
- r(ie, {
229
- modelValue: g.value,
230
- "onUpdate:modelValue": e[2] || (e[2] = (a) => g.value = a),
231
- "is-open": p.value,
232
- "onUpdate:isOpen": e[3] || (e[3] = (a) => p.value = a)
233
- }, null, 8, ["modelValue", "is-open"]),
234
- m(d).length > 0 ? (c(), u(C, { key: 0 }, [
235
- o("div", ce, [
236
- r(O, {
237
- modelValue: i.value.searchKey,
238
- "onUpdate:modelValue": e[4] || (e[4] = (a) => i.value.searchKey = a),
239
- class: "xs:hidden",
240
- placeholder: "search",
241
- collapsible: ""
242
- }, null, 8, ["modelValue"])
243
- ]),
244
- r(R, {
245
- class: "xs:hidden",
246
- "row-data": m(d),
247
- "column-defs": L,
248
- "search-value": i.value.searchKey,
249
- "column-filter": [],
250
- onRowClick: e[5] || (e[5] = (a) => f(a.original)),
251
- "hide-footer": !0
252
- }, null, 8, ["row-data", "search-value"]),
253
- r(E, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
254
- default: x(() => [
255
- (c(!0), u(C, null, Y(m(d).filter(
256
- (a) => a.name.toLowerCase().includes(i.value.searchKey.toLowerCase())
257
- ), (a) => (c(), A(U, {
258
- key: a._id.toString(),
259
- onClick: (w) => f(a),
260
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
261
- }, {
262
- default: x(() => {
263
- var w;
264
- return [
265
- o("div", me, [
266
- o("div", de, B(a.name), 1),
267
- o("div", ue, B(a.campaign === null || a.campaign === void 0 ? "-" : (w = m(k).campaigns.all.find(
268
- (b) => b._id === a.campaign
269
- )) == null ? void 0 : w.name), 1)
270
- ]),
271
- r(V, {
272
- icon: "delete",
273
- "icon-color": "neutral-gray-400",
274
- variant: "tertiary",
275
- onClick: (b) => (b.stopPropagation(), I(a))
276
- }, null, 8, ["onClick"])
277
- ];
278
- }),
279
- _: 2
280
- }, 1032, ["onClick"]))), 128))
281
- ]),
282
- _: 1
283
- }),
284
- m(d).length == 0 ? (c(), u("div", pe, fe)) : H("", !0)
285
- ], 64)) : (c(), A(K, {
286
- key: 1,
287
- variant: "outlined",
288
- class: "w-full justify-center items-center flex flex-col p-[24px] gap-[24px]"
289
- }, {
290
- default: x(() => [
291
- ye,
292
- he,
293
- _e,
294
- r(V, {
295
- label: "Add material",
296
- "prepend-icon": "add",
297
- onClick: e[6] || (e[6] = (a) => f())
298
- })
299
- ]),
300
- _: 1
301
- }))
302
- ])
303
- ], 64);
304
- };
305
- }
306
- });
307
- export {
308
- Ve as default
309
- };
@@ -1,92 +0,0 @@
1
- import { defineComponent as R, computed as f, ref as p, watch as T, resolveComponent as m, openBlock as d, createElementBlock as k, Fragment as B, createVNode as _, unref as n, createElementVNode as E, createBlock as M, createCommentVNode as A } from "vue";
2
- import "./index-BPNG8N-w.js";
3
- import { useRouter as L } from "vue-router";
4
- import { m as N } from "./index-VjUw31dN.js";
5
- import { R as s } from "./app--1Ks5Hms.js";
6
- const Y = { class: "px-24 flex flex-col gap-y-16 pb-24" }, y = /* @__PURE__ */ R({
7
- __name: "Member",
8
- setup(h) {
9
- const e = L(), o = [
10
- // {
11
- // label: 'Overview',
12
- // value: ROUTE_NAME['$connect-LOYALTY_MEMBER_OVERVIEW'],
13
- // actions: [
14
- // // {
15
- // // label: 'Add member',
16
- // // value: 'add_member',
17
- // // isPrimary: true,
18
- // // prependIcon: 'add',
19
- // // },
20
- // ],
21
- // },
22
- {
23
- label: "Member list",
24
- value: s["$connect-LOYALTY_MEMBER_LIST"],
25
- actions: [
26
- // {
27
- // label: 'Import member',
28
- // value: 'import_member',
29
- // isPrimary: false,
30
- // },
31
- // {
32
- // label: 'Add member',
33
- // value: 'add_member',
34
- // isPrimary: true,
35
- // prependIcon: 'add',
36
- // },
37
- ]
38
- }
39
- ], r = f(() => {
40
- var a, c, i;
41
- return e.currentRoute.value.name != s["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
42
- title: u.value.label,
43
- actions: u.value.actions,
44
- description: void 0
45
- } : (u.value = o[1], {
46
- backButton: !0,
47
- title: "Member's transactions",
48
- actions: [],
49
- description: `${(a = l.value) == null ? void 0 : a.name} (${(c = l.value) == null ? void 0 : c._id}) (${(i = l.value) == null ? void 0 : i.phoneNumber})`,
50
- onBackButton: async () => {
51
- await e.push({ name: s["$connect-LOYALTY_MEMBER_LIST"] });
52
- }
53
- });
54
- }), u = p(
55
- o.find((t) => t.value === e.currentRoute.value.name) ?? o[0]
56
- ), l = p();
57
- async function b(t) {
58
- await e.push({ name: t });
59
- }
60
- return T(
61
- () => e.currentRoute.value.name,
62
- async (t) => {
63
- u.value = o.find((c) => c.value === t) ?? o[0];
64
- const a = e.currentRoute.value.params.id;
65
- a && (l.value = await N.readById(a)), await e.push({ name: t });
66
- }
67
- ), (t, a) => {
68
- const c = m("FmPageHead"), i = m("FmTabs"), v = m("RouterView");
69
- return d(), k(B, null, [
70
- _(c, {
71
- actions: n(r).actions,
72
- title: n(r).title,
73
- description: n(r).description,
74
- "back-button": n(r).backButton,
75
- "onClick:back": n(r).onBackButton
76
- }, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
77
- E("div", Y, [
78
- n(e).currentRoute.value.name != n(s)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (d(), M(i, {
79
- key: 0,
80
- "model-value": n(u).value,
81
- items: o,
82
- "onUpdate:modelValue": b
83
- }, null, 8, ["model-value"])) : A("", !0),
84
- _(v)
85
- ])
86
- ], 64);
87
- };
88
- }
89
- });
90
- export {
91
- y as default
92
- };