@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.17-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-CKM1hA08.js +612 -0
- package/dist/{Broadcast-X69Mtv3b.js → Broadcast-DzJRPvz5.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7J9gl35.js} +8 -8
- package/dist/{Card-D0X3v1UF.js → Card-BowvmBJD.js} +121 -121
- package/dist/{Collections-umR6Ehqf.js → Collections-DHi8bxpj.js} +129 -141
- package/dist/{Credit-C1EWF7R0.js → Credit-DakCAG7z.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B6L77rz7.js} +22 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-RLmpxA5_.js} +6 -6
- package/dist/{Experience-CqL8wyPm.js → Experience-CnHloEig.js} +7 -7
- package/dist/{Game--kYe64EV.js → Game-D-X4EgC-.js} +7 -7
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js → ImageInput.vue_vue_type_script_setup_true_lang-DZhanVR2.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → MainLayout-BAyMP_C8.js} +53 -20
- package/dist/{Marketing-CTCQ5ZmZ.js → Marketing-c4QG38L1.js} +25 -25
- package/dist/{Member-DCduX7zP.js → Member-DQBVPHCv.js} +2 -2
- package/dist/MemberList-Ci6LRnrH.js +1718 -0
- package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-CztAzAA6.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B_hDmE8e.js +203 -0
- package/dist/{Mission-CVr9rS_D.js → Mission-Cj_hi3tv.js} +7 -7
- package/dist/{Point-BnZ6M74y.js → Point-BGDCrLdw.js} +7 -7
- package/dist/{Promotion-B0PUve5S.js → Promotion-BABafzmp.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-C7Tqs2pq.js} +14 -14
- package/dist/{Segment-B-XpkyM5.js → Segment-Bh8bddz_.js} +18 -19
- package/dist/{Setting-Zrj5P_4m.js → Setting-ByrGfBdk.js} +541 -571
- package/dist/Store-6lrxcf8I.js +1442 -0
- package/dist/{StoreRewards-D8410Q_-.js → StoreRewards-C5bJ9hxE.js} +74 -75
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DaboQyfR.js} +79 -82
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DUaTP2_0.js +124 -0
- package/dist/{Tier-DVWJyQ9S.js → Tier-D71DR1ez.js} +68 -71
- package/dist/{Title-B5kX64vs.js → Title-CxAYzUIx.js} +75 -78
- package/dist/{Transaction-CZBO4v4d.js → Transaction-BWRGkDrb.js} +1 -1
- package/dist/{Voucher-se-4JF9B.js → Voucher-BLy2jD1L.js} +37 -37
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/{app-B2ImSO3V.js → app-BGUDahHa.js} +1 -1
- package/dist/{app-DkI7dYRN.js → app-roSGTcOh.js} +46 -46
- package/dist/app.js +1 -1
- package/dist/{campaign-BZJuknWK.js → campaign-B7-BUOfP.js} +11 -13
- package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-DHlfGYAC.js} +2 -4
- package/dist/{dto-BWpvRpK2.js → dto-zv3OTrbd.js} +214 -215
- package/dist/{effect-B8kmnKvY.js → effect-DLtYeqVg.js} +1 -1
- package/dist/{export-Dm6LYnWo.js → export-Bm6xBE89.js} +3 -3
- package/dist/{helper-DR4XK3nv.js → helper-BaLvfRCZ.js} +1 -1
- package/dist/{index-DcUrk07Q.js → index-BmgXoYUK.js} +1 -1
- package/dist/{index-CuL5-ORK.js → index-D9Ft2U8O.js} +8 -9
- package/dist/{index-CWf0mh3a.js → index-DIA3Lkck.js} +2 -2
- package/dist/{index-BryrRq8O.js → index-DP2wL3EA.js} +37 -47
- package/dist/{index-CkiYkbXb.js → index-DgAr53Ae.js} +1 -1
- package/dist/{index-yxJMhfxj.js → index-DiC8aGiv.js} +66 -109
- package/dist/{index-boor8e80.js → index-DrA3F2aA.js} +27 -28
- package/dist/{index-BxkxVtgm.js → index-Qr6T_tfL.js} +1 -1
- package/dist/index-SdCqUstr.js +244 -0
- package/dist/{index-Bu4_26qI.js → index-aYwIKfns.js} +1 -1
- package/dist/{loading-BzV5acUX.js → loading-CB6v7hws.js} +4 -4
- package/dist/{lodash-mg4435Qq.js → lodash-DkICSg8W.js} +1 -1
- package/dist/{membership-CqbsLHqx.js → membership-CFVkuT3Z.js} +58 -63
- package/dist/{money-DA_gtp3q.js → money-DMEHb1PR.js} +1 -1
- package/dist/{number-C388eyOu.js → number-RVupiUMd.js} +3 -3
- package/dist/{rule-Clmr5y4j.js → rule-CpU35zT1.js} +2 -2
- package/dist/{rule-builder-BgqNbM-P.js → rule-builder-CrtuA_0Q.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-Dwp7heBA.js → template-DxvJmDC3.js} +6 -6
- package/dist/{usePagination-o5fgsZwU.js → usePagination-FlXHEH_R.js} +1 -1
- package/dist/{xlsx-BRdh9e2p.js → xlsx-BJ7B-X33.js} +309 -309
- package/package.json +2 -2
- package/dist/Analytic-C-zZmF5N.js +0 -760
- package/dist/MainLayout-D0AoA1tk.js +0 -41
- package/dist/MemberList-B0EkXZJu.js +0 -1729
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js +0 -432
- package/dist/Store-B2gywCt2.js +0 -1503
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js +0 -139
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +0 -55
- package/dist/index-BobRgQrE.js +0 -291
- package/dist/zod-W_PvIofQ.js +0 -90
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as C, computed as L, watch as E, resolveComponent as g, openBlock as o, createElementBlock as i, Fragment as y, toDisplayString as I, createCommentVNode as A, createElementVNode as M, createVNode as v, unref as u, renderList as S, createBlock as b, isRef as U, withCtx as F } from "vue";
|
|
2
|
-
import { a as T } from "./app-DkI7dYRN.js";
|
|
3
|
-
function j(l, s, n) {
|
|
4
|
-
return l.some(
|
|
5
|
-
n instanceof Function ? n : (a) => a === s
|
|
6
|
-
) || l.push(s), l;
|
|
7
|
-
}
|
|
8
|
-
function q(l, s, n) {
|
|
9
|
-
return l.filter(
|
|
10
|
-
n instanceof Function ? (a) => !n(a) : (a) => a !== s
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
const D = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "fm-typo-en-body-lg-400"
|
|
16
|
-
}, K = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "space-y-4"
|
|
19
|
-
}, O = { key: 0 }, R = { key: 1 }, z = { key: 2 }, J = /* @__PURE__ */ N({
|
|
20
|
-
__name: "TargetLocationInput",
|
|
21
|
-
props: {
|
|
22
|
-
label: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "select"
|
|
28
|
-
},
|
|
29
|
-
modelValue: {
|
|
30
|
-
type: Object,
|
|
31
|
-
required: !0
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["update:model-value"],
|
|
35
|
-
setup(l, { emit: s }) {
|
|
36
|
-
const n = T(), a = l, c = C(""), w = L(() => n.locations.filter(
|
|
37
|
-
(d) => {
|
|
38
|
-
var t;
|
|
39
|
-
return d.name.toLowerCase().includes(c.value.toLowerCase()) || ((t = d == null ? void 0 : d.code) == null ? void 0 : t.toLowerCase().includes(c.value.toLowerCase()));
|
|
40
|
-
}
|
|
41
|
-
)), p = s;
|
|
42
|
-
function k(d, t) {
|
|
43
|
-
const m = d ? j(a.modelValue || [], t.toString()) : q(
|
|
44
|
-
a.modelValue || n.locations.map((V) => V._id.toString()),
|
|
45
|
-
t.toString()
|
|
46
|
-
);
|
|
47
|
-
return p("update:model-value", m);
|
|
48
|
-
}
|
|
49
|
-
const r = C(!1), $ = L(() => {
|
|
50
|
-
var m, V;
|
|
51
|
-
const t = ((m = a.modelValue) == null ? void 0 : m.slice(0, 5).map((h) => {
|
|
52
|
-
var f;
|
|
53
|
-
return ((f = n.locationById(h)) == null ? void 0 : f.name) || h;
|
|
54
|
-
})) || [];
|
|
55
|
-
return a.modelValue && ((V = a.modelValue) == null ? void 0 : V.length) > 5 && t.push(`+${a.modelValue.length - 5} more`), t;
|
|
56
|
-
});
|
|
57
|
-
return E(r, (d) => {
|
|
58
|
-
d && (c.value = "");
|
|
59
|
-
}), (d, t) => {
|
|
60
|
-
const m = g("FmCheckbox"), V = g("FmChip"), h = g("FmField"), f = g("FmTextField"), B = g("FmMenu");
|
|
61
|
-
return o(), i(y, null, [
|
|
62
|
-
l.label ? (o(), i("div", D, I(l.label), 1)) : A("", !0),
|
|
63
|
-
l.type === "checkbox" ? (o(), i("div", K, [
|
|
64
|
-
M("div", null, [
|
|
65
|
-
v(m, {
|
|
66
|
-
value: null,
|
|
67
|
-
indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < u(n).locations.length,
|
|
68
|
-
label: "All locations",
|
|
69
|
-
"model-value": l.modelValue == null || l.modelValue.length === u(n).locations.length,
|
|
70
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) => p("update:model-value", e ? null : []))
|
|
71
|
-
}, null, 8, ["indeterminate", "model-value"])
|
|
72
|
-
]),
|
|
73
|
-
(o(!0), i(y, null, S(u(n).locations, (e) => (o(), i("div", {
|
|
74
|
-
key: e._id.toString()
|
|
75
|
-
}, [
|
|
76
|
-
v(m, {
|
|
77
|
-
value: e._id.toString(),
|
|
78
|
-
label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
|
|
79
|
-
"model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
|
|
80
|
-
"onUpdate:modelValue": (x) => k(x, e._id.toString())
|
|
81
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"])
|
|
82
|
-
]))), 128))
|
|
83
|
-
])) : (o(), b(B, {
|
|
84
|
-
key: 2,
|
|
85
|
-
modelValue: u(r),
|
|
86
|
-
"onUpdate:modelValue": t[3] || (t[3] = (e) => U(r) ? r.value = e : null),
|
|
87
|
-
onMenuChanged: t[4] || (t[4] = (e) => r.value = e),
|
|
88
|
-
placement: "top-end"
|
|
89
|
-
}, {
|
|
90
|
-
"menu-button": F(() => [
|
|
91
|
-
v(h, {
|
|
92
|
-
"append-icon": u(r) ? "expand_more" : "expand_less",
|
|
93
|
-
class: "!h-auto"
|
|
94
|
-
}, {
|
|
95
|
-
default: F(() => [
|
|
96
|
-
!l.modelValue || l.modelValue.length == u(n).locations.length ? (o(), i("div", O, " All Locations ")) : l.modelValue.length ? (o(), i("div", z, [
|
|
97
|
-
(o(!0), i(y, null, S(u($), (e) => (o(), b(V, {
|
|
98
|
-
key: e,
|
|
99
|
-
label: e,
|
|
100
|
-
class: "max-w-[130px] text-ellipsis"
|
|
101
|
-
}, null, 8, ["label"]))), 128))
|
|
102
|
-
])) : (o(), i("div", R, "No Locations"))
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
}, 8, ["append-icon"])
|
|
106
|
-
]),
|
|
107
|
-
default: F(() => [
|
|
108
|
-
v(f, {
|
|
109
|
-
modelValue: u(c),
|
|
110
|
-
"onUpdate:modelValue": t[1] || (t[1] = (e) => U(c) ? c.value = e : null),
|
|
111
|
-
placeholder: "Search locations",
|
|
112
|
-
class: "my-8"
|
|
113
|
-
}, null, 8, ["modelValue"]),
|
|
114
|
-
v(m, {
|
|
115
|
-
class: "my-8",
|
|
116
|
-
value: null,
|
|
117
|
-
indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < u(n).locations.length,
|
|
118
|
-
label: "All locations",
|
|
119
|
-
"model-value": l.modelValue == null || l.modelValue.length === u(n).locations.length,
|
|
120
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) => p("update:model-value", e ? null : []))
|
|
121
|
-
}, null, 8, ["indeterminate", "model-value"]),
|
|
122
|
-
(o(!0), i(y, null, S(u(w), (e) => (o(), b(m, {
|
|
123
|
-
class: "my-8",
|
|
124
|
-
key: e._id.toString(),
|
|
125
|
-
value: e._id.toString(),
|
|
126
|
-
label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
|
|
127
|
-
"model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
|
|
128
|
-
"onUpdate:modelValue": (x) => k(x, e._id.toString())
|
|
129
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["modelValue"]))
|
|
133
|
-
], 64);
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
export {
|
|
138
|
-
J as _
|
|
139
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, useAttrs as p, resolveComponent as f, openBlock as o, createBlock as y, mergeProps as b, unref as t, createSlots as v, withCtx as x, createElementVNode as a, toDisplayString as g, renderSlot as h, createElementBlock as k, createCommentVNode as F } from "vue";
|
|
2
|
-
import { Z as d } from "./zod-W_PvIofQ.js";
|
|
3
|
-
const S = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, V = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "text-fm-color-typo-tertiary"
|
|
6
|
-
}, q = /* @__PURE__ */ u({
|
|
7
|
-
__name: "ZodTextField",
|
|
8
|
-
props: {
|
|
9
|
-
label: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: !1
|
|
12
|
-
},
|
|
13
|
-
schema: {
|
|
14
|
-
type: Object,
|
|
15
|
-
required: !0
|
|
16
|
-
},
|
|
17
|
-
modelValue: {
|
|
18
|
-
type: String
|
|
19
|
-
},
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !1
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
emits: ["update:model-value", "focus-changed"],
|
|
26
|
-
setup(e, { emit: r }) {
|
|
27
|
-
const s = r, n = p();
|
|
28
|
-
return (m, l) => {
|
|
29
|
-
const i = f("FmTextField");
|
|
30
|
-
return o(), y(i, b({
|
|
31
|
-
"model-value": e.modelValue,
|
|
32
|
-
"onUpdate:modelValue": l[0] || (l[0] = (c) => s("update:model-value", c)),
|
|
33
|
-
disabled: e.disabled
|
|
34
|
-
}, t(n), {
|
|
35
|
-
rules: [t(d).toRule(e.schema)]
|
|
36
|
-
}), v({ _: 2 }, [
|
|
37
|
-
e.label ? {
|
|
38
|
-
name: "label",
|
|
39
|
-
fn: x(() => [
|
|
40
|
-
a("div", S, [
|
|
41
|
-
a("div", null, g(e.label), 1),
|
|
42
|
-
h(m.$slots, "append-label", {}, () => [
|
|
43
|
-
t(d).isRequired(e.schema) ? F("", !0) : (o(), k("div", V, " (optional) "))
|
|
44
|
-
])
|
|
45
|
-
])
|
|
46
|
-
]),
|
|
47
|
-
key: "0"
|
|
48
|
-
} : void 0
|
|
49
|
-
]), 1040, ["model-value", "disabled", "rules"]);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export {
|
|
54
|
-
q as _
|
|
55
|
-
};
|
package/dist/index-BobRgQrE.js
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
import { z as e, F as t, g as f, e as s, d as r, m as a } from "./loading-BzV5acUX.js";
|
|
2
|
-
import { e as d } from "./index-CWf0mh3a.js";
|
|
3
|
-
import "vue";
|
|
4
|
-
const I = e.object({
|
|
5
|
-
icon: e.string(),
|
|
6
|
-
label: e.string(),
|
|
7
|
-
value: e.string()
|
|
8
|
-
}), E = e.object({
|
|
9
|
-
gatewayKey: e.enum([
|
|
10
|
-
"REVENUE_MONSTER",
|
|
11
|
-
"FEEDME",
|
|
12
|
-
"FEEDME_MEMBER_CREDIT",
|
|
13
|
-
"RAZER_MERCHANT_SERVICE"
|
|
14
|
-
]),
|
|
15
|
-
checkoutUrl: e.string().optional(),
|
|
16
|
-
checkoutId: e.string().optional(),
|
|
17
|
-
callbackUrl: e.string().optional(),
|
|
18
|
-
vcode: e.string().optional(),
|
|
19
|
-
merchantId: e.string().optional(),
|
|
20
|
-
amount: e.string().optional(),
|
|
21
|
-
currency: e.string().optional(),
|
|
22
|
-
returnUrl: e.string().optional(),
|
|
23
|
-
notifyUrl: e.string().optional(),
|
|
24
|
-
channels: e.array(I).optional(),
|
|
25
|
-
transactionId: e.string().optional()
|
|
26
|
-
});
|
|
27
|
-
e.object({
|
|
28
|
-
trx: e.lazy(() => M),
|
|
29
|
-
onlineTrx: E.optional(),
|
|
30
|
-
url: e.string().optional()
|
|
31
|
-
});
|
|
32
|
-
const l = e.enum(["POS", "APP"]), u = e.enum(["topupCount"]), F = e.object({
|
|
33
|
-
line1: e.string(),
|
|
34
|
-
line2: e.string().optional(),
|
|
35
|
-
state: e.string(),
|
|
36
|
-
city: e.string(),
|
|
37
|
-
postcode: e.string(),
|
|
38
|
-
country: e.string()
|
|
39
|
-
}), m = e.object({
|
|
40
|
-
name: e.string(),
|
|
41
|
-
regNo: e.string(),
|
|
42
|
-
address: F,
|
|
43
|
-
phoneNo: e.string(),
|
|
44
|
-
sstRegNo: e.string().optional()
|
|
45
|
-
}), p = e.object({
|
|
46
|
-
systemCode: e.string(),
|
|
47
|
-
inclusive: e.boolean()
|
|
48
|
-
}), P = e.object({
|
|
49
|
-
id: t,
|
|
50
|
-
dayToExpire: e.number()
|
|
51
|
-
}), j = e.object({
|
|
52
|
-
normal: e.coerce.number(),
|
|
53
|
-
free: e.object({
|
|
54
|
-
day: e.coerce.number(),
|
|
55
|
-
amount: e.coerce.number(),
|
|
56
|
-
remark: e.string().nullish()
|
|
57
|
-
}).nullish()
|
|
58
|
-
}), T = e.object({
|
|
59
|
-
systemCode: e.string(),
|
|
60
|
-
taxCode: e.string()
|
|
61
|
-
}), _ = e.object({
|
|
62
|
-
name: e.string(),
|
|
63
|
-
systemCode: e.string(),
|
|
64
|
-
taxCode: e.string(),
|
|
65
|
-
rate: f,
|
|
66
|
-
total: s
|
|
67
|
-
});
|
|
68
|
-
e.object({
|
|
69
|
-
canPurchase: e.boolean(),
|
|
70
|
-
reason: e.string()
|
|
71
|
-
});
|
|
72
|
-
e.object({
|
|
73
|
-
type: u
|
|
74
|
-
});
|
|
75
|
-
e.object({
|
|
76
|
-
type: u,
|
|
77
|
-
min: e.number().nullish(),
|
|
78
|
-
max: e.number().nullish()
|
|
79
|
-
});
|
|
80
|
-
const N = e.object({
|
|
81
|
-
options: e.object({
|
|
82
|
-
maxReceive: e.number().min(0).nullish(),
|
|
83
|
-
maxPerUser: e.number().min(0).nullish()
|
|
84
|
-
}),
|
|
85
|
-
rule: d.nullish()
|
|
86
|
-
}), C = (o, i) => {
|
|
87
|
-
const n = o;
|
|
88
|
-
n.isFeedvibe && r.Dinero.fromFdoDinero(n.price).toUnit() < 0.1 && i.addIssue({
|
|
89
|
-
code: "custom",
|
|
90
|
-
path: ["price"],
|
|
91
|
-
message: "Price must be at least RM10"
|
|
92
|
-
});
|
|
93
|
-
}, b = e.object({
|
|
94
|
-
_id: e.string(),
|
|
95
|
-
isFeedvibe: e.boolean().nullish(),
|
|
96
|
-
// conditions: z.array(FdoTopupCountCondition),
|
|
97
|
-
image: e.string().nullish(),
|
|
98
|
-
rule: d.nullish(),
|
|
99
|
-
name: e.string(),
|
|
100
|
-
price: s,
|
|
101
|
-
originalPrice: s.nullish(),
|
|
102
|
-
// new field to indicate coinPrice
|
|
103
|
-
coinPrice: e.number().nullish(),
|
|
104
|
-
titles: e.array(P),
|
|
105
|
-
credit: j,
|
|
106
|
-
taxes: e.array(T),
|
|
107
|
-
taxTotals: e.array(_),
|
|
108
|
-
priceWithTaxes: s.nullish(),
|
|
109
|
-
vouchers: e.array(t),
|
|
110
|
-
_inclusiveTaxes: e.array(p).nullish(),
|
|
111
|
-
_taxSystem: e.array(e.string()).nullish(),
|
|
112
|
-
stripePriceId: e.string().nullish(),
|
|
113
|
-
subscriptionValidity: e.number().min(1, "Must be at least 1 day").max(365, "Maximum is 365").nullish(),
|
|
114
|
-
redeemWithCode: e.boolean().nullish(),
|
|
115
|
-
internal: e.boolean().optional(),
|
|
116
|
-
hideInPos: e.boolean().optional(),
|
|
117
|
-
config: N.optional(),
|
|
118
|
-
pf_titles: e.array(e.any()).optional(),
|
|
119
|
-
pf_vouchers: e.array(e.any()).optional(),
|
|
120
|
-
pf_credit: e.number().optional()
|
|
121
|
-
}).superRefine((o, i) => {
|
|
122
|
-
var n, c;
|
|
123
|
-
o.stripePriceId && !o.subscriptionValidity && i.addIssue({
|
|
124
|
-
code: "custom",
|
|
125
|
-
message: "Validity is required when stripePriceId is provided",
|
|
126
|
-
path: ["subscriptionValidity"]
|
|
127
|
-
}), o.originalPrice && o.originalPrice.amount && o.originalPrice.amount < o.price.amount && i.addIssue({
|
|
128
|
-
code: "custom",
|
|
129
|
-
message: "Original price must be greater than price",
|
|
130
|
-
path: ["originalPrice"]
|
|
131
|
-
}), o.price.amount < 0 && i.addIssue({
|
|
132
|
-
code: "custom",
|
|
133
|
-
path: ["price"],
|
|
134
|
-
message: "Price cannot be less than 0"
|
|
135
|
-
}), o.coinPrice && o.coinPrice < 0 && i.addIssue({
|
|
136
|
-
code: "custom",
|
|
137
|
-
path: ["coinPrice"],
|
|
138
|
-
message: "Point price cannot be less than 0"
|
|
139
|
-
}), o.credit.normal < 0 && i.addIssue({
|
|
140
|
-
code: "custom",
|
|
141
|
-
path: ["credit", "normal"],
|
|
142
|
-
message: "Normal credit cannot be less than 0"
|
|
143
|
-
}), o.credit.free && (o.credit.free.amount < 0 && i.addIssue({
|
|
144
|
-
code: "custom",
|
|
145
|
-
path: ["credit", "free", "amount"],
|
|
146
|
-
message: "Free credit cannot be less than 0"
|
|
147
|
-
}), o.credit.free.amount && o.credit.free.day < 0 && i.addIssue({
|
|
148
|
-
code: "custom",
|
|
149
|
-
path: ["credit", "free", "day"],
|
|
150
|
-
message: "Expiry must be at least 0 (expire same day)"
|
|
151
|
-
})), o.credit.normal && o.coinPrice && i.addIssue({
|
|
152
|
-
code: "custom",
|
|
153
|
-
message: "Bundle redeem with point cannot set normal credit.",
|
|
154
|
-
path: ["credit", "normal"]
|
|
155
|
-
}), o.credit.normal > r.Dinero.fromFdoDinero(o.price).toUnit() && i.addIssue({
|
|
156
|
-
code: "custom",
|
|
157
|
-
message: `Normal credit cannot be more than price. Max: ${r.Dinero.fromFdoDinero(
|
|
158
|
-
o.price
|
|
159
|
-
).toUnit()}`,
|
|
160
|
-
path: ["credit", "normal"]
|
|
161
|
-
}), o.titles.length > 0 && o.titles.some((h) => h.dayToExpire < 0) && i.addIssue({
|
|
162
|
-
code: "custom",
|
|
163
|
-
path: ["titles"],
|
|
164
|
-
message: "Title expiry must be at least 0 day (expire same day)"
|
|
165
|
-
}), (((c = (n = o.config) == null ? void 0 : n.options) == null ? void 0 : c.maxPerUser) || 0) < 0 && i.addIssue({
|
|
166
|
-
code: "custom",
|
|
167
|
-
path: ["config.options.maxPerUser"],
|
|
168
|
-
message: "Max purchase per user cannot be negative"
|
|
169
|
-
});
|
|
170
|
-
}).superRefine(C), g = e.object({
|
|
171
|
-
name: e.string(),
|
|
172
|
-
bundles: e.array(b)
|
|
173
|
-
});
|
|
174
|
-
e.object({
|
|
175
|
-
_id: e.string(),
|
|
176
|
-
name: e.string(),
|
|
177
|
-
expiredAt: e.string()
|
|
178
|
-
});
|
|
179
|
-
const R = e.object({
|
|
180
|
-
apiKey: e.string(),
|
|
181
|
-
webhookSecret: e.string()
|
|
182
|
-
}), S = e.object({
|
|
183
|
-
company: m.nullish(),
|
|
184
|
-
inclusiveTaxes: e.array(p).nullish(),
|
|
185
|
-
stripe: R.optional()
|
|
186
|
-
}), x = {
|
|
187
|
-
collectionName: "Stores",
|
|
188
|
-
transform: {
|
|
189
|
-
_id: "oid",
|
|
190
|
-
business: "oid"
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
S.extend({
|
|
194
|
-
_id: t,
|
|
195
|
-
business: t,
|
|
196
|
-
categories: e.array(g)
|
|
197
|
-
}).describe(a.describe(x));
|
|
198
|
-
const D = e.object({
|
|
199
|
-
refundedAt: e.coerce.date(),
|
|
200
|
-
reason: e.string(),
|
|
201
|
-
transactions: e.array(t)
|
|
202
|
-
}), y = e.object({
|
|
203
|
-
type: e.enum(["ONLINE", "OFFLINE", "COIN", "STRIPE", "CARD", "FEEDVIBE"]),
|
|
204
|
-
extra: e.string().nullish()
|
|
205
|
-
}), M = e.object({
|
|
206
|
-
_id: t,
|
|
207
|
-
source: l,
|
|
208
|
-
// can be memberStorePurchase
|
|
209
|
-
ref: e.string(),
|
|
210
|
-
business: t,
|
|
211
|
-
company: m,
|
|
212
|
-
location: t.optional(),
|
|
213
|
-
member: t,
|
|
214
|
-
// createdAt: z.coerce.date(),
|
|
215
|
-
bundle: b,
|
|
216
|
-
transactions: e.array(t),
|
|
217
|
-
// array of transaction id (voucher, credit, title)
|
|
218
|
-
status: e.enum([
|
|
219
|
-
"PENDING_PAYMENT",
|
|
220
|
-
"PENDING_TRANSACTION",
|
|
221
|
-
"COMPLETED",
|
|
222
|
-
"REFUNDED"
|
|
223
|
-
]),
|
|
224
|
-
refund: D.nullish(),
|
|
225
|
-
paymentType: y.nullish(),
|
|
226
|
-
paymentRef: e.string().nullish(),
|
|
227
|
-
pf_transactions: e.array(e.any()).optional(),
|
|
228
|
-
pf_member: e.any().optional(),
|
|
229
|
-
pf_location: e.any().optional(),
|
|
230
|
-
pf_ref: e.any().optional()
|
|
231
|
-
}).describe(
|
|
232
|
-
a.describe({
|
|
233
|
-
collectionName: "StoreTransactions",
|
|
234
|
-
transform: {
|
|
235
|
-
_id: "oid",
|
|
236
|
-
business: "oid",
|
|
237
|
-
location: "oid",
|
|
238
|
-
member: "oid",
|
|
239
|
-
transaction: "oid"
|
|
240
|
-
}
|
|
241
|
-
})
|
|
242
|
-
);
|
|
243
|
-
e.object({
|
|
244
|
-
bundle: t,
|
|
245
|
-
member: e.string(),
|
|
246
|
-
ref: e.string(),
|
|
247
|
-
paymentType: y.nullish(),
|
|
248
|
-
withCoin: e.boolean().optional(),
|
|
249
|
-
card: e.string().optional(),
|
|
250
|
-
location: t.optional(),
|
|
251
|
-
source: l
|
|
252
|
-
});
|
|
253
|
-
e.object({
|
|
254
|
-
categories: e.array(g)
|
|
255
|
-
});
|
|
256
|
-
e.object({
|
|
257
|
-
id: t,
|
|
258
|
-
reason: e.string(),
|
|
259
|
-
location: t.optional()
|
|
260
|
-
});
|
|
261
|
-
e.object({
|
|
262
|
-
_id: t,
|
|
263
|
-
business: t,
|
|
264
|
-
user: t,
|
|
265
|
-
bundleId: e.string(),
|
|
266
|
-
transaction: e.array(t),
|
|
267
|
-
subscriptionId: e.string(),
|
|
268
|
-
expiredAt: e.coerce.date()
|
|
269
|
-
}).describe(
|
|
270
|
-
a.describe({
|
|
271
|
-
collectionName: "StoreSubscriptions",
|
|
272
|
-
transform: {
|
|
273
|
-
_id: "oid",
|
|
274
|
-
business: "oid",
|
|
275
|
-
user: "oid",
|
|
276
|
-
transaction: "oid",
|
|
277
|
-
expiredAt: "date"
|
|
278
|
-
}
|
|
279
|
-
})
|
|
280
|
-
);
|
|
281
|
-
e.object({
|
|
282
|
-
member: e.string(),
|
|
283
|
-
subscriptionId: e.string()
|
|
284
|
-
});
|
|
285
|
-
export {
|
|
286
|
-
S as F,
|
|
287
|
-
m as a,
|
|
288
|
-
F as b,
|
|
289
|
-
b as c,
|
|
290
|
-
M as d
|
|
291
|
-
};
|
package/dist/zod-W_PvIofQ.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { h as u } from "vue";
|
|
2
|
-
function a(e, o) {
|
|
3
|
-
return e.path.join(".") === o;
|
|
4
|
-
}
|
|
5
|
-
function Z(e, o) {
|
|
6
|
-
return e.some((t) => o == "" || a(t, o)) ? "error" : "none";
|
|
7
|
-
}
|
|
8
|
-
function p(e, o) {
|
|
9
|
-
return e.filter((t) => o == "" || a(t, o)).map((t) => t.message).join(",") || void 0;
|
|
10
|
-
}
|
|
11
|
-
const r = {
|
|
12
|
-
ZodIntersection: (e) => e._def.typeName == "ZodIntersection",
|
|
13
|
-
ZodNullable: (e) => e._def.typeName == "ZodNullable",
|
|
14
|
-
ZodOptional: (e) => e._def.typeName == "ZodOptional",
|
|
15
|
-
ZodEffects: (e) => e._def.typeName == "ZodEffects",
|
|
16
|
-
ZodDiscriminatedUnion: (e) => e._def.typeName == "ZodDiscriminatedUnion",
|
|
17
|
-
ZodUnion: (e) => e._def.typeName == "ZodUnion",
|
|
18
|
-
ZodLazy: (e) => e._def.typeName == "ZodLazy",
|
|
19
|
-
ZodRecord: (e) => e._def.typeName == "ZodRecord",
|
|
20
|
-
ZodObject: (e) => e._def.typeName == "ZodObject"
|
|
21
|
-
};
|
|
22
|
-
function s(e) {
|
|
23
|
-
return !(r.ZodNullable(e) || r.ZodOptional(e));
|
|
24
|
-
}
|
|
25
|
-
function f(e, o = []) {
|
|
26
|
-
function t(d) {
|
|
27
|
-
const n = [d._def.left, d._def.right];
|
|
28
|
-
return r.ZodObject(n[0]) && r.ZodObject(n[1]) ? Object.keys(n[0].shape).length > Object.keys(n[1].shape).length ? n[0] : n[1] : n.find((i) => r.ZodDiscriminatedUnion(i)) || n.find((i) => r.ZodObject(i)) || n[1];
|
|
29
|
-
}
|
|
30
|
-
if ((r.ZodNullable(e) || r.ZodOptional(e)) && (e = f(e.unwrap(), o)), r.ZodEffects(e) && (e = f(e.sourceType(), o)), r.ZodDiscriminatedUnion(e)) {
|
|
31
|
-
const d = Object.fromEntries(e.optionsMap.entries());
|
|
32
|
-
if (o.length) {
|
|
33
|
-
const n = o.shift(), i = d[n];
|
|
34
|
-
return f(i, o);
|
|
35
|
-
}
|
|
36
|
-
return console.log(
|
|
37
|
-
"discriminatedUnion found but no KEY supplied, keys:",
|
|
38
|
-
Object.keys(d)
|
|
39
|
-
), e;
|
|
40
|
-
}
|
|
41
|
-
return r.ZodLazy(e) && (e = f(e._def.getter(), o)), r.ZodIntersection(e) && (e = f(t(e), o)), e;
|
|
42
|
-
}
|
|
43
|
-
function c(e, o, t = []) {
|
|
44
|
-
return o === "" ? f(e, t) : o.split(".").reduce((d, n) => {
|
|
45
|
-
const i = f(d, t);
|
|
46
|
-
return r.ZodObject(i) ? i.shape[n] : d;
|
|
47
|
-
}, e);
|
|
48
|
-
}
|
|
49
|
-
function l(e, o) {
|
|
50
|
-
return (t) => {
|
|
51
|
-
const d = e.safeParse(t);
|
|
52
|
-
return d.success ? !0 : d.error.errors.filter((n) => !o || n.path.join(".") === o).map((n) => n.message).join(", ");
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function b(e, o, t = []) {
|
|
56
|
-
return l(c(e, o, t));
|
|
57
|
-
}
|
|
58
|
-
function m(e, o) {
|
|
59
|
-
if (!o) return;
|
|
60
|
-
const t = s(e) ? "hidden" : "";
|
|
61
|
-
return u(
|
|
62
|
-
"div",
|
|
63
|
-
{ class: "flex items-center gap-x-4 fm-typo-en-body-lg-400" },
|
|
64
|
-
[
|
|
65
|
-
u("div", o),
|
|
66
|
-
u(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
class: `text-fm-color-typo-secondary ${t}`
|
|
70
|
-
},
|
|
71
|
-
"(optional)"
|
|
72
|
-
)
|
|
73
|
-
]
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
const h = {
|
|
77
|
-
helperState: Z,
|
|
78
|
-
helperText: p,
|
|
79
|
-
typeAtPath: c,
|
|
80
|
-
toRule: l,
|
|
81
|
-
ruleAtPath: b,
|
|
82
|
-
isRequired: s,
|
|
83
|
-
toInputLabel: m,
|
|
84
|
-
unwrap: f
|
|
85
|
-
};
|
|
86
|
-
export {
|
|
87
|
-
h as Z,
|
|
88
|
-
p as a,
|
|
89
|
-
Z as g
|
|
90
|
-
};
|