@vsn-ux/ngx-gaia 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, inject, ElementRef, input, numberAttribute, computed,
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, inject, ElementRef, HostAttributeToken, input, numberAttribute, computed, ViewEncapsulation, Component, NgModule, Injectable, booleanAttribute, ChangeDetectionStrategy, output, contentChild, forwardRef, Injector, signal, linkedSignal, Directive, model, HostListener, TemplateRef, NgZone, HostBinding, Input, DOCUMENT, effect, DestroyRef, afterNextRender, Renderer2, afterEveryRender, contentChildren, viewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from 'lucide-angular';
|
|
4
4
|
import { LucideAngularModule, X, CircleCheck, TriangleAlert, OctagonAlert, Info, Check, Minus, ChevronUp, ChevronDown } from 'lucide-angular';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, NgControl, NG_VALIDATORS, CheckboxRequiredValidator, RequiredValidator } from '@angular/forms';
|
|
6
|
-
import * as i1$
|
|
7
|
-
import { Overlay, OverlayRef, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
|
|
6
|
+
import * as i1$5 from '@angular/cdk/overlay';
|
|
7
|
+
import { Overlay, createRepositionScrollStrategy, OverlayRef, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
|
|
8
8
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
9
9
|
import { Subject, takeUntil, map, merge, filter, Observable, isObservable } from 'rxjs';
|
|
10
10
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
11
11
|
import { NgTemplateOutlet } from '@angular/common';
|
|
12
12
|
import * as i1$1 from '@angular/cdk/menu';
|
|
13
|
-
import { CdkMenu, CdkMenuItem, CdkMenuTrigger } from '@angular/cdk/menu';
|
|
13
|
+
import { CdkMenu, CdkMenuItem, CdkMenuTrigger, MENU_SCROLL_STRATEGY } from '@angular/cdk/menu';
|
|
14
14
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
15
15
|
import { Router, ResolveStart } from '@angular/router';
|
|
16
16
|
import * as i1$2 from '@angular/cdk/a11y';
|
|
17
17
|
import { CdkTrapFocus } from '@angular/cdk/a11y';
|
|
18
|
-
import * as i1$3 from '@angular/cdk/
|
|
18
|
+
import * as i1$3 from '@angular/cdk/scrolling';
|
|
19
|
+
import { CdkScrollable } from '@angular/cdk/scrolling';
|
|
20
|
+
import * as i1$4 from '@angular/cdk/listbox';
|
|
19
21
|
import { CdkOption, CdkListbox } from '@angular/cdk/listbox';
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -35,6 +37,9 @@ const GA_ICON_DEFAULT_SIZE = 24;
|
|
|
35
37
|
class GaIconComponent {
|
|
36
38
|
elementRef = inject(ElementRef);
|
|
37
39
|
baseFontSize = inject(GA_BASE_FONT_SIZE);
|
|
40
|
+
ariaHiddenAttr = inject(new HostAttributeToken('aria-hidden'), {
|
|
41
|
+
optional: true,
|
|
42
|
+
});
|
|
38
43
|
icon = input.required();
|
|
39
44
|
size = input(GA_ICON_DEFAULT_SIZE);
|
|
40
45
|
color = input();
|
|
@@ -48,12 +53,12 @@ class GaIconComponent {
|
|
|
48
53
|
}
|
|
49
54
|
return size;
|
|
50
55
|
});
|
|
51
|
-
constructor(
|
|
52
|
-
if (!ariaHiddenAttr) {
|
|
56
|
+
constructor() {
|
|
57
|
+
if (!this.ariaHiddenAttr) {
|
|
53
58
|
this.elementRef.nativeElement.setAttribute('aria-hidden', 'true');
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaIconComponent, deps: [
|
|
61
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
62
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: GaIconComponent, isStandalone: true, selector: "ga-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "style": "{ '--ga-icon-size': sizeWithDimension() }" }, classAttribute: "ga-icon" }, ngImport: i0, template: `<lucide-icon
|
|
58
63
|
[name]="icon()"
|
|
59
64
|
[color]="color()"
|
|
@@ -71,10 +76,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
71
76
|
role: 'img',
|
|
72
77
|
'[style]': "{ '--ga-icon-size': sizeWithDimension() }",
|
|
73
78
|
}, encapsulation: ViewEncapsulation.None, styles: [".ga-icon{display:inline-block;vertical-align:middle;-webkit-user-select:none;user-select:none;width:fit-content;height:fit-content}.ga-icon lucide-icon>svg{width:var(--ga-icon-size);height:var(--ga-icon-size)}\n"] }]
|
|
74
|
-
}], ctorParameters: () => [
|
|
75
|
-
type: Attribute,
|
|
76
|
-
args: ['aria-hidden']
|
|
77
|
-
}] }] });
|
|
79
|
+
}], ctorParameters: () => [] });
|
|
78
80
|
|
|
79
81
|
class GaIconModule {
|
|
80
82
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -542,11 +544,14 @@ const CHECKBOX_CONTROL_VALUE_ACCESSOR = {
|
|
|
542
544
|
// Inspired by @angular/components
|
|
543
545
|
let nextUniqueId$8 = 0;
|
|
544
546
|
class GaCheckboxComponent {
|
|
545
|
-
tabindex;
|
|
546
547
|
/** @ignore */
|
|
547
548
|
_uniqueId = `ga-checkbox-${++nextUniqueId$8}`;
|
|
548
549
|
/** @ignore */
|
|
549
550
|
injector = inject(Injector);
|
|
551
|
+
/** @ignore */
|
|
552
|
+
tabindex = inject(new HostAttributeToken('tabindex'), {
|
|
553
|
+
optional: true,
|
|
554
|
+
});
|
|
550
555
|
icons = { Minus, Check };
|
|
551
556
|
/** @ignore */
|
|
552
557
|
_onTouched;
|
|
@@ -594,11 +599,6 @@ class GaCheckboxComponent {
|
|
|
594
599
|
? this.ariaInvalid() === 'true'
|
|
595
600
|
: this._invalidNgModel();
|
|
596
601
|
});
|
|
597
|
-
constructor(
|
|
598
|
-
/** @ignore */
|
|
599
|
-
tabindex) {
|
|
600
|
-
this.tabindex = tabindex;
|
|
601
|
-
}
|
|
602
602
|
ngDoCheck() {
|
|
603
603
|
const ngControl = this.injector.get(NgControl, null, { self: true });
|
|
604
604
|
if (ngControl) {
|
|
@@ -643,7 +643,7 @@ class GaCheckboxComponent {
|
|
|
643
643
|
this._onModelChanged?.(this.checkedModel());
|
|
644
644
|
this.change.emit(this.checkedModel());
|
|
645
645
|
}
|
|
646
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaCheckboxComponent, deps: [
|
|
646
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
647
647
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: GaCheckboxComponent, isStandalone: true, selector: "ga-checkbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, nameInput: { classPropertyName: "nameInput", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, ariaErrormessage: { classPropertyName: "ariaErrormessage", publicName: "aria-errormessage", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change", indeterminateChange: "indeterminateChange" }, host: { properties: { "class.ga-checkbox--invalid": "invalid()", "attr.id": "null", "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.aria-invalid": "null", "attr.aria-errormessage": "null" }, classAttribute: "ga-checkbox" }, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"ga-checkbox__native\"\n [attr.id]=\"inputId()\"\n [name]=\"name()\"\n [checked]=\"checkedModel()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"disabledModel()\"\n [required]=\"required()\"\n [attr.value]=\"value()\"\n [attr.tabindex]=\"tabindex\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [attr.aria-errormessage]=\"ariaErrormessage()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n/>\n<div class=\"ga-checkbox__marker\">\n <lucide-icon\n [img]=\"icons.Check\"\n class=\"ga-checkbox__marker__indicator-checked\"\n [size]=\"12\"\n [strokeWidth]=\"2\"\n [absoluteStrokeWidth]=\"true\"\n />\n <lucide-icon\n [img]=\"icons.Minus\"\n class=\"ga-checkbox__marker__indicator-indeterminate\"\n [size]=\"12\"\n [strokeWidth]=\"2\"\n [absoluteStrokeWidth]=\"true\"\n />\n</div>\n\n<label class=\"ga-checkbox__label\" [attr.for]=\"inputId()\"\n ><ng-content></ng-content\n></label>\n", dependencies: [{ kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
648
648
|
}
|
|
649
649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaCheckboxComponent, decorators: [{
|
|
@@ -659,10 +659,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
659
659
|
'[attr.aria-invalid]': 'null',
|
|
660
660
|
'[attr.aria-errormessage]': 'null',
|
|
661
661
|
}, template: "<input\n type=\"checkbox\"\n class=\"ga-checkbox__native\"\n [attr.id]=\"inputId()\"\n [name]=\"name()\"\n [checked]=\"checkedModel()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"disabledModel()\"\n [required]=\"required()\"\n [attr.value]=\"value()\"\n [attr.tabindex]=\"tabindex\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [attr.aria-errormessage]=\"ariaErrormessage()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n/>\n<div class=\"ga-checkbox__marker\">\n <lucide-icon\n [img]=\"icons.Check\"\n class=\"ga-checkbox__marker__indicator-checked\"\n [size]=\"12\"\n [strokeWidth]=\"2\"\n [absoluteStrokeWidth]=\"true\"\n />\n <lucide-icon\n [img]=\"icons.Minus\"\n class=\"ga-checkbox__marker__indicator-indeterminate\"\n [size]=\"12\"\n [strokeWidth]=\"2\"\n [absoluteStrokeWidth]=\"true\"\n />\n</div>\n\n<label class=\"ga-checkbox__label\" [attr.for]=\"inputId()\"\n ><ng-content></ng-content\n></label>\n" }]
|
|
662
|
-
}]
|
|
663
|
-
type: Attribute,
|
|
664
|
-
args: ['tabindex']
|
|
665
|
-
}] }] });
|
|
662
|
+
}] });
|
|
666
663
|
|
|
667
664
|
const GA_CHECKBOX_REQUIRED_VALIDATOR = {
|
|
668
665
|
provide: NG_VALIDATORS,
|
|
@@ -681,6 +678,7 @@ class GaCheckboxRequiredValidator extends CheckboxRequiredValidator {
|
|
|
681
678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaCheckboxRequiredValidator, decorators: [{
|
|
682
679
|
type: Directive,
|
|
683
680
|
args: [{
|
|
681
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
684
682
|
selector: `ga-checkbox[required][formControlName], ga-checkbox[required][formControl], ga-checkbox[required][ngModel]`,
|
|
685
683
|
providers: [GA_CHECKBOX_REQUIRED_VALIDATOR],
|
|
686
684
|
}]
|
|
@@ -925,6 +923,7 @@ class GaInputDirective {
|
|
|
925
923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaInputDirective, decorators: [{
|
|
926
924
|
type: Component,
|
|
927
925
|
args: [{
|
|
926
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
928
927
|
selector: '[gaInput]',
|
|
929
928
|
template: '',
|
|
930
929
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1384,11 +1383,11 @@ class GaFieldLabelComponent {
|
|
|
1384
1383
|
}
|
|
1385
1384
|
}
|
|
1386
1385
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaFieldLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1387
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaFieldLabelComponent, isStandalone: true, selector: "ga-label", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "definition", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<label\n [attr.id]=\"uniqueId\"\n [attr.for]=\"controlId()\"\n class=\"ga-form-field__label\"\n [class.ga-form-field__label--defined]=\"!!definition()\"\n [class.ga-form-field__label--disabled]=\"\n !!formField.formControl()?._formControlDisabled()\n \"\n (click)=\"focusControl()\"\n [attr.tabindex]=\"definition() ? 0 : -1\"\n>\n <span\n class=\"ga-form-field__label-text\"\n [gaTooltip]=\"definition()\"\n gaTooltipPlacement=\"top-start\"\n ><ng-content\n /></span>\n @if (state()) {\n <span class=\"ga-form-field__label-state\">{{ state() }}</span>\n }\n</label>\n", dependencies: [{ kind: "ngmodule", type: GaTooltipModule }, { kind: "directive", type: GaTooltipDirective, selector: "[gaTooltip]", inputs: ["gaTooltip", "gaTooltipDisabled", "gaTooltipControlMode", "gaTooltipShowControlMode", "gaTooltipHideControlMode", "gaTooltipOffsetSize", "gaTooltipPlacement"], exportAs: ["gaTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1386
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaFieldLabelComponent, isStandalone: true, selector: "ga-label", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "definition", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n<label\n [attr.id]=\"uniqueId\"\n [attr.for]=\"controlId()\"\n class=\"ga-form-field__label\"\n [class.ga-form-field__label--defined]=\"!!definition()\"\n [class.ga-form-field__label--disabled]=\"\n !!formField.formControl()?._formControlDisabled()\n \"\n (click)=\"focusControl()\"\n [attr.tabindex]=\"definition() ? 0 : -1\"\n>\n <span\n class=\"ga-form-field__label-text\"\n [gaTooltip]=\"definition()\"\n gaTooltipPlacement=\"top-start\"\n ><ng-content\n /></span>\n @if (state()) {\n <span class=\"ga-form-field__label-state\">{{ state() }}</span>\n }\n</label>\n", dependencies: [{ kind: "ngmodule", type: GaTooltipModule }, { kind: "directive", type: GaTooltipDirective, selector: "[gaTooltip]", inputs: ["gaTooltip", "gaTooltipDisabled", "gaTooltipControlMode", "gaTooltipShowControlMode", "gaTooltipHideControlMode", "gaTooltipOffsetSize", "gaTooltipPlacement"], exportAs: ["gaTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1388
1387
|
}
|
|
1389
1388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaFieldLabelComponent, decorators: [{
|
|
1390
1389
|
type: Component,
|
|
1391
|
-
args: [{ selector: 'ga-label', imports: [GaTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n [attr.id]=\"uniqueId\"\n [attr.for]=\"controlId()\"\n class=\"ga-form-field__label\"\n [class.ga-form-field__label--defined]=\"!!definition()\"\n [class.ga-form-field__label--disabled]=\"\n !!formField.formControl()?._formControlDisabled()\n \"\n (click)=\"focusControl()\"\n [attr.tabindex]=\"definition() ? 0 : -1\"\n>\n <span\n class=\"ga-form-field__label-text\"\n [gaTooltip]=\"definition()\"\n gaTooltipPlacement=\"top-start\"\n ><ng-content\n /></span>\n @if (state()) {\n <span class=\"ga-form-field__label-state\">{{ state() }}</span>\n }\n</label>\n" }]
|
|
1390
|
+
args: [{ selector: 'ga-label', imports: [GaTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n<label\n [attr.id]=\"uniqueId\"\n [attr.for]=\"controlId()\"\n class=\"ga-form-field__label\"\n [class.ga-form-field__label--defined]=\"!!definition()\"\n [class.ga-form-field__label--disabled]=\"\n !!formField.formControl()?._formControlDisabled()\n \"\n (click)=\"focusControl()\"\n [attr.tabindex]=\"definition() ? 0 : -1\"\n>\n <span\n class=\"ga-form-field__label-text\"\n [gaTooltip]=\"definition()\"\n gaTooltipPlacement=\"top-start\"\n ><ng-content\n /></span>\n @if (state()) {\n <span class=\"ga-form-field__label-state\">{{ state() }}</span>\n }\n</label>\n" }]
|
|
1392
1391
|
}] });
|
|
1393
1392
|
|
|
1394
1393
|
class GaFieldInfoComponent {
|
|
@@ -1516,7 +1515,15 @@ class GaMenuTriggerDirective {
|
|
|
1516
1515
|
});
|
|
1517
1516
|
}
|
|
1518
1517
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1519
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: GaMenuTriggerDirective, isStandalone: true, selector: "[gaMenuTrigger]", inputs: { menuRef: { classPropertyName: "menuRef", publicName: "gaMenuTrigger", isSignal: true, isRequired: true, transformFunction: null } },
|
|
1518
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: GaMenuTriggerDirective, isStandalone: true, selector: "[gaMenuTrigger]", inputs: { menuRef: { classPropertyName: "menuRef", publicName: "gaMenuTrigger", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
1519
|
+
{
|
|
1520
|
+
provide: MENU_SCROLL_STRATEGY,
|
|
1521
|
+
useFactory: () => {
|
|
1522
|
+
const injector = inject(Injector);
|
|
1523
|
+
return () => createRepositionScrollStrategy(injector);
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
], exportAs: ["gaMenuTrigger"], hostDirectives: [{ directive: i1$1.CdkMenuTrigger, outputs: ["cdkMenuOpened", "gaMenuOpened", "cdkMenuClosed", "gaMenuClosed"] }], ngImport: i0 });
|
|
1520
1527
|
}
|
|
1521
1528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaMenuTriggerDirective, decorators: [{
|
|
1522
1529
|
type: Directive,
|
|
@@ -1530,6 +1537,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1530
1537
|
outputs: ['cdkMenuOpened: gaMenuOpened', 'cdkMenuClosed: gaMenuClosed'],
|
|
1531
1538
|
},
|
|
1532
1539
|
],
|
|
1540
|
+
providers: [
|
|
1541
|
+
{
|
|
1542
|
+
provide: MENU_SCROLL_STRATEGY,
|
|
1543
|
+
useFactory: () => {
|
|
1544
|
+
const injector = inject(Injector);
|
|
1545
|
+
return () => createRepositionScrollStrategy(injector);
|
|
1546
|
+
},
|
|
1547
|
+
},
|
|
1548
|
+
],
|
|
1533
1549
|
}]
|
|
1534
1550
|
}], ctorParameters: () => [] });
|
|
1535
1551
|
|
|
@@ -1628,7 +1644,7 @@ class GaModalService {
|
|
|
1628
1644
|
return this.openModalsAtThisLevel;
|
|
1629
1645
|
}
|
|
1630
1646
|
open(component, ...args) {
|
|
1631
|
-
|
|
1647
|
+
const [data] = args;
|
|
1632
1648
|
const overlayRef = this.createOverlay();
|
|
1633
1649
|
return this.attachContent(component, data, overlayRef);
|
|
1634
1650
|
}
|
|
@@ -1890,10 +1906,13 @@ class GaModalTitleDirective {
|
|
|
1890
1906
|
renderer = inject(Renderer2);
|
|
1891
1907
|
elementRef = inject(ElementRef);
|
|
1892
1908
|
modalRef = inject(GaModalRef);
|
|
1909
|
+
idAttribute = inject(new HostAttributeToken('id'), {
|
|
1910
|
+
optional: true,
|
|
1911
|
+
});
|
|
1893
1912
|
id;
|
|
1894
|
-
constructor(
|
|
1895
|
-
if (
|
|
1896
|
-
this.id =
|
|
1913
|
+
constructor() {
|
|
1914
|
+
if (this.idAttribute) {
|
|
1915
|
+
this.id = this.idAttribute;
|
|
1897
1916
|
}
|
|
1898
1917
|
else {
|
|
1899
1918
|
this.id = `gaModalTitle${nextUniqueModalTitleId++}`;
|
|
@@ -1903,7 +1922,7 @@ class GaModalTitleDirective {
|
|
|
1903
1922
|
ngAfterViewInit() {
|
|
1904
1923
|
this.modalRef.instance.labelledBy.set(this.id);
|
|
1905
1924
|
}
|
|
1906
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalTitleDirective, deps: [
|
|
1925
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1907
1926
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: GaModalTitleDirective, isStandalone: true, selector: "[gaModalTitle]", host: { classAttribute: "ga-modal__title" }, ngImport: i0 });
|
|
1908
1927
|
}
|
|
1909
1928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalTitleDirective, decorators: [{
|
|
@@ -1912,19 +1931,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1912
1931
|
selector: '[gaModalTitle]',
|
|
1913
1932
|
host: { class: 'ga-modal__title' },
|
|
1914
1933
|
}]
|
|
1915
|
-
}], ctorParameters: () => [
|
|
1916
|
-
type: Attribute,
|
|
1917
|
-
args: ['id']
|
|
1918
|
-
}] }] });
|
|
1934
|
+
}], ctorParameters: () => [] });
|
|
1919
1935
|
let nextUniqueModalDescriptionId = 0;
|
|
1920
1936
|
class GaModalDescriptionDirective {
|
|
1921
1937
|
renderer = inject(Renderer2);
|
|
1922
1938
|
elementRef = inject(ElementRef);
|
|
1923
1939
|
modalRef = inject(GaModalRef);
|
|
1940
|
+
idAttribute = inject(new HostAttributeToken('id'), {
|
|
1941
|
+
optional: true,
|
|
1942
|
+
});
|
|
1924
1943
|
id;
|
|
1925
|
-
constructor(
|
|
1926
|
-
if (
|
|
1927
|
-
this.id =
|
|
1944
|
+
constructor() {
|
|
1945
|
+
if (this.idAttribute) {
|
|
1946
|
+
this.id = this.idAttribute;
|
|
1928
1947
|
}
|
|
1929
1948
|
else {
|
|
1930
1949
|
this.id = `gaModalDescription${nextUniqueModalDescriptionId++}`;
|
|
@@ -1934,7 +1953,7 @@ class GaModalDescriptionDirective {
|
|
|
1934
1953
|
ngAfterViewInit() {
|
|
1935
1954
|
this.modalRef.instance.describedBy.set(this.id);
|
|
1936
1955
|
}
|
|
1937
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalDescriptionDirective, deps: [
|
|
1956
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1938
1957
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: GaModalDescriptionDirective, isStandalone: true, selector: "[gaModalDescription]", host: { classAttribute: "ga-modal__description" }, ngImport: i0 });
|
|
1939
1958
|
}
|
|
1940
1959
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalDescriptionDirective, decorators: [{
|
|
@@ -1943,25 +1962,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1943
1962
|
selector: '[gaModalDescription]',
|
|
1944
1963
|
host: { class: 'ga-modal__description' },
|
|
1945
1964
|
}]
|
|
1946
|
-
}], ctorParameters: () => [
|
|
1947
|
-
type: Attribute,
|
|
1948
|
-
args: ['id']
|
|
1949
|
-
}] }] });
|
|
1965
|
+
}], ctorParameters: () => [] });
|
|
1950
1966
|
let nextUniqueModalLabelId = 0;
|
|
1951
1967
|
class GaModalLabelDirective {
|
|
1952
1968
|
renderer = inject(Renderer2);
|
|
1953
1969
|
elementRef = inject(ElementRef);
|
|
1970
|
+
idAttribute = inject(new HostAttributeToken('id'), {
|
|
1971
|
+
optional: true,
|
|
1972
|
+
});
|
|
1954
1973
|
id;
|
|
1955
|
-
constructor(
|
|
1956
|
-
if (
|
|
1957
|
-
this.id =
|
|
1974
|
+
constructor() {
|
|
1975
|
+
if (this.idAttribute) {
|
|
1976
|
+
this.id = this.idAttribute;
|
|
1958
1977
|
}
|
|
1959
1978
|
else {
|
|
1960
1979
|
this.id = `gaModalLabel${nextUniqueModalLabelId++}`;
|
|
1961
1980
|
this.renderer.setAttribute(this.elementRef.nativeElement, 'id', this.id);
|
|
1962
1981
|
}
|
|
1963
1982
|
}
|
|
1964
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalLabelDirective, deps: [
|
|
1983
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1965
1984
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: GaModalLabelDirective, isStandalone: true, selector: "[gaModalLabel]", host: { classAttribute: "ga-modal__label" }, ngImport: i0 });
|
|
1966
1985
|
}
|
|
1967
1986
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalLabelDirective, decorators: [{
|
|
@@ -1970,10 +1989,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1970
1989
|
selector: '[gaModalLabel]',
|
|
1971
1990
|
host: { class: 'ga-modal__label' },
|
|
1972
1991
|
}]
|
|
1973
|
-
}], ctorParameters: () => [
|
|
1974
|
-
type: Attribute,
|
|
1975
|
-
args: ['id']
|
|
1976
|
-
}] }] });
|
|
1992
|
+
}], ctorParameters: () => [] });
|
|
1977
1993
|
|
|
1978
1994
|
class GaModalDescriptionComponent {
|
|
1979
1995
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -1993,13 +2009,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1993
2009
|
|
|
1994
2010
|
class GaModalContentComponent {
|
|
1995
2011
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1996
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: GaModalContentComponent, isStandalone: true, selector: "ga-modal-content", host: { classAttribute: "ga-modal__content" }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
2012
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: GaModalContentComponent, isStandalone: true, selector: "ga-modal-content", host: { classAttribute: "ga-modal__content" }, hostDirectives: [{ directive: i1$3.CdkScrollable }], ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
1997
2013
|
}
|
|
1998
2014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaModalContentComponent, decorators: [{
|
|
1999
2015
|
type: Component,
|
|
2000
2016
|
args: [{
|
|
2001
2017
|
selector: 'ga-modal-content',
|
|
2002
2018
|
template: `<ng-content />`,
|
|
2019
|
+
hostDirectives: [CdkScrollable],
|
|
2003
2020
|
host: {
|
|
2004
2021
|
class: 'ga-modal__content',
|
|
2005
2022
|
},
|
|
@@ -2262,10 +2279,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2262
2279
|
// Increasing integer for generating unique ids for radio button components.
|
|
2263
2280
|
let nextUniqueId$3 = 0;
|
|
2264
2281
|
class GaRadioButtonComponent {
|
|
2265
|
-
tabindex;
|
|
2266
2282
|
radioGroup = inject(GaRadioGroupComponent, {
|
|
2267
2283
|
optional: true,
|
|
2268
2284
|
});
|
|
2285
|
+
tabindex = inject(new HostAttributeToken('tabindex'), {
|
|
2286
|
+
optional: true,
|
|
2287
|
+
});
|
|
2269
2288
|
_uniqueId = `ga-radio-button-${++nextUniqueId$3}`;
|
|
2270
2289
|
/** The value attribute of the native input element */
|
|
2271
2290
|
value = input(null);
|
|
@@ -2300,9 +2319,6 @@ class GaRadioButtonComponent {
|
|
|
2300
2319
|
name = computed(() => this.radioGroup?.name() ?? this.inputName() ?? this._uniqueId);
|
|
2301
2320
|
disabled = computed(() => this.radioGroup?.disabledModel() || this.inputDisabled());
|
|
2302
2321
|
checked = computed(() => this.radioGroup?.valueModel() === this.value() || this.inputChecked());
|
|
2303
|
-
constructor(tabindex) {
|
|
2304
|
-
this.tabindex = tabindex;
|
|
2305
|
-
}
|
|
2306
2322
|
onInputChange(event) {
|
|
2307
2323
|
// We always have to stop propagation on the change event.
|
|
2308
2324
|
// Otherwise the change event, from the input element, will bubble up and
|
|
@@ -2317,7 +2333,7 @@ class GaRadioButtonComponent {
|
|
|
2317
2333
|
onBlur() {
|
|
2318
2334
|
this.radioGroup?.onBlur();
|
|
2319
2335
|
}
|
|
2320
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaRadioButtonComponent, deps: [
|
|
2336
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaRadioButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2321
2337
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: GaRadioButtonComponent, isStandalone: true, selector: "ga-radio-button", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, inputName: { classPropertyName: "inputName", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputChecked: { classPropertyName: "inputChecked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inputDisabled: { classPropertyName: "inputDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, ariaErrormessage: { classPropertyName: "ariaErrormessage", publicName: "aria-errormessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { properties: { "class.ga-radio-button--invalid": "ariaInvalid()", "attr.id": "null", "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "ga-radio-button" }, ngImport: i0, template: "<input\n type=\"radio\"\n class=\"ga-radio-button__native\"\n [attr.id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.tabindex]=\"tabindex\"\n [attr.value]=\"value()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [attr.aria-errormessage]=\"ariaErrormessage()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n/>\n\n<div class=\"ga-radio-button__marker\"></div>\n<label class=\"ga-radio-button__label\" [attr.for]=\"id()\"\n ><ng-content></ng-content\n></label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2322
2338
|
}
|
|
2323
2339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaRadioButtonComponent, decorators: [{
|
|
@@ -2331,10 +2347,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2331
2347
|
'[attr.aria-labelledby]': 'null',
|
|
2332
2348
|
'[attr.aria-describedby]': 'null',
|
|
2333
2349
|
}, template: "<input\n type=\"radio\"\n class=\"ga-radio-button__native\"\n [attr.id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.tabindex]=\"tabindex\"\n [attr.value]=\"value()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [attr.aria-errormessage]=\"ariaErrormessage()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n/>\n\n<div class=\"ga-radio-button__marker\"></div>\n<label class=\"ga-radio-button__label\" [attr.for]=\"id()\"\n ><ng-content></ng-content\n></label>\n" }]
|
|
2334
|
-
}]
|
|
2335
|
-
type: Attribute,
|
|
2336
|
-
args: ['tabindex']
|
|
2337
|
-
}] }] });
|
|
2350
|
+
}] });
|
|
2338
2351
|
|
|
2339
2352
|
class GaRadioModule {
|
|
2340
2353
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -2391,7 +2404,7 @@ class GaOptionComponent {
|
|
|
2391
2404
|
}
|
|
2392
2405
|
}
|
|
2393
2406
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2394
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaOptionComponent, isStandalone: true, selector: "ga-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, withInput: { classPropertyName: "withInput", publicName: "withInput", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, properties: { "class.ga-dropdown__item--selected": "selected()", "class.ga-dropdown__item--disabled": "cdkOption.disabled", "class.ga-dropdown__item--active": "active() && !cdkOption.disabled" }, classAttribute: "ga-dropdown__item" }, hostDirectives: [{ directive: i1$
|
|
2407
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaOptionComponent, isStandalone: true, selector: "ga-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, withInput: { classPropertyName: "withInput", publicName: "withInput", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, properties: { "class.ga-dropdown__item--selected": "selected()", "class.ga-dropdown__item--disabled": "cdkOption.disabled", "class.ga-dropdown__item--active": "active() && !cdkOption.disabled" }, classAttribute: "ga-dropdown__item" }, hostDirectives: [{ directive: i1$4.CdkOption, inputs: ["cdkOption", "value", "cdkOptionDisabled", "disabled", "cdkOptionTypeaheadLabel", "typeaheadLabel"] }], ngImport: i0, template: "@if (withInput()) {\n @if (selectComponent.multiple()) {\n <ga-checkbox\n [checked]=\"selected()\"\n [disabled]=\"disabled()\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n tabindex=\"-1\"\n />\n } @else {\n <ga-radio-button\n [checked]=\"selected()\"\n [disabled]=\"disabled()\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n tabindex=\"-1\"\n />\n }\n}\n<div class=\"ga-dropdown__item-label\"><ng-content /></div>\n", dependencies: [{ kind: "ngmodule", type: GaCheckboxModule }, { kind: "component", type: GaCheckboxComponent, selector: "ga-checkbox", inputs: ["value", "disabled", "checked", "name", "id", "indeterminate", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-errormessage", "required"], outputs: ["change", "indeterminateChange"] }, { kind: "ngmodule", type: GaRadioModule }, { kind: "component", type: GaRadioButtonComponent, selector: "ga-radio-button", inputs: ["value", "id", "name", "checked", "disabled", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-errormessage"], outputs: ["change"] }] });
|
|
2395
2408
|
}
|
|
2396
2409
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaOptionComponent, decorators: [{
|
|
2397
2410
|
type: Component,
|
|
@@ -2486,6 +2499,7 @@ class GaSelectComponent {
|
|
|
2486
2499
|
];
|
|
2487
2500
|
injector = inject(Injector);
|
|
2488
2501
|
overlayOrigin = inject(CdkOverlayOrigin);
|
|
2502
|
+
repositionScrollStrategy = createRepositionScrollStrategy(this.injector);
|
|
2489
2503
|
implicitInvalid = signal(false);
|
|
2490
2504
|
_isOpen = signal(false);
|
|
2491
2505
|
value = model(null);
|
|
@@ -2701,7 +2715,8 @@ class GaSelectComponent {
|
|
|
2701
2715
|
const currentIndex = options.findIndex(({ cdkOption }) => cdkOption.isActive());
|
|
2702
2716
|
const findNextEnabled = (startIndex) => {
|
|
2703
2717
|
let index = startIndex;
|
|
2704
|
-
|
|
2718
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2719
|
+
for (const _ of options) {
|
|
2705
2720
|
// calculate next index with wrapping (using modulo)
|
|
2706
2721
|
index = (index + direction + options.length) % options.length;
|
|
2707
2722
|
if (!options[index].cdkOption.disabled) {
|
|
@@ -2726,7 +2741,7 @@ class GaSelectComponent {
|
|
|
2726
2741
|
provide: GA_FORM_CONTROL,
|
|
2727
2742
|
useExisting: forwardRef(() => GaSelectComponent),
|
|
2728
2743
|
},
|
|
2729
|
-
], queries: [{ propertyName: "gaOptions", predicate: GaOptionComponent, descendants: true, read: GaOptionComponent, isSignal: true }, { propertyName: "cdkListbox", first: true, predicate: CdkListbox, descendants: true, isSignal: true }, { propertyName: "customSelectValue", first: true, predicate: GaSelectValueComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["ngContent"], descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: i1$
|
|
2744
|
+
], queries: [{ propertyName: "gaOptions", predicate: GaOptionComponent, descendants: true, read: GaOptionComponent, isSignal: true }, { propertyName: "cdkListbox", first: true, predicate: CdkListbox, descendants: true, isSignal: true }, { propertyName: "customSelectValue", first: true, predicate: GaSelectValueComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["ngContent"], descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: i1$5.CdkOverlayOrigin }, { directive: GaLabelledByFormFieldDirective }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n\n<div class=\"ga-select__main-area\">\n @if (hasValue() && (!textValue() || multiple())) {\n @if (customSelectValue()) {\n <div class=\"ga-select__value\">\n <ng-content select=\"ga-select-value\" />\n </div>\n } @else {\n <ga-select-default-value />\n }\n } @else if (!searchable()) {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n }\n\n @if (searchable()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"open(); textValue.set(inputSearch.value)\"\n (click)=\"open(); $event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }, { kind: "ngmodule", type: GaButtonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$5.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: GaSelectDefaultValueComponent, selector: "ga-select-default-value" }] });
|
|
2730
2745
|
}
|
|
2731
2746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectComponent, decorators: [{
|
|
2732
2747
|
type: Component,
|
|
@@ -2766,7 +2781,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2766
2781
|
'(keydown.arrowdown)': 'open(); $event.preventDefault()',
|
|
2767
2782
|
'(keydown.space)': 'open(); $event.preventDefault()',
|
|
2768
2783
|
'(keydown.enter)': 'open(); $event.preventDefault()',
|
|
2769
|
-
}, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n\n<div class=\"ga-select__main-area\">\n @if (hasValue() && (!textValue() || multiple())) {\n @if (customSelectValue()) {\n <div class=\"ga-select__value\">\n <ng-content select=\"ga-select-value\" />\n </div>\n } @else {\n <ga-select-default-value />\n }\n } @else if (!searchable()) {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n }\n\n @if (searchable()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"open(); textValue.set(inputSearch.value)\"\n (click)=\"open(); $event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n" }]
|
|
2784
|
+
}, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n\n<div class=\"ga-select__main-area\">\n @if (hasValue() && (!textValue() || multiple())) {\n @if (customSelectValue()) {\n <div class=\"ga-select__value\">\n <ng-content select=\"ga-select-value\" />\n </div>\n } @else {\n <ga-select-default-value />\n }\n } @else if (!searchable()) {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n }\n\n @if (searchable()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"open(); textValue.set(inputSearch.value)\"\n (click)=\"open(); $event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n" }]
|
|
2770
2785
|
}], ctorParameters: () => [] });
|
|
2771
2786
|
|
|
2772
2787
|
class GaOptgroupComponent {
|
|
@@ -2827,7 +2842,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2827
2842
|
class GaSelectDropdownComponent {
|
|
2828
2843
|
loading = input(false, { transform: booleanAttribute });
|
|
2829
2844
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2830
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaSelectDropdownComponent, isStandalone: true, selector: "ga-select-dropdown", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ga-dropdown ga-dropdown__content" }, hostDirectives: [{ directive: i1$
|
|
2845
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaSelectDropdownComponent, isStandalone: true, selector: "ga-select-dropdown", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ga-dropdown ga-dropdown__content" }, hostDirectives: [{ directive: i1$4.CdkListbox }], ngImport: i0, template: "@if (loading()) {\n <ga-select-dropdown-spinner />\n} @else {\n <ng-content />\n}\n", dependencies: [{ kind: "component", type: GaSelectDropdownSpinnerComponent, selector: "ga-select-dropdown-spinner" }] });
|
|
2831
2846
|
}
|
|
2832
2847
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownComponent, decorators: [{
|
|
2833
2848
|
type: Component,
|
|
@@ -2848,6 +2863,7 @@ class GaSelectRequiredValidator extends RequiredValidator {
|
|
|
2848
2863
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectRequiredValidator, decorators: [{
|
|
2849
2864
|
type: Directive,
|
|
2850
2865
|
args: [{
|
|
2866
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2851
2867
|
selector: `ga-select[required][formControlName], ga-select[required][formControl], ga-select[required][ngModel]`,
|
|
2852
2868
|
providers: [GA_SELECT_REQUIRED_VALIDATOR],
|
|
2853
2869
|
}]
|
|
@@ -3066,6 +3082,7 @@ class GaLinkDirective {
|
|
|
3066
3082
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaLinkDirective, decorators: [{
|
|
3067
3083
|
type: Component,
|
|
3068
3084
|
args: [{
|
|
3085
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
3069
3086
|
selector: 'a[gaLink], button[gaLink]',
|
|
3070
3087
|
template: `
|
|
3071
3088
|
@if (leadingIcon()) {
|