@anglr/common 19.0.0-beta.20231109094203 → 19.0.0
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 +18 -0
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +6 -7
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +5 -6
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +5 -6
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -5
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +5 -6
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +4 -5
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +6 -7
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +6 -7
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +6 -7
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +5 -6
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +4 -5
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +6 -7
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +6 -7
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +6 -7
- 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 +6 -7
- 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 +5 -6
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +5 -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 +6 -7
- 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 -6
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +6 -7
- 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 +6 -7
- 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 +6 -7
- 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 +4 -5
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/hasError.module.js +5 -6
- package/es2022/forms/src/modules/hasError.module.js.map +1 -1
- package/es2022/forms/src/modules/numberInput.module.js +5 -6
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/modules/requiredClass.module.js +5 -6
- package/es2022/forms/src/modules/requiredClass.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +6 -7
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +5 -6
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
- package/es2022/forms/src/services/submitted/submitted.service.js +4 -5
- package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +6 -7
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +5 -6
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +5 -6
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +6 -7
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +4 -5
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +6 -7
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +5 -6
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +5 -6
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +5 -6
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +5 -6
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/material/src/modules/movableTitledDialog.module.js +5 -6
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +5 -6
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +6 -7
- package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
- package/es2022/moment/src/modules/moment.module.js +5 -6
- package/es2022/moment/src/modules/moment.module.js.map +1 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +4 -5
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +4 -5
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js +5 -6
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouter.js +5 -6
- package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouterData.js +5 -6
- package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +4 -5
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +4 -5
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +6 -7
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +6 -7
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +5 -6
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +5 -7
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +6 -7
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -6
- package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +4 -5
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +4 -5
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +4 -5
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +6 -7
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
- package/es2022/src/modules/commonDynamic.module.js +5 -6
- package/es2022/src/modules/commonDynamic.module.js.map +1 -1
- package/es2022/src/modules/commonLocalize.module.js +5 -6
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +5 -6
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +5 -6
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +5 -6
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +4 -5
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/logger/components/console/console.component.js +5 -6
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +4 -5
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +5 -6
- 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/logger/logger.service.js +5 -6
- package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/restSink.options.js +5 -6
- package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerOptions.js +4 -5
- package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +6 -7
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +5 -6
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +5 -6
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +6 -7
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +5 -6
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +5 -6
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +10 -16
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +5 -6
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +6 -7
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +5 -6
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -6
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -5
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +4 -5
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +6 -7
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -5
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -5
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +4 -5
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/localize/localize.pipe.js +6 -7
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +8 -6
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -5
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +6 -7
- package/es2022/src/services/cookies/cookies.service.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +6 -7
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +7 -8
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/statusCode/statusCode.service.js +4 -5
- package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +4 -5
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +4 -5
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +7 -8
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +6 -7
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/package.json +41 -42
- package/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.d.ts.map +1 -1
- package/src/modules/progressIndicator/services/progressIndicator.service.d.ts +2 -3
- package/src/modules/progressIndicator/services/progressIndicator.service.d.ts.map +1 -1
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +1 -1
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts.map +1 -1
- package/styles/themes/dark.scss +6 -0
- package/styles/themes/light.scss +0 -6
- package/version.bak +1 -1
|
@@ -14,7 +14,7 @@ const MIN_NUMBER_VALIDATOR = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Directive injecting checking for number min value validator
|
|
16
16
|
*/
|
|
17
|
-
class MinValueNumberValidatorDirective {
|
|
17
|
+
export class MinValueNumberValidatorDirective {
|
|
18
18
|
//######################### private fields #########################
|
|
19
19
|
/**
|
|
20
20
|
* Current min value that is allowed
|
|
@@ -60,20 +60,19 @@ class MinValueNumberValidatorDirective {
|
|
|
60
60
|
validate(control) {
|
|
61
61
|
return this._validator(control);
|
|
62
62
|
}
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: MinValueNumberValidatorDirective, deps: [{ token: 'minValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
64
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: MinValueNumberValidatorDirective, selector: "input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]", inputs: { minValue: "minValue" }, providers: [MIN_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
|
|
68
67
|
type: Directive,
|
|
69
68
|
args: [{
|
|
70
69
|
selector: 'input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]',
|
|
71
70
|
providers: [MIN_NUMBER_VALIDATOR]
|
|
72
71
|
}]
|
|
73
|
-
}], ctorParameters:
|
|
72
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
74
73
|
type: Attribute,
|
|
75
74
|
args: ['minValue']
|
|
76
|
-
}] }]
|
|
75
|
+
}] }], propDecorators: { minValue: [{
|
|
77
76
|
type: Input
|
|
78
77
|
}] } });
|
|
79
78
|
//# sourceMappingURL=minValueNumberValidator.directive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minValueNumberValidator.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/numberInput/minValueNumberValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAA6C,MAAM,eAAe,CAAC;AAClH,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;;AAEjD;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,gCAAgC,CAAC;IAC/D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;
|
|
1
|
+
{"version":3,"file":"minValueNumberValidator.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/numberInput/minValueNumberValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAA6C,MAAM,eAAe,CAAC;AAClH,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;;AAEjD;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,gCAAgC,CAAC;IAC/D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,gCAAgC;IAEzC,oEAAoE;IAEpE;;OAEG;IACK,SAAS,CAAc;IAE/B;;OAEG;IACK,UAAU,CAAc;IAEhC;;OAEG;IACK,YAAY,GAAY,KAAK,CAAC;IAEtC,gFAAgF;IAChF;;OAEG;IAEI,QAAQ,CAAU;IAEzB,iEAAiE;IACjE,YAAmC,QAAgB;QAE/C,IAAI,KAAK,CAAC;QAEV,IAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EACpG;YACI,KAAK,GAAG,IAAI,CAAC;SAChB;QAED,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,kGAAkG;IAE3F,WAAW,CAAC,OAAsB;QAErC,IAAG,CAAC,IAAI,CAAC,YAAY,EACrB;YACI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YAEzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACpD;QAED,IAAI,UAAU,IAAI,OAAO,EACzB;YACI,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAS,IAAI,CAAC,QAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxG;IACL,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;uGAlEQ,gCAAgC,kBA2BlB,UAAU;2FA3BxB,gCAAgC,2KAF9B,CAAC,oBAAoB,CAAC;;2FAExB,gCAAgC;kBAL5C,SAAS;mBACV;oBACI,QAAQ,EAAE,gHAAgH;oBAC1H,SAAS,EAAE,CAAC,oBAAoB,CAAC;iBACpC;;0BA4BgB,SAAS;2BAAC,UAAU;yCAH1B,QAAQ;sBADd,KAAK","sourcesContent":["import {forwardRef, Directive, Attribute, Input, ExistingProvider, OnChanges, SimpleChanges} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\nimport {isBlank, isPresent} from '@jscrpt/common';\n\nimport {Validators} from '../../misc/validators';\n\n/**\n * Validator that is injected with directive MinValueNumberValidatorDirective\n */\nconst MIN_NUMBER_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinValueNumberValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting checking for number min value validator\n */\n@Directive(\n{\n selector: 'input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]',\n providers: [MIN_NUMBER_VALIDATOR]\n})\nexport class MinValueNumberValidatorDirective implements Validator, OnChanges\n{\n //######################### private fields #########################\n\n /**\n * Current min value that is allowed\n */\n private _minValue: number|null;\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn;\n\n /**\n * Indication whether validator was initialized\n */\n private _initialized: boolean = false;\n\n //######################### public properties - inputs #########################\n /**\n * Bound min value that is allowed, which overrides value set to attribute minValue\n */\n @Input()\n public minValue?: number;\n\n //######################### constructor #########################\n constructor(@Attribute('minValue') minValue: string)\n {\n let value;\n\n if(isBlank(minValue) || minValue.length < 1 || isNaN(value = parseFloat(minValue.replace(',', '.'))))\n {\n value = null;\n }\n\n this._minValue = value;\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(!this._initialized)\n {\n this._initialized = true;\n\n this._validator = Validators.min(this._minValue);\n }\n\n if ('minValue' in changes)\n {\n this._validator = Validators.min(isPresent(this.minValue) ? <number>this.minValue! : this._minValue);\n }\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
|
package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js
CHANGED
|
@@ -13,7 +13,7 @@ const NUMBER_INPUT_VALUE_ACCESSOR = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Value accessor for getting and setting values for number inputs
|
|
15
15
|
*/
|
|
16
|
-
class NumberInputControlValueAccessor {
|
|
16
|
+
export class NumberInputControlValueAccessor {
|
|
17
17
|
_renderer;
|
|
18
18
|
_elementRef;
|
|
19
19
|
//######################### public properties #########################
|
|
@@ -68,11 +68,10 @@ class NumberInputControlValueAccessor {
|
|
|
68
68
|
setDisabledState(isDisabled) {
|
|
69
69
|
this.disabled = isDisabled;
|
|
70
70
|
}
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
72
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: NumberInputControlValueAccessor, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" }, properties: { "disabled": "disabled" } }, providers: [NUMBER_INPUT_VALUE_ACCESSOR], ngImport: i0 });
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
|
|
76
75
|
type: Directive,
|
|
77
76
|
args: [{
|
|
78
77
|
selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
|
|
@@ -84,5 +83,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
84
83
|
'[disabled]': 'disabled',
|
|
85
84
|
}
|
|
86
85
|
}]
|
|
87
|
-
}], ctorParameters:
|
|
86
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }] });
|
|
88
87
|
//# sourceMappingURL=numberInputControlValueAccessor.directive.js.map
|
package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberInputControlValueAccessor.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/numberInput/numberInputControlValueAccessor.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AACH,MAAM,2BAA2B,GACjC;IACI,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;IAC9D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;
|
|
1
|
+
{"version":3,"file":"numberInputControlValueAccessor.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/numberInput/numberInputControlValueAccessor.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AACH,MAAM,2BAA2B,GACjC;IACI,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;IAC9D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAaH,MAAM,OAAO,+BAA+B;IAiBpB;IAA8B;IAflD,uEAAuE;IAEhE,QAAQ,GAAG,CAAC,CAAM,EAAE,EAAE,GAAE,CAAC,CAAC;IAEjC;;OAEG;IACI,SAAS,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAE5B;;OAEG;IACI,QAAQ,GAAY,KAAK,CAAC;IAEjC,iEAAiE;IACjE,YAAoB,SAAoB,EAAU,WAAuB;QAArD,cAAS,GAAT,SAAS,CAAW;QAAU,gBAAW,GAAX,WAAW,CAAY;IAEzE,CAAC;IAED,6GAA6G;IAE7G;;OAEG;IACI,UAAU,CAAC,KAAU;QAExB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACI,gBAAgB,CAAC,EAAsB;QAE1C,IAAI,CAAC,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;YAE9B,IAAG,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,EAChC;gBACI,EAAE,CAAC,IAAI,CAAC,CAAC;gBAET,OAAO;aACV;YAED,qBAAqB;YACrB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAElC,IAAG,CAAC,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,EACzC;gBACI,EAAE,CAAC,GAAG,CAAC,CAAC;gBAER,OAAO;aACV;YAED,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,EAAa;QAElC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,gBAAgB,CAAE,UAAmB;QAExC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;IAC/B,CAAC;uGAzEQ,+BAA+B;2FAA/B,+BAA+B,wRAT7B,CAAC,2BAA2B,CAAC;;2FAS/B,+BAA+B;kBAZ3C,SAAS;mBACV;oBACI,QAAQ,EAAE,kFAAkF;oBAC5F,SAAS,EAAE,CAAC,2BAA2B,CAAC;oBACxC,IAAI,EACJ;wBACI,UAAU,EAAE,+BAA+B;wBAC3C,SAAS,EAAE,+BAA+B;wBAC1C,QAAQ,EAAE,aAAa;wBACvB,YAAY,EAAE,UAAU;qBAC3B;iBACJ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Renderer2, ElementRef} from '@angular/core';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';\nimport {isBlank} from '@jscrpt/common';\n\n/**\n * Value accessor provider for number inputs\n */\nconst NUMBER_INPUT_VALUE_ACCESSOR = <ExistingProvider>\n{\n provide: NG_VALUE_ACCESSOR, \n useExisting: forwardRef(() => NumberInputControlValueAccessor), \n multi: true\n};\n\n/**\n * Value accessor for getting and setting values for number inputs\n */\n@Directive(\n{\n selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',\n providers: [NUMBER_INPUT_VALUE_ACCESSOR],\n host: \n {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()',\n '[disabled]': 'disabled',\n }\n})\nexport class NumberInputControlValueAccessor implements ControlValueAccessor\n{\n //######################### public properties #########################\n \n public onChange = (_: any) => {};\n \n /**\n * Method that is called when picker was touched\n */\n public onTouched = () => {};\n\n /**\n * Indication whether is number input disabled\n */\n public disabled: boolean = false;\n \n //######################### constructor #########################\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef)\n {\n }\n\n //######################### public methods - implementation of ControlValueAccessor #########################\n\n /**\n * @inheritdoc\n */\n public writeValue(value: any): void\n {\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);\n }\n\n /**\n * @inheritdoc\n */\n public registerOnChange(fn: (data: any) => any): void\n {\n this.onChange = (value: string) => \n { \n if(isBlank(value) || value == '')\n {\n fn(null);\n \n return;\n }\n \n //removing all spaces\n value = value.replace(/\\s+/g, '');\n \n if(!/^[+-]?\\d+(?:[,.]\\d+)?$/g.test(value))\n {\n fn(NaN);\n \n return;\n }\n \n fn(parseFloat(value.replace(',', '.'))); \n };\n }\n\n /**\n * @inheritdoc\n */\n public registerOnTouched(fn: () => any): void\n {\n this.onTouched = fn;\n }\n\n /**\n * @inheritdoc\n */\n public setDisabledState?(isDisabled: boolean): void\n {\n this.disabled = isDisabled;\n }\n}\n"]}
|
|
@@ -13,7 +13,7 @@ const NUMBER_VALIDATOR = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Is number directive injecting checking for number validator
|
|
15
15
|
*/
|
|
16
|
-
class NumberInputValidatorDirective {
|
|
16
|
+
export class NumberInputValidatorDirective {
|
|
17
17
|
//######################### public methods - implementation of Validator #########################
|
|
18
18
|
/**
|
|
19
19
|
* Validates input and returns validation result
|
|
@@ -23,11 +23,10 @@ class NumberInputValidatorDirective {
|
|
|
23
23
|
validate(control) {
|
|
24
24
|
return Validators.number(control);
|
|
25
25
|
}
|
|
26
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: NumberInputValidatorDirective, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", providers: [NUMBER_VALIDATOR], ngImport: i0 });
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
|
|
31
30
|
type: Directive,
|
|
32
31
|
args: [{
|
|
33
32
|
selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberInputValidator.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/numberInput/numberInputValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,aAAa,EAA+C,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;;AAEjD;;GAEG;AACH,MAAM,gBAAgB,GACtB;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;IAC5D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;
|
|
1
|
+
{"version":3,"file":"numberInputValidator.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/numberInput/numberInputValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,aAAa,EAA+C,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;;AAEjD;;GAEG;AACH,MAAM,gBAAgB,GACtB;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;IAC5D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,6BAA6B;IAEtC,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;uGAZQ,6BAA6B;2FAA7B,6BAA6B,2GAF3B,CAAC,gBAAgB,CAAC;;2FAEpB,6BAA6B;kBALzC,SAAS;mBACV;oBACI,QAAQ,EAAE,kFAAkF;oBAC5F,SAAS,EAAE,CAAC,gBAAgB,CAAC;iBAChC","sourcesContent":["import {ExistingProvider, forwardRef, Directive} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../misc/validators';\n\n/**\n * Validator that is injected with directive NumberInputValidatorDirective\n */\nconst NUMBER_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NumberInputValidatorDirective),\n multi: true\n};\n\n/**\n * Is number directive injecting checking for number validator\n */\n@Directive(\n{\n selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',\n providers: [NUMBER_VALIDATOR]\n})\nexport class NumberInputValidatorDirective implements Validator\n{\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return Validators.number(control);\n }\n}"]}
|
|
@@ -6,7 +6,7 @@ import * as i1 from "@angular/forms";
|
|
|
6
6
|
/**
|
|
7
7
|
* Required class directive adds required class to element
|
|
8
8
|
*/
|
|
9
|
-
class RequiredClassDirective {
|
|
9
|
+
export class RequiredClassDirective {
|
|
10
10
|
_formControl;
|
|
11
11
|
_formControlName;
|
|
12
12
|
_changeDetector;
|
|
@@ -40,20 +40,19 @@ class RequiredClassDirective {
|
|
|
40
40
|
this._changeDetector.detectChanges();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: RequiredClassDirective, deps: [{ token: i1.FormControlDirective, optional: true }, { token: i1.FormControlName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: RequiredClassDirective, selector: "[requiredClass]", host: { properties: { "class.required": "this.required" } }, ngImport: i0 });
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RequiredClassDirective, decorators: [{
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: RequiredClassDirective, decorators: [{
|
|
48
47
|
type: Directive,
|
|
49
48
|
args: [{
|
|
50
49
|
selector: '[requiredClass]'
|
|
51
50
|
}]
|
|
52
|
-
}], ctorParameters:
|
|
51
|
+
}], ctorParameters: () => [{ type: i1.FormControlDirective, decorators: [{
|
|
53
52
|
type: Optional
|
|
54
53
|
}] }, { type: i1.FormControlName, decorators: [{
|
|
55
54
|
type: Optional
|
|
56
|
-
}] }, { type: i0.ChangeDetectorRef }]
|
|
55
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { required: [{
|
|
57
56
|
type: HostBinding,
|
|
58
57
|
args: ['class.required']
|
|
59
58
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requiredClass.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/requiredClass/requiredClass.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAiB,WAAW,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACjG,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;;;AAElF,oCAAoC;AAEpC;;GAEG;
|
|
1
|
+
{"version":3,"file":"requiredClass.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/requiredClass/requiredClass.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAiB,WAAW,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACjG,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;;;AAElF,oCAAoC;AAEpC;;GAEG;AAKH,MAAM,OAAO,sBAAsB;IAqBC;IACA;IACZ;IArBpB,wEAAwE;IAExE;;OAEG;IACH,IAAY,OAAO;QAEf,OAAO,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxH,CAAC;IAED,8EAA8E;IAE9E;;OAEG;IAEI,QAAQ,GAAY,KAAK,CAAC;IAEjC,iEAAiE;IACjE,YAAgC,YAAkC,EAClC,gBAAiC,EAC7C,eAAkC;QAFtB,iBAAY,GAAZ,YAAY,CAAsB;QAClC,qBAAgB,GAAhB,gBAAgB,CAAiB;QAC7C,oBAAe,GAAf,eAAe,CAAmB;IAEtD,CAAC;IAED,sGAAsG;IAEtG;;OAEG;IACI,eAAe;QAElB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,IAAG,OAAO,IAAI,OAAO,CAAC,SAAS,EAC/B;YACI,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAClE,IAAI,CAAC,QAAQ,GAAG,gBAAgB,IAAI,gBAAgB,CAAC,QAAQ,CAAC;YAE9D,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;SACxC;IACL,CAAC;uGA3CQ,sBAAsB;2FAAtB,sBAAsB;;2FAAtB,sBAAsB;kBAJlC,SAAS;mBACV;oBACI,QAAQ,EAAE,iBAAiB;iBAC9B;;0BAsBgB,QAAQ;;0BACR,QAAQ;yEAJd,QAAQ;sBADd,WAAW;uBAAC,gBAAgB","sourcesContent":["import {Directive, Optional, AfterViewInit, HostBinding, ChangeDetectorRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl} from '@angular/forms';\n\n//TODO: reworking using hasValidator\n\n/**\n * Required class directive adds required class to element\n */\n@Directive(\n{\n selector: '[requiredClass]'\n})\nexport class RequiredClassDirective implements AfterViewInit\n{\n //######################### private properties #########################\n\n /**\n * Gets control which was assigned to this element\n */\n private get control(): FormControl\n {\n return (this._formControl && this._formControl.control) || (this._formControlName && this._formControlName.control);\n }\n\n //######################### public properties - host #########################\n\n /**\n * Handles css class for required input\n */\n @HostBinding('class.required')\n public required: boolean = false;\n\n //######################### constructor #########################\n constructor(@Optional() private _formControl: FormControlDirective,\n @Optional() private _formControlName: FormControlName,\n private _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of AfterViewInit #########################\n \n /**\n * Called when view was initialized\n */\n public ngAfterViewInit(): void\n {\n const control = this.control;\n\n if(control && control.validator)\n {\n const validationResult = control.validator(new FormControl(null));\n this.required = validationResult && validationResult.required;\n\n this._changeDetector.detectChanges();\n }\n }\n}"]}
|
package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js
CHANGED
|
@@ -5,21 +5,20 @@ import * as i1 from "../../misc/validationErrorsContainerView";
|
|
|
5
5
|
/**
|
|
6
6
|
* Directive that sets view container for validation errors for current element
|
|
7
7
|
*/
|
|
8
|
-
class ValidationErrorsContainerDirective {
|
|
8
|
+
export class ValidationErrorsContainerDirective {
|
|
9
9
|
//######################### constructor #########################
|
|
10
10
|
constructor(containerView, viewContainer) {
|
|
11
11
|
containerView.viewContainer = viewContainer;
|
|
12
12
|
}
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ValidationErrorsContainerDirective, deps: [{ token: i1.ValidationErrorsContainerView, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: ValidationErrorsContainerDirective, selector: "[validationErrorsContainer]", ngImport: i0 });
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ValidationErrorsContainerDirective, decorators: [{
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ValidationErrorsContainerDirective, decorators: [{
|
|
18
17
|
type: Directive,
|
|
19
18
|
args: [{
|
|
20
19
|
selector: '[validationErrorsContainer]'
|
|
21
20
|
}]
|
|
22
|
-
}], ctorParameters:
|
|
21
|
+
}], ctorParameters: () => [{ type: i1.ValidationErrorsContainerView, decorators: [{
|
|
23
22
|
type: SkipSelf
|
|
24
|
-
}] }, { type: i0.ViewContainerRef }]
|
|
23
|
+
}] }, { type: i0.ViewContainerRef }] });
|
|
25
24
|
//# sourceMappingURL=validationErrorsContainer.directive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationErrorsContainer.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;;;AAEvF;;GAEG;
|
|
1
|
+
{"version":3,"file":"validationErrorsContainer.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;;;AAEvF;;GAEG;AAKH,MAAM,OAAO,kCAAkC;IAE3C,iEAAiE;IACjE,YAAwB,aAA4C,EACxD,aAA+B;QAEvC,aAAa,CAAC,aAAa,GAAG,aAAa,CAAC;IAChD,CAAC;uGAPQ,kCAAkC;2FAAlC,kCAAkC;;2FAAlC,kCAAkC;kBAJ9C,SAAS;mBACV;oBACI,QAAQ,EAAE,6BAA6B;iBAC1C;;0BAIgB,QAAQ","sourcesContent":["import {Directive, SkipSelf, ViewContainerRef} from '@angular/core';\n\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\n\n/**\n * Directive that sets view container for validation errors for current element\n */\n@Directive(\n{\n selector: '[validationErrorsContainer]'\n})\nexport class ValidationErrorsContainerDirective\n{\n //######################### constructor #########################\n constructor(@SkipSelf() containerView: ValidationErrorsContainerView,\n viewContainer: ViewContainerRef,)\n {\n containerView.viewContainer = viewContainer;\n }\n}"]}
|
package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as i5 from "../../pipes/withErrorMessage/withErrorMessage.pipe";
|
|
|
12
12
|
/**
|
|
13
13
|
* Component used for rendering from group errors
|
|
14
14
|
*/
|
|
15
|
-
class GroupErrorsComponent {
|
|
15
|
+
export class GroupErrorsComponent {
|
|
16
16
|
formGroupDirective;
|
|
17
17
|
formGroupName;
|
|
18
18
|
_changeDetector;
|
|
@@ -76,18 +76,17 @@ class GroupErrorsComponent {
|
|
|
76
76
|
this._initSubscriptions?.unsubscribe();
|
|
77
77
|
this._initSubscriptions = null;
|
|
78
78
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
79
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: GroupErrorsComponent, deps: [{ token: i1.FormGroupDirective, optional: true }, { token: i1.FormGroupName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.1", type: GroupErrorsComponent, selector: "form-group-errors", inputs: { cssClass: "cssClass" }, queries: [{ propertyName: "template", first: true, predicate: GroupErrorsTemplateDirective, descendants: true }], ngImport: i0, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage", "errors"], exportAs: ["errorMessage"] }, { kind: "pipe", type: i4.KeysSAPipe, name: "keys" }, { kind: "pipe", type: i5.WithErrorMessagePipe, name: "withErrorMessage" }], animations: [slideInOutTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GroupErrorsComponent, decorators: [{
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: GroupErrorsComponent, decorators: [{
|
|
84
83
|
type: Component,
|
|
85
84
|
args: [{ selector: 'form-group-errors', animations: [slideInOutTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>" }]
|
|
86
|
-
}], ctorParameters:
|
|
85
|
+
}], ctorParameters: () => [{ type: i1.FormGroupDirective, decorators: [{
|
|
87
86
|
type: Optional
|
|
88
87
|
}] }, { type: i1.FormGroupName, decorators: [{
|
|
89
88
|
type: Optional
|
|
90
|
-
}] }, { type: i0.ChangeDetectorRef }]
|
|
89
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { cssClass: [{
|
|
91
90
|
type: Input
|
|
92
91
|
}], template: [{
|
|
93
92
|
type: ContentChild,
|
package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupErrors.component.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.ts","../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtI,OAAO,EAA+B,kBAAkB,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,4BAA4B,EAAC,MAAM,kBAAkB,CAAC;;;;;;;AAE9D;;GAEG;
|
|
1
|
+
{"version":3,"file":"groupErrors.component.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.ts","../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtI,OAAO,EAA+B,kBAAkB,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,4BAA4B,EAAC,MAAM,kBAAkB,CAAC;;;;;;;AAE9D;;GAEG;AAQH,MAAM,OAAO,oBAAoB;IA+CK;IACA;IACZ;IA/CtB,sEAAsE;IAEtE;;OAEG;IACO,UAAU,CAAa;IAEjC;;OAEG;IACO,kBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAEhE;;OAEG;IACO,UAAU,CAAqB;IAEzC,2FAA2F;IAE3F;;;OAGG;IACH,IAAW,SAAS;QAEhB,OAAO,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAChG,CAAC;IAED,gFAAgF;IAEhF;;OAEG;IAEI,QAAQ,CAAS;IAExB,kFAAkF;IAElF;;OAEG;IAEI,QAAQ,CAAgC;IAE/C,iEAAiE;IACjE,YAAkC,kBAAsC,EACtC,aAA4B,EACxC,eAAkC;QAFtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAe;QACxC,oBAAe,GAAf,eAAe,CAAmB;QAEpD,IAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,aAAa,EAClD;YACI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC9E;IACL,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAEvE,IAAG,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,SAAS,EACjD;gBACI,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;aACxC;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,kBAAkB,EAAE,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACnC,CAAC;uGAnFQ,oBAAoB;2FAApB,oBAAoB,iIA2Cf,4BAA4B,gDC5D9C,sfAMe,mrBDQC,CAAC,iBAAiB,CAAC;;2FAGtB,oBAAoB;kBAPhC,SAAS;+BAEI,mBAAmB,cAEjB,CAAC,iBAAiB,CAAC,mBACd,uBAAuB,CAAC,MAAM;;0BAiDlC,QAAQ;;0BACR,QAAQ;yEAZd,QAAQ;sBADd,KAAK;gBASC,QAAQ;sBADd,YAAY;uBAAC,4BAA4B","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, OnInit, OnDestroy, ChangeDetectorRef, Input, ContentChild} from '@angular/core';\nimport {FormControlStatus, FormGroup, FormGroupDirective, FormGroupName} from '@angular/forms';\nimport {slideInOutTrigger} from '@anglr/animations';\nimport {Subscription} from 'rxjs';\n\nimport {GroupErrorsTemplateDirective} from '../../directives';\n\n/**\n * Component used for rendering from group errors\n */\n@Component(\n{\n selector: 'form-group-errors',\n templateUrl: 'groupErrors.component.html',\n animations: [slideInOutTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GroupErrorsComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of currently used form group\n */\n protected _formGroup?: FormGroup;\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n /**\n * Last state of form control\n */\n protected _lastState?: FormControlStatus;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Gets instance of currently used form group\n * @internal\n */\n public get formGroup(): FormGroup\n {\n return (this._formGroup ??= (this.formGroupDirective?.form ?? this.formGroupName?.control));\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Css classes that are applied to default rendered divs\n */\n @Input()\n public cssClass: string;\n\n //######################### public properties - children #########################\n\n /**\n * Custom template for rendering form group error\n */\n @ContentChild(GroupErrorsTemplateDirective)\n public template?: GroupErrorsTemplateDirective;\n\n //######################### constructor #########################\n constructor(@Optional() protected formGroupDirective: FormGroupDirective,\n @Optional() protected formGroupName: FormGroupName,\n protected _changeDetector: ChangeDetectorRef,)\n {\n if(!this.formGroupDirective && !this.formGroupName)\n {\n throw new Error('There is no parent formGroup or formGroupName directive');\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._initSubscriptions.add(this.formGroup.statusChanges.subscribe(state =>\n {\n if(this._lastState != state || state == 'INVALID')\n {\n this._lastState = state;\n this._changeDetector.detectChanges();\n }\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}","<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>"]}
|
package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
/**
|
|
8
8
|
* Directive used for displaying form error message
|
|
9
9
|
*/
|
|
10
|
-
class ErrorMessageDirective {
|
|
10
|
+
export class ErrorMessageDirective {
|
|
11
11
|
_element;
|
|
12
12
|
_localization;
|
|
13
13
|
_errorMessages;
|
|
@@ -62,23 +62,22 @@ class ErrorMessageDirective {
|
|
|
62
62
|
const message = this._localization.get(errorMessage, this.errors);
|
|
63
63
|
this._element.nativeElement.innerHTML = message;
|
|
64
64
|
}
|
|
65
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
66
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessageDirective, deps: [{ token: i0.ElementRef }, { token: STRING_LOCALIZATION }, { token: VALIDATION_ERROR_MESSAGES }], target: i0.ɵɵFactoryTarget.Directive });
|
|
66
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: { errorName: ["errorMessage", "errorName"], errors: "errors" }, exportAs: ["errorMessage"], usesOnChanges: true, ngImport: i0 });
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ErrorMessageDirective, decorators: [{
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessageDirective, decorators: [{
|
|
70
69
|
type: Directive,
|
|
71
70
|
args: [{
|
|
72
71
|
selector: '[errorMessage]',
|
|
73
72
|
exportAs: 'errorMessage'
|
|
74
73
|
}]
|
|
75
|
-
}], ctorParameters:
|
|
74
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
76
75
|
type: Inject,
|
|
77
76
|
args: [STRING_LOCALIZATION]
|
|
78
77
|
}] }, { type: undefined, decorators: [{
|
|
79
78
|
type: Inject,
|
|
80
79
|
args: [VALIDATION_ERROR_MESSAGES]
|
|
81
|
-
}] }]
|
|
80
|
+
}] }], propDecorators: { errorName: [{
|
|
82
81
|
type: Input,
|
|
83
82
|
args: ['errorMessage']
|
|
84
83
|
}], errors: [{
|
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;
|
|
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;IAwBR;IAC6B;IACM;IAxBzD,0EAA0E;IAE1E;;OAEG;IACO,kBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAEhE,gFAAgF;IAEhF;;OAEG;IAEI,SAAS,CAAS;IAEzB;;OAEG;IAEI,MAAM,CAAa;IAE1B,iEAAiE;IACjE,YAAsB,QAAiC,EACJ,aAAiC,EAC3B,cAAgC;QAFnE,aAAQ,GAAR,QAAQ,CAAyB;QACJ,kBAAa,GAAb,aAAa,CAAoB;QAC3B,mBAAc,GAAd,cAAc,CAAkB;QAErF,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;YACI,IAAI,CAAC,YAAY,EAAE,CAAC;SACvB;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;YACI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC;YAE3C,OAAO;SACV;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;uGAzEQ,qBAAqB,4CAyBV,mBAAmB,aACnB,yBAAyB;2FA1BpC,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}"]}
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* Obtains template for displaying form group error
|
|
5
5
|
*/
|
|
6
|
-
class GroupErrorsTemplateDirective {
|
|
6
|
+
export class GroupErrorsTemplateDirective {
|
|
7
7
|
template;
|
|
8
8
|
//######################### constructor #########################
|
|
9
9
|
constructor(template) {
|
|
@@ -16,14 +16,13 @@ class GroupErrorsTemplateDirective {
|
|
|
16
16
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
17
17
|
return true;
|
|
18
18
|
}
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: GroupErrorsTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.1", type: GroupErrorsTemplateDirective, selector: "[formGroupError]", ngImport: i0 });
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GroupErrorsTemplateDirective, decorators: [{
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: GroupErrorsTemplateDirective, decorators: [{
|
|
24
23
|
type: Directive,
|
|
25
24
|
args: [{
|
|
26
25
|
selector: '[formGroupError]'
|
|
27
26
|
}]
|
|
28
|
-
}], ctorParameters:
|
|
27
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
29
28
|
//# sourceMappingURL=groupErrorsTemplate.directive.js.map
|
|
@@ -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;
|
|
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;IAGlB;IADnB,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;uGAfQ,4BAA4B;2FAA5B,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}"]}
|
|
@@ -8,9 +8,9 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
/**
|
|
9
9
|
* Module for error message directives, pipes and components
|
|
10
10
|
*/
|
|
11
|
-
class ErrorMessageModule {
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
11
|
+
export class ErrorMessageModule {
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessageModule, declarations: [WithErrorMessagePipe,
|
|
14
14
|
ErrorMessageDirective,
|
|
15
15
|
GroupErrorsTemplateDirective,
|
|
16
16
|
GroupErrorsComponent], imports: [CommonModule,
|
|
@@ -18,11 +18,10 @@ class ErrorMessageModule {
|
|
|
18
18
|
ErrorMessageDirective,
|
|
19
19
|
GroupErrorsTemplateDirective,
|
|
20
20
|
GroupErrorsComponent] });
|
|
21
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
21
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessageModule, imports: [CommonModule,
|
|
22
22
|
CommonUtilsModule] });
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ErrorMessageModule, decorators: [{
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessageModule, decorators: [{
|
|
26
25
|
type: NgModule,
|
|
27
26
|
args: [{
|
|
28
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;
|
|
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;uGAAlB,kBAAkB;wGAAlB,kBAAkB,iBAbvB,oBAAoB;YACpB,qBAAqB;YACrB,4BAA4B;YAC5B,oBAAoB,aARpB,YAAY;YACZ,iBAAiB,aAWjB,oBAAoB;YACpB,qBAAqB;YACrB,4BAA4B;YAC5B,oBAAoB;wGAGf,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
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Filters array of errors with messages
|
|
6
6
|
*/
|
|
7
|
-
class WithErrorMessagePipe {
|
|
7
|
+
export class WithErrorMessagePipe {
|
|
8
8
|
_errorMessages;
|
|
9
9
|
//######################### constructor #########################
|
|
10
10
|
constructor(_errorMessages) {
|
|
@@ -21,15 +21,14 @@ class WithErrorMessagePipe {
|
|
|
21
21
|
}
|
|
22
22
|
return value.filter(itm => this._errorMessages[itm]);
|
|
23
23
|
}
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: WithErrorMessagePipe, deps: [{ token: VALIDATION_ERROR_MESSAGES }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
25
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: WithErrorMessagePipe, name: "withErrorMessage" });
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: WithErrorMessagePipe, decorators: [{
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: WithErrorMessagePipe, decorators: [{
|
|
29
28
|
type: Pipe,
|
|
30
29
|
args: [{ name: 'withErrorMessage' }]
|
|
31
|
-
}], ctorParameters:
|
|
30
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
32
31
|
type: Inject,
|
|
33
32
|
args: [VALIDATION_ERROR_MESSAGES]
|
|
34
|
-
}] }]
|
|
33
|
+
}] }] });
|
|
35
34
|
//# sourceMappingURL=withErrorMessage.pipe.js.map
|
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;
|
|
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;IAG4B;IADzD,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;YACI,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD,CAAC;uGArBQ,oBAAoB,kBAGT,yBAAyB;qGAHpC,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}"]}
|
|
@@ -4,19 +4,18 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Module that holds form util pipes
|
|
6
6
|
*/
|
|
7
|
-
class FormPipesModule {
|
|
8
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7
|
+
export class FormPipesModule {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: FormPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.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
15
|
GetControlPipe] });
|
|
16
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
16
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: FormPipesModule });
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormPipesModule, decorators: [{
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: FormPipesModule, decorators: [{
|
|
20
19
|
type: NgModule,
|
|
21
20
|
args: [{
|
|
22
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;
|
|
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;uGAAf,eAAe;wGAAf,eAAe,iBAbpB,eAAe;YACf,iBAAiB;YACjB,eAAe;YACf,cAAc,aAId,eAAe;YACf,iBAAiB;YACjB,eAAe;YACf,cAAc;wGAGT,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}"]}
|
|
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
/**
|
|
7
7
|
* Tries to convert `AbstractControl` to `FormArray`
|
|
8
8
|
*/
|
|
9
|
-
class AsFormArrayPipe {
|
|
9
|
+
export class AsFormArrayPipe {
|
|
10
10
|
_logger;
|
|
11
11
|
//######################### constructors #########################
|
|
12
12
|
constructor(_logger) {
|
|
@@ -28,17 +28,16 @@ class AsFormArrayPipe {
|
|
|
28
28
|
this._logger?.warn('Failed to cast AbstractControl to FormArray');
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: AsFormArrayPipe, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
32
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: AsFormArrayPipe, name: "asFormArray" });
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AsFormArrayPipe, decorators: [{
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: AsFormArrayPipe, decorators: [{
|
|
36
35
|
type: Pipe,
|
|
37
36
|
args: [{ name: 'asFormArray' }]
|
|
38
|
-
}], ctorParameters:
|
|
37
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
39
38
|
type: Optional
|
|
40
39
|
}, {
|
|
41
40
|
type: Inject,
|
|
42
41
|
args: [LOGGER]
|
|
43
|
-
}] }]
|
|
42
|
+
}] }] });
|
|
44
43
|
//# sourceMappingURL=asFormArray.pipe.js.map
|