@feedmepos/mf-connect 0.1.98-beta.60 → 0.1.98-beta.61
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-BUwQLdzG.js → App-BPFhGsvV.js} +8 -8
- package/dist/{AuditLogs-laNQB1ef.js → AuditLogs-CW8vs5kM.js} +11 -11
- package/dist/{Bin-Bfboeea_.js → Bin-CgdkmL0M.js} +8 -8
- package/dist/Broadcast-CoRRvfXh.js +302 -0
- package/dist/{CampaignAnalytic-BiA-5XG3.js → CampaignAnalytic-UAwVz0E3.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VrTN-c_a.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_IbtQLp.js} +6 -6
- package/dist/{Card-CKHaW8N7.js → Card-D3-MgguK.js} +21 -21
- package/dist/{Collections-DRocQb1D.js → Collections-BU7-Lz_-.js} +8 -8
- package/dist/{Credit-DWaoVhSP.js → Credit-C9gf6eCr.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B7ZdULCu.js → DateRangeChip.vue_vue_type_script_setup_true_lang-UK9GcPFC.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-3ERieT1j.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B9A98JpX.js} +1830 -996
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-yDUjXV2O.js → EffectSheet.vue_vue_type_style_index_0_lang-nKD6CT3U.js} +6 -6
- package/dist/{Experience-C1_LpneJ.js → Experience-dKvKT4v4.js} +12 -12
- package/dist/{FileSaver.min-CWJ-6CFP.js → FileSaver.min-CI8hZvUL.js} +1 -1
- package/dist/{Game-DtTYcSZk.js → Game-CBjdeb6F.js} +13 -13
- package/dist/{GiftCardSetup-B770Rl1Q.js → GiftCardSetup-DA9yMwPR.js} +9 -9
- package/dist/{Grab-CN0gmIxT.js → Grab-zCeZMSNI.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BaAhKWhX.js → ImageInput.vue_vue_type_script_setup_true_lang-CxhlYuM9.js} +1 -1
- package/dist/{Index-0F6aq3f9.js → Index-UGpjUfjV.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BrKj8W2H.js → LocationPicker.vue_vue_type_script_setup_true_lang-D21fIVUX.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DOuHSVdR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DrB7xzy1.js} +1 -1
- package/dist/{LoyaltyDashboard-CtXyDFqa.js → LoyaltyDashboard-CBPnQReU.js} +13 -13
- package/dist/{MainLayout-BSWLr3gE.js → MainLayout-BBJUWsAz.js} +3 -3
- package/dist/{Marketing-Ci2haxRd.js → Marketing-BjQG6Q41.js} +4 -4
- package/dist/{MarketingMaterialEdit-Cw6R0bNM.js → MarketingMaterialEdit-CMUbiKjd.js} +6 -6
- package/dist/{Member-DEzSTAQy.js → Member-B-7tGoFW.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BrhSxbrI.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BLmafK0n.js} +23 -23
- package/dist/{MemberImportHistory-BGfNLzma.js → MemberImportHistory-CDyHKO1L.js} +7 -7
- package/dist/{MemberList-Cq5Gsv3G.js → MemberList-f0dMdOF8.js} +14 -14
- package/dist/{MemberTransactions-BrUVZRtt.js → MemberTransactions-DVcRoyxv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DCQ6Fse-.js → MessageInput.vue_vue_type_script_setup_true_lang-CnpXUVvO.js} +4333 -4285
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CETwYfZD.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BTBXutpq.js} +1 -1
- package/dist/{Mission-Do4IonLo.js → Mission-CrrXaD8F.js} +13 -13
- package/dist/{Overview-DA90l9Kb.js → Overview-CAIxshHU.js} +19 -19
- package/dist/{Overview-DN-nJxw9.js → Overview-Y_hxLN7Y.js} +4 -4
- package/dist/{Point-DQ4w857n.js → Point-CE0G4oxW.js} +12 -12
- package/dist/{Promotion-Rgt9LcYi.js → Promotion-C_NQWWOT.js} +13 -13
- package/dist/{Queue-SzypUxgD.js → Queue-BfZGOOsa.js} +11 -11
- package/dist/{Record-DYvPPhIW.js → Record-BR3Su26B.js} +9 -9
- package/dist/{Review-B0TERyHM.js → Review-FrIgV7vH.js} +2 -2
- package/dist/{ReviewFacebookCallback-BJ5jQ3Dv.js → ReviewFacebookCallback-DOyee73-.js} +5 -5
- package/dist/{ReviewGoogleCallback-BKQD39dv.js → ReviewGoogleCallback-CX0cbT4r.js} +5 -5
- package/dist/{Reward-BexlVT_C.js → Reward-COkgkVT-.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C-ygqNur.js → RewardGroup.vue_vue_type_script_setup_true_lang-CUd-Gy5a.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DjxIJcdv.js → RuleGroup.vue_vue_type_script_setup_true_lang-eBVDv0Qy.js} +13 -13
- package/dist/{Segment-CYa4GjtQ.js → Segment-kh3FuWRP.js} +24 -24
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-b-K-VDJC.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUoiQlba.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-t2mlDDtn.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BkylJ859.js} +4 -4
- package/dist/{Setting-Dmm5BKdF.js → Setting-UDrEIdF9.js} +14 -14
- package/dist/{SettingAdvertisements-cy4cRBop.js → SettingAdvertisements-Dic4fC0u.js} +12 -12
- package/dist/{Settings-DMQuLDM4.js → Settings-Ct_ESMn8.js} +5 -5
- package/dist/{Store-B7KflfSk.js → Store-CyG1FPWq.js} +25 -25
- package/dist/{StoreRewards-BKae8uZn.js → StoreRewards-C9b_rMRT.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-sbIR-k1R.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DaGFayps.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DRT3N9SD.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dew6rC4d.js} +2 -2
- package/dist/{Tier-BeTz6LHH.js → Tier-DgLEHrFJ.js} +24 -24
- package/dist/{Title-OEVVw5I-.js → Title-C_8gMnYS.js} +21 -21
- package/dist/{Transaction-D-MZjntW.js → Transaction-B9E0jWw9.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-xIEOUOdo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DgW4dSkV.js} +6 -6
- package/dist/{Voucher-BJCf3pSa.js → Voucher-DR3Eteh4.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BFQ_CYub.js → VoucherEditor.vue_vue_type_script_setup_true_lang-JexB74ky.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DGDw3Too.js → ZodTextField.vue_vue_type_script_setup_true_lang-ChOd_di8.js} +2 -2
- package/dist/{app-J8VIC7-H.js → app-BIjITpNJ.js} +4755 -4225
- package/dist/app.js +1 -1
- package/dist/{base.export-HYFFI4OS.js → base.export-DqZ38Nx2.js} +2 -2
- package/dist/{business-BonuheMK.js → business-j4ZuiLuJ.js} +1 -1
- package/dist/{campaign-Ct7jhugP.js → campaign-DxhXoOvw.js} +2 -2
- package/dist/campaign-MS9awZ18.js +368 -0
- package/dist/{campaign.enum-OzJ9IbAW.js → campaign.enum-Bk6qcWR3.js} +1 -1
- package/dist/{campaign.fn-CDjxE9B2.js → campaign.fn-DR_X38U8.js} +161 -161
- package/dist/{collectible.enum-Dw_tlI9E.js → collectible.enum-C_E4CCGR.js} +1 -1
- package/dist/{collection.fn-CER0_NEn.js → collection.fn-BfyWr7cC.js} +2 -2
- package/dist/{currency-CTUS4vS8.js → currency-DZzC-632.js} +1 -1
- package/dist/{duplicateCampaign-CMQ-RMH-.js → duplicateCampaign-BgTmR0T2.js} +2 -2
- package/dist/{effect-DBeGoMNE.js → effect-DPCjkqDR.js} +1 -1
- package/dist/{email-addresses-BH3mQzan.js → email-addresses-BoPJkP5p.js} +2 -2
- package/dist/{helper-DJe_JbKJ.js → helper-DwJK1iKj.js} +1 -1
- package/dist/{index-BZKKS7jO.js → index-8vHynDvo.js} +5 -5
- package/dist/{index-CM9GTQIo.js → index-Bd4ErVnX.js} +3 -3
- package/dist/{index-BzVTqlVH.js → index-BkFxLxI6.js} +2 -2
- package/dist/{index-Bnk3vdb-.js → index-BvxBDSzh.js} +7 -7
- package/dist/{index-bJX4zgh0.js → index-C5Jm1Was.js} +1 -1
- package/dist/{index-D9f3AIaO.js → index-CIuQyo1z.js} +3 -3
- package/dist/{index-bGByr1XM.js → index-CMJCsyXT.js} +1 -1
- package/dist/index-CTo26AN3.js +14530 -0
- package/dist/{index-COuceEFz.js → index-CVMsPseO.js} +1 -1
- package/dist/{index-B14H1rLW.js → index-CXbojcfi.js} +2 -2
- package/dist/{index-CN8VyVEB.js → index-Cso1GrEu.js} +1 -1
- package/dist/{index-BRCB6yJ6.js → index-DD24eHtV.js} +299 -196
- package/dist/{index-BmN_Qcw7.js → index-DGOX45St.js} +2 -2
- package/dist/{index-CrMBqkKk.js → index-DP6WMBRq.js} +101 -98
- package/dist/{index-BOVnM3gL.js → index-DfwXt9fy.js} +3 -3
- package/dist/{index-CEDhjZzd.js → index-Dn2mOB0A.js} +1 -1
- package/dist/{index-BlwAgY_z.js → index-LJrZDUgh.js} +1 -1
- package/dist/{index-CWR2s6Nt.js → index-a15EaBn7.js} +1 -1
- package/dist/{index.esm2017-BpCPgTjc.js → index.esm2017-CWii-ZqX.js} +37 -37
- package/dist/{loading-D_rPJ-Yc.js → loading-CibOtJVR.js} +1 -1
- package/dist/{lodash-BM976Z2I.js → lodash-oHoQ9t6u.js} +1 -1
- package/dist/{member-import-C5rhD3f8.js → member-import-BgJP811X.js} +1 -1
- package/dist/{membership-CIQCEKiL.js → membership-CqFY6ya6.js} +3 -3
- package/dist/{money-BrMT193t.js → money-tVvfE8ha.js} +1 -1
- package/dist/{number-DOcD1tqL.js → number-B4p37H0W.js} +1 -1
- package/dist/{objectid-CAdRRoFu.js → objectid-reVda6sT.js} +6 -6
- package/dist/{plugins-696Z9K6A.js → plugins-S4qmcyLz.js} +13 -12
- package/dist/{reward-lSVIBiE9.js → reward-CgHNw9uj.js} +1 -1
- package/dist/{rule-BUGAimk8.js → rule-BECsW_aD.js} +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-01_h2Gac.js → template-jOqP_F7D.js} +6 -6
- package/dist/{timezone-okTdM2YU.js → timezone-BBXko2_m.js} +1 -1
- package/dist/{transaction.fn-Nz0T33ex.js → transaction.fn-3DOFgJNT.js} +1 -1
- package/dist/{trigger-CKj1X6zs.js → trigger-DBIaHlqi.js} +5 -5
- package/dist/{useMarketingMaterialActions-yKqKaPpe.js → useMarketingMaterialActions-Dnln39_O.js} +3 -3
- package/dist/{usePagination-D6cYlfni.js → usePagination-BKN2uLM2.js} +1 -1
- package/dist/{user-DX5qCQfz.js → user-CTKTBdLx.js} +1 -1
- package/dist/{vue-i18n-DowpocqN.js → vue-i18n-Di-6yoyq.js} +275 -275
- package/dist/{xlsx-Dv4SuJbw.js → xlsx-Z1jRdg68.js} +584 -584
- package/dist/{zod-DVw24Ejy.js → zod-BmQ5EO9I.js} +1 -1
- package/package.json +1 -1
- package/dist/Broadcast-CDz-_eDz.js +0 -269
- package/dist/campaign-7CI7gfS5.js +0 -255
- package/dist/index-Do36kJeb.js +0 -51
package/package.json
CHANGED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as C, computed as q, onMounted as z, resolveComponent as m, openBlock as d, createElementBlock as h, Fragment as v, createVNode as i, unref as a, createElementVNode as n, withCtx as x, renderList as G, createBlock as S, resolveDynamicComponent as J, toDisplayString as u, createCommentVNode as Q, h as k } from "vue";
|
|
2
|
-
import { _ as W } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as X, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Y } from "./plugins-696Z9K6A.js";
|
|
5
|
-
import { u as Z } from "./loading-D_rPJ-Yc.js";
|
|
6
|
-
import { u as ee } from "./business-BonuheMK.js";
|
|
7
|
-
import { u as te } from "./campaign-Ct7jhugP.js";
|
|
8
|
-
import { b as V, c as R, a as ae } from "./campaign-7CI7gfS5.js";
|
|
9
|
-
import { c as oe, p as ne } from "./duplicateCampaign-CMQ-RMH-.js";
|
|
10
|
-
import { u as se } from "./vue-i18n-DowpocqN.js";
|
|
11
|
-
import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
12
|
-
import { _ as ie } from "./MessageInput.vue_vue_type_script_setup_true_lang-DCQ6Fse-.js";
|
|
13
|
-
import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-3ERieT1j.js";
|
|
14
|
-
import { u as le } from "./template-01_h2Gac.js";
|
|
15
|
-
import { c as f } from "./index-BmN_Qcw7.js";
|
|
16
|
-
const me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex items-center gap-8" }, be = { key: 0 }, Ce = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, ve = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, Se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ H({
|
|
17
|
-
__name: "Broadcast",
|
|
18
|
-
setup(ke) {
|
|
19
|
-
const { t: s } = se(), O = {
|
|
20
|
-
label: s("connect.campaign.common.createCampaign"),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, T = le("BROADCAST", X()), I = ee(), p = te(), { global: K, minor: F } = Z, B = C((/* @__PURE__ */ new Date()).toISOString()), r = C({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: []
|
|
27
|
-
});
|
|
28
|
-
function P(e) {
|
|
29
|
-
const t = r.value.location;
|
|
30
|
-
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
31
|
-
var c;
|
|
32
|
-
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
-
}) : e.targetLocation.includes(t);
|
|
34
|
-
}
|
|
35
|
-
const g = q(
|
|
36
|
-
() => p.campaigns.broadcast.filter((e) => P(e))
|
|
37
|
-
), $ = [
|
|
38
|
-
{
|
|
39
|
-
header: "Broadcast title",
|
|
40
|
-
accessorFn: (e) => e.name
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
header: "Status",
|
|
44
|
-
accessorFn: (e) => ae(e),
|
|
45
|
-
cell(e) {
|
|
46
|
-
return V(e.row.original);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
header: "Summary",
|
|
51
|
-
accessorFn: (e) => R(e)
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
header: "Message sent",
|
|
55
|
-
accessorFn: (e) => e.currentReceive ?? "N/A"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
header: "Actions",
|
|
59
|
-
cell(e) {
|
|
60
|
-
return k("div", { class: "flex items-center gap-8 justify-end" }, [
|
|
61
|
-
k(L.FmButton, {
|
|
62
|
-
variant: "tertiary",
|
|
63
|
-
icon: "content_copy",
|
|
64
|
-
iconColor: "neutral-gray-400",
|
|
65
|
-
onClick: async (t) => {
|
|
66
|
-
t.stopPropagation(), await D(e.row.original);
|
|
67
|
-
}
|
|
68
|
-
}),
|
|
69
|
-
k(L.FmButton, {
|
|
70
|
-
variant: "tertiary",
|
|
71
|
-
icon: "delete",
|
|
72
|
-
iconColor: "neutral-gray-400",
|
|
73
|
-
onClick: (t) => {
|
|
74
|
-
t.stopPropagation(), A(e.row.original);
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
]);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
], w = C();
|
|
81
|
-
async function A(e) {
|
|
82
|
-
await Y.remove(
|
|
83
|
-
s("connect.campaign.common.remove.confirm", { name: e.name })
|
|
84
|
-
) && await F(
|
|
85
|
-
async () => {
|
|
86
|
-
await f.delete(e._id), await p.read("BROADCAST");
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
message: s("connect.campaign.common.remove.removing", { name: e.name }),
|
|
90
|
-
successMessage: s("connect.campaign.common.remove.removed", {
|
|
91
|
-
name: e.name
|
|
92
|
-
})
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
async function y(e) {
|
|
97
|
-
B.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await t() : T.open(async (l) => {
|
|
98
|
-
await t(l);
|
|
99
|
-
});
|
|
100
|
-
async function t(l) {
|
|
101
|
-
var c;
|
|
102
|
-
(c = w.value) == null || c.showSheet(
|
|
103
|
-
!0,
|
|
104
|
-
"BROADCAST",
|
|
105
|
-
e ? await f.readById(e._id) : void 0,
|
|
106
|
-
l
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
async function D(e) {
|
|
111
|
-
var c;
|
|
112
|
-
if (!await oe(e.name))
|
|
113
|
-
return;
|
|
114
|
-
B.value = (/* @__PURE__ */ new Date()).toISOString();
|
|
115
|
-
const t = await f.readById(e._id), l = ne(t);
|
|
116
|
-
(c = w.value) == null || c.showSheet(
|
|
117
|
-
!0,
|
|
118
|
-
"BROADCAST",
|
|
119
|
-
l,
|
|
120
|
-
t.template
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
async function j(e) {
|
|
124
|
-
await F(
|
|
125
|
-
async () => {
|
|
126
|
-
e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("BROADCAST");
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
message: s(
|
|
130
|
-
`connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
|
|
131
|
-
),
|
|
132
|
-
successMessage: s("connect.campaign.broadcast.update.success", {
|
|
133
|
-
action: e.campaign._id ? "updated" : "created"
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
return z(async () => {
|
|
139
|
-
await K(async () => {
|
|
140
|
-
await p.read("BROADCAST");
|
|
141
|
-
});
|
|
142
|
-
}), (e, t) => {
|
|
143
|
-
const l = m("FmPageHead"), c = m("FmSearch"), M = m("FmTable"), b = m("FmButton"), N = m("FmListItem"), U = m("FmList"), E = m("FmCard");
|
|
144
|
-
return d(), h(v, null, [
|
|
145
|
-
i(l, {
|
|
146
|
-
title: a(s)("connect.campaign.broadcast.title"),
|
|
147
|
-
actions: a(g).length > 0 ? [O] : [],
|
|
148
|
-
"onClick:action": t[0] || (t[0] = () => y())
|
|
149
|
-
}, null, 8, ["title", "actions"]),
|
|
150
|
-
n("div", me, [
|
|
151
|
-
i(ie),
|
|
152
|
-
i(c, {
|
|
153
|
-
modelValue: a(r).searchKey,
|
|
154
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => a(r).searchKey = o),
|
|
155
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
156
|
-
placeholder: a(s)("connect.campaign.common.search"),
|
|
157
|
-
collapsible: ""
|
|
158
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
159
|
-
a(p).campaigns.broadcast && a(p).campaigns.broadcast.length > 0 ? (d(), h(v, { key: 0 }, [
|
|
160
|
-
n("div", de, [
|
|
161
|
-
n("div", pe, [
|
|
162
|
-
i(ce, {
|
|
163
|
-
label: `${a(s)("connect.campaign.common.location")}: `,
|
|
164
|
-
"right-icon": "keyboard_arrow_down",
|
|
165
|
-
modelValue: a(r).location,
|
|
166
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => a(r).location = o),
|
|
167
|
-
icon: "storefront",
|
|
168
|
-
"show-item-label": !0,
|
|
169
|
-
items: a(I).locationOptions
|
|
170
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
171
|
-
]),
|
|
172
|
-
i(c, {
|
|
173
|
-
modelValue: a(r).searchKey,
|
|
174
|
-
"onUpdate:modelValue": t[3] || (t[3] = (o) => a(r).searchKey = o),
|
|
175
|
-
class: "xs:hidden sm:hidden",
|
|
176
|
-
placeholder: "search",
|
|
177
|
-
collapsible: ""
|
|
178
|
-
}, null, 8, ["modelValue"])
|
|
179
|
-
]),
|
|
180
|
-
i(M, {
|
|
181
|
-
class: "xs:hidden sm:hidden",
|
|
182
|
-
"row-data": a(g),
|
|
183
|
-
"column-defs": $,
|
|
184
|
-
"search-value": a(r).searchKey,
|
|
185
|
-
"column-filter": [],
|
|
186
|
-
onRowClick: t[4] || (t[4] = (o) => y(o.original)),
|
|
187
|
-
"hide-footer": !0
|
|
188
|
-
}, null, 8, ["row-data", "search-value"]),
|
|
189
|
-
i(U, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
190
|
-
default: x(() => [
|
|
191
|
-
(d(!0), h(v, null, G(a(g).filter(
|
|
192
|
-
(o) => o.name.toLowerCase().includes(a(r).searchKey.toLowerCase())
|
|
193
|
-
), (o) => (d(), S(N, {
|
|
194
|
-
key: o._id.toString(),
|
|
195
|
-
onClick: (_) => y(o),
|
|
196
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
197
|
-
}, {
|
|
198
|
-
default: x(() => [
|
|
199
|
-
n("div", ue, [
|
|
200
|
-
n("div", fe, [
|
|
201
|
-
(d(), S(J(a(V)(o)))),
|
|
202
|
-
n("div", ge, u(o.currentReceive ?? 0) + " sent ", 1)
|
|
203
|
-
]),
|
|
204
|
-
n("div", ye, [
|
|
205
|
-
n("div", _e, u(o.name), 1),
|
|
206
|
-
n("div", he, u(a(R)(o)), 1)
|
|
207
|
-
])
|
|
208
|
-
]),
|
|
209
|
-
n("div", we, [
|
|
210
|
-
i(b, {
|
|
211
|
-
icon: "content_copy",
|
|
212
|
-
"icon-color": "neutral-gray-400",
|
|
213
|
-
variant: "tertiary",
|
|
214
|
-
onClick: async (_) => {
|
|
215
|
-
_.stopPropagation(), await D(o);
|
|
216
|
-
}
|
|
217
|
-
}, null, 8, ["onClick"]),
|
|
218
|
-
i(b, {
|
|
219
|
-
icon: "delete",
|
|
220
|
-
"icon-color": "neutral-gray-400",
|
|
221
|
-
variant: "tertiary",
|
|
222
|
-
onClick: (_) => (_.stopPropagation(), A(o))
|
|
223
|
-
}, null, 8, ["onClick"])
|
|
224
|
-
])
|
|
225
|
-
]),
|
|
226
|
-
_: 2
|
|
227
|
-
}, 1032, ["onClick"]))), 128))
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
}),
|
|
231
|
-
a(g).length == 0 ? (d(), h("div", be, [
|
|
232
|
-
n("div", Ce, u(a(s)("connect.campaign.common.noResults")), 1)
|
|
233
|
-
])) : Q("", !0)
|
|
234
|
-
], 64)) : (d(), S(E, {
|
|
235
|
-
key: 1,
|
|
236
|
-
variant: "outlined",
|
|
237
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
238
|
-
}, {
|
|
239
|
-
default: x(() => [
|
|
240
|
-
t[6] || (t[6] = n("img", {
|
|
241
|
-
src: W,
|
|
242
|
-
class: "aspect-square w-[150px]"
|
|
243
|
-
}, null, -1)),
|
|
244
|
-
n("div", ve, [
|
|
245
|
-
n("div", xe, u(a(s)("connect.campaign.broadcast.create.title")), 1),
|
|
246
|
-
n("div", Se, u(a(s)("connect.campaign.broadcast.create.description")), 1)
|
|
247
|
-
]),
|
|
248
|
-
i(b, {
|
|
249
|
-
variant: "primary",
|
|
250
|
-
label: a(s)("connect.campaign.broadcast.create.button"),
|
|
251
|
-
icon: "add",
|
|
252
|
-
onClick: t[5] || (t[5] = (o) => y())
|
|
253
|
-
}, null, 8, ["label"])
|
|
254
|
-
]),
|
|
255
|
-
_: 1
|
|
256
|
-
})),
|
|
257
|
-
i(re, {
|
|
258
|
-
ref_key: "sheetRef",
|
|
259
|
-
ref: w,
|
|
260
|
-
"onSubmit:modelValue": j
|
|
261
|
-
}, null, 512)
|
|
262
|
-
])
|
|
263
|
-
], 64);
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
export {
|
|
268
|
-
Ne as default
|
|
269
|
-
};
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { h as i } from "./moment-D7p2TMB-.js";
|
|
2
|
-
import "./index-CrMBqkKk.js";
|
|
3
|
-
import { e as p } from "./effect-DBeGoMNE.js";
|
|
4
|
-
import { components as f } from "@feedmepos/ui-library";
|
|
5
|
-
import { a as y } from "./index-BRCB6yJ6.js";
|
|
6
|
-
import { c as h } from "./rule-BUGAimk8.js";
|
|
7
|
-
import { u as O } from "./business-BonuheMK.js";
|
|
8
|
-
import { C as m } from "./campaign.fn-CDjxE9B2.js";
|
|
9
|
-
import { c as g } from "./string-Gcy5IM_H.js";
|
|
10
|
-
import { i as d } from "./plugins-696Z9K6A.js";
|
|
11
|
-
import { h as s } from "vue";
|
|
12
|
-
import { F as a } from "./campaign.enum-OzJ9IbAW.js";
|
|
13
|
-
const n = d.global.t;
|
|
14
|
-
function C() {
|
|
15
|
-
const e = d.global.locale;
|
|
16
|
-
return typeof e == "string" ? e : e.value;
|
|
17
|
-
}
|
|
18
|
-
function u(e) {
|
|
19
|
-
return new Intl.DateTimeFormat(C(), {
|
|
20
|
-
day: "2-digit",
|
|
21
|
-
month: "short",
|
|
22
|
-
year: "numeric"
|
|
23
|
-
}).format(new Date(e));
|
|
24
|
-
}
|
|
25
|
-
function c(e) {
|
|
26
|
-
return s(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
class: `${e.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
|
|
30
|
-
},
|
|
31
|
-
[
|
|
32
|
-
s(f.FmIcon, { size: "sm", name: e.icon, outline: !0 }),
|
|
33
|
-
s("span", { class: "fm-typo-en-body-md-600" }, e.name)
|
|
34
|
-
]
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
const P = {
|
|
38
|
-
[a.enum.CREDIT]: {
|
|
39
|
-
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
40
|
-
icon: "local_activity",
|
|
41
|
-
get name() {
|
|
42
|
-
return n("connect.campaign.common.typeName.CREDIT");
|
|
43
|
-
},
|
|
44
|
-
chip() {
|
|
45
|
-
return c(this);
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
[a.enum.PROMOTION]: {
|
|
49
|
-
chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
|
|
50
|
-
icon: "loyalty",
|
|
51
|
-
get name() {
|
|
52
|
-
return n("connect.campaign.common.typeName.PROMOTION");
|
|
53
|
-
},
|
|
54
|
-
chip() {
|
|
55
|
-
return c(this);
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
[a.enum.VOUCHER]: {
|
|
59
|
-
chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
|
|
60
|
-
icon: "sell",
|
|
61
|
-
get name() {
|
|
62
|
-
return n("connect.campaign.common.typeName.VOUCHER");
|
|
63
|
-
},
|
|
64
|
-
chip() {
|
|
65
|
-
return c(this);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
[a.enum.POINT]: {
|
|
69
|
-
chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
|
|
70
|
-
icon: "award_star",
|
|
71
|
-
get name() {
|
|
72
|
-
return n("connect.campaign.common.typeName.POINT");
|
|
73
|
-
},
|
|
74
|
-
chip() {
|
|
75
|
-
return c(this);
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
[a.enum.BROADCAST]: {
|
|
79
|
-
chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
80
|
-
icon: "campaign",
|
|
81
|
-
get name() {
|
|
82
|
-
return n("connect.campaign.common.typeName.BROADCAST");
|
|
83
|
-
},
|
|
84
|
-
chip() {
|
|
85
|
-
return c(this);
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
[a.enum.GAME]: {
|
|
89
|
-
chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
|
|
90
|
-
icon: "database",
|
|
91
|
-
get name() {
|
|
92
|
-
return n("connect.campaign.common.typeName.GAME");
|
|
93
|
-
},
|
|
94
|
-
chip() {
|
|
95
|
-
return c(this);
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
[a.enum.REWARD_POOL]: {
|
|
99
|
-
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
100
|
-
icon: "editor_choice",
|
|
101
|
-
get name() {
|
|
102
|
-
return n("connect.campaign.common.typeName.REWARD_POOL");
|
|
103
|
-
},
|
|
104
|
-
chip() {
|
|
105
|
-
return c(this);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
[a.enum.COIN]: {
|
|
109
|
-
chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
|
|
110
|
-
icon: "monetization_on",
|
|
111
|
-
get name() {
|
|
112
|
-
return n("connect.campaign.common.typeName.COIN");
|
|
113
|
-
},
|
|
114
|
-
chip() {
|
|
115
|
-
return c(this);
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
[a.enum.MEMBERSHIP]: {
|
|
119
|
-
chipClass: "",
|
|
120
|
-
icon: "",
|
|
121
|
-
get name() {
|
|
122
|
-
return n("connect.campaign.common.typeName.MEMBERSHIP");
|
|
123
|
-
},
|
|
124
|
-
chip() {
|
|
125
|
-
return c(this);
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
[a.enum.MISSION]: {
|
|
129
|
-
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
130
|
-
icon: "editor_choice",
|
|
131
|
-
get name() {
|
|
132
|
-
return n("connect.campaign.common.typeName.MISSION");
|
|
133
|
-
},
|
|
134
|
-
chip() {
|
|
135
|
-
return c(this);
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
[a.enum.GRAB]: {
|
|
139
|
-
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
140
|
-
icon: "editor_choice",
|
|
141
|
-
name: "Grab",
|
|
142
|
-
chip() {
|
|
143
|
-
return c(this);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
function L(e) {
|
|
148
|
-
const t = b(e), o = {
|
|
149
|
-
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
150
|
-
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
151
|
-
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
152
|
-
};
|
|
153
|
-
return e.type == "VOUCHER" ? s(f.FmChip, {
|
|
154
|
-
class: o[t],
|
|
155
|
-
label: g.title(n(`connect.campaign.common.status.${t}`)),
|
|
156
|
-
compact: !0
|
|
157
|
-
}) : s(f.FmChip, {
|
|
158
|
-
class: o[t],
|
|
159
|
-
label: g.title(n(`connect.campaign.common.status.${t}`)),
|
|
160
|
-
compact: !0
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
function w(e) {
|
|
164
|
-
const t = e.timeframeOptions;
|
|
165
|
-
if (!t || !t.start && !t.end)
|
|
166
|
-
return n("connect.campaign.common.always_active");
|
|
167
|
-
if (!t.start && t.end)
|
|
168
|
-
return n("connect.campaign.common.valid_until", {
|
|
169
|
-
date: u(t.end)
|
|
170
|
-
});
|
|
171
|
-
const o = u(t.start), r = t.end ? u(t.end) : n("connect.campaign.common.unlimited");
|
|
172
|
-
return `${o} -> ${r}`;
|
|
173
|
-
}
|
|
174
|
-
function E(e) {
|
|
175
|
-
if (!e || !e.start && !e.end)
|
|
176
|
-
return "connect.campaign.common.always";
|
|
177
|
-
const t = e.start ? i(e.start).format("DD MMM YYYY") : "From campaign creation", o = e.end ? i(e.end).format("DD MMM YYYY") : "Never ends";
|
|
178
|
-
return `${t} - ${o}`;
|
|
179
|
-
}
|
|
180
|
-
function Y(e) {
|
|
181
|
-
const { campaign: t } = e;
|
|
182
|
-
return {
|
|
183
|
-
"connect.campaign.common.campaign_name": t.name,
|
|
184
|
-
"connect.campaign.common.campaign_period": E(
|
|
185
|
-
t.timeframeOptions
|
|
186
|
-
),
|
|
187
|
-
get "connect.campaign.common.next_schedule_at"() {
|
|
188
|
-
if ((t == null ? void 0 : t.event.type) != "SCHEDULE" || !t.event.rule || !y(t.event.rule))
|
|
189
|
-
return;
|
|
190
|
-
const o = h(
|
|
191
|
-
t.event.rule.rules.g_schedule
|
|
192
|
-
);
|
|
193
|
-
return o ? i(o).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
194
|
-
},
|
|
195
|
-
get "connect.campaign.common.discount_type"() {
|
|
196
|
-
if (t.type == "PROMOTION") return p(t.effect);
|
|
197
|
-
if ("configs" in e && e.configs.type == "VOUCHER")
|
|
198
|
-
return p(e.configs.extras.effect);
|
|
199
|
-
},
|
|
200
|
-
get "connect.campaign.common.available_at"() {
|
|
201
|
-
return t.targetLocation ? t.targetLocation.length > 0 ? t.targetLocation.map(
|
|
202
|
-
(o) => O().locationItems.find((r) => r.value == o).label
|
|
203
|
-
).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
function b(e) {
|
|
208
|
-
return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ? i().isBetween(
|
|
209
|
-
e.timeframeOptions.start ?? i().subtract(1, "d"),
|
|
210
|
-
e.timeframeOptions.end ?? i().add(1, "d")
|
|
211
|
-
) ? "active" : i().isAfter(e.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
212
|
-
}
|
|
213
|
-
function B(e) {
|
|
214
|
-
var t, o;
|
|
215
|
-
switch (e.event.type) {
|
|
216
|
-
case "BILL_COMPLETED":
|
|
217
|
-
const r = `Spend to get ${m.formattedType(e.type)}`;
|
|
218
|
-
switch (e.type) {
|
|
219
|
-
case "POINT":
|
|
220
|
-
case "CREDIT":
|
|
221
|
-
case "COIN":
|
|
222
|
-
return e.earningOption.type == "FIXED" ? `Spend to get ${e.earningOption.amount} ${m.formattedType(e.type)}` : `Every ${e.earningOption.every} amount spent get ${e.earningOption.amount} ${m.formattedType(e.type)}`;
|
|
223
|
-
case "VOUCHER":
|
|
224
|
-
const l = (o = (t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.extras) == null ? void 0 : o.effect;
|
|
225
|
-
return l ? `${r} - ${p(l)}` : r;
|
|
226
|
-
default:
|
|
227
|
-
return r;
|
|
228
|
-
}
|
|
229
|
-
case "FEEDBACK":
|
|
230
|
-
return `Give feedback to receive ${m.formattedType(e.type)}`;
|
|
231
|
-
case "SCHEDULE":
|
|
232
|
-
return `Receive ${m.formattedType(e.type)} on scheduled time`;
|
|
233
|
-
case "SIMPLE_CLAIM":
|
|
234
|
-
return "Simple claim voucher";
|
|
235
|
-
case "TIER_UPGRADED":
|
|
236
|
-
return `Receive ${m.formattedType(e.type)} when member tier upgraded`;
|
|
237
|
-
case "MEMBERSHIP_JOINED":
|
|
238
|
-
return `Receive ${m.formattedType(e.type)} when member joined`;
|
|
239
|
-
case "MAKING_ORDER":
|
|
240
|
-
return e.type !== "PROMOTION" ? void 0 : p(e.effect);
|
|
241
|
-
default:
|
|
242
|
-
throw new Error(
|
|
243
|
-
`Not implemented ${JSON.stringify({ cause: e.event.type })}`
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
export {
|
|
248
|
-
P as C,
|
|
249
|
-
b as a,
|
|
250
|
-
L as b,
|
|
251
|
-
B as c,
|
|
252
|
-
Y as d,
|
|
253
|
-
w as g,
|
|
254
|
-
E as s
|
|
255
|
-
};
|
package/dist/index-Do36kJeb.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z as e } from "./index-D9f3AIaO.js";
|
|
2
|
-
const u = e.enum(["SMS", "WHATSAPP", "EMAIL"]), c = e.object({
|
|
3
|
-
amount: e.number(),
|
|
4
|
-
precision: e.number().int().nonnegative(),
|
|
5
|
-
currency: e.string()
|
|
6
|
-
}), b = e.object({
|
|
7
|
-
balance: e.object({
|
|
8
|
-
amount: e.number(),
|
|
9
|
-
currency: e.string()
|
|
10
|
-
}),
|
|
11
|
-
prices: e.object({
|
|
12
|
-
SMS: c,
|
|
13
|
-
WHATSAPP: c,
|
|
14
|
-
EMAIL: c
|
|
15
|
-
})
|
|
16
|
-
}), m = e.object({
|
|
17
|
-
SMS: e.boolean(),
|
|
18
|
-
WHATSAPP: e.boolean(),
|
|
19
|
-
EMAIL: e.boolean()
|
|
20
|
-
}), A = e.object({
|
|
21
|
-
channel: u,
|
|
22
|
-
variables: e.array(e.string()),
|
|
23
|
-
title: e.string().nullish(),
|
|
24
|
-
design: e.any(),
|
|
25
|
-
content: e.string(),
|
|
26
|
-
language: e.string(),
|
|
27
|
-
imageUrl: e.string().nullish()
|
|
28
|
-
}).superRefine((t, a) => {
|
|
29
|
-
t.content.length == 0 && a.addIssue({
|
|
30
|
-
code: e.ZodIssueCode.custom,
|
|
31
|
-
message: "Content is required"
|
|
32
|
-
});
|
|
33
|
-
const o = /{{(.*?)}}/g, r = [...t.content.matchAll(o)].map((n) => n[1]), i = t.variables, s = r.filter((n) => i.indexOf(n) < 0);
|
|
34
|
-
s.length && a.addIssue({
|
|
35
|
-
code: e.ZodIssueCode.custom,
|
|
36
|
-
message: "Invalid variable(s): " + s.join(", ")
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
function S(t, a) {
|
|
40
|
-
return t.replace(/{{(.*?)}}/g, (o, r) => {
|
|
41
|
-
const s = r.trim().split(".").reduce((n, l) => (n != null ? n[l] : null) ?? null, a);
|
|
42
|
-
return s !== null ? s : o;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
b as F,
|
|
47
|
-
m as a,
|
|
48
|
-
u as b,
|
|
49
|
-
A as c,
|
|
50
|
-
S as r
|
|
51
|
-
};
|