@sebgroup/green-angular 5.3.3 → 5.4.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/esm2022/lib/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/lib/shared/core-renderer/core-renderer.mjs +49 -2
- package/esm2022/src/lib/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/src/lib/shared/core-renderer/core-renderer.mjs +49 -2
- package/esm2022/src/v-angular/input/input.component.mjs +3 -3
- package/esm2022/src/v-angular/modal/dialog/dialog.component.mjs +2 -2
- package/esm2022/src/v-angular/table/table.component.mjs +5 -4
- package/esm2022/src/v-angular/tooltip/tooltip.styles.mjs +2 -2
- package/esm2022/v-angular/input/input.component.mjs +3 -3
- package/esm2022/v-angular/modal/dialog/dialog.component.mjs +2 -2
- package/esm2022/v-angular/table/table.component.mjs +5 -4
- package/esm2022/v-angular/tooltip/tooltip.styles.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-lib-dropdown.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs +50 -2
- package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-table.mjs +4 -3
- package/fesm2022/sebgroup-green-angular-src-v-angular-table.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-tooltip.mjs +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-tooltip.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +9 -8
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular.mjs +52 -4
- package/fesm2022/sebgroup-green-angular.mjs.map +1 -1
- package/lib/shared/core-renderer/core-renderer.d.ts +45 -1
- package/package.json +3 -3
- package/src/lib/shared/core-renderer/core-renderer.d.ts +45 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-lib-dropdown.mjs","sources":["../../../../libs/angular/src/lib/dropdown/dropdown-button.directive.ts","../../../../libs/angular/src/lib/dropdown/dropdown-option.directive.ts","../../../../libs/angular/src/lib/dropdown/dropdown.component.ts","../../../../libs/angular/src/lib/dropdown/dropdown.component.html","../../../../libs/angular/src/lib/dropdown/dropdown.module.ts","../../../../libs/angular/src/lib/dropdown/sebgroup-green-angular-src-lib-dropdown.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[nggDropdownButton]',\n})\nexport class NggDropdownButtonDirective {\n constructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[nggDropdownOption]',\n})\nexport class NggDropdownOptionDirective {\n constructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n Inject,\n Injector,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core'\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n} from '@angular/forms'\n\nimport { NggDropdownButtonDirective } from './dropdown-button.directive'\nimport { NggDropdownOptionDirective } from './dropdown-option.directive'\n\nimport '@sebgroup/green-core/components/dropdown/index.js'\n\nimport type {\n GdsDropdown,\n GdsOption,\n} from '@sebgroup/green-core/components/dropdown/index.js'\n\nimport * as DropdownTransStyles from '@sebgroup/green-core/components/dropdown/dropdown.trans.styles.js'\n\nexport type CompareWith<T = any> = (o1: T, o2: T) => boolean\nexport type SearchFilter<T = any> = (search: string, value: T) => boolean\nexport type DropdownPlacements = 'bottom-start' | 'top-start'\nexport interface DropdownTexts {\n select?: string\n selected?: string\n placeholder?: string\n}\nexport interface DropdownOption {\n label?: string\n value?: any\n selected?: boolean\n heading?: boolean\n [key: string]: any\n}\n\n@Component({\n selector: 'ngg-dropdown',\n templateUrl: 'dropdown.component.html',\n styleUrls: ['dropdown.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: NggDropdownComponent,\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NggDropdownComponent implements ControlValueAccessor, OnInit {\n @Input() id?: string\n @Input() loop?: boolean = false\n @Input() display = 'label'\n @Input() useValue = 'value'\n @Input() label?: string\n @Input() valid?: boolean\n @Input() invalid?: boolean\n @Input() compareWith?: CompareWith\n @Input() searchFilter?: SearchFilter\n @Input() syncPopoverWidth?: boolean\n @Input() size?: 'small' | 'medium'\n @Input() hideLabel?: boolean\n @Input() maxHeight?: number = 500\n @Input() disableMobileStyles?: boolean\n\n //\n @Input() set options(value: DropdownOption[] | undefined) {\n this._options = value\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n }\n get options(): DropdownOption[] | undefined {\n return this._options\n }\n private _options: DropdownOption[] | undefined\n\n @Input() set texts(texts: DropdownTexts | undefined) {\n this._texts = {\n ...(texts ? texts : {}),\n select: this.textToDisplay(texts, this._value),\n }\n }\n\n get texts(): DropdownTexts | undefined {\n return this._texts\n }\n private _texts: DropdownTexts | undefined\n\n //\n @Input() set multiSelect(value: string | boolean) {\n this._multiSelect = this.convertToBoolean(value)\n }\n get multiSelect(): boolean {\n return this._multiSelect\n }\n private _multiSelect = false\n\n //\n @Input() set searchable(value: string | boolean) {\n this._searchable = this.convertToBoolean(value)\n }\n get searchable(): boolean {\n return this._searchable\n }\n private _searchable = false\n\n //\n @Input() set value(newValue: any) {\n if (!this.options) return\n\n this._value = newValue\n\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n }\n get value(): any {\n return this._value\n }\n private _value: DropdownOption | DropdownOption[] | undefined\n\n //\n get selectedOption() {\n return Array.isArray(this.value)\n ? this.value.map((v: any) => this.optionByValue(v))\n : this.optionByValue(this.value)\n }\n\n onChangeFn?: (value: unknown) => void\n onTouchedFn?: () => void\n\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>()\n @Output() readonly touched: EventEmitter<boolean> =\n new EventEmitter<boolean>()\n\n @ContentChild(NggDropdownOptionDirective)\n customOption?: NggDropdownOptionDirective\n\n @ContentChild(NggDropdownButtonDirective)\n customButton?: NggDropdownButtonDirective\n\n @ViewChild('gdsDropdown', { static: false }) gdsDropdown?: ElementRef\n\n public onValueChange: (event: Event) => void = (event) => {\n const target = event.target as GdsDropdown<DropdownOption>\n this._value = target.value\n\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n\n this.onChangeFn?.(this.value)\n this.valueChange.emit(this.value)\n\n this._cdr.detectChanges()\n }\n\n get control(): NgControl | undefined {\n return this.injector.get(NgControl)\n }\n\n constructor(\n @Inject(Injector) private injector: Injector,\n private _cdr: ChangeDetectorRef,\n ) {\n DropdownTransStyles.register()\n }\n\n ngOnInit(): void {\n if (!this._value) {\n if (this.multiSelect)\n this._value = this.options\n ?.filter((o) => o.selected === true)\n ?.map((o) => o[this.useValue])\n else\n this._value = this.options?.find((o) => o.selected === true)?.[\n this.useValue\n ]\n\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n }\n\n this.texts = {\n placeholder: this.texts?.placeholder ?? 'Select',\n selected: this.texts?.selected ?? 'selected',\n select: this.displayTextByValue(this._value),\n }\n }\n\n writeValue(value: any): void {\n this.value = value\n this._cdr.detectChanges()\n }\n\n registerOnChange(fn: () => unknown): void {\n this.onChangeFn = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn\n }\n\n // These adapter functions are used to maintain backwards compatibility with the old interface\n compareWithAdapter = (o1: any, o2: any) => {\n const compareFn = this.compareWith || ((a, b) => a === b)\n return compareFn(o1, o2)\n }\n searchFilterAdapter = (q: string, o: GdsOption) => {\n if (this.searchFilter) return this.searchFilter(q, o.value)\n else\n return ((q: string, o: GdsOption) =>\n o.innerHTML.toLowerCase().includes(q.toLowerCase()))(q, o)\n }\n\n private convertToBoolean(value: string | boolean): boolean {\n return (\n value === '' || value === 'true' || value.toString() === 'true' || false\n )\n }\n\n private optionByValue = (value: any) => {\n return this.options?.find((o) => o[this.useValue] === value)\n }\n\n private displayTextByValue = (value: any) => {\n return this.textToDisplay(this.texts, value)\n }\n\n private textToDisplay = (\n dropdownTexts: DropdownTexts | undefined,\n value: any,\n ): string => {\n if (!Array.isArray(value))\n return (\n this.optionByValue(value)?.[this.display] ||\n (dropdownTexts?.placeholder ?? 'Select')\n )\n\n const displayValues = value.map(\n (v) => this.optionByValue(v)?.[this.display],\n )\n return displayValues?.length > 2\n ? `${displayValues.length} ${dropdownTexts?.selected} `\n : displayValues?.join(', ') || (dropdownTexts?.placeholder ?? 'Select')\n }\n}\n","<div class=\"form-group\">\n <gds-dropdown\n *nggCoreElement\n #gdsDropdown\n [value]=\"value\"\n [searchable]=\"searchable\"\n [label]=\"label\"\n (change)=\"onValueChange($event)\"\n [multiple]=\"multiSelect\"\n [invalid]=\"invalid\"\n [compareWith]=\"compareWithAdapter\"\n [searchFilter]=\"searchFilterAdapter\"\n [syncPopoverWidth]=\"syncPopoverWidth\"\n [size]=\"size\"\n [hideLabel]=\"hideLabel\"\n [maxHeight]=\"maxHeight\"\n [disableMobileStyles]=\"disableMobileStyles\"\n >\n <span slot=\"message\" #formInfo\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n\n <span slot=\"trigger\"\n ><ng-container\n *ngTemplateOutlet=\"\n customButton?.templateRef && selectedOption\n ? customButton!.templateRef\n : defaultButton;\n context: { option: selectedOption }\n \"\n ></ng-container\n ></span>\n\n <ng-container *ngFor=\"let option of options; let index = index\">\n <ng-container *ngIf=\"!option.heading; else optionHeading\">\n <gds-option *nggCoreElement [value]=\"option[useValue]\"\n ><ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container\n ></gds-option>\n </ng-container>\n <ng-template #optionHeading>\n <gds-menu-heading *nggCoreElement>{{ option.label }}</gds-menu-heading>\n </ng-template>\n </ng-container>\n </gds-dropdown>\n</div>\n\n<ng-template #defaultButton let-selected=\"option\">\n <span class=\"trigger\">{{ texts?.select }}</span>\n</ng-template>\n\n<ng-template #defaultOption let-option=\"option\">\n {{ display ? option[display] : option.name }}\n</ng-template>\n","import { CommonModule } from '@angular/common'\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'\n\nimport { NggCoreWrapperModule } from '@sebgroup/green-angular/src/lib/shared'\nimport { NggDropdownButtonDirective } from './dropdown-button.directive'\nimport { NggDropdownOptionDirective } from './dropdown-option.directive'\nimport { NggDropdownComponent } from './dropdown.component'\n\n@NgModule({\n declarations: [\n NggDropdownComponent,\n NggDropdownOptionDirective,\n NggDropdownButtonDirective,\n ],\n imports: [CommonModule, NggCoreWrapperModule],\n exports: [\n NggDropdownComponent,\n NggDropdownOptionDirective,\n NggDropdownButtonDirective,\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NggDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAKa,0BAA0B,CAAA;AACrC,IAAA,WAAA,CAAmB,WAAiC,EAAA;QAAjC,IAAW,CAAA,WAAA,GAAX,WAAW,CAAsB;KAAI;+GAD7C,0BAA0B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAA1B,0BAA0B,EAA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C1B,0BAA0B;AAC3B,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;AAC7C,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,0BAA0B;wBAC1B,0BAA0B;AAC3B,qBAAA;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-lib-dropdown.mjs","sources":["../../../../libs/angular/src/lib/dropdown/dropdown-button.directive.ts","../../../../libs/angular/src/lib/dropdown/dropdown-option.directive.ts","../../../../libs/angular/src/lib/dropdown/dropdown.component.ts","../../../../libs/angular/src/lib/dropdown/dropdown.component.html","../../../../libs/angular/src/lib/dropdown/dropdown.module.ts","../../../../libs/angular/src/lib/dropdown/sebgroup-green-angular-src-lib-dropdown.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[nggDropdownButton]',\n})\nexport class NggDropdownButtonDirective {\n constructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[nggDropdownOption]',\n})\nexport class NggDropdownOptionDirective {\n constructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n Inject,\n Injector,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core'\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n} from '@angular/forms'\n\nimport { NggDropdownButtonDirective } from './dropdown-button.directive'\nimport { NggDropdownOptionDirective } from './dropdown-option.directive'\n\nimport '@sebgroup/green-core/components/dropdown/index.js'\n\nimport type {\n GdsDropdown,\n GdsOption,\n} from '@sebgroup/green-core/components/dropdown/index.js'\n\nimport * as DropdownTransStyles from '@sebgroup/green-core/components/dropdown/dropdown.trans.styles.js'\n\nexport type CompareWith<T = any> = (o1: T, o2: T) => boolean\nexport type SearchFilter<T = any> = (search: string, value: T) => boolean\nexport type DropdownPlacements = 'bottom-start' | 'top-start'\nexport interface DropdownTexts {\n select?: string\n selected?: string\n placeholder?: string\n}\nexport interface DropdownOption {\n label?: string\n value?: any\n selected?: boolean\n heading?: boolean\n [key: string]: any\n}\n\n@Component({\n selector: 'ngg-dropdown',\n templateUrl: 'dropdown.component.html',\n styleUrls: ['dropdown.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: NggDropdownComponent,\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NggDropdownComponent implements ControlValueAccessor, OnInit {\n @Input() id?: string\n @Input() loop?: boolean = false\n @Input() display = 'label'\n @Input() useValue = 'value'\n @Input() label?: string\n @Input() valid?: boolean\n @Input() invalid?: boolean\n @Input() compareWith?: CompareWith\n @Input() searchFilter?: SearchFilter\n @Input() syncPopoverWidth?: boolean\n @Input() size?: 'small' | 'medium'\n @Input() hideLabel?: boolean\n @Input() maxHeight?: number = 500\n @Input() disableMobileStyles?: boolean\n\n //\n @Input() set options(value: DropdownOption[] | undefined) {\n this._options = value\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n }\n get options(): DropdownOption[] | undefined {\n return this._options\n }\n private _options: DropdownOption[] | undefined\n\n @Input() set texts(texts: DropdownTexts | undefined) {\n this._texts = {\n ...(texts ? texts : {}),\n select: this.textToDisplay(texts, this._value),\n }\n }\n\n get texts(): DropdownTexts | undefined {\n return this._texts\n }\n private _texts: DropdownTexts | undefined\n\n //\n @Input() set multiSelect(value: string | boolean) {\n this._multiSelect = this.convertToBoolean(value)\n }\n get multiSelect(): boolean {\n return this._multiSelect\n }\n private _multiSelect = false\n\n //\n @Input() set searchable(value: string | boolean) {\n this._searchable = this.convertToBoolean(value)\n }\n get searchable(): boolean {\n return this._searchable\n }\n private _searchable = false\n\n //\n @Input() set value(newValue: any) {\n if (!this.options) return\n\n this._value = newValue\n\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n }\n get value(): any {\n return this._value\n }\n private _value: DropdownOption | DropdownOption[] | undefined\n\n //\n get selectedOption() {\n return Array.isArray(this.value)\n ? this.value.map((v: any) => this.optionByValue(v))\n : this.optionByValue(this.value)\n }\n\n onChangeFn?: (value: unknown) => void\n onTouchedFn?: () => void\n\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>()\n @Output() readonly touched: EventEmitter<boolean> =\n new EventEmitter<boolean>()\n\n @ContentChild(NggDropdownOptionDirective)\n customOption?: NggDropdownOptionDirective\n\n @ContentChild(NggDropdownButtonDirective)\n customButton?: NggDropdownButtonDirective\n\n @ViewChild('gdsDropdown', { static: false }) gdsDropdown?: ElementRef\n\n public onValueChange: (event: Event) => void = (event) => {\n const target = event.target as GdsDropdown<DropdownOption>\n this._value = target.value\n\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n\n this.onChangeFn?.(this.value)\n this.valueChange.emit(this.value)\n\n this._cdr.detectChanges()\n }\n\n get control(): NgControl | undefined {\n return this.injector.get(NgControl)\n }\n\n constructor(\n @Inject(Injector) private injector: Injector,\n private _cdr: ChangeDetectorRef,\n ) {\n DropdownTransStyles.register()\n }\n\n ngOnInit(): void {\n if (!this._value) {\n if (this.multiSelect)\n this._value = this.options\n ?.filter((o) => o.selected === true)\n ?.map((o) => o[this.useValue])\n else\n this._value = this.options?.find((o) => o.selected === true)?.[\n this.useValue\n ]\n\n this.texts = {\n ...this.texts,\n select: this.displayTextByValue(this._value),\n }\n }\n\n this.texts = {\n placeholder: this.texts?.placeholder ?? 'Select',\n selected: this.texts?.selected ?? 'selected',\n select: this.displayTextByValue(this._value),\n }\n }\n\n writeValue(value: any): void {\n this.value = value\n this._cdr.detectChanges()\n }\n\n registerOnChange(fn: () => unknown): void {\n this.onChangeFn = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn\n }\n\n // These adapter functions are used to maintain backwards compatibility with the old interface\n compareWithAdapter = (o1: any, o2: any) => {\n const compareFn = this.compareWith || ((a, b) => a === b)\n return compareFn(o1, o2)\n }\n searchFilterAdapter = (q: string, o: GdsOption) => {\n if (this.searchFilter) return this.searchFilter(q, o.value)\n else\n return ((q: string, o: GdsOption) =>\n o.innerHTML.toLowerCase().includes(q.toLowerCase()))(q, o)\n }\n\n private convertToBoolean(value: string | boolean): boolean {\n return (\n value === '' || value === 'true' || value.toString() === 'true' || false\n )\n }\n\n private optionByValue = (value: any) => {\n return this.options?.find((o) => o[this.useValue] === value)\n }\n\n private displayTextByValue = (value: any) => {\n return this.textToDisplay(this.texts, value)\n }\n\n private textToDisplay = (\n dropdownTexts: DropdownTexts | undefined,\n value: any,\n ): string => {\n if (!Array.isArray(value))\n return (\n this.optionByValue(value)?.[this.display] ||\n (dropdownTexts?.placeholder ?? 'Select')\n )\n\n const displayValues = value.map(\n (v) => this.optionByValue(v)?.[this.display],\n )\n return displayValues?.length > 2\n ? `${displayValues.length} ${dropdownTexts?.selected} `\n : displayValues?.join(', ') || (dropdownTexts?.placeholder ?? 'Select')\n }\n}\n","<div class=\"form-group\">\n <gds-dropdown\n *nggCoreElement\n #gdsDropdown\n [value]=\"value\"\n [searchable]=\"searchable\"\n [label]=\"label\"\n (change)=\"onValueChange($event)\"\n [multiple]=\"multiSelect\"\n [invalid]=\"invalid\"\n [compareWith]=\"compareWithAdapter\"\n [searchFilter]=\"searchFilterAdapter\"\n [syncPopoverWidth]=\"syncPopoverWidth\"\n [size]=\"size\"\n [hideLabel]=\"hideLabel\"\n [maxHeight]=\"maxHeight\"\n [disableMobileStyles]=\"disableMobileStyles\"\n >\n <span slot=\"message\" #formInfo\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n\n <span slot=\"trigger\" style=\"display: contents\"\n ><ng-container\n *ngTemplateOutlet=\"\n customButton?.templateRef && selectedOption\n ? customButton!.templateRef\n : defaultButton;\n context: { option: selectedOption }\n \"\n ></ng-container\n ></span>\n\n <ng-container *ngFor=\"let option of options; let index = index\">\n <ng-container *ngIf=\"!option.heading; else optionHeading\">\n <gds-option *nggCoreElement [value]=\"option[useValue]\"\n ><ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container\n ></gds-option>\n </ng-container>\n <ng-template #optionHeading>\n <gds-menu-heading *nggCoreElement>{{ option.label }}</gds-menu-heading>\n </ng-template>\n </ng-container>\n </gds-dropdown>\n</div>\n\n<ng-template #defaultButton let-selected=\"option\">\n <span class=\"ngg-dropdown-default-trigger\">{{ texts?.select }}</span>\n</ng-template>\n\n<ng-template #defaultOption let-option=\"option\">\n {{ display ? option[display] : option.name }}\n</ng-template>\n","import { CommonModule } from '@angular/common'\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'\n\nimport { NggCoreWrapperModule } from '@sebgroup/green-angular/src/lib/shared'\nimport { NggDropdownButtonDirective } from './dropdown-button.directive'\nimport { NggDropdownOptionDirective } from './dropdown-option.directive'\nimport { NggDropdownComponent } from './dropdown.component'\n\n@NgModule({\n declarations: [\n NggDropdownComponent,\n NggDropdownOptionDirective,\n NggDropdownButtonDirective,\n ],\n imports: [CommonModule, NggCoreWrapperModule],\n exports: [\n NggDropdownComponent,\n NggDropdownOptionDirective,\n NggDropdownButtonDirective,\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NggDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAKa,0BAA0B,CAAA;AACrC,IAAA,WAAA,CAAmB,WAAiC,EAAA;QAAjC,IAAW,CAAA,WAAA,GAAX,WAAW,CAAsB;KAAI;+GAD7C,0BAA0B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EA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AA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,0BAA0B;wBAC1B,0BAA0B;AAC3B,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;AAC7C,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,0BAA0B;wBAC1B,0BAA0B;AAC3B,qBAAA;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, Directive, NgModule, Injectable, inject, Renderer2, ViewContainerRef, ChangeDetectorRef, TemplateRef, forwardRef } from '@angular/core';
|
|
3
|
+
import { InjectionToken, Directive, NgModule, Injectable, RendererFactory2, NgZone, inject, Renderer2, ViewContainerRef, ChangeDetectorRef, TemplateRef, forwardRef } from '@angular/core';
|
|
4
4
|
import { Subject, fromEvent, interval } from 'rxjs';
|
|
5
5
|
import { takeUntil, throttle } from 'rxjs/operators';
|
|
6
6
|
import { getScopedTagName } from '@sebgroup/green-core/scoping';
|
|
7
|
+
import { ɵAnimationRendererFactory, ɵAnimationEngine } from '@angular/animations/browser';
|
|
7
8
|
import * as i1 from '@angular/platform-browser';
|
|
9
|
+
import { ɵDomRendererFactory2 } from '@angular/platform-browser';
|
|
8
10
|
import { NgControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
|
9
11
|
|
|
10
12
|
const ON_SCROLL_TOKEN = new InjectionToken('ON_SCROLL_TOKEN');
|
|
@@ -146,6 +148,52 @@ class NggCoreRendererFactory {
|
|
|
146
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggCoreRendererFactory, decorators: [{
|
|
147
149
|
type: Injectable
|
|
148
150
|
}], ctorParameters: () => [{ type: i1.ɵDomRendererFactory2 }] });
|
|
151
|
+
/**
|
|
152
|
+
* Returns a AnimationRendererFactory configured to use the NggCoreRendererFactory as a delegate.
|
|
153
|
+
*/
|
|
154
|
+
function animationsCoreRendererFactory(delegate, engine, zone) {
|
|
155
|
+
const crf = new NggCoreRendererFactory(delegate);
|
|
156
|
+
return new ɵAnimationRendererFactory(crf, engine, zone);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Provide the NggCoreRendererFactory to use <gds-*> elements without any extra directives.
|
|
160
|
+
* The NggCoreRenderer will handle element name scoping automatically.
|
|
161
|
+
*
|
|
162
|
+
* Example:
|
|
163
|
+
* ```ts
|
|
164
|
+
* @NgModule({
|
|
165
|
+
* providers: [provideCoreRenderer()],
|
|
166
|
+
* schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
167
|
+
* })
|
|
168
|
+
* export class AppModule {}
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
const provideCoreRenderer = () => ({
|
|
172
|
+
provide: RendererFactory2,
|
|
173
|
+
useClass: NggCoreRendererFactory,
|
|
174
|
+
});
|
|
175
|
+
/**
|
|
176
|
+
* Provide the NggCoreRendererFactory to use <gds-*> elements without any extra directives.
|
|
177
|
+
* The NggCoreRenderer will handle element name scoping automatically.
|
|
178
|
+
*
|
|
179
|
+
* This factory also provides the Angular animations renderer.
|
|
180
|
+
*
|
|
181
|
+
*
|
|
182
|
+
* Example:
|
|
183
|
+
* ```ts
|
|
184
|
+
* @NgModule({
|
|
185
|
+
* imports: [BrowserAnimationsModule],
|
|
186
|
+
* providers: [provideCoreRendererWithAnimations()],
|
|
187
|
+
* schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
188
|
+
* })
|
|
189
|
+
* export class AppModule {}
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
const provideCoreRendererWithAnimations = () => ({
|
|
193
|
+
provide: RendererFactory2,
|
|
194
|
+
useFactory: animationsCoreRendererFactory,
|
|
195
|
+
deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone],
|
|
196
|
+
});
|
|
149
197
|
|
|
150
198
|
class NggCoreElementDirective {
|
|
151
199
|
constructor() {
|
|
@@ -280,5 +328,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
280
328
|
* Generated bundle index. Do not edit.
|
|
281
329
|
*/
|
|
282
330
|
|
|
283
|
-
export { NggCoreControlDirective, NggCoreElementDirective, NggCoreFormsModule, NggCoreRenderer, NggCoreRendererFactory, NggCoreWrapperModule, NggOnScrollDirective, NggSharedModule, ON_SCROLL_TOKEN };
|
|
331
|
+
export { NggCoreControlDirective, NggCoreElementDirective, NggCoreFormsModule, NggCoreRenderer, NggCoreRendererFactory, NggCoreWrapperModule, NggOnScrollDirective, NggSharedModule, ON_SCROLL_TOKEN, animationsCoreRendererFactory, provideCoreRenderer, provideCoreRendererWithAnimations };
|
|
284
332
|
//# sourceMappingURL=sebgroup-green-angular-src-lib-shared.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-lib-shared.mjs","sources":["../../../../libs/angular/src/lib/shared/on-scroll.directive.ts","../../../../libs/angular/src/lib/shared/shared.module.ts","../../../../libs/angular/src/lib/shared/core-renderer/core-renderer.ts","../../../../libs/angular/src/lib/shared/core-element/core-element.directive.ts","../../../../libs/angular/src/lib/shared/core-element/core-element.module.ts","../../../../libs/angular/src/lib/shared/core-control/core-control.directive.ts","../../../../libs/angular/src/lib/shared/core-control/core-control.module.ts","../../../../libs/angular/src/lib/shared/sebgroup-green-angular-src-lib-shared.ts"],"sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n InjectionToken,\n OnDestroy,\n} from '@angular/core'\nimport { fromEvent, interval, Subject } from 'rxjs'\nimport { takeUntil, throttle } from 'rxjs/operators'\n\nexport const ON_SCROLL_TOKEN = new InjectionToken<string>('ON_SCROLL_TOKEN')\n\n@Directive({\n selector: '[nggOnScroll]',\n providers: [\n {\n provide: ON_SCROLL_TOKEN,\n useFactory: (component: NggOnScrollDirective): Subject<unknown> =>\n component?.onScroll$,\n deps: [NggOnScrollDirective],\n },\n ],\n})\nexport class NggOnScrollDirective implements AfterViewInit, OnDestroy {\n onScroll$ = new Subject()\n destroy$ = new Subject()\n\n constructor(private elementRef: ElementRef) {}\n\n public ngAfterViewInit(): void {\n if (this.elementRef) {\n fromEvent(this.elementRef?.nativeElement, 'scroll')\n .pipe(\n takeUntil(this.destroy$),\n throttle(() => interval(30)),\n )\n .subscribe(() => {\n this.onScroll$.next(null) // Changes: added null due to TS error\n })\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next(null)\n this.destroy$.complete()\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\n\nimport { NggOnScrollDirective } from './on-scroll.directive'\n\n@NgModule({\n declarations: [NggOnScrollDirective],\n imports: [CommonModule],\n exports: [NggOnScrollDirective],\n})\nexport class NggSharedModule {}\n","import {\n Injectable,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n} from '@angular/core'\nimport { ɵDomRendererFactory2 as DomRendererFactory2 } from '@angular/platform-browser'\n\nimport { getScopedTagName } from '@sebgroup/green-core/scoping'\n\nexport class NggCoreRenderer implements Renderer2 {\n constructor(private delegate: Renderer2) {}\n\n createElement(name: string, namespace?: string | null): any {\n const scopedName = name.startsWith('gds-') ? getScopedTagName(name) : name\n return this.delegate.createElement(scopedName, namespace)\n }\n\n // Delegate all other methods to the original renderer\n addClass(el: any, name: string): void {\n return this.delegate.addClass(el, name)\n }\n get data(): { [key: string]: any } {\n return this.delegate.data\n }\n destroy(): void {\n return this.delegate.destroy()\n }\n createComment(value: string) {\n return this.delegate.createComment(value)\n }\n createText(value: string) {\n return this.delegate.createText(value)\n }\n destroyNode: ((node: any) => void) | null = (node) =>\n this.delegate.destroyNode && this.delegate.destroyNode(node)\n appendChild(parent: any, newChild: any): void {\n return this.delegate.appendChild(parent, newChild)\n }\n insertBefore(\n parent: any,\n newChild: any,\n refChild: any,\n isMove?: boolean | undefined,\n ): void {\n return this.delegate.insertBefore(parent, newChild, refChild, isMove)\n }\n removeChild(\n parent: any,\n oldChild: any,\n isHostElement?: boolean | undefined,\n ): void {\n return this.delegate.removeChild(parent, oldChild, isHostElement)\n }\n selectRootElement(\n selectorOrNode: any,\n preserveContent?: boolean | undefined,\n ) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent)\n }\n parentNode(node: any) {\n return this.delegate.parentNode(node)\n }\n nextSibling(node: any) {\n return this.delegate.nextSibling(node)\n }\n setAttribute(\n el: any,\n name: string,\n value: string,\n namespace?: string | null | undefined,\n ): void {\n return this.delegate.setAttribute(el, name, value, namespace)\n }\n removeAttribute(\n el: any,\n name: string,\n namespace?: string | null | undefined,\n ): void {\n return this.delegate.removeAttribute(el, name, namespace)\n }\n removeClass(el: any, name: string): void {\n return this.delegate.removeClass(el, name)\n }\n setStyle(\n el: any,\n style: string,\n value: any,\n flags?: RendererStyleFlags2 | undefined,\n ): void {\n return this.delegate.setStyle(el, style, value, flags)\n }\n removeStyle(\n el: any,\n style: string,\n flags?: RendererStyleFlags2 | undefined,\n ): void {\n return this.delegate.removeStyle(el, style, flags)\n }\n setProperty(el: any, name: string, value: any): void {\n return this.delegate.setProperty(el, name, value)\n }\n setValue(node: any, value: string): void {\n return this.delegate.setValue(node, value)\n }\n listen(\n target: any,\n eventName: string,\n callback: (event: any) => boolean | void,\n ): () => void {\n return this.delegate.listen(target, eventName, callback)\n }\n}\n\n@Injectable()\nexport class NggCoreRendererFactory implements RendererFactory2 {\n constructor(private delegate: DomRendererFactory2) {}\n\n createRenderer(element: any, type: RendererType2 | null): Renderer2 {\n const renderer = this.delegate.createRenderer(element, type)\n return new NggCoreRenderer(renderer)\n }\n}\n","import { DOCUMENT } from '@angular/common'\nimport {\n ChangeDetectorRef,\n Directive,\n EmbeddedViewRef,\n inject,\n OnInit,\n Renderer2,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core'\n\nimport { getScopedTagName } from '@sebgroup/green-core/scoping'\nimport { NggCoreRenderer } from '../core-renderer'\n\n@Directive({\n selector: '[nggCoreElement]',\n})\nexport class NggCoreElementDirective implements OnInit {\n private viewRef: EmbeddedViewRef<any> | null = null\n private readonly document = inject(DOCUMENT)\n private readonly renderer = inject(Renderer2)\n private readonly vcr = inject(ViewContainerRef)\n private readonly cdr = inject(ChangeDetectorRef)\n private readonly template = inject(TemplateRef<any>)\n\n ngOnInit() {\n if (!(this.renderer instanceof NggCoreRenderer)) {\n this.vcr.clear()\n\n const originalCreateElement = this.renderer.createElement\n this.renderer.createElement = (name: string, _namespace: string) => {\n return this.document.createElement(getScopedTagName(name))\n }\n\n this.cdr.markForCheck()\n this.viewRef = this.vcr.createEmbeddedView(this.template)\n this.renderer.createElement = originalCreateElement\n }\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\n\nimport { NggCoreElementDirective } from './core-element.directive'\n\n@NgModule({\n declarations: [NggCoreElementDirective],\n imports: [CommonModule],\n exports: [NggCoreElementDirective],\n})\nexport class NggCoreWrapperModule {}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Injector,\n Renderer2,\n} from '@angular/core'\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n Validators,\n} from '@angular/forms'\n\n@Directive({\n selector:\n 'gds-input, gds-textarea, gds-dropdown, gds-datepicker, gds-select, [nggCoreControl]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NggCoreControlDirective),\n multi: true,\n },\n ],\n})\nexport class NggCoreControlDirective\n implements ControlValueAccessor, AfterViewInit\n{\n private control?: NgControl\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private injector: Injector,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngAfterViewInit() {\n this.control = this.injector.get(NgControl)\n\n this.control.statusChanges?.subscribe(() => {\n this.updateControlState()\n })\n\n this.control.valueChanges?.subscribe(() => {\n this.updateControlState()\n })\n\n // Update on submit\n const form = this.el.nativeElement.form\n if (form) {\n form.addEventListener('submit', () => {\n this.control?.control?.markAsTouched()\n this.updateControlState()\n })\n }\n\n this.updateControlState()\n }\n\n private updateControlState() {\n const control = this.control?.control\n if (control) {\n this.renderer.setProperty(\n this.el.nativeElement,\n 'invalid',\n (control.dirty || control.touched) && control.invalid,\n )\n }\n }\n\n // ControlValueAccessor implementation\n writeValue(value: any): void {\n this.renderer.setProperty(this.el.nativeElement, 'value', value)\n }\n\n registerOnChange(fn: (_: any) => void): void {\n this.el.nativeElement.addEventListener('input', (event: any) => {\n fn(event.target.value)\n this.cdr.markForCheck()\n })\n }\n\n registerOnTouched(fn: any): void {\n this.el.nativeElement.addEventListener('blur', fn)\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.renderer.setProperty(this.el.nativeElement, 'disabled', isDisabled)\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { NggCoreControlDirective } from './core-control.directive'\n\n@NgModule({\n declarations: [NggCoreControlDirective],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [NggCoreControlDirective],\n})\nexport class NggCoreFormsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAUa,eAAe,GAAG,IAAI,cAAc,CAAS,iBAAiB,EAAC;MAa/D,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CAAoB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAH1C,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAE,CAAA;AACzB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAA;KAEsB;IAEvC,eAAe,GAAA;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AAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,6BAA6B,CAAC;AACtD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;MCfY,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,iBAJd,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC5B,YAAY,EAAE,mBAAmB,aACjC,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAEtB,kBAAkB,EAAA,OAAA,EAAA,CAHnB,YAAY,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGhC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;oBAC5C,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-lib-shared.mjs","sources":["../../../../libs/angular/src/lib/shared/on-scroll.directive.ts","../../../../libs/angular/src/lib/shared/shared.module.ts","../../../../libs/angular/src/lib/shared/core-renderer/core-renderer.ts","../../../../libs/angular/src/lib/shared/core-element/core-element.directive.ts","../../../../libs/angular/src/lib/shared/core-element/core-element.module.ts","../../../../libs/angular/src/lib/shared/core-control/core-control.directive.ts","../../../../libs/angular/src/lib/shared/core-control/core-control.module.ts","../../../../libs/angular/src/lib/shared/sebgroup-green-angular-src-lib-shared.ts"],"sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n InjectionToken,\n OnDestroy,\n} from '@angular/core'\nimport { fromEvent, interval, Subject } from 'rxjs'\nimport { takeUntil, throttle } from 'rxjs/operators'\n\nexport const ON_SCROLL_TOKEN = new InjectionToken<string>('ON_SCROLL_TOKEN')\n\n@Directive({\n selector: '[nggOnScroll]',\n providers: [\n {\n provide: ON_SCROLL_TOKEN,\n useFactory: (component: NggOnScrollDirective): Subject<unknown> =>\n component?.onScroll$,\n deps: [NggOnScrollDirective],\n },\n ],\n})\nexport class NggOnScrollDirective implements AfterViewInit, OnDestroy {\n onScroll$ = new Subject()\n destroy$ = new Subject()\n\n constructor(private elementRef: ElementRef) {}\n\n public ngAfterViewInit(): void {\n if (this.elementRef) {\n fromEvent(this.elementRef?.nativeElement, 'scroll')\n .pipe(\n takeUntil(this.destroy$),\n throttle(() => interval(30)),\n )\n .subscribe(() => {\n this.onScroll$.next(null) // Changes: added null due to TS error\n })\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next(null)\n this.destroy$.complete()\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\n\nimport { NggOnScrollDirective } from './on-scroll.directive'\n\n@NgModule({\n declarations: [NggOnScrollDirective],\n imports: [CommonModule],\n exports: [NggOnScrollDirective],\n})\nexport class NggSharedModule {}\n","import {\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n} from '@angular/animations/browser'\nimport {\n Injectable,\n NgZone,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n} from '@angular/core'\nimport { ɵDomRendererFactory2 as DomRendererFactory2 } from '@angular/platform-browser'\n\nimport { getScopedTagName } from '@sebgroup/green-core/scoping'\n\nexport class NggCoreRenderer implements Renderer2 {\n constructor(private delegate: Renderer2) {}\n\n createElement(name: string, namespace?: string | null): any {\n const scopedName = name.startsWith('gds-') ? getScopedTagName(name) : name\n return this.delegate.createElement(scopedName, namespace)\n }\n\n // Delegate all other methods to the original renderer\n addClass(el: any, name: string): void {\n return this.delegate.addClass(el, name)\n }\n get data(): { [key: string]: any } {\n return this.delegate.data\n }\n destroy(): void {\n return this.delegate.destroy()\n }\n createComment(value: string) {\n return this.delegate.createComment(value)\n }\n createText(value: string) {\n return this.delegate.createText(value)\n }\n destroyNode: ((node: any) => void) | null = (node) =>\n this.delegate.destroyNode && this.delegate.destroyNode(node)\n appendChild(parent: any, newChild: any): void {\n return this.delegate.appendChild(parent, newChild)\n }\n insertBefore(\n parent: any,\n newChild: any,\n refChild: any,\n isMove?: boolean | undefined,\n ): void {\n return this.delegate.insertBefore(parent, newChild, refChild, isMove)\n }\n removeChild(\n parent: any,\n oldChild: any,\n isHostElement?: boolean | undefined,\n ): void {\n return this.delegate.removeChild(parent, oldChild, isHostElement)\n }\n selectRootElement(\n selectorOrNode: any,\n preserveContent?: boolean | undefined,\n ) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent)\n }\n parentNode(node: any) {\n return this.delegate.parentNode(node)\n }\n nextSibling(node: any) {\n return this.delegate.nextSibling(node)\n }\n setAttribute(\n el: any,\n name: string,\n value: string,\n namespace?: string | null | undefined,\n ): void {\n return this.delegate.setAttribute(el, name, value, namespace)\n }\n removeAttribute(\n el: any,\n name: string,\n namespace?: string | null | undefined,\n ): void {\n return this.delegate.removeAttribute(el, name, namespace)\n }\n removeClass(el: any, name: string): void {\n return this.delegate.removeClass(el, name)\n }\n setStyle(\n el: any,\n style: string,\n value: any,\n flags?: RendererStyleFlags2 | undefined,\n ): void {\n return this.delegate.setStyle(el, style, value, flags)\n }\n removeStyle(\n el: any,\n style: string,\n flags?: RendererStyleFlags2 | undefined,\n ): void {\n return this.delegate.removeStyle(el, style, flags)\n }\n setProperty(el: any, name: string, value: any): void {\n return this.delegate.setProperty(el, name, value)\n }\n setValue(node: any, value: string): void {\n return this.delegate.setValue(node, value)\n }\n listen(\n target: any,\n eventName: string,\n callback: (event: any) => boolean | void,\n ): () => void {\n return this.delegate.listen(target, eventName, callback)\n }\n}\n\n@Injectable()\nexport class NggCoreRendererFactory implements RendererFactory2 {\n constructor(private delegate: DomRendererFactory2) {}\n\n createRenderer(element: any, type: RendererType2 | null): Renderer2 {\n const renderer = this.delegate.createRenderer(element, type)\n return new NggCoreRenderer(renderer)\n }\n}\n\n/**\n * Returns a AnimationRendererFactory configured to use the NggCoreRendererFactory as a delegate.\n */\nexport function animationsCoreRendererFactory(\n delegate: DomRendererFactory2,\n engine: AnimationEngine,\n zone: NgZone,\n) {\n const crf = new NggCoreRendererFactory(delegate)\n return new AnimationRendererFactory(crf, engine, zone)\n}\n\n/**\n * Provide the NggCoreRendererFactory to use <gds-*> elements without any extra directives.\n * The NggCoreRenderer will handle element name scoping automatically.\n *\n * Example:\n * ```ts\n * @NgModule({\n * providers: [provideCoreRenderer()],\n * schemas: [CUSTOM_ELEMENTS_SCHEMA],\n * })\n * export class AppModule {}\n * ```\n */\nexport const provideCoreRenderer = () => ({\n provide: RendererFactory2,\n useClass: NggCoreRendererFactory,\n})\n\n/**\n * Provide the NggCoreRendererFactory to use <gds-*> elements without any extra directives.\n * The NggCoreRenderer will handle element name scoping automatically.\n *\n * This factory also provides the Angular animations renderer.\n *\n *\n * Example:\n * ```ts\n * @NgModule({\n * imports: [BrowserAnimationsModule],\n * providers: [provideCoreRendererWithAnimations()],\n * schemas: [CUSTOM_ELEMENTS_SCHEMA],\n * })\n * export class AppModule {}\n * ```\n */\nexport const provideCoreRendererWithAnimations = () => ({\n provide: RendererFactory2,\n useFactory: animationsCoreRendererFactory,\n deps: [DomRendererFactory2, AnimationEngine, NgZone],\n})\n","import { DOCUMENT } from '@angular/common'\nimport {\n ChangeDetectorRef,\n Directive,\n EmbeddedViewRef,\n inject,\n OnInit,\n Renderer2,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core'\n\nimport { getScopedTagName } from '@sebgroup/green-core/scoping'\nimport { NggCoreRenderer } from '../core-renderer'\n\n@Directive({\n selector: '[nggCoreElement]',\n})\nexport class NggCoreElementDirective implements OnInit {\n private viewRef: EmbeddedViewRef<any> | null = null\n private readonly document = inject(DOCUMENT)\n private readonly renderer = inject(Renderer2)\n private readonly vcr = inject(ViewContainerRef)\n private readonly cdr = inject(ChangeDetectorRef)\n private readonly template = inject(TemplateRef<any>)\n\n ngOnInit() {\n if (!(this.renderer instanceof NggCoreRenderer)) {\n this.vcr.clear()\n\n const originalCreateElement = this.renderer.createElement\n this.renderer.createElement = (name: string, _namespace: string) => {\n return this.document.createElement(getScopedTagName(name))\n }\n\n this.cdr.markForCheck()\n this.viewRef = this.vcr.createEmbeddedView(this.template)\n this.renderer.createElement = originalCreateElement\n }\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\n\nimport { NggCoreElementDirective } from './core-element.directive'\n\n@NgModule({\n declarations: [NggCoreElementDirective],\n imports: [CommonModule],\n exports: [NggCoreElementDirective],\n})\nexport class NggCoreWrapperModule {}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Injector,\n Renderer2,\n} from '@angular/core'\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n Validators,\n} from '@angular/forms'\n\n@Directive({\n selector:\n 'gds-input, gds-textarea, gds-dropdown, gds-datepicker, gds-select, [nggCoreControl]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NggCoreControlDirective),\n multi: true,\n },\n ],\n})\nexport class NggCoreControlDirective\n implements ControlValueAccessor, AfterViewInit\n{\n private control?: NgControl\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private injector: Injector,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngAfterViewInit() {\n this.control = this.injector.get(NgControl)\n\n this.control.statusChanges?.subscribe(() => {\n this.updateControlState()\n })\n\n this.control.valueChanges?.subscribe(() => {\n this.updateControlState()\n })\n\n // Update on submit\n const form = this.el.nativeElement.form\n if (form) {\n form.addEventListener('submit', () => {\n this.control?.control?.markAsTouched()\n this.updateControlState()\n })\n }\n\n this.updateControlState()\n }\n\n private updateControlState() {\n const control = this.control?.control\n if (control) {\n this.renderer.setProperty(\n this.el.nativeElement,\n 'invalid',\n (control.dirty || control.touched) && control.invalid,\n )\n }\n }\n\n // ControlValueAccessor implementation\n writeValue(value: any): void {\n this.renderer.setProperty(this.el.nativeElement, 'value', value)\n }\n\n registerOnChange(fn: (_: any) => void): void {\n this.el.nativeElement.addEventListener('input', (event: any) => {\n fn(event.target.value)\n this.cdr.markForCheck()\n })\n }\n\n registerOnTouched(fn: any): void {\n this.el.nativeElement.addEventListener('blur', fn)\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.renderer.setProperty(this.el.nativeElement, 'disabled', isDisabled)\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { NggCoreControlDirective } from './core-control.directive'\n\n@NgModule({\n declarations: [NggCoreControlDirective],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [NggCoreControlDirective],\n})\nexport class NggCoreFormsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["AnimationRendererFactory","DomRendererFactory2","AnimationEngine"],"mappings":";;;;;;;;;;;MAUa,eAAe,GAAG,IAAI,cAAc,CAAS,iBAAiB,EAAC;MAa/D,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CAAoB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAH1C,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAE,CAAA;AACzB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAA;KAEsB;IAEvC,eAAe,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,SAAS,CAAC,IAAI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A,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;oBAC5C,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -164,11 +164,11 @@ class NggvInputComponent extends NggvBaseControlValueAccessorComponent {
|
|
|
164
164
|
this.inputChange$.next(this.state);
|
|
165
165
|
}
|
|
166
166
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
167
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvInputComponent, selector: "nggv-input", inputs: { thook: "thook", type: "type", placeholder: "placeholder", autocomplete: "autocomplete", readonly: "readonly", email: "email", min: "min", max: "max", step: "step", minLength: "minLength", minlength: "minlength", maxLength: "maxLength", maxlength: "maxlength", showCharacterCountdown: "showCharacterCountdown", pattern: "pattern", debounceTime: "debounceTime", inputMask: "inputMask" }, outputs: { nggvInput: "nggvInput" }, host: { properties: { "class": "this.class", "attr.data-thook": "this.thook" } }, usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n title=\"\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n title=\"\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host *{box-sizing:border-box}:host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:1rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span{font-weight:500}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%;line-height:18px;font-size:1rem;font-family:inherit}:host .gds-input-wrapper{position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s;border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host .gds-input-wrapper *,:host .gds-input-wrapper *:before,:host .gds-input-wrapper *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group-prefix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-right-radius:0!important;border-bottom-right-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-prefix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-prefix{min-width:initial}}:host .gds-input-wrapper .input-group-prefix:empty{display:none}:host .gds-input-wrapper .input-group-suffix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-suffix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-suffix{min-width:initial}}:host .gds-input-wrapper .input-group-suffix:empty{display:none}:host .gds-input-wrapper .input-group{width:100%}:host .gds-input-wrapper .input-group input{outline:none;min-height:2.5rem;height:2.625rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%}:host .gds-input-wrapper .input-group input *,:host .gds-input-wrapper .input-group input *:before,:host .gds-input-wrapper .input-group input *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group input:hover{border-color:#41b0ee}:host .gds-input-wrapper .input-group input:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .gds-input-wrapper .input-group input:active{border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]::placeholder{color:#cecece}:host .gds-input-wrapper .input-group input:not(:focus){border-right:none;padding-right:0}:host .gds-input-wrapper .input-group input:focus{padding-right:0}:host .gds-input-wrapper:has(.input-group-prefix:not(:empty)) .input-group input{border-bottom-left-radius:0;border-top-left-radius:0}:host .gds-input-wrapper:has(.input-group-suffix:not(:empty)) .input-group input{border-bottom-right-radius:0;border-top-right-radius:0}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .gds-field-label--optional{font-weight:400}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.CharacterCountdownDirective, selector: "[nggvCharacterCountdown]", inputs: ["nggvCharacterCountdown", "nggvCharacterCountdownCurrentLength"] }, { kind: "directive", type: i6.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
|
|
167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvInputComponent, selector: "nggv-input", inputs: { thook: "thook", type: "type", placeholder: "placeholder", autocomplete: "autocomplete", readonly: "readonly", email: "email", min: "min", max: "max", step: "step", minLength: "minLength", minlength: "minlength", maxLength: "maxLength", maxlength: "maxlength", showCharacterCountdown: "showCharacterCountdown", pattern: "pattern", debounceTime: "debounceTime", inputMask: "inputMask" }, outputs: { nggvInput: "nggvInput" }, host: { properties: { "class": "this.class", "attr.data-thook": "this.thook" } }, usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n title=\"\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n title=\"\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host *{box-sizing:border-box}:host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:.5rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span,:host.gds-form-item .gds-form-item__footer:not(:empty)>.form-info{font-weight:500;line-height:1.125}:host.gds-form-item .gds-form-item__footer:not(:empty) .form-info{font-weight:500}:host.gds-form-item .gds-form-item__footer:not(:empty) .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host.gds-form-item .gds-form-item__footer:not(:empty) .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host.gds-form-item .gds-form-item__footer:not(:empty)>.form-info--countdown{font-weight:400}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%;line-height:18px;font-size:1rem;font-family:inherit}:host .gds-input-wrapper{position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s;border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host .gds-input-wrapper *,:host .gds-input-wrapper *:before,:host .gds-input-wrapper *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group-prefix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-right-radius:0!important;border-bottom-right-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-prefix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-prefix{min-width:initial}}:host .gds-input-wrapper .input-group-prefix:empty{display:none}:host .gds-input-wrapper .input-group-suffix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-suffix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-suffix{min-width:initial}}:host .gds-input-wrapper .input-group-suffix:empty{display:none}:host .gds-input-wrapper .input-group{width:100%}:host .gds-input-wrapper .input-group input{outline:none;min-height:2.5rem;height:2.625rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%}:host .gds-input-wrapper .input-group input *,:host .gds-input-wrapper .input-group input *:before,:host .gds-input-wrapper .input-group input *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group input:hover{border-color:#41b0ee}:host .gds-input-wrapper .input-group input:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .gds-input-wrapper .input-group input:active{border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]::placeholder{color:#cecece}:host .gds-input-wrapper .input-group input:not(:focus){border-right:none;padding-right:0}:host .gds-input-wrapper .input-group input:focus{padding-right:0}:host .gds-input-wrapper:has(.input-group-prefix:not(:empty)) .input-group input{border-bottom-left-radius:0;border-top-left-radius:0}:host .gds-input-wrapper:has(.input-group-suffix:not(:empty)) .input-group input{border-bottom-right-radius:0;border-top-right-radius:0}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .gds-field-label--optional{font-weight:400}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.CharacterCountdownDirective, selector: "[nggvCharacterCountdown]", inputs: ["nggvCharacterCountdown", "nggvCharacterCountdownCurrentLength"] }, { kind: "directive", type: i6.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
|
|
168
168
|
}
|
|
169
169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvInputComponent, decorators: [{
|
|
170
170
|
type: Component,
|
|
171
|
-
args: [{ selector: 'nggv-input', template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n title=\"\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n title=\"\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host *{box-sizing:border-box}:host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:1rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span{font-weight:500}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%;line-height:18px;font-size:1rem;font-family:inherit}:host .gds-input-wrapper{position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s;border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host .gds-input-wrapper *,:host .gds-input-wrapper *:before,:host .gds-input-wrapper *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group-prefix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-right-radius:0!important;border-bottom-right-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-prefix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-prefix{min-width:initial}}:host .gds-input-wrapper .input-group-prefix:empty{display:none}:host .gds-input-wrapper .input-group-suffix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-suffix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-suffix{min-width:initial}}:host .gds-input-wrapper .input-group-suffix:empty{display:none}:host .gds-input-wrapper .input-group{width:100%}:host .gds-input-wrapper .input-group input{outline:none;min-height:2.5rem;height:2.625rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%}:host .gds-input-wrapper .input-group input *,:host .gds-input-wrapper .input-group input *:before,:host .gds-input-wrapper .input-group input *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group input:hover{border-color:#41b0ee}:host .gds-input-wrapper .input-group input:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .gds-input-wrapper .input-group input:active{border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]::placeholder{color:#cecece}:host .gds-input-wrapper .input-group input:not(:focus){border-right:none;padding-right:0}:host .gds-input-wrapper .input-group input:focus{padding-right:0}:host .gds-input-wrapper:has(.input-group-prefix:not(:empty)) .input-group input{border-bottom-left-radius:0;border-top-left-radius:0}:host .gds-input-wrapper:has(.input-group-suffix:not(:empty)) .input-group input{border-bottom-right-radius:0;border-top-right-radius:0}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .gds-field-label--optional{font-weight:400}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}\n"] }]
|
|
171
|
+
args: [{ selector: 'nggv-input', template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n title=\"\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n title=\"\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host *{box-sizing:border-box}:host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:.5rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span,:host.gds-form-item .gds-form-item__footer:not(:empty)>.form-info{font-weight:500;line-height:1.125}:host.gds-form-item .gds-form-item__footer:not(:empty) .form-info{font-weight:500}:host.gds-form-item .gds-form-item__footer:not(:empty) .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host.gds-form-item .gds-form-item__footer:not(:empty) .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host.gds-form-item .gds-form-item__footer:not(:empty)>.form-info--countdown{font-weight:400}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%;line-height:18px;font-size:1rem;font-family:inherit}:host .gds-input-wrapper{position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s;border:1px solid #868686;border-radius:4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;height:2.625rem;display:flex}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host .gds-input-wrapper *,:host .gds-input-wrapper *:before,:host .gds-input-wrapper *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group-prefix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-right-radius:0!important;border-bottom-right-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-prefix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-prefix{min-width:initial}}:host .gds-input-wrapper .input-group-prefix:empty{display:none}:host .gds-input-wrapper .input-group-suffix{min-height:2.5rem;border:none;border-radius:3px;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;display:flex;align-items:center;justify-content:center}:host .gds-input-wrapper .input-group-suffix[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .gds-input-wrapper .input-group-suffix{min-width:initial}}:host .gds-input-wrapper .input-group-suffix:empty{display:none}:host .gds-input-wrapper .input-group{width:100%}:host .gds-input-wrapper .input-group input{outline:none;min-height:2.5rem;height:2.625rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%}:host .gds-input-wrapper .input-group input *,:host .gds-input-wrapper .input-group input *:before,:host .gds-input-wrapper .input-group input *:after{box-sizing:border-box}:host .gds-input-wrapper .input-group input:hover{border-color:#41b0ee}:host .gds-input-wrapper .input-group input:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .gds-input-wrapper .input-group input:active{border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .gds-input-wrapper .input-group input[disabled]::placeholder{color:#cecece}:host .gds-input-wrapper .input-group input:not(:focus){border-right:none;padding-right:0}:host .gds-input-wrapper .input-group input:focus{padding-right:0}:host .gds-input-wrapper:has(.input-group-prefix:not(:empty)) .input-group input{border-bottom-left-radius:0;border-top-left-radius:0}:host .gds-input-wrapper:has(.input-group-suffix:not(:empty)) .input-group input{border-bottom-right-radius:0;border-top-right-radius:0}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .gds-field-label--optional{font-weight:400}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}\n"] }]
|
|
172
172
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
173
173
|
type: Self
|
|
174
174
|
}, {
|