@feedmepos/mf-connect 0.1.98-beta.4 → 0.1.98-beta.40

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 (135) hide show
  1. package/package.json +3 -3
  2. package/dist/App-BGv_JihW.js +0 -4642
  3. package/dist/AuditLogs-53rnjCmD.js +0 -2013
  4. package/dist/Bin-B0Q_WpuY.js +0 -166
  5. package/dist/Broadcast-PiJE1Syl.js +0 -266
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dz2KsBZl.js +0 -120
  7. package/dist/Card-DlqMu3Sl.js +0 -910
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-BWcBlDDR.js +0 -540
  10. package/dist/Credit-CMfcuj5n.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-DCvH0lGA.js +0 -3377
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-B_FyeWq4.js +0 -351
  15. package/dist/Experience-DacFmPYy.js +0 -259
  16. package/dist/FileSaver.min-CMZKiGkX.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-DXKnGuhR.js +0 -330
  20. package/dist/Grab-DaBL5y3H.js +0 -300
  21. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BaY_nQio.js +0 -145
  22. package/dist/Index-2UrjF35w.js +0 -259
  23. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  24. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BuVBZsCN.js +0 -48
  25. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-6wUxYqWe.js +0 -18737
  26. package/dist/LoyaltyDashboard-DIArPp71.js +0 -1082
  27. package/dist/MainLayout-BjvTxTPG.js +0 -41
  28. package/dist/Marketing-DEp--hFd.js +0 -235
  29. package/dist/MarketingMaterialEdit-BHL8Ptsu.js +0 -1035
  30. package/dist/Member-BU1YxoEV.js +0 -280
  31. package/dist/MemberList-zjvJBYf0.js +0 -1601
  32. package/dist/MemberOverview-wL_ailso.js +0 -58
  33. package/dist/MemberTransactions-BvyLV69V.js +0 -45
  34. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-_YOM1SlS.js +0 -60802
  35. package/dist/Mission-BNYk_aPM.js +0 -334
  36. package/dist/Overview-BToUlbsH.js +0 -1079
  37. package/dist/Point-B-L2326L.js +0 -262
  38. package/dist/Promotion-sMKGkL4w.js +0 -397
  39. package/dist/Queue-D3vUkKN9.js +0 -260
  40. package/dist/Record-BViEbZZ8.js +0 -342
  41. package/dist/Review-CMBAk-Qu.js +0 -1067
  42. package/dist/ReviewFacebookCallback-BCJTFy3b.js +0 -243
  43. package/dist/ReviewGoogleCallback-DKUG075r.js +0 -208
  44. package/dist/Reward-CZsvsYW_.js +0 -442
  45. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BASPLoRa.js +0 -149
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B90meAnV.js +0 -1911
  47. package/dist/Segment-CN8NEg8w.js +0 -1014
  48. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BGyYQST4.js +0 -181
  49. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BxW-Kc6t.js +0 -188
  50. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-C9dwcEr5.js +0 -226
  51. package/dist/Setting-DLPbZW11.js +0 -2047
  52. package/dist/SettingAdvertisements-BIq8gS5g.js +0 -264
  53. package/dist/Store-DNB3gUIR.js +0 -1996
  54. package/dist/StoreRewards-BoEjVFk6.js +0 -540
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bv9ABH1K.js +0 -1130
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DNHgSfIg.js +0 -7007
  57. package/dist/Tier-kQ6X9h-t.js +0 -969
  58. package/dist/Title-XosVAF2Y.js +0 -566
  59. package/dist/Transaction-CO6oLPKR.js +0 -39
  60. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-McMR2Y7Y.js +0 -130
  61. package/dist/Voucher-CogaCxx2.js +0 -421
  62. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjHwHFBq.js +0 -421
  63. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-Dor9klZ8.js +0 -56
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-C9UPXbDs.js +0 -59737
  66. package/dist/app-wDQR6dpb.js +0 -39
  67. package/dist/app.js +0 -7
  68. package/dist/business-CYpW6-Ls.js +0 -82
  69. package/dist/campaign-BtLa7KeF.js +0 -277
  70. package/dist/campaign-CpzFl8Vr.js +0 -4
  71. package/dist/campaign-CtoHyXVT.js +0 -219
  72. package/dist/campaign.enum-DiLhS5il.js +0 -26
  73. package/dist/campaign.fn-CLB9gBHo.js +0 -776
  74. package/dist/collectible.enum-CmwWcfBh.js +0 -19
  75. package/dist/duplicateCampaign-DGhOBd5l.js +0 -51
  76. package/dist/effect-CY5Y6sxy.js +0 -89
  77. package/dist/email-addresses-BEnOHWj_.js +0 -705
  78. package/dist/export-BgYu7SCd.js +0 -97
  79. package/dist/feedme.ico +0 -0
  80. package/dist/helper-DTDgoyEh.js +0 -86
  81. package/dist/index-B4IAURA_.js +0 -3684
  82. package/dist/index-BZVhi3ZG.js +0 -28900
  83. package/dist/index-C8ehLvXG.js +0 -31
  84. package/dist/index-CDk0Itu1.js +0 -32
  85. package/dist/index-CLZnH782.js +0 -54
  86. package/dist/index-CNKP1_IW.js +0 -30289
  87. package/dist/index-CP-7qATP.js +0 -67
  88. package/dist/index-Ck3PeOQ5.js +0 -1157
  89. package/dist/index-CuvNtC_M.js +0 -61
  90. package/dist/index-DntoqWT_.js +0 -85
  91. package/dist/index-DtyWsBgg.js +0 -3
  92. package/dist/index-P8Qh2yIP.js +0 -52
  93. package/dist/index-goRooQn5.js +0 -2802
  94. package/dist/index-kS20rM5m.js +0 -8910
  95. package/dist/index-vh86FiIQ.js +0 -10
  96. package/dist/index-zF0gIg9H.js +0 -151
  97. package/dist/index.esm2017-C79fd6cz.js +0 -3069
  98. package/dist/loading-Dfr_97Ri.js +0 -72
  99. package/dist/lodash-BX2mJOxF.js +0 -3678
  100. package/dist/membership-ncNOUJwj.js +0 -255
  101. package/dist/moment-D7p2TMB-.js +0 -2583
  102. package/dist/money-vEtTzt04.js +0 -15
  103. package/dist/number-BjgTlMsp.js +0 -12
  104. package/dist/object-BYyQ0PZp.js +0 -18
  105. package/dist/objectId-dwaoBfJX.js +0 -7
  106. package/dist/objectid-C9DiLwge.js +0 -145
  107. package/dist/plugins-BVGqEmE1.js +0 -1788
  108. package/dist/reward-BGTLhhzT.js +0 -36
  109. package/dist/rule-BB2VX3Gy.js +0 -1969
  110. package/dist/string-Gcy5IM_H.js +0 -32
  111. package/dist/style.css +0 -4
  112. package/dist/template-DLiHnpjK.js +0 -188
  113. package/dist/tier-BJDhpH6X.js +0 -4
  114. package/dist/tiers/tier=1.png +0 -0
  115. package/dist/tiers/tier=2.png +0 -0
  116. package/dist/tiers/tier=3.png +0 -0
  117. package/dist/tiers/tier=4.png +0 -0
  118. package/dist/titles/type=diamond.png +0 -0
  119. package/dist/titles/type=drinks.png +0 -0
  120. package/dist/titles/type=food.png +0 -0
  121. package/dist/titles/type=heart.png +0 -0
  122. package/dist/titles/type=medal.png +0 -0
  123. package/dist/titles/type=spend.png +0 -0
  124. package/dist/titles/type=thank-you.png +0 -0
  125. package/dist/titles/type=thumbs-up.png +0 -0
  126. package/dist/titles/type=years.png +0 -0
  127. package/dist/trigger-DrKnfSoi.js +0 -213
  128. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  129. package/dist/type_drinks-D6jnpvwV.js +0 -4
  130. package/dist/useMarketingMaterialActions-B6zaDbNE.js +0 -107
  131. package/dist/usePagination-Dgd-onzU.js +0 -220
  132. package/dist/user-BcDUmNrZ.js +0 -55
  133. package/dist/vue-i18n-DNBGmwox.js +0 -2365
  134. package/dist/xlsx-BX-U0_Au.js +0 -15491
  135. package/dist/zod-Mx51GBPY.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-BVGqEmE1.js";
5
- import { u as Y } from "./loading-Dfr_97Ri.js";
6
- import { u as Z } from "./business-CYpW6-Ls.js";
7
- import { u as ee, c as f } from "./campaign-CtoHyXVT.js";
8
- import { a as te, b as B, c as I } from "./campaign-BtLa7KeF.js";
9
- import { c as oe, p as ae } from "./duplicateCampaign-DGhOBd5l.js";
10
- import { u as ne } from "./vue-i18n-DNBGmwox.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-DCvH0lGA.js";
13
- import { u as ie } from "./template-DLiHnpjK.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
- };