@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.17-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 (72) hide show
  1. package/dist/Analytic-CKM1hA08.js +612 -0
  2. package/dist/{Broadcast-X69Mtv3b.js → Broadcast-DzJRPvz5.js} +7 -7
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7J9gl35.js} +8 -8
  4. package/dist/{Card-D0X3v1UF.js → Card-BowvmBJD.js} +121 -121
  5. package/dist/{Collections-umR6Ehqf.js → Collections-DHi8bxpj.js} +129 -141
  6. package/dist/{Credit-C1EWF7R0.js → Credit-DakCAG7z.js} +7 -7
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B6L77rz7.js} +22 -24
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-RLmpxA5_.js} +6 -6
  9. package/dist/{Experience-CqL8wyPm.js → Experience-CnHloEig.js} +7 -7
  10. package/dist/{Game--kYe64EV.js → Game-D-X4EgC-.js} +7 -7
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js → ImageInput.vue_vue_type_script_setup_true_lang-DZhanVR2.js} +1 -1
  12. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → MainLayout-BAyMP_C8.js} +53 -20
  13. package/dist/{Marketing-CTCQ5ZmZ.js → Marketing-c4QG38L1.js} +25 -25
  14. package/dist/{Member-DCduX7zP.js → Member-DQBVPHCv.js} +2 -2
  15. package/dist/MemberList-Ci6LRnrH.js +1718 -0
  16. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-CztAzAA6.js} +1 -1
  17. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B_hDmE8e.js +203 -0
  18. package/dist/{Mission-CVr9rS_D.js → Mission-Cj_hi3tv.js} +7 -7
  19. package/dist/{Point-BnZ6M74y.js → Point-BGDCrLdw.js} +7 -7
  20. package/dist/{Promotion-B0PUve5S.js → Promotion-BABafzmp.js} +8 -8
  21. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-C7Tqs2pq.js} +14 -14
  22. package/dist/{Segment-B-XpkyM5.js → Segment-Bh8bddz_.js} +18 -19
  23. package/dist/{Setting-Zrj5P_4m.js → Setting-ByrGfBdk.js} +541 -571
  24. package/dist/Store-6lrxcf8I.js +1442 -0
  25. package/dist/{StoreRewards-D8410Q_-.js → StoreRewards-C5bJ9hxE.js} +74 -75
  26. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DaboQyfR.js} +79 -82
  27. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DUaTP2_0.js +124 -0
  28. package/dist/{Tier-DVWJyQ9S.js → Tier-D71DR1ez.js} +68 -71
  29. package/dist/{Title-B5kX64vs.js → Title-CxAYzUIx.js} +75 -78
  30. package/dist/{Transaction-CZBO4v4d.js → Transaction-BWRGkDrb.js} +1 -1
  31. package/dist/{Voucher-se-4JF9B.js → Voucher-BLy2jD1L.js} +37 -37
  32. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
  33. package/dist/{app-B2ImSO3V.js → app-BGUDahHa.js} +1 -1
  34. package/dist/{app-DkI7dYRN.js → app-roSGTcOh.js} +46 -46
  35. package/dist/app.js +1 -1
  36. package/dist/{campaign-BZJuknWK.js → campaign-B7-BUOfP.js} +11 -13
  37. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-DHlfGYAC.js} +2 -4
  38. package/dist/{dto-BWpvRpK2.js → dto-zv3OTrbd.js} +214 -215
  39. package/dist/{effect-B8kmnKvY.js → effect-DLtYeqVg.js} +1 -1
  40. package/dist/{export-Dm6LYnWo.js → export-Bm6xBE89.js} +3 -3
  41. package/dist/{helper-DR4XK3nv.js → helper-BaLvfRCZ.js} +1 -1
  42. package/dist/{index-DcUrk07Q.js → index-BmgXoYUK.js} +1 -1
  43. package/dist/{index-CuL5-ORK.js → index-D9Ft2U8O.js} +8 -9
  44. package/dist/{index-CWf0mh3a.js → index-DIA3Lkck.js} +2 -2
  45. package/dist/{index-BryrRq8O.js → index-DP2wL3EA.js} +37 -47
  46. package/dist/{index-CkiYkbXb.js → index-DgAr53Ae.js} +1 -1
  47. package/dist/{index-yxJMhfxj.js → index-DiC8aGiv.js} +66 -109
  48. package/dist/{index-boor8e80.js → index-DrA3F2aA.js} +27 -28
  49. package/dist/{index-BxkxVtgm.js → index-Qr6T_tfL.js} +1 -1
  50. package/dist/index-SdCqUstr.js +244 -0
  51. package/dist/{index-Bu4_26qI.js → index-aYwIKfns.js} +1 -1
  52. package/dist/{loading-BzV5acUX.js → loading-CB6v7hws.js} +4 -4
  53. package/dist/{lodash-mg4435Qq.js → lodash-DkICSg8W.js} +1 -1
  54. package/dist/{membership-CqbsLHqx.js → membership-CFVkuT3Z.js} +58 -63
  55. package/dist/{money-DA_gtp3q.js → money-DMEHb1PR.js} +1 -1
  56. package/dist/{number-C388eyOu.js → number-RVupiUMd.js} +3 -3
  57. package/dist/{rule-Clmr5y4j.js → rule-CpU35zT1.js} +2 -2
  58. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-CrtuA_0Q.js} +1 -1
  59. package/dist/style.css +1 -1
  60. package/dist/{template-Dwp7heBA.js → template-DxvJmDC3.js} +6 -6
  61. package/dist/{usePagination-o5fgsZwU.js → usePagination-FlXHEH_R.js} +1 -1
  62. package/dist/{xlsx-BRdh9e2p.js → xlsx-BJ7B-X33.js} +309 -309
  63. package/package.json +2 -2
  64. package/dist/Analytic-C-zZmF5N.js +0 -760
  65. package/dist/MainLayout-D0AoA1tk.js +0 -41
  66. package/dist/MemberList-B0EkXZJu.js +0 -1729
  67. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js +0 -432
  68. package/dist/Store-B2gywCt2.js +0 -1503
  69. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js +0 -139
  70. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +0 -55
  71. package/dist/index-BobRgQrE.js +0 -291
  72. package/dist/zod-W_PvIofQ.js +0 -90
@@ -1,15 +1,15 @@
1
- import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as O, unref as n, withCtx as N, createVNode as g, normalizeClass as U, createCommentVNode as oe, createElementVNode as C, toDisplayString as q, createElementBlock as L, Fragment as le, renderList as se, mergeModels as K, useModel as ie, watch as j, onBeforeMount as ce, h as c } from "vue";
1
+ import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as O, unref as a, withCtx as N, createVNode as g, normalizeClass as U, createCommentVNode as oe, createElementVNode as C, toDisplayString as q, createElementBlock as L, Fragment as le, renderList as se, mergeModels as K, useModel as ie, watch as j, onBeforeMount as ce, h as c } from "vue";
2
2
  import { components as S } from "@feedmepos/ui-library";
3
- import { d as ue } from "./index-CuL5-ORK.js";
4
- import { a as X } from "./loading-BzV5acUX.js";
3
+ import { d as ue } from "./index-D9Ft2U8O.js";
4
+ import { a as X } from "./loading-CB6v7hws.js";
5
5
  import { s as de } from "./index-Dbd4WA4r.js";
6
6
  import { h as b } from "./moment-BWErdI6_.js";
7
7
  import { s as Y } from "./index-CuvNtC_M.js";
8
- import { f as H } from "./number-C388eyOu.js";
9
- import { d as G, i as me, S as pe, f as fe, a as ge } from "./app-DkI7dYRN.js";
10
- import { u as J, _ as Q } from "./usePagination-o5fgsZwU.js";
8
+ import { f as H } from "./number-RVupiUMd.js";
9
+ import { e as G, j as me, S as pe, h as fe, a as ge } from "./app-roSGTcOh.js";
10
+ import { u as J, _ as Q } from "./usePagination-FlXHEH_R.js";
11
11
  import { g as Z } from "./user-Bm4KttFq.js";
12
- import { B as ee, a as te } from "./export-Dm6LYnWo.js";
12
+ import { B as ee, a as te } from "./export-Bm6xBE89.js";
13
13
  import { o as A } from "./objectId-dwaoBfJX.js";
14
14
  function ye(o) {
15
15
  let s = "";
@@ -137,7 +137,7 @@ const T = {
137
137
  return R(), O(f, {
138
138
  placement: o.placement || "bottom-end",
139
139
  disabled: o.disabled == !0,
140
- "model-value": n(d),
140
+ "model-value": a(d),
141
141
  onMenuChanged: t[0] || (t[0] = (e) => d.value = e),
142
142
  "close-on-click": !1
143
143
  }, {
@@ -154,9 +154,9 @@ const T = {
154
154
  outline: "",
155
155
  size: "sm"
156
156
  }, null, 8, ["name", "class"])) : oe("", !0),
157
- C("div", ve, q(l.label) + " " + q(o.showItemLabel ? n(y) : ""), 1),
157
+ C("div", ve, q(l.label) + " " + q(o.showItemLabel ? a(y) : ""), 1),
158
158
  g(u, {
159
- name: n(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
159
+ name: a(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
160
160
  class: U(l.class),
161
161
  outline: "",
162
162
  size: "sm"
@@ -167,7 +167,7 @@ const T = {
167
167
  ]),
168
168
  default: N(() => [
169
169
  g(w, {
170
- "model-value": Object.keys(n(r)).length === l.items.length,
170
+ "model-value": Object.keys(a(r)).length === l.items.length,
171
171
  label: "All",
172
172
  "has-checkbox": !0,
173
173
  indeterminate: !0,
@@ -178,8 +178,8 @@ const T = {
178
178
  value: e.value,
179
179
  label: e.label,
180
180
  "has-checkbox": !0,
181
- "model-value": n(r)[e.value],
182
- "onUpdate:modelValue": (a) => D(e.value)
181
+ "model-value": a(r)[e.value],
182
+ "onUpdate:modelValue": (n) => D(e.value)
183
183
  }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
184
184
  ]),
185
185
  _: 1
@@ -225,7 +225,7 @@ const T = {
225
225
  }, {
226
226
  "trigger-button": N(() => [
227
227
  g(m, {
228
- label: n(r),
228
+ label: a(r),
229
229
  icon: "calendar_month",
230
230
  "right-icon": "keyboard_arrow_down",
231
231
  class: "text-fm-color-neutral-gray-400 cursor-pointer"
@@ -292,8 +292,8 @@ const W = () => {
292
292
  outline: !0,
293
293
  size: "sm",
294
294
  class: "cursor-pointer mr-4",
295
- onClick: (a) => {
296
- a.preventDefault(), a.stopPropagation(), X(e.row.original._id.toString());
295
+ onClick: (n) => {
296
+ n.preventDefault(), n.stopPropagation(), X(e.row.original._id.toString());
297
297
  }
298
298
  }),
299
299
  c(
@@ -317,7 +317,7 @@ const W = () => {
317
317
  enableSorting: !1,
318
318
  cell(e) {
319
319
  var v, i, F, E;
320
- const a = H(
320
+ const n = H(
321
321
  e.row.original.expiryAmount.reduce(
322
322
  (ne, re) => ne + re.amount,
323
323
  e.row.original.amount ?? 0
@@ -332,10 +332,10 @@ const W = () => {
332
332
  {
333
333
  class: [
334
334
  "pr-2",
335
- +a > 0 ? "text-fm-color-system-success-300" : "text-fm-color-system-error-300"
335
+ +n > 0 ? "text-fm-color-system-success-300" : "text-fm-color-system-error-300"
336
336
  ]
337
337
  },
338
- a
338
+ n
339
339
  ),
340
340
  c("div", { class: "flex items-center" }, [
341
341
  e.row.original.expiryAmount.length > 0 ? c(
@@ -363,13 +363,13 @@ const W = () => {
363
363
  maxWidth: "200px"
364
364
  },
365
365
  cell(e) {
366
- const a = T.formattedType(e.row.original);
366
+ const n = T.formattedType(e.row.original);
367
367
  return c("div", { class: "flex items-center" }, [
368
- c("div", { class: "truncate text-ellipsis" }, a),
369
- a.length > 20 ? c(
368
+ c("div", { class: "truncate text-ellipsis" }, n),
369
+ n.length > 20 ? c(
370
370
  S.FmTooltip,
371
371
  {
372
- content: a
372
+ content: n
373
373
  },
374
374
  [
375
375
  c(S.FmIcon, {
@@ -397,20 +397,17 @@ const W = () => {
397
397
  {
398
398
  header: "Phone No.",
399
399
  accessorKey: "pf_user.phoneNumber",
400
- accessorFn: (e) => {
401
- var a;
402
- return ((a = e == null ? void 0 : e.pf_user) == null ? void 0 : a.phoneNumber) || "";
403
- }
400
+ accessorFn: (e) => e.pf_user.phoneNumber
404
401
  },
405
402
  {
406
403
  accessorFn: (e) => e.ref,
407
404
  header: "References",
408
405
  accessorKey: "ref",
409
406
  cell(e) {
410
- var a, h;
407
+ var n, h;
411
408
  return c("div", { class: "flex items-center justify-between gap-4" }, [
412
409
  c("div", { class: "flex items-center" }, [
413
- (a = e.row.original.metadata) != null && a.remark ? c(
410
+ (n = e.row.original.metadata) != null && n.remark ? c(
414
411
  S.FmTooltip,
415
412
  {
416
413
  content: (h = e.row.original.metadata) == null ? void 0 : h.remark
@@ -438,14 +435,14 @@ const W = () => {
438
435
  },
439
436
  source: []
440
437
  }), { tableMeta: y, rowData: D, onSort: I, debouncedFetchData: m, onSearch: t } = J(async (e) => {
441
- const a = {
438
+ const n = {
442
439
  ...r.value,
443
440
  user: l.user,
444
441
  dateRange: {
445
442
  start: new Date(r.value.dateRange.startDate).toISOString(),
446
443
  end: new Date(r.value.dateRange.endDate).toISOString()
447
444
  }
448
- }, h = await M.readAll(e, a);
445
+ }, h = await M.readAll(e, n);
449
446
  return {
450
447
  resources: h.resources.map((v) => {
451
448
  const i = u.value.find((F) => F._id === v.ref);
@@ -474,27 +471,27 @@ const W = () => {
474
471
  };
475
472
  await te({
476
473
  exporter: new _e(),
477
- readFunction: (a) => M.readAll(a, e),
478
- transformRecord: (a) => {
474
+ readFunction: (n) => M.readAll(n, e),
475
+ transformRecord: (n) => {
479
476
  var h, v, i;
480
477
  return {
481
- TransactionID: a._id,
482
- CreatedAt: b(A(a._id.toString())).format(
478
+ TransactionID: n._id,
479
+ CreatedAt: b(A(n._id.toString())).format(
483
480
  "D MMM YYYY, hh:mmA"
484
481
  ),
485
482
  Amount: H(
486
- a.expiryAmount.reduce(
483
+ n.expiryAmount.reduce(
487
484
  (F, E) => F + E.amount,
488
- a.amount ?? 0
485
+ n.amount ?? 0
489
486
  ),
490
487
  2
491
488
  ),
492
- Type: T.formattedType(a),
493
- Source: Y(T.getReason(a.source)),
494
- User: ((h = a.pf_user) == null ? void 0 : h.name) || "",
495
- "Phone No.": ((v = a.pf_user) == null ? void 0 : v.phoneNumber) || "",
496
- References: a.ref,
497
- Remark: ((i = a.metadata) == null ? void 0 : i.remark) || ""
489
+ Type: T.formattedType(n),
490
+ Source: Y(T.getReason(n.source)),
491
+ User: ((h = n.pf_user) == null ? void 0 : h.name) || "",
492
+ "Phone No.": ((v = n.pf_user) == null ? void 0 : v.phoneNumber) || "",
493
+ References: n.ref,
494
+ Remark: ((i = n.metadata) == null ? void 0 : i.remark) || ""
498
495
  };
499
496
  },
500
497
  filename: "transactions"
@@ -507,14 +504,14 @@ const W = () => {
507
504
  }
508
505
  return ce(async () => {
509
506
  await s.readLocations(), await m();
510
- }), (e, a) => {
507
+ }), (e, n) => {
511
508
  const h = x("FmSearch"), v = x("FmButton");
512
509
  return R(), L("div", null, [
513
510
  C("div", Se, [
514
511
  g(h, {
515
512
  class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
516
- modelValue: n(r).search,
517
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n(r).search = i),
513
+ modelValue: a(r).search,
514
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => a(r).search = i),
518
515
  placeholder: "Search",
519
516
  collapsible: ""
520
517
  }, null, 8, ["modelValue"]),
@@ -529,17 +526,17 @@ const W = () => {
529
526
  g(B, {
530
527
  class: "cursor-pointer text-fm-color-neutral-gray-400",
531
528
  "right-icon": "keyboard_arrow_down",
532
- modelValue: n(r)["metadata.location"],
533
- "onUpdate:modelValue": a[1] || (a[1] = (i) => n(r)["metadata.location"] = i),
529
+ modelValue: a(r)["metadata.location"],
530
+ "onUpdate:modelValue": n[1] || (n[1] = (i) => a(r)["metadata.location"] = i),
534
531
  icon: "storefront",
535
532
  "show-item-label": !0,
536
- items: n(w)
533
+ items: a(w)
537
534
  }, null, 8, ["modelValue", "items"]),
538
535
  g(B, {
539
536
  class: "cursor-pointer text-fm-color-neutral-gray-400",
540
537
  "right-icon": "keyboard_arrow_down",
541
- modelValue: n(r)["pf_collectible.type"],
542
- "onUpdate:modelValue": a[2] || (a[2] = (i) => n(r)["pf_collectible.type"] = i),
538
+ modelValue: a(r)["pf_collectible.type"],
539
+ "onUpdate:modelValue": n[2] || (n[2] = (i) => a(r)["pf_collectible.type"] = i),
543
540
  label: "Type: ",
544
541
  "show-item-label": !0,
545
542
  items: [
@@ -556,27 +553,27 @@ const W = () => {
556
553
  g(B, {
557
554
  class: "cursor-pointer text-fm-color-neutral-gray-400",
558
555
  "right-icon": "keyboard_arrow_down",
559
- modelValue: n(r).source,
560
- "onUpdate:modelValue": a[3] || (a[3] = (i) => n(r).source = i),
556
+ modelValue: a(r).source,
557
+ "onUpdate:modelValue": n[3] || (n[3] = (i) => a(r).source = i),
561
558
  label: "Source: ",
562
559
  "show-item-label": !0,
563
- items: n(_)
560
+ items: a(_)
564
561
  }, null, 8, ["modelValue", "items"]),
565
562
  g(ae, {
566
563
  "model-value": {
567
- startDate: n(r).dateRange.startDate,
568
- endDate: n(r).dateRange.endDate
564
+ startDate: a(r).dateRange.startDate,
565
+ endDate: a(r).dateRange.endDate
569
566
  },
570
- "onUpdate:modelValue": a[4] || (a[4] = (i) => n(r).dateRange = {
571
- startDate: n(b)(i.startDate).startOf("d").toISOString(),
572
- endDate: n(b)(i.endDate).endOf("d").toISOString()
567
+ "onUpdate:modelValue": n[4] || (n[4] = (i) => a(r).dateRange = {
568
+ startDate: a(b)(i.startDate).startOf("d").toISOString(),
569
+ endDate: a(b)(i.endDate).endOf("d").toISOString()
573
570
  })
574
571
  }, null, 8, ["model-value"])
575
572
  ]),
576
573
  g(h, {
577
574
  class: "xs:hidden",
578
- modelValue: n(r).search,
579
- "onUpdate:modelValue": a[5] || (a[5] = (i) => n(r).search = i),
575
+ modelValue: a(r).search,
576
+ "onUpdate:modelValue": n[5] || (n[5] = (i) => a(r).search = i),
580
577
  placeholder: "Search",
581
578
  collapsible: ""
582
579
  }, null, 8, ["modelValue"]),
@@ -589,18 +586,18 @@ const W = () => {
589
586
  ])
590
587
  ]),
591
588
  g(Q, {
592
- loading: n(y).isLoading,
593
- "row-data": n(D),
594
- "row-count": n(y).totalRows,
589
+ loading: a(y).isLoading,
590
+ "row-data": a(D),
591
+ "row-count": a(y).totalRows,
595
592
  "column-defs": d.filter(
596
593
  (i) => !l.user || i.header !== "User" && i.header !== "Phone No."
597
594
  ),
598
- "page-count": n(y).pageCount,
599
- "page-index": n(y).pageIndex,
600
- "page-size": n(y).pageSize,
595
+ "page-count": a(y).pageCount,
596
+ "page-index": a(y).pageIndex,
597
+ "page-size": a(y).pageSize,
601
598
  "shrink-at": !1,
602
- onSortChange: n(I),
603
- onPageChange: a[6] || (a[6] = (i) => n(m)({
599
+ onSortChange: a(I),
600
+ onPageChange: n[6] || (n[6] = (i) => a(m)({
604
601
  pageSize: i.pageSize,
605
602
  pageIndex: i.pageIndex
606
603
  }))
@@ -749,16 +746,16 @@ const Ce = { class: "flex items-center justify-between" }, Re = { class: "flex g
749
746
  C("div", Ce, [
750
747
  C("div", Re, [
751
748
  g(ae, {
752
- modelValue: n(p).dateRange,
753
- "onUpdate:modelValue": u[0] || (u[0] = (f) => n(p).dateRange = f)
749
+ modelValue: a(p).dateRange,
750
+ "onUpdate:modelValue": u[0] || (u[0] = (f) => a(p).dateRange = f)
754
751
  }, null, 8, ["modelValue"])
755
752
  ]),
756
753
  C("div", Fe, [
757
754
  g(_, {
758
- modelValue: n(d).searchValue,
755
+ modelValue: a(d).searchValue,
759
756
  "onUpdate:modelValue": [
760
- u[1] || (u[1] = (f) => n(d).searchValue = f),
761
- n(I)
757
+ u[1] || (u[1] = (f) => a(d).searchValue = f),
758
+ a(I)
762
759
  ],
763
760
  placeholder: "Search",
764
761
  collapsible: ""
@@ -771,18 +768,18 @@ const Ce = { class: "flex items-center justify-between" }, Re = { class: "flex g
771
768
  ])
772
769
  ]),
773
770
  g(Q, {
774
- loading: n(d).isLoading,
775
- "row-data": n(r),
776
- "row-count": n(d).totalRows,
771
+ loading: a(d).isLoading,
772
+ "row-data": a(r),
773
+ "row-count": a(d).totalRows,
777
774
  "column-defs": l.filter(
778
775
  (f) => !s.user || f.header !== "User" && f.header !== "Phone No."
779
776
  ),
780
- "page-count": n(d).pageCount,
781
- "page-index": n(d).pageIndex,
782
- "page-size": n(d).pageSize,
777
+ "page-count": a(d).pageCount,
778
+ "page-index": a(d).pageIndex,
779
+ "page-size": a(d).pageSize,
783
780
  "shrink-at": !1,
784
- onSortChange: n(y),
785
- onPageChange: u[2] || (u[2] = (f) => n(D)({
781
+ onSortChange: a(y),
782
+ onPageChange: u[2] || (u[2] = (f) => a(D)({
786
783
  pageSize: f.pageSize,
787
784
  pageIndex: f.pageIndex
788
785
  }))
@@ -0,0 +1,124 @@
1
+ import { defineComponent as C, ref as U, computed as B, resolveComponent as g, openBlock as o, createElementBlock as u, Fragment as v, toDisplayString as L, createCommentVNode as N, createElementVNode as E, createVNode as h, unref as d, renderList as x, createBlock as S, isRef as I, withCtx as p } from "vue";
2
+ import { a as A } from "./app-roSGTcOh.js";
3
+ function M(e, m, t) {
4
+ return e.some(
5
+ t instanceof Function ? t : (a) => a === m
6
+ ) || e.push(m), e;
7
+ }
8
+ function w(e, m, t) {
9
+ return e.filter(
10
+ t instanceof Function ? (a) => !t(a) : (a) => a !== m
11
+ );
12
+ }
13
+ const j = {
14
+ key: 0,
15
+ class: "fm-typo-en-body-lg-400"
16
+ }, q = {
17
+ key: 1,
18
+ class: "space-y-4"
19
+ }, D = { key: 0 }, O = { key: 1 }, R = { key: 2 }, z = /* @__PURE__ */ C({
20
+ __name: "TargetLocationInput",
21
+ props: {
22
+ label: {
23
+ type: String
24
+ },
25
+ type: {
26
+ type: String,
27
+ default: "select"
28
+ },
29
+ modelValue: {
30
+ type: Object,
31
+ required: !0
32
+ }
33
+ },
34
+ emits: ["update:model-value"],
35
+ setup(e, { emit: m }) {
36
+ const t = A(), a = e, f = m;
37
+ function k(y, n) {
38
+ const i = y ? M(a.modelValue || [], n.toString()) : w(
39
+ a.modelValue || t.locations.map((s) => s._id.toString()),
40
+ n.toString()
41
+ );
42
+ return f("update:model-value", i);
43
+ }
44
+ const c = U(!1), F = B(() => {
45
+ var i, s;
46
+ const n = ((i = a.modelValue) == null ? void 0 : i.slice(0, 5).map((r) => {
47
+ var V;
48
+ return ((V = t.locationById(r)) == null ? void 0 : V.name) || r;
49
+ })) || [];
50
+ return a.modelValue && ((s = a.modelValue) == null ? void 0 : s.length) > 5 && n.push(`+${a.modelValue.length - 5} more`), n;
51
+ });
52
+ return (y, n) => {
53
+ const i = g("FmCheckbox"), s = g("FmChip"), r = g("FmField"), V = g("FmMenu");
54
+ return o(), u(v, null, [
55
+ e.label ? (o(), u("div", j, L(e.label), 1)) : N("", !0),
56
+ e.type === "checkbox" ? (o(), u("div", q, [
57
+ E("div", null, [
58
+ h(i, {
59
+ value: null,
60
+ indeterminate: e.modelValue != null && e.modelValue.length > 0 && e.modelValue.length < d(t).locations.length,
61
+ label: "All locations",
62
+ "model-value": e.modelValue == null || e.modelValue.length === d(t).locations.length,
63
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => f("update:model-value", l ? null : []))
64
+ }, null, 8, ["indeterminate", "model-value"])
65
+ ]),
66
+ (o(!0), u(v, null, x(d(t).locations, (l) => (o(), u("div", {
67
+ key: l._id.toString()
68
+ }, [
69
+ h(i, {
70
+ value: l._id.toString(),
71
+ label: l.name,
72
+ "model-value": !e.modelValue || e.modelValue.includes(l._id.toString()),
73
+ "onUpdate:modelValue": (b) => k(b, l._id.toString())
74
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"])
75
+ ]))), 128))
76
+ ])) : (o(), S(V, {
77
+ key: 2,
78
+ modelValue: d(c),
79
+ "onUpdate:modelValue": n[2] || (n[2] = (l) => I(c) ? c.value = l : null),
80
+ onMenuChanged: n[3] || (n[3] = (l) => c.value = l),
81
+ placement: "top-end"
82
+ }, {
83
+ "menu-button": p(() => [
84
+ h(r, {
85
+ "append-icon": d(c) ? "expand_more" : "expand_less",
86
+ class: "!h-auto"
87
+ }, {
88
+ default: p(() => [
89
+ !e.modelValue || e.modelValue.length == d(t).locations.length ? (o(), u("div", D, " All Locations ")) : e.modelValue.length ? (o(), u("div", R, [
90
+ (o(!0), u(v, null, x(d(F), (l) => (o(), S(s, {
91
+ key: l,
92
+ label: l,
93
+ class: "max-w-[130px] text-ellipsis"
94
+ }, null, 8, ["label"]))), 128))
95
+ ])) : (o(), u("div", O, "No Locations"))
96
+ ]),
97
+ _: 1
98
+ }, 8, ["append-icon"])
99
+ ]),
100
+ default: p(() => [
101
+ h(i, {
102
+ value: null,
103
+ indeterminate: e.modelValue != null && e.modelValue.length > 0 && e.modelValue.length < d(t).locations.length,
104
+ label: "All locations",
105
+ "model-value": e.modelValue == null || e.modelValue.length === d(t).locations.length,
106
+ "onUpdate:modelValue": n[1] || (n[1] = (l) => f("update:model-value", l ? null : []))
107
+ }, null, 8, ["indeterminate", "model-value"]),
108
+ (o(!0), u(v, null, x(d(t).locations, (l) => (o(), S(i, {
109
+ key: l._id.toString(),
110
+ value: l._id.toString(),
111
+ label: l.name,
112
+ "model-value": !e.modelValue || e.modelValue.includes(l._id.toString()),
113
+ "onUpdate:modelValue": (b) => k(b, l._id.toString())
114
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
115
+ ]),
116
+ _: 1
117
+ }, 8, ["modelValue"]))
118
+ ], 64);
119
+ };
120
+ }
121
+ });
122
+ export {
123
+ z as _
124
+ };