@anglr/common 21.3.0 → 22.0.0-beta.20250123101532
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 +20 -0
- 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 +4 -4
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -4
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -4
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +4 -5
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -4
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +3 -4
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +5 -5
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +5 -5
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +4 -4
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +5 -5
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +3 -4
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -4
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/misc/utils.js +2 -1
- package/es2022/forms/src/misc/utils.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +14 -9
- 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 +4 -4
- 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 +4 -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 +5 -13
- 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 -3
- 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 -3
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2022/forms/src/modules/hasError.module.js +4 -4
- package/es2022/forms/src/modules/numberInput.module.js +7 -7
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +5 -4
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
- package/es2022/forms/src/services/submitted/submitted.service.js +3 -3
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +4 -4
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +4 -4
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +3 -3
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +10 -7
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +12 -7
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +9 -6
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -4
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -4
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +6 -15
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +4 -4
- package/es2022/material/src/modules/movableTitledDialog.module.js +7 -8
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +5 -16
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -3
- package/es2022/router/src/services/routing/dataRouter.js +3 -3
- package/es2022/router/src/services/routing/dataRouterData.js +3 -3
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +6 -6
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +4 -4
- 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/componentDisplay/componentDisplay.decorator.js.map +1 -1
- package/es2022/src/decorators/componentDisplayBlock/componentDisplayBlock.decorator.js.map +1 -1
- package/es2022/src/decorators/componentDisplayFlex/componentDisplayFlex.decorator.js.map +1 -1
- package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
- package/es2022/src/decorators/scrollableContent/scrollableContent.decorator.js.map +1 -1
- package/es2022/src/decorators/typeProvider/typeProvider.decorator.js +0 -1
- package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
- package/es2022/src/decorators/withFullscreenContentCssClass/withFullscreenContentCssClass.decorator.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +3 -4
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +4 -5
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +3 -4
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +3 -4
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -4
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +4 -5
- 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/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
- package/es2022/src/modules/commonDynamic.module.js +4 -4
- package/es2022/src/modules/commonLocalize.module.js +7 -7
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +9 -9
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +4 -4
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +4 -4
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
- package/es2022/src/modules/file/components/file/file.component.js +4 -4
- package/es2022/src/modules/file/components/file/file.component.js.map +1 -1
- package/es2022/src/modules/file/components/fileInput/fileInput.component.js +7 -7
- package/es2022/src/modules/file/components/fileInput/fileInput.component.js.map +1 -1
- package/es2022/src/modules/file/components/uploadButton/uploadButton.component.js +7 -7
- package/es2022/src/modules/file/components/uploadButton/uploadButton.component.js.map +1 -1
- package/es2022/src/modules/file/directive/fileInput/fileInput.directive.js +3 -4
- package/es2022/src/modules/file/directive/fileInput/fileInput.directive.js.map +1 -1
- package/es2022/src/modules/file/directive/fileTemplate/fileTemplate.directive.js +3 -4
- package/es2022/src/modules/file/directive/fileTemplate/fileTemplate.directive.js.map +1 -1
- package/es2022/src/modules/file/modules/file.module.js +4 -4
- package/es2022/src/modules/logger/components/console/console.component.js +5 -5
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +3 -3
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +3 -3
- package/es2022/src/modules/logger/services/logger/logger.service.js +3 -3
- package/es2022/src/modules/logger/services/rest/restSink.options.js +3 -3
- package/es2022/src/modules/logger/types/loggerOptions.js +3 -3
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +9 -7
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +5 -9
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -6
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +4 -4
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +4 -4
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +7 -15
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +7 -5
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +5 -5
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +6 -10
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +3 -4
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +4 -5
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +8 -9
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +3 -4
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +3 -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 +4 -5
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +5 -5
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/src/pipes/numeral/numeral.pipe.js +4 -4
- package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -1
- package/es2022/src/pipes/trimText/trimText.pipe.js +4 -4
- package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -1
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +3 -3
- package/es2022/src/services/notifications/defaultNotifications.service.js +3 -3
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
- package/es2022/src/services/statusCode/statusCode.service.js +3 -3
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +3 -3
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/eslint.config.js +6 -0
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.html +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
- package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
- package/forms/src/directives/numberInput/maxValueNumberValidator.directive.d.ts +1 -1
- package/forms/src/directives/numberInput/minValueNumberValidator.directive.d.ts +1 -1
- package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts +1 -1
- package/forms/src/directives/numberInput/numberInputValidator.directive.d.ts +1 -1
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
- package/forms/src/misc/utils.d.ts.map +1 -1
- package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.d.ts +1 -1
- package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.d.ts.map +1 -1
- package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html +4 -3
- package/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.d.ts +1 -1
- package/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.d.ts +1 -1
- package/forms/src/modules/errorMessage/modules/errorMessage.module.d.ts +1 -3
- package/forms/src/modules/errorMessage/modules/errorMessage.module.d.ts.map +1 -1
- package/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.d.ts +1 -1
- package/forms/src/modules/formPipes/modules/formPipes.module.d.ts +1 -1
- package/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.d.ts +1 -1
- package/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.d.ts +1 -1
- package/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.d.ts +1 -1
- package/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.d.ts +1 -1
- package/forms/src/modules/numberInput.module.d.ts +1 -1
- package/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.d.ts.map +1 -1
- package/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
- package/material/src/components/confirmationDialog/confirmationDialog.component.d.ts +1 -1
- package/material/src/components/confirmationDialog/confirmationDialog.component.d.ts.map +1 -1
- package/material/src/components/movableTitledDialog/movableTitledDialog.component.d.ts +1 -1
- package/material/src/components/movableTitledDialog/movableTitledDialog.component.d.ts.map +1 -1
- package/material/src/components/movableTitledDialog/movableTitledDialog.component.html +1 -1
- package/material/src/components/titledDialog/titledDialog.component.d.ts +1 -1
- package/material/src/components/titledDialog/titledDialog.component.d.ts.map +1 -1
- package/material/src/components/titledDialog/titledDialog.component.html +2 -2
- package/material/src/directives/confirmationDialog/confirmationDialog.directive.d.ts.map +1 -1
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts.map +1 -1
- package/material/src/modules/confirmationDialog.module.d.ts +4 -6
- package/material/src/modules/confirmationDialog.module.d.ts.map +1 -1
- package/material/src/modules/movableTitledDialog.module.d.ts +5 -5
- package/material/src/modules/movableTitledDialog.module.d.ts.map +1 -1
- package/material/src/modules/titledDialog.module.d.ts +2 -4
- package/material/src/modules/titledDialog.module.d.ts.map +1 -1
- package/package.json +44 -44
- package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
- package/src/decorators/typeProvider/typeProvider.decorator.d.ts.map +1 -1
- package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
- package/src/directives/clickOutside/clickOutside.directive.d.ts +3 -3
- package/src/directives/clickOutside/clickOutside.directive.d.ts.map +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
- package/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.d.ts.map +1 -1
- package/src/directives/positionTo/positionTo.directive.d.ts +3 -3
- package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/modules/castPipes/modules/castPipes.module.d.ts +1 -1
- package/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.d.ts +1 -1
- package/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.d.ts +1 -1
- package/src/modules/castPipes/pipes/asRequired/asRequired.pipe.d.ts +1 -1
- package/src/modules/castPipes/pipes/castType/castType.pipe.d.ts +1 -1
- package/src/modules/commonLocalize.module.d.ts +1 -1
- package/src/modules/commonUtils.module.d.ts +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
- package/src/modules/file/components/file/file.component.d.ts.map +1 -1
- package/src/modules/file/components/fileInput/fileInput.component.d.ts.map +1 -1
- package/src/modules/file/components/uploadButton/uploadButton.component.d.ts.map +1 -1
- package/src/modules/file/directive/fileInput/fileInput.directive.d.ts.map +1 -1
- package/src/modules/file/directive/fileTemplate/fileTemplate.directive.d.ts.map +1 -1
- package/src/modules/logger/components/console/console.component.d.ts +3 -3
- package/src/modules/logger/components/console/console.component.d.ts.map +1 -1
- package/src/modules/multiButton/components/multiButton/multiButton.component.d.ts +1 -1
- package/src/modules/multiButton/components/multiButton/multiButton.component.d.ts.map +1 -1
- package/src/modules/multiButton/components/multiButton/multiButton.component.html +1 -1
- package/src/modules/multiButton/modules/multiButton.module.d.ts +1 -2
- package/src/modules/multiButton/modules/multiButton.module.d.ts.map +1 -1
- package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.d.ts +1 -1
- package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.d.ts.map +1 -1
- package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.html +4 -1
- package/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.d.ts +1 -1
- package/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.d.ts.map +1 -1
- package/src/modules/progressIndicator/modules/progressIndicator.module.d.ts +1 -3
- package/src/modules/progressIndicator/modules/progressIndicator.module.d.ts.map +1 -1
- package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts +1 -1
- package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts.map +1 -1
- package/src/modules/tooltip/components/tooltip/tooltip.component.html +13 -5
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
- package/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.d.ts +1 -1
- package/src/modules/tooltip/modules/tooltip.module.d.ts +4 -5
- package/src/modules/tooltip/modules/tooltip.module.d.ts.map +1 -1
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
- package/src/pipes/firstUppercase/firstUppercase.pipe.d.ts +3 -3
- package/src/pipes/firstUppercase/firstUppercase.pipe.d.ts.map +1 -1
- package/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.d.ts +7 -7
- package/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.d.ts.map +1 -1
- package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
- package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
- package/src/pipes/localize/localize.pipe.d.ts +3 -3
- package/src/pipes/localize/localize.pipe.d.ts.map +1 -1
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +3 -3
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts.map +1 -1
- package/version.bak +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { NgClass } from '@angular/common';
|
|
2
3
|
import { ProgressIndicatorService, DEFAULT_PROGRESS_NAME } from '../../services/progressIndicator.service';
|
|
4
|
+
import { LocalizePipe } from '../../../../pipes';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
import * as i1 from "../../services/progressIndicator.service";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
|
-
import * as i3 from "../../../../pipes/localize/localize.pipe";
|
|
7
7
|
/**
|
|
8
8
|
* Component that is used for displaying global progress indicator
|
|
9
9
|
*/
|
|
@@ -54,12 +54,15 @@ export class ProgressIndicatorComponent {
|
|
|
54
54
|
this._subscription = null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
58
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorComponent, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: ProgressIndicatorComponent, isStandalone: true, selector: "progress-indicator", inputs: { cssClass: "cssClass" }, ngImport: i0, template: "<div [ngClass]=\"appliedClass\">\n <div class=\"spinner\"></div>\n\n <div class=\"messages\">\n @for(msg of messages; track msg)\n {\n <div [ngClass]=\"'message-' + ((messages.length - $index) > 3 ? 'out' : (messages.length - $index - 1))\">{{msg | localize}}</div>\n }\n </div>\n</div>", styles: ["\n.progress-indicator\n{\n transition: all 250ms linear;\n background-color: rgba(0, 0, 0, 0.45);\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 23456;\n opacity: 0;\n visibility: hidden;\n}\n.progress-indicator.running\n{\n visibility: visible;\n opacity: 1;\n}\n.progress-indicator.running > .spinner\n{\n border: 4px solid #eee;\n border-bottom: none;\n border-top-left-radius: 48px;\n border-top-right-radius: 48px;\n height: 24px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n top: 50%;\n width: 48px;\n animation-name: rotate-progress;\n animation-duration: 450ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: calc(50%) calc(50% + 12px);\n}\n\n.progress-indicator.running > .messages\n{\n color: #eee;\n top: calc(50% + 25px);\n position: relative;\n text-align: center;\n font-weight: bold;\n font-size: 1.25em;\n display: flex;\n flex-direction: column-reverse;\n}\n\n.progress-indicator.running > .messages .message-0,\n.progress-indicator.running > .messages .message-1,\n.progress-indicator.running > .messages .message-2,\n.progress-indicator.running > .messages .message-out\n{\n transition: all 500ms;\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.progress-indicator.running > .messages .message-1\n{\n transform: scale3d(0.7, 0.7, 0.7) translateZ(-20px) translateY(30px);\n opacity: 0.8;\n}\n\n.progress-indicator.running > .messages .message-2\n{\n transform: scale3d(0.35, 0.35, 0.35) translateZ(-40px) translateY(100px);\n opacity: 0.5;\n}\n\n.progress-indicator.running > .messages .message-out\n{\n transform: scale3d(0, 0, 0) translateZ(-100px) translateY(200px);\n}\n\n@keyframes rotate-progress\n{\n from\n {\n transform: rotate(0deg);\n }\n to\n {\n transform: rotate(360deg);\n }\n}"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: LocalizePipe, name: "localize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
|
-
args: [{ selector: 'progress-indicator',
|
|
62
|
+
args: [{ selector: 'progress-indicator', imports: [
|
|
63
|
+
NgClass,
|
|
64
|
+
LocalizePipe,
|
|
65
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"appliedClass\">\n <div class=\"spinner\"></div>\n\n <div class=\"messages\">\n @for(msg of messages; track msg)\n {\n <div [ngClass]=\"'message-' + ((messages.length - $index) > 3 ? 'out' : (messages.length - $index - 1))\">{{msg | localize}}</div>\n }\n </div>\n</div>", styles: ["\n.progress-indicator\n{\n transition: all 250ms linear;\n background-color: rgba(0, 0, 0, 0.45);\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 23456;\n opacity: 0;\n visibility: hidden;\n}\n.progress-indicator.running\n{\n visibility: visible;\n opacity: 1;\n}\n.progress-indicator.running > .spinner\n{\n border: 4px solid #eee;\n border-bottom: none;\n border-top-left-radius: 48px;\n border-top-right-radius: 48px;\n height: 24px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n top: 50%;\n width: 48px;\n animation-name: rotate-progress;\n animation-duration: 450ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: calc(50%) calc(50% + 12px);\n}\n\n.progress-indicator.running > .messages\n{\n color: #eee;\n top: calc(50% + 25px);\n position: relative;\n text-align: center;\n font-weight: bold;\n font-size: 1.25em;\n display: flex;\n flex-direction: column-reverse;\n}\n\n.progress-indicator.running > .messages .message-0,\n.progress-indicator.running > .messages .message-1,\n.progress-indicator.running > .messages .message-2,\n.progress-indicator.running > .messages .message-out\n{\n transition: all 500ms;\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.progress-indicator.running > .messages .message-1\n{\n transform: scale3d(0.7, 0.7, 0.7) translateZ(-20px) translateY(30px);\n opacity: 0.8;\n}\n\n.progress-indicator.running > .messages .message-2\n{\n transform: scale3d(0.35, 0.35, 0.35) translateZ(-40px) translateY(100px);\n opacity: 0.5;\n}\n\n.progress-indicator.running > .messages .message-out\n{\n transform: scale3d(0, 0, 0) translateZ(-100px) translateY(200px);\n}\n\n@keyframes rotate-progress\n{\n from\n {\n transform: rotate(0deg);\n }\n to\n {\n transform: rotate(360deg);\n }\n}"] }]
|
|
63
66
|
}], ctorParameters: () => [{ type: i1.ProgressIndicatorService }, { type: i0.ChangeDetectorRef }], propDecorators: { cssClass: [{
|
|
64
67
|
type: Input
|
|
65
68
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressIndicator.component.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.ts","../../../../../../src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAa,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"progressIndicator.component.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.ts","../../../../../../src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAa,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACtG,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAGxC,OAAO,EAAC,wBAAwB,EAAE,qBAAqB,EAAC,MAAM,0CAA0C,CAAC;AACzG,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;;;AAE/C;;GAEG;AAaH,MAAM,OAAO,0BAA0B;IAuBnC,gFAAgF;IAEhF;;OAEG;IACH,IACW,QAAQ,CAAC,QAAgB;QAEhC,IAAI,CA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AAC;YACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC9B,CAAC;IACL,CAAC;8GA7EQ,0BAA0B;kGAA1B,0BAA0B,gHCtBvC,yUASM,6/DDQE,OAAO,+EACP,YAAY;;2FAIP,0BAA0B;kBAZtC,SAAS;+BAEI,oBAAoB,WAI9B;wBACI,OAAO;wBACP,YAAY;qBACf,mBACgB,uBAAuB,CAAC,MAAM;6HA+BpC,QAAQ;sBADlB,KAAK","sourcesContent":["import {Component, Input, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef} from '@angular/core';\nimport {NgClass} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService, DEFAULT_PROGRESS_NAME} from '../../services/progressIndicator.service';\nimport {LocalizePipe} from '../../../../pipes';\n\n/**\n * Component that is used for displaying global progress indicator\n */\n@Component(\n{\n selector: 'progress-indicator',\n templateUrl: 'progressIndicator.component.html',\n styleUrl: 'progressIndicator.component.css',\n imports:\n [\n NgClass,\n LocalizePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressIndicatorComponent implements OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Applied css classes\n * @internal\n */\n public appliedClass: {[key: string]: boolean} = {'progress-indicator': true};\n\n /**\n * Array of messages that should be displayed\n * @internal\n */\n public messages: string[];\n\n //######################### public properties - inputs #########################\n\n /**\n * Sets css classes that will be applied to indicator\n */\n @Input()\n public set cssClass(cssClass: string)\n {\n this.appliedClass = {};\n this.appliedClass[cssClass] = true;\n this._changeDetector.detectChanges();\n }\n\n //######################### private properties #########################\n\n /**\n * Sets indication that progress indicator is running\n */\n private set running(running: boolean)\n {\n this.appliedClass['running'] = running;\n }\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _changeDetector: ChangeDetectorRef)\n {\n this.running = this._service.running[DEFAULT_PROGRESS_NAME];\n this.messages = this._service.messages[DEFAULT_PROGRESS_NAME] || [];\n\n this._subscription = this._service.stateChange.subscribe(name =>\n {\n if(name == DEFAULT_PROGRESS_NAME)\n {\n this.running = this._service.running[DEFAULT_PROGRESS_NAME];\n this.messages = this._service.messages[DEFAULT_PROGRESS_NAME] || [];\n\n this._changeDetector.detectChanges();\n }\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n}\n","<div [ngClass]=\"appliedClass\">\n <div class=\"spinner\"></div>\n\n <div class=\"messages\">\n @for(msg of messages; track msg)\n {\n <div [ngClass]=\"'message-' + ((messages.length - $index) > 3 ? 'out' : (messages.length - $index - 1))\">{{msg | localize}}</div>\n }\n </div>\n</div>"]}
|
package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js
CHANGED
|
@@ -103,13 +103,13 @@ export class ProgressOverlayDirective {
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
107
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressOverlayDirective, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: STRING_LOCALIZATION }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: ProgressOverlayDirective, isStandalone: true, selector: "[progressOverlay]", inputs: { name: ["progressOverlay", "name"] }, ngImport: i0 }); }
|
|
108
108
|
}
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressOverlayDirective, decorators: [{
|
|
110
110
|
type: Directive,
|
|
111
111
|
args: [{
|
|
112
|
-
selector: '[progressOverlay]'
|
|
112
|
+
selector: '[progressOverlay]',
|
|
113
113
|
}]
|
|
114
114
|
}], ctorParameters: () => [{ type: i1.ProgressIndicatorService }, { type: i0.ElementRef }, { type: Document, decorators: [{
|
|
115
115
|
type: Inject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressOverlay.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAqB,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;;;AAG7D;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAoDjC,iEAAiE;IACjE,YAAoB,QAAkC,EAClC,QAAiC,EACf,SAAmB,EACR,gBAAoC;QAHjE,aAAQ,GAAR,QAAQ,CAA0B;QAClC,aAAQ,GAAR,QAAQ,CAAyB;QACf,cAAS,GAAT,SAAS,CAAU;QACR,qBAAgB,GAAhB,gBAAgB,CAAoB;QAjBrF;;WAEG;QACK,uBAAkB,GAAqB,EAAE,CAAC;IAgBlD,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,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EAAE,mBAAmB;iBAChC;;0BAwDgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,mBAAmB;yCANhC,IAAI;sBADV,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, Input, OnInit, OnDestroy, ElementRef, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../../services/progressIndicator.service';\nimport {STRING_LOCALIZATION} from '../../../../types/tokens';\nimport {StringLocalization} from '../../../../services/stringLocalization';\n\n/**\n * Directive that is used for displaying progress indicator as overlay\n */\n@Directive(\n{\n selector: '[progressOverlay]'\n})\nexport class ProgressOverlayDirective implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Previous css position value\n */\n private _notRunningCssPosition: string;\n\n /**\n * Previous css overflow value\n */\n private _notRunningOverflow: string;\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n /**\n * Array of messages that should be displayed\n */\n private _messages: string[];\n\n /**\n * Indication that this progress indicator is running\n */\n private _running: boolean;\n\n /**\n * Element that is displaying progress indicator overlay\n */\n private _progressElement: HTMLDivElement;\n\n /**\n * Html messages element\n */\n private _messagesElement: HTMLDivElement;\n\n /**\n * Html message elements, last three\n */\n private _lastThreeMessages: HTMLDivElement[] = [];\n\n //######################### public properties - inputs #########################\n\n /**\n * Name of progress indicator group\n */\n @Input('progressOverlay')\n public name: string;\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n @Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._service.registerOverlayGroup(this.name);\n\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n\n this._subscription = this._service.stateChange.subscribe(name => \n {\n if(name == this.name)\n {\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n }\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._service.unregisterOverlayGroup(this.name);\n\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Renders progress overlay\n */\n private _renderProgressOverlay()\n {\n //removes progress indicator\n if(this._progressElement && !this._running)\n {\n this._progressElement.remove();\n this._progressElement = null;\n this._messagesElement = null;\n this._lastThreeMessages = [];\n\n this._element.nativeElement.style.position = this._notRunningCssPosition;\n this._notRunningCssPosition = null;\n this._element.nativeElement.style.overflow = this._notRunningOverflow;\n this._notRunningOverflow = null;\n }\n //adds progress indicator\n else if(!this._progressElement && this._running)\n {\n this._notRunningCssPosition = this._element.nativeElement.style.position;\n this._element.nativeElement.style.position = 'relative';\n this._notRunningOverflow = this._element.nativeElement.style.overflow;\n this._element.nativeElement.style.overflow = 'hidden';\n\n this._progressElement = this._document.createElement('div');\n this._progressElement.className = 'progress-overlay-div';\n\n const spinner = this._document.createElement('div');\n spinner.className = 'spinner';\n this._progressElement.append(spinner);\n\n this._messagesElement = this._document.createElement('div');\n this._messagesElement.className = 'messages';\n this._progressElement.append(this._messagesElement);\n\n this._element.nativeElement.append(this._progressElement);\n\n }\n\n this._renderProgressMessages();\n }\n\n /**\n * Renders messages to progress overlay\n */\n private _renderProgressMessages()\n {\n if(!this._messagesElement)\n {\n return;\n }\n\n const newMessages = this._messages.slice(this._messagesElement.childNodes.length);\n\n for(const message of newMessages)\n {\n const messageDiv = this._document.createElement('div');\n messageDiv.textContent = this._localizationSvc.get(message);\n\n this._lastThreeMessages.unshift(messageDiv);\n this._messagesElement.append(messageDiv);\n \n const outMessagesDiv = this._lastThreeMessages.splice(3);\n\n outMessagesDiv.forEach(outMsg =>\n {\n outMsg.className = 'message-out';\n });\n\n this._lastThreeMessages.forEach((msg, index) =>\n {\n msg.className = `message-${index}`;\n });\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"progressOverlay.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAqB,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;;;AAG7D;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAoDjC,iEAAiE;IACjE,YAAoB,QAAkC,EAClC,QAAiC,EACf,SAAmB,EACR,gBAAoC;QAHjE,aAAQ,GAAR,QAAQ,CAA0B;QAClC,aAAQ,GAAR,QAAQ,CAAyB;QACf,cAAS,GAAT,SAAS,CAAU;QACR,qBAAgB,GAAhB,gBAAgB,CAAoB;QAjBrF;;WAEG;QACK,uBAAkB,GAAqB,EAAE,CAAC;IAgBlD,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACzD,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAE9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;YAE5D,IAAG,IA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C;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAElF,KAAI,MAAM,OAAO,IAAI,WAAW,EAChC,CAAC;YACG,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACvD,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAE5D,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAEzC,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAEzD,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAE5B,MAAM,CAAC,SAAS,GAAG,aAAa,CAAC;YACrC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAE3C,GAAG,CAAC,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC;YACvC,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;8GAjLQ,wBAAwB,oFAuDb,QAAQ,aACR,mBAAmB;kGAxD9B,wBAAwB;;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC;;0BAwDgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,mBAAmB;yCANhC,IAAI;sBADV,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, Input, OnInit, OnDestroy, ElementRef, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../../services/progressIndicator.service';\nimport {STRING_LOCALIZATION} from '../../../../types/tokens';\nimport {StringLocalization} from '../../../../services/stringLocalization';\n\n/**\n * Directive that is used for displaying progress indicator as overlay\n */\n@Directive(\n{\n selector: '[progressOverlay]',\n})\nexport class ProgressOverlayDirective implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Previous css position value\n */\n private _notRunningCssPosition: string;\n\n /**\n * Previous css overflow value\n */\n private _notRunningOverflow: string;\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n /**\n * Array of messages that should be displayed\n */\n private _messages: string[];\n\n /**\n * Indication that this progress indicator is running\n */\n private _running: boolean;\n\n /**\n * Element that is displaying progress indicator overlay\n */\n private _progressElement: HTMLDivElement;\n\n /**\n * Html messages element\n */\n private _messagesElement: HTMLDivElement;\n\n /**\n * Html message elements, last three\n */\n private _lastThreeMessages: HTMLDivElement[] = [];\n\n //######################### public properties - inputs #########################\n\n /**\n * Name of progress indicator group\n */\n @Input('progressOverlay')\n public name: string;\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n @Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._service.registerOverlayGroup(this.name);\n\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n\n this._subscription = this._service.stateChange.subscribe(name =>\n {\n if(name == this.name)\n {\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n }\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._service.unregisterOverlayGroup(this.name);\n\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Renders progress overlay\n */\n private _renderProgressOverlay()\n {\n //removes progress indicator\n if(this._progressElement && !this._running)\n {\n this._progressElement.remove();\n this._progressElement = null;\n this._messagesElement = null;\n this._lastThreeMessages = [];\n\n this._element.nativeElement.style.position = this._notRunningCssPosition;\n this._notRunningCssPosition = null;\n this._element.nativeElement.style.overflow = this._notRunningOverflow;\n this._notRunningOverflow = null;\n }\n //adds progress indicator\n else if(!this._progressElement && this._running)\n {\n this._notRunningCssPosition = this._element.nativeElement.style.position;\n this._element.nativeElement.style.position = 'relative';\n this._notRunningOverflow = this._element.nativeElement.style.overflow;\n this._element.nativeElement.style.overflow = 'hidden';\n\n this._progressElement = this._document.createElement('div');\n this._progressElement.className = 'progress-overlay-div';\n\n const spinner = this._document.createElement('div');\n spinner.className = 'spinner';\n this._progressElement.append(spinner);\n\n this._messagesElement = this._document.createElement('div');\n this._messagesElement.className = 'messages';\n this._progressElement.append(this._messagesElement);\n\n this._element.nativeElement.append(this._progressElement);\n }\n\n this._renderProgressMessages();\n }\n\n /**\n * Renders messages to progress overlay\n */\n private _renderProgressMessages()\n {\n if(!this._messagesElement)\n {\n return;\n }\n\n const newMessages = this._messages.slice(this._messagesElement.childNodes.length);\n\n for(const message of newMessages)\n {\n const messageDiv = this._document.createElement('div');\n messageDiv.textContent = this._localizationSvc.get(message);\n\n this._lastThreeMessages.unshift(messageDiv);\n this._messagesElement.append(messageDiv);\n\n const outMessagesDiv = this._lastThreeMessages.splice(3);\n\n outMessagesDiv.forEach(outMsg =>\n {\n outMsg.className = 'message-out';\n });\n\n this._lastThreeMessages.forEach((msg, index) =>\n {\n msg.className = `message-${index}`;\n });\n }\n }\n}"]}
|
|
@@ -37,10 +37,10 @@ export class ProgressInterceptor {
|
|
|
37
37
|
}
|
|
38
38
|
}, () => this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME))));
|
|
39
39
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressInterceptor, deps: [{ token: i1.ProgressIndicatorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressInterceptor }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressInterceptor, decorators: [{
|
|
44
44
|
type: Injectable
|
|
45
45
|
}], ctorParameters: () => [{ type: i1.ProgressIndicatorService }] });
|
|
46
46
|
/**
|
|
@@ -49,6 +49,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
49
49
|
export const PROGRESS_INTERCEPTOR_PROVIDER = {
|
|
50
50
|
provide: HTTP_INTERCEPTORS,
|
|
51
51
|
useClass: ProgressInterceptor,
|
|
52
|
-
multi: true
|
|
52
|
+
multi: true,
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=progressInterceptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressInterceptor.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/interceptors/progressInterceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,eAAe,CAAC;AACxD,OAAO,EAA0C,aAAa,EAAE,iBAAiB,EAAc,MAAM,sBAAsB,CAAC;AAC5H,OAAO,EAAa,GAAG,EAAC,MAAM,MAAM,CAAC;AAErC,OAAO,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAC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;IACI,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,IAAI;CACd,CAAC","sourcesContent":["import {Injectable, ClassProvider} from '@angular/core';\nimport {HttpEvent, HttpInterceptor, HttpHandler, HttpEventType, HTTP_INTERCEPTORS, HttpRequest} from '@angular/common/http';\nimport {Observable, tap} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../services/progressIndicator.service';\nimport {PROGRESS_INDICATOR_GROUP_NAME} from '../misc/tokens';\nimport {IGNORED_INTERCEPTORS} from '../../../types/tokens';\n\n/**\n * ProgressInterceptor used for intercepting http requests and displaying progress indicatior\n */\n@Injectable()\nexport class ProgressInterceptor implements HttpInterceptor\n{\n //######################### constructors #########################\n constructor(private _indicatorSvc: ProgressIndicatorService)\n {\n }\n\n //######################### public methods - implementation of HttpInterceptor #########################\n\n /**\n * Intercepts http request\n * @param req - Request to be intercepted\n * @param next - Next middleware that can be called for next processing\n */\n public intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>\n {\n return next.handle(req)\n .pipe(tap(event =>\n {\n //interceptor is ignored\n if(req.context.get(IGNORED_INTERCEPTORS).some(itm => itm == ProgressInterceptor))\n {\n return;\n }\n\n //request started\n if(event.type == HttpEventType.Sent)\n {\n this._indicatorSvc.showProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME));\n }\n //response received\n else if(event.type == HttpEventType.Response)\n {\n this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME));\n }\n }, () => this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME))));\n }\n}\n\n/**\n * Progress interceptor provider\n */\nexport const PROGRESS_INTERCEPTOR_PROVIDER: ClassProvider
|
|
1
|
+
{"version":3,"file":"progressInterceptor.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/interceptors/progressInterceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM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CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC;8GApCQ,mBAAmB;kHAAnB,mBAAmB;;2FAAnB,mBAAmB;kBAD/B,UAAU;;AAwCX;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAC1C;IACI,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,IAAI;CACd,CAAC","sourcesContent":["import {Injectable, ClassProvider} from '@angular/core';\nimport {HttpEvent, HttpInterceptor, HttpHandler, HttpEventType, HTTP_INTERCEPTORS, HttpRequest} from '@angular/common/http';\nimport {Observable, tap} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../services/progressIndicator.service';\nimport {PROGRESS_INDICATOR_GROUP_NAME} from '../misc/tokens';\nimport {IGNORED_INTERCEPTORS} from '../../../types/tokens';\n\n/**\n * ProgressInterceptor used for intercepting http requests and displaying progress indicatior\n */\n@Injectable()\nexport class ProgressInterceptor implements HttpInterceptor\n{\n //######################### constructors #########################\n constructor(private _indicatorSvc: ProgressIndicatorService)\n {\n }\n\n //######################### public methods - implementation of HttpInterceptor #########################\n\n /**\n * Intercepts http request\n * @param req - Request to be intercepted\n * @param next - Next middleware that can be called for next processing\n */\n public intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>\n {\n return next.handle(req)\n .pipe(tap(event =>\n {\n //interceptor is ignored\n if(req.context.get(IGNORED_INTERCEPTORS).some(itm => itm == ProgressInterceptor))\n {\n return;\n }\n\n //request started\n if(event.type == HttpEventType.Sent)\n {\n this._indicatorSvc.showProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME));\n }\n //response received\n else if(event.type == HttpEventType.Response)\n {\n this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME));\n }\n }, () => this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME))));\n }\n}\n\n/**\n * Progress interceptor provider\n */\nexport const PROGRESS_INTERCEPTOR_PROVIDER: ClassProvider =\n{\n provide: HTTP_INTERCEPTORS,\n useClass: ProgressInterceptor,\n multi: true,\n};"]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { CommonLocalizeModule } from '../../commonLocalize.module';
|
|
4
2
|
import { ProgressIndicatorComponent } from '../components/progressIndicator/progressIndicator.component';
|
|
5
3
|
import { ProgressOverlayDirective } from '../directives/progressOverlay/progressOverlay.directive';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
@@ -8,28 +6,22 @@ import * as i0 from "@angular/core";
|
|
|
8
6
|
* Module for progress indicator
|
|
9
7
|
*/
|
|
10
8
|
export class ProgressIndicatorModule {
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
13
|
-
ProgressOverlayDirective],
|
|
14
|
-
CommonLocalizeModule], exports: [ProgressIndicatorComponent,
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorModule, imports: [ProgressIndicatorComponent,
|
|
11
|
+
ProgressOverlayDirective], exports: [ProgressIndicatorComponent,
|
|
15
12
|
ProgressOverlayDirective] }); }
|
|
16
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
17
|
-
CommonLocalizeModule] }); }
|
|
13
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorModule }); }
|
|
18
14
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorModule, decorators: [{
|
|
20
16
|
type: NgModule,
|
|
21
17
|
args: [{
|
|
22
18
|
imports: [
|
|
23
|
-
CommonModule,
|
|
24
|
-
CommonLocalizeModule,
|
|
25
|
-
],
|
|
26
|
-
declarations: [
|
|
27
19
|
ProgressIndicatorComponent,
|
|
28
|
-
ProgressOverlayDirective
|
|
20
|
+
ProgressOverlayDirective,
|
|
29
21
|
],
|
|
30
22
|
exports: [
|
|
31
23
|
ProgressIndicatorComponent,
|
|
32
|
-
ProgressOverlayDirective
|
|
24
|
+
ProgressOverlayDirective,
|
|
33
25
|
]
|
|
34
26
|
}]
|
|
35
27
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressIndicator.module.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/modules/progressIndicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"progressIndicator.module.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/modules/progressIndicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,0BAA0B,EAAC,MAAM,6DAA6D,CAAC;AACvG,OAAO,EAAC,wBAAwB,EAAC,MAAM,yDAAyD,CAAC;;AAEjG;;GAEG;AAcH,MAAM,OAAO,uBAAuB;8GAAvB,uBAAuB;+GAAvB,uBAAuB,YAT5B,0BAA0B;YAC1B,wBAAwB,aAIxB,0BAA0B;YAC1B,wBAAwB;+GAGnB,uBAAuB;;2FAAvB,uBAAuB;kBAbnC,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,0BAA0B;wBAC1B,wBAAwB;qBAC3B;oBACD,OAAO,EACP;wBACI,0BAA0B;wBAC1B,wBAAwB;qBAC3B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {ProgressIndicatorComponent} from '../components/progressIndicator/progressIndicator.component';\nimport {ProgressOverlayDirective} from '../directives/progressOverlay/progressOverlay.directive';\n\n/**\n * Module for progress indicator\n */\n@NgModule(\n{\n imports:\n [\n ProgressIndicatorComponent,\n ProgressOverlayDirective,\n ],\n exports:\n [\n ProgressIndicatorComponent,\n ProgressOverlayDirective,\n ]\n})\nexport class ProgressIndicatorModule\n{\n}"]}
|
|
@@ -239,10 +239,10 @@ export class ProgressIndicatorService {
|
|
|
239
239
|
this._runningRequests[name] = group;
|
|
240
240
|
return group;
|
|
241
241
|
}
|
|
242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
243
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorService, deps: [{ token: i1.ProgressIndicatorOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
243
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorService, providedIn: 'root' }); }
|
|
244
244
|
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ProgressIndicatorService, decorators: [{
|
|
246
246
|
type: Injectable,
|
|
247
247
|
args: [{ providedIn: 'root' }]
|
|
248
248
|
}], ctorParameters: () => [{ type: i1.ProgressIndicatorOptions, decorators: [{
|
|
@@ -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;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
|
|
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}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, HostListener } from '@angular/core';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
4
|
/**
|
|
5
5
|
* Component used for displaying tooltip content
|
|
6
6
|
*/
|
|
@@ -57,12 +57,14 @@ export class TooltipComponent {
|
|
|
57
57
|
mouseLeave() {
|
|
58
58
|
this.leaveFn();
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: TooltipComponent, isStandalone: true, selector: "tooltip-popup", host: { listeners: { "mouseenter": "mouseEnter()", "mouseleave": "mouseLeave()" } }, ngImport: i0, template: "@if(!template && !allowHtml)\r\n{\r\n <div>{{data}}</div>\r\n}\r\n\r\n@if(!template && allowHtml)\r\n{\r\n <div [innerHTML]=\"data\"></div>\r\n}\r\n\r\n@if(template)\r\n{\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"/>\r\n}\r\n", 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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
|
-
args: [{ selector: 'tooltip-popup',
|
|
65
|
+
args: [{ selector: 'tooltip-popup', imports: [
|
|
66
|
+
NgTemplateOutlet,
|
|
67
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(!template && !allowHtml)\r\n{\r\n <div>{{data}}</div>\r\n}\r\n\r\n@if(!template && allowHtml)\r\n{\r\n <div [innerHTML]=\"data\"></div>\r\n}\r\n\r\n@if(template)\r\n{\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"/>\r\n}\r\n", 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}"] }]
|
|
66
68
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { mouseEnter: [{
|
|
67
69
|
type: HostListener,
|
|
68
70
|
args: ['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
|
|
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;AAC3H,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;;AAMjD;;GAEG;AAYH,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,8JCrB7B,6QAcA,2PDGQ,gBAAgB;;2FAIX,gBAAgB;kBAX5B,SAAS;+BAEI,eAAe,WAIzB;wBACI,gBAAgB;qBACnB,mBACgB,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 {NgTemplateOutlet} from '@angular/common';\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 styleUrl: 'tooltip.component.css',\n imports:\n [\n NgTemplateOutlet,\n ],\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}","@if(!template && !allowHtml)\r\n{\r\n <div>{{data}}</div>\r\n}\r\n\r\n@if(!template && allowHtml)\r\n{\r\n <div [innerHTML]=\"data\"></div>\r\n}\r\n\r\n@if(template)\r\n{\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"/>\r\n}\r\n"]}
|
|
@@ -2,7 +2,8 @@ import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, In
|
|
|
2
2
|
import { AnimationBuilder } from '@angular/animations';
|
|
3
3
|
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
import { fadeInAnimation, fadeOutAnimation } from '@anglr/animations';
|
|
5
|
-
import {
|
|
5
|
+
import { isBlank, isPresent, nameof, renderToBody } from '@jscrpt/common';
|
|
6
|
+
import { extend } from '@jscrpt/common/extend';
|
|
6
7
|
import { lastValueFrom } from 'rxjs';
|
|
7
8
|
import { TooltipComponent } from '../../components/tooltip/tooltip.component';
|
|
8
9
|
import { TOOLTIP_OPTIONS } from '../../misc/tokens';
|
|
@@ -237,14 +238,13 @@ export class TooltipDirective {
|
|
|
237
238
|
this._tooltipComponent.instance.invalidateVisuals();
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
241
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", 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 }); }
|
|
242
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", 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 }); }
|
|
242
243
|
}
|
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
244
245
|
type: Directive,
|
|
245
246
|
args: [{
|
|
246
247
|
selector: '[tooltip]',
|
|
247
|
-
standalone: true,
|
|
248
248
|
}]
|
|
249
249
|
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.Injector }, { type: i0.ElementRef }, { type: i1.AnimationBuilder }, { type: Document, decorators: [{
|
|
250
250
|
type: Inject,
|
|
@@ -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,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;;;AAElD;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,KAAK,EAAE,GAAG;IACV,QAAQ,EACR;QACI,MAAM,EAAE,YAAY;QACpB,SAAS,EAAE,iBAAiB,CAAC,MAAM;KACtC;IACD,cAAc,EAAE,KAAK;IACrB,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,IAAI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AC9B,CAAC;YACL,CAAC,EACD,GAAG,EAAE;gBAED,UAAU,CAAC,GAAG,EAAE;oBAEZ,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;oBAEvB,IAAG,CAAC,IAAI,CAAC,YAAY,EACrB,CAAC;wBACG,IAAI,CAAC,YAAY,EAAE,CAAC;oBACxB,CAAC;oBAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;gBAC9B,CAAC,EAAE,CAAC,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;YAEvD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QACxD,CAAC;IACL,CAAC;8GAvWQ,gBAAgB,oIAgHL,QAAQ,aACR,QAAQ,0EAEI,eAAe;kGAnHtC,gBAAgB,8YAwGX,wBAAwB;;2FAxG7B,gBAAgB;kBAL5B,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,IAAI;iBACnB;;0BAiHgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;yCAjExC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAsBC,cAAc;sBADpB,KAAK;gBASC,gBAAgB;sBADtB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBAkE5B,UAAU;sBADnB,YAAY;uBAAC,YAAY,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: 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}"]}
|
|
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,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,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,EACR;QACI,MAAM,EAAE,YAAY;QACpB,SAAS,EAAE,iBAAiB,CAAC,MAAM;KACtC;IACD,cAAc,EAAE,KAAK;IACr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SAAS,GAAG,IAAI,CAAC;oBACtB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;gBAC9B,CAAC;YACL,CAAC,EACD,GAAG,EAAE;gBAED,UAAU,CAAC,GAAG,EAAE;oBAEZ,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;oBAEvB,IAAG,CAAC,IAAI,CAAC,YAAY,EACrB,CAAC;wBACG,IAAI,CAAC,YAAY,EAAE,CAAC;oBACxB,CAAC;oBAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;gBAC9B,CAAC,EAAE,CAAC,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;YAEvD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QACxD,CAAC;IACL,CAAC;8GAvWQ,gBAAgB,oIAgHL,QAAQ,aACR,QAAQ,0EAEI,eAAe;kGAnHtC,gBAAgB,8YAwGX,wBAAwB;;2FAxG7B,gBAAgB;kBAJ5B,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;iBACxB;;0BAiHgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;yCAjExC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAsBC,cAAc;sBADpB,KAAK;gBASC,gBAAgB;sBADtB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBAkE5B,UAAU;sBADnB,YAAY;uBAAC,YAAY,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, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {extend} from '@jscrpt/common/extend';\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: 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})\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}"]}
|
|
@@ -15,10 +15,10 @@ export class TooltipTemplateDirective {
|
|
|
15
15
|
static ngTemplateContextGuard(_dir, _ctx) {
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: TooltipTemplateDirective, isStandalone: true, selector: "[tooltipTemplate]", ngImport: i0 }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipTemplateDirective, decorators: [{
|
|
22
22
|
type: Directive,
|
|
23
23
|
args: [{
|
|
24
24
|
selector: '[tooltipTemplate]'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
2
|
import { TooltipDirective, TooltipTemplateDirective } from '../directives';
|
|
4
3
|
import { TooltipComponent } from '../components';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
@@ -7,21 +6,18 @@ import * as i0 from "@angular/core";
|
|
|
7
6
|
* Module for rendering tooltips
|
|
8
7
|
*/
|
|
9
8
|
export class TooltipModule {
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: TooltipModule, imports: [TooltipDirective,
|
|
11
|
+
TooltipTemplateDirective,
|
|
12
|
+
TooltipComponent], exports: [TooltipDirective,
|
|
14
13
|
TooltipTemplateDirective] }); }
|
|
15
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
14
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipModule }); }
|
|
16
15
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TooltipModule, decorators: [{
|
|
18
17
|
type: NgModule,
|
|
19
18
|
args: [{
|
|
20
19
|
imports: [
|
|
21
|
-
CommonModule,
|
|
22
20
|
TooltipDirective,
|
|
23
|
-
],
|
|
24
|
-
declarations: [
|
|
25
21
|
TooltipTemplateDirective,
|
|
26
22
|
TooltipComponent,
|
|
27
23
|
],
|
|
@@ -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;
|
|
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;AAEvC,OAAO,EAAC,gBAAgB,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;;AAE/C;;GAEG;AAeH,MAAM,OAAO,aAAa;8GAAb,aAAa;+GAAb,aAAa,YAVlB,gBAAgB;YAChB,wBAAwB;YACxB,gBAAgB,aAIhB,gBAAgB;YAChB,wBAAwB;+GAGnB,aAAa;;2FAAb,aAAa;kBAdzB,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,gBAAgB;wBAChB,wBAAwB;wBACxB,gBAAgB;qBACnB;oBACD,OAAO,EACP;wBACI,gBAAgB;wBAChB,wBAAwB;qBAC3B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\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 TooltipDirective,\n TooltipTemplateDirective,\n TooltipComponent,\n ],\n exports:\n [\n TooltipDirective,\n TooltipTemplateDirective,\n ]\n})\nexport class TooltipModule\n{\n}\n"]}
|
|
@@ -26,14 +26,13 @@ export class DisplayPropertiesPipe {
|
|
|
26
26
|
return result;
|
|
27
27
|
}).join(itemSeparator);
|
|
28
28
|
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
30
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DisplayPropertiesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
30
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.0", 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: "19.1.0", ngImport: i0, type: DisplayPropertiesPipe, decorators: [{
|
|
33
33
|
type: Pipe,
|
|
34
34
|
args: [{
|
|
35
35
|
name: 'displayProperties',
|
|
36
|
-
standalone: true,
|
|
37
36
|
}]
|
|
38
37
|
}] });
|
|
39
38
|
//# sourceMappingURL=displayProperties.pipe.js.map
|
|
@@ -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;
|
|
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;AAKH,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;kBAJjC,IAAI;mBACL;oBACI,IAAI,EAAE,mBAAmB;iBAC5B","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})\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}"]}
|