@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11

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 (95) hide show
  1. package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
  2. package/dist/App-Cikl5jnp.js +177 -0
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/Collections-B1SC1rr7.js +453 -0
  7. package/dist/Credit-BgwI8DR3.js +216 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
  10. package/dist/Experience-C2Q-zqV6.js +221 -0
  11. package/dist/Game-DU2pZDGk.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
  15. package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
  16. package/dist/Marketing-DWiTQp9I.js +316 -0
  17. package/dist/Member-BEXKBFry.js +69 -0
  18. package/dist/MemberList-DzMdajIf.js +1733 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
  22. package/dist/Mission-KzwRlaA5.js +259 -0
  23. package/dist/Point-CSKvZXHc.js +222 -0
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
  26. package/dist/Segment-2Q0PonBb.js +447 -0
  27. package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
  28. package/dist/Store-C0WXCKs6.js +1503 -0
  29. package/dist/StoreRewards-eSSIO0nk.js +401 -0
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
  31. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
  32. package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
  33. package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
  34. package/dist/Transaction-0OouN_6s.js +39 -0
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  37. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  38. package/dist/app-Bd19eW7X.js +5381 -0
  39. package/dist/app-CfS25Z66.js +34797 -0
  40. package/dist/app-wDQR6dpb.js +39 -0
  41. package/dist/app.js +5 -3
  42. package/dist/business-dQh3AEot.js +78 -0
  43. package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
  44. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
  45. package/dist/dto-B8NfyVPG.js +1169 -0
  46. package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
  47. package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
  48. package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
  49. package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
  50. package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
  51. package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
  52. package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
  53. package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
  54. package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
  55. package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
  56. package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
  57. package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
  58. package/dist/index-DwKqFNF6.js +3 -0
  59. package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
  60. package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
  61. package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
  62. package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
  63. package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
  64. package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
  65. package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
  66. package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
  67. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/template-clxvNnbF.js +190 -0
  70. package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
  71. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  72. package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
  73. package/package.json +9 -5
  74. package/dist/Broadcast-X69Mtv3b.js +0 -216
  75. package/dist/Card-D0X3v1UF.js +0 -822
  76. package/dist/Collections-umR6Ehqf.js +0 -452
  77. package/dist/Credit-C1EWF7R0.js +0 -214
  78. package/dist/Experience-CqL8wyPm.js +0 -211
  79. package/dist/Game--kYe64EV.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
  81. package/dist/Marketing-CTCQ5ZmZ.js +0 -308
  82. package/dist/Member-DCduX7zP.js +0 -91
  83. package/dist/MemberList-B0EkXZJu.js +0 -1729
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/Mission-CVr9rS_D.js +0 -248
  86. package/dist/Point-BnZ6M74y.js +0 -220
  87. package/dist/Promotion-B0PUve5S.js +0 -218
  88. package/dist/Segment-B-XpkyM5.js +0 -445
  89. package/dist/Store-B2gywCt2.js +0 -1503
  90. package/dist/StoreRewards-D8410Q_-.js +0 -434
  91. package/dist/Transaction-CZBO4v4d.js +0 -36
  92. package/dist/Voucher-se-4JF9B.js +0 -481
  93. package/dist/app-B2ImSO3V.js +0 -53382
  94. package/dist/dto-BWpvRpK2.js +0 -1151
  95. package/dist/template-Dwp7heBA.js +0 -190
@@ -0,0 +1,190 @@
1
+ import { defineComponent as L, openBlock as r, createBlock as C, resolveDynamicComponent as D, unref as e, ref as E, computed as I, onMounted as j, resolveComponent as c, withCtx as d, createElementVNode as l, createElementBlock as w, createVNode as i, normalizeClass as h, createTextVNode as T, Fragment as S, renderList as N, toDisplayString as g, createCommentVNode as M } from "vue";
2
+ import { u as P } from "./campaign-BOl8AgKA.js";
3
+ import { useDialog as q } from "@feedmepos/ui-library";
4
+ import { F as J } from "./index-C_0IFnwi.js";
5
+ import { C as A } from "./collection.fn-B_YsXmrP.js";
6
+ import { s as V } from "./index-CuvNtC_M.js";
7
+ import { _ as G } from "./lodash-B5I3zXaY.js";
8
+ import { C as H } from "./dto-B8NfyVPG.js";
9
+ import { J as U } from "./JsonViewer-v8_C7l5N.js";
10
+ const K = /* @__PURE__ */ L({
11
+ __name: "CampaignChip",
12
+ props: {
13
+ type: { type: String, required: !0 }
14
+ },
15
+ setup(u) {
16
+ const a = H[u.type];
17
+ return (o, t) => (r(), C(D(e(a).chip())));
18
+ }
19
+ }), Q = { class: "flex flex-nowrap gap-x-2 grow h-full" }, R = {
20
+ key: 0,
21
+ class: "p-8 w-1/4"
22
+ }, W = { class: "flex flex-col grow p-24" }, X = { class: "space-y-4" }, Y = { class: "fm-typo-en-title-sm-800" }, Z = { class: "grow pb-16 pr-16 pt-6 w-full max-h-[400px] overflow-y-auto" }, ee = { class: "gap-24 grid grid-cols-1 lg:grid-cols-2" }, te = { class: "gap-4 h-[22px] inline-flex items-center justify-center min-w-min rounded-md" }, ne = { class: "fm-typo-en-title-sm-800" }, oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, se = { class: "flex gap-4 items-end justify-end py-8" }, le = /* @__PURE__ */ L({
23
+ __name: "TemplateDialog",
24
+ props: {
25
+ campaignType: {
26
+ type: String,
27
+ default: () => {
28
+ }
29
+ },
30
+ onOk: {
31
+ type: Function,
32
+ required: !0
33
+ }
34
+ },
35
+ setup(u) {
36
+ const p = q(), a = P(), o = u, t = E({
37
+ intention: null,
38
+ template: null
39
+ }), b = I(() => {
40
+ const m = (a.templates ?? []).filter(
41
+ () => !0
42
+ //t.intention && t.intention.length > 0
43
+ );
44
+ return o.campaignType ? m.filter(
45
+ (n) => {
46
+ var y, f;
47
+ return ((f = (y = n.defaultValue) == null ? void 0 : y.campaign) == null ? void 0 : f.type) === o.campaignType;
48
+ }
49
+ ) : t.value.intention === null ? G.sampleSize(m, 7) : m.filter(
50
+ (n) => n.intention.includes(t.value.intention)
51
+ );
52
+ });
53
+ j(async () => {
54
+ await a.readTemplates();
55
+ });
56
+ function O() {
57
+ o.onOk(void 0), p.close();
58
+ }
59
+ function $() {
60
+ const m = t.value.template;
61
+ o.onOk(a.templates.find((n) => n._id === m)), p.close();
62
+ }
63
+ return (m, n) => {
64
+ const y = c("FmChip"), f = c("FmListItem"), z = c("FmList"), k = c("FmCard"), v = c("FmButton"), B = c("FmSpacer");
65
+ return r(), C(k, { class: "h-[534px] max-w-6xl" }, {
66
+ default: d(() => [
67
+ l("div", Q, [
68
+ o.campaignType ? M("", !0) : (r(), w("div", R, [
69
+ i(z, null, {
70
+ default: d(() => [
71
+ i(f, {
72
+ class: h([{
73
+ "bg-fm-color-system-warning-100": e(t).intention === null
74
+ }, "rounded-sm"]),
75
+ onClick: n[0] || (n[0] = (s) => {
76
+ e(t).intention = null, e(t).template = null;
77
+ })
78
+ }, {
79
+ append: d(() => [
80
+ i(y, {
81
+ label: "Hot",
82
+ variant: "critical"
83
+ })
84
+ ]),
85
+ default: d(() => [
86
+ n[2] || (n[2] = T(" Most popular "))
87
+ ]),
88
+ _: 1
89
+ }, 8, ["class"]),
90
+ (r(!0), w(S, null, N(e(J).options, (s, x) => (r(), C(f, {
91
+ key: x,
92
+ class: h(["rounded-sm", {
93
+ "bg-fm-color-system-warning-100": e(t).intention === s
94
+ }]),
95
+ style: { padding: "8px 16px" },
96
+ onClick: (_) => {
97
+ e(t).intention = s, e(t).template = null;
98
+ }
99
+ }, {
100
+ default: d(() => [
101
+ T(g(e(V)(s)), 1)
102
+ ]),
103
+ _: 2
104
+ }, 1032, ["class", "onClick"]))), 128))
105
+ ]),
106
+ _: 1
107
+ })
108
+ ])),
109
+ l("div", W, [
110
+ l("div", X, [
111
+ l("div", Y, g(o.campaignType ? e(V)(
112
+ `${e(A).formattedType(o.campaignType)} campaign`
113
+ ) : "Template list"), 1),
114
+ n[3] || (n[3] = l("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Get started faster with templates that flex with your business. ", -1))
115
+ ]),
116
+ l("div", Z, [
117
+ i(U, { json: e(b) }, null, 8, ["json"]),
118
+ l("div", ee, [
119
+ (r(!0), w(S, null, N(e(b), (s, x) => (r(), C(k, {
120
+ key: x,
121
+ variant: "outlined",
122
+ class: h(["box-border cursor-pointer h-full p-16 scroll-p-4 space-y-8", {
123
+ "bg-fm-color-system-warning-100 border-fm-color-primary border-2": e(t).template === s._id.toString()
124
+ }]),
125
+ onClick: (_) => e(t).template = s._id.toString()
126
+ }, {
127
+ default: d(() => {
128
+ var _, F;
129
+ return [
130
+ l("div", te, [
131
+ i(K, {
132
+ type: (F = (_ = s.defaultValue) == null ? void 0 : _.campaign) == null ? void 0 : F.type
133
+ }, null, 8, ["type"])
134
+ ]),
135
+ l("div", ne, g(s.name), 1),
136
+ l("p", oe, g(s.description), 1)
137
+ ];
138
+ }),
139
+ _: 2
140
+ }, 1032, ["class", "onClick"]))), 128))
141
+ ])
142
+ ]),
143
+ l("div", se, [
144
+ i(v, {
145
+ class: "sm:w-full xs:w-full",
146
+ variant: "plain",
147
+ label: "Custom Campaign",
148
+ size: "md",
149
+ onClick: O
150
+ }),
151
+ i(B, { class: "sm:hidden xs:hidden" }),
152
+ i(v, {
153
+ class: "sm:w-full xs:w-full",
154
+ variant: "tertiary",
155
+ label: "Cancel",
156
+ size: "md",
157
+ onClick: n[1] || (n[1] = (s) => e(p).close())
158
+ }),
159
+ i(v, {
160
+ class: "sm:w-full xs:w-full",
161
+ variant: "primary",
162
+ label: "Start",
163
+ size: "md",
164
+ disabled: !e(t).template,
165
+ onClick: $
166
+ }, null, 8, ["disabled"])
167
+ ])
168
+ ])
169
+ ])
170
+ ]),
171
+ _: 1
172
+ });
173
+ };
174
+ }
175
+ }), ye = (u, p) => ({
176
+ open: async (a) => {
177
+ p.open({
178
+ title: "",
179
+ dialogComponent: le,
180
+ dialogComponentProps: {
181
+ campaignType: u,
182
+ onOk: async (o) => (console.debug(o, "selected template"), await a(o))
183
+ },
184
+ overlay: !0
185
+ });
186
+ }
187
+ });
188
+ export {
189
+ ye as u
190
+ };
@@ -1,5 +1,5 @@
1
- import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as x, Fragment as P, renderList as E, computed as b, onMounted as L, watch as R, unref as p, createCommentVNode as V, toDisplayString as k } from "vue";
2
- import { l as A } from "./lodash-mg4435Qq.js";
1
+ import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as S, Fragment as P, renderList as E, computed as h, onMounted as L, watch as R, unref as p, createCommentVNode as V, toDisplayString as x } from "vue";
2
+ import { l as A } from "./lodash-B5I3zXaY.js";
3
3
  const T = ["id"], D = /* @__PURE__ */ M({
4
4
  __name: "FmTableSelection",
5
5
  props: {
@@ -8,10 +8,10 @@ const T = ["id"], D = /* @__PURE__ */ M({
8
8
  },
9
9
  emits: ["update:modelValue"],
10
10
  setup(f, { emit: g }) {
11
- const o = g, t = f, r = w(!1);
11
+ const a = g, l = f, r = w(!1);
12
12
  return (d, u) => {
13
- const h = C("FmButton"), y = C("FmMenuItem"), a = C("FmMenu");
14
- return v(), F(a, {
13
+ const y = C("FmButton"), b = C("FmMenuItem"), o = C("FmMenu");
14
+ return v(), F(o, {
15
15
  "max-height": 264,
16
16
  shift: "",
17
17
  onMenuChanged: u[0] || (u[0] = (n) => r.value = n)
@@ -19,9 +19,9 @@ const T = ["id"], D = /* @__PURE__ */ M({
19
19
  "menu-button": B(() => {
20
20
  var n;
21
21
  return [
22
- c(h, {
22
+ c(y, {
23
23
  icon: r.value ? "expand_less" : "expand_more",
24
- label: (n = d.items.find((l) => l.value === t.value)) == null ? void 0 : n.label,
24
+ label: (n = d.items.find((s) => s.value === l.value)) == null ? void 0 : n.label,
25
25
  "icon-position": "append",
26
26
  size: "md",
27
27
  variant: "tertiary"
@@ -34,12 +34,12 @@ const T = ["id"], D = /* @__PURE__ */ M({
34
34
  style: N({ maxHeight: `${n}px` }),
35
35
  class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
36
36
  }, [
37
- (v(!0), x(P, null, E(d.items, (l) => (v(), F(y, {
38
- key: l.value,
39
- label: l.label,
40
- value: l.value,
41
- "model-value": l.value === t.value,
42
- "onUpdate:modelValue": (S) => o("update:modelValue", l.value)
37
+ (v(!0), S(P, null, E(d.items, (s) => (v(), F(b, {
38
+ key: s.value,
39
+ label: s.label,
40
+ value: s.value,
41
+ "model-value": s.value === l.value,
42
+ "onUpdate:modelValue": (z) => a("update:modelValue", s.value)
43
43
  }, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
44
44
  ], 12, T)
45
45
  ]),
@@ -50,13 +50,10 @@ const T = ["id"], D = /* @__PURE__ */ M({
50
50
  }), U = { class: "" }, O = {
51
51
  key: 0,
52
52
  class: "w-full flex flex-col gap-16 items-center py-16"
53
- }, j = /* @__PURE__ */ i("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1), W = /* @__PURE__ */ i("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1), q = [
54
- j,
55
- W
56
- ], G = {
53
+ }, j = {
57
54
  key: 1,
58
55
  class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
59
- }, H = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, J = { class: "flex gap-8 items-center" }, K = /* @__PURE__ */ i("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1), Q = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, X = { class: "flex gap-8 items-center" }, Y = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, Z = { class: "flex gap-8" }, ae = /* @__PURE__ */ M({
56
+ }, W = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, q = { class: "flex gap-8 items-center" }, G = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, H = { class: "flex gap-8 items-center" }, J = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, K = { class: "flex gap-8" }, Y = /* @__PURE__ */ M({
60
57
  __name: "BaseTable",
61
58
  props: {
62
59
  rowData: {},
@@ -76,27 +73,27 @@ const T = ["id"], D = /* @__PURE__ */ M({
76
73
  },
77
74
  emits: ["sortChange", "rowClick", "pageChange"],
78
75
  setup(f, { emit: g }) {
79
- const o = f, t = g, r = b(() => o.pageIndex + 1), d = b(() => o.pageIndex * o.pageSize), u = b(
80
- () => Math.min(d.value + o.pageSize, o.rowCount || 0)
81
- ), h = b(() => o.pageIndex > 0), y = b(() => o.pageIndex < o.pageCount - 1), a = (e) => {
82
- t("sortChange", e);
76
+ const a = f, l = g, r = h(() => a.pageIndex + 1), d = h(() => a.pageIndex * a.pageSize), u = h(
77
+ () => Math.min(d.value + a.pageSize, a.rowCount || 0)
78
+ ), y = h(() => a.pageIndex > 0), b = h(() => a.pageIndex < a.pageCount - 1), o = (e) => {
79
+ l("sortChange", e);
83
80
  }, n = (e) => {
84
- t("rowClick", e);
85
- }, l = (e) => {
86
- t("pageChange", { pageIndex: e, pageSize: o.pageSize });
87
- }, S = (e) => {
88
- t("pageChange", { pageIndex: 0, pageSize: e });
89
- }, z = w(!1);
81
+ l("rowClick", e);
82
+ }, s = (e) => {
83
+ l("pageChange", { pageIndex: e, pageSize: a.pageSize });
84
+ }, z = (e) => {
85
+ l("pageChange", { pageIndex: 0, pageSize: e });
86
+ }, I = w(!1);
90
87
  return L(() => {
91
88
  R(
92
- () => o.loading,
93
- (e, s) => {
94
- s === !0 && e === !1 && (z.value = !0);
89
+ () => a.loading,
90
+ (e, t) => {
91
+ t === !0 && e === !1 && (I.value = !0);
95
92
  }
96
93
  );
97
- }), (e, s) => {
98
- const $ = C("FmTable"), _ = C("FmButton");
99
- return v(), x("div", U, [
94
+ }), (e, t) => {
95
+ const $ = C("FmTable"), k = C("FmButton");
96
+ return v(), S("div", U, [
100
97
  c($, {
101
98
  loading: e.loading,
102
99
  "row-data": e.rowData,
@@ -107,60 +104,63 @@ const T = ["id"], D = /* @__PURE__ */ M({
107
104
  "page-size": e.pageSize,
108
105
  "fetch-fn": void 0,
109
106
  "hide-footer": "",
110
- onSortChange: a,
107
+ onSortChange: o,
111
108
  onRowClick: n
112
109
  }, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
113
- e.rowData.length == 0 && e.loading == !1 && p(z) ? (v(), x("div", O, q)) : V("", !0),
114
- e.hideFooter ? V("", !0) : (v(), x("div", G, [
115
- i("div", H, [
116
- i("div", J, [
117
- K,
110
+ e.rowData.length == 0 && e.loading == !1 && p(I) ? (v(), S("div", O, t[5] || (t[5] = [
111
+ i("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1),
112
+ i("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1)
113
+ ]))) : V("", !0),
114
+ e.hideFooter ? V("", !0) : (v(), S("div", j, [
115
+ i("div", W, [
116
+ i("div", q, [
117
+ t[6] || (t[6] = i("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
118
118
  c(D, {
119
119
  items: e.pageSizeOptions,
120
120
  value: e.pageSize,
121
- "onUpdate:modelValue": S
121
+ "onUpdate:modelValue": z
122
122
  }, null, 8, ["items", "value"])
123
123
  ]),
124
- i("span", Q, k(p(d) + 1) + " - " + k(p(u)) + " of " + k(e.rowCount) + " items ", 1)
124
+ i("span", G, x(p(d) + 1) + " - " + x(p(u)) + " of " + x(e.rowCount) + " items ", 1)
125
125
  ]),
126
- i("div", X, [
126
+ i("div", H, [
127
127
  c(D, {
128
- items: Array.from(Array(e.pageCount), (m, I) => ({
129
- label: (I + 1).toString(),
130
- value: I + 1
128
+ items: Array.from(Array(e.pageCount), (m, _) => ({
129
+ label: (_ + 1).toString(),
130
+ value: _ + 1
131
131
  })),
132
132
  value: p(r),
133
- "onUpdate:modelValue": s[0] || (s[0] = (m) => l(m - 1))
133
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => s(m - 1))
134
134
  }, null, 8, ["items", "value"]),
135
- i("span", Y, " of " + k(e.pageCount) + " pages ", 1),
136
- i("div", Z, [
137
- c(_, {
138
- disabled: !p(h),
135
+ i("span", J, " of " + x(e.pageCount) + " pages ", 1),
136
+ i("div", K, [
137
+ c(k, {
138
+ disabled: !p(y),
139
139
  icon: "first_page",
140
140
  "icon-color": "neutral-black",
141
141
  variant: "tertiary",
142
- onClick: s[1] || (s[1] = (m) => l(0))
142
+ onClick: t[1] || (t[1] = (m) => s(0))
143
143
  }, null, 8, ["disabled"]),
144
- c(_, {
145
- disabled: !p(h),
144
+ c(k, {
145
+ disabled: !p(y),
146
146
  icon: "chevron_left",
147
147
  "icon-color": "neutral-black",
148
148
  variant: "tertiary",
149
- onClick: s[2] || (s[2] = (m) => l(e.pageIndex - 1))
149
+ onClick: t[2] || (t[2] = (m) => s(e.pageIndex - 1))
150
150
  }, null, 8, ["disabled"]),
151
- c(_, {
152
- disabled: !p(y),
151
+ c(k, {
152
+ disabled: !p(b),
153
153
  icon: "chevron_right",
154
154
  "icon-color": "neutral-black",
155
155
  variant: "tertiary",
156
- onClick: s[3] || (s[3] = (m) => l(e.pageIndex + 1))
156
+ onClick: t[3] || (t[3] = (m) => s(e.pageIndex + 1))
157
157
  }, null, 8, ["disabled"]),
158
- c(_, {
159
- disabled: !p(y),
158
+ c(k, {
159
+ disabled: !p(b),
160
160
  icon: "last_page",
161
161
  "icon-color": "neutral-black",
162
162
  variant: "tertiary",
163
- onClick: s[4] || (s[4] = (m) => l(e.pageCount - 1))
163
+ onClick: t[4] || (t[4] = (m) => s(e.pageCount - 1))
164
164
  }, null, 8, ["disabled"])
165
165
  ])
166
166
  ])
@@ -169,55 +169,55 @@ const T = ["id"], D = /* @__PURE__ */ M({
169
169
  };
170
170
  }
171
171
  });
172
- function ne(f, g = { key: "_id", descending: !0 }) {
173
- const o = w({
172
+ function Z(f, g = { key: "_id", descending: !0 }) {
173
+ const a = w({
174
174
  pageCount: 0,
175
175
  searchValue: "",
176
176
  pageIndex: 0,
177
177
  totalRows: 0,
178
178
  isLoading: !1,
179
179
  pageSize: 10
180
- }), t = w(g), r = w([]), d = async (a) => {
181
- o.value.isLoading = !0, r.value = [];
180
+ }), l = w(g), r = w([]), d = async (o) => {
181
+ a.value.isLoading = !0, r.value = [];
182
182
  try {
183
183
  const n = await f({
184
- limit: a.pageSize || o.value.pageSize,
185
- skip: a.pageIndex ?? 0,
186
- sortBy: t.value.key,
187
- descending: t.value.descending,
188
- search: o.value.searchValue
184
+ limit: o.pageSize || a.value.pageSize,
185
+ skip: o.pageIndex ?? 0,
186
+ sortBy: l.value.key,
187
+ descending: l.value.descending,
188
+ search: a.value.searchValue
189
189
  });
190
- r.value = n.resources, o.value.totalRows = n.meta.totalResources ?? 0, o.value.pageCount = n.meta.totalPages ?? 0, o.value.pageIndex = n.meta.skip ?? 0;
190
+ r.value = n.resources, a.value.totalRows = n.meta.totalResources ?? 0, a.value.pageCount = n.meta.totalPages ?? 0, a.value.pageIndex = n.meta.skip ?? 0;
191
191
  } catch (n) {
192
192
  console.error("Error fetching data:", n);
193
193
  } finally {
194
- o.value.isLoading = !1;
194
+ a.value.isLoading = !1;
195
195
  }
196
- }, u = A.debounce(async (a) => {
197
- o.value.pageSize = (a == null ? void 0 : a.pageSize) || o.value.pageSize, await d({
198
- pageSize: o.value.pageSize,
199
- pageIndex: (a == null ? void 0 : a.pageIndex) || 0
196
+ }, u = A.debounce(async (o) => {
197
+ a.value.pageSize = (o == null ? void 0 : o.pageSize) || a.value.pageSize, await d({
198
+ pageSize: a.value.pageSize,
199
+ pageIndex: (o == null ? void 0 : o.pageIndex) || 0
200
200
  });
201
201
  }, 200);
202
202
  return {
203
- tableMeta: o,
203
+ tableMeta: a,
204
204
  rowData: r,
205
- sortBy: t,
205
+ sortBy: l,
206
206
  fetchData: d,
207
207
  debouncedFetchData: u,
208
- onSort: async (a) => {
208
+ onSort: async (o) => {
209
209
  var n;
210
- console.log("sortState", (n = a[0]) == null ? void 0 : n.id), a.length ? (t.value = {
211
- key: a[0].id.startsWith("_") ? a[0].id : a[0].id.replace(new RegExp("_", "g"), "."),
212
- descending: a[0].desc
213
- }, console.log("sortBy", t.value)) : t.value = g, await u();
210
+ console.log("sortState", (n = o[0]) == null ? void 0 : n.id), o.length ? (l.value = {
211
+ key: o[0].id.startsWith("_") ? o[0].id : o[0].id.replace(new RegExp("_", "g"), "."),
212
+ descending: o[0].desc
213
+ }, console.log("sortBy", l.value)) : l.value = g, await u();
214
214
  },
215
215
  onSearch: () => {
216
- u({ pageIndex: 0, pageSize: o.value.pageSize });
216
+ u({ pageIndex: 0, pageSize: a.value.pageSize });
217
217
  }
218
218
  };
219
219
  }
220
220
  export {
221
- ae as _,
222
- ne as u
221
+ Y as _,
222
+ Z as u
223
223
  };