@feedmepos/mf-connect 0.1.58-prod → 0.1.60-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.
Files changed (129) hide show
  1. package/dist/Analytic-CB0xAr9Q.js +427 -0
  2. package/dist/App-fp_3oll7.js +4630 -0
  3. package/dist/Bin-CPEbn14A.js +166 -0
  4. package/dist/Broadcast-jKp2iB8c.js +233 -0
  5. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CmJG893h.js +121 -0
  6. package/dist/Card-BaPJkgd2.js +911 -0
  7. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  8. package/dist/Collections-Bqsg-ON3.js +458 -0
  9. package/dist/Credit-C9zIva1h.js +228 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSMV8OwA.js +2194 -0
  12. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Doyw0pvU.js +348 -0
  13. package/dist/Experience-CCI_oesa.js +229 -0
  14. package/dist/FileSaver.min-NlMItPOc.js +74 -0
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  16. package/dist/Game-CRMVz1JP.js +284 -0
  17. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  18. package/dist/Index-szNiSnjR.js +259 -0
  19. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  20. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  21. package/dist/MainLayout-B1aJoR95.js +41 -0
  22. package/dist/Marketing-AvEiNiD9.js +319 -0
  23. package/dist/Member-DIZwt6Hh.js +279 -0
  24. package/dist/MemberList-dxteIRWn.js +1607 -0
  25. package/dist/MemberOverview-wL_ailso.js +58 -0
  26. package/dist/MemberTransactions-Q3phmXfI.js +45 -0
  27. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BLk8rX-T.js +60553 -0
  28. package/dist/Mission-CZjySlcS.js +302 -0
  29. package/dist/Overview-BXbWEDy3.js +1079 -0
  30. package/dist/Point-CgjNc_Qn.js +232 -0
  31. package/dist/Promotion-COYo3qLi.js +289 -0
  32. package/dist/Queue-BLIStJth.js +260 -0
  33. package/dist/Record-BWoTvVEE.js +341 -0
  34. package/dist/Reward-Dq6GxHMP.js +442 -0
  35. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CR1feHth.js +150 -0
  36. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DuYYfbOH.js +1763 -0
  37. package/dist/Segment-CUfn6k5R.js +882 -0
  38. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CxycOqNJ.js +181 -0
  39. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-C7jqrfEj.js +188 -0
  40. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CMmdbYH4.js +147 -0
  41. package/dist/Setting-CC5AiQSy.js +1928 -0
  42. package/dist/SettingAdvertisements-DHQTaMC1.js +262 -0
  43. package/dist/Store-CEgv5aOD.js +1842 -0
  44. package/dist/StoreRewards-Dtzk_YG2.js +423 -0
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cwt8pmoM.js +995 -0
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BEU2u1-a.js +139 -0
  47. package/dist/Tier-1xqQvWzc.js +895 -0
  48. package/dist/Title-Da-G8plz.js +566 -0
  49. package/dist/Transaction-B0vuVZFZ.js +39 -0
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-e4-wNfrg.js +130 -0
  51. package/dist/Voucher-DLFjkXLu.js +384 -0
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-5X7dGFD9.js +419 -0
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BPTrvEwa.js +56 -0
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  56. package/dist/app-Do_C3F_N.js +7094 -0
  57. package/dist/app-o7Kvv5aK.js +57962 -0
  58. package/dist/app-wDQR6dpb.js +39 -0
  59. package/dist/app.js +6 -0
  60. package/dist/business-BDi-QTa5.js +82 -0
  61. package/dist/campaign-BHqizYy6.js +1810 -0
  62. package/dist/campaign-CpzFl8Vr.js +4 -0
  63. package/dist/campaign-DNXI3K9c.js +94 -0
  64. package/dist/campaign.enum-BXDwYoeA.js +20 -0
  65. package/dist/campaign.fn-Rws4mJa5.js +758 -0
  66. package/dist/collectible.enum-cMc4fL1T.js +19 -0
  67. package/dist/collection.fn-F8FZ7Dnr.js +26 -0
  68. package/dist/dto-CAtf1jq0.js +216 -0
  69. package/dist/effect-Dhg1ZIrL.js +78 -0
  70. package/dist/email-addresses-BZJZwglQ.js +705 -0
  71. package/dist/export-B6yvRuct.js +97 -0
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-VoErinsY.js +71 -0
  74. package/dist/index-B0Pzwzkd.js +31 -0
  75. package/dist/index-Bq6FwMwW.js +32 -0
  76. package/dist/index-BvE6Sbog.js +3 -0
  77. package/dist/index-BysJoGFD.js +146 -0
  78. package/dist/index-C8m_F_I4.js +121 -0
  79. package/dist/index-CQZinjc9.js +54 -0
  80. package/dist/index-Cq7s1Pk2.js +76 -0
  81. package/dist/index-CuvNtC_M.js +61 -0
  82. package/dist/index-DOGrOlB8.js +8859 -0
  83. package/dist/index-Di23nMJ7.js +38 -0
  84. package/dist/index-Dkyb4P6T.js +30076 -0
  85. package/dist/index-DvZiQOtl.js +3077 -0
  86. package/dist/index-Ved5V90A.js +2155 -0
  87. package/dist/index-d4A3r8kv.js +32269 -0
  88. package/dist/index-vh86FiIQ.js +10 -0
  89. package/dist/index-y7IqG-tl.js +44 -0
  90. package/dist/index.esm2017-CRTpUsW5.js +3069 -0
  91. package/dist/loading-CoUrS63J.js +71 -0
  92. package/dist/lodash-B5I3zXaY.js +3678 -0
  93. package/dist/membership-BiQwBHAA.js +235 -0
  94. package/dist/moment-D7p2TMB-.js +2583 -0
  95. package/dist/money-CA3gpWD3.js +15 -0
  96. package/dist/number-CgmVpwHm.js +12 -0
  97. package/dist/object-qECH92oz.js +26 -0
  98. package/dist/objectId-dwaoBfJX.js +7 -0
  99. package/dist/objectid-C80eoTvt.js +145 -0
  100. package/dist/plugins-BkWtR_R5.js +208 -0
  101. package/dist/reward-D7SKofYj.js +36 -0
  102. package/dist/rule-Cpxty5PH.js +1951 -0
  103. package/dist/rule-builder-d_TMgXEC.js +102 -0
  104. package/dist/style.css +4 -0
  105. package/dist/template-BB7bab5R.js +190 -0
  106. package/dist/tier-BJDhpH6X.js +4 -0
  107. package/dist/tiers/tier=1.png +0 -0
  108. package/dist/tiers/tier=2.png +0 -0
  109. package/dist/tiers/tier=3.png +0 -0
  110. package/dist/tiers/tier=4.png +0 -0
  111. package/dist/timezone-Dj3UaenF.js +1151 -0
  112. package/dist/titles/type=diamond.png +0 -0
  113. package/dist/titles/type=drinks.png +0 -0
  114. package/dist/titles/type=food.png +0 -0
  115. package/dist/titles/type=heart.png +0 -0
  116. package/dist/titles/type=medal.png +0 -0
  117. package/dist/titles/type=spend.png +0 -0
  118. package/dist/titles/type=thank-you.png +0 -0
  119. package/dist/titles/type=thumbs-up.png +0 -0
  120. package/dist/titles/type=years.png +0 -0
  121. package/dist/trigger-ZVR5eR1H.js +144 -0
  122. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  123. package/dist/type_drinks-D6jnpvwV.js +4 -0
  124. package/dist/usePagination-Ds-cuHop.js +223 -0
  125. package/dist/user-DjRqnFsC.js +54 -0
  126. package/dist/vue-i18n-BlCNfIcP.js +2365 -0
  127. package/dist/xlsx-CtNr_GAa.js +15491 -0
  128. package/dist/zod-Bg2FbC-D.js +90 -0
  129. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import { z as e } from "./index-d4A3r8kv.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
+ };
@@ -0,0 +1,26 @@
1
+ import "./index-DOGrOlB8.js";
2
+ import "./index-d4A3r8kv.js";
3
+ function r(e) {
4
+ switch (e) {
5
+ case "PROMOTION":
6
+ return "Promotion";
7
+ case "VOUCHER":
8
+ return "Voucher";
9
+ case "CREDIT":
10
+ return "Credit";
11
+ case "POINT":
12
+ return "Experience";
13
+ case "COIN":
14
+ return "Point";
15
+ case "GAME":
16
+ return "Game";
17
+ default:
18
+ return e;
19
+ }
20
+ }
21
+ const o = {
22
+ formattedType: r
23
+ };
24
+ export {
25
+ o as C
26
+ };
@@ -0,0 +1,216 @@
1
+ import { F as o, z as t } from "./index-d4A3r8kv.js";
2
+ import { z as h, a as r, A as _ } from "./index-DvZiQOtl.js";
3
+ import { F as d } from "./index-DOGrOlB8.js";
4
+ import { i as I, R as u } from "./rule-builder-d_TMgXEC.js";
5
+ function N(n, e) {
6
+ var p, l;
7
+ if (!n) return;
8
+ const a = n.campaign;
9
+ if (!a) return;
10
+ const i = a.event.rule;
11
+ if (!i || !I(i)) {
12
+ e.addIssue({
13
+ code: "custom",
14
+ path: ["campaign", "event", "rule"],
15
+ params: {
16
+ i18n: "connectZodCustom:campaign.rule_required",
17
+ type: a.event.type
18
+ }
19
+ });
20
+ return;
21
+ }
22
+ switch (a.type) {
23
+ case "MISSION": {
24
+ a.earningOption.amount > a.mission.end && e.addIssue({
25
+ code: "custom",
26
+ path: ["campaign", "earningOption"],
27
+ params: {
28
+ i18n: "connectZodCustom:campaign.earning_amount_exceed",
29
+ max: a.mission.end
30
+ }
31
+ });
32
+ break;
33
+ }
34
+ case "CREDIT": {
35
+ const c = (p = a.config) == null ? void 0 : p.validityOption;
36
+ (!c || ["validForDay", "validBefore"].every((g) => c[g] == null)) && e.addIssue({
37
+ code: "custom",
38
+ path: ["campaign", "config", "validityOption"],
39
+ params: {
40
+ i18n: "connectZodCustom:campaign.credit_validity_required"
41
+ }
42
+ });
43
+ }
44
+ }
45
+ switch (a.event.type) {
46
+ case "BILL_COMPLETED":
47
+ a.type === "MISSION" && a.rewards.length && (a.rewards.forEach((c, m) => {
48
+ (c.threshold < 0 || c.threshold > a.mission.end) && e.addIssue({
49
+ code: "custom",
50
+ path: ["campaign", "rewards", m, "threshold"],
51
+ params: {
52
+ i18n: "connectZodCustom:campaign.reward_threshold_range"
53
+ }
54
+ });
55
+ }), (l = a.config) != null && l.validityOption.followFirstReceive || e.addIssue({
56
+ code: "custom",
57
+ path: ["campaign", "config", "validityOption"],
58
+ params: {
59
+ i18n: "connectZodCustom:campaign.mission_first_receive"
60
+ }
61
+ }));
62
+ break;
63
+ case "SCHEDULE": {
64
+ if (!i.rules.g_schedule) {
65
+ e.addIssue({
66
+ code: "custom",
67
+ path: ["campaign", "event", "rule"],
68
+ params: {
69
+ i18n: "connectZodCustom:campaign.schedule_period_required"
70
+ },
71
+ fatal: !0
72
+ });
73
+ return;
74
+ }
75
+ const c = u.getRules(
76
+ i.rules.g_schedule
77
+ ), m = [
78
+ {
79
+ property: "trigger.date",
80
+ operator: ["_isOnDate", "_rrule"]
81
+ },
82
+ {
83
+ property: "trigger.time",
84
+ operator: ["_isOnTime"]
85
+ }
86
+ ];
87
+ m.length == c.length && m.every((O) => c.some((C) => {
88
+ const f = u.simplify(C);
89
+ return f.property === O.property && O.operator.includes(f.operator);
90
+ })) || e.addIssue({
91
+ code: "custom",
92
+ path: ["campaign", "event", "rule"],
93
+ params: {
94
+ i18n: "connectZodCustom:campaign.active_period_invalid"
95
+ }
96
+ });
97
+ break;
98
+ }
99
+ default: {
100
+ "earningOption" in a && a.earningOption.type != "FIXED" && e.addIssue({
101
+ code: "custom",
102
+ path: ["campaign", "earningOption"],
103
+ params: {
104
+ i18n: "connectZodCustom:campaign.fixed_earning_required"
105
+ }
106
+ });
107
+ break;
108
+ }
109
+ }
110
+ }
111
+ function A(n) {
112
+ var a;
113
+ if (n.campaign.type === "VOUCHER" && "configs" in n) {
114
+ const i = n.configs;
115
+ i.extras.targetLocation = n.campaign.targetLocation;
116
+ const p = Math.max(
117
+ n.campaign.earningOption.amount,
118
+ i.options.maxUse ?? 1
119
+ );
120
+ n.campaign.earningOption.amount = p, i.options.maxUse = p, n.campaign.earningOption = {
121
+ type: "FIXED",
122
+ amount: 1
123
+ };
124
+ }
125
+ if (n.campaign.type == "MISSION" && "configs" in n) {
126
+ const i = n.configs;
127
+ i.options.validityOption = (a = n.campaign.config) == null ? void 0 : a.validityOption;
128
+ }
129
+ const e = n.campaign.event;
130
+ return e.type != "BILL_COMPLETED" && e.rule && I(e.rule) && (e.rule = u.removeEntry(e.rule, "g_bill"), n.campaign.event = e), n;
131
+ }
132
+ function s(n) {
133
+ const e = _.optionsMap.get(n).extend({
134
+ _id: o.optional(),
135
+ collectible: t.string().nullish()
136
+ });
137
+ switch (n) {
138
+ case "VOUCHER":
139
+ return t.object({
140
+ campaign: e,
141
+ templateId: o,
142
+ configs: d,
143
+ updateCollections: t.boolean().optional(),
144
+ code: t.string().optional()
145
+ });
146
+ case "PROMOTION":
147
+ return t.object({
148
+ campaign: e,
149
+ templateId: o
150
+ });
151
+ case "POINT":
152
+ return t.object({
153
+ campaign: e,
154
+ templateId: o
155
+ });
156
+ case "CREDIT":
157
+ return t.object({
158
+ campaign: e,
159
+ templateId: o
160
+ });
161
+ case "BROADCAST":
162
+ return t.object({
163
+ campaign: e,
164
+ templateId: o
165
+ });
166
+ case "COIN":
167
+ return t.object({
168
+ campaign: e,
169
+ templateId: o
170
+ });
171
+ case "REWARD_POOL":
172
+ return t.object({
173
+ campaign: e,
174
+ templateId: o,
175
+ updateCollections: t.boolean().optional()
176
+ });
177
+ case "GAME":
178
+ return t.object({
179
+ campaign: e,
180
+ configs: d,
181
+ templateId: o,
182
+ updateCollections: t.boolean().optional()
183
+ });
184
+ case "MISSION":
185
+ return t.object({
186
+ campaign: e,
187
+ configs: d,
188
+ templateId: o,
189
+ updateCollections: t.boolean().optional()
190
+ });
191
+ default:
192
+ throw new Error("Not implemented");
193
+ }
194
+ }
195
+ const D = h.extend({
196
+ _id: o.optional(),
197
+ name: t.string().min(1).max(300),
198
+ business: o.optional(),
199
+ campaigns: t.array(o).optional()
200
+ }), T = {
201
+ [r.enum.VOUCHER]: s("VOUCHER"),
202
+ [r.enum.PROMOTION]: s("PROMOTION"),
203
+ [r.enum.POINT]: s("POINT"),
204
+ [r.enum.CREDIT]: s("CREDIT"),
205
+ [r.enum.BROADCAST]: s("BROADCAST"),
206
+ [r.enum.COIN]: s("COIN"),
207
+ [r.enum.REWARD_POOL]: s("REWARD_POOL"),
208
+ [r.enum.GAME]: s("GAME"),
209
+ [r.enum.MISSION]: s("MISSION")
210
+ };
211
+ export {
212
+ T as C,
213
+ D as F,
214
+ A as a,
215
+ N as c
216
+ };
@@ -0,0 +1,78 @@
1
+ import { c as r } from "./index-Dkyb4P6T.js";
2
+ function m(e) {
3
+ if (!e)
4
+ return null;
5
+ const o = r.Config.getCountry().currency.symbol;
6
+ function s(t) {
7
+ const n = r.Dinero.fromFdoDecimal({ decimal: t.adjustment.amount });
8
+ switch (t.adjustment.type) {
9
+ case "BY_PERCENTAGE":
10
+ return `${n.toObject().amount}% discount`;
11
+ case "BY_AMOUNT":
12
+ return `${o}${n.toUnit()} discount`;
13
+ case "TO_AMOUNT":
14
+ return `to ${o}${n.toUnit()}`;
15
+ }
16
+ }
17
+ function u(t) {
18
+ switch (t.options.target) {
19
+ case "BILL":
20
+ return "Bill Discount";
21
+ case "ITEM":
22
+ if (t.options.strategy.type === "SIMPLE")
23
+ return "Item Discount";
24
+ if (t.options.strategy.type === "BUY_X_GET_Y")
25
+ return "Buy X Get Y (same product set)";
26
+ if (t.options.strategy.type === "BUY_X_GET_Y_V2")
27
+ return "Buy X Get Y (mixed product set)";
28
+ if (t.options.strategy.type === "BUY_X_ITEM_A_GET_Y_ITEM_B")
29
+ return "Buy X Get Y (different product set)";
30
+ if (t.options.strategy.type === "COMBO")
31
+ return "Combo";
32
+ break;
33
+ case "PAYMENT":
34
+ return "Payment";
35
+ default:
36
+ throw new Error("Invalid effect target");
37
+ }
38
+ }
39
+ function a(t) {
40
+ if (t.options.target === "BILL" || t.options.target === "PAYMENT") {
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({
48
+ decimal: t.options.minPurchase
49
+ });
50
+ return n.toUnit() > 0 ? `min spend ${o}${n.toUnit()}` : "no min spend";
51
+ }
52
+ return "no min spend";
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
+ }
64
+ return {
65
+ type: u(e),
66
+ adjustment: s(e),
67
+ requirements: a(e),
68
+ maxCap: c(e)
69
+ };
70
+ }
71
+ function f(e) {
72
+ const o = m(e);
73
+ return !e || !o ? null : Object.values(o).filter(Boolean).join(" | ");
74
+ }
75
+ export {
76
+ f as e,
77
+ m as s
78
+ };