@feedmepos/mf-connect 0.1.0-beta.3 → 0.1.0-beta.31

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.
Files changed (99) hide show
  1. package/dist/Analytic-C-QC9ivZ.js +424 -0
  2. package/dist/{App-gzbM97vW.js → App-NASVRSh2.js} +397 -384
  3. package/dist/{Broadcast-BwYZkTs0.js → Broadcast-Cffg7nbY.js} +32 -32
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DIh9rz6T.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CA4kVwMl.js} +8 -8
  5. package/dist/Card-CmYFb1_Y.js +897 -0
  6. package/dist/{Collections-Df6tlo8S.js → Collections-CibvGIpU.js} +4 -4
  7. package/dist/{Credit-BPel8vA9.js → Credit-Ck6i9ySs.js} +14 -14
  8. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B35zbHHI.js +2198 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BT8ucS5G.js → EffectSheet.vue_vue_type_style_index_0_lang-CQV77_cx.js} +8 -8
  11. package/dist/{Experience-CPpz1Zwx.js → Experience-CWUX2QvS.js} +8 -8
  12. package/dist/{Game-ByLblISC.js → Game-D3cdZrlc.js} +15 -15
  13. package/dist/Index-CWLZiYXT.js +255 -0
  14. package/dist/Marketing-Bol8eY5d.js +20070 -0
  15. package/dist/{Member-CCc_FEZY.js → Member-Cso-T2Xk.js} +4 -4
  16. package/dist/MemberList-Bqns9wko.js +1045 -0
  17. package/dist/{MemberTransactions-DD5ahSbY.js → MemberTransactions-zNw-30Xu.js} +1 -1
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DSPvWk4C.js → MessageInput.vue_vue_type_script_setup_true_lang-BLS5fNr6.js} +2 -2
  19. package/dist/{Mission-VH4057I-.js → Mission-C0-K0A_5.js} +98 -86
  20. package/dist/Overview-fZ9NvFKz.js +1024 -0
  21. package/dist/{Point-Bu3IlpH4.js → Point-D3gGhQlP.js} +23 -23
  22. package/dist/{Promotion-B45AOHis.js → Promotion-COCJIfu-.js} +53 -47
  23. package/dist/Record-C0a4Cn1U.js +209 -0
  24. package/dist/Reward-D0G4CBYd.js +411 -0
  25. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-zSOwxAcS.js +151 -0
  26. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AmIdaAeX.js +1639 -0
  27. package/dist/Segment-eBM3aveX.js +567 -0
  28. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BgMuKAjE.js +181 -0
  29. package/dist/{Setting-CF09eRQJ.js → Setting-Dfye6fs5.js} +8 -8
  30. package/dist/Store-rQfwc8d6.js +1745 -0
  31. package/dist/{StoreRewards-0iGExjqQ.js → StoreRewards-DVTNMWdG.js} +12 -12
  32. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3dvBoXz2.js +957 -0
  33. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BEfxin47.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DxGIUrmO.js} +1 -1
  34. package/dist/{Tier-IaeWe7rM.js → Tier-DekrYu5l.js} +327 -317
  35. package/dist/{Title-DD67Zxh5.js → Title-oAWsBqoM.js} +199 -183
  36. package/dist/{Transaction-BsPDnLzB.js → Transaction-Ss2XCksi.js} +2 -2
  37. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BMIqnBts.js +130 -0
  38. package/dist/{Voucher-M7JfcKo0.js → Voucher-CjPJxdw8.js} +31 -31
  39. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DlWCpoOp.js +419 -0
  40. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-k0lprU2i.js → ZodTextField.vue_vue_type_script_setup_true_lang-FXQNhMrv.js} +1 -1
  41. package/dist/{app-HFICF0vL.js → app-C_zlbFNe.js} +1285 -1283
  42. package/dist/{app-DwujUNP-.js → app-WUJQRyEM.js} +1 -1
  43. package/dist/app.js +1 -1
  44. package/dist/{business-BaF1QJXa.js → business-C0e_E2xp.js} +1 -1
  45. package/dist/{campaign-CTDtmAE9.js → campaign-iWzbtNA5.js} +2 -2
  46. package/dist/collectible.enum-QITAo8Jg.js +19 -0
  47. package/dist/{collection.fn-DMW03W4R.js → collection.fn-R3hvasuZ.js} +2 -2
  48. package/dist/{dto-gpaNZHzQ.js → dto-D_tjJ72q.js} +78 -86
  49. package/dist/{effect-CBUmtwet.js → effect-_bpW5fmr.js} +9 -9
  50. package/dist/email-addresses-DUKn8uD0.js +705 -0
  51. package/dist/{export-Bdh_PbsW.js → export-CEBWZ8ko.js} +3 -3
  52. package/dist/{helper-Cu9elRvl.js → helper-CuF45pbY.js} +1 -1
  53. package/dist/{index-NXiDu42U.js → index-BO8RnVxy.js} +1 -1
  54. package/dist/{index-CArqG03W.js → index-BPc3wxOE.js} +39 -35
  55. package/dist/index-BXTQ6onZ.js +1067 -0
  56. package/dist/index-C4aPU80a.js +38 -0
  57. package/dist/{index-At6yms5t.js → index-CBzSPD25.js} +30 -26
  58. package/dist/{index-Ch6XwPzF.js → index-CR0ZVZQG.js} +1 -1
  59. package/dist/{index-DrGrOgZB.js → index-CXFwMV0s.js} +13 -1
  60. package/dist/index-CsaQJMAR.js +66 -0
  61. package/dist/{index-Dfdg2Q3E.js → index-Dh6xIUXJ.js} +1 -1
  62. package/dist/{index-ogzk-Mj4.js → index-LMvyNoHf.js} +1 -1
  63. package/dist/{index-Crw-Vgo5.js → index-S6sFiBxK.js} +1500 -1479
  64. package/dist/index-SpDFfOz_.js +54 -0
  65. package/dist/{index-CtH2S49l.js → index-Urbp7cdO.js} +203 -195
  66. package/dist/index-pHbs1GrF.js +29000 -0
  67. package/dist/{index.esm2017-CeJpvUbA.js → index.esm2017-BunOalUj.js} +33 -33
  68. package/dist/{loading-Cn8ml_vy.js → loading-CYFsZ9UB.js} +591 -597
  69. package/dist/{membership-CX4AKMlH.js → membership-C9089j0H.js} +51 -43
  70. package/dist/money-D-zGFohv.js +15 -0
  71. package/dist/number-UFl4zW6h.js +12 -0
  72. package/dist/objectid-BKIyQ5iE.js +145 -0
  73. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  74. package/dist/reward-LYKGLzXz.js +36 -0
  75. package/dist/{rule-Cv83Y59R.js → rule-BUUKmR4_.js} +180 -177
  76. package/dist/{rule-builder-Dew4yB5Q.js → rule-builder-9JUuOcMH.js} +1 -1
  77. package/dist/style.css +1 -1
  78. package/dist/{template-CSnbgM1o.js → template-CkXuF0cN.js} +5 -5
  79. package/dist/trigger-DjAx9efN.js +114 -0
  80. package/dist/user-DbsZta3D.js +54 -0
  81. package/dist/{vue-i18n-CNH_IhVd.js → vue-i18n-yYO72Mbp.js} +2 -2
  82. package/dist/{xlsx-D4DUZHix.js → xlsx-Dagi6ArS.js} +1 -1
  83. package/package.json +8 -7
  84. package/dist/Analytic-BC5BA6pN.js +0 -622
  85. package/dist/Card-CBYQGKwY.js +0 -825
  86. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-PsrS7I0r.js +0 -2809
  87. package/dist/Marketing-D0vm80e_.js +0 -316
  88. package/dist/MemberList-CrnipE9y.js +0 -1733
  89. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ijc2OYh9.js +0 -1753
  90. package/dist/Segment-ZWsp48aC.js +0 -437
  91. package/dist/Store-B_G6Dhmq.js +0 -1511
  92. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CaxUr9zl.js +0 -890
  93. package/dist/index-8MaN7rez.js +0 -762
  94. package/dist/index-BjdHxGDn.js +0 -298
  95. package/dist/index-CuvNtC_M.js +0 -61
  96. package/dist/index-RP0XOPRL.js +0 -29193
  97. package/dist/money-BTejgvKu.js +0 -15
  98. package/dist/number-Cen5TucC.js +0 -12
  99. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,298 +0,0 @@
1
- import { z as e, F as t, g as f, e as s, d as r, m as a } from "./loading-Cn8ml_vy.js";
2
- import { e as l } from "./index-Crw-Vgo5.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 d = 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
- }), T = 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
- }), _ = e.object({
59
- systemCode: e.string(),
60
- taxCode: e.string()
61
- }), j = 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 C = e.object({
81
- options: e.object({
82
- maxReceive: e.number().min(0).nullish(),
83
- maxPerUser: e.number().min(0).nullish()
84
- }),
85
- rule: l.nullish()
86
- }), N = (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: l.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: T,
106
- taxes: e.array(_),
107
- taxTotals: e.array(j),
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: C.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((y) => y.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(N), 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 S = e.object({
180
- apiKey: e.string(),
181
- webhookSecret: e.string()
182
- }), R = e.object({
183
- company: m.nullish(),
184
- inclusiveTaxes: e.array(p).nullish(),
185
- stripe: S.optional()
186
- }), x = {
187
- collectionName: "Stores",
188
- transform: {
189
- _id: "oid",
190
- business: "oid"
191
- }
192
- };
193
- R.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
- }), h = e.object({
203
- type: e.enum(["ONLINE", "OFFLINE", "COIN", "STRIPE", "CARD", "FEEDVIBE"]),
204
- extra: e.string().nullish()
205
- }), U = {
206
- collectionName: "StoreTransactions",
207
- transform: {
208
- _id: "oid",
209
- business: "oid",
210
- location: "oid",
211
- member: "oid",
212
- transactions: "oid"
213
- },
214
- lookups: {
215
- member: {
216
- fromCollection: "UsersV2",
217
- as: "pf_member"
218
- }
219
- }
220
- }, M = e.object({
221
- _id: t,
222
- source: d,
223
- // can be memberStorePurchase
224
- ref: e.string(),
225
- business: t,
226
- company: m,
227
- location: t.optional(),
228
- member: t,
229
- // createdAt: z.coerce.date(),
230
- bundle: b,
231
- transactions: e.array(t),
232
- // array of transaction id (voucher, credit, title)
233
- status: e.enum([
234
- "PENDING_PAYMENT",
235
- "PENDING_TRANSACTION",
236
- "COMPLETED",
237
- "REFUNDED"
238
- ]),
239
- refund: D.nullish(),
240
- paymentType: h.nullish(),
241
- paymentRef: e.string().nullish(),
242
- webhookUrl: e.string().optional(),
243
- webhookSent: e.boolean().optional(),
244
- pf_transactions: e.array(e.any()).optional(),
245
- pf_member: e.any().optional(),
246
- pf_location: e.any().optional(),
247
- pf_ref: e.any().optional()
248
- }).describe(a.describe(U));
249
- e.object({
250
- bundle: t,
251
- member: e.string(),
252
- ref: e.string(),
253
- paymentType: h.nullish(),
254
- withCoin: e.boolean().optional(),
255
- card: e.string().optional(),
256
- location: t.optional(),
257
- source: d,
258
- webhookUrl: e.string().optional()
259
- });
260
- e.object({
261
- categories: e.array(g)
262
- });
263
- e.object({
264
- id: t,
265
- reason: e.string(),
266
- location: t.optional()
267
- });
268
- e.object({
269
- _id: t,
270
- business: t,
271
- user: t,
272
- bundleId: e.string(),
273
- transaction: e.array(t),
274
- subscriptionId: e.string(),
275
- expiredAt: e.coerce.date()
276
- }).describe(
277
- a.describe({
278
- collectionName: "StoreSubscriptions",
279
- transform: {
280
- _id: "oid",
281
- business: "oid",
282
- user: "oid",
283
- transaction: "oid",
284
- expiredAt: "date"
285
- }
286
- })
287
- );
288
- e.object({
289
- member: e.string(),
290
- subscriptionId: e.string()
291
- });
292
- export {
293
- R as F,
294
- m as a,
295
- F as b,
296
- b as c,
297
- M as d
298
- };
@@ -1,61 +0,0 @@
1
- const E = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), x = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), P = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), _ = /[^\p{L}\d]+/giu, u = "$1\0$2", i = "";
2
- function L(r) {
3
- let e = r.trim();
4
- e = e.replace(E, u).replace(x, u), e = e.replace(_, "\0");
5
- let c = 0, t = e.length;
6
- for (; e.charAt(c) === "\0"; )
7
- c++;
8
- if (c === t)
9
- return [];
10
- for (; e.charAt(t - 1) === "\0"; )
11
- t--;
12
- return e.slice(c, t).split(/\0/g);
13
- }
14
- function R(r) {
15
- const e = L(r);
16
- for (let c = 0; c < e.length; c++) {
17
- const t = e[c], l = P.exec(t);
18
- if (l) {
19
- const s = l.index + (l[1] ?? l[2]).length;
20
- e.splice(c, 1, t.slice(0, s), t.slice(s));
21
- }
22
- }
23
- return e;
24
- }
25
- function p(r, e) {
26
- const [c, t, l] = o(r, e), s = d(e == null ? void 0 : e.locale), a = C(e == null ? void 0 : e.locale), n = A(s, a);
27
- return c + t.map((f, h) => h === 0 ? n(f) : s(f)).join((e == null ? void 0 : e.delimiter) ?? " ") + l;
28
- }
29
- function d(r) {
30
- return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
31
- }
32
- function C(r) {
33
- return r === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(r);
34
- }
35
- function A(r, e) {
36
- return (c) => `${e(c[0])}${r(c.slice(1))}`;
37
- }
38
- function o(r, e = {}) {
39
- const c = e.split ?? (e.separateNumbers ? R : L), t = e.prefixCharacters ?? i, l = e.suffixCharacters ?? i;
40
- let s = 0, a = r.length;
41
- for (; s < r.length; ) {
42
- const n = r.charAt(s);
43
- if (!t.includes(n))
44
- break;
45
- s++;
46
- }
47
- for (; a > s; ) {
48
- const n = a - 1, f = r.charAt(n);
49
- if (!l.includes(f))
50
- break;
51
- a = n;
52
- }
53
- return [
54
- r.slice(0, s),
55
- c(r.slice(s, a)),
56
- r.slice(a)
57
- ];
58
- }
59
- export {
60
- p as s
61
- };