@sebgroup/green-angular 5.10.0 → 5.11.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/shared/core-control/index.mjs +2 -1
- package/esm2022/src/lib/shared/core-control/index.mjs +2 -1
- package/esm2022/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +5 -2
- package/esm2022/src/v-angular/datepicker/components/date-input/date-input.component.mjs +3 -4
- package/esm2022/src/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.mjs +5 -2
- package/esm2022/src/v-angular/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/src/v-angular/input/input.component.mjs +3 -3
- package/esm2022/src/v-angular/textarea/textarea.component.mjs +3 -3
- package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +5 -2
- package/esm2022/v-angular/datepicker/components/date-input/date-input.component.mjs +3 -4
- package/esm2022/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.mjs +5 -2
- package/esm2022/v-angular/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/v-angular/input/input.component.mjs +3 -3
- package/esm2022/v-angular/textarea/textarea.component.mjs +3 -3
- package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs +4 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-datepicker.mjs +6 -3
- package/fesm2022/sebgroup-green-angular-src-v-angular-datepicker.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.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-textarea.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +16 -10
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular.mjs +1 -1
- package/lib/shared/core-control/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/lib/shared/core-control/index.d.ts +1 -0
- package/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +5 -1
- package/src/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.d.ts +5 -1
- package/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +5 -1
- package/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.d.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs","sources":["../../../../libs/angular/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.ts","../../../../libs/angular/src/v-angular/base-control-value-accessor/base-control-value-accessor.module.ts","../../../../libs/angular/src/v-angular/base-control-value-accessor/sebgroup-green-angular-src-v-angular-base-control-value-accessor.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Injectable,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n} from '@angular/core'\nimport {\n AbstractControl,\n ControlValueAccessor,\n NgControl,\n ValidationErrors,\n Validator,\n Validators,\n} from '@angular/forms'\nimport { TRANSLOCO_SCOPE, TranslocoScope } from '@jsverse/transloco'\nimport { Observable, Subject } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n@Injectable() // Workaround for Compodoc https://github.com/compodoc/compodoc/issues/984\n@Component({ template: '' }) // Required with Angular ivy compiler\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class NggvBaseControlValueAccessorComponent\n implements AfterViewInit, OnInit, OnDestroy, ControlValueAccessor, Validator\n{\n /** Custom template for displaying the content of the label.\n * Specified by nesting an `<ng-template #labelTpl>Custom Label</ng-template>`.\n */\n @ContentChild('labelTpl', { read: TemplateRef })\n labelContentTpl?: TemplateRef<undefined>\n\n /** Reference to the native child input element. */\n @ViewChild('input', { read: ElementRef }) inputRef?: ElementRef\n\n /* ATTRIBUTES */\n\n /** Id of the host element and is accessible by the children, automatically generated if not provided. */\n @HostBinding('attr.id') @Input() id = (window as any).nggv?.nextId()\n /** Name of the child input element. */\n @Input() name?: string\n /**\n * Label of the child input element using the default template.\n * Can be overwritten by specifying an `<ng-template #labelTpl>Custom Label</ng-template>`.\n */\n @Input() label?: string\n /** Role of the child input element. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles */\n @Input() role?: string\n /** Value of the child input element. Mostly used in conjunction with radio and checkboxes. */\n @Input() value: any\n /** An error string to be shown under invalid inputs. Overwrites any form errors. */\n @Input() error?: string\n /** @deprecated Only one error should be shown under each field. */\n @Input() errorList?: string[]\n /** @deprecated Icon is always added before error. */\n @Input() withErrorIcon?: boolean = false\n /** Description of the child input element. Both visibly and as `aria-label`. */\n @Input() description?: string\n /** Determines if the label used to display the \"description\" text will be rendered to DOM */\n @Input() descriptionIsVisible = true\n /** If set to true, the browser will try to automatically set focus to the child input element. */\n @Input() autofocus = false\n /** Deafult value of the child input element. Used when resetting child element. */\n @Input() defaultValue?: any\n /** If passed, the component will listen for updates and will reset its value. */\n @Input() reset?: Observable<any>\n /** Adds (Optional) to input label. */\n @Input() optional?: boolean | null | undefined\n\n private _locked: boolean | null | undefined = undefined\n /** Hides the input borders and displays current value as a text. */\n @Input() set locked(value: boolean | null | undefined) {\n this._locked = value\n this.cdr.detectChanges()\n }\n get locked(): boolean | null | undefined {\n return this._locked\n }\n /** If set to true, using a controls disabled state will display input as locked. */\n @Input() displayDisabledAsLocked?: boolean | null | undefined\n\n /* STATES */\n\n private _required: boolean | null | undefined = undefined\n /** Override the required flag of the component. */\n @Input() set required(value: boolean | null | undefined) {\n this._required = value\n }\n /** Child input element is considered required and changes default label template accordingly. */\n get required(): boolean | null | undefined {\n // if required is set => return required\n if (this._required !== undefined) return this._required\n\n // if required can be determined from the control => return control.required\n if (this.ngControl?.control?.validator) {\n const validator = this.ngControl?.control?.validator(\n {} as AbstractControl,\n )\n // returns true for any error that starts with required\n return Object.keys(validator ?? {}).some((key) =>\n key.startsWith('required'),\n )\n }\n\n return\n }\n\n private _invalid: boolean | undefined = undefined\n /** Override the invalid state of the component. */\n @Input() set invalid(value: boolean) {\n this._invalid = value\n }\n /** The component has the invalid state, usually decorating the elements red and shows the first error. */\n get invalid(): boolean {\n if (this._invalid === true || this._invalid === false) return this._invalid\n return (\n !!this.ngControl?.control?.invalid && this.ngControl?.control?.touched\n )\n }\n\n private _valid: boolean | undefined = undefined\n /** Override the valid state of the component. */\n @Input() set valid(value: boolean) {\n this._valid = value\n }\n /** The component has the valid state, usually decorating the elements green. */\n get valid(): boolean {\n if (this._valid === true || this._valid === false) return this._valid\n return !!this.ngControl?.control?.valid && this.ngControl?.control?.touched\n }\n\n /** The component has the focused state, updated by the child input element's focus state. */\n @Input() focused = false\n\n private _disabled: boolean | undefined = undefined\n /** Override the disabled state of the component. */\n @Input() set disabled(value: boolean) {\n this._disabled = value\n }\n /** The component has the disabled state, usually muting the colors and removes interaction. */\n get disabled(): boolean {\n if (this._disabled === true || this._disabled === false)\n return this._disabled\n return !!this.ngControl?.control?.disabled\n }\n\n /* TRIGGERS */\n\n /** Emits focus events triggered by the child elements. */\n @Output() readonly nggvFocus = new EventEmitter()\n /** Emits focus events triggered by the child elements. */\n @Output() readonly nggvBlur = new EventEmitter()\n\n /* VALUE HANDLERS */\n\n private _state: any = null\n /** @internal */\n protected onChange = (_: any) => {\n // do nothing\n }\n /** @internal */\n protected onTouched = () => {\n // do nothing\n }\n /** @internal */\n protected onValidatorChange: () => void = () => null\n\n /* OTHER VARIABLES */\n scope: string | undefined\n\n /* LIFE CYCLE VARIABLES */\n\n private _onDestroy$ = new Subject<boolean>()\n\n /**\n * Creates a new BaseControlValueAccessorComponent.\n * @param ngControl optional FormControl provided when component is used in a form, through dependency injection.\n * @param translocoScope optional TranslocoScope provided if component is used within a scope.\n */\n constructor(\n @Self() @Optional() public ngControl: NgControl,\n @Optional()\n @Inject(TRANSLOCO_SCOPE)\n protected translocoScope: TranslocoScope,\n protected cdr: ChangeDetectorRef,\n ) {\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this\n }\n\n if (this.translocoScope) this.scope = this.translocoScope.toString()\n }\n\n // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n ngOnInit(): void {\n if (this.ngControl && this.ngControl.control) {\n this.ngControl.control.setValidators(\n Validators.compose([this.ngControl.control.validator, this.validate]),\n )\n }\n\n // if reset observable has been passed, subscribe after updates\n this.reset?.pipe(takeUntil(this._onDestroy$)).subscribe({\n next: () => {\n // reset value of controller\n this.state = this.defaultValue\n this.onChange(this.state)\n this.cdr.detectChanges()\n },\n })\n }\n\n // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n ngAfterViewInit(): void {\n // if default value is set, then don't alter it. Otherwise, use\n // current value of controller after initiation as default value\n this.defaultValue = this.defaultValue ?? this.ngControl?.value\n }\n\n ngOnDestroy(): void {\n this._onDestroy$.next(true)\n this._onDestroy$.complete()\n }\n\n detectChanges(): void {\n this.cdr.detectChanges()\n }\n\n /** @internal */\n onFocus(event: Event) {\n event.stopPropagation\n ? event.stopPropagation()\n : (event.cancelBubble = true)\n this.focused = true\n this.nggvFocus.emit(event)\n }\n\n /** @internal */\n onBlur(event: Event) {\n event.stopPropagation\n ? event.stopPropagation()\n : (event.cancelBubble = true)\n this.onTouched()\n this.focused = false\n this.nggvBlur.emit(event)\n }\n\n /** Sets the focus on the actual input element. */\n setFocus() {\n if (this.inputRef) this.inputRef.nativeElement.focus()\n }\n\n // ----------------------------------------------------------------------------\n // CONTROL VALUE ACCESSOR\n // ----------------------------------------------------------------------------\n\n /** Internal state/value that the native input element has. */\n get state() {\n return this._state\n }\n\n /** Internal state/value that the native input element has. */\n set state(value) {\n if (typeof value === 'undefined') value = null\n this._state = value\n }\n\n /** Writes a new value to the child input element. */\n writeValue(value: any): void {\n this.state = value\n }\n\n /** Registers a callback function that is called when the child input element's value changes. */\n registerOnChange(fn: (_: any) => object): void {\n this.onChange = fn\n }\n\n /** Registers a callback function that is called when the child input element triggers on blur. */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n /** Function that is called by the forms API when the control status changes to or from 'DISABLED'. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n\n // if displayDisabledAsLocked is enabled - update locked state based on disabled state\n if (this.displayDisabledAsLocked) {\n this.locked = isDisabled\n }\n }\n\n // ----------------------------------------------------------------------------\n // VALIDATORS\n // ----------------------------------------------------------------------------\n\n /** Method that performs synchronous validation against the provided control. Used for internal validation. */\n validate(_control: AbstractControl): { [name: string]: any } | null {\n return null\n }\n\n /** Registers a callback function to call when the validator inputs change. */\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn\n }\n\n // ----------------------------------------------------------------------------\n // HELPERS\n // ----------------------------------------------------------------------------\n\n /** Returns the first entry in an error object. */\n get firstError(): { code: string; params: any } | null {\n const errors: ValidationErrors | null = this.ngControl.errors\n if (!errors) return null\n const code: string = Object.keys(errors)[0]\n return { code, params: errors[code] }\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { NggvBaseControlValueAccessorComponent } from './base-control-value-accessor.component'\n\n@NgModule({\n declarations: [NggvBaseControlValueAccessorComponent],\n imports: [],\n exports: [NggvBaseControlValueAccessorComponent],\n})\nexport class NggvBaseControlValueAccessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAiCA;MACa,qCAAqC,CAAA;;IAgDhD,IAAa,MAA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A,CAAA;sBAAb,KAAK;gBAEG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBAIO,MAAM,EAAA,CAAA;sBAAlB,KAAK;gBAQG,uBAAuB,EAAA,CAAA;sBAA/B,KAAK;gBAMO,QAAQ,EAAA,CAAA;sBAApB,KAAK;gBAwBO,OAAO,EAAA,CAAA;sBAAnB,KAAK;gBAaO,KAAK,EAAA,CAAA;sBAAjB,KAAK;gBAUG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAIO,QAAQ,EAAA,CAAA;sBAApB,KAAK;gBAaa,SAAS,EAAA,CAAA;sBAA3B,MAAM;gBAEY,QAAQ,EAAA,CAAA;sBAA1B,MAAM;;;MCzJI,kCAAkC,CAAA;+GAAlC,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAlC,kCAAkC,EAAA,YAAA,EAAA,CAJ9B,qCAAqC,CAAA,EAAA,OAAA,EAAA,CAE1C,qCAAqC,CAAA,EAAA,CAAA,CAAA,EAAA;gHAEpC,kCAAkC,EAAA,CAAA,CAAA,EAAA;;4FAAlC,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAL9C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qCAAqC,CAAC;AACrD,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,qCAAqC,CAAC;AACjD,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs","sources":["../../../../libs/angular/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.ts","../../../../libs/angular/src/v-angular/base-control-value-accessor/base-control-value-accessor.module.ts","../../../../libs/angular/src/v-angular/base-control-value-accessor/sebgroup-green-angular-src-v-angular-base-control-value-accessor.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Injectable,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n} from '@angular/core'\nimport {\n AbstractControl,\n ControlValueAccessor,\n NgControl,\n ValidationErrors,\n Validator,\n Validators,\n} from '@angular/forms'\nimport { TRANSLOCO_SCOPE, TranslocoScope } from '@jsverse/transloco'\nimport { Observable, Subject } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n@Injectable() // Workaround for Compodoc https://github.com/compodoc/compodoc/issues/984\n@Component({ template: '' }) // Required with Angular ivy compiler\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class NggvBaseControlValueAccessorComponent\n implements AfterViewInit, OnInit, OnDestroy, ControlValueAccessor, Validator\n{\n /** Custom template for displaying the content of the label.\n * Specified by nesting an `<ng-template #labelTpl>Custom Label</ng-template>`.\n */\n @ContentChild('labelTpl', { read: TemplateRef })\n labelContentTpl?: TemplateRef<undefined>\n\n /** Custom template for displaying value when the input is locked.\n * Specified by nesting an `<ng-template #lockedTpl let-state>Custom locked content state: {{ state }}</ng-template>`.\n */\n @ContentChild('lockedTpl', { read: TemplateRef })\n lockedTpl?: TemplateRef<undefined>\n\n /** Reference to the native child input element. */\n @ViewChild('input', { read: ElementRef }) inputRef?: ElementRef\n\n /* ATTRIBUTES */\n\n /** Id of the host element and is accessible by the children, automatically generated if not provided. */\n @HostBinding('attr.id') @Input() id = (window as any).nggv?.nextId()\n /** Name of the child input element. */\n @Input() name?: string\n /**\n * Label of the child input element using the default template.\n * Can be overwritten by specifying an `<ng-template #labelTpl>Custom Label</ng-template>`.\n */\n @Input() label?: string\n /** Role of the child input element. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles */\n @Input() role?: string\n /** Value of the child input element. Mostly used in conjunction with radio and checkboxes. */\n @Input() value: any\n /** An error string to be shown under invalid inputs. Overwrites any form errors. */\n @Input() error?: string\n /** @deprecated Only one error should be shown under each field. */\n @Input() errorList?: string[]\n /** @deprecated Icon is always added before error. */\n @Input() withErrorIcon?: boolean = false\n /** Description of the child input element. Both visibly and as `aria-label`. */\n @Input() description?: string\n /** Determines if the label used to display the \"description\" text will be rendered to DOM */\n @Input() descriptionIsVisible = true\n /** If set to true, the browser will try to automatically set focus to the child input element. */\n @Input() autofocus = false\n /** Deafult value of the child input element. Used when resetting child element. */\n @Input() defaultValue?: any\n /** If passed, the component will listen for updates and will reset its value. */\n @Input() reset?: Observable<any>\n /** Adds (Optional) to input label. */\n @Input() optional?: boolean | null | undefined\n\n private _locked: boolean | null | undefined = undefined\n /** Hides the input borders and displays current value as a text. */\n @Input() set locked(value: boolean | null | undefined) {\n this._locked = value\n this.cdr.detectChanges()\n }\n get locked(): boolean | null | undefined {\n return this._locked\n }\n /** If set to true, using a controls disabled state will display input as locked. */\n @Input() displayDisabledAsLocked?: boolean | null | undefined\n\n /* STATES */\n\n private _required: boolean | null | undefined = undefined\n /** Override the required flag of the component. */\n @Input() set required(value: boolean | null | undefined) {\n this._required = value\n }\n /** Child input element is considered required and changes default label template accordingly. */\n get required(): boolean | null | undefined {\n // if required is set => return required\n if (this._required !== undefined) return this._required\n\n // if required can be determined from the control => return control.required\n if (this.ngControl?.control?.validator) {\n const validator = this.ngControl?.control?.validator(\n {} as AbstractControl,\n )\n // returns true for any error that starts with required\n return Object.keys(validator ?? {}).some((key) =>\n key.startsWith('required'),\n )\n }\n\n return\n }\n\n private _invalid: boolean | undefined = undefined\n /** Override the invalid state of the component. */\n @Input() set invalid(value: boolean) {\n this._invalid = value\n }\n /** The component has the invalid state, usually decorating the elements red and shows the first error. */\n get invalid(): boolean {\n if (this._invalid === true || this._invalid === false) return this._invalid\n return (\n !!this.ngControl?.control?.invalid && this.ngControl?.control?.touched\n )\n }\n\n private _valid: boolean | undefined = undefined\n /** Override the valid state of the component. */\n @Input() set valid(value: boolean) {\n this._valid = value\n }\n /** The component has the valid state, usually decorating the elements green. */\n get valid(): boolean {\n if (this._valid === true || this._valid === false) return this._valid\n return !!this.ngControl?.control?.valid && this.ngControl?.control?.touched\n }\n\n /** The component has the focused state, updated by the child input element's focus state. */\n @Input() focused = false\n\n private _disabled: boolean | undefined = undefined\n /** Override the disabled state of the component. */\n @Input() set disabled(value: boolean) {\n this._disabled = value\n }\n /** The component has the disabled state, usually muting the colors and removes interaction. */\n get disabled(): boolean {\n if (this._disabled === true || this._disabled === false)\n return this._disabled\n return !!this.ngControl?.control?.disabled\n }\n\n /* TRIGGERS */\n\n /** Emits focus events triggered by the child elements. */\n @Output() readonly nggvFocus = new EventEmitter()\n /** Emits focus events triggered by the child elements. */\n @Output() readonly nggvBlur = new EventEmitter()\n\n /* VALUE HANDLERS */\n\n private _state: any = null\n /** @internal */\n protected onChange = (_: any) => {\n // do nothing\n }\n /** @internal */\n protected onTouched = () => {\n // do nothing\n }\n /** @internal */\n protected onValidatorChange: () => void = () => null\n\n /* OTHER VARIABLES */\n scope: string | undefined\n\n /* LIFE CYCLE VARIABLES */\n\n private _onDestroy$ = new Subject<boolean>()\n\n /**\n * Creates a new BaseControlValueAccessorComponent.\n * @param ngControl optional FormControl provided when component is used in a form, through dependency injection.\n * @param translocoScope optional TranslocoScope provided if component is used within a scope.\n */\n constructor(\n @Self() @Optional() public ngControl: NgControl,\n @Optional()\n @Inject(TRANSLOCO_SCOPE)\n protected translocoScope: TranslocoScope,\n protected cdr: ChangeDetectorRef,\n ) {\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this\n }\n\n if (this.translocoScope) this.scope = this.translocoScope.toString()\n }\n\n // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n ngOnInit(): void {\n if (this.ngControl && this.ngControl.control) {\n this.ngControl.control.setValidators(\n Validators.compose([this.ngControl.control.validator, this.validate]),\n )\n }\n\n // if reset observable has been passed, subscribe after updates\n this.reset?.pipe(takeUntil(this._onDestroy$)).subscribe({\n next: () => {\n // reset value of controller\n this.state = this.defaultValue\n this.onChange(this.state)\n this.cdr.detectChanges()\n },\n })\n }\n\n // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n ngAfterViewInit(): void {\n // if default value is set, then don't alter it. Otherwise, use\n // current value of controller after initiation as default value\n this.defaultValue = this.defaultValue ?? this.ngControl?.value\n }\n\n ngOnDestroy(): void {\n this._onDestroy$.next(true)\n this._onDestroy$.complete()\n }\n\n detectChanges(): void {\n this.cdr.detectChanges()\n }\n\n /** @internal */\n onFocus(event: Event) {\n event.stopPropagation\n ? event.stopPropagation()\n : (event.cancelBubble = true)\n this.focused = true\n this.nggvFocus.emit(event)\n }\n\n /** @internal */\n onBlur(event: Event) {\n event.stopPropagation\n ? event.stopPropagation()\n : (event.cancelBubble = true)\n this.onTouched()\n this.focused = false\n this.nggvBlur.emit(event)\n }\n\n /** Sets the focus on the actual input element. */\n setFocus() {\n if (this.inputRef) this.inputRef.nativeElement.focus()\n }\n\n // ----------------------------------------------------------------------------\n // CONTROL VALUE ACCESSOR\n // ----------------------------------------------------------------------------\n\n /** Internal state/value that the native input element has. */\n get state() {\n return this._state\n }\n\n /** Internal state/value that the native input element has. */\n set state(value) {\n if (typeof value === 'undefined') value = null\n this._state = value\n }\n\n /** Writes a new value to the child input element. */\n writeValue(value: any): void {\n this.state = value\n }\n\n /** Registers a callback function that is called when the child input element's value changes. */\n registerOnChange(fn: (_: any) => object): void {\n this.onChange = fn\n }\n\n /** Registers a callback function that is called when the child input element triggers on blur. */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n /** Function that is called by the forms API when the control status changes to or from 'DISABLED'. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n\n // if displayDisabledAsLocked is enabled - update locked state based on disabled state\n if (this.displayDisabledAsLocked) {\n this.locked = isDisabled\n }\n }\n\n // ----------------------------------------------------------------------------\n // VALIDATORS\n // ----------------------------------------------------------------------------\n\n /** Method that performs synchronous validation against the provided control. Used for internal validation. */\n validate(_control: AbstractControl): { [name: string]: any } | null {\n return null\n }\n\n /** Registers a callback function to call when the validator inputs change. */\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn\n }\n\n // ----------------------------------------------------------------------------\n // HELPERS\n // ----------------------------------------------------------------------------\n\n /** Returns the first entry in an error object. */\n get firstError(): { code: string; params: any } | null {\n const errors: ValidationErrors | null = this.ngControl.errors\n if (!errors) return null\n const code: string = Object.keys(errors)[0]\n return { code, params: errors[code] }\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { NggvBaseControlValueAccessorComponent } from './base-control-value-accessor.component'\n\n@NgModule({\n declarations: [NggvBaseControlValueAccessorComponent],\n imports: [],\n exports: [NggvBaseControlValueAccessorComponent],\n})\nexport class NggvBaseControlValueAccessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAiCA;MACa,qCAAqC,CAAA;;IAsDhD,IAAa,MAAM,CAAC,KAAiC,EAAA;AACnD,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;AACpB,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAA;KACzB;AACD,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;;IAQD,IAAa,QAAQ,CAAC,KAAiC,EAAA;AACrD,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;KACvB;;AAED,IAAA,IAAI,QAAQ,GAAA;;AAEV,QAAA,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS,CAAA;;QAGvD,IAAI,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE;AACtC,YAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,CAClD,EAAqB,CACtB,CAAA;;YAED,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,I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AA;sBAApB,KAAK;gBAEG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBAEG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBAIO,MAAM,EAAA,CAAA;sBAAlB,KAAK;gBAQG,uBAAuB,EAAA,CAAA;sBAA/B,KAAK;gBAMO,QAAQ,EAAA,CAAA;sBAApB,KAAK;gBAwBO,OAAO,EAAA,CAAA;sBAAnB,KAAK;gBAaO,KAAK,EAAA,CAAA;sBAAjB,KAAK;gBAUG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAIO,QAAQ,EAAA,CAAA;sBAApB,KAAK;gBAaa,SAAS,EAAA,CAAA;sBAA3B,MAAM;gBAEY,QAAQ,EAAA,CAAA;sBAA1B,MAAM;;;MC/JI,kCAAkC,CAAA;+GAAlC,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAlC,kCAAkC,EAAA,YAAA,EAAA,CAJ9B,qCAAqC,CAAA,EAAA,OAAA,EAAA,CAE1C,qCAAqC,CAAA,EAAA,CAAA,CAAA,EAAA;gHAEpC,kCAAkC,EAAA,CAAA,CAAA,EAAA;;4FAAlC,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAL9C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qCAAqC,CAAC;AACrD,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,qCAAqC,CAAC;AACjD,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -626,7 +626,7 @@ class DateControlValueAccessorComponent {
|
|
|
626
626
|
this.cdr.detectChanges();
|
|
627
627
|
}
|
|
628
628
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateControlValueAccessorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
629
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DateControlValueAccessorComponent, inputs: { id: "id", name: "name", label: "label", placeholder: "placeholder", dateCharacters: "dateCharacters", role: "role", value: "value", error: "error", errorList: "errorList", withErrorIcon: "withErrorIcon", description: "description", autofocus: "autofocus", defaultValue: "defaultValue", reset: "reset", optional: "optional", dateInputMask: "dateInputMask", locked: "locked", displayDisabledAsLocked: "displayDisabledAsLocked", required: "required", invalid: "invalid", valid: "valid", focused: "focused", disabled: "disabled", locale: "locale", dateFormat: "dateFormat", dateLocale: "dateLocale" }, outputs: { ngvFocus: "ngvFocus", ngvBlur: "ngvBlur" }, host: { properties: { "attr.id": "this.id" } }, queries: [{ propertyName: "labelContentTpl", first: true, predicate: ["labelTpl"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0 }); }
|
|
629
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DateControlValueAccessorComponent, inputs: { id: "id", name: "name", label: "label", placeholder: "placeholder", dateCharacters: "dateCharacters", role: "role", value: "value", error: "error", errorList: "errorList", withErrorIcon: "withErrorIcon", description: "description", autofocus: "autofocus", defaultValue: "defaultValue", reset: "reset", optional: "optional", dateInputMask: "dateInputMask", locked: "locked", displayDisabledAsLocked: "displayDisabledAsLocked", required: "required", invalid: "invalid", valid: "valid", focused: "focused", disabled: "disabled", locale: "locale", dateFormat: "dateFormat", dateLocale: "dateLocale" }, outputs: { ngvFocus: "ngvFocus", ngvBlur: "ngvBlur" }, host: { properties: { "attr.id": "this.id" } }, queries: [{ propertyName: "labelContentTpl", first: true, predicate: ["labelTpl"], descendants: true, read: TemplateRef }, { propertyName: "lockedTpl", first: true, predicate: ["lockedTpl"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0 }); }
|
|
630
630
|
}
|
|
631
631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateControlValueAccessorComponent, decorators: [{
|
|
632
632
|
type: Directive
|
|
@@ -642,6 +642,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
642
642
|
}] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2.TranslocoService }], propDecorators: { labelContentTpl: [{
|
|
643
643
|
type: ContentChild,
|
|
644
644
|
args: ['labelTpl', { read: TemplateRef }]
|
|
645
|
+
}], lockedTpl: [{
|
|
646
|
+
type: ContentChild,
|
|
647
|
+
args: ['lockedTpl', { read: TemplateRef }]
|
|
645
648
|
}], inputRef: [{
|
|
646
649
|
type: ViewChild,
|
|
647
650
|
args: ['input', { read: ElementRef }]
|
|
@@ -1652,11 +1655,11 @@ class DateInputComponent extends DateControlValueAccessorComponent {
|
|
|
1652
1655
|
});
|
|
1653
1656
|
}
|
|
1654
1657
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i2.TranslocoService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DateInputComponent, selector: "nggv-dateinput,nggv-input[type=date]", inputs: { thook: "thook", type: "type", readonly: "readonly", disableDates: "disableDates", disableWeekDays: "disableWeekDays", minRows: "minRows", firstValid: "firstValid", lastValid: "lastValid", closingTime: "closingTime", firstDayOfWeek: "firstDayOfWeek", closeCalendarOnEscape: "closeCalendarOnEscape" }, host: { listeners: { "keydown": "keyListener($event)" }, properties: { "attr.data-thook": "this.thook" } }, viewQueries: [{ propertyName: "toggleButtonRef", first: true, predicate: ["toggleCalendarButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\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\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\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 {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n <gds-icon-calendar\n *nggCoreElement\n width=\"20\"\n height=\"20\"\n ></gds-icon-calendar>\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{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 .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i3.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "component", type: DatepickerComponent, selector: "nggv-datepicker", inputs: ["firstDayOfWeek", "disableDates", "disableWeekDays", "minCalendarRows", "selected", "locale", "type", "firstValid", "lastValid", "closingTime"], outputs: ["ngvDateChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
|
|
1658
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DateInputComponent, selector: "nggv-dateinput,nggv-input[type=date]", inputs: { thook: "thook", type: "type", readonly: "readonly", disableDates: "disableDates", disableWeekDays: "disableWeekDays", minRows: "minRows", firstValid: "firstValid", lastValid: "lastValid", closingTime: "closingTime", firstDayOfWeek: "firstDayOfWeek", closeCalendarOnEscape: "closeCalendarOnEscape" }, host: { listeners: { "keydown": "keyListener($event)" }, properties: { "attr.data-thook": "this.thook" } }, viewQueries: [{ propertyName: "toggleButtonRef", first: true, predicate: ["toggleCalendarButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\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\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\n {{ description }}\n </div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\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 {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n <gds-icon-calendar\n *nggCoreElement\n width=\"20\"\n height=\"20\"\n ></gds-icon-calendar>\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{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 .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i3.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "component", type: DatepickerComponent, selector: "nggv-datepicker", inputs: ["firstDayOfWeek", "disableDates", "disableWeekDays", "minCalendarRows", "selected", "locale", "type", "firstValid", "lastValid", "closingTime"], outputs: ["ngvDateChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
|
|
1656
1659
|
}
|
|
1657
1660
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateInputComponent, decorators: [{
|
|
1658
1661
|
type: Component,
|
|
1659
|
-
args: [{ selector: 'nggv-dateinput,nggv-input[type=date]', template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\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\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\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 {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n <gds-icon-calendar\n *nggCoreElement\n width=\"20\"\n height=\"20\"\n ></gds-icon-calendar>\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{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 .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}\n"] }]
|
|
1662
|
+
args: [{ selector: 'nggv-dateinput,nggv-input[type=date]', template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\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\n class=\"gds-field-label--small description hide-if-empty\"\n *ngIf=\"description\"\n >\n {{ description }}\n </div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\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 {{ state | nggvInputMaskFormat: dateInputMask }}\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- INPUT WRAPPER -->\n <ng-container *ngIf=\"!locked\">\n <div\n class=\"field-wrap\"\n [class.nggv-field--error]=\"invalid\"\n *ngIf=\"showInput$ | async\"\n >\n <!-- INPUT FIELD -->\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"nggv-field-date\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [nggvInputMask]=\"dateInputMask\"\n [value]=\"state\"\n title=\"\"\n (change)=\"onValueChange($event.target)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n <button\n aria-label=\"toggle calendar\"\n #toggleCalendarButton\n class=\"nggv-button-date\"\n type=\"button\"\n data-thook=\"toggle-calendar-button\"\n (click)=\"toggleDatepicker()\"\n [disabled]=\"disabled\"\n >\n <gds-icon-calendar\n *nggCoreElement\n width=\"20\"\n height=\"20\"\n ></gds-icon-calendar>\n </button>\n </div>\n\n <!-- DATEPICKER -->\n <div class=\"nggv-datepicker\" *ngIf=\"shown\">\n <nggv-datepicker\n #input\n [type]=\"type\"\n [disableDates]=\"disableDates\"\n [disableWeekDays]=\"disableWeekDays\"\n [selected]=\"state\"\n [locale]=\"locale\"\n [minCalendarRows]=\"minRows\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [firstValid]=\"firstValid\"\n [lastValid]=\"lastValid\"\n [closingTime]=\"closingTime\"\n (ngvDateChange)=\"onDateChange($event)\"\n >\n <ng-content></ng-content>\n </nggv-datepicker>\n </div>\n\n <!-- ERRORS -->\n <ng-container\n *ngIf=\"\n invalid &&\n (error || ngControl?.invalid) &&\n (!errorList || !errorList.length)\n \"\n >\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n </label>\n </ng-container>\n\n <ng-container *ngFor=\"let error of errorList ?? []\">\n <label\n class=\"gds-field-notice gds-field-notice--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && error\"\n >\n <span class=\"error-item\">\n <span class=\"error-item--icon\">\n <gds-icon-triangle-exclamation\n *nggCoreElement\n [solid]=\"true\"\n width=\"16\"\n height=\"16\"\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n class=\"error-item--text\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n </label>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:block;position:relative}@media (max-width: 47.98em){:host{min-width:100%}}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label{display:block}:host .gds-field-label:is(label){margin-bottom:0}:host .gds-field-label.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label.form-control:focus,:host .gds-field-label.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label+input,:host .gds-field-label+textarea,fieldset :host .gds-field-label+div,:host .gds-field-label+button,:host .gds-field-label+.group-stepper,:host .gds-field-label+.stepper-wrapper,:host .gds-field-label+.group{margin-top:.5rem}:host .gds-field-label+.form-info{margin-bottom:.5rem}:host label+.field-wrap,:host label+.nggv-field--locked{margin-top:.5rem}:host .description{font-size:.875rem;margin-bottom:.5rem;line-height:1.25rem;width:100%}:host .gds-field-label--optional:is(label){margin-bottom:0}:host .gds-field-label--optional.form-control{width:fit-content}@supports (-moz-appearance: none){:host .gds-field-label--optional.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host .gds-field-label--optional.form-control:focus,:host .gds-field-label--optional.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host .gds-field-label--optional:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host .gds-field-label--optional+input,:host .gds-field-label--optional+textarea,fieldset :host .gds-field-label--optional+div,:host .gds-field-label--optional+button,:host .gds-field-label--optional+.group-stepper,:host .gds-field-label--optional+.stepper-wrapper,:host .gds-field-label--optional+.group{margin-top:.5rem}:host .gds-field-label--optional+.form-info{margin-bottom:.5rem}:host .nggv-datepicker{margin-top:.25rem;position:absolute}:host .nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .nggv-field--error:focus,:host .nggv-field--error:active,:host .nggv-field--error:hover{border-bottom:.125rem solid #9f000a!important}:host .error-item{display:flex;gap:.5rem;color:#9f000a}:host .gds-field-notice{margin-top:.5rem;display:block;font-size:.875rem;line-height:1;font-weight:500}:host .field-wrap{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 .field-wrap *,:host .field-wrap *:before,:host .field-wrap *:after{box-sizing:border-box}:host .field-wrap .nggv-button-date{--text-disabled-color: #adadad;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);font-weight:500;min-height:2.75rem;align-items:center;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;border-color:#333;color:#333;--color: rgb(51, 51, 51);background-color:transparent;min-height:2.5rem;border:none;border-radius:3px;width:2.625rem;height:2.625rem;min-width:2.625rem;border-top-left-radius:0!important;border-bottom-left-radius:0!important;text-align:right}:host .field-wrap .nggv-button-date:focus:not(:focus-visible){box-shadow:none;outline:0}:host .field-wrap .nggv-button-date:focus,:host .field-wrap .nggv-button-date:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:100%}}@media screen and (-ms-high-contrast: active){:host .field-wrap .nggv-button-date{border:2px solid currentcolor}}:host .field-wrap .nggv-button-date.small{min-height:2rem;padding:.4375rem .75rem;line-height:1rem}:host .field-wrap .nggv-button-date.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host .field-wrap .nggv-button-date:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected=true],:host .field-wrap .nggv-button-date:active,:host .field-wrap .nggv-button-date.active,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333}:host .field-wrap .nggv-button-date[aria-selected]:hover,:host .field-wrap .nggv-button-date.active:hover,:host .field-wrap .nggv-button-date:active:hover{opacity:.9}:host .field-wrap .nggv-button-date:focus-visible{background-color:#333;color:#fff;--background: rgb(51, 51, 51);--color: rgb(255, 255, 255);border-color:#333!important}:host .field-wrap .nggv-button-date:disabled,:host .field-wrap .nggv-button-date.disabled,:host .field-wrap .nggv-button-date[aria-disabled=true]{color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host .field-wrap .nggv-button-date:disabled::placeholder,:host .field-wrap .nggv-button-date.disabled::placeholder,:host .field-wrap .nggv-button-date[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}@media (max-width: 47.98em){:host .field-wrap .nggv-button-date{width:2.625rem;height:2.625rem}}:host .field-wrap .nggv-button-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-button-date[disabled]{background-color:#f8f8f8!important;color:#adadad}@media (max-width: 35.98em){:host .field-wrap .nggv-button-date{min-width:initial}}:host .field-wrap input[type=text]::-webkit-inner-spin-button,:host .field-wrap input[type=text]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;font-size:1rem;font-family:inherit}:host .field-wrap .nggv-field-date{border:1px solid #cecece;border-radius:4px 0 0 4px;outline:none;box-sizing:border-box;min-height:2.75rem;line-height:1.5;font-size:1rem;font-family:inherit;border:none;min-height:2.375rem;width:100%;padding-left:1rem}:host .field-wrap .nggv-field-date *,:host .field-wrap .nggv-field-date *:before,:host .field-wrap .nggv-field-date *:after{box-sizing:border-box}:host .field-wrap .nggv-field-date:hover{border-color:#41b0ee}:host .field-wrap .nggv-field-date:focus{outline-color:#1a1a1a;outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host .field-wrap .nggv-field-date:active{border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]{background-color:#f8f8f8;border-color:#cecece}:host .field-wrap .nggv-field-date[disabled]::placeholder{color:#cecece}:host .field-wrap .nggv-field-date:not(:focus){border-right:none;padding-right:0}:host .field-wrap .nggv-field-date:focus{padding-right:0}\n"] }]
|
|
1660
1663
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1661
1664
|
type: Self
|
|
1662
1665
|
}, {
|