@feedmepos/mf-connect 0.1.57-prod → 0.1.58-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 (128) hide show
  1. package/package.json +1 -1
  2. package/dist/Analytic-BqvhYgCU.js +0 -427
  3. package/dist/App-Dtl_D0cH.js +0 -4630
  4. package/dist/Bin-y4ikpgPS.js +0 -166
  5. package/dist/Broadcast-DSROFwe4.js +0 -233
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CcsG6vOP.js +0 -121
  7. package/dist/Card-BiSEPsZb.js +0 -911
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-CX-nN7Xj.js +0 -458
  10. package/dist/Credit-IiV9b4cB.js +0 -228
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CoGes8YL.js +0 -2194
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-sGh_SMCH.js +0 -348
  14. package/dist/Experience-Cf-EMhKy.js +0 -229
  15. package/dist/FileSaver.min-NlMItPOc.js +0 -74
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  17. package/dist/Game-C8mfJn6W.js +0 -284
  18. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
  19. package/dist/Index-DkvO1AoT.js +0 -259
  20. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  21. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
  22. package/dist/MainLayout-B1aJoR95.js +0 -41
  23. package/dist/Marketing-xJTIo3RF.js +0 -319
  24. package/dist/Member-DZkYoKW8.js +0 -279
  25. package/dist/MemberList-CAYEJnf3.js +0 -1607
  26. package/dist/MemberOverview-wL_ailso.js +0 -58
  27. package/dist/MemberTransactions-Dc5aAQ69.js +0 -45
  28. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BSvlPzw8.js +0 -60553
  29. package/dist/Mission-C_NbNWZw.js +0 -302
  30. package/dist/Overview-DyxEwEfe.js +0 -1079
  31. package/dist/Point-CsEWk61V.js +0 -232
  32. package/dist/Promotion--pWgy9Dx.js +0 -289
  33. package/dist/Queue-k3qAQR7B.js +0 -260
  34. package/dist/Record-D5F5JyVA.js +0 -341
  35. package/dist/Reward-3FSrq5mX.js +0 -442
  36. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-Dzj7a7UY.js +0 -150
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DRl_Gjfx.js +0 -1763
  38. package/dist/Segment-BWJn6ODR.js +0 -882
  39. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BKsV_zcr.js +0 -181
  40. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3efGNC_.js +0 -188
  41. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cj7c2V3h.js +0 -147
  42. package/dist/Setting-UiTXazZV.js +0 -1936
  43. package/dist/Store-BrvmHPCX.js +0 -1842
  44. package/dist/StoreRewards-D_7fr-Ef.js +0 -423
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BXy0L5AH.js +0 -995
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DumcDlBs.js +0 -139
  47. package/dist/Tier-C4wvx8F7.js +0 -895
  48. package/dist/Title-CPHT85Uj.js +0 -566
  49. package/dist/Transaction-6Ig2W00P.js +0 -39
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DknFkIJh.js +0 -130
  51. package/dist/Voucher-Bbl-7gZ5.js +0 -384
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-xsswRZG8.js +0 -419
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-B5J6Hd8G.js +0 -56
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  56. package/dist/app-BDVZwARN.js +0 -7057
  57. package/dist/app-CAEhNFRG.js +0 -57962
  58. package/dist/app-wDQR6dpb.js +0 -39
  59. package/dist/app.js +0 -6
  60. package/dist/business-6C_ol5wd.js +0 -82
  61. package/dist/campaign-B13G6pZ3.js +0 -1810
  62. package/dist/campaign-CpzFl8Vr.js +0 -4
  63. package/dist/campaign-DrQp6qBu.js +0 -94
  64. package/dist/campaign.enum-DnTrlaNC.js +0 -20
  65. package/dist/campaign.fn-BZse90_k.js +0 -758
  66. package/dist/collectible.enum-633Me0yR.js +0 -19
  67. package/dist/collection.fn-C96855j5.js +0 -26
  68. package/dist/dto-2bMujqmZ.js +0 -216
  69. package/dist/effect-C7lAJwKh.js +0 -78
  70. package/dist/email-addresses-3ayN-9jv.js +0 -705
  71. package/dist/export-BNbDV7SC.js +0 -97
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-CsfZ__dQ.js +0 -71
  74. package/dist/index-BLSAz0gK.js +0 -32
  75. package/dist/index-BY9I3Cer.js +0 -3
  76. package/dist/index-BdnRNcVO.js +0 -146
  77. package/dist/index-BmyNfpfG.js +0 -30076
  78. package/dist/index-CSBRkhKy.js +0 -38
  79. package/dist/index-Cf_fcvoS.js +0 -54
  80. package/dist/index-CqrO13uj.js +0 -76
  81. package/dist/index-CuvNtC_M.js +0 -61
  82. package/dist/index-D4kdSzs9.js +0 -3070
  83. package/dist/index-DcJq7tl4.js +0 -32269
  84. package/dist/index-DdjSIwSL.js +0 -44
  85. package/dist/index-LKr2k8J2.js +0 -8861
  86. package/dist/index-XAxwm-1v.js +0 -2130
  87. package/dist/index-b82LrGSB.js +0 -121
  88. package/dist/index-tcAb0W5F.js +0 -31
  89. package/dist/index-vh86FiIQ.js +0 -10
  90. package/dist/index.esm2017-BklqmujQ.js +0 -3069
  91. package/dist/loading-OXARGiqO.js +0 -71
  92. package/dist/lodash-B5I3zXaY.js +0 -3678
  93. package/dist/membership-D1Vb1rUo.js +0 -235
  94. package/dist/moment-D7p2TMB-.js +0 -2583
  95. package/dist/money-BpyAytEq.js +0 -15
  96. package/dist/number-C-PtPOOj.js +0 -12
  97. package/dist/object-qECH92oz.js +0 -26
  98. package/dist/objectId-dwaoBfJX.js +0 -7
  99. package/dist/objectid-BrLIKTmQ.js +0 -145
  100. package/dist/plugins-CjPWhNb2.js +0 -208
  101. package/dist/reward-DonQFzvW.js +0 -36
  102. package/dist/rule-AtNPBnbE.js +0 -1951
  103. package/dist/rule-builder-C0Q-3g6T.js +0 -102
  104. package/dist/style.css +0 -4
  105. package/dist/template-CNjE7eht.js +0 -190
  106. package/dist/tier-BJDhpH6X.js +0 -4
  107. package/dist/tiers/tier=1.png +0 -0
  108. package/dist/tiers/tier=2.png +0 -0
  109. package/dist/tiers/tier=3.png +0 -0
  110. package/dist/tiers/tier=4.png +0 -0
  111. package/dist/timezone-CYbdI3q2.js +0 -1151
  112. package/dist/titles/type=diamond.png +0 -0
  113. package/dist/titles/type=drinks.png +0 -0
  114. package/dist/titles/type=food.png +0 -0
  115. package/dist/titles/type=heart.png +0 -0
  116. package/dist/titles/type=medal.png +0 -0
  117. package/dist/titles/type=spend.png +0 -0
  118. package/dist/titles/type=thank-you.png +0 -0
  119. package/dist/titles/type=thumbs-up.png +0 -0
  120. package/dist/titles/type=years.png +0 -0
  121. package/dist/trigger-Bdi6n80h.js +0 -144
  122. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  123. package/dist/type_drinks-D6jnpvwV.js +0 -4
  124. package/dist/usePagination-Ds-cuHop.js +0 -223
  125. package/dist/user-BwGm78n8.js +0 -54
  126. package/dist/vue-i18n-D1nTd69a.js +0 -2365
  127. package/dist/xlsx-DF5iW3wh.js +0 -15491
  128. package/dist/zod-Bg2FbC-D.js +0 -90
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-connect",
3
- "version": "0.1.57-prod",
3
+ "version": "0.1.58-prod",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,427 +0,0 @@
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 le } from "./campaign-CpzFl8Vr.js";
3
- import "./index-BmyNfpfG.js";
4
- import "./campaign-B13G6pZ3.js";
5
- import { useRouter as ne } from "vue-router";
6
- import { c as R } from "./index-b82LrGSB.js";
7
- import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B5J6Hd8G.js";
8
- import { Z as se } from "./zod-Bg2FbC-D.js";
9
- import { F as re } from "./dto-2bMujqmZ.js";
10
- import { J as ie } from "./JsonViewer-v8_C7l5N.js";
11
- import "./index-DcJq7tl4.js";
12
- import { useSnackbar as ue } from "@feedmepos/ui-library";
13
- import { u as ce } from "./app-wDQR6dpb.js";
14
- import { u as me } from "./loading-OXARGiqO.js";
15
- import { C as de } from "./campaign.fn-BZse90_k.js";
16
- import { g as pe } from "./object-qECH92oz.js";
17
- import { u as ve } from "./campaign-DrQp6qBu.js";
18
- import { u as fe } from "./membership-D1Vb1rUo.js";
19
- import { u as ye } from "./vue-i18n-D1nTd69a.js";
20
- const ge = { class: "ml-32 flex flex-col" }, _e = /* @__PURE__ */ j({
21
- __name: "CampaignCard",
22
- props: {
23
- title: {},
24
- items: {},
25
- modelValue: {}
26
- },
27
- emits: ["update:model-value"],
28
- setup(U, { emit: b }) {
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
- }, r = y(!1), p = y([]);
34
- return X(
35
- () => c.modelValue,
36
- () => {
37
- p.value = c.modelValue.filter(
38
- (o) => c.items.find((a) => a.value === o)
39
- );
40
- }
41
- ), I(() => {
42
- p.value = c.modelValue.filter(
43
- (o) => c.items.find((a) => a.value === o)
44
- );
45
- }), (o, a) => {
46
- const _ = x("FmCheckbox"), n = x("FmCard");
47
- return d(), A(n, {
48
- variant: "outlined",
49
- class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
50
- }, {
51
- default: L(() => [
52
- h(_, {
53
- "model-value": t(r),
54
- value: "1",
55
- label: c.title,
56
- indeterminate: t(p).length > 0,
57
- "onUpdate:modelValue": S
58
- }, null, 8, ["model-value", "label", "indeterminate"]),
59
- i("div", ge, [
60
- (d(!0), k($, null, D(c.items, (l, u) => (d(), A(_, {
61
- key: u,
62
- "model-value": t(p),
63
- label: l.label,
64
- value: l.value,
65
- "onUpdate:modelValue": g
66
- }, null, 8, ["model-value", "label", "value"]))), 128))
67
- ])
68
- ]),
69
- _: 1
70
- });
71
- };
72
- }
73
- }), he = { class: "space-y-16" }, be = { class: "flex items-center" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ce = { class: "space-y-[40px]" }, ke = /* @__PURE__ */ j({
74
- __name: "LinkCampaign",
75
- props: {
76
- modelValue: {
77
- type: Array,
78
- required: !0
79
- },
80
- campaigns: {
81
- type: Object,
82
- required: !0
83
- }
84
- },
85
- emits: ["update:model-value"],
86
- setup(U, { emit: b }) {
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
- );
91
- return n.length > 0 && (o[a] = n), o;
92
- }, {}));
93
- function p(o, a) {
94
- v.value = v.value.filter(
95
- (_) => !a.map((n) => n.value).includes(_)
96
- ), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], g("update:model-value", v.value);
97
- }
98
- return I(() => {
99
- v.value = S.modelValue;
100
- }), (o, a) => {
101
- const _ = x("FmTextField");
102
- return d(), k($, null, [
103
- h(ie, { json: U.campaigns }, null, 8, ["json"]),
104
- i("div", he, [
105
- i("div", be, [
106
- i("div", xe, O(t(v).length) + " campaign(s) linked ", 1),
107
- h(_, {
108
- modelValue: t(c),
109
- "onUpdate:modelValue": a[0] || (a[0] = (n) => T(c) ? c.value = n : null),
110
- "prepend-icon": "search",
111
- placeholder: "Search",
112
- class: "w-full"
113
- }, null, 8, ["modelValue"])
114
- ]),
115
- i("div", Ce, [
116
- (d(!0), k($, null, D(t(r), (n, l) => (d(), A(_e, {
117
- "model-value": t(v),
118
- title: l,
119
- items: n,
120
- "onUpdate:modelValue": (u) => p(u, n)
121
- }, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
122
- ])
123
- ])
124
- ], 64);
125
- };
126
- }
127
- }), Ve = { class: "flex items-center gap-x-8" }, Se = {
128
- key: 0,
129
- class: "space-y-16 pr-12"
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
- __name: "AnalyticSheet",
132
- emits: ["success"],
133
- setup(U, { expose: b, emit: c }) {
134
- const v = c, S = ce();
135
- ue();
136
- const g = y(!1), r = y(!1), p = {
137
- name: "",
138
- campaigns: []
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
- return s.success ? [] : s.error.errors;
143
- });
144
- function M(s) {
145
- var e;
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
- }
148
- function F() {
149
- g.value = !1, l.value = null;
150
- }
151
- function K() {
152
- r.value = !0;
153
- }
154
- async function W() {
155
- const s = await R.readAll({
156
- limit: 1e3,
157
- skip: 0,
158
- sortBy: "_id",
159
- search: "",
160
- descending: !0
161
- });
162
- n.value = s.resources.filter(
163
- (e) => !["MEMBERSHIP", "REWARD_POOL"].includes(e.type) && !["ISSUE_REWARD"].includes("event" in e ? e == null ? void 0 : e.event.type : "")
164
- );
165
- }
166
- const N = G(() => {
167
- const s = (m) => m.map((C) => ({
168
- label: C.name,
169
- value: C._id
170
- }));
171
- return pe(
172
- n.value,
173
- (m) => de.formattedType(m.type),
174
- s
175
- );
176
- }), q = G(() => Object.entries(N.value).reduce(
177
- (s, [e, m]) => {
178
- const C = m.filter((B) => {
179
- var E, f;
180
- return (f = (E = a.value) == null ? void 0 : E.campaigns) == null ? void 0 : f.includes(B.value);
181
- }).filter(
182
- (B) => B.label.toLowerCase().includes(o.value.toLowerCase())
183
- );
184
- return C.length > 0 && (s[e] = C), s;
185
- },
186
- {}
187
- ));
188
- function J(s) {
189
- var m, C;
190
- const e = (m = a.value.campaigns) == null ? void 0 : m.indexOf(s);
191
- e != null && e > -1 && ((C = a.value.campaigns) == null || C.splice(e, 1));
192
- }
193
- async function Z() {
194
- _.safeParse(a.value).success && await w(
195
- async () => {
196
- var e;
197
- l.value ? await R.updateGroup(
198
- (e = l.value) == null ? void 0 : e._id,
199
- a.value
200
- ) : await R.createGroup(a.value), v("success"), F();
201
- },
202
- {
203
- message: "Saving group",
204
- successMessage: "Group saved"
205
- }
206
- );
207
- }
208
- async function z() {
209
- await w(
210
- async () => {
211
- var s;
212
- await R.deleteGroup((s = l.value) == null ? void 0 : s._id), v("success"), F();
213
- },
214
- {
215
- message: "Deleting group",
216
- successMessage: "Group deleted"
217
- }
218
- );
219
- }
220
- return I(async () => {
221
- await W();
222
- }), b({
223
- showSheet: M,
224
- hideSheet: F
225
- }), (s, e) => {
226
- const m = x("FmButton"), C = x("FmTextField"), B = x("FmList"), E = x("FmSideSheet");
227
- return d(), A(E, {
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
- "dismiss-away": "",
232
- "close-button": !0,
233
- "max-width": 550
234
- }, Y({
235
- "side-sheet-footer": L(() => [
236
- i("div", Pe, [
237
- t(r) ? V("", !0) : (d(), k($, { key: 0 }, [
238
- h(m, {
239
- label: "Submit",
240
- onClick: Z,
241
- disabled: t(P).length > 0 || t(S).isLoading
242
- }, null, 8, ["disabled"]),
243
- h(m, {
244
- label: "Cancel",
245
- onClick: e[4] || (e[4] = (f) => F()),
246
- variant: "tertiary"
247
- }),
248
- t(l) ? (d(), A(m, {
249
- key: 0,
250
- label: "Delete",
251
- variant: "plain",
252
- class: "ml-auto fm-color-system-error-300",
253
- onClick: e[5] || (e[5] = (f) => z())
254
- })) : V("", !0)
255
- ], 64)),
256
- t(r) ? (d(), A(m, {
257
- key: 1,
258
- label: "Confirm",
259
- onClick: e[6] || (e[6] = (f) => r.value = !1)
260
- })) : V("", !0)
261
- ])
262
- ]),
263
- default: L(() => [
264
- t(r) ? V("", !0) : (d(), k("div", Se, [
265
- e[9] || (e[9] = i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1)),
266
- h(oe, {
267
- modelValue: t(a).name,
268
- "onUpdate:modelValue": e[1] || (e[1] = (f) => t(a).name = f),
269
- label: "Name",
270
- schema: t(se).typeAtPath(t(_), "name")
271
- }, null, 8, ["modelValue", "schema"]),
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
- h(C, {
276
- modelValue: t(o),
277
- "onUpdate:modelValue": e[2] || (e[2] = (f) => T(o) ? o.value = f : null),
278
- "prepend-icon": "search",
279
- placeholder: "Search",
280
- class: "w-auto"
281
- }, null, 8, ["modelValue"])
282
- ]),
283
- h(m, {
284
- variant: "plain",
285
- icon: "link",
286
- label: "Link Campaign",
287
- onClick: K
288
- })
289
- ])),
290
- t(r) ? (d(), A(ke, {
291
- key: 1,
292
- modelValue: t(a).campaigns,
293
- "onUpdate:modelValue": e[3] || (e[3] = (f) => t(a).campaigns = f),
294
- campaigns: t(N)
295
- }, null, 8, ["modelValue", "campaigns"])) : V("", !0),
296
- i("div", Ae, [
297
- t(r) ? V("", !0) : (d(!0), k($, { key: 0 }, D(t(q), (f, Q) => (d(), k("div", null, [
298
- i("div", $e, O(Q), 1),
299
- h(B, { separator: !0 }, {
300
- default: L(() => [
301
- (d(!0), k($, null, D(f, (H) => (d(), k("div", Ue, [
302
- i("div", null, O(H.label), 1),
303
- i("div", null, [
304
- h(m, {
305
- icon: "delete",
306
- onClick: (Re) => J(H.value),
307
- variant: "tertiary"
308
- }, null, 8, ["onClick"])
309
- ])
310
- ]))), 256))
311
- ]),
312
- _: 2
313
- }, 1024)
314
- ]))), 256))
315
- ])
316
- ]),
317
- _: 2
318
- }, [
319
- t(r) ? {
320
- name: "side-sheet-header",
321
- fn: L(() => [
322
- i("div", Ve, [
323
- h(m, {
324
- icon: "arrow_back",
325
- variant: "tertiary",
326
- onClick: e[0] || (e[0] = (f) => r.value = !1)
327
- }),
328
- e[8] || (e[8] = ee("Link campaign ", -1))
329
- ])
330
- ]),
331
- key: "0"
332
- } : void 0
333
- ]), 1032, ["modelValue", "header"]);
334
- };
335
- }
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({
337
- __name: "Analytic",
338
- setup(U) {
339
- const { t: b } = ye(), c = {
340
- label: b("connect.analytic.addGroup"),
341
- value: "create",
342
- isPrimary: !0,
343
- prependIcon: "add"
344
- }, v = ve(), S = y(), g = y([]), r = y(""), p = te({
345
- totalCampaign: 0,
346
- totalProgram: 0,
347
- totalMember: 0
348
- }), o = y("1");
349
- b("connect.analytic.summary.totalCampaign"), b("connect.analytic.summary.totalProgram"), b("connect.analytic.summary.totalMember");
350
- function a(l) {
351
- var u;
352
- o.value = (/* @__PURE__ */ new Date()).toISOString(), (u = S.value) == null || u.showSheet(l);
353
- }
354
- async function _() {
355
- await v.readGroups();
356
- const l = await R.readAllGrouped({
357
- limit: 100,
358
- skip: 0,
359
- sortBy: "_id",
360
- search: "",
361
- descending: !0
362
- });
363
- g.value = l.resources;
364
- }
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);
368
- }));
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(
373
- (M) => M.bundles.some((F) => F.isFeedvibe)
374
- ) ? 3 : 2 : 1;
375
- }), ae(async () => {
376
- await n.readMemberStore(), await n.readMembership(), await n.readPayoutAccount();
377
- }), (l, u) => {
378
- const w = x("FmPageHead"), P = x("FmSearch"), M = x("FmCard");
379
- return x("FmButton"), x("FmIcon"), d(), k($, null, [
380
- h(w, {
381
- title: t(b)("connect.analytic.title"),
382
- actions: t(g).length > 0 ? [c] : [],
383
- "onClick:action": u[0] || (u[0] = (F) => a())
384
- }, null, 8, ["title", "actions"]),
385
- i("div", Ge, [
386
- i("div", Me, [
387
- i("div", Be, [
388
- h(P, {
389
- class: "xs:hidden",
390
- modelValue: t(r),
391
- "onUpdate:modelValue": u[1] || (u[1] = (F) => T(r) ? r.value = F : null),
392
- placeholder: t(b)("connect.analytic.search"),
393
- collapsible: ""
394
- }, null, 8, ["modelValue", "placeholder"])
395
- ]),
396
- V("", !0)
397
- ]),
398
- V("", !0),
399
- t(g).length ? V("", !0) : (d(), A(M, {
400
- key: 1,
401
- variant: "outlined",
402
- class: "flex flex-col gap-y-24 items-center p-16"
403
- }, {
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
- _: 1
413
- })),
414
- V("", !0),
415
- h(Le, {
416
- ref_key: "sheetRef",
417
- ref: S,
418
- onSuccess: _
419
- }, null, 512)
420
- ])
421
- ], 64);
422
- };
423
- }
424
- });
425
- export {
426
- at as default
427
- };