@anglr/common 19.2.0-beta.20240125053304 → 20.0.0-beta.20240530103148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +81 -6
- package/es2022/date-fns/src/misc/utils.js.map +1 -1
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +5 -4
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +14 -24
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -24
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -28
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +14 -14
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +5 -4
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +72 -111
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +13 -15
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +32 -27
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +5 -4
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/index.js +0 -1
- package/es2022/forms/src/index.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupAsyncValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/invalidateOnChange.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/modelPropertyMetadata.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/requiredIf.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js +0 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js +0 -4
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
- package/es2022/forms/src/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/validationErrorsContainerView.js +7 -9
- package/es2022/forms/src/misc/validationErrorsContainerView.js.map +1 -1
- package/es2022/forms/src/misc/validators.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +7 -29
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +8 -20
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -4
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +6 -6
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -4
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js +5 -5
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/hasError.module.js +6 -17
- package/es2022/forms/src/modules/hasError.module.js.map +1 -1
- package/es2022/forms/src/modules/numberInput.module.js +5 -5
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -10
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -4
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
- package/es2022/forms/src/services/submitted/submitted.service.js +14 -12
- package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -24
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +18 -21
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +20 -26
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -10
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +3 -10
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +37 -38
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +12 -17
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +6 -6
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +11 -10
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/material/src/modules/movableTitledDialog.module.js +6 -6
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +6 -6
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -5
- package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js +5 -5
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js.map +1 -1
- package/es2022/moment/src/misc/utils.js.map +1 -1
- package/es2022/moment/src/modules/moment.module.js +5 -5
- package/es2022/moment/src/modules/moment.module.js.map +1 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
- package/es2022/router/src/decorators/componentRedirectRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/componentRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/moduleRoutes.decorator.js.map +1 -1
- package/es2022/router/src/misc/utils.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouter.js +16 -17
- package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouterData.js +3 -8
- package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +20 -22
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +18 -20
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
- package/es2022/src/decorators/asSignal/asSignal.decorator.js.map +1 -1
- package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
- package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +4 -23
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +27 -39
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +38 -49
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +4 -5
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +13 -27
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +20 -45
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -5
- package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +8 -9
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
- package/es2022/src/modules/commonDynamic.module.js +4 -4
- package/es2022/src/modules/commonDynamic.module.js.map +1 -1
- package/es2022/src/modules/commonLocalize.module.js +4 -4
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +23 -19
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +9 -46
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +6 -10
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +13 -26
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/logger/components/console/console.component.js +16 -23
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/decorators/loggerSink.decorator.js.map +1 -1
- package/es2022/src/modules/logger/misc/utils.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +18 -16
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js +7 -5
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +8 -8
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js.map +1 -1
- package/es2022/src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.js.map +1 -1
- package/es2022/src/modules/logger/services/logger/logger.service.js +3 -4
- package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/rest.sink.js +17 -21
- package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/restSink.options.js +16 -16
- package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js +0 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerConfiguration.js +8 -17
- package/es2022/src/modules/logger/types/loggerConfiguration.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerOptions.js +30 -28
- package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
- package/es2022/src/modules/logger/types/messageLog.js +5 -18
- package/es2022/src/modules/logger/types/messageLog.js.map +1 -1
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +33 -46
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +4 -4
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -21
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +7 -45
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -4
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +6 -6
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +29 -30
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js +9 -9
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +16 -31
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +29 -81
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -4
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -5
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -4
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +3 -3
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +3 -18
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/index.js +2 -0
- package/es2022/src/pipes/index.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -4
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -4
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +4 -4
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/localize/localize.pipe.js +3 -10
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.js +8 -15
- package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js +29 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -0
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +8 -9
- package/es2022/src/services/cookies/cookies.service.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +24 -25
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/notifications/notifications.interface.js +0 -3
- package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
- package/es2022/src/services/notifications/notificationsOptions.js +5 -5
- package/es2022/src/services/notifications/notificationsOptions.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -4
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/position/position.interface.js.map +1 -1
- package/es2022/src/services/statusCode/statusCode.service.js +3 -8
- package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +10 -8
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +10 -8
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
- package/es2022/src/utils/index.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +5 -5
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html +9 -3
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
- package/forms/src/directives/hasError/hasError.directive.d.ts +24 -32
- package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts +14 -12
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
- package/forms/src/index.d.ts +0 -1
- package/forms/src/index.d.ts.map +1 -1
- package/forms/src/modules/hasError.module.d.ts +1 -5
- package/forms/src/modules/hasError.module.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts +3 -3
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.html +13 -7
- package/lerna.json +4 -0
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts +2 -2
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts.map +1 -1
- package/material/src/modules/debugDataCopyClick.module.d.ts +3 -3
- package/material/src/modules/debugDataCopyClick.module.d.ts.map +1 -1
- package/package.json +54 -57
- package/readme.md +0 -1
- package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts +3 -3
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts +3 -3
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
- package/src/directives/bodyRender/bodyRender.directive.d.ts +3 -3
- package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +3 -3
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/src/directives/goBack/goBack.directive.d.ts +3 -3
- package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
- package/src/directives/positionTo/positionTo.directive.d.ts +2 -2
- package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/modules/commonUtils.module.d.ts +2 -1
- package/src/modules/commonUtils.module.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.css +1 -0
- package/src/modules/debugData/components/debugData/debugData.component.d.ts +4 -24
- package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.html +4 -3
- package/src/modules/debugData/modules/debugData.module.d.ts +1 -2
- package/src/modules/debugData/modules/debugData.module.d.ts.map +1 -1
- package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts +2 -10
- package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts.map +1 -1
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +7 -8
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts +3 -3
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
- package/src/pipes/index.d.ts +2 -0
- package/src/pipes/index.d.ts.map +1 -1
- package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
- package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
- package/src/pipes/isPresent/isPresent.pipe.d.ts +3 -3
- package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +3 -3
- package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts +4 -4
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts.map +1 -1
- package/src/pipes/trimText/trimText.pipe.d.ts +17 -0
- package/src/pipes/trimText/trimText.pipe.d.ts.map +1 -0
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
- package/src/services/position/position.interface.d.ts +10 -10
- package/src/services/position/position.interface.d.ts.map +1 -1
- package/styles/core/_mixins.scss +14 -0
- package/styles/core/_theme.scss +4 -0
- package/version.bak +1 -1
- package/es2022/forms/src/modules/requiredClass.module.js +0 -19
- package/es2022/forms/src/modules/requiredClass.module.js.map +0 -1
- package/es2022/numeral/src/index.js +0 -2
- package/es2022/numeral/src/index.js.map +0 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +0 -1
- package/forms/src/modules/requiredClass.module.d.ts +0 -11
- package/forms/src/modules/requiredClass.module.d.ts.map +0 -1
- package/numeral/package.json +0 -8
- package/numeral/src/index.d.ts +0 -2
- package/numeral/src/index.d.ts.map +0 -1
- package/src/style.scss +0 -87
|
@@ -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,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;;;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AA4BvD;;GAEG;AAEH,MAAM,OAAO,wBAAwB;IA6CF;IA3C/B,oEAAoE;IAEpE;;OAEG;IACK,UAAU,GAAY,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,C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MAAM,QAAQ,GAAgC,EAAE,CAAC;QAEjD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAE/C,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YACtD,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,SAAS,CAAC,IAAY;QAE1B,IAAI,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAExC,IAAG,SAAS,CAAC,KAAK,CAAC,EACnB;YACI,OAAO,KAAK,CAAC;SAChB;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;uGA/XQ,wBAAwB;2GAAxB,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"]}
|
|
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,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;;;AAEpE;;GA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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>"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, SkipSelf, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { AnimationBuilder } from '@angular/animations';
|
|
3
3
|
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
import { fadeInAnimation, fadeOutAnimation } from '@anglr/animations';
|
|
@@ -23,7 +23,7 @@ const defaultOptions = {
|
|
|
23
23
|
allowSelection: false,
|
|
24
24
|
tooltipRenderer: TooltipComponent,
|
|
25
25
|
tooltipCssClass: null,
|
|
26
|
-
stopPropagation: false,
|
|
26
|
+
stopPropagation: false, //TODO: breaking change set to true
|
|
27
27
|
enterAnimation: fadeInAnimation,
|
|
28
28
|
exitAnimation: fadeOutAnimation,
|
|
29
29
|
containerElement: undefined,
|
|
@@ -32,58 +32,6 @@ const defaultOptions = {
|
|
|
32
32
|
* Directive used for rendering tooltip
|
|
33
33
|
*/
|
|
34
34
|
export class TooltipDirective {
|
|
35
|
-
_viewContainerRef;
|
|
36
|
-
_injector;
|
|
37
|
-
_element;
|
|
38
|
-
_animationsPlayer;
|
|
39
|
-
_document;
|
|
40
|
-
_position;
|
|
41
|
-
//######################### protected fields #########################
|
|
42
|
-
/**
|
|
43
|
-
* Instance of component used for rendering tooltip
|
|
44
|
-
*/
|
|
45
|
-
_tooltipComponent;
|
|
46
|
-
/**
|
|
47
|
-
* Instance of HTML element for tooltip renderer
|
|
48
|
-
*/
|
|
49
|
-
_tooltipElement;
|
|
50
|
-
/**
|
|
51
|
-
* Animation factory used for enter animation of tooltip
|
|
52
|
-
*/
|
|
53
|
-
_enterAnimation;
|
|
54
|
-
/**
|
|
55
|
-
* Animation factory used for exit animation of tooltip
|
|
56
|
-
*/
|
|
57
|
-
_exitAnimation;
|
|
58
|
-
/**
|
|
59
|
-
* Instance of options provided for this tooltip
|
|
60
|
-
*/
|
|
61
|
-
_options;
|
|
62
|
-
/**
|
|
63
|
-
* Indication whether there is active show tooltip request
|
|
64
|
-
*/
|
|
65
|
-
_showRequest = false;
|
|
66
|
-
/**
|
|
67
|
-
* Indication whether keep open tooltip component
|
|
68
|
-
*/
|
|
69
|
-
_keepOpen = false;
|
|
70
|
-
/**
|
|
71
|
-
* Timeout that is used for handling mouse move
|
|
72
|
-
*/
|
|
73
|
-
_timeout = null;
|
|
74
|
-
//######################### public properties - inputs #########################
|
|
75
|
-
/**
|
|
76
|
-
* Tooltip text that is displayed, or any data that could be passed to template
|
|
77
|
-
*/
|
|
78
|
-
tooltip;
|
|
79
|
-
/**
|
|
80
|
-
* Indication whether are html tags allowed in tooltip text
|
|
81
|
-
*/
|
|
82
|
-
allowHtml = false;
|
|
83
|
-
/**
|
|
84
|
-
* Instance of tooltip template that is used for rendering
|
|
85
|
-
*/
|
|
86
|
-
template;
|
|
87
35
|
/**
|
|
88
36
|
* Options used for displaying tooltip
|
|
89
37
|
*/
|
|
@@ -98,29 +46,31 @@ export class TooltipDirective {
|
|
|
98
46
|
this.containerElement = this._options.containerElement;
|
|
99
47
|
}
|
|
100
48
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this
|
|
103
|
-
*/
|
|
104
|
-
tooltipVisible;
|
|
105
|
-
/**
|
|
106
|
-
* String that defines element in which should be tooltip rendered, if not specified, body is used
|
|
107
|
-
*
|
|
108
|
-
* Allows also css classes to be specified (div.body-box)
|
|
109
|
-
*/
|
|
110
|
-
containerElement;
|
|
111
|
-
//######################### public properties - children #########################
|
|
112
|
-
/**
|
|
113
|
-
* Instance of template from element content, used for rendering
|
|
114
|
-
*/
|
|
115
|
-
tooltipTemplateChild;
|
|
116
49
|
//######################### constructor #########################
|
|
117
|
-
constructor(_viewContainerRef, _injector, _element, _animationsPlayer, _document, _position, options) {
|
|
50
|
+
constructor(_viewContainerRef, _injector, _element, _animationsPlayer, _document, _position, _parent, options) {
|
|
118
51
|
this._viewContainerRef = _viewContainerRef;
|
|
119
52
|
this._injector = _injector;
|
|
120
53
|
this._element = _element;
|
|
121
54
|
this._animationsPlayer = _animationsPlayer;
|
|
122
55
|
this._document = _document;
|
|
123
56
|
this._position = _position;
|
|
57
|
+
this._parent = _parent;
|
|
58
|
+
/**
|
|
59
|
+
* Indication whether there is active show tooltip request
|
|
60
|
+
*/
|
|
61
|
+
this._showRequest = false;
|
|
62
|
+
/**
|
|
63
|
+
* Indication whether keep open tooltip component
|
|
64
|
+
*/
|
|
65
|
+
this._keepOpen = false;
|
|
66
|
+
/**
|
|
67
|
+
* Timeout that is used for handling mouse move
|
|
68
|
+
*/
|
|
69
|
+
this._timeout = null;
|
|
70
|
+
/**
|
|
71
|
+
* Indication whether are html tags allowed in tooltip text
|
|
72
|
+
*/
|
|
73
|
+
this.allowHtml = false;
|
|
124
74
|
this._options = extend(true, {}, defaultOptions, options);
|
|
125
75
|
this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);
|
|
126
76
|
this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);
|
|
@@ -152,11 +102,10 @@ export class TooltipDirective {
|
|
|
152
102
|
}
|
|
153
103
|
this._destroyTooltip();
|
|
154
104
|
}
|
|
155
|
-
//#########################
|
|
105
|
+
//######################### protected methods - host #########################
|
|
156
106
|
/**
|
|
157
107
|
* Handles mouse leave event, hover ends
|
|
158
108
|
* @param event - Mouse event that occured
|
|
159
|
-
* @internal
|
|
160
109
|
*/
|
|
161
110
|
mouseLeave(event) {
|
|
162
111
|
if (this._options.stopPropagation) {
|
|
@@ -174,7 +123,6 @@ export class TooltipDirective {
|
|
|
174
123
|
/**
|
|
175
124
|
* Handles mouse move event, displaying tooltip
|
|
176
125
|
* @param event - Mouse event that occured
|
|
177
|
-
* @internal
|
|
178
126
|
*/
|
|
179
127
|
mouseMove(event) {
|
|
180
128
|
if (this._options.stopPropagation) {
|
|
@@ -206,6 +154,7 @@ export class TooltipDirective {
|
|
|
206
154
|
if (!this.tooltip && !this.template && !this.tooltipTemplateChild) {
|
|
207
155
|
return;
|
|
208
156
|
}
|
|
157
|
+
this._parent?._hideTooltip();
|
|
209
158
|
this._createTooltip();
|
|
210
159
|
//if element was not created do nothing
|
|
211
160
|
if (!this._tooltipElement) {
|
|
@@ -288,15 +237,10 @@ export class TooltipDirective {
|
|
|
288
237
|
this._tooltipComponent.instance.invalidateVisuals();
|
|
289
238
|
}
|
|
290
239
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
* Custom input type for `tooltip` input
|
|
294
|
-
*/
|
|
295
|
-
static ngAcceptInputType_tooltip;
|
|
296
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: POSITION }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
297
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.5", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible", containerElement: "containerElement" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
|
|
240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: POSITION }, { token: TooltipDirective, optional: true, skipSelf: true }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
241
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible", containerElement: "containerElement" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
|
|
298
242
|
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
300
244
|
type: Directive,
|
|
301
245
|
args: [{
|
|
302
246
|
selector: '[tooltip]',
|
|
@@ -308,6 +252,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
|
|
|
308
252
|
}] }, { type: undefined, decorators: [{
|
|
309
253
|
type: Inject,
|
|
310
254
|
args: [POSITION]
|
|
255
|
+
}] }, { type: TooltipDirective, decorators: [{
|
|
256
|
+
type: Optional
|
|
257
|
+
}, {
|
|
258
|
+
type: SkipSelf
|
|
311
259
|
}] }, { type: undefined, decorators: [{
|
|
312
260
|
type: Optional
|
|
313
261
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAwB,QAAQ,EAAiB,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACtN,OAAO,EAAC,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAmB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAE5E,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAY,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAC,wBAAwB,EAAC,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;;;AAElD;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,KAAK,EAAE,GAAG;IACV,QAAQ,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;sBADhB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA2B/B,SAAS;sBADf,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {AnimationBuilder, AnimationFactory} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {fadeInAnimation, fadeOutAnimation} from '@anglr/animations';\nimport {RecursivePartial, extend, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionPlacement} from '../../../../services/position';\nimport {TooltipTemplateDirective} from '../tooltipTemplate/tooltipTemplate.directive';\nimport {TooltipTemplateContext} from '../tooltipTemplate/tooltipTemplate.context';\nimport {POSITION} from '../../../../types/tokens';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n position:\n {\n offset: 'MouseEnter',\n placement: PositionPlacement.TopEnd,\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false,\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n containerElement: undefined,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]',\n standalone: true,\n})\nexport class TooltipDirective<TData = any> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer<TData>>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Animation factory used for enter animation of tooltip\n */\n protected _enterAnimation: AnimationFactory;\n\n /**\n * Animation factory used for exit animation of tooltip\n */\n protected _exitAnimation: AnimationFactory;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public template?: TemplateRef<TooltipTemplateContext<TData>>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): RecursivePartial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: RecursivePartial<TooltipOptions>)\n {\n this._options = extend(true, {}, this._options, value);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement && !this.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n /**\n * String that defines element in which should be tooltip rendered, if not specified, body is used\n * \n * Allows also css classes to be specified (div.body-box)\n */\n @Input()\n public containerElement: string|undefined|null;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild(TooltipTemplateDirective)\n public tooltipTemplateChild?: TooltipTemplateDirective;\n\n //######################### constructor #########################\n constructor(protected _viewContainerRef: ViewContainerRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n protected _animationsPlayer: AnimationBuilder,\n @Inject(DOCUMENT) protected _document: Document,\n @Inject(POSITION) protected _position: Position,\n @Optional() @Inject(TOOLTIP_OPTIONS) options?: Partial<TooltipOptions>,)\n {\n this._options = extend(true, {}, defaultOptions, options);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\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 if(this._timeout)\n {\n clearTimeout(this._timeout);\n }\n\n this._destroyTooltip();\n }\n\n //######################### public methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mouseleave', ['$event'])\n public mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mousemove', ['$event'])\n public mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param event - Mouse event\n */\n protected _showTooltip(event?: MouseEvent): void\n {\n //no data for tooltip or no template\n if(!this.tooltip && !this.template && !this.tooltipTemplateChild)\n {\n return;\n }\n\n this._createTooltip();\n\n //if element was not created do nothing\n if(!this._tooltipElement)\n {\n return;\n }\n\n this._showData();\n\n lastValueFrom(this._position.placeElement(this._tooltipElement,\n this._element.nativeElement,\n {\n placement: this._options.position.placement,\n offset: this._options.position.offset,\n flip: true,\n mouseEvent: event,\n autoUpdate: false\n }))\n .then(result => applyPositionResult(result));\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n const component = this._tooltipComponent;\n const element = this._tooltipElement;\n\n const exitAnimation = this._exitAnimation.create(element);\n\n exitAnimation.onDone(() =>\n {\n component.destroy();\n exitAnimation.destroy();\n });\n \n this._tooltipComponent = undefined;\n this._tooltipElement = undefined;\n\n exitAnimation.play();\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroys tooltip if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._viewContainerRef\n .createComponent(this._options.tooltipRenderer,\n {\n injector: this._injector\n });\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n renderToBody(this._document, this._tooltipElement, this.containerElement);\n this._enterAnimation.create(this._tooltipElement).play();\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.template ?? this.tooltipTemplateChild?.template;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `tooltip` input\n */\n public static ngAcceptInputType_tooltip: any;\n}"]}
|
|
1
|
+
{"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAwB,QAAQ,EAAiB,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAChO,OAAO,EAAC,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAmB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAE5E,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAY,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAC,wBAAwB,EAAC,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC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AAY,EAAE,CAAC,QAAQ,CAAC;gBA0B5B,SAAS;sBADlB,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, SkipSelf, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {AnimationBuilder, AnimationFactory} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {fadeInAnimation, fadeOutAnimation} from '@anglr/animations';\nimport {RecursivePartial, extend, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionPlacement} from '../../../../services/position';\nimport {TooltipTemplateDirective} from '../tooltipTemplate/tooltipTemplate.directive';\nimport {TooltipTemplateContext} from '../tooltipTemplate/tooltipTemplate.context';\nimport {POSITION} from '../../../../types/tokens';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n position:\n {\n offset: 'MouseEnter',\n placement: PositionPlacement.TopEnd,\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false, //TODO: breaking change set to true\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n containerElement: undefined,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]',\n standalone: true,\n})\nexport class TooltipDirective<TData = unknown> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer<TData>>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Animation factory used for enter animation of tooltip\n */\n protected _enterAnimation: AnimationFactory;\n\n /**\n * Animation factory used for exit animation of tooltip\n */\n protected _exitAnimation: AnimationFactory;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public template?: TemplateRef<TooltipTemplateContext<TData>>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): RecursivePartial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: RecursivePartial<TooltipOptions>)\n {\n this._options = extend(true, {}, this._options, value);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement && !this.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n /**\n * String that defines element in which should be tooltip rendered, if not specified, body is used\n * \n * Allows also css classes to be specified (div.body-box)\n */\n @Input()\n public containerElement: string|undefined|null;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild(TooltipTemplateDirective)\n public tooltipTemplateChild?: TooltipTemplateDirective;\n\n //######################### constructor #########################\n constructor(protected _viewContainerRef: ViewContainerRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n protected _animationsPlayer: AnimationBuilder,\n @Inject(DOCUMENT) protected _document: Document,\n @Inject(POSITION) protected _position: Position<HTMLElement>,\n @Optional() @SkipSelf() protected _parent?: TooltipDirective|null,\n @Optional() @Inject(TOOLTIP_OPTIONS) options?: Partial<TooltipOptions>,)\n {\n this._options = extend(true, {}, defaultOptions, options);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\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 if(this._timeout)\n {\n clearTimeout(this._timeout);\n }\n\n this._destroyTooltip();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n */\n @HostListener('mouseleave', ['$event'])\n protected mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n */\n @HostListener('mousemove', ['$event'])\n protected mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param event - Mouse event\n */\n protected _showTooltip(event?: MouseEvent): void\n {\n //no data for tooltip or no template\n if(!this.tooltip && !this.template && !this.tooltipTemplateChild)\n {\n return;\n }\n\n this._parent?._hideTooltip();\n this._createTooltip();\n\n //if element was not created do nothing\n if(!this._tooltipElement)\n {\n return;\n }\n\n this._showData();\n\n lastValueFrom(this._position.placeElement(this._tooltipElement,\n this._element.nativeElement,\n {\n placement: this._options.position.placement,\n offset: this._options.position.offset,\n flip: true,\n mouseEvent: event,\n autoUpdate: false\n }))\n .then(result => applyPositionResult(result));\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n const component = this._tooltipComponent;\n const element = this._tooltipElement;\n\n const exitAnimation = this._exitAnimation.create(element);\n\n exitAnimation.onDone(() =>\n {\n component.destroy();\n exitAnimation.destroy();\n });\n \n this._tooltipComponent = undefined;\n this._tooltipElement = undefined;\n\n exitAnimation.play();\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroys tooltip if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._viewContainerRef\n .createComponent(this._options.tooltipRenderer,\n {\n injector: this._injector\n });\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n renderToBody(this._document, this._tooltipElement, this.containerElement);\n this._enterAnimation.create(this._tooltipElement).play();\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.template ?? this.tooltipTemplateChild?.template;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `tooltip` input\n */\n public static ngAcceptInputType_tooltip: any;\n}"]}
|
|
@@ -4,7 +4,6 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* Directive used for obtaining custom tooltip template
|
|
5
5
|
*/
|
|
6
6
|
export class TooltipTemplateDirective {
|
|
7
|
-
template;
|
|
8
7
|
//######################### constructor #########################
|
|
9
8
|
constructor(template) {
|
|
10
9
|
this.template = template;
|
|
@@ -16,10 +15,10 @@ export class TooltipTemplateDirective {
|
|
|
16
15
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
17
16
|
return true;
|
|
18
17
|
}
|
|
19
|
-
static
|
|
20
|
-
static
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: TooltipTemplateDirective, selector: "[tooltipTemplate]", ngImport: i0 }); }
|
|
21
20
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipTemplateDirective, decorators: [{
|
|
23
22
|
type: Directive,
|
|
24
23
|
args: [{
|
|
25
24
|
selector: '[tooltipTemplate]'
|
package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltipTemplate.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AAKH,MAAM,OAAO,wBAAwB;
|
|
1
|
+
{"version":3,"file":"tooltipTemplate.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAEjC,iEAAiE;IACjE,YAAmB,QAAoD;QAApD,aAAQ,GAAR,QAAQ,CAA4C;IAEvE,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAA8B,EAAE,IAAa;QAEvE,OAAO,IAAI,CAAC;IAChB,CAAC;8GAfQ,wBAAwB;kGAAxB,wBAAwB;;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC","sourcesContent":["import {Directive, TemplateRef} from '@angular/core';\n\nimport {TooltipTemplateContext} from './tooltipTemplate.context';\n\n/**\n * Directive used for obtaining custom tooltip template\n */\n@Directive(\n{\n selector: '[tooltipTemplate]'\n})\nexport class TooltipTemplateDirective<TData = any>\n{\n //######################### constructor #########################\n constructor(public template: TemplateRef<TooltipTemplateContext<TData>>)\n {\n }\n\n //######################### ng language server #########################\n \n /**\n * Allows typechecking for template\n */\n static ngTemplateContextGuard(_dir: TooltipTemplateDirective, _ctx: unknown): _ctx is TooltipTemplateContext\n {\n return true;\n }\n}"]}
|
|
@@ -7,14 +7,14 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Module for rendering tooltips
|
|
8
8
|
*/
|
|
9
9
|
export class TooltipModule {
|
|
10
|
-
static
|
|
11
|
-
static
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, declarations: [TooltipTemplateDirective,
|
|
12
12
|
TooltipComponent], imports: [CommonModule,
|
|
13
13
|
TooltipDirective], exports: [TooltipDirective,
|
|
14
|
-
TooltipTemplateDirective] });
|
|
15
|
-
static
|
|
14
|
+
TooltipTemplateDirective] }); }
|
|
15
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, imports: [CommonModule] }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, decorators: [{
|
|
18
18
|
type: NgModule,
|
|
19
19
|
args: [{
|
|
20
20
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.module.js","sourceRoot":"","sources":["../../../../../src/modules/tooltip/modules/tooltip.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;;AAE/C;;GAEG;AAmBH,MAAM,OAAO,aAAa;
|
|
1
|
+
{"version":3,"file":"tooltip.module.js","sourceRoot":"","sources":["../../../../../src/modules/tooltip/modules/tooltip.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;;AAE/C;;GAEG;AAmBH,MAAM,OAAO,aAAa;8GAAb,aAAa;+GAAb,aAAa,iBATlB,wBAAwB;YACxB,gBAAgB,aANhB,YAAY;YACZ,gBAAgB,aAShB,gBAAgB;YAChB,wBAAwB;+GAGnB,aAAa,YAdlB,YAAY;;2FAcP,aAAa;kBAlBzB,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;wBACZ,gBAAgB;qBACnB;oBACD,YAAY,EACZ;wBACI,wBAAwB;wBACxB,gBAAgB;qBACnB;oBACD,OAAO,EACP;wBACI,gBAAgB;wBAChB,wBAAwB;qBAC3B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {TooltipDirective, TooltipTemplateDirective} from '../directives';\nimport {TooltipComponent} from '../components';\n\n/**\n * Module for rendering tooltips\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n TooltipDirective,\n ],\n declarations:\n [\n TooltipTemplateDirective,\n TooltipComponent,\n ],\n exports:\n [\n TooltipDirective,\n TooltipTemplateDirective,\n ]\n})\nexport class TooltipModule\n{\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* Transforms array of objects or object properties into string
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class DisplayPropertiesPipe {
|
|
7
7
|
/**
|
|
8
8
|
* Transforms array of objects or object properties into string
|
|
9
9
|
* @param value - Array of objects or object to be converted
|
|
@@ -26,10 +26,10 @@ export class DisplayPropertiesSAPipe {
|
|
|
26
26
|
return result;
|
|
27
27
|
}).join(itemSeparator);
|
|
28
28
|
}
|
|
29
|
-
static
|
|
30
|
-
static
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DisplayPropertiesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
30
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: DisplayPropertiesPipe, isStandalone: true, name: "displayProperties" }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DisplayPropertiesPipe, decorators: [{
|
|
33
33
|
type: Pipe,
|
|
34
34
|
args: [{
|
|
35
35
|
name: 'displayProperties',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayProperties.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/displayProperties/displayProperties.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAMH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"displayProperties.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/displayProperties/displayProperties.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAMH,MAAM,OAAO,qBAAqB;IAE9B;;;;;OAKG;IACI,SAAS,CAAC,KAAoB,EAAE,MAA0B,EAAE,aAAuB,CAAC,GAAG,CAAC,EAAE,gBAAwB,IAAI;QAEzH,IAAG,CAAC,KAAK,EACT,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACxB,CAAC;YACG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAEnB,IAAI,MAAM,GAAW,EAAE,CAAC;YAExB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EACzC,CAAC;gBACG,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7C,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAEzC,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3B,CAAC;8GAjCQ,qBAAqB;4GAArB,qBAAqB;;2FAArB,qBAAqB;kBALjC,IAAI;mBACL;oBACI,IAAI,EAAE,mBAAmB;oBACzB,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Transforms array of objects or object properties into string\n */\n@Pipe(\n{\n name: 'displayProperties',\n standalone: true,\n})\nexport class DisplayPropertiesPipe<TItem> implements PipeTransform\n{\n /**\n * Transforms array of objects or object properties into string\n * @param value - Array of objects or object to be converted\n * @param separators - Array of separators, or single separator for properties\n * @param itemSeparator - Separator used for separating items\n */\n public transform(value: TItem|TItem[], values: Array<keyof TItem>, separators: string[] = [' '], itemSeparator: string = ', '): string\n {\n if(!value)\n {\n return '';\n }\n\n if(!Array.isArray(value))\n {\n value = [value];\n }\n\n return value.map(itm =>\n {\n let result: string = '';\n\n for(let x = 0; x < values.length - 1; x++)\n {\n result += itm[values[0]] + separators[0];\n }\n\n result += itm[values[values.length - 1]];\n\n return result;\n }).join(itemSeparator);\n }\n}"]}
|