monkey-front-core 0.0.598 → 0.0.600
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/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +4 -4
- package/esm2020/lib/core/services/config/monkeyecx-gtm-config.service.mjs +5 -9
- package/fesm2015/monkey-front-core.mjs +11 -14
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +7 -11
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/config/monkeyecx-gtm-config.service.d.ts +2 -2
- package/monkey-front-core-0.0.600.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.598.tgz +0 -0
|
@@ -4207,9 +4207,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
4207
4207
|
|
|
4208
4208
|
/* eslint-disable no-console */
|
|
4209
4209
|
class MonkeyEcxGTMConfigService {
|
|
4210
|
-
constructor() {
|
|
4211
|
-
// not to do
|
|
4212
|
-
}
|
|
4213
4210
|
handleCode(key) {
|
|
4214
4211
|
try {
|
|
4215
4212
|
window.dataLayer = window.dataLayer || [];
|
|
@@ -4237,10 +4234,9 @@ class MonkeyEcxGTMConfigService {
|
|
|
4237
4234
|
console.error('GTM Configuration Error!');
|
|
4238
4235
|
}
|
|
4239
4236
|
}
|
|
4240
|
-
apply(environment) {
|
|
4241
|
-
const {
|
|
4242
|
-
|
|
4243
|
-
if (enabled && environment.environment !== 'dev') {
|
|
4237
|
+
async apply(config, environment) {
|
|
4238
|
+
const { enabled, key } = config?.gtm || environment?.gtm || { enabled: false, key: '' };
|
|
4239
|
+
if (enabled) {
|
|
4244
4240
|
this.handleCode(key);
|
|
4245
4241
|
}
|
|
4246
4242
|
}
|
|
@@ -4252,7 +4248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
4252
4248
|
args: [{
|
|
4253
4249
|
providedIn: 'root'
|
|
4254
4250
|
}]
|
|
4255
|
-
}]
|
|
4251
|
+
}] });
|
|
4256
4252
|
|
|
4257
4253
|
const moment = moment_;
|
|
4258
4254
|
class MonkeyEcxAlertsConfigService {
|
|
@@ -4309,22 +4305,22 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
4309
4305
|
this.configBootstrapSubject$ = new BehaviorSubject({});
|
|
4310
4306
|
}
|
|
4311
4307
|
async getSettings(monkeyecxCode, configBootstrap, callback, environment, identifyCode) {
|
|
4312
|
-
const { monkeyecxSecurityConsoleConfigService, monkeyecxServiceWorkerConfigService, monkeyecxMaintenanceConfigService, monkeyStyleGuideSettingsService,
|
|
4308
|
+
const { monkeyecxSecurityConsoleConfigService, monkeyecxServiceWorkerConfigService, monkeyecxMaintenanceConfigService, monkeyStyleGuideSettingsService, getWhiteLabel, monkeyecxi18nConfigService } = this;
|
|
4313
4309
|
monkeyecxServiceWorkerConfigService.apply(configBootstrap);
|
|
4314
4310
|
monkeyecxMaintenanceConfigService.apply(configBootstrap);
|
|
4315
4311
|
monkeyecxSecurityConsoleConfigService.apply();
|
|
4316
|
-
monkeyGTMConfigService.apply(environment);
|
|
4317
4312
|
const url = `${environment.urlAssets}/${monkeyecxCode.toLowerCase()}`;
|
|
4318
4313
|
await monkeyecxi18nConfigService.apply(environment);
|
|
4319
4314
|
monkeyStyleGuideSettingsService.bootstrap(`${url}/monkey-style-guide-settings.json`, getWhiteLabel.bind(this, configBootstrap, callback, environment, identifyCode, url));
|
|
4320
4315
|
}
|
|
4321
4316
|
getWhiteLabel(configBootstrap, callback, environment, identifyCode, url) {
|
|
4322
|
-
const { monkeyecxService, configSubject$, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyecxi18nConfigService, monkeyEcxAlertsConfigService } = this;
|
|
4317
|
+
const { monkeyecxService, configSubject$, monkeyGTMConfigService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyecxi18nConfigService, monkeyEcxAlertsConfigService } = this;
|
|
4323
4318
|
monkeyecxService?.get(`${url}/white-label.json`)?.subscribe(async (config) => {
|
|
4324
4319
|
monkeyecxi18nConfigService.applyExternal(config, environment?.locale?.lang || 'pt-BR');
|
|
4325
4320
|
monkeyecxLogsConfigService.apply(config, configBootstrap, environment, identifyCode);
|
|
4326
4321
|
monkeyEcxFeatureToggleService.apply(configSubject$, environment);
|
|
4327
4322
|
monkeyEcxAlertsConfigService.apply(config);
|
|
4323
|
+
monkeyGTMConfigService.apply(config, environment);
|
|
4328
4324
|
configSubject$.next(config);
|
|
4329
4325
|
if (callback)
|
|
4330
4326
|
callback();
|