@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.2
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-BjSfI2Ff.js +761 -0
- package/dist/{App-Bpo0XZSs.js → App-D11A2JY1.js} +364 -352
- package/dist/AuditLogs-DWCFYoRg.js +1887 -0
- package/dist/{Bin-ohZ2CZZR.js → Bin-9wV4Ah3M.js} +8 -8
- package/dist/{Broadcast-D5x0_-zC.js → Broadcast-I3BtSk8V.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js} +18 -18
- package/dist/{Card-BM-Lrm5y.js → Card-CqALG5RM.js} +159 -159
- package/dist/{Collections-Cr4aoJer.js → Collections-rg3SzoUb.js} +103 -91
- package/dist/{Credit-DzDVFv4H.js → Credit-BNn1sYZv.js} +74 -74
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js} +491 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js} +91 -89
- package/dist/{Experience-CjaDdbvZ.js → Experience-D_Qm8SUj.js} +41 -41
- package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
- package/dist/{Game-BuiTygow.js → Game-CKXgXm6Q.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/{Index-CQGzUU-w.js → Index-D4DGfUHd.js} +10 -10
- package/dist/Marketing-Dn9A1vgH.js +20073 -0
- package/dist/Member-B55vWHDd.js +279 -0
- package/dist/MemberList-BWTG9Ohy.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-CP5EI-W0.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +60279 -0
- package/dist/{Mission-BtypT2uF.js → Mission-CFvhROuB.js} +21 -21
- package/dist/{Overview-Be7bUtRO.js → Overview-4273yNwL.js} +335 -335
- package/dist/{Point-Bw4lnLqp.js → Point-B_-_C919.js} +41 -41
- package/dist/Promotion-D2S3COxk.js +289 -0
- package/dist/{Queue-CpPEVgn8.js → Queue-BmS1Oi-C.js} +52 -52
- package/dist/{Record-DQq4P69i.js → Record-DRBl0M8g.js} +9 -9
- package/dist/{Reward-DJH0eM8u.js → Reward-8056NmfK.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js} +635 -548
- package/dist/Segment-Bzq-pyhc.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js} +3 -3
- package/dist/{Setting-GRIUo7vg.js → Setting-BrJfYoru.js} +432 -432
- package/dist/{Store-H0UDQpln.js → Store-Bpl_4yZW.js} +211 -211
- package/dist/StoreRewards-Cu7n7Pjz.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js} +1 -1
- package/dist/{Tier-CJufQcIz.js → Tier-_LnXg3n6.js} +106 -106
- package/dist/{Title-BBMgGUld.js → Title-B7AGStvx.js} +133 -131
- package/dist/{Transaction-DsucPnfp.js → Transaction-Chxv6V7u.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js} +6 -6
- package/dist/{Voucher-BPvxKO_w.js → Voucher-C5z2kOq9.js} +153 -123
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js} +1 -1
- package/dist/{app-D3MT1deX.js → app-7cvPyHJ7.js} +164 -125
- package/dist/{app-Bo0JpadQ.js → app-BVojNX0w.js} +1 -1
- package/dist/app.js +4 -3
- package/dist/business-CmxV69wT.js +79 -0
- package/dist/{campaign-Z3l7BoMg.js → campaign-CT_cNJEL.js} +9 -9
- package/dist/{campaign-j1c3ou7l.js → campaign-Dq5C_no-.js} +5 -3
- package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-dp7yHKzF.js} +1 -1
- package/dist/campaign.fn-BYZgKDN7.js +758 -0
- package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-DxbB4DxT.js} +1 -1
- package/dist/{collection.fn-Bz38mGMa.js → collection.fn-CNZRdUgy.js} +2 -2
- package/dist/{dto-D648NN4s.js → dto-CT9zZbv9.js} +4 -4
- package/dist/{effect-DbMAmVSR.js → effect-FIlOEC4H.js} +1 -1
- package/dist/{email-addresses-KOVDrRiK.js → email-addresses-Ba7xImfX.js} +1 -1
- package/dist/{export-cTZf8Avd.js → export-uzjZFNF9.js} +3 -3
- package/dist/{helper-BYyfcLqw.js → helper-D4sAZde0.js} +1 -1
- package/dist/{index-BIaCtk8e.js → index-B9pl4zRZ.js} +192 -79
- package/dist/{index-B4MqsaBz.js → index-BI3m1Ehv.js} +3 -3
- package/dist/{index-E-0tTd0_.js → index-BXz54M1s.js} +1 -1
- package/dist/{index-BMl2KZts.js → index-BjU8LVUC.js} +11447 -10969
- package/dist/index-CH3z92VV.js +31 -0
- package/dist/{index-BTb8I_eB.js → index-CNJLP3D5.js} +1 -1
- package/dist/{index-BrKXRxe_.js → index-CONvJfKv.js} +1 -1
- package/dist/index-CS3Jmojj.js +32260 -0
- package/dist/{index-CTPMbFf5.js → index-CUfS9Kp1.js} +10 -9
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-nF9iYTlh.js → index-CvBcve-r.js} +1 -1
- package/dist/index-CwsMG2cV.js +56 -0
- package/dist/{index-B3p0hmIV.js → index-D5rvMvzx.js} +1 -1
- package/dist/{index-CvoShC5J.js → index-DNxa8Rqx.js} +536 -461
- package/dist/{index-DPBHiqsJ.js → index-l2F5MnLF.js} +1 -1
- package/dist/{index.esm2017-DFYwde30.js → index.esm2017-ATcsD5N4.js} +127 -127
- package/dist/{loading-vUArhX_O.js → loading-BWGQSrCB.js} +1 -1
- package/dist/{membership-BHKv29yt.js → membership-Cc4OZ8-U.js} +3 -3
- package/dist/{money-Bl3_QRkE.js → money-D7p8nfun.js} +1 -1
- package/dist/{number-hh_S9w7k.js → number-CMJjC4qz.js} +1 -1
- package/dist/objectid-D5T27iny.js +145 -0
- package/dist/{plugins-CVes2wzE.js → plugins-eQis66QR.js} +2 -2
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/{reward-ANZOdWzf.js → reward-DrnzbG20.js} +1 -1
- package/dist/{rule-BvFk5bQg.js → rule-CtRxkYXB.js} +3 -3
- package/dist/{rule-builder-BSN777PN.js → rule-builder-Di9RIYHF.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-Dh9lDLs_.js → template-C3UfY0v5.js} +64 -64
- package/dist/{trigger-C7THbt7R.js → trigger-C9U7Zgad.js} +7 -7
- package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
- package/dist/{user-DtNR9JY2.js → user-D7n9yYmO.js} +1 -1
- package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-Bz45zC04.js} +387 -387
- package/dist/{xlsx-7u9SB0oa.js → xlsx-D4S4qbcZ.js} +226 -226
- package/package.json +9 -3
- package/dist/Analytic-CavR2bzs.js +0 -427
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/Marketing-BSspYuhg.js +0 -319
- package/dist/Member-B4S0UNGq.js +0 -287
- package/dist/MemberList-CfnUJ3mh.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js +0 -455
- package/dist/Promotion-Bg6x0rAh.js +0 -255
- package/dist/Segment-BLB4VWNJ.js +0 -882
- package/dist/StoreRewards--TNIFaCo.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
- package/dist/business-DMALI7ZO.js +0 -78
- package/dist/campaign.fn-rsRhHYZP.js +0 -758
- package/dist/index-BsCGyJMY.js +0 -29566
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DFKmjCG1.js +0 -44
- package/dist/index-Dbd4WA4r.js +0 -61
- package/dist/objectid-CEyMlMge.js +0 -145
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h as S } from "./moment-BWErdI6_.js";
|
|
2
2
|
import { a as de, b as N, c as y } from "./tslib.es6-BCqqvLQ_.js";
|
|
3
|
-
import { u as ee } from "./membership-
|
|
4
|
-
import { R as B, a as pe } from "./rule-builder-
|
|
5
|
-
import { u as Be } from "./business-
|
|
3
|
+
import { u as ee } from "./membership-Cc4OZ8-U.js";
|
|
4
|
+
import { R as B, a as pe } from "./rule-builder-Di9RIYHF.js";
|
|
5
|
+
import { u as Be } from "./business-CmxV69wT.js";
|
|
6
6
|
var ue = [
|
|
7
7
|
"MO",
|
|
8
8
|
"TU",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as i } from "./index-CUfS9Kp1.js";
|
|
2
2
|
function a(c, t) {
|
|
3
|
-
let r = "",
|
|
4
|
-
const e =
|
|
5
|
-
for (let
|
|
6
|
-
r +=
|
|
3
|
+
let r = "", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
4
|
+
const e = n.length;
|
|
5
|
+
for (let s = 0; s < c; s++)
|
|
6
|
+
r += n.charAt(Math.floor(Math.random() * e));
|
|
7
7
|
return r;
|
|
8
8
|
}
|
|
9
9
|
function p(c) {
|
|
@@ -28,12 +28,12 @@ class o {
|
|
|
28
28
|
negated: !1
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
static constructEntry(t, r,
|
|
31
|
+
static constructEntry(t, r, n, e) {
|
|
32
32
|
return {
|
|
33
33
|
name: e ?? `e_${a(4)}`,
|
|
34
34
|
property: t,
|
|
35
35
|
conditions: {
|
|
36
|
-
[r]:
|
|
36
|
+
[r]: n
|
|
37
37
|
},
|
|
38
38
|
negated: !1
|
|
39
39
|
};
|
|
@@ -42,29 +42,29 @@ class o {
|
|
|
42
42
|
return (t.logic ?? "").includes("||") ? "||" : "&&";
|
|
43
43
|
}
|
|
44
44
|
static constructLogic(t, r) {
|
|
45
|
-
const
|
|
46
|
-
return Object.entries(t.rules).map(([e,
|
|
45
|
+
const n = r ?? o.getLogic(t);
|
|
46
|
+
return Object.entries(t.rules).map(([e, s]) => p(s) ? e : `${s.negated ? "!" : ""}${e}`).join(` ${n} `);
|
|
47
47
|
}
|
|
48
|
-
static setRuleToGroup(t, r,
|
|
48
|
+
static setRuleToGroup(t, r, n) {
|
|
49
49
|
let e = i.cloneDeep(t);
|
|
50
|
-
return Object.keys(e.rules).length === 0 && (e = o.scaffoldGroup(e.name)), Array.isArray(r) ? r.forEach((
|
|
51
|
-
e.rules[
|
|
52
|
-
}) : e.rules[r.name] = r, e.logic = o.constructLogic(e,
|
|
50
|
+
return Object.keys(e.rules).length === 0 && (e = o.scaffoldGroup(e.name)), Array.isArray(r) ? r.forEach((s) => {
|
|
51
|
+
e.rules[s.name] = s;
|
|
52
|
+
}) : e.rules[r.name] = r, e.logic = o.constructLogic(e, n), e;
|
|
53
53
|
}
|
|
54
|
-
static removeEntry(t, r,
|
|
54
|
+
static removeEntry(t, r, n) {
|
|
55
55
|
const e = i.cloneDeep(t);
|
|
56
|
-
return delete e.rules[r], e.logic = o.constructLogic(e,
|
|
56
|
+
return delete e.rules[r], e.logic = o.constructLogic(e, n), e;
|
|
57
57
|
}
|
|
58
58
|
static constructRule(t) {
|
|
59
59
|
switch (t.type) {
|
|
60
60
|
case "timeframe": {
|
|
61
|
-
const r = t.property,
|
|
61
|
+
const r = t.property, n = o.scaffoldGroup("timeframe"), e = [];
|
|
62
62
|
return (t.start || t.end) && e.push(
|
|
63
63
|
o.constructEntry(r, "_isBetween", {
|
|
64
64
|
start: t.start || void 0,
|
|
65
65
|
end: t.end || void 0
|
|
66
66
|
})
|
|
67
|
-
), o.setRuleToGroup(
|
|
67
|
+
), o.setRuleToGroup(n, e, "&&");
|
|
68
68
|
}
|
|
69
69
|
default:
|
|
70
70
|
throw Error("invalid config type");
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.json-viewer[data-v-d8502b13]{font-family:monospace;white-space:pre-wrap}.fm-effect-sheet>div{padding:0!important;border-radius:0!important}.fm-effect-sheet>div>div>div{padding:0!important}.unlayer-editor[data-v-a9a2bb94]{flex:1;display:flex}.tab-option-selected[data-v-a1016be6]{background-color:var(--fm-color-system-orange-100)}
|
|
1
|
+
.json-viewer[data-v-d8502b13]{font-family:monospace;white-space:pre-wrap}.fm-effect-sheet>div{padding:0!important;border-radius:0!important}.fm-effect-sheet>div>div>div{padding:0!important}.unlayer-editor[data-v-a9a2bb94]{flex:1;display:flex}.ck-editor__editable{min-height:500px}.ck-content ul,.ck-content ol{padding-left:2em}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .4s ease-in-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(-40px);opacity:0}.container[data-v-893c9161] .text-box-white-black{background-color:transparent;background-image:linear-gradient(180deg,#fff0,#0000004d)}.container[data-v-893c9161] .text-box-black-white{background-color:transparent;background-image:linear-gradient(180deg,#0000004d,#fff0)}.tab-option-selected[data-v-a1016be6]{background-color:var(--fm-color-system-orange-100)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as L, openBlock as r, createBlock as C, resolveDynamicComponent as D, unref as e, ref as E, computed as I, onMounted as j, resolveComponent as
|
|
2
|
-
import { u as P } from "./campaign-
|
|
1
|
+
import { defineComponent as L, openBlock as r, createBlock as C, resolveDynamicComponent as D, unref as e, ref as E, computed as I, onMounted as j, resolveComponent as c, withCtx as d, createElementVNode as l, createElementBlock as w, createVNode as i, normalizeClass as h, createTextVNode as T, Fragment as S, renderList as N, toDisplayString as g, createCommentVNode as M } from "vue";
|
|
2
|
+
import { u as P } from "./campaign-Dq5C_no-.js";
|
|
3
3
|
import { useDialog as q } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as J } from "./index-
|
|
5
|
-
import { C as A } from "./collection.fn-
|
|
6
|
-
import { s as V } from "./index-
|
|
4
|
+
import { F as J } from "./index-B9pl4zRZ.js";
|
|
5
|
+
import { C as A } from "./collection.fn-CNZRdUgy.js";
|
|
6
|
+
import { s as V } from "./index-CsaQJMAR.js";
|
|
7
7
|
import { _ as G } from "./lodash-B5I3zXaY.js";
|
|
8
|
-
import { C as H } from "./campaign-
|
|
8
|
+
import { C as H } from "./campaign-CT_cNJEL.js";
|
|
9
9
|
import { J as U } from "./JsonViewer-v8_C7l5N.js";
|
|
10
10
|
const K = /* @__PURE__ */ L({
|
|
11
11
|
__name: "CampaignChip",
|
|
@@ -13,13 +13,13 @@ const K = /* @__PURE__ */ L({
|
|
|
13
13
|
type: { type: String, required: !0 }
|
|
14
14
|
},
|
|
15
15
|
setup(u) {
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
16
|
+
const a = H[u.type];
|
|
17
|
+
return (o, t) => (r(), C(D(e(a).chip())));
|
|
18
18
|
}
|
|
19
19
|
}), Q = { class: "flex flex-nowrap gap-x-2 grow h-full" }, R = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "p-8 w-1/4"
|
|
22
|
-
}, W = { class: "flex flex-col grow p-24" }, X = { class: "space-y-4" }, Y = { class: "fm-typo-en-title-sm-800" }, Z =
|
|
22
|
+
}, W = { class: "flex flex-col grow p-24" }, X = { class: "space-y-4" }, Y = { class: "fm-typo-en-title-sm-800" }, Z = { class: "grow pb-16 pr-16 pt-6 w-full max-h-[400px] overflow-y-auto" }, ee = { class: "gap-24 grid grid-cols-1 lg:grid-cols-2" }, te = { class: "gap-4 h-[22px] inline-flex items-center justify-center min-w-min rounded-md" }, ne = { class: "fm-typo-en-title-sm-800" }, oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, se = { class: "flex gap-4 items-end justify-end py-8" }, le = /* @__PURE__ */ L({
|
|
23
23
|
__name: "TemplateDialog",
|
|
24
24
|
props: {
|
|
25
25
|
campaignType: {
|
|
@@ -33,72 +33,72 @@ const K = /* @__PURE__ */ L({
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
setup(u) {
|
|
36
|
-
const p = q(),
|
|
36
|
+
const p = q(), a = P(), o = u, t = E({
|
|
37
37
|
intention: null,
|
|
38
38
|
template: null
|
|
39
39
|
}), b = I(() => {
|
|
40
|
-
const
|
|
40
|
+
const m = (a.templates ?? []).filter(
|
|
41
41
|
() => !0
|
|
42
42
|
//t.intention && t.intention.length > 0
|
|
43
43
|
);
|
|
44
|
-
return
|
|
45
|
-
(
|
|
46
|
-
var
|
|
47
|
-
return ((f = (
|
|
44
|
+
return o.campaignType ? m.filter(
|
|
45
|
+
(n) => {
|
|
46
|
+
var y, f;
|
|
47
|
+
return ((f = (y = n.defaultValue) == null ? void 0 : y.campaign) == null ? void 0 : f.type) === o.campaignType;
|
|
48
48
|
}
|
|
49
|
-
) : t.value.intention === null ? G.sampleSize(
|
|
50
|
-
(
|
|
49
|
+
) : t.value.intention === null ? G.sampleSize(m, 7) : m.filter(
|
|
50
|
+
(n) => n.intention.includes(t.value.intention)
|
|
51
51
|
);
|
|
52
52
|
});
|
|
53
53
|
j(async () => {
|
|
54
|
-
await
|
|
54
|
+
await a.readTemplates();
|
|
55
55
|
});
|
|
56
56
|
function O() {
|
|
57
|
-
|
|
57
|
+
o.onOk(void 0), p.close();
|
|
58
58
|
}
|
|
59
59
|
function $() {
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
const m = t.value.template;
|
|
61
|
+
o.onOk(a.templates.find((n) => n._id === m)), p.close();
|
|
62
62
|
}
|
|
63
|
-
return (
|
|
64
|
-
const
|
|
63
|
+
return (m, n) => {
|
|
64
|
+
const y = c("FmChip"), f = c("FmListItem"), z = c("FmList"), k = c("FmCard"), v = c("FmButton"), B = c("FmSpacer");
|
|
65
65
|
return r(), C(k, { class: "h-[534px] max-w-6xl" }, {
|
|
66
66
|
default: d(() => [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
l("div", Q, [
|
|
68
|
+
o.campaignType ? M("", !0) : (r(), w("div", R, [
|
|
69
|
+
i(z, null, {
|
|
70
70
|
default: d(() => [
|
|
71
|
-
|
|
72
|
-
class:
|
|
71
|
+
i(f, {
|
|
72
|
+
class: h([{
|
|
73
73
|
"bg-fm-color-system-warning-100": e(t).intention === null
|
|
74
74
|
}, "rounded-sm"]),
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: n[0] || (n[0] = (s) => {
|
|
76
76
|
e(t).intention = null, e(t).template = null;
|
|
77
77
|
})
|
|
78
78
|
}, {
|
|
79
79
|
append: d(() => [
|
|
80
|
-
|
|
80
|
+
i(y, {
|
|
81
81
|
label: "Hot",
|
|
82
82
|
variant: "critical"
|
|
83
83
|
})
|
|
84
84
|
]),
|
|
85
85
|
default: d(() => [
|
|
86
|
-
T(" Most popular ")
|
|
86
|
+
n[2] || (n[2] = T(" Most popular "))
|
|
87
87
|
]),
|
|
88
88
|
_: 1
|
|
89
89
|
}, 8, ["class"]),
|
|
90
|
-
(r(!0),
|
|
90
|
+
(r(!0), w(S, null, N(e(J).options, (s, x) => (r(), C(f, {
|
|
91
91
|
key: x,
|
|
92
|
-
class:
|
|
93
|
-
"bg-fm-color-system-warning-100": e(t).intention ===
|
|
92
|
+
class: h(["rounded-sm", {
|
|
93
|
+
"bg-fm-color-system-warning-100": e(t).intention === s
|
|
94
94
|
}]),
|
|
95
95
|
style: { padding: "8px 16px" },
|
|
96
|
-
onClick: (
|
|
97
|
-
e(t).intention =
|
|
96
|
+
onClick: (_) => {
|
|
97
|
+
e(t).intention = s, e(t).template = null;
|
|
98
98
|
}
|
|
99
99
|
}, {
|
|
100
100
|
default: d(() => [
|
|
101
|
-
T(g(e(V)(
|
|
101
|
+
T(g(e(V)(s)), 1)
|
|
102
102
|
]),
|
|
103
103
|
_: 2
|
|
104
104
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -106,57 +106,57 @@ const K = /* @__PURE__ */ L({
|
|
|
106
106
|
_: 1
|
|
107
107
|
})
|
|
108
108
|
])),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`${e(A).formattedType(
|
|
109
|
+
l("div", W, [
|
|
110
|
+
l("div", X, [
|
|
111
|
+
l("div", Y, g(o.campaignType ? e(V)(
|
|
112
|
+
`${e(A).formattedType(o.campaignType)} campaign`
|
|
113
113
|
) : "Template list"), 1),
|
|
114
|
-
|
|
114
|
+
n[3] || (n[3] = l("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Get started faster with templates that flex with your business. ", -1))
|
|
115
115
|
]),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(r(!0),
|
|
116
|
+
l("div", Z, [
|
|
117
|
+
i(U, { json: e(b) }, null, 8, ["json"]),
|
|
118
|
+
l("div", ee, [
|
|
119
|
+
(r(!0), w(S, null, N(e(b), (s, x) => (r(), C(k, {
|
|
120
120
|
key: x,
|
|
121
121
|
variant: "outlined",
|
|
122
|
-
class:
|
|
123
|
-
"bg-fm-color-system-warning-100 border-fm-color-primary border-2": e(t).template ===
|
|
122
|
+
class: h(["box-border cursor-pointer h-full p-16 scroll-p-4 space-y-8", {
|
|
123
|
+
"bg-fm-color-system-warning-100 border-fm-color-primary border-2": e(t).template === s._id.toString()
|
|
124
124
|
}]),
|
|
125
|
-
onClick: (
|
|
125
|
+
onClick: (_) => e(t).template = s._id.toString()
|
|
126
126
|
}, {
|
|
127
127
|
default: d(() => {
|
|
128
|
-
var
|
|
128
|
+
var _, F;
|
|
129
129
|
return [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
type: (F = (
|
|
130
|
+
l("div", te, [
|
|
131
|
+
i(K, {
|
|
132
|
+
type: (F = (_ = s.defaultValue) == null ? void 0 : _.campaign) == null ? void 0 : F.type
|
|
133
133
|
}, null, 8, ["type"])
|
|
134
134
|
]),
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
l("div", ne, g(s.name), 1),
|
|
136
|
+
l("p", oe, g(s.description), 1)
|
|
137
137
|
];
|
|
138
138
|
}),
|
|
139
139
|
_: 2
|
|
140
140
|
}, 1032, ["class", "onClick"]))), 128))
|
|
141
141
|
])
|
|
142
142
|
]),
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
l("div", se, [
|
|
144
|
+
i(v, {
|
|
145
145
|
class: "sm:w-full xs:w-full",
|
|
146
146
|
variant: "plain",
|
|
147
147
|
label: "Custom Campaign",
|
|
148
148
|
size: "md",
|
|
149
149
|
onClick: O
|
|
150
150
|
}),
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
i(B, { class: "sm:hidden xs:hidden" }),
|
|
152
|
+
i(v, {
|
|
153
153
|
class: "sm:w-full xs:w-full",
|
|
154
154
|
variant: "tertiary",
|
|
155
155
|
label: "Cancel",
|
|
156
156
|
size: "md",
|
|
157
|
-
onClick:
|
|
157
|
+
onClick: n[1] || (n[1] = (s) => e(p).close())
|
|
158
158
|
}),
|
|
159
|
-
|
|
159
|
+
i(v, {
|
|
160
160
|
class: "sm:w-full xs:w-full",
|
|
161
161
|
variant: "primary",
|
|
162
162
|
label: "Start",
|
|
@@ -173,13 +173,13 @@ const K = /* @__PURE__ */ L({
|
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
}), ye = (u, p) => ({
|
|
176
|
-
open: async (
|
|
176
|
+
open: async (a) => {
|
|
177
177
|
p.open({
|
|
178
178
|
title: "",
|
|
179
|
-
dialogComponent:
|
|
179
|
+
dialogComponent: le,
|
|
180
180
|
dialogComponentProps: {
|
|
181
181
|
campaignType: u,
|
|
182
|
-
onOk: async (
|
|
182
|
+
onOk: async (o) => (console.debug(o, "selected template"), await a(o))
|
|
183
183
|
},
|
|
184
184
|
overlay: !0
|
|
185
185
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as i, openBlock as m, createBlock as s, unref as n } from "vue";
|
|
2
|
-
import "./index-
|
|
3
|
-
import { R as l } from "./rule-builder-
|
|
4
|
-
import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { l as e, C as E } from "./index-
|
|
2
|
+
import "./index-CUfS9Kp1.js";
|
|
3
|
+
import { R as l } from "./rule-builder-Di9RIYHF.js";
|
|
4
|
+
import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js";
|
|
5
|
+
import { l as e, C as E } from "./index-DNxa8Rqx.js";
|
|
6
6
|
const O = /* @__PURE__ */ i({
|
|
7
7
|
__name: "BillRuleGroup",
|
|
8
8
|
props: {
|
|
@@ -137,8 +137,8 @@ const O = /* @__PURE__ */ i({
|
|
|
137
137
|
})
|
|
138
138
|
);
|
|
139
139
|
export {
|
|
140
|
-
|
|
140
|
+
g as T,
|
|
141
141
|
O as _,
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
f as a,
|
|
143
|
+
T as b
|
|
144
144
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as
|
|
1
|
+
import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as S, Fragment as P, renderList as E, computed as h, onMounted as L, watch as R, unref as p, createCommentVNode as V, toDisplayString as x } from "vue";
|
|
2
2
|
import { l as A } from "./lodash-B5I3zXaY.js";
|
|
3
3
|
const T = ["id"], D = /* @__PURE__ */ M({
|
|
4
4
|
__name: "FmTableSelection",
|
|
@@ -8,10 +8,10 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
8
8
|
},
|
|
9
9
|
emits: ["update:modelValue"],
|
|
10
10
|
setup(f, { emit: g }) {
|
|
11
|
-
const
|
|
11
|
+
const a = g, l = f, r = w(!1);
|
|
12
12
|
return (d, u) => {
|
|
13
|
-
const
|
|
14
|
-
return v(), F(
|
|
13
|
+
const y = C("FmButton"), b = C("FmMenuItem"), o = C("FmMenu");
|
|
14
|
+
return v(), F(o, {
|
|
15
15
|
"max-height": 264,
|
|
16
16
|
shift: "",
|
|
17
17
|
onMenuChanged: u[0] || (u[0] = (n) => r.value = n)
|
|
@@ -19,9 +19,9 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
19
19
|
"menu-button": B(() => {
|
|
20
20
|
var n;
|
|
21
21
|
return [
|
|
22
|
-
c(
|
|
22
|
+
c(y, {
|
|
23
23
|
icon: r.value ? "expand_less" : "expand_more",
|
|
24
|
-
label: (n = d.items.find((
|
|
24
|
+
label: (n = d.items.find((s) => s.value === l.value)) == null ? void 0 : n.label,
|
|
25
25
|
"icon-position": "append",
|
|
26
26
|
size: "md",
|
|
27
27
|
variant: "tertiary"
|
|
@@ -34,12 +34,12 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
34
34
|
style: N({ maxHeight: `${n}px` }),
|
|
35
35
|
class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
|
|
36
36
|
}, [
|
|
37
|
-
(v(!0),
|
|
38
|
-
key:
|
|
39
|
-
label:
|
|
40
|
-
value:
|
|
41
|
-
"model-value":
|
|
42
|
-
"onUpdate:modelValue": (
|
|
37
|
+
(v(!0), S(P, null, E(d.items, (s) => (v(), F(b, {
|
|
38
|
+
key: s.value,
|
|
39
|
+
label: s.label,
|
|
40
|
+
value: s.value,
|
|
41
|
+
"model-value": s.value === l.value,
|
|
42
|
+
"onUpdate:modelValue": (z) => a("update:modelValue", s.value)
|
|
43
43
|
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
|
44
44
|
], 12, T)
|
|
45
45
|
]),
|
|
@@ -50,13 +50,10 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
50
50
|
}), U = { class: "" }, O = {
|
|
51
51
|
key: 0,
|
|
52
52
|
class: "w-full flex flex-col gap-16 items-center py-16"
|
|
53
|
-
}, j =
|
|
54
|
-
j,
|
|
55
|
-
W
|
|
56
|
-
], G = {
|
|
53
|
+
}, j = {
|
|
57
54
|
key: 1,
|
|
58
55
|
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
|
|
59
|
-
},
|
|
56
|
+
}, W = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, q = { class: "flex gap-8 items-center" }, G = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, H = { class: "flex gap-8 items-center" }, J = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, K = { class: "flex gap-8" }, Y = /* @__PURE__ */ M({
|
|
60
57
|
__name: "BaseTable",
|
|
61
58
|
props: {
|
|
62
59
|
rowData: {},
|
|
@@ -76,27 +73,27 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
76
73
|
},
|
|
77
74
|
emits: ["sortChange", "rowClick", "pageChange"],
|
|
78
75
|
setup(f, { emit: g }) {
|
|
79
|
-
const
|
|
80
|
-
() => Math.min(d.value +
|
|
81
|
-
),
|
|
82
|
-
|
|
76
|
+
const a = f, l = g, r = h(() => a.pageIndex + 1), d = h(() => a.pageIndex * a.pageSize), u = h(
|
|
77
|
+
() => Math.min(d.value + a.pageSize, a.rowCount || 0)
|
|
78
|
+
), y = h(() => a.pageIndex > 0), b = h(() => a.pageIndex < a.pageCount - 1), o = (e) => {
|
|
79
|
+
l("sortChange", e);
|
|
83
80
|
}, n = (e) => {
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
81
|
+
l("rowClick", e);
|
|
82
|
+
}, s = (e) => {
|
|
83
|
+
l("pageChange", { pageIndex: e, pageSize: a.pageSize });
|
|
84
|
+
}, z = (e) => {
|
|
85
|
+
l("pageChange", { pageIndex: 0, pageSize: e });
|
|
86
|
+
}, I = w(!1);
|
|
90
87
|
return L(() => {
|
|
91
88
|
R(
|
|
92
|
-
() =>
|
|
93
|
-
(e,
|
|
94
|
-
|
|
89
|
+
() => a.loading,
|
|
90
|
+
(e, t) => {
|
|
91
|
+
t === !0 && e === !1 && (I.value = !0);
|
|
95
92
|
}
|
|
96
93
|
);
|
|
97
|
-
}), (e,
|
|
98
|
-
const $ = C("FmTable"),
|
|
99
|
-
return v(),
|
|
94
|
+
}), (e, t) => {
|
|
95
|
+
const $ = C("FmTable"), k = C("FmButton");
|
|
96
|
+
return v(), S("div", U, [
|
|
100
97
|
c($, {
|
|
101
98
|
loading: e.loading,
|
|
102
99
|
"row-data": e.rowData,
|
|
@@ -107,60 +104,63 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
107
104
|
"page-size": e.pageSize,
|
|
108
105
|
"fetch-fn": void 0,
|
|
109
106
|
"hide-footer": "",
|
|
110
|
-
onSortChange:
|
|
107
|
+
onSortChange: o,
|
|
111
108
|
onRowClick: n
|
|
112
109
|
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
|
|
113
|
-
e.rowData.length == 0 && e.loading == !1 && p(
|
|
114
|
-
|
|
115
|
-
i("div",
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
e.rowData.length == 0 && e.loading == !1 && p(I) ? (v(), S("div", O, t[5] || (t[5] = [
|
|
111
|
+
i("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1),
|
|
112
|
+
i("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1)
|
|
113
|
+
]))) : V("", !0),
|
|
114
|
+
e.hideFooter ? V("", !0) : (v(), S("div", j, [
|
|
115
|
+
i("div", W, [
|
|
116
|
+
i("div", q, [
|
|
117
|
+
t[6] || (t[6] = i("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
118
118
|
c(D, {
|
|
119
119
|
items: e.pageSizeOptions,
|
|
120
120
|
value: e.pageSize,
|
|
121
|
-
"onUpdate:modelValue":
|
|
121
|
+
"onUpdate:modelValue": z
|
|
122
122
|
}, null, 8, ["items", "value"])
|
|
123
123
|
]),
|
|
124
|
-
i("span",
|
|
124
|
+
i("span", G, x(p(d) + 1) + " - " + x(p(u)) + " of " + x(e.rowCount) + " items ", 1)
|
|
125
125
|
]),
|
|
126
|
-
i("div",
|
|
126
|
+
i("div", H, [
|
|
127
127
|
c(D, {
|
|
128
|
-
items: Array.from(Array(e.pageCount), (m,
|
|
129
|
-
label: (
|
|
130
|
-
value:
|
|
128
|
+
items: Array.from(Array(e.pageCount), (m, _) => ({
|
|
129
|
+
label: (_ + 1).toString(),
|
|
130
|
+
value: _ + 1
|
|
131
131
|
})),
|
|
132
132
|
value: p(r),
|
|
133
|
-
"onUpdate:modelValue":
|
|
133
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => s(m - 1))
|
|
134
134
|
}, null, 8, ["items", "value"]),
|
|
135
|
-
i("span",
|
|
136
|
-
i("div",
|
|
137
|
-
c(
|
|
138
|
-
disabled: !p(
|
|
135
|
+
i("span", J, " of " + x(e.pageCount) + " pages ", 1),
|
|
136
|
+
i("div", K, [
|
|
137
|
+
c(k, {
|
|
138
|
+
disabled: !p(y),
|
|
139
139
|
icon: "first_page",
|
|
140
140
|
"icon-color": "neutral-black",
|
|
141
141
|
variant: "tertiary",
|
|
142
|
-
onClick:
|
|
142
|
+
onClick: t[1] || (t[1] = (m) => s(0))
|
|
143
143
|
}, null, 8, ["disabled"]),
|
|
144
|
-
c(
|
|
145
|
-
disabled: !p(
|
|
144
|
+
c(k, {
|
|
145
|
+
disabled: !p(y),
|
|
146
146
|
icon: "chevron_left",
|
|
147
147
|
"icon-color": "neutral-black",
|
|
148
148
|
variant: "tertiary",
|
|
149
|
-
onClick:
|
|
149
|
+
onClick: t[2] || (t[2] = (m) => s(e.pageIndex - 1))
|
|
150
150
|
}, null, 8, ["disabled"]),
|
|
151
|
-
c(
|
|
152
|
-
disabled: !p(
|
|
151
|
+
c(k, {
|
|
152
|
+
disabled: !p(b),
|
|
153
153
|
icon: "chevron_right",
|
|
154
154
|
"icon-color": "neutral-black",
|
|
155
155
|
variant: "tertiary",
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: t[3] || (t[3] = (m) => s(e.pageIndex + 1))
|
|
157
157
|
}, null, 8, ["disabled"]),
|
|
158
|
-
c(
|
|
159
|
-
disabled: !p(
|
|
158
|
+
c(k, {
|
|
159
|
+
disabled: !p(b),
|
|
160
160
|
icon: "last_page",
|
|
161
161
|
"icon-color": "neutral-black",
|
|
162
162
|
variant: "tertiary",
|
|
163
|
-
onClick:
|
|
163
|
+
onClick: t[4] || (t[4] = (m) => s(e.pageCount - 1))
|
|
164
164
|
}, null, 8, ["disabled"])
|
|
165
165
|
])
|
|
166
166
|
])
|
|
@@ -169,55 +169,55 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
|
-
function
|
|
173
|
-
const
|
|
172
|
+
function Z(f, g = { key: "_id", descending: !0 }) {
|
|
173
|
+
const a = w({
|
|
174
174
|
pageCount: 0,
|
|
175
175
|
searchValue: "",
|
|
176
176
|
pageIndex: 0,
|
|
177
177
|
totalRows: 0,
|
|
178
178
|
isLoading: !1,
|
|
179
179
|
pageSize: 10
|
|
180
|
-
}),
|
|
181
|
-
|
|
180
|
+
}), l = w(g), r = w([]), d = async (o) => {
|
|
181
|
+
a.value.isLoading = !0, r.value = [];
|
|
182
182
|
try {
|
|
183
183
|
const n = await f({
|
|
184
|
-
limit:
|
|
185
|
-
skip:
|
|
186
|
-
sortBy:
|
|
187
|
-
descending:
|
|
188
|
-
search:
|
|
184
|
+
limit: o.pageSize || a.value.pageSize,
|
|
185
|
+
skip: o.pageIndex ?? 0,
|
|
186
|
+
sortBy: l.value.key,
|
|
187
|
+
descending: l.value.descending,
|
|
188
|
+
search: a.value.searchValue
|
|
189
189
|
});
|
|
190
|
-
r.value = n.resources,
|
|
190
|
+
r.value = n.resources, a.value.totalRows = n.meta.totalResources ?? 0, a.value.pageCount = n.meta.totalPages ?? 0, a.value.pageIndex = n.meta.skip ?? 0;
|
|
191
191
|
} catch (n) {
|
|
192
192
|
console.error("Error fetching data:", n);
|
|
193
193
|
} finally {
|
|
194
|
-
|
|
194
|
+
a.value.isLoading = !1;
|
|
195
195
|
}
|
|
196
|
-
}, u = A.debounce(async (
|
|
197
|
-
|
|
198
|
-
pageSize:
|
|
199
|
-
pageIndex: (
|
|
196
|
+
}, u = A.debounce(async (o) => {
|
|
197
|
+
a.value.pageSize = (o == null ? void 0 : o.pageSize) || a.value.pageSize, await d({
|
|
198
|
+
pageSize: a.value.pageSize,
|
|
199
|
+
pageIndex: (o == null ? void 0 : o.pageIndex) || 0
|
|
200
200
|
});
|
|
201
201
|
}, 200);
|
|
202
202
|
return {
|
|
203
|
-
tableMeta:
|
|
203
|
+
tableMeta: a,
|
|
204
204
|
rowData: r,
|
|
205
|
-
sortBy:
|
|
205
|
+
sortBy: l,
|
|
206
206
|
fetchData: d,
|
|
207
207
|
debouncedFetchData: u,
|
|
208
|
-
onSort: async (
|
|
208
|
+
onSort: async (o) => {
|
|
209
209
|
var n;
|
|
210
|
-
console.log("sortState", (n =
|
|
211
|
-
key:
|
|
212
|
-
descending:
|
|
213
|
-
}, console.log("sortBy",
|
|
210
|
+
console.log("sortState", (n = o[0]) == null ? void 0 : n.id), o.length ? (l.value = {
|
|
211
|
+
key: o[0].id.startsWith("_") ? o[0].id : o[0].id.replace(new RegExp("_", "g"), "."),
|
|
212
|
+
descending: o[0].desc
|
|
213
|
+
}, console.log("sortBy", l.value)) : l.value = g, await u();
|
|
214
214
|
},
|
|
215
215
|
onSearch: () => {
|
|
216
|
-
u({ pageIndex: 0, pageSize:
|
|
216
|
+
u({ pageIndex: 0, pageSize: a.value.pageSize });
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
export {
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
Y as _,
|
|
222
|
+
Z as u
|
|
223
223
|
};
|