@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.81
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-CJap-Cat.js → Analytic-FMehGs58.js} +31 -32
- package/dist/{App-CLTtX1QT.js → App-7cwNu3e0.js} +617 -607
- package/dist/AuditLogs-CpmLBHAR.js +1991 -0
- package/dist/{Bin-C2xMLxoE.js → Bin-D21tScmC.js} +10 -10
- package/dist/Broadcast-DrX9zS2Z.js +266 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BvN7Q36X.js} +6 -6
- package/dist/{Card-BPrCNLQy.js → Card-Nk0KHSjb.js} +145 -140
- package/dist/Collections-BAnIaZRj.js +540 -0
- package/dist/Credit-BhU_Vd3l.js +260 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -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-DUrvbUE4.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CqBGsZmi.js +351 -0
- package/dist/Experience-B7Fl1uzk.js +259 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-DaCnYliS.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
- package/dist/Game-BdkSBpyV.js +330 -0
- package/dist/Grab-y_ISAZvb.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-WEsv0wME.js} +49 -48
- package/dist/{Index-DMdNgISh.js → Index-DZp0xkxW.js} +54 -54
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-DXMshwQu.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-24MFkuKg.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-B8VvzvAT.js} +1 -1
- package/dist/Marketing-BXfk7ZLc.js +166 -0
- package/dist/MarketingMaterialEdit-CoDx_QvV.js +1065 -0
- package/dist/{Member-CnSXGQi_.js → Member-DOP3Z4-m.js} +38 -37
- package/dist/{MemberList-DcpEKV1D.js → MemberList-BcMezuLM.js} +486 -491
- package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-BEG9Cfgw.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-R6ImfcMO.js} +13443 -10607
- package/dist/Mission-C4eWldYu.js +334 -0
- package/dist/{Overview-elpi-jpI.js → Overview-0V1dmEPw.js} +24 -25
- package/dist/Point-s9t7_Iee.js +262 -0
- package/dist/Promotion-VZCoFHHx.js +396 -0
- package/dist/{Queue-GvBhNEFe.js → Queue-DdoHcsXv.js} +23 -24
- package/dist/{Record-CbSxgo8i.js → Record-B73AsvsB.js} +10 -10
- package/dist/Review-eEJG7-gc.js +621 -0
- package/dist/ReviewFacebookCallback-Cq1fGEP3.js +243 -0
- package/dist/ReviewGoogleCallback-C7BBKqnK.js +213 -0
- package/dist/{Reward-QCGlrq89.js → Reward-DKFT9MmI.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-vbTI-3-L.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dc4daP4P.js +1912 -0
- package/dist/{Segment-5PndnEUa.js → Segment-RAMBNzZd.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-pQmd43cO.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-PwedwyBw.js} +12 -12
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-rN37l0uX.js +226 -0
- package/dist/Setting--t7CPcWL.js +2039 -0
- package/dist/SettingAdvertisements-BzhckLOK.js +264 -0
- package/dist/Store-Dnax6l9z.js +1996 -0
- package/dist/StoreRewards-BIdtA-W4.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B__Nqwzg.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-on00idd9.js +7007 -0
- package/dist/{Tier-BKKxG29r.js → Tier-Ch63LeNc.js} +561 -480
- package/dist/{Title-CReZgw8V.js → Title-wOMe2o3w.js} +151 -149
- package/dist/{Transaction-HWCmSVaJ.js → Transaction-CpkfV_sQ.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-MPlAwheJ.js} +7 -7
- package/dist/Voucher-DlOZmlyt.js +421 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DBAk4tDY.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-BhCfP2wn.js} +2 -2
- package/dist/app-nACimuOe.js +59309 -0
- package/dist/app.js +1 -1
- package/dist/{business-Bc-EMd2p.js → business-BpM7Eni_.js} +11 -8
- package/dist/campaign-BaSTB-19.js +219 -0
- package/dist/campaign-CN7MibEN.js +253 -0
- package/dist/campaign.enum-CW4ESvMk.js +26 -0
- package/dist/campaign.fn-DPMaaXjP.js +776 -0
- package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-_Bg6BIol.js} +1 -1
- package/dist/{collection.fn-AjDNdFe1.js → collection.fn-D86VQVrc.js} +2 -2
- package/dist/dto-By8psmkB.js +222 -0
- package/dist/duplicateCampaign-AVfDsabR.js +51 -0
- package/dist/effect-CCB9eCEr.js +89 -0
- package/dist/{email-addresses-B0SzUCQM.js → email-addresses-CyMOiGPR.js} +2 -2
- package/dist/{export-Bgz6WcNZ.js → export-DPUTGKPb.js} +4 -4
- package/dist/{helper-B1vFwohM.js → helper-CYKFnu8y.js} +22 -7
- package/dist/index-43V5T9JA.js +28899 -0
- package/dist/{index-DVQnrex_.js → index-9FXa-6Mk.js} +3 -3
- package/dist/{index-26SopNpv.js → index-B9vArh0F.js} +1 -1
- package/dist/index-BF2vcn02.js +3431 -0
- package/dist/{index-BIRmS75g.js → index-BPBdEGEz.js} +1 -1
- package/dist/index-BTaTuuEo.js +48 -0
- package/dist/{index-Cm2sBagk.js → index-Beq-ShJI.js} +1 -1
- package/dist/{index-CSQY21Zb.js → index-BxGFddJP.js} +3 -3
- package/dist/index-C0veCCui.js +85 -0
- package/dist/index-C0yZzlB3.js +8912 -0
- package/dist/index-CJy_KEtq.js +30289 -0
- package/dist/{index-DwT9RLst.js → index-CZRA2IY5.js} +23 -12
- package/dist/{index-DT2viYsL.js → index-Cpff1wjo.js} +617 -191
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-DHrbC5Ry.js} +185 -185
- package/dist/{loading-C6Ouh0mG.js → loading-BSMi2eIc.js} +1 -1
- package/dist/{lodash-B5I3zXaY.js → lodash-DZxxJH2N.js} +1 -1
- package/dist/{membership-DU0BwIj8.js → membership-CWkspNDR.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-Bg7GuE5s.js → money-CSBC-3Ol.js} +1 -1
- package/dist/{number-Ddmqo5D_.js → number-CeqAGZy9.js} +1 -1
- package/dist/objectid-C_sYOjBD.js +145 -0
- package/dist/{campaign-BeF8kTyg.js → plugins-B37e5K6S.js} +784 -777
- package/dist/remy-DM_pSPd3.js +46 -0
- package/dist/{reward-CN4gvn4c.js → reward-BHf9o7F7.js} +1 -1
- package/dist/{rule-CpiqqR0c.js → rule-CAOC63go.js} +505 -487
- package/dist/rule-builder-BTxbYw5Z.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-DHmXFTjv.js +188 -0
- package/dist/timezone-C9EUfUmm.js +1156 -0
- package/dist/trigger--TbXeeFT.js +213 -0
- package/dist/usePagination-Lr6F7nYH.js +220 -0
- package/dist/user-DOc3B6F_.js +55 -0
- package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DQbt3scE.js} +409 -409
- package/dist/{xlsx-qJHsnW7k.js → xlsx-QxmpwFgC.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-OfQMlh-A.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-DW4rwNOn.js +0 -1887
- package/dist/Broadcast-Dhc0j16O.js +0 -227
- package/dist/Collections-CsUJEmqz.js +0 -465
- package/dist/Credit-Mqa-0XJd.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-DWWLxIq-.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
- package/dist/Experience-BD5C3old.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-D4xsi8Ym.js +0 -278
- package/dist/Marketing-axcQYl8k.js +0 -20073
- package/dist/Mission-BHZiL-GH.js +0 -296
- package/dist/Point-gKvdggAl.js +0 -226
- package/dist/Promotion-7x2F_sFX.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
- package/dist/Setting-Cab47wfH.js +0 -1936
- package/dist/Store-BFL3T9B5.js +0 -1842
- package/dist/StoreRewards-C43dCJtM.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
- package/dist/Voucher-BhUAcPZg.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-BGaUIdCr.js +0 -7086
- package/dist/app-DccKBdW_.js +0 -33357
- package/dist/campaign-DbJZEU7P.js +0 -96
- package/dist/campaign.enum-PBKYGUQY.js +0 -20
- package/dist/campaign.fn-Cq-4LfQj.js +0 -758
- package/dist/dto-8NvMMYAb.js +0 -214
- package/dist/effect-DZhcEQ5g.js +0 -78
- package/dist/index-CQQedv0M.js +0 -32260
- package/dist/index-CTgQRqQR.js +0 -30038
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DGaywhpY.js +0 -76
- package/dist/index-DOfLDlI8.js +0 -8861
- package/dist/index-DVpAocyR.js +0 -3120
- package/dist/index-DlJGd8RC.js +0 -121
- package/dist/index-Dm65CTdy.js +0 -38
- package/dist/objectid-MCaJXAgq.js +0 -145
- package/dist/plugins-C-CRzeyC.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DmkJng-x.js +0 -89
- package/dist/template-DTZgnkl5.js +0 -190
- package/dist/trigger-CPjJ73Rc.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-8VIt8A1x.js +0 -54
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { n as i } from "./index-DOfLDlI8.js";
|
|
2
|
-
function a(c, t) {
|
|
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
|
-
return r;
|
|
8
|
-
}
|
|
9
|
-
function p(c) {
|
|
10
|
-
return !c.property && "rules" in c;
|
|
11
|
-
}
|
|
12
|
-
function l(c) {
|
|
13
|
-
return "property" in c && !!c.property;
|
|
14
|
-
}
|
|
15
|
-
class o {
|
|
16
|
-
static scaffoldGroup(t) {
|
|
17
|
-
return {
|
|
18
|
-
name: t ?? `g_${a(4)}`,
|
|
19
|
-
rules: {},
|
|
20
|
-
logic: ""
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
static scaffoldEntry(t) {
|
|
24
|
-
return {
|
|
25
|
-
name: `r_${a(4)}`,
|
|
26
|
-
property: t ?? "",
|
|
27
|
-
conditions: {},
|
|
28
|
-
negated: !1
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
static constructEntry(t, r, n, e) {
|
|
32
|
-
return {
|
|
33
|
-
name: e ?? `e_${a(4)}`,
|
|
34
|
-
property: t,
|
|
35
|
-
conditions: {
|
|
36
|
-
[r]: n
|
|
37
|
-
},
|
|
38
|
-
negated: !1
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
static getLogic(t) {
|
|
42
|
-
return (t.logic ?? "").includes("||") ? "||" : "&&";
|
|
43
|
-
}
|
|
44
|
-
static constructLogic(t, r) {
|
|
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
|
-
}
|
|
48
|
-
static setRuleToGroup(t, r, n) {
|
|
49
|
-
let e = i.cloneDeep(t);
|
|
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
|
-
}
|
|
54
|
-
static removeEntry(t, r, n) {
|
|
55
|
-
const e = i.cloneDeep(t);
|
|
56
|
-
return delete e.rules[r], e.logic = o.constructLogic(e, n), e;
|
|
57
|
-
}
|
|
58
|
-
static constructRule(t) {
|
|
59
|
-
switch (t.type) {
|
|
60
|
-
case "timeframe": {
|
|
61
|
-
const r = t.property, n = o.scaffoldGroup("timeframe"), e = [];
|
|
62
|
-
return (t.start || t.end) && e.push(
|
|
63
|
-
o.constructEntry(r, "_isBetween", {
|
|
64
|
-
start: t.start || void 0,
|
|
65
|
-
end: t.end || void 0
|
|
66
|
-
})
|
|
67
|
-
), o.setRuleToGroup(n, e, "&&");
|
|
68
|
-
}
|
|
69
|
-
default:
|
|
70
|
-
throw Error("invalid config type");
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
static getRules(t) {
|
|
74
|
-
return t && "rules" in t ? Object.values(t.rules) : [];
|
|
75
|
-
}
|
|
76
|
-
static simplify(t) {
|
|
77
|
-
const [r] = Object.entries(t.conditions);
|
|
78
|
-
return r[0], {
|
|
79
|
-
property: t.property,
|
|
80
|
-
operator: r[0],
|
|
81
|
-
equator: r[1]
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
export {
|
|
86
|
-
o as R,
|
|
87
|
-
l as a,
|
|
88
|
-
p as i
|
|
89
|
-
};
|
|
@@ -1,190 +0,0 @@
|
|
|
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-DbJZEU7P.js";
|
|
3
|
-
import { useDialog as q } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as J } from "./index-DT2viYsL.js";
|
|
5
|
-
import { C as A } from "./collection.fn-AjDNdFe1.js";
|
|
6
|
-
import { s as V } from "./index-CsaQJMAR.js";
|
|
7
|
-
import { _ as G } from "./lodash-B5I3zXaY.js";
|
|
8
|
-
import { C as H } from "./campaign-BeF8kTyg.js";
|
|
9
|
-
import { J as U } from "./JsonViewer-v8_C7l5N.js";
|
|
10
|
-
const K = /* @__PURE__ */ L({
|
|
11
|
-
__name: "CampaignChip",
|
|
12
|
-
props: {
|
|
13
|
-
type: { type: String, required: !0 }
|
|
14
|
-
},
|
|
15
|
-
setup(u) {
|
|
16
|
-
const a = H[u.type];
|
|
17
|
-
return (o, t) => (r(), C(D(e(a).chip())));
|
|
18
|
-
}
|
|
19
|
-
}), Q = { class: "flex flex-nowrap gap-x-2 grow h-full" }, R = {
|
|
20
|
-
key: 0,
|
|
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 = { 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
|
-
__name: "TemplateDialog",
|
|
24
|
-
props: {
|
|
25
|
-
campaignType: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: () => {
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
onOk: {
|
|
31
|
-
type: Function,
|
|
32
|
-
required: !0
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
setup(u) {
|
|
36
|
-
const p = q(), a = P(), o = u, t = E({
|
|
37
|
-
intention: null,
|
|
38
|
-
template: null
|
|
39
|
-
}), b = I(() => {
|
|
40
|
-
const m = (a.templates ?? []).filter(
|
|
41
|
-
() => !0
|
|
42
|
-
//t.intention && t.intention.length > 0
|
|
43
|
-
);
|
|
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
|
-
}
|
|
49
|
-
) : t.value.intention === null ? G.sampleSize(m, 7) : m.filter(
|
|
50
|
-
(n) => n.intention.includes(t.value.intention)
|
|
51
|
-
);
|
|
52
|
-
});
|
|
53
|
-
j(async () => {
|
|
54
|
-
await a.readTemplates();
|
|
55
|
-
});
|
|
56
|
-
function O() {
|
|
57
|
-
o.onOk(void 0), p.close();
|
|
58
|
-
}
|
|
59
|
-
function $() {
|
|
60
|
-
const m = t.value.template;
|
|
61
|
-
o.onOk(a.templates.find((n) => n._id === m)), p.close();
|
|
62
|
-
}
|
|
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
|
-
return r(), C(k, { class: "h-[534px] max-w-6xl" }, {
|
|
66
|
-
default: d(() => [
|
|
67
|
-
l("div", Q, [
|
|
68
|
-
o.campaignType ? M("", !0) : (r(), w("div", R, [
|
|
69
|
-
i(z, null, {
|
|
70
|
-
default: d(() => [
|
|
71
|
-
i(f, {
|
|
72
|
-
class: h([{
|
|
73
|
-
"bg-fm-color-system-warning-100": e(t).intention === null
|
|
74
|
-
}, "rounded-sm"]),
|
|
75
|
-
onClick: n[0] || (n[0] = (s) => {
|
|
76
|
-
e(t).intention = null, e(t).template = null;
|
|
77
|
-
})
|
|
78
|
-
}, {
|
|
79
|
-
append: d(() => [
|
|
80
|
-
i(y, {
|
|
81
|
-
label: "Hot",
|
|
82
|
-
variant: "critical"
|
|
83
|
-
})
|
|
84
|
-
]),
|
|
85
|
-
default: d(() => [
|
|
86
|
-
n[2] || (n[2] = T(" Most popular "))
|
|
87
|
-
]),
|
|
88
|
-
_: 1
|
|
89
|
-
}, 8, ["class"]),
|
|
90
|
-
(r(!0), w(S, null, N(e(J).options, (s, x) => (r(), C(f, {
|
|
91
|
-
key: x,
|
|
92
|
-
class: h(["rounded-sm", {
|
|
93
|
-
"bg-fm-color-system-warning-100": e(t).intention === s
|
|
94
|
-
}]),
|
|
95
|
-
style: { padding: "8px 16px" },
|
|
96
|
-
onClick: (_) => {
|
|
97
|
-
e(t).intention = s, e(t).template = null;
|
|
98
|
-
}
|
|
99
|
-
}, {
|
|
100
|
-
default: d(() => [
|
|
101
|
-
T(g(e(V)(s)), 1)
|
|
102
|
-
]),
|
|
103
|
-
_: 2
|
|
104
|
-
}, 1032, ["class", "onClick"]))), 128))
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
108
|
-
])),
|
|
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
|
-
) : "Template list"), 1),
|
|
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
|
-
]),
|
|
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
|
-
key: x,
|
|
121
|
-
variant: "outlined",
|
|
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
|
-
}]),
|
|
125
|
-
onClick: (_) => e(t).template = s._id.toString()
|
|
126
|
-
}, {
|
|
127
|
-
default: d(() => {
|
|
128
|
-
var _, F;
|
|
129
|
-
return [
|
|
130
|
-
l("div", te, [
|
|
131
|
-
i(K, {
|
|
132
|
-
type: (F = (_ = s.defaultValue) == null ? void 0 : _.campaign) == null ? void 0 : F.type
|
|
133
|
-
}, null, 8, ["type"])
|
|
134
|
-
]),
|
|
135
|
-
l("div", ne, g(s.name), 1),
|
|
136
|
-
l("p", oe, g(s.description), 1)
|
|
137
|
-
];
|
|
138
|
-
}),
|
|
139
|
-
_: 2
|
|
140
|
-
}, 1032, ["class", "onClick"]))), 128))
|
|
141
|
-
])
|
|
142
|
-
]),
|
|
143
|
-
l("div", se, [
|
|
144
|
-
i(v, {
|
|
145
|
-
class: "sm:w-full xs:w-full",
|
|
146
|
-
variant: "plain",
|
|
147
|
-
label: "Custom Campaign",
|
|
148
|
-
size: "md",
|
|
149
|
-
onClick: O
|
|
150
|
-
}),
|
|
151
|
-
i(B, { class: "sm:hidden xs:hidden" }),
|
|
152
|
-
i(v, {
|
|
153
|
-
class: "sm:w-full xs:w-full",
|
|
154
|
-
variant: "tertiary",
|
|
155
|
-
label: "Cancel",
|
|
156
|
-
size: "md",
|
|
157
|
-
onClick: n[1] || (n[1] = (s) => e(p).close())
|
|
158
|
-
}),
|
|
159
|
-
i(v, {
|
|
160
|
-
class: "sm:w-full xs:w-full",
|
|
161
|
-
variant: "primary",
|
|
162
|
-
label: "Start",
|
|
163
|
-
size: "md",
|
|
164
|
-
disabled: !e(t).template,
|
|
165
|
-
onClick: $
|
|
166
|
-
}, null, 8, ["disabled"])
|
|
167
|
-
])
|
|
168
|
-
])
|
|
169
|
-
])
|
|
170
|
-
]),
|
|
171
|
-
_: 1
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
}), ye = (u, p) => ({
|
|
176
|
-
open: async (a) => {
|
|
177
|
-
p.open({
|
|
178
|
-
title: "",
|
|
179
|
-
dialogComponent: le,
|
|
180
|
-
dialogComponentProps: {
|
|
181
|
-
campaignType: u,
|
|
182
|
-
onOk: async (o) => (console.debug(o, "selected template"), await a(o))
|
|
183
|
-
},
|
|
184
|
-
overlay: !0
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
export {
|
|
189
|
-
ye as u
|
|
190
|
-
};
|
package/dist/trigger-CPjJ73Rc.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, openBlock as m, createBlock as s, unref as n } from "vue";
|
|
2
|
-
import "./index-DOfLDlI8.js";
|
|
3
|
-
import { R as l } from "./rule-builder-DmkJng-x.js";
|
|
4
|
-
import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js";
|
|
5
|
-
import { l as e, C as E } from "./index-DVpAocyR.js";
|
|
6
|
-
const O = /* @__PURE__ */ i({
|
|
7
|
-
__name: "BillRuleGroup",
|
|
8
|
-
props: {
|
|
9
|
-
modelValue: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: () => {
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
emits: ["update:model-value"],
|
|
16
|
-
setup(r, { emit: a }) {
|
|
17
|
-
const o = a;
|
|
18
|
-
return (c, u) => {
|
|
19
|
-
var t;
|
|
20
|
-
return m(), s(p, {
|
|
21
|
-
"include-only": "bill",
|
|
22
|
-
"trigger-type": "BILL_COMPLETED",
|
|
23
|
-
"model-value": ((t = r.modelValue) == null ? void 0 : t.rules.g_bill) ?? n(l).scaffoldGroup("g_bill"),
|
|
24
|
-
"onUpdate:modelValue": u[0] || (u[0] = (d) => o(
|
|
25
|
-
"update:model-value",
|
|
26
|
-
n(l).setRuleToGroup(
|
|
27
|
-
r.modelValue ?? n(l).scaffoldGroup(),
|
|
28
|
-
d,
|
|
29
|
-
"&&"
|
|
30
|
-
)
|
|
31
|
-
))
|
|
32
|
-
}, null, 8, ["model-value"]);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
}), T = /* @__PURE__ */ i({
|
|
36
|
-
__name: "FeedbackRuleGroup",
|
|
37
|
-
props: {
|
|
38
|
-
modelValue: {
|
|
39
|
-
type: Object,
|
|
40
|
-
default: () => {
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
emits: ["update:model-value"],
|
|
45
|
-
setup(r, { emit: a }) {
|
|
46
|
-
const o = a;
|
|
47
|
-
return (c, u) => {
|
|
48
|
-
var t;
|
|
49
|
-
return m(), s(p, {
|
|
50
|
-
"include-only": "feedback",
|
|
51
|
-
"trigger-type": "FEEDBACK",
|
|
52
|
-
"model-value": ((t = r.modelValue) == null ? void 0 : t.rules.g_feedback) ?? n(l).scaffoldGroup("g_feedback"),
|
|
53
|
-
"onUpdate:modelValue": u[0] || (u[0] = (d) => o(
|
|
54
|
-
"update:model-value",
|
|
55
|
-
n(l).setRuleToGroup(
|
|
56
|
-
r.modelValue ?? n(l).scaffoldGroup(),
|
|
57
|
-
d,
|
|
58
|
-
"&&"
|
|
59
|
-
)
|
|
60
|
-
))
|
|
61
|
-
}, null, 8, ["model-value"]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}), f = {
|
|
65
|
-
[e.enum.BILL_COMPLETED]: {
|
|
66
|
-
name: "Bill complete",
|
|
67
|
-
description: "Reward customers upon the completion of their bill.",
|
|
68
|
-
value: e.enum.BILL_COMPLETED,
|
|
69
|
-
hidden: !1
|
|
70
|
-
},
|
|
71
|
-
[e.enum.FEEDBACK]: {
|
|
72
|
-
name: "Feedback",
|
|
73
|
-
description: "Reward customers for providing feedback.",
|
|
74
|
-
value: e.enum.FEEDBACK,
|
|
75
|
-
hidden: !1
|
|
76
|
-
},
|
|
77
|
-
[e.enum.GAME_COMPLETED]: {
|
|
78
|
-
name: "Game complete",
|
|
79
|
-
description: "Reward customers upon the completion of a game.",
|
|
80
|
-
value: e.enum.GAME_COMPLETED,
|
|
81
|
-
hidden: !1
|
|
82
|
-
},
|
|
83
|
-
[e.enum.MAKING_ORDER]: {
|
|
84
|
-
name: "Making order",
|
|
85
|
-
description: "Reward customers upon the creation of their order.",
|
|
86
|
-
value: e.enum.MAKING_ORDER,
|
|
87
|
-
hidden: !1
|
|
88
|
-
},
|
|
89
|
-
[e.enum.MEMBERSHIP_JOINED]: {
|
|
90
|
-
name: "Member joined ",
|
|
91
|
-
description: "Trigger rewards when customers join your membership program.",
|
|
92
|
-
value: e.enum.MEMBERSHIP_JOINED,
|
|
93
|
-
hidden: !1
|
|
94
|
-
},
|
|
95
|
-
[e.enum.SCHEDULE]: {
|
|
96
|
-
name: "Schedule",
|
|
97
|
-
description: "Set rewards to be triggered at specific times or dates.",
|
|
98
|
-
value: e.enum.SCHEDULE,
|
|
99
|
-
hidden: !1
|
|
100
|
-
},
|
|
101
|
-
[e.enum.SIMPLE_CLAIM]: {
|
|
102
|
-
name: "Simple claim",
|
|
103
|
-
description: "Activate rewards when customers claim an offer",
|
|
104
|
-
value: e.enum.SIMPLE_CLAIM,
|
|
105
|
-
hidden: !1
|
|
106
|
-
},
|
|
107
|
-
[e.enum.TIER_UPGRADED]: {
|
|
108
|
-
name: "Tier upgrade",
|
|
109
|
-
description: "Activate rewards when their membership tier gets upgraded.",
|
|
110
|
-
value: e.enum.TIER_UPGRADED,
|
|
111
|
-
hidden: !1
|
|
112
|
-
},
|
|
113
|
-
[e.enum.ISSUE_REWARD]: {
|
|
114
|
-
name: "Issue reward",
|
|
115
|
-
description: "Triggers whenever customer receives a reward in any kind.",
|
|
116
|
-
value: e.enum.ISSUE_REWARD,
|
|
117
|
-
hidden: !0
|
|
118
|
-
}
|
|
119
|
-
}, g = Object.fromEntries(
|
|
120
|
-
[
|
|
121
|
-
"VOUCHER",
|
|
122
|
-
"PROMOTION",
|
|
123
|
-
"POINT",
|
|
124
|
-
"CREDIT",
|
|
125
|
-
"MEMBERSHIP",
|
|
126
|
-
"BROADCAST",
|
|
127
|
-
"COIN",
|
|
128
|
-
"REWARD_POOL",
|
|
129
|
-
"GAME",
|
|
130
|
-
"MISSION"
|
|
131
|
-
].map((r) => {
|
|
132
|
-
const a = E[r];
|
|
133
|
-
return [
|
|
134
|
-
r,
|
|
135
|
-
(a == null ? void 0 : a.map((o) => f[o]).filter((o) => !o.hidden)) ?? []
|
|
136
|
-
];
|
|
137
|
-
})
|
|
138
|
-
);
|
|
139
|
-
export {
|
|
140
|
-
g as T,
|
|
141
|
-
O as _,
|
|
142
|
-
f as a,
|
|
143
|
-
T as b
|
|
144
|
-
};
|
|
@@ -1,223 +0,0 @@
|
|
|
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
|
-
import { l as A } from "./lodash-B5I3zXaY.js";
|
|
3
|
-
const T = ["id"], D = /* @__PURE__ */ M({
|
|
4
|
-
__name: "FmTableSelection",
|
|
5
|
-
props: {
|
|
6
|
-
value: {},
|
|
7
|
-
items: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(f, { emit: g }) {
|
|
11
|
-
const a = g, l = f, r = w(!1);
|
|
12
|
-
return (d, u) => {
|
|
13
|
-
const y = C("FmButton"), b = C("FmMenuItem"), o = C("FmMenu");
|
|
14
|
-
return v(), F(o, {
|
|
15
|
-
"max-height": 264,
|
|
16
|
-
shift: "",
|
|
17
|
-
onMenuChanged: u[0] || (u[0] = (n) => r.value = n)
|
|
18
|
-
}, {
|
|
19
|
-
"menu-button": B(() => {
|
|
20
|
-
var n;
|
|
21
|
-
return [
|
|
22
|
-
c(y, {
|
|
23
|
-
icon: r.value ? "expand_less" : "expand_more",
|
|
24
|
-
label: (n = d.items.find((s) => s.value === l.value)) == null ? void 0 : n.label,
|
|
25
|
-
"icon-position": "append",
|
|
26
|
-
size: "md",
|
|
27
|
-
variant: "tertiary"
|
|
28
|
-
}, null, 8, ["icon", "label"])
|
|
29
|
-
];
|
|
30
|
-
}),
|
|
31
|
-
"menu-wrapper": B(({ maxHeight: n }) => [
|
|
32
|
-
i("div", {
|
|
33
|
-
id: `menu-wrapper-${n}`,
|
|
34
|
-
style: N({ maxHeight: `${n}px` }),
|
|
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
|
-
}, [
|
|
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
|
-
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
|
44
|
-
], 12, T)
|
|
45
|
-
]),
|
|
46
|
-
_: 1
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}), U = { class: "" }, O = {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "w-full flex flex-col gap-16 items-center py-16"
|
|
53
|
-
}, j = {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
|
|
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({
|
|
57
|
-
__name: "BaseTable",
|
|
58
|
-
props: {
|
|
59
|
-
rowData: {},
|
|
60
|
-
columnDefs: {},
|
|
61
|
-
loading: { type: Boolean, default: !1 },
|
|
62
|
-
rowCount: { default: 0 },
|
|
63
|
-
shrinkAt: { type: [Number, Boolean], default: !1 },
|
|
64
|
-
pageCount: {},
|
|
65
|
-
pageIndex: {},
|
|
66
|
-
hideFooter: { type: Boolean, default: !1 },
|
|
67
|
-
pageSize: {},
|
|
68
|
-
pageSizeOptions: { default: () => [
|
|
69
|
-
{ label: "10", value: 10 },
|
|
70
|
-
{ label: "20", value: 20 },
|
|
71
|
-
{ label: "50", value: 50 }
|
|
72
|
-
] }
|
|
73
|
-
},
|
|
74
|
-
emits: ["sortChange", "rowClick", "pageChange"],
|
|
75
|
-
setup(f, { emit: g }) {
|
|
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);
|
|
80
|
-
}, n = (e) => {
|
|
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);
|
|
87
|
-
return L(() => {
|
|
88
|
-
R(
|
|
89
|
-
() => a.loading,
|
|
90
|
-
(e, t) => {
|
|
91
|
-
t === !0 && e === !1 && (I.value = !0);
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}), (e, t) => {
|
|
95
|
-
const $ = C("FmTable"), k = C("FmButton");
|
|
96
|
-
return v(), S("div", U, [
|
|
97
|
-
c($, {
|
|
98
|
-
loading: e.loading,
|
|
99
|
-
"row-data": e.rowData,
|
|
100
|
-
"row-count": e.rowCount,
|
|
101
|
-
"column-defs": e.columnDefs,
|
|
102
|
-
"shrink-at": e.shrinkAt,
|
|
103
|
-
"page-count": e.pageCount,
|
|
104
|
-
"page-size": e.pageSize,
|
|
105
|
-
"fetch-fn": void 0,
|
|
106
|
-
"hide-footer": "",
|
|
107
|
-
onSortChange: o,
|
|
108
|
-
onRowClick: n
|
|
109
|
-
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
|
|
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
|
-
c(D, {
|
|
119
|
-
items: e.pageSizeOptions,
|
|
120
|
-
value: e.pageSize,
|
|
121
|
-
"onUpdate:modelValue": z
|
|
122
|
-
}, null, 8, ["items", "value"])
|
|
123
|
-
]),
|
|
124
|
-
i("span", G, x(p(d) + 1) + " - " + x(p(u)) + " of " + x(e.rowCount) + " items ", 1)
|
|
125
|
-
]),
|
|
126
|
-
i("div", H, [
|
|
127
|
-
c(D, {
|
|
128
|
-
items: Array.from(Array(e.pageCount), (m, _) => ({
|
|
129
|
-
label: (_ + 1).toString(),
|
|
130
|
-
value: _ + 1
|
|
131
|
-
})),
|
|
132
|
-
value: p(r),
|
|
133
|
-
"onUpdate:modelValue": t[0] || (t[0] = (m) => s(m - 1))
|
|
134
|
-
}, null, 8, ["items", "value"]),
|
|
135
|
-
i("span", J, " of " + x(e.pageCount) + " pages ", 1),
|
|
136
|
-
i("div", K, [
|
|
137
|
-
c(k, {
|
|
138
|
-
disabled: !p(y),
|
|
139
|
-
icon: "first_page",
|
|
140
|
-
"icon-color": "neutral-black",
|
|
141
|
-
variant: "tertiary",
|
|
142
|
-
onClick: t[1] || (t[1] = (m) => s(0))
|
|
143
|
-
}, null, 8, ["disabled"]),
|
|
144
|
-
c(k, {
|
|
145
|
-
disabled: !p(y),
|
|
146
|
-
icon: "chevron_left",
|
|
147
|
-
"icon-color": "neutral-black",
|
|
148
|
-
variant: "tertiary",
|
|
149
|
-
onClick: t[2] || (t[2] = (m) => s(e.pageIndex - 1))
|
|
150
|
-
}, null, 8, ["disabled"]),
|
|
151
|
-
c(k, {
|
|
152
|
-
disabled: !p(b),
|
|
153
|
-
icon: "chevron_right",
|
|
154
|
-
"icon-color": "neutral-black",
|
|
155
|
-
variant: "tertiary",
|
|
156
|
-
onClick: t[3] || (t[3] = (m) => s(e.pageIndex + 1))
|
|
157
|
-
}, null, 8, ["disabled"]),
|
|
158
|
-
c(k, {
|
|
159
|
-
disabled: !p(b),
|
|
160
|
-
icon: "last_page",
|
|
161
|
-
"icon-color": "neutral-black",
|
|
162
|
-
variant: "tertiary",
|
|
163
|
-
onClick: t[4] || (t[4] = (m) => s(e.pageCount - 1))
|
|
164
|
-
}, null, 8, ["disabled"])
|
|
165
|
-
])
|
|
166
|
-
])
|
|
167
|
-
]))
|
|
168
|
-
]);
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
function Z(f, g = { key: "_id", descending: !0 }) {
|
|
173
|
-
const a = w({
|
|
174
|
-
pageCount: 0,
|
|
175
|
-
searchValue: "",
|
|
176
|
-
pageIndex: 0,
|
|
177
|
-
totalRows: 0,
|
|
178
|
-
isLoading: !1,
|
|
179
|
-
pageSize: 10
|
|
180
|
-
}), l = w(g), r = w([]), d = async (o) => {
|
|
181
|
-
a.value.isLoading = !0, r.value = [];
|
|
182
|
-
try {
|
|
183
|
-
const n = await f({
|
|
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
|
-
});
|
|
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
|
-
} catch (n) {
|
|
192
|
-
console.error("Error fetching data:", n);
|
|
193
|
-
} finally {
|
|
194
|
-
a.value.isLoading = !1;
|
|
195
|
-
}
|
|
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
|
-
});
|
|
201
|
-
}, 200);
|
|
202
|
-
return {
|
|
203
|
-
tableMeta: a,
|
|
204
|
-
rowData: r,
|
|
205
|
-
sortBy: l,
|
|
206
|
-
fetchData: d,
|
|
207
|
-
debouncedFetchData: u,
|
|
208
|
-
onSort: async (o) => {
|
|
209
|
-
var n;
|
|
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
|
-
},
|
|
215
|
-
onSearch: () => {
|
|
216
|
-
u({ pageIndex: 0, pageSize: a.value.pageSize });
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
export {
|
|
221
|
-
Y as _,
|
|
222
|
-
Z as u
|
|
223
|
-
};
|
package/dist/user-8VIt8A1x.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { components as p } from "@feedmepos/ui-library";
|
|
2
|
-
import { a as f } from "./plugins-C-CRzeyC.js";
|
|
3
|
-
import { h as c } from "vue";
|
|
4
|
-
function g(o, n = !1) {
|
|
5
|
-
return c(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
class: "flex items-center gap-x-8"
|
|
9
|
-
},
|
|
10
|
-
[
|
|
11
|
-
c(p.FmAvatar, {
|
|
12
|
-
name: o != null && o.photoUrl ? "-" : o == null ? void 0 : o.name,
|
|
13
|
-
src: (o == null ? void 0 : o.photoUrl) ?? void 0,
|
|
14
|
-
size: "sm"
|
|
15
|
-
}),
|
|
16
|
-
c(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
class: "flex flex-col",
|
|
20
|
-
onClick: (a) => {
|
|
21
|
-
a.preventDefault(), a.stopPropagation(), f(o._id.toString());
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
[
|
|
25
|
-
c("span", o == null ? void 0 : o.name),
|
|
26
|
-
n && c(
|
|
27
|
-
"span",
|
|
28
|
-
{ class: "text-xs text-fm-color-typo-secondary" },
|
|
29
|
-
(o == null ? void 0 : o.phoneNumber) || "-"
|
|
30
|
-
)
|
|
31
|
-
].filter(Boolean)
|
|
32
|
-
)
|
|
33
|
-
]
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
function b(o, n) {
|
|
37
|
-
var a, t;
|
|
38
|
-
return ((t = (a = o.collection) == null ? void 0 : a.TITLE) == null ? void 0 : t.map(
|
|
39
|
-
(i) => {
|
|
40
|
-
var l;
|
|
41
|
-
return (l = n == null ? void 0 : n.find((m) => m._id === i.collectible)) == null ? void 0 : l.name;
|
|
42
|
-
}
|
|
43
|
-
).join(", ")) || "-";
|
|
44
|
-
}
|
|
45
|
-
function v(o, n) {
|
|
46
|
-
var t, i, l, m;
|
|
47
|
-
const a = (((l = (i = (t = o.collection) == null ? void 0 : t.TIER) == null ? void 0 : i[0]) == null ? void 0 : l.balance) || 0) - 1;
|
|
48
|
-
return ((m = n[a]) == null ? void 0 : m.name) || "-";
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
v as a,
|
|
52
|
-
b,
|
|
53
|
-
g
|
|
54
|
-
};
|