@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.71

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 (126) hide show
  1. package/dist/Analytic-CnF_WeRZ.js +427 -0
  2. package/dist/{App-DalxIjTu.js → App-DJwSTuRa.js} +445 -420
  3. package/dist/AuditLogs-RarW2PHL.js +1886 -0
  4. package/dist/Bin-BaixTvHW.js +166 -0
  5. package/dist/{Broadcast-uMAvsC--.js → Broadcast-8DEAMhyM.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DPXoOupI.js} +6 -8
  7. package/dist/Card-DRwLZ-Mn.js +896 -0
  8. package/dist/Collections-WsPM9v03.js +459 -0
  9. package/dist/{Credit-QlnatflM.js → Credit-DMxRdTzt.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-Bcj6o4Xi.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-CuJ8curT.js} +49 -49
  14. package/dist/{Experience-Czy41ifp.js → Experience-B0BV4Tc_.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/Game-Bu6kJJHx.js +278 -0
  17. package/dist/Index-CX-aPFQt.js +259 -0
  18. package/dist/Marketing-CiVFwl6S.js +20071 -0
  19. package/dist/Member-DZfTtt13.js +333 -0
  20. package/dist/MemberList-CscwsZnv.js +1598 -0
  21. package/dist/MemberTransactions-BWNs6bUm.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-BrbRudIU.js} +134 -122
  23. package/dist/Mission-CyJ-9Qfl.js +296 -0
  24. package/dist/Overview-DLyt6VId.js +1078 -0
  25. package/dist/{Point-By6ogYy_.js → Point-Cc_0-RKm.js} +55 -53
  26. package/dist/Promotion-KqA8nev2.js +289 -0
  27. package/dist/Queue-i8--zps9.js +249 -0
  28. package/dist/Record-CLUO1JVc.js +340 -0
  29. package/dist/Reward-BEdUKQ3M.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B9vnSbWj.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B8zw1TmO.js +1727 -0
  32. package/dist/Segment-B8sYajZG.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CmmI5Vwl.js +181 -0
  34. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIcXjbJG.js +186 -0
  35. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DY3FMuIf.js +147 -0
  36. package/dist/Setting-DT8dRb2A.js +1931 -0
  37. package/dist/Store-BhsPWRkR.js +1841 -0
  38. package/dist/StoreRewards-Cx2WDZ3p.js +423 -0
  39. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Byb7GOoh.js +1028 -0
  40. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cb-FGTO9.js} +1 -1
  41. package/dist/{Tier-DvAs0-yx.js → Tier-kQy1vGwo.js} +327 -318
  42. package/dist/{Title-B_Trr39o.js → Title-DKv8FqpX.js} +224 -209
  43. package/dist/{Transaction-DCJw-b3H.js → Transaction-CSLllOgl.js} +2 -2
  44. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CvpBdNBn.js +130 -0
  45. package/dist/Voucher-BP6fmSwu.js +354 -0
  46. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CxQEg_HW.js +419 -0
  47. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-aurdXO2X.js} +1 -1
  48. package/dist/app-B3qgrQOd.js +7079 -0
  49. package/dist/app-s3iL79De.js +33357 -0
  50. package/dist/app.js +1 -1
  51. package/dist/business-DG2w8U-i.js +79 -0
  52. package/dist/campaign-BP6Rz-AH.js +1810 -0
  53. package/dist/{campaign--0_yMbMV.js → campaign-WPRZ4BRF.js} +2 -2
  54. package/dist/campaign.enum-CoqrWNTZ.js +20 -0
  55. package/dist/campaign.fn-BRPigTOA.js +758 -0
  56. package/dist/collectible.enum-Dy4sxF43.js +19 -0
  57. package/dist/{collection.fn-3TwPe7aF.js → collection.fn-DGnLyYgV.js} +2 -2
  58. package/dist/dto-xZ9I6-Jr.js +214 -0
  59. package/dist/{effect-BeR0LK61.js → effect-C0XoYTus.js} +33 -16
  60. package/dist/email-addresses-CJ87c7W1.js +705 -0
  61. package/dist/{export-xeLLhqvh.js → export-qlV-AbEl.js} +5 -5
  62. package/dist/{helper-B5iqfKh8.js → helper-DzYe8aNx.js} +1 -1
  63. package/dist/{index-BOdtpNkP.js → index-4vdSri7m.js} +266 -173
  64. package/dist/{index-CU_d8jjU.js → index-BfSj7cUl.js} +1 -1
  65. package/dist/index-Bj0ULpXi.js +29556 -0
  66. package/dist/index-BnZ4yaMH.js +115 -0
  67. package/dist/index-Bo5DJXxs.js +54 -0
  68. package/dist/{index-Ct_wR519.js → index-BuvJH6SU.js} +24 -21
  69. package/dist/index-C2GEs8di.js +32 -0
  70. package/dist/{index-CyKZ-SsN.js → index-CJuOTcCE.js} +1 -1
  71. package/dist/index-CsaQJMAR.js +66 -0
  72. package/dist/{index-DP-dGMJC.js → index-DReysUPw.js} +2230 -871
  73. package/dist/{index-CAn5heDe.js → index-DgCjRb3o.js} +48 -4
  74. package/dist/index-IwITtvVu.js +56 -0
  75. package/dist/{index-Bh-uaaBG.js → index-n3wiQlbk.js} +1506 -1480
  76. package/dist/index-vh86FiIQ.js +10 -0
  77. package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CkJhTmme.js} +154 -154
  78. package/dist/loading-DwJdwl4G.js +71 -0
  79. package/dist/{membership-D0nqqWNZ.js → membership-DvPK3h8f.js} +54 -46
  80. package/dist/money-C_WIbr_x.js +15 -0
  81. package/dist/number-ZeVoGhzP.js +12 -0
  82. package/dist/objectid-8lkX6otO.js +145 -0
  83. package/dist/{loading-C-JDVajU.js → plugins-D20keyDW.js} +2990 -3062
  84. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  85. package/dist/reward-CqnMEq_w.js +36 -0
  86. package/dist/{rule-Dn_GgBCe.js → rule-D7htGgWz.js} +185 -178
  87. package/dist/{rule-builder-BXt29Es4.js → rule-builder-BbJpYQ0n.js} +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/{template-D2Oi3dxP.js → template-BWQCVHm7.js} +5 -5
  90. package/dist/trigger-DMuv0_O7.js +144 -0
  91. package/dist/user-C_v2C0qN.js +54 -0
  92. package/dist/vue-i18n-N8_TEEd0.js +2365 -0
  93. package/dist/{xlsx-CCRCidY2.js → xlsx-CsPDNSTo.js} +1 -1
  94. package/package.json +11 -7
  95. package/dist/Analytic-BMpS6jWb.js +0 -622
  96. package/dist/Card-DV8-g69L.js +0 -825
  97. package/dist/Collections-DRafEHT1.js +0 -453
  98. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
  99. package/dist/Game-CD3zSitz.js +0 -255
  100. package/dist/Marketing-NNes8z6Q.js +0 -316
  101. package/dist/Member-CTqBgYuV.js +0 -69
  102. package/dist/MemberList-B99tS5ce.js +0 -1733
  103. package/dist/MemberTransactions-D1YCXPOg.js +0 -38
  104. package/dist/Mission-XbBVKBiE.js +0 -261
  105. package/dist/Promotion-DKcBr-RI.js +0 -247
  106. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
  107. package/dist/Segment-B8cszL-F.js +0 -437
  108. package/dist/Setting-aZYABlMW.js +0 -1901
  109. package/dist/Store-Bx2tyJwe.js +0 -1511
  110. package/dist/StoreRewards-DTp9G6gw.js +0 -401
  111. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
  112. package/dist/Voucher-jqv3ji90.js +0 -490
  113. package/dist/app-WlcUVbFb.js +0 -5764
  114. package/dist/app-_w0hjM7u.js +0 -53428
  115. package/dist/business-BC4-i1cU.js +0 -78
  116. package/dist/dto-Ns2dLn1B.js +0 -2770
  117. package/dist/index-BWb9vRCi.js +0 -29193
  118. package/dist/index-CpU9aqyW.js +0 -206
  119. package/dist/index-CqO_ZvtD.js +0 -99
  120. package/dist/index-CuvNtC_M.js +0 -61
  121. package/dist/index-DsNsA2uX.js +0 -298
  122. package/dist/index-WAMr3npT.js +0 -762
  123. package/dist/money-hdbrblud.js +0 -15
  124. package/dist/number-CRWGOZaW.js +0 -12
  125. package/dist/user-Bm4KttFq.js +0 -37
  126. package/dist/vue-i18n-Dud8fvmw.js +0 -2365
@@ -0,0 +1,19 @@
1
+ import { z as e } from "./plugins-D20keyDW.js";
2
+ const E = e.enum([
3
+ "VOUCHER",
4
+ "CREDIT",
5
+ "POINT",
6
+ "COIN",
7
+ "TIER",
8
+ "TITLE",
9
+ "COIN",
10
+ "GAME",
11
+ "STAMP",
12
+ "REFERRAL"
13
+ ]);
14
+ E.enum.VOUCHER + "", E.enum.CREDIT + "", E.enum.POINT + "", E.enum.COIN + "", E.enum.TIER + "", E.enum.TITLE + "", E.enum.GAME + "", E.enum.STAMP + "", E.enum.REFERRAL + "";
15
+ const R = e.enum(["FORTUNE_WHEEL", "ROCK_PAPER_SCISSORS"]);
16
+ export {
17
+ E as F,
18
+ R as a
19
+ };
@@ -1,5 +1,5 @@
1
- import "./index-Bh-uaaBG.js";
2
- import "./loading-C-JDVajU.js";
1
+ import "./index-n3wiQlbk.js";
2
+ import "./plugins-D20keyDW.js";
3
3
  function r(e) {
4
4
  switch (e) {
5
5
  case "PROMOTION":
@@ -0,0 +1,214 @@
1
+ import { F as i, z as t } from "./plugins-D20keyDW.js";
2
+ import { y as C, a as r, z as h } from "./index-DReysUPw.js";
3
+ import { F as u } from "./index-n3wiQlbk.js";
4
+ import { i as I, R as d } from "./rule-builder-BbJpYQ0n.js";
5
+ function N(a, e) {
6
+ var c, l;
7
+ if (!a) return;
8
+ const n = a.campaign;
9
+ if (!n) return;
10
+ const o = n.event.rule;
11
+ if (!o || !I(o)) {
12
+ e.addIssue({
13
+ code: "custom",
14
+ path: ["campaign", "event", "rule"],
15
+ params: {
16
+ i18n: { key: "zodCustom.campaign.rule_required", values: { type: n.event.type } }
17
+ }
18
+ });
19
+ return;
20
+ }
21
+ switch (n.type) {
22
+ case "MISSION": {
23
+ n.earningOption.amount > n.mission.end && e.addIssue({
24
+ code: "custom",
25
+ path: ["campaign", "earningOption"],
26
+ params: {
27
+ i18n: { key: "zodCustom.campaign.earning_amount_exceed", values: { max: n.mission.end } }
28
+ }
29
+ });
30
+ break;
31
+ }
32
+ case "CREDIT": {
33
+ const p = (c = n.config) == null ? void 0 : c.validityOption;
34
+ (!p || ["validForDay", "validBefore"].every((g) => p[g] == null)) && e.addIssue({
35
+ code: "custom",
36
+ path: ["campaign", "config", "validityOption"],
37
+ params: {
38
+ i18n: { key: "zodCustom.campaign.credit_validity_required" }
39
+ }
40
+ });
41
+ }
42
+ }
43
+ switch (n.event.type) {
44
+ case "BILL_COMPLETED":
45
+ n.type === "MISSION" && n.rewards.length && (n.rewards.forEach((p, m) => {
46
+ (p.threshold < 0 || p.threshold > n.mission.end) && e.addIssue({
47
+ code: "custom",
48
+ path: ["campaign", "rewards", m, "threshold"],
49
+ params: {
50
+ i18n: { key: "zodCustom.campaign.reward_threshold_range" }
51
+ }
52
+ });
53
+ }), (l = n.config) != null && l.validityOption.followFirstReceive || e.addIssue({
54
+ code: "custom",
55
+ path: ["campaign", "config", "validityOption"],
56
+ params: {
57
+ i18n: { key: "zodCustom.campaign.mission_first_receive" }
58
+ }
59
+ }));
60
+ break;
61
+ case "SCHEDULE": {
62
+ if (!o.rules.g_schedule) {
63
+ e.addIssue({
64
+ code: "custom",
65
+ path: ["campaign", "event", "rule"],
66
+ params: {
67
+ i18n: { key: "zodCustom.campaign.schedule_period_required" }
68
+ },
69
+ fatal: !0
70
+ });
71
+ return;
72
+ }
73
+ const p = d.getRules(
74
+ o.rules.g_schedule
75
+ ), m = [
76
+ {
77
+ property: "trigger.date",
78
+ operator: ["_isOnDate", "_rrule"]
79
+ },
80
+ {
81
+ property: "trigger.time",
82
+ operator: ["_isOnTime"]
83
+ }
84
+ ];
85
+ m.length == p.length && m.every((O) => p.some((y) => {
86
+ const f = d.simplify(y);
87
+ return f.property === O.property && O.operator.includes(f.operator);
88
+ })) || e.addIssue({
89
+ code: "custom",
90
+ path: ["campaign", "event", "rule"],
91
+ params: {
92
+ i18n: { key: "zodCustom.campaign.active_period_invalid" }
93
+ }
94
+ });
95
+ break;
96
+ }
97
+ default: {
98
+ "earningOption" in n && n.earningOption.type != "FIXED" && e.addIssue({
99
+ code: "custom",
100
+ path: ["campaign", "earningOption"],
101
+ params: {
102
+ i18n: { key: "zodCustom.campaign.fixed_earning_required" }
103
+ }
104
+ });
105
+ break;
106
+ }
107
+ }
108
+ }
109
+ function D(a) {
110
+ var n;
111
+ if (a.campaign.type === "VOUCHER" && "configs" in a) {
112
+ const o = a.configs;
113
+ o.extras.targetLocation = a.campaign.targetLocation;
114
+ const c = Math.max(
115
+ a.campaign.earningOption.amount,
116
+ o.options.maxUse ?? 1
117
+ );
118
+ a.campaign.earningOption.amount = c, o.options.maxUse = c, a.campaign.earningOption = {
119
+ type: "FIXED",
120
+ amount: 1
121
+ };
122
+ }
123
+ if (a.campaign.type == "MISSION" && "configs" in a) {
124
+ const o = a.configs;
125
+ o.options.validityOption = (n = a.campaign.config) == null ? void 0 : n.validityOption;
126
+ }
127
+ const e = a.campaign.event;
128
+ return e.type != "BILL_COMPLETED" && e.rule && I(e.rule) && (e.rule = d.removeEntry(e.rule, "g_bill"), a.campaign.event = e), a;
129
+ }
130
+ function s(a) {
131
+ const e = h.optionsMap.get(a).extend({
132
+ _id: i.optional(),
133
+ collectible: t.string().nullish()
134
+ });
135
+ switch (a) {
136
+ case "VOUCHER":
137
+ return t.object({
138
+ campaign: e,
139
+ templateId: i,
140
+ configs: u,
141
+ updateCollections: t.boolean().optional(),
142
+ code: t.string().optional()
143
+ });
144
+ case "PROMOTION":
145
+ return t.object({
146
+ campaign: e,
147
+ templateId: i
148
+ });
149
+ case "POINT":
150
+ return t.object({
151
+ campaign: e,
152
+ templateId: i
153
+ });
154
+ case "CREDIT":
155
+ return t.object({
156
+ campaign: e,
157
+ templateId: i
158
+ });
159
+ case "BROADCAST":
160
+ return t.object({
161
+ campaign: e,
162
+ templateId: i
163
+ });
164
+ case "COIN":
165
+ return t.object({
166
+ campaign: e,
167
+ templateId: i
168
+ });
169
+ case "REWARD_POOL":
170
+ return t.object({
171
+ campaign: e,
172
+ templateId: i,
173
+ updateCollections: t.boolean().optional()
174
+ });
175
+ case "GAME":
176
+ return t.object({
177
+ campaign: e,
178
+ configs: u,
179
+ templateId: i,
180
+ updateCollections: t.boolean().optional()
181
+ });
182
+ case "MISSION":
183
+ return t.object({
184
+ campaign: e,
185
+ configs: u,
186
+ templateId: i,
187
+ updateCollections: t.boolean().optional()
188
+ });
189
+ default:
190
+ throw new Error("Not implemented");
191
+ }
192
+ }
193
+ const T = C.extend({
194
+ _id: i.optional(),
195
+ name: t.string().min(1).max(300),
196
+ business: i.optional(),
197
+ campaigns: t.array(i).optional()
198
+ }), A = {
199
+ [r.enum.VOUCHER]: s("VOUCHER"),
200
+ [r.enum.PROMOTION]: s("PROMOTION"),
201
+ [r.enum.POINT]: s("POINT"),
202
+ [r.enum.CREDIT]: s("CREDIT"),
203
+ [r.enum.BROADCAST]: s("BROADCAST"),
204
+ [r.enum.COIN]: s("COIN"),
205
+ [r.enum.REWARD_POOL]: s("REWARD_POOL"),
206
+ [r.enum.GAME]: s("GAME"),
207
+ [r.enum.MISSION]: s("MISSION")
208
+ };
209
+ export {
210
+ A as C,
211
+ T as F,
212
+ D as a,
213
+ N as c
214
+ };
@@ -1,20 +1,20 @@
1
- import { r as c, e as o } from "./index-BWb9vRCi.js";
2
- function a(e) {
1
+ import { c as r } from "./index-Bj0ULpXi.js";
2
+ function m(e) {
3
3
  if (!e)
4
4
  return null;
5
- const n = c.getCountry().currency.symbol;
5
+ const o = r.Config.getCountry().currency.symbol;
6
6
  function s(t) {
7
- const r = o.fromFdoDecimal({ decimal: t.adjustment.amount });
7
+ const n = r.Dinero.fromFdoDecimal({ decimal: t.adjustment.amount });
8
8
  switch (t.adjustment.type) {
9
9
  case "BY_PERCENTAGE":
10
- return `${r.toObject().amount}% discount`;
10
+ return `${n.toObject().amount}% discount`;
11
11
  case "BY_AMOUNT":
12
- return `${n}${r.toUnit()} discount`;
12
+ return `${o}${n.toUnit()} discount`;
13
13
  case "TO_AMOUNT":
14
- return `to ${n}${r.toUnit()}`;
14
+ return `to ${o}${n.toUnit()}`;
15
15
  }
16
16
  }
17
- function i(t) {
17
+ function u(t) {
18
18
  switch (t.options.target) {
19
19
  case "BILL":
20
20
  return "Bill Discount";
@@ -36,26 +36,43 @@ function a(e) {
36
36
  throw new Error("Invalid effect target");
37
37
  }
38
38
  }
39
- function u(t) {
39
+ function a(t) {
40
40
  if (t.options.target === "BILL" || t.options.target === "PAYMENT") {
41
- const r = o.fromFdoDecimal({
41
+ const n = r.Dinero.fromFdoDecimal({
42
+ decimal: t.options.minPurchase
43
+ });
44
+ return n.toUnit() > 0 ? `min spend ${o}${n.toUnit()}` : "no min spend";
45
+ }
46
+ if (t.options.target === "ITEM" && t.options.minPurchase) {
47
+ const n = r.Dinero.fromFdoDecimal({
42
48
  decimal: t.options.minPurchase
43
49
  });
44
- return r.toUnit() > 0 ? `min spend ${n}${r.toUnit()}` : "no min spend";
50
+ return n.toUnit() > 0 ? `min spend ${o}${n.toUnit()}` : "no min spend";
45
51
  }
46
52
  return "no min spend";
47
53
  }
54
+ function c(t) {
55
+ var n;
56
+ if (((n = t.adjustmentRule) == null ? void 0 : n.type) == "CAPPED_AT") {
57
+ const i = r.Dinero.fromFdoDecimal({
58
+ decimal: t.adjustmentRule.amount
59
+ }).toPositive();
60
+ return i.toUnit() > 0 ? `cap at ${o}${i.toUnit()}` : null;
61
+ }
62
+ return null;
63
+ }
48
64
  return {
49
- type: i(e),
65
+ type: u(e),
50
66
  adjustment: s(e),
51
- requirements: u(e)
67
+ requirements: a(e),
68
+ maxCap: c(e)
52
69
  };
53
70
  }
54
71
  function f(e) {
55
- const n = a(e);
56
- return !e || !n ? null : Object.values(n).filter(Boolean).join(" | ");
72
+ const o = m(e);
73
+ return !e || !o ? null : Object.values(o).filter(Boolean).join(" | ");
57
74
  }
58
75
  export {
59
76
  f as e,
60
- a as s
77
+ m as s
61
78
  };