@feedmepos/mf-connect 0.1.7-prod → 0.1.8-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-BHUjWmWc.js → Analytic-C5DiiAlc.js} +8 -8
- package/dist/{App-DAdGpI5T.js → App-B3pHa-zu.js} +6 -6
- package/dist/{Broadcast-dSC_IWRT.js → Broadcast-BbKiYeZC.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BYLjv_MC.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CusmGpDT.js} +8 -8
- package/dist/{Card-CV--HQCf.js → Card--Q4OMSRz.js} +15 -15
- package/dist/{Collections-C5AwcMd2.js → Collections-DvZEXknp.js} +4 -4
- package/dist/{Credit-Mw2-ee1A.js → Credit-CqjSUWeG.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DBqGYQoP.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bzd-9d8d.js} +24 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DntdUZvW.js → EffectSheet.vue_vue_type_style_index_0_lang-C73wNCE4.js} +7 -7
- package/dist/{Experience-Cneieb2k.js → Experience-BmCrc4-K.js} +8 -8
- package/dist/{Game-XO-w3IYe.js → Game-CU4AHASb.js} +8 -8
- package/dist/{Marketing-WNiCzebg.js → Marketing-PJO3M5Xy.js} +5 -5
- package/dist/{Member-Cc2sLq_z.js → Member-DChbb26Z.js} +4 -4
- package/dist/{MemberList-C9iVHMNN.js → MemberList-Ckvxgme7.js} +14 -14
- package/dist/{MemberTransactions-D2_hoAkF.js → MemberTransactions-KNlKr1DE.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BG-RqK-c.js → MessageInput.vue_vue_type_script_setup_true_lang-CDX1qdOw.js} +2 -2
- package/dist/{Mission-TWktiQ4z.js → Mission-B215NI_F.js} +8 -8
- package/dist/{Point-eD94WtKZ.js → Point-B-Ot-ZXU.js} +8 -8
- package/dist/{Promotion-BVm2_c6F.js → Promotion-CKEfuwo0.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-vme-OSpF.js → RuleGroup.vue_vue_type_script_setup_true_lang-C03bKqvg.js} +422 -380
- package/dist/{Segment-DDf44nYK.js → Segment-B8JKn5_y.js} +13 -13
- package/dist/{Setting-DBhakAQ9.js → Setting-BcWDJ-63.js} +8 -8
- package/dist/{Store-BxIKHQxH.js → Store-ada-EZLR.js} +13 -13
- package/dist/{StoreRewards-GEg3D_yp.js → StoreRewards-DyfFecSH.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-0hsnAYU6.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Ra4nMKvT.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_QbjkVF.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CHrZ7pit.js} +1 -1
- package/dist/{Tier-bzoKkoGK.js → Tier-iKOv9e2Y.js} +319 -307
- package/dist/{Title-C_655234.js → Title-BRWnLlHd.js} +210 -194
- package/dist/{Transaction-CO65XSq0.js → Transaction-BMnxATxc.js} +2 -2
- package/dist/{Voucher-vMQztwvD.js → Voucher-B_IwtXLW.js} +11 -11
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C-EjkZIX.js → ZodTextField.vue_vue_type_script_setup_true_lang-vsgeD3mK.js} +1 -1
- package/dist/{app-Rhn3A8yy.js → app-Bs8TZeMP.js} +1 -1
- package/dist/{app-BvmH1YQF.js → app-CLPpu6jA.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{business-mSU6aNgB.js → business-Dg5T3krT.js} +1 -1
- package/dist/{campaign-CB8P_b1j.js → campaign-BMLeXfnZ.js} +2 -2
- package/dist/{collection.fn-xMtdil0c.js → collection.fn-D4QJRMAS.js} +2 -2
- package/dist/{dto-BebECM0V.js → dto-CQy53qRe.js} +51 -51
- package/dist/{effect-kjeWRBoV.js → effect-BT6zDeUe.js} +1 -1
- package/dist/{email-addresses-DS30WNct.js → email-addresses-DeUE8GFC.js} +1 -1
- package/dist/{export-Ckc3bUlY.js → export-DWzBynN8.js} +3 -3
- package/dist/{helper-CGV9vPCE.js → helper-Cs4YpYv9.js} +1 -1
- package/dist/{index-C0jOFgHh.js → index-B3GqF_vh.js} +1 -1
- package/dist/{index-CussemBD.js → index-BUXB-qmB.js} +1 -1
- package/dist/{index-BlLAyQkt.js → index-BXs-tqST.js} +1 -1
- package/dist/{index-CEzvwQKD.js → index-CiwzD983.js} +1 -1
- package/dist/{index-D3LzGPEW.js → index-CjF0scjl.js} +5 -5
- package/dist/{index-BAfqMFHL.js → index-CvJ_6M8U.js} +2 -2
- package/dist/{index-BCB-3g-3.js → index-DfhJOhMY.js} +1 -1
- package/dist/{index-CuDehNVP.js → index-QAuJWbpX.js} +5 -5
- package/dist/{index-Ct3rbI6P.js → index-aFNPEkUz.js} +1 -1
- package/dist/{index-D8-_XalW.js → index-n-_5f43h.js} +3 -3
- package/dist/{index-MzOjD6tJ.js → index-sGtk4oiO.js} +2 -2
- package/dist/{index-C_fJ9N2I.js → index-xCMvgFRa.js} +3 -3
- package/dist/{index.esm2017-C80DuMeI.js → index.esm2017-cme_1dHU.js} +1 -1
- package/dist/{loading-CjckWt50.js → loading-zw44FQ6v.js} +4 -4
- package/dist/{membership-DTNXBuUA.js → membership-Bg77E5Sx.js} +3 -3
- package/dist/{money-hcxWNxvM.js → money-BepQPzrc.js} +1 -1
- package/dist/{number-vCjVvxnh.js → number-BJ4XIfGj.js} +1 -1
- package/dist/{rule-builder-DNP54pwr.js → rule-builder-C1Jwhs7N.js} +1 -1
- package/dist/{rule-DTf5dUoT.js → rule-oDZ1Kic9.js} +3 -3
- package/dist/{template-DtZzRQzT.js → template-CSeRj8B2.js} +4 -4
- package/dist/{usePagination-BLFMf0Pz.js → usePagination-DUaGlE2s.js} +1 -1
- package/dist/{vue-i18n-I3aPtNi-.js → vue-i18n-4eZqYBzI.js} +327 -327
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as $, computed as _, resolveComponent as g, openBlock as n, createElementBlock as
|
|
2
|
-
import { c as pe, C as ce, d as ye, e as ve, f as fe } from "./index-
|
|
3
|
-
import { R as I, a as be } from "./rule-builder-
|
|
4
|
-
import { a as ge, R, S as ke, C as H, W as Ve, T as re, O as Ee } from "./rule-
|
|
5
|
-
import { p as
|
|
1
|
+
import { defineComponent as $, computed as _, resolveComponent as g, openBlock as n, createElementBlock as h, createElementVNode as U, createVNode as v, unref as e, createTextVNode as te, toDisplayString as W, withCtx as q, onMounted as K, createBlock as F, createCommentVNode as A, ref as P, Fragment as Y, renderList as N, normalizeClass as L, watch as ie, resolveDynamicComponent as ne, onBeforeMount as ue, isRef as me, createSlots as de } from "vue";
|
|
2
|
+
import { c as pe, C as ce, d as ye, e as ve, f as fe } from "./index-BUXB-qmB.js";
|
|
3
|
+
import { R as I, a as be } from "./rule-builder-C1Jwhs7N.js";
|
|
4
|
+
import { a as ge, R as C, S as ke, C as H, W as Ve, T as re, O as Ee } from "./rule-oDZ1Kic9.js";
|
|
5
|
+
import { p as he } from "./loading-zw44FQ6v.js";
|
|
6
6
|
import { useDialog as le, useDialogChild as se } from "@feedmepos/ui-library";
|
|
7
7
|
import { h as J } from "./moment-BWErdI6_.js";
|
|
8
|
-
import { z as Se } from "./app-
|
|
9
|
-
import { u as z } from "./membership-
|
|
10
|
-
import { u as X } from "./business-
|
|
11
|
-
import { _ as D } from "./index-
|
|
8
|
+
import { z as Se } from "./app-CLPpu6jA.js";
|
|
9
|
+
import { u as z } from "./membership-Bg77E5Sx.js";
|
|
10
|
+
import { u as X } from "./business-Dg5T3krT.js";
|
|
11
|
+
import { _ as D } from "./index-CjF0scjl.js";
|
|
12
12
|
import { c as oe } from "./object-qECH92oz.js";
|
|
13
|
-
import { Z } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { e as
|
|
15
|
-
import "./index-
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
const Te = { class: "flex items-center justify-between" }, xe = { class: "flex items-center gap-8 xs:flex-wrap" }, Ce = /* @__PURE__ */
|
|
13
|
+
import { Z } from "./ZodTextField.vue_vue_type_script_setup_true_lang-vsgeD3mK.js";
|
|
14
|
+
import { e as Fe } from "./app-Bs8TZeMP.js";
|
|
15
|
+
import "./index-sGtk4oiO.js";
|
|
16
|
+
import "./index-QAuJWbpX.js";
|
|
17
|
+
import "./index-xCMvgFRa.js";
|
|
18
|
+
import "./index-CvJ_6M8U.js";
|
|
19
|
+
import "./index-DfhJOhMY.js";
|
|
20
|
+
const Te = { class: "flex items-center justify-between" }, xe = { class: "flex items-center gap-8 xs:flex-wrap" }, Ce = /* @__PURE__ */ U("div", { class: "h-[26px] border-l-2 rounded-md border-fm-color-neutral-gray-100" }, null, -1), Ue = { class: "text-fm-color-primary line-clamp-1 text-ellipsis" }, we = /* @__PURE__ */ $({
|
|
21
21
|
__name: "RuleEntry",
|
|
22
22
|
props: {
|
|
23
23
|
modelValue: {
|
|
@@ -26,16 +26,16 @@ const Te = { class: "flex items-center justify-between" }, xe = { class: "flex i
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["edit", "remove"],
|
|
29
|
-
setup(a, { emit:
|
|
30
|
-
const
|
|
31
|
-
const [i, u] = Object.entries(
|
|
29
|
+
setup(a, { emit: w }) {
|
|
30
|
+
const p = a, s = _(() => {
|
|
31
|
+
const [i, u] = Object.entries(p.modelValue.conditions)[0];
|
|
32
32
|
return {
|
|
33
|
-
negated:
|
|
34
|
-
property:
|
|
33
|
+
negated: p.modelValue.negated == !0,
|
|
34
|
+
property: p.modelValue.property,
|
|
35
35
|
operator: i,
|
|
36
36
|
equator: u
|
|
37
37
|
};
|
|
38
|
-
}), l =
|
|
38
|
+
}), l = w, f = _(
|
|
39
39
|
() => ge(
|
|
40
40
|
s.value.property,
|
|
41
41
|
s.value.operator,
|
|
@@ -44,35 +44,35 @@ const Te = { class: "flex items-center justify-between" }, xe = { class: "flex i
|
|
|
44
44
|
)
|
|
45
45
|
);
|
|
46
46
|
async function t(i) {
|
|
47
|
-
i.stopPropagation(), await
|
|
47
|
+
i.stopPropagation(), await he.remove("Are you sure you want to remove this rule?") && l("remove", p.modelValue);
|
|
48
48
|
}
|
|
49
49
|
return (i, u) => {
|
|
50
50
|
var V;
|
|
51
|
-
const b = g("FmChip"),
|
|
52
|
-
return n(),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
label: (V = e(pe).find((S) => S.property ===
|
|
51
|
+
const b = g("FmChip"), c = g("FmTooltip"), k = g("FmIcon");
|
|
52
|
+
return n(), h("div", Te, [
|
|
53
|
+
U("div", xe, [
|
|
54
|
+
v(b, {
|
|
55
|
+
label: (V = e(pe).find((S) => S.property === p.modelValue.property)) == null ? void 0 : V.name,
|
|
56
56
|
class: "!text-fm-color-typo-info !bg-fm-color-system-info-100"
|
|
57
57
|
}, null, 8, ["label"]),
|
|
58
58
|
Ce,
|
|
59
|
-
|
|
60
|
-
onClick: u[0] || (u[0] = (S) => l("edit",
|
|
59
|
+
U("div", {
|
|
60
|
+
onClick: u[0] || (u[0] = (S) => l("edit", p.modelValue)),
|
|
61
61
|
class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 text-fm-color-typo-primary !bg-transparent border-dashed border-2 fm-typo-en-body-md-600 cursor-pointer"
|
|
62
62
|
}, [
|
|
63
|
-
te(
|
|
64
|
-
|
|
63
|
+
te(W(e(f)[0]) + " ", 1),
|
|
64
|
+
v(c, {
|
|
65
65
|
"z-index": 1e3,
|
|
66
66
|
content: e(f)[1]
|
|
67
67
|
}, {
|
|
68
|
-
default:
|
|
69
|
-
|
|
68
|
+
default: q(() => [
|
|
69
|
+
U("div", Ue, W(e(f)[1]), 1)
|
|
70
70
|
]),
|
|
71
71
|
_: 1
|
|
72
72
|
}, 8, ["content"])
|
|
73
73
|
])
|
|
74
74
|
]),
|
|
75
|
-
|
|
75
|
+
v(k, {
|
|
76
76
|
name: "close",
|
|
77
77
|
size: "md",
|
|
78
78
|
class: "cursor-pointer hover:bg-neutral-300 rounded-lg",
|
|
@@ -277,7 +277,7 @@ const Oe = [
|
|
|
277
277
|
}
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
|
-
],
|
|
280
|
+
], Re = { class: "flex flex-nowrap gap-x-4 items-center" }, Ye = /* @__PURE__ */ $({
|
|
281
281
|
__name: "IsDayInput",
|
|
282
282
|
props: {
|
|
283
283
|
modelValue: {
|
|
@@ -285,17 +285,17 @@ const Oe = [
|
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
emits: ["update:model-value"],
|
|
288
|
-
setup(a, { emit:
|
|
289
|
-
const
|
|
288
|
+
setup(a, { emit: w }) {
|
|
289
|
+
const p = a, s = w;
|
|
290
290
|
K(() => {
|
|
291
|
-
|
|
291
|
+
p.modelValue || s("update:model-value", {
|
|
292
292
|
op: "before",
|
|
293
293
|
x: 1
|
|
294
294
|
});
|
|
295
295
|
});
|
|
296
296
|
function l(f) {
|
|
297
297
|
const t = oe(
|
|
298
|
-
|
|
298
|
+
p.modelValue ?? {
|
|
299
299
|
op: "before",
|
|
300
300
|
x: 1
|
|
301
301
|
}
|
|
@@ -306,10 +306,10 @@ const Oe = [
|
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
return (f, t) => {
|
|
309
|
-
var u, b,
|
|
309
|
+
var u, b, c;
|
|
310
310
|
const i = g("FmStepperField");
|
|
311
|
-
return n(),
|
|
312
|
-
|
|
311
|
+
return n(), h("div", Re, [
|
|
312
|
+
v(i, {
|
|
313
313
|
class: "w-1/3",
|
|
314
314
|
"model-value": ((u = a.modelValue) == null ? void 0 : u.x) ?? null,
|
|
315
315
|
max: 365,
|
|
@@ -317,7 +317,7 @@ const Oe = [
|
|
|
317
317
|
"append-text": "days",
|
|
318
318
|
"onUpdate:modelValue": t[0] || (t[0] = (k) => l({ x: k }))
|
|
319
319
|
}, null, 8, ["model-value"]),
|
|
320
|
-
|
|
320
|
+
v(D, {
|
|
321
321
|
"model-value": ((b = a.modelValue) == null ? void 0 : b.op) ?? void 0,
|
|
322
322
|
items: [
|
|
323
323
|
{ label: "before", value: "before" },
|
|
@@ -325,8 +325,8 @@ const Oe = [
|
|
|
325
325
|
],
|
|
326
326
|
"onUpdate:modelValue": t[1] || (t[1] = (k) => l({ op: k }))
|
|
327
327
|
}, null, 8, ["model-value"]),
|
|
328
|
-
|
|
329
|
-
"model-value": ((
|
|
328
|
+
v(D, {
|
|
329
|
+
"model-value": ((c = a.modelValue) == null ? void 0 : c.ignoreYear) ?? !1,
|
|
330
330
|
items: [
|
|
331
331
|
{ label: "same year", value: !1 },
|
|
332
332
|
{ label: "ignore year", value: !0 }
|
|
@@ -350,10 +350,10 @@ const Oe = [
|
|
|
350
350
|
}
|
|
351
351
|
},
|
|
352
352
|
emits: ["update:model-value"],
|
|
353
|
-
setup(a, { emit:
|
|
354
|
-
const
|
|
353
|
+
setup(a, { emit: w }) {
|
|
354
|
+
const p = a, s = w;
|
|
355
355
|
K(() => {
|
|
356
|
-
|
|
356
|
+
p.modelValue || s("update:model-value", {
|
|
357
357
|
op: "this",
|
|
358
358
|
unit: "day",
|
|
359
359
|
ignoreYear: !0
|
|
@@ -380,17 +380,17 @@ const Oe = [
|
|
|
380
380
|
}
|
|
381
381
|
];
|
|
382
382
|
return (t, i) => {
|
|
383
|
-
var b,
|
|
383
|
+
var b, c, k, V, S;
|
|
384
384
|
const u = g("FmStepperField");
|
|
385
|
-
return n(),
|
|
386
|
-
|
|
385
|
+
return n(), h("div", De, [
|
|
386
|
+
v(D, {
|
|
387
387
|
"model-value": (b = a.modelValue) == null ? void 0 : b.op,
|
|
388
388
|
label: "",
|
|
389
389
|
items: f,
|
|
390
390
|
required: !0,
|
|
391
391
|
"onUpdate:modelValue": i[0] || (i[0] = (m) => s("update:model-value", { op: m, unit: "day", ignoreYear: !1 }))
|
|
392
392
|
}, null, 8, ["model-value"]),
|
|
393
|
-
((
|
|
393
|
+
((c = a.modelValue) == null ? void 0 : c.op) != "this" ? (n(), F(u, {
|
|
394
394
|
key: 0,
|
|
395
395
|
"model-value": ((k = a.modelValue) == null ? void 0 : k.x) || 0,
|
|
396
396
|
max: 365,
|
|
@@ -402,14 +402,14 @@ const Oe = [
|
|
|
402
402
|
x: m
|
|
403
403
|
}))
|
|
404
404
|
}, null, 8, ["model-value"])) : A("", !0),
|
|
405
|
-
|
|
405
|
+
v(D, {
|
|
406
406
|
"model-value": (V = a.modelValue) == null ? void 0 : V.unit,
|
|
407
407
|
label: "",
|
|
408
408
|
items: l,
|
|
409
409
|
required: !0,
|
|
410
|
-
"onUpdate:modelValue": i[2] || (i[2] = (m) => s("update:model-value", { ...
|
|
410
|
+
"onUpdate:modelValue": i[2] || (i[2] = (m) => s("update:model-value", { ...p.modelValue, unit: m }))
|
|
411
411
|
}, null, 8, ["model-value"]),
|
|
412
|
-
|
|
412
|
+
v(D, {
|
|
413
413
|
label: "",
|
|
414
414
|
"model-value": (S = a.modelValue) == null ? void 0 : S.ignoreYear,
|
|
415
415
|
items: [
|
|
@@ -418,23 +418,23 @@ const Oe = [
|
|
|
418
418
|
],
|
|
419
419
|
required: !0,
|
|
420
420
|
"onUpdate:modelValue": i[3] || (i[3] = (m) => s("update:model-value", {
|
|
421
|
-
...
|
|
421
|
+
...p.modelValue,
|
|
422
422
|
ignoreYear: m == !0
|
|
423
423
|
}))
|
|
424
424
|
}, null, 8, ["model-value"])
|
|
425
425
|
]);
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
}), _e = { class: "space-y-8" },
|
|
428
|
+
}), _e = { class: "space-y-8" }, qe = { class: "text-fm-color-primary rounded-md border-dashed border-2 p-8" }, Me = {
|
|
429
429
|
key: 0,
|
|
430
430
|
class: "flex items-center gap-8"
|
|
431
|
-
},
|
|
431
|
+
}, Be = /* @__PURE__ */ U("div", null, "Repeat every", -1), $e = /* @__PURE__ */ U("div", null, "Repeat on", -1), Ne = { class: "flex gap-4" }, Ae = {
|
|
432
432
|
key: 0,
|
|
433
433
|
class: "grid grid-cols-7 overflow-hidden rounded-md border-1"
|
|
434
434
|
}, Pe = ["onClick"], Le = {
|
|
435
435
|
key: 1,
|
|
436
436
|
class: "flex items-center gap-8"
|
|
437
|
-
}, He = { class: "flex gap-4 xs:gap-[2px]" },
|
|
437
|
+
}, He = { class: "flex gap-4 xs:gap-[2px]" }, We = /* @__PURE__ */ U("div", null, "Month", -1), je = { class: "grid grid-cols-6 gap-8" }, Ge = {
|
|
438
438
|
key: 0,
|
|
439
439
|
class: "grid grid-cols-7 overflow-hidden rounded-md border-1"
|
|
440
440
|
}, Ke = ["onClick"], Qe = {
|
|
@@ -460,12 +460,12 @@ const Oe = [
|
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
emits: ["update:model-value", "cancel"],
|
|
463
|
-
setup(a, { emit:
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
dtstart:
|
|
467
|
-
freq:
|
|
468
|
-
wkst:
|
|
463
|
+
setup(a, { emit: w }) {
|
|
464
|
+
const p = a, s = w, l = P(
|
|
465
|
+
p.modelValue ? C.fromString(p.modelValue) : new C({
|
|
466
|
+
dtstart: p.startDate,
|
|
467
|
+
freq: C.DAILY,
|
|
468
|
+
wkst: C.SU,
|
|
469
469
|
interval: 1,
|
|
470
470
|
byhour: 0,
|
|
471
471
|
byminute: 0,
|
|
@@ -474,57 +474,99 @@ const Oe = [
|
|
|
474
474
|
);
|
|
475
475
|
function f(t) {
|
|
476
476
|
var i;
|
|
477
|
-
"freq" in t
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
477
|
+
if ("freq" in t)
|
|
478
|
+
switch (t.freq) {
|
|
479
|
+
case C.WEEKLY:
|
|
480
|
+
l.value = new C({
|
|
481
|
+
dtstart: p.startDate,
|
|
482
|
+
freq: t.freq,
|
|
483
|
+
interval: 1,
|
|
484
|
+
byhour: 0,
|
|
485
|
+
byminute: 0,
|
|
486
|
+
bysecond: 0,
|
|
487
|
+
wkst: C.SU,
|
|
488
|
+
byweekday: [C.MO]
|
|
489
|
+
});
|
|
490
|
+
break;
|
|
491
|
+
case C.MONTHLY:
|
|
492
|
+
l.value = new C({
|
|
493
|
+
dtstart: p.startDate,
|
|
494
|
+
freq: t.freq,
|
|
495
|
+
interval: 1,
|
|
496
|
+
byhour: 0,
|
|
497
|
+
byminute: 0,
|
|
498
|
+
bysecond: 0,
|
|
499
|
+
bymonthday: [(/* @__PURE__ */ new Date()).getDate()],
|
|
500
|
+
wkst: C.SU
|
|
501
|
+
});
|
|
502
|
+
break;
|
|
503
|
+
case C.YEARLY:
|
|
504
|
+
l.value = new C({
|
|
505
|
+
dtstart: p.startDate,
|
|
506
|
+
freq: t.freq,
|
|
507
|
+
interval: 1,
|
|
508
|
+
byhour: 0,
|
|
509
|
+
byminute: 0,
|
|
510
|
+
bysecond: 0,
|
|
511
|
+
wkst: C.SU,
|
|
512
|
+
bymonth: [(/* @__PURE__ */ new Date()).getMonth() + 1],
|
|
513
|
+
bymonthday: [(/* @__PURE__ */ new Date()).getDate()]
|
|
514
|
+
});
|
|
515
|
+
break;
|
|
516
|
+
default:
|
|
517
|
+
l.value = new C({
|
|
518
|
+
dtstart: p.startDate,
|
|
519
|
+
freq: t.freq,
|
|
520
|
+
interval: 1,
|
|
521
|
+
byhour: 0,
|
|
522
|
+
byminute: 0,
|
|
523
|
+
bysecond: 0,
|
|
524
|
+
wkst: C.SU
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
t.interval && t.interval > 0 && (l.value = new C({
|
|
486
528
|
...l.value.origOptions,
|
|
487
|
-
dtstart:
|
|
529
|
+
dtstart: p.startDate,
|
|
488
530
|
interval: t.interval
|
|
489
|
-
})), "byweekday" in t && t.byweekday && Array.isArray(t.byweekday) && t.byweekday.length > 0 && (l.value.options.bymonthday.length > 0 && l.value.options.freq ==
|
|
531
|
+
})), "byweekday" in t && t.byweekday && Array.isArray(t.byweekday) && t.byweekday.length > 0 && (l.value.options.bymonthday.length > 0 && l.value.options.freq == C.MONTHLY && (l.value.options.bymonthday = []), l.value = new C({
|
|
490
532
|
...l.value.origOptions,
|
|
491
|
-
dtstart:
|
|
533
|
+
dtstart: p.startDate,
|
|
492
534
|
bymonthday: [],
|
|
493
535
|
byweekday: t.byweekday
|
|
494
|
-
})), "bysetpos" in t && t.bysetpos != null && (l.value = new
|
|
536
|
+
})), "bysetpos" in t && t.bysetpos != null && (l.value = new C({
|
|
495
537
|
...l.value.origOptions,
|
|
496
|
-
dtstart:
|
|
538
|
+
dtstart: p.startDate,
|
|
497
539
|
bymonthday: [],
|
|
498
540
|
bysetpos: t.bysetpos,
|
|
499
541
|
byweekday: ((i = l.value.options.byweekday) == null ? void 0 : i.length) > 0 ? l.value.options.byweekday : [6]
|
|
500
|
-
})), "bymonthday" in t && t.bymonthday && Array.isArray(t.bymonthday) && t.bymonthday.length > 0 && (l.value = new
|
|
542
|
+
})), "bymonthday" in t && t.bymonthday && Array.isArray(t.bymonthday) && t.bymonthday.length > 0 && (l.value = new C({
|
|
501
543
|
...l.value.origOptions,
|
|
502
|
-
dtstart:
|
|
544
|
+
dtstart: p.startDate,
|
|
503
545
|
bysetpos: [],
|
|
504
546
|
byweekday: [],
|
|
505
547
|
bymonthday: t.bymonthday
|
|
506
|
-
})), "bymonth" in t && t.bymonth && Array.isArray(t.bymonth) && t.bymonth.length > 0 && (l.value = new
|
|
548
|
+
})), "bymonth" in t && t.bymonth && Array.isArray(t.bymonth) && t.bymonth.length > 0 && (l.value = new C({
|
|
507
549
|
...l.value.origOptions,
|
|
508
|
-
dtstart:
|
|
550
|
+
dtstart: p.startDate,
|
|
509
551
|
bysetpos: [],
|
|
510
552
|
bymonth: t.bymonth
|
|
511
|
-
})), "bynweekday" in t && t.bynweekday && (l.value = new
|
|
553
|
+
})), "bynweekday" in t && t.bynweekday && (l.value = new C({
|
|
512
554
|
...l.value.origOptions,
|
|
513
|
-
dtstart:
|
|
555
|
+
dtstart: p.startDate,
|
|
514
556
|
bysetpos: [],
|
|
515
557
|
byweekday: new Ve(
|
|
516
558
|
t.bynweekday[0][0],
|
|
517
559
|
t.bynweekday[0][1]
|
|
518
560
|
)
|
|
519
|
-
})),
|
|
561
|
+
})), p.applyButton || s("update:model-value", l.value.toString());
|
|
520
562
|
}
|
|
521
563
|
return K(() => {
|
|
522
|
-
|
|
564
|
+
p.modelValue || s(
|
|
523
565
|
"update:model-value",
|
|
524
|
-
new
|
|
525
|
-
dtstart:
|
|
526
|
-
freq:
|
|
527
|
-
wkst:
|
|
566
|
+
new C({
|
|
567
|
+
dtstart: p.startDate,
|
|
568
|
+
freq: C.DAILY,
|
|
569
|
+
wkst: C.SU,
|
|
528
570
|
interval: 1,
|
|
529
571
|
byhour: 0,
|
|
530
572
|
byminute: 0,
|
|
@@ -533,46 +575,46 @@ const Oe = [
|
|
|
533
575
|
);
|
|
534
576
|
}), (t, i) => {
|
|
535
577
|
var V, S, m;
|
|
536
|
-
const u = g("FmStepperField"), b = g("FmChip"),
|
|
537
|
-
return n(),
|
|
538
|
-
|
|
539
|
-
a.fixedFrequency ? A("", !0) : (n(),
|
|
540
|
-
|
|
541
|
-
|
|
578
|
+
const u = g("FmStepperField"), b = g("FmChip"), c = g("FmButtonGroup"), k = g("FmButton");
|
|
579
|
+
return n(), h("div", _e, [
|
|
580
|
+
U("div", qe, W(e(ke)(e(l).options)), 1),
|
|
581
|
+
a.fixedFrequency ? A("", !0) : (n(), h("div", Me, [
|
|
582
|
+
Be,
|
|
583
|
+
v(u, {
|
|
542
584
|
class: "w-[100px]",
|
|
543
585
|
"model-value": e(l).options.interval,
|
|
544
586
|
"onUpdate:modelValue": i[0] || (i[0] = (o) => f({ interval: o > 0 ? o : e(l).options.interval })),
|
|
545
587
|
min: 1
|
|
546
588
|
}, null, 8, ["model-value"]),
|
|
547
|
-
|
|
589
|
+
v(D, {
|
|
548
590
|
class: "w-min",
|
|
549
591
|
items: e(H).frequencies,
|
|
550
592
|
"model-value": e(l).origOptions.freq,
|
|
551
593
|
"onUpdate:modelValue": i[1] || (i[1] = (o) => f({ freq: o }))
|
|
552
594
|
}, null, 8, ["items", "model-value"])
|
|
553
595
|
])),
|
|
554
|
-
e(l).options.freq === e(
|
|
596
|
+
e(l).options.freq === e(C).WEEKLY ? (n(), h(Y, { key: 1 }, [
|
|
555
597
|
$e,
|
|
556
|
-
|
|
557
|
-
(n(!0),
|
|
598
|
+
U("div", Ne, [
|
|
599
|
+
(n(!0), h(Y, null, N(e(H).weekdays, (o) => {
|
|
558
600
|
var d;
|
|
559
|
-
return n(),
|
|
601
|
+
return n(), F(b, {
|
|
560
602
|
class: L(["cursor-pointer", `${(d = e(l).options.byweekday) != null && d.includes(o.value) ? "bg-fm-color-primary text-white" : "bg-fm-color-neutral-gray-200 text-black"}`]),
|
|
561
603
|
label: o.label[0],
|
|
562
604
|
key: o.value,
|
|
563
605
|
compact: !0,
|
|
564
606
|
onClick: () => {
|
|
565
|
-
var
|
|
607
|
+
var y, T;
|
|
566
608
|
f({
|
|
567
|
-
byweekday: (
|
|
609
|
+
byweekday: (y = e(l).options.byweekday) != null && y.includes(o.value) ? ((T = e(l).options.byweekday) == null ? void 0 : T.filter((E) => E !== o.value)) || [] : [...e(l).options.byweekday || [], o.value]
|
|
568
610
|
});
|
|
569
611
|
}
|
|
570
612
|
}, null, 8, ["class", "label", "onClick"]);
|
|
571
613
|
}), 128))
|
|
572
614
|
])
|
|
573
615
|
], 64)) : A("", !0),
|
|
574
|
-
e(l).options.freq == e(
|
|
575
|
-
|
|
616
|
+
e(l).options.freq == e(C).MONTHLY ? (n(), h(Y, { key: 2 }, [
|
|
617
|
+
v(c, {
|
|
576
618
|
"model-value": e(l).options.bymonthday.length ? { label: "Each" } : { label: "On the" },
|
|
577
619
|
items: [
|
|
578
620
|
{
|
|
@@ -586,24 +628,24 @@ const Oe = [
|
|
|
586
628
|
o.label == "Each" ? f({ bymonthday: [1] }) : f({ bysetpos: 1 });
|
|
587
629
|
})
|
|
588
630
|
}, null, 8, ["model-value"]),
|
|
589
|
-
e(l).options.bymonthday.length > 0 ? (n(),
|
|
590
|
-
(n(!0),
|
|
631
|
+
e(l).options.bymonthday.length > 0 ? (n(), h("div", Ae, [
|
|
632
|
+
(n(!0), h(Y, null, N(e(H).dates, (o) => (n(), h("div", {
|
|
591
633
|
key: o.value,
|
|
592
634
|
class: L(["cursor-pointer text-center outline-1 outline-fm-color-neutral-gray-100 outline", `${e(l).options.bymonthday.includes(o.value) ? "bg-fm-color-primary text-fm-color-typo-white outline-transparent" : "bg-transparent text-fm-color-typo-primary"} ${o.value == 31 ? "border-r" : ""}`]),
|
|
593
635
|
onClick: (d) => f({
|
|
594
|
-
bymonthday: e(l).options.bymonthday.includes(o.value) ? e(l).options.bymonthday.filter((
|
|
636
|
+
bymonthday: e(l).options.bymonthday.includes(o.value) ? e(l).options.bymonthday.filter((y) => y !== o.value) : [...e(l).options.bymonthday, o.value]
|
|
595
637
|
})
|
|
596
|
-
},
|
|
597
|
-
])) : (n(),
|
|
598
|
-
|
|
638
|
+
}, W(o.value), 11, Pe))), 128))
|
|
639
|
+
])) : (n(), h("div", Le, [
|
|
640
|
+
v(D, {
|
|
599
641
|
items: e(H).ordinals,
|
|
600
642
|
"model-value": (V = e(l).options.bysetpos) == null ? void 0 : V[0],
|
|
601
643
|
"onUpdate:modelValue": i[3] || (i[3] = (o) => f({ bysetpos: o }))
|
|
602
644
|
}, null, 8, ["items", "model-value"]),
|
|
603
|
-
|
|
604
|
-
(n(!0),
|
|
645
|
+
U("div", He, [
|
|
646
|
+
(n(!0), h(Y, null, N(e(H).weekdays, (o) => {
|
|
605
647
|
var d;
|
|
606
|
-
return n(),
|
|
648
|
+
return n(), F(b, {
|
|
607
649
|
class: L(["cursor-pointer", `${(d = e(l).options.byweekday) != null && d.includes(o.value) ? "bg-fm-color-primary text-white" : "bg-fm-color-neutral-gray-200 text-black"}`]),
|
|
608
650
|
label: o.label[0],
|
|
609
651
|
key: o.value,
|
|
@@ -618,18 +660,18 @@ const Oe = [
|
|
|
618
660
|
])
|
|
619
661
|
]))
|
|
620
662
|
], 64)) : A("", !0),
|
|
621
|
-
e(l).options.freq == e(
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
(n(!0),
|
|
625
|
-
var d,
|
|
626
|
-
return n(),
|
|
663
|
+
e(l).options.freq == e(C).YEARLY ? (n(), h(Y, { key: 3 }, [
|
|
664
|
+
We,
|
|
665
|
+
U("div", je, [
|
|
666
|
+
(n(!0), h(Y, null, N(e(H).months, (o) => {
|
|
667
|
+
var d, y;
|
|
668
|
+
return n(), F(b, {
|
|
627
669
|
key: o.value,
|
|
628
670
|
class: L(["cursor-pointer", {
|
|
629
671
|
"bg-fm-color-primary text-white": (d = e(l).options.bymonth) == null ? void 0 : d.includes(
|
|
630
672
|
o.value
|
|
631
673
|
),
|
|
632
|
-
"bg-fm-color-gray-200 text-fm-color-gray-800": !((
|
|
674
|
+
"bg-fm-color-gray-200 text-fm-color-gray-800": !((y = e(l).options.bymonth) != null && y.includes(o.value))
|
|
633
675
|
}]),
|
|
634
676
|
label: o.shortName,
|
|
635
677
|
compact: !0,
|
|
@@ -639,7 +681,7 @@ const Oe = [
|
|
|
639
681
|
}, null, 8, ["class", "label", "onClick"]);
|
|
640
682
|
}), 128))
|
|
641
683
|
]),
|
|
642
|
-
|
|
684
|
+
v(c, {
|
|
643
685
|
"model-value": e(l).options.bymonthday.length ? { label: "Each" } : { label: "On the" },
|
|
644
686
|
items: [
|
|
645
687
|
{
|
|
@@ -654,35 +696,35 @@ const Oe = [
|
|
|
654
696
|
bymonthday: [1],
|
|
655
697
|
bymonth: e(l).options.bymonth ?? [1]
|
|
656
698
|
}) : f({
|
|
657
|
-
byweekday: [e(
|
|
699
|
+
byweekday: [e(C).SU.nth(1)],
|
|
658
700
|
bymonth: e(l).options.bymonth ?? [1]
|
|
659
701
|
});
|
|
660
702
|
})
|
|
661
703
|
}, null, 8, ["model-value"]),
|
|
662
|
-
e(l).options.bymonthday.length > 0 ? (n(),
|
|
663
|
-
(n(!0),
|
|
704
|
+
e(l).options.bymonthday.length > 0 ? (n(), h("div", Ge, [
|
|
705
|
+
(n(!0), h(Y, null, N(Array(31).fill(null).map((o, d) => d + 1), (o) => (n(), h("div", {
|
|
664
706
|
key: o,
|
|
665
707
|
class: L(["cursor-pointer text-center outline-1 outline-fm-color-neutral-gray-100 outline", `${e(l).options.bymonthday.includes(o) ? "bg-fm-color-primary text-fm-color-typo-white outline-transparent" : "bg-transparent text-fm-color-typo-primary"} ${o == 31 ? "border-r" : ""}`]),
|
|
666
708
|
onClick: (d) => f({
|
|
667
|
-
bymonthday: e(l).options.bymonthday.includes(o) ? e(l).options.bymonthday.filter((
|
|
709
|
+
bymonthday: e(l).options.bymonthday.includes(o) ? e(l).options.bymonthday.filter((y) => y !== o) : [...e(l).options.bymonthday, o]
|
|
668
710
|
})
|
|
669
|
-
},
|
|
670
|
-
])) : (n(),
|
|
671
|
-
|
|
711
|
+
}, W(o), 11, Ke))), 128))
|
|
712
|
+
])) : (n(), h("div", Qe, [
|
|
713
|
+
v(D, {
|
|
672
714
|
items: e(H).ordinals,
|
|
673
715
|
"model-value": (m = (S = e(l).options.bynweekday) == null ? void 0 : S[0]) == null ? void 0 : m[1],
|
|
674
716
|
"onUpdate:modelValue": i[5] || (i[5] = (o) => {
|
|
675
|
-
var d,
|
|
717
|
+
var d, y;
|
|
676
718
|
return f({
|
|
677
|
-
bynweekday: [[((
|
|
719
|
+
bynweekday: [[((y = (d = e(l).options.bynweekday) == null ? void 0 : d[0]) == null ? void 0 : y[0]) ?? 1, o]]
|
|
678
720
|
});
|
|
679
721
|
})
|
|
680
722
|
}, null, 8, ["items", "model-value"]),
|
|
681
|
-
|
|
682
|
-
(n(!0),
|
|
683
|
-
var d,
|
|
684
|
-
return n(),
|
|
685
|
-
class: L(["cursor-pointer", `${((
|
|
723
|
+
U("div", ze, [
|
|
724
|
+
(n(!0), h(Y, null, N(e(H).weekdays, (o) => {
|
|
725
|
+
var d, y;
|
|
726
|
+
return n(), F(b, {
|
|
727
|
+
class: L(["cursor-pointer", `${((y = (d = e(l).options.bynweekday) == null ? void 0 : d[0]) == null ? void 0 : y[0]) === o.value ? "bg-fm-color-primary text-white" : "bg-fm-color-neutral-gray-200 text-black"}`]),
|
|
686
728
|
label: o.label[0],
|
|
687
729
|
key: o.value,
|
|
688
730
|
compact: !0,
|
|
@@ -699,13 +741,13 @@ const Oe = [
|
|
|
699
741
|
])
|
|
700
742
|
]))
|
|
701
743
|
], 64)) : A("", !0),
|
|
702
|
-
a.applyButton ? (n(),
|
|
703
|
-
|
|
744
|
+
a.applyButton ? (n(), h("div", Ze, [
|
|
745
|
+
v(k, {
|
|
704
746
|
label: "Cancel",
|
|
705
747
|
variant: "tertiary",
|
|
706
748
|
onClick: i[6] || (i[6] = (o) => s("cancel"))
|
|
707
749
|
}),
|
|
708
|
-
|
|
750
|
+
v(k, {
|
|
709
751
|
label: "Apply",
|
|
710
752
|
onClick: i[7] || (i[7] = (o) => s("update:model-value", e(l).toString()))
|
|
711
753
|
})
|
|
@@ -722,23 +764,23 @@ const Oe = [
|
|
|
722
764
|
}
|
|
723
765
|
},
|
|
724
766
|
emits: ["update:model-value"],
|
|
725
|
-
setup(a, { emit:
|
|
726
|
-
const
|
|
767
|
+
setup(a, { emit: w }) {
|
|
768
|
+
const p = a, s = w, l = J.months().map((f, t) => ({
|
|
727
769
|
name: f,
|
|
728
770
|
shortName: J().month(t).format("MMM"),
|
|
729
771
|
value: t
|
|
730
772
|
}));
|
|
731
773
|
return K(() => {
|
|
732
|
-
|
|
774
|
+
p.modelValue || s("update:model-value", []);
|
|
733
775
|
}), (f, t) => {
|
|
734
776
|
const i = g("FmChip");
|
|
735
|
-
return n(),
|
|
736
|
-
(n(!0),
|
|
737
|
-
var b,
|
|
738
|
-
return n(),
|
|
777
|
+
return n(), h("div", Je, [
|
|
778
|
+
(n(!0), h(Y, null, N(e(l), (u) => {
|
|
779
|
+
var b, c;
|
|
780
|
+
return n(), F(i, {
|
|
739
781
|
class: L(["cursor-pointer", {
|
|
740
782
|
"bg-fm-color-primary text-white": (b = a.modelValue) == null ? void 0 : b.includes(u.value),
|
|
741
|
-
"bg-fm-color-gray-200 text-fm-color-gray-800": !((
|
|
783
|
+
"bg-fm-color-gray-200 text-fm-color-gray-800": !((c = a.modelValue) != null && c.includes(
|
|
742
784
|
u.value
|
|
743
785
|
))
|
|
744
786
|
}]),
|
|
@@ -774,8 +816,8 @@ const Oe = [
|
|
|
774
816
|
default: 380
|
|
775
817
|
}
|
|
776
818
|
},
|
|
777
|
-
setup(a, { expose:
|
|
778
|
-
const
|
|
819
|
+
setup(a, { expose: w }) {
|
|
820
|
+
const p = a, s = Fe(), l = _(() => s.menu.value || {
|
|
779
821
|
_id: "",
|
|
780
822
|
modules: {
|
|
781
823
|
catalog: [],
|
|
@@ -793,27 +835,27 @@ const Oe = [
|
|
|
793
835
|
serveSequence: []
|
|
794
836
|
}
|
|
795
837
|
}), f = _(() => {
|
|
796
|
-
const o =
|
|
797
|
-
return l.value.modules.item.filter(o).reduce((
|
|
838
|
+
const o = p.filterItems ?? ((y) => !!y.category);
|
|
839
|
+
return l.value.modules.item.filter(o).reduce((y, T) => {
|
|
798
840
|
const E = {
|
|
799
841
|
id: T._id,
|
|
800
842
|
category: T.category,
|
|
801
843
|
name: (T.name2 || T.name).trim()
|
|
802
844
|
};
|
|
803
|
-
return
|
|
845
|
+
return y = [...y, E], y;
|
|
804
846
|
}, []);
|
|
805
847
|
}), t = _(() => {
|
|
806
|
-
const o = l.value.modules.category.reduce((d,
|
|
807
|
-
id:
|
|
808
|
-
name:
|
|
848
|
+
const o = l.value.modules.category.reduce((d, y) => (d[y._id] = {
|
|
849
|
+
id: y._id,
|
|
850
|
+
name: y.name,
|
|
809
851
|
items: {}
|
|
810
852
|
}, d), {});
|
|
811
853
|
return f.value.reduce(
|
|
812
|
-
(d,
|
|
813
|
-
const T =
|
|
854
|
+
(d, y) => {
|
|
855
|
+
const T = y.category ?? "";
|
|
814
856
|
return d[T].items = {
|
|
815
857
|
...d[T].items,
|
|
816
|
-
[
|
|
858
|
+
[y.id]: y
|
|
817
859
|
}, d;
|
|
818
860
|
},
|
|
819
861
|
{
|
|
@@ -827,55 +869,55 @@ const Oe = [
|
|
|
827
869
|
);
|
|
828
870
|
}), i = _(() => {
|
|
829
871
|
const o = b.value.toLowerCase();
|
|
830
|
-
return o ? Object.entries(t.value).reduce((d, [
|
|
872
|
+
return o ? Object.entries(t.value).reduce((d, [y, T]) => {
|
|
831
873
|
if (T.name.toLowerCase().includes(o))
|
|
832
|
-
return d[
|
|
833
|
-
const E = Object.entries(T.items).reduce((r, [
|
|
834
|
-
return Object.keys(E).length > 0 && (d[
|
|
874
|
+
return d[y] = T, d;
|
|
875
|
+
const E = Object.entries(T.items).reduce((r, [M, O]) => (O.name.toLowerCase().includes(o) && (r[M] = O), r), {});
|
|
876
|
+
return Object.keys(E).length > 0 && (d[y] = { ...T, items: E }), d;
|
|
835
877
|
}, {}) : t.value;
|
|
836
|
-
}), u = P({}), b = P(""),
|
|
878
|
+
}), u = P({}), b = P(""), c = _(() => Object.values(u.value).filter((o) => !!o).length);
|
|
837
879
|
function k(o) {
|
|
838
|
-
u.value = f.value.reduce((d,
|
|
880
|
+
u.value = f.value.reduce((d, y) => (d[y.id] = o.includes(y.id), d), {});
|
|
839
881
|
}
|
|
840
882
|
K(async () => {
|
|
841
|
-
await s.getMenu(), k(
|
|
883
|
+
await s.getMenu(), k(p.initialValue);
|
|
842
884
|
});
|
|
843
885
|
function V(o) {
|
|
844
|
-
const d = Object.keys(i.value[o].items),
|
|
845
|
-
return
|
|
886
|
+
const d = Object.keys(i.value[o].items), y = d.filter((T) => u.value[T]);
|
|
887
|
+
return y.length ? y.length === d.length ? !0 : null : !1;
|
|
846
888
|
}
|
|
847
889
|
function S(o) {
|
|
848
|
-
const d = Object.keys(i.value[o].items),
|
|
890
|
+
const d = Object.keys(i.value[o].items), y = V(o), T = oe(u.value);
|
|
849
891
|
for (const E of d)
|
|
850
|
-
T[E] =
|
|
892
|
+
T[E] = y !== !0;
|
|
851
893
|
u.value = T;
|
|
852
894
|
}
|
|
853
895
|
function m(o) {
|
|
854
896
|
u.value[o] = !u.value[o];
|
|
855
897
|
}
|
|
856
|
-
return
|
|
898
|
+
return w({
|
|
857
899
|
onConfirm: () => {
|
|
858
900
|
const o = Object.entries(u.value).filter(([, d]) => !!d).map(([d]) => d);
|
|
859
|
-
|
|
901
|
+
p.onComplete(o);
|
|
860
902
|
}
|
|
861
903
|
}), (o, d) => {
|
|
862
|
-
const
|
|
863
|
-
return n(),
|
|
864
|
-
|
|
904
|
+
const y = g("fm-button"), T = g("FmTextField"), E = g("fm-list-item"), r = g("fm-checkbox"), M = g("fm-list");
|
|
905
|
+
return n(), h("div", et, [
|
|
906
|
+
v(E, {
|
|
865
907
|
tag: "div",
|
|
866
908
|
clickable: !1
|
|
867
909
|
}, {
|
|
868
|
-
default:
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
y
|
|
910
|
+
default: q(() => [
|
|
911
|
+
U("div", tt, [
|
|
912
|
+
U("div", lt, [
|
|
913
|
+
v(y, {
|
|
872
914
|
icon: "sync",
|
|
873
915
|
variant: "tertiary",
|
|
874
916
|
onClick: d[0] || (d[0] = () => k([]))
|
|
875
917
|
}),
|
|
876
|
-
|
|
918
|
+
U("span", ot, W(c.value) + " product(s) selected ", 1)
|
|
877
919
|
]),
|
|
878
|
-
|
|
920
|
+
v(T, {
|
|
879
921
|
modelValue: b.value,
|
|
880
922
|
"onUpdate:modelValue": d[1] || (d[1] = (O) => b.value = O),
|
|
881
923
|
placeholder: "Search",
|
|
@@ -886,16 +928,16 @@ const Oe = [
|
|
|
886
928
|
]),
|
|
887
929
|
_: 1
|
|
888
930
|
}),
|
|
889
|
-
|
|
890
|
-
class: L(["grow overflow-y-auto", `max-h-${
|
|
931
|
+
v(M, {
|
|
932
|
+
class: L(["grow overflow-y-auto", `max-h-${p.maxHeight ? `[${p.maxHeight}px]` : "full"}`])
|
|
891
933
|
}, {
|
|
892
|
-
default:
|
|
893
|
-
(n(!0),
|
|
934
|
+
default: q(() => [
|
|
935
|
+
(n(!0), h(Y, null, N(i.value, (O) => (n(), h(Y, {
|
|
894
936
|
key: O.id
|
|
895
937
|
}, [
|
|
896
|
-
Object.keys(O.items).length > 0 ? (n(),
|
|
897
|
-
|
|
898
|
-
|
|
938
|
+
Object.keys(O.items).length > 0 ? (n(), h("div", at, [
|
|
939
|
+
U("div", nt, [
|
|
940
|
+
v(r, {
|
|
899
941
|
"model-value": V(O.id) ?? !1,
|
|
900
942
|
indeterminate: V(O.id) === null,
|
|
901
943
|
label: O.name,
|
|
@@ -906,17 +948,17 @@ const Oe = [
|
|
|
906
948
|
"onUpdate:modelValue": () => S(O.id)
|
|
907
949
|
}, null, 8, ["model-value", "indeterminate", "label", "onUpdate:modelValue"])
|
|
908
950
|
]),
|
|
909
|
-
(n(!0),
|
|
910
|
-
key:
|
|
951
|
+
(n(!0), h(Y, null, N(O.items, (B) => (n(), h("div", {
|
|
952
|
+
key: B.id,
|
|
911
953
|
class: "pl-48"
|
|
912
954
|
}, [
|
|
913
|
-
|
|
914
|
-
"model-value": u.value[
|
|
915
|
-
label:
|
|
916
|
-
value:
|
|
917
|
-
name:
|
|
955
|
+
v(r, {
|
|
956
|
+
"model-value": u.value[B.id],
|
|
957
|
+
label: B.name,
|
|
958
|
+
value: B.id,
|
|
959
|
+
name: B.name,
|
|
918
960
|
class: "w-full",
|
|
919
|
-
"onUpdate:modelValue": () => m(
|
|
961
|
+
"onUpdate:modelValue": () => m(B.id)
|
|
920
962
|
}, null, 8, ["model-value", "label", "value", "name", "onUpdate:modelValue"])
|
|
921
963
|
]))), 128))
|
|
922
964
|
])) : A("", !0)
|
|
@@ -927,7 +969,7 @@ const Oe = [
|
|
|
927
969
|
]);
|
|
928
970
|
};
|
|
929
971
|
}
|
|
930
|
-
}), ut = /* @__PURE__ */
|
|
972
|
+
}), ut = /* @__PURE__ */ U("div", null, "Select Item", -1), st = { class: "" }, it = { class: "flex justify-end gap-8 w-full" }, mt = /* @__PURE__ */ $({
|
|
931
973
|
__name: "MenuDialog",
|
|
932
974
|
props: {
|
|
933
975
|
modelValue: { type: Boolean },
|
|
@@ -935,8 +977,8 @@ const Oe = [
|
|
|
935
977
|
filterItems: { type: Function }
|
|
936
978
|
},
|
|
937
979
|
emits: ["update:model-value", "confirm"],
|
|
938
|
-
setup(a, { emit:
|
|
939
|
-
const
|
|
980
|
+
setup(a, { emit: w }) {
|
|
981
|
+
const p = a, s = P(), l = P(!1), f = w;
|
|
940
982
|
function t() {
|
|
941
983
|
var u;
|
|
942
984
|
(u = s.value) == null || u.onConfirm(), f("update:model-value", !1);
|
|
@@ -945,15 +987,15 @@ const Oe = [
|
|
|
945
987
|
f("update:model-value", !1);
|
|
946
988
|
}
|
|
947
989
|
return ie(
|
|
948
|
-
() =>
|
|
990
|
+
() => p.modelValue,
|
|
949
991
|
(u) => {
|
|
950
992
|
l.value = u;
|
|
951
993
|
}
|
|
952
994
|
), K(() => {
|
|
953
|
-
l.value =
|
|
995
|
+
l.value = p.modelValue;
|
|
954
996
|
}), (u, b) => {
|
|
955
|
-
const
|
|
956
|
-
return n(),
|
|
997
|
+
const c = g("FmButton"), k = g("FmDialog");
|
|
998
|
+
return n(), F(k, {
|
|
957
999
|
"content-scrollable": !1,
|
|
958
1000
|
contentClass: "pt-0",
|
|
959
1001
|
modelValue: l.value,
|
|
@@ -961,26 +1003,26 @@ const Oe = [
|
|
|
961
1003
|
title: "Select Items",
|
|
962
1004
|
"close-button": !1
|
|
963
1005
|
}, {
|
|
964
|
-
"dialog-header":
|
|
1006
|
+
"dialog-header": q(() => [
|
|
965
1007
|
ut
|
|
966
1008
|
]),
|
|
967
|
-
"dialog-footer":
|
|
968
|
-
|
|
969
|
-
|
|
1009
|
+
"dialog-footer": q(() => [
|
|
1010
|
+
U("div", it, [
|
|
1011
|
+
v(c, {
|
|
970
1012
|
variant: "tertiary",
|
|
971
1013
|
onClick: i,
|
|
972
1014
|
label: "Cancel"
|
|
973
1015
|
}),
|
|
974
|
-
|
|
1016
|
+
v(c, {
|
|
975
1017
|
variant: "primary",
|
|
976
1018
|
onClick: t,
|
|
977
1019
|
label: "Confirm"
|
|
978
1020
|
})
|
|
979
1021
|
])
|
|
980
1022
|
]),
|
|
981
|
-
default:
|
|
982
|
-
|
|
983
|
-
|
|
1023
|
+
default: q(() => [
|
|
1024
|
+
U("div", st, [
|
|
1025
|
+
v(rt, {
|
|
984
1026
|
ref_key: "selectItemRef",
|
|
985
1027
|
ref: s,
|
|
986
1028
|
"initial-value": u.initialValue,
|
|
@@ -1001,31 +1043,31 @@ const Oe = [
|
|
|
1001
1043
|
modelValue: {}
|
|
1002
1044
|
},
|
|
1003
1045
|
emits: ["update:model-value"],
|
|
1004
|
-
setup(a, { emit:
|
|
1005
|
-
const
|
|
1046
|
+
setup(a, { emit: w }) {
|
|
1047
|
+
const p = a, s = P(!1), l = _(() => {
|
|
1006
1048
|
var i;
|
|
1007
|
-
return ((i =
|
|
1008
|
-
}), f =
|
|
1049
|
+
return ((i = p.modelValue) == null ? void 0 : i.length) || 0;
|
|
1050
|
+
}), f = w;
|
|
1009
1051
|
function t(i) {
|
|
1010
1052
|
f("update:model-value", i);
|
|
1011
1053
|
}
|
|
1012
1054
|
return (i, u) => {
|
|
1013
1055
|
const b = g("FmField");
|
|
1014
|
-
return n(),
|
|
1015
|
-
|
|
1056
|
+
return n(), h("div", dt, [
|
|
1057
|
+
v(b, {
|
|
1016
1058
|
class: "text-fm-color-typo-tertiary",
|
|
1017
|
-
onClick: u[0] || (u[0] = (
|
|
1059
|
+
onClick: u[0] || (u[0] = (c) => s.value = !0)
|
|
1018
1060
|
}, {
|
|
1019
|
-
default:
|
|
1020
|
-
te(
|
|
1061
|
+
default: q(() => [
|
|
1062
|
+
te(W(l.value) + " item(s) selected ", 1)
|
|
1021
1063
|
]),
|
|
1022
1064
|
_: 1
|
|
1023
1065
|
}),
|
|
1024
|
-
|
|
1066
|
+
v(mt, {
|
|
1025
1067
|
modelValue: s.value,
|
|
1026
1068
|
"onUpdate:modelValue": [
|
|
1027
|
-
u[1] || (u[1] = (
|
|
1028
|
-
u[2] || (u[2] = (
|
|
1069
|
+
u[1] || (u[1] = (c) => s.value = c),
|
|
1070
|
+
u[2] || (u[2] = (c) => s.value = c)
|
|
1029
1071
|
],
|
|
1030
1072
|
"initial-value": i.modelValue,
|
|
1031
1073
|
onConfirm: t
|
|
@@ -1052,38 +1094,38 @@ const Oe = [
|
|
|
1052
1094
|
}
|
|
1053
1095
|
},
|
|
1054
1096
|
emits: ["update:model-value"],
|
|
1055
|
-
setup(a, { emit:
|
|
1056
|
-
const
|
|
1057
|
-
const f = ce[
|
|
1097
|
+
setup(a, { emit: w }) {
|
|
1098
|
+
const p = a, s = w, l = _(() => {
|
|
1099
|
+
const f = ce[p.operator].safeParse(p.modelValue);
|
|
1058
1100
|
return f.success ? [] : f.error.errors;
|
|
1059
1101
|
});
|
|
1060
1102
|
return (f, t) => {
|
|
1061
|
-
var m, o, d,
|
|
1062
|
-
const i = g("FmTextField"), u = g("FmStepperField"), b = g("FmSimpleDatePicker"),
|
|
1063
|
-
return n(),
|
|
1103
|
+
var m, o, d, y, T, E;
|
|
1104
|
+
const i = g("FmTextField"), u = g("FmStepperField"), b = g("FmSimpleDatePicker"), c = g("FmSimpleDateRangePicker"), k = g("FmTimeRangePicker"), V = g("FmTimePicker"), S = g("FmHelperText");
|
|
1105
|
+
return n(), h("div", {
|
|
1064
1106
|
class: L({ "pb-4": e(l).length })
|
|
1065
1107
|
}, [
|
|
1066
|
-
a.type === "text" ? (n(),
|
|
1108
|
+
a.type === "text" ? (n(), F(i, {
|
|
1067
1109
|
key: 0,
|
|
1068
1110
|
"model-value": a.modelValue,
|
|
1069
1111
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => s("update:model-value", r))
|
|
1070
|
-
}, null, 8, ["model-value"])) : a.type === "number" ? (n(),
|
|
1112
|
+
}, null, 8, ["model-value"])) : a.type === "number" ? (n(), F(u, {
|
|
1071
1113
|
key: 1,
|
|
1072
1114
|
"model-value": a.modelValue,
|
|
1073
1115
|
"onUpdate:modelValue": t[1] || (t[1] = (r) => s("update:model-value", r))
|
|
1074
|
-
}, null, 8, ["model-value"])) : a.operator == "_isDay" ? (n(),
|
|
1116
|
+
}, null, 8, ["model-value"])) : a.operator == "_isDay" ? (n(), F(ne(Ye), {
|
|
1075
1117
|
key: 2,
|
|
1076
1118
|
"model-value": a.modelValue,
|
|
1077
1119
|
"onUpdate:modelValue": t[2] || (t[2] = (r) => s("update:model-value", r))
|
|
1078
|
-
}, null, 8, ["model-value"])) : a.operator == "_isRange" ? (n(),
|
|
1120
|
+
}, null, 8, ["model-value"])) : a.operator == "_isRange" ? (n(), F(ne(Ie), {
|
|
1079
1121
|
key: 3,
|
|
1080
1122
|
"model-value": a.modelValue,
|
|
1081
1123
|
"onUpdate:modelValue": t[3] || (t[3] = (r) => s("update:model-value", r))
|
|
1082
|
-
}, null, 8, ["model-value"])) : a.operator == "_isOnDate" ? (n(),
|
|
1124
|
+
}, null, 8, ["model-value"])) : a.operator == "_isOnDate" ? (n(), F(b, {
|
|
1083
1125
|
key: 4,
|
|
1084
1126
|
"model-value": a.modelValue,
|
|
1085
1127
|
"onUpdate:modelValue": t[4] || (t[4] = (r) => s("update:model-value", r))
|
|
1086
|
-
}, null, 8, ["model-value"])) : a.operator == "_isBetween" ? (n(),
|
|
1128
|
+
}, null, 8, ["model-value"])) : a.operator == "_isBetween" ? (n(), F(c, {
|
|
1087
1129
|
key: 5,
|
|
1088
1130
|
"model-value": {
|
|
1089
1131
|
startDate: (m = a.modelValue) == null ? void 0 : m.start,
|
|
@@ -1095,37 +1137,37 @@ const Oe = [
|
|
|
1095
1137
|
end: r.endDate
|
|
1096
1138
|
});
|
|
1097
1139
|
})
|
|
1098
|
-
}, null, 8, ["model-value"])) : a.operator == "_isInMonth" ? (n(),
|
|
1140
|
+
}, null, 8, ["model-value"])) : a.operator == "_isInMonth" ? (n(), F(Xe, {
|
|
1099
1141
|
key: 6,
|
|
1100
1142
|
"model-value": a.modelValue,
|
|
1101
1143
|
"onUpdate:modelValue": t[6] || (t[6] = (r) => s("update:model-value", r))
|
|
1102
|
-
}, null, 8, ["model-value"])) : a.operator == "_rrule" ? (n(),
|
|
1144
|
+
}, null, 8, ["model-value"])) : a.operator == "_rrule" ? (n(), F(ee, {
|
|
1103
1145
|
key: 7,
|
|
1104
1146
|
"model-value": a.modelValue,
|
|
1105
1147
|
"onUpdate:modelValue": t[7] || (t[7] = (r) => s("update:model-value", r))
|
|
1106
|
-
}, null, 8, ["model-value"])) : a.operator == "_isBetweenTime" ? (n(),
|
|
1148
|
+
}, null, 8, ["model-value"])) : a.operator == "_isBetweenTime" ? (n(), F(k, {
|
|
1107
1149
|
key: 8,
|
|
1108
1150
|
"disable-time-check": !0,
|
|
1109
|
-
"model-value": [(
|
|
1151
|
+
"model-value": [(y = (d = a.modelValue) == null ? void 0 : d[0]) == null ? void 0 : y.start, (E = (T = a.modelValue) == null ? void 0 : T[0]) == null ? void 0 : E.end],
|
|
1110
1152
|
"onUpdate:modelValue": t[8] || (t[8] = (r) => s("update:model-value", [
|
|
1111
1153
|
{
|
|
1112
1154
|
start: r[0],
|
|
1113
1155
|
end: r[1]
|
|
1114
1156
|
}
|
|
1115
1157
|
]))
|
|
1116
|
-
}, null, 8, ["model-value"])) : a.operator == "_isOnTime" ? (n(),
|
|
1158
|
+
}, null, 8, ["model-value"])) : a.operator == "_isOnTime" ? (n(), F(V, {
|
|
1117
1159
|
key: 9,
|
|
1118
1160
|
"model-value": a.modelValue,
|
|
1119
1161
|
"onUpdate:modelValue": t[9] || (t[9] = (r) => s("update:model-value", r))
|
|
1120
|
-
}, null, 8, ["model-value"])) : a.type == "tier" ? (n(),
|
|
1162
|
+
}, null, 8, ["model-value"])) : a.type == "tier" ? (n(), F(D, {
|
|
1121
1163
|
key: 10,
|
|
1122
|
-
items: (e(z)().sortedTiers ?? []).map((r,
|
|
1123
|
-
label: `Tier ${
|
|
1124
|
-
value:
|
|
1164
|
+
items: (e(z)().sortedTiers ?? []).map((r, M) => ({
|
|
1165
|
+
label: `Tier ${M + 1} - ${r.name}`,
|
|
1166
|
+
value: M + 1
|
|
1125
1167
|
})),
|
|
1126
1168
|
"model-value": a.modelValue,
|
|
1127
1169
|
"onUpdate:modelValue": t[10] || (t[10] = (r) => s("update:model-value", r))
|
|
1128
|
-
}, null, 8, ["items", "model-value"])) : a.type == "boolean" ? (n(),
|
|
1170
|
+
}, null, 8, ["items", "model-value"])) : a.type == "boolean" ? (n(), F(D, {
|
|
1129
1171
|
key: 11,
|
|
1130
1172
|
multiselect: !0,
|
|
1131
1173
|
items: [
|
|
@@ -1134,7 +1176,7 @@ const Oe = [
|
|
|
1134
1176
|
],
|
|
1135
1177
|
"model-value": a.modelValue ?? [],
|
|
1136
1178
|
"onUpdate:modelValue": t[11] || (t[11] = (r) => s("update:model-value", r))
|
|
1137
|
-
}, null, 8, ["model-value"])) : a.type == "gender" ? (n(),
|
|
1179
|
+
}, null, 8, ["model-value"])) : a.type == "gender" ? (n(), F(D, {
|
|
1138
1180
|
key: 12,
|
|
1139
1181
|
multiselect: !0,
|
|
1140
1182
|
items: [
|
|
@@ -1143,20 +1185,20 @@ const Oe = [
|
|
|
1143
1185
|
],
|
|
1144
1186
|
"model-value": a.modelValue ?? [],
|
|
1145
1187
|
"onUpdate:modelValue": t[12] || (t[12] = (r) => s("update:model-value", r))
|
|
1146
|
-
}, null, 8, ["model-value"])) : a.type == "collectible" ? (n(),
|
|
1188
|
+
}, null, 8, ["model-value"])) : a.type == "collectible" ? (n(), F(D, {
|
|
1147
1189
|
key: 13,
|
|
1148
1190
|
multiselect: !0,
|
|
1149
1191
|
items: [],
|
|
1150
1192
|
"model-value": a.modelValue ?? [],
|
|
1151
1193
|
"onUpdate:modelValue": t[13] || (t[13] = (r) => s("update:model-value", r))
|
|
1152
|
-
}, null, 8, ["model-value"])) : a.type == "segment" ? (n(),
|
|
1194
|
+
}, null, 8, ["model-value"])) : a.type == "segment" ? (n(), F(D, {
|
|
1153
1195
|
key: 14,
|
|
1154
1196
|
multiselect: !0,
|
|
1155
1197
|
items: e(z)().segmentOptions,
|
|
1156
1198
|
"model-value": a.modelValue ?? [],
|
|
1157
1199
|
"onUpdate:modelValue": t[14] || (t[14] = (r) => s("update:model-value", r)),
|
|
1158
1200
|
label: "Select segment(s) to match"
|
|
1159
|
-
}, null, 8, ["items", "model-value"])) : a.type == "title" ? (n(),
|
|
1201
|
+
}, null, 8, ["items", "model-value"])) : a.type == "title" ? (n(), F(D, {
|
|
1160
1202
|
key: 15,
|
|
1161
1203
|
multiselect: !0,
|
|
1162
1204
|
items: (e(z)().sortedTitles ?? []).map((r) => ({
|
|
@@ -1165,11 +1207,11 @@ const Oe = [
|
|
|
1165
1207
|
})),
|
|
1166
1208
|
"model-value": a.modelValue ?? [],
|
|
1167
1209
|
"onUpdate:modelValue": t[15] || (t[15] = (r) => s("update:model-value", r))
|
|
1168
|
-
}, null, 8, ["items", "model-value"])) : a.type == "product" ? (n(),
|
|
1210
|
+
}, null, 8, ["items", "model-value"])) : a.type == "product" ? (n(), F(pt, {
|
|
1169
1211
|
key: 16,
|
|
1170
1212
|
"model-value": a.modelValue,
|
|
1171
1213
|
"onUpdate:modelValue": t[16] || (t[16] = (r) => s("update:model-value", r))
|
|
1172
|
-
}, null, 8, ["model-value"])) : a.type == "location" ? (n(),
|
|
1214
|
+
}, null, 8, ["model-value"])) : a.type == "location" ? (n(), F(D, {
|
|
1173
1215
|
key: 17,
|
|
1174
1216
|
multiselect: !0,
|
|
1175
1217
|
items: e(X)().locations.map((r) => ({
|
|
@@ -1178,8 +1220,8 @@ const Oe = [
|
|
|
1178
1220
|
})),
|
|
1179
1221
|
"model-value": a.modelValue ?? [],
|
|
1180
1222
|
"onUpdate:modelValue": t[17] || (t[17] = (r) => s("update:model-value", r))
|
|
1181
|
-
}, null, 8, ["items", "model-value"])) : (n(),
|
|
1182
|
-
|
|
1223
|
+
}, null, 8, ["items", "model-value"])) : (n(), h("div", ct, "Rule Not implemented")),
|
|
1224
|
+
v(S, {
|
|
1183
1225
|
class: "items-end",
|
|
1184
1226
|
state: e(Z).helperState(e(l), ""),
|
|
1185
1227
|
text: e(Z).helperText(e(l), "")
|
|
@@ -1187,7 +1229,7 @@ const Oe = [
|
|
|
1187
1229
|
], 2);
|
|
1188
1230
|
};
|
|
1189
1231
|
}
|
|
1190
|
-
}), vt = { class: "space-y-4" }, ft = /* @__PURE__ */
|
|
1232
|
+
}), vt = { class: "space-y-4" }, ft = /* @__PURE__ */ U("div", { class: "fm-typo-en-body-lg-400" }, "Property", -1), bt = /* @__PURE__ */ U("div", { class: "fm-typo-en-body-lg-400" }, "Check to perform", -1), gt = { class: "flex items-center gap-8" }, kt = /* @__PURE__ */ U("div", { class: "fm-typo-en-body-lg-400" }, "Criteria", -1), Vt = { class: "flex items-center justify-end gap-8 pt-16 w-full" }, Et = /* @__PURE__ */ $({
|
|
1191
1233
|
__name: "CustomRuleDialog",
|
|
1192
1234
|
props: {
|
|
1193
1235
|
triggerType: {
|
|
@@ -1204,7 +1246,7 @@ const Oe = [
|
|
|
1204
1246
|
}
|
|
1205
1247
|
},
|
|
1206
1248
|
setup(a) {
|
|
1207
|
-
const
|
|
1249
|
+
const w = le(), p = z(), { emitData: s, emitAction: l } = se(), f = a, t = _(
|
|
1208
1250
|
() => ye(f.triggerType, f.includeOnly)
|
|
1209
1251
|
), i = (E) => re[t.value.find((r) => r.property === E).type], u = _(() => {
|
|
1210
1252
|
if (!V.value) return [];
|
|
@@ -1215,7 +1257,7 @@ const Oe = [
|
|
|
1215
1257
|
label: Ee[r].name,
|
|
1216
1258
|
value: r
|
|
1217
1259
|
})) : [];
|
|
1218
|
-
}), b = ve,
|
|
1260
|
+
}), b = ve, c = _(() => {
|
|
1219
1261
|
const E = b.safeParse(V.value);
|
|
1220
1262
|
return E.success ? [] : E.error.errors;
|
|
1221
1263
|
}), k = P(!1), V = P(
|
|
@@ -1225,14 +1267,14 @@ const Oe = [
|
|
|
1225
1267
|
null
|
|
1226
1268
|
)
|
|
1227
1269
|
), S = _(() => {
|
|
1228
|
-
var
|
|
1229
|
-
const { property: E, negated: r, conditions:
|
|
1270
|
+
var j;
|
|
1271
|
+
const { property: E, negated: r, conditions: M } = V.value, O = Object.keys(M || {})[0], B = Object.values(M || {})[0];
|
|
1230
1272
|
return {
|
|
1231
1273
|
property: E,
|
|
1232
1274
|
negated: r == !0,
|
|
1233
|
-
type: (
|
|
1275
|
+
type: (j = t.value.find((G) => G.property === E)) == null ? void 0 : j.type,
|
|
1234
1276
|
operator: O,
|
|
1235
|
-
equator:
|
|
1277
|
+
equator: B
|
|
1236
1278
|
};
|
|
1237
1279
|
});
|
|
1238
1280
|
function m(E) {
|
|
@@ -1251,55 +1293,55 @@ const Oe = [
|
|
|
1251
1293
|
conditions: { [E]: null }
|
|
1252
1294
|
};
|
|
1253
1295
|
}
|
|
1254
|
-
function
|
|
1296
|
+
function y(E) {
|
|
1255
1297
|
V.value.conditions = {
|
|
1256
1298
|
[S.value.operator]: E
|
|
1257
1299
|
};
|
|
1258
1300
|
}
|
|
1259
1301
|
function T() {
|
|
1260
|
-
s(V.value), l("primary"),
|
|
1302
|
+
s(V.value), l("primary"), w.close();
|
|
1261
1303
|
}
|
|
1262
1304
|
return ue(async () => {
|
|
1263
|
-
await
|
|
1305
|
+
await p.readMembership();
|
|
1264
1306
|
}), (E, r) => {
|
|
1265
|
-
const
|
|
1266
|
-
return n(),
|
|
1307
|
+
const M = g("FmIcon"), O = g("FmField"), B = g("FmPill"), j = g("FmMenuItem"), G = g("FmMenu"), Q = g("FmButton");
|
|
1308
|
+
return n(), h("div", vt, [
|
|
1267
1309
|
ft,
|
|
1268
|
-
|
|
1310
|
+
v(G, {
|
|
1269
1311
|
shift: !0,
|
|
1270
1312
|
placement: "top-start",
|
|
1271
1313
|
modelValue: e(k),
|
|
1272
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
1273
|
-
onMenuChanged: r[1] || (r[1] = (
|
|
1314
|
+
"onUpdate:modelValue": r[0] || (r[0] = (R) => me(k) ? k.value = R : null),
|
|
1315
|
+
onMenuChanged: r[1] || (r[1] = (R) => k.value = R)
|
|
1274
1316
|
}, {
|
|
1275
|
-
"menu-button":
|
|
1276
|
-
|
|
1277
|
-
append:
|
|
1278
|
-
|
|
1317
|
+
"menu-button": q(() => [
|
|
1318
|
+
v(O, null, {
|
|
1319
|
+
append: q(() => [
|
|
1320
|
+
v(M, {
|
|
1279
1321
|
name: e(k) ? "expand_less" : "expand_more"
|
|
1280
1322
|
}, null, 8, ["name"])
|
|
1281
1323
|
]),
|
|
1282
|
-
default:
|
|
1283
|
-
var
|
|
1324
|
+
default: q(() => {
|
|
1325
|
+
var R;
|
|
1284
1326
|
return [
|
|
1285
|
-
te(
|
|
1327
|
+
te(W((R = e(t).find((x) => x.property == e(V).property)) == null ? void 0 : R.name) + " ", 1)
|
|
1286
1328
|
];
|
|
1287
1329
|
}),
|
|
1288
1330
|
_: 1
|
|
1289
1331
|
})
|
|
1290
1332
|
]),
|
|
1291
|
-
default:
|
|
1292
|
-
(n(!0),
|
|
1293
|
-
key:
|
|
1294
|
-
"model-value": e(V).property ==
|
|
1295
|
-
label:
|
|
1296
|
-
disabled:
|
|
1297
|
-
onClick: (x) =>
|
|
1333
|
+
default: q(() => [
|
|
1334
|
+
(n(!0), h(Y, null, N(e(t), (R) => (n(), F(j, {
|
|
1335
|
+
key: R.property,
|
|
1336
|
+
"model-value": e(V).property == R.property,
|
|
1337
|
+
label: R.name,
|
|
1338
|
+
disabled: R.premium && !e(X)().isPremium,
|
|
1339
|
+
onClick: (x) => R.premium && !e(X)().isPremium ? null : m(R.property)
|
|
1298
1340
|
}, de({ _: 2 }, [
|
|
1299
|
-
|
|
1341
|
+
R.premium ? {
|
|
1300
1342
|
name: "append",
|
|
1301
|
-
fn:
|
|
1302
|
-
|
|
1343
|
+
fn: q(() => [
|
|
1344
|
+
v(B, { variant: "premium" })
|
|
1303
1345
|
]),
|
|
1304
1346
|
key: "0"
|
|
1305
1347
|
} : void 0
|
|
@@ -1308,8 +1350,8 @@ const Oe = [
|
|
|
1308
1350
|
_: 1
|
|
1309
1351
|
}, 8, ["modelValue"]),
|
|
1310
1352
|
bt,
|
|
1311
|
-
|
|
1312
|
-
|
|
1353
|
+
U("div", gt, [
|
|
1354
|
+
v(D, {
|
|
1313
1355
|
class: "w-1/4",
|
|
1314
1356
|
items: [
|
|
1315
1357
|
{ label: "is", value: !1 },
|
|
@@ -1318,39 +1360,39 @@ const Oe = [
|
|
|
1318
1360
|
"model-value": e(V).negated ?? !1,
|
|
1319
1361
|
"onUpdate:modelValue": o
|
|
1320
1362
|
}, null, 8, ["model-value"]),
|
|
1321
|
-
|
|
1363
|
+
v(D, {
|
|
1322
1364
|
class: "flex-1",
|
|
1323
1365
|
items: e(u),
|
|
1324
1366
|
"model-value": e(S).operator,
|
|
1325
1367
|
"onUpdate:modelValue": d
|
|
1326
1368
|
}, null, 8, ["items", "model-value"])
|
|
1327
1369
|
]),
|
|
1328
|
-
|
|
1370
|
+
U("div", null, [
|
|
1329
1371
|
kt,
|
|
1330
|
-
e(S).type ? (n(),
|
|
1372
|
+
e(S).type ? (n(), F(yt, {
|
|
1331
1373
|
key: 0,
|
|
1332
1374
|
type: e(S).type,
|
|
1333
1375
|
operator: e(S).operator,
|
|
1334
1376
|
"model-value": e(S).equator,
|
|
1335
|
-
"onUpdate:modelValue":
|
|
1377
|
+
"onUpdate:modelValue": y
|
|
1336
1378
|
}, null, 8, ["type", "operator", "model-value"])) : A("", !0)
|
|
1337
1379
|
]),
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
onClick: r[2] || (r[2] = (
|
|
1380
|
+
U("div", Vt, [
|
|
1381
|
+
v(Q, {
|
|
1382
|
+
onClick: r[2] || (r[2] = (R) => e(w).close()),
|
|
1341
1383
|
label: "Cancel",
|
|
1342
1384
|
variant: "tertiary"
|
|
1343
1385
|
}),
|
|
1344
|
-
|
|
1345
|
-
onClick: r[3] || (r[3] = (
|
|
1346
|
-
disabled: e(
|
|
1386
|
+
v(Q, {
|
|
1387
|
+
onClick: r[3] || (r[3] = (R) => T()),
|
|
1388
|
+
disabled: e(c).length > 0,
|
|
1347
1389
|
label: "Save"
|
|
1348
1390
|
}, null, 8, ["disabled"])
|
|
1349
1391
|
])
|
|
1350
1392
|
]);
|
|
1351
1393
|
};
|
|
1352
1394
|
}
|
|
1353
|
-
}),
|
|
1395
|
+
}), ht = { class: "flex flex-col gap-8" }, St = { class: "grid grid-cols-2 items-center" }, Ft = { class: "flex items-center gap-8" }, Tt = { class: "pt-16 flex items-center self-end gap-8" }, xt = /* @__PURE__ */ $({
|
|
1354
1396
|
__name: "PresetRuleDialog",
|
|
1355
1397
|
props: {
|
|
1356
1398
|
preset: {
|
|
@@ -1362,7 +1404,7 @@ const Oe = [
|
|
|
1362
1404
|
}
|
|
1363
1405
|
},
|
|
1364
1406
|
setup(a) {
|
|
1365
|
-
const
|
|
1407
|
+
const w = le(), { emitData: p, emitAction: s } = se(), l = z(), f = a;
|
|
1366
1408
|
function t() {
|
|
1367
1409
|
const { operator: S, equator: m } = b.value;
|
|
1368
1410
|
switch (f.preset) {
|
|
@@ -1373,7 +1415,7 @@ const Oe = [
|
|
|
1373
1415
|
case "MONTHLY":
|
|
1374
1416
|
case "BIRTHDAY":
|
|
1375
1417
|
case "TIER":
|
|
1376
|
-
return `Applies to ${l.sortedTiers.filter((d,
|
|
1418
|
+
return `Applies to ${l.sortedTiers.filter((d, y) => S == "_equal" ? y + 1 == m : S == "_moreThanOrEqual" ? y + 1 >= m : y + 1 <= m).map((d) => d.name).join(", ")}`;
|
|
1377
1419
|
}
|
|
1378
1420
|
}
|
|
1379
1421
|
function i() {
|
|
@@ -1422,7 +1464,7 @@ const Oe = [
|
|
|
1422
1464
|
equator: S.equator
|
|
1423
1465
|
};
|
|
1424
1466
|
});
|
|
1425
|
-
function
|
|
1467
|
+
function c(S, m) {
|
|
1426
1468
|
const o = b.value;
|
|
1427
1469
|
u.value = I.constructEntry(
|
|
1428
1470
|
o.property,
|
|
@@ -1432,7 +1474,7 @@ const Oe = [
|
|
|
1432
1474
|
);
|
|
1433
1475
|
}
|
|
1434
1476
|
function k() {
|
|
1435
|
-
|
|
1477
|
+
p(u.value), s("primary"), w.close();
|
|
1436
1478
|
}
|
|
1437
1479
|
const V = _(() => {
|
|
1438
1480
|
const S = fe.safeParse(u.value);
|
|
@@ -1441,50 +1483,50 @@ const Oe = [
|
|
|
1441
1483
|
return ue(async () => {
|
|
1442
1484
|
await l.readMembership();
|
|
1443
1485
|
}), (S, m) => {
|
|
1444
|
-
var
|
|
1445
|
-
const o = g("FmStepperField"), d = g("FmDatePicker"),
|
|
1446
|
-
return n(),
|
|
1447
|
-
a.preset == "MIN_SPEND" ? (n(),
|
|
1486
|
+
var B, j, G, Q, R;
|
|
1487
|
+
const o = g("FmStepperField"), d = g("FmDatePicker"), y = g("FmTimeRangePicker"), T = g("FmRadio"), E = g("FmSelect"), r = g("FmRadioGroup"), M = g("FmHelperText"), O = g("FmButton");
|
|
1488
|
+
return n(), h("div", ht, [
|
|
1489
|
+
a.preset == "MIN_SPEND" ? (n(), F(o, {
|
|
1448
1490
|
key: 0,
|
|
1449
1491
|
label: "Minimum spend",
|
|
1450
1492
|
"model-value": e(b).equator,
|
|
1451
|
-
"onUpdate:modelValue": m[0] || (m[0] = (x) =>
|
|
1452
|
-
}, null, 8, ["model-value"])) : a.preset == "SPECIFIC_DATE" ? (n(),
|
|
1493
|
+
"onUpdate:modelValue": m[0] || (m[0] = (x) => c(x))
|
|
1494
|
+
}, null, 8, ["model-value"])) : a.preset == "SPECIFIC_DATE" ? (n(), F(d, {
|
|
1453
1495
|
key: 1,
|
|
1454
1496
|
label: "Specific Date",
|
|
1455
1497
|
"model-value": e(b).equator,
|
|
1456
|
-
"onUpdate:modelValue": m[1] || (m[1] = (x) =>
|
|
1457
|
-
}, null, 8, ["model-value"])) : a.preset == "SPECIFIC_TIMERANGE" ? (n(),
|
|
1498
|
+
"onUpdate:modelValue": m[1] || (m[1] = (x) => c(x))
|
|
1499
|
+
}, null, 8, ["model-value"])) : a.preset == "SPECIFIC_TIMERANGE" ? (n(), F(y, {
|
|
1458
1500
|
key: 2,
|
|
1459
1501
|
label: "Time is between",
|
|
1460
1502
|
"disable-time-check": !0,
|
|
1461
|
-
"model-value": [(
|
|
1462
|
-
"onUpdate:modelValue": m[2] || (m[2] = (x) =>
|
|
1503
|
+
"model-value": [(j = (B = e(b).equator) == null ? void 0 : B[0]) == null ? void 0 : j.start, (Q = (G = e(b).equator) == null ? void 0 : G[0]) == null ? void 0 : Q.end],
|
|
1504
|
+
"onUpdate:modelValue": m[2] || (m[2] = (x) => c([
|
|
1463
1505
|
{
|
|
1464
1506
|
start: x[0],
|
|
1465
1507
|
end: x[1]
|
|
1466
1508
|
}
|
|
1467
1509
|
]))
|
|
1468
|
-
}, null, 8, ["model-value"])) : a.preset == "WEEKLY" ? (n(),
|
|
1510
|
+
}, null, 8, ["model-value"])) : a.preset == "WEEKLY" ? (n(), F(ee, {
|
|
1469
1511
|
key: 3,
|
|
1470
1512
|
label: "Weekly",
|
|
1471
1513
|
"fixed-frequency": !0,
|
|
1472
1514
|
"model-value": e(b).equator,
|
|
1473
|
-
"onUpdate:modelValue": m[3] || (m[3] = (x) =>
|
|
1474
|
-
}, null, 8, ["model-value"])) : a.preset == "MONTHLY" ? (n(),
|
|
1515
|
+
"onUpdate:modelValue": m[3] || (m[3] = (x) => c(x))
|
|
1516
|
+
}, null, 8, ["model-value"])) : a.preset == "MONTHLY" ? (n(), F(ee, {
|
|
1475
1517
|
key: 4,
|
|
1476
1518
|
label: "Weekly",
|
|
1477
1519
|
"fixed-frequency": !0,
|
|
1478
1520
|
"model-value": e(b).equator,
|
|
1479
|
-
"onUpdate:modelValue": m[4] || (m[4] = (x) =>
|
|
1480
|
-
}, null, 8, ["model-value"])) : a.preset == "BIRTHDAY" ? (n(),
|
|
1481
|
-
|
|
1482
|
-
|
|
1521
|
+
"onUpdate:modelValue": m[4] || (m[4] = (x) => c(x))
|
|
1522
|
+
}, null, 8, ["model-value"])) : a.preset == "BIRTHDAY" ? (n(), h(Y, { key: 5 }, [
|
|
1523
|
+
U("div", St, [
|
|
1524
|
+
v(T, {
|
|
1483
1525
|
label: "N days before birthday",
|
|
1484
1526
|
value: "_isDay",
|
|
1485
1527
|
"model-value": e(b).operator,
|
|
1486
1528
|
"onUpdate:modelValue": m[5] || (m[5] = () => {
|
|
1487
|
-
|
|
1529
|
+
c(
|
|
1488
1530
|
{
|
|
1489
1531
|
op: "after",
|
|
1490
1532
|
x: 1,
|
|
@@ -1494,13 +1536,13 @@ const Oe = [
|
|
|
1494
1536
|
);
|
|
1495
1537
|
})
|
|
1496
1538
|
}, null, 8, ["model-value"]),
|
|
1497
|
-
|
|
1498
|
-
|
|
1539
|
+
U("div", Ft, [
|
|
1540
|
+
v(T, {
|
|
1499
1541
|
label: "Is in this",
|
|
1500
1542
|
value: "_isRange",
|
|
1501
1543
|
"model-value": e(b).operator,
|
|
1502
1544
|
"onUpdate:modelValue": m[6] || (m[6] = () => {
|
|
1503
|
-
|
|
1545
|
+
c(
|
|
1504
1546
|
{
|
|
1505
1547
|
op: "this",
|
|
1506
1548
|
unit: "day",
|
|
@@ -1510,11 +1552,11 @@ const Oe = [
|
|
|
1510
1552
|
);
|
|
1511
1553
|
})
|
|
1512
1554
|
}, null, 8, ["model-value"]),
|
|
1513
|
-
e(b).operator == "_isRange" ? (n(),
|
|
1555
|
+
e(b).operator == "_isRange" ? (n(), F(E, {
|
|
1514
1556
|
key: 0,
|
|
1515
1557
|
items: ["day", "week", "month"].map((x) => ({ label: x, value: x })),
|
|
1516
1558
|
"model-value": e(b).equator.unit,
|
|
1517
|
-
"onUpdate:modelValue": m[7] || (m[7] = (x) =>
|
|
1559
|
+
"onUpdate:modelValue": m[7] || (m[7] = (x) => c(
|
|
1518
1560
|
{
|
|
1519
1561
|
op: "this",
|
|
1520
1562
|
unit: x,
|
|
@@ -1525,72 +1567,72 @@ const Oe = [
|
|
|
1525
1567
|
}, null, 8, ["items", "model-value"])) : A("", !0)
|
|
1526
1568
|
])
|
|
1527
1569
|
]),
|
|
1528
|
-
e(b).operator == "_isDay" ? (n(),
|
|
1570
|
+
e(b).operator == "_isDay" ? (n(), F(o, {
|
|
1529
1571
|
key: 0,
|
|
1530
1572
|
label: "Days before birthday",
|
|
1531
1573
|
"show-steppers": !1,
|
|
1532
1574
|
"model-value": e(b).equator.x,
|
|
1533
|
-
"onUpdate:modelValue": m[8] || (m[8] = (x) =>
|
|
1575
|
+
"onUpdate:modelValue": m[8] || (m[8] = (x) => c({
|
|
1534
1576
|
op: "after",
|
|
1535
1577
|
x,
|
|
1536
1578
|
ignoreYear: !0
|
|
1537
1579
|
}))
|
|
1538
1580
|
}, null, 8, ["model-value"])) : A("", !0)
|
|
1539
|
-
], 64)) : a.preset == "TIER" ? (n(),
|
|
1540
|
-
|
|
1581
|
+
], 64)) : a.preset == "TIER" ? (n(), h(Y, { key: 6 }, [
|
|
1582
|
+
v(r, {
|
|
1541
1583
|
inline: !0,
|
|
1542
1584
|
"model-value": e(b).operator,
|
|
1543
|
-
"onUpdate:modelValue": m[9] || (m[9] = (x) =>
|
|
1585
|
+
"onUpdate:modelValue": m[9] || (m[9] = (x) => c(e(b).equator, x))
|
|
1544
1586
|
}, {
|
|
1545
|
-
default:
|
|
1546
|
-
|
|
1587
|
+
default: q(() => [
|
|
1588
|
+
v(T, {
|
|
1547
1589
|
value: "_moreThanOrEqual",
|
|
1548
1590
|
label: "At least"
|
|
1549
1591
|
}),
|
|
1550
|
-
|
|
1592
|
+
v(T, {
|
|
1551
1593
|
value: "_equal",
|
|
1552
1594
|
label: "Equal"
|
|
1553
1595
|
}),
|
|
1554
|
-
|
|
1596
|
+
v(T, {
|
|
1555
1597
|
value: "_lessThanOrEqual",
|
|
1556
1598
|
label: "At most"
|
|
1557
1599
|
})
|
|
1558
1600
|
]),
|
|
1559
1601
|
_: 1
|
|
1560
1602
|
}, 8, ["model-value"]),
|
|
1561
|
-
|
|
1603
|
+
v(D, {
|
|
1562
1604
|
items: (e(l).sortedTiers ?? []).map((x, ae) => ({
|
|
1563
1605
|
label: `Tier ${ae + 1} - ${x.name}`,
|
|
1564
1606
|
value: ae + 1
|
|
1565
1607
|
})),
|
|
1566
1608
|
"model-value": e(b).equator,
|
|
1567
|
-
"onUpdate:modelValue": m[10] || (m[10] = (x) =>
|
|
1609
|
+
"onUpdate:modelValue": m[10] || (m[10] = (x) => c(x))
|
|
1568
1610
|
}, null, 8, ["items", "model-value"]),
|
|
1569
|
-
|
|
1611
|
+
v(M, {
|
|
1570
1612
|
text: t()
|
|
1571
1613
|
}, null, 8, ["text"])
|
|
1572
|
-
], 64)) : a.preset == "TITLE" ? (n(),
|
|
1614
|
+
], 64)) : a.preset == "TITLE" ? (n(), F(D, {
|
|
1573
1615
|
key: 7,
|
|
1574
1616
|
label: "User has title",
|
|
1575
1617
|
items: (e(l).sortedTitles ?? []).map((x) => ({
|
|
1576
1618
|
label: x.name,
|
|
1577
1619
|
value: x._id
|
|
1578
1620
|
})),
|
|
1579
|
-
"model-value": (
|
|
1580
|
-
"onUpdate:modelValue": m[11] || (m[11] = (x) =>
|
|
1621
|
+
"model-value": (R = e(b).equator) == null ? void 0 : R[0],
|
|
1622
|
+
"onUpdate:modelValue": m[11] || (m[11] = (x) => c([x]))
|
|
1581
1623
|
}, null, 8, ["items", "model-value"])) : A("", !0),
|
|
1582
|
-
|
|
1624
|
+
v(M, {
|
|
1583
1625
|
class: "mt-[-8px]",
|
|
1584
1626
|
text: e(Z).helperText(e(V), ""),
|
|
1585
1627
|
state: e(Z).helperState(e(V), "")
|
|
1586
1628
|
}, null, 8, ["text", "state"]),
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
onClick: m[12] || (m[12] = (x) => e(
|
|
1629
|
+
U("div", Tt, [
|
|
1630
|
+
v(O, {
|
|
1631
|
+
onClick: m[12] || (m[12] = (x) => e(w).close()),
|
|
1590
1632
|
label: "Cancel",
|
|
1591
1633
|
variant: "tertiary"
|
|
1592
1634
|
}),
|
|
1593
|
-
|
|
1635
|
+
v(O, {
|
|
1594
1636
|
onClick: m[13] || (m[13] = (x) => k()),
|
|
1595
1637
|
disabled: e(V).length > 0,
|
|
1596
1638
|
label: "Save"
|
|
@@ -1616,21 +1658,21 @@ const Oe = [
|
|
|
1616
1658
|
}
|
|
1617
1659
|
},
|
|
1618
1660
|
emits: ["update:model-value"],
|
|
1619
|
-
setup(a, { expose:
|
|
1620
|
-
const s = a, l =
|
|
1621
|
-
function i(
|
|
1661
|
+
setup(a, { expose: w, emit: p }) {
|
|
1662
|
+
const s = a, l = p, f = le(), t = P();
|
|
1663
|
+
function i(c) {
|
|
1622
1664
|
f.open({
|
|
1623
|
-
title:
|
|
1665
|
+
title: c.name,
|
|
1624
1666
|
closeButton: !1,
|
|
1625
1667
|
dismissAway: !1,
|
|
1626
1668
|
contentComponent: xt,
|
|
1627
1669
|
contentComponentProps: {
|
|
1628
|
-
preset:
|
|
1670
|
+
preset: c.type,
|
|
1629
1671
|
modelValue: s.modelValue
|
|
1630
1672
|
}
|
|
1631
1673
|
}).onPrimary((k) => l("update:model-value", k));
|
|
1632
1674
|
}
|
|
1633
|
-
function u(
|
|
1675
|
+
function u(c) {
|
|
1634
1676
|
f.open({
|
|
1635
1677
|
title: "Edit rule",
|
|
1636
1678
|
closeButton: !1,
|
|
@@ -1639,29 +1681,29 @@ const Oe = [
|
|
|
1639
1681
|
contentComponentProps: {
|
|
1640
1682
|
triggerType: s.triggerType,
|
|
1641
1683
|
includeOnly: s.includeOnly,
|
|
1642
|
-
modelValue:
|
|
1684
|
+
modelValue: c
|
|
1643
1685
|
}
|
|
1644
1686
|
}).onPrimary((k) => l("update:model-value", k));
|
|
1645
1687
|
}
|
|
1646
|
-
function b(
|
|
1647
|
-
if (
|
|
1648
|
-
const [k] =
|
|
1688
|
+
function b(c) {
|
|
1689
|
+
if (c.type == "CUSTOM") {
|
|
1690
|
+
const [k] = c.rules;
|
|
1649
1691
|
return u(
|
|
1650
1692
|
I.constructEntry(k.property, k.operator, k.equator)
|
|
1651
1693
|
);
|
|
1652
1694
|
}
|
|
1653
|
-
return i(
|
|
1695
|
+
return i(c);
|
|
1654
1696
|
}
|
|
1655
|
-
return
|
|
1697
|
+
return w({
|
|
1656
1698
|
showCustomDialog: u
|
|
1657
|
-
}), (
|
|
1699
|
+
}), (c, k) => {
|
|
1658
1700
|
const V = g("FmButton"), S = g("FmMenuItem"), m = g("FmMenu");
|
|
1659
|
-
return n(),
|
|
1701
|
+
return n(), F(m, {
|
|
1660
1702
|
shift: !0,
|
|
1661
1703
|
placement: "top-start"
|
|
1662
1704
|
}, {
|
|
1663
|
-
"menu-button":
|
|
1664
|
-
|
|
1705
|
+
"menu-button": q(() => [
|
|
1706
|
+
v(V, {
|
|
1665
1707
|
label: "Add condition",
|
|
1666
1708
|
icon: "add",
|
|
1667
1709
|
class: "text-fm-color-primary border-fm-color-primary",
|
|
@@ -1669,10 +1711,10 @@ const Oe = [
|
|
|
1669
1711
|
variant: "secondary"
|
|
1670
1712
|
})
|
|
1671
1713
|
]),
|
|
1672
|
-
default:
|
|
1673
|
-
(n(!0),
|
|
1714
|
+
default: q(() => [
|
|
1715
|
+
(n(!0), h(Y, null, N(e(Oe).filter(
|
|
1674
1716
|
(o) => !a.includeOnly || o.for.includes(a.includeOnly)
|
|
1675
|
-
), (o) => (n(),
|
|
1717
|
+
), (o) => (n(), F(S, {
|
|
1676
1718
|
key: o.name,
|
|
1677
1719
|
"model-value": o.name == e(t),
|
|
1678
1720
|
label: o.name,
|
|
@@ -1683,7 +1725,7 @@ const Oe = [
|
|
|
1683
1725
|
});
|
|
1684
1726
|
};
|
|
1685
1727
|
}
|
|
1686
|
-
}), Ut = /* @__PURE__ */
|
|
1728
|
+
}), Ut = /* @__PURE__ */ U("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " When ", -1), Kt = /* @__PURE__ */ $({
|
|
1687
1729
|
__name: "RuleGroup",
|
|
1688
1730
|
props: {
|
|
1689
1731
|
triggerType: {
|
|
@@ -1698,28 +1740,28 @@ const Oe = [
|
|
|
1698
1740
|
}
|
|
1699
1741
|
},
|
|
1700
1742
|
emits: ["update:model-value"],
|
|
1701
|
-
setup(a, { emit:
|
|
1702
|
-
const
|
|
1703
|
-
() =>
|
|
1743
|
+
setup(a, { emit: w }) {
|
|
1744
|
+
const p = a, s = w, l = _(
|
|
1745
|
+
() => p.modelValue ?? I.scaffoldGroup()
|
|
1704
1746
|
), f = _(() => I.getLogic(l.value)), t = P();
|
|
1705
1747
|
return (i, u) => {
|
|
1706
|
-
const b = g("FmButtonGroup"),
|
|
1707
|
-
return n(),
|
|
1708
|
-
default:
|
|
1709
|
-
|
|
1710
|
-
default:
|
|
1748
|
+
const b = g("FmButtonGroup"), c = g("FmCard");
|
|
1749
|
+
return n(), F(c, { variant: "outlined" }, {
|
|
1750
|
+
default: q(() => [
|
|
1751
|
+
v(c, { class: "border-l-4 border-fm-color-primary p-16 space-y-16" }, {
|
|
1752
|
+
default: q(() => [
|
|
1711
1753
|
Ut,
|
|
1712
|
-
|
|
1754
|
+
v(Ct, {
|
|
1713
1755
|
ref_key: "configuratorRef",
|
|
1714
1756
|
ref: t,
|
|
1715
1757
|
"include-only": a.includeOnly,
|
|
1716
1758
|
"trigger-type": a.triggerType,
|
|
1717
1759
|
"onUpdate:modelValue": u[0] || (u[0] = (k) => s("update:model-value", e(I).setRuleToGroup(e(l), k)))
|
|
1718
1760
|
}, null, 8, ["include-only", "trigger-type"]),
|
|
1719
|
-
(n(!0),
|
|
1761
|
+
(n(!0), h(Y, null, N(e(l).rules, (k, V) => {
|
|
1720
1762
|
var S;
|
|
1721
|
-
return n(),
|
|
1722
|
-
e(be)(k) ? (n(),
|
|
1763
|
+
return n(), h(Y, null, [
|
|
1764
|
+
e(be)(k) ? (n(), F(we, {
|
|
1723
1765
|
"model-value": k,
|
|
1724
1766
|
key: V,
|
|
1725
1767
|
onEdit: (S = e(t)) == null ? void 0 : S.showCustomDialog,
|
|
@@ -1730,7 +1772,7 @@ const Oe = [
|
|
|
1730
1772
|
);
|
|
1731
1773
|
})
|
|
1732
1774
|
}, null, 8, ["model-value", "onEdit"])) : A("", !0),
|
|
1733
|
-
|
|
1775
|
+
v(b, {
|
|
1734
1776
|
class: "w-[200px]",
|
|
1735
1777
|
disabled: Object.keys(e(l).rules).length < 2,
|
|
1736
1778
|
items: [{ label: "And" }, { label: "Or" }],
|