@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.51

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 (112) hide show
  1. package/dist/Analytic-DP8oPOug.js +427 -0
  2. package/dist/{App-C8Qfnkhz.js → App-DSFvQRnz.js} +441 -420
  3. package/dist/AuditLogs-YSw2xsZw.js +1885 -0
  4. package/dist/Bin-Da_eermT.js +166 -0
  5. package/dist/{Broadcast-BK-1MQkL.js → Broadcast-DoNlWo4j.js} +13 -12
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DItda2cA.js} +6 -8
  7. package/dist/Card-CbxtYecE.js +896 -0
  8. package/dist/{Collections-TA4iW1r0.js → Collections-p1UhWf85.js} +27 -31
  9. package/dist/{Credit-Df9iFQjZ.js → Credit-DQta1iUA.js} +17 -16
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-BN5MFZTx.js} +6 -6
  14. package/dist/{Experience-ByLFXKn6.js → Experience-BnwKk_PO.js} +26 -25
  15. package/dist/{Game-B6Ez0pfW.js → Game-_4Hj3Yyt.js} +21 -20
  16. package/dist/Index-Bmz1R6hW.js +259 -0
  17. package/dist/Marketing-D0V260mx.js +20071 -0
  18. package/dist/{Member-TobP1ISp.js → Member-BIEihOp5.js} +4 -4
  19. package/dist/MemberList-C4EbD7jO.js +1598 -0
  20. package/dist/MemberTransactions-DvYurEaZ.js +45 -0
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-vGMke4sb.js} +6 -6
  22. package/dist/{Mission-D9uTVo0G.js → Mission-C6gKiY9l.js} +97 -84
  23. package/dist/Overview-xqu1_7-7.js +1078 -0
  24. package/dist/{Point-4rDr-53e.js → Point-C02Z0_w5.js} +26 -25
  25. package/dist/{Promotion-BKO_dtQk.js → Promotion-BBfa32MT.js} +55 -48
  26. package/dist/Record-Bcj2D0fP.js +340 -0
  27. package/dist/Reward-BMvRwWnr.js +442 -0
  28. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-gt0h6XDa.js +150 -0
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CPw-z0L1.js +1637 -0
  30. package/dist/Segment-BpkWm7ah.js +568 -0
  31. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-_t32qpAQ.js +181 -0
  32. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWNF7Srw.js +147 -0
  33. package/dist/{Setting-B7oISD0D.js → Setting-QEqA9Sjr.js} +610 -586
  34. package/dist/Store-Bb5Qh_fa.js +1744 -0
  35. package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-CqmFv4KN.js} +33 -32
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-SGMgGM-I.js +939 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bd63YQLw.js} +1 -1
  38. package/dist/{Tier-DkxdNj-K.js → Tier-BG4EQUN4.js} +327 -318
  39. package/dist/{Title-VFpCOsMO.js → Title-CLZYAG35.js} +199 -184
  40. package/dist/{Transaction-BgKD8n2L.js → Transaction-DxKmtuW2.js} +2 -2
  41. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DWqf1lcK.js +130 -0
  42. package/dist/Voucher-BiBkN12U.js +353 -0
  43. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bv6ro9Ul.js +419 -0
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-DaN1_uKj.js} +1 -1
  45. package/dist/{app-DA-t-2Zt.js → app-BDYHz7bx.js} +1 -1
  46. package/dist/{app-DUl5dav5.js → app-BToiZpVg.js} +1758 -1496
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CeCitOY4.js → business-Cdck2Mo8.js} +1 -1
  49. package/dist/{campaign-CcLM6e4s.js → campaign-U0MVzGkd.js} +2 -2
  50. package/dist/campaign-V6y28epS.js +1810 -0
  51. package/dist/campaign.enum-C2ZHkwav.js +20 -0
  52. package/dist/campaign.fn-C8hqL7sq.js +758 -0
  53. package/dist/collectible.enum-DPFWrwtU.js +19 -0
  54. package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUtvp8Q7.js} +2 -2
  55. package/dist/dto-CO3dr-5e.js +214 -0
  56. package/dist/{effect-Dt7rXOBy.js → effect-CTIglwNj.js} +9 -9
  57. package/dist/email-addresses-fTprqBTm.js +705 -0
  58. package/dist/{export-CyioiboQ.js → export-BNfnVhxu.js} +5 -5
  59. package/dist/{helper-FA_9AhGV.js → helper-BB4sHiiB.js} +1 -1
  60. package/dist/index-BZjpXQbO.js +32 -0
  61. package/dist/index-BnJgi3GR.js +54 -0
  62. package/dist/{index-DLN4Kzz_.js → index-BpmAtLiE.js} +1 -1
  63. package/dist/{index-igxrd5jC.js → index-ByUriI6F.js} +1500 -1479
  64. package/dist/{index-BiFueJiF.js → index-CUDAo9HK.js} +259 -193
  65. package/dist/index-CsaQJMAR.js +66 -0
  66. package/dist/{index-DbbO3wip.js → index-DHEtLTYr.js} +48 -4
  67. package/dist/{index-CCdXvb92.js → index-DTnTvdIA.js} +1 -1
  68. package/dist/{index-CyNdsVrw.js → index-DbzMtv9Z.js} +1 -1
  69. package/dist/index-DwbN8FHi.js +44 -0
  70. package/dist/index-czQ4GAtE.js +115 -0
  71. package/dist/{index-C20XBD7G.js → index-fkBcbLFu.js} +2192 -931
  72. package/dist/index-vh86FiIQ.js +10 -0
  73. package/dist/index-wzNzbg46.js +29000 -0
  74. package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-OtiYpLFF.js} +33 -33
  75. package/dist/loading-D_NOvElg.js +71 -0
  76. package/dist/{membership-DFiY8aVd.js → membership-6M1ftDbz.js} +54 -46
  77. package/dist/money-D6phwlff.js +15 -0
  78. package/dist/number-CT9IX-wU.js +12 -0
  79. package/dist/objectid-DtS-zHmd.js +145 -0
  80. package/dist/{loading-CZ0fiViM.js → plugins-CFv-0uV9.js} +2990 -3062
  81. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  82. package/dist/reward-B2aqMThx.js +36 -0
  83. package/dist/{rule-C3e1xTqN.js → rule-DxUsHy8Q.js} +180 -177
  84. package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-BqkRAa1C.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{template-C2OKWd_e.js → template-5OZEG9e3.js} +5 -5
  87. package/dist/trigger-D7aLiQDF.js +144 -0
  88. package/dist/user-CMYgbV2m.js +54 -0
  89. package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-Cad7169E.js} +216 -216
  90. package/dist/{xlsx-CtXdl3ls.js → xlsx-rV-XTyJC.js} +1 -1
  91. package/package.json +9 -7
  92. package/dist/Analytic-C_ZFR5jh.js +0 -622
  93. package/dist/Card-C7dUFJKe.js +0 -825
  94. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
  95. package/dist/Marketing-BaqZUeVI.js +0 -316
  96. package/dist/MemberList-B9cutmEh.js +0 -1733
  97. package/dist/MemberTransactions-DRHA7AOF.js +0 -38
  98. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
  99. package/dist/Segment-Dj8nc3AE.js +0 -437
  100. package/dist/Store-CJ3wcohQ.js +0 -1511
  101. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
  102. package/dist/Voucher-BbTLt8Pt.js +0 -490
  103. package/dist/dto-CRJma6eX.js +0 -2770
  104. package/dist/index-B1e0LtDe.js +0 -99
  105. package/dist/index-Be2ZYDy_.js +0 -298
  106. package/dist/index-CDkITvze.js +0 -762
  107. package/dist/index-CuvNtC_M.js +0 -61
  108. package/dist/index-DPP5F3bT.js +0 -206
  109. package/dist/index-Dbo3DDwp.js +0 -29193
  110. package/dist/money-D8hUEfP4.js +0 -15
  111. package/dist/number-DL3GAeVt.js +0 -12
  112. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,17 +1,19 @@
1
1
  var oe = Object.defineProperty;
2
2
  var te = (f, r, u) => r in f ? oe(f, r, { enumerable: !0, configurable: !0, writable: !0, value: u }) : f[r] = u;
3
3
  var $ = (f, r, u) => te(f, typeof r != "symbol" ? r + "" : r, u);
4
- import { defineComponent as H, ref as p, computed as J, watch as O, resolveComponent as d, openBlock as y, createBlock as T, unref as o, isRef as K, withCtx as I, createElementVNode as b, createVNode as s, createElementBlock as R, Fragment as N, renderList as ae, createCommentVNode as P, onMounted as le, h as S } from "vue";
4
+ import { defineComponent as H, ref as p, computed as J, watch as O, resolveComponent as d, openBlock as y, createBlock as T, unref as o, isRef as K, withCtx as I, createElementVNode as b, createVNode as s, createElementBlock as P, Fragment as N, renderList as ae, createCommentVNode as R, onMounted as le, h as w } from "vue";
5
5
  import { h as j } from "./moment-BWErdI6_.js";
6
6
  import { components as G } from "@feedmepos/ui-library";
7
- import { u as Q, a as ne } from "./loading-CZ0fiViM.js";
7
+ import { a as ne } from "./plugins-CFv-0uV9.js";
8
8
  import { J as se } from "./JsonViewer-v8_C7l5N.js";
9
+ import { u as Q } from "./loading-D_NOvElg.js";
9
10
  import { u as re } from "./app-wDQR6dpb.js";
10
11
  import { useRoute as W, useRouter as ie } from "vue-router";
11
- import { c as A } from "./index-B1e0LtDe.js";
12
- import { u as z, w as de } from "./xlsx-CtXdl3ls.js";
12
+ import { c as A } from "./index-czQ4GAtE.js";
13
+ import { e as m } from "./index-vh86FiIQ.js";
14
+ import { u as z, w as de } from "./xlsx-rV-XTyJC.js";
13
15
  import { u as ue, _ as ce } from "./usePagination-BeF5K3M7.js";
14
- import { m as me } from "./index-DbbO3wip.js";
16
+ import { m as me } from "./index-DHEtLTYr.js";
15
17
  import { o as pe } from "./objectId-dwaoBfJX.js";
16
18
  const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, be = { class: "flex items-center gap-8" }, Ce = /* @__PURE__ */ H({
17
19
  __name: "CreateCollectionSheet",
@@ -91,7 +93,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
91
93
  t != e && (l.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(t))));
92
94
  }
93
95
  ), (t, e) => {
94
- const v = d("FmRadio"), i = d("FmRadioGroup"), V = d("FmSwitch"), L = d("FmStepperField"), w = d("FmSelect"), x = d("FmTextField"), X = d("FmTextarea"), Z = d("FmForm"), Y = d("FmButton"), ee = d("FmSideSheet");
96
+ const v = d("FmRadio"), i = d("FmRadioGroup"), V = d("FmSwitch"), L = d("FmStepperField"), S = d("FmSelect"), x = d("FmTextField"), X = d("FmTextarea"), Z = d("FmForm"), Y = d("FmButton"), ee = d("FmSideSheet");
95
97
  return y(), T(ee, {
96
98
  "max-width": 560,
97
99
  "dismiss-away": !0,
@@ -135,7 +137,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
135
137
  inline: !1
136
138
  }, {
137
139
  default: I(() => [
138
- (y(), R(N, null, ae(D, (a) => s(v, {
140
+ (y(), P(N, null, ae(D, (a) => s(v, {
139
141
  key: a.value,
140
142
  value: a.value,
141
143
  label: a.label,
@@ -147,7 +149,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
147
149
  ]),
148
150
  b("div", fe, [
149
151
  e[17] || (e[17] = b("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
150
- o(c) === "bulk" ? (y(), R(N, { key: 0 }, [
152
+ o(c) === "bulk" ? (y(), P(N, { key: 0 }, [
151
153
  s(V, {
152
154
  "model-value": o(h),
153
155
  "label-placement": "right",
@@ -156,7 +158,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
156
158
  required: !0,
157
159
  "onUpdate:modelValue": e[1] || (e[1] = () => h.value = !o(h))
158
160
  }, null, 8, ["model-value"]),
159
- o(h) ? (y(), R(N, { key: 0 }, [
161
+ o(h) ? (y(), P(N, { key: 0 }, [
160
162
  s(L, {
161
163
  modelValue: o(l).codeConfig.length,
162
164
  "onUpdate:modelValue": e[2] || (e[2] = (a) => o(l).codeConfig.length = a),
@@ -169,7 +171,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
169
171
  ],
170
172
  required: !0
171
173
  }, null, 8, ["modelValue", "rules"]),
172
- s(w, {
174
+ s(S, {
173
175
  label: "Charset",
174
176
  "model-value": o(C),
175
177
  items: U,
@@ -184,7 +186,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
184
186
  "onUpdate:modelValue": e[4] || (e[4] = (a) => o(l).codeConfig.charset = a),
185
187
  label: "Custom Charset",
186
188
  required: ""
187
- }, null, 8, ["modelValue"])) : P("", !0),
189
+ }, null, 8, ["modelValue"])) : R("", !0),
188
190
  b("div", ge, [
189
191
  s(x, {
190
192
  modelValue: o(l).codeConfig.prefix,
@@ -203,7 +205,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
203
205
  label: "Pattern",
204
206
  required: !0
205
207
  }, null, 8, ["modelValue"])
206
- ], 64)) : P("", !0),
208
+ ], 64)) : R("", !0),
207
209
  s(x, {
208
210
  modelValue: o(l).quantity,
209
211
  "onUpdate:modelValue": e[8] || (e[8] = (a) => o(l).quantity = a),
@@ -215,7 +217,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
215
217
  required: !0,
216
218
  "helper-text": `${o(l).quantity} claim will be created`
217
219
  }, null, 8, ["modelValue", "rules", "helper-text"])
218
- ], 64)) : P("", !0),
220
+ ], 64)) : R("", !0),
219
221
  o(c) !== "bulk" ? (y(), T(X, {
220
222
  key: 1,
221
223
  modelValue: o(l).code,
@@ -223,7 +225,7 @@ const fe = { class: "space-y-16" }, ge = { class: "gap-16 grid grid-cols-2" }, b
223
225
  label: "Custom Code",
224
226
  rules: [(a) => o(c) != "single" || !!a || "Custom code is required"],
225
227
  placeholder: "(For multiple codes, please enter in the new row.)"
226
- }, null, 8, ["modelValue", "rules"])) : P("", !0)
228
+ }, null, 8, ["modelValue", "rules"])) : R("", !0)
227
229
  ])
228
230
  ]),
229
231
  _: 1
@@ -246,13 +248,7 @@ class ve {
246
248
  return z.book_append_sheet(r, u, "Collection"), r;
247
249
  }
248
250
  }
249
- const m = {
250
- sortBy: "_id",
251
- descending: !1,
252
- rowsPerPage: 1e3,
253
- page: 1,
254
- rowsNumber: 0
255
- }, xe = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ye = { class: "flex items-center justify-end py-4 xs:hidden" }, Ae = /* @__PURE__ */ H({
251
+ const xe = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ye = { class: "flex items-center justify-end py-4 xs:hidden" }, qe = /* @__PURE__ */ H({
256
252
  __name: "Collections",
257
253
  setup(f) {
258
254
  const r = ie(), u = W(), F = p(), k = J(() => u.params.id), _ = p(!1), { custom: B } = Q, E = [
@@ -260,8 +256,8 @@ const m = {
260
256
  header: "ID/Code",
261
257
  accessorKey: "_id",
262
258
  cell(n) {
263
- return S("div", { class: "flex items-center" }, [
264
- S(G.FmIcon, {
259
+ return w("div", { class: "flex items-center" }, [
260
+ w(G.FmIcon, {
265
261
  name: "content_copy",
266
262
  outline: !0,
267
263
  size: "sm",
@@ -272,7 +268,7 @@ const m = {
272
268
  );
273
269
  }
274
270
  }),
275
- S(
271
+ w(
276
272
  "div",
277
273
  { class: "pr-2 text-ellipsis overflow-hidden" },
278
274
  n.row.original.code || n.row.original._id.toString()
@@ -286,18 +282,18 @@ const m = {
286
282
  enableSorting: !1,
287
283
  cell(n) {
288
284
  const t = n.row.original.pf_user;
289
- return S(
285
+ return w(
290
286
  "div",
291
287
  {
292
288
  class: "flex items-center gap-x-8"
293
289
  },
294
290
  [
295
- S(G.FmAvatar, {
291
+ w(G.FmAvatar, {
296
292
  name: t != null && t.photoUrl || t == null ? void 0 : t.name,
297
293
  src: (t == null ? void 0 : t.photoUrl) ?? void 0,
298
294
  size: "sm"
299
295
  }),
300
- S("span", t == null ? void 0 : t.name)
296
+ w("span", t == null ? void 0 : t.name)
301
297
  ]
302
298
  );
303
299
  }
@@ -359,9 +355,9 @@ const m = {
359
355
  k.value,
360
356
  V
361
357
  );
362
- for await (const w of L.resources) {
358
+ for await (const S of L.resources) {
363
359
  const x = {
364
- Id: (w == null ? void 0 : w.code) || ((v = w._id) == null ? void 0 : v.toString()) || ""
360
+ Id: (S == null ? void 0 : S.code) || ((v = S._id) == null ? void 0 : v.toString()) || ""
365
361
  };
366
362
  n.addRecord(x);
367
363
  }
@@ -386,7 +382,7 @@ const m = {
386
382
  await C();
387
383
  }), (n, t) => {
388
384
  const e = d("FmPageHead"), v = d("FmSearch");
389
- return y(), R(N, null, [
385
+ return y(), P(N, null, [
390
386
  s(e, {
391
387
  title: "Collections",
392
388
  "back-button": !0,
@@ -449,5 +445,5 @@ const m = {
449
445
  }
450
446
  });
451
447
  export {
452
- Ae as default
448
+ qe as default
453
449
  };
@@ -1,16 +1,17 @@
1
1
  import { defineComponent as N, ref as S, computed as j, h as M, onMounted as A, resolveComponent as l, openBlock as c, createElementBlock as y, Fragment as h, createVNode as i, unref as a, createElementVNode as n, withCtx as C, renderList as H, createBlock as v, resolveDynamicComponent as q, toDisplayString as g, createCommentVNode as z } from "vue";
2
2
  import { _ as G } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as J, components as O } from "@feedmepos/ui-library";
4
- import { p as Q, u as W } from "./loading-CZ0fiViM.js";
5
- import { u as X } from "./business-CeCitOY4.js";
6
- import { u as Y } from "./campaign-CcLM6e4s.js";
7
- import { g as V, b as L } from "./dto-CRJma6eX.js";
8
- import { u as Z } from "./vue-i18n-CjxDUnX6.js";
4
+ import { p as Q } from "./plugins-CFv-0uV9.js";
5
+ import { u as W } from "./loading-D_NOvElg.js";
6
+ import { u as X } from "./business-Cdck2Mo8.js";
7
+ import { u as Y } from "./campaign-U0MVzGkd.js";
8
+ import { g as V, a as L } from "./campaign-V6y28epS.js";
9
+ import { u as Z } from "./vue-i18n-Cad7169E.js";
9
10
  import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js";
11
- import { u as te } from "./template-C2OKWd_e.js";
12
- import { c as _ } from "./index-B1e0LtDe.js";
13
- const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, ie = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ce = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { key: 0 }, Ve = /* @__PURE__ */ N({
11
+ import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js";
12
+ import { u as te } from "./template-5OZEG9e3.js";
13
+ import { c as _ } from "./index-czQ4GAtE.js";
14
+ const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, ie = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ce = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { key: 0 }, Le = /* @__PURE__ */ N({
14
15
  __name: "Credit",
15
16
  setup(fe) {
16
17
  const { t: r } = Z(), I = {
@@ -50,13 +51,13 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-
50
51
  icon: "delete",
51
52
  iconColor: "neutral-gray-400",
52
53
  onClick: (o) => {
53
- o.stopPropagation(), x(e.row.original);
54
+ o.stopPropagation(), b(e.row.original);
54
55
  }
55
56
  });
56
57
  }
57
58
  }
58
- ], b = S();
59
- async function x(e) {
59
+ ], x = S();
60
+ async function b(e) {
60
61
  await Q.remove(
61
62
  r("connect.program.common.remove.confirm", { name: e.name })
62
63
  ) && await w(
@@ -77,7 +78,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-
77
78
  });
78
79
  async function o(p) {
79
80
  var u;
80
- (u = b.value) == null || u.showSheet(
81
+ (u = x.value) == null || u.showSheet(
81
82
  !0,
82
83
  "CREDIT",
83
84
  e ? await _.readById(e._id) : void 0,
@@ -171,7 +172,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-
171
172
  icon: "delete",
172
173
  "icon-color": "neutral-gray-400",
173
174
  variant: "tertiary",
174
- onClick: (k) => (k.stopPropagation(), x(t))
175
+ onClick: (k) => (k.stopPropagation(), b(t))
175
176
  }, null, 8, ["onClick"])
176
177
  ]),
177
178
  _: 2
@@ -207,7 +208,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-
207
208
  })),
208
209
  i(oe, {
209
210
  ref_key: "sheetRef",
210
- ref: b,
211
+ ref: x,
211
212
  "onSubmit:modelValue": E
212
213
  }, null, 512)
213
214
  ])
@@ -216,5 +217,5 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-
216
217
  }
217
218
  });
218
219
  export {
219
- Ve as default
220
+ Le as default
220
221
  };
@@ -0,0 +1,108 @@
1
+ import { defineComponent as I, ref as P, resolveComponent as u, openBlock as t, createBlock as y, unref as h, withCtx as d, renderSlot as V, createElementBlock as s, toDisplayString as i, createCommentVNode as S, createVNode as x, normalizeClass as g, createElementVNode as B, Fragment as N, renderList as j } from "vue";
2
+ const q = {
3
+ key: 0,
4
+ class: "fm-typo-en-body-lg-400 mb-4"
5
+ }, $ = {
6
+ key: 1,
7
+ class: "fm-typo-en-body-lg-400"
8
+ }, E = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, O = /* @__PURE__ */ I({
9
+ __name: "CustomSelect",
10
+ props: {
11
+ label: {
12
+ type: String,
13
+ required: !1
14
+ },
15
+ placeholder: {
16
+ type: String,
17
+ required: !1
18
+ },
19
+ items: {
20
+ type: Object,
21
+ required: !0
22
+ },
23
+ modelValue: {
24
+ type: Object
25
+ },
26
+ zIndex: {
27
+ type: Number
28
+ },
29
+ multiselect: {
30
+ type: Boolean
31
+ }
32
+ },
33
+ emits: ["update:model-value"],
34
+ setup(e, { emit: k }) {
35
+ const r = k, m = P(!1);
36
+ return (v, b) => {
37
+ const F = u("FmIcon"), C = u("FmField"), p = u("FmMenuItem"), w = u("FmPopover");
38
+ return t(), y(w, {
39
+ "show-popover": h(m),
40
+ onPopoverChanged: b[0] || (b[0] = (l) => m.value = l),
41
+ "z-index": e.zIndex
42
+ }, {
43
+ "popover-button": d(() => [
44
+ V(v.$slots, "popover-button", {}, () => [
45
+ e.label ? (t(), s("div", q, i(e.label), 1)) : S("", !0),
46
+ x(C, null, {
47
+ append: d(() => [
48
+ V(v.$slots, "append"),
49
+ x(F, {
50
+ name: h(m) ? "expand_less" : "expand_more",
51
+ size: "md",
52
+ color: "black"
53
+ }, null, 8, ["name"])
54
+ ]),
55
+ default: d(() => {
56
+ var l;
57
+ return [
58
+ e.multiselect ? (t(), s("div", $, i(e.items.filter((o) => {
59
+ var a;
60
+ return (a = e.modelValue) == null ? void 0 : a.includes(o.value);
61
+ }).map((o) => o.label).join(", ")), 1)) : (t(), s("div", {
62
+ key: 0,
63
+ class: g(["fm-typo-en-body-lg-400", {
64
+ "text-fm-color-typo-secondary": !e.items.find(
65
+ (o) => o.value == e.modelValue
66
+ )
67
+ }])
68
+ }, i(((l = e.items.find((o) => o.value == e.modelValue)) == null ? void 0 : l.label) || e.placeholder), 3))
69
+ ];
70
+ }),
71
+ _: 3
72
+ })
73
+ ])
74
+ ]),
75
+ default: d(() => [
76
+ B("div", E, [
77
+ (t(!0), s(N, null, j(e.items, (l) => {
78
+ var o, a;
79
+ return t(), y(p, {
80
+ class: g(`${e.multiselect ? (o = e.modelValue) != null && o.some((n) => n == l.value) ? "bg-fm-color-system-warning-100" : "" : e.modelValue == l.value}`),
81
+ "has-checkbox": e.multiselect,
82
+ key: l.value,
83
+ "model-value": e.multiselect ? (a = e.modelValue) == null ? void 0 : a.some((n) => n == l.value) : e.modelValue == l.value,
84
+ label: l.label,
85
+ onClick: (n) => {
86
+ var f;
87
+ if (n.stopPropagation(), !e.multiselect)
88
+ m.value = !1, r("update:model-value", l.value);
89
+ else {
90
+ const z = (f = e.modelValue) == null ? void 0 : f.some((c) => c == l.value);
91
+ r(
92
+ "update:model-value",
93
+ z ? (e.modelValue ?? []).filter((c) => c !== l.value) : [...e.modelValue ?? [], l.value]
94
+ );
95
+ }
96
+ }
97
+ }, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
98
+ }), 128))
99
+ ])
100
+ ]),
101
+ _: 3
102
+ }, 8, ["show-popover", "z-index"]);
103
+ };
104
+ }
105
+ });
106
+ export {
107
+ O as _
108
+ };
@@ -0,0 +1,169 @@
1
+ import { defineComponent as M, ref as V, computed as k, onMounted as R, resolveComponent as s, openBlock as m, createBlock as b, unref as r, withCtx as g, createVNode as y, normalizeClass as _, createCommentVNode as j, createElementVNode as q, toDisplayString as w, createElementBlock as S, Fragment as I, renderList as A, mergeModels as C, useModel as B, watch as L } from "vue";
2
+ import { h as v } from "./moment-BWErdI6_.js";
3
+ const N = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ M({
4
+ __name: "FilterChip",
5
+ props: {
6
+ modelValue: {
7
+ type: Array,
8
+ required: !1
9
+ },
10
+ label: {
11
+ type: String,
12
+ required: !1,
13
+ default: ""
14
+ },
15
+ showItemLabel: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ placement: {
20
+ type: String,
21
+ required: !1,
22
+ default: "bottom-end"
23
+ },
24
+ class: {
25
+ type: String,
26
+ required: !1
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ required: !1
31
+ },
32
+ items: {
33
+ type: Array,
34
+ required: !0
35
+ },
36
+ icon: {
37
+ type: String,
38
+ required: !1
39
+ }
40
+ },
41
+ emits: ["update:model-value"],
42
+ setup(n, { emit: h }) {
43
+ const a = n, c = h, l = V(!1), e = V({}), d = k(() => {
44
+ if (!e.value || Object.keys(e.value).length == a.items.length)
45
+ return "All";
46
+ {
47
+ const t = Object.keys(e.value).length;
48
+ return `${t > 0 ? t : "None"} selected`;
49
+ }
50
+ });
51
+ function D(t) {
52
+ e.value[t] ? delete e.value[t] : e.value[t] = !0, c("update:model-value", Object.keys(e.value));
53
+ }
54
+ function i() {
55
+ Object.keys(e.value).length > 0 ? e.value = {} : e.value = a.items.reduce((t, o) => (t[o.value] = !0, t), {}), c("update:model-value", Object.keys(e.value));
56
+ }
57
+ return R(() => {
58
+ e.value = a.modelValue.reduce(
59
+ (t, o) => (t[o] = !0, t),
60
+ {}
61
+ ), a.modelValue.length == 0;
62
+ }), (t, o) => {
63
+ const p = s("FmIcon"), x = s("FmChip"), F = s("FmMenuItem"), O = s("FmMenu");
64
+ return m(), b(O, {
65
+ placement: n.placement || "bottom-end",
66
+ disabled: n.disabled == !0,
67
+ "model-value": r(l),
68
+ onMenuChanged: o[0] || (o[0] = (u) => l.value = u),
69
+ "close-on-click": !1
70
+ }, {
71
+ "menu-button": g(() => [
72
+ y(x, {
73
+ label: n.label,
74
+ class: _(a.class || "text-fm-color-neutral-gray-400 cursor-pointer")
75
+ }, {
76
+ default: g(() => [
77
+ a.icon ? (m(), b(p, {
78
+ key: 0,
79
+ name: a.icon,
80
+ class: _(a.class),
81
+ outline: "",
82
+ size: "sm"
83
+ }, null, 8, ["name", "class"])) : j("", !0),
84
+ q("div", N, w(a.label) + " " + w(n.showItemLabel ? r(d) : ""), 1),
85
+ y(p, {
86
+ name: r(l) ? "keyboard_arrow_up" : "keyboard_arrow_down",
87
+ class: _(a.class),
88
+ outline: "",
89
+ size: "sm"
90
+ }, null, 8, ["name", "class"])
91
+ ]),
92
+ _: 1
93
+ }, 8, ["label", "class"])
94
+ ]),
95
+ default: g(() => [
96
+ y(F, {
97
+ "model-value": Object.keys(r(e)).length === a.items.length,
98
+ label: "All",
99
+ "has-checkbox": !0,
100
+ indeterminate: !0,
101
+ onClick: i
102
+ }, null, 8, ["model-value"]),
103
+ (m(!0), S(I, null, A(a.items ?? [], (u) => (m(), b(F, {
104
+ key: u.value,
105
+ value: u.value,
106
+ label: u.label,
107
+ "has-checkbox": !0,
108
+ "model-value": r(e)[u.value],
109
+ "onUpdate:modelValue": ($) => D(u.value)
110
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
111
+ ]),
112
+ _: 1
113
+ }, 8, ["placement", "disabled", "model-value"]);
114
+ };
115
+ }
116
+ }), f = "YYYY-MM-DD", U = /* @__PURE__ */ M({
117
+ __name: "DateRangeChip",
118
+ props: /* @__PURE__ */ C({
119
+ modelValue: {
120
+ type: Object,
121
+ required: !0
122
+ }
123
+ }, {
124
+ dateRange: {
125
+ type: Object,
126
+ default: () => ({
127
+ startDate: v().subtract(7, "day").format(f),
128
+ endDate: v().endOf("day").format(f)
129
+ })
130
+ },
131
+ dateRangeModifiers: {}
132
+ }),
133
+ emits: /* @__PURE__ */ C(["update:model-value"], ["update:dateRange"]),
134
+ setup(n, { emit: h }) {
135
+ const a = n, c = h, l = B(n, "dateRange"), e = k(() => l.value ? `${d.value.startDate ?? "Start"} - ${d.value.endDate ?? "End"}` : "No dates selected."), d = k(() => ({
136
+ startDate: l.value.startDate ? v(l.value.startDate).format(f) : void 0,
137
+ endDate: l.value.endDate ? v(l.value.endDate).format(f) : void 0
138
+ }));
139
+ return R(() => {
140
+ l.value = a.modelValue;
141
+ }), L(
142
+ () => l.value,
143
+ () => {
144
+ c("update:model-value", d.value);
145
+ }
146
+ ), (D, i) => {
147
+ const t = s("FmChip"), o = s("FmDateRangePicker");
148
+ return m(), b(o, {
149
+ modelValue: l.value,
150
+ "onUpdate:modelValue": i[0] || (i[0] = (p) => l.value = p),
151
+ "show-predefined-range": ""
152
+ }, {
153
+ "trigger-button": g(() => [
154
+ y(t, {
155
+ label: r(e),
156
+ icon: "calendar_month",
157
+ "right-icon": "keyboard_arrow_down",
158
+ class: "text-fm-color-neutral-gray-400 cursor-pointer"
159
+ }, null, 8, ["label"])
160
+ ]),
161
+ _: 1
162
+ }, 8, ["modelValue"]);
163
+ };
164
+ }
165
+ });
166
+ export {
167
+ E as _,
168
+ U as a
169
+ };