@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.61

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 (148) hide show
  1. package/dist/{Analytic-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
  2. package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
  3. package/dist/AuditLogs-VWx8DFKA.js +1991 -0
  4. package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
  5. package/dist/Broadcast-6VXz4-IG.js +233 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
  7. package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
  8. package/dist/Collections-CF_OcAL3.js +540 -0
  9. package/dist/Credit-BUqGOyp_.js +226 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js +3150 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
  14. package/dist/Experience-BxiFH_uV.js +225 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BzYW0LfY.js +300 -0
  18. package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
  19. package/dist/Grab-BgiMqwvj.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
  21. package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
  24. package/dist/Marketing-Bnijl7lA.js +145 -0
  25. package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
  26. package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
  27. package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
  28. package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
  30. package/dist/Mission-Q5_sGgrm.js +304 -0
  31. package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
  32. package/dist/Point-BGYFMvev.js +228 -0
  33. package/dist/Promotion-0acd63nA.js +364 -0
  34. package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
  35. package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
  36. package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
  39. package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
  43. package/dist/Setting-CjcnxK34.js +1992 -0
  44. package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
  45. package/dist/Store-B8k5YVqU.js +1934 -0
  46. package/dist/StoreRewards-BW08rwpL.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
  49. package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
  50. package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
  51. package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
  53. package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
  56. package/dist/app-IvbII0ql.js +45026 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
  59. package/dist/campaign-RuIwxc4y.js +253 -0
  60. package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
  61. package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
  62. package/dist/campaign.fn-B_P1MkRV.js +776 -0
  63. package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
  64. package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
  65. package/dist/dto-jwO_sX9I.js +222 -0
  66. package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
  67. package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
  68. package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
  69. package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
  70. package/dist/index-B-AMMFfT.js +3419 -0
  71. package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
  72. package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
  73. package/dist/index-Bflu4Rft.js +8884 -0
  74. package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
  75. package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
  76. package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
  77. package/dist/index-CppLPpqB.js +30933 -0
  78. package/dist/index-CuvNtC_M.js +61 -0
  79. package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
  80. package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
  81. package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
  82. package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
  83. package/dist/index-wzSeRJAd.js +36 -0
  84. package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
  85. package/dist/loading-CivgDw5C.js +215 -0
  86. package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
  87. package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
  88. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  89. package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
  90. package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
  91. package/dist/objectid-CHab6j3r.js +145 -0
  92. package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
  93. package/dist/remy-D_Deb3ue.js +13 -0
  94. package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
  95. package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
  96. package/dist/rule-builder-DANv7Rmz.js +102 -0
  97. package/dist/style.css +11 -2
  98. package/dist/template-Dbz3FhHK.js +188 -0
  99. package/dist/timezone-BgVqObBq.js +1151 -0
  100. package/dist/trigger-CbriUibd.js +213 -0
  101. package/dist/usePagination-DtNK7W0U.js +223 -0
  102. package/dist/user-CVapqHfr.js +55 -0
  103. package/dist/vue-i18n-tpDAnnmD.js +2365 -0
  104. package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
  105. package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
  106. package/package.json +13 -5
  107. package/dist/AuditLogs-C-gCCPvF.js +0 -1887
  108. package/dist/Broadcast-B2-itjvZ.js +0 -227
  109. package/dist/Collections-DepGq6WJ.js +0 -465
  110. package/dist/Credit-D7K0gFwc.js +0 -222
  111. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  112. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
  113. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
  114. package/dist/Experience-FlBX3eyN.js +0 -223
  115. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  116. package/dist/Game-Cc3D7lKV.js +0 -278
  117. package/dist/Marketing-D7PXYloN.js +0 -20073
  118. package/dist/Mission-BSGc9822.js +0 -296
  119. package/dist/Point-0U4TTdPW.js +0 -226
  120. package/dist/Promotion-DiUa0GcV.js +0 -289
  121. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
  122. package/dist/Setting-RLI7RgmN.js +0 -1936
  123. package/dist/Store-gxmv8hWJ.js +0 -1842
  124. package/dist/StoreRewards-C_6gY_Nk.js +0 -423
  125. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
  126. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
  127. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
  128. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  129. package/dist/app-B90wINOO.js +0 -33357
  130. package/dist/app-DuUxQ1ZP.js +0 -7086
  131. package/dist/campaign.fn-DKScnmjX.js +0 -758
  132. package/dist/dto-C5ri8Nws.js +0 -214
  133. package/dist/index-BCGDOgxb.js +0 -38
  134. package/dist/index-BCPBmANe.js +0 -3120
  135. package/dist/index-BN2Uyvj4.js +0 -30038
  136. package/dist/index-CrbnfAk8.js +0 -8861
  137. package/dist/index-CsaQJMAR.js +0 -66
  138. package/dist/index-DJwQICyC.js +0 -146
  139. package/dist/loading-MEQuW9Xa.js +0 -71
  140. package/dist/objectid-BeZTZYqi.js +0 -145
  141. package/dist/plugins-KiMuDTPp.js +0 -208
  142. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  143. package/dist/rule-builder-BTcZx77a.js +0 -89
  144. package/dist/template-DPpMK30W.js +0 -190
  145. package/dist/trigger-DLp1bkZP.js +0 -144
  146. package/dist/usePagination-BeF5K3M7.js +0 -223
  147. package/dist/user-Cq9CGBHZ.js +0 -54
  148. package/dist/vue-i18n-COzqUgQy.js +0 -2365
@@ -0,0 +1,226 @@
1
+ import { defineComponent as N, ref as F, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as g, Fragment as _, createVNode as i, unref as t, createElementVNode as n, withCtx as h, renderList as q, createBlock as C, resolveDynamicComponent as O, toDisplayString as L, createCommentVNode as z } from "vue";
2
+ import { _ as G } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as J, components as Q } from "@feedmepos/ui-library";
4
+ import { p as W } from "./plugins-P-V4XWmW.js";
5
+ import { u as X } from "./loading-CivgDw5C.js";
6
+ import { u as Y } from "./business-BFIwFfkq.js";
7
+ import { u as Z } from "./campaign-w9j4I4jn.js";
8
+ import { a as ee, b as S, c as V } from "./campaign-RuIwxc4y.js";
9
+ import { u as oe } from "./vue-i18n-tpDAnnmD.js";
10
+ import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
12
+ import { u as ne } from "./template-Dbz3FhHK.js";
13
+ import { c as y } from "./index-DpjYgKTN.js";
14
+ const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { key: 0 }, Ve = /* @__PURE__ */ N({
15
+ __name: "Credit",
16
+ setup(fe) {
17
+ const { t: r } = oe(), B = {
18
+ label: r("connect.program.common.actions.create", {
19
+ type: r("connect.program.credit.title").toLowerCase()
20
+ }),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, I = ne("CREDIT", J()), D = Y(), u = Z(), { global: T, minor: w } = X, s = F({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function E(e) {
29
+ const o = s.value.location;
30
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((c) => {
31
+ var l;
32
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(c);
33
+ }) : e.targetLocation.includes(o);
34
+ }
35
+ const p = j(
36
+ () => u.campaigns.credit.filter((e) => E(e))
37
+ ), R = [
38
+ {
39
+ header: r("connect.program.common.table.title"),
40
+ accessorFn: (e) => e.name
41
+ },
42
+ {
43
+ header: r("connect.program.common.table.status"),
44
+ accessorFn: (e) => ee(e),
45
+ cell(e) {
46
+ return S(e.row.original);
47
+ }
48
+ },
49
+ {
50
+ header: r("connect.program.common.table.summary"),
51
+ accessorFn: (e) => V(e)
52
+ },
53
+ {
54
+ header: r("connect.program.common.table.actions"),
55
+ cell(e) {
56
+ return M(Q.FmButton, {
57
+ variant: "tertiary",
58
+ icon: "delete",
59
+ iconColor: "neutral-gray-400",
60
+ onClick: (o) => {
61
+ o.stopPropagation(), v(e.row.original);
62
+ }
63
+ });
64
+ }
65
+ }
66
+ ], b = F();
67
+ async function v(e) {
68
+ await W.remove(
69
+ r("connect.program.common.remove.confirm", { name: e.name })
70
+ ) && await w(
71
+ async () => {
72
+ await y.delete(e._id), await u.read("CREDIT");
73
+ },
74
+ {
75
+ message: r("connect.program.common.remove.removing", { name: e.name }),
76
+ successMessage: r("connect.program.common.remove.removed", {
77
+ name: e.name
78
+ })
79
+ }
80
+ );
81
+ }
82
+ async function f(e) {
83
+ e ? await o() : I.open(async (c) => {
84
+ await o(c);
85
+ });
86
+ async function o(c) {
87
+ var l;
88
+ (l = b.value) == null || l.showSheet(
89
+ !0,
90
+ "CREDIT",
91
+ e ? await y.readById(e._id) : void 0,
92
+ c
93
+ );
94
+ }
95
+ }
96
+ async function K(e) {
97
+ await w(
98
+ async () => {
99
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await u.read("CREDIT");
100
+ },
101
+ {
102
+ message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
103
+ successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
104
+ }
105
+ );
106
+ }
107
+ return H(async () => {
108
+ await T(async () => {
109
+ await u.read("CREDIT");
110
+ });
111
+ }), (e, o) => {
112
+ const c = m("FmPageHead"), l = m("FmSearch"), $ = m("FmTable"), x = m("FmButton"), P = m("FmListItem"), U = m("FmList"), A = m("FmCard");
113
+ return d(), g(_, null, [
114
+ i(c, {
115
+ title: t(r)("connect.program.credit.title"),
116
+ actions: t(p).length > 0 ? [B] : [],
117
+ "onClick:action": o[0] || (o[0] = () => f())
118
+ }, null, 8, ["title", "actions"]),
119
+ n("div", re, [
120
+ i(l, {
121
+ modelValue: t(s).searchKey,
122
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => t(s).searchKey = a),
123
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
124
+ placeholder: "search",
125
+ collapsible: ""
126
+ }, null, 8, ["modelValue"]),
127
+ t(u).campaigns.credit && t(u).campaigns.credit.length > 0 ? (d(), g(_, { key: 0 }, [
128
+ n("div", se, [
129
+ n("div", ie, [
130
+ i(te, {
131
+ label: `${t(r)("connect.common.location")}: `,
132
+ "right-icon": "keyboard_arrow_down",
133
+ modelValue: t(s).location,
134
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => t(s).location = a),
135
+ icon: "storefront",
136
+ "show-item-label": !0,
137
+ items: t(D).locationOptions
138
+ }, null, 8, ["label", "modelValue", "items"])
139
+ ]),
140
+ i(l, {
141
+ modelValue: t(s).searchKey,
142
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => t(s).searchKey = a),
143
+ class: "xs:hidden sm:hidden",
144
+ placeholder: "search",
145
+ collapsible: ""
146
+ }, null, 8, ["modelValue"])
147
+ ]),
148
+ i($, {
149
+ class: "xs:hidden sm:hidden",
150
+ "row-data": t(p),
151
+ "column-defs": R,
152
+ "search-value": t(s).searchKey,
153
+ "column-filter": [],
154
+ onRowClick: o[4] || (o[4] = (a) => f(a.original)),
155
+ "hide-footer": t(p).length < 10
156
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
157
+ i(U, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
158
+ default: h(() => [
159
+ (d(!0), g(_, null, q(t(p).filter(
160
+ (a) => a.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
161
+ ), (a) => (d(), C(P, {
162
+ key: a._id.toString(),
163
+ onClick: (k) => f(a),
164
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
165
+ }, {
166
+ default: h(() => [
167
+ n("div", le, [
168
+ n("div", ce, [
169
+ (d(), C(O(t(S)(a))))
170
+ ]),
171
+ n("div", me, [
172
+ n("div", de, L(a.name), 1),
173
+ n("div", ue, L(t(V)(a)), 1)
174
+ ])
175
+ ]),
176
+ i(x, {
177
+ icon: "delete",
178
+ "icon-color": "neutral-gray-400",
179
+ variant: "tertiary",
180
+ onClick: (k) => (k.stopPropagation(), v(a))
181
+ }, null, 8, ["onClick"])
182
+ ]),
183
+ _: 2
184
+ }, 1032, ["onClick"]))), 128))
185
+ ]),
186
+ _: 1
187
+ }),
188
+ t(p).length == 0 ? (d(), g("div", pe, [...o[6] || (o[6] = [
189
+ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
190
+ ])])) : z("", !0)
191
+ ], 64)) : (d(), C(A, {
192
+ key: 1,
193
+ variant: "outlined",
194
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
195
+ }, {
196
+ default: h(() => [
197
+ o[7] || (o[7] = n("img", {
198
+ src: G,
199
+ class: "aspect-square w-[150px]"
200
+ }, null, -1)),
201
+ o[8] || (o[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
202
+ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
203
+ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
204
+ ], -1)),
205
+ i(x, {
206
+ variant: "primary",
207
+ label: "Create credit program",
208
+ icon: "add",
209
+ onClick: o[5] || (o[5] = (a) => f())
210
+ })
211
+ ]),
212
+ _: 1
213
+ })),
214
+ i(ae, {
215
+ ref_key: "sheetRef",
216
+ ref: b,
217
+ "onSubmit:modelValue": K
218
+ }, null, 512)
219
+ ])
220
+ ], 64);
221
+ };
222
+ }
223
+ });
224
+ export {
225
+ Ve as default
226
+ };
@@ -0,0 +1,128 @@
1
+ import { defineComponent as j, ref as B, computed as N, resolveComponent as i, openBlock as n, createBlock as g, unref as r, withCtx as v, renderSlot as p, createElementBlock as f, toDisplayString as h, createCommentVNode as F, createVNode as C, normalizeClass as V, createElementVNode as q, Fragment as A, renderList as E } from "vue";
2
+ const M = {
3
+ key: 0,
4
+ class: "fm-typo-en-body-lg-400 mb-4"
5
+ }, O = {
6
+ key: 1,
7
+ class: "fm-typo-en-body-lg-400"
8
+ }, D = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, G = /* @__PURE__ */ j({
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: w }) {
35
+ const u = e, s = w, d = B(!1), b = N(() => !u.multiselect || !u.modelValue ? !1 : u.items.every((m) => u.modelValue.includes(m.value))), I = () => {
36
+ u.multiselect && (b.value ? s("update:model-value", []) : s(
37
+ "update:model-value",
38
+ u.items.map((m) => m.value)
39
+ ));
40
+ };
41
+ return (m, c) => {
42
+ const S = i("FmIcon"), z = i("FmField"), k = i("FmMenuItem"), P = i("FmPopover");
43
+ return n(), g(P, {
44
+ "show-popover": r(d),
45
+ onPopoverChanged: c[1] || (c[1] = (l) => d.value = l),
46
+ "z-index": e.zIndex
47
+ }, {
48
+ "popover-button": v(() => [
49
+ p(m.$slots, "popover-button", {}, () => [
50
+ e.label ? (n(), f("div", M, h(e.label), 1)) : F("", !0),
51
+ C(z, null, {
52
+ append: v(() => [
53
+ p(m.$slots, "append"),
54
+ C(S, {
55
+ name: r(d) ? "expand_less" : "expand_more",
56
+ size: "md",
57
+ color: "black"
58
+ }, null, 8, ["name"])
59
+ ]),
60
+ default: v(() => {
61
+ var l;
62
+ return [
63
+ e.multiselect ? (n(), f("div", O, h((() => {
64
+ const t = e.items.filter(
65
+ (o) => {
66
+ var a;
67
+ return (a = e.modelValue) == null ? void 0 : a.includes(o.value);
68
+ }
69
+ );
70
+ return t.length <= 5 ? t.map((o) => o.label).join(", ") : t.slice(0, 5).map((o) => o.label).join(", ") + ` +${t.length - 5} selected`;
71
+ })()), 1)) : (n(), f("div", {
72
+ key: 0,
73
+ class: V(["fm-typo-en-body-lg-400", {
74
+ "text-fm-color-typo-secondary": !e.items.find(
75
+ (t) => t.value == e.modelValue
76
+ )
77
+ }])
78
+ }, h(((l = e.items.find((t) => t.value == e.modelValue)) == null ? void 0 : l.label) || e.placeholder), 3))
79
+ ];
80
+ }),
81
+ _: 3
82
+ })
83
+ ])
84
+ ]),
85
+ default: v(() => [
86
+ q("div", D, [
87
+ e.multiselect ? (n(), g(k, {
88
+ key: 0,
89
+ class: V(`${r(b) ? "bg-fm-color-system-warning-100" : ""}`),
90
+ "has-checkbox": !0,
91
+ "model-value": r(b),
92
+ label: "All",
93
+ onClick: c[0] || (c[0] = (l) => {
94
+ l.stopPropagation(), I();
95
+ })
96
+ }, null, 8, ["class", "model-value"])) : F("", !0),
97
+ (n(!0), f(A, null, E(e.items, (l) => {
98
+ var t, o;
99
+ return n(), g(k, {
100
+ class: V(`${e.multiselect ? (t = e.modelValue) != null && t.some((a) => a == l.value) ? "bg-fm-color-system-warning-100" : "" : e.modelValue == l.value}`),
101
+ "has-checkbox": e.multiselect,
102
+ key: l.value,
103
+ "model-value": e.multiselect ? (o = e.modelValue) == null ? void 0 : o.some((a) => a == l.value) : e.modelValue == l.value,
104
+ label: l.label,
105
+ onClick: (a) => {
106
+ var x;
107
+ if (a.stopPropagation(), !e.multiselect)
108
+ d.value = !1, s("update:model-value", l.value);
109
+ else {
110
+ const $ = (x = e.modelValue) == null ? void 0 : x.some((y) => y == l.value);
111
+ s(
112
+ "update:model-value",
113
+ $ ? (e.modelValue ?? []).filter((y) => y !== l.value) : [...e.modelValue ?? [], l.value]
114
+ );
115
+ }
116
+ }
117
+ }, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
118
+ }), 128))
119
+ ])
120
+ ]),
121
+ _: 3
122
+ }, 8, ["show-popover", "z-index"]);
123
+ };
124
+ }
125
+ });
126
+ export {
127
+ G as _
128
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as f, mergeModels as l, useModel as g, computed as u, onMounted as _, watch as R, resolveComponent as m, openBlock as h, createBlock as V, withCtx as b, createVNode as k, unref as y } from "vue";
2
- import { h as t } from "./moment-BWErdI6_.js";
2
+ import { h as t } from "./moment-D7p2TMB-.js";
3
3
  const a = "YYYY-MM-DD", F = /* @__PURE__ */ f({
4
4
  __name: "DateRangeChip",
5
5
  props: /* @__PURE__ */ l({