@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.
Files changed (95) hide show
  1. package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
  2. package/dist/App-Cikl5jnp.js +177 -0
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/Collections-B1SC1rr7.js +453 -0
  7. package/dist/Credit-BgwI8DR3.js +216 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
  10. package/dist/Experience-C2Q-zqV6.js +221 -0
  11. package/dist/Game-DU2pZDGk.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
  15. package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
  16. package/dist/Marketing-DWiTQp9I.js +316 -0
  17. package/dist/Member-BEXKBFry.js +69 -0
  18. package/dist/MemberList-DzMdajIf.js +1733 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
  21. 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
  22. package/dist/Mission-KzwRlaA5.js +259 -0
  23. package/dist/Point-CSKvZXHc.js +222 -0
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
  26. package/dist/Segment-2Q0PonBb.js +447 -0
  27. package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
  28. package/dist/Store-C0WXCKs6.js +1503 -0
  29. package/dist/StoreRewards-eSSIO0nk.js +401 -0
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
  31. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
  32. package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
  33. package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
  34. package/dist/Transaction-0OouN_6s.js +39 -0
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  37. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  38. package/dist/app-Bd19eW7X.js +5381 -0
  39. package/dist/app-CfS25Z66.js +34797 -0
  40. package/dist/app-wDQR6dpb.js +39 -0
  41. package/dist/app.js +5 -3
  42. package/dist/business-dQh3AEot.js +78 -0
  43. package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
  44. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
  45. package/dist/dto-B8NfyVPG.js +1169 -0
  46. package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
  47. package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
  48. package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
  49. package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
  50. package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
  51. package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
  52. package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
  53. package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
  54. package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
  55. package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
  56. package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
  57. package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
  58. package/dist/index-DwKqFNF6.js +3 -0
  59. package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
  60. package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
  61. package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
  62. package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
  63. package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
  64. package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
  65. package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
  66. package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
  67. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/template-clxvNnbF.js +190 -0
  70. package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
  71. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  72. package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
  73. package/package.json +9 -5
  74. package/dist/Broadcast-X69Mtv3b.js +0 -216
  75. package/dist/Card-D0X3v1UF.js +0 -822
  76. package/dist/Collections-umR6Ehqf.js +0 -452
  77. package/dist/Credit-C1EWF7R0.js +0 -214
  78. package/dist/Experience-CqL8wyPm.js +0 -211
  79. package/dist/Game--kYe64EV.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
  81. package/dist/Marketing-CTCQ5ZmZ.js +0 -308
  82. package/dist/Member-DCduX7zP.js +0 -91
  83. package/dist/MemberList-B0EkXZJu.js +0 -1729
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/Mission-CVr9rS_D.js +0 -248
  86. package/dist/Point-BnZ6M74y.js +0 -220
  87. package/dist/Promotion-B0PUve5S.js +0 -218
  88. package/dist/Segment-B-XpkyM5.js +0 -445
  89. package/dist/Store-B2gywCt2.js +0 -1503
  90. package/dist/StoreRewards-D8410Q_-.js +0 -434
  91. package/dist/Transaction-CZBO4v4d.js +0 -36
  92. package/dist/Voucher-se-4JF9B.js +0 -481
  93. package/dist/app-B2ImSO3V.js +0 -53382
  94. package/dist/dto-BWpvRpK2.js +0 -1151
  95. 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
@@ -1,5 +1,7 @@
1
- import { n as p, m as r } from "./app-DkI7dYRN.js";
1
+ import "vue";
2
+ import { F as e, i as o, r as p } from "./app-Bd19eW7X.js";
2
3
  export {
3
- p as FmApp,
4
- r as routes
4
+ e as FmApp,
5
+ o as i18nMessages,
6
+ p as routes
5
7
  };
@@ -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 m } from "pinia";
2
- import { reactive as f, onMounted as I, ref as a } from "vue";
3
- import { c } from "./index-BxkxVtgm.js";
4
- import { d as i, S as b, f as h } from "./app-DkI7dYRN.js";
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 = b.getBusinessId();
6
+ const e = I.getBusinessId();
7
7
  if (!e) throw new Error("Invalid business ID");
8
- return h(`businesses/${e}/campaigns`, {
8
+ return g(`businesses/${e}/campaigns`, {
9
9
  noIdRequired: !0
10
10
  });
11
- }, g = {
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 = m("mf-connect-campaign", () => {
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
- I(() => {
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 d() {
80
- t.value = await g.readAll();
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: d
91
+ readTemplates: m
92
92
  };
93
93
  });
94
94
  export {
@@ -1,5 +1,5 @@
1
- import "./index-CWf0mh3a.js";
2
- import "./loading-BzV5acUX.js";
1
+ import "./index-DYDhH9bi.js";
2
+ import "./loading-D_AN6p24.js";
3
3
  function r(e) {
4
4
  switch (e) {
5
5
  case "PROMOTION":