@feedmepos/mf-connect 0.1.8-prod → 0.1.10-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/dist/{Analytic-C5DiiAlc.js → Analytic-CpSbitWV.js} +24 -22
- package/dist/{App-B3pHa-zu.js → App-BPT8XzjX.js} +56 -51
- package/dist/{Broadcast-BbKiYeZC.js → Broadcast-CJHpiQeN.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CusmGpDT.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DUPqWdIm.js} +7 -8
- package/dist/Card-Bvn36zqZ.js +895 -0
- package/dist/{Collections-DvZEXknp.js → Collections-Bq6OxsJC.js} +24 -29
- package/dist/{Credit-CqjSUWeG.js → Credit-Dno_g7dW.js} +8 -8
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bzd-9d8d.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-cGbwORhw.js} +649 -1284
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C73wNCE4.js → EffectSheet.vue_vue_type_style_index_0_lang-Ho7zwlbb.js} +20 -20
- package/dist/{Experience-BmCrc4-K.js → Experience-BC1qSIGO.js} +8 -8
- package/dist/{Game-CU4AHASb.js → Game-C_CKGMBW.js} +8 -8
- package/dist/Index-BXFaWTfw.js +255 -0
- package/dist/{Marketing-PJO3M5Xy.js → Marketing-Ni0WAie5.js} +5 -5
- package/dist/{Member-DChbb26Z.js → Member-djnisrK1.js} +4 -4
- package/dist/{MemberList-Ckvxgme7.js → MemberList-CclU-3B7.js} +194 -191
- package/dist/{MemberTransactions-KNlKr1DE.js → MemberTransactions-DVVsv3Ux.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CDX1qdOw.js → MessageInput.vue_vue_type_script_setup_true_lang-khyDg1m4.js} +2 -2
- package/dist/Mission-Z5somdo_.js +273 -0
- package/dist/Overview-BvMVz3lQ.js +1074 -0
- package/dist/{Point-B-Ot-ZXU.js → Point-DdPukiTg.js} +8 -8
- package/dist/{Promotion-CKEfuwo0.js → Promotion-DCqdIwjG.js} +9 -9
- package/dist/Record-CvMxXm1B.js +337 -0
- package/dist/Reward-CiJHGXfQ.js +441 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CrGCBRmH.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-tnT6i0Jq.js +1638 -0
- package/dist/{Segment-B8JKn5_y.js → Segment-CQb3j-o0.js} +22 -21
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-B7YqIU5D.js +181 -0
- package/dist/{Setting-BcWDJ-63.js → Setting-91cK3ssU.js} +31 -31
- package/dist/Store-B-uldUKt.js +1744 -0
- package/dist/{StoreRewards-DyfFecSH.js → StoreRewards-dDNeFlA9.js} +15 -14
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BVb1X0aq.js +1132 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CHrZ7pit.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Ds0WxGxr.js} +1 -1
- package/dist/{Tier-iKOv9e2Y.js → Tier-_jMaLj3u.js} +185 -185
- package/dist/{Title-BRWnLlHd.js → Title-By7o67aT.js} +20 -20
- package/dist/{Transaction-BMnxATxc.js → Transaction-BLpEgeI2.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Bf_nO9zH.js +130 -0
- package/dist/{Voucher-B_IwtXLW.js → Voucher-CG5tfibn.js} +11 -11
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DpQUoXyQ.js +419 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-YwGR2En3.js +56 -0
- package/dist/{app-Bs8TZeMP.js → app-DDmTqTb7.js} +1 -1
- package/dist/{app-CLPpu6jA.js → app-vCqTQIeC.js} +430 -276
- package/dist/app.js +1 -1
- package/dist/{business-Dg5T3krT.js → business-Cz78KGF2.js} +1 -1
- package/dist/{campaign-BMLeXfnZ.js → campaign-BBd4o7F_.js} +2 -2
- package/dist/campaign.enum-CIhi0b-m.js +20 -0
- package/dist/campaign.fn-5silF1DK.js +758 -0
- package/dist/collectible.enum-cMIQ6ogq.js +19 -0
- package/dist/{collection.fn-D4QJRMAS.js → collection.fn-BGc7Qeli.js} +2 -2
- package/dist/dto-i04OPJfW.js +2018 -0
- package/dist/{effect-BT6zDeUe.js → effect-D8UzkYRg.js} +1 -1
- package/dist/{email-addresses-DeUE8GFC.js → email-addresses-u05o35hN.js} +1 -1
- package/dist/{export-DWzBynN8.js → export-BEXuPYEd.js} +3 -3
- package/dist/{helper-Cs4YpYv9.js → helper-RptRJGv6.js} +1 -1
- package/dist/{index-aFNPEkUz.js → index-B8s-gucK.js} +13 -1
- package/dist/{index-B3GqF_vh.js → index-BjHZUhiH.js} +1 -1
- package/dist/{index-BUXB-qmB.js → index-Bpu2DYUc.js} +1348 -1342
- package/dist/{index-n-_5f43h.js → index-C6-rCMhD.js} +3 -3
- package/dist/{index-CjF0scjl.js → index-Cq_ZIbRm.js} +174 -168
- package/dist/{index-CiwzD983.js → index-DFAnoAe9.js} +1 -1
- package/dist/index-DbyJ6Nyn.js +54 -0
- package/dist/{index-BXs-tqST.js → index-Dt6K2eG8.js} +1 -1
- package/dist/{index-xCMvgFRa.js → index-DwzoqCt8.js} +989 -783
- package/dist/index-UfL5qRzR.js +1049 -0
- package/dist/index-g8EbRVnr.js +32 -0
- package/dist/{index-DfhJOhMY.js → index-hEE_ntHd.js} +1 -1
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-cme_1dHU.js → index.esm2017-BSzW_yaL.js} +1 -1
- package/dist/{loading-zw44FQ6v.js → loading-DjEdwdnj.js} +156 -153
- package/dist/{membership-Bg77E5Sx.js → membership-BL9Xs8lD.js} +52 -44
- package/dist/{money-BepQPzrc.js → money-D7lq0cx-.js} +1 -1
- package/dist/{number-BJ4XIfGj.js → number-BiDabTkI.js} +1 -1
- package/dist/objectid-CXf0jb1W.js +145 -0
- package/dist/reward-Cr8rbe5R.js +36 -0
- package/dist/{rule-builder-C1Jwhs7N.js → rule-builder-DPKFZ5UX.js} +1 -1
- package/dist/{rule-oDZ1Kic9.js → rule-vkYJij4h.js} +4 -3
- package/dist/{template-CSeRj8B2.js → template-Bep5Y5ch.js} +4 -4
- package/dist/trigger-fWhQ3bqv.js +144 -0
- package/dist/{usePagination-DUaGlE2s.js → usePagination-DSF5b4hM.js} +1 -1
- package/dist/user-9UiaP0xs.js +54 -0
- package/dist/{vue-i18n-4eZqYBzI.js → vue-i18n-BhiDOB1j.js} +112 -112
- package/dist/zod-Bg2FbC-D.js +90 -0
- package/package.json +2 -2
- package/dist/Card--Q4OMSRz.js +0 -824
- package/dist/Mission-B215NI_F.js +0 -261
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-C03bKqvg.js +0 -1804
- package/dist/Store-ada-EZLR.js +0 -1530
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Ra4nMKvT.js +0 -890
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-vsgeD3mK.js +0 -141
- package/dist/dto-CQy53qRe.js +0 -2770
- package/dist/index-CvJ_6M8U.js +0 -298
- package/dist/index-QAuJWbpX.js +0 -756
- package/dist/index-sGtk4oiO.js +0 -207
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
var ee = Object.defineProperty;
|
|
2
2
|
var oe = (f, r, d) => r in f ? ee(f, r, { enumerable: !0, configurable: !0, writable: !0, value: d }) : f[r] = d;
|
|
3
3
|
var z = (f, r, d) => oe(f, typeof r != "symbol" ? r + "" : r, d);
|
|
4
|
-
import { defineComponent as G, ref as p, computed as H, watch as O, resolveComponent as u, openBlock as y, createBlock as L, unref as e, isRef as K, withCtx as I, createElementVNode as b, createVNode as s, createElementBlock as
|
|
4
|
+
import { defineComponent as G, ref as p, computed as H, watch as O, resolveComponent as u, openBlock as y, createBlock as L, unref as e, isRef as K, withCtx as I, createElementVNode as b, createVNode as s, createElementBlock as R, Fragment as P, renderList as te, createCommentVNode as U, onMounted as ae, h as T } from "vue";
|
|
5
5
|
import { h as j } from "./moment-BWErdI6_.js";
|
|
6
6
|
import { components as le } from "@feedmepos/ui-library";
|
|
7
|
-
import { u as J, a as ne } from "./loading-
|
|
7
|
+
import { u as J, a as ne } from "./loading-DjEdwdnj.js";
|
|
8
8
|
import { J as se } from "./JsonViewer-v8_C7l5N.js";
|
|
9
9
|
import { u as re } from "./app-wDQR6dpb.js";
|
|
10
10
|
import { useRoute as Q, useRouter as ie } from "vue-router";
|
|
11
|
-
import { c as N } from "./index-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { c as N } from "./index-DFAnoAe9.js";
|
|
12
|
+
import { e as m } from "./index-vh86FiIQ.js";
|
|
13
|
+
import { u as Y, a as ue, _ as de, w as ce } from "./usePagination-DSF5b4hM.js";
|
|
14
|
+
import { g as me } from "./user-9UiaP0xs.js";
|
|
15
|
+
import { m as pe } from "./index-B8s-gucK.js";
|
|
15
16
|
import { o as fe } from "./objectId-dwaoBfJX.js";
|
|
16
17
|
const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), be = { class: "space-y-16" }, Ce = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ve = { class: "gap-16 grid grid-cols-2" }, he = { class: "flex items-center gap-8" }, ye = /* @__PURE__ */ G({
|
|
17
18
|
__name: "CreateCollectionSheet",
|
|
18
19
|
emits: ["success"],
|
|
19
20
|
setup(f, { expose: r, emit: d }) {
|
|
20
|
-
const { minor:
|
|
21
|
+
const { minor: w } = J, F = Q(), k = p(), _ = p(!1), E = d, g = p(!1);
|
|
21
22
|
function q(l) {
|
|
22
23
|
g.value = l, l && (a.value = {
|
|
23
24
|
quantity: 1,
|
|
@@ -68,7 +69,7 @@ const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
68
69
|
], C = p(B[0].value), c = p("bulk"), x = p(!1), D = H(() => F.params.id);
|
|
69
70
|
async function n(l) {
|
|
70
71
|
var o;
|
|
71
|
-
await ((o = k.value) == null ? void 0 : o.validateInputs()), _.value && await
|
|
72
|
+
await ((o = k.value) == null ? void 0 : o.validateInputs()), _.value && await w(
|
|
72
73
|
async () => {
|
|
73
74
|
await N.createCollectionByCampaignId(D.value, l), await E("success");
|
|
74
75
|
},
|
|
@@ -91,7 +92,7 @@ const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
91
92
|
l != o && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(l))));
|
|
92
93
|
}
|
|
93
94
|
), (l, o) => {
|
|
94
|
-
const v = u("FmRadio"), i = u("FmRadioGroup"), V = u("FmSwitch"), M = u("FmStepperField"),
|
|
95
|
+
const v = u("FmRadio"), i = u("FmRadioGroup"), V = u("FmSwitch"), M = u("FmStepperField"), S = u("FmSelect"), h = u("FmTextField"), W = u("FmTextarea"), X = u("FmForm"), $ = u("FmButton"), Z = u("FmSideSheet");
|
|
95
96
|
return y(), L(Z, {
|
|
96
97
|
"max-width": 560,
|
|
97
98
|
"dismiss-away": !0,
|
|
@@ -135,7 +136,7 @@ const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
135
136
|
inline: !1
|
|
136
137
|
}, {
|
|
137
138
|
default: I(() => [
|
|
138
|
-
(y(), P
|
|
139
|
+
(y(), R(P, null, te(A, (t) => s(v, {
|
|
139
140
|
key: t.value,
|
|
140
141
|
value: t.value,
|
|
141
142
|
label: t.label,
|
|
@@ -147,7 +148,7 @@ const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
147
148
|
]),
|
|
148
149
|
b("div", be, [
|
|
149
150
|
Ce,
|
|
150
|
-
e(c) === "bulk" ? (y(), P
|
|
151
|
+
e(c) === "bulk" ? (y(), R(P, { key: 0 }, [
|
|
151
152
|
s(V, {
|
|
152
153
|
"model-value": e(x),
|
|
153
154
|
"label-placement": "right",
|
|
@@ -156,7 +157,7 @@ const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
156
157
|
required: !0,
|
|
157
158
|
"onUpdate:modelValue": o[1] || (o[1] = () => x.value = !e(x))
|
|
158
159
|
}, null, 8, ["model-value"]),
|
|
159
|
-
e(x) ? (y(), P
|
|
160
|
+
e(x) ? (y(), R(P, { key: 0 }, [
|
|
160
161
|
s(M, {
|
|
161
162
|
modelValue: e(a).codeConfig.length,
|
|
162
163
|
"onUpdate:modelValue": o[2] || (o[2] = (t) => e(a).codeConfig.length = t),
|
|
@@ -169,7 +170,7 @@ const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
169
170
|
],
|
|
170
171
|
required: !0
|
|
171
172
|
}, null, 8, ["modelValue", "rules"]),
|
|
172
|
-
s(
|
|
173
|
+
s(S, {
|
|
173
174
|
label: "Charset",
|
|
174
175
|
"model-value": e(C),
|
|
175
176
|
items: B,
|
|
@@ -246,16 +247,10 @@ class xe {
|
|
|
246
247
|
return Y.book_append_sheet(r, d, "Collection"), r;
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
|
-
const
|
|
250
|
-
sortBy: "_id",
|
|
251
|
-
descending: !1,
|
|
252
|
-
rowsPerPage: 1e3,
|
|
253
|
-
page: 1,
|
|
254
|
-
rowsNumber: 0
|
|
255
|
-
}, Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, we = { class: "flex items-center justify-end py-4 xs:hidden" }, De = /* @__PURE__ */ G({
|
|
250
|
+
const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex items-center justify-end py-4 xs:hidden" }, Me = /* @__PURE__ */ G({
|
|
256
251
|
__name: "Collections",
|
|
257
252
|
setup(f) {
|
|
258
|
-
const r = ie(), d = Q(),
|
|
253
|
+
const r = ie(), d = Q(), w = p(), F = H(() => d.params.id), k = p(!1), { custom: _ } = J, E = [
|
|
259
254
|
{
|
|
260
255
|
header: "ID/Code",
|
|
261
256
|
accessorKey: "_id",
|
|
@@ -323,7 +318,7 @@ const m = {
|
|
|
323
318
|
}, { tableMeta: a, rowData: A, onSort: B, debouncedFetchData: C, onSearch: c } = ue(q(F.value));
|
|
324
319
|
async function x() {
|
|
325
320
|
var n;
|
|
326
|
-
await C(), (n =
|
|
321
|
+
await C(), (n = w.value) == null || n.showSheet(!1);
|
|
327
322
|
}
|
|
328
323
|
async function D() {
|
|
329
324
|
k.value || _(
|
|
@@ -346,9 +341,9 @@ const m = {
|
|
|
346
341
|
F.value,
|
|
347
342
|
V
|
|
348
343
|
);
|
|
349
|
-
for await (const
|
|
344
|
+
for await (const S of M.resources) {
|
|
350
345
|
const h = {
|
|
351
|
-
Id: (
|
|
346
|
+
Id: (S == null ? void 0 : S.code) || ((v = S._id) == null ? void 0 : v.toString()) || ""
|
|
352
347
|
};
|
|
353
348
|
n.addRecord(h);
|
|
354
349
|
}
|
|
@@ -373,7 +368,7 @@ const m = {
|
|
|
373
368
|
await C();
|
|
374
369
|
}), (n, l) => {
|
|
375
370
|
const o = u("FmPageHead"), v = u("FmSearch");
|
|
376
|
-
return y(), P
|
|
371
|
+
return y(), R(P, null, [
|
|
377
372
|
s(o, {
|
|
378
373
|
title: "Collections",
|
|
379
374
|
"back-button": !0,
|
|
@@ -388,7 +383,7 @@ const m = {
|
|
|
388
383
|
"onClick:back": l[0] || (l[0] = (i) => e(r).back()),
|
|
389
384
|
"onClick:action": l[1] || (l[1] = (i) => {
|
|
390
385
|
var V;
|
|
391
|
-
i === "create" && ((V = e(
|
|
386
|
+
i === "create" && ((V = e(w)) == null || V.showSheet(!0)), i === "export" && D();
|
|
392
387
|
})
|
|
393
388
|
}),
|
|
394
389
|
b("div", Ve, [
|
|
@@ -402,7 +397,7 @@ const m = {
|
|
|
402
397
|
placeholder: "Search",
|
|
403
398
|
collapsible: ""
|
|
404
399
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
405
|
-
b("div",
|
|
400
|
+
b("div", Se, [
|
|
406
401
|
s(v, {
|
|
407
402
|
modelValue: e(a).searchValue,
|
|
408
403
|
"onUpdate:modelValue": [
|
|
@@ -427,7 +422,7 @@ const m = {
|
|
|
427
422
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
428
423
|
s(ye, {
|
|
429
424
|
ref_key: "sheetRef",
|
|
430
|
-
ref:
|
|
425
|
+
ref: w,
|
|
431
426
|
onSuccess: x
|
|
432
427
|
}, null, 512)
|
|
433
428
|
])
|
|
@@ -436,5 +431,5 @@ const m = {
|
|
|
436
431
|
}
|
|
437
432
|
});
|
|
438
433
|
export {
|
|
439
|
-
|
|
434
|
+
Me as default
|
|
440
435
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as N, ref as S, computed as j, h as M, onMounted as A, resolveComponent as i, openBlock as l, createElementBlock as y, Fragment as h, createVNode as c, unref as t, createElementVNode as n, withCtx as C, renderList as H, createBlock as v, resolveDynamicComponent as q, toDisplayString as g, createCommentVNode as z } from "vue";
|
|
2
2
|
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as J, components as O } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Q, u as W } from "./loading-
|
|
5
|
-
import { u as X } from "./business-
|
|
6
|
-
import { u as Y } from "./campaign-
|
|
7
|
-
import { g as V, a as L } from "./dto-
|
|
8
|
-
import { u as Z } from "./vue-i18n-
|
|
4
|
+
import { p as Q, u as W } from "./loading-DjEdwdnj.js";
|
|
5
|
+
import { u as X } from "./business-Cz78KGF2.js";
|
|
6
|
+
import { u as Y } from "./campaign-BBd4o7F_.js";
|
|
7
|
+
import { g as V, a as L } from "./dto-i04OPJfW.js";
|
|
8
|
+
import { u as Z } from "./vue-i18n-BhiDOB1j.js";
|
|
9
9
|
import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
-
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { u as te } from "./template-
|
|
12
|
-
import { c as _ } from "./index-
|
|
10
|
+
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-cGbwORhw.js";
|
|
11
|
+
import { u as te } from "./template-Bep5Y5ch.js";
|
|
12
|
+
import { c as _ } from "./index-DFAnoAe9.js";
|
|
13
13
|
const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { key: 0 }, fe = /* @__PURE__ */ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), ye = [
|
|
14
14
|
fe
|
|
15
15
|
], ge = /* @__PURE__ */ n("img", {
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineComponent as I, ref as P, resolveComponent as u, openBlock as t, createBlock as y, unref as h, withCtx as d, renderSlot as V, createElementBlock as s, toDisplayString as i, createCommentVNode as S, createVNode as x, normalizeClass as g, createElementVNode as B, Fragment as N, renderList as j } from "vue";
|
|
2
|
+
const q = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "fm-typo-en-body-lg-400 mb-4"
|
|
5
|
+
}, $ = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "fm-typo-en-body-lg-400"
|
|
8
|
+
}, E = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, O = /* @__PURE__ */ I({
|
|
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: k }) {
|
|
35
|
+
const r = k, m = P(!1);
|
|
36
|
+
return (v, b) => {
|
|
37
|
+
const F = u("FmIcon"), C = u("FmField"), p = u("FmMenuItem"), w = u("FmPopover");
|
|
38
|
+
return t(), y(w, {
|
|
39
|
+
"show-popover": h(m),
|
|
40
|
+
onPopoverChanged: b[0] || (b[0] = (l) => m.value = l),
|
|
41
|
+
"z-index": e.zIndex
|
|
42
|
+
}, {
|
|
43
|
+
"popover-button": d(() => [
|
|
44
|
+
V(v.$slots, "popover-button", {}, () => [
|
|
45
|
+
e.label ? (t(), s("div", q, i(e.label), 1)) : S("", !0),
|
|
46
|
+
x(C, null, {
|
|
47
|
+
append: d(() => [
|
|
48
|
+
V(v.$slots, "append"),
|
|
49
|
+
x(F, {
|
|
50
|
+
name: h(m) ? "expand_less" : "expand_more",
|
|
51
|
+
size: "md",
|
|
52
|
+
color: "black"
|
|
53
|
+
}, null, 8, ["name"])
|
|
54
|
+
]),
|
|
55
|
+
default: d(() => {
|
|
56
|
+
var l;
|
|
57
|
+
return [
|
|
58
|
+
e.multiselect ? (t(), s("div", $, i(e.items.filter((o) => {
|
|
59
|
+
var a;
|
|
60
|
+
return (a = e.modelValue) == null ? void 0 : a.includes(o.value);
|
|
61
|
+
}).map((o) => o.label).join(", ")), 1)) : (t(), s("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: g(["fm-typo-en-body-lg-400", {
|
|
64
|
+
"text-fm-color-typo-secondary": !e.items.find(
|
|
65
|
+
(o) => o.value == e.modelValue
|
|
66
|
+
)
|
|
67
|
+
}])
|
|
68
|
+
}, i(((l = e.items.find((o) => o.value == e.modelValue)) == null ? void 0 : l.label) || e.placeholder), 3))
|
|
69
|
+
];
|
|
70
|
+
}),
|
|
71
|
+
_: 3
|
|
72
|
+
})
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
default: d(() => [
|
|
76
|
+
B("div", E, [
|
|
77
|
+
(t(!0), s(N, null, j(e.items, (l) => {
|
|
78
|
+
var o, a;
|
|
79
|
+
return t(), y(p, {
|
|
80
|
+
class: g(`${e.multiselect ? (o = e.modelValue) != null && o.some((n) => n == l.value) ? "bg-fm-color-system-warning-100" : "" : e.modelValue == l.value}`),
|
|
81
|
+
"has-checkbox": e.multiselect,
|
|
82
|
+
key: l.value,
|
|
83
|
+
"model-value": e.multiselect ? (a = e.modelValue) == null ? void 0 : a.some((n) => n == l.value) : e.modelValue == l.value,
|
|
84
|
+
label: l.label,
|
|
85
|
+
onClick: (n) => {
|
|
86
|
+
var f;
|
|
87
|
+
if (n.stopPropagation(), !e.multiselect)
|
|
88
|
+
m.value = !1, r("update:model-value", l.value);
|
|
89
|
+
else {
|
|
90
|
+
const z = (f = e.modelValue) == null ? void 0 : f.some((c) => c == l.value);
|
|
91
|
+
r(
|
|
92
|
+
"update:model-value",
|
|
93
|
+
z ? (e.modelValue ?? []).filter((c) => c !== l.value) : [...e.modelValue ?? [], l.value]
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
|
|
98
|
+
}), 128))
|
|
99
|
+
])
|
|
100
|
+
]),
|
|
101
|
+
_: 3
|
|
102
|
+
}, 8, ["show-popover", "z-index"]);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export {
|
|
107
|
+
O as _
|
|
108
|
+
};
|