@basis-ng/primitives 0.0.1-alpha.6 → 0.0.1-alpha.8
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/core/components/select/option.component.d.ts +22 -0
- package/core/components/select/{select-content.component.d.ts → options-list.component.d.ts} +8 -13
- package/core/components/select/select.component.d.ts +21 -9
- package/fesm2022/basis-ng-primitives.mjs +49 -39
- package/fesm2022/basis-ng-primitives.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -2
- package/core/components/select/select-option.component.d.ts +0 -22
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CdkOption } from '@angular/cdk/listbox';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/cdk/listbox";
|
|
5
|
+
/**
|
|
6
|
+
* Component representing an individual option in a select or combobox.
|
|
7
|
+
* This component integrates with Angular CDK Option to manage the option's state and behavior.
|
|
8
|
+
*/
|
|
9
|
+
export declare class OptionComponent {
|
|
10
|
+
/**
|
|
11
|
+
* The `ElementRef` of the option.
|
|
12
|
+
* This provides direct access to the DOM element of the option.
|
|
13
|
+
*/
|
|
14
|
+
el: ElementRef<any>;
|
|
15
|
+
/**
|
|
16
|
+
* The `CdkOption` instance associated with this option.
|
|
17
|
+
* This provides methods and properties for managing the option's state, such as selection and value.
|
|
18
|
+
*/
|
|
19
|
+
cdkOption: CdkOption<any>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "li[b-option]", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkOption; inputs: { "cdkOption": "value"; }; outputs: {}; }]>;
|
|
22
|
+
}
|
package/core/components/select/{select-content.component.d.ts → options-list.component.d.ts}
RENAMED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import { CdkListbox } from '@angular/cdk/listbox';
|
|
2
2
|
import { ElementRef } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { OptionComponent } from './option.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "@angular/cdk/listbox";
|
|
6
6
|
/**
|
|
7
|
-
* Component representing the
|
|
7
|
+
* Component representing the list of options in a select or combobox.
|
|
8
8
|
* This component integrates with Angular CDK Listbox to manage options and their selection.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class OptionsListComponent {
|
|
11
11
|
/**
|
|
12
12
|
* Signal representing the selected values in the listbox.
|
|
13
13
|
* This is an array of strings corresponding to the selected option values.
|
|
14
14
|
*/
|
|
15
15
|
readonly value: import("@angular/core").WritableSignal<string[]>;
|
|
16
|
-
/**
|
|
17
|
-
* Signal representing the content of the selected option(s).
|
|
18
|
-
* This is a string that can be used to display the selected option(s).
|
|
19
|
-
*/
|
|
20
|
-
readonly content: import("@angular/core").WritableSignal<string>;
|
|
21
16
|
/**
|
|
22
17
|
* Event emitter triggered when the dropdown should close.
|
|
23
18
|
* This is used to notify the parent component to close the dropdown.
|
|
@@ -25,7 +20,7 @@ export declare class SelectContentComponent {
|
|
|
25
20
|
closeEmitter: import("@angular/core").OutputEmitterRef<void>;
|
|
26
21
|
/**
|
|
27
22
|
* Reference to the host element of the component.
|
|
28
|
-
* This provides access to the DOM element of the
|
|
23
|
+
* This provides access to the DOM element of the options list.
|
|
29
24
|
*/
|
|
30
25
|
el: ElementRef<any>;
|
|
31
26
|
/**
|
|
@@ -40,9 +35,9 @@ export declare class SelectContentComponent {
|
|
|
40
35
|
listBox: CdkListbox<any>;
|
|
41
36
|
/**
|
|
42
37
|
* Reference to the list of options in the dropdown.
|
|
43
|
-
* This is a collection of `
|
|
38
|
+
* This is a collection of `OptionComponent` instances representing the available options.
|
|
44
39
|
*/
|
|
45
|
-
readonly options: import("@angular/core").Signal<readonly
|
|
40
|
+
readonly options: import("@angular/core").Signal<readonly OptionComponent[]>;
|
|
46
41
|
/**
|
|
47
42
|
* Handles changes to the selected value in the listbox.
|
|
48
43
|
* This method updates the `value` signal, emits the `closeEmitter` event,
|
|
@@ -51,6 +46,6 @@ export declare class SelectContentComponent {
|
|
|
51
46
|
* @param value - The new array of selected values.
|
|
52
47
|
*/
|
|
53
48
|
handleValueChange(value: string[]): void;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OptionsListComponent, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OptionsListComponent, "ul[b-options-list]", never, { "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, { "closeEmitter": "closeEmitter"; }, ["options"], ["*"], true, [{ directive: typeof i1.CdkListbox; inputs: { "cdkListboxValue": "cdkListboxValue"; }; outputs: { "cdkListboxValueChange": "cdkListboxValueChange"; }; }]>;
|
|
56
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
1
2
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
+
import { OptionsListComponent } from './options-list.component';
|
|
3
4
|
import { Button } from '../button/button.component';
|
|
4
5
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -26,10 +27,10 @@ export declare class SelectComponent implements OnInit, ControlValueAccessor {
|
|
|
26
27
|
* Reference to the content component of the dropdown.
|
|
27
28
|
* This contains the list of selectable options.
|
|
28
29
|
*/
|
|
29
|
-
readonly
|
|
30
|
+
readonly optionsList: import("@angular/core").Signal<OptionsListComponent | undefined>;
|
|
30
31
|
/**
|
|
31
32
|
* Computed signal representing the selected values from the dropdown.
|
|
32
|
-
* This is linked to the value of the `
|
|
33
|
+
* This is linked to the value of the `OptionsListComponent`.
|
|
33
34
|
*/
|
|
34
35
|
readonly value: import("@angular/core").WritableSignal<string[] | undefined>;
|
|
35
36
|
/**
|
|
@@ -49,21 +50,31 @@ export declare class SelectComponent implements OnInit, ControlValueAccessor {
|
|
|
49
50
|
readonly disabled: import("@angular/core").ModelSignal<boolean>;
|
|
50
51
|
/**
|
|
51
52
|
* Computed signal representing the options available in the dropdown.
|
|
52
|
-
* This retrieves the options from the `
|
|
53
|
+
* This retrieves the options from the `OptionsListComponent`.
|
|
53
54
|
*/
|
|
54
|
-
readonly options: import("@angular/core").Signal<readonly import("@basis-ng/primitives").
|
|
55
|
+
readonly options: import("@angular/core").Signal<readonly import("@basis-ng/primitives").OptionComponent[] | undefined>;
|
|
55
56
|
/**
|
|
56
57
|
* Computed signal representing the content of the selected option(s).
|
|
57
58
|
* If no option is selected, it returns the placeholder text.
|
|
58
59
|
*/
|
|
59
60
|
readonly content: import("@angular/core").Signal<string | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Signal representing the delay before closing the dropdown.
|
|
63
|
+
* This is used to provide a smooth transition when closing the dropdown.
|
|
64
|
+
*/
|
|
65
|
+
readonly closeDelay: import("@angular/core").WritableSignal<number>;
|
|
66
|
+
/**
|
|
67
|
+
* Reference to the CdkConnectedOverlay directive.
|
|
68
|
+
* This is used to manage the positioning and visibility of the dropdown overlay.
|
|
69
|
+
*/
|
|
70
|
+
readonly cdkConnectedOverlay: import("@angular/core").Signal<CdkConnectedOverlay | undefined>;
|
|
60
71
|
/**
|
|
61
72
|
* Lifecycle hook that is called after the component is initialized.
|
|
62
73
|
* It sets up the necessary subscriptions for handling value changes.
|
|
63
74
|
*/
|
|
64
75
|
ngOnInit(): void;
|
|
65
76
|
/**
|
|
66
|
-
* Subscribes to the `closeEmitter` of the `
|
|
77
|
+
* Subscribes to the `closeEmitter` of the `OptionsListComponent` to handle
|
|
67
78
|
* changes to the selected value. This ensures the dropdown closes and the
|
|
68
79
|
* value is propagated to Angular Forms.
|
|
69
80
|
*/
|
|
@@ -74,8 +85,9 @@ export declare class SelectComponent implements OnInit, ControlValueAccessor {
|
|
|
74
85
|
*/
|
|
75
86
|
open(): void;
|
|
76
87
|
/**
|
|
77
|
-
* Closes the dropdown and
|
|
78
|
-
* This method sets the `isOpen` signal to `false`
|
|
88
|
+
* Closes the dropdown with a transition effect and refocuses the button.
|
|
89
|
+
* This method sets the `isOpen` signal to `false` after a delay and removes
|
|
90
|
+
* the transition class from the overlay panel.
|
|
79
91
|
*/
|
|
80
92
|
close(): void;
|
|
81
93
|
/**
|
|
@@ -111,5 +123,5 @@ export declare class SelectComponent implements OnInit, ControlValueAccessor {
|
|
|
111
123
|
*/
|
|
112
124
|
setDisabledState(isDisabled: boolean): void;
|
|
113
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
114
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "b-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; }, ["
|
|
126
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "b-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; }, ["optionsList"], ["*"], true, never>;
|
|
115
127
|
}
|
|
@@ -538,27 +538,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
538
538
|
}] });
|
|
539
539
|
|
|
540
540
|
/**
|
|
541
|
-
* Component representing an individual option in a select
|
|
541
|
+
* Component representing an individual option in a select or combobox.
|
|
542
542
|
* This component integrates with Angular CDK Option to manage the option's state and behavior.
|
|
543
543
|
*/
|
|
544
|
-
class
|
|
544
|
+
class OptionComponent {
|
|
545
545
|
/**
|
|
546
|
-
* The `ElementRef` of the
|
|
546
|
+
* The `ElementRef` of the option.
|
|
547
547
|
* This provides direct access to the DOM element of the option.
|
|
548
548
|
*/
|
|
549
549
|
el = inject(ElementRef);
|
|
550
550
|
/**
|
|
551
|
-
* The `CdkOption` instance associated with this
|
|
551
|
+
* The `CdkOption` instance associated with this option.
|
|
552
552
|
* This provides methods and properties for managing the option's state, such as selection and value.
|
|
553
553
|
*/
|
|
554
|
-
|
|
555
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type:
|
|
556
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type:
|
|
554
|
+
cdkOption = inject(CdkOption);
|
|
555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
556
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: OptionComponent, isStandalone: true, selector: "li[b-option]", hostDirectives: [{ directive: i1.CdkOption, inputs: ["cdkOption", "value"] }], ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
557
557
|
}
|
|
558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type:
|
|
558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: OptionComponent, decorators: [{
|
|
559
559
|
type: Component,
|
|
560
560
|
args: [{
|
|
561
|
-
selector: 'li[b-
|
|
561
|
+
selector: 'li[b-option]',
|
|
562
562
|
imports: [],
|
|
563
563
|
template: `<ng-content />`,
|
|
564
564
|
hostDirectives: [
|
|
@@ -571,20 +571,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
571
571
|
}] });
|
|
572
572
|
|
|
573
573
|
/**
|
|
574
|
-
* Component representing the
|
|
574
|
+
* Component representing the list of options in a select or combobox.
|
|
575
575
|
* This component integrates with Angular CDK Listbox to manage options and their selection.
|
|
576
576
|
*/
|
|
577
|
-
class
|
|
577
|
+
class OptionsListComponent {
|
|
578
578
|
/**
|
|
579
579
|
* Signal representing the selected values in the listbox.
|
|
580
580
|
* This is an array of strings corresponding to the selected option values.
|
|
581
581
|
*/
|
|
582
582
|
value = signal([]);
|
|
583
|
-
/**
|
|
584
|
-
* Signal representing the content of the selected option(s).
|
|
585
|
-
* This is a string that can be used to display the selected option(s).
|
|
586
|
-
*/
|
|
587
|
-
content = signal('');
|
|
588
583
|
/**
|
|
589
584
|
* Event emitter triggered when the dropdown should close.
|
|
590
585
|
* This is used to notify the parent component to close the dropdown.
|
|
@@ -592,7 +587,7 @@ class SelectContentComponent {
|
|
|
592
587
|
closeEmitter = output();
|
|
593
588
|
/**
|
|
594
589
|
* Reference to the host element of the component.
|
|
595
|
-
* This provides access to the DOM element of the
|
|
590
|
+
* This provides access to the DOM element of the options list.
|
|
596
591
|
*/
|
|
597
592
|
el = inject(ElementRef);
|
|
598
593
|
/**
|
|
@@ -607,9 +602,9 @@ class SelectContentComponent {
|
|
|
607
602
|
listBox = inject(CdkListbox);
|
|
608
603
|
/**
|
|
609
604
|
* Reference to the list of options in the dropdown.
|
|
610
|
-
* This is a collection of `
|
|
605
|
+
* This is a collection of `OptionComponent` instances representing the available options.
|
|
611
606
|
*/
|
|
612
|
-
options = contentChildren(
|
|
607
|
+
options = contentChildren(OptionComponent);
|
|
613
608
|
/**
|
|
614
609
|
* Handles changes to the selected value in the listbox.
|
|
615
610
|
* This method updates the `value` signal, emits the `closeEmitter` event,
|
|
@@ -621,13 +616,13 @@ class SelectContentComponent {
|
|
|
621
616
|
this.value.set(value);
|
|
622
617
|
this.closeEmitter.emit();
|
|
623
618
|
}
|
|
624
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type:
|
|
625
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type:
|
|
619
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: OptionsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
620
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: OptionsListComponent, isStandalone: true, selector: "ul[b-options-list]", inputs: { maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeEmitter: "closeEmitter" }, host: { listeners: { "cdkListboxValueChange": "handleValueChange($event.value)" }, properties: { "cdkListboxValue": "value()", "style.max-height": "maxHeight()" } }, queries: [{ propertyName: "options", predicate: OptionComponent, isSignal: true }], hostDirectives: [{ directive: i1.CdkListbox, inputs: ["cdkListboxValue", "cdkListboxValue"], outputs: ["cdkListboxValueChange", "cdkListboxValueChange"] }], ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
626
621
|
}
|
|
627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type:
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: OptionsListComponent, decorators: [{
|
|
628
623
|
type: Component,
|
|
629
624
|
args: [{
|
|
630
|
-
selector: 'ul[b-
|
|
625
|
+
selector: 'ul[b-options-list]',
|
|
631
626
|
imports: [],
|
|
632
627
|
template: `<ng-content />`,
|
|
633
628
|
hostDirectives: [
|
|
@@ -668,12 +663,12 @@ class SelectComponent {
|
|
|
668
663
|
* Reference to the content component of the dropdown.
|
|
669
664
|
* This contains the list of selectable options.
|
|
670
665
|
*/
|
|
671
|
-
|
|
666
|
+
optionsList = contentChild(OptionsListComponent);
|
|
672
667
|
/**
|
|
673
668
|
* Computed signal representing the selected values from the dropdown.
|
|
674
|
-
* This is linked to the value of the `
|
|
669
|
+
* This is linked to the value of the `OptionsListComponent`.
|
|
675
670
|
*/
|
|
676
|
-
value = linkedSignal(() => this.
|
|
671
|
+
value = linkedSignal(() => this.optionsList()?.value());
|
|
677
672
|
/**
|
|
678
673
|
* Input for setting the maximum width of the dropdown.
|
|
679
674
|
* Defaults to '100%'.
|
|
@@ -691,9 +686,9 @@ class SelectComponent {
|
|
|
691
686
|
disabled = model(false);
|
|
692
687
|
/**
|
|
693
688
|
* Computed signal representing the options available in the dropdown.
|
|
694
|
-
* This retrieves the options from the `
|
|
689
|
+
* This retrieves the options from the `OptionsListComponent`.
|
|
695
690
|
*/
|
|
696
|
-
options = computed(() => this.
|
|
691
|
+
options = computed(() => this.optionsList()?.options());
|
|
697
692
|
/**
|
|
698
693
|
* Computed signal representing the content of the selected option(s).
|
|
699
694
|
* If no option is selected, it returns the placeholder text.
|
|
@@ -702,7 +697,7 @@ class SelectComponent {
|
|
|
702
697
|
const selected = this.value();
|
|
703
698
|
if (selected && selected.length > 0) {
|
|
704
699
|
return this.options()?.reduce((acc, option) => {
|
|
705
|
-
if (selected.includes(option.
|
|
700
|
+
if (selected.includes(option.cdkOption.value)) {
|
|
706
701
|
return acc
|
|
707
702
|
? acc + ', ' + option.el.nativeElement.innerText
|
|
708
703
|
: option.el.nativeElement.innerText;
|
|
@@ -714,6 +709,16 @@ class SelectComponent {
|
|
|
714
709
|
return this.placeholder();
|
|
715
710
|
}
|
|
716
711
|
});
|
|
712
|
+
/**
|
|
713
|
+
* Signal representing the delay before closing the dropdown.
|
|
714
|
+
* This is used to provide a smooth transition when closing the dropdown.
|
|
715
|
+
*/
|
|
716
|
+
closeDelay = signal(150);
|
|
717
|
+
/**
|
|
718
|
+
* Reference to the CdkConnectedOverlay directive.
|
|
719
|
+
* This is used to manage the positioning and visibility of the dropdown overlay.
|
|
720
|
+
*/
|
|
721
|
+
cdkConnectedOverlay = viewChild(CdkConnectedOverlay);
|
|
717
722
|
/**
|
|
718
723
|
* Lifecycle hook that is called after the component is initialized.
|
|
719
724
|
* It sets up the necessary subscriptions for handling value changes.
|
|
@@ -722,12 +727,12 @@ class SelectComponent {
|
|
|
722
727
|
this.handleSelectedValueChange();
|
|
723
728
|
}
|
|
724
729
|
/**
|
|
725
|
-
* Subscribes to the `closeEmitter` of the `
|
|
730
|
+
* Subscribes to the `closeEmitter` of the `OptionsListComponent` to handle
|
|
726
731
|
* changes to the selected value. This ensures the dropdown closes and the
|
|
727
732
|
* value is propagated to Angular Forms.
|
|
728
733
|
*/
|
|
729
734
|
handleSelectedValueChange() {
|
|
730
|
-
this.
|
|
735
|
+
this.optionsList()?.closeEmitter.subscribe(() => {
|
|
731
736
|
this.onChange(this.value()); // Notify Angular Forms about the change
|
|
732
737
|
this.onTouched(); // Mark the component as touched
|
|
733
738
|
this.close(); // Close the dropdown
|
|
@@ -739,15 +744,20 @@ class SelectComponent {
|
|
|
739
744
|
*/
|
|
740
745
|
open() {
|
|
741
746
|
this.isOpen.set(true);
|
|
742
|
-
setTimeout(() => this.
|
|
747
|
+
setTimeout(() => this.optionsList()?.el.nativeElement.focus(), 0);
|
|
743
748
|
}
|
|
744
749
|
/**
|
|
745
|
-
* Closes the dropdown and
|
|
746
|
-
* This method sets the `isOpen` signal to `false`
|
|
750
|
+
* Closes the dropdown with a transition effect and refocuses the button.
|
|
751
|
+
* This method sets the `isOpen` signal to `false` after a delay and removes
|
|
752
|
+
* the transition class from the overlay panel.
|
|
747
753
|
*/
|
|
748
754
|
close() {
|
|
749
|
-
|
|
750
|
-
|
|
755
|
+
this.cdkConnectedOverlay()?.overlayRef.addPanelClass('cdk-overlay-pane-closing');
|
|
756
|
+
setTimeout(() => {
|
|
757
|
+
this.isOpen.set(false);
|
|
758
|
+
this.cdkConnectedOverlay()?.overlayRef.removePanelClass('cdk-overlay-pane-closing');
|
|
759
|
+
this.button()?.el.nativeElement.focus();
|
|
760
|
+
}, this.closeDelay());
|
|
751
761
|
}
|
|
752
762
|
// Control Value Accessor methods
|
|
753
763
|
/**
|
|
@@ -768,7 +778,7 @@ class SelectComponent {
|
|
|
768
778
|
writeValue(value) {
|
|
769
779
|
if (value) {
|
|
770
780
|
value.forEach(value => {
|
|
771
|
-
this.
|
|
781
|
+
this.optionsList()?.listBox?.selectValue(value);
|
|
772
782
|
});
|
|
773
783
|
this.value.set(value);
|
|
774
784
|
}
|
|
@@ -802,7 +812,7 @@ class SelectComponent {
|
|
|
802
812
|
useExisting: forwardRef(() => SelectComponent),
|
|
803
813
|
multi: true,
|
|
804
814
|
},
|
|
805
|
-
], queries: [{ propertyName: "
|
|
815
|
+
], queries: [{ propertyName: "optionsList", first: true, predicate: OptionsListComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "button", first: true, predicate: Button, descendants: true, isSignal: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], ngImport: i0, template: ` <button
|
|
806
816
|
b-button
|
|
807
817
|
variant="outlined"
|
|
808
818
|
(click)="isOpen() ? close() : open()"
|
|
@@ -2703,5 +2713,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
2703
2713
|
* Generated bundle index. Do not edit.
|
|
2704
2714
|
*/
|
|
2705
2715
|
|
|
2706
|
-
export { Alert, AttachedBox, Badge, BottomSheet, Button, ButtonGroup, Checkbox, ColorPicker, Icon, InViewportDirective, InViewportService, Input, InputGroup, Label, LazyContentDirective, Menu, MenuItemCheckboxComponent, MenuItemComponent, MenuItemRadioComponent, MenuLabel, MenuTrigger, Option, Range, ResponsiveService, Row, RowItem, Search, SelectComponent,
|
|
2716
|
+
export { Alert, AttachedBox, Badge, BottomSheet, Button, ButtonGroup, Checkbox, ColorPicker, Icon, InViewportDirective, InViewportService, Input, InputGroup, Label, LazyContentDirective, Menu, MenuItemCheckboxComponent, MenuItemComponent, MenuItemRadioComponent, MenuLabel, MenuTrigger, Option, OptionComponent, OptionsListComponent, Range, ResponsiveService, Row, RowItem, Search, SelectComponent, SideSheet, Spinner, Switch, Tab, Table, Tabs, Textarea, ThemeService, TooltipComponent, Tree, TreeNode };
|
|
2707
2717
|
//# sourceMappingURL=basis-ng-primitives.mjs.map
|