@clr/angular 18.2.2 → 18.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/clr-angular-accordion.mjs +28 -28
- package/fesm2022/clr-angular-accordion.mjs.map +1 -1
- package/fesm2022/clr-angular-button.mjs +27 -27
- package/fesm2022/clr-angular-button.mjs.map +1 -1
- package/fesm2022/clr-angular-card.mjs +417 -0
- package/fesm2022/clr-angular-card.mjs.map +1 -0
- package/fesm2022/clr-angular-collapsible-panel.mjs +6 -6
- package/fesm2022/clr-angular-collapsible-panel.mjs.map +1 -1
- package/fesm2022/clr-angular-data-datagrid.mjs +1578 -415
- package/fesm2022/clr-angular-data-datagrid.mjs.map +1 -1
- package/fesm2022/clr-angular-data-stack-view.mjs +23 -23
- package/fesm2022/clr-angular-data-stack-view.mjs.map +1 -1
- package/fesm2022/clr-angular-data-tree-view.mjs +283 -48
- package/fesm2022/clr-angular-data-tree-view.mjs.map +1 -1
- package/fesm2022/clr-angular-data.mjs +4 -4
- package/fesm2022/clr-angular-data.mjs.map +1 -1
- package/fesm2022/clr-angular-emphasis-alert.mjs +26 -26
- package/fesm2022/clr-angular-emphasis-alert.mjs.map +1 -1
- package/fesm2022/clr-angular-emphasis-badge.mjs +3 -3
- package/fesm2022/clr-angular-emphasis-badge.mjs.map +1 -1
- package/fesm2022/clr-angular-emphasis-label.mjs +3 -3
- package/fesm2022/clr-angular-emphasis-label.mjs.map +1 -1
- package/fesm2022/clr-angular-emphasis.mjs +4 -4
- package/fesm2022/clr-angular-emphasis.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-checkbox.mjs +23 -14
- package/fesm2022/clr-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-combobox.mjs +35 -35
- package/fesm2022/clr-angular-forms-combobox.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-common.mjs +69 -69
- package/fesm2022/clr-angular-forms-common.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-datalist.mjs +17 -17
- package/fesm2022/clr-angular-forms-datalist.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-datepicker.mjs +73 -73
- package/fesm2022/clr-angular-forms-datepicker.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-file-input.mjs +36 -36
- package/fesm2022/clr-angular-forms-file-input.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-input.mjs +10 -10
- package/fesm2022/clr-angular-forms-input.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-number-input.mjs +12 -12
- package/fesm2022/clr-angular-forms-number-input.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-password.mjs +11 -11
- package/fesm2022/clr-angular-forms-password.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-radio.mjs +17 -24
- package/fesm2022/clr-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-range.mjs +10 -10
- package/fesm2022/clr-angular-forms-range.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-select.mjs +10 -10
- package/fesm2022/clr-angular-forms-select.mjs.map +1 -1
- package/fesm2022/clr-angular-forms-textarea.mjs +10 -10
- package/fesm2022/clr-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/clr-angular-forms.mjs +4 -4
- package/fesm2022/clr-angular-forms.mjs.map +1 -1
- package/fesm2022/clr-angular-icon.mjs +101 -47
- package/fesm2022/clr-angular-icon.mjs.map +1 -1
- package/fesm2022/clr-angular-layout-breadcrumbs.mjs +10 -10
- package/fesm2022/clr-angular-layout-breadcrumbs.mjs.map +1 -1
- package/fesm2022/clr-angular-layout-main-container.mjs +7 -7
- package/fesm2022/clr-angular-layout-main-container.mjs.map +1 -1
- package/fesm2022/clr-angular-layout-nav.mjs +22 -22
- package/fesm2022/clr-angular-layout-nav.mjs.map +1 -1
- package/fesm2022/clr-angular-layout-tabs.mjs +35 -35
- package/fesm2022/clr-angular-layout-tabs.mjs.map +1 -1
- package/fesm2022/clr-angular-layout-vertical-nav.mjs +31 -31
- package/fesm2022/clr-angular-layout-vertical-nav.mjs.map +1 -1
- package/fesm2022/clr-angular-layout.mjs +4 -4
- package/fesm2022/clr-angular-layout.mjs.map +1 -1
- package/fesm2022/clr-angular-modal.mjs +29 -27
- package/fesm2022/clr-angular-modal.mjs.map +1 -1
- package/fesm2022/clr-angular-popover-common.mjs +70 -35
- package/fesm2022/clr-angular-popover-common.mjs.map +1 -1
- package/fesm2022/clr-angular-popover-dropdown.mjs +63 -26
- package/fesm2022/clr-angular-popover-dropdown.mjs.map +1 -1
- package/fesm2022/clr-angular-popover-signpost.mjs +27 -25
- package/fesm2022/clr-angular-popover-signpost.mjs.map +1 -1
- package/fesm2022/clr-angular-popover-tooltip.mjs +19 -19
- package/fesm2022/clr-angular-popover-tooltip.mjs.map +1 -1
- package/fesm2022/clr-angular-popover.mjs +4 -4
- package/fesm2022/clr-angular-popover.mjs.map +1 -1
- package/fesm2022/clr-angular-progress-progress-bars.mjs +7 -7
- package/fesm2022/clr-angular-progress-progress-bars.mjs.map +1 -1
- package/fesm2022/clr-angular-progress-spinner.mjs +7 -7
- package/fesm2022/clr-angular-progress-spinner.mjs.map +1 -1
- package/fesm2022/clr-angular-stepper.mjs +31 -31
- package/fesm2022/clr-angular-stepper.mjs.map +1 -1
- package/fesm2022/clr-angular-timeline.mjs +24 -24
- package/fesm2022/clr-angular-timeline.mjs.map +1 -1
- package/fesm2022/clr-angular-utils-conditional.mjs +16 -16
- package/fesm2022/clr-angular-utils-conditional.mjs.map +1 -1
- package/fesm2022/clr-angular-utils-loading.mjs +7 -7
- package/fesm2022/clr-angular-utils-loading.mjs.map +1 -1
- package/fesm2022/clr-angular-utils.mjs +149 -150
- package/fesm2022/clr-angular-utils.mjs.map +1 -1
- package/fesm2022/clr-angular-wizard.mjs +51 -51
- package/fesm2022/clr-angular-wizard.mjs.map +1 -1
- package/fesm2022/clr-angular.mjs +9 -4
- package/fesm2022/clr-angular.mjs.map +1 -1
- package/package.json +9 -5
- package/types/clr-angular-card.d.ts +110 -0
- package/types/clr-angular-data-datagrid.d.ts +427 -57
- package/types/clr-angular-data-tree-view.d.ts +126 -88
- package/types/clr-angular-forms-checkbox.d.ts +3 -0
- package/types/clr-angular-forms-datepicker.d.ts +1 -1
- package/types/clr-angular-forms-file-input.d.ts +1 -1
- package/types/clr-angular-forms-radio.d.ts +1 -2
- package/types/clr-angular-icon.d.ts +22 -2
- package/types/clr-angular-popover-common.d.ts +6 -0
- package/types/clr-angular-popover-dropdown.d.ts +33 -4
- package/types/clr-angular-utils.d.ts +61 -20
- package/types/clr-angular.d.ts +8 -6
- package/schematics/vitest.config.d.ts +0 -2
- package/schematics/vitest.config.js +0 -17
- package/schematics/vitest.config.js.map +0 -1
|
@@ -5,10 +5,10 @@ import { ClrControlLabel, ControlIdService, WrappedFormControl, ClrAbstractConta
|
|
|
5
5
|
import * as i2 from 'rxjs';
|
|
6
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import * as i1$1 from '@angular/forms';
|
|
8
|
+
import { uniqueIdFactory, ClrHostWrappingModule } from '@clr/angular/utils';
|
|
8
9
|
import * as i2$1 from '@angular/common';
|
|
9
10
|
import { CommonModule } from '@angular/common';
|
|
10
11
|
import { ClarityIcons, successStandardIcon, errorStandardIcon, ClrIcon } from '@clr/angular/icon';
|
|
11
|
-
import { ClrHostWrappingModule } from '@clr/angular/utils';
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
|
|
@@ -37,8 +37,8 @@ class ClrCheckboxWrapper {
|
|
|
37
37
|
ngOnDestroy() {
|
|
38
38
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
39
39
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
41
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxWrapper, deps: [{ token: IS_TOGGLE }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ClrCheckboxWrapper, isStandalone: false, selector: "clr-checkbox-wrapper,clr-toggle-wrapper", host: { properties: { "class.clr-checkbox-wrapper": "!toggle", "class.clr-checkbox-wrapper-disabled": "checkbox?.controlDisabled", "class.clr-toggle-wrapper": "toggle" } }, providers: [ControlIdService, IS_TOGGLE_PROVIDER], queries: [{ propertyName: "label", first: true, predicate: ClrControlLabel, descendants: true, static: true }, { propertyName: "checkbox", first: true, predicate: i0.forwardRef(() => ClrCheckbox), descendants: true, static: true }], ngImport: i0, template: `
|
|
42
42
|
<ng-content select="[clrCheckbox],[clrToggle]"></ng-content>
|
|
43
43
|
<ng-content select="label"></ng-content>
|
|
44
44
|
@if (!label) {
|
|
@@ -46,7 +46,7 @@ class ClrCheckboxWrapper {
|
|
|
46
46
|
}
|
|
47
47
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.ClrControlLabel, selector: "label", inputs: ["id", "for"] }] }); }
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxWrapper, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{
|
|
52
52
|
selector: 'clr-checkbox-wrapper,clr-toggle-wrapper',
|
|
@@ -104,10 +104,10 @@ class ClrCheckbox extends WrappedFormControl {
|
|
|
104
104
|
toggleService.next(true);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
108
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckbox, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i1$1.NgControl, optional: true, self: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: 'clrToggle', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
108
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: ClrCheckbox, isStandalone: false, selector: "[clrCheckbox],[clrToggle]", host: { properties: { "attr.role": "toggle !== null ? \"switch\" : null" } }, usesInheritance: true, ngImport: i0 }); }
|
|
109
109
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckbox, decorators: [{
|
|
111
111
|
type: Directive,
|
|
112
112
|
args: [{
|
|
113
113
|
selector: '[clrCheckbox],[clrToggle]',
|
|
@@ -138,6 +138,7 @@ class ClrCheckboxContainer extends ClrAbstractContainer {
|
|
|
138
138
|
this.controlClassService = controlClassService;
|
|
139
139
|
this.ngControlService = ngControlService;
|
|
140
140
|
this.inline = false;
|
|
141
|
+
this._generatedId = uniqueIdFactory();
|
|
141
142
|
}
|
|
142
143
|
/*
|
|
143
144
|
* Here we want to support the following cases
|
|
@@ -164,12 +165,19 @@ class ClrCheckboxContainer extends ClrAbstractContainer {
|
|
|
164
165
|
}
|
|
165
166
|
ngAfterContentInit() {
|
|
166
167
|
this.setAriaRoles();
|
|
168
|
+
this.setAriaLabelledBy();
|
|
167
169
|
}
|
|
168
170
|
setAriaRoles() {
|
|
169
171
|
this.role = this.checkboxes?.length ? 'group' : null;
|
|
170
172
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
setAriaLabelledBy() {
|
|
174
|
+
if (this.label && !this.label.idAttr) {
|
|
175
|
+
this.label.idAttr = this._generatedId;
|
|
176
|
+
}
|
|
177
|
+
this.ariaLabelledBy = this.checkboxes?.length && this.label ? this.label.idAttr : null;
|
|
178
|
+
}
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxContainer, deps: [{ token: i1.LayoutService, optional: true }, { token: i1.ControlClassService }, { token: i1.NgControlService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ClrCheckboxContainer, isStandalone: false, selector: "clr-checkbox-container,clr-toggle-container", inputs: { clrInline: "clrInline" }, host: { properties: { "class.clr-form-control": "true", "class.clr-form-control-disabled": "allCheckboxesDisabled", "class.clr-row": "addGrid()", "attr.role": "role", "attr.aria-labelledby": "ariaLabelledBy" } }, providers: [NgControlService, ControlClassService, ContainerIdService], queries: [{ propertyName: "checkboxes", predicate: ClrCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
173
181
|
<ng-content select="label"></ng-content>
|
|
174
182
|
@if (!label && addGrid()) {
|
|
175
183
|
<label></label>
|
|
@@ -190,7 +198,7 @@ class ClrCheckboxContainer extends ClrAbstractContainer {
|
|
|
190
198
|
</div>
|
|
191
199
|
`, isInline: true, dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.ClrControlLabel, selector: "label", inputs: ["id", "for"] }] }); }
|
|
192
200
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxContainer, decorators: [{
|
|
194
202
|
type: Component,
|
|
195
203
|
args: [{
|
|
196
204
|
selector: 'clr-checkbox-container,clr-toggle-container',
|
|
@@ -219,6 +227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
219
227
|
'[class.clr-form-control-disabled]': 'allCheckboxesDisabled',
|
|
220
228
|
'[class.clr-row]': 'addGrid()',
|
|
221
229
|
'[attr.role]': 'role',
|
|
230
|
+
'[attr.aria-labelledby]': 'ariaLabelledBy',
|
|
222
231
|
},
|
|
223
232
|
providers: [NgControlService, ControlClassService, ContainerIdService],
|
|
224
233
|
standalone: false,
|
|
@@ -242,11 +251,11 @@ class ClrCheckboxModule {
|
|
|
242
251
|
constructor() {
|
|
243
252
|
ClarityIcons.addIcons(successStandardIcon, errorStandardIcon);
|
|
244
253
|
}
|
|
245
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
246
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
247
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
254
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
255
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxModule, declarations: [ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper], imports: [CommonModule, ClrIcon, ClrCommonFormsModule, ClrHostWrappingModule], exports: [ClrCommonFormsModule, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper] }); }
|
|
256
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxModule, imports: [CommonModule, ClrIcon, ClrCommonFormsModule, ClrHostWrappingModule, ClrCommonFormsModule] }); }
|
|
248
257
|
}
|
|
249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCheckboxModule, decorators: [{
|
|
250
259
|
type: NgModule,
|
|
251
260
|
args: [{
|
|
252
261
|
imports: [CommonModule, ClrIcon, ClrCommonFormsModule, ClrHostWrappingModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clr-angular-forms-checkbox.mjs","sources":["../../../projects/angular/forms/checkbox/checkbox-wrapper.ts","../../../projects/angular/forms/checkbox/checkbox.ts","../../../projects/angular/forms/checkbox/checkbox-container.ts","../../../projects/angular/forms/checkbox/checkbox.module.ts","../../../projects/angular/forms/checkbox/index.ts","../../../projects/angular/forms/checkbox/clr-angular-forms-checkbox.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Component, ContentChild, forwardRef, Inject, InjectionToken, OnDestroy, OnInit } from '@angular/core';\nimport { ClrControlLabel, ControlIdService } from '@clr/angular/forms/common';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { ClrCheckbox } from './checkbox';\n\nexport const IS_TOGGLE = new InjectionToken<BehaviorSubject<boolean>>('IS_TOGGLE');\nexport function isToggleFactory() {\n return new BehaviorSubject<boolean>(false);\n}\nexport const IS_TOGGLE_PROVIDER = { provide: IS_TOGGLE, useFactory: isToggleFactory };\n\n@Component({\n selector: 'clr-checkbox-wrapper,clr-toggle-wrapper',\n template: `\n <ng-content select=\"[clrCheckbox],[clrToggle]\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n @if (!label) {\n <label></label>\n }\n `,\n host: {\n '[class.clr-checkbox-wrapper]': '!toggle',\n '[class.clr-checkbox-wrapper-disabled]': 'checkbox?.controlDisabled',\n '[class.clr-toggle-wrapper]': 'toggle',\n },\n providers: [ControlIdService, IS_TOGGLE_PROVIDER],\n standalone: false,\n})\nexport class ClrCheckboxWrapper implements OnInit, OnDestroy {\n @ContentChild(ClrControlLabel, { static: true }) label: ClrControlLabel;\n @ContentChild(forwardRef(() => ClrCheckbox), { static: true }) checkbox: ClrCheckbox;\n toggle = false;\n private subscriptions: Subscription[] = [];\n\n constructor(@Inject(IS_TOGGLE) toggleService: BehaviorSubject<boolean>) {\n this.subscriptions.push(\n toggleService.subscribe(state => {\n this.toggle = state;\n })\n );\n }\n\n ngOnInit() {\n if (this.label) {\n this.label.disableGrid();\n }\n }\n\n ngOnDestroy() {\n this.subscriptions.forEach(sub => sub.unsubscribe());\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Attribute, Directive, ElementRef, Injector, Optional, Renderer2, Self, ViewContainerRef } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { WrappedFormControl } from '@clr/angular/forms/common';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { ClrCheckboxWrapper, IS_TOGGLE } from './checkbox-wrapper';\n\n/**\n * This implements both the clrCheckbox and clrToggle functionality, since they are both just checkboxes with different\n * visual styling. The challenge is that the container needs to know which selector was used, which the @Attribute\n * decorator gets for us to determine if the toggle is used, and emits a value to the wrapper container to tell it\n * there is a toggle switch instead.\n */\n@Directive({\n selector: '[clrCheckbox],[clrToggle]',\n host: {\n '[attr.role]': 'toggle !== null ? \"switch\" : null',\n },\n standalone: false,\n})\nexport class ClrCheckbox extends WrappedFormControl<ClrCheckboxWrapper> {\n constructor(\n vcr: ViewContainerRef,\n injector: Injector,\n @Self()\n @Optional()\n private control: NgControl,\n renderer: Renderer2,\n el: ElementRef<HTMLInputElement>,\n @Attribute('clrToggle') protected toggle: string\n ) {\n super(vcr, ClrCheckboxWrapper, injector, control, renderer, el);\n }\n\n get controlDisabled() {\n return this.control?.disabled;\n }\n\n override ngOnInit() {\n super.ngOnInit();\n\n const toggleService = this.getProviderFromContainer<BehaviorSubject<boolean>>(IS_TOGGLE, null);\n\n if (toggleService && this.toggle !== null) {\n toggleService.next(true);\n }\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { AfterContentInit, Component, ContentChildren, Input, Optional, QueryList } from '@angular/core';\nimport {\n ClrAbstractContainer,\n ContainerIdService,\n ControlClassService,\n LayoutService,\n NgControlService,\n} from '@clr/angular/forms/common';\n\nimport { ClrCheckbox } from './checkbox';\n\n@Component({\n selector: 'clr-checkbox-container,clr-toggle-container',\n template: `\n <ng-content select=\"label\"></ng-content>\n @if (!label && addGrid()) {\n <label></label>\n }\n <div class=\"clr-control-container\" [class.clr-control-inline]=\"clrInline\" [ngClass]=\"controlClass()\">\n <ng-content select=\"clr-checkbox-wrapper,clr-toggle-wrapper\"></ng-content>\n @if (showHelper) {\n <div class=\"clr-subtext-wrapper\">\n <ng-content select=\"clr-control-helper\"></ng-content>\n </div>\n }\n @if (showInvalid) {\n <ng-content select=\"clr-control-error\"></ng-content>\n }\n @if (showValid) {\n <ng-content select=\"clr-control-success\"></ng-content>\n }\n </div>\n `,\n host: {\n '[class.clr-form-control]': 'true',\n '[class.clr-form-control-disabled]': 'allCheckboxesDisabled',\n '[class.clr-row]': 'addGrid()',\n '[attr.role]': 'role',\n },\n providers: [NgControlService, ControlClassService, ContainerIdService],\n standalone: false,\n})\nexport class ClrCheckboxContainer extends ClrAbstractContainer implements AfterContentInit {\n role: string;\n\n @ContentChildren(ClrCheckbox, { descendants: true }) checkboxes: QueryList<ClrCheckbox>;\n\n private inline = false;\n\n constructor(\n @Optional() protected override layoutService: LayoutService,\n protected override controlClassService: ControlClassService,\n protected override ngControlService: NgControlService\n ) {\n super(layoutService, controlClassService, ngControlService);\n }\n\n /*\n * Here we want to support the following cases\n * clrInline - true by presence\n * clrInline=\"true|false\" - unless it is explicitly false, strings are considered true\n * [clrInline]=\"true|false\" - expect a boolean\n */\n @Input()\n get clrInline() {\n return this.inline;\n }\n set clrInline(value: boolean | string) {\n if (typeof value === 'string') {\n this.inline = value === 'false' ? false : true;\n } else {\n this.inline = !!value;\n }\n }\n\n protected get allCheckboxesDisabled() {\n if (!this.controls?.length) {\n return false;\n }\n\n return this.controls.every(control => control.disabled);\n }\n\n ngAfterContentInit() {\n this.setAriaRoles();\n }\n\n private setAriaRoles() {\n this.role = this.checkboxes?.length ? 'group' : null;\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ClrCommonFormsModule } from '@clr/angular/forms/common';\nimport { ClarityIcons, ClrIcon, errorStandardIcon, successStandardIcon } from '@clr/angular/icon';\nimport { ClrHostWrappingModule } from '@clr/angular/utils';\n\nimport { ClrCheckbox } from './checkbox';\nimport { ClrCheckboxContainer } from './checkbox-container';\nimport { ClrCheckboxWrapper } from './checkbox-wrapper';\n\n@NgModule({\n imports: [CommonModule, ClrIcon, ClrCommonFormsModule, ClrHostWrappingModule],\n declarations: [ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],\n exports: [ClrCommonFormsModule, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],\n})\nexport class ClrCheckboxModule {\n constructor() {\n ClarityIcons.addIcons(successStandardIcon, errorStandardIcon);\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nexport * from './checkbox';\nexport * from './checkbox-container';\nexport * from './checkbox-wrapper';\nexport * from './checkbox.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;AAAA;;;;;AAKG;MAQU,SAAS,GAAG,IAAI,cAAc,CAA2B,WAAW;SACjE,eAAe,GAAA;AAC7B,IAAA,OAAO,IAAI,eAAe,CAAU,KAAK,CAAC;AAC5C;AACO,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe;MAmBtE,kBAAkB,CAAA;AAM7B,IAAA,WAAA,CAA+B,aAAuC,EAAA;QAHtE,IAAA,CAAA,MAAM,GAAG,KAAK;QACN,IAAA,CAAA,aAAa,GAAmB,EAAE;QAGxC,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,aAAa,CAAC,SAAS,CAAC,KAAK,IAAG;AAC9B,YAAA,IAAI,CAAC,MAAM,GAAG,KAAK;QACrB,CAAC,CAAC,CACH;IACH;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,KAAK,EAAE;AACd,YAAA,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QAC1B;IACF;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;IACtD;AAtBW,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,kBAMT,SAAS,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGANlB,kBAAkB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,yCA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EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;+GAE1E,iBAAiB,EAAA,OAAA,EAAA,CAJlB,YAAY,EAAE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAElE,oBAAoB,CAAA,EAAA,CAAA,CAAA;;2FAEnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;AAC7E,oBAAA,YAAY,EAAE,CAAC,WAAW,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;oBACrE,OAAO,EAAE,CAAC,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;AACvF,iBAAA;;;ACrBD;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"clr-angular-forms-checkbox.mjs","sources":["../../../projects/angular/forms/checkbox/checkbox-wrapper.ts","../../../projects/angular/forms/checkbox/checkbox.ts","../../../projects/angular/forms/checkbox/checkbox-container.ts","../../../projects/angular/forms/checkbox/checkbox.module.ts","../../../projects/angular/forms/checkbox/index.ts","../../../projects/angular/forms/checkbox/clr-angular-forms-checkbox.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Component, ContentChild, forwardRef, Inject, InjectionToken, OnDestroy, OnInit } from '@angular/core';\nimport { ClrControlLabel, ControlIdService } from '@clr/angular/forms/common';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { ClrCheckbox } from './checkbox';\n\nexport const IS_TOGGLE = new InjectionToken<BehaviorSubject<boolean>>('IS_TOGGLE');\nexport function isToggleFactory() {\n return new BehaviorSubject<boolean>(false);\n}\nexport const IS_TOGGLE_PROVIDER = { provide: IS_TOGGLE, useFactory: isToggleFactory };\n\n@Component({\n selector: 'clr-checkbox-wrapper,clr-toggle-wrapper',\n template: `\n <ng-content select=\"[clrCheckbox],[clrToggle]\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n @if (!label) {\n <label></label>\n }\n `,\n host: {\n '[class.clr-checkbox-wrapper]': '!toggle',\n '[class.clr-checkbox-wrapper-disabled]': 'checkbox?.controlDisabled',\n '[class.clr-toggle-wrapper]': 'toggle',\n },\n providers: [ControlIdService, IS_TOGGLE_PROVIDER],\n standalone: false,\n})\nexport class ClrCheckboxWrapper implements OnInit, OnDestroy {\n @ContentChild(ClrControlLabel, { static: true }) label: ClrControlLabel;\n @ContentChild(forwardRef(() => ClrCheckbox), { static: true }) checkbox: ClrCheckbox;\n toggle = false;\n private subscriptions: Subscription[] = [];\n\n constructor(@Inject(IS_TOGGLE) toggleService: BehaviorSubject<boolean>) {\n this.subscriptions.push(\n toggleService.subscribe(state => {\n this.toggle = state;\n })\n );\n }\n\n ngOnInit() {\n if (this.label) {\n this.label.disableGrid();\n }\n }\n\n ngOnDestroy() {\n this.subscriptions.forEach(sub => sub.unsubscribe());\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Attribute, Directive, ElementRef, Injector, Optional, Renderer2, Self, ViewContainerRef } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { WrappedFormControl } from '@clr/angular/forms/common';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { ClrCheckboxWrapper, IS_TOGGLE } from './checkbox-wrapper';\n\n/**\n * This implements both the clrCheckbox and clrToggle functionality, since they are both just checkboxes with different\n * visual styling. The challenge is that the container needs to know which selector was used, which the @Attribute\n * decorator gets for us to determine if the toggle is used, and emits a value to the wrapper container to tell it\n * there is a toggle switch instead.\n */\n@Directive({\n selector: '[clrCheckbox],[clrToggle]',\n host: {\n '[attr.role]': 'toggle !== null ? \"switch\" : null',\n },\n standalone: false,\n})\nexport class ClrCheckbox extends WrappedFormControl<ClrCheckboxWrapper> {\n constructor(\n vcr: ViewContainerRef,\n injector: Injector,\n @Self()\n @Optional()\n private control: NgControl,\n renderer: Renderer2,\n el: ElementRef<HTMLInputElement>,\n @Attribute('clrToggle') protected toggle: string\n ) {\n super(vcr, ClrCheckboxWrapper, injector, control, renderer, el);\n }\n\n get controlDisabled() {\n return this.control?.disabled;\n }\n\n override ngOnInit() {\n super.ngOnInit();\n\n const toggleService = this.getProviderFromContainer<BehaviorSubject<boolean>>(IS_TOGGLE, null);\n\n if (toggleService && this.toggle !== null) {\n toggleService.next(true);\n }\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { AfterContentInit, Component, ContentChildren, Input, Optional, QueryList } from '@angular/core';\nimport {\n ClrAbstractContainer,\n ContainerIdService,\n ControlClassService,\n LayoutService,\n NgControlService,\n} from '@clr/angular/forms/common';\nimport { uniqueIdFactory } from '@clr/angular/utils';\n\nimport { ClrCheckbox } from './checkbox';\n\n@Component({\n selector: 'clr-checkbox-container,clr-toggle-container',\n template: `\n <ng-content select=\"label\"></ng-content>\n @if (!label && addGrid()) {\n <label></label>\n }\n <div class=\"clr-control-container\" [class.clr-control-inline]=\"clrInline\" [ngClass]=\"controlClass()\">\n <ng-content select=\"clr-checkbox-wrapper,clr-toggle-wrapper\"></ng-content>\n @if (showHelper) {\n <div class=\"clr-subtext-wrapper\">\n <ng-content select=\"clr-control-helper\"></ng-content>\n </div>\n }\n @if (showInvalid) {\n <ng-content select=\"clr-control-error\"></ng-content>\n }\n @if (showValid) {\n <ng-content select=\"clr-control-success\"></ng-content>\n }\n </div>\n `,\n host: {\n '[class.clr-form-control]': 'true',\n '[class.clr-form-control-disabled]': 'allCheckboxesDisabled',\n '[class.clr-row]': 'addGrid()',\n '[attr.role]': 'role',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n },\n providers: [NgControlService, ControlClassService, ContainerIdService],\n standalone: false,\n})\nexport class ClrCheckboxContainer extends ClrAbstractContainer implements AfterContentInit {\n role: string;\n ariaLabelledBy: string;\n\n @ContentChildren(ClrCheckbox, { descendants: true }) checkboxes: QueryList<ClrCheckbox>;\n\n private inline = false;\n private _generatedId = uniqueIdFactory();\n\n constructor(\n @Optional() protected override layoutService: LayoutService,\n protected override controlClassService: ControlClassService,\n protected override ngControlService: NgControlService\n ) {\n super(layoutService, controlClassService, ngControlService);\n }\n\n /*\n * Here we want to support the following cases\n * clrInline - true by presence\n * clrInline=\"true|false\" - unless it is explicitly false, strings are considered true\n * [clrInline]=\"true|false\" - expect a boolean\n */\n @Input()\n get clrInline() {\n return this.inline;\n }\n set clrInline(value: boolean | string) {\n if (typeof value === 'string') {\n this.inline = value === 'false' ? false : true;\n } else {\n this.inline = !!value;\n }\n }\n\n protected get allCheckboxesDisabled() {\n if (!this.controls?.length) {\n return false;\n }\n\n return this.controls.every(control => control.disabled);\n }\n\n ngAfterContentInit() {\n this.setAriaRoles();\n this.setAriaLabelledBy();\n }\n\n private setAriaRoles() {\n this.role = this.checkboxes?.length ? 'group' : null;\n }\n\n private setAriaLabelledBy() {\n if (this.label && !this.label.idAttr) {\n this.label.idAttr = this._generatedId;\n }\n\n this.ariaLabelledBy = this.checkboxes?.length && this.label ? this.label.idAttr : null;\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ClrCommonFormsModule } from '@clr/angular/forms/common';\nimport { ClarityIcons, ClrIcon, errorStandardIcon, successStandardIcon } from '@clr/angular/icon';\nimport { ClrHostWrappingModule } from '@clr/angular/utils';\n\nimport { ClrCheckbox } from './checkbox';\nimport { ClrCheckboxContainer } from './checkbox-container';\nimport { ClrCheckboxWrapper } from './checkbox-wrapper';\n\n@NgModule({\n imports: [CommonModule, ClrIcon, ClrCommonFormsModule, ClrHostWrappingModule],\n declarations: [ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],\n exports: [ClrCommonFormsModule, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],\n})\nexport class ClrCheckboxModule {\n constructor() {\n ClarityIcons.addIcons(successStandardIcon, errorStandardIcon);\n }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nexport * from './checkbox';\nexport * from './checkbox-container';\nexport * from './checkbox-wrapper';\nexport * from './checkbox.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;AAAA;;;;;AAKG;MAQU,SAAS,GAAG,IAAI,cAAc,CAA2B,WAAW;SACjE,eAAe,GAAA;AAC7B,IAAA,OAAO,IAAI,eAAe,CAAU,KAAK,CAAC;AAC5C;AACO,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe;MAmBtE,kBAAkB,CAAA;AAM7B,IAAA,WAAA,CAA+B,aAAuC,EAAA;QAHtE,IAAA,CAAA,MAAM,GAAG,KAAK;QACN,IAAA,CAAA,aAAa,GAAmB,EAAE;QAGxC,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,aAAa,CAAC,SAAS,CAAC,KAAK,IAAG;AAC9B,YAAA,IAAI,CAAC,MAAM,GAAG,KAAK;QACrB,CAAC,CAAC,CACH;IACH;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,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AAC,YAAY,EAAE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;AAC7E,oBAAA,YAAY,EAAE,CAAC,WAAW,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;oBACrE,OAAO,EAAE,CAAC,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;AACvF,iBAAA;;;ACrBD;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
@@ -27,10 +27,10 @@ class ComboboxContainerService {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
this.labelOffset = 0;
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
31
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ComboboxContainerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
31
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ComboboxContainerService }); }
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ComboboxContainerService, decorators: [{
|
|
34
34
|
type: Injectable
|
|
35
35
|
}] });
|
|
36
36
|
|
|
@@ -55,8 +55,8 @@ class ClrComboboxContainer extends ClrAbstractContainer {
|
|
|
55
55
|
this.containerService.labelOffset =
|
|
56
56
|
this.controlContainer.nativeElement.offsetHeight - this.el.nativeElement.offsetHeight;
|
|
57
57
|
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrComboboxContainer, deps: [{ token: i1.LayoutService, optional: true }, { token: i1.ControlClassService }, { token: i1.NgControlService }, { token: ComboboxContainerService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ClrComboboxContainer, isStandalone: false, selector: "clr-combobox-container", host: { properties: { "class.clr-form-control": "true", "class.clr-combobox-form-control": "true", "class.clr-form-control-disabled": "control?.disabled", "class.clr-row": "addGrid()" } }, providers: [NgControlService, ControlIdService, ControlClassService, ComboboxContainerService], viewQueries: [{ propertyName: "controlContainer", first: true, predicate: ["controlContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
60
60
|
<ng-content select="label"></ng-content>
|
|
61
61
|
@if (!label && addGrid()) {
|
|
62
62
|
<label></label>
|
|
@@ -75,7 +75,7 @@ class ClrComboboxContainer extends ClrAbstractContainer {
|
|
|
75
75
|
</div>
|
|
76
76
|
`, isInline: true, dependencies: [{ kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.ClrControlLabel, selector: "label", inputs: ["id", "for"] }] }); }
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrComboboxContainer, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{
|
|
81
81
|
selector: 'clr-combobox-container',
|
|
@@ -262,10 +262,10 @@ class ClrOptionSelected {
|
|
|
262
262
|
constructor(template) {
|
|
263
263
|
this.template = template;
|
|
264
264
|
}
|
|
265
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
266
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
265
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptionSelected, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
266
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: ClrOptionSelected, isStandalone: false, selector: "[clrOptionSelected]", inputs: { selected: ["clrOptionSelected", "selected"] }, ngImport: i0 }); }
|
|
267
267
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptionSelected, decorators: [{
|
|
269
269
|
type: Directive,
|
|
270
270
|
args: [{
|
|
271
271
|
selector: '[clrOptionSelected]',
|
|
@@ -469,10 +469,10 @@ class OptionSelectionService {
|
|
|
469
469
|
return this._identityFn(current) === this._identityFn(value);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
473
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
472
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: OptionSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
473
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: OptionSelectionService }); }
|
|
474
474
|
}
|
|
475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: OptionSelectionService, decorators: [{
|
|
476
476
|
type: Injectable
|
|
477
477
|
}], ctorParameters: () => [] });
|
|
478
478
|
|
|
@@ -666,10 +666,10 @@ class ComboboxFocusHandler {
|
|
|
666
666
|
const target = event.relatedTarget;
|
|
667
667
|
return !(this.textInput.contains(target) || this.trigger.contains(target) || this.listbox.contains(target));
|
|
668
668
|
}
|
|
669
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
670
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ComboboxFocusHandler, deps: [{ token: i0.RendererFactory2 }, { token: i4.ClrPopoverService }, { token: OptionSelectionService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
670
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ComboboxFocusHandler }); }
|
|
671
671
|
}
|
|
672
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ComboboxFocusHandler, decorators: [{
|
|
673
673
|
type: Injectable
|
|
674
674
|
}], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: i4.ClrPopoverService }, { type: OptionSelectionService }, { type: undefined, decorators: [{
|
|
675
675
|
type: Inject,
|
|
@@ -746,15 +746,15 @@ class ClrOption {
|
|
|
746
746
|
this.focusHandler.focusOption(this.optionProxy);
|
|
747
747
|
this.focusHandler.focusInput();
|
|
748
748
|
}
|
|
749
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
750
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
749
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOption, deps: [{ token: i0.ElementRef }, { token: i3.ClrCommonStringsService }, { token: ComboboxFocusHandler }, { token: OptionSelectionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
750
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ClrOption, isStandalone: false, selector: "clr-option", inputs: { optionId: ["id", "optionId"], value: ["clrValue", "value"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.clr-combobox-option": "true", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.id": "optionId", "class.active": "this.selected", "class.clr-focus": "this.focusClass" } }, ngImport: i0, template: `
|
|
751
751
|
<ng-content></ng-content>
|
|
752
752
|
@if (selected) {
|
|
753
753
|
<span class="clr-sr-only">{{ commonStrings.keys.comboboxSelected }}</span>
|
|
754
754
|
}
|
|
755
755
|
`, isInline: true }); }
|
|
756
756
|
}
|
|
757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
757
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOption, decorators: [{
|
|
758
758
|
type: Component,
|
|
759
759
|
args: [{
|
|
760
760
|
selector: 'clr-option',
|
|
@@ -908,8 +908,8 @@ class ClrOptions {
|
|
|
908
908
|
}
|
|
909
909
|
this.focusHandler.addOptionValues(focusList);
|
|
910
910
|
}
|
|
911
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
912
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
911
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptions, deps: [{ token: OptionSelectionService }, { token: IF_ACTIVE_ID }, { token: i0.ElementRef }, { token: i3.ClrCommonStringsService }, { token: ComboboxFocusHandler }, { token: i4.ClrPopoverService }, { token: POPOVER_HOST_ORIGIN, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ClrOptions, isStandalone: false, selector: "clr-options", inputs: { optionsId: ["id", "optionsId"] }, host: { properties: { "class.clr-combobox-options": "true", "class.clr-combobox-options-multi": "optionSelectionService.multiselectable", "class.clr-combobox-options-hidden": "emptyOptions && editable", "attr.role": "\"listbox\"", "id": "optionsId" } }, providers: [{ provide: LoadingListener, useExisting: ClrOptions }], queries: [{ propertyName: "items", predicate: ClrOption, descendants: true }], viewQueries: [{ propertyName: "selectAllBtn", first: true, predicate: ["selectAllBtn"], descendants: true }], ngImport: i0, template: `
|
|
913
913
|
@if (optionSelectionService.loading) {
|
|
914
914
|
<div class="clr-combobox-options-loading">
|
|
915
915
|
<clr-spinner clrInline>
|
|
@@ -949,7 +949,7 @@ class ClrOptions {
|
|
|
949
949
|
<ng-content></ng-content>
|
|
950
950
|
`, isInline: true, dependencies: [{ kind: "component", type: i5.ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }] }); }
|
|
951
951
|
}
|
|
952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptions, decorators: [{
|
|
953
953
|
type: Component,
|
|
954
954
|
args: [{
|
|
955
955
|
selector: 'clr-options',
|
|
@@ -1450,16 +1450,16 @@ class ClrCombobox extends WrappedFormControl {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
return [this.optionSelectionService.selectionModel.model];
|
|
1452
1452
|
}
|
|
1453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1453
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCombobox, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i1$1.NgControl, optional: true, self: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: OptionSelectionService }, { token: i3.ClrCommonStringsService }, { token: i4.ClrPopoverService }, { token: ComboboxContainerService, optional: true }, { token: PLATFORM_ID }, { token: ComboboxFocusHandler }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: ClrComboboxContainer, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1454
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ClrCombobox, isStandalone: false, selector: "clr-combobox", inputs: { placeholder: "placeholder", showSelectAll: ["showSelectAll", "showSelectAll", booleanAttribute], editable: ["clrEditable", "editable"], editableResolver: ["clrEditableResolverFn", "editableResolver"], identityFn: ["clrComboboxIdentityFn", "identityFn"], multiSelect: ["clrMulti", "multiSelect"] }, outputs: { clrInputChange: "clrInputChange", clrOpenChange: "clrOpenChange", clrSelectionChange: "clrSelectionChange" }, host: { listeners: { "keydown": "onKeyUp($event)" }, properties: { "class.aria-required": "true", "class.clr-combobox": "true", "class.clr-combobox-disabled": "control?.disabled" } }, providers: [
|
|
1455
1455
|
OptionSelectionService,
|
|
1456
1456
|
{ provide: LoadingListener, useExisting: ClrCombobox },
|
|
1457
1457
|
IF_ACTIVE_ID_PROVIDER,
|
|
1458
1458
|
FOCUS_SERVICE_PROVIDER,
|
|
1459
1459
|
COMBOBOX_FOCUS_HANDLER_PROVIDER,
|
|
1460
|
-
], queries: [{ propertyName: "optionSelected", first: true, predicate: ClrOptionSelected, descendants: true }, { propertyName: "options", first: true, predicate: ClrOptions, descendants: true }], viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textboxInput"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "truncationButton", first: true, predicate: ["truncationButton"], descendants: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, static: true }, { propertyName: "calculationPills", predicate: ["pill"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i4.ClrPopoverHostDirective }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<!-- The (click) handler is needed to auto-focus on input field which can not currently occupy the whole\nwidth of the component, after being wrapped to a new line -->\n<div\n #wrapper\n class=\"clr-combobox-wrapper\"\n clrPopoverOrigin\n (click)=\"onWrapperClick($event)\"\n [class.multi]=\"multiSelect\"\n [class.invalid]=\"(control?.control.touched && control?.invalid)\"\n [class.disabled]=\"control?.disabled\"\n>\n @if (multiSelect && multiSelectModel && multiSelectModel.length > 0) {\n <span\n role=\"grid\"\n clrRovingTabindex\n [clrRovingTabindexDisabled]=\"control?.disabled\"\n clrDirection=\"both\"\n [attr.aria-label]=\"getSelectionAriaLabel()\"\n [attr.aria-disabled]=\"control?.disabled? true: null\"\n class=\"clr-combobox-pills\"\n >\n <ng-template #pillTemplate let-item let-i=\"index\">\n <span class=\"label label-combobox-pill\" role=\"row\">\n <span role=\"gridcell\">\n <span class=\"clr-combobox-pill-content\" clrKeyFocusItem>\n @if (optionSelected) {\n <ng-container\n [ngTemplateOutlet]=\"optionSelected.template\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n ></ng-container>\n }\n </span>\n </span>\n <span role=\"gridcell\">\n <button\n clrKeyFocusItem\n type=\"button\"\n class=\"clr-combobox-remove-btn\"\n [disabled]=\"control?.disabled ? true : null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxDelete + ' ' + optionSelectionService.selectionModel.toString(displayField, i)\"\n (click)=\"unselect(item)\"\n >\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n </span>\n </ng-template>\n\n @if (showSelectAll) { @if (isTotalSelection && !selectionExpanded) {\n <span class=\"label label-combobox-pill\" role=\"row\">\n <span role=\"gridcell\">\n <span class=\"clr-combobox-pill-content\" clrKeyFocusItem>{{ allSelectedText }}</span>\n </span>\n <span role=\"gridcell\">\n <button\n clrKeyFocusItem\n type=\"button\"\n class=\"clr-combobox-remove-btn\"\n (click)=\"clearSelection()\"\n [attr.aria-label]=\"commonStrings.keys.comboboxUnselectAll\"\n >\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n </span>\n } @if (showIndividualPills) { @for (item of multiSelectModel | slice:0:calculatedLimit; track item; let i = $index)\n {\n <ng-container\n [ngTemplateOutlet]=\"pillTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: i}\"\n ></ng-container>\n } } @if (showTruncationToggle) {\n <span role=\"row\" class=\"label label-combobox-pill clr-combobox-truncation-row\">\n <span role=\"gridcell\" class=\"clr-combobox-truncation-cell\">\n <span class=\"clr-combobox-pill-content\">\n <button\n #truncationButton\n clrKeyFocusItem\n type=\"button\"\n class=\"btn btn-link clr-combobox-show-more-btn\"\n (click)=\"toggleSelectionExpand()\"\n [attr.aria-expanded]=\"selectionExpanded\"\n [attr.aria-controls]=\"'expanded-selection-' + id\"\n >\n @if (!selectionExpanded) { {{ showAllText }} } @else { {{ commonStrings.keys.comboboxShowLess }} }\n </button>\n </span>\n </span>\n </span>\n } } @else { @for (item of multiSelectModel; track item; let i = $index) {\n <ng-container\n [ngTemplateOutlet]=\"pillTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: i}\"\n ></ng-container>\n } }\n </span>\n\n @if (showSelectAll && shouldCalculate) {\n <span class=\"clr-combobox-pills-calculation\" aria-hidden=\"true\">\n @for (item of multiSelectModel; track item) {\n <span class=\"label label-combobox-pill\" #pill>\n <span class=\"clr-combobox-pill-content\">\n @if (optionSelected) {\n <ng-container\n [ngTemplateOutlet]=\"optionSelected.template\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n ></ng-container>\n }\n </span>\n <button type=\"button\" class=\"clr-combobox-remove-btn\" tabindex=\"-1\">\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n }\n </span>\n } }\n\n <input\n #textboxInput\n type=\"text\"\n role=\"combobox\"\n [id]=\"inputId()\"\n class=\"clr-input clr-combobox-input\"\n [(ngModel)]=\"searchText\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus()\"\n (change)=\"onChange()\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-owns]=\"ariaOwns\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"control?.invalid? true: null\"\n [disabled]=\"control?.disabled? true: null\"\n [attr.aria-activedescendant]=\"getActiveDescendant()\"\n [attr.placeholder]=\"placeholder\"\n />\n\n <!-- No click handler, as it uses the handler on the .clr-combobox-wrapper -->\n <button\n #trigger\n type=\"button\"\n class=\"clr-combobox-trigger\"\n tabindex=\"-1\"\n [disabled]=\"control?.disabled || null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxOpen\"\n >\n <cds-icon shape=\"angle\" direction=\"down\"></cds-icon>\n </button>\n\n <div class=\"clr-focus-indicator\" [class.clr-focus]=\"focused\"></div>\n</div>\n\n<!-- Both close handlers are handled manually.\n'outsideClickToClose' has complex handling that's necessary\nto be manual due to the component architecture -->\n<div role=\"dialog\" *clrPopoverContent=\"openState; at popoverPosition; type: popoverType;\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "component", type: i3.ClrRovingTabindex, selector: "[clrRovingTabindex]", inputs: ["clrRovingTabindex", "clrRovingTabindexDisabled"] }, { kind: "directive", type: i3.ClrKeyFocusItem, selector: "[clrKeyFocusItem]" }, { kind: "directive", type: i4.ClrPopoverOrigin, selector: "[clrPopoverOrigin]" }, { kind: "directive", type: i4.ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentAvailablePositions", "clrPopoverContentType", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose", "clrPopoverContentOrigin"] }, { kind: "pipe", type: i8.SlicePipe, name: "slice" }] }); }
|
|
1460
|
+
], queries: [{ propertyName: "optionSelected", first: true, predicate: ClrOptionSelected, descendants: true }, { propertyName: "options", first: true, predicate: ClrOptions, descendants: true }], viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textboxInput"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "truncationButton", first: true, predicate: ["truncationButton"], descendants: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, static: true }, { propertyName: "calculationPills", predicate: ["pill"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i4.ClrPopoverHostDirective }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<!-- The (click) handler is needed to auto-focus on input field which can not currently occupy the whole\nwidth of the component, after being wrapped to a new line -->\n<div\n #wrapper\n class=\"clr-combobox-wrapper\"\n clrPopoverOrigin\n (click)=\"onWrapperClick($event)\"\n [class.multi]=\"multiSelect\"\n [class.invalid]=\"(control?.control.touched && control?.invalid)\"\n [class.disabled]=\"control?.disabled\"\n>\n @if (multiSelect && multiSelectModel && multiSelectModel.length > 0) {\n <span\n role=\"grid\"\n clrRovingTabindex\n [clrRovingTabindexDisabled]=\"control?.disabled\"\n clrDirection=\"both\"\n [attr.aria-label]=\"getSelectionAriaLabel()\"\n [attr.aria-disabled]=\"control?.disabled? true: null\"\n class=\"clr-combobox-pills\"\n >\n <ng-template #pillTemplate let-item let-i=\"index\">\n <span class=\"label label-combobox-pill\" role=\"row\">\n <span role=\"gridcell\">\n <span class=\"clr-combobox-pill-content\" clrKeyFocusItem>\n @if (optionSelected) {\n <ng-container\n [ngTemplateOutlet]=\"optionSelected.template\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n ></ng-container>\n }\n </span>\n </span>\n <span role=\"gridcell\">\n <button\n clrKeyFocusItem\n type=\"button\"\n class=\"clr-combobox-remove-btn\"\n [disabled]=\"control?.disabled ? true : null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxDelete + ' ' + optionSelectionService.selectionModel.toString(displayField, i)\"\n (click)=\"unselect(item)\"\n >\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n </span>\n </ng-template>\n\n @if (showSelectAll) { @if (isTotalSelection && !selectionExpanded) {\n <span class=\"label label-combobox-pill\" role=\"row\">\n <span role=\"gridcell\">\n <span class=\"clr-combobox-pill-content\" clrKeyFocusItem>{{ allSelectedText }}</span>\n </span>\n <span role=\"gridcell\">\n <button\n clrKeyFocusItem\n type=\"button\"\n class=\"clr-combobox-remove-btn\"\n (click)=\"clearSelection()\"\n [attr.aria-label]=\"commonStrings.keys.comboboxUnselectAll\"\n >\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n </span>\n } @if (showIndividualPills) { @for (item of multiSelectModel | slice:0:calculatedLimit; track item; let i = $index)\n {\n <ng-container\n [ngTemplateOutlet]=\"pillTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: i}\"\n ></ng-container>\n } } @if (showTruncationToggle) {\n <span role=\"row\" class=\"label label-combobox-pill clr-combobox-truncation-row\">\n <span role=\"gridcell\" class=\"clr-combobox-truncation-cell\">\n <span class=\"clr-combobox-pill-content\">\n <button\n #truncationButton\n clrKeyFocusItem\n type=\"button\"\n class=\"btn btn-link clr-combobox-show-more-btn\"\n (click)=\"toggleSelectionExpand()\"\n [attr.aria-expanded]=\"selectionExpanded\"\n [attr.aria-controls]=\"'expanded-selection-' + id\"\n >\n @if (!selectionExpanded) { {{ showAllText }} } @else { {{ commonStrings.keys.comboboxShowLess }} }\n </button>\n </span>\n </span>\n </span>\n } } @else { @for (item of multiSelectModel; track item; let i = $index) {\n <ng-container\n [ngTemplateOutlet]=\"pillTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: i}\"\n ></ng-container>\n } }\n </span>\n\n @if (showSelectAll && shouldCalculate) {\n <span class=\"clr-combobox-pills-calculation\" aria-hidden=\"true\">\n @for (item of multiSelectModel; track item) {\n <span class=\"label label-combobox-pill\" #pill>\n <span class=\"clr-combobox-pill-content\">\n @if (optionSelected) {\n <ng-container\n [ngTemplateOutlet]=\"optionSelected.template\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n ></ng-container>\n }\n </span>\n <button type=\"button\" class=\"clr-combobox-remove-btn\" tabindex=\"-1\">\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n }\n </span>\n } }\n\n <input\n #textboxInput\n type=\"text\"\n role=\"combobox\"\n [id]=\"inputId()\"\n class=\"clr-input clr-combobox-input\"\n [(ngModel)]=\"searchText\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus()\"\n (change)=\"onChange()\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-owns]=\"ariaOwns\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"control?.invalid? true: null\"\n [disabled]=\"control?.disabled? true: null\"\n [attr.aria-activedescendant]=\"getActiveDescendant()\"\n [attr.placeholder]=\"placeholder\"\n />\n\n <!-- No click handler, as it uses the handler on the .clr-combobox-wrapper -->\n <button\n #trigger\n type=\"button\"\n class=\"clr-combobox-trigger\"\n tabindex=\"-1\"\n [disabled]=\"control?.disabled || null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxOpen\"\n >\n <cds-icon shape=\"angle\" direction=\"down\"></cds-icon>\n </button>\n\n <div class=\"clr-focus-indicator\" [class.clr-focus]=\"focused\"></div>\n</div>\n\n<!-- Both close handlers are handled manually.\n'outsideClickToClose' has complex handling that's necessary\nto be manual due to the component architecture -->\n<div role=\"dialog\" *clrPopoverContent=\"openState; at popoverPosition; type: popoverType;\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge", "innerOffset"] }, { kind: "component", type: i3.ClrRovingTabindex, selector: "[clrRovingTabindex]", inputs: ["clrRovingTabindex", "clrRovingTabindexDisabled"] }, { kind: "directive", type: i3.ClrKeyFocusItem, selector: "[clrKeyFocusItem]" }, { kind: "directive", type: i4.ClrPopoverOrigin, selector: "[clrPopoverOrigin]" }, { kind: "directive", type: i4.ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentAvailablePositions", "clrPopoverContentType", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose", "clrPopoverContentOrigin"] }, { kind: "pipe", type: i8.SlicePipe, name: "slice" }] }); }
|
|
1461
1461
|
}
|
|
1462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrCombobox, decorators: [{
|
|
1463
1463
|
type: Component,
|
|
1464
1464
|
args: [{ selector: 'clr-combobox', providers: [
|
|
1465
1465
|
OptionSelectionService,
|
|
@@ -1615,10 +1615,10 @@ class ClrOptionItems {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
this.iterableProxy.ngForOf = this.filteredItems;
|
|
1617
1617
|
}
|
|
1618
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1619
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
1618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptionItems, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: OptionSelectionService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1619
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: ClrOptionItems, isStandalone: false, selector: "[clrOptionItems][clrOptionItemsOf]", inputs: { rawItems: ["clrOptionItemsOf", "rawItems"], trackBy: ["clrOptionItemsTrackBy", "trackBy"], field: ["clrOptionItemsField", "field"] }, ngImport: i0 }); }
|
|
1620
1620
|
}
|
|
1621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptionItems, decorators: [{
|
|
1622
1622
|
type: Directive,
|
|
1623
1623
|
args: [{
|
|
1624
1624
|
selector: '[clrOptionItems][clrOptionItemsOf]',
|
|
@@ -1652,13 +1652,13 @@ class ClrOptionGroup {
|
|
|
1652
1652
|
constructor() {
|
|
1653
1653
|
this.labelId = uniqueIdFactory();
|
|
1654
1654
|
}
|
|
1655
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1656
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
1655
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptionGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1656
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: ClrOptionGroup, isStandalone: false, selector: "clr-option-group", inputs: { label: ["clrOptionGroupLabel", "label"] }, host: { properties: { "attr.role": "\"group\"", "attr.aria-labelledby": "labelId", "style.display": "clrOptionItems.hasResults ? undefined : \"none\"" } }, queries: [{ propertyName: "clrOptionItems", first: true, predicate: ClrOptionItems, descendants: true }], ngImport: i0, template: `
|
|
1657
1657
|
<span [id]="labelId" class="clr-option-group-label" role="presentation">{{ label }}</span>
|
|
1658
1658
|
<ng-content></ng-content>
|
|
1659
1659
|
`, isInline: true }); }
|
|
1660
1660
|
}
|
|
1661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrOptionGroup, decorators: [{
|
|
1662
1662
|
type: Component,
|
|
1663
1663
|
args: [{
|
|
1664
1664
|
selector: 'clr-option-group',
|
|
@@ -1691,8 +1691,8 @@ class ClrComboboxModule {
|
|
|
1691
1691
|
constructor() {
|
|
1692
1692
|
ClarityIcons.addIcons(successStandardIcon, errorStandardIcon, angleIcon, windowCloseIcon);
|
|
1693
1693
|
}
|
|
1694
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1695
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
1694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrComboboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1695
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: ClrComboboxModule, declarations: [ClrCombobox,
|
|
1696
1696
|
ClrComboboxContainer,
|
|
1697
1697
|
ClrOptions,
|
|
1698
1698
|
ClrOption,
|
|
@@ -1714,7 +1714,7 @@ class ClrComboboxModule {
|
|
|
1714
1714
|
ClrOptionSelected,
|
|
1715
1715
|
ClrConditionalModule,
|
|
1716
1716
|
ClrOptionItems] }); }
|
|
1717
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
1717
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrComboboxModule, imports: [CommonModule,
|
|
1718
1718
|
FormsModule,
|
|
1719
1719
|
ClrIcon,
|
|
1720
1720
|
ClrKeyFocusModule,
|
|
@@ -1724,7 +1724,7 @@ class ClrComboboxModule {
|
|
|
1724
1724
|
ClrSpinnerModule, ClrCommonFormsModule,
|
|
1725
1725
|
ClrConditionalModule] }); }
|
|
1726
1726
|
}
|
|
1727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1727
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ClrComboboxModule, decorators: [{
|
|
1728
1728
|
type: NgModule,
|
|
1729
1729
|
args: [{
|
|
1730
1730
|
imports: [
|