@feedmepos/mf-connect 0.1.0-beta.4 → 0.1.0-beta.41

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 (106) hide show
  1. package/dist/Analytic-C7iDpCvx.js +426 -0
  2. package/dist/{App-BnQwjxIr.js → App-rOEspgIk.js} +397 -384
  3. package/dist/{Broadcast-y1kP18mo.js → Broadcast-CI61-FqI.js} +32 -32
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dj0JUMOk.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BL_KxlIX.js} +6 -8
  5. package/dist/Card-CUzEZnUC.js +894 -0
  6. package/dist/{Collections-DPfbZMg1.js → Collections-zYhQfAph.js} +28 -34
  7. package/dist/{Credit-QleM_b6q.js → Credit-D6G2xUEu.js} +14 -14
  8. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js +2209 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-2hRTF1EJ.js → EffectSheet.vue_vue_type_style_index_0_lang-Drd0ZjdQ.js} +8 -8
  11. package/dist/{Experience-DGKj8ChY.js → Experience-Cqn6cpA4.js} +8 -8
  12. package/dist/{Game-BxRdzSma.js → Game-CGrL5xmK.js} +15 -15
  13. package/dist/Index-CCcuCcmL.js +255 -0
  14. package/dist/Marketing-DhZHedDV.js +20070 -0
  15. package/dist/{Member-CteeBDi2.js → Member-CB8o8wLL.js} +4 -4
  16. package/dist/MemberList-D6zRpcwU.js +1554 -0
  17. package/dist/MemberTransactions-HCaDl8dN.js +45 -0
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ2M8huU.js → MessageInput.vue_vue_type_script_setup_true_lang-CqlGFgwF.js} +2 -2
  19. package/dist/{Mission-CZgXBa09.js → Mission-CexuwCSV.js} +98 -86
  20. package/dist/Overview-CZk3IHyA.js +1063 -0
  21. package/dist/{Point-C2vzEfRP.js → Point-DJ_sLiid.js} +23 -23
  22. package/dist/{Promotion-337OT0sP.js → Promotion-CWBpjPXQ.js} +53 -47
  23. package/dist/Record-CwT9Pmjn.js +337 -0
  24. package/dist/Reward-DhOIXKAB.js +432 -0
  25. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-UP4KtCK2.js +149 -0
  26. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BNw-CED0.js +1637 -0
  27. package/dist/Segment-BE7Bt2tH.js +566 -0
  28. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CDyT_cSb.js +181 -0
  29. package/dist/{Setting-DVK2594u.js → Setting-D1k2xVYx.js} +609 -586
  30. package/dist/Store-BzoJ_ZBZ.js +1743 -0
  31. package/dist/{StoreRewards-BpEmNueE.js → StoreRewards-OAPmCssF.js} +12 -12
  32. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BIr5Zzij.js +1099 -0
  33. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DT48bSiH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C2fU1byp.js} +1 -1
  34. package/dist/{Tier-BwvOhyXR.js → Tier-IHJ7dlTI.js} +325 -317
  35. package/dist/{Title-DRPdKYRO.js → Title-C4KcQWk_.js} +197 -183
  36. package/dist/{Transaction-BnLvacwW.js → Transaction-B7SWRleT.js} +2 -2
  37. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DOXLpM1y.js +130 -0
  38. package/dist/{Voucher-BQL8J_EA.js → Voucher-Dzh-oh1p.js} +40 -40
  39. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeTWCZF1.js +419 -0
  40. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B316b_ta.js → ZodTextField.vue_vue_type_script_setup_true_lang-rBa59HC1.js} +1 -1
  41. package/dist/{app-BVaQwBvq.js → app-BkSGMADw.js} +1 -1
  42. package/dist/{app-zO552-Dl.js → app-ZePrUEIY.js} +1183 -1154
  43. package/dist/app.js +1 -1
  44. package/dist/{business-BSl6NSdS.js → business-CG7GnAu5.js} +1 -1
  45. package/dist/campaign-BSH9FJHx.js +1810 -0
  46. package/dist/{campaign-CxN6mq_l.js → campaign-DFvmN5Ky.js} +2 -2
  47. package/dist/campaign.enum-CBlGXHp0.js +20 -0
  48. package/dist/campaign.fn-BszsH1EQ.js +758 -0
  49. package/dist/collectible.enum-Sd3QSyrd.js +19 -0
  50. package/dist/{collection.fn-C-2dyWp9.js → collection.fn-CIFllkyx.js} +2 -2
  51. package/dist/dto-DG2Ckvh4.js +214 -0
  52. package/dist/{effect-D8y0J47O.js → effect-CWSFIfZh.js} +9 -9
  53. package/dist/email-addresses-BCNsQNXA.js +705 -0
  54. package/dist/{export-BxTrifKO.js → export-DKe01mG4.js} +3 -3
  55. package/dist/{helper-bEmZlTwA.js → helper-Et1Q6YUA.js} +1 -1
  56. package/dist/{index-DHTYWfTs.js → index-Bk281EIF.js} +207 -195
  57. package/dist/{index-B2qriSSk.js → index-CHAvEqB_.js} +1 -1
  58. package/dist/index-CMEY40F9.js +32 -0
  59. package/dist/index-CsaQJMAR.js +66 -0
  60. package/dist/{index-C_WyKCqN.js → index-D4FT-dGm.js} +1 -1
  61. package/dist/{index-JBp0chol.js → index-D_sLK5cZ.js} +1500 -1479
  62. package/dist/{index-Dnv999nc.js → index-Dkl_Y2Ir.js} +1 -1
  63. package/dist/{index-Ckz-D_AP.js → index-Dlv6dpg5.js} +2188 -931
  64. package/dist/index-DrRQsR1a.js +44 -0
  65. package/dist/{index-DuYb25dY.js → index-DzZDUZ8E.js} +37 -4
  66. package/dist/index-F1sEdtX3.js +54 -0
  67. package/dist/index-RFzgIvoM.js +29000 -0
  68. package/dist/{index-BFWCbVq2.js → index-RhGXDJ8R.js} +1 -1
  69. package/dist/index-vh86FiIQ.js +10 -0
  70. package/dist/{index.esm2017-Tw7KabwI.js → index.esm2017-COLDuQQ-.js} +1 -1
  71. package/dist/{loading-60xYxow_.js → loading-DxppIZmv.js} +1714 -1720
  72. package/dist/{membership-43FU3EmV.js → membership-DIBN0bog.js} +52 -44
  73. package/dist/money-L7YJDctU.js +15 -0
  74. package/dist/number-BAUL1NQ9.js +12 -0
  75. package/dist/objectid-BXKVeU2w.js +145 -0
  76. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  77. package/dist/reward-Qjelc0jm.js +36 -0
  78. package/dist/{rule-DlHrKp8K.js → rule-BAqQRjqc.js} +180 -177
  79. package/dist/{rule-builder-CU8P8b8U.js → rule-builder-D2hQiWL6.js} +1 -1
  80. package/dist/style.css +1 -1
  81. package/dist/{template-9StyN-b7.js → template-NVFsa0l_.js} +5 -5
  82. package/dist/trigger-qeiGHLZs.js +114 -0
  83. package/dist/{xlsx-CrRvm5Vs.js → usePagination-De7j-UtU.js} +3183 -2962
  84. package/dist/user-CKVD-V1i.js +54 -0
  85. package/dist/{vue-i18n-UKlvivrG.js → vue-i18n-CTdcKDi0.js} +2 -2
  86. package/package.json +8 -7
  87. package/dist/Analytic-BtldByrt.js +0 -622
  88. package/dist/Card-kW7k8kOl.js +0 -825
  89. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js +0 -2813
  90. package/dist/Marketing-CG4GQdax.js +0 -316
  91. package/dist/MemberList-CANkPyR0.js +0 -1733
  92. package/dist/MemberTransactions-CcCa21fY.js +0 -38
  93. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dh3naMXv.js +0 -1753
  94. package/dist/Segment-Clstp5D-.js +0 -437
  95. package/dist/Store-PnpBvIoo.js +0 -1511
  96. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CrDhK2dt.js +0 -890
  97. package/dist/dto-B20bsdh6.js +0 -2770
  98. package/dist/index-BUCjM4jq.js +0 -29193
  99. package/dist/index-Ceu2PcnH.js +0 -206
  100. package/dist/index-CuvNtC_M.js +0 -61
  101. package/dist/index-D3DAgTFI.js +0 -762
  102. package/dist/index-Kjelmo0Y.js +0 -298
  103. package/dist/money-CmR3-qMz.js +0 -15
  104. package/dist/number-CZlrO6Sq.js +0 -12
  105. package/dist/usePagination-BeF5K3M7.js +0 -223
  106. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,437 +0,0 @@
1
- import { defineComponent as A, onMounted as E, openBlock as c, createElementBlock as w, createElementVNode as a, toDisplayString as F, unref as e, createVNode as l, createCommentVNode as T, ref as $, computed as j, resolveComponent as p, createBlock as B, isRef as W, createSlots as K, withCtx as f, Fragment as P, h as R, onBeforeMount as Q, renderList as X } from "vue";
2
- import { _ as ee } from "./campaign-CpzFl8Vr.js";
3
- import { F as N, p as te, u as oe } from "./loading-60xYxow_.js";
4
- import { components as L } from "@feedmepos/ui-library";
5
- import { u as H, _ as O } from "./usePagination-BeF5K3M7.js";
6
- import { u as ne } from "./vue-i18n-UKlvivrG.js";
7
- import { Z as ae } from "./zod-Bg2FbC-D.js";
8
- import { a as se } from "./index-Ckz-D_AP.js";
9
- import { u as le } from "./app-wDQR6dpb.js";
10
- import { R as ie } from "./rule-builder-CU8P8b8U.js";
11
- import { _ as re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B316b_ta.js";
12
- import { _ as me } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Dh3naMXv.js";
13
- import { h as V } from "./moment-BWErdI6_.js";
14
- import { s as k } from "./membership-43FU3EmV.js";
15
- import { o as de } from "./objectId-dwaoBfJX.js";
16
- import { u as ce } from "./business-BSl6NSdS.js";
17
- import { m as ue } from "./index-Dnv999nc.js";
18
- const pe = se.extend({
19
- _id: N.optional(),
20
- business: N.optional()
21
- }), ge = { class: "space-y-16 pr-12" }, fe = { class: "fm-typo-en-title-md-800" }, ye = { class: "flex space-x-8" }, ve = { class: "fm-typo-en-title-md-800 text-fm-color-primary" }, _e = { class: "text-fm-color-typo-secondary" }, be = {
22
- key: 0,
23
- class: "w-full flex flex-col gap-16 items-center pt-16"
24
- }, he = /* @__PURE__ */ A({
25
- __name: "ReviewSegment",
26
- props: {
27
- title: {},
28
- segment: {}
29
- },
30
- setup(D) {
31
- const y = D, v = [
32
- {
33
- header: "Name",
34
- accessorFn: (o) => o.name
35
- },
36
- {
37
- header: "Id",
38
- accessorFn: (o) => o._id
39
- },
40
- {
41
- header: "Customer Since",
42
- accessorFn: (o) => V(de(o._id.toString())).format("DD MMM YYYY")
43
- },
44
- {
45
- header: "Phone",
46
- accessorFn: (o) => o.phoneNumber
47
- },
48
- {
49
- header: "Birthday",
50
- accessorFn: (o) => V(o.birthday).format("DD MMM YYYY")
51
- },
52
- {
53
- header: "Last Visit",
54
- accessorFn: (o) => V(o.stats.lastVisit).format("DD MMM YYYY")
55
- }
56
- ], _ = async (o) => y.segment._id ? await k.paginateSegmentUsers(y.segment._id, {
57
- limit: i.value.pageSize,
58
- skip: o.pageIndex ?? 0,
59
- sortBy: "_id",
60
- search: o.searchValue,
61
- descending: !0
62
- }) : { resources: [], meta: { totalResources: 0, totalPages: 0 } }, { tableMeta: i, rowData: d, onSort: h, debouncedFetchData: m, onSearch: r } = H(_);
63
- return E(async () => {
64
- await m();
65
- }), (o, g) => (c(), w("div", ge, [
66
- a("div", fe, F(y.title), 1),
67
- a("div", ye, [
68
- a("div", ve, F(o.segment.members.length), 1),
69
- a("div", _e, [
70
- g[1] || (g[1] = a("div", null, "contacts in your segment", -1)),
71
- a("div", null, "as of " + F(e(V)(o.segment.lastUpdated).format("DD MMM YYYY")), 1)
72
- ])
73
- ]),
74
- l(O, {
75
- loading: e(i).isLoading,
76
- "row-data": e(d),
77
- "row-count": e(i).totalRows,
78
- "column-defs": v,
79
- "page-size": e(i).pageSize,
80
- "page-count": e(i).pageCount,
81
- "page-index": e(i).pageIndex,
82
- onSortChange: e(h),
83
- onPageChange: g[0] || (g[0] = (S) => e(m)({ pageSize: S.pageSize, pageIndex: S.pageIndex }))
84
- }, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"]),
85
- e(d).length == 0 ? (c(), w("div", be, g[2] || (g[2] = [
86
- a("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1),
87
- a("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1)
88
- ]))) : T("", !0)
89
- ]));
90
- }
91
- }), Se = { class: "flex items-center gap-x-8" }, xe = {
92
- key: 0,
93
- class: "space-y-16 pr-12"
94
- }, we = { class: "flex items-center gap-8" }, Fe = /* @__PURE__ */ A({
95
- __name: "SegmentSheet",
96
- emits: ["update:model-value"],
97
- setup(D, { expose: y, emit: v }) {
98
- const _ = le(), i = $(!1), d = $(!1), h = {
99
- name: "",
100
- rule: ie.scaffoldGroup(),
101
- members: []
102
- }, m = pe, r = $(h), o = j(() => {
103
- const t = m.safeParse(r.value);
104
- return t.success ? [] : t.error.errors;
105
- });
106
- function g(t) {
107
- i.value = !0, d.value = !1, t ? r.value = { ...t } : r.value = { ...h };
108
- }
109
- function S() {
110
- i.value = !1;
111
- }
112
- async function Y() {
113
- m.safeParse(r.value).success && (d.value = !0);
114
- }
115
- function C() {
116
- d.value = !1;
117
- }
118
- async function z() {
119
- n("update:model-value", r.value);
120
- }
121
- E(async () => {
122
- });
123
- const n = v;
124
- return y({
125
- showSheet: g,
126
- hideSheet: S
127
- }), (t, s) => {
128
- const x = p("FmButton"), M = p("FmSideSheet");
129
- return c(), B(M, {
130
- modelValue: e(i),
131
- "onUpdate:modelValue": s[5] || (s[5] = (b) => W(i) ? i.value = b : null),
132
- header: "Add segment",
133
- "dismiss-away": "",
134
- "close-button": !0,
135
- "max-width": 1100
136
- }, K({
137
- "side-sheet-footer": f(() => [
138
- a("div", we, [
139
- e(d) ? (c(), w(P, { key: 0 }, [
140
- l(x, {
141
- label: "Save Segment",
142
- onClick: z,
143
- loading: e(_).isLoading,
144
- disabled: e(o).length > 0 || e(_).isLoading
145
- }, null, 8, ["loading", "disabled"]),
146
- l(x, {
147
- label: "Cancel",
148
- onClick: s[3] || (s[3] = (b) => C()),
149
- variant: "tertiary"
150
- })
151
- ], 64)) : (c(), w(P, { key: 1 }, [
152
- l(x, {
153
- label: "Review Segment",
154
- disabled: e(o).length > 0 || e(_).isLoading,
155
- onClick: Y
156
- }, null, 8, ["disabled"]),
157
- l(x, {
158
- label: "Cancel",
159
- onClick: s[4] || (s[4] = (b) => S()),
160
- variant: "tertiary"
161
- })
162
- ], 64))
163
- ])
164
- ]),
165
- default: f(() => {
166
- var b;
167
- return [
168
- e(d) ? (c(), B(he, {
169
- key: 1,
170
- title: e(r).name,
171
- segment: e(r)
172
- }, null, 8, ["title", "segment"])) : (c(), w("div", xe, [
173
- l(re, {
174
- modelValue: e(r).name,
175
- "onUpdate:modelValue": s[1] || (s[1] = (I) => e(r).name = I),
176
- label: "Segment title",
177
- schema: e(ae).typeAtPath(e(m), "name")
178
- }, null, 8, ["modelValue", "schema"]),
179
- s[7] || (s[7] = a("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
180
- l(me, {
181
- "trigger-type": "MEMBERSHIP_JOINED",
182
- includeOnly: "user",
183
- "model-value": (b = e(r)) == null ? void 0 : b.rule,
184
- "onUpdate:modelValue": s[2] || (s[2] = (I) => {
185
- e(r).rule = I;
186
- })
187
- }, null, 8, ["model-value"])
188
- ]))
189
- ];
190
- }),
191
- _: 2
192
- }, [
193
- e(d) ? {
194
- name: "side-sheet-header",
195
- fn: f(() => [
196
- a("div", Se, [
197
- l(x, {
198
- icon: "arrow_back",
199
- variant: "tertiary",
200
- onClick: s[0] || (s[0] = (b) => d.value = !1)
201
- }),
202
- s[6] || (s[6] = a("div", null, "Review segment", -1))
203
- ])
204
- ]),
205
- key: "0"
206
- } : void 0
207
- ]), 1032, ["modelValue"]);
208
- };
209
- }
210
- }), Ce = { class: "flex items-center" }, ke = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Me = { class: "px-24 flex flex-col gap-y-16" }, Ie = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Re = { class: "fm-typo-en-body-md-600" }, $e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ A({
211
- __name: "Segment",
212
- setup(D) {
213
- const { minor: y } = oe, { t: v } = ne(), _ = ce(), i = $(0), d = [
214
- {
215
- header: v("connect.loyalty.segment.table.name"),
216
- accessorFn: (n) => n.name
217
- },
218
- {
219
- header: v("connect.loyalty.segment.table.total_customers"),
220
- accessorFn: (n) => n.memberCount ?? 0
221
- },
222
- {
223
- header: v("connect.loyalty.segment.table.customer_percentage"),
224
- accessorFn: (n) => ((n.memberCount ?? 0) * 100 / i.value).toFixed(2)
225
- },
226
- {
227
- header: v("connect.loyalty.segment.table.actions"),
228
- meta: {
229
- maxWidth: "100px"
230
- },
231
- cell(n) {
232
- return R("div", { class: "flex items-center justify-end" }, [
233
- R(
234
- L.FmMenu,
235
- {
236
- placement: "bottom-end",
237
- onClick: (t) => {
238
- t.stopPropagation();
239
- }
240
- },
241
- {
242
- "menu-button": () => R(L.FmButton, {
243
- icon: "more_vert",
244
- iconColor: "neutral-gray-400",
245
- variant: "tertiary"
246
- }),
247
- default: () => [
248
- R(
249
- L.FmMenuItem,
250
- {
251
- onClick: async (t) => {
252
- t.stopPropagation(), S(n.row.original);
253
- }
254
- },
255
- {
256
- label: R(
257
- "div",
258
- {
259
- class: "text-fm-color-typo-error fm-typo-en-body-md-400"
260
- },
261
- "Remove"
262
- )
263
- }
264
- )
265
- ]
266
- }
267
- )
268
- ]);
269
- }
270
- }
271
- ], h = $(null), { tableMeta: m, rowData: r, debouncedFetchData: o } = H(
272
- k.readAll
273
- );
274
- async function g() {
275
- await y(
276
- async () => {
277
- await k.refreshSegments(), await o({ pageSize: 10, pageIndex: 0 });
278
- },
279
- { message: "Refreshing segmentations" }
280
- );
281
- }
282
- async function S(n) {
283
- await te.remove(`Are you sure you want to remove ${n.name}?`) && await y(
284
- async () => {
285
- await k.delete(n._id), await o({ pageSize: 10, pageIndex: 0 });
286
- },
287
- {
288
- message: `Removing ${n.name}`,
289
- successMessage: `Removed ${n.name} successfully`
290
- }
291
- );
292
- }
293
- async function Y(n) {
294
- await y(
295
- async () => {
296
- var t;
297
- if (n._id) {
298
- const { members: s, _id: x, ...M } = n;
299
- await k.update(n._id, M);
300
- } else
301
- await k.create(n);
302
- await o({ pageSize: 10, pageIndex: 0 }), (t = h.value) == null || t.hideSheet();
303
- },
304
- {
305
- message: "Saving segment",
306
- successMessage: "Segment saved"
307
- }
308
- );
309
- }
310
- function C(n) {
311
- var t;
312
- (t = h.value) == null || t.showSheet(n);
313
- }
314
- const z = j(() => _.isPremium ? [
315
- {
316
- label: "Refresh segments",
317
- value: "refresh"
318
- },
319
- {
320
- label: "Add segment",
321
- value: "add",
322
- isPrimary: !0,
323
- prependIcon: "add"
324
- }
325
- ] : []);
326
- return Q(async () => {
327
- const { meta: n } = await ue.read({
328
- limit: 1,
329
- skip: 0,
330
- sortBy: "_id",
331
- search: void 0,
332
- descending: !1
333
- });
334
- i.value = n.totalResources ?? 0, await o({ pageSize: 10, pageIndex: 0 }), await _.readPremium();
335
- }), (n, t) => {
336
- const s = p("FmPill"), x = p("FmPageHead"), M = p("FmIcon"), b = p("FmMenuItem"), I = p("FmMenu"), Z = p("FmListItem"), q = p("FmList"), G = p("FmButton"), J = p("FmCard");
337
- return c(), w(P, null, [
338
- l(x, {
339
- title: "Segments",
340
- actions: e(z),
341
- "onClick:action": t[0] || (t[0] = (u) => u === "add" ? C() : g())
342
- }, {
343
- title: f(() => [
344
- a("div", Ce, [
345
- a("span", ke, F(e(v)("connect.loyalty.segment.title")), 1),
346
- l(s, { variant: "premium" })
347
- ])
348
- ]),
349
- _: 1
350
- }, 8, ["actions"]),
351
- a("div", Me, [
352
- e(r).length > 0 || e(m).searchValue || e(m).isLoading ? (c(), w(P, { key: 0 }, [
353
- l(O, {
354
- loading: e(m).isLoading,
355
- "row-data": e(r),
356
- "row-count": e(m).totalRows,
357
- "column-defs": d,
358
- "shrink-at": !1,
359
- "page-count": e(m).pageCount,
360
- "page-index": e(m).pageIndex,
361
- "page-size": e(m).pageSize,
362
- onRowClick: t[1] || (t[1] = (u) => {
363
- C(u.original);
364
- }),
365
- onPageChange: e(o)
366
- }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
367
- l(q, { class: "w-full hidden xs:block" }, {
368
- default: f(() => [
369
- (c(!0), w(P, null, X(e(r), (u) => (c(), B(Z, {
370
- key: u._id.toString(),
371
- tag: "label",
372
- onClick: (U) => C(u)
373
- }, {
374
- default: f(() => [
375
- a("div", null, [
376
- a("div", Ie, F((u.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
377
- a("div", Re, F(u.name), 1),
378
- a("div", $e, F(((u.memberCount ?? 0) * 100 / e(i)).toFixed(2)) + "% of customers ", 1)
379
- ])
380
- ]),
381
- append: f(() => [
382
- l(I, { "stop-click-propagation": !0 }, {
383
- "menu-button": f(() => [
384
- l(M, { name: "more_vert" })
385
- ]),
386
- default: f(() => [
387
- l(b, {
388
- class: "text-fm-color-typo-error fm-typo-en-body-md-400",
389
- label: "Remove",
390
- "onUpdate:modelValue": (U) => U && S(u)
391
- }, null, 8, ["onUpdate:modelValue"])
392
- ]),
393
- _: 2
394
- }, 1024)
395
- ]),
396
- _: 2
397
- }, 1032, ["onClick"]))), 128))
398
- ]),
399
- _: 1
400
- })
401
- ], 64)) : (c(), B(J, {
402
- key: 1,
403
- variant: "outlined",
404
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
405
- }, {
406
- default: f(() => [
407
- t[3] || (t[3] = a("img", {
408
- src: ee,
409
- class: "aspect-square w-[150px]"
410
- }, null, -1)),
411
- t[4] || (t[4] = a("div", { class: "flex flex-col gap-16 text-center" }, [
412
- a("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
413
- a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Segments allow you to categorize your customers based on various criteria, enabling targeted marketing and personalized experiences. ")
414
- ], -1)),
415
- l(G, {
416
- variant: "primary",
417
- label: "Create segment",
418
- disabled: !e(_).isPremium,
419
- icon: "add",
420
- onClick: t[2] || (t[2] = (u) => C())
421
- }, null, 8, ["disabled"])
422
- ]),
423
- _: 1
424
- })),
425
- l(Fe, {
426
- ref_key: "sheetRef",
427
- ref: h,
428
- "onUpdate:modelValue": Y
429
- }, null, 512)
430
- ])
431
- ], 64);
432
- };
433
- }
434
- });
435
- export {
436
- Je as default
437
- };