@feedmepos/mf-connect 0.1.0-beta.6 → 0.1.0-beta.60

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 (118) hide show
  1. package/dist/Analytic-CXegtSEd.js +427 -0
  2. package/dist/{App-C2616cfr.js → App-m9A9s3wd.js} +445 -420
  3. package/dist/AuditLogs-CpUOkyXq.js +1886 -0
  4. package/dist/Bin-m6mPl3FE.js +166 -0
  5. package/dist/{Broadcast-CqSwLTAq.js → Broadcast-DNjHnlPp.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrR9Pmtb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-cjdNZLkE.js} +6 -8
  7. package/dist/Card-CAvS5aaN.js +896 -0
  8. package/dist/Collections-3C9I2byH.js +459 -0
  9. package/dist/{Credit-CPcLgnsq.js → Credit-DcAmLeMb.js} +36 -34
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-wGFMCV-y.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2buK6Dj.js → EffectSheet.vue_vue_type_style_index_0_lang-CIEn1N24.js} +6 -6
  14. package/dist/{Experience-BoBikt-x.js → Experience-GF9yOrlE.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/{Game-DR8PyYZa.js → Game-CzBn_Li3.js} +39 -37
  17. package/dist/Index-Bhmkdb4n.js +259 -0
  18. package/dist/Marketing-DlbcOoiN.js +20071 -0
  19. package/dist/Member-CdXG5uEN.js +317 -0
  20. package/dist/MemberList-xIOXAHJf.js +1598 -0
  21. package/dist/MemberTransactions-CsW9vso0.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js → MessageInput.vue_vue_type_script_setup_true_lang-jtjk9NjI.js} +83 -71
  23. package/dist/{Mission-CMpvz9zN.js → Mission-2UjKrmGe.js} +101 -87
  24. package/dist/Overview-ClittdS6.js +1078 -0
  25. package/dist/{Point-DkZn6p9s.js → Point-BON4g7zE.js} +55 -53
  26. package/dist/{Promotion-B7YzwPc_.js → Promotion-qUEZmmm8.js} +65 -57
  27. package/dist/Queue-DA4glGdE.js +244 -0
  28. package/dist/Record-EUAnp1--.js +340 -0
  29. package/dist/Reward-ChbsdQuW.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CUFw56sf.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BKesht7Y.js +1637 -0
  32. package/dist/Segment-DbwFx6vD.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-lwpYOWMR.js +181 -0
  34. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbuOPEGY.js +147 -0
  35. package/dist/Setting-FMTftvlU.js +1931 -0
  36. package/dist/Store-BkUwiBUq.js +1751 -0
  37. package/dist/{StoreRewards-6BzVwZqr.js → StoreRewards-Z8uhK0v1.js} +33 -32
  38. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DwFYJ1Iz.js +943 -0
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D6mrJp05.js} +1 -1
  40. package/dist/{Tier-CW-46oJS.js → Tier-COCmcJJF.js} +327 -318
  41. package/dist/{Title-CE9rWVdi.js → Title-7qCjbur9.js} +199 -184
  42. package/dist/{Transaction-B21RrC4M.js → Transaction-9FS_K2hv.js} +2 -2
  43. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Fx-J2gcK.js +130 -0
  44. package/dist/Voucher-Dx70JAgw.js +354 -0
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CECJsKRJ.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BiVZwBuG.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bne_nxYS.js} +1 -1
  47. package/dist/{app-CjhXHUQv.js → app-CWKpKW78.js} +1 -1
  48. package/dist/app-q6W6-faT.js +7059 -0
  49. package/dist/app.js +1 -1
  50. package/dist/{business-aHhRUXc0.js → business-D5AQBRGS.js} +1 -1
  51. package/dist/campaign-BGiM8ccX.js +1810 -0
  52. package/dist/{campaign-DH9NUNf_.js → campaign-v8MAkDo-.js} +2 -2
  53. package/dist/campaign.enum-Dro6UEcE.js +20 -0
  54. package/dist/campaign.fn-DsJUr-gE.js +758 -0
  55. package/dist/collectible.enum-BH9pX7PE.js +19 -0
  56. package/dist/{collection.fn-CYlsA-kW.js → collection.fn-CHiRShK_.js} +2 -2
  57. package/dist/dto-CeX9egUp.js +214 -0
  58. package/dist/{effect-LSc9YanX.js → effect-DtJQE1cD.js} +9 -9
  59. package/dist/email-addresses-DKOsgzML.js +705 -0
  60. package/dist/{export-Cf0-C5Ly.js → export-Daiv_zH9.js} +5 -5
  61. package/dist/{helper-CiZpeMCM.js → helper-B5Emawnj.js} +1 -1
  62. package/dist/index-9WBy0L7U.js +54 -0
  63. package/dist/{index-D6cEOHP4.js → index-BSHuLDD0.js} +1501 -1480
  64. package/dist/{index-BVb5-Ht8.js → index-CUl_8M_c.js} +259 -173
  65. package/dist/{index-gxwjKu3-.js → index-CgCcvX_L.js} +2212 -871
  66. package/dist/index-CsaQJMAR.js +66 -0
  67. package/dist/{index-D_83JP2i.js → index-DrWrGAHJ.js} +48 -4
  68. package/dist/index-DteeKoFo.js +115 -0
  69. package/dist/{index-DW3PRjPL.js → index-Dw2RtHKR.js} +1 -1
  70. package/dist/{index-kPhrD63q.js → index-ICbXrXiP.js} +1 -1
  71. package/dist/index-Xwc07I54.js +29000 -0
  72. package/dist/{index-DtsDOuDx.js → index-ZBSI6ViG.js} +24 -21
  73. package/dist/index-g9NNHS8s.js +32 -0
  74. package/dist/index-p6F08hhh.js +44 -0
  75. package/dist/index-vh86FiIQ.js +10 -0
  76. package/dist/{index.esm2017-B7oVYIbY.js → index.esm2017-B-SDA6Y2.js} +121 -121
  77. package/dist/loading-CDbkBsRr.js +71 -0
  78. package/dist/{membership-Dw1ylJ9Y.js → membership-B8uwuntJ.js} +54 -46
  79. package/dist/money-DRKB3Rpe.js +15 -0
  80. package/dist/number-DtyC1DJU.js +12 -0
  81. package/dist/objectid-wGrq9P1h.js +145 -0
  82. package/dist/{loading-7yq1tinq.js → plugins-DKNh-lBz.js} +3871 -3943
  83. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  84. package/dist/reward-C2jv5dmJ.js +36 -0
  85. package/dist/{rule-C0Q_SHow.js → rule-C5AMTchR.js} +180 -177
  86. package/dist/{rule-builder-iu17XIof.js → rule-builder-DLOGHT1l.js} +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/{template-CyOanTMu.js → template-C-fz1DXI.js} +5 -5
  89. package/dist/trigger-DTErX60D.js +144 -0
  90. package/dist/user-CVRoQGCF.js +54 -0
  91. package/dist/{vue-i18n-B0fLJH7a.js → vue-i18n-CxMxiW_u.js} +366 -366
  92. package/dist/{xlsx-BYO_bB9J.js → xlsx-CARvMJN_.js} +1 -1
  93. package/package.json +10 -6
  94. package/dist/Analytic-muDf0oMG.js +0 -622
  95. package/dist/Card-bhLoK0ZV.js +0 -825
  96. package/dist/Collections-DjtsAiol.js +0 -453
  97. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-U_QZneS6.js +0 -2813
  98. package/dist/Marketing-Dny2nMUl.js +0 -316
  99. package/dist/Member-CP_smyk8.js +0 -69
  100. package/dist/MemberList-CR3eYI9p.js +0 -1733
  101. package/dist/MemberTransactions-RTx_lKFb.js +0 -38
  102. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cs67_GLE.js +0 -1753
  103. package/dist/Segment-Bb4gHt5V.js +0 -437
  104. package/dist/Setting-Xj0AVzh3.js +0 -1901
  105. package/dist/Store-BWRHQ6Ie.js +0 -1511
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BsFnT8BS.js +0 -890
  107. package/dist/Voucher-KK9fBI0u.js +0 -490
  108. package/dist/app-Dvf_JNMf.js +0 -5764
  109. package/dist/dto-DArfyZAI.js +0 -2770
  110. package/dist/index-Bi_LGEtY.js +0 -99
  111. package/dist/index-CiQDG7Cm.js +0 -762
  112. package/dist/index-CuvNtC_M.js +0 -61
  113. package/dist/index-DQfjSSMF.js +0 -206
  114. package/dist/index-DcxssxPi.js +0 -29193
  115. package/dist/index-DqJVH2kv.js +0 -298
  116. package/dist/money-CPd0XTNv.js +0 -15
  117. package/dist/number-BgXY4un8.js +0 -12
  118. 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-7yq1tinq.js";
2
- import { e as l } from "./index-D6cEOHP4.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,15 +0,0 @@
1
- import { e as r } from "./index-DcxssxPi.js";
2
- function n(e) {
3
- return r.fromNumber({ number: e });
4
- }
5
- function t() {
6
- return r.zero().toObject();
7
- }
8
- function u() {
9
- return r.zero();
10
- }
11
- export {
12
- u as a,
13
- n as t,
14
- t as z
15
- };
@@ -1,12 +0,0 @@
1
- import { c as n } from "./index-DcxssxPi.js";
2
- function f(t) {
3
- return n(t).multiply(100).toFormat(!1);
4
- }
5
- function m(t, r = 2, o = !1) {
6
- const e = parseFloat(String(t)).toFixed(r);
7
- return o ? parseFloat(e).toString() : e;
8
- }
9
- export {
10
- f as F,
11
- m as f
12
- };
@@ -1,37 +0,0 @@
1
- import { components as p } from "@feedmepos/ui-library";
2
- import { h as m } from "vue";
3
- function d(n) {
4
- return m(
5
- "div",
6
- {
7
- class: "flex items-center gap-x-8"
8
- },
9
- [
10
- m(p.FmAvatar, {
11
- name: n != null && n.photoUrl ? "-" : n == null ? void 0 : n.name,
12
- src: (n == null ? void 0 : n.photoUrl) ?? void 0,
13
- size: "sm"
14
- }),
15
- m("span", n == null ? void 0 : n.name)
16
- ]
17
- );
18
- }
19
- function g(n, o) {
20
- var l, a;
21
- return ((a = (l = n.collection) == null ? void 0 : l.TITLE) == null ? void 0 : a.map(
22
- (t) => {
23
- var c;
24
- return (c = o == null ? void 0 : o.find((i) => i._id === t.collectible)) == null ? void 0 : c.name;
25
- }
26
- ).join(", ")) || "-";
27
- }
28
- function T(n, o) {
29
- var a, t, c, i;
30
- const l = (((c = (t = (a = n.collection) == null ? void 0 : a.TIER) == null ? void 0 : t[0]) == null ? void 0 : c.balance) || 0) - 1;
31
- return ((i = o[l]) == null ? void 0 : i.name) || "-";
32
- }
33
- export {
34
- T as a,
35
- g as b,
36
- d as g
37
- };