monkey-front-core 0.0.600 → 0.0.602
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/alerts/monkeyecx-alerts.service.mjs +47 -1
- package/esm2020/lib/core/utils/validators.mjs +11 -2
- package/fesm2015/monkey-front-core.mjs +54 -2
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +57 -2
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/alerts/monkeyecx-alerts.service.d.ts +28 -0
- package/lib/core/utils/validators.d.ts +2 -0
- package/monkey-front-core-0.0.602.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.600.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 */
|
|
@@ -4857,6 +4866,52 @@ class MonkeyEcxAlertsService {
|
|
|
4857
4866
|
verticalPosition: 'top'
|
|
4858
4867
|
});
|
|
4859
4868
|
}
|
|
4869
|
+
showWithClose({ type = 'warning', title, message }) {
|
|
4870
|
+
const i18n = this.translateService.instant([
|
|
4871
|
+
`MECX-ALERTS.${type}`.toUpperCase(),
|
|
4872
|
+
'MECX-ALERTS.BUTTONS'
|
|
4873
|
+
]);
|
|
4874
|
+
this.snackbarService.show({
|
|
4875
|
+
title: i18n?.[`MECX-ALERTS.${type}`.toUpperCase()].TITLES?.[title],
|
|
4876
|
+
message: i18n?.[`MECX-ALERTS.${type}`.toUpperCase()].MESSAGES[message],
|
|
4877
|
+
type,
|
|
4878
|
+
keepOpen: true,
|
|
4879
|
+
horizontalPosition: 'center',
|
|
4880
|
+
verticalPosition: 'top',
|
|
4881
|
+
action: {
|
|
4882
|
+
cancel: {
|
|
4883
|
+
style: 'button',
|
|
4884
|
+
label: i18n?.['MECX-ALERTS.BUTTONS'].CLOSE,
|
|
4885
|
+
action: () => { }
|
|
4886
|
+
}
|
|
4887
|
+
}
|
|
4888
|
+
});
|
|
4889
|
+
}
|
|
4890
|
+
showWithActions({ type = 'warning', title, message, duration, keepOpen, action }) {
|
|
4891
|
+
const i18n = this.translateService.instant([
|
|
4892
|
+
`MECX-ALERTS.${type}`.toUpperCase(),
|
|
4893
|
+
'MECX-ALERTS.BUTTONS'
|
|
4894
|
+
]);
|
|
4895
|
+
action = {
|
|
4896
|
+
...action,
|
|
4897
|
+
confirm: action.confirm
|
|
4898
|
+
? { ...action.confirm, label: i18n?.['MECX-ALERTS.BUTTONS'][action.confirm.label] }
|
|
4899
|
+
: action.confirm,
|
|
4900
|
+
cancel: action.cancel
|
|
4901
|
+
? { ...action.cancel, label: i18n?.['MECX-ALERTS.BUTTONS'][action.cancel.label] }
|
|
4902
|
+
: action.cancel
|
|
4903
|
+
};
|
|
4904
|
+
this.snackbarService.show({
|
|
4905
|
+
title: i18n?.[`MECX-ALERTS.${type}`.toUpperCase()].TITLES?.[title],
|
|
4906
|
+
message: i18n?.[`MECX-ALERTS.${type}`.toUpperCase()].MESSAGES[message],
|
|
4907
|
+
type,
|
|
4908
|
+
duration: duration || undefined,
|
|
4909
|
+
keepOpen: keepOpen || false,
|
|
4910
|
+
horizontalPosition: 'center',
|
|
4911
|
+
verticalPosition: 'top',
|
|
4912
|
+
action
|
|
4913
|
+
});
|
|
4914
|
+
}
|
|
4860
4915
|
}
|
|
4861
4916
|
MonkeyEcxAlertsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAlertsService, deps: [{ token: i1.MonkeyStyleGuideSnackbarService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4862
4917
|
MonkeyEcxAlertsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAlertsService, providedIn: 'root' });
|
|
@@ -7188,5 +7243,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
7188
7243
|
* Generated bundle index. Do not edit.
|
|
7189
7244
|
*/
|
|
7190
7245
|
|
|
7191
|
-
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 };
|
|
7246
|
+
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 };
|
|
7192
7247
|
//# sourceMappingURL=monkey-front-core.mjs.map
|