@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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/README.md +1 -66
- package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
- package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
- package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
- package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
- package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
- package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
- package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
- package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
- package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
- package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
- package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
- package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
- package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
- package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
- package/dist/Marketing-BKK45Eve.js +236 -0
- package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
- package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
- package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
- package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
- package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
- package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
- package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
- package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
- package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
- package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
- package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
- package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
- package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
- package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
- package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
- package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
- package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
- package/dist/Setting-BnFRI0Se.js +2037 -0
- package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
- package/dist/Settings-BvT8_tkQ.js +179 -0
- package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
- package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
- package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
- package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
- package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
- package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
- package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
- package/dist/app.js +3 -4
- package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
- package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
- package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
- package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
- package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
- package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
- package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
- package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
- package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
- package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
- package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
- package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
- package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
- package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
- package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
- package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
- package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
- package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
- package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
- package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
- package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
- package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
- package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
- package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
- package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
- package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
- package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
- package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
- package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
- package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
- package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
- package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
- package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
- package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
- package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
- package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
- package/dist/objectid-DEMM_jdR.js +145 -0
- package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
- package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
- package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
- package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
- package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
- package/dist/rule-builder-Deufb6h_.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DeebIqJ_.js +236 -0
- package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
- package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
- package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
- package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
- package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
- package/dist/vue-i18n-Cze706-f.js +2365 -0
- package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
- package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BPpdm96t.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
- package/dist/Grab-BWzdN_cd.js +0 -301
- package/dist/MainLayout-DwnjGXh6.js +0 -4
- package/dist/Marketing-DCco__2F.js +0 -273
- package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
- package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
- package/dist/Setting-CDM4RhLW.js +0 -574
- package/dist/Settings-D-0tvZRr.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
- package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
- package/dist/WhatsappBot-Cl64wG_F.js +0 -876
- package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
- package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
- package/dist/WhatsappLayout-C639d2HP.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
- package/dist/browser-BSAOEeIM.js +0 -1478
- package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
- package/dist/feature-flag-Bo-k5sIG.js +0 -50
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/index-C-iwb2Ln.js +0 -109
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-DQ8JJhxs.js +0 -74
- package/dist/objectid-C-wocWKI.js +0 -145
- package/dist/template-BZyFhr73.js +0 -188
- package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
- package/dist/vue-i18n-DWGiC_vs.js +0 -2365
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { p as B, i as w } from "./plugins-DQNOWwRC.js";
|
|
2
|
+
import { _ as O } from "./lodash-Dvrceo7x.js";
|
|
3
|
+
import { defineComponent as I, openBlock as d, createBlock as b, resolveDynamicComponent as $, unref as o, ref as z, computed as M, onMounted as Y, resolveComponent as f, withCtx as _, createElementVNode as s, createElementBlock as D, createVNode as r, normalizeClass as T, createTextVNode as F, toDisplayString as g, Fragment as R, renderList as L, createCommentVNode as j } from "vue";
|
|
4
|
+
import { u as W } from "./campaign-BTllt2LH.js";
|
|
5
|
+
import { useDialog as q } from "@feedmepos/ui-library";
|
|
6
|
+
import { F as G } from "./index-BW6eb3n6.js";
|
|
7
|
+
import { C as H } from "./campaign-C19If7bW.js";
|
|
8
|
+
import { J } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
+
import { u as U } from "./vue-i18n-Cze706-f.js";
|
|
10
|
+
import { u as K } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js";
|
|
11
|
+
function Se(e) {
|
|
12
|
+
return B.confirm(
|
|
13
|
+
w.global.t("connect.common.duplicate.confirmMessage", { name: e }),
|
|
14
|
+
w.global.t("connect.common.duplicate.title"),
|
|
15
|
+
w.global.t("connect.common.duplicate.proceed")
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const Q = ["LOYALTY", "NO_REWARD"], X = {
|
|
19
|
+
GAME: [(e) => {
|
|
20
|
+
var t;
|
|
21
|
+
return (t = e == null ? void 0 : e.game) == null ? void 0 : t.rewards;
|
|
22
|
+
}],
|
|
23
|
+
MISSION: [
|
|
24
|
+
(e) => e == null ? void 0 : e.rewards,
|
|
25
|
+
(e) => {
|
|
26
|
+
var t;
|
|
27
|
+
return (t = e == null ? void 0 : e.mission) == null ? void 0 : t.rewards;
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
REWARD_POOL: [(e) => e == null ? void 0 : e.rewards]
|
|
31
|
+
};
|
|
32
|
+
function Z(e, t) {
|
|
33
|
+
e && e.forEach((n) => {
|
|
34
|
+
t.includes(n.type ?? "") || (n.collectible = null, n.type === "VOUCHER" && n.collectibleConfig && (n.collectibleConfig._id = void 0));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function ee(e) {
|
|
38
|
+
e._id = void 0;
|
|
39
|
+
}
|
|
40
|
+
function te(e, t) {
|
|
41
|
+
e.campaign && (e.campaign._id = void 0, e.campaign.currentReceive = void 0, e.campaign.notifyCampaign = void 0, t || (e.campaign.collectible = void 0));
|
|
42
|
+
}
|
|
43
|
+
function oe(e, t) {
|
|
44
|
+
e.configs && (e.configs.currentReceive = void 0, t || (e.configs._id = void 0));
|
|
45
|
+
}
|
|
46
|
+
function ne(e) {
|
|
47
|
+
const t = X[(e == null ? void 0 : e.type) ?? ""];
|
|
48
|
+
t && t.forEach((n) => {
|
|
49
|
+
Z(n(e), Q);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function Fe(e, t = {}) {
|
|
53
|
+
const n = O.cloneDeep(e), { keepCollectible: c = !1 } = t, p = n.campaign;
|
|
54
|
+
return ee(n), te(n, c), oe(n, c), ne(p), n;
|
|
55
|
+
}
|
|
56
|
+
const le = /* @__PURE__ */ I({
|
|
57
|
+
__name: "CampaignChip",
|
|
58
|
+
props: {
|
|
59
|
+
type: { type: String, required: !0 }
|
|
60
|
+
},
|
|
61
|
+
setup(e) {
|
|
62
|
+
const n = H[e.type];
|
|
63
|
+
return (c, p) => (d(), b($(o(n).chip())));
|
|
64
|
+
}
|
|
65
|
+
}), ie = { class: "flex flex-nowrap gap-x-2 grow h-full" }, se = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "p-8 w-1/4"
|
|
68
|
+
}, ce = { class: "flex flex-col grow p-24" }, ae = { class: "space-y-4" }, re = { class: "fm-typo-en-title-sm-800" }, pe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, me = { class: "grow pb-16 pr-16 pt-6 w-full max-h-[400px] overflow-y-auto" }, de = { class: "gap-24 grid grid-cols-1 lg:grid-cols-2" }, ue = { class: "gap-4 h-[22px] inline-flex items-center justify-center min-w-min rounded-md" }, fe = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ge = { class: "flex gap-4 items-end justify-end py-8" }, ye = /* @__PURE__ */ I({
|
|
69
|
+
__name: "TemplateDialog",
|
|
70
|
+
props: {
|
|
71
|
+
campaignType: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: () => {
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
onOk: {
|
|
77
|
+
type: Function,
|
|
78
|
+
required: !0
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
setup(e) {
|
|
82
|
+
const { t } = U(), { getLocaleText: n } = K(), c = q(), p = W(), m = e, i = z({
|
|
83
|
+
intention: null,
|
|
84
|
+
template: null
|
|
85
|
+
}), k = M(() => {
|
|
86
|
+
const u = (p.templates ?? []).filter(
|
|
87
|
+
() => !0
|
|
88
|
+
//t.intention && t.intention.length > 0
|
|
89
|
+
);
|
|
90
|
+
return m.campaignType ? u.filter(
|
|
91
|
+
(a) => {
|
|
92
|
+
var C, y;
|
|
93
|
+
return ((y = (C = a.defaultValue) == null ? void 0 : C.campaign) == null ? void 0 : y.type) === m.campaignType;
|
|
94
|
+
}
|
|
95
|
+
) : i.value.intention === null ? O.sampleSize(u, 7) : u.filter(
|
|
96
|
+
(a) => a.intention.includes(i.value.intention)
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
Y(async () => {
|
|
100
|
+
await p.readTemplates();
|
|
101
|
+
});
|
|
102
|
+
function A() {
|
|
103
|
+
m.onOk(void 0), c.close();
|
|
104
|
+
}
|
|
105
|
+
function N() {
|
|
106
|
+
const u = i.value.template;
|
|
107
|
+
m.onOk(p.templates.find((a) => a._id === u)), c.close();
|
|
108
|
+
}
|
|
109
|
+
return (u, a) => {
|
|
110
|
+
const C = f("FmChip"), y = f("FmListItem"), P = f("FmList"), E = f("FmCard"), x = f("FmButton"), V = f("FmSpacer");
|
|
111
|
+
return d(), b(E, { class: "h-[534px] max-w-6xl" }, {
|
|
112
|
+
default: _(() => [
|
|
113
|
+
s("div", ie, [
|
|
114
|
+
m.campaignType ? j("", !0) : (d(), D("div", se, [
|
|
115
|
+
r(P, null, {
|
|
116
|
+
default: _(() => [
|
|
117
|
+
r(y, {
|
|
118
|
+
class: T([{
|
|
119
|
+
"bg-fm-color-system-warning-100": o(i).intention === null
|
|
120
|
+
}, "rounded-sm"]),
|
|
121
|
+
onClick: a[0] || (a[0] = (l) => {
|
|
122
|
+
o(i).intention = null, o(i).template = null;
|
|
123
|
+
})
|
|
124
|
+
}, {
|
|
125
|
+
append: _(() => [
|
|
126
|
+
r(C, {
|
|
127
|
+
label: o(t)("connect.templateDialog.hot"),
|
|
128
|
+
variant: "critical"
|
|
129
|
+
}, null, 8, ["label"])
|
|
130
|
+
]),
|
|
131
|
+
default: _(() => [
|
|
132
|
+
F(g(o(t)("connect.templateDialog.mostPopular")) + " ", 1)
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["class"]),
|
|
136
|
+
(d(!0), D(R, null, L(o(G).options, (l, h) => (d(), b(y, {
|
|
137
|
+
key: h,
|
|
138
|
+
class: T(["rounded-sm", {
|
|
139
|
+
"bg-fm-color-system-warning-100": o(i).intention === l
|
|
140
|
+
}]),
|
|
141
|
+
style: { padding: "8px 16px" },
|
|
142
|
+
onClick: (v) => {
|
|
143
|
+
o(i).intention = l, o(i).template = null;
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
default: _(() => [
|
|
147
|
+
F(g(o(t)(`connect.templateDialog.intention.${l}`)), 1)
|
|
148
|
+
]),
|
|
149
|
+
_: 2
|
|
150
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
})
|
|
154
|
+
])),
|
|
155
|
+
s("div", ce, [
|
|
156
|
+
s("div", ae, [
|
|
157
|
+
s("div", re, g(m.campaignType ? o(t)(`connect.templateDialog.campaignType.${m.campaignType}`) : o(t)("connect.templateDialog.templateList")), 1),
|
|
158
|
+
s("div", pe, g(o(t)("connect.templateDialog.subtitle")), 1)
|
|
159
|
+
]),
|
|
160
|
+
s("div", me, [
|
|
161
|
+
r(J, { json: o(k) }, null, 8, ["json"]),
|
|
162
|
+
s("div", de, [
|
|
163
|
+
(d(!0), D(R, null, L(o(k), (l, h) => (d(), b(E, {
|
|
164
|
+
key: h,
|
|
165
|
+
variant: "outlined",
|
|
166
|
+
class: T(["box-border cursor-pointer h-full p-16 scroll-p-4 space-y-8", {
|
|
167
|
+
"bg-fm-color-system-warning-100 border-fm-color-primary border-2": o(i).template === l._id.toString()
|
|
168
|
+
}]),
|
|
169
|
+
onClick: (v) => o(i).template = l._id.toString()
|
|
170
|
+
}, {
|
|
171
|
+
default: _(() => {
|
|
172
|
+
var v, S;
|
|
173
|
+
return [
|
|
174
|
+
s("div", ue, [
|
|
175
|
+
r(le, {
|
|
176
|
+
type: (S = (v = l.defaultValue) == null ? void 0 : v.campaign) == null ? void 0 : S.type
|
|
177
|
+
}, null, 8, ["type"])
|
|
178
|
+
]),
|
|
179
|
+
s("div", fe, g(o(n)(l.name_locale, l.name)), 1),
|
|
180
|
+
s("p", _e, g(o(n)(l.description_locale, l.description ?? "")), 1)
|
|
181
|
+
];
|
|
182
|
+
}),
|
|
183
|
+
_: 2
|
|
184
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
185
|
+
])
|
|
186
|
+
]),
|
|
187
|
+
s("div", ge, [
|
|
188
|
+
r(x, {
|
|
189
|
+
class: "sm:w-full xs:w-full",
|
|
190
|
+
variant: "plain",
|
|
191
|
+
label: o(t)("connect.templateDialog.customCampaign"),
|
|
192
|
+
size: "md",
|
|
193
|
+
onClick: A
|
|
194
|
+
}, null, 8, ["label"]),
|
|
195
|
+
r(V, { class: "sm:hidden xs:hidden" }),
|
|
196
|
+
r(x, {
|
|
197
|
+
class: "sm:w-full xs:w-full",
|
|
198
|
+
variant: "tertiary",
|
|
199
|
+
label: o(t)("connect.templateDialog.cancel"),
|
|
200
|
+
size: "md",
|
|
201
|
+
onClick: a[1] || (a[1] = (l) => o(c).close())
|
|
202
|
+
}, null, 8, ["label"]),
|
|
203
|
+
r(x, {
|
|
204
|
+
class: "sm:w-full xs:w-full",
|
|
205
|
+
variant: "primary",
|
|
206
|
+
label: o(t)("connect.templateDialog.start"),
|
|
207
|
+
size: "md",
|
|
208
|
+
disabled: !o(i).template,
|
|
209
|
+
onClick: N
|
|
210
|
+
}, null, 8, ["label", "disabled"])
|
|
211
|
+
])
|
|
212
|
+
])
|
|
213
|
+
])
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
});
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
}), Re = (e, t) => ({
|
|
220
|
+
open: async (n) => {
|
|
221
|
+
t.open({
|
|
222
|
+
title: "",
|
|
223
|
+
dialogComponent: ye,
|
|
224
|
+
dialogComponentProps: {
|
|
225
|
+
campaignType: e,
|
|
226
|
+
onOk: async (c) => (console.debug(c, "selected template"), await n(c))
|
|
227
|
+
},
|
|
228
|
+
overlay: !0
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
export {
|
|
233
|
+
Se as c,
|
|
234
|
+
Fe as p,
|
|
235
|
+
Re as u
|
|
236
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { s as u } from "./index-
|
|
1
|
+
import "./index-IZRfmmde.js";
|
|
2
|
+
import { s as u } from "./index-BquSqx6K.js";
|
|
3
3
|
function i(l) {
|
|
4
4
|
var c, f;
|
|
5
5
|
const e = (c = l.metadata) == null ? void 0 : c.operator, t = typeof e == "string" ? e : [e == null ? void 0 : e.name, e == null ? void 0 : e.phoneNumber, e == null ? void 0 : e.email].filter(Boolean).join(" / ") || (e == null ? void 0 : e.uid);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as m, openBlock as u, createBlock as p, unref as r } from "vue";
|
|
2
|
-
import "./index-
|
|
3
|
-
import { R as i } from "./
|
|
4
|
-
import {
|
|
5
|
-
import { c as e, C as d } from "./index-
|
|
6
|
-
import { i as n } from "./plugins-
|
|
2
|
+
import "./index-CPODug8b.js";
|
|
3
|
+
import { R as i } from "./rule-builder-Deufb6h_.js";
|
|
4
|
+
import { _ as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js";
|
|
5
|
+
import { c as e, C as d } from "./index-CqOCJTeR.js";
|
|
6
|
+
import { i as n } from "./plugins-DQNOWwRC.js";
|
|
7
7
|
const L = /* @__PURE__ */ m({
|
|
8
8
|
__name: "BillRuleGroup",
|
|
9
9
|
props: {
|
|
@@ -62,7 +62,7 @@ const L = /* @__PURE__ */ m({
|
|
|
62
62
|
}, null, 8, ["model-value"]);
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), _ = {
|
|
66
66
|
[e.enum.BILL_COMPLETED]: {
|
|
67
67
|
get name() {
|
|
68
68
|
return n.global.t(
|
|
@@ -201,13 +201,13 @@ const L = /* @__PURE__ */ m({
|
|
|
201
201
|
const o = d[t];
|
|
202
202
|
return [
|
|
203
203
|
t,
|
|
204
|
-
(o == null ? void 0 : o.map((a) =>
|
|
204
|
+
(o == null ? void 0 : o.map((a) => _[a]).filter((a) => !a.hidden)) ?? []
|
|
205
205
|
];
|
|
206
206
|
})
|
|
207
207
|
);
|
|
208
208
|
export {
|
|
209
209
|
C as T,
|
|
210
210
|
L as _,
|
|
211
|
-
|
|
211
|
+
_ as a,
|
|
212
212
|
O as b
|
|
213
213
|
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { S as o, g as c, b } from "./index-xct3mnu8.js";
|
|
2
|
+
import { u as w } from "./vue-i18n-Cze706-f.js";
|
|
3
|
+
import { useSnackbar as h } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as k } from "./plugins-DQNOWwRC.js";
|
|
5
|
+
const l = (e) => b(`businesses/${e}/marketing-materials`), D = {
|
|
6
|
+
async createMarketingMaterial(e) {
|
|
7
|
+
const a = o.getBusinessId();
|
|
8
|
+
if (!a) throw new Error("Invalid business ID");
|
|
9
|
+
return c(
|
|
10
|
+
await l(a).post("", e)
|
|
11
|
+
);
|
|
12
|
+
},
|
|
13
|
+
async getMarketingMaterial(e) {
|
|
14
|
+
const a = o.getBusinessId();
|
|
15
|
+
if (!a) throw new Error("Invalid business ID");
|
|
16
|
+
return c(
|
|
17
|
+
await l(a).get(`/${e}`)
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
async listMarketingMaterials(e = null, a = 20) {
|
|
21
|
+
const s = o.getBusinessId();
|
|
22
|
+
if (!s) throw new Error("Invalid business ID");
|
|
23
|
+
return c(
|
|
24
|
+
await l(s).get("", {
|
|
25
|
+
params: { ...e ? { cursor: e } : {}, limit: a }
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
async updateMarketingMaterial(e, a) {
|
|
30
|
+
const s = o.getBusinessId();
|
|
31
|
+
if (!s) throw new Error("Invalid business ID");
|
|
32
|
+
return c(
|
|
33
|
+
await l(s).patch(`/${e}`, a)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function E() {
|
|
38
|
+
const { t: e } = w(), a = h();
|
|
39
|
+
async function s(n) {
|
|
40
|
+
if (!(n != null && n.imageUrl)) return;
|
|
41
|
+
const { headline: i, caption: g, imageUrl: r } = n;
|
|
42
|
+
if (!navigator.share) {
|
|
43
|
+
a.open({
|
|
44
|
+
message: e("connect.marketing.actions.webShareNotSupported"),
|
|
45
|
+
type: "error"
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const t = {
|
|
51
|
+
title: i ?? void 0,
|
|
52
|
+
text: g ?? void 0
|
|
53
|
+
};
|
|
54
|
+
if (navigator.canShare)
|
|
55
|
+
try {
|
|
56
|
+
const d = await (await fetch(r, { mode: "cors", cache: "no-store" })).blob(), f = [new File([d], "marketing-material.jpg", {
|
|
57
|
+
type: d.type || "image/jpeg"
|
|
58
|
+
})];
|
|
59
|
+
navigator.canShare({ files: f }) ? t.files = f : t.url = r;
|
|
60
|
+
} catch (u) {
|
|
61
|
+
console.error("Failed to fetch image for sharing:", u), t.url = r;
|
|
62
|
+
}
|
|
63
|
+
else
|
|
64
|
+
t.url = r;
|
|
65
|
+
await navigator.share(t);
|
|
66
|
+
} catch (t) {
|
|
67
|
+
t.name !== "AbortError" && a.open({
|
|
68
|
+
message: e("connect.marketing.actions.failedToShare", { message: t.message }),
|
|
69
|
+
type: "error"
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async function p(n) {
|
|
74
|
+
if (n)
|
|
75
|
+
try {
|
|
76
|
+
const g = await (await fetch(n, { mode: "cors", cache: "no-store" })).blob(), r = URL.createObjectURL(g), t = document.createElement("a");
|
|
77
|
+
t.href = r, t.download = "marketing-material", t.click(), URL.revokeObjectURL(r);
|
|
78
|
+
} catch (i) {
|
|
79
|
+
console.error("Failed to download image:", i), window.open(n, "_blank");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function m(n) {
|
|
83
|
+
n && await k(n, {
|
|
84
|
+
successMessage: e("connect.marketing.actions.imageLinkCopied")
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
shareMaterial: s,
|
|
89
|
+
downloadMaterialImage: p,
|
|
90
|
+
copyMaterialLink: m
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
D as m,
|
|
95
|
+
E as u
|
|
96
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as P, computed as v, ref as w, onMounted as $, watch as M, resolveComponent as D, openBlock as u, createElementBlock as p, createVNode as r, unref as n, createElementVNode as s, createCommentVNode as N, toDisplayString as b } from "vue";
|
|
2
2
|
import { _ as S } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
|
|
3
|
-
import { l as E } from "./lodash-
|
|
3
|
+
import { l as E } from "./lodash-Dvrceo7x.js";
|
|
4
4
|
const R = { class: "" }, A = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "w-full flex flex-col gap-16 items-center py-16"
|