@feedmepos/mf-connect 0.1.38-beta.73 → 0.1.38-beta.74

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 (133) hide show
  1. package/package.json +1 -1
  2. package/dist/Analytic-gGjm5ome.js +0 -761
  3. package/dist/App-BDz9mw-6.js +0 -4638
  4. package/dist/AuditLogs-4x90ZjjY.js +0 -1991
  5. package/dist/Bin-Bby2f42O.js +0 -166
  6. package/dist/Broadcast-eYN2AqFC.js +0 -267
  7. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-fO9-Hb.js +0 -121
  8. package/dist/Card-Cz-pLt7X.js +0 -909
  9. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  10. package/dist/Collections-CgfXuVA1.js +0 -540
  11. package/dist/Credit-Lc6B2oQ9.js +0 -261
  12. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bm7XTR7o.js +0 -3167
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Cp5nSLEX.js +0 -351
  16. package/dist/Experience-Ca94IJBt.js +0 -260
  17. package/dist/FileSaver.min-BThLVsSf.js +0 -74
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  19. package/dist/Game-BYLYDTU9.js +0 -331
  20. package/dist/GenerateMaterial-CUoG6uyI.js +0 -589
  21. package/dist/Grab-DZ_LkTly.js +0 -301
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-CI4kP9ul.js +0 -145
  23. package/dist/Index-BZ2r8x0t.js +0 -259
  24. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  25. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-BLKlXW1b.js +0 -18737
  26. package/dist/MainLayout-BfGSSVMW.js +0 -41
  27. package/dist/Marketing-DYg0J1xG.js +0 -145
  28. package/dist/MarketingMaterialEdit-B--Kck7j.js +0 -746
  29. package/dist/Member-By5QEJxn.js +0 -280
  30. package/dist/MemberList-D49bMmGJ.js +0 -1600
  31. package/dist/MemberOverview-wL_ailso.js +0 -58
  32. package/dist/MemberTransactions-Cz9XENK1.js +0 -45
  33. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-IlFjM-Y5.js +0 -60798
  34. package/dist/Mission-Cvl-V7c8.js +0 -335
  35. package/dist/Overview-lu82lUJp.js +0 -1078
  36. package/dist/Point-C65YFhOB.js +0 -263
  37. package/dist/Promotion-DQCrKO6a.js +0 -397
  38. package/dist/Queue-DR5lfSMi.js +0 -259
  39. package/dist/Record-BCt42_VZ.js +0 -341
  40. package/dist/Reward-7aOnjmMm.js +0 -442
  41. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BPgjr91S.js +0 -149
  42. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Bp5jnlFr.js +0 -1912
  43. package/dist/Segment-DiYwfb8M.js +0 -881
  44. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-ydM5ypC0.js +0 -181
  45. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BRs7pw0l.js +0 -188
  46. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DU8AAPFD.js +0 -147
  47. package/dist/Setting-k6xShcs8.js +0 -1999
  48. package/dist/SettingAdvertisements-DQa_jXYM.js +0 -263
  49. package/dist/Store-B6lYBpsm.js +0 -1995
  50. package/dist/StoreRewards-Cqd399q8.js +0 -534
  51. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Wv_SHwmo.js +0 -1128
  52. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bi1o4YAz.js +0 -7005
  53. package/dist/Tier-CXXImaDx.js +0 -969
  54. package/dist/Title-CTxNCmBW.js +0 -567
  55. package/dist/Transaction-DonaHVzF.js +0 -39
  56. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DbRVYccO.js +0 -130
  57. package/dist/Voucher-Bso_Mjlg.js +0 -422
  58. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNvmaJk9.js +0 -421
  59. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-KHZ3-THo.js +0 -56
  60. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  61. package/dist/app-DKrmktFJ.js +0 -59071
  62. package/dist/app-wDQR6dpb.js +0 -39
  63. package/dist/app.js +0 -7
  64. package/dist/business-Dd73TVX5.js +0 -82
  65. package/dist/campaign-BUQHH4KL.js +0 -100
  66. package/dist/campaign-CpzFl8Vr.js +0 -4
  67. package/dist/campaign-DkJOyF24.js +0 -253
  68. package/dist/campaign.enum-C8vJuDAq.js +0 -26
  69. package/dist/campaign.fn-DJSpfhZH.js +0 -776
  70. package/dist/collectible.enum-D3W0TwoJ.js +0 -19
  71. package/dist/collection.fn-YzgpOmG0.js +0 -26
  72. package/dist/dto-sceHHLGr.js +0 -222
  73. package/dist/duplicateCampaign-CDulKxgJ.js +0 -51
  74. package/dist/effect-BSgfR9iB.js +0 -89
  75. package/dist/email-addresses-D_fyxOof.js +0 -705
  76. package/dist/export-OxiqL1B7.js +0 -96
  77. package/dist/feedme.ico +0 -0
  78. package/dist/helper-CzurWUe4.js +0 -86
  79. package/dist/index-BF0hGAkO.js +0 -32
  80. package/dist/index-BGMhsZnB.js +0 -124
  81. package/dist/index-B_QGGlMD.js +0 -54
  82. package/dist/index-BbTHqh58.js +0 -31
  83. package/dist/index-BqQas5Sx.js +0 -2428
  84. package/dist/index-BtMmY44D.js +0 -36
  85. package/dist/index-CAUVTn1I.js +0 -67
  86. package/dist/index-Cg-sBBf_.js +0 -3419
  87. package/dist/index-CuvNtC_M.js +0 -61
  88. package/dist/index-Cyt6eKEF.js +0 -8912
  89. package/dist/index-Dw3ew6qN.js +0 -85
  90. package/dist/index-IBvUTxqC.js +0 -30289
  91. package/dist/index-pkwrUX33.js +0 -28897
  92. package/dist/index-tYmg4eyJ.js +0 -3
  93. package/dist/index-vh86FiIQ.js +0 -10
  94. package/dist/index.esm2017-5xGykkgL.js +0 -3069
  95. package/dist/loading-CvHPT80F.js +0 -215
  96. package/dist/lodash-Q-_FPkpI.js +0 -3678
  97. package/dist/membership-CU-wFWan.js +0 -235
  98. package/dist/moment-D7p2TMB-.js +0 -2583
  99. package/dist/money-CzlfhEoe.js +0 -15
  100. package/dist/number-Bee2M41N.js +0 -12
  101. package/dist/object-qECH92oz.js +0 -26
  102. package/dist/objectId-dwaoBfJX.js +0 -7
  103. package/dist/objectid-DRJQv7AY.js +0 -145
  104. package/dist/plugins-CAdlnev8.js +0 -1817
  105. package/dist/remy-D_Deb3ue.js +0 -13
  106. package/dist/reward-BhlYd0FB.js +0 -36
  107. package/dist/rule-Ccvu41A_.js +0 -1969
  108. package/dist/rule-builder-B968rIyS.js +0 -102
  109. package/dist/style.css +0 -13
  110. package/dist/template-OZfyPJVE.js +0 -188
  111. package/dist/tier-BJDhpH6X.js +0 -4
  112. package/dist/tiers/tier=1.png +0 -0
  113. package/dist/tiers/tier=2.png +0 -0
  114. package/dist/tiers/tier=3.png +0 -0
  115. package/dist/tiers/tier=4.png +0 -0
  116. package/dist/timezone-CopuRbDK.js +0 -1154
  117. package/dist/titles/type=diamond.png +0 -0
  118. package/dist/titles/type=drinks.png +0 -0
  119. package/dist/titles/type=food.png +0 -0
  120. package/dist/titles/type=heart.png +0 -0
  121. package/dist/titles/type=medal.png +0 -0
  122. package/dist/titles/type=spend.png +0 -0
  123. package/dist/titles/type=thank-you.png +0 -0
  124. package/dist/titles/type=thumbs-up.png +0 -0
  125. package/dist/titles/type=years.png +0 -0
  126. package/dist/trigger-BtQI81FL.js +0 -213
  127. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  128. package/dist/type_drinks-D6jnpvwV.js +0 -4
  129. package/dist/usePagination-Ciom38dd.js +0 -266
  130. package/dist/user-BOW0ixDK.js +0 -55
  131. package/dist/vue-i18n-jTYKTJq1.js +0 -2365
  132. package/dist/xlsx-YD3LYwip.js +0 -15491
  133. package/dist/zod-B_G9o5PC.js +0 -91
@@ -1,261 +0,0 @@
1
- import { defineComponent as H, ref as L, computed as q, h as w, onMounted as O, resolveComponent as m, openBlock as d, createElementBlock as _, Fragment as v, createVNode as s, unref as o, createElementVNode as n, withCtx as b, renderList as z, createBlock as x, resolveDynamicComponent as G, toDisplayString as D, createCommentVNode as J } from "vue";
2
- import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as W, components as V } from "@feedmepos/ui-library";
4
- import { p as X } from "./plugins-CAdlnev8.js";
5
- import { u as Y } from "./loading-CvHPT80F.js";
6
- import { u as Z } from "./business-Dd73TVX5.js";
7
- import { u as ee } from "./campaign-BUQHH4KL.js";
8
- import { a as te, b as B, c as I } from "./campaign-DkJOyF24.js";
9
- import { c as oe, p as ae } from "./duplicateCampaign-CDulKxgJ.js";
10
- import { u as ne } from "./vue-i18n-jTYKTJq1.js";
11
- import { _ as re } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
- import { _ as ie } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bm7XTR7o.js";
13
- import { u as se } from "./template-OZfyPJVE.js";
14
- import { c as f } from "./index-BGMhsZnB.js";
15
- const ce = { class: "px-24 flex flex-col gap-y-16" }, le = { class: "flex items-center justify-between w-full" }, me = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, ue = { class: "space-y-4" }, fe = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex items-center gap-8" }, _e = { key: 0 }, Ee = /* @__PURE__ */ H({
16
- __name: "Credit",
17
- setup(Ce) {
18
- const { t: r } = ne(), T = {
19
- label: r("connect.program.common.actions.create", {
20
- type: r("connect.program.credit.title").toLowerCase()
21
- }),
22
- value: "create",
23
- isPrimary: !0,
24
- prependIcon: "add"
25
- }, E = se("CREDIT", W()), R = Z(), p = ee(), { global: K, minor: k } = Y, c = L({
26
- searchKey: "",
27
- location: []
28
- });
29
- function P(e) {
30
- const t = c.value.location;
31
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
32
- var i;
33
- return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
34
- }) : e.targetLocation.includes(t);
35
- }
36
- const u = q(
37
- () => p.campaigns.credit.filter((e) => P(e))
38
- ), $ = [
39
- {
40
- header: r("connect.program.common.table.title"),
41
- accessorFn: (e) => e.name
42
- },
43
- {
44
- header: r("connect.program.common.table.status"),
45
- accessorFn: (e) => te(e),
46
- cell(e) {
47
- return B(e.row.original);
48
- }
49
- },
50
- {
51
- header: r("connect.program.common.table.summary"),
52
- accessorFn: (e) => I(e)
53
- },
54
- {
55
- header: r("connect.program.common.table.actions"),
56
- cell(e) {
57
- return w("div", { class: "flex items-center gap-8 justify-end" }, [
58
- w(V.FmButton, {
59
- variant: "tertiary",
60
- icon: "content_copy",
61
- iconColor: "neutral-gray-400",
62
- onClick: async (t) => {
63
- t.stopPropagation(), await S(e.row.original);
64
- }
65
- }),
66
- w(V.FmButton, {
67
- variant: "tertiary",
68
- icon: "delete",
69
- iconColor: "neutral-gray-400",
70
- onClick: (t) => {
71
- t.stopPropagation(), F(e.row.original);
72
- }
73
- })
74
- ]);
75
- }
76
- }
77
- ], C = L();
78
- async function F(e) {
79
- await X.remove(
80
- r("connect.program.common.remove.confirm", { name: e.name })
81
- ) && await k(
82
- async () => {
83
- await f.delete(e._id), await p.read("CREDIT");
84
- },
85
- {
86
- message: r("connect.program.common.remove.removing", { name: e.name }),
87
- successMessage: r("connect.program.common.remove.removed", {
88
- name: e.name
89
- })
90
- }
91
- );
92
- }
93
- async function g(e) {
94
- e ? await t() : E.open(async (l) => {
95
- await t(l);
96
- });
97
- async function t(l) {
98
- var i;
99
- (i = C.value) == null || i.showSheet(
100
- !0,
101
- "CREDIT",
102
- e ? await f.readById(e._id) : void 0,
103
- l
104
- );
105
- }
106
- }
107
- async function S(e) {
108
- var i;
109
- if (!await oe(e.name))
110
- return;
111
- const t = await f.readById(e._id), l = ae(t, {
112
- keepCollectible: !0
113
- });
114
- (i = C.value) == null || i.showSheet(
115
- !0,
116
- "CREDIT",
117
- l,
118
- t.template
119
- );
120
- }
121
- async function U(e) {
122
- await k(
123
- async () => {
124
- e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("CREDIT");
125
- },
126
- {
127
- message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
128
- successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
129
- }
130
- );
131
- }
132
- return O(async () => {
133
- await K(async () => {
134
- await p.read("CREDIT");
135
- });
136
- }), (e, t) => {
137
- const l = m("FmPageHead"), i = m("FmSearch"), j = m("FmTable"), h = m("FmButton"), A = m("FmListItem"), N = m("FmList"), M = m("FmCard");
138
- return d(), _(v, null, [
139
- s(l, {
140
- title: o(r)("connect.program.credit.title"),
141
- actions: o(u).length > 0 ? [T] : [],
142
- "onClick:action": t[0] || (t[0] = () => g())
143
- }, null, 8, ["title", "actions"]),
144
- n("div", ce, [
145
- s(i, {
146
- modelValue: o(c).searchKey,
147
- "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
148
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
149
- placeholder: "search",
150
- collapsible: ""
151
- }, null, 8, ["modelValue"]),
152
- o(p).campaigns.credit && o(p).campaigns.credit.length > 0 ? (d(), _(v, { key: 0 }, [
153
- n("div", le, [
154
- n("div", me, [
155
- s(re, {
156
- label: `${o(r)("connect.common.location")}: `,
157
- "right-icon": "keyboard_arrow_down",
158
- modelValue: o(c).location,
159
- "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
160
- icon: "storefront",
161
- "show-item-label": !0,
162
- items: o(R).locationOptions
163
- }, null, 8, ["label", "modelValue", "items"])
164
- ]),
165
- s(i, {
166
- modelValue: o(c).searchKey,
167
- "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
168
- class: "xs:hidden sm:hidden",
169
- placeholder: "search",
170
- collapsible: ""
171
- }, null, 8, ["modelValue"])
172
- ]),
173
- s(j, {
174
- class: "xs:hidden sm:hidden",
175
- "row-data": o(u),
176
- "column-defs": $,
177
- "search-value": o(c).searchKey,
178
- "column-filter": [],
179
- onRowClick: t[4] || (t[4] = (a) => g(a.original)),
180
- "hide-footer": o(u).length < 10
181
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
182
- s(N, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
183
- default: b(() => [
184
- (d(!0), _(v, null, z(o(u).filter(
185
- (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
186
- ), (a) => (d(), x(A, {
187
- key: a._id.toString(),
188
- onClick: (y) => g(a),
189
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
190
- }, {
191
- default: b(() => [
192
- n("div", de, [
193
- n("div", pe, [
194
- (d(), x(G(o(B)(a))))
195
- ]),
196
- n("div", ue, [
197
- n("div", fe, D(a.name), 1),
198
- n("div", ge, D(o(I)(a)), 1)
199
- ])
200
- ]),
201
- n("div", ye, [
202
- s(h, {
203
- icon: "content_copy",
204
- "icon-color": "neutral-gray-400",
205
- variant: "tertiary",
206
- onClick: async (y) => {
207
- y.stopPropagation(), await S(a);
208
- }
209
- }, null, 8, ["onClick"]),
210
- s(h, {
211
- icon: "delete",
212
- "icon-color": "neutral-gray-400",
213
- variant: "tertiary",
214
- onClick: (y) => (y.stopPropagation(), F(a))
215
- }, null, 8, ["onClick"])
216
- ])
217
- ]),
218
- _: 2
219
- }, 1032, ["onClick"]))), 128))
220
- ]),
221
- _: 1
222
- }),
223
- o(u).length == 0 ? (d(), _("div", _e, [...t[6] || (t[6] = [
224
- n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
225
- ])])) : J("", !0)
226
- ], 64)) : (d(), x(M, {
227
- key: 1,
228
- variant: "outlined",
229
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
230
- }, {
231
- default: b(() => [
232
- t[7] || (t[7] = n("img", {
233
- src: Q,
234
- class: "aspect-square w-[150px]"
235
- }, null, -1)),
236
- t[8] || (t[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
237
- n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
238
- 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. ")
239
- ], -1)),
240
- s(h, {
241
- variant: "primary",
242
- label: "Create credit program",
243
- icon: "add",
244
- onClick: t[5] || (t[5] = (a) => g())
245
- })
246
- ]),
247
- _: 1
248
- })),
249
- s(ie, {
250
- ref_key: "sheetRef",
251
- ref: C,
252
- "onSubmit:modelValue": U
253
- }, null, 512)
254
- ])
255
- ], 64);
256
- };
257
- }
258
- });
259
- export {
260
- Ee as default
261
- };
@@ -1,128 +0,0 @@
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,58 +0,0 @@
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-D7p2TMB-.js";
3
- const a = "YYYY-MM-DD", F = /* @__PURE__ */ f({
4
- __name: "DateRangeChip",
5
- props: /* @__PURE__ */ l({
6
- modelValue: {
7
- type: Object,
8
- required: !0
9
- }
10
- }, {
11
- dateRange: {
12
- type: Object,
13
- default: () => ({
14
- startDate: t().subtract(7, "day").format(a),
15
- endDate: t().endOf("day").format(a)
16
- })
17
- },
18
- dateRangeModifiers: {}
19
- }),
20
- emits: /* @__PURE__ */ l(["update:model-value"], ["update:dateRange"]),
21
- setup(r, { emit: s }) {
22
- const o = r, c = s, e = g(r, "dateRange"), i = u(() => e.value ? `${n.value.startDate ?? "Start"} - ${n.value.endDate ?? "End"}` : "No dates selected."), n = u(() => ({
23
- startDate: e.value.startDate ? t(e.value.startDate).format(a) : void 0,
24
- endDate: e.value.endDate ? t(e.value.endDate).format(a) : void 0
25
- }));
26
- return _(() => {
27
- e.value = {
28
- startDate: o.modelValue.startDate ? t(o.modelValue.startDate).format(a) : void 0,
29
- endDate: o.modelValue.endDate ? t(o.modelValue.endDate).format(a) : void 0
30
- };
31
- }), R(
32
- () => e.value,
33
- () => {
34
- c("update:model-value", n.value);
35
- }
36
- ), (C, d) => {
37
- const p = m("FmChip"), D = m("FmDateRangePicker");
38
- return h(), V(D, {
39
- modelValue: e.value,
40
- "onUpdate:modelValue": d[0] || (d[0] = (v) => e.value = v),
41
- "show-predefined-range": ""
42
- }, {
43
- "trigger-button": b(() => [
44
- k(p, {
45
- label: y(i),
46
- icon: "calendar_month",
47
- "right-icon": "keyboard_arrow_down",
48
- class: "text-fm-color-neutral-gray-400 cursor-pointer"
49
- }, null, 8, ["label"])
50
- ]),
51
- _: 1
52
- }, 8, ["modelValue"]);
53
- };
54
- }
55
- });
56
- export {
57
- F as _
58
- };