@feedmepos/mf-connect 0.1.47-prod → 0.1.48-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-AnuRQDA4.js → Analytic-DrjBaKmx.js} +113 -113
  2. package/dist/{App-DP_jCyej.js → App-eIaytGsZ.js} +632 -622
  3. package/dist/{Bin-tL4lF6PB.js → Bin-CVp0eFwl.js} +9 -9
  4. package/dist/{Broadcast-T2a5tN8R.js → Broadcast-DBgBT6yz.js} +40 -40
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CugJWeBo.js} +18 -18
  6. package/dist/{Card-Bi-ODgCc.js → Card-DkP6oJVn.js} +239 -239
  7. package/dist/{Collections-JHWotZ1I.js → Collections-DYb_aeTW.js} +31 -31
  8. package/dist/{Credit-DQQCXqS0.js → Credit-WVv_PL5D.js} +74 -74
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js} +756 -753
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js} +96 -96
  11. package/dist/{Experience-DzTV21vX.js → Experience-BdH44wBG.js} +41 -41
  12. package/dist/{Game-DUCx2Dl9.js → Game-C7jxRESY.js} +31 -31
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  14. package/dist/{Index-zynxjOOr.js → Index-DYr1p4sh.js} +54 -54
  15. package/dist/{Marketing-BBHDVRkR.js → Marketing-Djl27fez.js} +24 -24
  16. package/dist/{Member-B09bj6C3.js → Member-CWXedfTG.js} +63 -63
  17. package/dist/MemberList-C2TvGi22.js +1606 -0
  18. package/dist/MemberOverview-wL_ailso.js +58 -0
  19. package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BSUocGg9.js} +1 -1
  20. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js} +2286 -2220
  21. package/dist/{Mission-DAv0e_ZH.js → Mission-BVx9Cqi5.js} +20 -20
  22. package/dist/{Overview-D0rBTEtP.js → Overview-DyXF9zfB.js} +337 -337
  23. package/dist/{Point-BeBYi1BT.js → Point-ovkgTwZO.js} +41 -41
  24. package/dist/{Promotion-BSPU5hP9.js → Promotion-B0Q6GItP.js} +42 -42
  25. package/dist/{Queue-C5IFJ3iE.js → Queue-BAWG1Hh-.js} +12 -12
  26. package/dist/{Record-CoFSrv7j.js → Record-CTp80g4A.js} +10 -10
  27. package/dist/{Reward-COIOBOl-.js → Reward-_Jow1lJ7.js} +173 -173
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-BV8xCejA.js} +11 -11
  29. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js} +381 -381
  30. package/dist/{Segment-DF5SrucQ.js → Segment-CsdJ1SjK.js} +327 -327
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-DH3oIm2t.js} +14 -14
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DvVrjpxR.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5gV89Xk.js} +3 -3
  34. package/dist/Setting-BZRA50LO.js +1936 -0
  35. package/dist/{Store-E2_0EIy8.js → Store-CFnCN_7-.js} +238 -238
  36. package/dist/StoreRewards-B_McpBz-.js +423 -0
  37. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-vL0vr-Xn.js} +185 -185
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js} +1 -1
  39. package/dist/{Tier-CEEHsXkC.js → Tier-CCYFu6kJ.js} +106 -106
  40. package/dist/{Title-BMAWlGeW.js → Title-7Mg-Ml4z.js} +95 -95
  41. package/dist/{Transaction-CLsceq-O.js → Transaction-BqZrbpZi.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js} +6 -6
  43. package/dist/{Voucher-Cd293WYY.js → Voucher-Yty_7SuS.js} +36 -36
  44. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js +419 -0
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js} +1 -1
  46. package/dist/{app-aVXsWATU.js → app-2EJP4psh.js} +31 -31
  47. package/dist/app-Dzon--6x.js +57962 -0
  48. package/dist/app.js +1 -1
  49. package/dist/{business-DVlHPzaL.js → business-BehG4fR2.js} +1 -1
  50. package/dist/{campaign-l-u9A514.js → campaign-BpaiTG4f.js} +10 -10
  51. package/dist/{campaign-D9KeUWA7.js → campaign-CAcP56Sz.js} +2 -2
  52. package/dist/{campaign.enum-Cud82tES.js → campaign.enum-BWjI8Hop.js} +1 -1
  53. package/dist/{campaign.fn-C-UojhHv.js → campaign.fn-PVdB1-V1.js} +166 -166
  54. package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BYmuqayi.js} +1 -1
  55. package/dist/{collection.fn-yR-xnV4g.js → collection.fn-CbH8hbWW.js} +2 -2
  56. package/dist/{dto-Cua1OHMY.js → dto-Dd3Oc4QO.js} +4 -4
  57. package/dist/{effect-B5-eXNEr.js → effect-DvEQNEl0.js} +1 -1
  58. package/dist/{email-addresses-BeYh5fr5.js → email-addresses-C-9JrAi8.js} +1 -1
  59. package/dist/{export-BUF4_DUz.js → export-RWE9Cn-d.js} +4 -4
  60. package/dist/{helper-CGwOThAl.js → helper-Bl6LdWED.js} +1 -1
  61. package/dist/{index-Cl2iYM2F.js → index-1bU9cLqV.js} +1 -1
  62. package/dist/{index-1BGPM6Uy.js → index-BCQMVr1J.js} +1 -1
  63. package/dist/{index-BmL_b0IR.js → index-Bgnrbk5x.js} +1 -1
  64. package/dist/{index-knuJv0ti.js → index-Bjf5Z2QE.js} +4 -4
  65. package/dist/{index-ng2IXlL1.js → index-CFW9ogow.js} +1 -1
  66. package/dist/{index-DNTd-FNx.js → index-CfgczUMX.js} +2 -2
  67. package/dist/{index-C-d_4n-1.js → index-CzCqc7ph.js} +1 -1
  68. package/dist/{index-aMDi62-C.js → index-DX1X6Owa.js} +1 -1
  69. package/dist/{index-DlFVLRKG.js → index-DZN5WWgq.js} +3 -3
  70. package/dist/{index-D5KIp8ZB.js → index-DhUvELhc.js} +3 -3
  71. package/dist/{index-Cx8-ipee.js → index-DpoNuVc-.js} +6 -6
  72. package/dist/{index-BLdVWQId.js → index-G_XSbrXB.js} +3 -3
  73. package/dist/{index-hX2mE0gQ.js → index-VVy4GPzJ.js} +1 -1
  74. package/dist/{index-CB8iWT_p.js → index-wOExBjGo.js} +1 -1
  75. package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DfgZFSqe.js} +1 -1
  76. package/dist/{loading-c4b7n9Xp.js → loading-qlqqYGF3.js} +1 -1
  77. package/dist/{membership-oBIs4sbL.js → membership-Bh_1iu5v.js} +3 -3
  78. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  79. package/dist/{money-AP24H0gk.js → money-DvTB_Fek.js} +1 -1
  80. package/dist/{number-CwsAYC_2.js → number-DJQ3gi1P.js} +1 -1
  81. package/dist/objectid-BKU0cEuv.js +145 -0
  82. package/dist/{plugins-Dn7JDHi7.js → plugins-DJpBrPbQ.js} +2 -2
  83. package/dist/{reward-4wdoZeXw.js → reward-DZ4KlN9B.js} +1 -1
  84. package/dist/{rule-_OJza6tn.js → rule-DV0yCGlq.js} +4 -4
  85. package/dist/{rule-builder-DmlhHAED.js → rule-builder-D6ihVPNO.js} +1 -1
  86. package/dist/{template-BSQLFHf4.js → template-ElP-JIFL.js} +63 -63
  87. package/dist/timezone-FaHjut_D.js +1150 -0
  88. package/dist/{trigger-DC9tDnI2.js → trigger-D8wnJVTA.js} +4 -4
  89. package/dist/usePagination-Ds-cuHop.js +223 -0
  90. package/dist/{user-CCVOptFD.js → user-NWV9KppR.js} +1 -1
  91. package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-CkbS-IDD.js} +112 -112
  92. package/dist/{xlsx-BVMaOi8M.js → xlsx-CdQE5RZi.js} +226 -226
  93. package/package.json +5 -4
  94. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  95. package/dist/MemberList-DLSLGQ02.js +0 -1606
  96. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  97. package/dist/Setting-Dt0sG_hk.js +0 -1936
  98. package/dist/StoreRewards-DuSsWnTE.js +0 -423
  99. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
  100. package/dist/app-jRT7vsk_.js +0 -33357
  101. package/dist/objectid-CVDLTdni.js +0 -145
  102. package/dist/usePagination-JoYaROkV.js +0 -223
@@ -1,23 +1,23 @@
1
1
  import { defineComponent as j, ref as y, watch as X, onMounted as I, resolveComponent as x, openBlock as d, createBlock as A, withCtx as L, createVNode as h, unref as t, createElementVNode as i, createElementBlock as k, Fragment as $, renderList as D, computed as G, toDisplayString as O, isRef as T, createSlots as Y, createCommentVNode as V, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
2
- import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
- import "./index-BLdVWQId.js";
4
- import "./campaign-l-u9A514.js";
5
- import { useRouter as le } from "vue-router";
6
- import { c as R } from "./index-1BGPM6Uy.js";
7
- import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js";
2
+ import { _ as le } from "./campaign-CpzFl8Vr.js";
3
+ import "./index-G_XSbrXB.js";
4
+ import "./campaign-BpaiTG4f.js";
5
+ import { useRouter as ne } from "vue-router";
6
+ import { c as R } from "./index-BCQMVr1J.js";
7
+ import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js";
8
8
  import { Z as se } from "./zod-Bg2FbC-D.js";
9
- import { F as re } from "./dto-Cua1OHMY.js";
9
+ import { F as re } from "./dto-Dd3Oc4QO.js";
10
10
  import { J as ie } from "./JsonViewer-v8_C7l5N.js";
11
- import "./index-D5KIp8ZB.js";
11
+ import "./index-DhUvELhc.js";
12
12
  import { useSnackbar as ue } from "@feedmepos/ui-library";
13
13
  import { u as ce } from "./app-wDQR6dpb.js";
14
- import { u as me } from "./loading-c4b7n9Xp.js";
15
- import { C as de } from "./campaign.fn-C-UojhHv.js";
14
+ import { u as me } from "./loading-qlqqYGF3.js";
15
+ import { C as de } from "./campaign.fn-PVdB1-V1.js";
16
16
  import { g as pe } from "./object-qECH92oz.js";
17
- import { u as ve } from "./campaign-D9KeUWA7.js";
18
- import { u as fe } from "./membership-oBIs4sbL.js";
19
- import { u as ye } from "./vue-i18n--_Wu1nMj.js";
20
- const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
17
+ import { u as ve } from "./campaign-CAcP56Sz.js";
18
+ import { u as fe } from "./membership-Bh_1iu5v.js";
19
+ import { u as ye } from "./vue-i18n-CkbS-IDD.js";
20
+ const ge = { class: "ml-32 flex flex-col" }, _e = /* @__PURE__ */ j({
21
21
  __name: "CampaignCard",
22
22
  props: {
23
23
  title: {},
@@ -26,43 +26,43 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
26
26
  },
27
27
  emits: ["update:model-value"],
28
28
  setup(U, { emit: b }) {
29
- const u = U, v = b, S = (o) => {
30
- o ? p.value = u.items.map((a) => a.value) : p.value = [], r.value = o, v("update:model-value", p.value);
31
- }, _ = (o) => {
32
- p.value = o, r.value = o.length === u.items.length, v("update:model-value", o);
29
+ const c = U, v = b, S = (o) => {
30
+ o ? p.value = c.items.map((a) => a.value) : p.value = [], r.value = o, v("update:model-value", p.value);
31
+ }, g = (o) => {
32
+ p.value = o, r.value = o.length === c.items.length, v("update:model-value", o);
33
33
  }, r = y(!1), p = y([]);
34
34
  return X(
35
- () => u.modelValue,
35
+ () => c.modelValue,
36
36
  () => {
37
- p.value = u.modelValue.filter(
38
- (o) => u.items.find((a) => a.value === o)
37
+ p.value = c.modelValue.filter(
38
+ (o) => c.items.find((a) => a.value === o)
39
39
  );
40
40
  }
41
41
  ), I(() => {
42
- p.value = u.modelValue.filter(
43
- (o) => u.items.find((a) => a.value === o)
42
+ p.value = c.modelValue.filter(
43
+ (o) => c.items.find((a) => a.value === o)
44
44
  );
45
45
  }), (o, a) => {
46
- const g = x("FmCheckbox"), l = x("FmCard");
47
- return d(), A(l, {
46
+ const _ = x("FmCheckbox"), n = x("FmCard");
47
+ return d(), A(n, {
48
48
  variant: "outlined",
49
49
  class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
50
50
  }, {
51
51
  default: L(() => [
52
- h(g, {
52
+ h(_, {
53
53
  "model-value": t(r),
54
54
  value: "1",
55
- label: u.title,
55
+ label: c.title,
56
56
  indeterminate: t(p).length > 0,
57
57
  "onUpdate:modelValue": S
58
58
  }, null, 8, ["model-value", "label", "indeterminate"]),
59
- i("div", _e, [
60
- (d(!0), k($, null, D(u.items, (n, c) => (d(), A(g, {
61
- key: c,
59
+ i("div", ge, [
60
+ (d(!0), k($, null, D(c.items, (l, u) => (d(), A(_, {
61
+ key: u,
62
62
  "model-value": t(p),
63
- label: n.label,
64
- value: n.value,
65
- "onUpdate:modelValue": _
63
+ label: l.label,
64
+ value: l.value,
65
+ "onUpdate:modelValue": g
66
66
  }, null, 8, ["model-value", "label", "value"]))), 128))
67
67
  ])
68
68
  ]),
@@ -84,40 +84,40 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
84
84
  },
85
85
  emits: ["update:model-value"],
86
86
  setup(U, { emit: b }) {
87
- const u = y(""), v = y([]), S = U, _ = b, r = G(() => Object.entries(S.campaigns).reduce((o, [a, g]) => {
88
- const l = g.filter(
89
- (n) => n.label.toLowerCase().includes(u.value.toLowerCase())
87
+ const c = y(""), v = y([]), S = U, g = b, r = G(() => Object.entries(S.campaigns).reduce((o, [a, _]) => {
88
+ const n = _.filter(
89
+ (l) => l.label.toLowerCase().includes(c.value.toLowerCase())
90
90
  );
91
- return l.length > 0 && (o[a] = l), o;
91
+ return n.length > 0 && (o[a] = n), o;
92
92
  }, {}));
93
93
  function p(o, a) {
94
94
  v.value = v.value.filter(
95
- (g) => !a.map((l) => l.value).includes(g)
96
- ), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], _("update:model-value", v.value);
95
+ (_) => !a.map((n) => n.value).includes(_)
96
+ ), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], g("update:model-value", v.value);
97
97
  }
98
98
  return I(() => {
99
99
  v.value = S.modelValue;
100
100
  }), (o, a) => {
101
- const g = x("FmTextField");
101
+ const _ = x("FmTextField");
102
102
  return d(), k($, null, [
103
103
  h(ie, { json: U.campaigns }, null, 8, ["json"]),
104
104
  i("div", he, [
105
105
  i("div", be, [
106
106
  i("div", xe, O(t(v).length) + " campaign(s) linked ", 1),
107
- h(g, {
108
- modelValue: t(u),
109
- "onUpdate:modelValue": a[0] || (a[0] = (l) => T(u) ? u.value = l : null),
107
+ h(_, {
108
+ modelValue: t(c),
109
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => T(c) ? c.value = n : null),
110
110
  "prepend-icon": "search",
111
111
  placeholder: "Search",
112
112
  class: "w-full"
113
113
  }, null, 8, ["modelValue"])
114
114
  ]),
115
115
  i("div", Ce, [
116
- (d(!0), k($, null, D(t(r), (l, n) => (d(), A(ge, {
116
+ (d(!0), k($, null, D(t(r), (n, l) => (d(), A(_e, {
117
117
  "model-value": t(v),
118
- title: n,
119
- items: l,
120
- "onUpdate:modelValue": (c) => p(c, l)
118
+ title: l,
119
+ items: n,
120
+ "onUpdate:modelValue": (u) => p(u, n)
121
121
  }, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
122
122
  ])
123
123
  ])
@@ -127,26 +127,26 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
127
127
  }), Ve = { class: "flex items-center gap-x-8" }, Se = {
128
128
  key: 0,
129
129
  class: "space-y-16 pr-12"
130
- }, we = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1), Fe = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1), Ae = { class: "flex items-center gap-x-16" }, $e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ue = { class: "mt-16" }, Pe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Le = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Ge = { class: "flex items-center gap-8" }, Me = /* @__PURE__ */ j({
130
+ }, we = { class: "flex items-center gap-x-16" }, Fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ae = { class: "mt-16" }, $e = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Ue = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Pe = { class: "flex items-center gap-8" }, Le = /* @__PURE__ */ j({
131
131
  __name: "AnalyticSheet",
132
132
  emits: ["success"],
133
- setup(U, { expose: b, emit: u }) {
134
- const v = u, S = ce();
133
+ setup(U, { expose: b, emit: c }) {
134
+ const v = c, S = ce();
135
135
  ue();
136
- const _ = y(!1), r = y(!1), p = {
136
+ const g = y(!1), r = y(!1), p = {
137
137
  name: "",
138
138
  campaigns: []
139
- }, o = y(""), a = y({ ...p }), g = re.superRefine((s, e) => {
140
- }), l = y([]), n = y(null), { global: c, minor: w } = me, P = G(() => {
141
- const s = g.safeParse(a.value);
139
+ }, o = y(""), a = y({ ...p }), _ = re.superRefine((s, e) => {
140
+ }), n = y([]), l = y(null), { global: u, minor: w } = me, P = G(() => {
141
+ const s = _.safeParse(a.value);
142
142
  return s.success ? [] : s.error.errors;
143
143
  });
144
144
  function M(s) {
145
145
  var e;
146
- _.value = !0, s ? (n.value = { ...s }, a.value = { ...s, campaigns: (e = s.pf_campaigns) == null ? void 0 : e.map((m) => m._id) }) : (n.value = null, a.value = { ...p });
146
+ g.value = !0, s ? (l.value = { ...s }, a.value = { ...s, campaigns: (e = s.pf_campaigns) == null ? void 0 : e.map((m) => m._id) }) : (l.value = null, a.value = { ...p });
147
147
  }
148
148
  function F() {
149
- _.value = !1, n.value = null;
149
+ g.value = !1, l.value = null;
150
150
  }
151
151
  function K() {
152
152
  r.value = !0;
@@ -159,7 +159,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
159
159
  search: "",
160
160
  descending: !0
161
161
  });
162
- l.value = s.resources.filter(
162
+ n.value = s.resources.filter(
163
163
  (e) => !["MEMBERSHIP", "REWARD_POOL"].includes(e.type) && !["ISSUE_REWARD"].includes("event" in e ? e == null ? void 0 : e.event.type : "")
164
164
  );
165
165
  }
@@ -169,7 +169,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
169
169
  value: C._id
170
170
  }));
171
171
  return pe(
172
- l.value,
172
+ n.value,
173
173
  (m) => de.formattedType(m.type),
174
174
  s
175
175
  );
@@ -191,11 +191,11 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
191
191
  e != null && e > -1 && ((C = a.value.campaigns) == null || C.splice(e, 1));
192
192
  }
193
193
  async function Z() {
194
- g.safeParse(a.value).success && await w(
194
+ _.safeParse(a.value).success && await w(
195
195
  async () => {
196
196
  var e;
197
- n.value ? await R.updateGroup(
198
- (e = n.value) == null ? void 0 : e._id,
197
+ l.value ? await R.updateGroup(
198
+ (e = l.value) == null ? void 0 : e._id,
199
199
  a.value
200
200
  ) : await R.createGroup(a.value), v("success"), F();
201
201
  },
@@ -209,7 +209,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
209
209
  await w(
210
210
  async () => {
211
211
  var s;
212
- await R.deleteGroup((s = n.value) == null ? void 0 : s._id), v("success"), F();
212
+ await R.deleteGroup((s = l.value) == null ? void 0 : s._id), v("success"), F();
213
213
  },
214
214
  {
215
215
  message: "Deleting group",
@@ -225,15 +225,15 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
225
225
  }), (s, e) => {
226
226
  const m = x("FmButton"), C = x("FmTextField"), B = x("FmList"), E = x("FmSideSheet");
227
227
  return d(), A(E, {
228
- modelValue: t(_),
229
- "onUpdate:modelValue": e[7] || (e[7] = (f) => T(_) ? _.value = f : null),
230
- header: t(n) ? "Edit group" : "Add group",
228
+ modelValue: t(g),
229
+ "onUpdate:modelValue": e[7] || (e[7] = (f) => T(g) ? g.value = f : null),
230
+ header: t(l) ? "Edit group" : "Add group",
231
231
  "dismiss-away": "",
232
232
  "close-button": !0,
233
233
  "max-width": 550
234
234
  }, Y({
235
235
  "side-sheet-footer": L(() => [
236
- i("div", Ge, [
236
+ i("div", Pe, [
237
237
  t(r) ? V("", !0) : (d(), k($, { key: 0 }, [
238
238
  h(m, {
239
239
  label: "Submit",
@@ -245,7 +245,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
245
245
  onClick: e[4] || (e[4] = (f) => F()),
246
246
  variant: "tertiary"
247
247
  }),
248
- t(n) ? (d(), A(m, {
248
+ t(l) ? (d(), A(m, {
249
249
  key: 0,
250
250
  label: "Delete",
251
251
  variant: "plain",
@@ -262,16 +262,16 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
262
262
  ]),
263
263
  default: L(() => [
264
264
  t(r) ? V("", !0) : (d(), k("div", Se, [
265
- we,
265
+ e[9] || (e[9] = i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1)),
266
266
  h(oe, {
267
267
  modelValue: t(a).name,
268
268
  "onUpdate:modelValue": e[1] || (e[1] = (f) => t(a).name = f),
269
269
  label: "Name",
270
- schema: t(se).typeAtPath(t(g), "name")
270
+ schema: t(se).typeAtPath(t(_), "name")
271
271
  }, null, 8, ["modelValue", "schema"]),
272
- Fe,
273
- i("div", Ae, [
274
- i("div", $e, O(t(a).campaigns.length) + " campaign(s) linked ", 1),
272
+ e[10] || (e[10] = i("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1)),
273
+ i("div", we, [
274
+ i("div", Fe, O(t(a).campaigns.length) + " campaign(s) linked ", 1),
275
275
  h(C, {
276
276
  modelValue: t(o),
277
277
  "onUpdate:modelValue": e[2] || (e[2] = (f) => T(o) ? o.value = f : null),
@@ -293,17 +293,17 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
293
293
  "onUpdate:modelValue": e[3] || (e[3] = (f) => t(a).campaigns = f),
294
294
  campaigns: t(N)
295
295
  }, null, 8, ["modelValue", "campaigns"])) : V("", !0),
296
- i("div", Ue, [
296
+ i("div", Ae, [
297
297
  t(r) ? V("", !0) : (d(!0), k($, { key: 0 }, D(t(q), (f, Q) => (d(), k("div", null, [
298
- i("div", Pe, O(Q), 1),
298
+ i("div", $e, O(Q), 1),
299
299
  h(B, { separator: !0 }, {
300
300
  default: L(() => [
301
- (d(!0), k($, null, D(f, (H) => (d(), k("div", Le, [
301
+ (d(!0), k($, null, D(f, (H) => (d(), k("div", Ue, [
302
302
  i("div", null, O(H.label), 1),
303
303
  i("div", null, [
304
304
  h(m, {
305
305
  icon: "delete",
306
- onClick: (je) => J(H.value),
306
+ onClick: (Re) => J(H.value),
307
307
  variant: "tertiary"
308
308
  }, null, 8, ["onClick"])
309
309
  ])
@@ -325,7 +325,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
325
325
  variant: "tertiary",
326
326
  onClick: e[0] || (e[0] = (f) => r.value = !1)
327
327
  }),
328
- ee("Link campaign ")
328
+ e[8] || (e[8] = ee("Link campaign ", -1))
329
329
  ])
330
330
  ]),
331
331
  key: "0"
@@ -333,65 +333,62 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
333
333
  ]), 1032, ["modelValue", "header"]);
334
334
  };
335
335
  }
336
- }), Be = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Re = { class: "space-y-16" }, Ee = { class: "flex items-center justify-end" }, Oe = /* @__PURE__ */ i("img", {
337
- src: ne,
338
- class: "w-[150px]"
339
- }, null, -1), De = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1), Te = /* @__PURE__ */ i("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " We apologize for the inconvenience. The analytics dashboard is currently under maintenance to improve your experience. Please check back later for updates on system availability. ", -1), rt = /* @__PURE__ */ j({
336
+ }), Ge = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Me = { class: "space-y-16" }, Be = { class: "flex items-center justify-end" }, at = /* @__PURE__ */ j({
340
337
  __name: "Analytic",
341
338
  setup(U) {
342
- const { t: b } = ye(), u = {
339
+ const { t: b } = ye(), c = {
343
340
  label: b("connect.analytic.addGroup"),
344
341
  value: "create",
345
342
  isPrimary: !0,
346
343
  prependIcon: "add"
347
- }, v = ve(), S = y(), _ = y([]), r = y(""), p = te({
344
+ }, v = ve(), S = y(), g = y([]), r = y(""), p = te({
348
345
  totalCampaign: 0,
349
346
  totalProgram: 0,
350
347
  totalMember: 0
351
348
  }), o = y("1");
352
349
  b("connect.analytic.summary.totalCampaign"), b("connect.analytic.summary.totalProgram"), b("connect.analytic.summary.totalMember");
353
- function a(n) {
354
- var c;
355
- o.value = (/* @__PURE__ */ new Date()).toISOString(), (c = S.value) == null || c.showSheet(n);
350
+ function a(l) {
351
+ var u;
352
+ o.value = (/* @__PURE__ */ new Date()).toISOString(), (u = S.value) == null || u.showSheet(l);
356
353
  }
357
- async function g() {
354
+ async function _() {
358
355
  await v.readGroups();
359
- const n = await R.readAllGrouped({
356
+ const l = await R.readAllGrouped({
360
357
  limit: 100,
361
358
  skip: 0,
362
359
  sortBy: "_id",
363
360
  search: "",
364
361
  descending: !0
365
362
  });
366
- _.value = n.resources;
363
+ g.value = l.resources;
367
364
  }
368
- G(() => _.value.filter((n) => {
369
- var c;
370
- return n.name.includes(r.value) || ((c = n.pf_campaigns) == null ? void 0 : c.filter((w) => w.name.includes(r.value)).length);
365
+ G(() => g.value.filter((l) => {
366
+ var u;
367
+ return l.name.includes(r.value) || ((u = l.pf_campaigns) == null ? void 0 : u.filter((w) => w.name.includes(r.value)).length);
371
368
  }));
372
- const l = fe();
373
- return le(), y(!0), G(() => {
374
- var n, c, w, P;
375
- return !l.storeOption || !l.storeOption.company ? -1 : !l.payoutAccount || !l.payoutAccount.enable || l.payoutAccount.status != "APPROVED" ? 0 : (c = (n = l.store) == null ? void 0 : n.categories) != null && c.length ? (P = (w = l.store) == null ? void 0 : w.categories) != null && P.some(
369
+ const n = fe();
370
+ return ne(), y(!0), G(() => {
371
+ var l, u, w, P;
372
+ return !n.storeOption || !n.storeOption.company ? -1 : !n.payoutAccount || !n.payoutAccount.enable || n.payoutAccount.status != "APPROVED" ? 0 : (u = (l = n.store) == null ? void 0 : l.categories) != null && u.length ? (P = (w = n.store) == null ? void 0 : w.categories) != null && P.some(
376
373
  (M) => M.bundles.some((F) => F.isFeedvibe)
377
374
  ) ? 3 : 2 : 1;
378
375
  }), ae(async () => {
379
- await l.readMemberStore(), await l.readMembership(), await l.readPayoutAccount();
380
- }), (n, c) => {
376
+ await n.readMemberStore(), await n.readMembership(), await n.readPayoutAccount();
377
+ }), (l, u) => {
381
378
  const w = x("FmPageHead"), P = x("FmSearch"), M = x("FmCard");
382
379
  return x("FmButton"), x("FmIcon"), d(), k($, null, [
383
380
  h(w, {
384
381
  title: t(b)("connect.analytic.title"),
385
- actions: t(_).length > 0 ? [u] : [],
386
- "onClick:action": c[0] || (c[0] = (F) => a())
382
+ actions: t(g).length > 0 ? [c] : [],
383
+ "onClick:action": u[0] || (u[0] = (F) => a())
387
384
  }, null, 8, ["title", "actions"]),
388
- i("div", Be, [
389
- i("div", Re, [
390
- i("div", Ee, [
385
+ i("div", Ge, [
386
+ i("div", Me, [
387
+ i("div", Be, [
391
388
  h(P, {
392
389
  class: "xs:hidden",
393
390
  modelValue: t(r),
394
- "onUpdate:modelValue": c[1] || (c[1] = (F) => T(r) ? r.value = F : null),
391
+ "onUpdate:modelValue": u[1] || (u[1] = (F) => T(r) ? r.value = F : null),
395
392
  placeholder: t(b)("connect.analytic.search"),
396
393
  collapsible: ""
397
394
  }, null, 8, ["modelValue", "placeholder"])
@@ -399,23 +396,26 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
399
396
  V("", !0)
400
397
  ]),
401
398
  V("", !0),
402
- t(_).length ? V("", !0) : (d(), A(M, {
399
+ t(g).length ? V("", !0) : (d(), A(M, {
403
400
  key: 1,
404
401
  variant: "outlined",
405
402
  class: "flex flex-col gap-y-24 items-center p-16"
406
403
  }, {
407
- default: L(() => [
408
- Oe,
409
- De,
410
- Te
411
- ]),
404
+ default: L(() => [...u[7] || (u[7] = [
405
+ i("img", {
406
+ src: le,
407
+ class: "w-[150px]"
408
+ }, null, -1),
409
+ i("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1),
410
+ i("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " We apologize for the inconvenience. The analytics dashboard is currently under maintenance to improve your experience. Please check back later for updates on system availability. ", -1)
411
+ ])]),
412
412
  _: 1
413
413
  })),
414
414
  V("", !0),
415
- h(Me, {
415
+ h(Le, {
416
416
  ref_key: "sheetRef",
417
417
  ref: S,
418
- onSuccess: g
418
+ onSuccess: _
419
419
  }, null, 512)
420
420
  ])
421
421
  ], 64);
@@ -423,5 +423,5 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
423
423
  }
424
424
  });
425
425
  export {
426
- rt as default
426
+ at as default
427
427
  };