@anglr/common 20.0.0-beta.20240529082303 → 20.0.0-beta.20240530103148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +66 -0
- package/es2022/date-fns/src/misc/utils.js.map +1 -1
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +14 -24
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -24
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -28
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +14 -14
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +5 -4
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +72 -111
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +13 -15
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +32 -27
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +5 -4
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/index.js +0 -1
- package/es2022/forms/src/index.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupAsyncValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/invalidateOnChange.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/modelPropertyMetadata.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/requiredIf.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js +0 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js +0 -4
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
- package/es2022/forms/src/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/validationErrorsContainerView.js +7 -9
- package/es2022/forms/src/misc/validationErrorsContainerView.js.map +1 -1
- package/es2022/forms/src/misc/validators.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +7 -29
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +8 -20
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -4
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +6 -6
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -4
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js +5 -5
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/hasError.module.js +6 -17
- package/es2022/forms/src/modules/hasError.module.js.map +1 -1
- package/es2022/forms/src/modules/numberInput.module.js +5 -5
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -10
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -4
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
- package/es2022/forms/src/services/submitted/submitted.service.js +14 -12
- package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -24
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +18 -21
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +20 -26
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -10
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +3 -10
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +37 -38
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +10 -16
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +6 -6
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +5 -5
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/material/src/modules/movableTitledDialog.module.js +6 -6
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +6 -6
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -5
- package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js +5 -5
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js.map +1 -1
- package/es2022/moment/src/misc/utils.js.map +1 -1
- package/es2022/moment/src/modules/moment.module.js +5 -5
- package/es2022/moment/src/modules/moment.module.js.map +1 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
- package/es2022/router/src/decorators/componentRedirectRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/componentRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/moduleRoutes.decorator.js.map +1 -1
- package/es2022/router/src/misc/utils.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouter.js +16 -17
- package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouterData.js +3 -8
- package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +20 -22
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +18 -20
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
- package/es2022/src/decorators/asSignal/asSignal.decorator.js.map +1 -1
- package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
- package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +4 -23
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +27 -39
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +33 -48
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +4 -5
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +13 -27
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +20 -45
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -5
- package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +8 -9
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
- package/es2022/src/modules/commonDynamic.module.js +4 -4
- package/es2022/src/modules/commonDynamic.module.js.map +1 -1
- package/es2022/src/modules/commonLocalize.module.js +4 -4
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +21 -21
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +3 -5
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +4 -4
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +10 -8
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/logger/components/console/console.component.js +16 -23
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/decorators/loggerSink.decorator.js.map +1 -1
- package/es2022/src/modules/logger/misc/utils.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +18 -16
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js +7 -5
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +8 -8
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js.map +1 -1
- package/es2022/src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.js.map +1 -1
- package/es2022/src/modules/logger/services/logger/logger.service.js +3 -4
- package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/rest.sink.js +17 -21
- package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/restSink.options.js +16 -16
- package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js +0 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerConfiguration.js +8 -17
- package/es2022/src/modules/logger/types/loggerConfiguration.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerOptions.js +30 -28
- package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
- package/es2022/src/modules/logger/types/messageLog.js +5 -18
- package/es2022/src/modules/logger/types/messageLog.js.map +1 -1
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +33 -46
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +4 -4
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -21
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +7 -45
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -4
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +6 -6
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +29 -30
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js +9 -9
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +16 -31
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +20 -77
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -4
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -5
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -4
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +3 -3
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +3 -18
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/index.js +1 -0
- package/es2022/src/pipes/index.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -4
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -4
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +4 -4
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/localize/localize.pipe.js +3 -10
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.js +8 -15
- package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js +3 -3
- package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -1
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +8 -9
- package/es2022/src/services/cookies/cookies.service.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +24 -25
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/notifications/notifications.interface.js +0 -3
- package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
- package/es2022/src/services/notifications/notificationsOptions.js +5 -5
- package/es2022/src/services/notifications/notificationsOptions.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -4
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/position/position.interface.js.map +1 -1
- package/es2022/src/services/statusCode/statusCode.service.js +3 -8
- package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +10 -8
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +10 -8
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
- package/es2022/src/utils/index.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +5 -5
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html +9 -3
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
- package/forms/src/directives/hasError/hasError.directive.d.ts +24 -32
- package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts +14 -12
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
- package/forms/src/index.d.ts +0 -1
- package/forms/src/index.d.ts.map +1 -1
- package/forms/src/modules/hasError.module.d.ts +1 -5
- package/forms/src/modules/hasError.module.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts +3 -3
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.html +13 -7
- package/lerna.json +4 -0
- package/package.json +54 -57
- package/readme.md +0 -1
- package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts +3 -3
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts +3 -3
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
- package/src/directives/bodyRender/bodyRender.directive.d.ts +3 -3
- package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +3 -3
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/src/directives/goBack/goBack.directive.d.ts +3 -3
- package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
- package/src/directives/positionTo/positionTo.directive.d.ts +2 -2
- package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/modules/commonUtils.module.d.ts +1 -1
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +3 -3
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts +3 -3
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
- package/src/pipes/index.d.ts +1 -0
- package/src/pipes/index.d.ts.map +1 -1
- package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
- package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
- package/src/pipes/isPresent/isPresent.pipe.d.ts +3 -3
- package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +3 -3
- package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts +4 -4
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts.map +1 -1
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
- package/src/services/position/position.interface.d.ts +10 -10
- package/src/services/position/position.interface.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2022/forms/src/modules/requiredClass.module.js +0 -19
- package/es2022/forms/src/modules/requiredClass.module.js.map +0 -1
- package/es2022/numeral/src/index.js +0 -2
- package/es2022/numeral/src/index.js.map +0 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +0 -1
- package/forms/src/modules/requiredClass.module.d.ts +0 -11
- package/forms/src/modules/requiredClass.module.d.ts.map +0 -1
- package/numeral/package.json +0 -8
- package/numeral/src/index.d.ts +0 -2
- package/numeral/src/index.d.ts.map +0 -1
package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js
CHANGED
|
@@ -8,54 +8,16 @@ import * as i1 from "../../services/progressIndicator.service";
|
|
|
8
8
|
* Directive that is used for displaying progress indicator as overlay
|
|
9
9
|
*/
|
|
10
10
|
export class ProgressOverlayDirective {
|
|
11
|
-
_service;
|
|
12
|
-
_element;
|
|
13
|
-
_document;
|
|
14
|
-
_localizationSvc;
|
|
15
|
-
//######################### private fields #########################
|
|
16
|
-
/**
|
|
17
|
-
* Previous css position value
|
|
18
|
-
*/
|
|
19
|
-
_notRunningCssPosition;
|
|
20
|
-
/**
|
|
21
|
-
* Previous css overflow value
|
|
22
|
-
*/
|
|
23
|
-
_notRunningOverflow;
|
|
24
|
-
/**
|
|
25
|
-
* Subscription for changes in ProgressIndicatorService
|
|
26
|
-
*/
|
|
27
|
-
_subscription;
|
|
28
|
-
/**
|
|
29
|
-
* Array of messages that should be displayed
|
|
30
|
-
*/
|
|
31
|
-
_messages;
|
|
32
|
-
/**
|
|
33
|
-
* Indication that this progress indicator is running
|
|
34
|
-
*/
|
|
35
|
-
_running;
|
|
36
|
-
/**
|
|
37
|
-
* Element that is displaying progress indicator overlay
|
|
38
|
-
*/
|
|
39
|
-
_progressElement;
|
|
40
|
-
/**
|
|
41
|
-
* Html messages element
|
|
42
|
-
*/
|
|
43
|
-
_messagesElement;
|
|
44
|
-
/**
|
|
45
|
-
* Html message elements, last three
|
|
46
|
-
*/
|
|
47
|
-
_lastThreeMessages = [];
|
|
48
|
-
//######################### public properties - inputs #########################
|
|
49
|
-
/**
|
|
50
|
-
* Name of progress indicator group
|
|
51
|
-
*/
|
|
52
|
-
name;
|
|
53
11
|
//######################### constructor #########################
|
|
54
12
|
constructor(_service, _element, _document, _localizationSvc) {
|
|
55
13
|
this._service = _service;
|
|
56
14
|
this._element = _element;
|
|
57
15
|
this._document = _document;
|
|
58
16
|
this._localizationSvc = _localizationSvc;
|
|
17
|
+
/**
|
|
18
|
+
* Html message elements, last three
|
|
19
|
+
*/
|
|
20
|
+
this._lastThreeMessages = [];
|
|
59
21
|
}
|
|
60
22
|
//######################### public methods - implementation of OnInit #########################
|
|
61
23
|
/**
|
|
@@ -141,10 +103,10 @@ export class ProgressOverlayDirective {
|
|
|
141
103
|
});
|
|
142
104
|
}
|
|
143
105
|
}
|
|
144
|
-
static
|
|
145
|
-
static
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressOverlayDirective, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: STRING_LOCALIZATION }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: ProgressOverlayDirective, selector: "[progressOverlay]", inputs: { name: ["progressOverlay", "name"] }, ngImport: i0 }); }
|
|
146
108
|
}
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressOverlayDirective, decorators: [{
|
|
148
110
|
type: Directive,
|
|
149
111
|
args: [{
|
|
150
112
|
selector: '[progressOverlay]'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressOverlay.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAqB,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;;;AAG7D;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAqDb;IACA;IACkB;IACW;IAtDjD,oEAAoE;IAEpE;;OAEG;IACK,sBAAsB,CAAS;IAEvC;;OAEG;IACK,mBAAmB,CAAS;IAEpC;;O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kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAEzC,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAEzD,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAE5B,MAAM,CAAC,SAAS,GAAG,aAAa,CAAC;YACrC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAE3C,GAAG,CAAC,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC;YACvC,CAAC,CAAC,CAAC;SACN;IACL,CAAC;uGAlLQ,wBAAwB,oFAuDb,QAAQ,aACR,mBAAmB;2FAxD9B,wBAAwB;;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC;;0BAwDgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,mBAAmB;yCANhC,IAAI;sBADV,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, Input, OnInit, OnDestroy, ElementRef, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../../services/progressIndicator.service';\nimport {STRING_LOCALIZATION} from '../../../../types/tokens';\nimport {StringLocalization} from '../../../../services/stringLocalization';\n\n/**\n * Directive that is used for displaying progress indicator as overlay\n */\n@Directive(\n{\n selector: '[progressOverlay]'\n})\nexport class ProgressOverlayDirective implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Previous css position value\n */\n private _notRunningCssPosition: string;\n\n /**\n * Previous css overflow value\n */\n private _notRunningOverflow: string;\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n /**\n * Array of messages that should be displayed\n */\n private _messages: string[];\n\n /**\n * Indication that this progress indicator is running\n */\n private _running: boolean;\n\n /**\n * Element that is displaying progress indicator overlay\n */\n private _progressElement: HTMLDivElement;\n\n /**\n * Html messages element\n */\n private _messagesElement: HTMLDivElement;\n\n /**\n * Html message elements, last three\n */\n private _lastThreeMessages: HTMLDivElement[] = [];\n\n //######################### public properties - inputs #########################\n\n /**\n * Name of progress indicator group\n */\n @Input('progressOverlay')\n public name: string;\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n @Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._service.registerOverlayGroup(this.name);\n\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n\n this._subscription = this._service.stateChange.subscribe(name => \n {\n if(name == this.name)\n {\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\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._service.unregisterOverlayGroup(this.name);\n\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Renders progress overlay\n */\n private _renderProgressOverlay()\n {\n //removes progress indicator\n if(this._progressElement && !this._running)\n {\n this._progressElement.remove();\n this._progressElement = null;\n this._messagesElement = null;\n this._lastThreeMessages = [];\n\n this._element.nativeElement.style.position = this._notRunningCssPosition;\n this._notRunningCssPosition = null;\n this._element.nativeElement.style.overflow = this._notRunningOverflow;\n this._notRunningOverflow = null;\n }\n //adds progress indicator\n else if(!this._progressElement && this._running)\n {\n this._notRunningCssPosition = this._element.nativeElement.style.position;\n this._element.nativeElement.style.position = 'relative';\n this._notRunningOverflow = this._element.nativeElement.style.overflow;\n this._element.nativeElement.style.overflow = 'hidden';\n\n this._progressElement = this._document.createElement('div');\n this._progressElement.className = 'progress-overlay-div';\n\n const spinner = this._document.createElement('div');\n spinner.className = 'spinner';\n this._progressElement.append(spinner);\n\n this._messagesElement = this._document.createElement('div');\n this._messagesElement.className = 'messages';\n this._progressElement.append(this._messagesElement);\n\n this._element.nativeElement.append(this._progressElement);\n\n }\n\n this._renderProgressMessages();\n }\n\n /**\n * Renders messages to progress overlay\n */\n private _renderProgressMessages()\n {\n if(!this._messagesElement)\n {\n return;\n }\n\n const newMessages = this._messages.slice(this._messagesElement.childNodes.length);\n\n for(const message of newMessages)\n {\n const messageDiv = this._document.createElement('div');\n messageDiv.textContent = this._localizationSvc.get(message);\n\n this._lastThreeMessages.unshift(messageDiv);\n this._messagesElement.append(messageDiv);\n \n const outMessagesDiv = this._lastThreeMessages.splice(3);\n\n outMessagesDiv.forEach(outMsg =>\n {\n outMsg.className = 'message-out';\n });\n\n this._lastThreeMessages.forEach((msg, index) =>\n {\n msg.className = `message-${index}`;\n });\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"progressOverlay.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAqB,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;;;AAG7D;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAoDjC,iEAAiE;IACjE,YAAoB,QAAkC,EAClC,QAAiC,EACf,SAAmB,EACR,gBAAoC;QAHjE,aAAQ,GAAR,QAAQ,CAA0B;QAClC,aAAQ,GAAR,QAAQ,CAAyB;QACf,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C;YACrC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAE3C,GAAG,CAAC,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC;YACvC,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;8GAlLQ,wBAAwB,oFAuDb,QAAQ,aACR,mBAAmB;kGAxD9B,wBAAwB;;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC;;0BAwDgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,mBAAmB;yCANhC,IAAI;sBADV,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, Input, OnInit, OnDestroy, ElementRef, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../../services/progressIndicator.service';\nimport {STRING_LOCALIZATION} from '../../../../types/tokens';\nimport {StringLocalization} from '../../../../services/stringLocalization';\n\n/**\n * Directive that is used for displaying progress indicator as overlay\n */\n@Directive(\n{\n selector: '[progressOverlay]'\n})\nexport class ProgressOverlayDirective implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Previous css position value\n */\n private _notRunningCssPosition: string;\n\n /**\n * Previous css overflow value\n */\n private _notRunningOverflow: string;\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n /**\n * Array of messages that should be displayed\n */\n private _messages: string[];\n\n /**\n * Indication that this progress indicator is running\n */\n private _running: boolean;\n\n /**\n * Element that is displaying progress indicator overlay\n */\n private _progressElement: HTMLDivElement;\n\n /**\n * Html messages element\n */\n private _messagesElement: HTMLDivElement;\n\n /**\n * Html message elements, last three\n */\n private _lastThreeMessages: HTMLDivElement[] = [];\n\n //######################### public properties - inputs #########################\n\n /**\n * Name of progress indicator group\n */\n @Input('progressOverlay')\n public name: string;\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n @Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._service.registerOverlayGroup(this.name);\n\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n\n this._subscription = this._service.stateChange.subscribe(name => \n {\n if(name == this.name)\n {\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\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._service.unregisterOverlayGroup(this.name);\n\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Renders progress overlay\n */\n private _renderProgressOverlay()\n {\n //removes progress indicator\n if(this._progressElement && !this._running)\n {\n this._progressElement.remove();\n this._progressElement = null;\n this._messagesElement = null;\n this._lastThreeMessages = [];\n\n this._element.nativeElement.style.position = this._notRunningCssPosition;\n this._notRunningCssPosition = null;\n this._element.nativeElement.style.overflow = this._notRunningOverflow;\n this._notRunningOverflow = null;\n }\n //adds progress indicator\n else if(!this._progressElement && this._running)\n {\n this._notRunningCssPosition = this._element.nativeElement.style.position;\n this._element.nativeElement.style.position = 'relative';\n this._notRunningOverflow = this._element.nativeElement.style.overflow;\n this._element.nativeElement.style.overflow = 'hidden';\n\n this._progressElement = this._document.createElement('div');\n this._progressElement.className = 'progress-overlay-div';\n\n const spinner = this._document.createElement('div');\n spinner.className = 'spinner';\n this._progressElement.append(spinner);\n\n this._messagesElement = this._document.createElement('div');\n this._messagesElement.className = 'messages';\n this._progressElement.append(this._messagesElement);\n\n this._element.nativeElement.append(this._progressElement);\n\n }\n\n this._renderProgressMessages();\n }\n\n /**\n * Renders messages to progress overlay\n */\n private _renderProgressMessages()\n {\n if(!this._messagesElement)\n {\n return;\n }\n\n const newMessages = this._messages.slice(this._messagesElement.childNodes.length);\n\n for(const message of newMessages)\n {\n const messageDiv = this._document.createElement('div');\n messageDiv.textContent = this._localizationSvc.get(message);\n\n this._lastThreeMessages.unshift(messageDiv);\n this._messagesElement.append(messageDiv);\n \n const outMessagesDiv = this._lastThreeMessages.splice(3);\n\n outMessagesDiv.forEach(outMsg =>\n {\n outMsg.className = 'message-out';\n });\n\n this._lastThreeMessages.forEach((msg, index) =>\n {\n msg.className = `message-${index}`;\n });\n }\n }\n}"]}
|
|
@@ -10,7 +10,6 @@ import * as i1 from "../services/progressIndicator.service";
|
|
|
10
10
|
* ProgressInterceptor used for intercepting http requests and displaying progress indicatior
|
|
11
11
|
*/
|
|
12
12
|
export class ProgressInterceptor {
|
|
13
|
-
_indicatorSvc;
|
|
14
13
|
//######################### constructors #########################
|
|
15
14
|
constructor(_indicatorSvc) {
|
|
16
15
|
this._indicatorSvc = _indicatorSvc;
|
|
@@ -38,10 +37,10 @@ export class ProgressInterceptor {
|
|
|
38
37
|
}
|
|
39
38
|
}, () => this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME))));
|
|
40
39
|
}
|
|
41
|
-
static
|
|
42
|
-
static
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressInterceptor, deps: [{ token: i1.ProgressIndicatorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressInterceptor }); }
|
|
43
42
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressInterceptor, decorators: [{
|
|
45
44
|
type: Injectable
|
|
46
45
|
}], ctorParameters: () => [{ type: i1.ProgressIndicatorService }] });
|
|
47
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressInterceptor.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/interceptors/progressInterceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,eAAe,CAAC;AACxD,OAAO,EAA0C,aAAa,EAAE,iBAAiB,EAAc,MAAM,sBAAsB,CAAC;AAC5H,OAAO,EAAa,GAAG,EAAC,MAAM,MAAM,CAAC;AAErC,OAAO,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAC,6BAA6B,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;;;AAE3D;;GAEG;AAEH,MAAM,OAAO,mBAAmB;
|
|
1
|
+
{"version":3,"file":"progressInterceptor.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/interceptors/progressInterceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,eAAe,CAAC;AACxD,OAAO,EAA0C,aAAa,EAAE,iBAAiB,EAAc,MAAM,sBAAsB,CAAC;AAC5H,OAAO,EAAa,GAAG,EAAC,MAAM,MAAM,CAAC;AAErC,OAAO,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAC,6BAA6B,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;;;AAE3D;;GAEG;AAEH,MAAM,OAAO,mBAAmB;IAE5B,kEAAkE;IAClE,YAAoB,aAAuC;QAAvC,kBAAa,GAAb,aAAa,CAA0B;IAE3D,CAAC;IAED,wGAAwG;IAExG;;;;OAIG;IACI,SAAS,CAAC,GAAyB,EAAE,IAAiB;QAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;aAClB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YAEd,wBAAwB;YACxB,IAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,mBAAmB,CAAC,EAChF,CAAC;gBACG,OAAO;YACX,CAAC;YAED,iBAAiB;YACjB,IAAG,KAAK,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,EACnC,CAAC;gBACG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACpF,CAAC;YACD,mBAAmB;iBACd,IAAG,KAAK,CAAC,IAAI,IAAI,aAAa,CAAC,QAAQ,EAC5C,CAAC;gBACG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACpF,CAAC;QACL,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC;8GApCQ,mBAAmB;kHAAnB,mBAAmB;;2FAAnB,mBAAmB;kBAD/B,UAAU;;AAwCX;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAC1C;IACI,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,IAAI;CACd,CAAC","sourcesContent":["import {Injectable, ClassProvider} from '@angular/core';\nimport {HttpEvent, HttpInterceptor, HttpHandler, HttpEventType, HTTP_INTERCEPTORS, HttpRequest} from '@angular/common/http';\nimport {Observable, tap} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../services/progressIndicator.service';\nimport {PROGRESS_INDICATOR_GROUP_NAME} from '../misc/tokens';\nimport {IGNORED_INTERCEPTORS} from '../../../types/tokens';\n\n/**\n * ProgressInterceptor used for intercepting http requests and displaying progress indicatior\n */\n@Injectable()\nexport class ProgressInterceptor implements HttpInterceptor\n{\n //######################### constructors #########################\n constructor(private _indicatorSvc: ProgressIndicatorService)\n {\n }\n\n //######################### public methods - implementation of HttpInterceptor #########################\n\n /**\n * Intercepts http request\n * @param req - Request to be intercepted\n * @param next - Next middleware that can be called for next processing\n */\n public intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>\n {\n return next.handle(req)\n .pipe(tap(event =>\n {\n //interceptor is ignored\n if(req.context.get(IGNORED_INTERCEPTORS).some(itm => itm == ProgressInterceptor))\n {\n return;\n }\n\n //request started\n if(event.type == HttpEventType.Sent)\n {\n this._indicatorSvc.showProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME));\n }\n //response received\n else if(event.type == HttpEventType.Response)\n {\n this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME));\n }\n }, () => this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME))));\n }\n}\n\n/**\n * Progress interceptor provider\n */\nexport const PROGRESS_INTERCEPTOR_PROVIDER: ClassProvider = \n{\n provide: HTTP_INTERCEPTORS, \n useClass: ProgressInterceptor, \n multi: true\n};"]}
|
|
@@ -8,15 +8,15 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* Module for progress indicator
|
|
9
9
|
*/
|
|
10
10
|
export class ProgressIndicatorModule {
|
|
11
|
-
static
|
|
12
|
-
static
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorModule, declarations: [ProgressIndicatorComponent,
|
|
13
13
|
ProgressOverlayDirective], imports: [CommonModule,
|
|
14
14
|
CommonLocalizeModule], exports: [ProgressIndicatorComponent,
|
|
15
|
-
ProgressOverlayDirective] });
|
|
16
|
-
static
|
|
17
|
-
CommonLocalizeModule] });
|
|
15
|
+
ProgressOverlayDirective] }); }
|
|
16
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorModule, imports: [CommonModule,
|
|
17
|
+
CommonLocalizeModule] }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorModule, decorators: [{
|
|
20
20
|
type: NgModule,
|
|
21
21
|
args: [{
|
|
22
22
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressIndicator.module.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/modules/progressIndicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6DAA6D,CAAC;AACvG,OAAO,EAAC,wBAAwB,EAAC,MAAM,yDAAyD,CAAC;;AAEjG;;GAEG;AAmBH,MAAM,OAAO,uBAAuB;
|
|
1
|
+
{"version":3,"file":"progressIndicator.module.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/modules/progressIndicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6DAA6D,CAAC;AACvG,OAAO,EAAC,wBAAwB,EAAC,MAAM,yDAAyD,CAAC;;AAEjG;;GAEG;AAmBH,MAAM,OAAO,uBAAuB;8GAAvB,uBAAuB;+GAAvB,uBAAuB,iBAT5B,0BAA0B;YAC1B,wBAAwB,aANxB,YAAY;YACZ,oBAAoB,aASpB,0BAA0B;YAC1B,wBAAwB;+GAGnB,uBAAuB,YAd5B,YAAY;YACZ,oBAAoB;;2FAaf,uBAAuB;kBAlBnC,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;wBACZ,oBAAoB;qBACvB;oBACD,YAAY,EACZ;wBACI,0BAA0B;wBAC1B,wBAAwB;qBAC3B;oBACD,OAAO,EACP;wBACI,0BAA0B;wBAC1B,wBAAwB;qBAC3B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {CommonLocalizeModule} from '../../commonLocalize.module';\nimport {ProgressIndicatorComponent} from '../components/progressIndicator/progressIndicator.component';\nimport {ProgressOverlayDirective} from '../directives/progressOverlay/progressOverlay.directive';\n\n/**\n * Module for progress indicator\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n CommonLocalizeModule,\n ],\n declarations:\n [\n ProgressIndicatorComponent,\n ProgressOverlayDirective\n ],\n exports:\n [\n ProgressIndicatorComponent,\n ProgressOverlayDirective\n ]\n})\nexport class ProgressIndicatorModule\n{\n}"]}
|
|
@@ -13,33 +13,6 @@ export const DEFAULT_PROGRESS_NAME = 'GLOBAL_PROGRESS';
|
|
|
13
13
|
* Service that is used for displaying and hiding progress indicator
|
|
14
14
|
*/
|
|
15
15
|
export class ProgressIndicatorService {
|
|
16
|
-
config;
|
|
17
|
-
//######################### private fields #########################
|
|
18
|
-
/**
|
|
19
|
-
* Indication that current code is running in browser
|
|
20
|
-
*/
|
|
21
|
-
_isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
22
|
-
/**
|
|
23
|
-
* Information about running progress for each group
|
|
24
|
-
*/
|
|
25
|
-
_runningRequests = {};
|
|
26
|
-
/**
|
|
27
|
-
* Used for invoking stateChange when state of one of progress groups have changed, passing name of group as parameter
|
|
28
|
-
*/
|
|
29
|
-
_stateChange = new Subject();
|
|
30
|
-
/**
|
|
31
|
-
* Object storing registered overlay groups
|
|
32
|
-
*/
|
|
33
|
-
_registeredOverlays = {};
|
|
34
|
-
//######################### public properties #########################
|
|
35
|
-
/**
|
|
36
|
-
* Indications that progress is running for each group
|
|
37
|
-
*/
|
|
38
|
-
running = {};
|
|
39
|
-
/**
|
|
40
|
-
* Messages for each group
|
|
41
|
-
*/
|
|
42
|
-
messages = {};
|
|
43
16
|
/**
|
|
44
17
|
* Occurs when state of one of progress groups have changed, passing name of group as parameter
|
|
45
18
|
*/
|
|
@@ -49,6 +22,32 @@ export class ProgressIndicatorService {
|
|
|
49
22
|
//######################### constructors #########################
|
|
50
23
|
constructor(config) {
|
|
51
24
|
this.config = config;
|
|
25
|
+
//######################### private fields #########################
|
|
26
|
+
/**
|
|
27
|
+
* Indication that current code is running in browser
|
|
28
|
+
*/
|
|
29
|
+
this._isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
30
|
+
/**
|
|
31
|
+
* Information about running progress for each group
|
|
32
|
+
*/
|
|
33
|
+
this._runningRequests = {};
|
|
34
|
+
/**
|
|
35
|
+
* Used for invoking stateChange when state of one of progress groups have changed, passing name of group as parameter
|
|
36
|
+
*/
|
|
37
|
+
this._stateChange = new Subject();
|
|
38
|
+
/**
|
|
39
|
+
* Object storing registered overlay groups
|
|
40
|
+
*/
|
|
41
|
+
this._registeredOverlays = {};
|
|
42
|
+
//######################### public properties #########################
|
|
43
|
+
/**
|
|
44
|
+
* Indications that progress is running for each group
|
|
45
|
+
*/
|
|
46
|
+
this.running = {};
|
|
47
|
+
/**
|
|
48
|
+
* Messages for each group
|
|
49
|
+
*/
|
|
50
|
+
this.messages = {};
|
|
52
51
|
if (config && !(config instanceof ProgressIndicatorOptions)) {
|
|
53
52
|
this.config = undefined;
|
|
54
53
|
console.warn('Provided configuration for \'ProgressIndicatorService\' is not of type \'ProgressIndicatorOptions\' and will be ignored!');
|
|
@@ -240,10 +239,10 @@ export class ProgressIndicatorService {
|
|
|
240
239
|
this._runningRequests[name] = group;
|
|
241
240
|
return group;
|
|
242
241
|
}
|
|
243
|
-
static
|
|
244
|
-
static
|
|
242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorService, deps: [{ token: i1.ProgressIndicatorOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
243
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorService, providedIn: 'root' }); }
|
|
245
244
|
}
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProgressIndicatorService, decorators: [{
|
|
247
246
|
type: Injectable,
|
|
248
247
|
args: [{ providedIn: 'root' }]
|
|
249
248
|
}], ctorParameters: () => [{ type: i1.ProgressIndicatorOptions, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressIndicator.service.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicator.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,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AC,UAAU,EAAE,MAAM,EAAC;;0BA8Cf,QAAQ","sourcesContent":["import {Optional, Injectable, PLATFORM_ID, inject} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\nimport {isPresent, isBoolean, isBlank} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ProgressIndicatorOptions} from './progressIndicatorOptions';\n\n/**\n * Name of group for global progress indicator\n */\nexport const DEFAULT_PROGRESS_NAME = 'GLOBAL_PROGRESS';\n\n/**\n * Description of running requests group\n */\ninterface RunningProgressGroup\n{\n /**\n * Number of currently running requests for this progress group\n */\n runningRequests: number;\n\n /**\n * Indication that progress is running for this progress group\n */\n running: boolean;\n\n /**\n * Array of messages to be displayed for this progress group\n */\n messages?: string[];\n\n /**\n * Id of running timeout for this progress group\n */\n timeout?: any;\n}\n\n/**\n * Service that is used for displaying and hiding progress indicator\n */\n@Injectable({providedIn: 'root'})\nexport class ProgressIndicatorService\n{\n //######################### private fields #########################\n\n /**\n * Indication that current code is running in browser\n */\n private _isBrowser: boolean = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Information about running progress for each group\n */\n private _runningRequests: {[group: string]: RunningProgressGroup} = {};\n\n /**\n * Used for invoking stateChange when state of one of progress groups have changed, passing name of group as parameter\n */\n private _stateChange: Subject<string> = new Subject<string>();\n\n /**\n * Object storing registered overlay groups\n */\n private _registeredOverlays: {[group: string]: number} = {};\n\n //######################### public properties #########################\n\n /**\n * Indications that progress is running for each group\n */\n public running: {[group: string]: boolean} = {};\n\n /**\n * Messages for each group\n */\n public messages: {[group: string]: string[]} = {};\n\n /**\n * Occurs when state of one of progress groups have changed, passing name of group as parameter\n */\n public get stateChange(): Observable<string>\n {\n return this._stateChange.asObservable();\n }\n\n //######################### constructors #########################\n constructor(@Optional() public config?: ProgressIndicatorOptions)\n {\n if(config && !(config instanceof ProgressIndicatorOptions))\n {\n this.config = undefined;\n console.warn('Provided configuration for \\'ProgressIndicatorService\\' is not of type \\'ProgressIndicatorOptions\\' and will be ignored!');\n }\n\n this._runningRequests[DEFAULT_PROGRESS_NAME] =\n {\n runningRequests: 0,\n running: false,\n messages: undefined,\n timeout: null\n };\n\n this._updateState();\n\n this.config = config || new ProgressIndicatorOptions();\n }\n\n //######################### public methods #########################\n\n /**\n * Displays progress indicator after short delay\n */\n public showProgress(): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n */\n public showProgress(name: string): void;\n\n /**\n * Displays progress indicator after short delay\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(name: string, messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param nameOrMessages - Name of progress group (separate counter) or Array of messages to display what is happening\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(nameOrMessages?: string|string[], messages?: string[]): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrMessages))\n {\n if(Array.isArray(nameOrMessages))\n {\n messages = nameOrMessages;\n }\n else\n {\n name = nameOrMessages;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n group.messages = [...(group.messages || []), ...(messages && messages.length ? messages : [])];\n\n if(!group.timeout && group.runningRequests < 1)\n {\n group.timeout = setTimeout(() =>\n {\n this._onRunning(name, true, group.messages);\n\n clearTimeout(group.timeout);\n group.timeout = null;\n }, this.config.timeout);\n }\n\n group.runningRequests++;\n }\n\n /**\n * Hides progress indicator\n */\n public hideProgress(): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n */\n public hideProgress(name: string): void;\n\n /**\n * Hides progress indicator\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(name: string, force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param nameOrForce - Name of progress group (separate counter) or Indication that indicator should be hidden even if some processes are running\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(nameOrForce?: boolean | string, force?: boolean): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrForce))\n {\n if(isBoolean(nameOrForce))\n {\n force = nameOrForce as boolean;\n }\n else\n {\n name = nameOrForce as string;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n if(force)\n {\n group.runningRequests = 0;\n }\n\n if(group.runningRequests > 0)\n {\n group.runningRequests--;\n }\n\n if(group.runningRequests < 1)\n {\n clearTimeout(group.timeout);\n group.timeout = null;\n this._onRunning(name, false, null);\n }\n }\n\n /**\n * Adds message to progress indicator group\n * @param message - Message to display what is happening\n */\n public addMessage(message: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param name - Name of progress group (separate counter)\n * @param message - Message to display what is happening\n */\n public addMessage(name: string, message?: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param nameOrMessage - Name of progress group (separate counter) or Message to display what is happening\n * @param message - Message to display what is happening\n */\n public addMessage(nameOrMessage?: string, message?: string): void\n {\n let name: string = DEFAULT_PROGRESS_NAME;\n\n if(isPresent(message))\n {\n name = nameOrMessage;\n }\n else\n {\n message = nameOrMessage;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, [...(group.messages || []), message]);\n }\n\n /**\n * Clears all messages for progress group\n * @param name - Name of progress group (separate counter)\n */\n public clearMessages(name?: string): void\n {\n if(isBlank(name))\n {\n name = DEFAULT_PROGRESS_NAME;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, null);\n }\n\n /**\n * Registers overlay group\n * @param name - Name of group to be registered\n * @internal\n */\n public registerOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n this._registeredOverlays[name] = 0;\n }\n\n this._registeredOverlays[name]++;\n }\n\n /**\n * Unregisters overlay group\n * @param name - Name of group to be unregistered\n * @internal\n */\n public unregisterOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n return;\n }\n\n this._registeredOverlays[name]--;\n\n if(this._registeredOverlays[name] <= 0)\n {\n delete this._registeredOverlays[name];\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Gets name of group based on existance of this group\n * @param name - Name of group that is requested\n */\n private _getName(name: string): string\n {\n if(name == DEFAULT_PROGRESS_NAME || !this.config.fallbackToDefault)\n {\n return name;\n }\n\n if(this._registeredOverlays[name])\n {\n return name;\n }\n\n return DEFAULT_PROGRESS_NAME;\n }\n\n /**\n * Used for invoking 'stateChange' event\n * @param name - Name of group which has changes its state\n * @param value - Value whether is progress running\n * @param messages - Messages to be displayed for this group\n */\n private _onRunning(name: string, value: boolean, messages: string[])\n {\n const group = this._getGroup(name);\n\n group.running = value;\n group.messages = messages;\n\n this._updateState();\n this._stateChange.next(name);\n }\n\n /**\n * Updates state of progress indicator service\n */\n private _updateState()\n {\n const running: {[group: string]: boolean} = {};\n const messages: {[group: string]: string[]} = {};\n\n Object.keys(this._runningRequests).forEach(group =>\n {\n running[group] = this._runningRequests[group].running;\n messages[group] = this._runningRequests[group].messages;\n });\n\n this.running = running;\n this.messages = messages;\n }\n\n /**\n * Gets object for progress group\n * @param name - Name of group to be obtained\n */\n private _getGroup(name: string): RunningProgressGroup\n {\n let group = this._runningRequests[name];\n\n if(isPresent(group))\n {\n return group;\n }\n\n group =\n {\n runningRequests: 0,\n running: false,\n messages: null,\n timeout: null\n };\n\n this._runningRequests[name] = group;\n\n return group;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"progressIndicator.service.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicator.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EA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1B,IAAI,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAExC,IAAG,SAAS,CAAC,KAAK,CAAC,EACnB,CAAC;YACG,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,KAAK;YACL;gBACI,eAAe,EAAE,CAAC;gBAClB,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;aAChB,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAEpC,OAAO,KAAK,CAAC;IACjB,CAAC;8GA/XQ,wBAAwB;kHAAxB,wBAAwB,cADZ,MAAM;;2FAClB,wBAAwB;kBADpC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BA8Cf,QAAQ","sourcesContent":["import {Optional, Injectable, PLATFORM_ID, inject} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\nimport {isPresent, isBoolean, isBlank} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ProgressIndicatorOptions} from './progressIndicatorOptions';\n\n/**\n * Name of group for global progress indicator\n */\nexport const DEFAULT_PROGRESS_NAME = 'GLOBAL_PROGRESS';\n\n/**\n * Description of running requests group\n */\ninterface RunningProgressGroup\n{\n /**\n * Number of currently running requests for this progress group\n */\n runningRequests: number;\n\n /**\n * Indication that progress is running for this progress group\n */\n running: boolean;\n\n /**\n * Array of messages to be displayed for this progress group\n */\n messages?: string[];\n\n /**\n * Id of running timeout for this progress group\n */\n timeout?: any;\n}\n\n/**\n * Service that is used for displaying and hiding progress indicator\n */\n@Injectable({providedIn: 'root'})\nexport class ProgressIndicatorService\n{\n //######################### private fields #########################\n\n /**\n * Indication that current code is running in browser\n */\n private _isBrowser: boolean = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Information about running progress for each group\n */\n private _runningRequests: {[group: string]: RunningProgressGroup} = {};\n\n /**\n * Used for invoking stateChange when state of one of progress groups have changed, passing name of group as parameter\n */\n private _stateChange: Subject<string> = new Subject<string>();\n\n /**\n * Object storing registered overlay groups\n */\n private _registeredOverlays: {[group: string]: number} = {};\n\n //######################### public properties #########################\n\n /**\n * Indications that progress is running for each group\n */\n public running: {[group: string]: boolean} = {};\n\n /**\n * Messages for each group\n */\n public messages: {[group: string]: string[]} = {};\n\n /**\n * Occurs when state of one of progress groups have changed, passing name of group as parameter\n */\n public get stateChange(): Observable<string>\n {\n return this._stateChange.asObservable();\n }\n\n //######################### constructors #########################\n constructor(@Optional() public config?: ProgressIndicatorOptions)\n {\n if(config && !(config instanceof ProgressIndicatorOptions))\n {\n this.config = undefined;\n console.warn('Provided configuration for \\'ProgressIndicatorService\\' is not of type \\'ProgressIndicatorOptions\\' and will be ignored!');\n }\n\n this._runningRequests[DEFAULT_PROGRESS_NAME] =\n {\n runningRequests: 0,\n running: false,\n messages: undefined,\n timeout: null\n };\n\n this._updateState();\n\n this.config = config || new ProgressIndicatorOptions();\n }\n\n //######################### public methods #########################\n\n /**\n * Displays progress indicator after short delay\n */\n public showProgress(): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n */\n public showProgress(name: string): void;\n\n /**\n * Displays progress indicator after short delay\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(name: string, messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param nameOrMessages - Name of progress group (separate counter) or Array of messages to display what is happening\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(nameOrMessages?: string|string[], messages?: string[]): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrMessages))\n {\n if(Array.isArray(nameOrMessages))\n {\n messages = nameOrMessages;\n }\n else\n {\n name = nameOrMessages;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n group.messages = [...(group.messages || []), ...(messages && messages.length ? messages : [])];\n\n if(!group.timeout && group.runningRequests < 1)\n {\n group.timeout = setTimeout(() =>\n {\n this._onRunning(name, true, group.messages);\n\n clearTimeout(group.timeout);\n group.timeout = null;\n }, this.config.timeout);\n }\n\n group.runningRequests++;\n }\n\n /**\n * Hides progress indicator\n */\n public hideProgress(): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n */\n public hideProgress(name: string): void;\n\n /**\n * Hides progress indicator\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(name: string, force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param nameOrForce - Name of progress group (separate counter) or Indication that indicator should be hidden even if some processes are running\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(nameOrForce?: boolean | string, force?: boolean): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrForce))\n {\n if(isBoolean(nameOrForce))\n {\n force = nameOrForce as boolean;\n }\n else\n {\n name = nameOrForce as string;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n if(force)\n {\n group.runningRequests = 0;\n }\n\n if(group.runningRequests > 0)\n {\n group.runningRequests--;\n }\n\n if(group.runningRequests < 1)\n {\n clearTimeout(group.timeout);\n group.timeout = null;\n this._onRunning(name, false, null);\n }\n }\n\n /**\n * Adds message to progress indicator group\n * @param message - Message to display what is happening\n */\n public addMessage(message: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param name - Name of progress group (separate counter)\n * @param message - Message to display what is happening\n */\n public addMessage(name: string, message?: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param nameOrMessage - Name of progress group (separate counter) or Message to display what is happening\n * @param message - Message to display what is happening\n */\n public addMessage(nameOrMessage?: string, message?: string): void\n {\n let name: string = DEFAULT_PROGRESS_NAME;\n\n if(isPresent(message))\n {\n name = nameOrMessage;\n }\n else\n {\n message = nameOrMessage;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, [...(group.messages || []), message]);\n }\n\n /**\n * Clears all messages for progress group\n * @param name - Name of progress group (separate counter)\n */\n public clearMessages(name?: string): void\n {\n if(isBlank(name))\n {\n name = DEFAULT_PROGRESS_NAME;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, null);\n }\n\n /**\n * Registers overlay group\n * @param name - Name of group to be registered\n * @internal\n */\n public registerOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n this._registeredOverlays[name] = 0;\n }\n\n this._registeredOverlays[name]++;\n }\n\n /**\n * Unregisters overlay group\n * @param name - Name of group to be unregistered\n * @internal\n */\n public unregisterOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n return;\n }\n\n this._registeredOverlays[name]--;\n\n if(this._registeredOverlays[name] <= 0)\n {\n delete this._registeredOverlays[name];\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Gets name of group based on existance of this group\n * @param name - Name of group that is requested\n */\n private _getName(name: string): string\n {\n if(name == DEFAULT_PROGRESS_NAME || !this.config.fallbackToDefault)\n {\n return name;\n }\n\n if(this._registeredOverlays[name])\n {\n return name;\n }\n\n return DEFAULT_PROGRESS_NAME;\n }\n\n /**\n * Used for invoking 'stateChange' event\n * @param name - Name of group which has changes its state\n * @param value - Value whether is progress running\n * @param messages - Messages to be displayed for this group\n */\n private _onRunning(name: string, value: boolean, messages: string[])\n {\n const group = this._getGroup(name);\n\n group.running = value;\n group.messages = messages;\n\n this._updateState();\n this._stateChange.next(name);\n }\n\n /**\n * Updates state of progress indicator service\n */\n private _updateState()\n {\n const running: {[group: string]: boolean} = {};\n const messages: {[group: string]: string[]} = {};\n\n Object.keys(this._runningRequests).forEach(group =>\n {\n running[group] = this._runningRequests[group].running;\n messages[group] = this._runningRequests[group].messages;\n });\n\n this.running = running;\n this.messages = messages;\n }\n\n /**\n * Gets object for progress group\n * @param name - Name of group to be obtained\n */\n private _getGroup(name: string): RunningProgressGroup\n {\n let group = this._runningRequests[name];\n\n if(isPresent(group))\n {\n return group;\n }\n\n group =\n {\n runningRequests: 0,\n running: false,\n messages: null,\n timeout: null\n };\n\n this._runningRequests[name] = group;\n\n return group;\n }\n}\n"]}
|
|
@@ -3,17 +3,17 @@ import { isPresent } from '@jscrpt/common';
|
|
|
3
3
|
* Configuration object that is used by ProgressIndicatorService, overriding its properties allows you to customize configuration
|
|
4
4
|
*/
|
|
5
5
|
export class ProgressIndicatorOptions {
|
|
6
|
-
//######################### public properties #########################
|
|
7
|
-
/**
|
|
8
|
-
* Timeout length after which will be progress indication displayed
|
|
9
|
-
*/
|
|
10
|
-
timeout = 220;
|
|
11
|
-
/**
|
|
12
|
-
* Indication whether fallback to default group name
|
|
13
|
-
*/
|
|
14
|
-
fallbackToDefault = true;
|
|
15
6
|
//######################### constructor #########################
|
|
16
7
|
constructor(timeout, fallbackToDefault) {
|
|
8
|
+
//######################### public properties #########################
|
|
9
|
+
/**
|
|
10
|
+
* Timeout length after which will be progress indication displayed
|
|
11
|
+
*/
|
|
12
|
+
this.timeout = 220;
|
|
13
|
+
/**
|
|
14
|
+
* Indication whether fallback to default group name
|
|
15
|
+
*/
|
|
16
|
+
this.fallbackToDefault = true;
|
|
17
17
|
if (isPresent(timeout)) {
|
|
18
18
|
this.timeout = timeout;
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressIndicatorOptions.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicatorOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,wBAAwB;
|
|
1
|
+
{"version":3,"file":"progressIndicatorOptions.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicatorOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAcjC,iEAAiE;IACjE,YAAY,OAAgB,EAAE,iBAA2B;QAbzD,uEAAuE;QAEvE;;WAEG;QACI,YAAO,GAAW,GAAG,CAAC;QAE7B;;WAEG;QACI,sBAAiB,GAAY,IAAI,CAAC;QAKrC,IAAG,SAAS,CAAC,OAAO,CAAC,EACrB,CAAC;YACG,IAAI,CAAC,OAAO,GAAG,OAAiB,CAAC;QACrC,CAAC;QAED,IAAG,SAAS,CAAC,iBAAiB,CAAC,EAC/B,CAAC;YACG,IAAI,CAAC,iBAAiB,GAAG,iBAA4B,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {isPresent} from '@jscrpt/common';\n\n/**\n * Configuration object that is used by ProgressIndicatorService, overriding its properties allows you to customize configuration\n */\nexport class ProgressIndicatorOptions\n{\n //######################### public properties #########################\n \n /**\n * Timeout length after which will be progress indication displayed\n */\n public timeout: number = 220;\n\n /**\n * Indication whether fallback to default group name\n */\n public fallbackToDefault: boolean = true;\n \n //######################### constructor #########################\n constructor(timeout?: number, fallbackToDefault?: boolean)\n {\n if(isPresent(timeout))\n {\n this.timeout = timeout as number;\n }\n\n if(isPresent(fallbackToDefault))\n {\n this.fallbackToDefault = fallbackToDefault as boolean;\n }\n }\n}"]}
|
|
@@ -5,38 +5,23 @@ import * as i1 from "@angular/common";
|
|
|
5
5
|
* Component used for displaying tooltip content
|
|
6
6
|
*/
|
|
7
7
|
export class TooltipComponent {
|
|
8
|
-
changeDetector;
|
|
9
|
-
element;
|
|
10
|
-
//######################### protected fields #########################
|
|
11
|
-
/**
|
|
12
|
-
* Called when mouse enter tooltip component, hover
|
|
13
|
-
*/
|
|
14
|
-
enterFn = () => null;
|
|
15
|
-
/**
|
|
16
|
-
* Called when mouse leaves tooltip component
|
|
17
|
-
*/
|
|
18
|
-
leaveFn = () => null;
|
|
19
|
-
//######################### public properties - implementation of TooltipRenderer #########################
|
|
20
|
-
/**
|
|
21
|
-
* Data that are rendered in tooltip
|
|
22
|
-
*/
|
|
23
|
-
data;
|
|
24
|
-
/**
|
|
25
|
-
* Template used for rendering tooltip
|
|
26
|
-
*/
|
|
27
|
-
template;
|
|
28
|
-
/**
|
|
29
|
-
* Indication whether are html tags allowed in tooltip text
|
|
30
|
-
*/
|
|
31
|
-
allowHtml = false;
|
|
32
|
-
/**
|
|
33
|
-
* Css class that is applied to tooltip renderer component
|
|
34
|
-
*/
|
|
35
|
-
cssClass;
|
|
36
8
|
//######################### constructor #########################
|
|
37
9
|
constructor(changeDetector, element) {
|
|
38
10
|
this.changeDetector = changeDetector;
|
|
39
11
|
this.element = element;
|
|
12
|
+
//######################### protected fields #########################
|
|
13
|
+
/**
|
|
14
|
+
* Called when mouse enter tooltip component, hover
|
|
15
|
+
*/
|
|
16
|
+
this.enterFn = () => null;
|
|
17
|
+
/**
|
|
18
|
+
* Called when mouse leaves tooltip component
|
|
19
|
+
*/
|
|
20
|
+
this.leaveFn = () => null;
|
|
21
|
+
/**
|
|
22
|
+
* Indication whether are html tags allowed in tooltip text
|
|
23
|
+
*/
|
|
24
|
+
this.allowHtml = false;
|
|
40
25
|
}
|
|
41
26
|
//######################### public methods - implementation of TooltipRenderer #########################
|
|
42
27
|
/**
|
|
@@ -72,10 +57,10 @@ export class TooltipComponent {
|
|
|
72
57
|
mouseLeave() {
|
|
73
58
|
this.leaveFn();
|
|
74
59
|
}
|
|
75
|
-
static
|
|
76
|
-
static
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: TooltipComponent, selector: "tooltip-popup", host: { listeners: { "mouseenter": "mouseEnter()", "mouseleave": "mouseLeave()" } }, ngImport: i0, template: "<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: absolute;\r\n padding: 2px 4px;\r\n border-radius: 3px;\r\n font-size: 0.9em;\r\n max-width: 300px;\r\n user-select: text;\r\n}"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
77
62
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
79
64
|
type: Component,
|
|
80
65
|
args: [{ selector: 'tooltip-popup', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: absolute;\r\n padding: 2px 4px;\r\n border-radius: 3px;\r\n font-size: 0.9em;\r\n max-width: 300px;\r\n user-select: text;\r\n}"] }]
|
|
81
66
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { mouseEnter: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.ts","../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAe,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;;;AAM3H;;GAEG;AAQH,MAAM,OAAO,gBAAgB;
|
|
1
|
+
{"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.ts","../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAe,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;;;AAM3H;;GAEG;AAQH,MAAM,OAAO,gBAAgB;IAoCzB,iEAAiE;IACjE,YAAsB,cAAiC,EACjC,OAAgC;QADhC,mBAAc,GAAd,cAAc,CAAmB;QACjC,YAAO,GAAP,OAAO,CAAyB;QApCtD,sEAAsE;QAEtE;;WAEG;QACO,YAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;QAE3C;;WAEG;QACO,YAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;QAc3C;;WAEG;QACI,cAAS,GAAY,KAAK,CAAC;IAWlC,CAAC;IAED,wGAAwG;IAExG;;;;OAIG;IACI,mBAAmB,CAAC,KAAiB,EAAE,KAAiB;QAE3D,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAG,IAAI,CAAC,QAAQ,EAChB,CAAC;YACG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;IAED,8EAA8E;IAE9E;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;8GAxFQ,gBAAgB;kGAAhB,gBAAgB,0IChB7B,uRAKc;;2FDWD,gBAAgB;kBAP5B,SAAS;+BAEI,eAAe,mBAGR,uBAAuB,CAAC,MAAM;+GA6ErC,UAAU;sBADnB,YAAY;uBAAC,YAAY;gBAWhB,UAAU;sBADnB,YAAY;uBAAC,YAAY","sourcesContent":["import {Component, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, ElementRef, HostListener} from '@angular/core';\nimport {Invalidatable} from '@jscrpt/common';\n\nimport {TooltipTemplateContext} from '../../directives';\nimport {TooltipRenderer} from '../../misc/tooltip.interface';\n\n/**\n * Component used for displaying tooltip content\n */\n@Component(\n{\n selector: 'tooltip-popup',\n templateUrl: 'tooltip.component.html',\n styleUrls: ['tooltip.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TooltipComponent<TData = any> implements TooltipRenderer<TData>, Invalidatable\n{\n //######################### protected fields #########################\n\n /**\n * Called when mouse enter tooltip component, hover\n */\n protected enterFn: () => void = () => null;\n\n /**\n * Called when mouse leaves tooltip component\n */\n protected leaveFn: () => void = () => null;\n\n //######################### public properties - implementation of TooltipRenderer #########################\n\n /**\n * Data that are rendered in tooltip\n */\n public data: TData|null|undefined;\n\n /**\n * Template used for rendering tooltip\n */\n public template: TemplateRef<TooltipTemplateContext<TData>>|null|undefined;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n public allowHtml: boolean = false;\n\n /**\n * Css class that is applied to tooltip renderer component\n */\n public cssClass: string|null|undefined;\n\n //######################### constructor #########################\n constructor(protected changeDetector: ChangeDetectorRef,\n protected element: ElementRef<HTMLElement>)\n {\n }\n\n //######################### public methods - implementation of TooltipRenderer #########################\n\n /**\n * Registers handlers that allows reaction to entering or leaving tooltip\n * @param enter - Called when mouse enter tooltip component, hover\n * @param leave - Called when mouse leaves tooltip component\n */\n public registerHoverEvents(enter: () => void, leave: () => void): void\n {\n this.enterFn = enter;\n this.leaveFn = leave;\n }\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n if(this.cssClass)\n {\n this.element.nativeElement.classList.add(this.cssClass);\n }\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse enter event over tooltip\n * @internal\n */\n @HostListener('mouseenter')\n protected mouseEnter(): void\n {\n this.enterFn();\n }\n\n /**\n * Handles mouse leave event over tooltip\n * @internal\n */\n @HostListener('mouseleave')\n protected mouseLeave(): void\n {\n this.leaveFn();\n }\n}","<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>"]}
|