@vsn-ux/ngx-gaia 0.2.1 → 0.2.3
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/fesm2022/vsn-ux-ngx-gaia.mjs +196 -288
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/lib/form-field/field-label.component.d.ts +3 -0
- package/lib/form-field/form-control.di.d.ts +6 -5
- package/lib/input/input.directive.d.ts +1 -0
- package/lib/select/index.d.ts +3 -5
- package/lib/select/select-default-value.component.d.ts +7 -0
- package/lib/select/select-dropdown-loading.component.d.ts +5 -0
- package/lib/select/select-dropdown.component.d.ts +7 -0
- package/lib/select/select-value.component.d.ts +1 -3
- package/lib/select/select.component.d.ts +22 -11
- package/lib/select/select.module.d.ts +5 -7
- package/lib/tooltip/tooltip.component.d.ts +4 -5
- package/package.json +2 -2
- package/lib/select/select-content-loading.component.d.ts +0 -5
- package/lib/select/select-content.component.d.ts +0 -7
- package/lib/select/triggers/select-custom-trigger.component.d.ts +0 -5
- package/lib/select/triggers/select-searchable-trigger.component.d.ts +0 -22
- package/lib/select/triggers/select-trigger-di.d.ts +0 -2
- package/lib/select/triggers/select-trigger.component.d.ts +0 -15
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, numberAttribute, Component, ViewEncapsulation, Attribute, NgModule, ChangeDetectionStrategy, Injectable, makeEnvironmentProviders, booleanAttribute, output, computed, contentChild, forwardRef, Injector, signal, linkedSignal, Directive, model, HostListener, InjectionToken, effect, TemplateRef, NgZone, Input,
|
|
2
|
+
import { inject, ElementRef, input, numberAttribute, Component, ViewEncapsulation, Attribute, NgModule, ChangeDetectionStrategy, Injectable, makeEnvironmentProviders, booleanAttribute, output, computed, contentChild, forwardRef, Injector, signal, linkedSignal, Directive, model, HostListener, InjectionToken, effect, TemplateRef, NgZone, Input, contentChildren, viewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from 'lucide-angular';
|
|
4
4
|
import { LucideAngularModule, X, CircleCheck, TriangleAlert, OctagonAlert, Info, Minus, Check, ChevronUp, ChevronDown } from 'lucide-angular';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, NgControl, NG_VALIDATORS, CheckboxRequiredValidator, RequiredValidator } from '@angular/forms';
|
|
6
|
+
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
6
7
|
import * as i1$1 from '@angular/cdk/menu';
|
|
7
8
|
import { CdkMenu, CdkMenuItem, CdkMenuTrigger } from '@angular/cdk/menu';
|
|
8
|
-
import { toSignal
|
|
9
|
-
import { merge, map, Subject, takeUntil
|
|
9
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
10
|
+
import { merge, map, Subject, takeUntil } from 'rxjs';
|
|
10
11
|
import * as i1$3 from '@angular/cdk/overlay';
|
|
11
|
-
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
12
|
+
import { Overlay, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
|
|
12
13
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
13
14
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
14
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
15
15
|
import * as i1$2 from '@angular/cdk/listbox';
|
|
16
16
|
import { CdkOption, CdkListbox } from '@angular/cdk/listbox';
|
|
17
|
-
import * as i2 from '@angular/cdk/observers';
|
|
18
|
-
import { ObserversModule } from '@angular/cdk/observers';
|
|
19
17
|
|
|
20
18
|
class GaIconComponent {
|
|
21
19
|
elementRef = inject(ElementRef);
|
|
@@ -322,11 +320,11 @@ const CHECKBOX_CONTROL_VALUE_ACCESSOR = {
|
|
|
322
320
|
};
|
|
323
321
|
// Increasing integer for generating unique ids for checkbox components.
|
|
324
322
|
// Inspired by @angular/components
|
|
325
|
-
let nextUniqueId$
|
|
323
|
+
let nextUniqueId$5 = 0;
|
|
326
324
|
class GaCheckboxComponent {
|
|
327
325
|
tabindex;
|
|
328
326
|
/** @ignore */
|
|
329
|
-
_uniqueId = `ga-checkbox-${++nextUniqueId$
|
|
327
|
+
_uniqueId = `ga-checkbox-${++nextUniqueId$5}`;
|
|
330
328
|
/** @ignore */
|
|
331
329
|
injector = inject(Injector);
|
|
332
330
|
icons = { Minus, Check };
|
|
@@ -572,8 +570,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
572
570
|
|
|
573
571
|
const GA_FORM_CONTROL = new InjectionToken('ga-form-control');
|
|
574
572
|
class GaFormControlDirective {
|
|
573
|
+
_formControlId = input(undefined, {
|
|
574
|
+
alias: 'gaFormControl',
|
|
575
|
+
});
|
|
575
576
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaFormControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
576
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
577
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.5", type: GaFormControlDirective, isStandalone: true, selector: "[gaFormControl]", inputs: { _formControlId: { classPropertyName: "_formControlId", publicName: "gaFormControl", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
577
578
|
{ provide: GA_FORM_CONTROL, useExisting: GaFormControlDirective },
|
|
578
579
|
], ngImport: i0 });
|
|
579
580
|
}
|
|
@@ -587,9 +588,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
587
588
|
}]
|
|
588
589
|
}] });
|
|
589
590
|
|
|
590
|
-
let nextUniqueId$
|
|
591
|
+
let nextUniqueId$4 = 0;
|
|
591
592
|
class GaInputDirective {
|
|
592
|
-
uniqueId = `ga-input-${++nextUniqueId$
|
|
593
|
+
uniqueId = `ga-input-${++nextUniqueId$4}`;
|
|
593
594
|
implicitNgControl = inject(NgControl, {
|
|
594
595
|
optional: true,
|
|
595
596
|
self: true,
|
|
@@ -609,6 +610,7 @@ class GaInputDirective {
|
|
|
609
610
|
return this.idInput() ?? this.uniqueId;
|
|
610
611
|
});
|
|
611
612
|
errors = this.implicitErrors.asReadonly();
|
|
613
|
+
_formControlId = this.id;
|
|
612
614
|
ngDoCheck() {
|
|
613
615
|
if (this.hasWrapper)
|
|
614
616
|
return;
|
|
@@ -650,12 +652,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
650
652
|
}]
|
|
651
653
|
}] });
|
|
652
654
|
|
|
653
|
-
let nextUniqueId$
|
|
655
|
+
let nextUniqueId$3 = 0;
|
|
654
656
|
class GaFormFieldComponent {
|
|
655
|
-
uniqueId = `ga-form-field-${++nextUniqueId$
|
|
656
|
-
formControl = contentChild(GA_FORM_CONTROL);
|
|
657
|
+
uniqueId = `ga-form-field-${++nextUniqueId$3}`;
|
|
658
|
+
formControl = contentChild(GA_FORM_CONTROL, { descendants: true });
|
|
657
659
|
controlId = computed(() => {
|
|
658
|
-
return this.formControl()?.
|
|
660
|
+
return this.formControl()?._formControlId() ?? this.uniqueId;
|
|
659
661
|
});
|
|
660
662
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
661
663
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.5", type: GaFormFieldComponent, isStandalone: true, selector: "ga-form-field", host: { classAttribute: "ga-form-field" }, queries: [{ propertyName: "formControl", first: true, predicate: GA_FORM_CONTROL, descendants: true, isSignal: true }], exportAs: ["gaFormField"], ngImport: i0, template: "<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -668,13 +670,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
668
670
|
}] });
|
|
669
671
|
|
|
670
672
|
class GaFieldLabelComponent {
|
|
673
|
+
document = inject(DOCUMENT);
|
|
671
674
|
formField = inject(GaFormFieldComponent);
|
|
672
675
|
for = input();
|
|
673
676
|
controlId = computed(() => {
|
|
674
677
|
return this.for() ?? this.formField.controlId();
|
|
675
678
|
});
|
|
679
|
+
controlElement = computed(() => {
|
|
680
|
+
const control = this.document.querySelector(`#${this.controlId()}`);
|
|
681
|
+
if (control instanceof HTMLElement) {
|
|
682
|
+
return control;
|
|
683
|
+
}
|
|
684
|
+
return null;
|
|
685
|
+
});
|
|
686
|
+
focusControl() {
|
|
687
|
+
const control = this.controlElement();
|
|
688
|
+
// only focus custom elements as native elements already
|
|
689
|
+
// have support for connecting label and reacting to events
|
|
690
|
+
if (control?.tagName.includes('-')) {
|
|
691
|
+
control.focus();
|
|
692
|
+
}
|
|
693
|
+
}
|
|
676
694
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaFieldLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
677
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.5", type: GaFieldLabelComponent, isStandalone: true, selector: "ga-label", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<label
|
|
695
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.5", type: GaFieldLabelComponent, isStandalone: true, selector: "ga-label", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<label
|
|
696
|
+
[attr.for]="controlId()"
|
|
697
|
+
class="ga-form-field__label"
|
|
698
|
+
(click)="focusControl()"
|
|
678
699
|
><ng-content
|
|
679
700
|
/></label>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
680
701
|
}
|
|
@@ -682,7 +703,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
682
703
|
type: Component,
|
|
683
704
|
args: [{
|
|
684
705
|
selector: 'ga-label',
|
|
685
|
-
template: `<label
|
|
706
|
+
template: `<label
|
|
707
|
+
[attr.for]="controlId()"
|
|
708
|
+
class="ga-form-field__label"
|
|
709
|
+
(click)="focusControl()"
|
|
686
710
|
><ng-content
|
|
687
711
|
/></label>`,
|
|
688
712
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -903,13 +927,13 @@ class GaTooltipComponent {
|
|
|
903
927
|
this.mouseLeaveSubject.next();
|
|
904
928
|
}
|
|
905
929
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
906
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaTooltipComponent, isStandalone: true, selector: "ga-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hideTriggered: "hideTriggered" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.style": "inlineStyle()" } }, ngImport: i0, template: "<div [class]=\"cssClass()\">\n @if (text()) {\n {{ text() }}\n } @else if (template()) {\n <ng-container\n [ngTemplateOutlet]=\"template()\"\n [ngTemplateOutletContext]=\"{ hide: triggerHide }\"\n />\n }\n</div>\n", styles: [".top-start :host,.top-center :host,.top-end :host{padding-bottom:var(--ga-tooltip-offset)}.bottom-start :host,.bottom-center :host,.bottom-end :host{padding-top:var(--ga-tooltip-offset)}.left-
|
|
930
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaTooltipComponent, isStandalone: true, selector: "ga-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hideTriggered: "hideTriggered" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.style": "inlineStyle()" } }, ngImport: i0, template: "<div [class]=\"cssClass()\">\n @if (text()) {\n {{ text() }}\n } @else if (template()) {\n <ng-container\n [ngTemplateOutlet]=\"template()\"\n [ngTemplateOutletContext]=\"{ hide: triggerHide }\"\n />\n }\n</div>\n", styles: [".top-start :host,.top-center :host,.top-end :host{padding-bottom:var(--ga-tooltip-offset)}.bottom-start :host,.bottom-center :host,.bottom-end :host{padding-top:var(--ga-tooltip-offset)}.left-start :host,.left-center :host,.left-end :host{padding-right:var(--ga-tooltip-offset)}.right-start :host,.right-center :host,.right-end :host{padding-left:var(--ga-tooltip-offset)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
907
931
|
}
|
|
908
932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTooltipComponent, decorators: [{
|
|
909
933
|
type: Component,
|
|
910
934
|
args: [{ selector: 'ga-tooltip', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
911
935
|
'[attr.style]': 'inlineStyle()',
|
|
912
|
-
}, template: "<div [class]=\"cssClass()\">\n @if (text()) {\n {{ text() }}\n } @else if (template()) {\n <ng-container\n [ngTemplateOutlet]=\"template()\"\n [ngTemplateOutletContext]=\"{ hide: triggerHide }\"\n />\n }\n</div>\n", styles: [".top-start :host,.top-center :host,.top-end :host{padding-bottom:var(--ga-tooltip-offset)}.bottom-start :host,.bottom-center :host,.bottom-end :host{padding-top:var(--ga-tooltip-offset)}.left-
|
|
936
|
+
}, template: "<div [class]=\"cssClass()\">\n @if (text()) {\n {{ text() }}\n } @else if (template()) {\n <ng-container\n [ngTemplateOutlet]=\"template()\"\n [ngTemplateOutletContext]=\"{ hide: triggerHide }\"\n />\n }\n</div>\n", styles: [".top-start :host,.top-center :host,.top-end :host{padding-bottom:var(--ga-tooltip-offset)}.bottom-start :host,.bottom-center :host,.bottom-end :host{padding-top:var(--ga-tooltip-offset)}.left-start :host,.left-center :host,.left-end :host{padding-right:var(--ga-tooltip-offset)}.right-start :host,.right-center :host,.right-end :host{padding-left:var(--ga-tooltip-offset)}\n"] }]
|
|
913
937
|
}], propDecorators: { handleMouseEnter: [{
|
|
914
938
|
type: HostListener,
|
|
915
939
|
args: ['mouseenter']
|
|
@@ -1126,13 +1150,14 @@ class GaTooltipDirective {
|
|
|
1126
1150
|
position.withPositions(positions);
|
|
1127
1151
|
}
|
|
1128
1152
|
getPositions(preferredPlacement) {
|
|
1153
|
+
const [position, direction] = preferredPlacement.split('-');
|
|
1129
1154
|
let positionedOverlayY;
|
|
1130
1155
|
let positionedOffsetY;
|
|
1131
|
-
if (
|
|
1156
|
+
if (direction === 'start') {
|
|
1132
1157
|
positionedOverlayY = 'top';
|
|
1133
1158
|
positionedOffsetY = -24;
|
|
1134
1159
|
}
|
|
1135
|
-
else if (
|
|
1160
|
+
else if (direction === 'end') {
|
|
1136
1161
|
positionedOverlayY = 'bottom';
|
|
1137
1162
|
positionedOffsetY = 24;
|
|
1138
1163
|
}
|
|
@@ -1140,19 +1165,15 @@ class GaTooltipDirective {
|
|
|
1140
1165
|
positionedOverlayY = 'center';
|
|
1141
1166
|
positionedOffsetY = 0;
|
|
1142
1167
|
}
|
|
1143
|
-
let positionedOverlayX;
|
|
1144
1168
|
let positionedOffsetX;
|
|
1145
|
-
if (
|
|
1146
|
-
positionedOverlayX = 'start';
|
|
1169
|
+
if (direction === 'start') {
|
|
1147
1170
|
positionedOffsetX = -24;
|
|
1148
1171
|
}
|
|
1149
|
-
else if (
|
|
1150
|
-
positionedOverlayX = 'end';
|
|
1172
|
+
else if (direction === 'end') {
|
|
1151
1173
|
positionedOffsetX = 24;
|
|
1152
1174
|
}
|
|
1153
1175
|
else {
|
|
1154
1176
|
positionedOffsetX = 0;
|
|
1155
|
-
positionedOverlayX = 'center';
|
|
1156
1177
|
}
|
|
1157
1178
|
const right = {
|
|
1158
1179
|
originX: 'end',
|
|
@@ -1160,7 +1181,7 @@ class GaTooltipDirective {
|
|
|
1160
1181
|
overlayX: 'start',
|
|
1161
1182
|
overlayY: positionedOverlayY,
|
|
1162
1183
|
offsetY: positionedOffsetY,
|
|
1163
|
-
panelClass: `right-${
|
|
1184
|
+
panelClass: `right-${direction}`,
|
|
1164
1185
|
};
|
|
1165
1186
|
const left = {
|
|
1166
1187
|
originX: 'start',
|
|
@@ -1168,31 +1189,31 @@ class GaTooltipDirective {
|
|
|
1168
1189
|
overlayX: 'end',
|
|
1169
1190
|
overlayY: positionedOverlayY,
|
|
1170
1191
|
offsetY: positionedOffsetY,
|
|
1171
|
-
panelClass: `left-${
|
|
1192
|
+
panelClass: `left-${direction}`,
|
|
1172
1193
|
};
|
|
1173
1194
|
const top = {
|
|
1174
1195
|
originX: 'center',
|
|
1175
1196
|
originY: 'top',
|
|
1176
|
-
overlayX:
|
|
1197
|
+
overlayX: direction,
|
|
1177
1198
|
overlayY: 'bottom',
|
|
1178
1199
|
offsetX: positionedOffsetX,
|
|
1179
|
-
panelClass: `top-${
|
|
1200
|
+
panelClass: `top-${direction}`,
|
|
1180
1201
|
};
|
|
1181
1202
|
const bottom = {
|
|
1182
1203
|
originX: 'center',
|
|
1183
1204
|
originY: 'bottom',
|
|
1184
|
-
overlayX:
|
|
1205
|
+
overlayX: direction,
|
|
1185
1206
|
overlayY: 'top',
|
|
1186
1207
|
offsetX: positionedOffsetX,
|
|
1187
|
-
panelClass: `bottom-${
|
|
1208
|
+
panelClass: `bottom-${direction}`,
|
|
1188
1209
|
};
|
|
1189
|
-
if (
|
|
1210
|
+
if (position === 'right') {
|
|
1190
1211
|
return [right, left, bottom, top];
|
|
1191
1212
|
}
|
|
1192
|
-
else if (
|
|
1213
|
+
else if (position === 'left') {
|
|
1193
1214
|
return [left, right, bottom, top];
|
|
1194
1215
|
}
|
|
1195
|
-
else if (
|
|
1216
|
+
else if (position === 'top') {
|
|
1196
1217
|
return [top, bottom, right, left];
|
|
1197
1218
|
}
|
|
1198
1219
|
else {
|
|
@@ -1263,10 +1284,10 @@ const RADIO_CONTROL_VALUE_ACCESSOR = {
|
|
|
1263
1284
|
multi: true,
|
|
1264
1285
|
};
|
|
1265
1286
|
// Increasing integer for generating unique ids for radio components.
|
|
1266
|
-
let nextUniqueId$
|
|
1287
|
+
let nextUniqueId$2 = 0;
|
|
1267
1288
|
class GaRadioGroupComponent {
|
|
1268
1289
|
/** Name of the radio button group. All radio buttons inside this group will use this name. */
|
|
1269
|
-
name = input(`ga-radio-group-${nextUniqueId$
|
|
1290
|
+
name = input(`ga-radio-group-${nextUniqueId$2++}`);
|
|
1270
1291
|
/**
|
|
1271
1292
|
* Value for the radio-group. Should equal the value of the selected radio button if there is
|
|
1272
1293
|
* a corresponding radio button with a matching value. If there is not such a corresponding
|
|
@@ -1325,13 +1346,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
1325
1346
|
}] });
|
|
1326
1347
|
|
|
1327
1348
|
// Increasing integer for generating unique ids for radio button components.
|
|
1328
|
-
let nextUniqueId = 0;
|
|
1349
|
+
let nextUniqueId$1 = 0;
|
|
1329
1350
|
class GaRadioButtonComponent {
|
|
1330
1351
|
tabindex;
|
|
1331
1352
|
radioGroup = inject(GaRadioGroupComponent, {
|
|
1332
1353
|
optional: true,
|
|
1333
1354
|
});
|
|
1334
|
-
_uniqueId = `ga-radio-button-${++nextUniqueId}`;
|
|
1355
|
+
_uniqueId = `ga-radio-button-${++nextUniqueId$1}`;
|
|
1335
1356
|
/** The value attribute of the native input element */
|
|
1336
1357
|
value = input(null);
|
|
1337
1358
|
inputId = input(null, { alias: 'id' });
|
|
@@ -1462,108 +1483,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
1462
1483
|
}] });
|
|
1463
1484
|
|
|
1464
1485
|
class GaSelectValueComponent {
|
|
1465
|
-
selectComponent = inject(GaSelectComponent);
|
|
1466
|
-
optionViewValue = computed(() => {
|
|
1467
|
-
const options = this.selectComponent.selectedOptions();
|
|
1468
|
-
if (!options.length) {
|
|
1469
|
-
return null;
|
|
1470
|
-
}
|
|
1471
|
-
return options
|
|
1472
|
-
.map((option) => option.cdkOption.element.textContent?.trim() ?? '')
|
|
1473
|
-
.join(', ');
|
|
1474
|
-
});
|
|
1475
1486
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1476
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: GaSelectValueComponent, isStandalone: true, selector: "ga-select-value", ngImport: i0, template:
|
|
1487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: GaSelectValueComponent, isStandalone: true, selector: "ga-select-value", ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
1477
1488
|
}
|
|
1478
1489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectValueComponent, decorators: [{
|
|
1479
1490
|
type: Component,
|
|
1480
1491
|
args: [{
|
|
1481
1492
|
selector: 'ga-select-value',
|
|
1482
|
-
template:
|
|
1493
|
+
template: `<ng-content />`,
|
|
1483
1494
|
}]
|
|
1484
1495
|
}] });
|
|
1485
1496
|
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
class GaSelectTriggerComponent {
|
|
1497
|
+
class GaSelectDefaultValueComponent {
|
|
1489
1498
|
selectComponent = inject(GaSelectComponent);
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1499
|
+
optionViewValue = computed(() => {
|
|
1500
|
+
const options = this.selectComponent.selectedOptions();
|
|
1501
|
+
if (!options.length) {
|
|
1502
|
+
return null;
|
|
1503
|
+
}
|
|
1504
|
+
return options
|
|
1505
|
+
.map((option) => option.cdkOption.element.textContent?.trim() ?? '')
|
|
1506
|
+
.join(', ');
|
|
1494
1507
|
});
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
this.checkIfHasCustomLabel();
|
|
1498
|
-
}
|
|
1499
|
-
checkIfHasCustomLabel() {
|
|
1500
|
-
this.hasCustomLabel.set(!!this.content()?.nativeElement.children.length);
|
|
1501
|
-
}
|
|
1502
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1503
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectTriggerComponent, isStandalone: true, selector: "ga-select-trigger", inputs: { leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "click": "selectComponent.toggle()", "keydown.arrowdown": "selectComponent.open(); $event.preventDefault()", "keydown.space": "selectComponent.open(); $event.preventDefault()", "keydown.enter": "selectComponent.open(); $event.preventDefault()" }, properties: { "class.ga-select--expanded": "selectComponent.isOpen()", "class.ga-select--disabled": "selectComponent.disabled()", "class.ga-select--invalid": "selectComponent.invalid()", "class.ga-select--empty": "!selectComponent.hasValue()", "attr.aria-expanded": "selectComponent.isOpen()", "attr.aria-controls": "selectComponent.listboxId()", "attr.aria-invalid": "selectComponent.invalid()", "attr.aria-disabled": "selectComponent.disabled()", "attr.aria-activedescendant": "selectComponent.activeDescendantId()", "attr.tabindex": "selectComponent.disabled() ? -1 : 0" }, classAttribute: "ga-select" }, providers: [
|
|
1504
|
-
{
|
|
1505
|
-
provide: GA_SELECT_TRIGGER,
|
|
1506
|
-
useExisting: forwardRef(() => GaSelectTriggerComponent),
|
|
1507
|
-
},
|
|
1508
|
-
], viewQueries: [{ propertyName: "content", first: true, predicate: ["ngContent"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()\" />\n}\n@if (selectComponent.hasValue()) {\n <div class=\"ga-select__value\">\n <span #ngContent (cdkObserveContent)=\"checkIfHasCustomLabel()\">\n <ng-content />\n </span>\n @if (!hasCustomLabel()) {\n <ga-select-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ selectComponent.placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\n", dependencies: [{ kind: "ngmodule", type: GaInputModule }, { kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }, { kind: "component", type: GaSelectValueComponent, selector: "ga-select-value" }, { kind: "ngmodule", type: ObserversModule }, { kind: "directive", type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }] });
|
|
1509
|
-
}
|
|
1510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectTriggerComponent, decorators: [{
|
|
1511
|
-
type: Component,
|
|
1512
|
-
args: [{ selector: 'ga-select-trigger', imports: [
|
|
1513
|
-
GaInputModule,
|
|
1514
|
-
GaIconModule,
|
|
1515
|
-
GaSelectValueComponent,
|
|
1516
|
-
ObserversModule,
|
|
1517
|
-
], providers: [
|
|
1518
|
-
{
|
|
1519
|
-
provide: GA_SELECT_TRIGGER,
|
|
1520
|
-
useExisting: forwardRef(() => GaSelectTriggerComponent),
|
|
1521
|
-
},
|
|
1522
|
-
], host: {
|
|
1523
|
-
role: 'combobox',
|
|
1524
|
-
class: 'ga-select',
|
|
1525
|
-
'[class.ga-select--expanded]': 'selectComponent.isOpen()',
|
|
1526
|
-
'[class.ga-select--disabled]': 'selectComponent.disabled()',
|
|
1527
|
-
'[class.ga-select--invalid]': 'selectComponent.invalid()',
|
|
1528
|
-
'[class.ga-select--empty]': '!selectComponent.hasValue()',
|
|
1529
|
-
'aria-haspopup': 'listbox',
|
|
1530
|
-
'[attr.aria-expanded]': 'selectComponent.isOpen()',
|
|
1531
|
-
'[attr.aria-controls]': 'selectComponent.listboxId()',
|
|
1532
|
-
'[attr.aria-invalid]': 'selectComponent.invalid()',
|
|
1533
|
-
'[attr.aria-disabled]': 'selectComponent.disabled()',
|
|
1534
|
-
'[attr.aria-activedescendant]': 'selectComponent.activeDescendantId()',
|
|
1535
|
-
'[attr.tabindex]': 'selectComponent.disabled() ? -1 : 0',
|
|
1536
|
-
'(click)': 'selectComponent.toggle()',
|
|
1537
|
-
'(keydown.arrowdown)': 'selectComponent.open(); $event.preventDefault()',
|
|
1538
|
-
'(keydown.space)': 'selectComponent.open(); $event.preventDefault()',
|
|
1539
|
-
'(keydown.enter)': 'selectComponent.open(); $event.preventDefault()',
|
|
1540
|
-
}, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()\" />\n}\n@if (selectComponent.hasValue()) {\n <div class=\"ga-select__value\">\n <span #ngContent (cdkObserveContent)=\"checkIfHasCustomLabel()\">\n <ng-content />\n </span>\n @if (!hasCustomLabel()) {\n <ga-select-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ selectComponent.placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\n" }]
|
|
1541
|
-
}] });
|
|
1542
|
-
|
|
1543
|
-
class GaSelectCustomTriggerComponent {
|
|
1544
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectCustomTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1545
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: GaSelectCustomTriggerComponent, isStandalone: true, selector: "ga-select-custom-trigger", providers: [
|
|
1546
|
-
{
|
|
1547
|
-
provide: GA_SELECT_TRIGGER,
|
|
1548
|
-
useExisting: forwardRef(() => GaSelectCustomTriggerComponent),
|
|
1549
|
-
},
|
|
1550
|
-
], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
|
1508
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDefaultValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1509
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: GaSelectDefaultValueComponent, isStandalone: true, selector: "ga-select-default-value", ngImport: i0, template: `{{ optionViewValue() }}`, isInline: true });
|
|
1551
1510
|
}
|
|
1552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type:
|
|
1511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDefaultValueComponent, decorators: [{
|
|
1553
1512
|
type: Component,
|
|
1554
1513
|
args: [{
|
|
1555
|
-
selector: 'ga-select-
|
|
1556
|
-
template:
|
|
1557
|
-
providers: [
|
|
1558
|
-
{
|
|
1559
|
-
provide: GA_SELECT_TRIGGER,
|
|
1560
|
-
useExisting: forwardRef(() => GaSelectCustomTriggerComponent),
|
|
1561
|
-
},
|
|
1562
|
-
],
|
|
1514
|
+
selector: 'ga-select-default-value',
|
|
1515
|
+
template: `{{ optionViewValue() }}`,
|
|
1563
1516
|
}]
|
|
1564
1517
|
}] });
|
|
1565
1518
|
|
|
1519
|
+
let nextUniqueId = 0;
|
|
1566
1520
|
class GaSelectComponent {
|
|
1521
|
+
_uniqueId = `ga-select-${++nextUniqueId}`;
|
|
1567
1522
|
focusedTriggerElement = null;
|
|
1568
1523
|
_onTouched;
|
|
1569
1524
|
_onModelChanged;
|
|
@@ -1582,8 +1537,23 @@ class GaSelectComponent {
|
|
|
1582
1537
|
overlayY: 'bottom',
|
|
1583
1538
|
offsetY: -8,
|
|
1584
1539
|
},
|
|
1540
|
+
{
|
|
1541
|
+
originX: 'start',
|
|
1542
|
+
originY: 'bottom',
|
|
1543
|
+
overlayX: 'start',
|
|
1544
|
+
overlayY: 'top',
|
|
1545
|
+
offsetY: 8,
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
originX: 'start',
|
|
1549
|
+
originY: 'top',
|
|
1550
|
+
overlayX: 'start',
|
|
1551
|
+
overlayY: 'bottom',
|
|
1552
|
+
offsetY: -8,
|
|
1553
|
+
},
|
|
1585
1554
|
];
|
|
1586
1555
|
injector = inject(Injector);
|
|
1556
|
+
overlayOrigin = inject(CdkOverlayOrigin);
|
|
1587
1557
|
implicitInvalid = signal(false);
|
|
1588
1558
|
_isOpen = signal(false);
|
|
1589
1559
|
value = model(null);
|
|
@@ -1598,19 +1568,25 @@ class GaSelectComponent {
|
|
|
1598
1568
|
});
|
|
1599
1569
|
multiple = input(false, { transform: booleanAttribute });
|
|
1600
1570
|
compareWith = input();
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1571
|
+
searchable = input(false, { transform: booleanAttribute });
|
|
1572
|
+
textValue = model('');
|
|
1573
|
+
leftIcon = input();
|
|
1574
|
+
idInput = input(null, { alias: 'id' });
|
|
1604
1575
|
// TODO: if we rename this to options, it breaks, why?
|
|
1605
1576
|
gaOptions = contentChildren(GaOptionComponent, {
|
|
1606
1577
|
descendants: true,
|
|
1607
1578
|
read: GaOptionComponent,
|
|
1608
1579
|
});
|
|
1609
1580
|
cdkListbox = contentChild.required(CdkListbox);
|
|
1610
|
-
|
|
1581
|
+
customSelectValue = contentChild(GaSelectValueComponent);
|
|
1582
|
+
inputSearch = viewChild('inputSearch');
|
|
1583
|
+
content = viewChild('ngContent', { read: ElementRef });
|
|
1584
|
+
id = computed(() => {
|
|
1585
|
+
return this.idInput() ?? this._uniqueId;
|
|
1586
|
+
});
|
|
1611
1587
|
isOpen = this._isOpen.asReadonly();
|
|
1612
1588
|
disabled = linkedSignal(() => this.disabledInput());
|
|
1613
|
-
|
|
1589
|
+
menuStatusIcon = computed(() => {
|
|
1614
1590
|
return this._isOpen() ? ChevronUp : ChevronDown;
|
|
1615
1591
|
});
|
|
1616
1592
|
selectedOptions = computed(() => {
|
|
@@ -1630,7 +1606,7 @@ class GaSelectComponent {
|
|
|
1630
1606
|
invalid = computed(() => {
|
|
1631
1607
|
return this.invalidInput() ?? this.implicitInvalid();
|
|
1632
1608
|
});
|
|
1633
|
-
|
|
1609
|
+
_formControlId = computed(() => this.id());
|
|
1634
1610
|
constructor() {
|
|
1635
1611
|
effect(() => {
|
|
1636
1612
|
// if the select became disabled while open, close it
|
|
@@ -1642,7 +1618,7 @@ class GaSelectComponent {
|
|
|
1642
1618
|
ngAfterContentInit() {
|
|
1643
1619
|
effect(() => {
|
|
1644
1620
|
this.cdkListbox().multiple = this.multiple();
|
|
1645
|
-
this.cdkListbox().useActiveDescendant = this.
|
|
1621
|
+
this.cdkListbox().useActiveDescendant = this.searchable();
|
|
1646
1622
|
this.cdkListbox().compareWith = this.compareWith();
|
|
1647
1623
|
this.cdkListbox().value = this.multiple()
|
|
1648
1624
|
? this.value()
|
|
@@ -1658,12 +1634,6 @@ class GaSelectComponent {
|
|
|
1658
1634
|
// this is needed because value could be also changed via keyboard
|
|
1659
1635
|
this.autoClose();
|
|
1660
1636
|
});
|
|
1661
|
-
if (isDevMode() &&
|
|
1662
|
-
this.explicitTrigger() instanceof GaSelectCustomTriggerComponent) {
|
|
1663
|
-
if (this.multiple()) {
|
|
1664
|
-
console.warn('<ga-select>: The `multiple` property requires custom handling when using a custom trigger component. If you have implemented the multiple selection logic in your custom trigger, you can ignore this warning. [This message is visible in dev mode only]');
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
1637
|
}
|
|
1668
1638
|
ngDoCheck() {
|
|
1669
1639
|
const implicitNgControl = this.injector.get(NgControl, null);
|
|
@@ -1694,17 +1664,15 @@ class GaSelectComponent {
|
|
|
1694
1664
|
}
|
|
1695
1665
|
open() {
|
|
1696
1666
|
if (this.disabled() || this._isOpen()) {
|
|
1697
|
-
return
|
|
1667
|
+
return;
|
|
1698
1668
|
}
|
|
1699
1669
|
this._isOpen.set(true);
|
|
1700
|
-
return firstValueFrom(outputToObservable(this.opened));
|
|
1701
1670
|
}
|
|
1702
1671
|
close() {
|
|
1703
1672
|
if (!this._isOpen()) {
|
|
1704
|
-
return
|
|
1673
|
+
return;
|
|
1705
1674
|
}
|
|
1706
1675
|
this._isOpen.set(false);
|
|
1707
|
-
return firstValueFrom(outputToObservable(this.closed));
|
|
1708
1676
|
}
|
|
1709
1677
|
autoClose() {
|
|
1710
1678
|
// close that was initiated by clicking the option
|
|
@@ -1737,19 +1705,44 @@ class GaSelectComponent {
|
|
|
1737
1705
|
this.value.set(value);
|
|
1738
1706
|
}
|
|
1739
1707
|
}
|
|
1708
|
+
onInputKeyDown(event) {
|
|
1709
|
+
switch (event.code) {
|
|
1710
|
+
case 'ArrowDown':
|
|
1711
|
+
this.setNextItemActive();
|
|
1712
|
+
event.preventDefault();
|
|
1713
|
+
event.stopPropagation();
|
|
1714
|
+
break;
|
|
1715
|
+
case 'ArrowUp':
|
|
1716
|
+
this.setPreviousItemActive();
|
|
1717
|
+
event.preventDefault();
|
|
1718
|
+
event.stopPropagation();
|
|
1719
|
+
break;
|
|
1720
|
+
case 'Space':
|
|
1721
|
+
event.stopPropagation();
|
|
1722
|
+
break;
|
|
1723
|
+
case 'Enter':
|
|
1724
|
+
this.setActiveItemAsSelected();
|
|
1725
|
+
this.autoClose();
|
|
1726
|
+
event.preventDefault();
|
|
1727
|
+
event.stopPropagation();
|
|
1728
|
+
break;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1740
1731
|
onOverlayAttach() {
|
|
1741
1732
|
this._isOpen.set(true);
|
|
1742
1733
|
this.focusedTriggerElement = document.activeElement;
|
|
1743
|
-
this.
|
|
1744
|
-
|
|
1734
|
+
if (this.searchable()) {
|
|
1735
|
+
this.inputSearch().nativeElement.focus();
|
|
1736
|
+
}
|
|
1737
|
+
else {
|
|
1745
1738
|
this.focusListbox();
|
|
1746
1739
|
}
|
|
1747
1740
|
}
|
|
1748
1741
|
onOverlayDetach() {
|
|
1749
1742
|
this._isOpen.set(false);
|
|
1750
1743
|
this.focusedTriggerElement?.focus();
|
|
1744
|
+
this.textValue.set('');
|
|
1751
1745
|
this._onTouched?.();
|
|
1752
|
-
this.closed.emit();
|
|
1753
1746
|
}
|
|
1754
1747
|
setItemActive(direction) {
|
|
1755
1748
|
const options = this.gaOptions();
|
|
@@ -1771,13 +1764,17 @@ class GaSelectComponent {
|
|
|
1771
1764
|
}
|
|
1772
1765
|
}
|
|
1773
1766
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1774
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectComponent, isStandalone: true, selector: "ga-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange",
|
|
1767
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectComponent, isStandalone: true, selector: "ga-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, textValue: { classPropertyName: "textValue", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", textValue: "textValueChange" }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "click": "toggle()", "keydown.arrowdown": "open(); $event.preventDefault()", "keydown.space": "open(); $event.preventDefault()", "keydown.enter": "open(); $event.preventDefault()" }, properties: { "attr.id": "id()", "class.ga-select--expanded": "isOpen()", "class.ga-select--disabled": "disabled()", "class.ga-select--invalid": "invalid()", "class.ga-select--empty": "!hasValue()", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "cdkListbox().id", "attr.aria-invalid": "invalid()", "attr.aria-disabled": "disabled()", "attr.aria-owns": "searchable() ? cdkListbox().id : null", "attr.aria-activedescendant": "!searchable() ? activeDescendantId() : null", "attr.tabindex": "disabled() ? -1 : 0" }, classAttribute: "ga-select" }, providers: [
|
|
1775
1768
|
{
|
|
1776
1769
|
provide: NG_VALUE_ACCESSOR,
|
|
1777
1770
|
useExisting: forwardRef(() => GaSelectComponent),
|
|
1778
1771
|
multi: true,
|
|
1779
1772
|
},
|
|
1780
|
-
|
|
1773
|
+
{
|
|
1774
|
+
provide: GA_FORM_CONTROL,
|
|
1775
|
+
useExisting: forwardRef(() => GaSelectComponent),
|
|
1776
|
+
},
|
|
1777
|
+
], 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$3.CdkOverlayOrigin }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()\" />\n}\n@if (searchable() && isOpen()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"textValue.set(inputSearch.value)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n} @else if (hasValue()) {\n <div class=\"ga-select__value\">\n @if (customSelectValue()) {\n <ng-content select=\"ga-select-value\" />\n } @else {\n <ga-select-default-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\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", 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$3.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" }] });
|
|
1781
1778
|
}
|
|
1782
1779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComponent, decorators: [{
|
|
1783
1780
|
type: Component,
|
|
@@ -1785,14 +1782,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
1785
1782
|
GaIconModule,
|
|
1786
1783
|
GaButtonModule,
|
|
1787
1784
|
OverlayModule,
|
|
1788
|
-
|
|
1789
|
-
], providers: [
|
|
1785
|
+
GaSelectDefaultValueComponent,
|
|
1786
|
+
], hostDirectives: [CdkOverlayOrigin], providers: [
|
|
1790
1787
|
{
|
|
1791
1788
|
provide: NG_VALUE_ACCESSOR,
|
|
1792
1789
|
useExisting: forwardRef(() => GaSelectComponent),
|
|
1793
1790
|
multi: true,
|
|
1794
1791
|
},
|
|
1795
|
-
|
|
1792
|
+
{
|
|
1793
|
+
provide: GA_FORM_CONTROL,
|
|
1794
|
+
useExisting: forwardRef(() => GaSelectComponent),
|
|
1795
|
+
},
|
|
1796
|
+
], host: {
|
|
1797
|
+
role: 'combobox',
|
|
1798
|
+
'[attr.id]': 'id()',
|
|
1799
|
+
class: 'ga-select',
|
|
1800
|
+
'[class.ga-select--expanded]': 'isOpen()',
|
|
1801
|
+
'[class.ga-select--disabled]': 'disabled()',
|
|
1802
|
+
'[class.ga-select--invalid]': 'invalid()',
|
|
1803
|
+
'[class.ga-select--empty]': '!hasValue()',
|
|
1804
|
+
'aria-haspopup': 'listbox',
|
|
1805
|
+
'[attr.aria-expanded]': 'isOpen()',
|
|
1806
|
+
'[attr.aria-controls]': 'cdkListbox().id',
|
|
1807
|
+
'[attr.aria-invalid]': 'invalid()',
|
|
1808
|
+
'[attr.aria-disabled]': 'disabled()',
|
|
1809
|
+
'[attr.aria-owns]': 'searchable() ? cdkListbox().id : null',
|
|
1810
|
+
'[attr.aria-activedescendant]': '!searchable() ? activeDescendantId() : null',
|
|
1811
|
+
'[attr.tabindex]': 'disabled() ? -1 : 0',
|
|
1812
|
+
'(click)': 'toggle()',
|
|
1813
|
+
'(keydown.arrowdown)': 'open(); $event.preventDefault()',
|
|
1814
|
+
'(keydown.space)': 'open(); $event.preventDefault()',
|
|
1815
|
+
'(keydown.enter)': 'open(); $event.preventDefault()',
|
|
1816
|
+
}, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()\" />\n}\n@if (searchable() && isOpen()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"textValue.set(inputSearch.value)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n} @else if (hasValue()) {\n <div class=\"ga-select__value\">\n @if (customSelectValue()) {\n <ng-content select=\"ga-select-value\" />\n } @else {\n <ga-select-default-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\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" }]
|
|
1796
1817
|
}], ctorParameters: () => [] });
|
|
1797
1818
|
|
|
1798
1819
|
class GaOptgroupComponent {
|
|
@@ -1905,14 +1926,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
1905
1926
|
}]
|
|
1906
1927
|
}] });
|
|
1907
1928
|
|
|
1908
|
-
class
|
|
1909
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type:
|
|
1910
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type:
|
|
1929
|
+
class GaSelectDropdownLoadingComponent {
|
|
1930
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDropdownLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1931
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: GaSelectDropdownLoadingComponent, isStandalone: true, selector: "ga-select-dropdown-loader", host: { classAttribute: "ga-dropdown__content-spinner" }, ngImport: i0, template: `<ga-spinner size="16" />`, isInline: true, dependencies: [{ kind: "ngmodule", type: GaSpinnerModule }, { kind: "component", type: GaSpinnerComponent, selector: "ga-spinner", inputs: ["size"] }] });
|
|
1911
1932
|
}
|
|
1912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type:
|
|
1933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDropdownLoadingComponent, decorators: [{
|
|
1913
1934
|
type: Component,
|
|
1914
1935
|
args: [{
|
|
1915
|
-
selector: 'ga-select-
|
|
1936
|
+
selector: 'ga-select-dropdown-loader',
|
|
1916
1937
|
template: `<ga-spinner size="16" />`,
|
|
1917
1938
|
imports: [GaSpinnerModule],
|
|
1918
1939
|
host: {
|
|
@@ -1921,121 +1942,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
1921
1942
|
}]
|
|
1922
1943
|
}] });
|
|
1923
1944
|
|
|
1924
|
-
class
|
|
1945
|
+
class GaSelectDropdownComponent {
|
|
1925
1946
|
loading = input(false, { transform: booleanAttribute });
|
|
1926
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type:
|
|
1927
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type:
|
|
1947
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1948
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", 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$2.CdkListbox }], ngImport: i0, template: "@if (loading()) {\n <ga-select-dropdown-loader />\n} @else {\n <ng-content />\n}\n", dependencies: [{ kind: "component", type: GaSelectDropdownLoadingComponent, selector: "ga-select-dropdown-loader" }] });
|
|
1928
1949
|
}
|
|
1929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type:
|
|
1950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDropdownComponent, decorators: [{
|
|
1930
1951
|
type: Component,
|
|
1931
|
-
args: [{ selector: 'ga-select-
|
|
1952
|
+
args: [{ selector: 'ga-select-dropdown', imports: [GaSelectDropdownLoadingComponent], hostDirectives: [CdkListbox], host: {
|
|
1932
1953
|
class: 'ga-dropdown ga-dropdown__content',
|
|
1933
|
-
}, template: "@if (loading()) {\n <ga-select-
|
|
1954
|
+
}, template: "@if (loading()) {\n <ga-select-dropdown-loader />\n} @else {\n <ng-content />\n}\n" }]
|
|
1934
1955
|
}] });
|
|
1935
1956
|
|
|
1936
|
-
class GaSelectComboboxTriggerComponent {
|
|
1937
|
-
injector = inject(Injector);
|
|
1938
|
-
selectComponent = inject(GaSelectComponent);
|
|
1939
|
-
content = viewChild('ngContent', { read: ElementRef });
|
|
1940
|
-
inputSearch = viewChild('inputSearch');
|
|
1941
|
-
hasCustomLabel = signal(false);
|
|
1942
|
-
menuStatusIcon = computed(() => {
|
|
1943
|
-
return this.selectComponent.isOpen() ? ChevronUp : ChevronDown;
|
|
1944
|
-
});
|
|
1945
|
-
textValue = model('');
|
|
1946
|
-
leftIcon = input();
|
|
1947
|
-
constructor() {
|
|
1948
|
-
this.selectComponent.withoutAutoFocus.set(true);
|
|
1949
|
-
this.selectComponent.opened.subscribe(() => {
|
|
1950
|
-
afterNextRender(() => {
|
|
1951
|
-
this.inputSearch().nativeElement.focus();
|
|
1952
|
-
}, { injector: this.injector });
|
|
1953
|
-
});
|
|
1954
|
-
this.selectComponent.closed.subscribe(() => this.textValue.set(''));
|
|
1955
|
-
}
|
|
1956
|
-
ngAfterViewInit() {
|
|
1957
|
-
this.checkIfHasCustomLabel();
|
|
1958
|
-
}
|
|
1959
|
-
checkIfHasCustomLabel() {
|
|
1960
|
-
this.hasCustomLabel.set(!!this.content()?.nativeElement.children.length);
|
|
1961
|
-
}
|
|
1962
|
-
toggle() {
|
|
1963
|
-
if (this.selectComponent.disabled()) {
|
|
1964
|
-
return;
|
|
1965
|
-
}
|
|
1966
|
-
if (!this.selectComponent.isOpen()) {
|
|
1967
|
-
this.open();
|
|
1968
|
-
}
|
|
1969
|
-
else {
|
|
1970
|
-
this.selectComponent.close();
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
open() {
|
|
1974
|
-
this.selectComponent.open();
|
|
1975
|
-
}
|
|
1976
|
-
onInputKeyDown(event) {
|
|
1977
|
-
switch (event.code) {
|
|
1978
|
-
case 'ArrowDown':
|
|
1979
|
-
this.selectComponent.setNextItemActive();
|
|
1980
|
-
event.preventDefault();
|
|
1981
|
-
event.stopPropagation();
|
|
1982
|
-
break;
|
|
1983
|
-
case 'ArrowUp':
|
|
1984
|
-
this.selectComponent.setPreviousItemActive();
|
|
1985
|
-
event.preventDefault();
|
|
1986
|
-
event.stopPropagation();
|
|
1987
|
-
break;
|
|
1988
|
-
case 'Space':
|
|
1989
|
-
event.stopPropagation();
|
|
1990
|
-
break;
|
|
1991
|
-
case 'Enter':
|
|
1992
|
-
this.selectComponent.setActiveItemAsSelected();
|
|
1993
|
-
this.selectComponent.autoClose();
|
|
1994
|
-
event.preventDefault();
|
|
1995
|
-
event.stopPropagation();
|
|
1996
|
-
break;
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComboboxTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2000
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectComboboxTriggerComponent, isStandalone: true, selector: "ga-select-searchable-trigger", inputs: { textValue: { classPropertyName: "textValue", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { textValue: "textValueChange" }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "click": "toggle()", "keydown.arrowdown": "open(); $event.preventDefault()", "keydown.space": "open(); $event.preventDefault()", "keydown.enter": "open(); $event.preventDefault()" }, properties: { "class.ga-select--expanded": "selectComponent.isOpen()", "class.ga-select--disabled": "selectComponent.disabled()", "class.ga-select--invalid": "selectComponent.invalid()", "class.ga-select--empty": "!selectComponent.hasValue()", "attr.aria-expanded": "selectComponent.isOpen()", "attr.aria-owns": "selectComponent.listboxId()", "attr.aria-invalid": "selectComponent.invalid()", "attr.aria-disabled": "selectComponent.disabled()", "attr.tabindex": "selectComponent.disabled() ? -1 : 0" }, classAttribute: "ga-select" }, providers: [
|
|
2001
|
-
{
|
|
2002
|
-
provide: GA_SELECT_TRIGGER,
|
|
2003
|
-
useExisting: forwardRef(() => GaSelectComboboxTriggerComponent),
|
|
2004
|
-
},
|
|
2005
|
-
], viewQueries: [{ propertyName: "content", first: true, predicate: ["ngContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()\" />\n}\n@if (selectComponent.isOpen()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"textValue.set(inputSearch.value)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-expanded]=\"selectComponent.isOpen()\"\n [attr.aria-controls]=\"selectComponent.listboxId()\"\n [attr.aria-activedescendant]=\"selectComponent.activeDescendantId()\"\n [placeholder]=\"selectComponent.placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n} @else if (selectComponent.hasValue()) {\n <div class=\"ga-select__value\">\n <span #ngContent (cdkObserveContent)=\"checkIfHasCustomLabel()\">\n <ng-content />\n </span>\n @if (!hasCustomLabel()) {\n <ga-select-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ selectComponent.placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\n", dependencies: [{ kind: "ngmodule", type: GaInputModule }, { kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }, { kind: "component", type: GaSelectValueComponent, selector: "ga-select-value" }, { kind: "ngmodule", type: ObserversModule }, { kind: "directive", type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }] });
|
|
2006
|
-
}
|
|
2007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComboboxTriggerComponent, decorators: [{
|
|
2008
|
-
type: Component,
|
|
2009
|
-
args: [{ selector: 'ga-select-searchable-trigger', imports: [
|
|
2010
|
-
GaInputModule,
|
|
2011
|
-
GaIconModule,
|
|
2012
|
-
GaSelectValueComponent,
|
|
2013
|
-
ObserversModule,
|
|
2014
|
-
], providers: [
|
|
2015
|
-
{
|
|
2016
|
-
provide: GA_SELECT_TRIGGER,
|
|
2017
|
-
useExisting: forwardRef(() => GaSelectComboboxTriggerComponent),
|
|
2018
|
-
},
|
|
2019
|
-
], host: {
|
|
2020
|
-
role: 'combobox',
|
|
2021
|
-
class: 'ga-select',
|
|
2022
|
-
'[class.ga-select--expanded]': 'selectComponent.isOpen()',
|
|
2023
|
-
'[class.ga-select--disabled]': 'selectComponent.disabled()',
|
|
2024
|
-
'[class.ga-select--invalid]': 'selectComponent.invalid()',
|
|
2025
|
-
'[class.ga-select--empty]': '!selectComponent.hasValue()',
|
|
2026
|
-
'aria-haspopup': 'listbox',
|
|
2027
|
-
'[attr.aria-expanded]': 'selectComponent.isOpen()',
|
|
2028
|
-
'[attr.aria-owns]': 'selectComponent.listboxId()',
|
|
2029
|
-
'[attr.aria-invalid]': 'selectComponent.invalid()',
|
|
2030
|
-
'[attr.aria-disabled]': 'selectComponent.disabled()',
|
|
2031
|
-
'[attr.tabindex]': 'selectComponent.disabled() ? -1 : 0',
|
|
2032
|
-
'(click)': 'toggle()',
|
|
2033
|
-
'(keydown.arrowdown)': 'open(); $event.preventDefault()',
|
|
2034
|
-
'(keydown.space)': 'open(); $event.preventDefault()',
|
|
2035
|
-
'(keydown.enter)': 'open(); $event.preventDefault()',
|
|
2036
|
-
}, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()\" />\n}\n@if (selectComponent.isOpen()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"textValue.set(inputSearch.value)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-expanded]=\"selectComponent.isOpen()\"\n [attr.aria-controls]=\"selectComponent.listboxId()\"\n [attr.aria-activedescendant]=\"selectComponent.activeDescendantId()\"\n [placeholder]=\"selectComponent.placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n} @else if (selectComponent.hasValue()) {\n <div class=\"ga-select__value\">\n <span #ngContent (cdkObserveContent)=\"checkIfHasCustomLabel()\">\n <ng-content />\n </span>\n @if (!hasCustomLabel()) {\n <ga-select-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ selectComponent.placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\n" }]
|
|
2037
|
-
}], ctorParameters: () => [] });
|
|
2038
|
-
|
|
2039
1957
|
const GA_SELECT_REQUIRED_VALIDATOR = {
|
|
2040
1958
|
provide: NG_VALIDATORS,
|
|
2041
1959
|
useExisting: forwardRef(() => GaSelectRequiredValidator),
|
|
@@ -2058,24 +1976,18 @@ class GaSelectModule {
|
|
|
2058
1976
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: GaSelectModule, imports: [GaSelectComponent,
|
|
2059
1977
|
GaOptionComponent,
|
|
2060
1978
|
GaOptgroupComponent,
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
GaSelectComboboxTriggerComponent,
|
|
2065
|
-
GaSelectContentLoadingComponent,
|
|
1979
|
+
GaSelectDropdownComponent,
|
|
1980
|
+
GaSelectDropdownLoadingComponent,
|
|
1981
|
+
GaSelectValueComponent,
|
|
2066
1982
|
GaSelectRequiredValidator], exports: [GaSelectComponent,
|
|
2067
1983
|
GaOptionComponent,
|
|
2068
1984
|
GaOptgroupComponent,
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
GaSelectTriggerComponent,
|
|
2073
|
-
GaSelectContentLoadingComponent,
|
|
1985
|
+
GaSelectDropdownComponent,
|
|
1986
|
+
GaSelectDropdownLoadingComponent,
|
|
1987
|
+
GaSelectValueComponent,
|
|
2074
1988
|
GaSelectRequiredValidator] });
|
|
2075
1989
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectModule, imports: [GaSelectComponent,
|
|
2076
|
-
GaOptionComponent
|
|
2077
|
-
GaSelectTriggerComponent,
|
|
2078
|
-
GaSelectComboboxTriggerComponent] });
|
|
1990
|
+
GaOptionComponent] });
|
|
2079
1991
|
}
|
|
2080
1992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectModule, decorators: [{
|
|
2081
1993
|
type: NgModule,
|
|
@@ -2084,22 +1996,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
2084
1996
|
GaSelectComponent,
|
|
2085
1997
|
GaOptionComponent,
|
|
2086
1998
|
GaOptgroupComponent,
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
GaSelectComboboxTriggerComponent,
|
|
2091
|
-
GaSelectContentLoadingComponent,
|
|
1999
|
+
GaSelectDropdownComponent,
|
|
2000
|
+
GaSelectDropdownLoadingComponent,
|
|
2001
|
+
GaSelectValueComponent,
|
|
2092
2002
|
GaSelectRequiredValidator,
|
|
2093
2003
|
],
|
|
2094
2004
|
exports: [
|
|
2095
2005
|
GaSelectComponent,
|
|
2096
2006
|
GaOptionComponent,
|
|
2097
2007
|
GaOptgroupComponent,
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
GaSelectTriggerComponent,
|
|
2102
|
-
GaSelectContentLoadingComponent,
|
|
2008
|
+
GaSelectDropdownComponent,
|
|
2009
|
+
GaSelectDropdownLoadingComponent,
|
|
2010
|
+
GaSelectValueComponent,
|
|
2103
2011
|
GaSelectRequiredValidator,
|
|
2104
2012
|
],
|
|
2105
2013
|
}]
|
|
@@ -2113,5 +2021,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
2113
2021
|
* Generated bundle index. Do not edit.
|
|
2114
2022
|
*/
|
|
2115
2023
|
|
|
2116
|
-
export { CHECKBOX_CONTROL_VALUE_ACCESSOR, GA_ALERT_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_FORM_CONTROL, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormFieldComponent, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlModule,
|
|
2024
|
+
export { CHECKBOX_CONTROL_VALUE_ACCESSOR, GA_ALERT_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_FORM_CONTROL, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormFieldComponent, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlModule, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownLoadingComponent, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, provideGaAlertI18n };
|
|
2117
2025
|
//# sourceMappingURL=vsn-ux-ngx-gaia.mjs.map
|