@anglr/common 19.2.0-beta.20240125053304 → 20.0.0-beta.20240530103148
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/changelog.md +81 -6
- package/es2022/date-fns/src/misc/utils.js.map +1 -1
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +5 -4
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +14 -24
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -24
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -28
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +14 -14
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +5 -4
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +72 -111
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +13 -15
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +32 -27
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +5 -4
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/index.js +0 -1
- package/es2022/forms/src/index.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupAsyncValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/invalidateOnChange.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/modelPropertyMetadata.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/requiredIf.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js +0 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js +0 -4
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
- package/es2022/forms/src/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/validationErrorsContainerView.js +7 -9
- package/es2022/forms/src/misc/validationErrorsContainerView.js.map +1 -1
- package/es2022/forms/src/misc/validators.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +7 -29
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +8 -20
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -4
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +6 -6
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -4
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js +5 -5
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/hasError.module.js +6 -17
- package/es2022/forms/src/modules/hasError.module.js.map +1 -1
- package/es2022/forms/src/modules/numberInput.module.js +5 -5
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -10
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -4
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
- package/es2022/forms/src/services/submitted/submitted.service.js +14 -12
- package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -24
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +18 -21
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +20 -26
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -10
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +3 -10
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +37 -38
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +12 -17
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +6 -6
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +11 -10
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/material/src/modules/movableTitledDialog.module.js +6 -6
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +6 -6
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -5
- package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js +5 -5
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js.map +1 -1
- package/es2022/moment/src/misc/utils.js.map +1 -1
- package/es2022/moment/src/modules/moment.module.js +5 -5
- package/es2022/moment/src/modules/moment.module.js.map +1 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
- package/es2022/router/src/decorators/componentRedirectRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/componentRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/moduleRoutes.decorator.js.map +1 -1
- package/es2022/router/src/misc/utils.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouter.js +16 -17
- package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouterData.js +3 -8
- package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +20 -22
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +18 -20
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
- package/es2022/src/decorators/asSignal/asSignal.decorator.js.map +1 -1
- package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
- package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +4 -23
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +27 -39
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +38 -49
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +4 -5
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +13 -27
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +20 -45
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -5
- package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +8 -9
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
- package/es2022/src/modules/commonDynamic.module.js +4 -4
- package/es2022/src/modules/commonDynamic.module.js.map +1 -1
- package/es2022/src/modules/commonLocalize.module.js +4 -4
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +23 -19
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +9 -46
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +6 -10
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +13 -26
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/logger/components/console/console.component.js +16 -23
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/decorators/loggerSink.decorator.js.map +1 -1
- package/es2022/src/modules/logger/misc/utils.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +18 -16
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js +7 -5
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +8 -8
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js.map +1 -1
- package/es2022/src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.js.map +1 -1
- package/es2022/src/modules/logger/services/logger/logger.service.js +3 -4
- package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/rest.sink.js +17 -21
- package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/restSink.options.js +16 -16
- package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js +0 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerConfiguration.js +8 -17
- package/es2022/src/modules/logger/types/loggerConfiguration.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerOptions.js +30 -28
- package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
- package/es2022/src/modules/logger/types/messageLog.js +5 -18
- package/es2022/src/modules/logger/types/messageLog.js.map +1 -1
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +33 -46
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +4 -4
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -21
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +7 -45
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -4
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +6 -6
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +29 -30
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js +9 -9
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +16 -31
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +29 -81
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -4
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -5
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -4
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +3 -3
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +3 -18
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/index.js +2 -0
- package/es2022/src/pipes/index.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -4
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -4
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +4 -4
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/localize/localize.pipe.js +3 -10
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.js +8 -15
- package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js +29 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -0
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +8 -9
- package/es2022/src/services/cookies/cookies.service.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +24 -25
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/notifications/notifications.interface.js +0 -3
- package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
- package/es2022/src/services/notifications/notificationsOptions.js +5 -5
- package/es2022/src/services/notifications/notificationsOptions.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -4
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/position/position.interface.js.map +1 -1
- package/es2022/src/services/statusCode/statusCode.service.js +3 -8
- package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +10 -8
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +10 -8
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
- package/es2022/src/utils/index.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +5 -5
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html +9 -3
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
- package/forms/src/directives/hasError/hasError.directive.d.ts +24 -32
- package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts +14 -12
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
- package/forms/src/index.d.ts +0 -1
- package/forms/src/index.d.ts.map +1 -1
- package/forms/src/modules/hasError.module.d.ts +1 -5
- package/forms/src/modules/hasError.module.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts +3 -3
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.html +13 -7
- package/lerna.json +4 -0
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts +2 -2
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts.map +1 -1
- package/material/src/modules/debugDataCopyClick.module.d.ts +3 -3
- package/material/src/modules/debugDataCopyClick.module.d.ts.map +1 -1
- package/package.json +54 -57
- package/readme.md +0 -1
- package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts +3 -3
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts +3 -3
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
- package/src/directives/bodyRender/bodyRender.directive.d.ts +3 -3
- package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +3 -3
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/src/directives/goBack/goBack.directive.d.ts +3 -3
- package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
- package/src/directives/positionTo/positionTo.directive.d.ts +2 -2
- package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/modules/commonUtils.module.d.ts +2 -1
- package/src/modules/commonUtils.module.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.css +1 -0
- package/src/modules/debugData/components/debugData/debugData.component.d.ts +4 -24
- package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.html +4 -3
- package/src/modules/debugData/modules/debugData.module.d.ts +1 -2
- package/src/modules/debugData/modules/debugData.module.d.ts.map +1 -1
- package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts +2 -10
- package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts.map +1 -1
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +7 -8
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts +3 -3
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
- package/src/pipes/index.d.ts +2 -0
- package/src/pipes/index.d.ts.map +1 -1
- package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
- package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
- package/src/pipes/isPresent/isPresent.pipe.d.ts +3 -3
- package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +3 -3
- package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts +4 -4
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts.map +1 -1
- package/src/pipes/trimText/trimText.pipe.d.ts +17 -0
- package/src/pipes/trimText/trimText.pipe.d.ts.map +1 -0
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
- package/src/services/position/position.interface.d.ts +10 -10
- package/src/services/position/position.interface.d.ts.map +1 -1
- package/styles/core/_mixins.scss +14 -0
- package/styles/core/_theme.scss +4 -0
- package/version.bak +1 -1
- package/es2022/forms/src/modules/requiredClass.module.js +0 -19
- package/es2022/forms/src/modules/requiredClass.module.js.map +0 -1
- package/es2022/numeral/src/index.js +0 -2
- package/es2022/numeral/src/index.js.map +0 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +0 -1
- package/forms/src/modules/requiredClass.module.d.ts +0 -11
- package/forms/src/modules/requiredClass.module.d.ts.map +0 -1
- package/numeral/package.json +0 -8
- package/numeral/src/index.d.ts +0 -2
- package/numeral/src/index.d.ts.map +0 -1
- package/src/style.scss +0 -87
package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js
CHANGED
|
@@ -8,28 +8,16 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* Directive used for displaying form error message
|
|
9
9
|
*/
|
|
10
10
|
export class ErrorMessageDirective {
|
|
11
|
-
_element;
|
|
12
|
-
_localization;
|
|
13
|
-
_errorMessages;
|
|
14
|
-
//######################### protected properties #########################
|
|
15
|
-
/**
|
|
16
|
-
* Subscriptions created during initialization
|
|
17
|
-
*/
|
|
18
|
-
_initSubscriptions = new Subscription();
|
|
19
|
-
//######################### public properties - inputs #########################
|
|
20
|
-
/**
|
|
21
|
-
* Name/code of error message to be displayed
|
|
22
|
-
*/
|
|
23
|
-
errorName;
|
|
24
|
-
/**
|
|
25
|
-
* Object storing all errors
|
|
26
|
-
*/
|
|
27
|
-
errors;
|
|
28
11
|
//######################### constructor #########################
|
|
29
12
|
constructor(_element, _localization, _errorMessages) {
|
|
30
13
|
this._element = _element;
|
|
31
14
|
this._localization = _localization;
|
|
32
15
|
this._errorMessages = _errorMessages;
|
|
16
|
+
//######################### protected properties #########################
|
|
17
|
+
/**
|
|
18
|
+
* Subscriptions created during initialization
|
|
19
|
+
*/
|
|
20
|
+
this._initSubscriptions = new Subscription();
|
|
33
21
|
this._initSubscriptions.add(this._localization.textsChange.subscribe(() => this._showMessage()));
|
|
34
22
|
}
|
|
35
23
|
//######################### public methods - implementation of OnChanges #########################
|
|
@@ -62,10 +50,10 @@ export class ErrorMessageDirective {
|
|
|
62
50
|
const message = this._localization.get(errorMessage, this.errors);
|
|
63
51
|
this._element.nativeElement.innerHTML = message;
|
|
64
52
|
}
|
|
65
|
-
static
|
|
66
|
-
static
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessageDirective, deps: [{ token: i0.ElementRef }, { token: STRING_LOCALIZATION }, { token: VALIDATION_ERROR_MESSAGES }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
54
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: { errorName: ["errorMessage", "errorName"], errors: "errors" }, exportAs: ["errorMessage"], usesOnChanges: true, ngImport: i0 }); }
|
|
67
55
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessageDirective, decorators: [{
|
|
69
57
|
type: Directive,
|
|
70
58
|
args: [{
|
|
71
59
|
selector: '[errorMessage]',
|
package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.directive.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAsC,MAAM,eAAe,CAAC;AACxG,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAa,OAAO,EAAE,MAAM,EAAmB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;;AAElE;;GAEG;AAMH,MAAM,OAAO,qBAAqB;
|
|
1
|
+
{"version":3,"file":"errorMessage.directive.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAsC,MAAM,eAAe,CAAC;AACxG,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAa,OAAO,EAAE,MAAM,EAAmB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;;AAElE;;GAEG;AAMH,MAAM,OAAO,qBAAqB;IAuB9B,iEAAiE;IACjE,YAAsB,QAAiC,EACJ,aAAiC,EAC3B,cAAgC;QAFnE,aAAQ,GAAR,QAAQ,CAAyB;QACJ,kBAAa,GAAb,aAAa,CAAoB;QAC3B,mBAAc,GAAd,cAAc,CAAkB;QAxBzF,0EAA0E;QAE1E;;WAEG;QACO,uBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;QAqB5D,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW,CAAC,OAAsB;QAErC,IAAG,MAAM,CAAwB,WAAW,CAAC,IAAI,OAAO,EACxD,CAAC;YACG,IAAI,CAAC,YAAY,EAAE,CAAC;QACxB,CAAC;IACL,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,kBAAkB,EAAE,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACnC,CAAC;IAED,uEAAuE;IAEvE;;OAEG;IACO,YAAY;QAElB,IAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAC1B,CAAC;YACG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC;YAE3C,OAAO;QACX,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAElE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,GAAG,OAAO,CAAC;IACpD,CAAC;8GAzEQ,qBAAqB,4CAyBV,mBAAmB,aACnB,yBAAyB;kGA1BpC,qBAAqB;;2FAArB,qBAAqB;kBALjC,SAAS;mBACV;oBACI,QAAQ,EAAE,gBAAgB;oBAC1B,QAAQ,EAAE,cAAc;iBAC3B;;0BA0BgB,MAAM;2BAAC,mBAAmB;;0BAC1B,MAAM;2BAAC,yBAAyB;yCAXtC,SAAS;sBADf,KAAK;uBAAC,cAAc;gBAOd,MAAM;sBADZ,KAAK","sourcesContent":["import {Directive, ElementRef, Inject, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {Dictionary, isBlank, nameof, StringDictionary} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {VALIDATION_ERROR_MESSAGES} from '../../../../misc/tokens';\n\n/**\n * Directive used for displaying form error message\n */\n@Directive(\n{\n selector: '[errorMessage]',\n exportAs: 'errorMessage'\n})\nexport class ErrorMessageDirective implements OnChanges, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n //######################### public properties - inputs #########################\n\n /**\n * Name/code of error message to be displayed\n */\n @Input('errorMessage')\n public errorName: string;\n\n /**\n * Object storing all errors\n */\n @Input()\n public errors: Dictionary;\n\n //######################### constructor #########################\n constructor(protected _element: ElementRef<HTMLElement>,\n @Inject(STRING_LOCALIZATION) protected _localization: StringLocalization,\n @Inject(VALIDATION_ERROR_MESSAGES) protected _errorMessages: StringDictionary,)\n {\n this._initSubscriptions.add(this._localization.textsChange.subscribe(() => this._showMessage()));\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<ErrorMessageDirective>('errorName') in changes)\n {\n this._showMessage();\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._initSubscriptions?.unsubscribe();\n this._initSubscriptions = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows message inside of element\n */\n protected _showMessage(): void\n {\n if(isBlank(this.errorName))\n {\n this._element.nativeElement.innerHTML = '';\n\n return;\n }\n\n const errorMessage = this._errorMessages[this.errorName];\n const message = this._localization.get(errorMessage, this.errors);\n\n this._element.nativeElement.innerHTML = message;\n }\n}"]}
|
|
@@ -4,7 +4,6 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* Obtains template for displaying form group error
|
|
5
5
|
*/
|
|
6
6
|
export class GroupErrorsTemplateDirective {
|
|
7
|
-
template;
|
|
8
7
|
//######################### constructor #########################
|
|
9
8
|
constructor(template) {
|
|
10
9
|
this.template = template;
|
|
@@ -16,10 +15,10 @@ export class GroupErrorsTemplateDirective {
|
|
|
16
15
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
17
16
|
return true;
|
|
18
17
|
}
|
|
19
|
-
static
|
|
20
|
-
static
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GroupErrorsTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: GroupErrorsTemplateDirective, selector: "[formGroupError]", ngImport: i0 }); }
|
|
21
20
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GroupErrorsTemplateDirective, decorators: [{
|
|
23
22
|
type: Directive,
|
|
24
23
|
args: [{
|
|
25
24
|
selector: '[formGroupError]'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupErrorsTemplate.directive.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AAKH,MAAM,OAAO,4BAA4B;
|
|
1
|
+
{"version":3,"file":"groupErrorsTemplate.directive.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AAKH,MAAM,OAAO,4BAA4B;IAErC,iEAAiE;IACjE,YAAmB,QAAiD;QAAjD,aAAQ,GAAR,QAAQ,CAAyC;IAEpE,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAkC,EAAE,IAAa;QAE3E,OAAO,IAAI,CAAC;IAChB,CAAC;8GAfQ,4BAA4B;kGAA5B,4BAA4B;;2FAA5B,4BAA4B;kBAJxC,SAAS;mBACV;oBACI,QAAQ,EAAE,kBAAkB;iBAC/B","sourcesContent":["import {Directive, TemplateRef} from '@angular/core';\n\nimport {GroupErrorsTemplateContext} from './groupErrorsTemplate.context';\n\n/**\n * Obtains template for displaying form group error\n */\n@Directive(\n{\n selector: '[formGroupError]'\n})\nexport class GroupErrorsTemplateDirective\n{\n //######################### constructor #########################\n constructor(public template: TemplateRef<GroupErrorsTemplateContext>)\n {\n }\n\n //######################### ng language server #########################\n \n /**\n * Allows typechecking for template\n */\n static ngTemplateContextGuard(_dir: GroupErrorsTemplateDirective, _ctx: unknown): _ctx is GroupErrorsTemplateContext\n {\n return true;\n }\n}"]}
|
|
@@ -9,19 +9,19 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
* Module for error message directives, pipes and components
|
|
10
10
|
*/
|
|
11
11
|
export class ErrorMessageModule {
|
|
12
|
-
static
|
|
13
|
-
static
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
13
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessageModule, declarations: [WithErrorMessagePipe,
|
|
14
14
|
ErrorMessageDirective,
|
|
15
15
|
GroupErrorsTemplateDirective,
|
|
16
16
|
GroupErrorsComponent], imports: [CommonModule,
|
|
17
17
|
CommonUtilsModule], exports: [WithErrorMessagePipe,
|
|
18
18
|
ErrorMessageDirective,
|
|
19
19
|
GroupErrorsTemplateDirective,
|
|
20
|
-
GroupErrorsComponent] });
|
|
21
|
-
static
|
|
22
|
-
CommonUtilsModule] });
|
|
20
|
+
GroupErrorsComponent] }); }
|
|
21
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessageModule, imports: [CommonModule,
|
|
22
|
+
CommonUtilsModule] }); }
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessageModule, decorators: [{
|
|
25
25
|
type: NgModule,
|
|
26
26
|
args: [{
|
|
27
27
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.module.js","sourceRoot":"","sources":["../../../../../../forms/src/modules/errorMessage/modules/errorMessage.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,qBAAqB,EAAE,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAC;;AAE9C;;GAEG;AAuBH,MAAM,OAAO,kBAAkB;
|
|
1
|
+
{"version":3,"file":"errorMessage.module.js","sourceRoot":"","sources":["../../../../../../forms/src/modules/errorMessage/modules/errorMessage.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,qBAAqB,EAAE,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAC;;AAE9C;;GAEG;AAuBH,MAAM,OAAO,kBAAkB;8GAAlB,kBAAkB;+GAAlB,kBAAkB,iBAbvB,oBAAoB;YACpB,qBAAqB;YACrB,4BAA4B;YAC5B,oBAAoB,aARpB,YAAY;YACZ,iBAAiB,aAWjB,oBAAoB;YACpB,qBAAqB;YACrB,4BAA4B;YAC5B,oBAAoB;+GAGf,kBAAkB,YAlBvB,YAAY;YACZ,iBAAiB;;2FAiBZ,kBAAkB;kBAtB9B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;wBACZ,iBAAiB;qBACpB;oBACD,YAAY,EACZ;wBACI,oBAAoB;wBACpB,qBAAqB;wBACrB,4BAA4B;wBAC5B,oBAAoB;qBACvB;oBACD,OAAO,EACP;wBACI,oBAAoB;wBACpB,qBAAqB;wBACrB,4BAA4B;wBAC5B,oBAAoB;qBACvB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {CommonUtilsModule} from '@anglr/common';\n\nimport {GroupErrorsComponent} from '../components';\nimport {ErrorMessageDirective, GroupErrorsTemplateDirective} from '../directives';\nimport {WithErrorMessagePipe} from '../pipes';\n\n/**\n * Module for error message directives, pipes and components\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n CommonUtilsModule,\n ],\n declarations:\n [\n WithErrorMessagePipe,\n ErrorMessageDirective,\n GroupErrorsTemplateDirective,\n GroupErrorsComponent,\n ],\n exports:\n [\n WithErrorMessagePipe,\n ErrorMessageDirective,\n GroupErrorsTemplateDirective,\n GroupErrorsComponent,\n ]\n})\nexport class ErrorMessageModule\n{\n}\n"]}
|
package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js
CHANGED
|
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
* Filters array of errors with messages
|
|
6
6
|
*/
|
|
7
7
|
export class WithErrorMessagePipe {
|
|
8
|
-
_errorMessages;
|
|
9
8
|
//######################### constructor #########################
|
|
10
9
|
constructor(_errorMessages) {
|
|
11
10
|
this._errorMessages = _errorMessages;
|
|
@@ -21,10 +20,10 @@ export class WithErrorMessagePipe {
|
|
|
21
20
|
}
|
|
22
21
|
return value.filter(itm => this._errorMessages[itm]);
|
|
23
22
|
}
|
|
24
|
-
static
|
|
25
|
-
static
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: WithErrorMessagePipe, deps: [{ token: VALIDATION_ERROR_MESSAGES }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
24
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: WithErrorMessagePipe, name: "withErrorMessage" }); }
|
|
26
25
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: WithErrorMessagePipe, decorators: [{
|
|
28
27
|
type: Pipe,
|
|
29
28
|
args: [{ name: 'withErrorMessage' }]
|
|
30
29
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withErrorMessage.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;;AAElE;;GAEG;AAEH,MAAM,OAAO,oBAAoB;
|
|
1
|
+
{"version":3,"file":"withErrorMessage.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;;AAElE;;GAEG;AAEH,MAAM,OAAO,oBAAoB;IAE7B,iEAAiE;IACjE,YAAyD,cAAgC;QAAhC,mBAAc,GAAd,cAAc,CAAkB;IAEzF,CAAC;IAED,sGAAsG;IAEtG;;;OAGG;IACI,SAAS,CAAC,KAAe;QAE5B,IAAG,CAAC,KAAK,EAAE,MAAM,EACjB,CAAC;YACG,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD,CAAC;8GArBQ,oBAAoB,kBAGT,yBAAyB;4GAHpC,oBAAoB;;2FAApB,oBAAoB;kBADhC,IAAI;mBAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC;;0BAIf,MAAM;2BAAC,yBAAyB","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {StringDictionary} from '@jscrpt/common';\n\nimport {VALIDATION_ERROR_MESSAGES} from '../../../../misc/tokens';\n\n/**\n * Filters array of errors with messages\n */\n@Pipe({name: 'withErrorMessage'})\nexport class WithErrorMessagePipe implements PipeTransform\n{\n //######################### constructor #########################\n constructor(@Inject(VALIDATION_ERROR_MESSAGES) protected _errorMessages: StringDictionary)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Filters array of errors with messages\n * @param value - Array of error names\n */\n public transform(value: string[]): string[]\n {\n if(!value?.length)\n {\n return value;\n }\n\n return value.filter(itm => this._errorMessages[itm]);\n }\n}"]}
|
|
@@ -5,17 +5,17 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
* Module that holds form util pipes
|
|
6
6
|
*/
|
|
7
7
|
export class FormPipesModule {
|
|
8
|
-
static
|
|
9
|
-
static
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: FormPipesModule, declarations: [AsFormArrayPipe,
|
|
10
10
|
AsFormControlPipe,
|
|
11
11
|
AsFormGroupPipe,
|
|
12
12
|
GetControlPipe], exports: [AsFormArrayPipe,
|
|
13
13
|
AsFormControlPipe,
|
|
14
14
|
AsFormGroupPipe,
|
|
15
|
-
GetControlPipe] });
|
|
16
|
-
static
|
|
15
|
+
GetControlPipe] }); }
|
|
16
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormPipesModule }); }
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormPipesModule, decorators: [{
|
|
19
19
|
type: NgModule,
|
|
20
20
|
args: [{
|
|
21
21
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formPipes.module.js","sourceRoot":"","sources":["../../../../../../forms/src/modules/formPipes/modules/formPipes.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;;AAE7F;;GAEG;AAkBH,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"formPipes.module.js","sourceRoot":"","sources":["../../../../../../forms/src/modules/formPipes/modules/formPipes.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;;AAE7F;;GAEG;AAkBH,MAAM,OAAO,eAAe;8GAAf,eAAe;+GAAf,eAAe,iBAbpB,eAAe;YACf,iBAAiB;YACjB,eAAe;YACf,cAAc,aAId,eAAe;YACf,iBAAiB;YACjB,eAAe;YACf,cAAc;+GAGT,eAAe;;2FAAf,eAAe;kBAjB3B,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,eAAe;wBACf,iBAAiB;wBACjB,eAAe;wBACf,cAAc;qBACjB;oBACD,OAAO,EACP;wBACI,eAAe;wBACf,iBAAiB;wBACjB,eAAe;wBACf,cAAc;qBACjB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {AsFormArrayPipe, AsFormControlPipe, AsFormGroupPipe, GetControlPipe} from '../pipes';\n\n/**\n * Module that holds form util pipes\n */\n@NgModule(\n{\n declarations:\n [\n AsFormArrayPipe,\n AsFormControlPipe,\n AsFormGroupPipe,\n GetControlPipe,\n ],\n exports:\n [\n AsFormArrayPipe,\n AsFormControlPipe,\n AsFormGroupPipe,\n GetControlPipe,\n ]\n})\nexport class FormPipesModule\n{\n}"]}
|
|
@@ -7,7 +7,6 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Tries to convert `AbstractControl` to `FormArray`
|
|
8
8
|
*/
|
|
9
9
|
export class AsFormArrayPipe {
|
|
10
|
-
_logger;
|
|
11
10
|
//######################### constructors #########################
|
|
12
11
|
constructor(_logger) {
|
|
13
12
|
this._logger = _logger;
|
|
@@ -28,10 +27,10 @@ export class AsFormArrayPipe {
|
|
|
28
27
|
this._logger?.warn('Failed to cast AbstractControl to FormArray');
|
|
29
28
|
return null;
|
|
30
29
|
}
|
|
31
|
-
static
|
|
32
|
-
static
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AsFormArrayPipe, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
31
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: AsFormArrayPipe, name: "asFormArray" }); }
|
|
33
32
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AsFormArrayPipe, decorators: [{
|
|
35
34
|
type: Pipe,
|
|
36
35
|
args: [{ name: 'asFormArray' }]
|
|
37
36
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asFormArray.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"asFormArray.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAExB,kEAAkE;IAClE,YAAgD,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAEhE,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAS,KAA6C,EAAE,UAAgB;QAEpF,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAG,KAAK,YAAY,SAAS,EAC7B,CAAC;YACG,OAAO,KAA4B,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,6CAA6C,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC;IAChB,CAAC;8GA7BQ,eAAe,kBAGQ,MAAM;4GAH7B,eAAe;;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,aAAa,EAAC;;0BAIV,QAAQ;;0BAAI,MAAM;2BAAC,MAAM","sourcesContent":["import {Inject, Optional, Pipe} from '@angular/core';\nimport {AbstractControl, FormArray} from '@angular/forms';\nimport {Logger, LOGGER} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\n\nimport {AsFormArray} from '../../../../misc/types';\n\n/**\n * Tries to convert `AbstractControl` to `FormArray`\n */\n@Pipe({name: 'asFormArray'})\nexport class AsFormArrayPipe\n{\n //######################### constructors #########################\n constructor(@Optional() @Inject(LOGGER) private _logger?: Logger)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Allows casting of `AbstractControl` to `FormArray`\n * @param value - `AbstractControl` to be cast to `FormArray`\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel>(value: AbstractControl<TModel>|null|undefined, _valueHash?: any): FormArray<AbstractControl<TModel>>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(value instanceof FormArray)\n {\n return value as AsFormArray<TModel>;\n }\n\n this._logger?.warn('Failed to cast AbstractControl to FormArray');\n\n return null;\n }\n}"]}
|
|
@@ -7,7 +7,6 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Tries to convert `AbstractControl` to `FormControl`
|
|
8
8
|
*/
|
|
9
9
|
export class AsFormControlPipe {
|
|
10
|
-
_logger;
|
|
11
10
|
//######################### constructors #########################
|
|
12
11
|
constructor(_logger) {
|
|
13
12
|
this._logger = _logger;
|
|
@@ -28,10 +27,10 @@ export class AsFormControlPipe {
|
|
|
28
27
|
this._logger?.warn('Failed to cast AbstractControl to FormControl');
|
|
29
28
|
return null;
|
|
30
29
|
}
|
|
31
|
-
static
|
|
32
|
-
static
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AsFormControlPipe, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
31
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: AsFormControlPipe, name: "asFormControl" }); }
|
|
33
32
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AsFormControlPipe, decorators: [{
|
|
35
34
|
type: Pipe,
|
|
36
35
|
args: [{ name: 'asFormControl' }]
|
|
37
36
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asFormControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AAEH,MAAM,OAAO,iBAAiB;
|
|
1
|
+
{"version":3,"file":"asFormControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AAEH,MAAM,OAAO,iBAAiB;IAE1B,kEAAkE;IAClE,YAAgD,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAEhE,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAS,KAA6C,EAAE,UAAgB;QAEpF,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAG,KAAK,YAAY,WAAW,EAC/B,CAAC;YACG,OAAO,KAA4B,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,+CAA+C,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC;IAChB,CAAC;8GA7BQ,iBAAiB,kBAGM,MAAM;4GAH7B,iBAAiB;;2FAAjB,iBAAiB;kBAD7B,IAAI;mBAAC,EAAC,IAAI,EAAE,eAAe,EAAC;;0BAIZ,QAAQ;;0BAAI,MAAM;2BAAC,MAAM","sourcesContent":["import {Inject, Optional, Pipe} from '@angular/core';\nimport {AbstractControl, FormControl} from '@angular/forms';\nimport {Logger, LOGGER} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\n\n/**\n * Tries to convert `AbstractControl` to `FormControl`\n */\n@Pipe({name: 'asFormControl'})\nexport class AsFormControlPipe\n{\n //######################### constructors #########################\n constructor(@Optional() @Inject(LOGGER) private _logger?: Logger)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Allows casting of `AbstractControl` to `FormControl`\n * @param value - `AbstractControl` to be cast to `FormControl`\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel>(value: AbstractControl<TModel>|null|undefined, _valueHash?: any): FormControl<TModel>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(value instanceof FormControl)\n {\n return value as FormControl<TModel>;\n }\n\n this._logger?.warn('Failed to cast AbstractControl to FormControl');\n\n return null;\n }\n}"]}
|
|
@@ -7,7 +7,6 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Tries to convert `AbstractControl` to `FormGroup`
|
|
8
8
|
*/
|
|
9
9
|
export class AsFormGroupPipe {
|
|
10
|
-
_logger;
|
|
11
10
|
//######################### constructors #########################
|
|
12
11
|
constructor(_logger) {
|
|
13
12
|
this._logger = _logger;
|
|
@@ -28,10 +27,10 @@ export class AsFormGroupPipe {
|
|
|
28
27
|
this._logger?.warn('Failed to cast AbstractControl to FormGroup');
|
|
29
28
|
return null;
|
|
30
29
|
}
|
|
31
|
-
static
|
|
32
|
-
static
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AsFormGroupPipe, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
31
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: AsFormGroupPipe, name: "asFormGroup" }); }
|
|
33
32
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AsFormGroupPipe, decorators: [{
|
|
35
34
|
type: Pipe,
|
|
36
35
|
args: [{ name: 'asFormGroup' }]
|
|
37
36
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asFormGroup.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"asFormGroup.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAExB,kEAAkE;IAClE,YAAgD,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAEhE,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAS,KAA6C,EAAE,UAAgB;QAEpF,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAG,KAAK,YAAY,SAAS,EAC7B,CAAC;YACG,OAAO,KAA4B,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,6CAA6C,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC;IAChB,CAAC;8GA7BQ,eAAe,kBAGQ,MAAM;4GAH7B,eAAe;;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,aAAa,EAAC;;0BAIV,QAAQ;;0BAAI,MAAM;2BAAC,MAAM","sourcesContent":["import {Inject, Optional, Pipe} from '@angular/core';\nimport {AbstractControl, FormGroup} from '@angular/forms';\nimport {Logger, LOGGER} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\n\nimport {AsFormGroup, FormModelGroup} from '../../../../misc/types';\n\n/**\n * Tries to convert `AbstractControl` to `FormGroup`\n */\n@Pipe({name: 'asFormGroup'})\nexport class AsFormGroupPipe\n{\n //######################### constructors #########################\n constructor(@Optional() @Inject(LOGGER) private _logger?: Logger)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Allows casting of `AbstractControl` to `FormGroup`\n * @param value - `AbstractControl` to be cast to `FormGroup`\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel>(value: AbstractControl<TModel>|null|undefined, _valueHash?: any): FormGroup<FormModelGroup<TModel>>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(value instanceof FormGroup)\n {\n return value as AsFormGroup<TModel>;\n }\n\n this._logger?.warn('Failed to cast AbstractControl to FormGroup');\n\n return null;\n }\n}\n"]}
|
|
@@ -21,10 +21,10 @@ export class GetControlPipe {
|
|
|
21
21
|
}
|
|
22
22
|
return value.get(control);
|
|
23
23
|
}
|
|
24
|
-
static
|
|
25
|
-
static
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GetControlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
25
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: GetControlPipe, name: "getControl" }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GetControlPipe, decorators: [{
|
|
28
28
|
type: Pipe,
|
|
29
29
|
args: [{ name: 'getControl' }]
|
|
30
30
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/getControl/getControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAkB,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB;;;;;OAKG;IACI,SAAS,CAAoC,KAA8B,EAAE,OAAa,EAAE,UAAoB;QAEnH,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;
|
|
1
|
+
{"version":3,"file":"getControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/getControl/getControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAkB,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB;;;;;OAKG;IACI,SAAS,CAAoC,KAA8B,EAAE,OAAa,EAAE,UAAoB;QAEnH,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAG,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,EACjE,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,OAAiB,CAAC,CAAC;IACxC,CAAC;8GArBQ,cAAc;4GAAd,cAAc;;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {AbstractControl, FormArray, FormGroup} from '@angular/forms';\nimport {isBlank} from '@jscrpt/common';\n\n/**\n * Gets control from `FormGroup` or `FormArray`\n */\n@Pipe({name: 'getControl'})\nexport class GetControlPipe implements PipeTransform\n{\n /**\n * Gets control from `FormGroup` or `FormArray`\n * @param value - FormGroup which contains requested control\n * @param control - Control name to be obtained\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel, TKey extends keyof TModel>(value: AbstractControl<TModel>, control: TKey, _valueHash?: unknown): AbstractControl<TModel[TKey]>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(!(value instanceof FormArray) && !(value instanceof FormGroup))\n {\n return null;\n }\n\n return value.get(control as string);\n }\n}"]}
|
|
@@ -1,41 +1,30 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
2
|
import { HasErrorDirective } from '../directives/hasError/hasError.directive';
|
|
4
3
|
import { GroupHasErrorDirective } from '../directives/groupHasError/groupHasError.directive';
|
|
5
4
|
import { GroupHasErrorContainerDirective, ValidationErrorsContainerDirective } from '../directives';
|
|
6
|
-
import { DefaultValidationErrorsComponent, DefaultValidationErrorsContainerComponent, ReservedSpaceValidationErrorsContainerComponent } from '../components';
|
|
7
5
|
import * as i0 from "@angular/core";
|
|
8
6
|
/**
|
|
9
7
|
* Module for input validation directives
|
|
10
8
|
*/
|
|
11
9
|
export class HasErrorModule {
|
|
12
|
-
static
|
|
13
|
-
static
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HasErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: HasErrorModule, imports: [HasErrorDirective,
|
|
14
12
|
GroupHasErrorDirective,
|
|
15
13
|
GroupHasErrorContainerDirective,
|
|
16
|
-
ValidationErrorsContainerDirective,
|
|
17
|
-
DefaultValidationErrorsComponent,
|
|
18
|
-
DefaultValidationErrorsContainerComponent,
|
|
19
|
-
ReservedSpaceValidationErrorsContainerComponent], imports: [CommonModule], exports: [HasErrorDirective,
|
|
14
|
+
ValidationErrorsContainerDirective], exports: [HasErrorDirective,
|
|
20
15
|
GroupHasErrorDirective,
|
|
21
16
|
GroupHasErrorContainerDirective,
|
|
22
|
-
ValidationErrorsContainerDirective] });
|
|
23
|
-
static
|
|
17
|
+
ValidationErrorsContainerDirective] }); }
|
|
18
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HasErrorModule }); }
|
|
24
19
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HasErrorModule, decorators: [{
|
|
26
21
|
type: NgModule,
|
|
27
22
|
args: [{
|
|
28
23
|
imports: [
|
|
29
|
-
CommonModule,
|
|
30
|
-
],
|
|
31
|
-
declarations: [
|
|
32
24
|
HasErrorDirective,
|
|
33
25
|
GroupHasErrorDirective,
|
|
34
26
|
GroupHasErrorContainerDirective,
|
|
35
27
|
ValidationErrorsContainerDirective,
|
|
36
|
-
DefaultValidationErrorsComponent,
|
|
37
|
-
DefaultValidationErrorsContainerComponent,
|
|
38
|
-
ReservedSpaceValidationErrorsContainerComponent,
|
|
39
28
|
],
|
|
40
29
|
exports: [
|
|
41
30
|
HasErrorDirective,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasError.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/hasError.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"hasError.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/hasError.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,iBAAiB,EAAC,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAC,+BAA+B,EAAE,kCAAkC,EAAC,MAAM,eAAe,CAAC;;AAElG;;GAEG;AAkBH,MAAM,OAAO,cAAc;8GAAd,cAAc;+GAAd,cAAc,YAbnB,iBAAiB;YACjB,sBAAsB;YACtB,+BAA+B;YAC/B,kCAAkC,aAIlC,iBAAiB;YACjB,sBAAsB;YACtB,+BAA+B;YAC/B,kCAAkC;+GAG7B,cAAc;;2FAAd,cAAc;kBAjB1B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,iBAAiB;wBACjB,sBAAsB;wBACtB,+BAA+B;wBAC/B,kCAAkC;qBACrC;oBACD,OAAO,EACP;wBACI,iBAAiB;wBACjB,sBAAsB;wBACtB,+BAA+B;wBAC/B,kCAAkC;qBACrC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {HasErrorDirective} from '../directives/hasError/hasError.directive';\nimport {GroupHasErrorDirective} from '../directives/groupHasError/groupHasError.directive';\nimport {GroupHasErrorContainerDirective, ValidationErrorsContainerDirective} from '../directives';\n\n/**\n * Module for input validation directives\n */\n@NgModule(\n{\n imports:\n [\n HasErrorDirective,\n GroupHasErrorDirective,\n GroupHasErrorContainerDirective,\n ValidationErrorsContainerDirective,\n ],\n exports: \n [\n HasErrorDirective,\n GroupHasErrorDirective,\n GroupHasErrorContainerDirective,\n ValidationErrorsContainerDirective,\n ]\n})\nexport class HasErrorModule\n{\n}"]}
|
|
@@ -8,17 +8,17 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* Module for number input components, pipes and directives
|
|
9
9
|
*/
|
|
10
10
|
export class NumberInputModule {
|
|
11
|
-
static
|
|
12
|
-
static
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NumberInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: NumberInputModule, declarations: [MaxValueNumberValidatorDirective,
|
|
13
13
|
MinValueNumberValidatorDirective,
|
|
14
14
|
NumberInputControlValueAccessor,
|
|
15
15
|
NumberInputValidatorDirective], exports: [MaxValueNumberValidatorDirective,
|
|
16
16
|
MinValueNumberValidatorDirective,
|
|
17
17
|
NumberInputControlValueAccessor,
|
|
18
|
-
NumberInputValidatorDirective] });
|
|
19
|
-
static
|
|
18
|
+
NumberInputValidatorDirective] }); }
|
|
19
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NumberInputModule }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NumberInputModule, decorators: [{
|
|
22
22
|
type: NgModule,
|
|
23
23
|
args: [{
|
|
24
24
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberInput.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/numberInput.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,+BAA+B,EAAC,MAAM,qEAAqE,CAAC;AACpH,OAAO,EAAC,6BAA6B,EAAC,MAAM,0DAA0D,CAAC;;AAEvG;;GAEG;AAkBH,MAAM,OAAO,iBAAiB;
|
|
1
|
+
{"version":3,"file":"numberInput.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/numberInput.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,+BAA+B,EAAC,MAAM,qEAAqE,CAAC;AACpH,OAAO,EAAC,6BAA6B,EAAC,MAAM,0DAA0D,CAAC;;AAEvG;;GAEG;AAkBH,MAAM,OAAO,iBAAiB;8GAAjB,iBAAiB;+GAAjB,iBAAiB,iBAbtB,gCAAgC;YAChC,gCAAgC;YAChC,+BAA+B;YAC/B,6BAA6B,aAI7B,gCAAgC;YAChC,gCAAgC;YAChC,+BAA+B;YAC/B,6BAA6B;+GAGxB,iBAAiB;;2FAAjB,iBAAiB;kBAjB7B,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,gCAAgC;wBAChC,gCAAgC;wBAChC,+BAA+B;wBAC/B,6BAA6B;qBAChC;oBACD,OAAO,EACP;wBACI,gCAAgC;wBAChC,gCAAgC;wBAChC,+BAA+B;wBAC/B,6BAA6B;qBAChC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {MaxValueNumberValidatorDirective} from '../directives/numberInput/maxValueNumberValidator.directive';\nimport {MinValueNumberValidatorDirective} from '../directives/numberInput/minValueNumberValidator.directive';\nimport {NumberInputControlValueAccessor} from '../directives/numberInput/numberInputControlValueAccessor.directive';\nimport {NumberInputValidatorDirective} from '../directives/numberInput/numberInputValidator.directive';\n\n/**\n * Module for number input components, pipes and directives\n */\n@NgModule(\n{\n declarations: \n [\n MaxValueNumberValidatorDirective,\n MinValueNumberValidatorDirective,\n NumberInputControlValueAccessor,\n NumberInputValidatorDirective\n ],\n exports:\n [\n MaxValueNumberValidatorDirective,\n MinValueNumberValidatorDirective,\n NumberInputControlValueAccessor,\n NumberInputValidatorDirective\n ]\n})\nexport class NumberInputModule\n{\n}"]}
|
|
@@ -19,13 +19,6 @@ const defaultErrorMessages = {
|
|
|
19
19
|
* Service used for extracting error messages from form control
|
|
20
20
|
*/
|
|
21
21
|
export class ErrorMessagesExtractor {
|
|
22
|
-
_stringLocalization;
|
|
23
|
-
_ignoredValidationErrors;
|
|
24
|
-
//######################### protected fields #########################
|
|
25
|
-
/**
|
|
26
|
-
* Dictionary with error names that have defined message
|
|
27
|
-
*/
|
|
28
|
-
_errorMessages;
|
|
29
22
|
//######################### constructor #########################
|
|
30
23
|
constructor(_stringLocalization, _ignoredValidationErrors, globalErrorMessages) {
|
|
31
24
|
this._stringLocalization = _stringLocalization;
|
|
@@ -69,10 +62,10 @@ export class ErrorMessagesExtractor {
|
|
|
69
62
|
});
|
|
70
63
|
return result;
|
|
71
64
|
}
|
|
72
|
-
static
|
|
73
|
-
static
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessagesExtractor, deps: [{ token: STRING_LOCALIZATION }, { token: IGNORED_VALIDATION_ERRORS }, { token: VALIDATION_ERROR_MESSAGES, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
66
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessagesExtractor, providedIn: 'root' }); }
|
|
74
67
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ErrorMessagesExtractor, decorators: [{
|
|
76
69
|
type: Injectable,
|
|
77
70
|
args: [{ providedIn: 'root' }]
|
|
78
71
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessagesExtractor.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAmB,MAAM,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAC,yBAAyB,EAAE,yBAAyB,EAAC,MAAM,mBAAmB,CAAC;;AAGvF;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,QAAQ,EAAE,oBAAoB;IAC9B,MAAM,EAAE,uBAAuB;IAC/B,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,qBAAqB;IAC/B,QAAQ,EAAE,mBAAmB;IAC7B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,oBAAoB;CAClC,CAAC;AAEF;;GAEG;AAEH,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"errorMessagesExtractor.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAmB,MAAM,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAC,yBAAyB,EAAE,yBAAyB,EAAC,MAAM,mBAAmB,CAAC;;AAGvF;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,QAAQ,EAAE,oBAAoB;IAC9B,MAAM,EAAE,uBAAuB;IAC/B,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,qBAAqB;IAC/B,QAAQ,EAAE,mBAAmB;IAC7B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,oBAAoB;CAClC,CAAC;AAEF;;GAEG;AAEH,MAAM,OAAO,sBAAsB;IAS/B,iEAAiE;IACjE,YAAmD,mBAAuC,EACjC,wBAAkC,EAChC,mBAAsC;QAF9C,wBAAmB,GAAnB,mBAAmB,CAAoB;QACjC,6BAAwB,GAAxB,wBAAwB,CAAU;QAGvF,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;IACtF,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,SAAS,CAAC,OAAoB,EAAE,QAA2B;QAE9D,MAAM,aAAa,GAAqB,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAExF,yBAAyB;QACzB,IAAG,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAC9B,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,MAAM,GACZ;YACI,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACjG,aAAa,EAAE,EAAE;SACpB,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAE1B,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAExC,oCAAoC;YACpC,IAAG,aAAa,CAAC,KAAK,CAAC,EACvB,CAAC;gBACG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YAClG,CAAC;YACD,qEAAqE;iBAChE,IAAG,QAAQ,CAAC,SAAS,CAAC,EAC3B,CAAC;gBACG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzC,CAAC;YACD,0EAA0E;iBACrE,IAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAChC,CAAC;gBACG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAEzB,IAAG,QAAQ,CAAC,QAAQ,CAAC,EACrB,CAAC;wBACG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtF,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAClB,CAAC;8GApEQ,sBAAsB,kBAUX,mBAAmB,aACnB,yBAAyB,aACzB,yBAAyB;kHAZpC,sBAAsB,cADV,MAAM;;2FAClB,sBAAsB;kBADlC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BAWf,MAAM;2BAAC,mBAAmB;;0BAC1B,MAAM;2BAAC,yBAAyB;;0BAChC,MAAM;2BAAC,yBAAyB;;0BAAG,QAAQ","sourcesContent":["import {Injectable, Inject, Optional} from '@angular/core';\nimport {FormControl} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {StringDictionary, extend, isString} from '@jscrpt/common';\n\nimport {IGNORED_VALIDATION_ERRORS, VALIDATION_ERROR_MESSAGES} from '../../misc/tokens';\nimport {ValidationErrorsResult} from './errorMessagesExtractor.interface';\n\n/**\n * Default error messages displayed\n */\nconst defaultErrorMessages: StringDictionary =\n{\n required: 'Field is required.',\n number: 'Value must be number.',\n pattern: 'Value is not valid.',\n minValue: 'Value is too small.',\n maxValue: 'Value is too big.',\n minlength: 'Value is short.',\n maxlength: 'Value is too long.'\n};\n\n/**\n * Service used for extracting error messages from form control\n */\n@Injectable({providedIn: 'root'})\nexport class ErrorMessagesExtractor\n{\n //######################### protected fields #########################\n\n /**\n * Dictionary with error names that have defined message\n */\n protected _errorMessages: StringDictionary;\n\n //######################### constructor #########################\n constructor(@Inject(STRING_LOCALIZATION) protected _stringLocalization: StringLocalization,\n @Inject(IGNORED_VALIDATION_ERRORS) protected _ignoredValidationErrors: string[],\n @Inject(VALIDATION_ERROR_MESSAGES) @Optional() globalErrorMessages?: StringDictionary)\n {\n this._errorMessages = extend(true, {}, defaultErrorMessages, globalErrorMessages);\n }\n\n //######################### public methods #########################\n\n /**\n * Gets validation errors result for provided control, or null of no errors are present\n * @param control - Form control instance that should be inspected for errors\n * @param messages - Object containing error messages that should patch existing error messages\n */\n public getErrors(control: FormControl, messages?: StringDictionary): ValidationErrorsResult\n {\n const errorMessages: StringDictionary = extend(true, {}, this._errorMessages, messages);\n\n //no control or no errors\n if(!control || !control.errors)\n {\n return null;\n }\n\n const result: ValidationErrorsResult =\n {\n errors: Object.keys(control.errors).filter(itm => this._ignoredValidationErrors.indexOf(itm) < 0),\n errorMessages: []\n };\n\n result.errors.forEach(error =>\n {\n const errorData = control.errors[error];\n \n //error message is present for error\n if(errorMessages[error])\n {\n result.errorMessages.push(this._stringLocalization.get(errorMessages[error], control.errors));\n }\n //display error data if it is string and there is missing translation\n else if(isString(errorData))\n {\n result.errorMessages.push(errorData);\n }\n //error data are array of strings, each string is considered error message\n else if(Array.isArray(errorData))\n {\n errorData.forEach(errorItm =>\n {\n if(isString(errorItm))\n {\n result.errorMessages.push(this._stringLocalization.get(errorItm, control.errors));\n }\n });\n }\n });\n\n return result;\n }\n}"]}
|
|
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
* Instance of form model builder, that creates `FormGroup` from form model, automatically providing `Injector`
|
|
6
6
|
*/
|
|
7
7
|
export class FormModelBuilder {
|
|
8
|
-
_injector;
|
|
9
8
|
//######################### constructor #########################
|
|
10
9
|
constructor(_injector) {
|
|
11
10
|
this._injector = _injector;
|
|
@@ -22,10 +21,10 @@ export class FormModelBuilder {
|
|
|
22
21
|
injector: this._injector,
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
|
-
static
|
|
26
|
-
static
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormModelBuilder, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
25
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormModelBuilder }); }
|
|
27
26
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormModelBuilder, decorators: [{
|
|
29
28
|
type: Injectable
|
|
30
29
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
31
30
|
//# sourceMappingURL=formModelBuilder.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formModelBuilder.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/formModelBuilder/formModelBuilder.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;;AAGpD;;GAEG;AAEH,MAAM,OAAO,gBAAgB;
|
|
1
|
+
{"version":3,"file":"formModelBuilder.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/formModelBuilder/formModelBuilder.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;;AAGpD;;GAEG;AAEH,MAAM,OAAO,gBAAgB;IAEzB,iEAAiE;IACjE,YAAsB,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;IAEzC,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,KAAK,CAA8C,KAAa,EAAE,IAAY;QAEjF,OAAO,cAAc,CAAgB,KAAK,EACL;YACI,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI,CAAC,SAAS;SAC3B,CAAC,CAAC;IAC5C,CAAC;8GArBQ,gBAAgB;kHAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAD5B,UAAU","sourcesContent":["import {Injectable, Injector} from '@angular/core';\nimport {FormGroup} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {buildFormModel} from '../../misc/formModel';\nimport {FormModelGroup} from '../../misc/types';\n\n/**\n * Instance of form model builder, that creates `FormGroup` from form model, automatically providing `Injector`\n */\n@Injectable()\nexport class FormModelBuilder\n{\n //######################### constructor #########################\n constructor(protected _injector: Injector)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Builds form from decorated model, only for properties with non `undefined` value\n * @param model - Model that can be decorated for enhancing created form group with validation and so on\n * @param args - Object storing arguments from owning component for customization\n */\n public build<TModel, TArgs extends Dictionary<any> = any>(model: TModel, args?: TArgs): FormGroup<FormModelGroup<TModel>>\n {\n return buildFormModel<TModel, TArgs>(model,\n {\n ...args,\n injector: this._injector,\n });\n }\n}"]}
|