@anglr/common 19.0.0-beta.20231109094203 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +18 -0
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +6 -7
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +5 -6
- package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +5 -6
- package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -5
- package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +5 -6
- package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +4 -5
- package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
- package/es2022/forms/src/directives/hasError/hasError.directive.js +6 -7
- package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +6 -7
- package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +6 -7
- package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +5 -6
- package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +4 -5
- package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +6 -7
- package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +6 -7
- package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +6 -7
- 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 +6 -7
- 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 +5 -6
- package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +5 -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 +6 -7
- 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 -6
- package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
- package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +6 -7
- 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 +6 -7
- 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 +6 -7
- 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 +4 -5
- package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
- package/es2022/forms/src/modules/hasError.module.js +5 -6
- package/es2022/forms/src/modules/hasError.module.js.map +1 -1
- package/es2022/forms/src/modules/numberInput.module.js +5 -6
- package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
- package/es2022/forms/src/modules/requiredClass.module.js +5 -6
- package/es2022/forms/src/modules/requiredClass.module.js.map +1 -1
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +6 -7
- package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +5 -6
- package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
- package/es2022/forms/src/services/submitted/submitted.service.js +4 -5
- package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +6 -7
- package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +5 -6
- package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +5 -6
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +6 -7
- package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +4 -5
- package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
- package/es2022/material/src/components/titledDialog/titledDialog.component.js +6 -7
- package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +5 -6
- package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +5 -6
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/confirmationDialog.module.js +5 -6
- package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +5 -6
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/material/src/modules/movableTitledDialog.module.js +5 -6
- package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
- package/es2022/material/src/modules/titledDialog.module.js +5 -6
- package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
- package/es2022/material/src/services/titledDialog/titledDialog.service.js +6 -7
- package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
- package/es2022/moment/src/modules/moment.module.js +5 -6
- package/es2022/moment/src/modules/moment.module.js.map +1 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +4 -5
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +4 -5
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js +5 -6
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouter.js +5 -6
- package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
- package/es2022/router/src/services/routing/dataRouterData.js +5 -6
- package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +4 -5
- package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +4 -5
- package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
- package/es2022/src/directives/bodyRender/bodyRender.directive.js +6 -7
- package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
- package/es2022/src/directives/clickOutside/clickOutside.directive.js +6 -7
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
- package/es2022/src/directives/goBack/goBack.directive.js +5 -6
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +5 -7
- package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
- package/es2022/src/directives/positionTo/positionTo.directive.js +6 -7
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
- package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -6
- package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +4 -5
- package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +4 -5
- package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +4 -5
- package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +6 -7
- package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
- package/es2022/src/modules/commonDynamic.module.js +5 -6
- package/es2022/src/modules/commonDynamic.module.js.map +1 -1
- package/es2022/src/modules/commonLocalize.module.js +5 -6
- package/es2022/src/modules/commonLocalize.module.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +5 -6
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +5 -6
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +5 -6
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +4 -5
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/logger/components/console/console.component.js +5 -6
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +4 -5
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +5 -6
- 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/logger/logger.service.js +5 -6
- package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/rest/restSink.options.js +5 -6
- package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
- package/es2022/src/modules/logger/types/loggerOptions.js +4 -5
- package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +6 -7
- package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
- package/es2022/src/modules/multiButton/modules/multiButton.module.js +5 -6
- package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +5 -6
- package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +6 -7
- package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +5 -6
- package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +5 -6
- package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +10 -16
- package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +5 -6
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +6 -7
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +5 -6
- package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
- package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -6
- package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -5
- package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +4 -5
- package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +6 -7
- package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -5
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -5
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +4 -5
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/localize/localize.pipe.js +6 -7
- package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +8 -6
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -5
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/cookies/cookies.service.js +6 -7
- package/es2022/src/services/cookies/cookies.service.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +6 -7
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +7 -8
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/statusCode/statusCode.service.js +4 -5
- package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +4 -5
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +4 -5
- package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +7 -8
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +6 -7
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/package.json +41 -42
- package/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.d.ts.map +1 -1
- package/src/modules/progressIndicator/services/progressIndicator.service.d.ts +2 -3
- package/src/modules/progressIndicator/services/progressIndicator.service.d.ts.map +1 -1
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +1 -1
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts.map +1 -1
- package/styles/themes/dark.scss +6 -0
- package/styles/themes/light.scss +0 -6
- package/version.bak +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asFormArray.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;
|
|
1
|
+
{"version":3,"file":"asFormArray.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAGwB;IADhD,kEAAkE;IAClE,YAAgD,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAEhE,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAS,KAA6C,EAAE,UAAgB;QAEpF,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,KAAK,YAAY,SAAS,EAC7B;YACI,OAAO,KAA4B,CAAC;SACvC;QAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,6CAA6C,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC;IAChB,CAAC;uGA7BQ,eAAe,kBAGQ,MAAM;qGAH7B,eAAe;;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,aAAa,EAAC;;0BAIV,QAAQ;;0BAAI,MAAM;2BAAC,MAAM","sourcesContent":["import {Inject, Optional, Pipe} from '@angular/core';\nimport {AbstractControl, FormArray} from '@angular/forms';\nimport {Logger, LOGGER} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\n\nimport {AsFormArray} from '../../../../misc/types';\n\n/**\n * Tries to convert `AbstractControl` to `FormArray`\n */\n@Pipe({name: 'asFormArray'})\nexport class AsFormArrayPipe\n{\n //######################### constructors #########################\n constructor(@Optional() @Inject(LOGGER) private _logger?: Logger)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Allows casting of `AbstractControl` to `FormArray`\n * @param value - `AbstractControl` to be cast to `FormArray`\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel>(value: AbstractControl<TModel>|null|undefined, _valueHash?: any): FormArray<AbstractControl<TModel>>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(value instanceof FormArray)\n {\n return value as AsFormArray<TModel>;\n }\n\n this._logger?.warn('Failed to cast AbstractControl to FormArray');\n\n return null;\n }\n}"]}
|
|
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
/**
|
|
7
7
|
* Tries to convert `AbstractControl` to `FormControl`
|
|
8
8
|
*/
|
|
9
|
-
class AsFormControlPipe {
|
|
9
|
+
export class AsFormControlPipe {
|
|
10
10
|
_logger;
|
|
11
11
|
//######################### constructors #########################
|
|
12
12
|
constructor(_logger) {
|
|
@@ -28,17 +28,16 @@ class AsFormControlPipe {
|
|
|
28
28
|
this._logger?.warn('Failed to cast AbstractControl to FormControl');
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: AsFormControlPipe, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
32
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: AsFormControlPipe, name: "asFormControl" });
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AsFormControlPipe, decorators: [{
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: AsFormControlPipe, decorators: [{
|
|
36
35
|
type: Pipe,
|
|
37
36
|
args: [{ name: 'asFormControl' }]
|
|
38
|
-
}], ctorParameters:
|
|
37
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
39
38
|
type: Optional
|
|
40
39
|
}, {
|
|
41
40
|
type: Inject,
|
|
42
41
|
args: [LOGGER]
|
|
43
|
-
}] }]
|
|
42
|
+
}] }] });
|
|
44
43
|
//# sourceMappingURL=asFormControl.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asFormControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;
|
|
1
|
+
{"version":3,"file":"asFormControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AAEH,MAAM,OAAO,iBAAiB;IAGsB;IADhD,kEAAkE;IAClE,YAAgD,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAEhE,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAS,KAA6C,EAAE,UAAgB;QAEpF,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,KAAK,YAAY,WAAW,EAC/B;YACI,OAAO,KAA4B,CAAC;SACvC;QAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,+CAA+C,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC;IAChB,CAAC;uGA7BQ,iBAAiB,kBAGM,MAAM;qGAH7B,iBAAiB;;2FAAjB,iBAAiB;kBAD7B,IAAI;mBAAC,EAAC,IAAI,EAAE,eAAe,EAAC;;0BAIZ,QAAQ;;0BAAI,MAAM;2BAAC,MAAM","sourcesContent":["import {Inject, Optional, Pipe} from '@angular/core';\nimport {AbstractControl, FormControl} from '@angular/forms';\nimport {Logger, LOGGER} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\n\n/**\n * Tries to convert `AbstractControl` to `FormControl`\n */\n@Pipe({name: 'asFormControl'})\nexport class AsFormControlPipe\n{\n //######################### constructors #########################\n constructor(@Optional() @Inject(LOGGER) private _logger?: Logger)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Allows casting of `AbstractControl` to `FormControl`\n * @param value - `AbstractControl` to be cast to `FormControl`\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel>(value: AbstractControl<TModel>|null|undefined, _valueHash?: any): FormControl<TModel>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(value instanceof FormControl)\n {\n return value as FormControl<TModel>;\n }\n\n this._logger?.warn('Failed to cast AbstractControl to FormControl');\n\n return null;\n }\n}"]}
|
|
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
/**
|
|
7
7
|
* Tries to convert `AbstractControl` to `FormGroup`
|
|
8
8
|
*/
|
|
9
|
-
class AsFormGroupPipe {
|
|
9
|
+
export class AsFormGroupPipe {
|
|
10
10
|
_logger;
|
|
11
11
|
//######################### constructors #########################
|
|
12
12
|
constructor(_logger) {
|
|
@@ -28,17 +28,16 @@ class AsFormGroupPipe {
|
|
|
28
28
|
this._logger?.warn('Failed to cast AbstractControl to FormGroup');
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: AsFormGroupPipe, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
32
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: AsFormGroupPipe, name: "asFormGroup" });
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AsFormGroupPipe, decorators: [{
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: AsFormGroupPipe, decorators: [{
|
|
36
35
|
type: Pipe,
|
|
37
36
|
args: [{ name: 'asFormGroup' }]
|
|
38
|
-
}], ctorParameters:
|
|
37
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
39
38
|
type: Optional
|
|
40
39
|
}, {
|
|
41
40
|
type: Inject,
|
|
42
41
|
args: [LOGGER]
|
|
43
|
-
}] }]
|
|
42
|
+
}] }] });
|
|
44
43
|
//# sourceMappingURL=asFormGroup.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asFormGroup.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;
|
|
1
|
+
{"version":3,"file":"asFormGroup.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAS,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAGwB;IADhD,kEAAkE;IAClE,YAAgD,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAEhE,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAS,KAA6C,EAAE,UAAgB;QAEpF,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,KAAK,YAAY,SAAS,EAC7B;YACI,OAAO,KAA4B,CAAC;SACvC;QAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,6CAA6C,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC;IAChB,CAAC;uGA7BQ,eAAe,kBAGQ,MAAM;qGAH7B,eAAe;;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,aAAa,EAAC;;0BAIV,QAAQ;;0BAAI,MAAM;2BAAC,MAAM","sourcesContent":["import {Inject, Optional, Pipe} from '@angular/core';\nimport {AbstractControl, FormGroup} from '@angular/forms';\nimport {Logger, LOGGER} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\n\nimport {AsFormGroup, FormModelGroup} from '../../../../misc/types';\n\n/**\n * Tries to convert `AbstractControl` to `FormGroup`\n */\n@Pipe({name: 'asFormGroup'})\nexport class AsFormGroupPipe\n{\n //######################### constructors #########################\n constructor(@Optional() @Inject(LOGGER) private _logger?: Logger)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Allows casting of `AbstractControl` to `FormGroup`\n * @param value - `AbstractControl` to be cast to `FormGroup`\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel>(value: AbstractControl<TModel>|null|undefined, _valueHash?: any): FormGroup<FormModelGroup<TModel>>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(value instanceof FormGroup)\n {\n return value as AsFormGroup<TModel>;\n }\n\n this._logger?.warn('Failed to cast AbstractControl to FormGroup');\n\n return null;\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
/**
|
|
6
6
|
* Gets control from `FormGroup` or `FormArray`
|
|
7
7
|
*/
|
|
8
|
-
class GetControlPipe {
|
|
8
|
+
export class GetControlPipe {
|
|
9
9
|
/**
|
|
10
10
|
* Gets control from `FormGroup` or `FormArray`
|
|
11
11
|
* @param value - FormGroup which contains requested control
|
|
@@ -21,11 +21,10 @@ class GetControlPipe {
|
|
|
21
21
|
}
|
|
22
22
|
return value.get(control);
|
|
23
23
|
}
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: GetControlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
25
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: GetControlPipe, name: "getControl" });
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GetControlPipe, decorators: [{
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: GetControlPipe, decorators: [{
|
|
29
28
|
type: Pipe,
|
|
30
29
|
args: [{ name: 'getControl' }]
|
|
31
30
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/getControl/getControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAkB,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;
|
|
1
|
+
{"version":3,"file":"getControl.pipe.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/formPipes/pipes/getControl/getControl.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAkB,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEvC;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB;;;;;OAKG;IACI,SAAS,CAAoC,KAA8B,EAAE,OAAa,EAAE,UAAoB;QAEnH,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,EACjE;YACI,OAAO,IAAI,CAAC;SACf;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,OAAiB,CAAC,CAAC;IACxC,CAAC;uGArBQ,cAAc;qGAAd,cAAc;;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {AbstractControl, FormArray, FormGroup} from '@angular/forms';\nimport {isBlank} from '@jscrpt/common';\n\n/**\n * Gets control from `FormGroup` or `FormArray`\n */\n@Pipe({name: 'getControl'})\nexport class GetControlPipe implements PipeTransform\n{\n /**\n * Gets control from `FormGroup` or `FormArray`\n * @param value - FormGroup which contains requested control\n * @param control - Control name to be obtained\n * @param _valueHash - Parameter that can be used to change value, indicates that pipe input value has changed\n */\n public transform<TModel, TKey extends keyof TModel>(value: AbstractControl<TModel>, control: TKey, _valueHash?: unknown): AbstractControl<TModel[TKey]>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n if(!(value instanceof FormArray) && !(value instanceof FormGroup))\n {\n return null;\n }\n\n return value.get(control as string);\n }\n}"]}
|
|
@@ -8,9 +8,9 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
/**
|
|
9
9
|
* Module for input validation directives
|
|
10
10
|
*/
|
|
11
|
-
class HasErrorModule {
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
11
|
+
export class HasErrorModule {
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: HasErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: HasErrorModule, declarations: [HasErrorDirective,
|
|
14
14
|
GroupHasErrorDirective,
|
|
15
15
|
GroupHasErrorContainerDirective,
|
|
16
16
|
ValidationErrorsContainerDirective,
|
|
@@ -20,10 +20,9 @@ class HasErrorModule {
|
|
|
20
20
|
GroupHasErrorDirective,
|
|
21
21
|
GroupHasErrorContainerDirective,
|
|
22
22
|
ValidationErrorsContainerDirective] });
|
|
23
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
23
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: HasErrorModule, imports: [CommonModule] });
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: HasErrorModule, decorators: [{
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: HasErrorModule, decorators: [{
|
|
27
26
|
type: NgModule,
|
|
28
27
|
args: [{
|
|
29
28
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasError.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/hasError.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAC,+BAA+B,EAAE,kCAAkC,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,gCAAgC,EAAE,yCAAyC,EAAE,+CAA+C,EAAC,MAAM,eAAe,CAAC;;AAE3J;;GAEG;
|
|
1
|
+
{"version":3,"file":"hasError.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/hasError.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAC,+BAA+B,EAAE,kCAAkC,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,gCAAgC,EAAE,yCAAyC,EAAE,+CAA+C,EAAC,MAAM,eAAe,CAAC;;AAE3J;;GAEG;AAyBH,MAAM,OAAO,cAAc;uGAAd,cAAc;wGAAd,cAAc,iBAhBnB,iBAAiB;YACjB,sBAAsB;YACtB,+BAA+B;YAC/B,kCAAkC;YAClC,gCAAgC;YAChC,yCAAyC;YACzC,+CAA+C,aAV/C,YAAY,aAcZ,iBAAiB;YACjB,sBAAsB;YACtB,+BAA+B;YAC/B,kCAAkC;wGAG7B,cAAc,YApBnB,YAAY;;2FAoBP,cAAc;kBAxB1B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;qBACf;oBACD,YAAY,EACZ;wBACI,iBAAiB;wBACjB,sBAAsB;wBACtB,+BAA+B;wBAC/B,kCAAkC;wBAClC,gCAAgC;wBAChC,yCAAyC;wBACzC,+CAA+C;qBAClD;oBACD,OAAO,EACP;wBACI,iBAAiB;wBACjB,sBAAsB;wBACtB,+BAA+B;wBAC/B,kCAAkC;qBACrC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {HasErrorDirective} from '../directives/hasError/hasError.directive';\nimport {GroupHasErrorDirective} from '../directives/groupHasError/groupHasError.directive';\nimport {GroupHasErrorContainerDirective, ValidationErrorsContainerDirective} from '../directives';\nimport {DefaultValidationErrorsComponent, DefaultValidationErrorsContainerComponent, ReservedSpaceValidationErrorsContainerComponent} from '../components';\n\n/**\n * Module for input validation directives\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n ],\n declarations: \n [\n HasErrorDirective,\n GroupHasErrorDirective,\n GroupHasErrorContainerDirective,\n ValidationErrorsContainerDirective,\n DefaultValidationErrorsComponent,\n DefaultValidationErrorsContainerComponent,\n ReservedSpaceValidationErrorsContainerComponent,\n ],\n exports: \n [\n HasErrorDirective,\n GroupHasErrorDirective,\n GroupHasErrorContainerDirective,\n ValidationErrorsContainerDirective,\n ]\n})\nexport class HasErrorModule\n{\n}"]}
|
|
@@ -7,19 +7,18 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
/**
|
|
8
8
|
* Module for number input components, pipes and directives
|
|
9
9
|
*/
|
|
10
|
-
class NumberInputModule {
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
10
|
+
export class NumberInputModule {
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: NumberInputModule, declarations: [MaxValueNumberValidatorDirective,
|
|
13
13
|
MinValueNumberValidatorDirective,
|
|
14
14
|
NumberInputControlValueAccessor,
|
|
15
15
|
NumberInputValidatorDirective], exports: [MaxValueNumberValidatorDirective,
|
|
16
16
|
MinValueNumberValidatorDirective,
|
|
17
17
|
NumberInputControlValueAccessor,
|
|
18
18
|
NumberInputValidatorDirective] });
|
|
19
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
19
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputModule });
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumberInputModule, decorators: [{
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: NumberInputModule, decorators: [{
|
|
23
22
|
type: NgModule,
|
|
24
23
|
args: [{
|
|
25
24
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberInput.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/numberInput.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,+BAA+B,EAAC,MAAM,qEAAqE,CAAC;AACpH,OAAO,EAAC,6BAA6B,EAAC,MAAM,0DAA0D,CAAC;;AAEvG;;GAEG;
|
|
1
|
+
{"version":3,"file":"numberInput.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/numberInput.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,gCAAgC,EAAC,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAC,+BAA+B,EAAC,MAAM,qEAAqE,CAAC;AACpH,OAAO,EAAC,6BAA6B,EAAC,MAAM,0DAA0D,CAAC;;AAEvG;;GAEG;AAkBH,MAAM,OAAO,iBAAiB;uGAAjB,iBAAiB;wGAAjB,iBAAiB,iBAbtB,gCAAgC;YAChC,gCAAgC;YAChC,+BAA+B;YAC/B,6BAA6B,aAI7B,gCAAgC;YAChC,gCAAgC;YAChC,+BAA+B;YAC/B,6BAA6B;wGAGxB,iBAAiB;;2FAAjB,iBAAiB;kBAjB7B,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,gCAAgC;wBAChC,gCAAgC;wBAChC,+BAA+B;wBAC/B,6BAA6B;qBAChC;oBACD,OAAO,EACP;wBACI,gCAAgC;wBAChC,gCAAgC;wBAChC,+BAA+B;wBAC/B,6BAA6B;qBAChC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {MaxValueNumberValidatorDirective} from '../directives/numberInput/maxValueNumberValidator.directive';\nimport {MinValueNumberValidatorDirective} from '../directives/numberInput/minValueNumberValidator.directive';\nimport {NumberInputControlValueAccessor} from '../directives/numberInput/numberInputControlValueAccessor.directive';\nimport {NumberInputValidatorDirective} from '../directives/numberInput/numberInputValidator.directive';\n\n/**\n * Module for number input components, pipes and directives\n */\n@NgModule(\n{\n declarations: \n [\n MaxValueNumberValidatorDirective,\n MinValueNumberValidatorDirective,\n NumberInputControlValueAccessor,\n NumberInputValidatorDirective\n ],\n exports:\n [\n MaxValueNumberValidatorDirective,\n MinValueNumberValidatorDirective,\n NumberInputControlValueAccessor,\n NumberInputValidatorDirective\n ]\n})\nexport class NumberInputModule\n{\n}"]}
|
|
@@ -4,13 +4,12 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Module for required class directive
|
|
6
6
|
*/
|
|
7
|
-
class RequiredClassModule {
|
|
8
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
10
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
7
|
+
export class RequiredClassModule {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: RequiredClassModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.1", ngImport: i0, type: RequiredClassModule, declarations: [RequiredClassDirective], exports: [RequiredClassDirective] });
|
|
10
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: RequiredClassModule });
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RequiredClassModule, decorators: [{
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: RequiredClassModule, decorators: [{
|
|
14
13
|
type: NgModule,
|
|
15
14
|
args: [{
|
|
16
15
|
declarations: [RequiredClassDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requiredClass.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/requiredClass.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,sBAAsB,EAAC,MAAM,qDAAqD,CAAC;;AAE3F;;GAEG;
|
|
1
|
+
{"version":3,"file":"requiredClass.module.js","sourceRoot":"","sources":["../../../../forms/src/modules/requiredClass.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,sBAAsB,EAAC,MAAM,qDAAqD,CAAC;;AAE3F;;GAEG;AAMH,MAAM,OAAO,mBAAmB;uGAAnB,mBAAmB;wGAAnB,mBAAmB,iBAHb,sBAAsB,aAC3B,sBAAsB;wGAEvB,mBAAmB;;2FAAnB,mBAAmB;kBAL/B,QAAQ;mBACT;oBACI,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBACpC","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {RequiredClassDirective} from '../directives/requiredClass/requiredClass.directive';\n\n/**\n * Module for required class directive\n */\n@NgModule(\n{\n declarations: [RequiredClassDirective],\n exports: [RequiredClassDirective]\n})\nexport class RequiredClassModule\n{\n}"]}
|
|
@@ -18,7 +18,7 @@ const defaultErrorMessages = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Service used for extracting error messages from form control
|
|
20
20
|
*/
|
|
21
|
-
class ErrorMessagesExtractor {
|
|
21
|
+
export class ErrorMessagesExtractor {
|
|
22
22
|
_stringLocalization;
|
|
23
23
|
_ignoredValidationErrors;
|
|
24
24
|
//######################### protected fields #########################
|
|
@@ -69,14 +69,13 @@ class ErrorMessagesExtractor {
|
|
|
69
69
|
});
|
|
70
70
|
return result;
|
|
71
71
|
}
|
|
72
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
73
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessagesExtractor, deps: [{ token: STRING_LOCALIZATION }, { token: IGNORED_VALIDATION_ERRORS }, { token: VALIDATION_ERROR_MESSAGES, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
73
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessagesExtractor, providedIn: 'root' });
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ErrorMessagesExtractor, decorators: [{
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ErrorMessagesExtractor, decorators: [{
|
|
77
76
|
type: Injectable,
|
|
78
77
|
args: [{ providedIn: 'root' }]
|
|
79
|
-
}], ctorParameters:
|
|
78
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
80
79
|
type: Inject,
|
|
81
80
|
args: [STRING_LOCALIZATION]
|
|
82
81
|
}] }, { type: undefined, decorators: [{
|
|
@@ -87,5 +86,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
87
86
|
args: [VALIDATION_ERROR_MESSAGES]
|
|
88
87
|
}, {
|
|
89
88
|
type: Optional
|
|
90
|
-
}] }]
|
|
89
|
+
}] }] });
|
|
91
90
|
//# sourceMappingURL=errorMessagesExtractor.service.js.map
|
package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessagesExtractor.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAmB,MAAM,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAC,yBAAyB,EAAE,yBAAyB,EAAC,MAAM,mBAAmB,CAAC;;AAGvF;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,QAAQ,EAAE,oBAAoB;IAC9B,MAAM,EAAE,uBAAuB;IAC/B,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,qBAAqB;IAC/B,QAAQ,EAAE,mBAAmB;IAC7B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,oBAAoB;CAClC,CAAC;AAEF;;GAEG;
|
|
1
|
+
{"version":3,"file":"errorMessagesExtractor.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.ts"],"names":[],"mappings":"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","sourcesContent":["import {Injectable, Inject, Optional} from '@angular/core';\nimport {FormControl} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {StringDictionary, extend, isString} from '@jscrpt/common';\n\nimport {IGNORED_VALIDATION_ERRORS, VALIDATION_ERROR_MESSAGES} from '../../misc/tokens';\nimport {ValidationErrorsResult} from './errorMessagesExtractor.interface';\n\n/**\n * Default error messages displayed\n */\nconst defaultErrorMessages: StringDictionary =\n{\n required: 'Field is required.',\n number: 'Value must be number.',\n pattern: 'Value is not valid.',\n minValue: 'Value is too small.',\n maxValue: 'Value is too big.',\n minlength: 'Value is short.',\n maxlength: 'Value is too long.'\n};\n\n/**\n * Service used for extracting error messages from form control\n */\n@Injectable({providedIn: 'root'})\nexport class ErrorMessagesExtractor\n{\n //######################### protected fields #########################\n\n /**\n * Dictionary with error names that have defined message\n */\n protected _errorMessages: StringDictionary;\n\n //######################### constructor #########################\n constructor(@Inject(STRING_LOCALIZATION) protected _stringLocalization: StringLocalization,\n @Inject(IGNORED_VALIDATION_ERRORS) protected _ignoredValidationErrors: string[],\n @Inject(VALIDATION_ERROR_MESSAGES) @Optional() globalErrorMessages?: StringDictionary)\n {\n this._errorMessages = extend(true, {}, defaultErrorMessages, globalErrorMessages);\n }\n\n //######################### public methods #########################\n\n /**\n * Gets validation errors result for provided control, or null of no errors are present\n * @param control - Form control instance that should be inspected for errors\n * @param messages - Object containing error messages that should patch existing error messages\n */\n public getErrors(control: FormControl, messages?: StringDictionary): ValidationErrorsResult\n {\n const errorMessages: StringDictionary = extend(true, {}, this._errorMessages, messages);\n\n //no control or no errors\n if(!control || !control.errors)\n {\n return null;\n }\n\n const result: ValidationErrorsResult =\n {\n errors: Object.keys(control.errors).filter(itm => this._ignoredValidationErrors.indexOf(itm) < 0),\n errorMessages: []\n };\n\n result.errors.forEach(error =>\n {\n const errorData = control.errors[error];\n \n //error message is present for error\n if(errorMessages[error])\n {\n result.errorMessages.push(this._stringLocalization.get(errorMessages[error], control.errors));\n }\n //display error data if it is string and there is missing translation\n else if(isString(errorData))\n {\n result.errorMessages.push(errorData);\n }\n //error data are array of strings, each string is considered error message\n else if(Array.isArray(errorData))\n {\n errorData.forEach(errorItm =>\n {\n if(isString(errorItm))\n {\n result.errorMessages.push(this._stringLocalization.get(errorItm, control.errors));\n }\n });\n }\n });\n\n return result;\n }\n}"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Instance of form model builder, that creates `FormGroup` from form model, automatically providing `Injector`
|
|
6
6
|
*/
|
|
7
|
-
class FormModelBuilder {
|
|
7
|
+
export class FormModelBuilder {
|
|
8
8
|
_injector;
|
|
9
9
|
//######################### constructor #########################
|
|
10
10
|
constructor(_injector) {
|
|
@@ -22,11 +22,10 @@ class FormModelBuilder {
|
|
|
22
22
|
injector: this._injector,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: FormModelBuilder, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: FormModelBuilder });
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormModelBuilder, decorators: [{
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: FormModelBuilder, decorators: [{
|
|
30
29
|
type: Injectable
|
|
31
|
-
}], ctorParameters:
|
|
30
|
+
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
32
31
|
//# sourceMappingURL=formModelBuilder.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formModelBuilder.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/formModelBuilder/formModelBuilder.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;;AAGpD;;GAEG;
|
|
1
|
+
{"version":3,"file":"formModelBuilder.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/formModelBuilder/formModelBuilder.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;;AAGpD;;GAEG;AAEH,MAAM,OAAO,gBAAgB;IAGH;IADtB,iEAAiE;IACjE,YAAsB,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;IAEzC,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,KAAK,CAA8C,KAAa,EAAE,IAAY;QAEjF,OAAO,cAAc,CAAgB,KAAK,EACL;YACI,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI,CAAC,SAAS;SAC3B,CAAC,CAAC;IAC5C,CAAC;uGArBQ,gBAAgB;2GAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAD5B,UAAU","sourcesContent":["import {Injectable, Injector} from '@angular/core';\nimport {FormGroup} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {buildFormModel} from '../../misc/formModel';\nimport {FormModelGroup} from '../../misc/types';\n\n/**\n * Instance of form model builder, that creates `FormGroup` from form model, automatically providing `Injector`\n */\n@Injectable()\nexport class FormModelBuilder\n{\n //######################### constructor #########################\n constructor(protected _injector: Injector)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Builds form from decorated model, only for properties with non `undefined` value\n * @param model - Model that can be decorated for enhancing created form group with validation and so on\n * @param args - Object storing arguments from owning component for customization\n */\n public build<TModel, TArgs extends Dictionary<any> = any>(model: TModel, args?: TArgs): FormGroup<FormModelGroup<TModel>>\n {\n return buildFormModel<TModel, TArgs>(model,\n {\n ...args,\n injector: this._injector,\n });\n }\n}"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Service used for handling submitted state of form
|
|
6
6
|
*/
|
|
7
|
-
class SubmittedService {
|
|
7
|
+
export class SubmittedService {
|
|
8
8
|
//######################### private fields #########################
|
|
9
9
|
/**
|
|
10
10
|
* Subject for indication when submitted changes
|
|
@@ -38,11 +38,10 @@ class SubmittedService {
|
|
|
38
38
|
this._submittedChangeSubject.next();
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
42
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: SubmittedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
42
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: SubmittedService });
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SubmittedService, decorators: [{
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: SubmittedService, decorators: [{
|
|
46
45
|
type: Injectable
|
|
47
46
|
}] });
|
|
48
47
|
//# sourceMappingURL=submitted.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submitted.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/submitted/submitted.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,OAAO,EAAa,MAAM,MAAM,CAAC;;AAEzC;;GAEG;
|
|
1
|
+
{"version":3,"file":"submitted.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/submitted/submitted.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,OAAO,EAAa,MAAM,MAAM,CAAC;;AAEzC;;GAEG;AAEH,MAAM,OAAO,gBAAgB;IAEzB,oEAAoE;IAEpE;;OAEG;IACK,uBAAuB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAErE;;OAEG;IACK,UAAU,GAAY,KAAK,CAAC;IAEpC,uEAAuE;IAEvE;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QAEtB,OAAO,IAAI,CAAC,uBAAuB,CAAC,YAAY,EAAE,CAAC;IACvD,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,YAAY,CAAC,YAAqB,IAAI;QAEzC,IAAG,IAAI,CAAC,UAAU,IAAI,SAAS,EAC/B;YACI,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;YAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;SACvC;IACL,CAAC;uGA7CQ,gBAAgB;2GAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAD5B,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {Subject, Observable} from 'rxjs';\n\n/**\n * Service used for handling submitted state of form\n */\n@Injectable()\nexport class SubmittedService\n{\n //######################### private fields #########################\n\n /**\n * Subject for indication when submitted changes\n */\n private _submittedChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Indication whether was form submitted\n */\n private _submitted: boolean = false;\n\n //######################### public properties #########################\n\n /**\n * Gets indication whether was form submitted\n */\n public get submitted(): boolean\n {\n return this._submitted;\n }\n\n /**\n * Occurs when indication whether was form submitted changes\n */\n public get submittedChange(): Observable<void>\n {\n return this._submittedChangeSubject.asObservable();\n }\n\n //######################### public methods #########################\n\n /**\n * Sets submitted to true\n * @param submitted - If set to false, sets submitted to false\n */\n public setSubmitted(submitted: boolean = true): void\n {\n if(this._submitted != submitted)\n {\n this._submitted = submitted;\n this._submittedChangeSubject.next();\n }\n }\n}"]}
|
package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as i1 from "../errorMessagesExtractor/errorMessagesExtractor.service";
|
|
|
8
8
|
/**
|
|
9
9
|
* Service used for creating validation errors renderer
|
|
10
10
|
*/
|
|
11
|
-
class ValidationErrorRendererFactory {
|
|
11
|
+
export class ValidationErrorRendererFactory {
|
|
12
12
|
_errorMessagesExtractor;
|
|
13
13
|
//######################### protected fields #########################
|
|
14
14
|
/**
|
|
@@ -31,19 +31,18 @@ class ValidationErrorRendererFactory {
|
|
|
31
31
|
create(control, containerView, injector, isSubmittedOrDirty) {
|
|
32
32
|
return new this._options.rendererType(this._errorMessagesExtractor, control, containerView, injector, isSubmittedOrDirty, this._options);
|
|
33
33
|
}
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
35
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ValidationErrorRendererFactory, deps: [{ token: i1.ErrorMessagesExtractor }, { token: VALIDATION_ERROR_RENDERER_FACTORY_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ValidationErrorRendererFactory, providedIn: 'root' });
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ValidationErrorRendererFactory, decorators: [{
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: ValidationErrorRendererFactory, decorators: [{
|
|
39
38
|
type: Injectable,
|
|
40
39
|
args: [{ providedIn: 'root' }]
|
|
41
|
-
}], ctorParameters:
|
|
40
|
+
}], ctorParameters: () => [{ type: i1.ErrorMessagesExtractor }, { type: undefined, decorators: [{
|
|
42
41
|
type: Optional
|
|
43
42
|
}, {
|
|
44
43
|
type: Inject,
|
|
45
44
|
args: [VALIDATION_ERROR_RENDERER_FACTORY_OPTIONS]
|
|
46
|
-
}] }]
|
|
45
|
+
}] }] });
|
|
47
46
|
/**
|
|
48
47
|
* Default implementation of validation error renderer
|
|
49
48
|
*/
|
package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationErrorRenderer.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/validationErrorRenderer/validationErrorRenderer.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAyB,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAC,MAAM,EAAmB,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAC,sBAAsB,EAAC,MAAM,0DAA0D,CAAC;AAGhG,OAAO,EAAC,yCAAyC,EAAC,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAC,gCAAgC,EAAE,yCAAyC,EAAC,MAAM,kBAAkB,CAAC;;;AAE7G;;GAEG;
|
|
1
|
+
{"version":3,"file":"validationErrorRenderer.service.js","sourceRoot":"","sources":["../../../../../forms/src/services/validationErrorRenderer/validationErrorRenderer.service.ts"],"names":[],"mappings":"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","sourcesContent":["import {Injectable, Inject, Optional, Injector, ComponentRef} from '@angular/core';\nimport {FormControl} from '@angular/forms';\nimport {extend, StringDictionary} from '@jscrpt/common';\n\nimport {ErrorMessagesExtractor} from '../errorMessagesExtractor/errorMessagesExtractor.service';\nimport {ValidationErrorRenderer, IsSubmittedOrDirtyFunc, ValidationErrorsRendererOptions, ValidationErrorRendererFactoryOptions, ValidationErrorsContainerComponent} from './validationErrorRenderer.interface';\nimport {ValidationErrorsResult} from '../errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {VALIDATION_ERROR_RENDERER_FACTORY_OPTIONS} from '../../misc/tokens';\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\nimport {DefaultValidationErrorsComponent, DefaultValidationErrorsContainerComponent} from '../../components';\n\n/**\n * Service used for creating validation errors renderer\n */\n@Injectable({providedIn: 'root'})\nexport class ValidationErrorRendererFactory\n{\n //######################### protected fields #########################\n\n /**\n * Options for validation error renderer factory\n */\n protected _options: ValidationErrorRendererFactoryOptions;\n\n //######################### constructor #########################\n constructor(protected _errorMessagesExtractor: ErrorMessagesExtractor,\n @Optional() @Inject(VALIDATION_ERROR_RENDERER_FACTORY_OPTIONS) options: ValidationErrorRendererFactoryOptions)\n {\n this._options = extend(true, {}, DEFAULT_OPTIONS, options);\n }\n\n //######################### public methods #########################\n\n /**\n * Creates new instance of ValidationErrorRenderer\n * @param control - Control that is being processed for errors\n * @param containerView - Class that stores view container for rendering errors\n * @param injector - Injector for obtaining dependencies\n * @param isSubmittedOrDirty - Function used for testing if control is submitted or dirty\n */\n public create(control: FormControl,\n containerView: ValidationErrorsContainerView,\n injector: Injector,\n isSubmittedOrDirty: IsSubmittedOrDirtyFunc): ValidationErrorRenderer\n {\n return new this._options.rendererType(this._errorMessagesExtractor,\n control,\n containerView,\n injector,\n isSubmittedOrDirty,\n this._options);\n }\n}\n\n/**\n * Default implementation of validation error renderer\n */\nexport class DefaultValidationErrorRenderer implements ValidationErrorRenderer\n{\n //######################### protected fields #########################\n\n /**\n * Object storing last obtained errors\n */\n protected _lastErrors: ValidationErrorsResult;\n\n /**\n * Component used as validation errors container\n */\n protected _container: ComponentRef<ValidationErrorsContainerComponent>;\n\n //######################### constructor #########################\n constructor(protected _errorMessagesExtractor: ErrorMessagesExtractor,\n protected _control: FormControl,\n protected _containerView: ValidationErrorsContainerView,\n protected _injector: Injector,\n protected _isSubmittedOrDirty: IsSubmittedOrDirtyFunc,\n protected _options: ValidationErrorsRendererOptions)\n {\n this._initialize();\n }\n\n //######################### public methods - implementation of ValiDationErrorRenderer #########################\n\n /**\n * @inheritdoc\n */\n public destroy(): void\n {\n this._containerView.viewContainer.clear();\n this._container = null;\n }\n\n /**\n * @inheritdoc\n */\n public update(options: ValidationErrorsRendererOptions, errorMessages?: StringDictionary): boolean\n {\n let result = false;\n this._lastErrors = this._errorMessagesExtractor.getErrors(this._control, errorMessages);\n\n //has errors\n if(this._lastErrors)\n {\n this._isSubmittedOrDirty(() =>\n {\n // const errorsClasses = this._lastErrors.errors.map(error => `${this._options.prefix}${error.toLowerCase()}${this._options.suffix}`);\n const opts = extend(true, {}, this._options, options);\n\n this._container.instance.show(this._lastErrors, opts);\n result = true;\n },\n () =>\n {\n this._container.instance.hide();\n result = false;\n });\n }\n else\n {\n this._container.instance.hide();\n result = false;\n }\n\n return result;\n }\n\n /**\n * Initialize renderer\n */\n protected _initialize(): void\n {\n this._container = this._containerView.viewContainer.createComponent(this._options.container, {injector: this._injector});\n this._container.instance.hide();\n }\n}\n\n/**\n * Default options for validation error renderer factory\n */\nconst DEFAULT_OPTIONS: ValidationErrorRendererFactoryOptions =\n{\n prefix: 'ng-',\n suffix: '-error',\n wrapperDivClass: 'validation-error-div',\n rendererType: DefaultValidationErrorRenderer,\n component: DefaultValidationErrorsComponent,\n container: DefaultValidationErrorsContainerComponent,\n};"]}
|
|
@@ -8,7 +8,7 @@ import * as i2 from "@angular/common";
|
|
|
8
8
|
/**
|
|
9
9
|
* Component used for displaying current active hotkeys as cheat cheet
|
|
10
10
|
*/
|
|
11
|
-
class HotkeysCheatsheetSAComponent {
|
|
11
|
+
export class HotkeysCheatsheetSAComponent {
|
|
12
12
|
_hotkeysService;
|
|
13
13
|
//######################### private fields #########################
|
|
14
14
|
/**
|
|
@@ -64,16 +64,15 @@ class HotkeysCheatsheetSAComponent {
|
|
|
64
64
|
toggleCheatSheet() {
|
|
65
65
|
this.helpVisible$.next(!this.helpVisible$.value);
|
|
66
66
|
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
68
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: HotkeysCheatsheetSAComponent, deps: [{ token: i1.HotkeysService }], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.1", type: HotkeysCheatsheetSAComponent, isStandalone: true, selector: "hotkeys-cheatsheet", inputs: { title: "title" }, ngImport: i0, template: "<div class=\"cfp-hotkeys-container fade\" [ngClass]=\"{'in': helpVisible$|async}\" style=\"display:none\">\n <div class=\"cfp-hotkeys\">\n <h4 class=\"cfp-hotkeys-title\">{{title}}</h4>\n\n <table>\n <tbody>\n <tr *ngFor=\"let hotkey of hotkeys\">\n <td class=\"cfp-hotkeys-keys\">\n <span *ngFor=\"let key of hotkey.formatted\" class=\"cfp-hotkeys-key\">{{key}}</span>\n </td>\n\n <td class=\"cfp-hotkeys-text\">{{hotkey.description}}</td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"cfp-hotkeys-close\" (click)=\"toggleCheatSheet()\">×</div>\n </div>\n</div>", styles: [".cfp-hotkeys-container \n{\n display: table !important;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n color: #333;\n font-size: 1em;\n background-color: rgba(255, 255, 255, 0.9);\n}\n\n.cfp-hotkeys-container.fade \n{\n z-index: -1024;\n visibility: hidden;\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -moz-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n\n.cfp-hotkeys-container.fade.in \n{\n z-index: 10002;\n visibility: visible;\n opacity: 1;\n}\n\n.cfp-hotkeys-title \n{\n font-weight: bold;\n text-align: center;\n font-size: 1.2em;\n}\n\n.cfp-hotkeys \n{\n width: 100%;\n height: 100%;\n display: table-cell;\n vertical-align: middle;\n}\n\n.cfp-hotkeys table \n{\n margin: auto;\n color: #333;\n}\n\n.cfp-content \n{\n display: table-cell;\n vertical-align: middle;\n}\n\n.cfp-hotkeys-keys \n{\n padding: 5px;\n text-align: right;\n}\n\n.cfp-hotkeys-key \n{\n display: inline-block;\n color: #fff;\n background-color: #333;\n border: 1px solid #333;\n border-radius: 5px;\n text-align: center;\n margin-right: 5px;\n box-shadow: inset 0 1px 0 #666, 0 1px 0 #bbb;\n padding: 5px 9px;\n font-size: 1em;\n}\n\n.cfp-hotkeys-text \n{\n padding-left: 10px;\n font-size: 1em;\n}\n\n.cfp-hotkeys-close \n{\n position: fixed;\n top: 20px;\n right: 20px;\n font-size: 2em;\n font-weight: bold;\n padding: 5px 10px;\n border: 1px solid #ddd;\n border-radius: 5px;\n min-height: 45px;\n min-width: 45px;\n text-align: center;\n}\n\n.cfp-hotkeys-close:hover \n{\n background-color: #fff;\n cursor: pointer;\n}\n\n@media all and (max-width: 500px) \n{\n .cfp-hotkeys \n {\n font-size: 0.8em;\n }\n}\n\n@media all and (min-width: 750px) \n{\n .cfp-hotkeys \n {\n font-size: 1.2em;\n }\n}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: HotkeysCheatsheetSAComponent, decorators: [{
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.1", ngImport: i0, type: HotkeysCheatsheetSAComponent, decorators: [{
|
|
72
71
|
type: Component,
|
|
73
72
|
args: [{ selector: 'hotkeys-cheatsheet', imports: [
|
|
74
73
|
CommonModule,
|
|
75
74
|
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cfp-hotkeys-container fade\" [ngClass]=\"{'in': helpVisible$|async}\" style=\"display:none\">\n <div class=\"cfp-hotkeys\">\n <h4 class=\"cfp-hotkeys-title\">{{title}}</h4>\n\n <table>\n <tbody>\n <tr *ngFor=\"let hotkey of hotkeys\">\n <td class=\"cfp-hotkeys-keys\">\n <span *ngFor=\"let key of hotkey.formatted\" class=\"cfp-hotkeys-key\">{{key}}</span>\n </td>\n\n <td class=\"cfp-hotkeys-text\">{{hotkey.description}}</td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"cfp-hotkeys-close\" (click)=\"toggleCheatSheet()\">×</div>\n </div>\n</div>", styles: [".cfp-hotkeys-container \n{\n display: table !important;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n color: #333;\n font-size: 1em;\n background-color: rgba(255, 255, 255, 0.9);\n}\n\n.cfp-hotkeys-container.fade \n{\n z-index: -1024;\n visibility: hidden;\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -moz-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n\n.cfp-hotkeys-container.fade.in \n{\n z-index: 10002;\n visibility: visible;\n opacity: 1;\n}\n\n.cfp-hotkeys-title \n{\n font-weight: bold;\n text-align: center;\n font-size: 1.2em;\n}\n\n.cfp-hotkeys \n{\n width: 100%;\n height: 100%;\n display: table-cell;\n vertical-align: middle;\n}\n\n.cfp-hotkeys table \n{\n margin: auto;\n color: #333;\n}\n\n.cfp-content \n{\n display: table-cell;\n vertical-align: middle;\n}\n\n.cfp-hotkeys-keys \n{\n padding: 5px;\n text-align: right;\n}\n\n.cfp-hotkeys-key \n{\n display: inline-block;\n color: #fff;\n background-color: #333;\n border: 1px solid #333;\n border-radius: 5px;\n text-align: center;\n margin-right: 5px;\n box-shadow: inset 0 1px 0 #666, 0 1px 0 #bbb;\n padding: 5px 9px;\n font-size: 1em;\n}\n\n.cfp-hotkeys-text \n{\n padding-left: 10px;\n font-size: 1em;\n}\n\n.cfp-hotkeys-close \n{\n position: fixed;\n top: 20px;\n right: 20px;\n font-size: 2em;\n font-weight: bold;\n padding: 5px 10px;\n border: 1px solid #ddd;\n border-radius: 5px;\n min-height: 45px;\n min-width: 45px;\n text-align: center;\n}\n\n.cfp-hotkeys-close:hover \n{\n background-color: #fff;\n cursor: pointer;\n}\n\n@media all and (max-width: 500px) \n{\n .cfp-hotkeys \n {\n font-size: 0.8em;\n }\n}\n\n@media all and (min-width: 750px) \n{\n .cfp-hotkeys \n {\n font-size: 1.2em;\n }\n}"] }]
|
|
76
|
-
}], ctorParameters:
|
|
75
|
+
}], ctorParameters: () => [{ type: i1.HotkeysService }], propDecorators: { title: [{
|
|
77
76
|
type: Input
|
|
78
77
|
}] } });
|
|
79
78
|
//# sourceMappingURL=cheatSheet.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cheatSheet.component.js","sourceRoot":"","sources":["../../../../../hotkeys/src/components/cheatSheet/cheatSheet.component.ts","../../../../../hotkeys/src/components/cheatSheet/cheatSheet.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAqB,WAAW,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAChH,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAC,eAAe,EAAe,MAAM,MAAM,CAAC;AACnD,OAAO,EAAS,cAAc,EAAC,MAAM,kBAAkB,CAAC;;;;AAExD;;GAEG;
|
|
1
|
+
{"version":3,"file":"cheatSheet.component.js","sourceRoot":"","sources":["../../../../../hotkeys/src/components/cheatSheet/cheatSheet.component.ts","../../../../../hotkeys/src/components/cheatSheet/cheatSheet.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAqB,WAAW,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAChH,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAC,eAAe,EAAe,MAAM,MAAM,CAAC;AACnD,OAAO,EAAS,cAAc,EAAC,MAAM,kBAAkB,CAAC;;;;AAExD;;GAEG;AAaH,MAAM,OAAO,4BAA4B;IAwBjB;IAtBpB,oEAAoE;IAEpE;;OAEG;IACK,UAAU,GAAY,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAErE,uEAAuE;IAEhE,YAAY,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACpE,YAAY,CAA8B;IAC1C,OAAO,CAA0B;IAExC,gFAAgF;IAEhF;;OAEG;IAEI,KAAK,GAAW,qBAAqB,CAAC;IAE7C,iEAAiE;IACjE,YAAoB,eAA+B;QAA/B,oBAAe,GAAf,eAAe,CAAgB;IAEnD,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAG,CAAC,IAAI,CAAC,UAAU,EACnB;YACI,OAAO;SACV;QAED,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;YAE3E,IAAI,MAAM,KAAK,KAAK,EACpB;gBACI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;aACpF;YAED,IAAI,MAAM,KAAK,KAAK,EACpB;gBACI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACjC;iBAED;gBACI,IAAI,CAAC,gBAAgB,EAAE,CAAC;aAC3B;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,IAAI,CAAC,YAAY,EACrB;YACI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;SACnC;IACL,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,gBAAgB;QAEnB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;uGA/EQ,4BAA4B;2FAA5B,4BAA4B,0GCpBzC,guBAkBM,+/DDHE,YAAY;;2FAKP,4BAA4B;kBAZxC,SAAS;+BAEI,oBAAoB,WAI9B;wBACI,YAAY;qBACf,cACW,IAAI,mBACC,uBAAuB,CAAC,MAAM;mFAuBxC,KAAK;sBADX,KAAK","sourcesContent":["import {ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, PLATFORM_ID, inject} from '@angular/core';\nimport {CommonModule, isPlatformBrowser} from '@angular/common';\nimport {BehaviorSubject, Subscription} from 'rxjs';\nimport {Hotkey, HotkeysService} from 'angular2-hotkeys';\n\n/**\n * Component used for displaying current active hotkeys as cheat cheet\n */\n@Component(\n{\n selector: 'hotkeys-cheatsheet',\n templateUrl: 'cheatSheet.component.html',\n styleUrls: ['cheatSheet.component.css'],\n imports:\n [\n CommonModule,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HotkeysCheatsheetSAComponent implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Indication whether is running in browser\n */\n private _isBrowser: boolean = isPlatformBrowser(inject(PLATFORM_ID));\n\n //######################### public properties #########################\n\n public helpVisible$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n public subscription: Subscription|undefined|null;\n public hotkeys: Hotkey[]|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Title displayed in header of cheat sheet\n */\n @Input()\n public title: string = 'Keyboard Shortcuts:';\n\n //######################### constructor #########################\n constructor(private _hotkeysService: HotkeysService)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n this.subscription = this._hotkeysService.cheatSheetToggle.subscribe((isOpen) =>\n {\n if (isOpen !== false)\n {\n this.hotkeys = this._hotkeysService.hotkeys.filter(hotkey => hotkey.description);\n }\n\n if (isOpen === false)\n {\n this.helpVisible$.next(false);\n }\n else\n {\n this.toggleCheatSheet();\n }\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if (this.subscription)\n {\n this.subscription.unsubscribe();\n }\n }\n\n //######################### public methods #########################\n\n /**\n * Toggles cheatsheet visibility\n */\n public toggleCheatSheet(): void\n {\n this.helpVisible$.next(!this.helpVisible$.value);\n }\n}","<div class=\"cfp-hotkeys-container fade\" [ngClass]=\"{'in': helpVisible$|async}\" style=\"display:none\">\n <div class=\"cfp-hotkeys\">\n <h4 class=\"cfp-hotkeys-title\">{{title}}</h4>\n\n <table>\n <tbody>\n <tr *ngFor=\"let hotkey of hotkeys\">\n <td class=\"cfp-hotkeys-keys\">\n <span *ngFor=\"let key of hotkey.formatted\" class=\"cfp-hotkeys-key\">{{key}}</span>\n </td>\n\n <td class=\"cfp-hotkeys-text\">{{hotkey.description}}</td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"cfp-hotkeys-close\" (click)=\"toggleCheatSheet()\">×</div>\n </div>\n</div>"]}
|