@feedmepos/mf-connect 0.1.57-prod → 0.1.58-prod
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.
- package/package.json +1 -1
- package/dist/Analytic-BqvhYgCU.js +0 -427
- package/dist/App-Dtl_D0cH.js +0 -4630
- package/dist/Bin-y4ikpgPS.js +0 -166
- package/dist/Broadcast-DSROFwe4.js +0 -233
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CcsG6vOP.js +0 -121
- package/dist/Card-BiSEPsZb.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-CX-nN7Xj.js +0 -458
- package/dist/Credit-IiV9b4cB.js +0 -228
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CoGes8YL.js +0 -2194
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-sGh_SMCH.js +0 -348
- package/dist/Experience-Cf-EMhKy.js +0 -229
- package/dist/FileSaver.min-NlMItPOc.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-C8mfJn6W.js +0 -284
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
- package/dist/Index-DkvO1AoT.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-xJTIo3RF.js +0 -319
- package/dist/Member-DZkYoKW8.js +0 -279
- package/dist/MemberList-CAYEJnf3.js +0 -1607
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-Dc5aAQ69.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BSvlPzw8.js +0 -60553
- package/dist/Mission-C_NbNWZw.js +0 -302
- package/dist/Overview-DyxEwEfe.js +0 -1079
- package/dist/Point-CsEWk61V.js +0 -232
- package/dist/Promotion--pWgy9Dx.js +0 -289
- package/dist/Queue-k3qAQR7B.js +0 -260
- package/dist/Record-D5F5JyVA.js +0 -341
- package/dist/Reward-3FSrq5mX.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-Dzj7a7UY.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DRl_Gjfx.js +0 -1763
- package/dist/Segment-BWJn6ODR.js +0 -882
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BKsV_zcr.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3efGNC_.js +0 -188
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cj7c2V3h.js +0 -147
- package/dist/Setting-UiTXazZV.js +0 -1936
- package/dist/Store-BrvmHPCX.js +0 -1842
- package/dist/StoreRewards-D_7fr-Ef.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BXy0L5AH.js +0 -995
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DumcDlBs.js +0 -139
- package/dist/Tier-C4wvx8F7.js +0 -895
- package/dist/Title-CPHT85Uj.js +0 -566
- package/dist/Transaction-6Ig2W00P.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DknFkIJh.js +0 -130
- package/dist/Voucher-Bbl-7gZ5.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-xsswRZG8.js +0 -419
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-B5J6Hd8G.js +0 -56
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-BDVZwARN.js +0 -7057
- package/dist/app-CAEhNFRG.js +0 -57962
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -6
- package/dist/business-6C_ol5wd.js +0 -82
- package/dist/campaign-B13G6pZ3.js +0 -1810
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign-DrQp6qBu.js +0 -94
- package/dist/campaign.enum-DnTrlaNC.js +0 -20
- package/dist/campaign.fn-BZse90_k.js +0 -758
- package/dist/collectible.enum-633Me0yR.js +0 -19
- package/dist/collection.fn-C96855j5.js +0 -26
- package/dist/dto-2bMujqmZ.js +0 -216
- package/dist/effect-C7lAJwKh.js +0 -78
- package/dist/email-addresses-3ayN-9jv.js +0 -705
- package/dist/export-BNbDV7SC.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/helper-CsfZ__dQ.js +0 -71
- package/dist/index-BLSAz0gK.js +0 -32
- package/dist/index-BY9I3Cer.js +0 -3
- package/dist/index-BdnRNcVO.js +0 -146
- package/dist/index-BmyNfpfG.js +0 -30076
- package/dist/index-CSBRkhKy.js +0 -38
- package/dist/index-Cf_fcvoS.js +0 -54
- package/dist/index-CqrO13uj.js +0 -76
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-D4kdSzs9.js +0 -3070
- package/dist/index-DcJq7tl4.js +0 -32269
- package/dist/index-DdjSIwSL.js +0 -44
- package/dist/index-LKr2k8J2.js +0 -8861
- package/dist/index-XAxwm-1v.js +0 -2130
- package/dist/index-b82LrGSB.js +0 -121
- package/dist/index-tcAb0W5F.js +0 -31
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-BklqmujQ.js +0 -3069
- package/dist/loading-OXARGiqO.js +0 -71
- package/dist/lodash-B5I3zXaY.js +0 -3678
- package/dist/membership-D1Vb1rUo.js +0 -235
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-BpyAytEq.js +0 -15
- package/dist/number-C-PtPOOj.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-BrLIKTmQ.js +0 -145
- package/dist/plugins-CjPWhNb2.js +0 -208
- package/dist/reward-DonQFzvW.js +0 -36
- package/dist/rule-AtNPBnbE.js +0 -1951
- package/dist/rule-builder-C0Q-3g6T.js +0 -102
- package/dist/style.css +0 -4
- package/dist/template-CNjE7eht.js +0 -190
- package/dist/tier-BJDhpH6X.js +0 -4
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-CYbdI3q2.js +0 -1151
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/trigger-Bdi6n80h.js +0 -144
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/usePagination-Ds-cuHop.js +0 -223
- package/dist/user-BwGm78n8.js +0 -54
- package/dist/vue-i18n-D1nTd69a.js +0 -2365
- package/dist/xlsx-DF5iW3wh.js +0 -15491
- package/dist/zod-Bg2FbC-D.js +0 -90
package/dist/Credit-IiV9b4cB.js
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as L, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as y, Fragment as h, createVNode as i, unref as t, createElementVNode as n, withCtx as C, renderList as q, createBlock as w, resolveDynamicComponent as O, toDisplayString as g, 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-CjPWhNb2.js";
|
|
5
|
-
import { u as X } from "./loading-OXARGiqO.js";
|
|
6
|
-
import { u as Y } from "./business-6C_ol5wd.js";
|
|
7
|
-
import { u as Z } from "./campaign-DrQp6qBu.js";
|
|
8
|
-
import { g as ee, a as S, b as V } from "./campaign-B13G6pZ3.js";
|
|
9
|
-
import { u as oe } from "./vue-i18n-D1nTd69a.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-CoGes8YL.js";
|
|
12
|
-
import { u as ne } from "./template-CNjE7eht.js";
|
|
13
|
-
import { c as _ } from "./index-b82LrGSB.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" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Ie = /* @__PURE__ */ N({
|
|
15
|
-
__name: "Credit",
|
|
16
|
-
setup(ge) {
|
|
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()), R = Y(), u = Z(), { global: D, minor: v } = X, s = L({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: []
|
|
27
|
-
});
|
|
28
|
-
function T(e) {
|
|
29
|
-
const o = s.value.location;
|
|
30
|
-
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((l) => {
|
|
31
|
-
var c;
|
|
32
|
-
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
-
}) : e.targetLocation.includes(o);
|
|
34
|
-
}
|
|
35
|
-
const p = j(
|
|
36
|
-
() => u.campaigns.credit.filter((e) => T(e))
|
|
37
|
-
), E = [
|
|
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(), x(e.row.original);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
], b = L();
|
|
67
|
-
async function x(e) {
|
|
68
|
-
await W.remove(
|
|
69
|
-
r("connect.program.common.remove.confirm", { name: e.name })
|
|
70
|
-
) && await v(
|
|
71
|
-
async () => {
|
|
72
|
-
await _.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 (l) => {
|
|
84
|
-
await o(l);
|
|
85
|
-
});
|
|
86
|
-
async function o(l) {
|
|
87
|
-
var c;
|
|
88
|
-
(c = b.value) == null || c.showSheet(
|
|
89
|
-
!0,
|
|
90
|
-
"CREDIT",
|
|
91
|
-
e ? await _.readById(e._id) : void 0,
|
|
92
|
-
l
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async function K(e) {
|
|
97
|
-
await v(
|
|
98
|
-
async () => {
|
|
99
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.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 D(async () => {
|
|
109
|
-
await u.read("CREDIT");
|
|
110
|
-
});
|
|
111
|
-
}), (e, o) => {
|
|
112
|
-
const l = m("FmPageHead"), c = m("FmSearch"), $ = m("FmTable"), F = m("FmButton"), P = m("FmListItem"), U = m("FmList"), A = m("FmCard");
|
|
113
|
-
return d(), y(h, null, [
|
|
114
|
-
i(l, {
|
|
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(c, {
|
|
121
|
-
modelValue: t(s).searchKey,
|
|
122
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(s).searchKey = a),
|
|
123
|
-
class: "hidden xs: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(), y(h, { 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(R).locationOptions
|
|
138
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
139
|
-
]),
|
|
140
|
-
i(c, {
|
|
141
|
-
modelValue: t(s).searchKey,
|
|
142
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(s).searchKey = a),
|
|
143
|
-
class: "xs:hidden",
|
|
144
|
-
placeholder: "search",
|
|
145
|
-
collapsible: ""
|
|
146
|
-
}, null, 8, ["modelValue"])
|
|
147
|
-
]),
|
|
148
|
-
i($, {
|
|
149
|
-
class: "xs:hidden",
|
|
150
|
-
"row-data": t(p),
|
|
151
|
-
"column-defs": E,
|
|
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 flex-col mx-[-24px]" }, {
|
|
158
|
-
default: C(() => [
|
|
159
|
-
(d(!0), y(h, null, q(t(p).filter(
|
|
160
|
-
(a) => a.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
|
|
161
|
-
), (a) => (d(), w(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: C(() => [
|
|
167
|
-
n("div", ce, [
|
|
168
|
-
n("div", le, [
|
|
169
|
-
(d(), w(O(t(S)(a)))),
|
|
170
|
-
n("div", me, g(a.currentReceive ?? 0) + " used ", 1)
|
|
171
|
-
]),
|
|
172
|
-
n("div", de, [
|
|
173
|
-
n("div", ue, g(a.name), 1),
|
|
174
|
-
n("div", pe, g(t(V)(a)), 1)
|
|
175
|
-
]),
|
|
176
|
-
n("div", fe, " Credit received: " + g(a.currentReceive ?? 0), 1)
|
|
177
|
-
]),
|
|
178
|
-
i(F, {
|
|
179
|
-
icon: "delete",
|
|
180
|
-
"icon-color": "neutral-gray-400",
|
|
181
|
-
variant: "tertiary",
|
|
182
|
-
onClick: (k) => (k.stopPropagation(), x(a))
|
|
183
|
-
}, null, 8, ["onClick"])
|
|
184
|
-
]),
|
|
185
|
-
_: 2
|
|
186
|
-
}, 1032, ["onClick"]))), 128))
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
}),
|
|
190
|
-
t(p).length == 0 ? (d(), y("div", ye, [...o[6] || (o[6] = [
|
|
191
|
-
n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
|
|
192
|
-
])])) : z("", !0)
|
|
193
|
-
], 64)) : (d(), w(A, {
|
|
194
|
-
key: 1,
|
|
195
|
-
variant: "outlined",
|
|
196
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
197
|
-
}, {
|
|
198
|
-
default: C(() => [
|
|
199
|
-
o[7] || (o[7] = n("img", {
|
|
200
|
-
src: G,
|
|
201
|
-
class: "aspect-square w-[150px]"
|
|
202
|
-
}, null, -1)),
|
|
203
|
-
o[8] || (o[8] = n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
204
|
-
n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
|
|
205
|
-
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. ")
|
|
206
|
-
], -1)),
|
|
207
|
-
i(F, {
|
|
208
|
-
variant: "primary",
|
|
209
|
-
label: "Create credit program",
|
|
210
|
-
icon: "add",
|
|
211
|
-
onClick: o[5] || (o[5] = (a) => f())
|
|
212
|
-
})
|
|
213
|
-
]),
|
|
214
|
-
_: 1
|
|
215
|
-
})),
|
|
216
|
-
i(ae, {
|
|
217
|
-
ref_key: "sheetRef",
|
|
218
|
-
ref: b,
|
|
219
|
-
"onSubmit:modelValue": K
|
|
220
|
-
}, null, 512)
|
|
221
|
-
])
|
|
222
|
-
], 64);
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
export {
|
|
227
|
-
Ie as default
|
|
228
|
-
};
|
|
@@ -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
|
-
};
|