@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11
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-Gq7PoNer.js} +368 -365
- package/dist/App-Cikl5jnp.js +177 -0
- package/dist/Broadcast-DU3JnBwZ.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
- package/dist/Card-hIeQ5XUH.js +825 -0
- package/dist/Collections-B1SC1rr7.js +453 -0
- package/dist/Credit-BgwI8DR3.js +216 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
- package/dist/Experience-C2Q-zqV6.js +221 -0
- package/dist/Game-DU2pZDGk.js +255 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
- package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
- package/dist/Marketing-DWiTQp9I.js +316 -0
- package/dist/Member-BEXKBFry.js +69 -0
- package/dist/MemberList-DzMdajIf.js +1733 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
- package/dist/Mission-KzwRlaA5.js +259 -0
- package/dist/Point-CSKvZXHc.js +222 -0
- package/dist/Promotion-IiwPhx8p.js +221 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
- package/dist/Segment-2Q0PonBb.js +447 -0
- package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
- package/dist/Store-C0WXCKs6.js +1503 -0
- package/dist/StoreRewards-eSSIO0nk.js +401 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
- package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
- package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
- package/dist/Transaction-0OouN_6s.js +39 -0
- package/dist/Voucher-CL0cgogx.js +488 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-Bd19eW7X.js +5381 -0
- package/dist/app-CfS25Z66.js +34797 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +5 -3
- package/dist/business-dQh3AEot.js +78 -0
- package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
- package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
- package/dist/dto-B8NfyVPG.js +1169 -0
- package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
- package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
- package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
- package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
- package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
- package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
- package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
- package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
- package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
- package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
- package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
- package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
- package/dist/index-DwKqFNF6.js +3 -0
- package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
- package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
- package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
- package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
- package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
- package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
- package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
- package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
- package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/template-clxvNnbF.js +190 -0
- package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
- package/dist/vue-i18n-BxwiXSkp.js +2365 -0
- package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
- package/package.json +9 -5
- package/dist/Broadcast-X69Mtv3b.js +0 -216
- package/dist/Card-D0X3v1UF.js +0 -822
- package/dist/Collections-umR6Ehqf.js +0 -452
- package/dist/Credit-C1EWF7R0.js +0 -214
- 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/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/Mission-CVr9rS_D.js +0 -248
- package/dist/Point-BnZ6M74y.js +0 -220
- package/dist/Promotion-B0PUve5S.js +0 -218
- package/dist/Segment-B-XpkyM5.js +0 -445
- package/dist/Store-B2gywCt2.js +0 -1503
- package/dist/StoreRewards-D8410Q_-.js +0 -434
- package/dist/Transaction-CZBO4v4d.js +0 -36
- package/dist/Voucher-se-4JF9B.js +0 -481
- package/dist/app-B2ImSO3V.js +0 -53382
- package/dist/dto-BWpvRpK2.js +0 -1151
- package/dist/template-Dwp7heBA.js +0 -190
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ref as u, computed as a } from "vue";
|
|
2
|
+
import { defineStore as v } from "pinia";
|
|
3
|
+
const b = v("mf-connect-app", () => {
|
|
4
|
+
const e = u([]), l = u(null), t = u(null), i = u(localStorage.getItem("debugMode") === "true"), r = a(
|
|
5
|
+
() => e.value.some((o) => o.isGlobal === !0) || !1
|
|
6
|
+
), s = a(() => e.value.length > 0);
|
|
7
|
+
function c(o) {
|
|
8
|
+
e.value = [...e.value, ...o];
|
|
9
|
+
}
|
|
10
|
+
function d() {
|
|
11
|
+
e.value = [];
|
|
12
|
+
}
|
|
13
|
+
function f(o) {
|
|
14
|
+
e.value = e.value.filter(
|
|
15
|
+
(n) => !o.includes(n.id)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function g(o, n) {
|
|
19
|
+
l.value = o, t.value = n;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
// state
|
|
23
|
+
loadingQueue: e,
|
|
24
|
+
snackbar: l,
|
|
25
|
+
dialog: t,
|
|
26
|
+
debugMode: i,
|
|
27
|
+
// getters
|
|
28
|
+
isGlobalLoading: r,
|
|
29
|
+
isLoading: s,
|
|
30
|
+
// actions
|
|
31
|
+
addLoadingQueues: c,
|
|
32
|
+
clearLoadingQueue: d,
|
|
33
|
+
resolveQueues: f,
|
|
34
|
+
initProvider: g
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
b as u
|
|
39
|
+
};
|
package/dist/app.js
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ref as i, computed as f } from "vue";
|
|
2
|
+
import { defineStore as g } from "pinia";
|
|
3
|
+
import { useCoreStore as w } from "@feedmepos/mf-common";
|
|
4
|
+
import { a as y, g as r, A as I, S as b, b as S } from "./index-Dn0jdj0o.js";
|
|
5
|
+
const D = {
|
|
6
|
+
async readSettings(e) {
|
|
7
|
+
try {
|
|
8
|
+
return r(await y(`marketing-v2/${e}/setting`).get(""));
|
|
9
|
+
} catch (n) {
|
|
10
|
+
if (console.error(JSON.stringify(n)), n instanceof I)
|
|
11
|
+
return {
|
|
12
|
+
_id: e,
|
|
13
|
+
business: e,
|
|
14
|
+
apiVersion: "v1"
|
|
15
|
+
};
|
|
16
|
+
throw n;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, o = () => {
|
|
20
|
+
const e = b.getBusinessId();
|
|
21
|
+
if (!e) throw new Error("Invalid business ID");
|
|
22
|
+
return S(`businesses/${e}/location`, {
|
|
23
|
+
noIdRequired: !0
|
|
24
|
+
});
|
|
25
|
+
}, u = {
|
|
26
|
+
async read() {
|
|
27
|
+
return r(await o().get(""));
|
|
28
|
+
},
|
|
29
|
+
async readDevices() {
|
|
30
|
+
return r(await o().get("devices"));
|
|
31
|
+
},
|
|
32
|
+
async unregisterDevice(e) {
|
|
33
|
+
await r(await o().delete(`devices/${e}`));
|
|
34
|
+
},
|
|
35
|
+
async getOtp(e) {
|
|
36
|
+
return r(await o().post(`${e}/otp`));
|
|
37
|
+
}
|
|
38
|
+
}, h = g("mf-connect-business", () => {
|
|
39
|
+
const e = i("v2"), n = i(!1), a = i([]), c = i([]);
|
|
40
|
+
async function l() {
|
|
41
|
+
const t = w().currentBusiness.value, s = await D.readSettings(t == null ? void 0 : t.id);
|
|
42
|
+
return n.value = s && "business" in s && s.premium == !0, e.value = (s == null ? void 0 : s.apiVersion) || "v1", n.value;
|
|
43
|
+
}
|
|
44
|
+
async function v() {
|
|
45
|
+
return a.value = await u.read(), a.value;
|
|
46
|
+
}
|
|
47
|
+
async function d() {
|
|
48
|
+
return c.value = await u.readDevices(), c.value;
|
|
49
|
+
}
|
|
50
|
+
function p(t) {
|
|
51
|
+
return a.value.find((s) => s._id === t);
|
|
52
|
+
}
|
|
53
|
+
const m = f(() => [
|
|
54
|
+
{ label: "All", value: null },
|
|
55
|
+
...a.value.map((t) => ({
|
|
56
|
+
label: t.name,
|
|
57
|
+
value: t._id
|
|
58
|
+
}))
|
|
59
|
+
]);
|
|
60
|
+
return {
|
|
61
|
+
// state
|
|
62
|
+
version: e,
|
|
63
|
+
isPremium: n,
|
|
64
|
+
locations: a,
|
|
65
|
+
locationDevices: c,
|
|
66
|
+
// actions
|
|
67
|
+
readPremium: l,
|
|
68
|
+
readLocations: v,
|
|
69
|
+
readLocationDevices: d,
|
|
70
|
+
locationById: p,
|
|
71
|
+
// getters
|
|
72
|
+
locationItems: m
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
u as l,
|
|
77
|
+
h as u
|
|
78
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { reactive as f, onMounted as
|
|
3
|
-
import { c } from "./index-
|
|
4
|
-
import {
|
|
1
|
+
import { defineStore as d } from "pinia";
|
|
2
|
+
import { reactive as f, onMounted as b, ref as a } from "vue";
|
|
3
|
+
import { c } from "./index-UTQHDUdW.js";
|
|
4
|
+
import { g as i, S as I, b as g } from "./index-Dn0jdj0o.js";
|
|
5
5
|
const p = () => {
|
|
6
|
-
const e =
|
|
6
|
+
const e = I.getBusinessId();
|
|
7
7
|
if (!e) throw new Error("Invalid business ID");
|
|
8
|
-
return
|
|
8
|
+
return g(`businesses/${e}/campaigns`, {
|
|
9
9
|
noIdRequired: !0
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, h = {
|
|
12
12
|
async readAll() {
|
|
13
13
|
return i(await p().get("templates"));
|
|
14
14
|
},
|
|
@@ -17,7 +17,7 @@ const p = () => {
|
|
|
17
17
|
await p().get(`templates/${e}`)
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
}, S =
|
|
20
|
+
}, S = d("mf-connect-campaign", () => {
|
|
21
21
|
const e = f({
|
|
22
22
|
promotion: [],
|
|
23
23
|
voucher: [],
|
|
@@ -29,7 +29,7 @@ const p = () => {
|
|
|
29
29
|
mission: [],
|
|
30
30
|
all: []
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
b(() => {
|
|
33
33
|
console.log("🔧 CampaignStore Installed");
|
|
34
34
|
});
|
|
35
35
|
const t = a([]), r = a([]), n = a([]);
|
|
@@ -76,8 +76,8 @@ const p = () => {
|
|
|
76
76
|
async function l() {
|
|
77
77
|
r.value = await c.readGroups();
|
|
78
78
|
}
|
|
79
|
-
async function
|
|
80
|
-
t.value = await
|
|
79
|
+
async function m() {
|
|
80
|
+
t.value = await h.readAll();
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
83
|
// State
|
|
@@ -88,7 +88,7 @@ const p = () => {
|
|
|
88
88
|
// Actions
|
|
89
89
|
read: u,
|
|
90
90
|
readGroups: l,
|
|
91
|
-
readTemplates:
|
|
91
|
+
readTemplates: m
|
|
92
92
|
};
|
|
93
93
|
});
|
|
94
94
|
export {
|