@feedmepos/mf-connect 0.0.15-prod → 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.
Files changed (94) hide show
  1. package/dist/Analytic-BVk0jPDU.js +751 -0
  2. package/dist/App-BbAalq1k.js +171 -0
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgvBqImx.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js} +19 -26
  4. package/dist/Card-B5in1RMa.js +805 -0
  5. package/dist/Collections-CFCZ9YIG.js +4 -0
  6. package/dist/Credit-Bc9EzdsC.js +207 -0
  7. package/dist/Experience-CgKak5ik.js +212 -0
  8. package/dist/Game-QhfKqrN_.js +246 -0
  9. package/dist/MainLayout-JbHzENFy.js +4 -0
  10. package/dist/Marketing-CSx4N7UJ.js +309 -0
  11. package/dist/Member-CY6WMD8D.js +66 -0
  12. package/dist/MemberList-8iRwm7Sz.js +1719 -0
  13. package/dist/MemberOverview-wL_ailso.js +58 -0
  14. package/dist/MemberTransactions-CknqkWO3.js +38 -0
  15. package/dist/Mission-BTy1p7lU.js +249 -0
  16. package/dist/Point-A6B_ggSy.js +213 -0
  17. package/dist/Segment-CFVXtyEj.js +432 -0
  18. package/dist/Setting-Jmtw-_DV.js +1888 -0
  19. package/dist/Store-DQypT-7e.js +1488 -0
  20. package/dist/StoreRewards-M-utm0iI.js +385 -0
  21. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CKX2ne6M.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js} +143 -150
  22. package/dist/{Tier-CEgBk4PD.js → Tier-D1jymeLK.js} +438 -439
  23. package/dist/{Title-COBEDoGp.js → Title-DN9DIP2k.js} +308 -306
  24. package/dist/Transaction-BAJvAoU6.js +39 -0
  25. package/dist/app-BpzzygYP.js +87765 -0
  26. package/dist/app.js +4 -3
  27. package/dist/{export-CW39Vw-E.js → export-DjeNY5Pc.js} +16 -19
  28. package/dist/money-DKGIIplY.js +15 -0
  29. package/dist/number-tPodRxTN.js +12 -0
  30. package/dist/style.css +1 -1
  31. package/package.json +9 -5
  32. package/dist/Analytic-C7P9LqHH.js +0 -612
  33. package/dist/Broadcast-C9PEC_Et.js +0 -216
  34. package/dist/Card-CWpfFV5G.js +0 -822
  35. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  36. package/dist/Collections-DR5ce9qw.js +0 -440
  37. package/dist/Credit-DqqKen9o.js +0 -214
  38. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-XiEtALze.js +0 -2782
  39. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-HUpaSg2A.js +0 -344
  40. package/dist/Experience-BxZXh6Lz.js +0 -211
  41. package/dist/Game-CO7RkVZu.js +0 -250
  42. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-DNlIEnFV.js +0 -144
  43. package/dist/MainLayout-BtI1e8ky.js +0 -18770
  44. package/dist/Marketing-LyF0D1E-.js +0 -308
  45. package/dist/Member-CR5w8DqL.js +0 -91
  46. package/dist/MemberList-DWNFTjhn.js +0 -1718
  47. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  48. package/dist/MemberTransactions-BsFdkbEh.js +0 -38
  49. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-0iuVfLBK.js +0 -203
  50. package/dist/Mission-CR7ePzQ2.js +0 -248
  51. package/dist/Point-C0l5E2IX.js +0 -220
  52. package/dist/Promotion-OcaYJkH4.js +0 -218
  53. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CcFqLHvu.js +0 -1750
  54. package/dist/Segment-BmLc3b8Y.js +0 -444
  55. package/dist/Setting-BWoL9CSn.js +0 -1869
  56. package/dist/Store-Bdt9Lx1u.js +0 -1442
  57. package/dist/StoreRewards-Bs8gBM6L.js +0 -433
  58. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C80E1xXw.js +0 -124
  59. package/dist/Transaction-D3LfMp-e.js +0 -36
  60. package/dist/Voucher-Vz106uk0.js +0 -481
  61. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  62. package/dist/app-0jfx0_Zo.js +0 -53382
  63. package/dist/app-Dpf45HC7.js +0 -31417
  64. package/dist/campaign-CpzFl8Vr.js +0 -4
  65. package/dist/campaign-CqdJK6Vw.js +0 -94
  66. package/dist/collection.fn-DHlfGYAC.js +0 -24
  67. package/dist/dto-sEferhHr.js +0 -1150
  68. package/dist/effect-B9PZtHVL.js +0 -61
  69. package/dist/helper-CM736jin.js +0 -71
  70. package/dist/index-7KXsHcNf.js +0 -1736
  71. package/dist/index-B1YTQixL.js +0 -94
  72. package/dist/index-Bck4ccUg.js +0 -8823
  73. package/dist/index-Bd3qm4OS.js +0 -73
  74. package/dist/index-Bf1CQnVf.js +0 -38
  75. package/dist/index-Bxmnnz5i.js +0 -2028
  76. package/dist/index-C9nh5BLn.js +0 -203
  77. package/dist/index-CuvNtC_M.js +0 -61
  78. package/dist/index-DBBgCqy4.js +0 -745
  79. package/dist/index-Dbd4WA4r.js +0 -61
  80. package/dist/index-DtoC42Uc.js +0 -244
  81. package/dist/index-DxIh9bng.js +0 -95
  82. package/dist/loading-DQQFM2zv.js +0 -32695
  83. package/dist/lodash-CUcygy_y.js +0 -3678
  84. package/dist/membership-gqCeYak4.js +0 -216
  85. package/dist/moment-BWErdI6_.js +0 -2578
  86. package/dist/money-ByhxCoaH.js +0 -15
  87. package/dist/number-DS4j9P0D.js +0 -12
  88. package/dist/object-qECH92oz.js +0 -26
  89. package/dist/objectId-dwaoBfJX.js +0 -7
  90. package/dist/rule-D8ZBQIzB.js +0 -1973
  91. package/dist/rule-builder-DMFitmZ1.js +0 -89
  92. package/dist/template-CYd8I2d1.js +0 -190
  93. package/dist/usePagination-D5--dYpF.js +0 -223
  94. package/dist/xlsx-CjeOqYbn.js +0 -15491
@@ -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 { R as RuleOperator, _ } from "./index-Bck4ccUg.js";
2
- import { i as isRuleGroup } from "./rule-builder-DMFitmZ1.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-C9nh5BLn.js";
6
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-DBBgCqy4.js";
7
- import "./index-7KXsHcNf.js";
8
- import "./index-Bxmnnz5i.js";
9
- import "./index-DtoC42Uc.js";
10
- import "./index-Bf1CQnVf.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 i = rules[n](
12
+ const s = rules[n](
20
13
  l,
21
14
  t
22
15
  );
23
- return o && i;
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 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
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(i) {
87
- n.close(), o.onSelect(i);
76
+ function l(s) {
77
+ n.close(), o.onSelect(s);
88
78
  }
89
- return (i, c) => {
90
- const a = resolveComponent("FmCard");
91
- return openBlock(), createBlock(a, { class: "p-24 space-y-16" }, {
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
- _hoisted_1,
94
- createElementVNode("div", _hoisted_2, [
95
- (openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(a, {
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: s.value,
98
- onClick: (u) => l(s.value),
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", _hoisted_3, toDisplayString(s.title), 1),
103
- createElementVNode("div", _hoisted_4, toDisplayString(s.description), 1)
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))