@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-beta.80

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 (127) hide show
  1. package/dist/Analytic-C84B4MSt.js +427 -0
  2. package/dist/{App-SRz4257n.js → App-CnbbBVSn.js} +441 -420
  3. package/dist/AuditLogs-KOxiG5Q0.js +1887 -0
  4. package/dist/Bin-BBSQDzD4.js +166 -0
  5. package/dist/{Broadcast-DmkrJGp2.js → Broadcast-DlvPEqW7.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-M1Za3MaN.js} +14 -10
  7. package/dist/Card-BluWm_EY.js +905 -0
  8. package/dist/Collections-DtHJpxRT.js +464 -0
  9. package/dist/{Credit-CcNrq9qk.js → Credit-Be2pcBVn.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-sqq_sO_a.js +2182 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js → EffectSheet.vue_vue_type_style_index_0_lang-CBsYx54P.js} +49 -49
  14. package/dist/{Experience-DNsQLzDH.js → Experience-CLPyvgs0.js} +32 -30
  15. package/dist/FileSaver.min-NlMItPOc.js +74 -0
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  17. package/dist/Game-5kEG7o4J.js +278 -0
  18. package/dist/Index-BSZi21Wo.js +259 -0
  19. package/dist/Marketing-CE1Sq3Pb.js +20071 -0
  20. package/dist/Member-DaBqmOYX.js +287 -0
  21. package/dist/MemberList-jIriR6B0.js +1606 -0
  22. package/dist/MemberTransactions-BGEZwpPO.js +45 -0
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js → MessageInput.vue_vue_type_script_setup_true_lang-CSlafowP.js} +152 -137
  24. package/dist/Mission-BOByUsYC.js +296 -0
  25. package/dist/Overview-BQQs8TsL.js +1079 -0
  26. package/dist/{Point-Ck8EG_3k.js → Point-BuRBh_HC.js} +55 -53
  27. package/dist/Promotion-Py2WWNt0.js +289 -0
  28. package/dist/Queue-On8_svkl.js +260 -0
  29. package/dist/Record-CSWkHs9Y.js +341 -0
  30. package/dist/Reward-BLVyFkAH.js +442 -0
  31. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BW8kuoLt.js +150 -0
  32. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DC8JEmEC.js +1728 -0
  33. package/dist/Segment-BjBskgf9.js +880 -0
  34. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CrVw6j2M.js +181 -0
  35. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-oaAVUxO4.js +188 -0
  36. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKOTgzL-.js +147 -0
  37. package/dist/Setting-CAMlhgGd.js +1932 -0
  38. package/dist/Store-0qvNbHne.js +1842 -0
  39. package/dist/StoreRewards-CjcHvUNa.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CdZ7QIaf.js +1029 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-vJaZIDrx.js} +1 -1
  42. package/dist/{Tier-CJ9-d8Zg.js → Tier-D_pHKGSv.js} +350 -334
  43. package/dist/{Title-DZCpvg4q.js → Title-DgdtJ87h.js} +245 -222
  44. package/dist/{Transaction-DpnTxlbf.js → Transaction-CKlLWcjS.js} +2 -2
  45. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-2GOvljvv.js +130 -0
  46. package/dist/Voucher-Cg6zQSAy.js +354 -0
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-rpjQkheM.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js → ZodTextField.vue_vue_type_script_setup_true_lang-BRdY-P8U.js} +1 -1
  49. package/dist/{app-DzAexOqx.js → app-CScRp4SA.js} +2709 -1265
  50. package/dist/app-jGYefKeR.js +33357 -0
  51. package/dist/app.js +1 -1
  52. package/dist/business-DYhO4gjc.js +79 -0
  53. package/dist/campaign-BgXy1Ngd.js +1810 -0
  54. package/dist/{campaign-winsqufa.js → campaign-CZ5pMrUu.js} +2 -2
  55. package/dist/campaign.enum-CWBDlzqp.js +20 -0
  56. package/dist/campaign.fn-HHZ5mQKe.js +758 -0
  57. package/dist/collectible.enum-MvoLHpuA.js +19 -0
  58. package/dist/{collection.fn-CI5Llblg.js → collection.fn-BHUoLJPj.js} +2 -2
  59. package/dist/dto-DXdR0em1.js +214 -0
  60. package/dist/{effect-CdkrIYgX.js → effect-HLuo1A_f.js} +33 -16
  61. package/dist/email-addresses-DU4ehcHM.js +705 -0
  62. package/dist/{export-DGxfief1.js → export-BDRHAxZr.js} +5 -5
  63. package/dist/{helper-B8RqcTNu.js → helper-JhFOw8n-.js} +1 -1
  64. package/dist/{index-OzicErwL.js → index-BG_GpbnZ.js} +24 -21
  65. package/dist/{index-Cw_aXFH6.js → index-BZWr1bgh.js} +269 -173
  66. package/dist/{loading-DuEFUCwF.js → index-Bs-tzd5F.js} +4609 -4886
  67. package/dist/{index-wzdbEEcZ.js → index-C2nNcNjw.js} +1 -1
  68. package/dist/index-CIF8DeC8.js +54 -0
  69. package/dist/{index-HZC9LLAX.js → index-CqT8uK3R.js} +48 -4
  70. package/dist/index-CsaQJMAR.js +66 -0
  71. package/dist/{index-9w43_U1v.js → index-DVj1MyZp.js} +1506 -1480
  72. package/dist/{index-CZgQVRsm.js → index-GmHsjd7O.js} +1 -1
  73. package/dist/index-QDEKR2Rj.js +115 -0
  74. package/dist/{index-A34xEz20.js → index-cYKPj4fA.js} +2246 -871
  75. package/dist/index-eRBO4PzZ.js +56 -0
  76. package/dist/index-fS6fmvFv.js +29556 -0
  77. package/dist/index-l8E6r07W.js +32 -0
  78. package/dist/index-vh86FiIQ.js +10 -0
  79. package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-B-YrQ0sw.js} +206 -206
  80. package/dist/loading-C09t0mFj.js +71 -0
  81. package/dist/{membership-nsMtWeTC.js → membership-tHAn3VRs.js} +80 -66
  82. package/dist/money-DYVCca49.js +15 -0
  83. package/dist/number-VYuUME2F.js +12 -0
  84. package/dist/objectid-BTO4csVa.js +145 -0
  85. package/dist/plugins-CXgvBDMF.js +208 -0
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/reward-DX9TZrk4.js +36 -0
  88. package/dist/{rule-CPIMqt1h.js → rule-CbCZqulx.js} +185 -178
  89. package/dist/{rule-builder-CSs5XRKP.js → rule-builder-J8K_fjI-.js} +1 -1
  90. package/dist/style.css +1 -1
  91. package/dist/{template-CJZoYavu.js → template-BtYJpEBa.js} +5 -5
  92. package/dist/trigger-D6dpZFSN.js +144 -0
  93. package/dist/user-C0QvWk-o.js +54 -0
  94. package/dist/vue-i18n-cz2_cPSz.js +2365 -0
  95. package/dist/{xlsx-BZlnYinX.js → xlsx-BIPQrY49.js} +1 -1
  96. package/package.json +11 -7
  97. package/dist/Analytic-5QztrYSp.js +0 -622
  98. package/dist/Card-BsjFTVsH.js +0 -825
  99. package/dist/Collections-7wqZHOax.js +0 -453
  100. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js +0 -2813
  101. package/dist/Game-DlzDerT7.js +0 -255
  102. package/dist/Marketing-BqhpaG4o.js +0 -316
  103. package/dist/Member-AFgZcdtz.js +0 -69
  104. package/dist/MemberList-BKgrLz2C.js +0 -1733
  105. package/dist/MemberTransactions-BwT3zE2a.js +0 -38
  106. package/dist/Mission-BTAia7AS.js +0 -261
  107. package/dist/Promotion-0v3kvsK3.js +0 -247
  108. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js +0 -1753
  109. package/dist/Segment-BenLupqV.js +0 -437
  110. package/dist/Setting-0fpREqpJ.js +0 -1901
  111. package/dist/Store-BDGwe4ar.js +0 -1511
  112. package/dist/StoreRewards-TDZt9H1V.js +0 -401
  113. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js +0 -890
  114. package/dist/Voucher-DsP_rh8I.js +0 -490
  115. package/dist/app-Cg2pTZJK.js +0 -53428
  116. package/dist/business-Cw_qGw8y.js +0 -78
  117. package/dist/dto-ozu1smC3.js +0 -2770
  118. package/dist/index-BLACZ3-L.js +0 -206
  119. package/dist/index-BaozRfWB.js +0 -762
  120. package/dist/index-CjVmULNd.js +0 -99
  121. package/dist/index-CuvNtC_M.js +0 -61
  122. package/dist/index-DAEmawcj.js +0 -298
  123. package/dist/index-Oxr-mU6h.js +0 -29193
  124. package/dist/money-BGZPFtUc.js +0 -15
  125. package/dist/number-4J0xvXP9.js +0 -12
  126. package/dist/user-Bm4KttFq.js +0 -37
  127. package/dist/vue-i18n-CCyiVzOE.js +0 -2365
@@ -0,0 +1,19 @@
1
+ import { z as e } from "./index-Bs-tzd5F.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-9w43_U1v.js";
2
- import "./loading-DuEFUCwF.js";
1
+ import "./index-DVj1MyZp.js";
2
+ import "./index-Bs-tzd5F.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 "./index-Bs-tzd5F.js";
2
+ import { z as y, a as r, A as h } from "./index-cYKPj4fA.js";
3
+ import { F as u } from "./index-DVj1MyZp.js";
4
+ import { i as I, R as d } from "./rule-builder-J8K_fjI-.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((C) => {
86
+ const f = d.simplify(C);
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 A(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 D = y.extend({
194
+ _id: i.optional(),
195
+ name: t.string().min(1).max(300),
196
+ business: i.optional(),
197
+ campaigns: t.array(i).optional()
198
+ }), T = {
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
+ T as C,
211
+ D as F,
212
+ A as a,
213
+ N as c
214
+ };
@@ -1,20 +1,20 @@
1
- import { r as c, e as o } from "./index-Oxr-mU6h.js";
2
- function a(e) {
1
+ import { c as r } from "./index-fS6fmvFv.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
  };