@feedmepos/mf-connect 0.1.116-dev → 0.1.117-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-DWDgsBqW.js → App-CAo1izHr.js} +618 -652
- package/dist/{Bin-Cz6fmewG.js → Bin-DDDfjisJ.js} +8 -8
- package/dist/{Broadcast-CQ0pfKpx.js → Broadcast-BsCulZhE.js} +21 -22
- package/dist/{CampaignAnalytic-CiRCB3kh.js → CampaignAnalytic-CnVYFSkT.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZTHyZ_0y.js} +9 -9
- package/dist/{Card-Kw2PFL2m.js → Card-DPyQH9qZ.js} +24 -25
- package/dist/{Collections-D8Vx_EEH.js → Collections-CZCVA969.js} +185 -197
- package/dist/{Credit-B1jsQ5zg.js → Credit-BTg364-i.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BJx8K6Ja.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ijya9Cho.js +3494 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js → EffectSheet.vue_vue_type_style_index_0_lang-CfEnSXzg.js} +32 -32
- package/dist/{Experience-B0JIA3sL.js → Experience-Bk_eUcSX.js} +31 -32
- package/dist/{FileSaver.min-M-9kTN8q.js → FileSaver.min-CXFiZAp7.js} +1 -1
- package/dist/{Game-CNJyqnK3.js → Game-CBnKpFdl.js} +18 -19
- package/dist/{GiftCardSetup-DSQIC7fD.js → GiftCardSetup-q75wNV_F.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Cga0Th2O.js} +7 -7
- package/dist/{Goals-DBPzGIRK.js → Goals-Bbbgurfd.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js → ImageInput.vue_vue_type_script_setup_true_lang-CZS05h1r.js} +1 -1
- package/dist/{Index-CiWyZXnK.js → Index-C8_OWllb.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js → LocationPicker.vue_vue_type_script_setup_true_lang-BlCg-jI7.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CACxChIo.js} +1 -1
- package/dist/{LoyaltyDashboard-C4ZlK9Hv.js → LoyaltyDashboard-DJlE0371.js} +15 -15
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js → MainLayout-Bs2UPvFx.js} +4 -5
- package/dist/Marketing-BvRYzFV8.js +236 -0
- package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-o88sdvTM.js} +1031 -2
- package/dist/{Member-B-l5P9jk.js → Member-C4yqwsMH.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbumjyC_.js} +50 -43
- package/dist/{MemberImportHistory-BJcu-ahG.js → MemberImportHistory-CbuXCdxC.js} +7 -7
- package/dist/{MemberList-DVsWNWIc.js → MemberList-CpAepPBe.js} +105 -103
- package/dist/{MemberTransactions-C2VPySEO.js → MemberTransactions-BbpXvsSk.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js → MessageInput.vue_vue_type_script_setup_true_lang-BaWgxbad.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CEgMElLo.js} +1 -1
- package/dist/{Mission-DWO-IF0f.js → Mission-Bdb9KVeP.js} +21 -22
- package/dist/{Overview-DPcWm2S0.js → Overview-CEiyGMcf.js} +22 -23
- package/dist/{Overview-Dbp4Sv-H.js → Overview-D_9JwnFU.js} +144 -145
- package/dist/{Point-PnWrzVOY.js → Point-Bd5cMXQx.js} +21 -22
- package/dist/{Promotion-Bwpi60dN.js → Promotion-D9gZDvgR.js} +131 -137
- package/dist/{Queue-BvEcKyVJ.js → Queue-BnAOL_rp.js} +45 -46
- package/dist/{Record-DzNvU2fM.js → Record-D6TWFKe0.js} +9 -9
- package/dist/{Review-HDYwnMd6.js → Review-DLEgvnc-.js} +2 -2
- package/dist/ReviewFacebookCallback-jVlm2O8f.js +238 -0
- package/dist/{ReviewGoogleCallback-6V9JNKsl.js → ReviewGoogleCallback-BgAbO3pI.js} +5 -5
- package/dist/{Reward-DI6IyG-d.js → Reward-DBheQiFu.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt-EqsiH.js} +15 -16
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CKL8MEld.js +1883 -0
- package/dist/{Segment-DrV6pQyx.js → Segment-B9Se5FFw.js} +305 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-f7AS5vwv.js} +30 -31
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-3BKA0UFI.js} +4 -4
- package/dist/Setting-B92JT_Y4.js +2037 -0
- package/dist/{SettingAdvertisements-BtqKt4Ca.js → SettingAdvertisements-CLw-dqiA.js} +12 -12
- package/dist/Settings-BmmM8ZnR.js +179 -0
- package/dist/{Store-HZs9GG03.js → Store-B5PPP5zM.js} +30 -31
- package/dist/{StoreRewards-BSTXL4FR.js → StoreRewards-DllyaVBY.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3Vvqf6_H.js +1264 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-7ZZ0e5tQ.js +142 -0
- package/dist/{Tier-Ka0rbjC_.js → Tier-M_TApfju.js} +687 -2576
- package/dist/{Title-7jvrf34J.js → Title-Cpltm-I2.js} +92 -94
- package/dist/{Transaction-D-M3udf5.js → Transaction-BYfAYRpv.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOhfGxVj.js} +26 -26
- package/dist/{Voucher-BZCLPyDk.js → Voucher-DHoyg0YZ.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DWHwM6AJ.js} +16 -16
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6tTjLAZ.js} +2 -2
- package/dist/{app-CEe3kSZM.js → app-B_doYklh.js} +7107 -8879
- package/dist/app.js +3 -4
- package/dist/{base.export-BjSdr85q.js → base.export-DmbnT_bp.js} +2 -2
- package/dist/{business-CJjiItSo.js → business-DdVGtTvx.js} +1 -1
- package/dist/{campaign-DEXq52fE.js → campaign-CVkA08zl.js} +25 -31
- package/dist/{campaign-D4MWLs1D.js → campaign-jEhKmpKg.js} +94 -121
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-DWu6-kOo.js} +2 -3
- package/dist/{campaign.fn-DiadKjES.js → campaign.fn-BlgEyeFz.js} +82 -82
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-CVLkXKml.js} +1 -1
- package/dist/{collection.fn-CfqIdnSS.js → collection.fn-DLNGTrPf.js} +2 -2
- package/dist/{currency-CPB6E_s-.js → currency-DKS1md4e.js} +1 -1
- package/dist/{effect-DFodA5mh.js → effect-Bk-zYexf.js} +1 -1
- package/dist/{email-addresses-C0CwgNs_.js → email-addresses-I9A5iLzf.js} +2 -2
- package/dist/{feature-flag-Bap2oi_S.js → feature-flag-DQti61iR.js} +74 -74
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-DKKsSb2o.js → helper-9cPlo6ae.js} +1 -1
- package/dist/{index-CJGb1iJi.js → index-1Cdj34z1.js} +1 -1
- package/dist/{index-CtwPthW5.js → index-3V8E9GaZ.js} +2 -2
- package/dist/{index-CfqmNZUH.js → index-728mP6kW.js} +581 -683
- package/dist/{index-DDmpyI6z.js → index-BRm0LMTo.js} +252 -611
- package/dist/{index-qAQiQd-s.js → index-BxpbI0GH.js} +7 -7
- package/dist/{index-DFV2ydYE.js → index-C-OnJpT8.js} +1 -1
- package/dist/{index-D5veZ8LP.js → index-CIwdXphn.js} +2613 -2700
- package/dist/{index-DxmlvoHV.js → index-CNUXbXvG.js} +6 -19
- package/dist/{index-RUdMURTx.js → index-Cj6oxbl0.js} +10 -11
- package/dist/{index-CXqPYmyv.js → index-ClYX4COd.js} +3 -4
- package/dist/{index-CEFEuMOF.js → index-CuyzSc1l.js} +1 -1
- package/dist/{index-BS6725ZB.js → index-DOE2VR99.js} +198 -198
- package/dist/{index-C_4eW8Sr.js → index-DWkuIfHy.js} +232 -390
- package/dist/{index-BdGo-qgB.js → index-Dj51vqab.js} +4 -4
- package/dist/{index-DRnUcSVN.js → index-DuvnRxeo.js} +1 -1
- package/dist/{index-BJCirs9i.js → index-cgtAlOl9.js} +10767 -8028
- package/dist/{index-BWsGYTzB.js → index-fHiFL1dW.js} +15 -29
- package/dist/{index-CFZMwKR6.js → index-oNMFyOGe.js} +7 -8
- package/dist/{index-4LQanFJi.js → index-vKvGJ4Ve.js} +2 -2
- package/dist/{index.esm2017-i1myv90H.js → index.esm2017-CsF37oA-.js} +177 -177
- package/dist/{loading-BAFiJnEb.js → loading-BJJmTFoe.js} +1 -1
- package/dist/{lodash-De2KDgqX.js → lodash-BMJ6_hsa.js} +1 -1
- package/dist/{member-import-BP4RZGbA.js → member-import-DrGxVJt9.js} +5 -6
- package/dist/{membership-CQWw-rTa.js → membership-CAqKihwy.js} +3 -3
- package/dist/{money-rwjWYzdi.js → money-Bf9d2ZUH.js} +1 -1
- package/dist/{number-DwSvkBpS.js → number-CWXlGZa5.js} +1 -1
- package/dist/objectid-2DN5a9sY.js +145 -0
- package/dist/{onboarding-u7cpl6k3.js → onboarding-Dn9O7r3a.js} +25 -25
- package/dist/{onboardingSetup-DoxDlcVN.js → onboardingSetup-BMkDoGy-.js} +2 -2
- package/dist/{plugins-CKaeoHSK.js → plugins-KDgceFWV.js} +3 -3
- package/dist/{reward-BasbGRWt.js → reward-eilGRaXi.js} +1 -1
- package/dist/{rule-IN41b-qE.js → rule-Dr9Zjg_o.js} +492 -572
- package/dist/rule-builder-cz6Dy-no.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DwbazO8p.js +236 -0
- package/dist/{timezone-C68y8HiI.js → timezone-C5CIfvHs.js} +1 -1
- package/dist/{transaction.fn-Ckxm2gof.js → transaction.fn-Cr-FLjh0.js} +2 -2
- package/dist/{trigger-xA8j3s9B.js → trigger-B0Fv6wbN.js} +8 -8
- package/dist/useMarketingMaterialActions-CNk3LR9M.js +96 -0
- package/dist/{usePagination-CIRxyVr8.js → usePagination-BcA-imTr.js} +1 -1
- package/dist/{user-PTTQTMyQ.js → user-DRvLwlBE.js} +1 -1
- package/dist/vue-i18n-y7bHQpNx.js +2365 -0
- package/dist/{xlsx-l0AsOrP1.js → xlsx-CBObn76o.js} +379 -379
- package/dist/{zod-Bm1pKYLC.js → zod-DWU5EdQV.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BqEtvKFs.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +0 -4442
- package/dist/Grab-CGWinKBS.js +0 -301
- package/dist/MainLayout-D22Q2_jN.js +0 -4
- package/dist/Marketing-CmVnvEN6.js +0 -269
- package/dist/MarketingMaterialEdit-CQ55zG-W.js +0 -1037
- package/dist/ReviewFacebookCallback-rAlgcTQ_.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +0 -1923
- package/dist/Setting-aLQCUCP9.js +0 -574
- package/dist/Settings-BkYtKb4l.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +0 -7007
- package/dist/WhatsappAccount-BG0dIroG.js +0 -159
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +0 -39
- package/dist/WhatsappBot-O5h5UKXz.js +0 -876
- package/dist/WhatsappBotLogs-BOPTuu6o.js +0 -372
- package/dist/WhatsappBotSettings-BSiIvpGO.js +0 -705
- package/dist/WhatsappLayout-DLVIfkzJ.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +0 -253
- package/dist/browser-BSAOEeIM.js +0 -1478
- package/dist/duplicateCampaign-BzWvsZwc.js +0 -51
- package/dist/feature-flag--GbS6Qn_.js +0 -50
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/index-C-iwb2Ln.js +0 -109
- package/dist/index-C1C21iKU.js +0 -74
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/objectid-DtEPzPd_.js +0 -145
- package/dist/template-3Nu_MAMG.js +0 -188
- package/dist/useMarketingMaterialActions-ClYoBaFw.js +0 -125
- package/dist/vue-i18n-DYnrLWFT.js +0 -2365
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { p as B, i as w } from "./plugins-KDgceFWV.js";
|
|
2
|
+
import { _ as O } from "./lodash-BMJ6_hsa.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-CVkA08zl.js";
|
|
5
|
+
import { useDialog as q } from "@feedmepos/ui-library";
|
|
6
|
+
import { F as G } from "./index-BRm0LMTo.js";
|
|
7
|
+
import { C as H } from "./campaign-jEhKmpKg.js";
|
|
8
|
+
import { J } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
+
import { u as U } from "./vue-i18n-y7bHQpNx.js";
|
|
10
|
+
import { u as K } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ijya9Cho.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-728mP6kW.js";
|
|
2
|
+
import { s as u } from "./index-Dj51vqab.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-CIwdXphn.js";
|
|
3
|
+
import { R as i } from "./rule-builder-cz6Dy-no.js";
|
|
4
|
+
import { _ as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CKL8MEld.js";
|
|
5
|
+
import { c as e, C as d } from "./index-DWkuIfHy.js";
|
|
6
|
+
import { i as n } from "./plugins-KDgceFWV.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-BxpbI0GH.js";
|
|
2
|
+
import { u as w } from "./vue-i18n-y7bHQpNx.js";
|
|
3
|
+
import { useSnackbar as h } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as k } from "./plugins-KDgceFWV.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-BMJ6_hsa.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"
|