@smartico/public-api 0.0.310 → 0.0.312
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.
- package/dist/Analytics/AnalyticStoreData.d.ts +2 -2
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +12 -5
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Analytics/AnalyticStoreData.ts +2 -2
- package/src/Missions/MissionsUtils.ts +12 -3
package/package.json
CHANGED
|
@@ -30,10 +30,10 @@ export enum AnalyticsScreenNameId {
|
|
|
30
30
|
LiquidSection = 23,
|
|
31
31
|
|
|
32
32
|
ModalMission = 31,
|
|
33
|
-
ModalLevel =
|
|
33
|
+
ModalLevel = 32,
|
|
34
34
|
ModalBadge = 33,
|
|
35
35
|
ModalStore = 34,
|
|
36
|
-
ModalBonus =
|
|
36
|
+
ModalBonus = 35,
|
|
37
37
|
ModalJackpot = 36,
|
|
38
38
|
ModalUsername = 37,
|
|
39
39
|
ModalAvatar = 38,
|
|
@@ -171,7 +171,7 @@ export class MissionUtils {
|
|
|
171
171
|
return task;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
const userStateParams = (task.user_state_params
|
|
174
|
+
const userStateParams = (task.user_state_params || {});
|
|
175
175
|
const userStateOperator = task.task_public_meta?.user_state_operations;
|
|
176
176
|
const userStateParamsKeys = Object.keys(userStateParams);
|
|
177
177
|
|
|
@@ -190,7 +190,10 @@ export class MissionUtils {
|
|
|
190
190
|
if (operatorsMulti.includes(operator)) {
|
|
191
191
|
const value = userStateParams[k];
|
|
192
192
|
if (value && value.length > 0) {
|
|
193
|
-
replacementValue = value.
|
|
193
|
+
replacementValue = value.map((v: string) => {
|
|
194
|
+
const cleaned = v.replace(/_/g, ' ').toLowerCase();
|
|
195
|
+
return cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
|
|
196
|
+
}).join(' ,');
|
|
194
197
|
}
|
|
195
198
|
}
|
|
196
199
|
|
|
@@ -200,12 +203,18 @@ export class MissionUtils {
|
|
|
200
203
|
|
|
201
204
|
if (IntUtils.isNotNull(pos) && value && value[pos]) {
|
|
202
205
|
replacementValue = value[pos];
|
|
206
|
+
|
|
207
|
+
if (replacementValue) {
|
|
208
|
+
replacementValue = replacementValue.replace('_', ' ').toLowerCase();
|
|
209
|
+
replacementValue = replacementValue.charAt(0).toUpperCase() + replacementValue.slice(1);
|
|
210
|
+
}
|
|
211
|
+
|
|
203
212
|
}
|
|
204
213
|
}
|
|
205
214
|
});
|
|
206
215
|
|
|
207
216
|
if (replacementValue) {
|
|
208
|
-
task.task_public_meta.name =task.task_public_meta.name.replace('{{suggested_games}}', replacementValue);
|
|
217
|
+
task.task_public_meta.name = task.task_public_meta.name.replace('{{suggested_games}}', replacementValue);
|
|
209
218
|
}
|
|
210
219
|
|
|
211
220
|
return task;
|