@feedmepos/mf-connect 0.1.123-prod → 0.1.124-dev
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.
- package/dist/{App-BOQIQ8Jz.js → App-C7BnLHSt.js} +502 -493
- package/dist/AuditLogs-BPKQdFga.js +2016 -0
- package/dist/{Bin-BethwelP.js → Bin-Bq7yY0I2.js} +8 -8
- package/dist/{Broadcast-CHIXRBHf.js → Broadcast-D52rPmVl.js} +22 -21
- package/dist/{CampaignAnalytic-BaEeAhnr.js → CampaignAnalytic-DpiWtzIp.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYo7Rpes.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B1eAAN64.js} +8 -9
- package/dist/{Card-C075nS85.js → Card-BQc7vud2.js} +22 -22
- package/dist/{Collections-BsQ_kcoJ.js → Collections--VzkneGp.js} +197 -185
- package/dist/{Credit-BsZlyp-x.js → Credit-DhfAcw-p.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CcytVckH.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2Csdg-3.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DFz_2GZ1.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Da4snauu.js → EffectSheet.vue_vue_type_style_index_0_lang-Cr2_XbyY.js} +16 -16
- package/dist/{Experience-B9iubxQ5.js → Experience-CUwbHfo5.js} +32 -31
- package/dist/{FileSaver.min-1XYUiJrd.js → FileSaver.min-DvZpiwMd.js} +1 -1
- package/dist/{Game-B3ZTJcjj.js → Game-CI5-y0JJ.js} +19 -18
- package/dist/{GiftCardSetup-DpLDBOS2.js → GiftCardSetup-CGacqQ0j.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-hNbexVdE.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B6POxDLJ.js} +7 -7
- package/dist/{Goals--dysejOz.js → Goals-fqJY9iMx.js} +4 -4
- package/dist/Grab-CAx1cCE4.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BI1EQciE.js → ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js} +1 -1
- package/dist/{Index-v2J17JTP.js → Index-CT1Gnjsv.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B1vTvUTW.js → LocationPicker.vue_vue_type_script_setup_true_lang-BRQ12Yum.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dz0VI7PT.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BRzuWJ1Y.js} +1 -1
- package/dist/{LoyaltyDashboard-BI_khH0P.js → LoyaltyDashboard-IJIDEBWf.js} +15 -15
- package/dist/{MainLayout-On2p0hEA.js → MainLayout-BMghr-wf.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DSdJORyW.js → MainLayout.vue_vue_type_script_setup_true_lang-BitJKgvd.js} +3 -3
- package/dist/{Marketing-Pqa4USnd.js → Marketing-Ckr9cp3w.js} +4 -4
- package/dist/{MarketingMaterialEdit-IRRsEF8W.js → MarketingMaterialEdit-BIZnE8CY.js} +214 -211
- package/dist/{Member-p1zyrY20.js → Member-d1nPxr74.js} +7 -7
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DI4XM_rJ.js +1281 -0
- package/dist/{MemberImportHistory-BwkJJj_u.js → MemberImportHistory-CxX9iYhV.js} +7 -7
- package/dist/{MemberList-Ci8K7HI4.js → MemberList-DUzYpxhj.js} +103 -105
- package/dist/{MemberTransactions-D8xLWGcw.js → MemberTransactions-BFM3ybeo.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CvCuVDR-.js → MessageInput.vue_vue_type_script_setup_true_lang-B5j0YBix.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DzrAjDGZ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DsSHSbBB.js} +1 -1
- package/dist/{Mission-JpI-0kHJ.js → Mission-De9BF5wb.js} +22 -21
- package/dist/{Overview-92S0hiOS.js → Overview-DeHo3gef.js} +145 -144
- package/dist/{Overview-BXCQnl4x.js → Overview-Pmxqv6qp.js} +20 -20
- package/dist/{Point-krrZWESo.js → Point-DE_Cc85N.js} +22 -21
- package/dist/{Promotion-BjlFWrMI.js → Promotion-cZDzgho4.js} +137 -131
- package/dist/{Queue-FW3I2guh.js → Queue-DmDbrtTk.js} +45 -45
- package/dist/{Record-Hj3_FQp6.js → Record-uxNNOvmK.js} +9 -9
- package/dist/{Review-CBL5Wga7.js → Review-CIIn_Bdx.js} +2 -2
- package/dist/ReviewFacebookCallback-CO6FxHzc.js +225 -0
- package/dist/{ReviewGoogleCallback-CAqc1gmT.js → ReviewGoogleCallback-B7kmGwb_.js} +5 -5
- package/dist/{Reward-UN-LYZPR.js → Reward-Bj1snFu8.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C4deW4H6.js → RewardGroup.vue_vue_type_script_setup_true_lang-BO-36dE4.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-b7ZEMd4s.js +1923 -0
- package/dist/{Segment-D9ehFadR.js → Segment-BgJgWa6C.js} +303 -306
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D7PbDKI7.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D2TDoZgQ.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DWXfOk-I.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CEBH11hR.js} +4 -4
- package/dist/Setting-DpEI72mW.js +574 -0
- package/dist/{SettingAdvertisements-BNWTSQ14.js → SettingAdvertisements-vdUtIXwC.js} +12 -12
- package/dist/Settings-C6yJ1WEB.js +286 -0
- package/dist/{Store-vRzLqmIu.js → Store-DgltT0RA.js} +28 -28
- package/dist/{StoreRewards-DitATf4s.js → StoreRewards-BXH_5cYL.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DqlluwMB.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DjCO9U0c.js +7007 -0
- package/dist/{Tier-B0JGxXei.js → Tier-CqfHGUX0.js} +2575 -687
- package/dist/{Title-DBLK191p.js → Title-B5VnUNiS.js} +95 -94
- package/dist/{Transaction-CUthGjH1.js → Transaction-BZh1Q9Lj.js} +2 -2
- package/dist/Upselling-Cf24ub-9.js +1055 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CUCR6aEY.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Buj7CRlQ.js} +26 -26
- package/dist/{Voucher-DsyOteEs.js → Voucher-CZJdV2Ok.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Ddbutv4Y.js → VoucherEditor.vue_vue_type_script_setup_true_lang-65x2VrpD.js} +12 -12
- package/dist/{WhatsappAccount-PWKWg15w.js → WhatsappAccount-DsRilNC5.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-HUSiUfoc.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Bn26qwx5.js} +1 -1
- package/dist/{WhatsappBot-CMFcJj1b.js → WhatsappBot-CpzMaTss.js} +6 -6
- package/dist/{WhatsappBotLogs-CVOw3VxD.js → WhatsappBotLogs-DRF8VufQ.js} +6 -6
- package/dist/{WhatsappBotSettings-ouG9rSoI.js → WhatsappBotSettings-DSUPGC-p.js} +4 -4
- package/dist/{WhatsappLayout-CHtKQYog.js → WhatsappLayout-BCWYcQmD.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-B0tpwJ9B.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DyxyISRP.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CEytppMm.js → ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js} +2 -2
- package/dist/{app-CZGZKKye.js → app-BQeODViN.js} +14861 -15017
- package/dist/app.js +4 -3
- package/dist/{base.export-Cxm_LrqA.js → base.export-kSFLDDoC.js} +2 -2
- package/dist/{business-CieIljvm.js → business-EP-Do3Ew.js} +1 -1
- package/dist/{campaign-DhN6zKES.js → campaign-BjnUPowX.js} +34 -28
- package/dist/{campaign-DWClF3jI.js → campaign-C8GgaCub.js} +121 -94
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-DQ--gL4B.js +776 -0
- package/dist/{collection.fn-Cep8tuk5.js → collection.fn-BhXecwh5.js} +2 -2
- package/dist/{currency-DhwsYY32.js → currency-CGMNh1Q_.js} +1 -1
- package/dist/duplicateCampaign-icqF8Na9.js +51 -0
- package/dist/{effect-BwOOpJRh.js → effect-Bc6oGIWd.js} +1 -1
- package/dist/{email-addresses-DZB2oj9y.js → email-addresses-B3KWfUMk.js} +25 -25
- package/dist/{feature-flag-BSpbhSMn.js → feature-flag-HhjvSuDm.js} +171 -185
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-D_4T4gbM.js → helper-D1BYvcED.js} +1 -1
- package/dist/{index-DgCpTG1m.js → index-BIBcfAw5.js} +1 -1
- package/dist/{index-BpnjNIh1.js → index-BkevK_Hp.js} +1 -1
- package/dist/{index-D5OOlgos.js → index-Br2SLVsn.js} +608 -251
- package/dist/{index-BYipoHQc.js → index-Bunp1bt_.js} +1 -1
- package/dist/{index-BDKVZZR0.js → index-C-46QHFh.js} +380 -234
- package/dist/{index-MCyDYhZI.js → index-C3MK8Twg.js} +1 -1
- package/dist/{index-DVir0ptH.js → index-CsYTLmPa.js} +4 -4
- package/dist/{index-Dh815w-7.js → index-D2TnjKPP.js} +23 -23
- package/dist/{index-CyYV4eem.js → index-DCC3pLug.js} +19 -6
- package/dist/{index-X5Gzu80O.js → index-DOSuhtdE.js} +1 -1
- package/dist/{index-FrOuWhLi.js → index-DeqpfWLa.js} +3 -3
- package/dist/{index-Df4ox2zj.js → index-DiCgGQoC.js} +2 -2
- package/dist/{index-tUxF4g8G.js → index-GQv1_jaJ.js} +2 -2
- package/dist/{index-rcMo_-nr.js → index-Ptcqv0W6.js} +2 -2
- package/dist/{index-CY88cQHU.js → index-VLFerh-X.js} +10 -10
- package/dist/{index-DcTRgcug.js → index-VyoufKYY.js} +1 -1
- package/dist/{index-BtN3vRvA.js → index-Yw4M7v7m.js} +2699 -2614
- package/dist/{index-DcO1O6fl.js → index-cPPWotJe.js} +10 -10
- package/dist/{index-FKxe6jKI.js → index-gMrtUwSD.js} +316 -316
- package/dist/{index-CIJKKs_J.js → index-oIo5Cful.js} +533 -462
- package/dist/{index.esm2017-DSF7lxrn.js → index.esm2017-DUZpLdEB.js} +93 -93
- package/dist/{loading-B4qq_74t.js → loading-DhpcQgdj.js} +1 -1
- package/dist/{lodash-BuScZ_TM.js → lodash-r4AR7GJC.js} +1 -1
- package/dist/{member-import-DyM1Xskc.js → member-import-CogEef9H.js} +1 -1
- package/dist/{membership-C77S6FIb.js → membership-BQFkjRjs.js} +2 -2
- package/dist/{money-Dcr44NhN.js → money-Ifqd4pyC.js} +1 -1
- package/dist/{number-C2u_79r4.js → number-C9Tw_Ncm.js} +1 -1
- package/dist/objectid-D7dqM1a3.js +145 -0
- package/dist/{onboarding-Chxkor1U.js → onboarding-D4dm_rxU.js} +36 -36
- package/dist/{onboardingSetup-BvL9lW9U.js → onboardingSetup-DtNZUoRr.js} +2 -2
- package/dist/{plugins-dnLWrrhC.js → plugins-DGI9Fkiu.js} +3 -3
- package/dist/{reward-DVHKTXQL.js → reward-DTtejZqM.js} +1 -1
- package/dist/{rule-IYgreBdC.js → rule-C4N3ce3c.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-YhWRyNGp.js +227 -0
- package/dist/{timezone-Cdp7cU32.js → timezone-5rYhX7XZ.js} +1 -1
- package/dist/{transaction.fn-kl4EZybB.js → transaction.fn-Ba_U7HdT.js} +2 -2
- package/dist/{trigger-C1m8eupI.js → trigger-B8I1aO6Y.js} +9 -9
- package/dist/{useMarketingMaterialActions-m5OLWGoL.js → useMarketingMaterialActions-CTOFHmlL.js} +4 -4
- package/dist/{usePagination-DX82vEDi.js → usePagination-3wAPVCOp.js} +1 -1
- package/dist/{user-DBndrlMY.js → user-Ds4DW_-Y.js} +1 -1
- package/dist/vue-i18n-Bqlt_-jA.js +2365 -0
- package/dist/{xlsx-ColLmoRB.js → xlsx-xlOCvuAq.js} +166 -166
- package/dist/{zod-CHmP8TTi.js → zod-GVNjvrpT.js} +1 -1
- package/package.json +6 -2
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-qX_uFelR.js +0 -3493
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DyvEDRBE.js +0 -1308
- package/dist/ReviewFacebookCallback-31bFMGu3.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BbzRH7BF.js +0 -1884
- package/dist/Setting-DGoNxCsO.js +0 -578
- package/dist/Settings-CQ67orRm.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DEP0FuoM.js +0 -1297
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DndMZr1k.js +0 -142
- package/dist/Upselling-CZLmpsdx.js +0 -200
- package/dist/campaign.fn-CKTsVS5U.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-nYLSIO_I.js +0 -145
- package/dist/rule-builder-QC_xPC4L.js +0 -102
- package/dist/template-COvkfF2w.js +0 -275
- package/dist/vue-i18n-FBUIkfn5.js +0 -2365
package/dist/app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var w = Object.defineProperty;
|
|
2
2
|
var y = (e, s, o) => s in e ? w(e, s, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[s] = o;
|
|
3
3
|
var n = (e, s, o) => y(e, typeof s != "symbol" ? s + "" : s, o);
|
|
4
|
-
import { u as x } from "./loading-
|
|
5
|
-
import { w as h, u as a } from "./xlsx-
|
|
4
|
+
import { u as x } from "./loading-DhpcQgdj.js";
|
|
5
|
+
import { w as h, u as a } from "./xlsx-xlOCvuAq.js";
|
|
6
6
|
const t = {
|
|
7
7
|
sortBy: "_id",
|
|
8
8
|
descending: !1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as i, computed as u } from "vue";
|
|
2
2
|
import { defineStore as w } from "pinia";
|
|
3
3
|
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
4
|
-
import {
|
|
4
|
+
import { a as I, g as r, A as b, S, d as D } from "./index-cPPWotJe.js";
|
|
5
5
|
const $ = {
|
|
6
6
|
async readSettings(e) {
|
|
7
7
|
try {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { reactive as
|
|
3
|
-
import { c } from "./index-
|
|
4
|
-
import { g as i, S as
|
|
1
|
+
import { defineStore as m } from "pinia";
|
|
2
|
+
import { reactive as b, onMounted as f, ref as s } from "vue";
|
|
3
|
+
import { c } from "./index-GQv1_jaJ.js";
|
|
4
|
+
import { g as i, S as g, d as h } from "./index-cPPWotJe.js";
|
|
5
5
|
const p = () => {
|
|
6
|
-
const e =
|
|
6
|
+
const e = g.getBusinessId();
|
|
7
7
|
if (!e) throw new Error("Invalid business ID");
|
|
8
|
-
return
|
|
8
|
+
return h(`businesses/${e}/campaigns`, {
|
|
9
9
|
noIdRequired: !0
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, I = {
|
|
12
12
|
async readAll() {
|
|
13
13
|
return i(await p().get("templates"));
|
|
14
14
|
},
|
|
@@ -17,8 +17,8 @@ const p = () => {
|
|
|
17
17
|
await p().get(`templates/${e}`)
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
21
|
-
const e =
|
|
20
|
+
}, A = m("mf-connect-campaign", () => {
|
|
21
|
+
const e = b({
|
|
22
22
|
promotion: [],
|
|
23
23
|
voucher: [],
|
|
24
24
|
broadcast: [],
|
|
@@ -27,12 +27,13 @@ const p = () => {
|
|
|
27
27
|
credit: [],
|
|
28
28
|
token: [],
|
|
29
29
|
mission: [],
|
|
30
|
+
grab: [],
|
|
30
31
|
all: []
|
|
31
32
|
});
|
|
32
|
-
|
|
33
|
+
f(() => {
|
|
33
34
|
console.log("🔧 CampaignStore Installed");
|
|
34
35
|
});
|
|
35
|
-
const t =
|
|
36
|
+
const t = s([]), r = s([]), n = s([]);
|
|
36
37
|
async function u(k) {
|
|
37
38
|
const o = await c.readAll({
|
|
38
39
|
limit: 1e3,
|
|
@@ -40,42 +41,47 @@ const p = () => {
|
|
|
40
41
|
sortBy: "_id",
|
|
41
42
|
descending: !0
|
|
42
43
|
});
|
|
43
|
-
Object.keys(e).forEach((
|
|
44
|
-
e[
|
|
45
|
-
}), e.all = o.resources.filter(
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
Object.keys(e).forEach((a) => {
|
|
45
|
+
e[a] = [];
|
|
46
|
+
}), e.all = o.resources.filter(
|
|
47
|
+
(a) => a.type !== "MEMBERSHIP"
|
|
48
|
+
);
|
|
49
|
+
for (const a of o.resources)
|
|
50
|
+
switch (a.type) {
|
|
48
51
|
case "PROMOTION":
|
|
49
|
-
e.promotion.push(
|
|
52
|
+
e.promotion.push(a);
|
|
50
53
|
break;
|
|
51
54
|
case "VOUCHER":
|
|
52
|
-
e.voucher.push(
|
|
55
|
+
e.voucher.push(a), n.value.push(a);
|
|
53
56
|
break;
|
|
54
57
|
case "BROADCAST":
|
|
55
|
-
["SCHEDULE", "FEEDBACK"].includes(
|
|
58
|
+
["SCHEDULE", "FEEDBACK"].includes(a.event.type) && e.broadcast.push(a);
|
|
56
59
|
break;
|
|
57
60
|
case "POINT":
|
|
58
|
-
e.experience.push(
|
|
61
|
+
e.experience.push(a);
|
|
59
62
|
break;
|
|
60
63
|
case "COIN":
|
|
61
|
-
e.point.push(
|
|
64
|
+
e.point.push(a);
|
|
62
65
|
break;
|
|
63
66
|
case "CREDIT":
|
|
64
|
-
e.credit.push(
|
|
67
|
+
e.credit.push(a);
|
|
65
68
|
break;
|
|
66
69
|
case "GAME":
|
|
67
|
-
e.token.push(
|
|
70
|
+
e.token.push(a);
|
|
68
71
|
break;
|
|
69
72
|
case "MISSION":
|
|
70
|
-
e.mission.push(
|
|
73
|
+
e.mission.push(a);
|
|
74
|
+
break;
|
|
75
|
+
case "GRAB":
|
|
76
|
+
e.grab.push(a);
|
|
71
77
|
break;
|
|
72
78
|
}
|
|
73
79
|
}
|
|
74
80
|
async function l() {
|
|
75
81
|
r.value = await c.readGroups();
|
|
76
82
|
}
|
|
77
|
-
async function
|
|
78
|
-
t.value = await
|
|
83
|
+
async function d() {
|
|
84
|
+
t.value = await I.readAll();
|
|
79
85
|
}
|
|
80
86
|
return {
|
|
81
87
|
// State
|
|
@@ -86,9 +92,9 @@ const p = () => {
|
|
|
86
92
|
// Actions
|
|
87
93
|
read: u,
|
|
88
94
|
readGroups: l,
|
|
89
|
-
readTemplates:
|
|
95
|
+
readTemplates: d
|
|
90
96
|
};
|
|
91
97
|
});
|
|
92
98
|
export {
|
|
93
|
-
|
|
99
|
+
A as u
|
|
94
100
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { h as u } from "./moment-D7p2TMB-.js";
|
|
2
|
-
import "./index-
|
|
3
|
-
import { e as
|
|
4
|
-
import { components as
|
|
5
|
-
import {
|
|
6
|
-
import { c as
|
|
7
|
-
import { u as
|
|
8
|
-
import { C as m } from "./campaign.fn-
|
|
9
|
-
import { g as
|
|
10
|
-
import { c as
|
|
11
|
-
import { i as
|
|
12
|
-
import { h as
|
|
13
|
-
import { F as s } from "./campaign.enum-
|
|
14
|
-
const
|
|
2
|
+
import "./index-C-46QHFh.js";
|
|
3
|
+
import { e as l } from "./effect-Bc6oGIWd.js";
|
|
4
|
+
import { components as d } from "@feedmepos/ui-library";
|
|
5
|
+
import { a as E } from "./index-Br2SLVsn.js";
|
|
6
|
+
import { c as N } from "./rule-C4N3ce3c.js";
|
|
7
|
+
import { u as I } from "./business-EP-Do3Ew.js";
|
|
8
|
+
import { C as m } from "./campaign.fn-DQ--gL4B.js";
|
|
9
|
+
import { g as y, t as h } from "./index-gMrtUwSD.js";
|
|
10
|
+
import { c as C } from "./string-Gcy5IM_H.js";
|
|
11
|
+
import { i as f } from "./plugins-DGI9Fkiu.js";
|
|
12
|
+
import { h as p } from "vue";
|
|
13
|
+
import { F as s } from "./campaign.enum-Dx-Zo68Q.js";
|
|
14
|
+
const R = [
|
|
15
15
|
"APP_INBOX",
|
|
16
16
|
"PUSH",
|
|
17
17
|
"SMS",
|
|
18
18
|
"EMAIL",
|
|
19
19
|
"WHATSAPP"
|
|
20
|
-
],
|
|
21
|
-
function
|
|
22
|
-
return
|
|
20
|
+
], S = [...R];
|
|
21
|
+
function j(t) {
|
|
22
|
+
return S.includes(t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function O(t, e) {
|
|
25
25
|
return t === "APP_INBOX" ? {
|
|
26
26
|
title: "",
|
|
27
27
|
previewText: "",
|
|
@@ -40,17 +40,17 @@ function y(t, e) {
|
|
|
40
40
|
variables: e
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function V(t, e, n = []) {
|
|
44
44
|
return t.channels.includes(e) ? t : {
|
|
45
45
|
...t,
|
|
46
46
|
channels: [...t.channels, e],
|
|
47
47
|
content: {
|
|
48
48
|
...t.content,
|
|
49
|
-
[e]: t.content[e] ??
|
|
49
|
+
[e]: t.content[e] ?? O(e, n)
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function X(t, e) {
|
|
54
54
|
const n = { ...t.content };
|
|
55
55
|
return delete n[e], {
|
|
56
56
|
...t,
|
|
@@ -58,87 +58,99 @@ function G(t, e) {
|
|
|
58
58
|
content: n
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function z(t, e, n) {
|
|
62
62
|
return {
|
|
63
63
|
...t,
|
|
64
64
|
content: { ...t.content, [e]: n }
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function W(t, e, n) {
|
|
68
68
|
const o = t.channels.indexOf(e), a = o + n;
|
|
69
69
|
if (o < 0 || a < 0 || a >= t.channels.length) return t;
|
|
70
70
|
const r = [...t.channels];
|
|
71
71
|
return [r[o], r[a]] = [r[a], r[o]], { ...t, channels: r };
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function J(t, e, n = []) {
|
|
74
74
|
const [o, ...a] = t.channels;
|
|
75
75
|
if (o === e) return t;
|
|
76
76
|
const r = {
|
|
77
77
|
...t.content,
|
|
78
|
-
[e]: t.content[e] ??
|
|
78
|
+
[e]: t.content[e] ?? O(e, n)
|
|
79
79
|
};
|
|
80
80
|
return o && delete r[o], {
|
|
81
81
|
...t,
|
|
82
|
-
channels: [e, ...a.filter((
|
|
82
|
+
channels: [e, ...a.filter((b) => b !== e)],
|
|
83
83
|
content: r
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function K(t, e) {
|
|
87
87
|
if (!e) return !1;
|
|
88
88
|
const n = t.content[e];
|
|
89
89
|
return n ? ["title", "previewText", "content", "body"].some(
|
|
90
90
|
(o) => typeof n[o] == "string" && !!n[o].trim()
|
|
91
91
|
) : !1;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function q(t, e) {
|
|
94
94
|
return { ...t, mode: e };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Q(t, e) {
|
|
97
97
|
const n = t.content[e];
|
|
98
98
|
if (!n) return !1;
|
|
99
99
|
if (e === "APP_INBOX") {
|
|
100
100
|
const o = n, a = (o.buttons ?? []).every(
|
|
101
|
-
(r) => r.label.trim().length > 0 &&
|
|
101
|
+
(r) => r.label.trim().length > 0 && y.safeParse(r.url ?? "").success
|
|
102
102
|
);
|
|
103
103
|
return o.title.trim().length > 0 && o.previewText.trim().length > 0 && a;
|
|
104
104
|
}
|
|
105
105
|
if (e === "PUSH") {
|
|
106
|
-
const o = n, a = o.title.trim().length > 0 && o.body.trim().length > 0, r = o.destination !== "EXTERNAL" ||
|
|
106
|
+
const o = n, a = o.title.trim().length > 0 && o.body.trim().length > 0, r = o.destination !== "EXTERNAL" || y.safeParse(o.url ?? "").success;
|
|
107
107
|
return a && r;
|
|
108
108
|
}
|
|
109
109
|
return n.content.trim().length > 0;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function A(t, e) {
|
|
112
112
|
return t.channels.map(e).join(t.mode === "fallback" ? " → " : " + ");
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Z(t) {
|
|
115
115
|
var e, n;
|
|
116
116
|
if (!(!t || t.delivery)) {
|
|
117
117
|
if ((n = (e = t.message) == null ? void 0 : e.content) != null && n.trim()) {
|
|
118
|
-
t.delivery =
|
|
118
|
+
t.delivery = h(t);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
delete t.message, t.delivery = { mode: "fallback", channels: [], content: {} };
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
+
const c = f.global.t;
|
|
125
|
+
function D() {
|
|
126
|
+
const t = f.global.locale;
|
|
127
|
+
return typeof t == "string" ? t : t.value;
|
|
128
|
+
}
|
|
129
|
+
function g(t) {
|
|
130
|
+
return new Intl.DateTimeFormat(D(), {
|
|
131
|
+
day: "2-digit",
|
|
132
|
+
month: "short",
|
|
133
|
+
year: "numeric"
|
|
134
|
+
}).format(new Date(t));
|
|
135
|
+
}
|
|
124
136
|
function i(t) {
|
|
125
|
-
return
|
|
137
|
+
return p(
|
|
126
138
|
"div",
|
|
127
139
|
{
|
|
128
140
|
class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
|
|
129
141
|
},
|
|
130
142
|
[
|
|
131
|
-
|
|
132
|
-
|
|
143
|
+
p(d.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
|
|
144
|
+
p("span", { class: "fm-typo-en-body-md-600" }, t.name)
|
|
133
145
|
]
|
|
134
146
|
);
|
|
135
147
|
}
|
|
136
|
-
const
|
|
148
|
+
const tt = {
|
|
137
149
|
[s.enum.CREDIT]: {
|
|
138
150
|
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
139
151
|
icon: "local_activity",
|
|
140
152
|
get name() {
|
|
141
|
-
return c
|
|
153
|
+
return c("connect.campaign.common.typeName.CREDIT");
|
|
142
154
|
},
|
|
143
155
|
chip() {
|
|
144
156
|
return i(this);
|
|
@@ -148,7 +160,7 @@ const q = {
|
|
|
148
160
|
chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
|
|
149
161
|
icon: "loyalty",
|
|
150
162
|
get name() {
|
|
151
|
-
return c
|
|
163
|
+
return c("connect.campaign.common.typeName.PROMOTION");
|
|
152
164
|
},
|
|
153
165
|
chip() {
|
|
154
166
|
return i(this);
|
|
@@ -158,7 +170,7 @@ const q = {
|
|
|
158
170
|
chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
|
|
159
171
|
icon: "sell",
|
|
160
172
|
get name() {
|
|
161
|
-
return c
|
|
173
|
+
return c("connect.campaign.common.typeName.VOUCHER");
|
|
162
174
|
},
|
|
163
175
|
chip() {
|
|
164
176
|
return i(this);
|
|
@@ -168,7 +180,7 @@ const q = {
|
|
|
168
180
|
chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
|
|
169
181
|
icon: "award_star",
|
|
170
182
|
get name() {
|
|
171
|
-
return c
|
|
183
|
+
return c("connect.campaign.common.typeName.POINT");
|
|
172
184
|
},
|
|
173
185
|
chip() {
|
|
174
186
|
return i(this);
|
|
@@ -178,7 +190,7 @@ const q = {
|
|
|
178
190
|
chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
179
191
|
icon: "campaign",
|
|
180
192
|
get name() {
|
|
181
|
-
return c
|
|
193
|
+
return c("connect.campaign.common.typeName.BROADCAST");
|
|
182
194
|
},
|
|
183
195
|
chip() {
|
|
184
196
|
return i(this);
|
|
@@ -188,7 +200,7 @@ const q = {
|
|
|
188
200
|
chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
|
|
189
201
|
icon: "database",
|
|
190
202
|
get name() {
|
|
191
|
-
return c
|
|
203
|
+
return c("connect.campaign.common.typeName.GAME");
|
|
192
204
|
},
|
|
193
205
|
chip() {
|
|
194
206
|
return i(this);
|
|
@@ -198,7 +210,7 @@ const q = {
|
|
|
198
210
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
199
211
|
icon: "editor_choice",
|
|
200
212
|
get name() {
|
|
201
|
-
return c
|
|
213
|
+
return c("connect.campaign.common.typeName.REWARD_POOL");
|
|
202
214
|
},
|
|
203
215
|
chip() {
|
|
204
216
|
return i(this);
|
|
@@ -208,7 +220,7 @@ const q = {
|
|
|
208
220
|
chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
|
|
209
221
|
icon: "monetization_on",
|
|
210
222
|
get name() {
|
|
211
|
-
return c
|
|
223
|
+
return c("connect.campaign.common.typeName.COIN");
|
|
212
224
|
},
|
|
213
225
|
chip() {
|
|
214
226
|
return i(this);
|
|
@@ -218,106 +230,120 @@ const q = {
|
|
|
218
230
|
chipClass: "",
|
|
219
231
|
icon: "",
|
|
220
232
|
get name() {
|
|
221
|
-
return c
|
|
233
|
+
return c("connect.campaign.common.typeName.MEMBERSHIP");
|
|
222
234
|
},
|
|
223
235
|
chip() {
|
|
224
236
|
return i(this);
|
|
225
237
|
}
|
|
226
238
|
},
|
|
227
|
-
// TODO: confirm color
|
|
228
239
|
[s.enum.MISSION]: {
|
|
229
240
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
230
241
|
icon: "editor_choice",
|
|
231
242
|
get name() {
|
|
232
|
-
return c
|
|
243
|
+
return c("connect.campaign.common.typeName.MISSION");
|
|
233
244
|
},
|
|
234
245
|
chip() {
|
|
235
246
|
return i(this);
|
|
236
247
|
}
|
|
248
|
+
},
|
|
249
|
+
[s.enum.GRAB]: {
|
|
250
|
+
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
251
|
+
icon: "editor_choice",
|
|
252
|
+
name: "Grab",
|
|
253
|
+
chip() {
|
|
254
|
+
return i(this);
|
|
255
|
+
}
|
|
237
256
|
}
|
|
238
257
|
};
|
|
239
|
-
function
|
|
240
|
-
const e =
|
|
258
|
+
function et(t) {
|
|
259
|
+
const e = _(t), n = {
|
|
241
260
|
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
242
261
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
243
262
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
244
263
|
};
|
|
245
|
-
return t.type == "VOUCHER" ?
|
|
264
|
+
return t.type == "VOUCHER" ? p(d.FmChip, {
|
|
246
265
|
class: n[e],
|
|
247
|
-
label:
|
|
248
|
-
c.global.t(`connect.campaign.common.status.${e}`)
|
|
249
|
-
),
|
|
266
|
+
label: C.title(c(`connect.campaign.common.status.${e}`)),
|
|
250
267
|
compact: !0
|
|
251
|
-
}) :
|
|
268
|
+
}) : p(d.FmChip, {
|
|
252
269
|
class: n[e],
|
|
253
|
-
label:
|
|
254
|
-
c.global.t(`connect.campaign.common.status.${e}`)
|
|
255
|
-
),
|
|
270
|
+
label: C.title(c(`connect.campaign.common.status.${e}`)),
|
|
256
271
|
compact: !0
|
|
257
272
|
});
|
|
258
273
|
}
|
|
259
|
-
function
|
|
274
|
+
function nt(t) {
|
|
275
|
+
const e = t.timeframeOptions;
|
|
276
|
+
if (!e || !e.start && !e.end)
|
|
277
|
+
return c("connect.campaign.common.always_active");
|
|
278
|
+
if (!e.start && e.end)
|
|
279
|
+
return c("connect.campaign.common.valid_until", {
|
|
280
|
+
date: g(e.end)
|
|
281
|
+
});
|
|
282
|
+
const n = g(e.start), o = e.end ? g(e.end) : c("connect.campaign.common.unlimited");
|
|
283
|
+
return `${n} -> ${o}`;
|
|
284
|
+
}
|
|
285
|
+
function P(t) {
|
|
260
286
|
if (!t || !t.start && !t.end)
|
|
261
287
|
return "connect.campaign.common.always";
|
|
262
288
|
const e = t.start ? u(t.start).format("DD MMM YYYY") : "From campaign creation", n = t.end ? u(t.end).format("DD MMM YYYY") : "Never ends";
|
|
263
289
|
return `${e} - ${n}`;
|
|
264
290
|
}
|
|
265
|
-
function
|
|
291
|
+
function ot(t) {
|
|
266
292
|
const { campaign: e } = t;
|
|
267
293
|
return {
|
|
268
294
|
"connect.campaign.common.campaign_name": e.name,
|
|
269
|
-
"connect.campaign.common.campaign_period":
|
|
295
|
+
"connect.campaign.common.campaign_period": P(
|
|
270
296
|
e.timeframeOptions
|
|
271
297
|
),
|
|
272
298
|
get "connect.campaign.common.next_schedule_at"() {
|
|
273
|
-
if (e.event.type != "SCHEDULE" || !e.event.rule || !
|
|
299
|
+
if ((e == null ? void 0 : e.event.type) != "SCHEDULE" || !e.event.rule || !E(e.event.rule))
|
|
274
300
|
return;
|
|
275
|
-
const n =
|
|
301
|
+
const n = N(
|
|
276
302
|
e.event.rule.rules.g_schedule
|
|
277
303
|
);
|
|
278
304
|
return n ? u(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
279
305
|
},
|
|
280
306
|
get "connect.campaign.common.discount_type"() {
|
|
281
|
-
if (e.type == "PROMOTION") return
|
|
307
|
+
if (e.type == "PROMOTION") return l(e.effect);
|
|
282
308
|
if ("configs" in t && t.configs.type == "VOUCHER")
|
|
283
|
-
return
|
|
309
|
+
return l(t.configs.extras.effect);
|
|
284
310
|
},
|
|
285
311
|
get "connect.campaign.broadcast.summary.delivery"() {
|
|
286
312
|
if (e.type != "BROADCAST") return;
|
|
287
|
-
const n =
|
|
313
|
+
const n = h(e);
|
|
288
314
|
if (!(n.channels.length < 2))
|
|
289
315
|
return `connect.campaign.broadcast.mode.${n.mode}.label`;
|
|
290
316
|
},
|
|
291
317
|
get "connect.campaign.broadcast.summary.channels"() {
|
|
292
318
|
var n;
|
|
293
319
|
if (e.type == "BROADCAST")
|
|
294
|
-
return ((n =
|
|
320
|
+
return ((n = T(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
|
|
295
321
|
},
|
|
296
322
|
get "connect.campaign.common.available_at"() {
|
|
297
323
|
return e.targetLocation ? e.targetLocation.length > 0 ? e.targetLocation.map(
|
|
298
|
-
(n) =>
|
|
324
|
+
(n) => I().locationItems.find((o) => o.value == n).label
|
|
299
325
|
).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
|
|
300
326
|
}
|
|
301
327
|
};
|
|
302
328
|
}
|
|
303
|
-
function
|
|
329
|
+
function _(t) {
|
|
304
330
|
return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? u().isBetween(
|
|
305
331
|
t.timeframeOptions.start ?? u().subtract(1, "d"),
|
|
306
332
|
t.timeframeOptions.end ?? u().add(1, "d")
|
|
307
333
|
) ? "active" : u().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
308
334
|
}
|
|
309
|
-
function
|
|
310
|
-
const e =
|
|
335
|
+
function T(t) {
|
|
336
|
+
const e = h(t);
|
|
311
337
|
if (!e.channels.length) return null;
|
|
312
|
-
const o =
|
|
338
|
+
const o = A(e, (a) => f.global.t(`connect.campaign.broadcast.channel.${a}`));
|
|
313
339
|
return {
|
|
314
|
-
strategy: e.channels.length > 1 ?
|
|
340
|
+
strategy: e.channels.length > 1 ? f.global.t(
|
|
315
341
|
`connect.campaign.broadcast.strategy.${e.mode}`
|
|
316
342
|
) : null,
|
|
317
343
|
route: o
|
|
318
344
|
};
|
|
319
345
|
}
|
|
320
|
-
function
|
|
346
|
+
function at(t) {
|
|
321
347
|
var e, n;
|
|
322
348
|
switch (t.event.type) {
|
|
323
349
|
case "BILL_COMPLETED":
|
|
@@ -329,7 +355,7 @@ function tt(t) {
|
|
|
329
355
|
return t.earningOption.type == "FIXED" ? `Spend to get ${t.earningOption.amount} ${m.formattedType(t.type)}` : `Every ${t.earningOption.every} amount spent get ${t.earningOption.amount} ${m.formattedType(t.type)}`;
|
|
330
356
|
case "VOUCHER":
|
|
331
357
|
const a = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
|
|
332
|
-
return a ? `${o} - ${
|
|
358
|
+
return a ? `${o} - ${l(a)}` : o;
|
|
333
359
|
default:
|
|
334
360
|
return o;
|
|
335
361
|
}
|
|
@@ -344,7 +370,7 @@ function tt(t) {
|
|
|
344
370
|
case "MEMBERSHIP_JOINED":
|
|
345
371
|
return `Receive ${m.formattedType(t.type)} when member joined`;
|
|
346
372
|
case "MAKING_ORDER":
|
|
347
|
-
return t.type !== "PROMOTION" ? void 0 :
|
|
373
|
+
return t.type !== "PROMOTION" ? void 0 : l(t.effect);
|
|
348
374
|
default:
|
|
349
375
|
throw new Error(
|
|
350
376
|
`Not implemented ${JSON.stringify({ cause: t.event.type })}`
|
|
@@ -352,22 +378,23 @@ function tt(t) {
|
|
|
352
378
|
}
|
|
353
379
|
}
|
|
354
380
|
export {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
381
|
+
tt as C,
|
|
382
|
+
_ as a,
|
|
383
|
+
et as b,
|
|
384
|
+
at as c,
|
|
385
|
+
T as d,
|
|
386
|
+
R as e,
|
|
387
|
+
Q as f,
|
|
388
|
+
nt as g,
|
|
389
|
+
q as h,
|
|
390
|
+
j as i,
|
|
391
|
+
V as j,
|
|
392
|
+
K as k,
|
|
393
|
+
J as l,
|
|
394
|
+
W as m,
|
|
395
|
+
z as n,
|
|
396
|
+
ot as o,
|
|
397
|
+
Z as p,
|
|
398
|
+
X as r,
|
|
399
|
+
P as s
|
|
373
400
|
};
|