@feedmepos/mf-connect 0.1.24-prod → 0.1.26-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 (93) hide show
  1. package/dist/{Analytic-DH3odpBh.js → Analytic-WXmpLkLU.js} +18 -17
  2. package/dist/{App-DT9d3Bm2.js → App-jBGNDeCb.js} +6 -6
  3. package/dist/{Bin-CEFG1nRH.js → Bin-COj4GqKe.js} +19 -18
  4. package/dist/{Broadcast-B_rv159-.js → Broadcast-vIqSNTJh.js} +13 -12
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DzD9-r4-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVtfunGL.js} +14 -8
  6. package/dist/{Card-Dyya8J2U.js → Card-CGyBry4S.js} +57 -55
  7. package/dist/{Collections-Dl2FDFOD.js → Collections-BeQ_uFRE.js} +23 -21
  8. package/dist/{Credit-B9mz3eUI.js → Credit-DWsgc_P1.js} +35 -34
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-TrKmONi5.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DxPsGM7d.js} +28 -27
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVCgGHg4.js → EffectSheet.vue_vue_type_style_index_0_lang-DlCdWAqB.js} +6 -6
  11. package/dist/{Experience-CGwG9JGa.js → Experience-DQ5ofpRU.js} +13 -12
  12. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  13. package/dist/Game-dl01-cxh.js +278 -0
  14. package/dist/{Index-D0IkkcBH.js → Index-B33SYml2.js} +14 -13
  15. package/dist/{Marketing-HmC8ZXqz.js → Marketing-CqWuI9r1.js} +8 -7
  16. package/dist/Member-PuWzURyR.js +348 -0
  17. package/dist/{MemberList-_MFrJqht.js → MemberList-dQljjKIC.js} +275 -269
  18. package/dist/{MemberTransactions-kUyU9Qn6.js → MemberTransactions-BH1U_v3f.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DypmZY2G.js → MessageInput.vue_vue_type_script_setup_true_lang-ZSNwpN6m.js} +7 -7
  20. package/dist/{Mission-OUjm7KRr.js → Mission-PjsS8VTH.js} +118 -96
  21. package/dist/{Overview-F2AvMo-g.js → Overview-B6zXdxIf.js} +63 -62
  22. package/dist/{Point-K9poYQjB.js → Point-DhYeSbYo.js} +11 -10
  23. package/dist/{Promotion-DpS6PQFU.js → Promotion-4yBcCEQA.js} +12 -11
  24. package/dist/Queue-BCOe370v.js +249 -0
  25. package/dist/{Record-CZMB7xKL.js → Record-FxeE4KZe.js} +21 -19
  26. package/dist/{Reward-zMCEkbO5.js → Reward-B4licTuW.js} +19 -18
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dj73NYhp.js → RewardGroup.vue_vue_type_script_setup_true_lang-CKWOhSQh.js} +13 -12
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-FyuAHi5K.js → RuleGroup.vue_vue_type_script_setup_true_lang-BbOzaj63.js} +12 -12
  29. package/dist/{Segment-LthACAfl.js → Segment-DONb4N1l.js} +19 -17
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DRe6Gyov.js → SelectItems.vue_vue_type_script_setup_true_lang-CvHYZpGm.js} +2 -2
  31. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-NDwwOZSM.js +188 -0
  32. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Z9Nb9b6-.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2ixqrV7.js} +3 -3
  33. package/dist/{Setting-8ASd681E.js → Setting-BQOcVtGa.js} +20 -19
  34. package/dist/{Store-C-bmQP0K.js → Store-BlaFXTeO.js} +24 -23
  35. package/dist/{StoreRewards-Bu3DWaCn.js → StoreRewards-Lqc34UoD.js} +15 -14
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C5dViJNi.js +994 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Bn7aoYqw.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-e_31o0i7.js} +1 -1
  38. package/dist/{Tier-DDKUGBRg.js → Tier-B26lO0SB.js} +25 -24
  39. package/dist/{Title-Cup_EWfZ.js → Title-BASSyfhP.js} +28 -27
  40. package/dist/{Transaction-BqvgfyiW.js → Transaction-BbzBRylw.js} +2 -2
  41. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BCkXievQ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BFyl96zy.js} +6 -6
  42. package/dist/{Voucher-Dxk6zfcN.js → Voucher-A_GG0E5t.js} +38 -37
  43. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DmswMNi5.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CCGtKQTW.js} +10 -10
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D-UPL1Rc.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGNqvOl5.js} +1 -1
  45. package/dist/{app-bidojB9R.js → app-C7FQYfsn.js} +1 -1
  46. package/dist/{app-BDUrJlXZ.js → app-DV-5XPYF.js} +235 -166
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CFOn3-Hz.js → business-C8PXQSRE.js} +1 -1
  49. package/dist/{campaign-DyzzIbnA.js → campaign-B4eKVpps.js} +9 -9
  50. package/dist/{campaign-BVIiGyq9.js → campaign-CuZ6u4yy.js} +2 -2
  51. package/dist/{campaign.enum-aFjayQfJ.js → campaign.enum-xbqqPDwY.js} +1 -1
  52. package/dist/{campaign.fn-BKADpFTx.js → campaign.fn-GFFtrWsz.js} +133 -133
  53. package/dist/{collectible.enum-vEUgo0YF.js → collectible.enum-DB4oBcfv.js} +1 -1
  54. package/dist/{collection.fn-D2Kbz9yq.js → collection.fn-BwpscyTl.js} +2 -2
  55. package/dist/{dto-CKxtFHko.js → dto-Cr20KGr0.js} +4 -4
  56. package/dist/{effect-BEWKDhDB.js → effect-D9-UiBiK.js} +1 -1
  57. package/dist/{email-addresses-BWDg5Wvf.js → email-addresses-F3hoXmRI.js} +1 -1
  58. package/dist/{export-DO-WeD6l.js → export-BIPF1ilY.js} +3 -3
  59. package/dist/{helper-CSGr0Zgt.js → helper-Tf1bFEee.js} +1 -1
  60. package/dist/{index-UVHHFXyh.js → index-B2jAIO5k.js} +1162 -1129
  61. package/dist/{index-Dw_jc7Et.js → index-BYzdfZKb.js} +3 -3
  62. package/dist/{index-BgJVKNYg.js → index-BhlEaLpy.js} +24 -21
  63. package/dist/{index-BV4M35iK.js → index-Bkw-11Tg.js} +2 -2
  64. package/dist/{index-CFXFhGs9.js → index-BvqdtS9H.js} +1 -1
  65. package/dist/{index-DVsh-nBE.js → index-CpUyyTF6.js} +1 -1
  66. package/dist/{index-CUlYeKKH.js → index-D4XX55M5.js} +1 -1
  67. package/dist/{index-CEjeBL2U.js → index-Dow2N7x1.js} +1 -1
  68. package/dist/{index--Mrx1FRI.js → index-IOTB7rGH.js} +1 -1
  69. package/dist/{index-CoMMyOsj.js → index-bb6Kd8k_.js} +10 -10
  70. package/dist/{index-DSBnWOie.js → index-gTmOLzQU.js} +1 -1
  71. package/dist/{index-Bg3caQS6.js → index-mjBmZtX2.js} +1273 -1273
  72. package/dist/{index.esm2017-CDzvT_fP.js → index.esm2017-Y_0J3nbR.js} +137 -137
  73. package/dist/loading-BbC_ZIPE.js +71 -0
  74. package/dist/{membership-DK9FNo2Y.js → membership-BM_2_hUW.js} +3 -3
  75. package/dist/{money-DJYiw0es.js → money-BsBmwalY.js} +1 -1
  76. package/dist/{number-BjhqQBza.js → number-QqpGrk9q.js} +1 -1
  77. package/dist/objectid-DQj-P2cH.js +145 -0
  78. package/dist/{loading-CWihCJvJ.js → plugins-DKPF0eaB.js} +1535 -1601
  79. package/dist/{reward-DlE5Zt3d.js → reward-Yl3EdHrH.js} +1 -1
  80. package/dist/{rule-a2_WCjR8.js → rule-DW_bLKtu.js} +3 -3
  81. package/dist/{rule-builder-Q8iGSpDV.js → rule-builder-BoITzEtm.js} +1 -1
  82. package/dist/{template-3faxO3XM.js → template-BSQzNJs5.js} +4 -4
  83. package/dist/{trigger-Cnvhgqkj.js → trigger-Bel1H8iR.js} +11 -11
  84. package/dist/usePagination-JoYaROkV.js +223 -0
  85. package/dist/{user-CoiXBmet.js → user-Dg2HfZlK.js} +1 -1
  86. package/dist/vue-i18n-CvvsV6dR.js +2365 -0
  87. package/dist/{usePagination-dNrSGtRV.js → xlsx-1oIZztwO.js} +2979 -3200
  88. package/package.json +3 -1
  89. package/dist/Game-DbhOlio1.js +0 -256
  90. package/dist/Member-NSQ2nHzW.js +0 -69
  91. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDRpkUaP.js +0 -1105
  92. package/dist/objectid-Cep7PkzN.js +0 -145
  93. package/dist/vue-i18n-B2XH0K8P.js +0 -2365
@@ -1,5 +1,5 @@
1
1
  import { defineStore as n } from "pinia";
2
- import { g as r, S as d, b as o } from "./index-Bg3caQS6.js";
2
+ import { g as r, S as d, b as o } from "./index-mjBmZtX2.js";
3
3
  import { ref as i } from "vue";
4
4
  const a = () => {
5
5
  const e = d.getBusinessId();
@@ -1,8 +1,8 @@
1
1
  import { h as S } from "./moment-BWErdI6_.js";
2
2
  import { a as de, b as N, c as y } from "./tslib.es6-BCqqvLQ_.js";
3
- import { u as ee } from "./membership-DK9FNo2Y.js";
4
- import { R as B, a as pe } from "./rule-builder-Q8iGSpDV.js";
5
- import { u as Be } from "./business-CFOn3-Hz.js";
3
+ import { u as ee } from "./membership-BM_2_hUW.js";
4
+ import { R as B, a as pe } from "./rule-builder-BoITzEtm.js";
5
+ import { u as Be } from "./business-C8PXQSRE.js";
6
6
  var ue = [
7
7
  "MO",
8
8
  "TU",
@@ -1,4 +1,4 @@
1
- import { l as i } from "./index-BV4M35iK.js";
1
+ import { l as i } from "./index-Bkw-11Tg.js";
2
2
  function a(c, t) {
3
3
  let r = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
4
4
  const e = s.length;
@@ -1,11 +1,11 @@
1
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 m, withCtx as d, createElementVNode as s, createElementBlock as h, createVNode as a, normalizeClass as w, createTextVNode as T, Fragment as S, renderList as N, toDisplayString as g, createCommentVNode as M } from "vue";
2
- import { u as P } from "./campaign-BVIiGyq9.js";
2
+ import { u as P } from "./campaign-CuZ6u4yy.js";
3
3
  import { useDialog as q } from "@feedmepos/ui-library";
4
- import { F as J } from "./index-CoMMyOsj.js";
5
- import { C as A } from "./collection.fn-D2Kbz9yq.js";
4
+ import { F as J } from "./index-bb6Kd8k_.js";
5
+ import { C as A } from "./collection.fn-BwpscyTl.js";
6
6
  import { s as V } from "./index-CuvNtC_M.js";
7
7
  import { _ as G } from "./lodash-B5I3zXaY.js";
8
- import { C as H } from "./campaign-DyzzIbnA.js";
8
+ import { C as H } from "./campaign-B4eKVpps.js";
9
9
  import { J as U } from "./JsonViewer-v8_C7l5N.js";
10
10
  const K = /* @__PURE__ */ L({
11
11
  __name: "CampaignChip",
@@ -1,9 +1,9 @@
1
- import { defineComponent as d, openBlock as m, createBlock as s, unref as n } from "vue";
2
- import "./index-BV4M35iK.js";
3
- import { R as l } from "./rule-builder-Q8iGSpDV.js";
4
- import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-FyuAHi5K.js";
5
- import { i as e, C as E } from "./index-UVHHFXyh.js";
6
- const O = /* @__PURE__ */ d({
1
+ import { defineComponent as i, openBlock as m, createBlock as s, unref as n } from "vue";
2
+ import "./index-Bkw-11Tg.js";
3
+ import { R as l } from "./rule-builder-BoITzEtm.js";
4
+ import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BbOzaj63.js";
5
+ import { j as e, C as E } from "./index-B2jAIO5k.js";
6
+ const O = /* @__PURE__ */ i({
7
7
  __name: "BillRuleGroup",
8
8
  props: {
9
9
  modelValue: {
@@ -21,18 +21,18 @@ const O = /* @__PURE__ */ d({
21
21
  "include-only": "bill",
22
22
  "trigger-type": "BILL_COMPLETED",
23
23
  "model-value": ((t = r.modelValue) == null ? void 0 : t.rules.g_bill) ?? n(l).scaffoldGroup("g_bill"),
24
- "onUpdate:modelValue": u[0] || (u[0] = (i) => o(
24
+ "onUpdate:modelValue": u[0] || (u[0] = (d) => o(
25
25
  "update:model-value",
26
26
  n(l).setRuleToGroup(
27
27
  r.modelValue ?? n(l).scaffoldGroup(),
28
- i,
28
+ d,
29
29
  "&&"
30
30
  )
31
31
  ))
32
32
  }, null, 8, ["model-value"]);
33
33
  };
34
34
  }
35
- }), T = /* @__PURE__ */ d({
35
+ }), T = /* @__PURE__ */ i({
36
36
  __name: "FeedbackRuleGroup",
37
37
  props: {
38
38
  modelValue: {
@@ -50,11 +50,11 @@ const O = /* @__PURE__ */ d({
50
50
  "include-only": "feedback",
51
51
  "trigger-type": "FEEDBACK",
52
52
  "model-value": ((t = r.modelValue) == null ? void 0 : t.rules.g_feedback) ?? n(l).scaffoldGroup("g_feedback"),
53
- "onUpdate:modelValue": u[0] || (u[0] = (i) => o(
53
+ "onUpdate:modelValue": u[0] || (u[0] = (d) => o(
54
54
  "update:model-value",
55
55
  n(l).setRuleToGroup(
56
56
  r.modelValue ?? n(l).scaffoldGroup(),
57
- i,
57
+ d,
58
58
  "&&"
59
59
  )
60
60
  ))
@@ -0,0 +1,223 @@
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-B5I3zXaY.js";
3
+ const T = ["id"], D = /* @__PURE__ */ M({
4
+ __name: "FmTableSelection",
5
+ props: {
6
+ value: {},
7
+ items: {}
8
+ },
9
+ emits: ["update:modelValue"],
10
+ setup(f, { emit: g }) {
11
+ const o = g, t = f, r = w(!1);
12
+ return (d, u) => {
13
+ const h = C("FmButton"), y = C("FmMenuItem"), a = C("FmMenu");
14
+ return v(), F(a, {
15
+ "max-height": 264,
16
+ shift: "",
17
+ onMenuChanged: u[0] || (u[0] = (n) => r.value = n)
18
+ }, {
19
+ "menu-button": B(() => {
20
+ var n;
21
+ return [
22
+ c(h, {
23
+ icon: r.value ? "expand_less" : "expand_more",
24
+ label: (n = d.items.find((l) => l.value === t.value)) == null ? void 0 : n.label,
25
+ "icon-position": "append",
26
+ size: "md",
27
+ variant: "tertiary"
28
+ }, null, 8, ["icon", "label"])
29
+ ];
30
+ }),
31
+ "menu-wrapper": B(({ maxHeight: n }) => [
32
+ i("div", {
33
+ id: `menu-wrapper-${n}`,
34
+ style: N({ maxHeight: `${n}px` }),
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
+ }, [
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)
43
+ }, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
44
+ ], 12, T)
45
+ ]),
46
+ _: 1
47
+ });
48
+ };
49
+ }
50
+ }), U = { class: "" }, O = {
51
+ key: 0,
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 = {
57
+ key: 1,
58
+ 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({
60
+ __name: "BaseTable",
61
+ props: {
62
+ rowData: {},
63
+ columnDefs: {},
64
+ loading: { type: Boolean, default: !1 },
65
+ rowCount: { default: 0 },
66
+ shrinkAt: { type: [Number, Boolean], default: !1 },
67
+ pageCount: {},
68
+ pageIndex: {},
69
+ hideFooter: { type: Boolean, default: !1 },
70
+ pageSize: {},
71
+ pageSizeOptions: { default: () => [
72
+ { label: "10", value: 10 },
73
+ { label: "20", value: 20 },
74
+ { label: "50", value: 50 }
75
+ ] }
76
+ },
77
+ emits: ["sortChange", "rowClick", "pageChange"],
78
+ 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);
83
+ }, 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);
90
+ return L(() => {
91
+ R(
92
+ () => o.loading,
93
+ (e, s) => {
94
+ s === !0 && e === !1 && (z.value = !0);
95
+ }
96
+ );
97
+ }), (e, s) => {
98
+ const $ = C("FmTable"), _ = C("FmButton");
99
+ return v(), x("div", U, [
100
+ c($, {
101
+ loading: e.loading,
102
+ "row-data": e.rowData,
103
+ "row-count": e.rowCount,
104
+ "column-defs": e.columnDefs,
105
+ "shrink-at": e.shrinkAt,
106
+ "page-count": e.pageCount,
107
+ "page-size": e.pageSize,
108
+ "fetch-fn": void 0,
109
+ "hide-footer": "",
110
+ onSortChange: a,
111
+ onRowClick: n
112
+ }, 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,
118
+ c(D, {
119
+ items: e.pageSizeOptions,
120
+ value: e.pageSize,
121
+ "onUpdate:modelValue": S
122
+ }, null, 8, ["items", "value"])
123
+ ]),
124
+ i("span", Q, k(p(d) + 1) + " - " + k(p(u)) + " of " + k(e.rowCount) + " items ", 1)
125
+ ]),
126
+ i("div", X, [
127
+ c(D, {
128
+ items: Array.from(Array(e.pageCount), (m, I) => ({
129
+ label: (I + 1).toString(),
130
+ value: I + 1
131
+ })),
132
+ value: p(r),
133
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => l(m - 1))
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),
139
+ icon: "first_page",
140
+ "icon-color": "neutral-black",
141
+ variant: "tertiary",
142
+ onClick: s[1] || (s[1] = (m) => l(0))
143
+ }, null, 8, ["disabled"]),
144
+ c(_, {
145
+ disabled: !p(h),
146
+ icon: "chevron_left",
147
+ "icon-color": "neutral-black",
148
+ variant: "tertiary",
149
+ onClick: s[2] || (s[2] = (m) => l(e.pageIndex - 1))
150
+ }, null, 8, ["disabled"]),
151
+ c(_, {
152
+ disabled: !p(y),
153
+ icon: "chevron_right",
154
+ "icon-color": "neutral-black",
155
+ variant: "tertiary",
156
+ onClick: s[3] || (s[3] = (m) => l(e.pageIndex + 1))
157
+ }, null, 8, ["disabled"]),
158
+ c(_, {
159
+ disabled: !p(y),
160
+ icon: "last_page",
161
+ "icon-color": "neutral-black",
162
+ variant: "tertiary",
163
+ onClick: s[4] || (s[4] = (m) => l(e.pageCount - 1))
164
+ }, null, 8, ["disabled"])
165
+ ])
166
+ ])
167
+ ]))
168
+ ]);
169
+ };
170
+ }
171
+ });
172
+ function ne(f, g = { key: "_id", descending: !0 }) {
173
+ const o = w({
174
+ pageCount: 0,
175
+ searchValue: "",
176
+ pageIndex: 0,
177
+ totalRows: 0,
178
+ isLoading: !1,
179
+ pageSize: 10
180
+ }), t = w(g), r = w([]), d = async (a) => {
181
+ o.value.isLoading = !0, r.value = [];
182
+ try {
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
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;
191
+ } catch (n) {
192
+ console.error("Error fetching data:", n);
193
+ } finally {
194
+ o.value.isLoading = !1;
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
200
+ });
201
+ }, 200);
202
+ return {
203
+ tableMeta: o,
204
+ rowData: r,
205
+ sortBy: t,
206
+ fetchData: d,
207
+ debouncedFetchData: u,
208
+ onSort: async (a) => {
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();
214
+ },
215
+ onSearch: () => {
216
+ u({ pageIndex: 0, pageSize: o.value.pageSize });
217
+ }
218
+ };
219
+ }
220
+ export {
221
+ ae as _,
222
+ ne as u
223
+ };
@@ -1,5 +1,5 @@
1
1
  import { components as p } from "@feedmepos/ui-library";
2
- import { a as f } from "./loading-CWihCJvJ.js";
2
+ import { a as f } from "./plugins-DKPF0eaB.js";
3
3
  import { h as c } from "vue";
4
4
  function g(o, n = !1) {
5
5
  return c(