@feedmepos/mf-connect 0.1.119-dev → 0.1.119-prod
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-z-u6skb5.js → App-BN2LKM3u.js} +135 -147
- package/dist/{Bin-Dh9RAgYi.js → Bin-DpQ1atb7.js} +8 -8
- package/dist/{Broadcast-Dg6azPS8.js → Broadcast-c1ZyYClI.js} +21 -22
- package/dist/{CampaignAnalytic-CVB4dstO.js → CampaignAnalytic-w1hIlc2r.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DYgBeT23.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7U6evm1.js} +9 -8
- package/dist/{Card-CY736Ul0.js → Card-De53Xgbe.js} +22 -22
- package/dist/{Collections-CdTKWkZZ.js → Collections-BL2RD3FU.js} +185 -197
- package/dist/{Credit-CUhEKlMI.js → Credit-2KvFFcwR.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CBwgeTXh.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CKSs2nYE.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXb7v7wc.js +3493 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D5-EKqG9.js → EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js} +30 -30
- package/dist/{Experience-CMp09U-6.js → Experience-Cb0jHtVo.js} +31 -32
- package/dist/{FileSaver.min-Bq5McdmK.js → FileSaver.min-UDgZF_Cv.js} +1 -1
- package/dist/{Game-Dv5NvG-q.js → Game-BnysxSMs.js} +18 -19
- package/dist/{GiftCardSetup-SO2Tk5In.js → GiftCardSetup-s1OR6xQq.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CgG5vHCp.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-D108r20x.js} +7 -7
- package/dist/{Goals-BEwQP4cY.js → Goals-BAieLPzR.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BDGEqsWE.js → ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js} +1 -1
- package/dist/{Index-8F2LOWng.js → Index-DnX16GAE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BwAjki7Y.js → LocationPicker.vue_vue_type_script_setup_true_lang-DeM-WG6m.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DK4C0Y9j.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BAN69FOS.js} +1 -1
- package/dist/{LoyaltyDashboard-rWm0b8cm.js → LoyaltyDashboard-D8g6OSbC.js} +15 -15
- package/dist/{MainLayout-ezbgp2IQ.js → MainLayout-DWABjpQn.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-1QY5-U5y.js → MainLayout.vue_vue_type_script_setup_true_lang-COp7iulq.js} +3 -3
- package/dist/{Marketing-DcWF4xVc.js → Marketing-Dagatr0y.js} +4 -4
- package/dist/{MarketingMaterialEdit-C1bXj_hU.js → MarketingMaterialEdit-DYVzNDpM.js} +211 -214
- package/dist/{Member-CgDZqGsV.js → Member-DAxdEF_Z.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dh1_j06F.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-nBg7Hckj.js} +47 -39
- package/dist/{MemberImportHistory-DT3QJ5se.js → MemberImportHistory-2gx6FnLh.js} +7 -7
- package/dist/{MemberList-Bm05jnbk.js → MemberList-By_gGl-J.js} +105 -103
- package/dist/{MemberTransactions-D90tTpdC.js → MemberTransactions-BEF-4ZNp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jvgjOXXA.js → MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CxL-Nh6i.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DN3mWfKj.js} +1 -1
- package/dist/{Mission-D_l2eJI3.js → Mission-jg15lBxo.js} +21 -22
- package/dist/{Overview-BOZBnorP.js → Overview-BFKLTAk1.js} +144 -145
- package/dist/{Overview-1AYfTeMD.js → Overview-C7WfdzfV.js} +20 -20
- package/dist/{Point-Cqy4XzeG.js → Point-dv9WgWTQ.js} +21 -22
- package/dist/{Promotion-9RDNbCgB.js → Promotion-mFPF_8jO.js} +131 -137
- package/dist/{Queue-D2Eie_np.js → Queue-BQoR_M5H.js} +45 -45
- package/dist/{Record-e4B--FD8.js → Record-1JZ1N5iX.js} +9 -9
- package/dist/{Review-DcUpSvc-.js → Review-B52AxCeT.js} +2 -2
- package/dist/ReviewFacebookCallback-ihTdiI8V.js +238 -0
- package/dist/{ReviewGoogleCallback-JPkamgo2.js → ReviewGoogleCallback-DO6SVFIC.js} +5 -5
- package/dist/{Reward-BQJw-R8V.js → Reward-Cp4jPAB0.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D_DSQ8q2.js → RewardGroup.vue_vue_type_script_setup_true_lang-DLD6X13Z.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js +1884 -0
- package/dist/{Segment-Cjdqsqqg.js → Segment-DaKw0YXF.js} +306 -303
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-g-CJUZBF.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bj3OQ_JJ.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-lbH0b170.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1Otak97.js} +4 -4
- package/dist/{Setting-B3HK4mtx.js → Setting-DveUrt8J.js} +148 -159
- package/dist/{SettingAdvertisements-BQFJpdIm.js → SettingAdvertisements-QRXOMNnM.js} +12 -12
- package/dist/Settings-D9D-mkBa.js +179 -0
- package/dist/{Store-mp1LyXwr.js → Store-DjdXRw3V.js} +28 -28
- package/dist/{StoreRewards-DiSB6d7_.js → StoreRewards-CjlGrc9E.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DnwMpqzf.js +1265 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js +142 -0
- package/dist/{Tier-CxaXh96q.js → Tier-D74Oh2np.js} +687 -2575
- package/dist/{Title-Byz0TGpi.js → Title-CeeviOW8.js} +94 -95
- package/dist/{Transaction-CNXulI3o.js → Transaction-CWdw0ITl.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C0bfVZf8.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js} +26 -26
- package/dist/{Voucher-CVw3E8Y4.js → Voucher-C0nNXMtv.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C0d3ktXA.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js} +12 -12
- package/dist/{WhatsappAccount-5vLzjaIV.js → WhatsappAccount-CoLSjCQ2.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CwGBRX-Q.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DkHPlGgT.js} +1 -1
- package/dist/{WhatsappBot-BWJbD7Gk.js → WhatsappBot-kLb3kUav.js} +6 -6
- package/dist/{WhatsappBotLogs-C8gpmZyC.js → WhatsappBotLogs-jcYaHs0t.js} +6 -6
- package/dist/{WhatsappBotSettings-BvPnKHz-.js → WhatsappBotSettings-B6jJD61h.js} +4 -4
- package/dist/{WhatsappLayout-DJXhXeXf.js → WhatsappLayout-C24bIjI2.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BxUYjrWQ.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-9a_grP76.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CkjzVKif.js → ZodTextField.vue_vue_type_script_setup_true_lang-i8Wc2mCr.js} +2 -2
- package/dist/{app-BF1vds2J.js → app-C06bAZj3.js} +10806 -11561
- package/dist/app.js +3 -4
- package/dist/{base.export-B7FU8J4P.js → base.export-CgNRhKu8.js} +2 -2
- package/dist/{business-DkUMhys1.js → business-D23Dt1x4.js} +1 -1
- package/dist/{campaign-C9cVkGMF.js → campaign-DfEvGigm.js} +94 -121
- package/dist/{campaign-0AgQP43B.js → campaign-FVcbXtrP.js} +28 -34
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-0MNUj1fZ.js +776 -0
- package/dist/{collection.fn-B_QnW0e3.js → collection.fn-DC1AMI9o.js} +2 -2
- package/dist/{currency-XQmondpC.js → currency-Bra2RJK4.js} +1 -1
- package/dist/{effect-Mwn1x6qN.js → effect-EL4V3pAu.js} +1 -1
- package/dist/{email-addresses-DQQAi6-l.js → email-addresses-Ddtf1x_y.js} +2 -2
- package/dist/{feature-flag-B1VMMZMd.js → feature-flag-umACX47C.js} +70 -70
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-D1R8vyjc.js → helper-DqDOnLCf.js} +1 -1
- package/dist/{index-Rs75lw-x.js → index-B2lqC_hH.js} +1 -1
- package/dist/{index-C9Nbb7wc.js → index-B3U3KZl0.js} +2 -2
- package/dist/{index-CRAuAyO3.js → index-BTjhdlN_.js} +1 -1
- package/dist/{index-Bm43wR8L.js → index-B_BmgKrh.js} +2613 -2699
- package/dist/{index-DMfCzjiA.js → index-BkKu2G2c.js} +2 -2
- package/dist/{index-ug7pxPAX.js → index-BroF2fC8.js} +251 -608
- package/dist/{index-P8DDRVa3.js → index-Bvk61_w_.js} +1 -1
- package/dist/{index-DQnCdGWe.js → index-ByVPdKdB.js} +581 -682
- package/dist/{index-Bym-ZIcv.js → index-BzwwXWpZ.js} +1 -1
- package/dist/{index-DaUhJ6xV.js → index-C3hAzzS2.js} +15 -29
- package/dist/{index-CzE9ZPDV.js → index-C3lk4GHF.js} +4 -4
- package/dist/{index-CLlGMbnP.js → index-C6p9Lsvf.js} +1 -1
- package/dist/{index-eR9mqPPV.js → index-CEh6ryp2.js} +6 -19
- package/dist/{index-mOGrVzUV.js → index-DK9zxpDu.js} +3 -3
- package/dist/{index-ytSMcSMt.js → index-DuCJtx1m.js} +1 -1
- package/dist/{index-ZYrey0SM.js → index-LjoAs_nX.js} +10 -10
- package/dist/{index-BU6CU5MP.js → index-TDCPGtW3.js} +232 -389
- package/dist/{index-CPB7j8Wn.js → index-iVbjwKxc.js} +10 -10
- package/dist/{index-Cg8Z5eYT.js → index-pfmx-Gor.js} +2 -2
- package/dist/{index-D5BwAYuA.js → index-rcfcslIC.js} +197 -197
- package/dist/{index.esm2017-Gkctw9Mb.js → index.esm2017-DCuQPCX2.js} +111 -111
- package/dist/{loading-kUQqT44G.js → loading-CQm1DKWE.js} +1 -1
- package/dist/{lodash-B4AjV7YZ.js → lodash-C2wVbAap.js} +1 -1
- package/dist/{member-import-CwDUG5mj.js → member-import-BLEmTRso.js} +1 -1
- package/dist/{membership-BI6U8-eM.js → membership-XycnxPEW.js} +2 -2
- package/dist/{money-Bum-AbB7.js → money-DY_QGzd1.js} +1 -1
- package/dist/{number-uAoNqG-N.js → number-BHthf4qF.js} +1 -1
- package/dist/objectid-CPCAqIiC.js +145 -0
- package/dist/{onboarding-wtYzQipv.js → onboarding-BOJw54Fn.js} +36 -36
- package/dist/{onboardingSetup-DlYM-oqd.js → onboardingSetup-Cf2u1tXu.js} +2 -2
- package/dist/{plugins-BGyTPNfc.js → plugins-DKQeoL_e.js} +3 -3
- package/dist/{reward-D0xtG-bp.js → reward-D4RIYSpl.js} +1 -1
- package/dist/{rule-BAA5-vRj.js → rule-Ba-s0L_w.js} +492 -572
- package/dist/rule-builder-D0B0DPao.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-B40I16Yg.js +236 -0
- package/dist/{timezone-Bbw2OeEP.js → timezone-CAc8xi1h.js} +1 -1
- package/dist/{transaction.fn-DZdNjP_E.js → transaction.fn-Cp2hnhyU.js} +2 -2
- package/dist/{trigger-BpotFb7G.js → trigger-3ebhNBX7.js} +9 -9
- package/dist/{useMarketingMaterialActions-CQ1M0N9c.js → useMarketingMaterialActions-6URv8neP.js} +4 -4
- package/dist/{usePagination-qALFI_Td.js → usePagination-C-fyMmiy.js} +1 -1
- package/dist/{user-X_94TRIK.js → user-T-iXTrYV.js} +1 -1
- package/dist/vue-i18n-DzsxJorb.js +2365 -0
- package/dist/{xlsx-DW48eXDT.js → xlsx-B8OqaJfb.js} +224 -224
- package/dist/{zod-BAP9II5C.js → zod-DZkNj425.js} +1 -1
- package/package.json +3 -8
- package/dist/AuditLogs-J0UJ3HJW.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BC4jTtVY.js +0 -4439
- package/dist/Grab-npbL7p7S.js +0 -301
- package/dist/ReviewFacebookCallback-BhHdYb4X.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DfWjXTx3.js +0 -1923
- package/dist/Settings-DKWkiRuA.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAYKqf-Y.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-be7ksTJw.js +0 -7007
- package/dist/Upselling-Dto64bmE.js +0 -1013
- package/dist/campaign.fn-N6rJeDUx.js +0 -776
- package/dist/duplicateCampaign-CvQRWP-Z.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-CPTCMH2h.js +0 -145
- package/dist/template-DKgW9ul3.js +0 -188
- package/dist/vue-i18n-CRFpVnMa.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-CQm1DKWE.js";
|
|
5
|
+
import { w as h, u as a } from "./xlsx-B8OqaJfb.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 { d as I, g as r, A as b, S, b as D } from "./index-iVbjwKxc.js";
|
|
5
5
|
const $ = {
|
|
6
6
|
async readSettings(e) {
|
|
7
7
|
try {
|
|
@@ -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-TDCPGtW3.js";
|
|
3
|
+
import { e as p } from "./effect-EL4V3pAu.js";
|
|
4
|
+
import { components as f } from "@feedmepos/ui-library";
|
|
5
|
+
import { i as b } from "./rule-builder-D0B0DPao.js";
|
|
6
|
+
import { c as O } from "./rule-Ba-s0L_w.js";
|
|
7
|
+
import { u as E } from "./business-D23Dt1x4.js";
|
|
8
|
+
import { C as m } from "./campaign.fn-0MNUj1fZ.js";
|
|
9
|
+
import { g as h, t as g } from "./index-rcfcslIC.js";
|
|
10
|
+
import { c as d } from "./string-Gcy5IM_H.js";
|
|
11
|
+
import { i as c } from "./plugins-DKQeoL_e.js";
|
|
12
|
+
import { h as l } from "vue";
|
|
13
|
+
import { F as s } from "./campaign.enum-BqekIiiN.js";
|
|
14
|
+
const N = [
|
|
15
15
|
"APP_INBOX",
|
|
16
16
|
"PUSH",
|
|
17
17
|
"SMS",
|
|
18
18
|
"EMAIL",
|
|
19
19
|
"WHATSAPP"
|
|
20
|
-
],
|
|
21
|
-
function
|
|
22
|
-
return
|
|
20
|
+
], I = [...N];
|
|
21
|
+
function F(t) {
|
|
22
|
+
return I.includes(t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function y(t, e) {
|
|
25
25
|
return t === "APP_INBOX" ? {
|
|
26
26
|
title: "",
|
|
27
27
|
previewText: "",
|
|
@@ -40,17 +40,17 @@ function O(t, e) {
|
|
|
40
40
|
variables: e
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function k(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] ?? y(e, n)
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function G(t, e) {
|
|
54
54
|
const n = { ...t.content };
|
|
55
55
|
return delete n[e], {
|
|
56
56
|
...t,
|
|
@@ -58,99 +58,87 @@ function X(t, e) {
|
|
|
58
58
|
content: n
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function j(t, e, n) {
|
|
62
62
|
return {
|
|
63
63
|
...t,
|
|
64
64
|
content: { ...t.content, [e]: n }
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function V(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 X(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] ?? y(e, n)
|
|
79
79
|
};
|
|
80
80
|
return o && delete r[o], {
|
|
81
81
|
...t,
|
|
82
|
-
channels: [e, ...a.filter((
|
|
82
|
+
channels: [e, ...a.filter((C) => C !== e)],
|
|
83
83
|
content: r
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function z(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 W(t, e) {
|
|
94
94
|
return { ...t, mode: e };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function J(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 && h.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" || h.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 R(t, e) {
|
|
112
112
|
return t.channels.map(e).join(t.mode === "fallback" ? " → " : " + ");
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function K(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 = g(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
|
-
}
|
|
136
124
|
function i(t) {
|
|
137
|
-
return
|
|
125
|
+
return l(
|
|
138
126
|
"div",
|
|
139
127
|
{
|
|
140
128
|
class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
|
|
141
129
|
},
|
|
142
130
|
[
|
|
143
|
-
|
|
144
|
-
|
|
131
|
+
l(f.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
|
|
132
|
+
l("span", { class: "fm-typo-en-body-md-600" }, t.name)
|
|
145
133
|
]
|
|
146
134
|
);
|
|
147
135
|
}
|
|
148
|
-
const
|
|
136
|
+
const q = {
|
|
149
137
|
[s.enum.CREDIT]: {
|
|
150
138
|
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
151
139
|
icon: "local_activity",
|
|
152
140
|
get name() {
|
|
153
|
-
return c("connect.campaign.common.typeName.CREDIT");
|
|
141
|
+
return c.global.t("connect.campaign.common.typeName.CREDIT");
|
|
154
142
|
},
|
|
155
143
|
chip() {
|
|
156
144
|
return i(this);
|
|
@@ -160,7 +148,7 @@ const tt = {
|
|
|
160
148
|
chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
|
|
161
149
|
icon: "loyalty",
|
|
162
150
|
get name() {
|
|
163
|
-
return c("connect.campaign.common.typeName.PROMOTION");
|
|
151
|
+
return c.global.t("connect.campaign.common.typeName.PROMOTION");
|
|
164
152
|
},
|
|
165
153
|
chip() {
|
|
166
154
|
return i(this);
|
|
@@ -170,7 +158,7 @@ const tt = {
|
|
|
170
158
|
chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
|
|
171
159
|
icon: "sell",
|
|
172
160
|
get name() {
|
|
173
|
-
return c("connect.campaign.common.typeName.VOUCHER");
|
|
161
|
+
return c.global.t("connect.campaign.common.typeName.VOUCHER");
|
|
174
162
|
},
|
|
175
163
|
chip() {
|
|
176
164
|
return i(this);
|
|
@@ -180,7 +168,7 @@ const tt = {
|
|
|
180
168
|
chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
|
|
181
169
|
icon: "award_star",
|
|
182
170
|
get name() {
|
|
183
|
-
return c("connect.campaign.common.typeName.POINT");
|
|
171
|
+
return c.global.t("connect.campaign.common.typeName.POINT");
|
|
184
172
|
},
|
|
185
173
|
chip() {
|
|
186
174
|
return i(this);
|
|
@@ -190,7 +178,7 @@ const tt = {
|
|
|
190
178
|
chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
191
179
|
icon: "campaign",
|
|
192
180
|
get name() {
|
|
193
|
-
return c("connect.campaign.common.typeName.BROADCAST");
|
|
181
|
+
return c.global.t("connect.campaign.common.typeName.BROADCAST");
|
|
194
182
|
},
|
|
195
183
|
chip() {
|
|
196
184
|
return i(this);
|
|
@@ -200,7 +188,7 @@ const tt = {
|
|
|
200
188
|
chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
|
|
201
189
|
icon: "database",
|
|
202
190
|
get name() {
|
|
203
|
-
return c("connect.campaign.common.typeName.GAME");
|
|
191
|
+
return c.global.t("connect.campaign.common.typeName.GAME");
|
|
204
192
|
},
|
|
205
193
|
chip() {
|
|
206
194
|
return i(this);
|
|
@@ -210,7 +198,7 @@ const tt = {
|
|
|
210
198
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
211
199
|
icon: "editor_choice",
|
|
212
200
|
get name() {
|
|
213
|
-
return c("connect.campaign.common.typeName.REWARD_POOL");
|
|
201
|
+
return c.global.t("connect.campaign.common.typeName.REWARD_POOL");
|
|
214
202
|
},
|
|
215
203
|
chip() {
|
|
216
204
|
return i(this);
|
|
@@ -220,7 +208,7 @@ const tt = {
|
|
|
220
208
|
chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
|
|
221
209
|
icon: "monetization_on",
|
|
222
210
|
get name() {
|
|
223
|
-
return c("connect.campaign.common.typeName.COIN");
|
|
211
|
+
return c.global.t("connect.campaign.common.typeName.COIN");
|
|
224
212
|
},
|
|
225
213
|
chip() {
|
|
226
214
|
return i(this);
|
|
@@ -230,120 +218,106 @@ const tt = {
|
|
|
230
218
|
chipClass: "",
|
|
231
219
|
icon: "",
|
|
232
220
|
get name() {
|
|
233
|
-
return c("connect.campaign.common.typeName.MEMBERSHIP");
|
|
221
|
+
return c.global.t("connect.campaign.common.typeName.MEMBERSHIP");
|
|
234
222
|
},
|
|
235
223
|
chip() {
|
|
236
224
|
return i(this);
|
|
237
225
|
}
|
|
238
226
|
},
|
|
227
|
+
// TODO: confirm color
|
|
239
228
|
[s.enum.MISSION]: {
|
|
240
229
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
241
230
|
icon: "editor_choice",
|
|
242
231
|
get name() {
|
|
243
|
-
return c("connect.campaign.common.typeName.MISSION");
|
|
232
|
+
return c.global.t("connect.campaign.common.typeName.MISSION");
|
|
244
233
|
},
|
|
245
234
|
chip() {
|
|
246
235
|
return i(this);
|
|
247
236
|
}
|
|
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
|
-
}
|
|
256
237
|
}
|
|
257
238
|
};
|
|
258
|
-
function
|
|
259
|
-
const e =
|
|
239
|
+
function Q(t) {
|
|
240
|
+
const e = P(t), n = {
|
|
260
241
|
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
261
242
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
262
243
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
263
244
|
};
|
|
264
|
-
return t.type == "VOUCHER" ?
|
|
245
|
+
return t.type == "VOUCHER" ? l(f.FmChip, {
|
|
265
246
|
class: n[e],
|
|
266
|
-
label:
|
|
247
|
+
label: d.title(
|
|
248
|
+
c.global.t(`connect.campaign.common.status.${e}`)
|
|
249
|
+
),
|
|
267
250
|
compact: !0
|
|
268
|
-
}) :
|
|
251
|
+
}) : l(f.FmChip, {
|
|
269
252
|
class: n[e],
|
|
270
|
-
label:
|
|
253
|
+
label: d.title(
|
|
254
|
+
c.global.t(`connect.campaign.common.status.${e}`)
|
|
255
|
+
),
|
|
271
256
|
compact: !0
|
|
272
257
|
});
|
|
273
258
|
}
|
|
274
|
-
function
|
|
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) {
|
|
259
|
+
function S(t) {
|
|
286
260
|
if (!t || !t.start && !t.end)
|
|
287
261
|
return "connect.campaign.common.always";
|
|
288
262
|
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";
|
|
289
263
|
return `${e} - ${n}`;
|
|
290
264
|
}
|
|
291
|
-
function
|
|
265
|
+
function Z(t) {
|
|
292
266
|
const { campaign: e } = t;
|
|
293
267
|
return {
|
|
294
268
|
"connect.campaign.common.campaign_name": e.name,
|
|
295
|
-
"connect.campaign.common.campaign_period":
|
|
269
|
+
"connect.campaign.common.campaign_period": S(
|
|
296
270
|
e.timeframeOptions
|
|
297
271
|
),
|
|
298
272
|
get "connect.campaign.common.next_schedule_at"() {
|
|
299
|
-
if (
|
|
273
|
+
if (e.event.type != "SCHEDULE" || !e.event.rule || !b(e.event.rule))
|
|
300
274
|
return;
|
|
301
|
-
const n =
|
|
275
|
+
const n = O(
|
|
302
276
|
e.event.rule.rules.g_schedule
|
|
303
277
|
);
|
|
304
278
|
return n ? u(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
305
279
|
},
|
|
306
280
|
get "connect.campaign.common.discount_type"() {
|
|
307
|
-
if (e.type == "PROMOTION") return
|
|
281
|
+
if (e.type == "PROMOTION") return p(e.effect);
|
|
308
282
|
if ("configs" in t && t.configs.type == "VOUCHER")
|
|
309
|
-
return
|
|
283
|
+
return p(t.configs.extras.effect);
|
|
310
284
|
},
|
|
311
285
|
get "connect.campaign.broadcast.summary.delivery"() {
|
|
312
286
|
if (e.type != "BROADCAST") return;
|
|
313
|
-
const n =
|
|
287
|
+
const n = g(e);
|
|
314
288
|
if (!(n.channels.length < 2))
|
|
315
289
|
return `connect.campaign.broadcast.mode.${n.mode}.label`;
|
|
316
290
|
},
|
|
317
291
|
get "connect.campaign.broadcast.summary.channels"() {
|
|
318
292
|
var n;
|
|
319
293
|
if (e.type == "BROADCAST")
|
|
320
|
-
return ((n =
|
|
294
|
+
return ((n = A(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
|
|
321
295
|
},
|
|
322
296
|
get "connect.campaign.common.available_at"() {
|
|
323
297
|
return e.targetLocation ? e.targetLocation.length > 0 ? e.targetLocation.map(
|
|
324
|
-
(n) =>
|
|
298
|
+
(n) => E().locationItems.find((o) => o.value == n).label
|
|
325
299
|
).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
|
|
326
300
|
}
|
|
327
301
|
};
|
|
328
302
|
}
|
|
329
|
-
function
|
|
303
|
+
function P(t) {
|
|
330
304
|
return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? u().isBetween(
|
|
331
305
|
t.timeframeOptions.start ?? u().subtract(1, "d"),
|
|
332
306
|
t.timeframeOptions.end ?? u().add(1, "d")
|
|
333
307
|
) ? "active" : u().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
334
308
|
}
|
|
335
|
-
function
|
|
336
|
-
const e =
|
|
309
|
+
function A(t) {
|
|
310
|
+
const e = g(t);
|
|
337
311
|
if (!e.channels.length) return null;
|
|
338
|
-
const o =
|
|
312
|
+
const o = R(e, (a) => c.global.t(`connect.campaign.broadcast.channel.${a}`));
|
|
339
313
|
return {
|
|
340
|
-
strategy: e.channels.length > 1 ?
|
|
314
|
+
strategy: e.channels.length > 1 ? c.global.t(
|
|
341
315
|
`connect.campaign.broadcast.strategy.${e.mode}`
|
|
342
316
|
) : null,
|
|
343
317
|
route: o
|
|
344
318
|
};
|
|
345
319
|
}
|
|
346
|
-
function
|
|
320
|
+
function tt(t) {
|
|
347
321
|
var e, n;
|
|
348
322
|
switch (t.event.type) {
|
|
349
323
|
case "BILL_COMPLETED":
|
|
@@ -355,7 +329,7 @@ function at(t) {
|
|
|
355
329
|
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)}`;
|
|
356
330
|
case "VOUCHER":
|
|
357
331
|
const a = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
|
|
358
|
-
return a ? `${o} - ${
|
|
332
|
+
return a ? `${o} - ${p(a)}` : o;
|
|
359
333
|
default:
|
|
360
334
|
return o;
|
|
361
335
|
}
|
|
@@ -370,7 +344,7 @@ function at(t) {
|
|
|
370
344
|
case "MEMBERSHIP_JOINED":
|
|
371
345
|
return `Receive ${m.formattedType(t.type)} when member joined`;
|
|
372
346
|
case "MAKING_ORDER":
|
|
373
|
-
return t.type !== "PROMOTION" ? void 0 :
|
|
347
|
+
return t.type !== "PROMOTION" ? void 0 : p(t.effect);
|
|
374
348
|
default:
|
|
375
349
|
throw new Error(
|
|
376
350
|
`Not implemented ${JSON.stringify({ cause: t.event.type })}`
|
|
@@ -378,23 +352,22 @@ function at(t) {
|
|
|
378
352
|
}
|
|
379
353
|
}
|
|
380
354
|
export {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
P as s
|
|
355
|
+
q as C,
|
|
356
|
+
Q as a,
|
|
357
|
+
tt as b,
|
|
358
|
+
A as c,
|
|
359
|
+
N as d,
|
|
360
|
+
J as e,
|
|
361
|
+
W as f,
|
|
362
|
+
P as g,
|
|
363
|
+
k as h,
|
|
364
|
+
F as i,
|
|
365
|
+
z as j,
|
|
366
|
+
X as k,
|
|
367
|
+
j as l,
|
|
368
|
+
V as m,
|
|
369
|
+
Z as n,
|
|
370
|
+
K as o,
|
|
371
|
+
G as r,
|
|
372
|
+
S as s
|
|
400
373
|
};
|
|
@@ -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 d } from "pinia";
|
|
2
|
+
import { reactive as f, onMounted as b, ref as a } from "vue";
|
|
3
|
+
import { c } from "./index-BkKu2G2c.js";
|
|
4
|
+
import { g as i, S as I, b as g } from "./index-iVbjwKxc.js";
|
|
5
5
|
const p = () => {
|
|
6
|
-
const e =
|
|
6
|
+
const e = I.getBusinessId();
|
|
7
7
|
if (!e) throw new Error("Invalid business ID");
|
|
8
|
-
return
|
|
8
|
+
return g(`businesses/${e}/campaigns`, {
|
|
9
9
|
noIdRequired: !0
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, h = {
|
|
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
|
+
}, S = d("mf-connect-campaign", () => {
|
|
21
|
+
const e = f({
|
|
22
22
|
promotion: [],
|
|
23
23
|
voucher: [],
|
|
24
24
|
broadcast: [],
|
|
@@ -27,13 +27,12 @@ const p = () => {
|
|
|
27
27
|
credit: [],
|
|
28
28
|
token: [],
|
|
29
29
|
mission: [],
|
|
30
|
-
grab: [],
|
|
31
30
|
all: []
|
|
32
31
|
});
|
|
33
|
-
|
|
32
|
+
b(() => {
|
|
34
33
|
console.log("🔧 CampaignStore Installed");
|
|
35
34
|
});
|
|
36
|
-
const t =
|
|
35
|
+
const t = a([]), r = a([]), n = a([]);
|
|
37
36
|
async function u(k) {
|
|
38
37
|
const o = await c.readAll({
|
|
39
38
|
limit: 1e3,
|
|
@@ -41,47 +40,42 @@ const p = () => {
|
|
|
41
40
|
sortBy: "_id",
|
|
42
41
|
descending: !0
|
|
43
42
|
});
|
|
44
|
-
Object.keys(e).forEach((
|
|
45
|
-
e[
|
|
46
|
-
}), e.all = o.resources.filter(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
for (const a of o.resources)
|
|
50
|
-
switch (a.type) {
|
|
43
|
+
Object.keys(e).forEach((s) => {
|
|
44
|
+
e[s] = [];
|
|
45
|
+
}), e.all = o.resources.filter((s) => s.type !== "MEMBERSHIP");
|
|
46
|
+
for (const s of o.resources)
|
|
47
|
+
switch (s.type) {
|
|
51
48
|
case "PROMOTION":
|
|
52
|
-
e.promotion.push(
|
|
49
|
+
e.promotion.push(s);
|
|
53
50
|
break;
|
|
54
51
|
case "VOUCHER":
|
|
55
|
-
e.voucher.push(
|
|
52
|
+
e.voucher.push(s), n.value.push(s);
|
|
56
53
|
break;
|
|
57
54
|
case "BROADCAST":
|
|
58
|
-
["SCHEDULE", "FEEDBACK"].includes(
|
|
55
|
+
["SCHEDULE", "FEEDBACK"].includes(s.event.type) && e.broadcast.push(s);
|
|
59
56
|
break;
|
|
60
57
|
case "POINT":
|
|
61
|
-
e.experience.push(
|
|
58
|
+
e.experience.push(s);
|
|
62
59
|
break;
|
|
63
60
|
case "COIN":
|
|
64
|
-
e.point.push(
|
|
61
|
+
e.point.push(s);
|
|
65
62
|
break;
|
|
66
63
|
case "CREDIT":
|
|
67
|
-
e.credit.push(
|
|
64
|
+
e.credit.push(s);
|
|
68
65
|
break;
|
|
69
66
|
case "GAME":
|
|
70
|
-
e.token.push(
|
|
67
|
+
e.token.push(s);
|
|
71
68
|
break;
|
|
72
69
|
case "MISSION":
|
|
73
|
-
e.mission.push(
|
|
74
|
-
break;
|
|
75
|
-
case "GRAB":
|
|
76
|
-
e.grab.push(a);
|
|
70
|
+
e.mission.push(s);
|
|
77
71
|
break;
|
|
78
72
|
}
|
|
79
73
|
}
|
|
80
74
|
async function l() {
|
|
81
75
|
r.value = await c.readGroups();
|
|
82
76
|
}
|
|
83
|
-
async function
|
|
84
|
-
t.value = await
|
|
77
|
+
async function m() {
|
|
78
|
+
t.value = await h.readAll();
|
|
85
79
|
}
|
|
86
80
|
return {
|
|
87
81
|
// State
|
|
@@ -92,9 +86,9 @@ const p = () => {
|
|
|
92
86
|
// Actions
|
|
93
87
|
read: u,
|
|
94
88
|
readGroups: l,
|
|
95
|
-
readTemplates:
|
|
89
|
+
readTemplates: m
|
|
96
90
|
};
|
|
97
91
|
});
|
|
98
92
|
export {
|
|
99
|
-
|
|
93
|
+
S as u
|
|
100
94
|
};
|