@feedmepos/mf-connect 0.1.98-beta.14 → 0.1.98-beta.15

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 (138) hide show
  1. package/package.json +1 -1
  2. package/dist/App-cOhxU_u8.js +0 -4782
  3. package/dist/AuditLogs-DrF4TZUW.js +0 -2013
  4. package/dist/Bin-BO-_SFaU.js +0 -166
  5. package/dist/Broadcast-3KBPqTp-.js +0 -266
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B2k0Ax57.js +0 -120
  7. package/dist/Card-BBEYrPpW.js +0 -910
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-BZ11k2vT.js +0 -540
  10. package/dist/Credit-CwO14_-u.js +0 -260
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  12. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D4jVrMR2.js +0 -3377
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dp9dROqK.js +0 -351
  15. package/dist/Experience-DZYYZIVR.js +0 -259
  16. package/dist/FileSaver.min-DZ6AZLEa.js +0 -74
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
  19. package/dist/Game-DZly0uJ3.js +0 -330
  20. package/dist/Grab-FFgsd5Wb.js +0 -300
  21. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BmG1PcGa.js +0 -145
  22. package/dist/Index-Buue0sTx.js +0 -259
  23. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  24. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-D9CPiVRL.js +0 -48
  25. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-DEmnoTR_.js +0 -18737
  26. package/dist/LoyaltyDashboard-iyOrUQF2.js +0 -1082
  27. package/dist/MainLayout-DDNR2vj1.js +0 -41
  28. package/dist/Marketing-BJtm-Vnf.js +0 -235
  29. package/dist/MarketingMaterialEdit-DGI8fL2j.js +0 -1035
  30. package/dist/Member-D21klZ6O.js +0 -280
  31. package/dist/MemberList-UwhfWFfo.js +0 -1601
  32. package/dist/MemberOverview-wL_ailso.js +0 -58
  33. package/dist/MemberTransactions-DdhEdQq-.js +0 -45
  34. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-FQ_jtN0E.js +0 -60802
  35. package/dist/Mission-lhpygvb4.js +0 -334
  36. package/dist/Overview-Bkl8Fv1q.js +0 -1079
  37. package/dist/Overview-Ou8WJ3B7.js +0 -949
  38. package/dist/Point-CU9_iH5w.js +0 -262
  39. package/dist/Promotion-DUfpA-F5.js +0 -397
  40. package/dist/Queue-5RY1yhKG.js +0 -260
  41. package/dist/Record-CdmEH4nI.js +0 -342
  42. package/dist/Review-LtjQYKAk.js +0 -45
  43. package/dist/ReviewFacebookCallback-DPBmP1K6.js +0 -248
  44. package/dist/ReviewGoogleCallback-CDFnaibj.js +0 -213
  45. package/dist/Reward-CbEdbgTn.js +0 -442
  46. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BRWaqlw8.js +0 -149
  47. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dd8wepc7.js +0 -1911
  48. package/dist/Segment-CxTX6TU2.js +0 -1014
  49. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DUFo9F1G.js +0 -181
  50. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-YkK4-mO4.js +0 -188
  51. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-YDcyEKae.js +0 -226
  52. package/dist/Setting-DrEWfQ2K.js +0 -2047
  53. package/dist/SettingAdvertisements-BNzwx5ox.js +0 -264
  54. package/dist/Settings-D2SXYanx.js +0 -228
  55. package/dist/Store-DCi2Gebw.js +0 -1996
  56. package/dist/StoreRewards-CUvV029S.js +0 -540
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B9QdgprC.js +0 -1130
  58. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bl2U2bAx.js +0 -7007
  59. package/dist/Tier-wxIk82Kp.js +0 -969
  60. package/dist/Title-Cx5ckWlL.js +0 -566
  61. package/dist/Transaction-CQCnhmhL.js +0 -39
  62. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DdLtspjY.js +0 -130
  63. package/dist/Voucher-D8DV8q8E.js +0 -421
  64. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Dps0mhrC.js +0 -421
  65. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BdzQYhnJ.js +0 -56
  66. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  67. package/dist/app-BYN7_HL6.js +0 -59945
  68. package/dist/app-wDQR6dpb.js +0 -39
  69. package/dist/app.js +0 -7
  70. package/dist/business-CNyGQEl3.js +0 -82
  71. package/dist/campaign-CpzFl8Vr.js +0 -4
  72. package/dist/campaign-D5dSLv9k.js +0 -277
  73. package/dist/campaign-DE4WGerQ.js +0 -219
  74. package/dist/campaign.enum-COWBdOo2.js +0 -26
  75. package/dist/campaign.fn-CBKrg_JY.js +0 -776
  76. package/dist/collectible.enum-BJKh8Szm.js +0 -19
  77. package/dist/duplicateCampaign-BJGQqxsx.js +0 -51
  78. package/dist/effect-C3uE-Ub3.js +0 -89
  79. package/dist/email-addresses-cgmjeyob.js +0 -705
  80. package/dist/export-DfPkQrIk.js +0 -97
  81. package/dist/feedme.ico +0 -0
  82. package/dist/google-BQK68wbe.js +0 -5
  83. package/dist/helper-DEZ_jgnw.js +0 -86
  84. package/dist/index-0aRjP_N-.js +0 -61
  85. package/dist/index-B4mc4nmM.js +0 -3
  86. package/dist/index-B9bDzA3j.js +0 -67
  87. package/dist/index-BVSqfE9E.js +0 -54
  88. package/dist/index-Bci4maC5.js +0 -28900
  89. package/dist/index-Bx6C3Aio.js +0 -151
  90. package/dist/index-CK4B3Egt.js +0 -2819
  91. package/dist/index-CM0_akRu.js +0 -8910
  92. package/dist/index-Ckl89tkb.js +0 -3678
  93. package/dist/index-CuFWuaJc.js +0 -85
  94. package/dist/index-CuvNtC_M.js +0 -61
  95. package/dist/index-D5Cv5Klv.js +0 -31
  96. package/dist/index-DKFmW-C4.js +0 -30289
  97. package/dist/index-fM_oxcl1.js +0 -1157
  98. package/dist/index-niKnRyUP.js +0 -32
  99. package/dist/index-vh86FiIQ.js +0 -10
  100. package/dist/index.esm2017-B2vB8CeD.js +0 -3069
  101. package/dist/loading-CBKQzRKM.js +0 -72
  102. package/dist/lodash-jJUnjhex.js +0 -3678
  103. package/dist/membership-DF-HsQ7U.js +0 -255
  104. package/dist/moment-D7p2TMB-.js +0 -2583
  105. package/dist/money-D1M9tVKp.js +0 -15
  106. package/dist/number-CtwHCTkf.js +0 -12
  107. package/dist/object-BYyQ0PZp.js +0 -18
  108. package/dist/objectId-dwaoBfJX.js +0 -7
  109. package/dist/objectid-D9V_xKfE.js +0 -145
  110. package/dist/plugins-B5hadxaX.js +0 -1788
  111. package/dist/reward-DKwcSvsL.js +0 -36
  112. package/dist/rule-_Qadty1-.js +0 -1969
  113. package/dist/string-Gcy5IM_H.js +0 -32
  114. package/dist/style.css +0 -4
  115. package/dist/template-Dd-s9Cy8.js +0 -188
  116. package/dist/tier-BJDhpH6X.js +0 -4
  117. package/dist/tiers/tier=1.png +0 -0
  118. package/dist/tiers/tier=2.png +0 -0
  119. package/dist/tiers/tier=3.png +0 -0
  120. package/dist/tiers/tier=4.png +0 -0
  121. package/dist/titles/type=diamond.png +0 -0
  122. package/dist/titles/type=drinks.png +0 -0
  123. package/dist/titles/type=food.png +0 -0
  124. package/dist/titles/type=heart.png +0 -0
  125. package/dist/titles/type=medal.png +0 -0
  126. package/dist/titles/type=spend.png +0 -0
  127. package/dist/titles/type=thank-you.png +0 -0
  128. package/dist/titles/type=thumbs-up.png +0 -0
  129. package/dist/titles/type=years.png +0 -0
  130. package/dist/trigger-Bah27aCv.js +0 -213
  131. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  132. package/dist/type_drinks-D6jnpvwV.js +0 -4
  133. package/dist/useMarketingMaterialActions-zFOd9J72.js +0 -107
  134. package/dist/usePagination-C_R_8m7X.js +0 -220
  135. package/dist/user-Mvfxwgqs.js +0 -55
  136. package/dist/vue-i18n-Cf94QH_1.js +0 -2365
  137. package/dist/xlsx-DQIcBS39.js +0 -15491
  138. package/dist/zod-BLtGmvmH.js +0 -91
@@ -1,260 +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 i, 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-B5hadxaX.js";
5
- import { u as Y } from "./loading-CBKQzRKM.js";
6
- import { u as Z } from "./business-CNyGQEl3.js";
7
- import { u as ee, c as f } from "./campaign-DE4WGerQ.js";
8
- import { a as te, b as B, c as I } from "./campaign-D5dSLv9k.js";
9
- import { c as oe, p as ae } from "./duplicateCampaign-BJGQqxsx.js";
10
- import { u as ne } from "./vue-i18n-Cf94QH_1.js";
11
- import { _ as re } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
- import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D4jVrMR2.js";
13
- import { u as ie } from "./template-Dd-s9Cy8.js";
14
- 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 }, Te = /* @__PURE__ */ H({
15
- __name: "Credit",
16
- setup(Ce) {
17
- const { t: r } = ne(), T = {
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
- }, E = ie("CREDIT", W()), R = Z(), p = ee(), { global: K, minor: k } = Y, c = L({
25
- searchKey: "",
26
- location: []
27
- });
28
- function P(e) {
29
- const t = c.value.location;
30
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
31
- var s;
32
- return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(l);
33
- }) : e.targetLocation.includes(t);
34
- }
35
- const u = q(
36
- () => p.campaigns.credit.filter((e) => P(e))
37
- ), $ = [
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) => te(e),
45
- cell(e) {
46
- return B(e.row.original);
47
- }
48
- },
49
- {
50
- header: r("connect.program.common.table.summary"),
51
- accessorFn: (e) => I(e)
52
- },
53
- {
54
- header: r("connect.program.common.table.actions"),
55
- cell(e) {
56
- return w("div", { class: "flex items-center gap-8 justify-end" }, [
57
- w(V.FmButton, {
58
- variant: "tertiary",
59
- icon: "content_copy",
60
- iconColor: "neutral-gray-400",
61
- onClick: async (t) => {
62
- t.stopPropagation(), await S(e.row.original);
63
- }
64
- }),
65
- w(V.FmButton, {
66
- variant: "tertiary",
67
- icon: "delete",
68
- iconColor: "neutral-gray-400",
69
- onClick: (t) => {
70
- t.stopPropagation(), F(e.row.original);
71
- }
72
- })
73
- ]);
74
- }
75
- }
76
- ], C = L();
77
- async function F(e) {
78
- await X.remove(
79
- r("connect.program.common.remove.confirm", { name: e.name })
80
- ) && await k(
81
- async () => {
82
- await f.delete(e._id), await p.read("CREDIT");
83
- },
84
- {
85
- message: r("connect.program.common.remove.removing", { name: e.name }),
86
- successMessage: r("connect.program.common.remove.removed", {
87
- name: e.name
88
- })
89
- }
90
- );
91
- }
92
- async function g(e) {
93
- e ? await t() : E.open(async (l) => {
94
- await t(l);
95
- });
96
- async function t(l) {
97
- var s;
98
- (s = C.value) == null || s.showSheet(
99
- !0,
100
- "CREDIT",
101
- e ? await f.readById(e._id) : void 0,
102
- l
103
- );
104
- }
105
- }
106
- async function S(e) {
107
- var s;
108
- if (!await oe(e.name))
109
- return;
110
- const t = await f.readById(e._id), l = ae(t, {
111
- keepCollectible: !0
112
- });
113
- (s = C.value) == null || s.showSheet(
114
- !0,
115
- "CREDIT",
116
- l,
117
- t.template
118
- );
119
- }
120
- async function U(e) {
121
- await k(
122
- async () => {
123
- e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("CREDIT");
124
- },
125
- {
126
- message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
127
- successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
128
- }
129
- );
130
- }
131
- return O(async () => {
132
- await K(async () => {
133
- await p.read("CREDIT");
134
- });
135
- }), (e, t) => {
136
- const l = m("FmPageHead"), s = m("FmSearch"), j = m("FmTable"), h = m("FmButton"), A = m("FmListItem"), N = m("FmList"), M = m("FmCard");
137
- return d(), _(v, null, [
138
- i(l, {
139
- title: o(r)("connect.program.credit.title"),
140
- actions: o(u).length > 0 ? [T] : [],
141
- "onClick:action": t[0] || (t[0] = () => g())
142
- }, null, 8, ["title", "actions"]),
143
- n("div", ce, [
144
- i(s, {
145
- modelValue: o(c).searchKey,
146
- "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
147
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
148
- placeholder: "search",
149
- collapsible: ""
150
- }, null, 8, ["modelValue"]),
151
- o(p).campaigns.credit && o(p).campaigns.credit.length > 0 ? (d(), _(v, { key: 0 }, [
152
- n("div", le, [
153
- n("div", me, [
154
- i(re, {
155
- label: `${o(r)("connect.common.location")}: `,
156
- "right-icon": "keyboard_arrow_down",
157
- modelValue: o(c).location,
158
- "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
159
- icon: "storefront",
160
- "show-item-label": !0,
161
- items: o(R).locationOptions
162
- }, null, 8, ["label", "modelValue", "items"])
163
- ]),
164
- i(s, {
165
- modelValue: o(c).searchKey,
166
- "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
167
- class: "xs:hidden sm:hidden",
168
- placeholder: "search",
169
- collapsible: ""
170
- }, null, 8, ["modelValue"])
171
- ]),
172
- i(j, {
173
- class: "xs:hidden sm:hidden",
174
- "row-data": o(u),
175
- "column-defs": $,
176
- "search-value": o(c).searchKey,
177
- "column-filter": [],
178
- onRowClick: t[4] || (t[4] = (a) => g(a.original)),
179
- "hide-footer": o(u).length < 10
180
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
181
- i(N, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
182
- default: b(() => [
183
- (d(!0), _(v, null, z(o(u).filter(
184
- (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
185
- ), (a) => (d(), x(A, {
186
- key: a._id.toString(),
187
- onClick: (y) => g(a),
188
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
189
- }, {
190
- default: b(() => [
191
- n("div", de, [
192
- n("div", pe, [
193
- (d(), x(G(o(B)(a))))
194
- ]),
195
- n("div", ue, [
196
- n("div", fe, D(a.name), 1),
197
- n("div", ge, D(o(I)(a)), 1)
198
- ])
199
- ]),
200
- n("div", ye, [
201
- i(h, {
202
- icon: "content_copy",
203
- "icon-color": "neutral-gray-400",
204
- variant: "tertiary",
205
- onClick: async (y) => {
206
- y.stopPropagation(), await S(a);
207
- }
208
- }, null, 8, ["onClick"]),
209
- i(h, {
210
- icon: "delete",
211
- "icon-color": "neutral-gray-400",
212
- variant: "tertiary",
213
- onClick: (y) => (y.stopPropagation(), F(a))
214
- }, null, 8, ["onClick"])
215
- ])
216
- ]),
217
- _: 2
218
- }, 1032, ["onClick"]))), 128))
219
- ]),
220
- _: 1
221
- }),
222
- o(u).length == 0 ? (d(), _("div", _e, [...t[6] || (t[6] = [
223
- n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
224
- ])])) : J("", !0)
225
- ], 64)) : (d(), x(M, {
226
- key: 1,
227
- variant: "outlined",
228
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
229
- }, {
230
- default: b(() => [
231
- t[7] || (t[7] = n("img", {
232
- src: Q,
233
- class: "aspect-square w-[150px]"
234
- }, null, -1)),
235
- t[8] || (t[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
236
- n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
237
- 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. ")
238
- ], -1)),
239
- i(h, {
240
- variant: "primary",
241
- label: "Create credit program",
242
- icon: "add",
243
- onClick: t[5] || (t[5] = (a) => g())
244
- })
245
- ]),
246
- _: 1
247
- })),
248
- i(se, {
249
- ref_key: "sheetRef",
250
- ref: C,
251
- "onSubmit:modelValue": U
252
- }, null, 512)
253
- ])
254
- ], 64);
255
- };
256
- }
257
- });
258
- export {
259
- Te as default
260
- };
@@ -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
- };