monkey-front-core 0.0.599 → 0.0.601
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 -17
- package/esm2020/lib/core/utils/validators.mjs +11 -2
- package/fesm2015/monkey-front-core.mjs +19 -19
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +18 -19
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/config/monkeyecx-gtm-config.service.d.ts +2 -4
- package/lib/core/utils/validators.d.ts +2 -0
- package/monkey-front-core-0.0.601.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.599.tgz +0 -0
|
@@ -1578,12 +1578,18 @@ function validateFullName(control) {
|
|
|
1578
1578
|
if (!value)
|
|
1579
1579
|
return null;
|
|
1580
1580
|
const fullName = value.split(/\s+/);
|
|
1581
|
-
const hasShortPart = fullName.some(part => part.length < 2);
|
|
1581
|
+
const hasShortPart = fullName.some((part) => { return part.length < 2; });
|
|
1582
1582
|
if (fullName.length < 2 || hasShortPart) {
|
|
1583
1583
|
return { fullName: true };
|
|
1584
1584
|
}
|
|
1585
1585
|
return null;
|
|
1586
1586
|
}
|
|
1587
|
+
function containsNumber(control) {
|
|
1588
|
+
const value = control.value?.trim();
|
|
1589
|
+
if (!value)
|
|
1590
|
+
return null;
|
|
1591
|
+
return /\d/.test(value) ? { containsNumber: true } : null;
|
|
1592
|
+
}
|
|
1587
1593
|
class Validators {
|
|
1588
1594
|
static email(control) {
|
|
1589
1595
|
return emailValidator(control);
|
|
@@ -1654,6 +1660,9 @@ class Validators {
|
|
|
1654
1660
|
static validateFullName(control) {
|
|
1655
1661
|
return validateFullName(control);
|
|
1656
1662
|
}
|
|
1663
|
+
static containsNumber(control) {
|
|
1664
|
+
return containsNumber(control);
|
|
1665
|
+
}
|
|
1657
1666
|
}
|
|
1658
1667
|
|
|
1659
1668
|
/* eslint-disable object-curly-newline */
|
|
@@ -4207,10 +4216,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
4207
4216
|
|
|
4208
4217
|
/* eslint-disable no-console */
|
|
4209
4218
|
class MonkeyEcxGTMConfigService {
|
|
4210
|
-
constructor(config) {
|
|
4211
|
-
this.config = config;
|
|
4212
|
-
// not to do
|
|
4213
|
-
}
|
|
4214
4219
|
handleCode(key) {
|
|
4215
4220
|
try {
|
|
4216
4221
|
window.dataLayer = window.dataLayer || [];
|
|
@@ -4238,27 +4243,21 @@ class MonkeyEcxGTMConfigService {
|
|
|
4238
4243
|
console.error('GTM Configuration Error!');
|
|
4239
4244
|
}
|
|
4240
4245
|
}
|
|
4241
|
-
async apply(environment) {
|
|
4242
|
-
const
|
|
4243
|
-
.config()
|
|
4244
|
-
.pipe(first((val) => {
|
|
4245
|
-
return !!val && JSON.stringify(val) !== '{}';
|
|
4246
|
-
}))
|
|
4247
|
-
.toPromise();
|
|
4248
|
-
const { enabled, key } = data?.gtm || environment?.gtm || { enabled: false, key: '' };
|
|
4246
|
+
async apply(config, environment) {
|
|
4247
|
+
const { enabled, key } = config?.gtm || environment?.gtm || { enabled: false, key: '' };
|
|
4249
4248
|
if (enabled) {
|
|
4250
4249
|
this.handleCode(key);
|
|
4251
4250
|
}
|
|
4252
4251
|
}
|
|
4253
4252
|
}
|
|
4254
|
-
MonkeyEcxGTMConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, deps: [
|
|
4253
|
+
MonkeyEcxGTMConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4255
4254
|
MonkeyEcxGTMConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, providedIn: 'root' });
|
|
4256
4255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, decorators: [{
|
|
4257
4256
|
type: Injectable,
|
|
4258
4257
|
args: [{
|
|
4259
4258
|
providedIn: 'root'
|
|
4260
4259
|
}]
|
|
4261
|
-
}]
|
|
4260
|
+
}] });
|
|
4262
4261
|
|
|
4263
4262
|
const moment = moment_;
|
|
4264
4263
|
class MonkeyEcxAlertsConfigService {
|
|
@@ -4315,22 +4314,22 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
4315
4314
|
this.configBootstrapSubject$ = new BehaviorSubject({});
|
|
4316
4315
|
}
|
|
4317
4316
|
async getSettings(monkeyecxCode, configBootstrap, callback, environment, identifyCode) {
|
|
4318
|
-
const { monkeyecxSecurityConsoleConfigService, monkeyecxServiceWorkerConfigService, monkeyecxMaintenanceConfigService, monkeyStyleGuideSettingsService,
|
|
4317
|
+
const { monkeyecxSecurityConsoleConfigService, monkeyecxServiceWorkerConfigService, monkeyecxMaintenanceConfigService, monkeyStyleGuideSettingsService, getWhiteLabel, monkeyecxi18nConfigService } = this;
|
|
4319
4318
|
monkeyecxServiceWorkerConfigService.apply(configBootstrap);
|
|
4320
4319
|
monkeyecxMaintenanceConfigService.apply(configBootstrap);
|
|
4321
4320
|
monkeyecxSecurityConsoleConfigService.apply();
|
|
4322
|
-
monkeyGTMConfigService.apply(environment);
|
|
4323
4321
|
const url = `${environment.urlAssets}/${monkeyecxCode.toLowerCase()}`;
|
|
4324
4322
|
await monkeyecxi18nConfigService.apply(environment);
|
|
4325
4323
|
monkeyStyleGuideSettingsService.bootstrap(`${url}/monkey-style-guide-settings.json`, getWhiteLabel.bind(this, configBootstrap, callback, environment, identifyCode, url));
|
|
4326
4324
|
}
|
|
4327
4325
|
getWhiteLabel(configBootstrap, callback, environment, identifyCode, url) {
|
|
4328
|
-
const { monkeyecxService, configSubject$, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyecxi18nConfigService, monkeyEcxAlertsConfigService } = this;
|
|
4326
|
+
const { monkeyecxService, configSubject$, monkeyGTMConfigService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyecxi18nConfigService, monkeyEcxAlertsConfigService } = this;
|
|
4329
4327
|
monkeyecxService?.get(`${url}/white-label.json`)?.subscribe(async (config) => {
|
|
4330
4328
|
monkeyecxi18nConfigService.applyExternal(config, environment?.locale?.lang || 'pt-BR');
|
|
4331
4329
|
monkeyecxLogsConfigService.apply(config, configBootstrap, environment, identifyCode);
|
|
4332
4330
|
monkeyEcxFeatureToggleService.apply(configSubject$, environment);
|
|
4333
4331
|
monkeyEcxAlertsConfigService.apply(config);
|
|
4332
|
+
monkeyGTMConfigService.apply(config, environment);
|
|
4334
4333
|
configSubject$.next(config);
|
|
4335
4334
|
if (callback)
|
|
4336
4335
|
callback();
|
|
@@ -7198,5 +7197,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
7198
7197
|
* Generated bundle index. Do not edit.
|
|
7199
7198
|
*/
|
|
7200
7199
|
|
|
7201
|
-
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, LService, Link, MECX_ALPHA, MECX_BETA, MECX_DATE_FORMAT, MECX_ENV, MECX_LANG, MECX_TIMEZONEOFFSET, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsActions, MonkeyEcxCommonsResolveBaseService, MonkeyEcxCommonsResolveService, MonkeyEcxCommonsSelectors, MonkeyEcxCommonsService, MonkeyEcxCommonsStoreBaseService, MonkeyEcxCommonsStoreService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyCodePipe, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDisplaySupportPhone, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDatePipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLinksModel, MonkeyEcxLoadingDirective, MonkeyEcxLoggedHandlingService, MonkeyEcxLogs, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, differentFromZero, documentValidator, documentValidatorByType, emailValidator, minYearsValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, validateFullName, valueGreaterThanZero, zipCodeValidator };
|
|
7200
|
+
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, LService, Link, MECX_ALPHA, MECX_BETA, MECX_DATE_FORMAT, MECX_ENV, MECX_LANG, MECX_TIMEZONEOFFSET, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsActions, MonkeyEcxCommonsResolveBaseService, MonkeyEcxCommonsResolveService, MonkeyEcxCommonsSelectors, MonkeyEcxCommonsService, MonkeyEcxCommonsStoreBaseService, MonkeyEcxCommonsStoreService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyCodePipe, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDisplaySupportPhone, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDatePipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLinksModel, MonkeyEcxLoadingDirective, MonkeyEcxLoggedHandlingService, MonkeyEcxLogs, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, containsNumber, dateRangeValidator, dateStartEndValidator, dateValidator, differentFromZero, documentValidator, documentValidatorByType, emailValidator, minYearsValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, validateFullName, valueGreaterThanZero, zipCodeValidator };
|
|
7202
7201
|
//# sourceMappingURL=monkey-front-core.mjs.map
|