@feedmepos/mf-connect 0.1.0-beta.9 → 0.1.1-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.
Files changed (102) hide show
  1. package/dist/Analytic-C2etD-eu.js +620 -0
  2. package/dist/{App-DQUbRsdA.js → App-DlRvkDpN.js} +58 -59
  3. package/dist/Broadcast-DpCGUS6r.js +216 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-BFllvG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cj4IcH5D.js} +20 -20
  5. package/dist/Card-DjGC6jmq.js +823 -0
  6. package/dist/Collections-Q2pYWnJF.js +440 -0
  7. package/dist/Credit-DOIq2VYW.js +214 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D7ML8ePp.js} +1010 -1026
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CyxWG5I7.js +344 -0
  10. package/dist/Experience-DUst4I0H.js +211 -0
  11. package/dist/Game-CXnQR-wV.js +250 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
  13. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
  14. package/dist/Marketing-CZfHsMFC.js +309 -0
  15. package/dist/Member-CX5Ohgeg.js +92 -0
  16. package/dist/MemberList-D8I3SaAs.js +1040 -0
  17. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  18. package/dist/{MemberTransactions-zSxSnUkK.js → MemberTransactions-DfZNbCHD.js} +1 -1
  19. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BxFVEoBX.js +203 -0
  20. package/dist/Mission-S1pwDbqp.js +248 -0
  21. package/dist/Point-BdLUcGZy.js +220 -0
  22. package/dist/Promotion-DWAeQGkU.js +244 -0
  23. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CTKKhH-r.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dux_NMO5.js} +577 -568
  24. package/dist/Segment-CXSE8Bzf.js +560 -0
  25. package/dist/Setting-CLuXuEId.js +1870 -0
  26. package/dist/Store-Be3cui0S.js +1533 -0
  27. package/dist/StoreRewards-zFy_w8p4.js +429 -0
  28. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-2Jqj_rKv.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DxGJKgbc.js} +10 -10
  29. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BkdSj0cX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dreo45H1.js} +1 -1
  30. package/dist/{Tier-Cpl0FV8L.js → Tier-ChzcISYF.js} +453 -481
  31. package/dist/{Title-CbMDd1Et.js → Title-DQSjhBkT.js} +295 -314
  32. package/dist/Transaction-CeWmWpN_.js +36 -0
  33. package/dist/Voucher-BkLIxiZN.js +485 -0
  34. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
  35. package/dist/app-CLNirPsB.js +2974 -0
  36. package/dist/{app-VxaUCtgl.js → app-DuNsy0aC.js} +1 -1
  37. package/dist/app.js +3 -5
  38. package/dist/{business-DR7jpnLz.js → business-COGiTmLD.js} +1 -1
  39. package/dist/{campaign-MqcTb329.js → campaign-BHZMjQi5.js} +3 -5
  40. package/dist/{collection.fn-CvEoe61K.js → collection.fn-sAxtYO_r.js} +2 -2
  41. package/dist/dto-ndeeV_nc.js +1145 -0
  42. package/dist/{effect-BjjQeiQg.js → effect-BQt0rkdT.js} +9 -9
  43. package/dist/email-addresses-B3PazwKs.js +705 -0
  44. package/dist/{export-B8cvWh5n.js → export-D6r-xNji.js} +3 -3
  45. package/dist/{helper-DfgVNY7B.js → helper-CrjQw_Et.js} +1 -1
  46. package/dist/{index-CWR3qYjb.js → index-Btlj28Vg.js} +1 -1
  47. package/dist/{index-C7zMfUgy.js → index-Buy-yvAZ.js} +319 -304
  48. package/dist/{index-0UYoh1-7.js → index-C3AAy__p.js} +1 -1
  49. package/dist/index-CHAaFSD2.js +11 -0
  50. package/dist/{index-Dap5R3vr.js → index-Cg3RFxc9.js} +91 -102
  51. package/dist/{index-2P9w5u3m.js → index-CqpEhMr6.js} +4 -4
  52. package/dist/{index-BsfWRB8R.js → index-CvHj-wYi.js} +1 -1
  53. package/dist/index-DGLmbBnE.js +28997 -0
  54. package/dist/{index-CJ8Uh2Ja.js → index-DXpd07G3.js} +3 -3
  55. package/dist/{index-B5NufbUt.js → index-Daax_BQa.js} +1 -1
  56. package/dist/{index-C2JNcGc-.js → index-DrLEuIe1.js} +281 -299
  57. package/dist/{index-DBy30v8N.js → index-tSEYvA-2.js} +3 -3
  58. package/dist/{index.esm2017-D1X3PgpO.js → index.esm2017-a5BlZ76G.js} +55 -55
  59. package/dist/{loading-CJ3nOovJ.js → loading-B3XGyQ8W.js} +460 -469
  60. package/dist/{membership-B1cmSRyk.js → membership-GIOJ1ptN.js} +3 -3
  61. package/dist/money-z7VwzhZP.js +15 -0
  62. package/dist/number-DHYb2ua_.js +12 -0
  63. package/dist/{rule-builder-CSmOONdb.js → rule-builder-CcsWd5r9.js} +1 -1
  64. package/dist/{rule-ChWyR-0j.js → rule-iIEblTE4.js} +179 -177
  65. package/dist/style.css +1 -1
  66. package/dist/{template-Cug7aRK0.js → template-DMRMDZOW.js} +63 -63
  67. package/dist/{xlsx-CfgPFFvp.js → usePagination-CNFe0T2B.js} +3176 -2955
  68. package/package.json +5 -8
  69. package/dist/Analytic-CMXUjK_F.js +0 -622
  70. package/dist/Broadcast-DowFtHv6.js +0 -223
  71. package/dist/Card-C7rhL0pV.js +0 -825
  72. package/dist/Collections-B-1wlk3r.js +0 -453
  73. package/dist/Credit-DDjozmoF.js +0 -220
  74. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-pwMuIgs5.js +0 -345
  75. package/dist/Experience-BbE-c1Op.js +0 -221
  76. package/dist/Game-DQdRpaN-.js +0 -255
  77. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  78. package/dist/MainLayout-B1aJoR95.js +0 -41
  79. package/dist/Marketing-Dgmxzg4h.js +0 -316
  80. package/dist/Member-w23oRVwN.js +0 -69
  81. package/dist/MemberList-BLIdjznQ.js +0 -1735
  82. package/dist/MemberOverview-wL_ailso.js +0 -58
  83. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dy_lMdZA.js +0 -432
  84. package/dist/Mission-Cjt0E083.js +0 -261
  85. package/dist/Point-CQJL3Ewu.js +0 -222
  86. package/dist/Promotion-BYViH3bu.js +0 -247
  87. package/dist/Segment-B9Jj1ak0.js +0 -437
  88. package/dist/Setting-DXWbgRxs.js +0 -1901
  89. package/dist/Store-Dswk2e_z.js +0 -1511
  90. package/dist/StoreRewards-CNUhG_Ue.js +0 -401
  91. package/dist/Transaction-BB-kk-84.js +0 -39
  92. package/dist/Voucher-b1_Jlm6X.js +0 -490
  93. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-pG-SrXp9.js +0 -56
  94. package/dist/app-DCHKJoql.js +0 -5639
  95. package/dist/dto-jcK3TGB7.js +0 -2770
  96. package/dist/index-Cv7pLAYq.js +0 -3
  97. package/dist/index-LrSSauN2.js +0 -29193
  98. package/dist/money-BEATdGS6.js +0 -15
  99. package/dist/number-CeAYAKCp.js +0 -12
  100. package/dist/usePagination-BeF5K3M7.js +0 -223
  101. package/dist/vue-i18n-BRhKDHdF.js +0 -2365
  102. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -2,68 +2,67 @@ import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent
2
2
  import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
3
3
  import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
4
4
  import { u as on } from "./app-wDQR6dpb.js";
5
- import { u as an } from "./business-DR7jpnLz.js";
6
- import "./index-Cv7pLAYq.js";
5
+ import { u as an } from "./business-COGiTmLD.js";
6
+ import "./index-CHAaFSD2.js";
7
7
  import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
8
- import { u as un } from "./vue-i18n-BRhKDHdF.js";
9
- import { R as f } from "./app-DCHKJoql.js";
10
- import { J as dn } from "./JsonViewer-v8_C7l5N.js";
11
- import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as K, o as wn, p as yn, s as En, t as kn, u as Sn } from "./index.esm2017-D1X3PgpO.js";
8
+ import { R as f } from "./app-CLNirPsB.js";
9
+ import { J as un } from "./JsonViewer-v8_C7l5N.js";
10
+ import { r as ye, L as dn, g as ft, i as hn, a as fn, _ as je, C as Ge, b as pn, S as z, c as w, d as j, E as be, e as mn, f as pt, h as gn, j as _n, k as mt, l as g, m as vn, F as Re, n as In, q as K, o as Tn, p as wn, s as yn, t as En, u as kn } from "./index.esm2017-a5BlZ76G.js";
12
11
  import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
13
- import { S as Be } from "./index-LrSSauN2.js";
12
+ import { S as Be, c as Sn } from "./index-DGLmbBnE.js";
14
13
  const bn = /* @__PURE__ */ lt({
15
14
  __name: "NavigationTab",
16
15
  setup(n) {
17
- const { t: e } = un(), t = te(), i = [
16
+ const e = te(), t = [
18
17
  {
19
- label: e("connect.navigation.analytic"),
18
+ label: "Analytic",
20
19
  value: f["$connect-ANALYTIC"]
21
20
  },
22
21
  {
23
- label: e("connect.navigation.campaign"),
22
+ label: "Campaign",
24
23
  value: f["$connect-CAMPAIGN"],
25
24
  children: [
26
25
  {
27
- label: e("connect.navigation.promotion"),
26
+ label: "Promotion",
28
27
  value: f["$connect-CAMPAIGN_PROMOTION"]
29
28
  },
30
29
  {
31
- label: e("connect.navigation.voucher"),
30
+ label: "Voucher",
32
31
  value: f["$connect-CAMPAIGN_VOUCHER"]
33
32
  },
34
33
  {
35
- label: e("connect.navigation.broadcast"),
34
+ label: "Broadcast",
36
35
  value: f["$connect-CAMPAIGN_BROADCAST"]
37
36
  }
38
37
  ]
39
38
  },
40
39
  {
41
- label: e("connect.navigation.program"),
40
+ label: "Program",
42
41
  value: f["$connect-PROGRAM"],
43
42
  children: [
44
43
  {
45
- label: e("connect.navigation.tier"),
44
+ label: "Tier",
46
45
  value: f["$connect-PROGRAM_TIER"]
47
46
  },
48
47
  {
49
- label: e("connect.navigation.title"),
48
+ label: "Title",
50
49
  value: f["$connect-PROGRAM_TITLE"]
51
50
  },
52
51
  {
53
- label: e("connect.navigation.experience"),
52
+ label: "Experience",
54
53
  value: f["$connect-PROGRAM_EXPERIENCE"]
55
54
  },
56
55
  {
57
- label: e("connect.navigation.point"),
56
+ label: "Point",
58
57
  value: f["$connect-PROGRAM_POINT"],
59
58
  badge: () => Q(Z.FmPill, { variant: "premium" })
60
59
  },
61
60
  {
62
- label: e("connect.navigation.credit"),
61
+ label: "Credit",
63
62
  value: f["$connect-PROGRAM_CREDIT"]
64
63
  },
65
64
  {
66
- label: e("connect.navigation.game"),
65
+ label: "Game",
67
66
  value: f["$connect-PROGRAM_GAME"],
68
67
  badge: () => Q(Z.FmPill, { variant: "premium" })
69
68
  },
@@ -74,31 +73,31 @@ const bn = /* @__PURE__ */ lt({
74
73
  ]
75
74
  },
76
75
  {
77
- label: e("connect.navigation.loyalty"),
76
+ label: "Loyalty",
78
77
  value: f["$connect-LOYALTY"],
79
78
  children: [
80
79
  {
81
- label: e("connect.navigation.member"),
80
+ label: "Member",
82
81
  value: f["$connect-LOYALTY_MEMBER_LIST"]
83
82
  },
84
83
  {
85
- label: e("connect.navigation.segments"),
84
+ label: "Segments",
86
85
  value: f["$connect-LOYALTY_SEGMENT"],
87
86
  badge: () => Q(Z.FmPill, { variant: "premium" })
88
87
  },
89
88
  {
90
- label: e("connect.navigation.card"),
89
+ label: "Card",
91
90
  value: f["$connect-LOYALTY_CARD"],
92
91
  badge: () => Q(Z.FmPill, { variant: "premium" })
93
92
  }
94
93
  ]
95
94
  },
96
95
  {
97
- label: e("connect.navigation.store"),
96
+ label: "Store",
98
97
  value: f["$connect-STORE"]
99
98
  },
100
99
  {
101
- label: e("connect.navigation.transaction"),
100
+ label: "Transaction",
102
101
  value: f["$connect-TRANSACTION"]
103
102
  },
104
103
  // {
@@ -106,29 +105,29 @@ const bn = /* @__PURE__ */ lt({
106
105
  // value: ROUTE_NAME['$connect-MARKETING'],
107
106
  // },
108
107
  {
109
- label: e("connect.navigation.setting"),
108
+ label: "Setting",
110
109
  value: f["$connect-SETTING"]
111
110
  }
112
- ], r = nn(), s = ht(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
111
+ ], i = nn(), r = ht(), s = t.reduce((c, a) => [...(a.children ?? []).map((l) => l.value), ...c, a.value], []);
113
112
  ut(
114
- () => s,
115
- (a) => {
116
- const l = a.matched.map((d) => d.name).reverse();
117
- t.value = l.find((d) => o.includes(d));
113
+ () => r,
114
+ (c) => {
115
+ const a = c.matched.map((l) => l.name).reverse();
116
+ e.value = a.find((l) => s.includes(l));
118
117
  },
119
118
  { immediate: !0 }
120
119
  );
121
- async function c(a) {
122
- await r.push({ name: a });
120
+ async function o(c) {
121
+ await i.push({ name: c });
123
122
  }
124
- return (a, l) => {
125
- var h;
126
- const d = Yt("FmCollapsibleTabs");
127
- return ne(), dt(d, {
123
+ return (c, a) => {
124
+ var d;
125
+ const l = Yt("FmCollapsibleTabs");
126
+ return ne(), dt(l, {
128
127
  class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
129
- "model-value": (h = P(t)) == null ? void 0 : h.toString(),
130
- items: i,
131
- "onUpdate:modelValue": c
128
+ "model-value": (d = P(e)) == null ? void 0 : d.toString(),
129
+ items: t,
130
+ "onUpdate:modelValue": o
132
131
  }, null, 8, ["model-value"]);
133
132
  };
134
133
  }
@@ -173,7 +172,7 @@ const An = gt, _t = new be("auth", "Firebase", gt());
173
172
  * See the License for the specific language governing permissions and
174
173
  * limitations under the License.
175
174
  */
176
- const ae = new hn("@firebase/auth");
175
+ const ae = new dn("@firebase/auth");
177
176
  function Cn(n, ...e) {
178
177
  ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
179
178
  }
@@ -278,7 +277,7 @@ function Nn() {
278
277
  // navigator.onLine behavior unless cordova-plugin-network-information is
279
278
  // installed which overwrites the native navigator.onLine value and
280
279
  // defines navigator.connection.
281
- (On() || mn() || "connection" in navigator) ? navigator.onLine : !0;
280
+ (On() || pn() || "connection" in navigator) ? navigator.onLine : !0;
282
281
  }
283
282
  function Ln() {
284
283
  if (typeof navigator > "u")
@@ -310,7 +309,7 @@ function Ln() {
310
309
  */
311
310
  class J {
312
311
  constructor(e, t) {
313
- this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
312
+ this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = hn() || fn();
314
313
  }
315
314
  get() {
316
315
  return Nn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
@@ -661,7 +660,7 @@ function Oe(n) {
661
660
  if (e === void 0 || t === void 0 || i === void 0)
662
661
  return ie("JWT malformed, contained fewer than 3 sections"), null;
663
662
  try {
664
- const r = Tn(t);
663
+ const r = In(t);
665
664
  return r ? JSON.parse(r) : (ie("Failed to decode base64 JWT payload"), null);
666
665
  } catch (r) {
667
666
  return ie("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
@@ -1412,7 +1411,7 @@ function Bn(n = g()) {
1412
1411
  return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1413
1412
  }
1414
1413
  function qn() {
1415
- return wn() && document.documentMode === 10;
1414
+ return Tn() && document.documentMode === 10;
1416
1415
  }
1417
1416
  function Nt(n = g()) {
1418
1417
  return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
@@ -1971,7 +1970,7 @@ function pe(n) {
1971
1970
  }
1972
1971
  class Xe {
1973
1972
  constructor(e) {
1974
- this.auth = e, this.observer = null, this.addObserver = gn((t) => this.observer = t);
1973
+ this.auth = e, this.observer = null, this.addObserver = mn((t) => this.observer = t);
1975
1974
  }
1976
1975
  get next() {
1977
1976
  return u(
@@ -2038,7 +2037,7 @@ function ii(n, e) {
2038
2037
  const t = pt(n, "auth");
2039
2038
  if (t.isInitialized()) {
2040
2039
  const r = t.getImmediate(), s = t.getOptions();
2041
- if (In(s, e ?? {}))
2040
+ if (vn(s, e ?? {}))
2042
2041
  return r;
2043
2042
  S(
2044
2043
  r,
@@ -4256,7 +4255,7 @@ async function st(n, e, t, i, r, s) {
4256
4255
  eventId: r
4257
4256
  };
4258
4257
  if (e instanceof Dt) {
4259
- e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", yn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4258
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", wn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4260
4259
  for (const [d, h] of Object.entries({}))
4261
4260
  o[d] = h;
4262
4261
  }
@@ -4509,7 +4508,7 @@ const br = (n) => async (e) => {
4509
4508
  } : {}
4510
4509
  }));
4511
4510
  };
4512
- function Rr(n = vn()) {
4511
+ function Rr(n = _n()) {
4513
4512
  const e = pt(n, "auth");
4514
4513
  if (e.isInitialized())
4515
4514
  return e.getImmediate();
@@ -4528,7 +4527,7 @@ function Rr(n = vn()) {
4528
4527
  mi(t, o, () => o(t.currentUser)), pi(t, (c) => o(c));
4529
4528
  }
4530
4529
  }
4531
- const r = _n("auth");
4530
+ const r = gn("auth");
4532
4531
  return r && si(t, `http://${r}`), t;
4533
4532
  }
4534
4533
  function Pr() {
@@ -4556,11 +4555,11 @@ Er(
4556
4555
  "Browser"
4557
4556
  /* ClientPlatform.BROWSER */
4558
4557
  );
4559
- var Ar = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Cr = { 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" };
4558
+ var Ar = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476" }, Cr = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedme.cc" };
4560
4559
  const Or = {
4561
4560
  key: 1,
4562
4561
  class: "h-full w-full"
4563
- }, Nr = ["src"], qr = /* @__PURE__ */ lt({
4562
+ }, Nr = ["src"], Br = /* @__PURE__ */ lt({
4564
4563
  __name: "App",
4565
4564
  setup(n) {
4566
4565
  const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
@@ -4568,18 +4567,18 @@ const Or = {
4568
4567
  return `${Cr.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
4569
4568
  });
4570
4569
  async function F() {
4571
- if (En().length) {
4570
+ if (yn().length) {
4572
4571
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4573
4572
  return;
4574
4573
  }
4575
- const p = kn(Ar.firebase), m = await sn.getCustomToken(), v = Rr();
4576
- await fi(v, m), Sn(p), console.log("initFirebase", p);
4574
+ const p = En(Ar.firebase), m = await sn.getCustomToken(), v = Rr();
4575
+ await fi(v, m), kn(p), console.log("initFirebase", p);
4577
4576
  }
4578
4577
  const M = async () => {
4579
4578
  d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(bn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
4580
4579
  };
4581
4580
  return Xt(() => {
4582
- if (t.initProvider(r, s), !c.value) {
4581
+ if (Sn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4583
4582
  const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
4584
4583
  p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4585
4584
  }
@@ -4592,7 +4591,7 @@ const Or = {
4592
4591
  ), (p, m) => (ne(), He(Qt, null, [
4593
4592
  P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : $e("", !0),
4594
4593
  P(d) && P(h) !== "v2" ? (ne(), He("div", Or, [
4595
- Zt(dn, {
4594
+ Zt(un, {
4596
4595
  json: { url: P(_) }
4597
4596
  }, null, 8, ["json"]),
4598
4597
  en("iframe", {
@@ -4607,5 +4606,5 @@ const Or = {
4607
4606
  }
4608
4607
  });
4609
4608
  export {
4610
- qr as default
4609
+ Br as default
4611
4610
  };
@@ -0,0 +1,216 @@
1
+ import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as l, openBlock as i, createElementBlock as f, Fragment as _, createVNode as r, unref as a, createElementVNode as s, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as E, toDisplayString as b, createCommentVNode as H, h as q } from "vue";
2
+ import { _ as z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
+ import { u as Q, p as W } from "./loading-B3XGyQ8W.js";
5
+ import { u as X } from "./business-COGiTmLD.js";
6
+ import { u as Y } from "./campaign-BHZMjQi5.js";
7
+ import { g as F, b as k } from "./dto-ndeeV_nc.js";
8
+ import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D7ML8ePp.js";
10
+ import { u as te } from "./template-DMRMDZOW.js";
11
+ import { c as y } from "./index-Btlj28Vg.js";
12
+ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ne = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, ce = { class: "fm-typo-en-body-lg-600" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { key: 0 }, ue = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), pe = [
13
+ ue
14
+ ], fe = /* @__PURE__ */ s("img", {
15
+ src: z,
16
+ class: "aspect-square w-[150px]"
17
+ }, null, -1), ye = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
18
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, " Create your broadcast campaign "),
19
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Broadcasting allows you to send text messages to all your customers, informing them about new deals, events, or important updates. ")
20
+ ], -1), Ae = /* @__PURE__ */ P({
21
+ __name: "Broadcast",
22
+ setup(ge) {
23
+ const A = {
24
+ label: "Create campaign",
25
+ value: "create",
26
+ isPrimary: !0,
27
+ prependIcon: "add"
28
+ }, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor: C } = Q, L = g((/* @__PURE__ */ new Date()).toISOString()), n = g({
29
+ searchKey: "",
30
+ location: null
31
+ }), u = U(
32
+ () => c.campaigns.broadcast.filter(
33
+ (e) => !n.value.location || !e.targetLocation || e.targetLocation.includes(n.value.location)
34
+ )
35
+ ), T = [
36
+ {
37
+ header: "Broadcast title",
38
+ accessorFn: (e) => e.name
39
+ },
40
+ {
41
+ header: "Status",
42
+ cell(e) {
43
+ return F(e.row.original);
44
+ }
45
+ },
46
+ {
47
+ header: "Summary",
48
+ accessorFn: (e) => k(e)
49
+ },
50
+ {
51
+ header: "Message sent",
52
+ accessorFn: (e) => e.currentReceive ?? "N/A"
53
+ },
54
+ {
55
+ header: "Actions",
56
+ cell(e) {
57
+ return q(J.FmButton, {
58
+ variant: "tertiary",
59
+ icon: "delete",
60
+ iconColor: "neutral-gray-400",
61
+ onClick: (o) => {
62
+ o.stopPropagation(), x(e.row.original);
63
+ }
64
+ });
65
+ }
66
+ }
67
+ ], v = g();
68
+ async function x(e) {
69
+ await W.remove(`Are you sure you want to remove ${e.name}?`) && await C(
70
+ async () => {
71
+ await y.delete(e._id), await c.read("BROADCAST");
72
+ },
73
+ {
74
+ message: `Removing ${e.name}`,
75
+ successMessage: `Removed ${e.name} successfully`
76
+ }
77
+ );
78
+ }
79
+ async function p(e) {
80
+ L.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await o() : V.open(async (m) => {
81
+ await o(m);
82
+ });
83
+ async function o(m) {
84
+ var d;
85
+ (d = v.value) == null || d.showSheet(
86
+ !0,
87
+ "BROADCAST",
88
+ e ? await y.readById(e._id) : void 0,
89
+ m
90
+ );
91
+ }
92
+ }
93
+ async function $(e) {
94
+ await C(
95
+ async () => {
96
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await c.read("BROADCAST");
97
+ },
98
+ {
99
+ message: `${e.campaign._id ? "Updating" : "Creating"} broadcast`,
100
+ successMessage: `Broadcast ${e.campaign._id ? "updated" : "created"} successfully`
101
+ }
102
+ );
103
+ }
104
+ return M(async () => {
105
+ await D(async () => {
106
+ await c.read("BROADCAST");
107
+ });
108
+ }), (e, o) => {
109
+ const m = l("FmPageHead"), d = l("FmSearch"), K = l("FmTable"), S = l("FmButton"), I = l("FmListItem"), O = l("FmList"), N = l("FmCard");
110
+ return i(), f(_, null, [
111
+ r(m, {
112
+ title: "Broadcast",
113
+ actions: a(u).length > 0 ? [A] : [],
114
+ "onClick:action": o[0] || (o[0] = () => p())
115
+ }, null, 8, ["actions"]),
116
+ s("div", oe, [
117
+ r(d, {
118
+ modelValue: a(n).searchKey,
119
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => a(n).searchKey = t),
120
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
121
+ placeholder: "search",
122
+ collapsible: ""
123
+ }, null, 8, ["modelValue"]),
124
+ a(c).campaigns.broadcast && a(c).campaigns.broadcast.length > 0 ? (i(), f(_, { key: 0 }, [
125
+ s("div", ae, [
126
+ s("div", se, [
127
+ r(Z, {
128
+ modelValue: a(n).location,
129
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => a(n).location = t),
130
+ label: "Location: ",
131
+ "show-item-label": !0,
132
+ icon: "storefront",
133
+ placement: "bottom-start",
134
+ items: a(R).locationItems
135
+ }, null, 8, ["modelValue", "items"])
136
+ ]),
137
+ r(d, {
138
+ modelValue: a(n).searchKey,
139
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => a(n).searchKey = t),
140
+ class: "xs:hidden",
141
+ placeholder: "search",
142
+ collapsible: ""
143
+ }, null, 8, ["modelValue"])
144
+ ]),
145
+ r(K, {
146
+ class: "xs:hidden",
147
+ "row-data": a(u),
148
+ "column-defs": T,
149
+ "search-value": a(n).searchKey,
150
+ "column-filter": [],
151
+ onRowClick: o[4] || (o[4] = (t) => p(t.original)),
152
+ "hide-footer": !0
153
+ }, null, 8, ["row-data", "search-value"]),
154
+ r(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
155
+ default: h(() => [
156
+ (i(!0), f(_, null, j(a(u).filter(
157
+ (t) => t.name.toLowerCase().includes(a(n).searchKey.toLowerCase())
158
+ ), (t) => (i(), w(I, {
159
+ key: t._id.toString(),
160
+ onClick: (B) => p(t),
161
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
162
+ }, {
163
+ default: h(() => [
164
+ s("div", ne, [
165
+ s("div", re, [
166
+ (i(), w(E(a(F)(t)))),
167
+ s("div", le, b(t.currentReceive ?? 0) + " sent ", 1)
168
+ ]),
169
+ s("div", ie, [
170
+ s("div", ce, b(t.name), 1),
171
+ s("div", me, b(a(k)(t)), 1)
172
+ ])
173
+ ]),
174
+ r(S, {
175
+ icon: "delete",
176
+ "icon-color": "neutral-gray-400",
177
+ variant: "tertiary",
178
+ onClick: (B) => (B.stopPropagation(), x(t))
179
+ }, null, 8, ["onClick"])
180
+ ]),
181
+ _: 2
182
+ }, 1032, ["onClick"]))), 128))
183
+ ]),
184
+ _: 1
185
+ }),
186
+ a(u).length == 0 ? (i(), f("div", de, pe)) : H("", !0)
187
+ ], 64)) : (i(), w(N, {
188
+ key: 1,
189
+ variant: "outlined",
190
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
191
+ }, {
192
+ default: h(() => [
193
+ fe,
194
+ ye,
195
+ r(S, {
196
+ variant: "primary",
197
+ label: "Create broadcast campaign",
198
+ icon: "add",
199
+ onClick: o[5] || (o[5] = (t) => p())
200
+ })
201
+ ]),
202
+ _: 1
203
+ })),
204
+ r(ee, {
205
+ ref_key: "sheetRef",
206
+ ref: v,
207
+ "onSubmit:modelValue": $
208
+ }, null, 512)
209
+ ])
210
+ ], 64);
211
+ };
212
+ }
213
+ });
214
+ export {
215
+ Ae as default
216
+ };
@@ -1,13 +1,13 @@
1
- import { R as RuleOperator, _ } from "./index-C7zMfUgy.js";
2
- import { i as isRuleGroup } from "./rule-builder-CSmOONdb.js";
1
+ import { R as RuleOperator, _ } from "./index-Buy-yvAZ.js";
2
+ import { i as isRuleGroup } from "./rule-builder-CcsWd5r9.js";
3
3
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
4
4
  import { useDialog } from "@feedmepos/ui-library";
5
- import "./index-CJ8Uh2Ja.js";
6
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-Dap5R3vr.js";
7
- import "./index-DBy30v8N.js";
8
- import "./index-C2JNcGc-.js";
9
- import "./index-2P9w5u3m.js";
10
- import "./index-B5NufbUt.js";
5
+ import "./index-DXpd07G3.js";
6
+ import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-Cg3RFxc9.js";
7
+ import "./index-tSEYvA-2.js";
8
+ import "./index-DrLEuIe1.js";
9
+ import "./index-CqpEhMr6.js";
10
+ import "./index-Daax_BQa.js";
11
11
  function validateRule(data, r, date) {
12
12
  const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
13
13
  function meetConditions(e) {
@@ -39,7 +39,10 @@ function validateRule(data, r, date) {
39
39
  }
40
40
  return isRuleGroup(r) ? evaluateRuleResult(getRuleResults(r), r.logic) : meetConditions(r);
41
41
  }
42
- 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({
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({
43
46
  __name: "CampaignTypeDialog",
44
47
  props: {
45
48
  onSelect: {
@@ -83,24 +86,21 @@ const _hoisted_1 = { class: "flex flex-col h-full space-y-24" }, _hoisted_2 = {
83
86
  function l(i) {
84
87
  n.close(), o.onSelect(i);
85
88
  }
86
- return (i, a) => {
87
- const c = resolveComponent("FmCard");
88
- return openBlock(), createBlock(c, { class: "p-24 space-y-16" }, {
89
+ return (i, c) => {
90
+ const a = resolveComponent("FmCard");
91
+ return openBlock(), createBlock(a, { class: "p-24 space-y-16" }, {
89
92
  default: withCtx(() => [
90
- a[0] || (a[0] = createElementVNode("div", { class: "" }, [
91
- createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
92
- 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. ")
93
- ], -1)),
94
- createElementVNode("div", _hoisted_1, [
95
- (openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(c, {
93
+ _hoisted_1,
94
+ createElementVNode("div", _hoisted_2, [
95
+ (openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(a, {
96
96
  variant: "outlined",
97
97
  key: s.value,
98
98
  onClick: (u) => l(s.value),
99
99
  class: "p-16 space-y-8 cursor-pointer"
100
100
  }, {
101
101
  default: withCtx(() => [
102
- createElementVNode("div", _hoisted_2, toDisplayString(s.title), 1),
103
- createElementVNode("div", _hoisted_3, toDisplayString(s.description), 1)
102
+ createElementVNode("div", _hoisted_3, toDisplayString(s.title), 1),
103
+ createElementVNode("div", _hoisted_4, toDisplayString(s.description), 1)
104
104
  ]),
105
105
  _: 2
106
106
  }, 1032, ["onClick"])), 64))