@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.61
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-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
- package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
- package/dist/AuditLogs-VWx8DFKA.js +1991 -0
- package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
- package/dist/Broadcast-6VXz4-IG.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
- package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
- package/dist/Collections-CF_OcAL3.js +540 -0
- package/dist/Credit-BUqGOyp_.js +226 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js +3150 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
- package/dist/Experience-BxiFH_uV.js +225 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-BzYW0LfY.js +300 -0
- package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
- package/dist/Grab-BgiMqwvj.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
- package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
- package/dist/Marketing-Bnijl7lA.js +145 -0
- package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
- package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
- package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
- package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
- package/dist/Mission-Q5_sGgrm.js +304 -0
- package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
- package/dist/Point-BGYFMvev.js +228 -0
- package/dist/Promotion-0acd63nA.js +364 -0
- package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
- package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
- package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
- package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
- package/dist/Setting-CjcnxK34.js +1992 -0
- package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
- package/dist/Store-B8k5YVqU.js +1934 -0
- package/dist/StoreRewards-BW08rwpL.js +534 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
- package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
- package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
- package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
- package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
- package/dist/app-IvbII0ql.js +45026 -0
- package/dist/app.js +1 -1
- package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
- package/dist/campaign-RuIwxc4y.js +253 -0
- package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
- package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
- package/dist/campaign.fn-B_P1MkRV.js +776 -0
- package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
- package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
- package/dist/dto-jwO_sX9I.js +222 -0
- package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
- package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
- package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
- package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
- package/dist/index-B-AMMFfT.js +3419 -0
- package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
- package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
- package/dist/index-Bflu4Rft.js +8884 -0
- package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
- package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
- package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
- package/dist/index-CppLPpqB.js +30933 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
- package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
- package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
- package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
- package/dist/index-wzSeRJAd.js +36 -0
- package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
- package/dist/loading-CivgDw5C.js +215 -0
- package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
- package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
- package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
- package/dist/objectid-CHab6j3r.js +145 -0
- package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
- package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
- package/dist/rule-builder-DANv7Rmz.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-Dbz3FhHK.js +188 -0
- package/dist/timezone-BgVqObBq.js +1151 -0
- package/dist/trigger-CbriUibd.js +213 -0
- package/dist/usePagination-DtNK7W0U.js +223 -0
- package/dist/user-CVapqHfr.js +55 -0
- package/dist/vue-i18n-tpDAnnmD.js +2365 -0
- package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
- package/package.json +13 -5
- package/dist/AuditLogs-C-gCCPvF.js +0 -1887
- package/dist/Broadcast-B2-itjvZ.js +0 -227
- package/dist/Collections-DepGq6WJ.js +0 -465
- package/dist/Credit-D7K0gFwc.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
- package/dist/Experience-FlBX3eyN.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-Cc3D7lKV.js +0 -278
- package/dist/Marketing-D7PXYloN.js +0 -20073
- package/dist/Mission-BSGc9822.js +0 -296
- package/dist/Point-0U4TTdPW.js +0 -226
- package/dist/Promotion-DiUa0GcV.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
- package/dist/Setting-RLI7RgmN.js +0 -1936
- package/dist/Store-gxmv8hWJ.js +0 -1842
- package/dist/StoreRewards-C_6gY_Nk.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-B90wINOO.js +0 -33357
- package/dist/app-DuUxQ1ZP.js +0 -7086
- package/dist/campaign.fn-DKScnmjX.js +0 -758
- package/dist/dto-C5ri8Nws.js +0 -214
- package/dist/index-BCGDOgxb.js +0 -38
- package/dist/index-BCPBmANe.js +0 -3120
- package/dist/index-BN2Uyvj4.js +0 -30038
- package/dist/index-CrbnfAk8.js +0 -8861
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DJwQICyC.js +0 -146
- package/dist/loading-MEQuW9Xa.js +0 -71
- package/dist/objectid-BeZTZYqi.js +0 -145
- package/dist/plugins-KiMuDTPp.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-BTcZx77a.js +0 -89
- package/dist/template-DPpMK30W.js +0 -190
- package/dist/trigger-DLp1bkZP.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-Cq9CGBHZ.js +0 -54
- package/dist/vue-i18n-COzqUgQy.js +0 -2365
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { defineComponent as B, ref as P, onMounted as Q, computed as q, resolveComponent as V, openBlock as d, createElementBlock as F, renderSlot as W, toDisplayString as b, createCommentVNode as f, createBlock as u, unref as e, isRef as G, createVNode as w, normalizeClass as Z, watch as X, withCtx as h, resolveDynamicComponent as R, Fragment as _, createElementVNode as C, createTextVNode as ee } from "vue";
|
|
2
|
+
import { z as te, h as le } from "./app-IvbII0ql.js";
|
|
3
|
+
import { Z as m } from "./zod-D-wiCQRJ.js";
|
|
4
|
+
import { g as oe, f as ae } from "./index-Bflu4Rft.js";
|
|
5
|
+
import { u as T } from "./vue-i18n-tpDAnnmD.js";
|
|
6
|
+
import { s as O } from "./effect--0g8PNyt.js";
|
|
7
|
+
import { p as ne } from "./plugins-P-V4XWmW.js";
|
|
8
|
+
const ie = { class: "flex flex-col gap-8" }, de = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "fm-typo-en-body-lg-600"
|
|
11
|
+
}, se = { key: 1 }, me = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "space-y-16"
|
|
14
|
+
}, re = /* @__PURE__ */ B({
|
|
15
|
+
__name: "ValidityInput",
|
|
16
|
+
props: {
|
|
17
|
+
label: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
type: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: !0
|
|
31
|
+
},
|
|
32
|
+
forCredit: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
helperText: {
|
|
37
|
+
type: String
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:model-value"],
|
|
41
|
+
setup(t, { emit: S }) {
|
|
42
|
+
var U, A;
|
|
43
|
+
const { t: n } = T(), i = t, v = S, a = [
|
|
44
|
+
{ label: n("connect.template.validity_option.date_range"), value: "range" },
|
|
45
|
+
{ label: n("connect.template.validity_option.custom"), value: "custom" }
|
|
46
|
+
], c = P(!1);
|
|
47
|
+
Q(() => {
|
|
48
|
+
c.value = i.modelValue && Object.entries(i.modelValue).filter(
|
|
49
|
+
([r, s]) => r != "followFirstReceive" && s != null
|
|
50
|
+
).length > 0;
|
|
51
|
+
});
|
|
52
|
+
const l = P(
|
|
53
|
+
i.type ? a.find((r) => r.value === i.type) : (U = i.modelValue) != null && U.validBefore || (A = i.modelValue) != null && A.validAfter ? a[0] : a[1]
|
|
54
|
+
), g = q(
|
|
55
|
+
() => i.forCredit ? oe : ae
|
|
56
|
+
), y = q(() => {
|
|
57
|
+
const r = g.value.safeParse(i.modelValue);
|
|
58
|
+
return r.success ? [] : r.error.errors;
|
|
59
|
+
});
|
|
60
|
+
function o(r) {
|
|
61
|
+
v("update:model-value", r);
|
|
62
|
+
}
|
|
63
|
+
function k(r) {
|
|
64
|
+
var s, D;
|
|
65
|
+
if (r.value == "range")
|
|
66
|
+
return o({
|
|
67
|
+
followFirstReceive: (s = i.modelValue) == null ? void 0 : s.followFirstReceive,
|
|
68
|
+
validAfter: void 0,
|
|
69
|
+
validBefore: void 0
|
|
70
|
+
});
|
|
71
|
+
if (r.value == "custom")
|
|
72
|
+
return c.value = !1, o({
|
|
73
|
+
validForDay: (D = i.modelValue) == null ? void 0 : D.validForDay
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return (r, s) => {
|
|
77
|
+
var $, j, E, M, N, L, z, H;
|
|
78
|
+
const D = V("FmButtonGroup"), Y = V("FmSimpleDateRangePicker"), J = V("FmSwitch"), K = V("FmStepperField"), I = V("FmHelperText");
|
|
79
|
+
return d(), F("div", ie, [
|
|
80
|
+
W(r.$slots, "label", {}, () => [
|
|
81
|
+
t.label ? (d(), F("div", de, b(t.label), 1)) : f("", !0)
|
|
82
|
+
]),
|
|
83
|
+
t.type ? f("", !0) : (d(), u(D, {
|
|
84
|
+
key: 0,
|
|
85
|
+
modelValue: e(l),
|
|
86
|
+
"onUpdate:modelValue": [
|
|
87
|
+
s[0] || (s[0] = (p) => G(l) ? l.value = p : null),
|
|
88
|
+
s[1] || (s[1] = (p) => k(p))
|
|
89
|
+
],
|
|
90
|
+
items: a
|
|
91
|
+
}, null, 8, ["modelValue"])),
|
|
92
|
+
e(l).value === "range" ? (d(), F("div", se, [
|
|
93
|
+
w(Y, {
|
|
94
|
+
"model-value": {
|
|
95
|
+
startDate: ($ = t.modelValue) != null && $.validAfter ? new Date((j = t.modelValue) == null ? void 0 : j.validAfter).toISOString() : null,
|
|
96
|
+
endDate: (E = t.modelValue) != null && E.validAfter ? new Date(((M = t.modelValue) == null ? void 0 : M.validBefore) || "").toISOString() : null
|
|
97
|
+
},
|
|
98
|
+
"onUpdate:modelValue": s[2] || (s[2] = (p) => {
|
|
99
|
+
var x;
|
|
100
|
+
o({
|
|
101
|
+
followFirstReceive: (x = i.modelValue) == null ? void 0 : x.followFirstReceive,
|
|
102
|
+
validAfter: new Date(p.startDate).toISOString(),
|
|
103
|
+
validBefore: new Date(p.endDate).toISOString()
|
|
104
|
+
});
|
|
105
|
+
})
|
|
106
|
+
}, null, 8, ["model-value"])
|
|
107
|
+
])) : e(l).value === "custom" ? (d(), F("div", me, [
|
|
108
|
+
t.forCredit ? f("", !0) : (d(), u(J, {
|
|
109
|
+
key: 0,
|
|
110
|
+
"model-value": e(c),
|
|
111
|
+
label: e(n)("connect.template.validity_option.expire"),
|
|
112
|
+
"label-placement": "right",
|
|
113
|
+
"onUpdate:modelValue": s[3] || (s[3] = (p) => {
|
|
114
|
+
var x;
|
|
115
|
+
c.value = p, o({
|
|
116
|
+
validForDay: p ? 1 : void 0,
|
|
117
|
+
followFirstReceive: (x = i.modelValue) == null ? void 0 : x.followFirstReceive
|
|
118
|
+
});
|
|
119
|
+
})
|
|
120
|
+
}, null, 8, ["model-value", "label"])),
|
|
121
|
+
e(c) || t.forCredit ? (d(), u(K, {
|
|
122
|
+
key: 1,
|
|
123
|
+
label: e(n)("connect.template.validity_option.after_day"),
|
|
124
|
+
class: Z([{
|
|
125
|
+
"opacity-50 pointer-events-none": !e(c) && !t.forCredit
|
|
126
|
+
}, "mt-[-4px]"]),
|
|
127
|
+
"max-fraction-digits": 0,
|
|
128
|
+
disabled: !e(c) && !t.forCredit,
|
|
129
|
+
"show-steppers": !1,
|
|
130
|
+
max: 99999,
|
|
131
|
+
"append-text": e(n)("connect.template.validity_option.days"),
|
|
132
|
+
"model-value": ((N = i.modelValue) == null ? void 0 : N.validForDay) ?? null,
|
|
133
|
+
"onUpdate:modelValue": s[4] || (s[4] = (p) => {
|
|
134
|
+
var x;
|
|
135
|
+
return o({
|
|
136
|
+
validForDay: p == null ? void 0 : parseInt(p.toString()),
|
|
137
|
+
followFirstReceive: (x = i.modelValue) == null ? void 0 : x.followFirstReceive
|
|
138
|
+
});
|
|
139
|
+
})
|
|
140
|
+
}, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : f("", !0)
|
|
141
|
+
])) : f("", !0),
|
|
142
|
+
((L = i.modelValue) == null ? void 0 : L.followFirstReceive) === !0 && e(c) ? (d(), u(I, {
|
|
143
|
+
key: 3,
|
|
144
|
+
text: e(n)("connect.template.validity_option.expire_follow_first_receive")
|
|
145
|
+
}, null, 8, ["text"])) : f("", !0),
|
|
146
|
+
w(I, {
|
|
147
|
+
text: t.helperText || (((z = i.modelValue) == null ? void 0 : z.validForDay) === 0 ? e(n)("connect.template.validity_option.expires_on_same_day") : e(m).helperText(e(y), "")),
|
|
148
|
+
state: t.helperText ? "error" : ((H = i.modelValue) == null ? void 0 : H.validForDay) === 0 ? "warning" : e(m).helperState(e(y), "")
|
|
149
|
+
}, null, 8, ["text", "state"])
|
|
150
|
+
]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}), ue = { class: "space-y-8" }, Se = /* @__PURE__ */ B({
|
|
154
|
+
__name: "CollectibleOptionInput",
|
|
155
|
+
props: {
|
|
156
|
+
modelValue: {
|
|
157
|
+
type: Object
|
|
158
|
+
},
|
|
159
|
+
noCampaign: {
|
|
160
|
+
type: Boolean
|
|
161
|
+
},
|
|
162
|
+
schema: {
|
|
163
|
+
type: Object,
|
|
164
|
+
default: () => te.any()
|
|
165
|
+
},
|
|
166
|
+
isMission: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
default: !1
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
emits: ["update:model-value"],
|
|
172
|
+
setup(t, { emit: S }) {
|
|
173
|
+
const { t: n } = T(), i = t, v = S, a = P(i.modelValue ?? {});
|
|
174
|
+
return X(a, () => v("update:model-value", a.value)), (c, l) => {
|
|
175
|
+
const g = V("FmSwitch"), y = V("FmStepperField");
|
|
176
|
+
return d(), F("div", ue, [
|
|
177
|
+
t.isMission ? f("", !0) : (d(), u(g, {
|
|
178
|
+
key: 0,
|
|
179
|
+
label: e(n)("connect.template.enable_transfer"),
|
|
180
|
+
"label-placement": "right",
|
|
181
|
+
modelValue: e(a).enableTransfer,
|
|
182
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => e(a).enableTransfer = o)
|
|
183
|
+
}, null, 8, ["label", "modelValue"])),
|
|
184
|
+
t.noCampaign ? f("", !0) : (d(), F("div", {
|
|
185
|
+
key: 1,
|
|
186
|
+
class: Z(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
|
|
187
|
+
}, [
|
|
188
|
+
w(y, {
|
|
189
|
+
modelValue: e(a).maxPerUser,
|
|
190
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => e(a).maxPerUser = o),
|
|
191
|
+
"show-steppers": !1,
|
|
192
|
+
rules: [e(m).ruleAtPath(t.schema, "maxPerUser")],
|
|
193
|
+
"helper-text": e(n)("connect.template.leave_empty_unlimited")
|
|
194
|
+
}, {
|
|
195
|
+
label: h(() => [
|
|
196
|
+
(d(), u(R(
|
|
197
|
+
e(m).toInputLabel(
|
|
198
|
+
e(m).typeAtPath(t.schema, "maxPerUser"),
|
|
199
|
+
e(n)("connect.template.max_per_user")
|
|
200
|
+
)
|
|
201
|
+
)))
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["modelValue", "rules", "helper-text"]),
|
|
205
|
+
t.isMission ? f("", !0) : (d(), u(y, {
|
|
206
|
+
key: 0,
|
|
207
|
+
modelValue: e(a).maxReceive,
|
|
208
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => e(a).maxReceive = o),
|
|
209
|
+
"show-steppers": !1,
|
|
210
|
+
rules: [e(m).ruleAtPath(t.schema, "maxReceive")],
|
|
211
|
+
"helper-text": e(n)("connect.template.leave_empty_unlimited")
|
|
212
|
+
}, {
|
|
213
|
+
label: h(() => [
|
|
214
|
+
(d(), u(R(
|
|
215
|
+
e(m).toInputLabel(
|
|
216
|
+
e(m).typeAtPath(t.schema, "maxReceive"),
|
|
217
|
+
e(n)("connect.template.max_distribute")
|
|
218
|
+
)
|
|
219
|
+
)))
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
}, 8, ["modelValue", "rules", "helper-text"]))
|
|
223
|
+
], 2)),
|
|
224
|
+
t.isMission ? f("", !0) : (d(), F(_, { key: 2 }, [
|
|
225
|
+
w(y, {
|
|
226
|
+
modelValue: e(a).maxUse,
|
|
227
|
+
"onUpdate:modelValue": l[3] || (l[3] = (o) => e(a).maxUse = o),
|
|
228
|
+
"append-text": "use(s)",
|
|
229
|
+
"show-steppers": !1,
|
|
230
|
+
rules: [e(m).ruleAtPath(t.schema, "maxUse")]
|
|
231
|
+
}, {
|
|
232
|
+
label: h(() => [
|
|
233
|
+
(d(), u(R(
|
|
234
|
+
e(m).toInputLabel(
|
|
235
|
+
e(m).typeAtPath(t.schema, "maxUse"),
|
|
236
|
+
e(n)("connect.template.usage_count")
|
|
237
|
+
)
|
|
238
|
+
)))
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["modelValue", "rules"]),
|
|
242
|
+
e(a).maxUse && e(a).maxUse > 1 ? (d(), u(y, {
|
|
243
|
+
key: 0,
|
|
244
|
+
modelValue: e(a).cooldown,
|
|
245
|
+
"onUpdate:modelValue": l[4] || (l[4] = (o) => e(a).cooldown = o),
|
|
246
|
+
"append-text": "minute(s)",
|
|
247
|
+
"show-steppers": !1,
|
|
248
|
+
rules: [e(m).ruleAtPath(t.schema, "cooldown")]
|
|
249
|
+
}, {
|
|
250
|
+
label: h(() => [
|
|
251
|
+
(d(), u(R(
|
|
252
|
+
e(m).toInputLabel(
|
|
253
|
+
e(m).typeAtPath(t.schema, "cooldown"),
|
|
254
|
+
e(n)("connect.template.cooldown")
|
|
255
|
+
)
|
|
256
|
+
)))
|
|
257
|
+
]),
|
|
258
|
+
_: 1
|
|
259
|
+
}, 8, ["modelValue", "rules"])) : f("", !0),
|
|
260
|
+
w(re, {
|
|
261
|
+
modelValue: e(a).validityOption,
|
|
262
|
+
"onUpdate:modelValue": l[5] || (l[5] = (o) => e(a).validityOption = o),
|
|
263
|
+
label: e(n)("connect.template.validity_option.title")
|
|
264
|
+
}, null, 8, ["modelValue", "label"])
|
|
265
|
+
], 64))
|
|
266
|
+
]);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}), ce = { class: "space-y-8" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = {
|
|
270
|
+
key: 1,
|
|
271
|
+
class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
|
|
272
|
+
}, ve = { class: "fm-typo-en-body-lg-400" }, ye = { class: "text-fm-color-typo-secondary" }, Ue = /* @__PURE__ */ B({
|
|
273
|
+
__name: "EffectSheet",
|
|
274
|
+
props: {
|
|
275
|
+
modelValue: { type: Object },
|
|
276
|
+
canSetAutoApply: {
|
|
277
|
+
type: Boolean
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
emits: ["update:model-value"],
|
|
281
|
+
setup(t, { emit: S }) {
|
|
282
|
+
const { t: n } = T(), i = S, v = P(!1);
|
|
283
|
+
async function a(c) {
|
|
284
|
+
c.stopPropagation(), await ne.remove(n("connect.effect.removeConfirm")) && i("update:model-value", null);
|
|
285
|
+
}
|
|
286
|
+
return (c, l) => {
|
|
287
|
+
const g = V("FmButton"), y = V("FmSideSheet");
|
|
288
|
+
return d(), u(y, {
|
|
289
|
+
"max-width": 550,
|
|
290
|
+
header: e(n)("connect.effect.title"),
|
|
291
|
+
modelValue: e(v),
|
|
292
|
+
"onUpdate:modelValue": [
|
|
293
|
+
l[2] || (l[2] = (o) => G(v) ? v.value = o : null),
|
|
294
|
+
l[3] || (l[3] = (o) => v.value = o)
|
|
295
|
+
]
|
|
296
|
+
}, {
|
|
297
|
+
"side-sheet-button": h(() => {
|
|
298
|
+
var o, k, U, A;
|
|
299
|
+
return [
|
|
300
|
+
C("div", ce, [
|
|
301
|
+
C("div", pe, b(e(n)("connect.effect.description")), 1),
|
|
302
|
+
t.modelValue ? (d(), F("div", fe, [
|
|
303
|
+
C("div", ve, [
|
|
304
|
+
C("div", null, b((o = e(O)(t.modelValue)) == null ? void 0 : o.type), 1),
|
|
305
|
+
C("div", ye, b((k = e(O)(t.modelValue)) == null ? void 0 : k.adjustment) + " " + b(e(n)("connect.effect.with")) + " " + b((U = e(O)(t.modelValue)) == null ? void 0 : U.requirements) + " " + b((A = e(O)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
|
|
306
|
+
]),
|
|
307
|
+
w(g, {
|
|
308
|
+
icon: "delete",
|
|
309
|
+
"icon-color": "neutral-gray-400",
|
|
310
|
+
variant: "tertiary",
|
|
311
|
+
onClick: a
|
|
312
|
+
})
|
|
313
|
+
])) : (d(), u(g, {
|
|
314
|
+
key: 0,
|
|
315
|
+
label: e(n)("connect.effect.title"),
|
|
316
|
+
icon: "add",
|
|
317
|
+
"icon-color": "primary",
|
|
318
|
+
variant: "secondary",
|
|
319
|
+
class: "border-fm-color-primary text-fm-color-primary"
|
|
320
|
+
}, null, 8, ["label"]))
|
|
321
|
+
])
|
|
322
|
+
];
|
|
323
|
+
}),
|
|
324
|
+
"side-sheet-footer": h(() => [...l[4] || (l[4] = [
|
|
325
|
+
ee(b(void 0), -1)
|
|
326
|
+
])]),
|
|
327
|
+
default: h(() => [
|
|
328
|
+
w(e(le), {
|
|
329
|
+
class: "fm-effect-sheet",
|
|
330
|
+
title: "",
|
|
331
|
+
"can-set-auto-apply": t.canSetAutoApply,
|
|
332
|
+
"disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
|
|
333
|
+
"initial-value": t.modelValue,
|
|
334
|
+
onOnConfirm: l[0] || (l[0] = (o) => (i("update:model-value", o), v.value = !1)),
|
|
335
|
+
onOnCancel: l[1] || (l[1] = (o) => v.value = !1)
|
|
336
|
+
}, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
|
|
337
|
+
]),
|
|
338
|
+
_: 1
|
|
339
|
+
}, 8, ["header", "modelValue"]);
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
export {
|
|
344
|
+
Ue as _,
|
|
345
|
+
Se as a,
|
|
346
|
+
re as b
|
|
347
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as h, createVNode as i, unref as o, createElementVNode as n, withCtx as x, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as g, h as q } from "vue";
|
|
2
|
+
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as Q } from "./plugins-P-V4XWmW.js";
|
|
5
|
+
import { u as W } from "./loading-CivgDw5C.js";
|
|
6
|
+
import { u as X } from "./business-BFIwFfkq.js";
|
|
7
|
+
import { u as Y } from "./campaign-w9j4I4jn.js";
|
|
8
|
+
import { b as L, c as V, a as Z } from "./campaign-RuIwxc4y.js";
|
|
9
|
+
import { u as ee } from "./vue-i18n-tpDAnnmD.js";
|
|
10
|
+
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
|
|
12
|
+
import { u as ae } from "./template-Dbz3FhHK.js";
|
|
13
|
+
import { c as y } from "./index-DpjYgKTN.js";
|
|
14
|
+
const ne = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, 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: "flex flex-col gap-16 text-center" }, ue = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ E({
|
|
15
|
+
__name: "Experience",
|
|
16
|
+
setup(ge) {
|
|
17
|
+
const { t: r } = ee(), P = {
|
|
18
|
+
label: r("connect.program.common.actions.create", {
|
|
19
|
+
type: r("connect.program.experience.title").toLowerCase()
|
|
20
|
+
}),
|
|
21
|
+
value: "create",
|
|
22
|
+
isPrimary: !0,
|
|
23
|
+
prependIcon: "add"
|
|
24
|
+
}, B = ae("POINT", G()), I = X(), d = Y(), { global: T, minor: b } = W, s = S({
|
|
25
|
+
searchKey: "",
|
|
26
|
+
location: []
|
|
27
|
+
});
|
|
28
|
+
function $(e) {
|
|
29
|
+
const t = s.value.location;
|
|
30
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
31
|
+
var c;
|
|
32
|
+
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
+
}) : e.targetLocation.includes(t);
|
|
34
|
+
}
|
|
35
|
+
const u = U(
|
|
36
|
+
() => d.campaigns.experience.filter((e) => $(e))
|
|
37
|
+
), K = [
|
|
38
|
+
{
|
|
39
|
+
header: "Program title",
|
|
40
|
+
accessorFn: (e) => e.name
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
header: "Status",
|
|
44
|
+
accessorFn: (e) => Z(e),
|
|
45
|
+
cell(e) {
|
|
46
|
+
return L(e.row.original);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: "Summary",
|
|
51
|
+
accessorFn: (e) => V(e)
|
|
52
|
+
//v.effect,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
header: "Actions",
|
|
56
|
+
cell(e) {
|
|
57
|
+
return q(J.FmButton, {
|
|
58
|
+
variant: "tertiary",
|
|
59
|
+
icon: "delete",
|
|
60
|
+
iconColor: "neutral-gray-400",
|
|
61
|
+
onClick: (t) => {
|
|
62
|
+
t.stopPropagation(), v(e.row.original);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
], C = S();
|
|
68
|
+
async function v(e) {
|
|
69
|
+
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await b(
|
|
70
|
+
async () => {
|
|
71
|
+
await y.delete(e._id), await d.read("POINT");
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
message: `Removing ${e.name}`,
|
|
75
|
+
successMessage: `Removed ${e.name} successfully`
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
async function f(e) {
|
|
80
|
+
e ? await t() : B.open(async (l) => {
|
|
81
|
+
await t(l);
|
|
82
|
+
});
|
|
83
|
+
async function t(l) {
|
|
84
|
+
var c;
|
|
85
|
+
(c = C.value) == null || c.showSheet(
|
|
86
|
+
!0,
|
|
87
|
+
"POINT",
|
|
88
|
+
e ? await y.readById(e._id) : void 0,
|
|
89
|
+
l
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async function N(e) {
|
|
94
|
+
await b(
|
|
95
|
+
async () => {
|
|
96
|
+
e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await d.read("POINT");
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
message: r("connect.program.common.update.updating", {
|
|
100
|
+
type: r("connect.program.experience.title")
|
|
101
|
+
}),
|
|
102
|
+
successMessage: r("connect.program.common.update.success", {
|
|
103
|
+
type: r("connect.program.experience.title"),
|
|
104
|
+
action: e.campaign._id ? "updated" : "created"
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return j(async () => {
|
|
110
|
+
await T(async () => {
|
|
111
|
+
await d.read("POINT");
|
|
112
|
+
});
|
|
113
|
+
}), (e, t) => {
|
|
114
|
+
const l = m("FmPageHead"), c = m("FmSearch"), A = m("FmTable"), F = m("FmButton"), O = m("FmListItem"), R = m("FmList"), D = m("FmCard");
|
|
115
|
+
return p(), _(h, null, [
|
|
116
|
+
i(l, {
|
|
117
|
+
title: o(r)("connect.program.experience.title"),
|
|
118
|
+
actions: o(u).length > 0 ? [P] : [],
|
|
119
|
+
"onClick:action": t[0] || (t[0] = () => f())
|
|
120
|
+
}, null, 8, ["title", "actions"]),
|
|
121
|
+
n("div", ne, [
|
|
122
|
+
i(c, {
|
|
123
|
+
modelValue: o(s).searchKey,
|
|
124
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(s).searchKey = a),
|
|
125
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
126
|
+
placeholder: o(r)("connect.program.common.search"),
|
|
127
|
+
collapsible: ""
|
|
128
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
129
|
+
o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(h, { key: 0 }, [
|
|
130
|
+
n("div", re, [
|
|
131
|
+
n("div", se, [
|
|
132
|
+
i(te, {
|
|
133
|
+
label: `${o(r)("connect.common.location")}: `,
|
|
134
|
+
"right-icon": "keyboard_arrow_down",
|
|
135
|
+
modelValue: o(s).location,
|
|
136
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(s).location = a),
|
|
137
|
+
icon: "storefront",
|
|
138
|
+
"show-item-label": !0,
|
|
139
|
+
items: o(I).locationOptions
|
|
140
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
141
|
+
]),
|
|
142
|
+
i(c, {
|
|
143
|
+
modelValue: o(s).searchKey,
|
|
144
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(s).searchKey = a),
|
|
145
|
+
class: "xs:hidden sm:hidden",
|
|
146
|
+
placeholder: "search",
|
|
147
|
+
collapsible: ""
|
|
148
|
+
}, null, 8, ["modelValue"])
|
|
149
|
+
]),
|
|
150
|
+
i(A, {
|
|
151
|
+
class: "xs:hidden sm:hidden",
|
|
152
|
+
"row-data": o(u),
|
|
153
|
+
"column-defs": K,
|
|
154
|
+
"search-value": o(s).searchKey,
|
|
155
|
+
"column-filter": [],
|
|
156
|
+
onRowClick: t[4] || (t[4] = (a) => f(a.original)),
|
|
157
|
+
"hide-footer": o(u).length < 10
|
|
158
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
159
|
+
i(R, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
160
|
+
default: x(() => [
|
|
161
|
+
(p(!0), _(h, null, M(o(u).filter(
|
|
162
|
+
(a) => a.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
|
|
163
|
+
), (a) => (p(), w(O, {
|
|
164
|
+
key: a._id.toString(),
|
|
165
|
+
onClick: (k) => f(a),
|
|
166
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
167
|
+
}, {
|
|
168
|
+
default: x(() => [
|
|
169
|
+
n("div", ie, [
|
|
170
|
+
n("div", ce, [
|
|
171
|
+
(p(), w(H(o(L)(a))))
|
|
172
|
+
]),
|
|
173
|
+
n("div", le, [
|
|
174
|
+
n("div", me, g(a.name), 1),
|
|
175
|
+
n("div", de, g(o(V)(a)), 1)
|
|
176
|
+
])
|
|
177
|
+
]),
|
|
178
|
+
i(F, {
|
|
179
|
+
icon: "delete",
|
|
180
|
+
"icon-color": "neutral-gray-400",
|
|
181
|
+
variant: "tertiary",
|
|
182
|
+
onClick: (k) => (k.stopPropagation(), v(a))
|
|
183
|
+
}, null, 8, ["onClick"])
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["onClick"]))), 128))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
})
|
|
190
|
+
], 64)) : (p(), w(D, {
|
|
191
|
+
key: 1,
|
|
192
|
+
variant: "outlined",
|
|
193
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
194
|
+
}, {
|
|
195
|
+
default: x(() => [
|
|
196
|
+
t[6] || (t[6] = n("img", {
|
|
197
|
+
src: z,
|
|
198
|
+
class: "aspect-square w-[150px]"
|
|
199
|
+
}, null, -1)),
|
|
200
|
+
n("div", pe, [
|
|
201
|
+
n("div", ue, g(o(r)("connect.program.experience.empty_state.title")), 1),
|
|
202
|
+
n("div", fe, g(o(r)("connect.program.experience.empty_state.description")), 1)
|
|
203
|
+
]),
|
|
204
|
+
i(F, {
|
|
205
|
+
variant: "primary",
|
|
206
|
+
label: "Create experience program",
|
|
207
|
+
icon: "add",
|
|
208
|
+
onClick: t[5] || (t[5] = (a) => f())
|
|
209
|
+
})
|
|
210
|
+
]),
|
|
211
|
+
_: 1
|
|
212
|
+
})),
|
|
213
|
+
i(oe, {
|
|
214
|
+
ref_key: "sheetRef",
|
|
215
|
+
ref: C,
|
|
216
|
+
"onSubmit:modelValue": N
|
|
217
|
+
}, null, 512)
|
|
218
|
+
])
|
|
219
|
+
], 64);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
export {
|
|
224
|
+
Pe as default
|
|
225
|
+
};
|