@feedmepos/mf-connect 0.1.119-prod → 0.1.121-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-BN2LKM3u.js → App-DwtaLO6F.js} +147 -135
- package/dist/AuditLogs-s572aHLw.js +2016 -0
- package/dist/{Bin-DpQ1atb7.js → Bin-BBaVggZI.js} +8 -8
- package/dist/{Broadcast-c1ZyYClI.js → Broadcast-CqAQ3EmE.js} +22 -21
- package/dist/{CampaignAnalytic-w1hIlc2r.js → CampaignAnalytic-34bfP8iY.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7U6evm1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BvAAxE3a.js} +8 -9
- package/dist/{Card-De53Xgbe.js → Card-8hlnKnhk.js} +22 -22
- package/dist/{Collections-BL2RD3FU.js → Collections-BJ0-UjKf.js} +197 -185
- package/dist/{Credit-2KvFFcwR.js → Credit-DJNc__yp.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CKSs2nYE.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BvilcyyB.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSjOHBhA.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js → EffectSheet.vue_vue_type_style_index_0_lang-DFzVuuEy.js} +30 -30
- package/dist/{Experience-Cb0jHtVo.js → Experience-D-cUhjWc.js} +32 -31
- package/dist/{FileSaver.min-UDgZF_Cv.js → FileSaver.min-DKYYse6A.js} +1 -1
- package/dist/{Game-BnysxSMs.js → Game-DdFV90Kp.js} +19 -18
- package/dist/{GiftCardSetup-s1OR6xQq.js → GiftCardSetup-Dz0AN159.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-D108r20x.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-GCp3IFaC.js} +7 -7
- package/dist/{Goals-BAieLPzR.js → Goals-Dg_kAezl.js} +4 -4
- package/dist/Grab-BSQt4deB.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js → ImageInput.vue_vue_type_script_setup_true_lang-B_H1Bgy1.js} +1 -1
- package/dist/{Index-DnX16GAE.js → Index-ZSup3I7J.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DeM-WG6m.js → LocationPicker.vue_vue_type_script_setup_true_lang-DisF-jcd.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BAN69FOS.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BHhjZOYi.js} +1 -1
- package/dist/{LoyaltyDashboard-D8g6OSbC.js → LoyaltyDashboard-D8BhHsaw.js} +15 -15
- package/dist/{MainLayout-DWABjpQn.js → MainLayout-BBnhRxyR.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COp7iulq.js → MainLayout.vue_vue_type_script_setup_true_lang-DFrPlj5u.js} +16 -16
- package/dist/{Marketing-Dagatr0y.js → Marketing-5F9LLn91.js} +4 -4
- package/dist/{MarketingMaterialEdit-DYVzNDpM.js → MarketingMaterialEdit-C7dD4Bzw.js} +214 -211
- package/dist/{Member-DAxdEF_Z.js → Member-Dk4JeGru.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-nBg7Hckj.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-ISolD_Qg.js} +39 -47
- package/dist/{MemberImportHistory-2gx6FnLh.js → MemberImportHistory-C0Ep8L2q.js} +7 -7
- package/dist/{MemberList-By_gGl-J.js → MemberList-BsuPfBgk.js} +103 -105
- package/dist/{MemberTransactions-BEF-4ZNp.js → MemberTransactions-mZ3fHw5O.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js → MessageInput.vue_vue_type_script_setup_true_lang-1weyRM8c.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DN3mWfKj.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-caED3JRW.js} +1 -1
- package/dist/{Mission-jg15lBxo.js → Mission-C7DqUOJz.js} +22 -21
- package/dist/{Overview-C7WfdzfV.js → Overview-U201nBVO.js} +20 -20
- package/dist/{Overview-BFKLTAk1.js → Overview-VABLg36G.js} +145 -144
- package/dist/{Point-dv9WgWTQ.js → Point-DU6Ndv35.js} +22 -21
- package/dist/{Promotion-mFPF_8jO.js → Promotion-9UhZXNPb.js} +137 -131
- package/dist/{Queue-BQoR_M5H.js → Queue-CUxMedbd.js} +45 -45
- package/dist/{Record-1JZ1N5iX.js → Record-BIftCQzV.js} +9 -9
- package/dist/{Review-B52AxCeT.js → Review-lyVgTfsP.js} +2 -2
- package/dist/ReviewFacebookCallback-Da5G19bE.js +225 -0
- package/dist/{ReviewGoogleCallback-DO6SVFIC.js → ReviewGoogleCallback-B41PXfsj.js} +5 -5
- package/dist/{Reward-Cp4jPAB0.js → Reward-BMun_Rs4.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DLD6X13Z.js → RewardGroup.vue_vue_type_script_setup_true_lang-3TONrUQu.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHzFgr4h.js +1923 -0
- package/dist/{Segment-DaKw0YXF.js → Segment-1VS7ycXi.js} +303 -306
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bj3OQ_JJ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C5iJSlxi.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1Otak97.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CXY9Wyk9.js} +4 -4
- package/dist/{Setting-DveUrt8J.js → Setting-BdtzvKjt.js} +159 -148
- package/dist/{SettingAdvertisements-QRXOMNnM.js → SettingAdvertisements-BO2l3HBT.js} +12 -12
- package/dist/Settings-CvYawDU5.js +286 -0
- package/dist/{Store-DjdXRw3V.js → Store-DWQz-MgY.js} +28 -28
- package/dist/{StoreRewards-CjlGrc9E.js → StoreRewards-Bfwuqxf-.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CBwmDKAw.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CHzFjo24.js +7007 -0
- package/dist/{Tier-D74Oh2np.js → Tier-CKn-l-wY.js} +2575 -687
- package/dist/{Title-CeeviOW8.js → Title-BXDk69uL.js} +95 -94
- package/dist/{Transaction-CWdw0ITl.js → Transaction-D4HQO4i9.js} +2 -2
- package/dist/Upselling-CikWzKq7.js +1032 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-um124o4t.js} +26 -26
- package/dist/{Voucher-C0nNXMtv.js → Voucher-BGIyw4jq.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BKyZj5SP.js} +12 -12
- package/dist/{WhatsappAccount-CoLSjCQ2.js → WhatsappAccount-Cd82g_xj.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DkHPlGgT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DWy8kS66.js} +1 -1
- package/dist/{WhatsappBot-kLb3kUav.js → WhatsappBot-auQhO8zk.js} +6 -6
- package/dist/{WhatsappBotLogs-jcYaHs0t.js → WhatsappBotLogs-CWuJzK9W.js} +6 -6
- package/dist/{WhatsappBotSettings-B6jJD61h.js → WhatsappBotSettings-B8KXMpIF.js} +4 -4
- package/dist/{WhatsappLayout-C24bIjI2.js → WhatsappLayout-DxooAkkL.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-9a_grP76.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CYHmgQ2v.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-i8Wc2mCr.js → ZodTextField.vue_vue_type_script_setup_true_lang-DilxQM_z.js} +2 -2
- package/dist/{app-C06bAZj3.js → app-BG-zK89d.js} +4181 -3401
- package/dist/app.js +4 -3
- package/dist/{base.export-CgNRhKu8.js → base.export-BcMuREGH.js} +2 -2
- package/dist/{business-D23Dt1x4.js → business-9_NOI2V9.js} +1 -1
- package/dist/{campaign-FVcbXtrP.js → campaign-8y_9SvKP.js} +34 -28
- package/dist/{campaign-DfEvGigm.js → campaign-DjBTRZyA.js} +121 -94
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-COkPH1QE.js +776 -0
- package/dist/{collection.fn-DC1AMI9o.js → collection.fn-yXurU9iv.js} +2 -2
- package/dist/{currency-Bra2RJK4.js → currency-YzyBFtDU.js} +1 -1
- package/dist/duplicateCampaign-dRWioann.js +51 -0
- package/dist/{effect-EL4V3pAu.js → effect-bMGarJZ6.js} +1 -1
- package/dist/{email-addresses-Ddtf1x_y.js → email-addresses-Ciu83j_3.js} +2 -2
- package/dist/{feature-flag-umACX47C.js → feature-flag-H5D1Cob5.js} +70 -70
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-DqDOnLCf.js → helper-BH9HMikb.js} +1 -1
- package/dist/{index-CEh6ryp2.js → index-B7-Uvnfn.js} +19 -6
- package/dist/{index-DuCJtx1m.js → index-BHO82_Ix.js} +1 -1
- package/dist/{index-B_BmgKrh.js → index-BaTnDV-T.js} +2699 -2613
- package/dist/{index-C3hAzzS2.js → index-BvKJM3M2.js} +29 -15
- package/dist/{index-rcfcslIC.js → index-BxwJfT08.js} +197 -197
- package/dist/{index-C6p9Lsvf.js → index-CH-KHkm5.js} +1 -1
- package/dist/{index-B2lqC_hH.js → index-CIOidYvo.js} +1 -1
- package/dist/{index-BzwwXWpZ.js → index-CJAFz9Nn.js} +1 -1
- package/dist/{index-ByVPdKdB.js → index-CooParq-.js} +682 -581
- package/dist/{index-pfmx-Gor.js → index-Cyf05z_2.js} +2 -2
- package/dist/{index-Bvk61_w_.js → index-DYu7ZdQt.js} +1 -1
- package/dist/{index-B3U3KZl0.js → index-DbxiG50D.js} +2 -2
- package/dist/{index-BkKu2G2c.js → index-DkMy7WpU.js} +2 -2
- package/dist/{index-LjoAs_nX.js → index-DpkoCl4z.js} +10 -10
- package/dist/{index-C3lk4GHF.js → index-MWNnMT2T.js} +4 -4
- package/dist/{index-DK9zxpDu.js → index-RvJ5cq__.js} +3 -3
- package/dist/{index-iVbjwKxc.js → index-Ye3qFt34.js} +10 -10
- package/dist/{index-BTjhdlN_.js → index-_giqGuYM.js} +1 -1
- package/dist/{index-TDCPGtW3.js → index-pnM5q4c_.js} +389 -232
- package/dist/{index-BroF2fC8.js → index-taPHgOqE.js} +608 -251
- package/dist/{index.esm2017-DCuQPCX2.js → index.esm2017-CLxZor1Y.js} +111 -111
- package/dist/{loading-CQm1DKWE.js → loading-CsOSUWBd.js} +1 -1
- package/dist/{lodash-C2wVbAap.js → lodash-CshibTzh.js} +1 -1
- package/dist/{member-import-BLEmTRso.js → member-import-BdaGAjjt.js} +1 -1
- package/dist/{membership-XycnxPEW.js → membership-C5JWO1FM.js} +2 -2
- package/dist/{money-DY_QGzd1.js → money-Blt5EM43.js} +1 -1
- package/dist/{number-BHthf4qF.js → number-COm3MiH8.js} +1 -1
- package/dist/objectid-DQTx3-ee.js +145 -0
- package/dist/{onboarding-BOJw54Fn.js → onboarding-BbQDJOOS.js} +36 -36
- package/dist/{onboardingSetup-Cf2u1tXu.js → onboardingSetup-BLISY52M.js} +2 -2
- package/dist/{plugins-DKQeoL_e.js → plugins-De_chCYU.js} +3 -3
- package/dist/{reward-D4RIYSpl.js → reward-Dl8Zoxe_.js} +1 -1
- package/dist/{rule-Ba-s0L_w.js → rule-D6_iss3O.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-Cw6j1cLX.js +224 -0
- package/dist/{timezone-CAc8xi1h.js → timezone-CA5FwOyy.js} +1 -1
- package/dist/{transaction.fn-Cp2hnhyU.js → transaction.fn-DI_NeGQb.js} +2 -2
- package/dist/{trigger-3ebhNBX7.js → trigger-CuymoMM-.js} +9 -9
- package/dist/{useMarketingMaterialActions-6URv8neP.js → useMarketingMaterialActions-Bz0Kgvgd.js} +4 -4
- package/dist/{usePagination-C-fyMmiy.js → usePagination-yb1rupwa.js} +1 -1
- package/dist/{user-T-iXTrYV.js → user-QSKyFaMI.js} +1 -1
- package/dist/vue-i18n-B_qtODCw.js +2365 -0
- package/dist/{xlsx-B8OqaJfb.js → xlsx--RjkGa9A.js} +224 -224
- package/dist/{zod-DZkNj425.js → zod-CmPMd-h0.js} +1 -1
- package/package.json +8 -3
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXb7v7wc.js +0 -3493
- package/dist/ReviewFacebookCallback-ihTdiI8V.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js +0 -1884
- package/dist/Settings-D9D-mkBa.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DnwMpqzf.js +0 -1265
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js +0 -142
- package/dist/campaign.fn-0MNUj1fZ.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-CPCAqIiC.js +0 -145
- package/dist/rule-builder-D0B0DPao.js +0 -102
- package/dist/template-B40I16Yg.js +0 -236
- package/dist/vue-i18n-DzsxJorb.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-CsOSUWBd.js";
|
|
5
|
+
import { w as h, u as a } from "./xlsx--RjkGa9A.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-Ye3qFt34.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-DkMy7WpU.js";
|
|
4
|
+
import { g as i, S as g, d as h } from "./index-Ye3qFt34.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-pnM5q4c_.js";
|
|
3
|
+
import { e as l } from "./effect-bMGarJZ6.js";
|
|
4
|
+
import { components as d } from "@feedmepos/ui-library";
|
|
5
|
+
import { a as E } from "./index-taPHgOqE.js";
|
|
6
|
+
import { c as N } from "./rule-D6_iss3O.js";
|
|
7
|
+
import { u as I } from "./business-9_NOI2V9.js";
|
|
8
|
+
import { C as m } from "./campaign.fn-COkPH1QE.js";
|
|
9
|
+
import { g as y, t as h } from "./index-BxwJfT08.js";
|
|
10
|
+
import { c as C } from "./string-Gcy5IM_H.js";
|
|
11
|
+
import { i as f } from "./plugins-De_chCYU.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
|
};
|