@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.10
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/{Analytic-C-zZmF5N.js → Analytic-BVk0jPDU.js} +357 -366
- package/dist/App-BbAalq1k.js +171 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js} +19 -26
- package/dist/Card-B5in1RMa.js +805 -0
- package/dist/Collections-CFCZ9YIG.js +4 -0
- package/dist/Credit-Bc9EzdsC.js +207 -0
- package/dist/Experience-CgKak5ik.js +212 -0
- package/dist/Game-QhfKqrN_.js +246 -0
- package/dist/MainLayout-JbHzENFy.js +4 -0
- package/dist/Marketing-CSx4N7UJ.js +309 -0
- package/dist/Member-CY6WMD8D.js +66 -0
- package/dist/MemberList-8iRwm7Sz.js +1719 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-CknqkWO3.js} +1 -1
- package/dist/Mission-BTy1p7lU.js +249 -0
- package/dist/Point-A6B_ggSy.js +213 -0
- package/dist/Segment-CFVXtyEj.js +432 -0
- package/dist/Setting-Jmtw-_DV.js +1888 -0
- package/dist/Store-DQypT-7e.js +1488 -0
- package/dist/StoreRewards-M-utm0iI.js +385 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js} +76 -86
- package/dist/{Tier-DVWJyQ9S.js → Tier-D1jymeLK.js} +430 -434
- package/dist/{Title-B5kX64vs.js → Title-DN9DIP2k.js} +298 -299
- package/dist/Transaction-BAJvAoU6.js +39 -0
- package/dist/app-BpzzygYP.js +87765 -0
- package/dist/app.js +4 -3
- package/dist/{export-Dm6LYnWo.js → export-DjeNY5Pc.js} +16 -19
- package/dist/money-DKGIIplY.js +15 -0
- package/dist/number-tPodRxTN.js +12 -0
- package/dist/style.css +1 -1
- package/package.json +9 -5
- package/dist/Broadcast-X69Mtv3b.js +0 -216
- package/dist/Card-D0X3v1UF.js +0 -822
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-umR6Ehqf.js +0 -452
- package/dist/Credit-C1EWF7R0.js +0 -214
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js +0 -2784
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js +0 -344
- package/dist/Experience-CqL8wyPm.js +0 -211
- package/dist/Game--kYe64EV.js +0 -250
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js +0 -18737
- package/dist/MainLayout-D0AoA1tk.js +0 -41
- package/dist/Marketing-CTCQ5ZmZ.js +0 -308
- package/dist/Member-DCduX7zP.js +0 -91
- package/dist/MemberList-B0EkXZJu.js +0 -1729
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js +0 -432
- package/dist/Mission-CVr9rS_D.js +0 -248
- package/dist/Point-BnZ6M74y.js +0 -220
- package/dist/Promotion-B0PUve5S.js +0 -218
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js +0 -1750
- package/dist/Segment-B-XpkyM5.js +0 -445
- package/dist/Setting-Zrj5P_4m.js +0 -1899
- package/dist/Store-B2gywCt2.js +0 -1503
- package/dist/StoreRewards-D8410Q_-.js +0 -434
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js +0 -139
- package/dist/Transaction-CZBO4v4d.js +0 -36
- package/dist/Voucher-se-4JF9B.js +0 -481
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +0 -55
- package/dist/app-B2ImSO3V.js +0 -53382
- package/dist/app-DkI7dYRN.js +0 -31417
- package/dist/campaign-BZJuknWK.js +0 -96
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/collection.fn-DoCkZ6z4.js +0 -26
- package/dist/dto-BWpvRpK2.js +0 -1151
- package/dist/effect-B8kmnKvY.js +0 -61
- package/dist/helper-DR4XK3nv.js +0 -71
- package/dist/index-BobRgQrE.js +0 -291
- package/dist/index-BryrRq8O.js +0 -755
- package/dist/index-Bu4_26qI.js +0 -95
- package/dist/index-BxkxVtgm.js +0 -94
- package/dist/index-CWf0mh3a.js +0 -8823
- package/dist/index-CkiYkbXb.js +0 -38
- package/dist/index-CuL5-ORK.js +0 -204
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-Dbd4WA4r.js +0 -61
- package/dist/index-DcUrk07Q.js +0 -73
- package/dist/index-boor8e80.js +0 -1737
- package/dist/index-yxJMhfxj.js +0 -2071
- package/dist/loading-BzV5acUX.js +0 -32695
- package/dist/lodash-mg4435Qq.js +0 -3678
- package/dist/membership-CqbsLHqx.js +0 -221
- package/dist/moment-BWErdI6_.js +0 -2578
- package/dist/money-DA_gtp3q.js +0 -15
- package/dist/number-C388eyOu.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/rule-Clmr5y4j.js +0 -1973
- package/dist/rule-builder-BgqNbM-P.js +0 -89
- package/dist/template-Dwp7heBA.js +0 -190
- package/dist/usePagination-o5fgsZwU.js +0 -223
- package/dist/xlsx-BRdh9e2p.js +0 -15491
- package/dist/zod-W_PvIofQ.js +0 -90
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineComponent as M, ref as p, h as d, watch as N, resolveComponent as S, openBlock as g, createBlock as O, unref as l, computed as C, onMounted as B, createElementBlock as P, Fragment as G, createCommentVNode as $, createVNode as L, createElementVNode as w, nextTick as F } from "vue";
|
|
2
|
+
import { useRouter as V, useRoute as k, RouterView as Y } from "vue-router";
|
|
3
|
+
import { useCoreStore as E } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as U, R as n, a as H, b as x, S as y, J as D } from "./app-BpzzygYP.js";
|
|
5
|
+
import { components as v, useSnackbar as X, useDialog as q } from "@feedmepos/ui-library";
|
|
6
|
+
const j = /* @__PURE__ */ M({
|
|
7
|
+
__name: "NavigationTab",
|
|
8
|
+
setup(I) {
|
|
9
|
+
const { t: e } = U(), m = p(), i = [
|
|
10
|
+
{
|
|
11
|
+
label: e("connect.navigation.analytic"),
|
|
12
|
+
value: n["$connect-ANALYTIC"]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: e("connect.navigation.campaign"),
|
|
16
|
+
value: n["$connect-CAMPAIGN"],
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
label: e("connect.navigation.promotion"),
|
|
20
|
+
value: n["$connect-CAMPAIGN_PROMOTION"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: e("connect.navigation.voucher"),
|
|
24
|
+
value: n["$connect-CAMPAIGN_VOUCHER"]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: e("connect.navigation.broadcast"),
|
|
28
|
+
value: n["$connect-CAMPAIGN_BROADCAST"]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: e("connect.navigation.program"),
|
|
34
|
+
value: n["$connect-PROGRAM"],
|
|
35
|
+
children: [
|
|
36
|
+
{
|
|
37
|
+
label: e("connect.navigation.tier"),
|
|
38
|
+
value: n["$connect-PROGRAM_TIER"]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: e("connect.navigation.title"),
|
|
42
|
+
value: n["$connect-PROGRAM_TITLE"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: e("connect.navigation.experience"),
|
|
46
|
+
value: n["$connect-PROGRAM_EXPERIENCE"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: e("connect.navigation.point"),
|
|
50
|
+
value: n["$connect-PROGRAM_POINT"],
|
|
51
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: e("connect.navigation.credit"),
|
|
55
|
+
value: n["$connect-PROGRAM_CREDIT"]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: e("connect.navigation.game"),
|
|
59
|
+
value: n["$connect-PROGRAM_GAME"],
|
|
60
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: "Mission",
|
|
64
|
+
value: n["$connect-PROGRAM_MISSION"]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: e("connect.navigation.loyalty"),
|
|
70
|
+
value: n["$connect-LOYALTY"],
|
|
71
|
+
children: [
|
|
72
|
+
{
|
|
73
|
+
label: e("connect.navigation.member"),
|
|
74
|
+
value: n["$connect-LOYALTY_MEMBER_LIST"]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: e("connect.navigation.segments"),
|
|
78
|
+
value: n["$connect-LOYALTY_SEGMENT"],
|
|
79
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: e("connect.navigation.card"),
|
|
83
|
+
value: n["$connect-LOYALTY_CARD"],
|
|
84
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: e("connect.navigation.store"),
|
|
90
|
+
value: n["$connect-STORE"]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: e("connect.navigation.transaction"),
|
|
94
|
+
value: n["$connect-TRANSACTION"]
|
|
95
|
+
},
|
|
96
|
+
// {
|
|
97
|
+
// label: 'Marketing material',
|
|
98
|
+
// value: ROUTE_NAME['$connect-MARKETING'],
|
|
99
|
+
// },
|
|
100
|
+
{
|
|
101
|
+
label: e("connect.navigation.setting"),
|
|
102
|
+
value: n["$connect-SETTING"]
|
|
103
|
+
}
|
|
104
|
+
], b = V(), _ = k(), f = i.reduce((t, o) => [...(o.children ?? []).map((a) => a.value), ...t, o.value], []);
|
|
105
|
+
N(
|
|
106
|
+
() => _,
|
|
107
|
+
(t) => {
|
|
108
|
+
const o = t.matched.map((a) => a.name).reverse();
|
|
109
|
+
m.value = o.find((a) => f.includes(a));
|
|
110
|
+
},
|
|
111
|
+
{ immediate: !0 }
|
|
112
|
+
);
|
|
113
|
+
async function R(t) {
|
|
114
|
+
await b.push({ name: t });
|
|
115
|
+
}
|
|
116
|
+
return (t, o) => {
|
|
117
|
+
var r;
|
|
118
|
+
const a = S("FmCollapsibleTabs");
|
|
119
|
+
return g(), O(a, {
|
|
120
|
+
class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
|
|
121
|
+
"model-value": (r = l(m)) == null ? void 0 : r.toString(),
|
|
122
|
+
items: i,
|
|
123
|
+
"onUpdate:modelValue": R
|
|
124
|
+
}, null, 8, ["model-value"]);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var J = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
129
|
+
const z = {
|
|
130
|
+
key: 1,
|
|
131
|
+
class: "h-full w-full"
|
|
132
|
+
}, K = ["src"], ae = /* @__PURE__ */ M({
|
|
133
|
+
__name: "App",
|
|
134
|
+
setup(I) {
|
|
135
|
+
const e = E(), m = H(), i = x(), b = X(), _ = q(), f = k(), R = p(f.query.showHeader !== "false"), t = p(!1), { currentBusiness: o } = E(), a = p(!1), r = C(() => i.version), h = C(() => {
|
|
136
|
+
const c = e.currentCountry.value || "MY", s = y.getIdToken(), u = o.value._id;
|
|
137
|
+
return `${J.marketingV1Portal}/b/${u}/marketing/overview?showHeader=false&country=${c}&token=${s}`;
|
|
138
|
+
}), A = async () => {
|
|
139
|
+
a.value = !1, await F(), console.log("forceRerender"), y.setBusinessId(o.value._id), await i.readPremium(), !t.value && r.value === "v2" ? e.registerSidebarComponent(j) : e.hideSidebarToggle(!0), t.value = !0, a.value = !0;
|
|
140
|
+
};
|
|
141
|
+
return B(() => {
|
|
142
|
+
if (m.initProvider(b, _), !R.value) {
|
|
143
|
+
const c = document.getElementsByClassName("app-header")[0], s = document.getElementsByClassName("app-sidebar")[0], u = document.getElementsByClassName("app-container")[0], T = document.getElementsByTagName("main")[0];
|
|
144
|
+
c == null || c.classList.add("!hidden"), s == null || s.classList.add("!pt-0"), u == null || u.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
145
|
+
}
|
|
146
|
+
o.value != null && A();
|
|
147
|
+
}), N(
|
|
148
|
+
() => e.currentBusiness.value,
|
|
149
|
+
async (c) => {
|
|
150
|
+
c != null && A();
|
|
151
|
+
}
|
|
152
|
+
), (c, s) => (g(), P(G, null, [
|
|
153
|
+
l(a) && l(r) === "v2" ? (g(), O(l(Y), { key: 0 })) : $("", !0),
|
|
154
|
+
l(a) && l(r) !== "v2" ? (g(), P("div", z, [
|
|
155
|
+
L(D, {
|
|
156
|
+
json: { url: l(h) }
|
|
157
|
+
}, null, 8, ["json"]),
|
|
158
|
+
w("iframe", {
|
|
159
|
+
allow: "clipboard-read; clipboard-write",
|
|
160
|
+
frameBorder: "0",
|
|
161
|
+
height: "100%",
|
|
162
|
+
width: "100%",
|
|
163
|
+
src: l(h)
|
|
164
|
+
}, null, 8, K)
|
|
165
|
+
])) : $("", !0)
|
|
166
|
+
], 64));
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
export {
|
|
170
|
+
ae as default
|
|
171
|
+
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as isRuleGroup } from "./rule-builder-BgqNbM-P.js";
|
|
1
|
+
import { K as RuleOperator, z as isRuleGroup, L as _, E as F_RUNNABLE_CAMPAIGN_TYPE } from "./app-BpzzygYP.js";
|
|
3
2
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
|
|
4
3
|
import { useDialog } from "@feedmepos/ui-library";
|
|
5
|
-
import "./index-CuL5-ORK.js";
|
|
6
|
-
import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-BryrRq8O.js";
|
|
7
|
-
import "./index-boor8e80.js";
|
|
8
|
-
import "./index-yxJMhfxj.js";
|
|
9
|
-
import "./index-BobRgQrE.js";
|
|
10
|
-
import "./index-CkiYkbXb.js";
|
|
11
4
|
function validateRule(data, r, date) {
|
|
12
5
|
const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
|
|
13
6
|
function meetConditions(e) {
|
|
@@ -16,11 +9,11 @@ function validateRule(data, r, date) {
|
|
|
16
9
|
const l = e.property ? e.property === "__now" ? rules.ruleNow : _.get(data, e.property) : data;
|
|
17
10
|
if (!t)
|
|
18
11
|
return o;
|
|
19
|
-
const
|
|
12
|
+
const s = rules[n](
|
|
20
13
|
l,
|
|
21
14
|
t
|
|
22
15
|
);
|
|
23
|
-
return o &&
|
|
16
|
+
return o && s;
|
|
24
17
|
},
|
|
25
18
|
!0
|
|
26
19
|
);
|
|
@@ -39,10 +32,7 @@ function validateRule(data, r, date) {
|
|
|
39
32
|
}
|
|
40
33
|
return isRuleGroup(r) ? evaluateRuleResult(getRuleResults(r), r.logic) : meetConditions(r);
|
|
41
34
|
}
|
|
42
|
-
const _hoisted_1 =
|
|
43
|
-
/* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
|
|
44
|
-
/* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
|
|
45
|
-
], -1), _hoisted_2 = { class: "flex flex-col h-full space-y-24" }, _hoisted_3 = { class: "fm-typo-en-title-sm-600" }, _hoisted_4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
|
+
const _hoisted_1 = { class: "flex flex-col h-full space-y-24" }, _hoisted_2 = { class: "fm-typo-en-title-sm-600" }, _hoisted_3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
46
36
|
__name: "CampaignTypeDialog",
|
|
47
37
|
props: {
|
|
48
38
|
onSelect: {
|
|
@@ -83,24 +73,27 @@ const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
|
|
|
83
73
|
value: F_RUNNABLE_CAMPAIGN_TYPE.enum.CREDIT
|
|
84
74
|
}
|
|
85
75
|
];
|
|
86
|
-
function l(
|
|
87
|
-
n.close(), o.onSelect(
|
|
76
|
+
function l(s) {
|
|
77
|
+
n.close(), o.onSelect(s);
|
|
88
78
|
}
|
|
89
|
-
return (
|
|
90
|
-
const
|
|
91
|
-
return openBlock(), createBlock(
|
|
79
|
+
return (s, a) => {
|
|
80
|
+
const c = resolveComponent("FmCard");
|
|
81
|
+
return openBlock(), createBlock(c, { class: "p-24 space-y-16" }, {
|
|
92
82
|
default: withCtx(() => [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
(
|
|
83
|
+
a[0] || (a[0] = createElementVNode("div", { class: "" }, [
|
|
84
|
+
createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
|
|
85
|
+
createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
|
|
86
|
+
], -1)),
|
|
87
|
+
createElementVNode("div", _hoisted_1, [
|
|
88
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(t, (i) => createVNode(c, {
|
|
96
89
|
variant: "outlined",
|
|
97
|
-
key:
|
|
98
|
-
onClick: (u) => l(
|
|
90
|
+
key: i.value,
|
|
91
|
+
onClick: (u) => l(i.value),
|
|
99
92
|
class: "p-16 space-y-8 cursor-pointer"
|
|
100
93
|
}, {
|
|
101
94
|
default: withCtx(() => [
|
|
102
|
-
createElementVNode("div",
|
|
103
|
-
createElementVNode("div",
|
|
95
|
+
createElementVNode("div", _hoisted_2, toDisplayString(i.title), 1),
|
|
96
|
+
createElementVNode("div", _hoisted_3, toDisplayString(i.description), 1)
|
|
104
97
|
]),
|
|
105
98
|
_: 2
|
|
106
99
|
}, 1032, ["onClick"])), 64))
|