@anglr/common 20.0.0-beta.20240529082303 → 20.0.0-beta.20240530103148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +66 -0
- package/es2022/date-fns/src/misc/utils.js.map +1 -1
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +14 -24
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -24
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -28
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +14 -14
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +5 -4
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +72 -111
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +7 -21
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +13 -15
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +32 -27
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +5 -4
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/index.js +0 -1
- package/es2022/forms/src/index.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupAsyncValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/formGroupValidator.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/invalidateOnChange.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/modelPropertyMetadata.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/decorators/requiredIf.decorator.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js +0 -1
- package/es2022/forms/src/misc/formModel/misc/currentValue.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js +0 -4
- package/es2022/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
- package/es2022/forms/src/misc/utils.js.map +1 -1
- package/es2022/forms/src/misc/validationErrorsContainerView.js +7 -9
- package/es2022/forms/src/misc/validationErrorsContainerView.js.map +1 -1
- package/es2022/forms/src/misc/validators.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +7 -29
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +8 -20
- package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -4
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +6 -6
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -4
- package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js +5 -5
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -4
- package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/hasError.module.js +6 -17
- package/es2022/forms/src/modules/hasError.module.js.map +1 -1
- package/es2022/forms/src/modules/numberInput.module.js +5 -5
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -10
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -4
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
- package/es2022/forms/src/services/submitted/submitted.service.js +14 -12
- package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -24
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +18 -21
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +20 -26
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -10
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +3 -10
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +37 -38
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +10 -16
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +6 -6
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +5 -5
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/material/src/modules/movableTitledDialog.module.js +6 -6
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +6 -6
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -5
- package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js +5 -5
- package/es2022/material/src/services/titledDialog/titledDialogService.options.js.map +1 -1
- package/es2022/moment/src/misc/utils.js.map +1 -1
- package/es2022/moment/src/modules/moment.module.js +5 -5
- package/es2022/moment/src/modules/moment.module.js.map +1 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
- package/es2022/router/src/decorators/componentRedirectRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/componentRoute.decorator.js.map +1 -1
- package/es2022/router/src/decorators/moduleRoutes.decorator.js.map +1 -1
- package/es2022/router/src/misc/utils.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouter.js +16 -17
- package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouterData.js +3 -8
- package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +20 -22
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +18 -20
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
- package/es2022/src/decorators/asSignal/asSignal.decorator.js.map +1 -1
- package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
- package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +4 -23
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +27 -39
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +33 -48
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +4 -5
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +13 -27
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +20 -45
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -5
- package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +8 -9
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
- package/es2022/src/modules/commonDynamic.module.js +4 -4
- package/es2022/src/modules/commonDynamic.module.js.map +1 -1
- package/es2022/src/modules/commonLocalize.module.js +4 -4
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +21 -21
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +3 -5
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +4 -4
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +10 -8
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/logger/components/console/console.component.js +16 -23
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/decorators/loggerSink.decorator.js.map +1 -1
- package/es2022/src/modules/logger/misc/utils.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +18 -16
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js +7 -5
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +8 -8
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js.map +1 -1
- package/es2022/src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.js.map +1 -1
- package/es2022/src/modules/logger/services/logger/logger.service.js +3 -4
- package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/rest.sink.js +17 -21
- package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/restSink.options.js +16 -16
- package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js +0 -1
- package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerConfiguration.js +8 -17
- package/es2022/src/modules/logger/types/loggerConfiguration.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerOptions.js +30 -28
- package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
- package/es2022/src/modules/logger/types/messageLog.js +5 -18
- package/es2022/src/modules/logger/types/messageLog.js.map +1 -1
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +33 -46
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +4 -4
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -21
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +7 -45
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -4
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +6 -6
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +29 -30
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js +9 -9
- package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +16 -31
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +20 -77
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -4
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -5
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -4
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +3 -3
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +3 -18
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/index.js +1 -0
- package/es2022/src/pipes/index.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -4
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -4
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +4 -4
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/localize/localize.pipe.js +3 -10
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.js +8 -15
- package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js +3 -3
- package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -1
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +8 -9
- package/es2022/src/services/cookies/cookies.service.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +24 -25
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/notifications/notifications.interface.js +0 -3
- package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
- package/es2022/src/services/notifications/notificationsOptions.js +5 -5
- package/es2022/src/services/notifications/notificationsOptions.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -4
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/position/position.interface.js.map +1 -1
- package/es2022/src/services/statusCode/statusCode.service.js +3 -8
- package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +10 -8
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +10 -8
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
- package/es2022/src/utils/index.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +5 -5
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
- package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html +9 -3
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +1 -1
- package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts +1 -1
- package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +1 -1
- package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
- package/forms/src/directives/hasError/hasError.directive.d.ts +24 -32
- package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts +14 -12
- package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +1 -1
- package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
- package/forms/src/index.d.ts +0 -1
- package/forms/src/index.d.ts.map +1 -1
- package/forms/src/modules/hasError.module.d.ts +1 -5
- package/forms/src/modules/hasError.module.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts +3 -3
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
- package/hotkeys/src/components/cheatSheet/cheatSheet.component.html +13 -7
- package/lerna.json +4 -0
- package/package.json +54 -57
- package/readme.md +0 -1
- package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts +3 -3
- package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts +3 -3
- package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
- package/src/directives/bodyRender/bodyRender.directive.d.ts +3 -3
- package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +3 -3
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/src/directives/goBack/goBack.directive.d.ts +3 -3
- package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
- package/src/directives/positionTo/positionTo.directive.d.ts +2 -2
- package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/modules/commonUtils.module.d.ts +1 -1
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +3 -3
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts +3 -3
- package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
- package/src/pipes/index.d.ts +1 -0
- package/src/pipes/index.d.ts.map +1 -1
- package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
- package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
- package/src/pipes/isPresent/isPresent.pipe.d.ts +3 -3
- package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +3 -3
- package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts +4 -4
- package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts.map +1 -1
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
- package/src/services/position/position.interface.d.ts +10 -10
- package/src/services/position/position.interface.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2022/forms/src/modules/requiredClass.module.js +0 -19
- package/es2022/forms/src/modules/requiredClass.module.js.map +0 -1
- package/es2022/numeral/src/index.js +0 -2
- package/es2022/numeral/src/index.js.map +0 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +0 -1
- package/forms/src/modules/requiredClass.module.d.ts +0 -11
- package/forms/src/modules/requiredClass.module.d.ts.map +0 -1
- package/numeral/package.json +0 -8
- package/numeral/src/index.d.ts +0 -2
- package/numeral/src/index.d.ts.map +0 -1
|
@@ -36,10 +36,10 @@ export class MergeCssClassesSAPipe {
|
|
|
36
36
|
});
|
|
37
37
|
return result;
|
|
38
38
|
}
|
|
39
|
-
static
|
|
40
|
-
static
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MergeCssClassesSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
40
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MergeCssClassesSAPipe, isStandalone: true, name: "mergeCssClasses" }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MergeCssClassesSAPipe, decorators: [{
|
|
43
43
|
type: Pipe,
|
|
44
44
|
args: [{ name: 'mergeCssClasses', standalone: true }]
|
|
45
45
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeCssClasses.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/mergeCssClasses/mergeCssClasses.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,OAAO,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;;AAO7D;;GAEG;AAEH,MAAM,OAAO,qBAAqB;IAE9B;;;;OAIG;IACI,SAAS,CAAC,KAAiC,EAAE,YAA4C;QAE5F,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,SAAS,YAAY,CAAC,GAA+B;YAEjD,IAAG,OAAO,CAAC,GAAG,CAAC,EACf;
|
|
1
|
+
{"version":3,"file":"mergeCssClasses.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/mergeCssClasses/mergeCssClasses.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,OAAO,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;;AAO7D;;GAEG;AAEH,MAAM,OAAO,qBAAqB;IAE9B;;;;OAIG;IACI,SAAS,CAAC,KAAiC,EAAE,YAA4C;QAE5F,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,SAAS,YAAY,CAAC,GAA+B;YAEjD,IAAG,OAAO,CAAC,GAAG,CAAC,EACf,CAAC;gBACG,OAAO;YACX,CAAC;YAED,IAAG,QAAQ,CAAC,GAAG,CAAC,EAChB,CAAC;gBACG,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YACvB,CAAC;iBACI,IAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAC1B,CAAC;gBACG,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAEnB,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;gBAC5B,CAAC,CAAC,CAAC;YACP,CAAC;iBAED,CAAC;gBACG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAEhC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC;gBACrC,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC;QAED,YAAY,CAAC,KAAK,CAAC,CAAC;QAEpB,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAEvB,YAAY,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAClB,CAAC;8GA9CQ,qBAAqB;4GAArB,qBAAqB;;2FAArB,qBAAqB;kBADjC,IAAI;mBAAC,EAAC,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {Dictionary, isBlank, isString} from '@jscrpt/common';\n\n/**\n * Type of css class definition for NgClass and merge\n */\nexport type NgClassType = string | string[] | Dictionary<boolean>;\n\n/**\n * Merges css classes that will be passed to ngClass\n */\n@Pipe({name: 'mergeCssClasses', standalone: true})\nexport class MergeCssClassesSAPipe implements PipeTransform\n{\n /**\n * Merges css classes that will be passed to ngClass\n * @param value - Css class to be merged\n * @param mergeClasses - Definition of css classes that will be merged\n */\n public transform(value: NgClassType|undefined|null, mergeClasses: (NgClassType|undefined|null)[]): Dictionary<boolean>\n {\n const result: Dictionary<boolean> = {};\n\n function updateResult(val: NgClassType|undefined|null): void\n {\n if(isBlank(val))\n {\n return;\n }\n\n if(isString(val))\n {\n result[val] = true;\n }\n else if(Array.isArray(val))\n {\n val.forEach(cssClass =>\n {\n result[cssClass] = true;\n });\n }\n else\n {\n Object.keys(val).forEach(cssClass =>\n {\n result[cssClass] = val[cssClass];\n });\n }\n }\n\n updateResult(value);\n\n mergeClasses.forEach(itm =>\n {\n updateResult(itm);\n });\n\n return result;\n }\n}"]}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { Pipe } from '@angular/core';
|
|
2
2
|
import { GlobalizationService } from '@anglr/common';
|
|
3
3
|
import { isBlank } from '@jscrpt/common';
|
|
4
|
-
import numeral from 'numeral';
|
|
4
|
+
import numeral from '@jscrpt/common/numeral';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "@anglr/common";
|
|
7
7
|
/**
|
|
8
|
-
* Pipe to transform numbers to regional formatting using numeraljs.
|
|
8
|
+
* Pipe to transform numbers to regional formatting using numeraljs logic from @jscrpt/common/numeral.
|
|
9
9
|
*/
|
|
10
|
-
export class
|
|
11
|
-
//######################### private fields #########################
|
|
12
|
-
/**
|
|
13
|
-
* Subscription for globalization changes
|
|
14
|
-
*/
|
|
15
|
-
_globalizationChangeSubscription;
|
|
10
|
+
export class NumeralPipe {
|
|
16
11
|
//######################### constructors #########################
|
|
17
12
|
constructor(globalizationSvc) {
|
|
18
13
|
numeral.locale(globalizationSvc.locale);
|
|
@@ -40,15 +35,13 @@ export class NumeralSAPipe {
|
|
|
40
35
|
* Called when component is destroyed
|
|
41
36
|
*/
|
|
42
37
|
ngOnDestroy() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this._globalizationChangeSubscription = null;
|
|
46
|
-
}
|
|
38
|
+
this._globalizationChangeSubscription?.unsubscribe();
|
|
39
|
+
this._globalizationChangeSubscription = null;
|
|
47
40
|
}
|
|
48
|
-
static
|
|
49
|
-
static
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NumeralPipe, deps: [{ token: i1.GlobalizationService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
42
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: NumeralPipe, isStandalone: true, name: "numeral" }); }
|
|
50
43
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NumeralPipe, decorators: [{
|
|
52
45
|
type: Pipe,
|
|
53
46
|
args: [{ name: 'numeral', standalone: true }]
|
|
54
47
|
}], ctorParameters: () => [{ type: i1.GlobalizationService }] });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeral.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/numeral/numeral.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAA2B,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,OAAO,MAAM,wBAAwB,CAAC;;;AAG7C;;GAEG;AAEH,MAAM,OAAO,WAAW;IASpB,kEAAkE;IAClE,YAAY,gBAAsC;QAE9C,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,CAAC,gCAAgC,GAAG,gBAAgB;aACnD,YAAY;aACZ,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,SAAS,CAAC,KAAa,EAAE,MAAc;QAE1C,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,IAAG,KAAK,CAAC,KAAK,CAAC,EACf,CAAC;YACG,KAAK,GAAG,CAAC,CAAC;QACd,CAAC;QAED,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,gCAAgC,EAAE,WAAW,EAAE,CAAC;QACrD,IAAI,CAAC,gCAAgC,GAAG,IAAI,CAAC;IACjD,CAAC;8GAlDQ,WAAW;4GAAX,WAAW;;2FAAX,WAAW;kBADvB,IAAI;mBAAC,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform, OnDestroy} from '@angular/core';\nimport {GlobalizationService} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\nimport numeral from '@jscrpt/common/numeral';\nimport {Subscription} from 'rxjs';\n\n/**\n * Pipe to transform numbers to regional formatting using numeraljs logic from @jscrpt/common/numeral.\n */\n@Pipe({name: 'numeral', standalone: true})\nexport class NumeralPipe implements PipeTransform, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Subscription for globalization changes\n */\n private _globalizationChangeSubscription: Subscription|null;\n\n //######################### constructors #########################\n constructor(globalizationSvc: GlobalizationService)\n {\n numeral.locale(globalizationSvc.locale);\n\n this._globalizationChangeSubscription = globalizationSvc\n .localeChange\n .subscribe(() => numeral.locale(globalizationSvc.locale));\n }\n \n //######################### public methods #########################\n \n /**\n * Formats number value as slovak format string\n * @param value - Number to format\n * @param format - Format string (optional) \n */ \n public transform(value: number, format: string): string\n {\n if(isBlank(value))\n {\n return '';\n }\n \n if(isNaN(value))\n {\n value = 0;\n }\n \n return numeral(value).format(format);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._globalizationChangeSubscription?.unsubscribe();\n this._globalizationChangeSubscription = null;\n }\n}\n\n"]}
|
|
@@ -19,10 +19,10 @@ export class TrimTextPipe {
|
|
|
19
19
|
}
|
|
20
20
|
return text;
|
|
21
21
|
}
|
|
22
|
-
static
|
|
23
|
-
static
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TrimTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
23
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: TrimTextPipe, isStandalone: true, name: "trimText" }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TrimTextPipe, decorators: [{
|
|
26
26
|
type: Pipe,
|
|
27
27
|
args: [{ name: 'trimText', standalone: true }]
|
|
28
28
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trimText.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/trimText/trimText.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAEH,MAAM,OAAO,YAAY;IAErB;;;;;OAKG;IACI,SAAS,CAAC,IAA2B,EAAE,MAAc,EAAE,SAAiB,KAAK;QAEhF,IAAG,CAAC,IAAI,EACR;
|
|
1
|
+
{"version":3,"file":"trimText.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/trimText/trimText.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAEH,MAAM,OAAO,YAAY;IAErB;;;;;OAKG;IACI,SAAS,CAAC,IAA2B,EAAE,MAAc,EAAE,SAAiB,KAAK;QAEhF,IAAG,CAAC,IAAI,EACR,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,IAAG,IAAI,CAAC,MAAM,GAAG,MAAM,EACvB,CAAC;YACG,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;QAC9C,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;8GArBQ,YAAY;4GAAZ,YAAY;;2FAAZ,YAAY;kBADxB,IAAI;mBAAC,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Trims long text and adds 'suffix' indication of longer text\n */\n@Pipe({name: 'trimText', standalone: true})\nexport class TrimTextPipe implements PipeTransform\n{\n /**\n * Trims long text and adds 'suffix' indication of longer text\n * @param text - Text to be trimmed\n * @param length - Maximal allowed length of text, that wont be trimmed\n * @param suffix - Suffix to be added when text is trimmed\n */\n public transform(text: string|undefined|null, length: number, suffix: string = '...'): string\n {\n if(!text)\n {\n return '';\n }\n\n if(text.length > length)\n {\n return text.substring(0, length) + suffix;\n }\n\n return text;\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Pipe that encodes data for url
|
|
6
6
|
*/
|
|
7
|
-
export class
|
|
7
|
+
export class UrlEncodePipe {
|
|
8
8
|
//######################### public methods #########################
|
|
9
9
|
/**
|
|
10
10
|
* Encodes data for URL
|
|
@@ -16,10 +16,10 @@ export class UrlEncodeSAPipe {
|
|
|
16
16
|
}
|
|
17
17
|
return serializeToUrlQuery(value);
|
|
18
18
|
}
|
|
19
|
-
static
|
|
20
|
-
static
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: UrlEncodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
20
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: UrlEncodePipe, isStandalone: true, name: "urlEncode" }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: UrlEncodePipe, decorators: [{
|
|
23
23
|
type: Pipe,
|
|
24
24
|
args: [{ name: 'urlEncode', standalone: true }]
|
|
25
25
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlEncode.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/urlEncode/urlEncode.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;;AAEnD;;GAEG;AAEH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"urlEncode.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/urlEncode/urlEncode.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;;AAEnD;;GAEG;AAEH,MAAM,OAAO,aAAa;IAEtB,oEAAoE;IAEpE;;;OAGG;IACI,SAAS,CAAC,KAAa;QAE1B,IAAG,CAAC,KAAK,EACT,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;8GAhBQ,aAAa;4GAAb,aAAa;;2FAAb,aAAa;kBADzB,IAAI;mBAAC,EAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {serializeToUrlQuery} from '@jscrpt/common';\n\n/**\n * Pipe that encodes data for url\n */\n@Pipe({name: 'urlEncode', standalone: true})\nexport class UrlEncodePipe implements PipeTransform\n{\n //######################### public methods #########################\n \n /**\n * Encodes data for URL\n * @param value - Value to be encoded\n */ \n public transform(value: object): string\n {\n if(!value)\n {\n return '';\n }\n\n return serializeToUrlQuery(value);\n }\n}\n\n"]}
|
|
@@ -7,15 +7,14 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Class that is used as wrapper for working with cookies
|
|
8
8
|
*/
|
|
9
9
|
export class CookieService {
|
|
10
|
-
_serverCookies;
|
|
11
|
-
//######################### private fields #########################
|
|
12
|
-
/**
|
|
13
|
-
* Indication that current code is running in browser
|
|
14
|
-
*/
|
|
15
|
-
_isBrowser = false;
|
|
16
10
|
//######################### constructor #########################
|
|
17
11
|
constructor(platformId, _serverCookies) {
|
|
18
12
|
this._serverCookies = _serverCookies;
|
|
13
|
+
//######################### private fields #########################
|
|
14
|
+
/**
|
|
15
|
+
* Indication that current code is running in browser
|
|
16
|
+
*/
|
|
17
|
+
this._isBrowser = false;
|
|
19
18
|
this._isBrowser = isPlatformBrowser(platformId);
|
|
20
19
|
}
|
|
21
20
|
//######################### public methods #########################
|
|
@@ -89,10 +88,10 @@ export class CookieService {
|
|
|
89
88
|
this.setCookie(name, '', -1, path, domain);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
|
-
static
|
|
93
|
-
static
|
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CookieService, deps: [{ token: PLATFORM_ID }, { token: HTTP_REQUEST_COOKIE_HEADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
92
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CookieService, providedIn: 'root' }); }
|
|
94
93
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CookieService, decorators: [{
|
|
96
95
|
type: Injectable,
|
|
97
96
|
args: [{ providedIn: 'root' }]
|
|
98
97
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.service.js","sourceRoot":"","sources":["../../../../src/services/cookies/cookies.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;;AAE9D;;GAEG;AAEH,MAAM,OAAO,aAAa;
|
|
1
|
+
{"version":3,"file":"cookies.service.js","sourceRoot":"","sources":["../../../../src/services/cookies/cookies.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;;AAE9D;;GAEG;AAEH,MAAM,OAAO,aAAa;IAStB,iEAAiE;IACjE,YAAiC,UAAkB,EACiB,cAAsB;QAAtB,mBAAc,GAAd,cAAc,CAAQ;QAT1F,oEAAo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AC,0BAA0B","sourcesContent":["import {PLATFORM_ID, Inject, Optional, Injectable} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\nimport {isBlank} from '@jscrpt/common';\n\nimport {HTTP_REQUEST_COOKIE_HEADER} from '../../types/tokens';\n\n/**\n * Class that is used as wrapper for working with cookies\n */\n@Injectable({providedIn: 'root'})\nexport class CookieService\n{\n //######################### private fields #########################\n\n /**\n * Indication that current code is running in browser\n */\n private _isBrowser: boolean = false;\n\n //######################### constructor #########################\n constructor(@Inject(PLATFORM_ID) platformId: Object,\n @Optional() @Inject(HTTP_REQUEST_COOKIE_HEADER) private _serverCookies: string)\n {\n this._isBrowser = isPlatformBrowser(platformId);\n }\n\n //######################### public methods #########################\n\n /**\n * Retrieves a single cookie by it's name\n *\n * @param name - Identification of the Cookie\n * @param skipSerialization - Indication whether skip deserialization from json string\n * @returns The Cookie's value\n */\n public getCookie(name: string, skipSerialization?: boolean): any\n {\n if(!this._isBrowser && isBlank(this._serverCookies))\n {\n return null;\n }\n\n name = encodeURIComponent(name);\n \n const regexp = new RegExp('(?:^' + name + '|;\\\\s*' + name + ')=(.*?)(?:;|$)', 'g');\n let result;\n\n if(isBlank(this._serverCookies))\n {\n result = regexp.exec(document.cookie);\n }\n else\n {\n result = regexp.exec(this._serverCookies);\n }\n\n if(result === null)\n {\n return null;\n }\n\n const val = decodeURIComponent(result[1]);\n\n return skipSerialization ? val : JSON.parse(val);\n }\n\n /**\n * Save the Cookie\n *\n * @param name - Cookie's identification\n * @param value - Cookie's value\n * @param expires - Cookie's expiration date in days from now. If it's undefined the cookie is a session Cookie\n * @param path - Path relative to the domain where the cookie should be avaiable. Default /\n * @param domain - Domain where the cookie should be avaiable. Default current domain\n * @param skipSerialization - Indication whether skip serialization to json string\n */\n public setCookie(name: string, value: any, expires?: number, path?: string, domain?: string, skipSerialization?: boolean): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n const val = skipSerialization ? value : JSON.stringify(value);\n let cookieStr = encodeURIComponent(name) + '=' + encodeURIComponent(val) + ';';\n\n if (expires)\n {\n const dtExpires = new Date(new Date().getTime() + expires * 1000 * 60 * 60 * 24);\n cookieStr += 'expires=' + dtExpires.toUTCString() + ';';\n }\n \n if (path)\n {\n cookieStr += 'path=' + path + ';';\n }\n \n if (domain)\n {\n cookieStr += 'domain=' + domain + ';';\n }\n\n document.cookie = cookieStr;\n }\n\n /**\n * Removes specified Cookie\n *\n * @param name - Cookie's identification\n * @param path - Path relative to the domain where the cookie should be avaiable. Default /\n * @param domain - Domain where the cookie should be avaiable. Default current domain\n */\n public deleteCookie(name: string, path?: string, domain?: string): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n // If the cookie exists\n if (this.getCookie(name))\n {\n this.setCookie(name, '', -1, path, domain);\n }\n }\n}"]}
|
|
@@ -10,28 +10,6 @@ import * as i1 from "./notificationsOptions";
|
|
|
10
10
|
* Default notifications service implementation
|
|
11
11
|
*/
|
|
12
12
|
export class DefaultNotificationsService {
|
|
13
|
-
_options;
|
|
14
|
-
//######################### protected fields #########################
|
|
15
|
-
/**
|
|
16
|
-
* Array of notifications
|
|
17
|
-
*/
|
|
18
|
-
_notifications = [];
|
|
19
|
-
/**
|
|
20
|
-
* Array of notifications timeouts
|
|
21
|
-
*/
|
|
22
|
-
_notificationsTimeouts = [];
|
|
23
|
-
/**
|
|
24
|
-
* Subject used for emitting changes of current notifications
|
|
25
|
-
*/
|
|
26
|
-
_notificationsChange = new Subject();
|
|
27
|
-
/**
|
|
28
|
-
* Subject used for emitting event when instance is being destroyed
|
|
29
|
-
*/
|
|
30
|
-
_destroy = new Subject();
|
|
31
|
-
/**
|
|
32
|
-
* Array of scoped notifications
|
|
33
|
-
*/
|
|
34
|
-
_scopes = {};
|
|
35
13
|
//######################### public properties #########################
|
|
36
14
|
/**
|
|
37
15
|
* @inheritdoc
|
|
@@ -54,6 +32,27 @@ export class DefaultNotificationsService {
|
|
|
54
32
|
//######################### constructor #########################
|
|
55
33
|
constructor(_options) {
|
|
56
34
|
this._options = _options;
|
|
35
|
+
//######################### protected fields #########################
|
|
36
|
+
/**
|
|
37
|
+
* Array of notifications
|
|
38
|
+
*/
|
|
39
|
+
this._notifications = [];
|
|
40
|
+
/**
|
|
41
|
+
* Array of notifications timeouts
|
|
42
|
+
*/
|
|
43
|
+
this._notificationsTimeouts = [];
|
|
44
|
+
/**
|
|
45
|
+
* Subject used for emitting changes of current notifications
|
|
46
|
+
*/
|
|
47
|
+
this._notificationsChange = new Subject();
|
|
48
|
+
/**
|
|
49
|
+
* Subject used for emitting event when instance is being destroyed
|
|
50
|
+
*/
|
|
51
|
+
this._destroy = new Subject();
|
|
52
|
+
/**
|
|
53
|
+
* Array of scoped notifications
|
|
54
|
+
*/
|
|
55
|
+
this._scopes = {};
|
|
57
56
|
if (!this._options || !(this._options instanceof NotificationsOptions)) {
|
|
58
57
|
this._options = new NotificationsOptions();
|
|
59
58
|
}
|
|
@@ -178,10 +177,10 @@ export class DefaultNotificationsService {
|
|
|
178
177
|
}
|
|
179
178
|
return this;
|
|
180
179
|
}
|
|
181
|
-
static
|
|
182
|
-
static
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultNotificationsService, deps: [{ token: i1.NotificationsOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
181
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultNotificationsService }); }
|
|
183
182
|
}
|
|
184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultNotificationsService, decorators: [{
|
|
185
184
|
type: Injectable
|
|
186
185
|
}], ctorParameters: () => [{ type: i1.NotificationsOptions, decorators: [{
|
|
187
186
|
type: Optional
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultNotifications.service.js","sourceRoot":"","sources":["../../../../src/services/notifications/defaultNotifications.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,QAAQ,EAAE,QAAQ,EAAO,MAAM,eAAe,CAAC;AACnF,OAAO,EAAa,UAAU,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAa,OAAO,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AAEvD,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAgB,YAAY,EAAE,oBAAoB,EAAuF,MAAM,2BAA2B,CAAC;AAClL,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;;;AAE5D;;GAEG;AAEH,MAAM,OAAO,2BAA2B;IAwDF;IAtDlC,sEAAsE;IAEtE;;OAEG;IACO,cAAc,GAAmB,EAAE,CAAC;IAE9C;;OAEG;IACO,sBAAsB,GAAa,EAAE,CAAC;IAEhD;;OAEG;IACO,oBAAoB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAEpE;;OAEG;IACO,QAAQ,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAExD;;OAEG;IACO,OAAO,GAA8C,EAAE,CAAC;IAElE,uEAAuE;IAEvE;;OAEG;IACH,IAAW,aAAa;QAEpB,OAAO,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAE1B,OAAO,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QAEd,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;IAED,iEAAiE;IACjE,YAAkC,QAA8B;QAA9B,aAAQ,GAAR,QAAQ,CAAsB;QAE5D,IAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI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3B;IACI,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,2BAA2B;CACxC,CAAC;AAEF,4CAA4C;AAE5C;;GAEG;AACH,MAAM,oBAAoB,GAAG,CAAC,SAAiB,EAAE,KAAsD,EAAE,EAAE;IAEvG,OAAoC;QAChC;YACI,OAAO,EAAE,mBAAmB;YAC5B,QAAQ,EAAE,SAAS;SACtB;QACD;YACI,OAAO,EAAE,KAAK,IAAI,aAAa;YAC/B,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE;gBAEzC,OAAO,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC7C,CAAC;YACD,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC;SAC1C;KACJ,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,cAAc,CAAC,qBAAqB,EAAE,OAAO,EACpD;IACI,GAAG;QAEC,MAAM,IAAI,GAAsC,CAAC,SAAiB,EAAE,KAAsD,EAAE,EAAE;YAE1H,OAAO,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EACpC;YACI,GAAG;gBAEC,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;SACJ,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAC,CAAC;AAEH,OAAO,EAAC,qBAAqB,EAAC,CAAC","sourcesContent":["import {Injectable, InjectionToken, Optional, SkipSelf, Type} from '@angular/core';\nimport {Dictionary, generateId} from '@jscrpt/common';\nimport {Observable, Subject, Subscription} from 'rxjs';\n\nimport {NOTIFICATIONS, NOTIFICATIONS_SCOPE} from '../../types/tokens';\nimport {Notifications, Notification, NotificationSeverity, NotificationsProvider, NotificationsScopeProviderFactory, NotificationsScopeProvider} from './notifications.interface';\nimport {NotificationsOptions} from './notificationsOptions';\n\n/**\n * Default notifications service implementation\n */\n@Injectable()\nexport class DefaultNotificationsService implements Notifications\n{\n //######################### protected fields #########################\n\n /**\n * Array of notifications\n */\n protected _notifications: Notification[] = [];\n\n /**\n * Array of notifications timeouts\n */\n protected _notificationsTimeouts: number[] = [];\n\n /**\n * Subject used for emitting changes of current notifications\n */\n protected _notificationsChange: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for emitting event when instance is being destroyed\n */\n protected _destroy: Subject<void> = new Subject<void>();\n\n /**\n * Array of scoped notifications\n */\n protected _scopes: Dictionary<[Notifications, Subscription]> = {};\n\n //######################### public properties #########################\n\n /**\n * @inheritdoc\n */\n public get notifications(): readonly Notification[]\n {\n return [...this._notifications];\n }\n\n /**\n * @inheritdoc\n */\n public get notificationsChange(): Observable<void>\n {\n return this._notificationsChange.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get destroy(): Observable<void>\n {\n return this._destroy.asObservable();\n }\n\n //######################### constructor #########################\n constructor(@Optional() protected _options: NotificationsOptions)\n {\n if(!this._options || !(this._options instanceof NotificationsOptions))\n {\n this._options = new NotificationsOptions();\n }\n }\n\n //######################### public methods - implementation of Notifications #########################\n \n /**\n * @inheritdoc\n */\n public message(message: string, severity: NotificationSeverity, parameter?: Record<string, unknown>): Notifications\n {\n const notification = new Notification(message, severity, parameter);\n \n this._notifications.push(notification);\n this._notificationsChange.next();\n\n // set timeout\n if(this._options.timeout > 0)\n {\n this._notificationsTimeouts.push(setTimeout(() =>\n {\n this.remove(notification);\n }, this._options.timeout) as any);\n }\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public default(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Default, parameter);\n }\n\n /**\n * @inheritdoc\n */\n public success(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Success, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public error(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Error, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public info(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Info, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public warning(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Warning, parameter);\n }\n\n /**\n * @inheritdoc\n */\n public clearNotifications(): Notifications\n {\n while(this._notifications[0])\n {\n this._remove(this._notifications[0], false);\n }\n\n this._notificationsChange.next();\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public remove(notification: Notification): Notifications\n {\n return this._remove(notification);\n }\n\n /**\n * @inheritdoc\n */\n public getScope(scopeName: string): Notifications\n {\n const scopeObj = this._scopes[scopeName];\n let scope: Notifications;\n\n // no scope yet\n if(!scopeObj)\n {\n scope = new DefaultNotificationsService(this._options);\n const subscription = new Subscription();\n\n this._scopes[scopeName] = [scope, subscription];\n\n //destroys and removes scope\n subscription.add(scope.destroy.subscribe(() =>\n {\n delete this._scopes[scopeName];\n subscription.unsubscribe();\n }));\n }\n else\n {\n scope = scopeObj[0];\n }\n\n return scope;\n }\n\n /**\n * @inheritdoc\n * \n * Call this manualy for scoped instances until this is fixed https://github.com/angular/angular/issues/28738\n */\n public ngOnDestroy(): void\n {\n this._destroy.next();\n this._destroy.complete();\n this._notificationsChange.complete();\n\n Object.keys(this._scopes).forEach(scopeName =>\n {\n const [scope] = this._scopes[scopeName];\n\n scope.ngOnDestroy();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Removes notification from array of notifications\n * @param notification - Notification to be removed\n * @param emitEvent - Indication whether emit event on removal\n */\n protected _remove(notification: Notification, emitEvent: boolean = true): Notifications\n {\n const index = this._notifications.indexOf(notification);\n\n if(index < 0)\n {\n return this;\n }\n\n this._notifications.splice(index, 1);\n\n if(emitEvent)\n {\n this._notificationsChange.next();\n }\n\n // clear timeout\n if(this._options.timeout > 0)\n {\n clearTimeout(this._notificationsTimeouts[index]);\n this._notificationsTimeouts.splice(index, 1);\n }\n\n return this;\n }\n}\n\n/**\n * Default notifications provider\n */\nconst DEFAULT_NOTIFICATIONS: NotificationsProvider =\n{\n provide: NOTIFICATIONS,\n useClass: DefaultNotificationsService\n};\n\n//TODO: add options to notifications factory\n\n/**\n * Factory that creates notifications provider for scope\n */\nconst notificationsFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n{\n return <NotificationsScopeProvider> [\n {\n provide: NOTIFICATIONS_SCOPE,\n useValue: scopeName\n },\n {\n provide: token ?? NOTIFICATIONS,\n useFactory: (notifications: Notifications) =>\n {\n return notifications.getScope(scopeName);\n },\n deps: [[new SkipSelf(), NOTIFICATIONS]]\n }\n ];\n};\n\nObject.defineProperty(DEFAULT_NOTIFICATIONS, 'scope', \n{\n get()\n {\n const func: NotificationsScopeProviderFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n {\n return notificationsFactory(scopeName, token);\n };\n\n Object.defineProperty(func, 'random', \n {\n get()\n {\n return notificationsFactory(generateId(6));\n }\n });\n\n return func;\n }\n});\n\nexport {DEFAULT_NOTIFICATIONS};"]}
|
|
1
|
+
{"version":3,"file":"defaultNotifications.service.js","sourceRoot":"","sources":["../../../../src/services/notifications/defaultNotifications.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,QAAQ,EAAE,QAAQ,EAAO,MAAM,eAAe,CAAC;AACnF,OAAO,EAAa,UAAU,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAa,OAAO,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AAEvD,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAgB,YAAY,EAAE,oBAAoB,EAAuF,MAAM,2BAA2B,CAAC;AAClL,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;;;AAE5D;;GAEG;AAEH,MAAM,OAAO,2BAA2B;IA6B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,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC;SAC1C;KACJ,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,cAAc,CAAC,qBAAqB,EAAE,OAAO,EACpD;IACI,GAAG;QAEC,MAAM,IAAI,GAAsC,CAAC,SAAiB,EAAE,KAAsD,EAAE,EAAE;YAE1H,OAAO,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EACpC;YACI,GAAG;gBAEC,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;SACJ,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAC,CAAC;AAEH,OAAO,EAAC,qBAAqB,EAAC,CAAC","sourcesContent":["import {Injectable, InjectionToken, Optional, SkipSelf, Type} from '@angular/core';\nimport {Dictionary, generateId} from '@jscrpt/common';\nimport {Observable, Subject, Subscription} from 'rxjs';\n\nimport {NOTIFICATIONS, NOTIFICATIONS_SCOPE} from '../../types/tokens';\nimport {Notifications, Notification, NotificationSeverity, NotificationsProvider, NotificationsScopeProviderFactory, NotificationsScopeProvider} from './notifications.interface';\nimport {NotificationsOptions} from './notificationsOptions';\n\n/**\n * Default notifications service implementation\n */\n@Injectable()\nexport class DefaultNotificationsService implements Notifications\n{\n //######################### protected fields #########################\n\n /**\n * Array of notifications\n */\n protected _notifications: Notification[] = [];\n\n /**\n * Array of notifications timeouts\n */\n protected _notificationsTimeouts: number[] = [];\n\n /**\n * Subject used for emitting changes of current notifications\n */\n protected _notificationsChange: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for emitting event when instance is being destroyed\n */\n protected _destroy: Subject<void> = new Subject<void>();\n\n /**\n * Array of scoped notifications\n */\n protected _scopes: Dictionary<[Notifications, Subscription]> = {};\n\n //######################### public properties #########################\n\n /**\n * @inheritdoc\n */\n public get notifications(): readonly Notification[]\n {\n return [...this._notifications];\n }\n\n /**\n * @inheritdoc\n */\n public get notificationsChange(): Observable<void>\n {\n return this._notificationsChange.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get destroy(): Observable<void>\n {\n return this._destroy.asObservable();\n }\n\n //######################### constructor #########################\n constructor(@Optional() protected _options: NotificationsOptions)\n {\n if(!this._options || !(this._options instanceof NotificationsOptions))\n {\n this._options = new NotificationsOptions();\n }\n }\n\n //######################### public methods - implementation of Notifications #########################\n \n /**\n * @inheritdoc\n */\n public message(message: string, severity: NotificationSeverity, parameter?: Record<string, unknown>): Notifications\n {\n const notification = new Notification(message, severity, parameter);\n \n this._notifications.push(notification);\n this._notificationsChange.next();\n\n // set timeout\n if(this._options.timeout > 0)\n {\n this._notificationsTimeouts.push(setTimeout(() =>\n {\n this.remove(notification);\n }, this._options.timeout) as any);\n }\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public default(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Default, parameter);\n }\n\n /**\n * @inheritdoc\n */\n public success(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Success, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public error(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Error, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public info(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Info, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public warning(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Warning, parameter);\n }\n\n /**\n * @inheritdoc\n */\n public clearNotifications(): Notifications\n {\n while(this._notifications[0])\n {\n this._remove(this._notifications[0], false);\n }\n\n this._notificationsChange.next();\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public remove(notification: Notification): Notifications\n {\n return this._remove(notification);\n }\n\n /**\n * @inheritdoc\n */\n public getScope(scopeName: string): Notifications\n {\n const scopeObj = this._scopes[scopeName];\n let scope: Notifications;\n\n // no scope yet\n if(!scopeObj)\n {\n scope = new DefaultNotificationsService(this._options);\n const subscription = new Subscription();\n\n this._scopes[scopeName] = [scope, subscription];\n\n //destroys and removes scope\n subscription.add(scope.destroy.subscribe(() =>\n {\n delete this._scopes[scopeName];\n subscription.unsubscribe();\n }));\n }\n else\n {\n scope = scopeObj[0];\n }\n\n return scope;\n }\n\n /**\n * @inheritdoc\n * \n * Call this manualy for scoped instances until this is fixed https://github.com/angular/angular/issues/28738\n */\n public ngOnDestroy(): void\n {\n this._destroy.next();\n this._destroy.complete();\n this._notificationsChange.complete();\n\n Object.keys(this._scopes).forEach(scopeName =>\n {\n const [scope] = this._scopes[scopeName];\n\n scope.ngOnDestroy();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Removes notification from array of notifications\n * @param notification - Notification to be removed\n * @param emitEvent - Indication whether emit event on removal\n */\n protected _remove(notification: Notification, emitEvent: boolean = true): Notifications\n {\n const index = this._notifications.indexOf(notification);\n\n if(index < 0)\n {\n return this;\n }\n\n this._notifications.splice(index, 1);\n\n if(emitEvent)\n {\n this._notificationsChange.next();\n }\n\n // clear timeout\n if(this._options.timeout > 0)\n {\n clearTimeout(this._notificationsTimeouts[index]);\n this._notificationsTimeouts.splice(index, 1);\n }\n\n return this;\n }\n}\n\n/**\n * Default notifications provider\n */\nconst DEFAULT_NOTIFICATIONS: NotificationsProvider =\n{\n provide: NOTIFICATIONS,\n useClass: DefaultNotificationsService\n};\n\n//TODO: add options to notifications factory\n\n/**\n * Factory that creates notifications provider for scope\n */\nconst notificationsFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n{\n return <NotificationsScopeProvider> [\n {\n provide: NOTIFICATIONS_SCOPE,\n useValue: scopeName\n },\n {\n provide: token ?? NOTIFICATIONS,\n useFactory: (notifications: Notifications) =>\n {\n return notifications.getScope(scopeName);\n },\n deps: [[new SkipSelf(), NOTIFICATIONS]]\n }\n ];\n};\n\nObject.defineProperty(DEFAULT_NOTIFICATIONS, 'scope', \n{\n get()\n {\n const func: NotificationsScopeProviderFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n {\n return notificationsFactory(scopeName, token);\n };\n\n Object.defineProperty(func, 'random', \n {\n get()\n {\n return notificationsFactory(generateId(6));\n }\n });\n\n return func;\n }\n});\n\nexport {DEFAULT_NOTIFICATIONS};"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.interface.js","sourceRoot":"","sources":["../../../../src/services/notifications/notifications.interface.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAE1C;;GAEG;AACH,MAAM,CAAN,IAAY,oBA0BX;AA1BD,WAAY,oBAAoB;IAE5B;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;IAEJ;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,iEAAK,CAAA;AACT,CAAC,EA1BW,oBAAoB,KAApB,oBAAoB,QA0B/B;AAED;;GAEG;AACH,MAAM,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"notifications.interface.js","sourceRoot":"","sources":["../../../../src/services/notifications/notifications.interface.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAE1C;;GAEG;AACH,MAAM,CAAN,IAAY,oBA0BX;AA1BD,WAAY,oBAAoB;IAE5B;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;IAEJ;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,iEAAK,CAAA;AACT,CAAC,EA1BW,oBAAoB,KAApB,oBAAoB,QA0B/B;AAED;;GAEG;AACH,MAAM,OAAO,YAAY;IAErB;;OAEG;IACH,IAAW,OAAO;QAEd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QAEf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,iEAAiE;IAEjE;;;;;OAKG;IACH,YAAoB,QAAgB,EAChB,SAA+B,EAC/B,UAAoC;QAFpC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,cAAS,GAAT,SAAS,CAAsB;QAC/B,eAAU,GAAV,UAAU,CAA0B;IAExD,CAAC;CACJ","sourcesContent":["import {ClassProvider, FactoryProvider, InjectionToken, Type, ValueProvider} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n//TODO: allow changing and merging options\n\n/**\n * Severity of notification message\n */\nexport enum NotificationSeverity\n{\n /**\n * Default severity of message, no special meaning\n */\n Default,\n\n /**\n * Information severity of message\n */\n Info,\n\n /**\n * Success severity of message\n */\n Success,\n\n /**\n * Warning severity of message\n */\n Warning,\n\n /**\n * Error severity of message\n */\n Error\n}\n\n/**\n * Instance of notification that is being displayed\n */\nexport class Notification\n{\n /**\n * Gets message that this notification represents\n */\n public get message(): string\n {\n return this._message;\n }\n\n /**\n * Gets severity of notification message\n */\n public get severity(): NotificationSeverity\n {\n return this._severity;\n }\n\n /**\n * Gets object that is used for formatting notification message\n */\n public get parameter(): Record<string, unknown>|undefined\n {\n return this._parameter;\n }\n\n //######################### constructor #########################\n \n /**\n * Creates instance of `Notification`\n * @param _message - Message that this notification represents\n * @param _severity - Severity of notification message\n * @param _parameter - Object that is used for formatting notification message\n */\n constructor(private _message: string,\n private _severity: NotificationSeverity,\n private _parameter?: Record<string, unknown>)\n {\n }\n}\n\n/**\n * Manages currently displayed notifications\n */\nexport interface Notifications\n{\n //######################### properties #########################\n\n /**\n * Gets array of notifications\n */\n readonly notifications: readonly Notification[];\n\n /**\n * Gets observable that emits changes of current notifications\n */\n readonly notificationsChange: Observable<void>;\n\n /**\n * Gets observable that emits event when instance is being destroyed\n */\n readonly destroy: Observable<void>;\n\n //######################### methods #########################\n \n /**\n * Displays message with specified severity\n * @param message - Message to be displayed\n * @param severity - Severity of displayed notification\n * @param parameter - Object that is used for formatting notification message\n */\n message(message: string, severity: NotificationSeverity, parameter?: Record<string, unknown>): Notifications;\n\n /**\n * Displays default notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n default(message: string, parameter?: Record<string, unknown>): Notifications;\n\n /**\n * Displays success notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n success(message: string, parameter?: Record<string, unknown>): Notifications;\n \n /**\n * Displays error notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n error(message: string, parameter?: Record<string, unknown>): Notifications;\n \n /**\n * Displays info notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n info(message: string, parameter?: Record<string, unknown>): Notifications;\n \n /**\n * Displays warning notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n warning(message: string, parameter?: Record<string, unknown>): Notifications;\n\n /**\n * Clears all displayed notifications\n */\n clearNotifications(): Notifications;\n\n /**\n * Removes notification\n * @param notification - Notification to be removed\n */\n remove(notification: Notification): Notifications;\n\n /**\n * Gets scoped instance of `Notifications`\n * @param scopeName - Name of scope to be returned\n */\n getScope(scopeName: string): Notifications;\n\n /**\n * Destroys service and clears all used resources\n */\n ngOnDestroy(): void;\n}\n\n/**\n * Tuple that will hold notification provider and notifications scope provider\n */\nexport type NotificationsScopeProvider = [ValueProvider, FactoryProvider];\n\n/**\n * Factory for creating `NotificationsScopeProvider`\n */\nexport interface NotificationsScopeProviderFactory\n{\n /**\n * Creates `NotificationsScopeProvider` with specified `scopeName`\n * @param scopeName - Name of scope to be created\n * @param token - Custom token that can be used for injecting Notifications under custom provider\n */\n (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>): NotificationsScopeProvider;\n\n /**\n * Creates `NotificationsScopeProvider` with random scope name\n */\n random?: NotificationsScopeProvider;\n}\n\n/**\n * Notifications provider that allows to create scoped notifications provider\n */\nexport interface NotificationsProvider extends ClassProvider\n{\n /**\n * Gets scoped providers\n */\n scope?: NotificationsScopeProviderFactory;\n}"]}
|
|
@@ -3,13 +3,13 @@ import { isPresent } from '@jscrpt/common';
|
|
|
3
3
|
* Configuration object that is used by `Notifications` default implementation
|
|
4
4
|
*/
|
|
5
5
|
export class NotificationsOptions {
|
|
6
|
-
//######################### public properties #########################
|
|
7
|
-
/**
|
|
8
|
-
* Timeout in ms, after which will be notification closed, if set to 0, message will stay permanently until closed by user
|
|
9
|
-
*/
|
|
10
|
-
timeout = 10000;
|
|
11
6
|
//######################### constructor #########################
|
|
12
7
|
constructor(timeout) {
|
|
8
|
+
//######################### public properties #########################
|
|
9
|
+
/**
|
|
10
|
+
* Timeout in ms, after which will be notification closed, if set to 0, message will stay permanently until closed by user
|
|
11
|
+
*/
|
|
12
|
+
this.timeout = 10000;
|
|
13
13
|
if (isPresent(timeout)) {
|
|
14
14
|
this.timeout = timeout;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationsOptions.js","sourceRoot":"","sources":["../../../../src/services/notifications/notificationsOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,oBAAoB;
|
|
1
|
+
{"version":3,"file":"notificationsOptions.js","sourceRoot":"","sources":["../../../../src/services/notifications/notificationsOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAS7B,iEAAiE;IACjE,YAAY,OAAgB;QAR5B,uEAAuE;QAEvE;;WAEG;QACI,YAAO,GAAW,KAAK,CAAC;QAK3B,IAAG,SAAS,CAAC,OAAO,CAAC,EACrB,CAAC;YACG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {isPresent} from '@jscrpt/common';\n\n/**\n * Configuration object that is used by `Notifications` default implementation\n */\nexport class NotificationsOptions\n{\n //######################### public properties #########################\n \n /**\n * Timeout in ms, after which will be notification closed, if set to 0, message will stay permanently until closed by user\n */\n public timeout: number = 10000;\n \n //######################### constructor #########################\n constructor(timeout?: number)\n {\n if(isPresent(timeout))\n {\n this.timeout = timeout;\n }\n }\n}"]}
|
|
@@ -9,7 +9,6 @@ import * as i1 from "../cookies/cookies.service";
|
|
|
9
9
|
* Implementation of permanent storage using cookies
|
|
10
10
|
*/
|
|
11
11
|
let CookiePermanentStorage = class CookiePermanentStorage {
|
|
12
|
-
_cookies;
|
|
13
12
|
//######################### constructor #########################
|
|
14
13
|
constructor(_cookies) {
|
|
15
14
|
this._cookies = _cookies;
|
|
@@ -38,15 +37,15 @@ let CookiePermanentStorage = class CookiePermanentStorage {
|
|
|
38
37
|
remove(name) {
|
|
39
38
|
this._cookies.deleteCookie(name, '/');
|
|
40
39
|
}
|
|
41
|
-
static
|
|
42
|
-
static
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CookiePermanentStorage, deps: [{ token: i1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CookiePermanentStorage }); }
|
|
43
42
|
};
|
|
44
43
|
CookiePermanentStorage = __decorate([
|
|
45
44
|
TypeProvider({ provide: PERMANENT_STORAGE, useClass: forwardRef(() => CookiePermanentStorage) }),
|
|
46
45
|
__metadata("design:paramtypes", [CookieService])
|
|
47
46
|
], CookiePermanentStorage);
|
|
48
47
|
export { CookiePermanentStorage };
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CookiePermanentStorage, decorators: [{
|
|
50
49
|
type: Injectable
|
|
51
50
|
}], ctorParameters: () => [{ type: i1.CookieService }] });
|
|
52
51
|
//# sourceMappingURL=cookiePermanentStorage.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookiePermanentStorage.service.js","sourceRoot":"","sources":["../../../../src/services/permanentStorage/cookiePermanentStorage.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;;;AAE9C;;GAEG;AAGI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;
|
|
1
|
+
{"version":3,"file":"cookiePermanentStorage.service.js","sourceRoot":"","sources":["../../../../src/services/permanentStorage/cookiePermanentStorage.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;;;AAE9C;;GAEG;AAGI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAE/B,iEAAiE;IACjE,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAE3C,CAAC;IAED,2GAA2G;IAE3G;;;OAGG;IACI,GAAG,CAAU,IAAY;QAE5B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAiBD;;;;;OAKG;IACI,GAAG,CAAC,IAAY,EAAE,KAAU,EAAE,OAAc;QAE/C,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAClF,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,IAAY;QAEtB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1C,CAAC;8GAnDQ,sBAAsB;kHAAtB,sBAAsB;;AAAtB,sBAAsB;IADlC,YAAY,CAAC,EAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,EAAC,CAAC;qCAI7D,aAAa;GAHlC,sBAAsB,CAoDlC;;2FApDY,sBAAsB;kBAFlC,UAAU","sourcesContent":["import {Injectable, forwardRef} from '@angular/core';\n\nimport {PermanentStorage} from './permanentStorage.interface';\nimport {CookieService} from '../cookies/cookies.service';\nimport {PERMANENT_STORAGE} from '../../types/tokens';\nimport {TypeProvider} from '../../decorators';\n\n/**\n * Implementation of permanent storage using cookies\n */\n@Injectable()\n@TypeProvider({provide: PERMANENT_STORAGE, useClass: forwardRef(() => CookiePermanentStorage)})\nexport class CookiePermanentStorage implements PermanentStorage\n{\n //######################### constructor #########################\n constructor(private _cookies: CookieService)\n {\n }\n\n //######################### public methods - implementation of StringLocalization #########################\n\n /**\n * Gets value that was stored with 'name' from permanent storage\n * @param name - Name with which was value stored\n */\n public get<TResult>(name: string): TResult\n {\n return this._cookies.getCookie(name);\n }\n\n /**\n * Sets value that will be stored with 'name'e in permanent storage\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n */\n public set(name: string, value: any): void;\n\n /**\n * Sets value that will be stored with 'name' in permanent storage until expiration date\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n * @param expires - Time when value should expire\n */\n public set(name: string, value: any, expires: Date): void;\n\n /**\n * Sets value that will be stored with 'name' in permanent storage until expiration date\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n * @param expires - Time when value should expire\n */\n public set(name: string, value: any, expires?: Date): void\n {\n this._cookies.setCookie(name, value, expires ? expires.valueOf() : null, '/');\n }\n\n /**\n * Removes value stored with 'name' from permanent storage\n * @param name - Name of stored value that will be removed\n */\n public remove(name: string): void\n {\n this._cookies.deleteCookie(name, '/');\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.interface.js","sourceRoot":"","sources":["../../../../src/services/position/position.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Func1} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {PositionOffsetString, PositionPlacement} from './position.types';\n\n/**\n * Options for autoupdate specific functionality\n */\nexport interface AutoUpdateOptions\n{\n /**\n * Indication whether update position when ancestor scroll changes\n */\n ancestorScroll: boolean;\n\n /**\n * Indication whether update position when ancestor size changes\n */\n ancestorResize: boolean;\n\n /**\n * Indication whether update position when target element changes size\n */\n elementResize: boolean;\n}\n\n/**\n * Defines object which describes offsets for positioned element\n */\nexport interface PositionOffsets\n{\n /**\n * Distance between positioned and reference element.\n */\n mainAxis?: number;\n\n /**\n * Skidding between floating and reference element.\n */\n crossAxis?: number;\n\n /**\n * Works on the same axis as crossAxis but applies only to aligned placements and works logically. The offset is inverted for -end alignments.\n */\n alignmentAxis?: number|null;\n}\n\n/**\n * Stores positioned element and reference element\n */\nexport interface PositionElements<
|
|
1
|
+
{"version":3,"file":"position.interface.js","sourceRoot":"","sources":["../../../../src/services/position/position.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Func1} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {PositionOffsetString, PositionPlacement} from './position.types';\n\n/**\n * Options for autoupdate specific functionality\n */\nexport interface AutoUpdateOptions\n{\n /**\n * Indication whether update position when ancestor scroll changes\n */\n ancestorScroll: boolean;\n\n /**\n * Indication whether update position when ancestor size changes\n */\n ancestorResize: boolean;\n\n /**\n * Indication whether update position when target element changes size\n */\n elementResize: boolean;\n}\n\n/**\n * Defines object which describes offsets for positioned element\n */\nexport interface PositionOffsets\n{\n /**\n * Distance between positioned and reference element.\n */\n mainAxis?: number;\n\n /**\n * Skidding between floating and reference element.\n */\n crossAxis?: number;\n\n /**\n * Works on the same axis as crossAxis but applies only to aligned placements and works logically. The offset is inverted for -end alignments.\n */\n alignmentAxis?: number|null;\n}\n\n/**\n * Stores positioned element and reference element\n */\nexport interface PositionElements<TVirtualElement = unknown>\n{\n /**\n * Reference element against which is object positioned\n */\n reference: Element|TVirtualElement;\n\n /**\n * Element that is positioned\n */\n floating: HTMLElement;\n}\n\n/**\n * Arguments that are passed during positioning\n */\nexport interface PositionArguments<TVirtualElement = unknown>\n{\n /**\n * X coordinate of positioned element\n */\n x: number;\n\n /**\n * Y coordinate of positioned element\n */\n y: number;\n\n /**\n * Elements that are being used during positioning\n */\n elements: PositionElements<TVirtualElement>;\n}\n\n/**\n * Options that are passed to position service\n */\nexport interface PositionOptions<TVirtualElement = unknown>\n{\n //######################### properties #########################\n\n /**\n * Placement of target element against source element\n */\n placement: PositionPlacement;\n\n /**\n * Offset which allows moving target element along the cross axis of placement, or any chosed direction\n */\n offset: PositionOffsetString|number|PositionOffsets|Func1<number|PositionOffsets, PositionArguments<TVirtualElement>>;\n\n /**\n * Indication whether perform flip in case of collision (with view boundaries)\n */\n flip: boolean;\n\n /**\n * Indication whether set up 'auto updating' of position\n */\n autoUpdate: boolean|AutoUpdateOptions;\n\n /**\n * Mouse event that occured when positioning was called\n */\n mouseEvent?: MouseEvent;\n}\n\n/**\n * Result of positioning process, storing new coordinates\n */\nexport interface PositionResult<TElement extends Element = Element>\n{\n /**\n * Target element to be positioned\n */\n target: TElement;\n\n /**\n * X coordinate of position of target\n */\n x: number;\n\n /**\n * Y coordinate of position of target\n */\n y: number;\n\n /**\n * Indication whether there was flip applied\n */\n flip: boolean;\n\n /**\n * Disposes instance of engine used for positioning\n */\n dispose(): void;\n}\n\n/**\n * Service that is used for positioning two elements against each other\n */\nexport interface Position<TElement extends Element = Element>\n{\n //######################### methods #########################\n\n /**\n * Places target element relatively to source element according options and returns result storing information about new position\n * @param target - Target element to be placed\n * @param source - Source element to be placed against\n * @param options - Optional options with informations about new position\n */\n placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Observable<PositionResult<TElement>>;\n}"]}
|
|
@@ -4,11 +4,6 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* Service used for transfering http status code for response
|
|
5
5
|
*/
|
|
6
6
|
export class StatusCodeService {
|
|
7
|
-
//######################### private fields #########################
|
|
8
|
-
/**
|
|
9
|
-
* Current status code
|
|
10
|
-
*/
|
|
11
|
-
_statusCode;
|
|
12
7
|
//######################### public properties #########################
|
|
13
8
|
/**
|
|
14
9
|
* Gets current status code
|
|
@@ -24,10 +19,10 @@ export class StatusCodeService {
|
|
|
24
19
|
setStatusCode(code) {
|
|
25
20
|
this._statusCode = code;
|
|
26
21
|
}
|
|
27
|
-
static
|
|
28
|
-
static
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: StatusCodeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: StatusCodeService, providedIn: 'root' }); }
|
|
29
24
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: StatusCodeService, decorators: [{
|
|
31
26
|
type: Injectable,
|
|
32
27
|
args: [{ providedIn: 'root' }]
|
|
33
28
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusCode.service.js","sourceRoot":"","sources":["../../../../src/services/statusCode/statusCode.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;;AAEzC;;GAEG;AAEH,MAAM,OAAO,iBAAiB;
|
|
1
|
+
{"version":3,"file":"statusCode.service.js","sourceRoot":"","sources":["../../../../src/services/statusCode/statusCode.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;;AAEzC;;GAEG;AAEH,MAAM,OAAO,iBAAiB;IAS1B,uEAAuE;IAEvE;;OAEG;IACH,IAAW,UAAU;QAEjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,aAAa,CAAC,IAAa;QAE9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC5B,CAAC;8GA5BQ,iBAAiB;kHAAjB,iBAAiB,cADL,MAAM;;2FAClB,iBAAiB;kBAD7B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\n\n/**\n * Service used for transfering http status code for response\n */\n@Injectable({providedIn: 'root'})\nexport class StatusCodeService\n{\n //######################### private fields #########################\n \n /**\n * Current status code\n */\n private _statusCode?: number;\n\n //######################### public properties #########################\n\n /**\n * Gets current status code\n */\n public get statusCode(): number | null | undefined\n {\n return this._statusCode;\n }\n\n //######################### public methods #########################\n\n /**\n * Sets current status code\n * @param code - Status code value that will be set\n */\n public setStatusCode(code?: number): void\n {\n this._statusCode = code;\n }\n}"]}
|
|
@@ -6,11 +6,13 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
* Default implementation of StringLocalization, which uses 'key' as localization text
|
|
7
7
|
*/
|
|
8
8
|
export class NoStringLocalization {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
constructor() {
|
|
10
|
+
//######################### private fields #########################
|
|
11
|
+
/**
|
|
12
|
+
* Subject used for emitting when indication that locale has changes and strings should be obtained again, because they have changed
|
|
13
|
+
*/
|
|
14
|
+
this._textsChangeSubject = new Subject();
|
|
15
|
+
}
|
|
14
16
|
//######################### public properties - implementation of StringLocalization #########################
|
|
15
17
|
/**
|
|
16
18
|
* Occurs when indication that locale has changes and strings should be obtained again, because they have changed
|
|
@@ -30,10 +32,10 @@ export class NoStringLocalization {
|
|
|
30
32
|
}
|
|
31
33
|
return formatString(key, interpolateParams);
|
|
32
34
|
}
|
|
33
|
-
static
|
|
34
|
-
static
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NoStringLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NoStringLocalization }); }
|
|
35
37
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: NoStringLocalization, decorators: [{
|
|
37
39
|
type: Injectable
|
|
38
40
|
}] });
|
|
39
41
|
//# sourceMappingURL=noStringLocalization.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noStringLocalization.service.js","sourceRoot":"","sources":["../../../../src/services/stringLocalization/noStringLocalization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,OAAO,EAAa,MAAM,MAAM,CAAC;;AAIzC;;GAEG;AAEH,MAAM,OAAO,oBAAoB;
|
|
1
|
+
{"version":3,"file":"noStringLocalization.service.js","sourceRoot":"","sources":["../../../../src/services/stringLocalization/noStringLocalization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,OAAO,EAAa,MAAM,MAAM,CAAC;;AAIzC;;GAEG;AAEH,MAAM,OAAO,oBAAoB;IADjC;QAGI,oEAAoE;QAEpE;;WAEG;QACK,wBAAmB,GAAkB,IAAI,OAAO,EAAQ,CAAC;KA4BpE;IA1BG,8GAA8G;IAE9G;;OAEG;IACH,IAAW,WAAW;QAElB,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAC;IACnD,CAAC;IAED,2GAA2G;IAE3G;;;;OAIG;IACI,GAAG,CAAC,GAAW,EAAE,iBAA2C;QAE/D,IAAG,CAAC,iBAAiB,EACrB,CAAC;YACG,OAAO,GAAG,CAAC;QACf,CAAC;QAED,OAAO,YAAY,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAChD,CAAC;8GAlCQ,oBAAoB;kHAApB,oBAAoB;;2FAApB,oBAAoB;kBADhC,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {formatString} from '@jscrpt/common';\nimport {Subject, Observable} from 'rxjs';\n\nimport {StringLocalization} from './stringLocalization.interface';\n\n/**\n * Default implementation of StringLocalization, which uses 'key' as localization text\n */\n@Injectable()\nexport class NoStringLocalization implements StringLocalization\n{\n //######################### private fields #########################\n\n /**\n * Subject used for emitting when indication that locale has changes and strings should be obtained again, because they have changed\n */\n private _textsChangeSubject: Subject<void> = new Subject<void>();\n\n //######################### public properties - implementation of StringLocalization #########################\n\n /**\n * Occurs when indication that locale has changes and strings should be obtained again, because they have changed\n */\n public get textsChange(): Observable<void>\n {\n return this._textsChangeSubject.asObservable();\n }\n\n //######################### public methods - implementation of StringLocalization #########################\n\n /**\n * Gets localized string for specified key, interpolation might be used\n * @param key - Key to be localized\n * @param interpolateParams - Optional object storing interpolation parameters\n */\n public get(key: string, interpolateParams?: Record<string, unknown>): string\n {\n if(!interpolateParams)\n {\n return key;\n }\n\n return formatString(key, interpolateParams);\n }\n}\n"]}
|