@onemrvapublic/design-system 20.2.1-develop.5 → 20.3.0-develop.1

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Component, InjectionToken, Injectable, HostListener, Directive, HostBinding, Input, EventEmitter, Output, TemplateRef, ViewContainerRef, Renderer2, ComponentFactoryResolver, Pipe, RendererFactory2, NgModule, ErrorHandler } from '@angular/core';
2
+ import { inject, ElementRef, Component, InjectionToken, Injectable, HostListener, Directive, HostBinding, Input, EventEmitter, Output, TemplateRef, ViewContainerRef, Renderer2, ComponentFactoryResolver, ContentChildren, Pipe, RendererFactory2, NgModule, ErrorHandler } from '@angular/core';
3
3
  import * as i1 from '@angular/material/icon';
4
4
  import { MatIconModule } from '@angular/material/icon';
5
5
  import * as i2 from '@angular/material/tooltip';
@@ -10,6 +10,7 @@ import { Platform, _isTestEnvironment } from '@angular/cdk/platform';
10
10
  import { Subject, merge, NEVER, take, tap, catchError, startWith, switchMap, shareReplay, filter, finalize, of, forkJoin, ReplaySubject, skip, distinctUntilChanged, map as map$1, combineLatestWith, from, takeUntil } from 'rxjs';
11
11
  import { OnemrvaMatColor, OnemrvaMatSize } from '@onemrvapublic/design-system/utils';
12
12
  import { BreakpointObserver } from '@angular/cdk/layout';
13
+ import { MatInput } from '@angular/material/input';
13
14
  import { catchError as catchError$1, map, startWith as startWith$1 } from 'rxjs/operators';
14
15
  import { HttpClient, HttpParams } from '@angular/common/http';
15
16
  import { __decorate } from 'tslib';
@@ -1073,6 +1074,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
1073
1074
  args: ['blur']
1074
1075
  }] } });
1075
1076
 
1077
+ class ReadOnlyFormDirective {
1078
+ constructor() {
1079
+ this.isReadOnly = true;
1080
+ }
1081
+ ngAfterViewInit() {
1082
+ this.matInputs.forEach(matFormField => {
1083
+ matFormField.readonly = true;
1084
+ });
1085
+ }
1086
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ReadOnlyFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1087
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: ReadOnlyFormDirective, isStandalone: true, selector: "form[onemrva-readonly], mat-form-field[onemrva-readonly]", host: { properties: { "class.onemrva-readonly": "this.isReadOnly" } }, queries: [{ propertyName: "matInputs", predicate: MatInput, descendants: true }], ngImport: i0 }); }
1088
+ }
1089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ReadOnlyFormDirective, decorators: [{
1090
+ type: Directive,
1091
+ args: [{
1092
+ selector: 'form[onemrva-readonly], mat-form-field[onemrva-readonly]',
1093
+ standalone: true,
1094
+ }]
1095
+ }], propDecorators: { matInputs: [{
1096
+ type: ContentChildren,
1097
+ args: [MatInput, { descendants: true }]
1098
+ }], isReadOnly: [{
1099
+ type: HostBinding,
1100
+ args: ['class.onemrva-readonly']
1101
+ }] } });
1102
+
1076
1103
  /**
1077
1104
  * Conditionally adds component to the tree if screen width matches at least one size in input
1078
1105
  */
@@ -1137,6 +1164,7 @@ const directives = [
1137
1164
  OnemRvaColorDirective,
1138
1165
  OnemrvaMaskDirective,
1139
1166
  OnemrvaDateFormatDirective,
1167
+ ReadOnlyFormDirective,
1140
1168
  ];
1141
1169
 
1142
1170
  /**
@@ -1731,7 +1759,7 @@ const bankAccountValidator = (allowEmptyCountry = true) => {
1731
1759
 
1732
1760
  class OnemrvaSharedModule {
1733
1761
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1734
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, imports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective], exports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective] }); }
1762
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, imports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, ReadOnlyFormDirective], exports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, ReadOnlyFormDirective] }); }
1735
1763
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule }); }
1736
1764
  }
1737
1765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, decorators: [{
@@ -2149,5 +2177,5 @@ function onemrvaThemeProvider() {
2149
2177
  * Generated bundle index. Do not edit.
2150
2178
  */
2151
2179
 
2152
- export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, CacheService, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, LOOKUP_COUNTRY_SERVICE_URL, LOOKUP_COUNTRY_URL, MatRowClickableDirective, NISS_MASK, ONEMRVA_MAT_LUXON_DATE_FORMATS, ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS, ONEMRVA_MAT_NATIVE_DATE_FORMAT, ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT, ONEMRVA_THEME, ONEMRVA_THEME_CLASS, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemRvaOSMService, OnemRvaSizeDirective, OnemrvaBcePipe, OnemrvaDateFormatDirective, OnemrvaErrorHandler, OnemrvaLuxonDateAdapter, OnemrvaMaskDirective, OnemrvaMissingTranslationHandler, OnemrvaNativeDateAdapter, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, RequestTimes, SEPA_ONLY_SUPPORTED_COUNTRIES, WebComponentOverlayContainer, bankAccountValidator, directives, onemrvaDateLuxonProvider, onemrvaDateLuxonYearMonthProvider, onemrvaDateNativeProvider, onemrvaDateNativeYearMonthProvider, onemrvaThemeProvider, setTranslationLanguage, setTranslationLanguageFromWO };
2180
+ export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, CacheService, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, LOOKUP_COUNTRY_SERVICE_URL, LOOKUP_COUNTRY_URL, MatRowClickableDirective, NISS_MASK, ONEMRVA_MAT_LUXON_DATE_FORMATS, ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS, ONEMRVA_MAT_NATIVE_DATE_FORMAT, ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT, ONEMRVA_THEME, ONEMRVA_THEME_CLASS, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemRvaOSMService, OnemRvaSizeDirective, OnemrvaBcePipe, OnemrvaDateFormatDirective, OnemrvaErrorHandler, OnemrvaLuxonDateAdapter, OnemrvaMaskDirective, OnemrvaMissingTranslationHandler, OnemrvaNativeDateAdapter, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, ReadOnlyFormDirective, RequestTimes, SEPA_ONLY_SUPPORTED_COUNTRIES, WebComponentOverlayContainer, bankAccountValidator, directives, onemrvaDateLuxonProvider, onemrvaDateLuxonYearMonthProvider, onemrvaDateNativeProvider, onemrvaDateNativeYearMonthProvider, onemrvaThemeProvider, setTranslationLanguage, setTranslationLanguageFromWO };
2153
2181
  //# sourceMappingURL=onemrvapublic-design-system-shared.mjs.map