@feedmepos/mf-connect 0.1.89-prod → 0.1.91-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-Caz3AQQ2.js → Analytic-NC-USqGi.js} +11 -11
  2. package/dist/{App-D_q4nHiY.js → App-7D_MZN0d.js} +7 -7
  3. package/dist/{Bin-DURa0qe2.js → Bin-60inU7_9.js} +8 -8
  4. package/dist/{Broadcast-ByDjXqap.js → Broadcast-BFMikTv0.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BD8mWUzO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrHHwGED.js} +7 -7
  6. package/dist/{Card-BSSzVrbz.js → Card-vafU4dyU.js} +19 -19
  7. package/dist/{Collections-CTwUl8W3.js → Collections-BNSNZg7H.js} +8 -8
  8. package/dist/{Credit-TgZBmYsM.js → Credit-Cy6YPGph.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DZV3JtDl.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-7IXALR4_.js} +33 -33
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BwOs5NHt.js → EffectSheet.vue_vue_type_style_index_0_lang-7Tanljx6.js} +6 -6
  11. package/dist/{Experience-DUCO6do6.js → Experience-BVneXtjz.js} +8 -8
  12. package/dist/{FileSaver.min-BaCfYtPG.js → FileSaver.min-DRZVt2c-.js} +1 -1
  13. package/dist/{Game-DcwQSCjZ.js → Game-leXiqv6v.js} +9 -9
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BSMwEFqp.js → ImageInput.vue_vue_type_script_setup_true_lang-bvPXAI2I.js} +1 -1
  15. package/dist/{Index-Bp2CKHw3.js → Index-BU3ubcCK.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-WWVHvcOU.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DmnST0XL.js} +1 -1
  17. package/dist/{MainLayout-Q_0POZ4I.js → MainLayout-DfMxhjyZ.js} +1 -1
  18. package/dist/{Marketing-D52IYXPR.js → Marketing-DVZfv6KL.js} +6 -6
  19. package/dist/{Member-sxjxhLwQ.js → Member-C1UGjz3K.js} +12 -12
  20. package/dist/{MemberList-vLNFHNRw.js → MemberList-B51qk9PN.js} +436 -441
  21. package/dist/{MemberTransactions-BeHeN0Rk.js → MemberTransactions-XeeZVSj7.js} +1 -1
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B6cF0EC3.js → MessageInput.vue_vue_type_script_setup_true_lang-BZFh4LbN.js} +9 -9
  23. package/dist/{Mission-CnJCjBhe.js → Mission-_2ubnxed.js} +9 -9
  24. package/dist/{Overview-B3jRs_Cg.js → Overview-Wtw2Gxca.js} +19 -19
  25. package/dist/{Point-BldY5wb0.js → Point-BWNPBISs.js} +8 -8
  26. package/dist/{Promotion-CsGhqlY0.js → Promotion-Cq1rta1U.js} +9 -9
  27. package/dist/{Queue-CLa2pSXF.js → Queue-BislCglv.js} +11 -11
  28. package/dist/{Record-JbbAM6lI.js → Record-DllYWBQs.js} +9 -9
  29. package/dist/{Reward-wgiBCIV3.js → Reward-DNnMSiIt.js} +16 -16
  30. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DiNlpy7_.js → RewardGroup.vue_vue_type_script_setup_true_lang-CYgKBX4A.js} +12 -12
  31. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B3Ylb1vx.js → RuleGroup.vue_vue_type_script_setup_true_lang-CBLDHomx.js} +15 -15
  32. package/dist/{Segment-BQiZ51Wi.js → Segment-BawFn2kF.js} +25 -25
  33. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DbXFTjAN.js → SelectItems.vue_vue_type_script_setup_true_lang-DaF39TyG.js} +2 -2
  34. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Be_kiAB6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-vxFwpQoN.js} +13 -13
  35. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DS1MWUOc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BBddcORt.js} +4 -4
  36. package/dist/Setting-Gt-j2X-h.js +2028 -0
  37. package/dist/{SettingAdvertisements-OdDM05s7.js → SettingAdvertisements-CETtBWdy.js} +12 -12
  38. package/dist/{Store-D1Q0wOXk.js → Store-DxBaC_7y.js} +22 -22
  39. package/dist/StoreRewards-CbmzaAnf.js +537 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CB6y-TEk.js +1118 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BKzZIJkt.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Ckdg2H3D.js} +5 -3
  42. package/dist/{Tier-DOnYGgah.js → Tier-BRBr_4Vs.js} +22 -22
  43. package/dist/{Title-F4XJw6oN.js → Title-N1Aoum66.js} +21 -21
  44. package/dist/{Transaction-Ws7kBZUE.js → Transaction-DzrBiUhw.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZb0EXgi.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-xtnyUh_C.js} +6 -6
  46. package/dist/{Voucher-DX8MKz00.js → Voucher-95IbNNON.js} +12 -12
  47. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-tUNn1vRE.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BOf9umaT.js} +12 -12
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BvgIZlIh.js → ZodTextField.vue_vue_type_script_setup_true_lang-vCA6xspO.js} +2 -2
  49. package/dist/{app-C-nC9SMv.js → app-CSXjCxhe.js} +49 -45
  50. package/dist/app.js +1 -1
  51. package/dist/{business-CrQ_qouH.js → business-B1gGiOi3.js} +1 -1
  52. package/dist/{campaign-CBRSag11.js → campaign-CJ-3fIa_.js} +8 -8
  53. package/dist/{campaign-shm1Nb7g.js → campaign-CTPJV80W.js} +1 -1
  54. package/dist/{campaign.enum-C-p5_XEd.js → campaign.enum-C6mTkAc0.js} +1 -1
  55. package/dist/campaign.fn-Dnq8oOA7.js +776 -0
  56. package/dist/{collectible.enum-DxOoBouZ.js → collectible.enum-Bm9ym61N.js} +1 -1
  57. package/dist/{collection.fn-BKmv2KVW.js → collection.fn-eGKUovTx.js} +2 -2
  58. package/dist/{dto-BRQj35uX.js → dto-BmlZ970m.js} +4 -4
  59. package/dist/{effect-Bbc7QO26.js → effect-Fi165HuU.js} +1 -1
  60. package/dist/{email-addresses-CdmKczY8.js → email-addresses-CkqIxXsD.js} +2 -2
  61. package/dist/{export-xWupGZRl.js → export-BINxBZ3o.js} +3 -3
  62. package/dist/{helper-C_t7u0sc.js → helper-BJpoVem-.js} +1 -1
  63. package/dist/{index-C6PeL89d.js → index-BBTSDrdg.js} +3 -3
  64. package/dist/{index-BxosLsfW.js → index-BazRPGxz.js} +1 -1
  65. package/dist/{index-CLvFXL_E.js → index-C-7bzCQ9.js} +4 -4
  66. package/dist/{index-REoHVOcy.js → index-CMnMUrQv.js} +1 -1
  67. package/dist/index-Ceebw9zT.js +85 -0
  68. package/dist/{index-ClEGMTrv.js → index-CfEzixyr.js} +1 -1
  69. package/dist/{index-lZq2A3X2.js → index-Cg170bHf.js} +3 -3
  70. package/dist/{index-DW7nPyed.js → index-D2lJ7rbj.js} +6 -6
  71. package/dist/{index-DAhj82tf.js → index-D_D_KuCj.js} +1 -1
  72. package/dist/{index-DaCQrz9t.js → index-ShgzGUii.js} +3 -3
  73. package/dist/{index-BHwWZLKa.js → index-agtRTQ1_.js} +5 -3
  74. package/dist/{index-RsNRLaWL.js → index-elY0gYnL.js} +23 -12
  75. package/dist/{index-BaGjDOR2.js → index-msYk4Nww.js} +1 -1
  76. package/dist/{index.esm2017-DIVK9KD2.js → index.esm2017-CFwZeNKo.js} +1 -1
  77. package/dist/{loading-xptL2Ny2.js → loading-CWsuOmex.js} +1 -1
  78. package/dist/{lodash-88xjswCi.js → lodash-Cm9Z1YF2.js} +1 -1
  79. package/dist/{membership-eoLCZt_p.js → membership-DMInG-QR.js} +3 -3
  80. package/dist/{money-DcsDa1nm.js → money-COObXSez.js} +1 -1
  81. package/dist/{number-BkGWCSrD.js → number-ZsyBuNFr.js} +1 -1
  82. package/dist/objectid-Tx-E_slw.js +145 -0
  83. package/dist/{plugins-DoTCd9nY.js → plugins-CvqTFq6l.js} +3 -3
  84. package/dist/{reward-Culc3-Rv.js → reward-BDSUzN0_.js} +1 -1
  85. package/dist/{rule-DUDjRs8M.js → rule-BzWFD4lu.js} +3 -3
  86. package/dist/{rule-builder-CkZtoez-.js → rule-builder-y5PUkSk9.js} +1 -1
  87. package/dist/{template-CxhdtuLf.js → template-CO3A7_3t.js} +7 -7
  88. package/dist/{timezone-CdsdekR2.js → timezone-ClbAM0Sw.js} +5 -3
  89. package/dist/{trigger-CFXIiuLd.js → trigger-DGoPndhx.js} +5 -5
  90. package/dist/usePagination-COHUplyH.js +220 -0
  91. package/dist/{user-C7hrMSvV.js → user-CnDTKRSl.js} +1 -1
  92. package/dist/{vue-i18n-BdGyU2Nr.js → vue-i18n-X1TYXdQD.js} +387 -387
  93. package/dist/{xlsx-BN2KFkI2.js → xlsx-W_9bPRI8.js} +166 -166
  94. package/dist/{zod-DvUTBth7.js → zod-D9xVg76J.js} +1 -1
  95. package/package.json +1 -1
  96. package/dist/Setting-De1lCG6N.js +0 -1989
  97. package/dist/StoreRewards-2Gdv7uu4.js +0 -535
  98. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-NtxHf8HF.js +0 -1016
  99. package/dist/campaign.fn-BGzZfg1o.js +0 -776
  100. package/dist/index-DDQaEXt7.js +0 -76
  101. package/dist/objectid-gUqB9tj7.js +0 -145
  102. package/dist/usePagination-BSeGmTq6.js +0 -177
@@ -1,8 +1,8 @@
1
1
  import { h as S } from "./moment-D7p2TMB-.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-eoLCZt_p.js";
4
- import { R as B, a as pe } from "./rule-builder-CkZtoez-.js";
5
- import { u as Be } from "./business-CrQ_qouH.js";
3
+ import { u as ee } from "./membership-DMInG-QR.js";
4
+ import { R as B, a as pe } from "./rule-builder-y5PUkSk9.js";
5
+ import { u as Be } from "./business-B1gGiOi3.js";
6
6
  var ue = [
7
7
  "MO",
8
8
  "TU",
@@ -1,4 +1,4 @@
1
- import { n as i } from "./index-lZq2A3X2.js";
1
+ import { n as i } from "./index-Cg170bHf.js";
2
2
  function a(o, t) {
3
3
  let r = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
4
4
  const e = s.length;
@@ -1,13 +1,13 @@
1
- import { p as B, i as w } from "./plugins-DoTCd9nY.js";
2
- import { _ as O } from "./lodash-88xjswCi.js";
1
+ import { p as B, i as w } from "./plugins-CvqTFq6l.js";
2
+ import { _ as O } from "./lodash-Cm9Z1YF2.js";
3
3
  import { defineComponent as I, openBlock as d, createBlock as b, resolveDynamicComponent as $, unref as o, ref as z, computed as M, onMounted as Y, resolveComponent as f, withCtx as _, createElementVNode as s, createElementBlock as D, createVNode as r, normalizeClass as T, createTextVNode as F, toDisplayString as g, Fragment as R, renderList as L, createCommentVNode as j } from "vue";
4
- import { u as W } from "./campaign-shm1Nb7g.js";
4
+ import { u as W } from "./campaign-CTPJV80W.js";
5
5
  import { useDialog as q } from "@feedmepos/ui-library";
6
- import { F as G } from "./index-DW7nPyed.js";
7
- import { C as H } from "./campaign-CBRSag11.js";
6
+ import { F as G } from "./index-D2lJ7rbj.js";
7
+ import { C as H } from "./campaign-CJ-3fIa_.js";
8
8
  import { J } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as U } from "./vue-i18n-BdGyU2Nr.js";
10
- import { u as K } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DZV3JtDl.js";
9
+ import { u as U } from "./vue-i18n-X1TYXdQD.js";
10
+ import { u as K } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-7IXALR4_.js";
11
11
  function Se(e) {
12
12
  return B.confirm(
13
13
  w.global.t("connect.common.duplicate.confirmMessage", { name: e }),
@@ -1,6 +1,6 @@
1
- import { a as q0, c as o0, g as W0 } from "./app-C-nC9SMv.js";
1
+ import { a as q0, c as o0, g as W0 } from "./app-CSXjCxhe.js";
2
2
  import { m as d0 } from "./moment-D7p2TMB-.js";
3
- import { e as n } from "./index-BHwWZLKa.js";
3
+ import { e as n } from "./index-agtRTQ1_.js";
4
4
  var _ = { exports: {} }, j = { exports: {} };
5
5
  const R0 = /* @__PURE__ */ q0(d0);
6
6
  (function(S) {
@@ -1146,7 +1146,9 @@ const t0 = /* @__PURE__ */ W0(X0), l0 = {
1146
1146
  [n.F_COUNTRY.enum.MO]: "Asia/Macau",
1147
1147
  [n.F_COUNTRY.enum.MV]: "Indian/Maldives",
1148
1148
  [n.F_COUNTRY.enum.PK]: "Asia/Karachi",
1149
- [n.F_COUNTRY.enum.VN]: "Asia/Ho_Chi_Minh"
1149
+ [n.F_COUNTRY.enum.VN]: "Asia/Ho_Chi_Minh",
1150
+ GB: "Europe/London",
1151
+ MA: "Africa/Casablanca"
1150
1152
  };
1151
1153
  export {
1152
1154
  l0 as C,
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as m, openBlock as u, createBlock as p, unref as r } from "vue";
2
- import "./index-lZq2A3X2.js";
3
- import { R as i } from "./rule-builder-CkZtoez-.js";
4
- import { _ as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-B3Ylb1vx.js";
5
- import { l as e, C as d } from "./index-CLvFXL_E.js";
6
- import { i as n } from "./plugins-DoTCd9nY.js";
2
+ import "./index-Cg170bHf.js";
3
+ import { R as i } from "./rule-builder-y5PUkSk9.js";
4
+ import { _ as E } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CBLDHomx.js";
5
+ import { l as e, C as d } from "./index-C-7bzCQ9.js";
6
+ import { i as n } from "./plugins-CvqTFq6l.js";
7
7
  const L = /* @__PURE__ */ m({
8
8
  __name: "BillRuleGroup",
9
9
  props: {
@@ -0,0 +1,220 @@
1
+ import { defineComponent as P, computed as v, ref as w, onMounted as $, watch as M, resolveComponent as D, openBlock as u, createElementBlock as p, createVNode as r, unref as n, createElementVNode as s, createCommentVNode as N, toDisplayString as b } from "vue";
2
+ import { _ as S } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
3
+ import { l as E } from "./lodash-Cm9Z1YF2.js";
4
+ const R = { class: "" }, A = {
5
+ key: 0,
6
+ class: "w-full flex flex-col gap-16 items-center py-16"
7
+ }, L = {
8
+ key: 1,
9
+ class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
10
+ }, j = {
11
+ key: 0,
12
+ class: "flex gap-24 items-center justify-between xs:hidden xs:invisible"
13
+ }, O = { class: "flex gap-8 items-center" }, T = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, U = {
14
+ key: 1,
15
+ class: "flex gap-24 items-center justify-between xs:hidden xs:invisible"
16
+ }, W = { class: "flex gap-8 items-center" }, q = {
17
+ key: 2,
18
+ class: "flex gap-8 items-center"
19
+ }, G = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, H = { class: "flex gap-8" }, J = {
20
+ key: 3,
21
+ class: "flex gap-8 items-center"
22
+ }, K = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, Q = { class: "flex gap-8" }, _ = /* @__PURE__ */ P({
23
+ __name: "BaseTable",
24
+ props: {
25
+ rowData: {},
26
+ columnDefs: {},
27
+ loading: { type: Boolean, default: !1 },
28
+ rowCount: { default: 0 },
29
+ shrinkAt: { type: [Number, Boolean], default: !1 },
30
+ pageCount: { default: 0 },
31
+ pageIndex: {},
32
+ hideFooter: { type: Boolean, default: !1 },
33
+ pageSize: {},
34
+ pageSizeOptions: { default: () => [
35
+ { label: "10", value: 10 },
36
+ { label: "20", value: 20 },
37
+ { label: "50", value: 50 }
38
+ ] },
39
+ paginationMode: { default: "offset" },
40
+ hasNext: { type: Boolean, default: !1 }
41
+ },
42
+ emits: ["sortChange", "rowClick", "pageChange"],
43
+ setup(e, { emit: h }) {
44
+ const a = e, l = h, m = v(() => a.pageIndex + 1), y = v(() => a.pageIndex * a.pageSize), x = v(
45
+ () => Math.min(y.value + a.pageSize, a.rowCount || 0)
46
+ ), C = v(() => a.paginationMode === "cursor"), k = v(() => a.pageIndex > 0), o = v(
47
+ () => C.value ? a.hasNext : a.pageIndex < a.pageCount - 1
48
+ ), i = (d) => {
49
+ l("sortChange", d);
50
+ }, V = (d) => {
51
+ l("rowClick", d);
52
+ }, g = (d) => {
53
+ l("pageChange", { pageIndex: d, pageSize: a.pageSize });
54
+ }, z = (d) => {
55
+ l("pageChange", { pageIndex: 0, pageSize: d });
56
+ }, I = w(!1);
57
+ return $(() => {
58
+ M(
59
+ () => a.loading,
60
+ (d, t) => {
61
+ t === !0 && d === !1 && (I.value = !0);
62
+ }
63
+ );
64
+ }), (d, t) => {
65
+ const F = D("FmTable"), f = D("FmButton");
66
+ return u(), p("div", R, [
67
+ r(F, {
68
+ loading: e.loading,
69
+ "row-data": e.rowData,
70
+ "row-count": e.rowCount,
71
+ "column-defs": e.columnDefs,
72
+ "shrink-at": e.shrinkAt,
73
+ "page-count": e.pageCount,
74
+ "page-size": e.pageSize,
75
+ "fetch-fn": void 0,
76
+ "hide-footer": "",
77
+ onSortChange: i,
78
+ onRowClick: V
79
+ }, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
80
+ e.rowData.length == 0 && e.loading == !1 && n(I) ? (u(), p("div", A, [...t[7] || (t[7] = [
81
+ s("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1),
82
+ s("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1)
83
+ ])])) : N("", !0),
84
+ e.hideFooter ? N("", !0) : (u(), p("div", L, [
85
+ n(C) ? (u(), p("div", U, [
86
+ s("div", W, [
87
+ t[9] || (t[9] = s("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
88
+ r(S, {
89
+ items: e.pageSizeOptions,
90
+ value: e.pageSize,
91
+ "onUpdate:modelValue": z
92
+ }, null, 8, ["items", "value"])
93
+ ])
94
+ ])) : (u(), p("div", j, [
95
+ s("div", O, [
96
+ t[8] || (t[8] = s("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
97
+ r(S, {
98
+ items: e.pageSizeOptions,
99
+ value: e.pageSize,
100
+ "onUpdate:modelValue": z
101
+ }, null, 8, ["items", "value"])
102
+ ]),
103
+ s("span", T, b(n(y) + 1) + " - " + b(n(x)) + " of " + b(e.rowCount) + " items ", 1)
104
+ ])),
105
+ n(C) ? (u(), p("div", J, [
106
+ s("span", K, " Page " + b(n(m)), 1),
107
+ s("div", Q, [
108
+ r(f, {
109
+ disabled: !n(k),
110
+ icon: "chevron_left",
111
+ "icon-color": "neutral-black",
112
+ variant: "tertiary",
113
+ onClick: t[5] || (t[5] = (c) => g(e.pageIndex - 1))
114
+ }, null, 8, ["disabled"]),
115
+ r(f, {
116
+ disabled: !n(o),
117
+ icon: "chevron_right",
118
+ "icon-color": "neutral-black",
119
+ variant: "tertiary",
120
+ onClick: t[6] || (t[6] = (c) => g(e.pageIndex + 1))
121
+ }, null, 8, ["disabled"])
122
+ ])
123
+ ])) : (u(), p("div", q, [
124
+ r(S, {
125
+ items: Array.from(Array(e.pageCount), (c, B) => ({
126
+ label: (B + 1).toString(),
127
+ value: B + 1
128
+ })),
129
+ value: n(m),
130
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => g(c - 1))
131
+ }, null, 8, ["items", "value"]),
132
+ s("span", G, " of " + b(e.pageCount) + " pages ", 1),
133
+ s("div", H, [
134
+ r(f, {
135
+ disabled: !n(k),
136
+ icon: "first_page",
137
+ "icon-color": "neutral-black",
138
+ variant: "tertiary",
139
+ onClick: t[1] || (t[1] = (c) => g(0))
140
+ }, null, 8, ["disabled"]),
141
+ r(f, {
142
+ disabled: !n(k),
143
+ icon: "chevron_left",
144
+ "icon-color": "neutral-black",
145
+ variant: "tertiary",
146
+ onClick: t[2] || (t[2] = (c) => g(e.pageIndex - 1))
147
+ }, null, 8, ["disabled"]),
148
+ r(f, {
149
+ disabled: !n(o),
150
+ icon: "chevron_right",
151
+ "icon-color": "neutral-black",
152
+ variant: "tertiary",
153
+ onClick: t[3] || (t[3] = (c) => g(e.pageIndex + 1))
154
+ }, null, 8, ["disabled"]),
155
+ r(f, {
156
+ disabled: !n(o),
157
+ icon: "last_page",
158
+ "icon-color": "neutral-black",
159
+ variant: "tertiary",
160
+ onClick: t[4] || (t[4] = (c) => g(e.pageCount - 1))
161
+ }, null, 8, ["disabled"])
162
+ ])
163
+ ]))
164
+ ]))
165
+ ]);
166
+ };
167
+ }
168
+ });
169
+ function ee(e, h = { key: "_id", descending: !0 }) {
170
+ const a = w({
171
+ pageCount: 0,
172
+ searchValue: "",
173
+ pageIndex: 0,
174
+ totalRows: 0,
175
+ isLoading: !1,
176
+ pageSize: 10
177
+ }), l = w(h), m = w([]), y = async (o) => {
178
+ a.value.isLoading = !0, m.value = [];
179
+ try {
180
+ const i = await e({
181
+ limit: o.pageSize || a.value.pageSize,
182
+ skip: o.pageIndex ?? 0,
183
+ sortBy: l.value.key,
184
+ descending: l.value.descending,
185
+ search: a.value.searchValue
186
+ });
187
+ m.value = i.resources, a.value.totalRows = i.meta.totalResources ?? 0, a.value.pageCount = i.meta.totalPages ?? 0, a.value.pageIndex = i.meta.skip ?? 0;
188
+ } catch (i) {
189
+ console.error("Error fetching data:", i);
190
+ } finally {
191
+ a.value.isLoading = !1;
192
+ }
193
+ }, x = E.debounce(async (o) => {
194
+ a.value.pageSize = (o == null ? void 0 : o.pageSize) || a.value.pageSize, await y({
195
+ pageSize: a.value.pageSize,
196
+ pageIndex: (o == null ? void 0 : o.pageIndex) || 0
197
+ });
198
+ }, 200);
199
+ return {
200
+ tableMeta: a,
201
+ rowData: m,
202
+ sortBy: l,
203
+ fetchData: y,
204
+ debouncedFetchData: x,
205
+ onSort: async (o) => {
206
+ var i;
207
+ console.log("sortState", (i = o[0]) == null ? void 0 : i.id), o.length ? (l.value = {
208
+ key: o[0].id.startsWith("_") ? o[0].id : o[0].id.replace(new RegExp("_", "g"), "."),
209
+ descending: o[0].desc
210
+ }, console.log("sortBy", l.value)) : l.value = h, await x();
211
+ },
212
+ onSearch: () => {
213
+ x({ pageIndex: 0, pageSize: a.value.pageSize });
214
+ }
215
+ };
216
+ }
217
+ export {
218
+ _,
219
+ ee as u
220
+ };
@@ -1,5 +1,5 @@
1
1
  import { components as p } from "@feedmepos/ui-library";
2
- import { a as f } from "./plugins-DoTCd9nY.js";
2
+ import { a as f } from "./plugins-CvqTFq6l.js";
3
3
  import { h as i } from "vue";
4
4
  function g(o, a = !1) {
5
5
  var t;