@feedmepos/mf-connect 0.1.38-beta.71 → 0.1.38-beta.72
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-BY0xqCru.js +0 -761
- package/dist/App-n6-XqhU7.js +0 -4638
- package/dist/AuditLogs-Dml3WjdH.js +0 -1991
- package/dist/Bin-DaPZyWm-.js +0 -166
- package/dist/Broadcast-hLmkBNne.js +0 -267
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BahnNhzD.js +0 -121
- package/dist/Card-C_Fm3E0s.js +0 -909
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-DAUsUa0c.js +0 -540
- package/dist/Credit-DklbckuQ.js +0 -261
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-vpnaCdLI.js +0 -3167
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js +0 -351
- package/dist/Experience-D3Ve8dCI.js +0 -260
- package/dist/FileSaver.min-Bg15HHd0.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-BJzRdZNg.js +0 -331
- package/dist/GenerateMaterial-pDWgptXt.js +0 -589
- package/dist/Grab-B0D8SpcD.js +0 -301
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js +0 -145
- package/dist/Index-ysSM8-pd.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-C7bEzQ4b.js +0 -18737
- package/dist/MainLayout-Kt1Wiz87.js +0 -41
- package/dist/Marketing-CFS6ff03.js +0 -145
- package/dist/MarketingMaterialEdit-BDYr5Rlw.js +0 -746
- package/dist/Member-Dgb3QBKF.js +0 -280
- package/dist/MemberList-CfcQUvN8.js +0 -1605
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-BVwGdpXo.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dj3h51yH.js +0 -60798
- package/dist/Mission-B9K8-Wrt.js +0 -335
- package/dist/Overview-DJgKxAvU.js +0 -1078
- package/dist/Point-lev1_Nit.js +0 -263
- package/dist/Promotion-De9e8yPj.js +0 -397
- package/dist/Queue-DH_F0Ekd.js +0 -259
- package/dist/Record-CH2AZqzF.js +0 -341
- package/dist/Reward-BUgOAjd4.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-KTaTLjjw.js +0 -149
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js +0 -1912
- package/dist/Segment-DL6O--Aw.js +0 -881
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIeyrheH.js +0 -188
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js +0 -147
- package/dist/Setting-DOA80XlJ.js +0 -1999
- package/dist/SettingAdvertisements-Dl0eisXq.js +0 -263
- package/dist/Store-fni1Xblz.js +0 -1995
- package/dist/StoreRewards-CLMO-kNi.js +0 -534
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js +0 -1034
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js +0 -7005
- package/dist/Tier-B0_DiVNv.js +0 -969
- package/dist/Title-twptCzpk.js +0 -567
- package/dist/Transaction-CTX5I6gO.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js +0 -130
- package/dist/Voucher-C7Kxmzjr.js +0 -422
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js +0 -421
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js +0 -56
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-D5GVWKxc.js +0 -59071
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -7
- package/dist/business-BvNsRlY4.js +0 -82
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign-DRErhSfb.js +0 -100
- package/dist/campaign-MN_o01w6.js +0 -253
- package/dist/campaign.enum-BtfwwLCf.js +0 -26
- package/dist/campaign.fn-BgSGxLPo.js +0 -776
- package/dist/collectible.enum-CV2tpD2C.js +0 -19
- package/dist/collection.fn-BYjqObg7.js +0 -26
- package/dist/dto-CyhnIGn-.js +0 -222
- package/dist/duplicateCampaign-jOZ1UznM.js +0 -51
- package/dist/effect-NKfquhhR.js +0 -89
- package/dist/email-addresses-EmFJeFmB.js +0 -705
- package/dist/export-B70Bp6s8.js +0 -96
- package/dist/feedme.ico +0 -0
- package/dist/helper-DiSstsUa.js +0 -86
- package/dist/index-5FmmWAib.js +0 -30289
- package/dist/index-B09KKPb4.js +0 -3419
- package/dist/index-BgP5ZHK6.js +0 -31
- package/dist/index-C46EHygk.js +0 -3
- package/dist/index-CD7Ji4Nw.js +0 -56
- package/dist/index-CHXlBh7-.js +0 -32
- package/dist/index-Cr2243n7.js +0 -2423
- package/dist/index-CrDg9PFk.js +0 -8912
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DK45XoFG.js +0 -54
- package/dist/index-Qg_bzaF2.js +0 -76
- package/dist/index-bAmlAkpk.js +0 -124
- package/dist/index-nTpkh7pU.js +0 -28897
- package/dist/index-tvZKdKVU.js +0 -36
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-B8fYlj6l.js +0 -3069
- package/dist/loading-DVr3dbZ1.js +0 -215
- package/dist/lodash-BNr1VEn2.js +0 -3678
- package/dist/membership-LEuPDIbe.js +0 -235
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-CogUwiv6.js +0 -15
- package/dist/number-C5wGUTN5.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-DbUENFHd.js +0 -145
- package/dist/plugins-BxKrsjEx.js +0 -1817
- package/dist/remy-D_Deb3ue.js +0 -13
- package/dist/reward-CM4Wx2zA.js +0 -36
- package/dist/rule-CMMr2GMg.js +0 -1969
- package/dist/rule-builder-D5QsmOxi.js +0 -102
- package/dist/style.css +0 -13
- package/dist/template-BDKqBasy.js +0 -188
- 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-DuaWQsQ2.js +0 -1154
- 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-IcyZcRow.js +0 -213
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/usePagination-D8OEDsCt.js +0 -223
- package/dist/user-u3blYzG2.js +0 -55
- package/dist/vue-i18n-DfD8ZY6j.js +0 -2365
- package/dist/xlsx-Bgf4_JHr.js +0 -15491
- package/dist/zod-9J33xiFS.js +0 -91
package/dist/Credit-DklbckuQ.js
DELETED
|
@@ -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-BxKrsjEx.js";
|
|
5
|
-
import { u as Y } from "./loading-DVr3dbZ1.js";
|
|
6
|
-
import { u as Z } from "./business-BvNsRlY4.js";
|
|
7
|
-
import { u as ee } from "./campaign-DRErhSfb.js";
|
|
8
|
-
import { a as te, b as B, c as I } from "./campaign-MN_o01w6.js";
|
|
9
|
-
import { c as oe, p as ae } from "./duplicateCampaign-jOZ1UznM.js";
|
|
10
|
-
import { u as ne } from "./vue-i18n-DfD8ZY6j.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-vpnaCdLI.js";
|
|
13
|
-
import { u as se } from "./template-BDKqBasy.js";
|
|
14
|
-
import { c as f } from "./index-bAmlAkpk.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
|
-
};
|