@anglr/common 14.2.0-beta.20220809103327 → 14.2.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 +26 -0
- package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
- package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
- package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
- package/es2015/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
- package/es2015/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
- package/es2015/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
- package/es2015/forms/src/directives/hasError/hasError.directive.js +3 -3
- package/es2015/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2015/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
- package/es2015/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
- package/es2015/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +18 -7
- package/es2015/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2015/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
- package/es2015/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
- package/es2015/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
- package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -3
- package/es2015/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
- package/es2015/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
- package/es2015/forms/src/modules/errorMessage/modules/errorMessage.module.js +4 -4
- package/es2015/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
- package/es2015/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
- package/es2015/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
- package/es2015/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
- package/es2015/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
- package/es2015/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2015/forms/src/modules/hasError.module.js +4 -4
- package/es2015/forms/src/modules/numberInput.module.js +4 -4
- package/es2015/forms/src/modules/requiredClass.module.js +4 -4
- package/es2015/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
- package/es2015/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
- package/es2015/forms/src/services/submitted/submitted.service.js +3 -3
- package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
- package/es2015/hotkeys/src/services/appHotkeys.service.js +3 -3
- package/es2015/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
- package/es2015/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
- package/es2015/material/src/components/titledDialog/titledDialog.component.js +3 -3
- package/es2015/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -3
- package/es2015/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
- package/es2015/material/src/modules/confirmationDialog.module.js +4 -4
- package/es2015/material/src/modules/debugDataCopyClick.module.js +4 -4
- package/es2015/material/src/modules/movableTitledDialog.module.js +4 -4
- package/es2015/material/src/modules/titledDialog.module.js +4 -4
- package/es2015/material/src/services/titledDialog/titledDialog.service.js +3 -3
- package/es2015/moment/src/modules/moment.module.js +4 -4
- package/es2015/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
- package/es2015/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
- package/es2015/numeral/src/modules/numeral.module.js +4 -4
- package/es2015/numeral/src/pipes/numeral.pipe.js +3 -3
- package/es2015/router/src/services/routing/dataRouter.js +3 -3
- package/es2015/router/src/services/routing/dataRouterData.js +3 -3
- package/es2015/src/directives/bodyRender/bodyRender.directive.js +66 -0
- package/es2015/src/directives/bodyRender/bodyRender.directive.js.map +1 -0
- package/es2015/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
- package/es2015/src/index.js +1 -0
- package/es2015/src/index.js.map +1 -1
- package/es2015/src/modules/castPipes/modules/castPipes.module.js +4 -4
- package/es2015/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
- package/es2015/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2015/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2015/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
- package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
- package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2015/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
- package/es2015/src/modules/commonDynamic.module.js +4 -4
- package/es2015/src/modules/commonLocalize.module.js +4 -4
- package/es2015/src/modules/commonUtils.module.js +4 -4
- package/es2015/src/modules/debugData/components/debugData/debugData.component.js +3 -3
- package/es2015/src/modules/debugData/modules/debugData.module.js +4 -4
- package/es2015/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
- package/es2015/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
- package/es2015/src/modules/goBack/modules/goBack.module.js +4 -4
- package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
- package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2015/src/modules/multiButton/modules/multiButton.module.js +4 -4
- package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js +3 -3
- package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2015/src/modules/position/modules/position.module.js +4 -4
- package/es2015/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
- package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
- package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2015/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -3
- package/es2015/src/modules/progressIndicator/modules/progressIndicator.module.js +4 -4
- package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
- package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2015/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
- package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js +3 -3
- package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2015/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
- package/es2015/src/modules/tooltip/modules/tooltip.module.js +4 -4
- package/es2015/src/pipes/isNaN/isNaN.pipe.js +3 -3
- package/es2015/src/pipes/isPresent/isPresent.pipe.js +3 -3
- package/es2015/src/pipes/keys/keys.pipe.js +3 -3
- package/es2015/src/pipes/localize/localize.pipe.js +7 -3
- package/es2015/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2015/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
- package/es2015/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
- package/es2015/src/services/cookies/cookies.service.js +3 -3
- package/es2015/src/services/cookies/cookies.service.js.map +1 -1
- package/es2015/src/services/notifications/defaultNotifications.service.js +3 -3
- package/es2015/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
- package/es2015/src/services/statusCode/statusCode.service.js +3 -3
- package/es2015/src/services/stringLocalization/noStringLocalization.service.js +3 -3
- package/es2015/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
- package/es2015/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2015/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/es2015/structured-log/src/components/console/console.component.js +3 -3
- package/es2015/structured-log/src/modules/consoleLog.module.js +4 -4
- package/es2015/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
- package/es2015/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
- package/es2015/structured-log/src/services/logger.service.js +3 -3
- package/es2015/structured-log/src/services/rest/restSink.service.js +3 -3
- package/es2015/structured-log/src/services/rest/restSink.service.js.map +1 -1
- package/es2015/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
- package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
- package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
- package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
- package/es2020/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
- package/es2020/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
- package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
- package/es2020/forms/src/directives/hasError/hasError.directive.js +3 -3
- package/es2020/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2020/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
- package/es2020/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
- package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +18 -7
- package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2020/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
- package/es2020/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
- package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
- package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -3
- package/es2020/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
- package/es2020/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
- package/es2020/forms/src/modules/errorMessage/modules/errorMessage.module.js +4 -4
- package/es2020/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
- package/es2020/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
- package/es2020/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
- package/es2020/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
- package/es2020/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
- package/es2020/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2020/forms/src/modules/hasError.module.js +4 -4
- package/es2020/forms/src/modules/numberInput.module.js +4 -4
- package/es2020/forms/src/modules/requiredClass.module.js +4 -4
- package/es2020/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
- package/es2020/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
- package/es2020/forms/src/services/submitted/submitted.service.js +3 -3
- package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
- package/es2020/hotkeys/src/services/appHotkeys.service.js +3 -3
- package/es2020/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
- package/es2020/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
- package/es2020/material/src/components/titledDialog/titledDialog.component.js +3 -3
- package/es2020/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -3
- package/es2020/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
- package/es2020/material/src/modules/confirmationDialog.module.js +4 -4
- package/es2020/material/src/modules/debugDataCopyClick.module.js +4 -4
- package/es2020/material/src/modules/movableTitledDialog.module.js +4 -4
- package/es2020/material/src/modules/titledDialog.module.js +4 -4
- package/es2020/material/src/services/titledDialog/titledDialog.service.js +3 -3
- package/es2020/moment/src/modules/moment.module.js +4 -4
- package/es2020/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
- package/es2020/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
- package/es2020/numeral/src/modules/numeral.module.js +4 -4
- package/es2020/numeral/src/pipes/numeral.pipe.js +3 -3
- package/es2020/router/src/services/routing/dataRouter.js +3 -3
- package/es2020/router/src/services/routing/dataRouterData.js +3 -3
- package/es2020/src/directives/bodyRender/bodyRender.directive.js +65 -0
- package/es2020/src/directives/bodyRender/bodyRender.directive.js.map +1 -0
- package/es2020/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
- package/es2020/src/index.js +1 -0
- package/es2020/src/index.js.map +1 -1
- package/es2020/src/modules/castPipes/modules/castPipes.module.js +4 -4
- package/es2020/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
- package/es2020/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2020/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2020/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
- package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
- package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2020/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
- package/es2020/src/modules/commonDynamic.module.js +4 -4
- package/es2020/src/modules/commonLocalize.module.js +4 -4
- package/es2020/src/modules/commonUtils.module.js +4 -4
- package/es2020/src/modules/debugData/components/debugData/debugData.component.js +3 -3
- package/es2020/src/modules/debugData/modules/debugData.module.js +4 -4
- package/es2020/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
- package/es2020/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
- package/es2020/src/modules/goBack/modules/goBack.module.js +4 -4
- package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
- package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2020/src/modules/multiButton/modules/multiButton.module.js +4 -4
- package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js +3 -3
- package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2020/src/modules/position/modules/position.module.js +4 -4
- package/es2020/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
- package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
- package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2020/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -3
- package/es2020/src/modules/progressIndicator/modules/progressIndicator.module.js +4 -4
- package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
- package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2020/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
- package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js +3 -3
- package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2020/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
- package/es2020/src/modules/tooltip/modules/tooltip.module.js +4 -4
- package/es2020/src/pipes/isNaN/isNaN.pipe.js +3 -3
- package/es2020/src/pipes/isPresent/isPresent.pipe.js +3 -3
- package/es2020/src/pipes/keys/keys.pipe.js +3 -3
- package/es2020/src/pipes/localize/localize.pipe.js +7 -3
- package/es2020/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2020/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
- package/es2020/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
- package/es2020/src/services/cookies/cookies.service.js +3 -3
- package/es2020/src/services/cookies/cookies.service.js.map +1 -1
- package/es2020/src/services/notifications/defaultNotifications.service.js +3 -3
- package/es2020/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
- package/es2020/src/services/statusCode/statusCode.service.js +3 -3
- package/es2020/src/services/stringLocalization/noStringLocalization.service.js +3 -3
- package/es2020/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
- package/es2020/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2020/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/es2020/structured-log/src/components/console/console.component.js +3 -3
- package/es2020/structured-log/src/modules/consoleLog.module.js +4 -4
- package/es2020/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
- package/es2020/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
- package/es2020/structured-log/src/services/logger.service.js +3 -3
- package/es2020/structured-log/src/services/rest/restSink.service.js +3 -3
- package/es2020/structured-log/src/services/rest/restSink.service.js.map +1 -1
- package/es2020/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
- package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts +11 -3
- package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/directives/bodyRender/bodyRender.directive.d.ts +36 -0
- package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -0
- package/src/index.d.ts +1 -0
- package/src/index.d.ts.map +1 -1
- package/src/modules/position/directives/positionTo/positionTo.directive.d.ts +2 -2
- package/src/modules/position/directives/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/pipes/localize/localize.pipe.d.ts +1 -1
- package/src/pipes/localize/localize.pipe.d.ts.map +1 -1
- package/version.bak +1 -1
|
@@ -29,9 +29,9 @@ export class SessionTemporaryStorageService {
|
|
|
29
29
|
store.remove(name);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
SessionTemporaryStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
33
|
-
SessionTemporaryStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
32
|
+
SessionTemporaryStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: SessionTemporaryStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
|
+
SessionTemporaryStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: SessionTemporaryStorageService });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: SessionTemporaryStorageService, decorators: [{
|
|
35
35
|
type: Injectable
|
|
36
36
|
}] });
|
|
37
37
|
//# sourceMappingURL=sessionTemporaryStorage.service.js.map
|
|
@@ -83,9 +83,9 @@ export class ConsoleComponent {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
ConsoleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
87
|
-
ConsoleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
86
|
+
ConsoleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleComponent, deps: [{ token: CONSOLE_COMPONENT_SINK_SERVICE }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
+
ConsoleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ConsoleComponent, selector: "console", ngImport: i0, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log?.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleComponent, decorators: [{
|
|
89
89
|
type: Component,
|
|
90
90
|
args: [{ selector: 'console', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log?.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"] }]
|
|
91
91
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -22,10 +22,10 @@ export class ConsoleLogModule {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
ConsoleLogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
26
|
-
ConsoleLogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
27
|
-
ConsoleLogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
25
|
+
ConsoleLogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleLogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
26
|
+
ConsoleLogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: ConsoleLogModule, declarations: [ConsoleComponent], imports: [CommonModule], exports: [ConsoleComponent] });
|
|
27
|
+
ConsoleLogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleLogModule, imports: [CommonModule] });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleLogModule, decorators: [{
|
|
29
29
|
type: NgModule,
|
|
30
30
|
args: [{
|
|
31
31
|
imports: [
|
|
@@ -88,9 +88,9 @@ export class ConsoleComponentSinkService {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
ConsoleComponentSinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
92
|
-
ConsoleComponentSinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
91
|
+
ConsoleComponentSinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleComponentSinkService, deps: [{ token: i1.ConsoleSinkConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
92
|
+
ConsoleComponentSinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleComponentSinkService });
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleComponentSinkService, decorators: [{
|
|
94
94
|
type: Injectable
|
|
95
95
|
}], ctorParameters: function () { return [{ type: i1.ConsoleSinkConfigService }]; } });
|
|
96
96
|
//# sourceMappingURL=consoleComponentSink.service.js.map
|
|
@@ -29,9 +29,9 @@ export class ConsoleSinkConfigService {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
ConsoleSinkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
33
|
-
ConsoleSinkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
32
|
+
ConsoleSinkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleSinkConfigService, deps: [{ token: Injector }, { token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
|
+
ConsoleSinkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleSinkConfigService, providedIn: 'root', useFactory: () => new ConsoleSinkConfigService() });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ConsoleSinkConfigService, decorators: [{
|
|
35
35
|
type: Injectable,
|
|
36
36
|
args: [{ providedIn: 'root', useFactory: () => new ConsoleSinkConfigService() }]
|
|
37
37
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -33,9 +33,9 @@ export class LoggerService {
|
|
|
33
33
|
this._logger.verbose(errorOrMessageTemplate, properties);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
LoggerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
37
|
-
LoggerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
36
|
+
LoggerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LoggerService, deps: [{ token: LOGGER_SINKS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
37
|
+
LoggerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LoggerService });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LoggerService, decorators: [{
|
|
39
39
|
type: Injectable
|
|
40
40
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
41
41
|
type: Inject,
|
|
@@ -104,9 +104,9 @@ export class RestSinkService {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
RestSinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
108
|
-
RestSinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
107
|
+
RestSinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkService, deps: [{ token: i1.RestSinkConfigService }, { token: APP_STABLE }, { token: LOGGER_REST_CLIENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
108
|
+
RestSinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkService });
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkService, decorators: [{
|
|
110
110
|
type: Injectable
|
|
111
111
|
}], ctorParameters: function () { return [{ type: i1.RestSinkConfigService }, { type: Promise, decorators: [{
|
|
112
112
|
type: Inject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restSink.service.js","sourceRoot":"","sources":["../../../../../structured-log/src/services/rest/restSink.service.ts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C,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;SAC1D;QACD,OAAM,CAAC,EACP;YACI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SAClB;QAED,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAEhB,OAAO,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,qEAAqE;IAErE;;OAEG;IACK,gBAAgB,CAAC,CAAW;QAEhC,MAAM,uBAAuB,GAAS,CAAC,CAAC,eAAgB,CAAC;QAEzD,IAAG,uBAAuB,CAAC,WAAW,IAAI,uBAAuB,CAAC,WAAW,CAAC,SAAS,IAAI,uBAAuB,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,EAC/I;YACI,uBAAuB,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;SACjE;IACL,CAAC;;4GA7IQ,eAAe,uDAqBJ,UAAU,aACV,kBAAkB;gHAtB7B,eAAe;2FAAf,eAAe;kBAD3B,UAAU
|
|
1
|
+
{"version":3,"file":"restSink.service.js","sourceRoot":"","sources":["../../../../../structured-log/src/services/rest/restSink.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAiB,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;;;AAGtD;;GAEG;AAEH,MAAM,OAAO,eAAe;IAmBxB,iEAAiE;IACjE,YAAoB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B,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,EAC/I;YACI,uBAAuB,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;SACjE;IACL,CAAC;;4GA7IQ,eAAe,uDAqBJ,UAAU,aACV,kBAAkB;gHAtB7B,eAAe;2FAAf,eAAe;kBAD3B,UAAU;;0BAsBM,MAAM;2BAAC,UAAU;;0BACjB,MAAM;2BAAC,kBAAkB","sourcesContent":["import {Injectable, Inject} from '@angular/core';\nimport {APP_STABLE} from '@anglr/common';\nimport {isPresent} from '@jscrpt/common';\nimport {Sink, LogEvent, LogEventLevel} from 'structured-log';\n\nimport {toText, isEnabled} from '../../misc/utils';\nimport {RestSinkConfigService} from './restSinkConfig.service';\nimport {LOGGER_REST_CLIENT} from '../../types/tokens';\nimport {LoggerRestClient, RestLog} from '../../types/logger.interface';\n\n/**\n * Sink that is used for storing logs using REST\n */\n@Injectable()\nexport class RestSinkService implements Sink\n{\n //######################### private fields #########################\n\n /**\n * Indication that prototype of MessageTemplate was updated\n */\n private _prototypeUpdated: boolean = false;\n\n /**\n * Array of unflushed logs\n */\n private _logs: RestLog[] = [];\n\n /**\n * Interval timer id\n */\n private _timer: number;\n\n //######################### constructor #########################\n constructor(private _configSvc: RestSinkConfigService,\n @Inject(APP_STABLE) isStable: Promise<void>,\n @Inject(LOGGER_REST_CLIENT) private _restClient: LoggerRestClient)\n {\n isStable.then(() =>\n {\n this._timer = setInterval(() =>\n {\n this.flush();\n }, this._configSvc.secondsToFlushAfter * 1000) as any;\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(isPresent(this._timer))\n {\n clearInterval(this._timer);\n }\n\n this.flush();\n }\n\n //######################### public methods - implementation of Sink #########################\n\n /**\n * Emits events into log\n * @param events - Events to be emitted\n */\n public emit(events: LogEvent[]): void\n {\n if(!events || !events.length)\n {\n return;\n }\n\n let forceFlush = false;\n\n events.forEach(e =>\n {\n if(!this._prototypeUpdated)\n {\n this._updatePrototype(e);\n\n this._prototypeUpdated = true;\n }\n\n if (!isEnabled(this._configSvc.restrictToLevel, e.level))\n {\n return;\n }\n\n const logLevel = LogEventLevel[e.level].toUpperCase();\n const timestamp = e.timestamp;\n const message = e.messageTemplate.render(e.properties);\n\n this._logs.push(\n {\n logLevel,\n message,\n timestamp\n });\n\n if (isEnabled(this._configSvc.immediateFlushMinLevel, e.level))\n {\n forceFlush = true;\n }\n });\n\n //flush if number of records is bigger than max or flush is required\n if(forceFlush || this._logs.length >= this._configSvc.flushAfterNumberOfLogs)\n {\n this.flush();\n }\n }\n\n /**\n * Flushes logs\n */\n public flush(): Promise<void>\n {\n let promise: Promise<void>;\n\n //no logs available\n if(!this._logs.length)\n {\n return Promise.resolve(null);\n }\n\n try\n {\n promise = this._restClient.log(this._logs).toPromise();\n }\n catch(e)\n {\n console.log(e);\n }\n\n this._logs = [];\n\n return promise ?? Promise.resolve(null);\n }\n\n //######################### private methods #########################\n\n /**\n * Updates prototype of MessageTemplate\n */\n private _updatePrototype(e: LogEvent): void\n {\n const messageTemplateInstance = (<any>e.messageTemplate);\n\n if(messageTemplateInstance.constructor && messageTemplateInstance.constructor.prototype && messageTemplateInstance.constructor.prototype.toText)\n {\n messageTemplateInstance.constructor.prototype.toText = toText;\n }\n }\n}"]}
|
|
@@ -34,9 +34,9 @@ export class RestSinkConfigService {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
RestSinkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
38
|
-
RestSinkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
37
|
+
RestSinkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkConfigService, deps: [{ token: Injector }, { token: Injector }, { token: Injector }, { token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
38
|
+
RestSinkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkConfigService, providedIn: 'root', useFactory: () => new RestSinkConfigService() });
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkConfigService, decorators: [{
|
|
40
40
|
type: Injectable,
|
|
41
41
|
args: [{ providedIn: 'root', useFactory: () => new RestSinkConfigService() }]
|
|
42
42
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -211,9 +211,9 @@ export class FloatingUiDomPosition {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
FloatingUiDomPosition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
215
|
-
FloatingUiDomPosition.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
214
|
+
FloatingUiDomPosition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
215
|
+
FloatingUiDomPosition.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FloatingUiDomPosition });
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
|
|
217
217
|
type: Injectable
|
|
218
218
|
}] });
|
|
219
219
|
/**
|
package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js
CHANGED
|
@@ -25,12 +25,12 @@ export class DefaultValidationErrorsComponent {
|
|
|
25
25
|
this._changeDetector.detectChanges();
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
DefaultValidationErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
29
|
-
DefaultValidationErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
28
|
+
DefaultValidationErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
DefaultValidationErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DefaultValidationErrorsComponent, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>", styles: [":host\n{\n display: contents;\n}"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
30
30
|
slideInOutTrigger,
|
|
31
31
|
animateChildrenTrigger
|
|
32
32
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{ selector: 'default-validation-errors', animations: [
|
|
36
36
|
slideInOutTrigger,
|
|
@@ -66,9 +66,9 @@ export class DefaultValidationErrorsContainerComponent {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
DefaultValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
70
|
-
DefaultValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
69
|
+
DefaultValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
DefaultValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DefaultValidationErrorsContainerComponent, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
|
|
72
72
|
type: Component,
|
|
73
73
|
args: [{ selector: 'default-validation-errors-container', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host\n{\n display: contents;\n}"] }]
|
|
74
74
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
@@ -63,9 +63,9 @@ export class ReservedSpaceValidationErrorsContainerComponent {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
ReservedSpaceValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
67
|
-
ReservedSpaceValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
66
|
+
ReservedSpaceValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
ReservedSpaceValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ReservedSpaceValidationErrorsContainerComponent, selector: "reserved-space-validation-errors-container", viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
70
70
|
args: [{ selector: 'reserved-space-validation-errors-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"] }]
|
|
71
71
|
}], propDecorators: { viewContainer: [{
|
|
@@ -61,9 +61,9 @@ export class GroupHasErrorDirective {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
GroupHasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
65
|
-
GroupHasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
64
|
+
GroupHasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
65
|
+
GroupHasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: GroupHasErrorDirective, selector: "[groupHasError]", ngImport: i0 });
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
|
|
67
67
|
type: Directive,
|
|
68
68
|
args: [{
|
|
69
69
|
selector: '[groupHasError]'
|
package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js
CHANGED
|
@@ -7,15 +7,15 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
*/
|
|
8
8
|
export class GroupHasErrorContainerDirective extends GroupHasErrorDirective {
|
|
9
9
|
}
|
|
10
|
-
GroupHasErrorContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
11
|
-
GroupHasErrorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
10
|
+
GroupHasErrorContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
+
GroupHasErrorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: GroupHasErrorContainerDirective, selector: "[groupHasErrorContainer]", providers: [
|
|
12
12
|
{
|
|
13
13
|
provide: GroupHasErrorDirective,
|
|
14
14
|
useExisting: GroupHasErrorContainerDirective
|
|
15
15
|
},
|
|
16
16
|
ValidationErrorsContainerView
|
|
17
17
|
], usesInheritance: true, ngImport: i0 });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
|
|
19
19
|
type: Directive,
|
|
20
20
|
args: [{
|
|
21
21
|
selector: '[groupHasErrorContainer]',
|
|
@@ -149,15 +149,15 @@ export class HasErrorDirective {
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
HasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
153
|
-
HasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
152
|
+
HasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: HasErrorDirective, deps: [{ token: i0.ElementRef }, { token: i1.ValidationErrorRendererFactory }, { token: i0.ViewContainerRef }, { token: i2.GroupHasErrorDirective, optional: true, skipSelf: true }, { token: i3.FormControlDirective, optional: true }, { token: i3.FormControlName, optional: true }, { token: i3.NgModel, optional: true }, { token: i4.SubmittedService, optional: true }, { token: i5.ValidationErrorsContainerView, optional: true }, { token: STRING_LOCALIZATION }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
153
|
+
HasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: HasErrorDirective, selector: "[hasError]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 });
|
|
154
154
|
__decorate([
|
|
155
155
|
BindThis,
|
|
156
156
|
__metadata("design:type", Function),
|
|
157
157
|
__metadata("design:paramtypes", [Function, Function, Boolean]),
|
|
158
158
|
__metadata("design:returntype", void 0)
|
|
159
159
|
], HasErrorDirective.prototype, "_isSubmittedOrDirty", null);
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: HasErrorDirective, decorators: [{
|
|
161
161
|
type: Directive,
|
|
162
162
|
args: [{
|
|
163
163
|
selector: '[hasError]'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasError.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/hasError/hasError.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAqB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAiB,IAAI,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACxK,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAe,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAmB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,8BAA8B,EAAC,MAAM,wEAAwE,CAAC;AAEtH,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAC,sBAAsB,EAAC,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;;;;;;;AAEvF,qEAAqE;AAErE;;GAEG;AAKH,MAAM,OAAO,iBAAiB;IAkE1B,iEAAiE;IACjE,YAAoB,QAAiC,EACjC,gBAAgD,EAChD,cAAgC,EACR,cAAsC,EAClD,YAAkC,EAClC,gBAAiC,EACjC,QAAiB,EACjB,aAA+B,EAC/B,cAA6C,EAC1B,mBAAuC,EACpE,SAAmB;QAVrB,aAAQ,GAAR,QAAQ,CAAyB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAgC;QAChD,mBAAc,GAAd,cAAc,C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B;kBAJ7B,SAAS;mBACV;oBACI,QAAQ,EAAE,YAAY;iBACzB;;0BAuEgB,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,MAAM;2BAAC,mBAAmB;mEAxBhC,aAAa;sBADnB,KAAK;gBAOC,eAAe;sBADrB,KAAK;gBAOC,cAAc;sBADpB,KAAK;gBAoHE,mBAAmB","sourcesContent":["import {Directive, ElementRef, Optional, SkipSelf, OnInit, OnDestroy, Inject, Input, Injector, ViewContainerRef, AfterViewInit, Type, TemplateRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl, NgModel} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {generateId, BindThis, StringDictionary} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {ValidationErrorRendererFactory} from '../../services/validationErrorRenderer/validationErrorRenderer.service';\nimport {ValidationErrorRenderer, ValidationErrorsComponent, ValidationErrorsRendererOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\nimport {SubmittedService} from '../../services/submitted/submitted.service';\nimport {GroupHasErrorDirective} from '../groupHasError/groupHasError.directive';\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\n\n//TODO - add support for setting renderer factory options using input\n\n/**\n * Directive that is attached to control element and handles css classes that are added to this element\n */\n@Directive(\n{\n selector: '[hasError]'\n})\nexport class HasErrorDirective implements OnInit, AfterViewInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscriptions that are destroyed with destruction of this directive\n */\n private _subscriptions: Subscription = new Subscription();\n\n /**\n * Unique generated id of control\n */\n private _id: string = generateId(10);\n\n /**\n * Last value of control pristine attribute\n */\n private _previousDirty: boolean = false;\n\n /**\n * Indication whether currently are any errors rendered\n */\n private _hasErrors: boolean = false;\n\n /**\n * Mutation observer used for observing changes on class of element\n */\n private _observer: MutationObserver;\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?.control || this._formControlName?.control || this._ngModel?.control;\n }\n\n //######################### public properties #########################\n\n /**\n * Instance of validation error renderer\n */\n public renderer: ValidationErrorRenderer;\n\n //######################### public propeties - inputs #########################\n\n /**\n * Customized error messages\n */\n @Input()\n public errorMessages: StringDictionary;\n\n /**\n * Custom component used for rendering validation errors\n */\n @Input()\n public errorsComponent?: Type<ValidationErrorsComponent>;\n\n /**\n * Custom template used for rendering validation errors\n */\n @Input()\n public errorsTemplate?: TemplateRef<ValidationErrorsTemplateContext>;\n\n //######################### constructor #########################\n constructor(private _element: ElementRef<HTMLElement>,\n private _rendererFactory: ValidationErrorRendererFactory,\n private _viewContainer: ViewContainerRef,\n @Optional() @SkipSelf() private _groupHasError: GroupHasErrorDirective,\n @Optional() private _formControl: FormControlDirective,\n @Optional() private _formControlName: FormControlName,\n @Optional() private _ngModel: NgModel,\n @Optional() private _submittedSvc: SubmittedService,\n @Optional() private _containerView: ValidationErrorsContainerView,\n @Inject(STRING_LOCALIZATION) protected _stringLocalization: StringLocalization,\n protected _injector: Injector)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._containerView ??= new ValidationErrorsContainerView();\n this._containerView.viewContainer ??= this._viewContainer;\n\n this._registerMutationObserver();\n\n this._subscriptions.add(this._stringLocalization.textsChange.subscribe(() => this._updateStatus()));\n this._subscriptions.add(this.control.statusChanges.subscribe(() => this._updateStatus()));\n\n if(this._submittedSvc)\n {\n this._subscriptions.add(this._submittedSvc.submittedChange.subscribe(() => this._isSubmittedOrDirty(() => this._updateStatus())));\n }\n }\n\n //######################### public methods - implementation of AfterViewInit #########################\n \n /**\n * Called when view was initialized\n */\n public ngAfterViewInit(): void\n {\n this.renderer = this._rendererFactory.create(this.control,\n this._containerView,\n this._injector,\n this._isSubmittedOrDirty);\n\n this._updateStatus();\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._subscriptions.unsubscribe();\n\n this._groupHasError?.unregisterControl(this._id);\n this._observer?.disconnect();\n this.renderer?.destroy();\n }\n\n //######################### private methods #########################\n\n /**\n * Updates status of control and css classes\n */\n private _updateStatus(): void\n {\n if(!this.renderer)\n {\n return;\n }\n\n const opts: ValidationErrorsRendererOptions = {};\n\n if(this.errorsTemplate)\n {\n opts.template = this.errorsTemplate;\n }\n else if(this.errorsComponent)\n {\n opts.component = this.errorsComponent;\n }\n\n this._previousDirty = this.control.dirty;\n this._hasErrors = this.renderer.update(opts, this.errorMessages);\n this._toggleGroupHasError();\n }\n\n /**\n * Toggles registration of control in parent group\n */\n private _toggleGroupHasError(): void\n {\n if(this._groupHasError)\n {\n this._isSubmittedOrDirty(() => this._groupHasError.registerControl(this._id),\n () => this._groupHasError.unregisterControl(this._id),\n this._hasErrors);\n }\n }\n\n /**\n * Calls action when form is submitted or control is dirty\n * @param action - Action to be called when form is submitted or control dirty\n * @param falseAction - Action to be called when form is not submitted and control is not dirty\n * @param additionalCondition - Additional condition to be evaluated\n */\n @BindThis\n private _isSubmittedOrDirty(action: () => void, falseAction: () => void = () => {}, additionalCondition: boolean = true): void\n {\n //submitted form or dirty control\n if((this._submittedSvc?.submitted ||\n this.control?.dirty) &&\n additionalCondition)\n {\n action();\n }\n else\n {\n falseAction();\n }\n }\n\n /**\n * Registers mutation observer which watch for changes of class list\n */\n private _registerMutationObserver(): void\n {\n this._observer = new MutationObserver(() =>\n {\n if(this.control.dirty != this._previousDirty)\n {\n this._updateStatus();\n }\n });\n\n this._observer.observe(this._element.nativeElement, \n {\n attributeFilter: ['class'],\n attributes: true\n });\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"hasError.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/hasError/hasError.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,U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ElementRef, Optional, SkipSelf, OnInit, OnDestroy, Inject, Input, Injector, ViewContainerRef, AfterViewInit, Type, TemplateRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl, NgModel} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {generateId, BindThis, StringDictionary} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {ValidationErrorRendererFactory} from '../../services/validationErrorRenderer/validationErrorRenderer.service';\nimport {ValidationErrorRenderer, ValidationErrorsComponent, ValidationErrorsRendererOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\nimport {SubmittedService} from '../../services/submitted/submitted.service';\nimport {GroupHasErrorDirective} from '../groupHasError/groupHasError.directive';\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\n\n//TODO - add support for setting renderer factory options using input\n\n/**\n * Directive that is attached to control element and handles css classes that are added to this element\n */\n@Directive(\n{\n selector: '[hasError]'\n})\nexport class HasErrorDirective implements OnInit, AfterViewInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscriptions that are destroyed with destruction of this directive\n */\n private _subscriptions: Subscription = new Subscription();\n\n /**\n * Unique generated id of control\n */\n private _id: string = generateId(10);\n\n /**\n * Last value of control pristine attribute\n */\n private _previousDirty: boolean = false;\n\n /**\n * Indication whether currently are any errors rendered\n */\n private _hasErrors: boolean = false;\n\n /**\n * Mutation observer used for observing changes on class of element\n */\n private _observer: MutationObserver;\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?.control || this._formControlName?.control || this._ngModel?.control;\n }\n\n //######################### public properties #########################\n\n /**\n * Instance of validation error renderer\n */\n public renderer: ValidationErrorRenderer;\n\n //######################### public propeties - inputs #########################\n\n /**\n * Customized error messages\n */\n @Input()\n public errorMessages: StringDictionary;\n\n /**\n * Custom component used for rendering validation errors\n */\n @Input()\n public errorsComponent?: Type<ValidationErrorsComponent>;\n\n /**\n * Custom template used for rendering validation errors\n */\n @Input()\n public errorsTemplate?: TemplateRef<ValidationErrorsTemplateContext>;\n\n //######################### constructor #########################\n constructor(private _element: ElementRef<HTMLElement>,\n private _rendererFactory: ValidationErrorRendererFactory,\n private _viewContainer: ViewContainerRef,\n @Optional() @SkipSelf() private _groupHasError: GroupHasErrorDirective,\n @Optional() private _formControl: FormControlDirective,\n @Optional() private _formControlName: FormControlName,\n @Optional() private _ngModel: NgModel,\n @Optional() private _submittedSvc: SubmittedService,\n @Optional() private _containerView: ValidationErrorsContainerView,\n @Inject(STRING_LOCALIZATION) protected _stringLocalization: StringLocalization,\n protected _injector: Injector)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._containerView ??= new ValidationErrorsContainerView();\n this._containerView.viewContainer ??= this._viewContainer;\n\n this._registerMutationObserver();\n\n this._subscriptions.add(this._stringLocalization.textsChange.subscribe(() => this._updateStatus()));\n this._subscriptions.add(this.control.statusChanges.subscribe(() => this._updateStatus()));\n\n if(this._submittedSvc)\n {\n this._subscriptions.add(this._submittedSvc.submittedChange.subscribe(() => this._isSubmittedOrDirty(() => this._updateStatus())));\n }\n }\n\n //######################### public methods - implementation of AfterViewInit #########################\n \n /**\n * Called when view was initialized\n */\n public ngAfterViewInit(): void\n {\n this.renderer = this._rendererFactory.create(this.control,\n this._containerView,\n this._injector,\n this._isSubmittedOrDirty);\n\n this._updateStatus();\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._subscriptions.unsubscribe();\n\n this._groupHasError?.unregisterControl(this._id);\n this._observer?.disconnect();\n this.renderer?.destroy();\n }\n\n //######################### private methods #########################\n\n /**\n * Updates status of control and css classes\n */\n private _updateStatus(): void\n {\n if(!this.renderer)\n {\n return;\n }\n\n const opts: ValidationErrorsRendererOptions = {};\n\n if(this.errorsTemplate)\n {\n opts.template = this.errorsTemplate;\n }\n else if(this.errorsComponent)\n {\n opts.component = this.errorsComponent;\n }\n\n this._previousDirty = this.control.dirty;\n this._hasErrors = this.renderer.update(opts, this.errorMessages);\n this._toggleGroupHasError();\n }\n\n /**\n * Toggles registration of control in parent group\n */\n private _toggleGroupHasError(): void\n {\n if(this._groupHasError)\n {\n this._isSubmittedOrDirty(() => this._groupHasError.registerControl(this._id),\n () => this._groupHasError.unregisterControl(this._id),\n this._hasErrors);\n }\n }\n\n /**\n * Calls action when form is submitted or control is dirty\n * @param action - Action to be called when form is submitted or control dirty\n * @param falseAction - Action to be called when form is not submitted and control is not dirty\n * @param additionalCondition - Additional condition to be evaluated\n */\n @BindThis\n private _isSubmittedOrDirty(action: () => void, falseAction: () => void = () => {}, additionalCondition: boolean = true): void\n {\n //submitted form or dirty control\n if((this._submittedSvc?.submitted ||\n this.control?.dirty) &&\n additionalCondition)\n {\n action();\n }\n else\n {\n falseAction();\n }\n }\n\n /**\n * Registers mutation observer which watch for changes of class list\n */\n private _registerMutationObserver(): void\n {\n this._observer = new MutationObserver(() =>\n {\n if(this.control.dirty != this._previousDirty)\n {\n this._updateStatus();\n }\n });\n\n this._observer.observe(this._element.nativeElement, \n {\n attributeFilter: ['class'],\n attributes: true\n });\n }\n}"]}
|
|
@@ -47,9 +47,9 @@ export class MaxValueNumberValidatorDirective {
|
|
|
47
47
|
return this._validator(control);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
MaxValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
51
|
-
MaxValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
50
|
+
MaxValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
51
|
+
MaxValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: MaxValueNumberValidatorDirective, selector: "input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]", inputs: { maxValue: "maxValue" }, providers: [MAX_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MaxValueNumberValidatorDirective, decorators: [{
|
|
53
53
|
type: Directive,
|
|
54
54
|
args: [{
|
|
55
55
|
selector: 'input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]',
|
|
@@ -47,9 +47,9 @@ export class MinValueNumberValidatorDirective {
|
|
|
47
47
|
return this._validator(control);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
MinValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
51
|
-
MinValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
50
|
+
MinValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MinValueNumberValidatorDirective, deps: [{ token: 'minValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
51
|
+
MinValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", 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 });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
|
|
53
53
|
type: Directive,
|
|
54
54
|
args: [{
|
|
55
55
|
selector: 'input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]',
|
package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js
CHANGED
|
@@ -24,16 +24,20 @@ export class NumberInputControlValueAccessor {
|
|
|
24
24
|
* Method that is called when picker was touched
|
|
25
25
|
*/
|
|
26
26
|
this.onTouched = () => { };
|
|
27
|
+
/**
|
|
28
|
+
* Indication whether is number input disabled
|
|
29
|
+
*/
|
|
30
|
+
this.disabled = false;
|
|
27
31
|
}
|
|
28
32
|
//######################### public methods - implementation of ControlValueAccessor #########################
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
34
|
+
* @inheritdoc
|
|
31
35
|
*/
|
|
32
36
|
writeValue(value) {
|
|
33
37
|
this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
|
-
*
|
|
40
|
+
* @inheritdoc
|
|
37
41
|
*/
|
|
38
42
|
registerOnChange(fn) {
|
|
39
43
|
this.onChange = (value) => {
|
|
@@ -51,15 +55,21 @@ export class NumberInputControlValueAccessor {
|
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
54
|
-
*
|
|
58
|
+
* @inheritdoc
|
|
55
59
|
*/
|
|
56
60
|
registerOnTouched(fn) {
|
|
57
61
|
this.onTouched = fn;
|
|
58
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* @inheritdoc
|
|
65
|
+
*/
|
|
66
|
+
setDisabledState(isDisabled) {
|
|
67
|
+
this.disabled = isDisabled;
|
|
68
|
+
}
|
|
59
69
|
}
|
|
60
|
-
NumberInputControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
61
|
-
NumberInputControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
70
|
+
NumberInputControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
71
|
+
NumberInputControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", 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 });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
|
|
63
73
|
type: Directive,
|
|
64
74
|
args: [{
|
|
65
75
|
selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
|
|
@@ -67,7 +77,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
67
77
|
host: {
|
|
68
78
|
'(change)': 'onChange($event.target.value)',
|
|
69
79
|
'(input)': 'onChange($event.target.value)',
|
|
70
|
-
'(blur)': 'onTouched()'
|
|
80
|
+
'(blur)': 'onTouched()',
|
|
81
|
+
'[disabled]': 'disabled',
|
|
71
82
|
}
|
|
72
83
|
}]
|
|
73
84
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
package/es2020/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;IAgBxC,iEAAiE;IACjE,YAAoB,SAAoB,EAAU,WAAuB;QAArD,cAAS,GAAT,SAAS,CAAW;QAAU,gBAAW,GAAX,WAAW,CAAY;QAfzE,uEAAuE;QAEhE,aAAQ,GAAG,CAAC,CAAM,EAAE,EAAE,GAAE,CAAC,CAAC;QAEjC;;WAEG;QACI,cAAS,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QAE5B;;WAEG;QACI,aAAQ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;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"]}
|
|
@@ -24,9 +24,9 @@ export class NumberInputValidatorDirective {
|
|
|
24
24
|
return Validators.number(control);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
NumberInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
28
|
-
NumberInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
27
|
+
NumberInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
28
|
+
NumberInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: NumberInputValidatorDirective, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", providers: [NUMBER_VALIDATOR], ngImport: i0 });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{
|
|
32
32
|
selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
|
|
@@ -38,9 +38,9 @@ export class RequiredClassDirective {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
RequiredClassDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
42
|
-
RequiredClassDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
41
|
+
RequiredClassDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RequiredClassDirective, deps: [{ token: i1.FormControlDirective, optional: true }, { token: i1.FormControlName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
42
|
+
RequiredClassDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: RequiredClassDirective, selector: "[requiredClass]", host: { properties: { "class.required": "this.required" } }, ngImport: i0 });
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RequiredClassDirective, decorators: [{
|
|
44
44
|
type: Directive,
|
|
45
45
|
args: [{
|
|
46
46
|
selector: '[requiredClass]'
|
package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js
CHANGED
|
@@ -11,9 +11,9 @@ export class ValidationErrorsContainerDirective {
|
|
|
11
11
|
containerView.viewContainer = viewContainer;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
ValidationErrorsContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
15
|
-
ValidationErrorsContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
14
|
+
ValidationErrorsContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ValidationErrorsContainerDirective, deps: [{ token: i1.ValidationErrorsContainerView, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
+
ValidationErrorsContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ValidationErrorsContainerDirective, selector: "[validationErrorsContainer]", ngImport: i0 });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ValidationErrorsContainerDirective, decorators: [{
|
|
17
17
|
type: Directive,
|
|
18
18
|
args: [{
|
|
19
19
|
selector: '[validationErrorsContainer]'
|
package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js
CHANGED
|
@@ -55,9 +55,9 @@ export class GroupErrorsComponent {
|
|
|
55
55
|
this._initSubscriptions = null;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
GroupErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
59
|
-
GroupErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
58
|
+
GroupErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupErrorsComponent, deps: [{ token: i1.FormGroupDirective, optional: true }, { token: i1.FormGroupName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
+
GroupErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", 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.KeysPipe, name: "keys" }, { kind: "pipe", type: i5.WithErrorMessagePipe, name: "withErrorMessage" }], animations: [slideInOutTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupErrorsComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
62
|
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>" }]
|
|
63
63
|
}], ctorParameters: function () { return [{ type: i1.FormGroupDirective, decorators: [{
|