@clr/angular 17.7.0 → 17.8.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/clarity.api.md +49 -8
- package/data/datagrid/datagrid-virtual-scroll.directive.d.ts +4 -0
- package/data/datagrid/datagrid.d.ts +6 -2
- package/data/datagrid/utils/key-navigation-grid.controller.d.ts +19 -2
- package/esm2020/data/datagrid/datagrid-column.mjs +9 -9
- package/esm2020/data/datagrid/datagrid-row-detail.mjs +31 -11
- package/esm2020/data/datagrid/datagrid-row.mjs +3 -3
- package/esm2020/data/datagrid/datagrid-virtual-scroll.directive.mjs +14 -3
- package/esm2020/data/datagrid/datagrid.mjs +10 -6
- package/esm2020/data/datagrid/utils/key-navigation-grid.controller.mjs +238 -56
- package/esm2020/data/tree-view/tree-node.mjs +3 -3
- package/esm2020/emphasis/alert/alerts-pager.mjs +3 -3
- package/esm2020/forms/checkbox/checkbox-container.mjs +7 -3
- package/esm2020/forms/checkbox/checkbox-wrapper.mjs +8 -3
- package/esm2020/forms/checkbox/checkbox.mjs +5 -1
- package/esm2020/forms/datepicker/day.mjs +2 -2
- package/esm2020/forms/datepicker/yearpicker.mjs +6 -1
- package/esm2020/layout/breadcrumbs/index.mjs +2 -1
- package/esm2020/modal/modal.mjs +4 -3
- package/esm2020/modal/side-panel.mjs +5 -1
- package/esm2020/popover/signpost/signpost.mjs +9 -6
- package/esm2020/utils/conditional/if-expanded.directive.mjs +2 -1
- package/esm2020/utils/conditional/if-expanded.service.mjs +2 -1
- package/esm2020/utils/i18n/common-strings.default.mjs +2 -2
- package/esm2020/wizard/wizard-stepnav-item.mjs +34 -7
- package/esm2020/wizard/wizard-stepnav.mjs +30 -24
- package/esm2020/wizard/wizard.mjs +3 -3
- package/fesm2015/clr-angular.mjs +830 -554
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +833 -553
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/forms/checkbox/checkbox-container.d.ts +1 -0
- package/forms/checkbox/checkbox-wrapper.d.ts +3 -1
- package/forms/checkbox/checkbox.d.ts +2 -0
- package/forms/datepicker/yearpicker.d.ts +1 -0
- package/layout/breadcrumbs/index.d.ts +1 -0
- package/package.json +2 -2
- package/popover/signpost/signpost.d.ts +2 -1
- package/utils/conditional/if-expanded.service.d.ts +1 -0
- package/wizard/wizard-stepnav-item.d.ts +5 -0
- package/wizard/wizard-stepnav.d.ts +2 -1
package/fesm2015/clr-angular.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, NgModule, Optional, Input, Injectable, Component, ChangeDetectionStrategy, EventEmitter, SkipSelf, HostBinding, Output, ContentChildren, PLATFORM_ID, Inject, ViewChild, HostListener, Renderer2, InjectionToken, ElementRef, NgZone, ChangeDetectorRef, ContentChild, ComponentFactoryResolver, KeyValueDiffers, Self, Attribute, TemplateRef, ViewContainerRef, LOCALE_ID,
|
|
2
|
+
import { Directive, NgModule, Optional, Input, Injectable, Component, ChangeDetectionStrategy, EventEmitter, SkipSelf, HostBinding, Output, ContentChildren, PLATFORM_ID, Inject, ViewChild, HostListener, Renderer2, InjectionToken, ElementRef, NgZone, ChangeDetectorRef, ContentChild, ComponentFactoryResolver, KeyValueDiffers, Self, forwardRef, Attribute, TemplateRef, ViewContainerRef, LOCALE_ID, inject, Injector, VERSION, EnvironmentInjector, IterableDiffers } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule, isPlatformBrowser, DOCUMENT, NgForOf, getLocaleDayNames, FormStyle, TranslationWidth, getLocaleMonthNames, getLocaleFirstDayOfWeek, getLocaleDateFormat, FormatWidth } from '@angular/common';
|
|
5
5
|
import { ClarityIcons, angleIcon, exclamationCircleIcon, checkCircleIcon, ellipsisHorizontalIcon, windowCloseIcon, infoCircleIcon, timesIcon, angleDoubleIcon, eventIcon, calendarIcon, folderOpenIcon, eyeHideIcon, eyeIcon, ellipsisVerticalIcon, viewColumnsIcon, arrowIcon, stepForward2Icon, filterGridCircleIcon, filterGridIcon, errorStandardIcon, helpIcon, infoStandardIcon, noteIcon, successStandardIcon, warningStandardIcon, circleIcon, dotCircleIcon } from '@cds/core/icon';
|
|
@@ -150,6 +150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
150
150
|
class IfExpandService {
|
|
151
151
|
constructor() {
|
|
152
152
|
this.expandable = 0;
|
|
153
|
+
this.hasExpandTemplate = false;
|
|
153
154
|
this._loading = false;
|
|
154
155
|
this._expanded = false;
|
|
155
156
|
this._expandChange = new Subject();
|
|
@@ -373,7 +374,7 @@ const commonStringsDefault = {
|
|
|
373
374
|
wizardStep: 'Step',
|
|
374
375
|
wizardStepSuccess: 'Completed',
|
|
375
376
|
wizardStepError: 'Error',
|
|
376
|
-
wizardStepnavAriaLabel: '
|
|
377
|
+
wizardStepnavAriaLabel: 'Wizard steps',
|
|
377
378
|
/**
|
|
378
379
|
* Password Input
|
|
379
380
|
* Screen-reader text for the hide/show password field button
|
|
@@ -3577,6 +3578,7 @@ class ClrIfExpanded {
|
|
|
3577
3578
|
this.updateView();
|
|
3578
3579
|
this.expandedChange.emit(expand.expanded);
|
|
3579
3580
|
}));
|
|
3581
|
+
expand.hasExpandTemplate = !!template;
|
|
3580
3582
|
}
|
|
3581
3583
|
get expanded() {
|
|
3582
3584
|
return this._expanded;
|
|
@@ -5858,13 +5860,13 @@ class ClrSignpost {
|
|
|
5858
5860
|
}
|
|
5859
5861
|
}
|
|
5860
5862
|
ClrSignpost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrSignpost, deps: [{ token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5861
|
-
ClrSignpost.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrSignpost, selector: "clr-signpost", host: { properties: { "class.signpost": "true" } }, providers: [SignpostFocusManager, SignpostIdService], queries: [{ propertyName: "customTrigger", first: true, predicate: ClrSignpostTrigger, descendants: true }], hostDirectives: [{ directive: ClrPopoverHostDirective }], ngImport: i0, template: `
|
|
5863
|
+
ClrSignpost.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrSignpost, selector: "clr-signpost", inputs: { signpostTriggerAriaLabel: ["clrSignpostTriggerAriaLabel", "signpostTriggerAriaLabel"] }, host: { properties: { "class.signpost": "true" } }, providers: [SignpostFocusManager, SignpostIdService], queries: [{ propertyName: "customTrigger", first: true, predicate: ClrSignpostTrigger, descendants: true }], hostDirectives: [{ directive: ClrPopoverHostDirective }], ngImport: i0, template: `
|
|
5862
5864
|
<ng-container *ngIf="!useCustomTrigger">
|
|
5863
5865
|
<button
|
|
5864
5866
|
type="button"
|
|
5865
5867
|
class="signpost-action btn btn-sm btn-icon btn-link"
|
|
5866
5868
|
clrSignpostTrigger
|
|
5867
|
-
[attr.aria-label]="commonStrings.keys.signpostToggle"
|
|
5869
|
+
[attr.aria-label]="signpostTriggerAriaLabel || commonStrings.keys.signpostToggle"
|
|
5868
5870
|
>
|
|
5869
5871
|
<cds-icon shape="info-circle" [attr.title]="commonStrings.keys.info"></cds-icon>
|
|
5870
5872
|
</button>
|
|
@@ -5882,7 +5884,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
5882
5884
|
type="button"
|
|
5883
5885
|
class="signpost-action btn btn-sm btn-icon btn-link"
|
|
5884
5886
|
clrSignpostTrigger
|
|
5885
|
-
[attr.aria-label]="commonStrings.keys.signpostToggle"
|
|
5887
|
+
[attr.aria-label]="signpostTriggerAriaLabel || commonStrings.keys.signpostToggle"
|
|
5886
5888
|
>
|
|
5887
5889
|
<cds-icon shape="info-circle" [attr.title]="commonStrings.keys.info"></cds-icon>
|
|
5888
5890
|
</button>
|
|
@@ -5894,7 +5896,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
5894
5896
|
providers: [SignpostFocusManager, SignpostIdService],
|
|
5895
5897
|
hostDirectives: [ClrPopoverHostDirective],
|
|
5896
5898
|
}]
|
|
5897
|
-
}], ctorParameters: function () { return [{ type: ClrCommonStringsService }]; }, propDecorators: {
|
|
5899
|
+
}], ctorParameters: function () { return [{ type: ClrCommonStringsService }]; }, propDecorators: { signpostTriggerAriaLabel: [{
|
|
5900
|
+
type: Input,
|
|
5901
|
+
args: ['clrSignpostTriggerAriaLabel']
|
|
5902
|
+
}], customTrigger: [{
|
|
5898
5903
|
type: ContentChild,
|
|
5899
5904
|
args: [ClrSignpostTrigger]
|
|
5900
5905
|
}] } });
|
|
@@ -7529,7 +7534,7 @@ class ClrCheckboxWrapper {
|
|
|
7529
7534
|
}
|
|
7530
7535
|
}
|
|
7531
7536
|
ClrCheckboxWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrCheckboxWrapper, deps: [{ token: IS_TOGGLE }], target: i0.ɵɵFactoryTarget.Component });
|
|
7532
|
-
ClrCheckboxWrapper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper", host: { properties: { "class.clr-checkbox-wrapper": "!toggle", "class.clr-toggle-wrapper": "toggle" } }, providers: [ControlIdService, IS_TOGGLE_PROVIDER], queries: [{ propertyName: "label", first: true, predicate: ClrLabel, descendants: true, static: true }], ngImport: i0, template: `
|
|
7537
|
+
ClrCheckboxWrapper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrCheckboxWrapper, 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: ClrLabel, descendants: true, static: true }, { propertyName: "checkbox", first: true, predicate: i0.forwardRef(function () { return ClrCheckbox; }), descendants: true, static: true }], ngImport: i0, template: `
|
|
7533
7538
|
<ng-content select="[clrCheckbox],[clrToggle]"></ng-content>
|
|
7534
7539
|
<ng-content select="label"></ng-content>
|
|
7535
7540
|
<label *ngIf="!label"></label>
|
|
@@ -7545,6 +7550,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
7545
7550
|
`,
|
|
7546
7551
|
host: {
|
|
7547
7552
|
'[class.clr-checkbox-wrapper]': '!toggle',
|
|
7553
|
+
'[class.clr-checkbox-wrapper-disabled]': 'checkbox?.controlDisabled',
|
|
7548
7554
|
'[class.clr-toggle-wrapper]': 'toggle',
|
|
7549
7555
|
},
|
|
7550
7556
|
providers: [ControlIdService, IS_TOGGLE_PROVIDER],
|
|
@@ -7557,6 +7563,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
7557
7563
|
}, propDecorators: { label: [{
|
|
7558
7564
|
type: ContentChild,
|
|
7559
7565
|
args: [ClrLabel, { static: true }]
|
|
7566
|
+
}], checkbox: [{
|
|
7567
|
+
type: ContentChild,
|
|
7568
|
+
args: [forwardRef(() => ClrCheckbox), { static: true }]
|
|
7560
7569
|
}] } });
|
|
7561
7570
|
|
|
7562
7571
|
/*
|
|
@@ -7574,8 +7583,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
7574
7583
|
class ClrCheckbox extends WrappedFormControl {
|
|
7575
7584
|
constructor(vcr, injector, control, renderer, el, toggle) {
|
|
7576
7585
|
super(vcr, ClrCheckboxWrapper, injector, control, renderer, el);
|
|
7586
|
+
this.control = control;
|
|
7577
7587
|
this.toggle = toggle;
|
|
7578
7588
|
}
|
|
7589
|
+
get controlDisabled() {
|
|
7590
|
+
var _a;
|
|
7591
|
+
return (_a = this.control) === null || _a === void 0 ? void 0 : _a.disabled;
|
|
7592
|
+
}
|
|
7579
7593
|
ngOnInit() {
|
|
7580
7594
|
super.ngOnInit();
|
|
7581
7595
|
const toggleService = this.getProviderFromContainer(IS_TOGGLE, null);
|
|
@@ -7634,6 +7648,11 @@ class ClrCheckboxContainer extends ClrAbstractContainer {
|
|
|
7634
7648
|
this.inline = !!value;
|
|
7635
7649
|
}
|
|
7636
7650
|
}
|
|
7651
|
+
get allCheckboxesDisabled() {
|
|
7652
|
+
var _a, _b;
|
|
7653
|
+
return (((_a = this.control) === null || _a === void 0 ? void 0 : _a.disabled) &&
|
|
7654
|
+
(!((_b = this.additionalControls) === null || _b === void 0 ? void 0 : _b.length) || this.additionalControls.every(control => control.disabled)));
|
|
7655
|
+
}
|
|
7637
7656
|
ngAfterContentInit() {
|
|
7638
7657
|
this.setAriaRoles();
|
|
7639
7658
|
}
|
|
@@ -7642,7 +7661,7 @@ class ClrCheckboxContainer extends ClrAbstractContainer {
|
|
|
7642
7661
|
}
|
|
7643
7662
|
}
|
|
7644
7663
|
ClrCheckboxContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrCheckboxContainer, deps: [{ token: LayoutService, optional: true }, { token: ControlClassService }, { token: NgControlService }, { token: IfControlStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7645
|
-
ClrCheckboxContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrCheckboxContainer, selector: "clr-checkbox-container,clr-toggle-container", inputs: { clrInline: "clrInline" }, host: { properties: { "class.clr-form-control": "true", "class.clr-form-control-disabled": "
|
|
7664
|
+
ClrCheckboxContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrCheckboxContainer, 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" } }, providers: [IfControlStateService, NgControlService, ControlClassService, ContainerIdService], queries: [{ propertyName: "checkboxes", predicate: ClrCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
7646
7665
|
<ng-content select="label"></ng-content>
|
|
7647
7666
|
<label *ngIf="!label && addGrid()"></label>
|
|
7648
7667
|
<div class="clr-control-container" [class.clr-control-inline]="clrInline" [ngClass]="controlClass()">
|
|
@@ -7704,7 +7723,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
7704
7723
|
`,
|
|
7705
7724
|
host: {
|
|
7706
7725
|
'[class.clr-form-control]': 'true',
|
|
7707
|
-
'[class.clr-form-control-disabled]': '
|
|
7726
|
+
'[class.clr-form-control-disabled]': 'allCheckboxesDisabled',
|
|
7708
7727
|
'[class.clr-row]': 'addGrid()',
|
|
7709
7728
|
'[attr.role]': 'role',
|
|
7710
7729
|
},
|
|
@@ -13226,7 +13245,7 @@ class ClrDay {
|
|
|
13226
13245
|
}
|
|
13227
13246
|
else if (this._dateNavigationService.selectedDay && !this._dateNavigationService.selectedEndDay) {
|
|
13228
13247
|
return (((_c = this._dayView.dayModel) === null || _c === void 0 ? void 0 : _c.isAfter(this._dateNavigationService.selectedDay)) &&
|
|
13229
|
-
((_d = this._dayView.dayModel) === null || _d === void 0 ? void 0 : _d.isBefore(this._dateNavigationService.hoveredDay)));
|
|
13248
|
+
((_d = this._dayView.dayModel) === null || _d === void 0 ? void 0 : _d.isBefore(this._dateNavigationService.hoveredDay, true)));
|
|
13230
13249
|
}
|
|
13231
13250
|
else {
|
|
13232
13251
|
return false;
|
|
@@ -14399,6 +14418,9 @@ class ClrYearpicker {
|
|
|
14399
14418
|
get calendarYear() {
|
|
14400
14419
|
return this._dateNavigationService.displayedCalendar.year;
|
|
14401
14420
|
}
|
|
14421
|
+
isCurrentCalendarYear(year) {
|
|
14422
|
+
return year === new Date().getFullYear();
|
|
14423
|
+
}
|
|
14402
14424
|
getIsRangeStartYear(year) {
|
|
14403
14425
|
var _a;
|
|
14404
14426
|
return this._dateNavigationService.isRangePicker && year === ((_a = this._dateNavigationService.selectedDay) === null || _a === void 0 ? void 0 : _a.year);
|
|
@@ -14585,6 +14607,7 @@ ClrYearpicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
14585
14607
|
[class.is-start-range]="getIsRangeStartYear(year)"
|
|
14586
14608
|
[class.is-end-range]="getIsRangeEndYear(year)"
|
|
14587
14609
|
[class.in-range]="isInRange(year)"
|
|
14610
|
+
[class.is-today]="isCurrentCalendarYear(year)"
|
|
14588
14611
|
(click)="changeYear(year)"
|
|
14589
14612
|
(mouseenter)="onHover(year)"
|
|
14590
14613
|
>
|
|
@@ -14645,6 +14668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
14645
14668
|
[class.is-start-range]="getIsRangeStartYear(year)"
|
|
14646
14669
|
[class.is-end-range]="getIsRangeEndYear(year)"
|
|
14647
14670
|
[class.in-range]="isInRange(year)"
|
|
14671
|
+
[class.is-today]="isCurrentCalendarYear(year)"
|
|
14648
14672
|
(click)="changeYear(year)"
|
|
14649
14673
|
(mouseenter)="onHover(year)"
|
|
14650
14674
|
>
|
|
@@ -17804,22 +17828,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
17804
17828
|
* This software is released under MIT license.
|
|
17805
17829
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
17806
17830
|
*/
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
]
|
|
17822
|
-
|
|
17831
|
+
const actionableItemSelectors = [
|
|
17832
|
+
'a[href]',
|
|
17833
|
+
'area[href]',
|
|
17834
|
+
'input:not([disabled])',
|
|
17835
|
+
'button:not([disabled])',
|
|
17836
|
+
'select:not([disabled])',
|
|
17837
|
+
'textarea:not([disabled])',
|
|
17838
|
+
'iframe',
|
|
17839
|
+
'object',
|
|
17840
|
+
'embed',
|
|
17841
|
+
'[contenteditable=true]',
|
|
17842
|
+
'[role=button]:not([disabled])',
|
|
17843
|
+
];
|
|
17844
|
+
function getTabbableItems(el) {
|
|
17845
|
+
const tabbableItemSelectors = [...actionableItemSelectors, '[tabindex="0"]:not([disabled])'];
|
|
17846
|
+
const tabbableSelector = tabbableItemSelectors.join(',');
|
|
17847
|
+
return Array.from(el.querySelectorAll(tabbableSelector));
|
|
17848
|
+
}
|
|
17849
|
+
function isActionableItem(el) {
|
|
17850
|
+
const actionableSelector = actionableItemSelectors.join(',');
|
|
17851
|
+
return el.matches(actionableSelector);
|
|
17823
17852
|
}
|
|
17824
17853
|
class KeyNavigationGridController {
|
|
17825
17854
|
constructor(zone) {
|
|
@@ -17829,7 +17858,7 @@ class KeyNavigationGridController {
|
|
|
17829
17858
|
this.destroy$ = new Subject();
|
|
17830
17859
|
this._activeCell = null;
|
|
17831
17860
|
this.config = {
|
|
17832
|
-
keyGridRows: '[role=row]:not(.datagrid-placeholder)',
|
|
17861
|
+
keyGridRows: '[role=row]:not(.datagrid-placeholder):not([style*="display: none"])',
|
|
17833
17862
|
keyGridCells: '[role=gridcell]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), [role=columnheader]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), .datagrid-detail-caret',
|
|
17834
17863
|
keyGrid: '[role=grid]',
|
|
17835
17864
|
};
|
|
@@ -17864,7 +17893,7 @@ class KeyNavigationGridController {
|
|
|
17864
17893
|
? Array.from(this.cells).find(c => c === e.target || c === e.target.closest(this.config.keyGridCells))
|
|
17865
17894
|
: null;
|
|
17866
17895
|
if (activeCell) {
|
|
17867
|
-
this.setActiveCell(activeCell);
|
|
17896
|
+
this.setActiveCell(activeCell, { keepFocus: isActionableItem(e.target) });
|
|
17868
17897
|
}
|
|
17869
17898
|
}
|
|
17870
17899
|
});
|
|
@@ -17897,9 +17926,12 @@ class KeyNavigationGridController {
|
|
|
17897
17926
|
e.key === Keys.Home ||
|
|
17898
17927
|
e.key === Keys.PageUp ||
|
|
17899
17928
|
e.key === Keys.PageDown) {
|
|
17900
|
-
const
|
|
17929
|
+
const currentCellCoords = this.getCurrentCellCoordinates();
|
|
17930
|
+
const nextCellCoords = this.isExpandedRow(currentCellCoords.y) || this.isDetailsRow(currentCellCoords.y)
|
|
17931
|
+
? this.getNextForExpandedRowCoordinate(e, currentCellCoords)
|
|
17932
|
+
: this.getNextItemCoordinate(e, currentCellCoords);
|
|
17901
17933
|
const activeItem = this.rows
|
|
17902
|
-
? Array.from(this.
|
|
17934
|
+
? Array.from(this.getCellsForRow(nextCellCoords.y))[nextCellCoords.x]
|
|
17903
17935
|
: null;
|
|
17904
17936
|
if (activeItem) {
|
|
17905
17937
|
this.setActiveCell(activeItem);
|
|
@@ -17927,67 +17959,241 @@ class KeyNavigationGridController {
|
|
|
17927
17959
|
getActiveCell() {
|
|
17928
17960
|
return this._activeCell;
|
|
17929
17961
|
}
|
|
17930
|
-
setActiveCell(activeCell) {
|
|
17962
|
+
setActiveCell(activeCell, { keepFocus } = { keepFocus: false }) {
|
|
17931
17963
|
const prior = this.cells ? Array.from(this.cells).find(c => c.getAttribute('tabindex') === '0') : null;
|
|
17932
17964
|
if (prior) {
|
|
17933
17965
|
prior.setAttribute('tabindex', '-1');
|
|
17934
17966
|
}
|
|
17935
17967
|
activeCell.setAttribute('tabindex', '0');
|
|
17936
17968
|
this._activeCell = activeCell;
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
|
|
17969
|
+
if (!this.skipItemFocus && !keepFocus) {
|
|
17970
|
+
let elementToFocus;
|
|
17971
|
+
if (activeCell.getAttribute('role') === 'columnheader') {
|
|
17972
|
+
elementToFocus = activeCell;
|
|
17973
|
+
}
|
|
17974
|
+
else {
|
|
17975
|
+
const tabbableElements = getTabbableItems(activeCell);
|
|
17976
|
+
elementToFocus = tabbableElements.length ? tabbableElements[0] : activeCell;
|
|
17977
|
+
}
|
|
17978
|
+
elementToFocus.focus();
|
|
17941
17979
|
}
|
|
17942
17980
|
}
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
if (e.key === Keys.Tab) {
|
|
17947
|
-
currentCell = document.activeElement;
|
|
17981
|
+
getNextForExpandedRowCoordinate(e, currentCellCoords) {
|
|
17982
|
+
if (e.key === Keys.PageUp || e.key === Keys.PageDown) {
|
|
17983
|
+
return this.getNextItemCoordinate(e, currentCellCoords);
|
|
17948
17984
|
}
|
|
17949
|
-
|
|
17950
|
-
|
|
17951
|
-
|
|
17952
|
-
|
|
17953
|
-
|
|
17954
|
-
|
|
17955
|
-
|
|
17956
|
-
|
|
17957
|
-
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
|
|
17961
|
-
|
|
17985
|
+
if (!this.isDetailsRow(currentCellCoords.y) &&
|
|
17986
|
+
!this.isRowReplaced(currentCellCoords.y) &&
|
|
17987
|
+
(e.key === Keys.Home || e.key === Keys.End || e.key === Keys.ArrowRight || e.key === Keys.ArrowLeft)) {
|
|
17988
|
+
return this.getNextItemCoordinate(e, currentCellCoords);
|
|
17989
|
+
}
|
|
17990
|
+
const { numOfRows, numOfColumns, inlineStart, inlineEnd, isActionCell, nextCellCoords } = this.getCalcVariables(currentCellCoords);
|
|
17991
|
+
const isSingleCellExpandedRow = this.isSingleCellExpandedRow(currentCellCoords.y);
|
|
17992
|
+
if (e.key === Keys.ArrowUp && currentCellCoords.y !== 0) {
|
|
17993
|
+
nextCellCoords.y = currentCellCoords.y - 1;
|
|
17994
|
+
if (isSingleCellExpandedRow && !isActionCell) {
|
|
17995
|
+
if (this.isRowReplaced(currentCellCoords.y)) {
|
|
17996
|
+
nextCellCoords.y = nextCellCoords.y - 1;
|
|
17997
|
+
}
|
|
17998
|
+
if (this.isDetailsRow(nextCellCoords.y)) {
|
|
17999
|
+
nextCellCoords.x = 0;
|
|
18000
|
+
}
|
|
18001
|
+
else if (this.isDetailsRow(currentCellCoords.y) === false) {
|
|
18002
|
+
// false check is intentional, the ! operator may be missed easily in this case
|
|
18003
|
+
nextCellCoords.x = currentCellCoords.x;
|
|
18004
|
+
}
|
|
18005
|
+
else {
|
|
18006
|
+
nextCellCoords.x = this.actionCellCount(nextCellCoords.y);
|
|
18007
|
+
}
|
|
18008
|
+
return nextCellCoords;
|
|
18009
|
+
}
|
|
18010
|
+
if (isActionCell && this.isDetailsRow(nextCellCoords.y)) {
|
|
18011
|
+
nextCellCoords.y = nextCellCoords.y - 1;
|
|
18012
|
+
}
|
|
18013
|
+
else if (this.isRowReplaced(nextCellCoords.y)) {
|
|
18014
|
+
nextCellCoords.y = nextCellCoords.y - 1;
|
|
18015
|
+
if (!this.isDetailsRow(nextCellCoords.y)) {
|
|
18016
|
+
nextCellCoords.x = currentCellCoords.x + this.actionCellCount(nextCellCoords.y);
|
|
18017
|
+
}
|
|
18018
|
+
}
|
|
18019
|
+
else if (this.isDetailsRow(currentCellCoords.y) && !this.isDetailsRow(nextCellCoords.y)) {
|
|
18020
|
+
nextCellCoords.x = currentCellCoords.x + this.actionCellCount(nextCellCoords.y);
|
|
18021
|
+
}
|
|
18022
|
+
else if (!isActionCell && this.isDetailsRow(nextCellCoords.y)) {
|
|
18023
|
+
nextCellCoords.x = currentCellCoords.x - this.actionCellCount(currentCellCoords.y);
|
|
18024
|
+
}
|
|
18025
|
+
}
|
|
18026
|
+
else if (e.key === Keys.ArrowDown && currentCellCoords.y < numOfRows) {
|
|
18027
|
+
nextCellCoords.y = currentCellCoords.y + 1;
|
|
18028
|
+
if (isSingleCellExpandedRow && !isActionCell) {
|
|
18029
|
+
if (this.isRowReplaced(nextCellCoords.y)) {
|
|
18030
|
+
nextCellCoords.y = nextCellCoords.y + 1;
|
|
18031
|
+
}
|
|
18032
|
+
if (this.isDetailsRow(nextCellCoords.y)) {
|
|
18033
|
+
nextCellCoords.x = 0;
|
|
18034
|
+
}
|
|
18035
|
+
else {
|
|
18036
|
+
nextCellCoords.x = this.actionCellCount(nextCellCoords.y);
|
|
18037
|
+
}
|
|
18038
|
+
return nextCellCoords;
|
|
18039
|
+
}
|
|
18040
|
+
if (isActionCell || this.isRowReplaced(nextCellCoords.y)) {
|
|
18041
|
+
nextCellCoords.y = nextCellCoords.y + 1;
|
|
18042
|
+
}
|
|
18043
|
+
else if (this.getCellsForRow(currentCellCoords.y).length > numOfColumns) {
|
|
18044
|
+
nextCellCoords.x = currentCellCoords.x - this.actionCellCount(currentCellCoords.y);
|
|
18045
|
+
}
|
|
18046
|
+
else {
|
|
18047
|
+
nextCellCoords.x = currentCellCoords.x + this.actionCellCount(nextCellCoords.y);
|
|
18048
|
+
}
|
|
18049
|
+
}
|
|
18050
|
+
else if (e.key === inlineStart) {
|
|
18051
|
+
if (currentCellCoords.x !== 0) {
|
|
18052
|
+
nextCellCoords.x = currentCellCoords.x - 1;
|
|
18053
|
+
}
|
|
18054
|
+
else if (!isActionCell) {
|
|
18055
|
+
nextCellCoords.y = currentCellCoords.y - 1;
|
|
18056
|
+
nextCellCoords.x = this.actionCellCount(nextCellCoords.y) - 1;
|
|
18057
|
+
}
|
|
18058
|
+
}
|
|
18059
|
+
else if (e.key === inlineEnd && currentCellCoords.x < numOfColumns) {
|
|
18060
|
+
if (isActionCell &&
|
|
18061
|
+
currentCellCoords.x === this.actionCellCount(currentCellCoords.x) - 1 &&
|
|
18062
|
+
this.isRowReplaced(currentCellCoords.y) &&
|
|
18063
|
+
!this.isDetailsRow(currentCellCoords.y)) {
|
|
18064
|
+
nextCellCoords.y = currentCellCoords.y + 1;
|
|
18065
|
+
nextCellCoords.x = 0;
|
|
18066
|
+
}
|
|
18067
|
+
else {
|
|
18068
|
+
nextCellCoords.x = currentCellCoords.x + 1;
|
|
18069
|
+
}
|
|
18070
|
+
}
|
|
18071
|
+
else if (e.key === Keys.End) {
|
|
18072
|
+
nextCellCoords.x = this.getCellsForRow(currentCellCoords.y).length - 1;
|
|
18073
|
+
if (e.ctrlKey) {
|
|
18074
|
+
nextCellCoords.x = numOfColumns;
|
|
18075
|
+
nextCellCoords.y = numOfRows;
|
|
18076
|
+
}
|
|
18077
|
+
}
|
|
18078
|
+
else if (e.key === Keys.Home) {
|
|
18079
|
+
nextCellCoords.x = 0;
|
|
18080
|
+
nextCellCoords.y = currentCellCoords.y - 1;
|
|
18081
|
+
if (e.ctrlKey) {
|
|
18082
|
+
nextCellCoords.y = 0;
|
|
18083
|
+
}
|
|
18084
|
+
}
|
|
18085
|
+
return nextCellCoords;
|
|
18086
|
+
}
|
|
18087
|
+
getNextItemCoordinate(e, currentCellCoords) {
|
|
18088
|
+
const { numOfRows, numOfColumns, inlineStart, inlineEnd, itemsPerPage, isActionCell, nextCellCoords } = this.getCalcVariables(currentCellCoords);
|
|
18089
|
+
if (e.key === Keys.ArrowUp && currentCellCoords.y !== 0) {
|
|
18090
|
+
nextCellCoords.y = currentCellCoords.y - 1;
|
|
18091
|
+
if (this.isSingleCellExpandedRow(nextCellCoords.y) && !isActionCell && this.isDetailsRow(nextCellCoords.y)) {
|
|
18092
|
+
nextCellCoords.x = 0;
|
|
18093
|
+
return nextCellCoords;
|
|
18094
|
+
}
|
|
18095
|
+
if (this.isDetailsRow(nextCellCoords.y)) {
|
|
18096
|
+
if (isActionCell) {
|
|
18097
|
+
nextCellCoords.y = nextCellCoords.y - 1;
|
|
18098
|
+
}
|
|
18099
|
+
else {
|
|
18100
|
+
nextCellCoords.x = nextCellCoords.x - this.actionCellCount(currentCellCoords.y);
|
|
18101
|
+
}
|
|
18102
|
+
}
|
|
17962
18103
|
}
|
|
17963
|
-
else if (e.key === Keys.ArrowDown && y < numOfRows) {
|
|
17964
|
-
y = y + 1;
|
|
18104
|
+
else if (e.key === Keys.ArrowDown && currentCellCoords.y < numOfRows) {
|
|
18105
|
+
nextCellCoords.y = currentCellCoords.y + 1;
|
|
18106
|
+
if (this.isSingleCellExpandedRow(nextCellCoords.y) && !isActionCell && this.isRowReplaced(nextCellCoords.y)) {
|
|
18107
|
+
nextCellCoords.x = 0;
|
|
18108
|
+
nextCellCoords.y = nextCellCoords.y + 1;
|
|
18109
|
+
return nextCellCoords;
|
|
18110
|
+
}
|
|
18111
|
+
if (!isActionCell && this.isRowReplaced(nextCellCoords.y)) {
|
|
18112
|
+
nextCellCoords.y = nextCellCoords.y + 1;
|
|
18113
|
+
nextCellCoords.x = nextCellCoords.x - this.actionCellCount(currentCellCoords.y);
|
|
18114
|
+
}
|
|
17965
18115
|
}
|
|
17966
|
-
else if (e.key === inlineStart && x !== 0) {
|
|
17967
|
-
x = x - 1;
|
|
18116
|
+
else if (e.key === inlineStart && currentCellCoords.x !== 0) {
|
|
18117
|
+
nextCellCoords.x = currentCellCoords.x - 1;
|
|
17968
18118
|
}
|
|
17969
|
-
else if (e.key === inlineEnd && x < numOfColumns) {
|
|
17970
|
-
x = x + 1;
|
|
18119
|
+
else if (e.key === inlineEnd && currentCellCoords.x < numOfColumns) {
|
|
18120
|
+
nextCellCoords.x = currentCellCoords.x + 1;
|
|
17971
18121
|
}
|
|
17972
18122
|
else if (e.key === Keys.End) {
|
|
17973
|
-
x = numOfColumns;
|
|
18123
|
+
nextCellCoords.x = numOfColumns;
|
|
17974
18124
|
if (e.ctrlKey) {
|
|
17975
|
-
y = numOfRows;
|
|
18125
|
+
nextCellCoords.y = numOfRows;
|
|
17976
18126
|
}
|
|
17977
18127
|
}
|
|
17978
18128
|
else if (e.key === Keys.Home) {
|
|
17979
|
-
x = 0;
|
|
18129
|
+
nextCellCoords.x = 0;
|
|
17980
18130
|
if (e.ctrlKey) {
|
|
17981
|
-
y = 0;
|
|
18131
|
+
nextCellCoords.y = 0;
|
|
17982
18132
|
}
|
|
17983
18133
|
}
|
|
17984
18134
|
else if (e.key === Keys.PageUp) {
|
|
17985
|
-
y = y - itemsPerPage > 0 ? y - itemsPerPage + 1 : 1;
|
|
18135
|
+
nextCellCoords.y = currentCellCoords.y - itemsPerPage > 0 ? currentCellCoords.y - itemsPerPage + 1 : 1;
|
|
17986
18136
|
}
|
|
17987
18137
|
else if (e.key === Keys.PageDown) {
|
|
17988
|
-
y =
|
|
18138
|
+
nextCellCoords.y =
|
|
18139
|
+
currentCellCoords.y + itemsPerPage < numOfRows ? currentCellCoords.y + itemsPerPage : numOfRows;
|
|
17989
18140
|
}
|
|
17990
|
-
return
|
|
18141
|
+
return nextCellCoords;
|
|
18142
|
+
}
|
|
18143
|
+
getCalcVariables(currentCellCoords) {
|
|
18144
|
+
var _a;
|
|
18145
|
+
const numOfRows = this.rows ? this.rows.length - 1 : 0;
|
|
18146
|
+
// calculate numOfColumns based on header cells.
|
|
18147
|
+
const numOfColumns = numOfRows ? this.getCellsForRow(0).length - 1 : 0;
|
|
18148
|
+
const dir = this.host.dir;
|
|
18149
|
+
const inlineStart = dir === 'rtl' ? Keys.ArrowRight : Keys.ArrowLeft;
|
|
18150
|
+
const inlineEnd = dir === 'rtl' ? Keys.ArrowLeft : Keys.ArrowRight;
|
|
18151
|
+
const itemsPerPage = Math.floor(((_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector('.datagrid').clientHeight) / this.rows[0].clientHeight) - 1 || 0;
|
|
18152
|
+
const isActionCell = this.isActionCell(currentCellCoords);
|
|
18153
|
+
const nextCellCoords = {
|
|
18154
|
+
x: currentCellCoords.x,
|
|
18155
|
+
y: currentCellCoords.y,
|
|
18156
|
+
};
|
|
18157
|
+
return { numOfRows, numOfColumns, inlineStart, inlineEnd, itemsPerPage, isActionCell, nextCellCoords };
|
|
18158
|
+
}
|
|
18159
|
+
getCurrentCellCoordinates() {
|
|
18160
|
+
const currentCell = this.cells ? Array.from(this.cells).find(i => i.getAttribute('tabindex') === '0') : null;
|
|
18161
|
+
const currentRow = currentCell ? currentCell.closest(this.config.keyGridRows) : null;
|
|
18162
|
+
const coordinates = {
|
|
18163
|
+
x: currentRow && currentCell
|
|
18164
|
+
? Array.from(currentRow.querySelectorAll(this.config.keyGridCells)).indexOf(currentCell)
|
|
18165
|
+
: 0,
|
|
18166
|
+
y: currentRow && currentCell && this.rows ? Array.from(this.rows).indexOf(currentRow) : 0,
|
|
18167
|
+
};
|
|
18168
|
+
return coordinates;
|
|
18169
|
+
}
|
|
18170
|
+
getCellsForRow(index) {
|
|
18171
|
+
return this.rows[index].querySelectorAll(this.config.keyGridCells);
|
|
18172
|
+
}
|
|
18173
|
+
isExpandedRow(index) {
|
|
18174
|
+
const selectedElement = this.rows[index].querySelector('.datagrid-row-detail');
|
|
18175
|
+
return selectedElement ? selectedElement.style.display !== 'none' : false;
|
|
18176
|
+
}
|
|
18177
|
+
isDetailsRow(index) {
|
|
18178
|
+
return this.rows[index].classList.contains('datagrid-row-detail');
|
|
18179
|
+
}
|
|
18180
|
+
isRowReplaced(index) {
|
|
18181
|
+
return !!this.rows[index].closest('clr-dg-row.datagrid-row-replaced');
|
|
18182
|
+
}
|
|
18183
|
+
isSingleCellExpandedRow(index) {
|
|
18184
|
+
const row = this.rows[index].classList.contains('datagrid-row-detail')
|
|
18185
|
+
? this.rows[index]
|
|
18186
|
+
: this.rows[index].querySelector('.datagrid-row-detail');
|
|
18187
|
+
return (row === null || row === void 0 ? void 0 : row.querySelectorAll(this.config.keyGridCells).length) === 1;
|
|
18188
|
+
}
|
|
18189
|
+
actionCellCount(index) {
|
|
18190
|
+
return this.actionCellsAsArray(index).length;
|
|
18191
|
+
}
|
|
18192
|
+
actionCellsAsArray(index) {
|
|
18193
|
+
return Array.from(this.rows[index].querySelectorAll('.datagrid-row-sticky .datagrid-cell, .datagrid-row-sticky .datagrid-column'));
|
|
18194
|
+
}
|
|
18195
|
+
isActionCell(cellCoords) {
|
|
18196
|
+
return !!this.actionCellsAsArray(cellCoords.y)[cellCoords.x];
|
|
17991
18197
|
}
|
|
17992
18198
|
}
|
|
17993
18199
|
KeyNavigationGridController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -19726,17 +19932,17 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
|
|
|
19726
19932
|
return;
|
|
19727
19933
|
}
|
|
19728
19934
|
switch (value) {
|
|
19729
|
-
// the Unsorted case happens when the current state is either Asc or Desc
|
|
19730
|
-
default:
|
|
19731
|
-
case ClrDatagridSortOrder.UNSORTED:
|
|
19732
|
-
this._sort.clear();
|
|
19733
|
-
break;
|
|
19734
19935
|
case ClrDatagridSortOrder.ASC:
|
|
19735
19936
|
this.sort(false);
|
|
19736
19937
|
break;
|
|
19737
19938
|
case ClrDatagridSortOrder.DESC:
|
|
19738
19939
|
this.sort(true);
|
|
19739
19940
|
break;
|
|
19941
|
+
// the Unsorted case happens when the current state is neither Asc or Desc
|
|
19942
|
+
case ClrDatagridSortOrder.UNSORTED:
|
|
19943
|
+
default:
|
|
19944
|
+
this._sort.clear();
|
|
19945
|
+
break;
|
|
19740
19946
|
}
|
|
19741
19947
|
}
|
|
19742
19948
|
set updateFilterValue(newValue) {
|
|
@@ -19776,13 +19982,13 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
|
|
|
19776
19982
|
}
|
|
19777
19983
|
get ariaSort() {
|
|
19778
19984
|
switch (this._sortOrder) {
|
|
19779
|
-
default:
|
|
19780
|
-
case ClrDatagridSortOrder.UNSORTED:
|
|
19781
|
-
return 'none';
|
|
19782
19985
|
case ClrDatagridSortOrder.ASC:
|
|
19783
19986
|
return 'ascending';
|
|
19784
19987
|
case ClrDatagridSortOrder.DESC:
|
|
19785
19988
|
return 'descending';
|
|
19989
|
+
case ClrDatagridSortOrder.UNSORTED:
|
|
19990
|
+
default:
|
|
19991
|
+
return 'none';
|
|
19786
19992
|
}
|
|
19787
19993
|
}
|
|
19788
19994
|
get sortDirection() {
|
|
@@ -21138,7 +21344,7 @@ ClrDatagridRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
|
21138
21344
|
DatagridIfExpandService,
|
|
21139
21345
|
{ provide: IfExpandService, useExisting: DatagridIfExpandService },
|
|
21140
21346
|
{ provide: LoadingListener, useExisting: DatagridIfExpandService },
|
|
21141
|
-
], queries: [{ propertyName: "dgCells", predicate: ClrDatagridCell }], viewQueries: [{ propertyName: "expandAnimation", first: true, predicate: ClrExpandableAnimation, descendants: true }, { propertyName: "detailButton", first: true, predicate: ["detailButton"], descendants: true }, { propertyName: "_stickyCells", first: true, predicate: ["stickyCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_scrollableCells", first: true, predicate: ["scrollableCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_calculatedCells", first: true, predicate: ["calculatedCells"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<div\n class=\"datagrid-row-clickable\"\n *ngIf=\"selection.rowSelectionMode\"\n (mousedown)=\"clearRanges($event)\"\n (click)=\"selectRow(!selected, $event)\"\n>\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</div>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\" (click)=\"clearRanges($event)\">\n <span class=\"clr-sr-only\">{{clrDgRowSelectionLabel || commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <clr-radio-wrapper>\n <input\n tabindex=\"-1\"\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <label class=\"clr-control-label clr-col-null\" [for]=\"radioId\">\n <span class=\"clr-sr-only\">{{ clrDgRowSelectionLabel || commonStrings.keys.select }}</span>\n </label>\n </clr-radio-wrapper>\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n tabindex=\"-1\"\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div\n *ngIf=\"detailService.enabled\"\n class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <button\n tabindex=\"-1\"\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [disabled]=\"detailDisabled\"\n *ngIf=\"!detailHidden\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isRowOpen(item)\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["id", "for"] }, { kind: "directive", type: ClrRadio, selector: "[clrRadio]" }, { kind: "component", type: ClrRadioWrapper, selector: "clr-radio-wrapper" }, { kind: "directive", type: i1.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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrExpandableAnimation, selector: "clr-expandable-animation", inputs: ["clrExpandTrigger"] }, { kind: "component", type: ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }, { kind: "directive", type: ClrDatagridSelectionCellDirective, selector: ".datagrid-select" }] });
|
|
21347
|
+
], queries: [{ propertyName: "dgCells", predicate: ClrDatagridCell }], viewQueries: [{ propertyName: "expandAnimation", first: true, predicate: ClrExpandableAnimation, descendants: true }, { propertyName: "detailButton", first: true, predicate: ["detailButton"], descendants: true }, { propertyName: "_stickyCells", first: true, predicate: ["stickyCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_scrollableCells", first: true, predicate: ["scrollableCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_calculatedCells", first: true, predicate: ["calculatedCells"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<div\n class=\"datagrid-row-clickable\"\n *ngIf=\"selection.rowSelectionMode\"\n (mousedown)=\"clearRanges($event)\"\n (click)=\"selectRow(!selected, $event)\"\n>\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</div>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\" (click)=\"clearRanges($event)\">\n <span class=\"clr-sr-only\">{{clrDgRowSelectionLabel || commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <clr-radio-wrapper>\n <input\n tabindex=\"-1\"\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <label class=\"clr-control-label clr-col-null\" [for]=\"radioId\">\n <span class=\"clr-sr-only\">{{ clrDgRowSelectionLabel || commonStrings.keys.select }}</span>\n </label>\n </clr-radio-wrapper>\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n tabindex=\"-1\"\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expand.hasExpandTemplate && !expand.expanded ? null : expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div\n *ngIf=\"detailService.enabled\"\n class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <button\n tabindex=\"-1\"\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [disabled]=\"detailDisabled\"\n *ngIf=\"!detailHidden\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isRowOpen(item)\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["id", "for"] }, { kind: "directive", type: ClrRadio, selector: "[clrRadio]" }, { kind: "component", type: ClrRadioWrapper, selector: "clr-radio-wrapper" }, { kind: "directive", type: i1.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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrExpandableAnimation, selector: "clr-expandable-animation", inputs: ["clrExpandTrigger"] }, { kind: "component", type: ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }, { kind: "directive", type: ClrDatagridSelectionCellDirective, selector: ".datagrid-select" }] });
|
|
21142
21348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridRow, decorators: [{
|
|
21143
21349
|
type: Component,
|
|
21144
21350
|
args: [{ selector: 'clr-dg-row', host: {
|
|
@@ -21150,7 +21356,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
21150
21356
|
DatagridIfExpandService,
|
|
21151
21357
|
{ provide: IfExpandService, useExisting: DatagridIfExpandService },
|
|
21152
21358
|
{ provide: LoadingListener, useExisting: DatagridIfExpandService },
|
|
21153
|
-
], template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<div\n class=\"datagrid-row-clickable\"\n *ngIf=\"selection.rowSelectionMode\"\n (mousedown)=\"clearRanges($event)\"\n (click)=\"selectRow(!selected, $event)\"\n>\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</div>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\" (click)=\"clearRanges($event)\">\n <span class=\"clr-sr-only\">{{clrDgRowSelectionLabel || commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <clr-radio-wrapper>\n <input\n tabindex=\"-1\"\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <label class=\"clr-control-label clr-col-null\" [for]=\"radioId\">\n <span class=\"clr-sr-only\">{{ clrDgRowSelectionLabel || commonStrings.keys.select }}</span>\n </label>\n </clr-radio-wrapper>\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n tabindex=\"-1\"\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div\n *ngIf=\"detailService.enabled\"\n class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <button\n tabindex=\"-1\"\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [disabled]=\"detailDisabled\"\n *ngIf=\"!detailHidden\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isRowOpen(item)\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n" }]
|
|
21359
|
+
], template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<div\n class=\"datagrid-row-clickable\"\n *ngIf=\"selection.rowSelectionMode\"\n (mousedown)=\"clearRanges($event)\"\n (click)=\"selectRow(!selected, $event)\"\n>\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</div>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\" (click)=\"clearRanges($event)\">\n <span class=\"clr-sr-only\">{{clrDgRowSelectionLabel || commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <clr-radio-wrapper>\n <input\n tabindex=\"-1\"\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n />\n <label class=\"clr-control-label clr-col-null\" [for]=\"radioId\">\n <span class=\"clr-sr-only\">{{ clrDgRowSelectionLabel || commonStrings.keys.select }}</span>\n </label>\n </clr-radio-wrapper>\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n tabindex=\"-1\"\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expand.hasExpandTemplate && !expand.expanded ? null : expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div\n *ngIf=\"detailService.enabled\"\n class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <button\n tabindex=\"-1\"\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [disabled]=\"detailDisabled\"\n *ngIf=\"!detailHidden\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isRowOpen(item)\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n" }]
|
|
21154
21360
|
}], ctorParameters: function () {
|
|
21155
21361
|
return [{ type: Selection }, { type: RowActionService }, { type: ExpandableRowsCount }, { type: DatagridIfExpandService }, { type: DetailService }, { type: DisplayModeService }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ClrCommonStringsService }, { type: Items }, { type: undefined, decorators: [{
|
|
21156
21362
|
type: Inject,
|
|
@@ -21287,110 +21493,404 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
21287
21493
|
* This software is released under MIT license.
|
|
21288
21494
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
21289
21495
|
*/
|
|
21290
|
-
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
this.
|
|
21298
|
-
this.
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
this.
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
if (this.sort.comparator instanceof DatagridPropertyComparator) {
|
|
21320
|
-
/*
|
|
21321
|
-
* Special case for the default object property comparator,
|
|
21322
|
-
* we give the property name instead of the actual comparator.
|
|
21323
|
-
*/
|
|
21324
|
-
state.sort = { by: this.sort.comparator.prop, reverse: this.sort.reverse };
|
|
21325
|
-
}
|
|
21326
|
-
else {
|
|
21327
|
-
state.sort = { by: this.sort.comparator, reverse: this.sort.reverse };
|
|
21328
|
-
}
|
|
21329
|
-
}
|
|
21330
|
-
const activeFilters = this.filters.getActiveFilters();
|
|
21331
|
-
if (activeFilters.length > 0) {
|
|
21332
|
-
state.filters = [];
|
|
21333
|
-
for (const filter of activeFilters) {
|
|
21334
|
-
if (filter.state) {
|
|
21335
|
-
state.filters.push(filter.state);
|
|
21336
|
-
}
|
|
21337
|
-
else {
|
|
21338
|
-
state.filters.push(filter);
|
|
21496
|
+
const defaultCdkFixedSizeVirtualScrollInputs = {
|
|
21497
|
+
itemSize: 32,
|
|
21498
|
+
minBufferPx: 200,
|
|
21499
|
+
maxBufferPx: 400,
|
|
21500
|
+
};
|
|
21501
|
+
class ClrDatagridVirtualScrollDirective {
|
|
21502
|
+
constructor(changeDetectorRef, iterableDiffers, items, ngZone, renderer2, templateRef, viewContainerRef, directionality, scrollDispatcher, viewportRuler, datagrid, columnsService, injector) {
|
|
21503
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
21504
|
+
this.iterableDiffers = iterableDiffers;
|
|
21505
|
+
this.items = items;
|
|
21506
|
+
this.ngZone = ngZone;
|
|
21507
|
+
this.renderer2 = renderer2;
|
|
21508
|
+
this.templateRef = templateRef;
|
|
21509
|
+
this.viewContainerRef = viewContainerRef;
|
|
21510
|
+
this.directionality = directionality;
|
|
21511
|
+
this.scrollDispatcher = scrollDispatcher;
|
|
21512
|
+
this.viewportRuler = viewportRuler;
|
|
21513
|
+
this.datagrid = datagrid;
|
|
21514
|
+
this.columnsService = columnsService;
|
|
21515
|
+
this.injector = injector;
|
|
21516
|
+
this.renderedRangeChange = new EventEmitter();
|
|
21517
|
+
this._cdkFixedSizeVirtualScrollInputs = Object.assign({}, defaultCdkFixedSizeVirtualScrollInputs);
|
|
21518
|
+
this.subscriptions = [];
|
|
21519
|
+
this.topIndex = 0;
|
|
21520
|
+
this.mutationChanges = new MutationObserver((mutations) => {
|
|
21521
|
+
mutations.forEach((mutation) => {
|
|
21522
|
+
// it is possible this to be called twice because the old class is removed and the new added
|
|
21523
|
+
if (mutation.target.classList.contains('datagrid-compact') && this.itemSize > 24) {
|
|
21524
|
+
this.itemSize = 24;
|
|
21339
21525
|
}
|
|
21340
|
-
}
|
|
21341
|
-
}
|
|
21342
|
-
|
|
21526
|
+
});
|
|
21527
|
+
});
|
|
21528
|
+
this.viewRepeater = new _RecycleViewRepeaterStrategy();
|
|
21529
|
+
this.cdkVirtualForInputs = {
|
|
21530
|
+
cdkVirtualForTrackBy: index => index,
|
|
21531
|
+
};
|
|
21532
|
+
items.smartenUp();
|
|
21533
|
+
datagrid.detailService.preventFocusScroll = true;
|
|
21534
|
+
this.datagridElementRef = datagrid.el;
|
|
21535
|
+
// default
|
|
21536
|
+
this.cdkVirtualForTemplateCacheSize = 20;
|
|
21537
|
+
this.mutationChanges.observe(this.datagridElementRef.nativeElement, {
|
|
21538
|
+
attributeFilter: ['class'],
|
|
21539
|
+
attributeOldValue: true,
|
|
21540
|
+
});
|
|
21541
|
+
this.virtualScrollStrategy = new FixedSizeVirtualScrollStrategy(this._cdkFixedSizeVirtualScrollInputs.itemSize, this._cdkFixedSizeVirtualScrollInputs.minBufferPx, this._cdkFixedSizeVirtualScrollInputs.maxBufferPx);
|
|
21343
21542
|
}
|
|
21344
|
-
|
|
21345
|
-
|
|
21346
|
-
StateProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: StateProvider });
|
|
21347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: StateProvider, decorators: [{
|
|
21348
|
-
type: Injectable
|
|
21349
|
-
}], ctorParameters: function () { return [{ type: FiltersProvider }, { type: Sort }, { type: Page }, { type: StateDebouncer }]; } });
|
|
21350
|
-
|
|
21351
|
-
/*
|
|
21352
|
-
* Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
|
|
21353
|
-
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
21354
|
-
* This software is released under MIT license.
|
|
21355
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
21356
|
-
*/
|
|
21357
|
-
class DatagridCellRenderer {
|
|
21358
|
-
constructor(el, renderer, organizer) {
|
|
21359
|
-
this.el = el;
|
|
21360
|
-
this.renderer = renderer;
|
|
21361
|
-
this.subscriptions = [];
|
|
21362
|
-
this.subscriptions.push(organizer.filterRenderSteps(DatagridRenderStep.CLEAR_WIDTHS).subscribe(() => this.clearWidth()));
|
|
21543
|
+
get cdkVirtualForOf() {
|
|
21544
|
+
return this.cdkVirtualForInputs.cdkVirtualForOf;
|
|
21363
21545
|
}
|
|
21364
|
-
|
|
21365
|
-
this.
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
}
|
|
21546
|
+
set cdkVirtualForOf(value) {
|
|
21547
|
+
this.cdkVirtualForInputs.cdkVirtualForOf = value;
|
|
21548
|
+
this.items.all = value;
|
|
21549
|
+
this.updateCdkVirtualForInputs();
|
|
21369
21550
|
}
|
|
21370
|
-
|
|
21371
|
-
this.
|
|
21372
|
-
this.setHidden(state);
|
|
21551
|
+
get cdkVirtualForTrackBy() {
|
|
21552
|
+
return this.cdkVirtualForInputs.cdkVirtualForTrackBy;
|
|
21373
21553
|
}
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
}
|
|
21378
|
-
else {
|
|
21379
|
-
this.renderer.removeClass(this.el.nativeElement, STRICT_WIDTH_CLASS);
|
|
21380
|
-
}
|
|
21381
|
-
this.renderer.setStyle(this.el.nativeElement, 'width', state.width + 'px');
|
|
21554
|
+
set cdkVirtualForTrackBy(value) {
|
|
21555
|
+
this.cdkVirtualForInputs.cdkVirtualForTrackBy = value;
|
|
21556
|
+
this.updateCdkVirtualForInputs();
|
|
21382
21557
|
}
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21386
|
-
}
|
|
21387
|
-
else {
|
|
21388
|
-
this.renderer.removeClass(this.el.nativeElement, HIDDEN_COLUMN_CLASS);
|
|
21389
|
-
}
|
|
21558
|
+
get cdkVirtualForTemplate() {
|
|
21559
|
+
var _a;
|
|
21560
|
+
return (_a = this === null || this === void 0 ? void 0 : this.cdkVirtualForInputs) === null || _a === void 0 ? void 0 : _a.cdkVirtualForTemplate;
|
|
21390
21561
|
}
|
|
21391
|
-
|
|
21392
|
-
this.
|
|
21393
|
-
this.
|
|
21562
|
+
set cdkVirtualForTemplate(value) {
|
|
21563
|
+
this.cdkVirtualForInputs.cdkVirtualForTemplate = value;
|
|
21564
|
+
this.updateCdkVirtualForInputs();
|
|
21565
|
+
}
|
|
21566
|
+
get cdkVirtualForTemplateCacheSize() {
|
|
21567
|
+
return this.cdkVirtualForInputs.cdkVirtualForTemplateCacheSize;
|
|
21568
|
+
}
|
|
21569
|
+
set cdkVirtualForTemplateCacheSize(value) {
|
|
21570
|
+
this.cdkVirtualForInputs.cdkVirtualForTemplateCacheSize = coerceNumberProperty(value);
|
|
21571
|
+
this.updateCdkVirtualForInputs();
|
|
21572
|
+
}
|
|
21573
|
+
get itemSize() {
|
|
21574
|
+
return this._cdkFixedSizeVirtualScrollInputs.itemSize;
|
|
21575
|
+
}
|
|
21576
|
+
set itemSize(value) {
|
|
21577
|
+
this._cdkFixedSizeVirtualScrollInputs.itemSize = coerceNumberProperty(value);
|
|
21578
|
+
this.updateFixedSizeVirtualScrollInputs();
|
|
21579
|
+
}
|
|
21580
|
+
get minBufferPx() {
|
|
21581
|
+
return this._cdkFixedSizeVirtualScrollInputs.minBufferPx;
|
|
21582
|
+
}
|
|
21583
|
+
set minBufferPx(value) {
|
|
21584
|
+
this._cdkFixedSizeVirtualScrollInputs.minBufferPx = coerceNumberProperty(value);
|
|
21585
|
+
this.updateFixedSizeVirtualScrollInputs();
|
|
21586
|
+
}
|
|
21587
|
+
get maxBufferPx() {
|
|
21588
|
+
return this._cdkFixedSizeVirtualScrollInputs.maxBufferPx;
|
|
21589
|
+
}
|
|
21590
|
+
set maxBufferPx(value) {
|
|
21591
|
+
this._cdkFixedSizeVirtualScrollInputs.maxBufferPx = coerceNumberProperty(value);
|
|
21592
|
+
this.updateFixedSizeVirtualScrollInputs();
|
|
21593
|
+
}
|
|
21594
|
+
ngAfterViewInit() {
|
|
21595
|
+
this.injector.runInContext(() => {
|
|
21596
|
+
this.virtualScrollViewport = this.createVirtualScrollViewportForDatagrid(this.changeDetectorRef, this.ngZone, this.renderer2, this.directionality, this.scrollDispatcher, this.viewportRuler, this.datagridElementRef, this.virtualScrollStrategy);
|
|
21597
|
+
this.cdkVirtualFor = createCdkVirtualForOfDirective(this.viewContainerRef, this.templateRef, this.iterableDiffers, this.viewRepeater, this.virtualScrollViewport, this.ngZone);
|
|
21598
|
+
this.virtualScrollViewport.ngOnInit();
|
|
21599
|
+
});
|
|
21600
|
+
this.gridRoleElement = this.datagridElementRef.nativeElement.querySelector('[role="grid"]');
|
|
21601
|
+
this.updateCdkVirtualForInputs();
|
|
21602
|
+
this.subscriptions.push(this.items.change.subscribe(newItems => {
|
|
21603
|
+
this.cdkVirtualFor.cdkVirtualForOf = newItems;
|
|
21604
|
+
}), this.cdkVirtualFor.dataStream.subscribe(data => {
|
|
21605
|
+
this.updateAriaRowCount(data.length);
|
|
21606
|
+
}), this.virtualScrollViewport.scrolledIndexChange.subscribe(index => {
|
|
21607
|
+
this.topIndex = index;
|
|
21608
|
+
}), this.virtualScrollViewport.renderedRangeStream.subscribe(renderedRange => {
|
|
21609
|
+
this.renderedRangeChange.emit(renderedRange);
|
|
21610
|
+
}), this.datagrid.refresh.subscribe(datagridState => {
|
|
21611
|
+
if (datagridState.filters) {
|
|
21612
|
+
this.scrollToIndex(0);
|
|
21613
|
+
}
|
|
21614
|
+
}), this.columnsService.columnsStateChange.subscribe(() => {
|
|
21615
|
+
this.viewRepeater.detach();
|
|
21616
|
+
}));
|
|
21617
|
+
}
|
|
21618
|
+
ngDoCheck() {
|
|
21619
|
+
var _a;
|
|
21620
|
+
(_a = this.cdkVirtualFor) === null || _a === void 0 ? void 0 : _a.ngDoCheck();
|
|
21621
|
+
this.updateAriaRowIndexes();
|
|
21622
|
+
}
|
|
21623
|
+
ngOnDestroy() {
|
|
21624
|
+
var _a, _b, _c;
|
|
21625
|
+
(_a = this.cdkVirtualFor) === null || _a === void 0 ? void 0 : _a.ngOnDestroy();
|
|
21626
|
+
(_b = this.virtualScrollViewport) === null || _b === void 0 ? void 0 : _b.ngOnDestroy();
|
|
21627
|
+
(_c = this.mutationChanges) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
21628
|
+
this.subscriptions.forEach(subscription => {
|
|
21629
|
+
subscription.unsubscribe();
|
|
21630
|
+
});
|
|
21631
|
+
}
|
|
21632
|
+
scrollUp(offset, behavior = 'auto') {
|
|
21633
|
+
this.scrollToIndex(this.topIndex - offset, behavior);
|
|
21634
|
+
}
|
|
21635
|
+
scrollDown(offset, behavior = 'auto') {
|
|
21636
|
+
this.scrollToIndex(this.topIndex + offset, behavior);
|
|
21637
|
+
}
|
|
21638
|
+
scrollToIndex(index, behavior = 'auto') {
|
|
21639
|
+
var _a;
|
|
21640
|
+
(_a = this.virtualScrollViewport) === null || _a === void 0 ? void 0 : _a.scrollToIndex(index, behavior);
|
|
21641
|
+
}
|
|
21642
|
+
updateCdkVirtualForInputs() {
|
|
21643
|
+
if (this.cdkVirtualFor) {
|
|
21644
|
+
for (const cdkVirtualForInputKey of Object.keys(this.cdkVirtualForInputs)) {
|
|
21645
|
+
if (this.cdkVirtualFor[cdkVirtualForInputKey] !== this.cdkVirtualForInputs[cdkVirtualForInputKey]) {
|
|
21646
|
+
this.cdkVirtualFor[cdkVirtualForInputKey] = this.cdkVirtualForInputs[cdkVirtualForInputKey];
|
|
21647
|
+
}
|
|
21648
|
+
}
|
|
21649
|
+
}
|
|
21650
|
+
}
|
|
21651
|
+
updateFixedSizeVirtualScrollInputs() {
|
|
21652
|
+
if (this.virtualScrollStrategy) {
|
|
21653
|
+
this.virtualScrollStrategy.updateItemAndBufferSize(this._cdkFixedSizeVirtualScrollInputs.itemSize, this._cdkFixedSizeVirtualScrollInputs.minBufferPx, this._cdkFixedSizeVirtualScrollInputs.maxBufferPx);
|
|
21654
|
+
}
|
|
21655
|
+
}
|
|
21656
|
+
updateAriaRowCount(rowCount) {
|
|
21657
|
+
var _a;
|
|
21658
|
+
(_a = this.gridRoleElement) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-rowcount', rowCount.toString());
|
|
21659
|
+
}
|
|
21660
|
+
updateAriaRowIndexes() {
|
|
21661
|
+
for (let i = 0; i < this.viewContainerRef.length; i++) {
|
|
21662
|
+
const viewRef = this.viewContainerRef.get(i);
|
|
21663
|
+
const rootElements = viewRef.rootNodes;
|
|
21664
|
+
const datagridRowElement = rootElements.find(rowElement => rowElement.tagName === 'CLR-DG-ROW');
|
|
21665
|
+
const rowRoleElement = datagridRowElement === null || datagridRowElement === void 0 ? void 0 : datagridRowElement.querySelector('[role="row"]');
|
|
21666
|
+
// aria-rowindex should start with one, not zero, so we have to add one to the zero-based index
|
|
21667
|
+
rowRoleElement === null || rowRoleElement === void 0 ? void 0 : rowRoleElement.setAttribute('aria-rowindex', (viewRef.context.index + 1).toString());
|
|
21668
|
+
}
|
|
21669
|
+
}
|
|
21670
|
+
createVirtualScrollViewportForDatagrid(changeDetectorRef, ngZone, renderer2, directionality, scrollDispatcher, viewportRuler, datagridElementRef, virtualScrollStrategy) {
|
|
21671
|
+
const datagridDivElement = datagridElementRef.nativeElement.querySelector('.datagrid');
|
|
21672
|
+
const datagridTableElement = datagridElementRef.nativeElement.querySelector('.datagrid-table');
|
|
21673
|
+
const datagridRowsElement = datagridElementRef.nativeElement.querySelector('.datagrid-rows');
|
|
21674
|
+
const datagridDivElementRef = { nativeElement: datagridDivElement };
|
|
21675
|
+
let topOffset = 0;
|
|
21676
|
+
let totalContentSize = 0;
|
|
21677
|
+
function updateDatagridElementStyles() {
|
|
21678
|
+
datagridRowsElement.style.transform = `translateY(${topOffset}px)`;
|
|
21679
|
+
datagridRowsElement.style.height = `${totalContentSize - topOffset}px`;
|
|
21680
|
+
}
|
|
21681
|
+
const virtualScrollViewport = createCdkVirtualScrollViewport(datagridDivElementRef, changeDetectorRef, ngZone, renderer2, virtualScrollStrategy, directionality, scrollDispatcher, viewportRuler, null);
|
|
21682
|
+
virtualScrollViewport._contentWrapper = {
|
|
21683
|
+
nativeElement: {
|
|
21684
|
+
style: {
|
|
21685
|
+
set transform(value) {
|
|
21686
|
+
var _a;
|
|
21687
|
+
topOffset = value === undefined ? 0 : +((_a = /translateY\(([0-9]+)px\)/.exec(value)) === null || _a === void 0 ? void 0 : _a[1]);
|
|
21688
|
+
updateDatagridElementStyles();
|
|
21689
|
+
},
|
|
21690
|
+
},
|
|
21691
|
+
},
|
|
21692
|
+
};
|
|
21693
|
+
virtualScrollViewport.setTotalContentSize = (value) => {
|
|
21694
|
+
totalContentSize = value;
|
|
21695
|
+
datagridTableElement.style.height = `${totalContentSize}px`;
|
|
21696
|
+
updateDatagridElementStyles();
|
|
21697
|
+
};
|
|
21698
|
+
return virtualScrollViewport;
|
|
21699
|
+
}
|
|
21700
|
+
}
|
|
21701
|
+
ClrDatagridVirtualScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridVirtualScrollDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: Items, skipSelf: true }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i1$3.Directionality }, { token: i3$1.ScrollDispatcher }, { token: i3$1.ViewportRuler }, { token: ClrDatagrid }, { token: ColumnsService }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
21702
|
+
ClrDatagridVirtualScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridVirtualScrollDirective, selector: "[clrVirtualScroll],[ClrVirtualScroll]", inputs: { cdkVirtualForOf: ["clrVirtualRowsOf", "cdkVirtualForOf"], cdkVirtualForTrackBy: ["clrVirtualRowsTrackBy", "cdkVirtualForTrackBy"], cdkVirtualForTemplate: ["clrVirtualRowsTemplate", "cdkVirtualForTemplate"], cdkVirtualForTemplateCacheSize: ["clrVirtualRowsTemplateCacheSize", "cdkVirtualForTemplateCacheSize"], itemSize: ["clrVirtualRowsItemSize", "itemSize"], minBufferPx: ["clrVirtualRowsMinBufferPx", "minBufferPx"], maxBufferPx: ["clrVirtualRowsMaxBufferPx", "maxBufferPx"] }, outputs: { renderedRangeChange: "renderedRangeChange" }, providers: [Items], ngImport: i0 });
|
|
21703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridVirtualScrollDirective, decorators: [{
|
|
21704
|
+
type: Directive,
|
|
21705
|
+
args: [{
|
|
21706
|
+
selector: '[clrVirtualScroll],[ClrVirtualScroll]',
|
|
21707
|
+
providers: [Items],
|
|
21708
|
+
}]
|
|
21709
|
+
}], ctorParameters: function () {
|
|
21710
|
+
return [{ type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: Items, decorators: [{
|
|
21711
|
+
type: SkipSelf
|
|
21712
|
+
}] }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i1$3.Directionality }, { type: i3$1.ScrollDispatcher }, { type: i3$1.ViewportRuler }, { type: ClrDatagrid }, { type: ColumnsService }, { type: i0.EnvironmentInjector }];
|
|
21713
|
+
}, propDecorators: { renderedRangeChange: [{
|
|
21714
|
+
type: Output
|
|
21715
|
+
}], cdkVirtualForOf: [{
|
|
21716
|
+
type: Input,
|
|
21717
|
+
args: ['clrVirtualRowsOf']
|
|
21718
|
+
}], cdkVirtualForTrackBy: [{
|
|
21719
|
+
type: Input,
|
|
21720
|
+
args: ['clrVirtualRowsTrackBy']
|
|
21721
|
+
}], cdkVirtualForTemplate: [{
|
|
21722
|
+
type: Input,
|
|
21723
|
+
args: ['clrVirtualRowsTemplate']
|
|
21724
|
+
}], cdkVirtualForTemplateCacheSize: [{
|
|
21725
|
+
type: Input,
|
|
21726
|
+
args: ['clrVirtualRowsTemplateCacheSize']
|
|
21727
|
+
}], itemSize: [{
|
|
21728
|
+
type: Input,
|
|
21729
|
+
args: ['clrVirtualRowsItemSize']
|
|
21730
|
+
}], minBufferPx: [{
|
|
21731
|
+
type: Input,
|
|
21732
|
+
args: ['clrVirtualRowsMinBufferPx']
|
|
21733
|
+
}], maxBufferPx: [{
|
|
21734
|
+
type: Input,
|
|
21735
|
+
args: ['clrVirtualRowsMaxBufferPx']
|
|
21736
|
+
}] } });
|
|
21737
|
+
function createCdkVirtualScrollViewport(datagridDivElementRef, changeDetectorRef, ngZone, renderer2, virtualScrollStrategy, directionality, scrollDispatcher, viewportRuler, scrollable) {
|
|
21738
|
+
if (+VERSION.major < 19) {
|
|
21739
|
+
return new CdkVirtualScrollViewport(datagridDivElementRef, changeDetectorRef, ngZone, virtualScrollStrategy, directionality, scrollDispatcher, viewportRuler, scrollable);
|
|
21740
|
+
}
|
|
21741
|
+
else {
|
|
21742
|
+
const virtualScrollViewportInjector = Injector.create({
|
|
21743
|
+
parent: inject(EnvironmentInjector),
|
|
21744
|
+
providers: [
|
|
21745
|
+
{ provide: ElementRef, useValue: datagridDivElementRef },
|
|
21746
|
+
{ provide: ChangeDetectorRef, useValue: changeDetectorRef },
|
|
21747
|
+
{ provide: NgZone, useValue: ngZone },
|
|
21748
|
+
{ provide: Renderer2, useValue: renderer2 },
|
|
21749
|
+
{ provide: VIRTUAL_SCROLL_STRATEGY, useValue: virtualScrollStrategy },
|
|
21750
|
+
{ provide: Directionality, useValue: directionality },
|
|
21751
|
+
{ provide: ScrollDispatcher, useValue: scrollDispatcher },
|
|
21752
|
+
{ provide: ViewportRuler, useValue: viewportRuler },
|
|
21753
|
+
{ provide: CdkVirtualScrollable, useValue: scrollable },
|
|
21754
|
+
{ provide: CdkVirtualScrollViewport, useClass: CdkVirtualScrollViewport },
|
|
21755
|
+
],
|
|
21756
|
+
});
|
|
21757
|
+
return virtualScrollViewportInjector.get(CdkVirtualScrollViewport);
|
|
21758
|
+
}
|
|
21759
|
+
}
|
|
21760
|
+
function createCdkVirtualForOfDirective(viewContainerRef, templateRef, iterableDiffers, viewRepeater, virtualScrollViewport, ngZone) {
|
|
21761
|
+
if (+VERSION.major < 19) {
|
|
21762
|
+
return new CdkVirtualForOf(viewContainerRef, templateRef, iterableDiffers, viewRepeater, virtualScrollViewport, ngZone);
|
|
21763
|
+
}
|
|
21764
|
+
else {
|
|
21765
|
+
const virtualScrollViewportInjector = Injector.create({
|
|
21766
|
+
parent: inject(EnvironmentInjector),
|
|
21767
|
+
providers: [{ provide: CdkVirtualScrollViewport, useValue: virtualScrollViewport }],
|
|
21768
|
+
});
|
|
21769
|
+
const cdkVirtualForInjector = Injector.create({
|
|
21770
|
+
parent: virtualScrollViewportInjector,
|
|
21771
|
+
providers: [
|
|
21772
|
+
{ provide: ViewContainerRef, useValue: viewContainerRef },
|
|
21773
|
+
{ provide: TemplateRef, useValue: templateRef },
|
|
21774
|
+
{ provide: IterableDiffers, useValue: iterableDiffers },
|
|
21775
|
+
{ provide: _VIEW_REPEATER_STRATEGY, useValue: viewRepeater },
|
|
21776
|
+
{ provide: NgZone, useValue: ngZone },
|
|
21777
|
+
{ provide: CdkVirtualForOf, useClass: CdkVirtualForOf },
|
|
21778
|
+
],
|
|
21779
|
+
});
|
|
21780
|
+
return cdkVirtualForInjector.get(CdkVirtualForOf);
|
|
21781
|
+
}
|
|
21782
|
+
}
|
|
21783
|
+
|
|
21784
|
+
/*
|
|
21785
|
+
* Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
|
|
21786
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
21787
|
+
* This software is released under MIT license.
|
|
21788
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
21789
|
+
*/
|
|
21790
|
+
/**
|
|
21791
|
+
* This provider aggregates state changes from the various providers of the Datagrid
|
|
21792
|
+
*/
|
|
21793
|
+
class StateProvider {
|
|
21794
|
+
constructor(filters, sort, page, debouncer) {
|
|
21795
|
+
this.filters = filters;
|
|
21796
|
+
this.sort = sort;
|
|
21797
|
+
this.page = page;
|
|
21798
|
+
this.debouncer = debouncer;
|
|
21799
|
+
/**
|
|
21800
|
+
* The Observable that lets other classes subscribe to global state changes
|
|
21801
|
+
*/
|
|
21802
|
+
this.change = this.debouncer.change.pipe(map(() => this.state));
|
|
21803
|
+
}
|
|
21804
|
+
/*
|
|
21805
|
+
* By making this a getter, we open the possibility for a setter in the future.
|
|
21806
|
+
* It's been requested a couple times.
|
|
21807
|
+
*/
|
|
21808
|
+
get state() {
|
|
21809
|
+
const state = {};
|
|
21810
|
+
if (this.page.size > 0) {
|
|
21811
|
+
state.page = {
|
|
21812
|
+
from: this.page.firstItem,
|
|
21813
|
+
to: this.page.lastItem,
|
|
21814
|
+
size: this.page.size,
|
|
21815
|
+
current: this.page.current,
|
|
21816
|
+
};
|
|
21817
|
+
}
|
|
21818
|
+
if (this.sort.comparator) {
|
|
21819
|
+
if (this.sort.comparator instanceof DatagridPropertyComparator) {
|
|
21820
|
+
/*
|
|
21821
|
+
* Special case for the default object property comparator,
|
|
21822
|
+
* we give the property name instead of the actual comparator.
|
|
21823
|
+
*/
|
|
21824
|
+
state.sort = { by: this.sort.comparator.prop, reverse: this.sort.reverse };
|
|
21825
|
+
}
|
|
21826
|
+
else {
|
|
21827
|
+
state.sort = { by: this.sort.comparator, reverse: this.sort.reverse };
|
|
21828
|
+
}
|
|
21829
|
+
}
|
|
21830
|
+
const activeFilters = this.filters.getActiveFilters();
|
|
21831
|
+
if (activeFilters.length > 0) {
|
|
21832
|
+
state.filters = [];
|
|
21833
|
+
for (const filter of activeFilters) {
|
|
21834
|
+
if (filter.state) {
|
|
21835
|
+
state.filters.push(filter.state);
|
|
21836
|
+
}
|
|
21837
|
+
else {
|
|
21838
|
+
state.filters.push(filter);
|
|
21839
|
+
}
|
|
21840
|
+
}
|
|
21841
|
+
}
|
|
21842
|
+
return state;
|
|
21843
|
+
}
|
|
21844
|
+
}
|
|
21845
|
+
StateProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: StateProvider, deps: [{ token: FiltersProvider }, { token: Sort }, { token: Page }, { token: StateDebouncer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21846
|
+
StateProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: StateProvider });
|
|
21847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: StateProvider, decorators: [{
|
|
21848
|
+
type: Injectable
|
|
21849
|
+
}], ctorParameters: function () { return [{ type: FiltersProvider }, { type: Sort }, { type: Page }, { type: StateDebouncer }]; } });
|
|
21850
|
+
|
|
21851
|
+
/*
|
|
21852
|
+
* Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
|
|
21853
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
21854
|
+
* This software is released under MIT license.
|
|
21855
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
21856
|
+
*/
|
|
21857
|
+
class DatagridCellRenderer {
|
|
21858
|
+
constructor(el, renderer, organizer) {
|
|
21859
|
+
this.el = el;
|
|
21860
|
+
this.renderer = renderer;
|
|
21861
|
+
this.subscriptions = [];
|
|
21862
|
+
this.subscriptions.push(organizer.filterRenderSteps(DatagridRenderStep.CLEAR_WIDTHS).subscribe(() => this.clearWidth()));
|
|
21863
|
+
}
|
|
21864
|
+
ngOnDestroy() {
|
|
21865
|
+
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
21866
|
+
if (this.stateSubscription) {
|
|
21867
|
+
this.stateSubscription.unsubscribe();
|
|
21868
|
+
}
|
|
21869
|
+
}
|
|
21870
|
+
resetState(state) {
|
|
21871
|
+
this.setWidth(state);
|
|
21872
|
+
this.setHidden(state);
|
|
21873
|
+
}
|
|
21874
|
+
setWidth(state) {
|
|
21875
|
+
if (state.strictWidth) {
|
|
21876
|
+
this.renderer.addClass(this.el.nativeElement, STRICT_WIDTH_CLASS);
|
|
21877
|
+
}
|
|
21878
|
+
else {
|
|
21879
|
+
this.renderer.removeClass(this.el.nativeElement, STRICT_WIDTH_CLASS);
|
|
21880
|
+
}
|
|
21881
|
+
this.renderer.setStyle(this.el.nativeElement, 'width', state.width + 'px');
|
|
21882
|
+
}
|
|
21883
|
+
setHidden(state) {
|
|
21884
|
+
if (state.hidden) {
|
|
21885
|
+
this.renderer.addClass(this.el.nativeElement, HIDDEN_COLUMN_CLASS);
|
|
21886
|
+
}
|
|
21887
|
+
else {
|
|
21888
|
+
this.renderer.removeClass(this.el.nativeElement, HIDDEN_COLUMN_CLASS);
|
|
21889
|
+
}
|
|
21890
|
+
}
|
|
21891
|
+
clearWidth() {
|
|
21892
|
+
this.renderer.removeClass(this.el.nativeElement, STRICT_WIDTH_CLASS);
|
|
21893
|
+
this.renderer.setStyle(this.el.nativeElement, 'width', null);
|
|
21394
21894
|
}
|
|
21395
21895
|
}
|
|
21396
21896
|
DatagridCellRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: DatagridCellRenderer, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DatagridRenderOrganizer }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -21596,7 +22096,7 @@ class ClrDatagrid {
|
|
|
21596
22096
|
});
|
|
21597
22097
|
this.updateDetailState();
|
|
21598
22098
|
// retain active cell when navigating with Up/Down Arrows, PageUp and PageDown buttons in virtual scroller
|
|
21599
|
-
if (this.
|
|
22099
|
+
if (this.virtualScroll) {
|
|
21600
22100
|
const active = this.keyNavigation.getActiveCell();
|
|
21601
22101
|
if (active) {
|
|
21602
22102
|
this.zone.runOutsideAngular(() => {
|
|
@@ -21687,7 +22187,7 @@ class ClrDatagrid {
|
|
|
21687
22187
|
}
|
|
21688
22188
|
toggleAllSelected($event) {
|
|
21689
22189
|
$event.preventDefault();
|
|
21690
|
-
if (this.
|
|
22190
|
+
if (this.virtualScroll) {
|
|
21691
22191
|
return;
|
|
21692
22192
|
}
|
|
21693
22193
|
this.allSelected = !this.allSelected;
|
|
@@ -21710,7 +22210,7 @@ class ClrDatagrid {
|
|
|
21710
22210
|
this.detailService.open(row.item, row.detailButton.nativeElement);
|
|
21711
22211
|
// always keep open when virtual scroll is available otherwise close it
|
|
21712
22212
|
}
|
|
21713
|
-
else if (!this.
|
|
22213
|
+
else if (!this.virtualScroll) {
|
|
21714
22214
|
// Using setTimeout to make sure the inner cycles in rows are done
|
|
21715
22215
|
setTimeout(() => {
|
|
21716
22216
|
this.detailService.close();
|
|
@@ -21742,7 +22242,7 @@ ClrDatagrid.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
|
21742
22242
|
ColumnsService,
|
|
21743
22243
|
DisplayModeService,
|
|
21744
22244
|
KeyNavigationGridController,
|
|
21745
|
-
], queries: [{ propertyName: "iterator", first: true, predicate: ClrDatagridItems, descendants: true }, { propertyName: "placeholder", first: true, predicate: ClrDatagridPlaceholder, descendants: true }, { propertyName: "columns", predicate: ClrDatagridColumn }, { propertyName: "rows", predicate: ClrDatagridRow }], viewQueries: [{ propertyName: "datagrid", first: true, predicate: ["datagrid"], descendants: true, read: ElementRef }, { propertyName: "datagridTable", first: true, predicate: ["datagridTable"], descendants: true, read: ElementRef }, { propertyName: "scrollableColumns", first: true, predicate: ["scrollableColumns"], descendants: true, read: ViewContainerRef }, { propertyName: "_projectedDisplayColumns", first: true, predicate: ["projectedDisplayColumns"], descendants: true, read: ViewContainerRef }, { propertyName: "_projectedCalculationColumns", first: true, predicate: ["projectedCalculationColumns"], descendants: true, read: ViewContainerRef }, { propertyName: "_displayedRows", first: true, predicate: ["displayedRows"], descendants: true, read: ViewContainerRef }, { propertyName: "_calculationRows", first: true, predicate: ["calculationRows"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<ng-content select=\"clr-dg-action-bar\"></ng-content>\n<div class=\"datagrid-outer-wrapper\">\n <div class=\"datagrid-inner-wrapper\">\n <div class=\"datagrid\" #datagrid [attr.aria-hidden]=\"detailService.isOpen ? true : null\">\n <div class=\"datagrid-table-wrapper\">\n <div role=\"grid\" class=\"datagrid-table\" tabindex=\"-1\" #datagridTable>\n <div role=\"rowgroup\" class=\"datagrid-header\">\n <div role=\"row\" class=\"datagrid-row\">\n <div class=\"datagrid-row-master datagrid-row-flex\">\n <div class=\"datagrid-row-sticky\">\n <!--header for datagrid where you can select multiple rows -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n (keydown.space)=\"toggleAllSelected($event)\"\n >\n <div *ngIf=\"!
|
|
22245
|
+
], queries: [{ propertyName: "virtualScroll", first: true, predicate: ClrDatagridVirtualScrollDirective, descendants: true }, { propertyName: "iterator", first: true, predicate: ClrDatagridItems, descendants: true }, { propertyName: "placeholder", first: true, predicate: ClrDatagridPlaceholder, descendants: true }, { propertyName: "columns", predicate: ClrDatagridColumn }, { propertyName: "rows", predicate: ClrDatagridRow }], viewQueries: [{ propertyName: "datagrid", first: true, predicate: ["datagrid"], descendants: true, read: ElementRef }, { propertyName: "datagridTable", first: true, predicate: ["datagridTable"], descendants: true, read: ElementRef }, { propertyName: "scrollableColumns", first: true, predicate: ["scrollableColumns"], descendants: true, read: ViewContainerRef }, { propertyName: "_projectedDisplayColumns", first: true, predicate: ["projectedDisplayColumns"], descendants: true, read: ViewContainerRef }, { propertyName: "_projectedCalculationColumns", first: true, predicate: ["projectedCalculationColumns"], descendants: true, read: ViewContainerRef }, { propertyName: "_displayedRows", first: true, predicate: ["displayedRows"], descendants: true, read: ViewContainerRef }, { propertyName: "_calculationRows", first: true, predicate: ["calculationRows"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<ng-content select=\"clr-dg-action-bar\"></ng-content>\n<div class=\"datagrid-outer-wrapper\">\n <div class=\"datagrid-inner-wrapper\">\n <div class=\"datagrid\" #datagrid [attr.aria-hidden]=\"detailService.isOpen ? true : null\">\n <div class=\"datagrid-table-wrapper\">\n <div role=\"grid\" class=\"datagrid-table\" tabindex=\"-1\" #datagridTable>\n <div role=\"rowgroup\" class=\"datagrid-header\">\n <div role=\"row\" class=\"datagrid-row\">\n <div class=\"datagrid-row-master datagrid-row-flex\">\n <div class=\"datagrid-row-sticky\">\n <!--header for datagrid where you can select multiple rows -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n (keydown.space)=\"toggleAllSelected($event)\"\n >\n <div *ngIf=\"!virtualScroll\" class=\"clr-checkbox-wrapper\">\n <!-- We need to move focus and space-key handling to the parent because of keyboard arrow key navigation,\n which is not able to transfer focus directly on the input when focused with the tab key -->\n <input\n type=\"checkbox\"\n [id]=\"selectAllId\"\n [(ngModel)]=\"allSelected\"\n [attr.aria-label]=\"commonStrings.keys.selectAll\"\n tabindex=\"-1\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"selectAllId\" class=\"clr-control-label clr-col-null\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.selectAll}}</span>\n </label>\n </div>\n\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for datagrid where you can select one row only -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n >\n <div class=\"clr-sr-only\">{{clrDgSingleSelectionAriaLabel}}</div>\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for single row action; only displayType if we have at least one actionable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-row-actions datagrid-fixed-column\"\n *ngIf=\"rowActionService.hasActionableRow\"\n >\n <div class=\"clr-sr-only\">{{clrDgSingleActionableAriaLabel}}</div>\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for carets; only displayType if we have at least one expandable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-expandable-caret datagrid-fixed-column\"\n *ngIf=\"expandableRows.hasExpandableRow || detailService.enabled\"\n >\n <div class=\"clr-sr-only\">{{clrDetailExpandableAriaLabel}}</div>\n <div class=\"datagrid-column-separator\"></div>\n </div>\n </div>\n <div class=\"datagrid-row-scrollable\">\n <ng-container #projectedDisplayColumns></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <div role=\"presentation\" class=\"datagrid-rows\">\n <clr-dg-row class=\"datagrid-row-loading\" *ngIf=\"loadingMoreItems\">\n <clr-dg-cell>\n <clr-spinner clrMedium></clr-spinner>\n <span>{{ commonStrings.keys.loading }}</span>\n </clr-dg-cell>\n </clr-dg-row>\n\n <ng-container #displayedRows></ng-container>\n\n <clr-dg-row class=\"datagrid-row-loading\" *ngIf=\"loadingMoreItems\">\n <clr-dg-cell>\n <clr-spinner clrMedium></clr-spinner>\n <span>{{ commonStrings.keys.loading }}</span>\n </clr-dg-cell>\n </clr-dg-row>\n\n <!-- Custom placeholder overrides the default empty one -->\n <ng-content select=\"clr-dg-placeholder\"></ng-content>\n <clr-dg-placeholder *ngIf=\"!placeholder\"></clr-dg-placeholder>\n </div>\n </div>\n </div>\n </div>\n <ng-content select=\"clr-dg-footer\"></ng-content>\n <div class=\"datagrid-spinner\" *ngIf=\"loading\">\n <clr-spinner clrMedium>Loading</clr-spinner>\n </div>\n </div>\n <ng-content select=\"[clrIfDetail],clr-dg-detail\"></ng-content>\n</div>\n\n<div class=\"datagrid-calculation-table\">\n <div class=\"datagrid-calculation-header\">\n <ng-container #projectedCalculationColumns></ng-container>\n </div>\n <ng-container #calculationRows></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["id", "for"] }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }, { kind: "component", type: ClrDatagridCell, selector: "clr-dg-cell" }, { kind: "component", type: ClrDatagridPlaceholder, selector: "clr-dg-placeholder" }, { kind: "component", type: ClrDatagridRow, selector: "clr-dg-row", inputs: ["clrDgDetailDisabled", "clrDgDetailHidden", "clrDgItem", "clrDgSelectable", "clrDgSelected", "clrDgExpanded", "clrDgDetailOpenLabel", "clrDgDetailCloseLabel", "clrDgRowSelectionLabel"], outputs: ["clrDgSelectedChange", "clrDgExpandedChange"] }, { kind: "directive", type: ClrDatagridSelectionCellDirective, selector: ".datagrid-select" }, { kind: "directive", type: DatagridCellRenderer, selector: "clr-dg-cell" }, { kind: "directive", type: DatagridRowRenderer, selector: "clr-dg-row, clr-dg-row-detail" }, { kind: "directive", type: ActionableOompaLoompa, selector: "clr-datagrid, clr-dg-row" }, { kind: "directive", type: ExpandableOompaLoompa, selector: "clr-datagrid, clr-dg-row" }] });
|
|
21746
22246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagrid, decorators: [{
|
|
21747
22247
|
type: Component,
|
|
21748
22248
|
args: [{ selector: 'clr-datagrid', providers: [
|
|
@@ -21764,7 +22264,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
21764
22264
|
], host: {
|
|
21765
22265
|
'[class.datagrid-host]': 'true',
|
|
21766
22266
|
'[class.datagrid-detail-open]': 'detailService.isOpen',
|
|
21767
|
-
}, template: "<!--\n ~ Copyright (c) 2016-2025 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<ng-content select=\"clr-dg-action-bar\"></ng-content>\n<div class=\"datagrid-outer-wrapper\">\n <div class=\"datagrid-inner-wrapper\">\n <div class=\"datagrid\" #datagrid [attr.aria-hidden]=\"detailService.isOpen ? true : null\">\n <div class=\"datagrid-table-wrapper\">\n <div role=\"grid\" class=\"datagrid-table\" tabindex=\"-1\" #datagridTable>\n <div role=\"rowgroup\" class=\"datagrid-header\">\n <div role=\"row\" class=\"datagrid-row\">\n <div class=\"datagrid-row-master datagrid-row-flex\">\n <div class=\"datagrid-row-sticky\">\n <!--header for datagrid where you can select multiple rows -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n (keydown.space)=\"toggleAllSelected($event)\"\n >\n <div *ngIf=\"!
|
|
22267
|
+
}, template: "<!--\n ~ Copyright (c) 2016-2025 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<ng-content select=\"clr-dg-action-bar\"></ng-content>\n<div class=\"datagrid-outer-wrapper\">\n <div class=\"datagrid-inner-wrapper\">\n <div class=\"datagrid\" #datagrid [attr.aria-hidden]=\"detailService.isOpen ? true : null\">\n <div class=\"datagrid-table-wrapper\">\n <div role=\"grid\" class=\"datagrid-table\" tabindex=\"-1\" #datagridTable>\n <div role=\"rowgroup\" class=\"datagrid-header\">\n <div role=\"row\" class=\"datagrid-row\">\n <div class=\"datagrid-row-master datagrid-row-flex\">\n <div class=\"datagrid-row-sticky\">\n <!--header for datagrid where you can select multiple rows -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n (keydown.space)=\"toggleAllSelected($event)\"\n >\n <div *ngIf=\"!virtualScroll\" class=\"clr-checkbox-wrapper\">\n <!-- We need to move focus and space-key handling to the parent because of keyboard arrow key navigation,\n which is not able to transfer focus directly on the input when focused with the tab key -->\n <input\n type=\"checkbox\"\n [id]=\"selectAllId\"\n [(ngModel)]=\"allSelected\"\n [attr.aria-label]=\"commonStrings.keys.selectAll\"\n tabindex=\"-1\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"selectAllId\" class=\"clr-control-label clr-col-null\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.selectAll}}</span>\n </label>\n </div>\n\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for datagrid where you can select one row only -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n >\n <div class=\"clr-sr-only\">{{clrDgSingleSelectionAriaLabel}}</div>\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for single row action; only displayType if we have at least one actionable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-row-actions datagrid-fixed-column\"\n *ngIf=\"rowActionService.hasActionableRow\"\n >\n <div class=\"clr-sr-only\">{{clrDgSingleActionableAriaLabel}}</div>\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for carets; only displayType if we have at least one expandable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-expandable-caret datagrid-fixed-column\"\n *ngIf=\"expandableRows.hasExpandableRow || detailService.enabled\"\n >\n <div class=\"clr-sr-only\">{{clrDetailExpandableAriaLabel}}</div>\n <div class=\"datagrid-column-separator\"></div>\n </div>\n </div>\n <div class=\"datagrid-row-scrollable\">\n <ng-container #projectedDisplayColumns></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <div role=\"presentation\" class=\"datagrid-rows\">\n <clr-dg-row class=\"datagrid-row-loading\" *ngIf=\"loadingMoreItems\">\n <clr-dg-cell>\n <clr-spinner clrMedium></clr-spinner>\n <span>{{ commonStrings.keys.loading }}</span>\n </clr-dg-cell>\n </clr-dg-row>\n\n <ng-container #displayedRows></ng-container>\n\n <clr-dg-row class=\"datagrid-row-loading\" *ngIf=\"loadingMoreItems\">\n <clr-dg-cell>\n <clr-spinner clrMedium></clr-spinner>\n <span>{{ commonStrings.keys.loading }}</span>\n </clr-dg-cell>\n </clr-dg-row>\n\n <!-- Custom placeholder overrides the default empty one -->\n <ng-content select=\"clr-dg-placeholder\"></ng-content>\n <clr-dg-placeholder *ngIf=\"!placeholder\"></clr-dg-placeholder>\n </div>\n </div>\n </div>\n </div>\n <ng-content select=\"clr-dg-footer\"></ng-content>\n <div class=\"datagrid-spinner\" *ngIf=\"loading\">\n <clr-spinner clrMedium>Loading</clr-spinner>\n </div>\n </div>\n <ng-content select=\"[clrIfDetail],clr-dg-detail\"></ng-content>\n</div>\n\n<div class=\"datagrid-calculation-table\">\n <div class=\"datagrid-calculation-header\">\n <ng-container #projectedCalculationColumns></ng-container>\n </div>\n <ng-container #calculationRows></ng-container>\n</div>\n" }]
|
|
21768
22268
|
}], ctorParameters: function () {
|
|
21769
22269
|
return [{ type: DatagridRenderOrganizer }, { type: Items }, { type: ExpandableRowsCount }, { type: Selection }, { type: RowActionService }, { type: StateProvider }, { type: DisplayModeService }, { type: i0.Renderer2 }, { type: DetailService }, { type: undefined, decorators: [{
|
|
21770
22270
|
type: Inject,
|
|
@@ -21790,6 +22290,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
21790
22290
|
}], refresh: [{
|
|
21791
22291
|
type: Output,
|
|
21792
22292
|
args: ['clrDgRefresh']
|
|
22293
|
+
}], virtualScroll: [{
|
|
22294
|
+
type: ContentChild,
|
|
22295
|
+
args: [ClrDatagridVirtualScrollDirective]
|
|
21793
22296
|
}], iterator: [{
|
|
21794
22297
|
type: ContentChild,
|
|
21795
22298
|
args: [ClrDatagridItems]
|
|
@@ -23197,361 +23700,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
23197
23700
|
class ClrDatagridRowDetail {
|
|
23198
23701
|
constructor(selection, rowActionService, expand, expandableRows, commonStrings) {
|
|
23199
23702
|
this.selection = selection;
|
|
23200
|
-
this.rowActionService = rowActionService;
|
|
23201
|
-
this.expand = expand;
|
|
23202
|
-
this.expandableRows = expandableRows;
|
|
23203
|
-
this.commonStrings = commonStrings;
|
|
23204
|
-
this.replacedRow = false;
|
|
23205
|
-
/* reference to the enum so that template can access it */
|
|
23206
|
-
this.SELECTION_TYPE = SelectionType;
|
|
23207
|
-
this.subscriptions = [];
|
|
23208
|
-
}
|
|
23209
|
-
set replace(value) {
|
|
23210
|
-
this.expand.setReplace(!!value);
|
|
23211
|
-
}
|
|
23212
|
-
get beginningOfExpandableContentAriaText() {
|
|
23213
|
-
return (this._beginningOfExpandableContentAriaText ||
|
|
23214
|
-
`${this.commonStrings.keys.datagridExpandableBeginningOf}
|
|
23215
|
-
${this.commonStrings.keys.datagridExpandableRowContent}`);
|
|
23216
|
-
}
|
|
23217
|
-
get endOfExpandableContentAriaText() {
|
|
23218
|
-
return (this._endOfExpandableContentAriaText ||
|
|
23219
|
-
`${this.commonStrings.keys.datagridExpandableEndOf}
|
|
23220
|
-
${this.commonStrings.keys.datagridExpandableRowContent}`);
|
|
23221
|
-
}
|
|
23222
|
-
ngAfterContentInit() {
|
|
23223
|
-
this.subscriptions.push(this.expand.replace.subscribe(replaceChange => {
|
|
23224
|
-
this.replacedRow = replaceChange;
|
|
23225
|
-
}));
|
|
23226
|
-
}
|
|
23227
|
-
ngOnDestroy() {
|
|
23228
|
-
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
23229
|
-
}
|
|
23230
|
-
}
|
|
23231
|
-
ClrDatagridRowDetail.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridRowDetail, deps: [{ token: Selection }, { token: RowActionService }, { token: DatagridIfExpandService }, { token: ExpandableRowsCount }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
23232
|
-
ClrDatagridRowDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridRowDetail, selector: "clr-dg-row-detail", inputs: { _beginningOfExpandableContentAriaText: ["clrRowDetailBeginningAriaText", "_beginningOfExpandableContentAriaText"], _endOfExpandableContentAriaText: ["clrRowDetailEndAriaText", "_endOfExpandableContentAriaText"], replace: ["clrDgReplace", "replace"] }, host: { attributes: { "role": "gridcell" }, properties: { "class.datagrid-row-flex": "true", "class.datagrid-row-detail": "true", "class.datagrid-container": "cells.length === 0", "attr.id": "expand.expandableId" } }, queries: [{ propertyName: "cells", predicate: ClrDatagridCell }], ngImport: i0, template: `
|
|
23233
|
-
<div class="clr-sr-only">
|
|
23234
|
-
{{ beginningOfExpandableContentAriaText }}
|
|
23235
|
-
{{ commonStrings.keys.datagridExpandableRowsHelperText }}
|
|
23236
|
-
</div>
|
|
23237
|
-
<ng-content></ng-content>
|
|
23238
|
-
<div class="clr-sr-only">{{ endOfExpandableContentAriaText }}</div>
|
|
23239
|
-
`, isInline: true });
|
|
23240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridRowDetail, decorators: [{
|
|
23241
|
-
type: Component,
|
|
23242
|
-
args: [{
|
|
23243
|
-
selector: 'clr-dg-row-detail',
|
|
23244
|
-
template: `
|
|
23245
|
-
<div class="clr-sr-only">
|
|
23246
|
-
{{ beginningOfExpandableContentAriaText }}
|
|
23247
|
-
{{ commonStrings.keys.datagridExpandableRowsHelperText }}
|
|
23248
|
-
</div>
|
|
23249
|
-
<ng-content></ng-content>
|
|
23250
|
-
<div class="clr-sr-only">{{ endOfExpandableContentAriaText }}</div>
|
|
23251
|
-
`,
|
|
23252
|
-
host: {
|
|
23253
|
-
'[class.datagrid-row-flex]': 'true',
|
|
23254
|
-
'[class.datagrid-row-detail]': 'true',
|
|
23255
|
-
'[class.datagrid-container]': 'cells.length === 0',
|
|
23256
|
-
'[attr.id]': 'expand.expandableId',
|
|
23257
|
-
role: 'gridcell',
|
|
23258
|
-
},
|
|
23259
|
-
}]
|
|
23260
|
-
}], ctorParameters: function () { return [{ type: Selection }, { type: RowActionService }, { type: DatagridIfExpandService }, { type: ExpandableRowsCount }, { type: ClrCommonStringsService }]; }, propDecorators: { _beginningOfExpandableContentAriaText: [{
|
|
23261
|
-
type: Input,
|
|
23262
|
-
args: ['clrRowDetailBeginningAriaText']
|
|
23263
|
-
}], _endOfExpandableContentAriaText: [{
|
|
23264
|
-
type: Input,
|
|
23265
|
-
args: ['clrRowDetailEndAriaText']
|
|
23266
|
-
}], cells: [{
|
|
23267
|
-
type: ContentChildren,
|
|
23268
|
-
args: [ClrDatagridCell]
|
|
23269
|
-
}], replace: [{
|
|
23270
|
-
type: Input,
|
|
23271
|
-
args: ['clrDgReplace']
|
|
23272
|
-
}] } });
|
|
23273
|
-
|
|
23274
|
-
/*
|
|
23275
|
-
* Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
|
|
23276
|
-
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
23277
|
-
* This software is released under MIT license.
|
|
23278
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
23279
|
-
*/
|
|
23280
|
-
const defaultCdkFixedSizeVirtualScrollInputs = {
|
|
23281
|
-
itemSize: 32,
|
|
23282
|
-
minBufferPx: 200,
|
|
23283
|
-
maxBufferPx: 400,
|
|
23284
|
-
};
|
|
23285
|
-
class ClrDatagridVirtualScrollDirective {
|
|
23286
|
-
constructor(changeDetectorRef, iterableDiffers, items, ngZone, renderer2, templateRef, viewContainerRef, directionality, scrollDispatcher, viewportRuler, datagrid, columnsService, injector) {
|
|
23287
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
23288
|
-
this.iterableDiffers = iterableDiffers;
|
|
23289
|
-
this.items = items;
|
|
23290
|
-
this.ngZone = ngZone;
|
|
23291
|
-
this.renderer2 = renderer2;
|
|
23292
|
-
this.templateRef = templateRef;
|
|
23293
|
-
this.viewContainerRef = viewContainerRef;
|
|
23294
|
-
this.directionality = directionality;
|
|
23295
|
-
this.scrollDispatcher = scrollDispatcher;
|
|
23296
|
-
this.viewportRuler = viewportRuler;
|
|
23297
|
-
this.datagrid = datagrid;
|
|
23298
|
-
this.columnsService = columnsService;
|
|
23299
|
-
this.injector = injector;
|
|
23300
|
-
this.renderedRangeChange = new EventEmitter();
|
|
23301
|
-
this._cdkFixedSizeVirtualScrollInputs = Object.assign({}, defaultCdkFixedSizeVirtualScrollInputs);
|
|
23302
|
-
this.subscriptions = [];
|
|
23303
|
-
this.mutationChanges = new MutationObserver((mutations) => {
|
|
23304
|
-
mutations.forEach((mutation) => {
|
|
23305
|
-
// it is possible this to be called twice because the old class is removed and the new added
|
|
23306
|
-
if (mutation.target.classList.contains('datagrid-compact') && this.itemSize > 24) {
|
|
23307
|
-
this.itemSize = 24;
|
|
23308
|
-
}
|
|
23309
|
-
});
|
|
23310
|
-
});
|
|
23311
|
-
this.viewRepeater = new _RecycleViewRepeaterStrategy();
|
|
23312
|
-
this.cdkVirtualForInputs = {
|
|
23313
|
-
cdkVirtualForTrackBy: index => index,
|
|
23314
|
-
};
|
|
23315
|
-
items.smartenUp();
|
|
23316
|
-
datagrid.hasVirtualScroller = true;
|
|
23317
|
-
datagrid.detailService.preventFocusScroll = true;
|
|
23318
|
-
this.datagridElementRef = datagrid.el;
|
|
23319
|
-
// default
|
|
23320
|
-
this.cdkVirtualForTemplateCacheSize = 20;
|
|
23321
|
-
this.mutationChanges.observe(this.datagridElementRef.nativeElement, {
|
|
23322
|
-
attributeFilter: ['class'],
|
|
23323
|
-
attributeOldValue: true,
|
|
23324
|
-
});
|
|
23325
|
-
this.virtualScrollStrategy = new FixedSizeVirtualScrollStrategy(this._cdkFixedSizeVirtualScrollInputs.itemSize, this._cdkFixedSizeVirtualScrollInputs.minBufferPx, this._cdkFixedSizeVirtualScrollInputs.maxBufferPx);
|
|
23326
|
-
}
|
|
23327
|
-
get cdkVirtualForOf() {
|
|
23328
|
-
return this.cdkVirtualForInputs.cdkVirtualForOf;
|
|
23329
|
-
}
|
|
23330
|
-
set cdkVirtualForOf(value) {
|
|
23331
|
-
this.cdkVirtualForInputs.cdkVirtualForOf = value;
|
|
23332
|
-
this.items.all = value;
|
|
23333
|
-
this.updateCdkVirtualForInputs();
|
|
23334
|
-
}
|
|
23335
|
-
get cdkVirtualForTrackBy() {
|
|
23336
|
-
return this.cdkVirtualForInputs.cdkVirtualForTrackBy;
|
|
23337
|
-
}
|
|
23338
|
-
set cdkVirtualForTrackBy(value) {
|
|
23339
|
-
this.cdkVirtualForInputs.cdkVirtualForTrackBy = value;
|
|
23340
|
-
this.updateCdkVirtualForInputs();
|
|
23341
|
-
}
|
|
23342
|
-
get cdkVirtualForTemplate() {
|
|
23343
|
-
var _a;
|
|
23344
|
-
return (_a = this === null || this === void 0 ? void 0 : this.cdkVirtualForInputs) === null || _a === void 0 ? void 0 : _a.cdkVirtualForTemplate;
|
|
23345
|
-
}
|
|
23346
|
-
set cdkVirtualForTemplate(value) {
|
|
23347
|
-
this.cdkVirtualForInputs.cdkVirtualForTemplate = value;
|
|
23348
|
-
this.updateCdkVirtualForInputs();
|
|
23349
|
-
}
|
|
23350
|
-
get cdkVirtualForTemplateCacheSize() {
|
|
23351
|
-
return this.cdkVirtualForInputs.cdkVirtualForTemplateCacheSize;
|
|
23352
|
-
}
|
|
23353
|
-
set cdkVirtualForTemplateCacheSize(value) {
|
|
23354
|
-
this.cdkVirtualForInputs.cdkVirtualForTemplateCacheSize = coerceNumberProperty(value);
|
|
23355
|
-
this.updateCdkVirtualForInputs();
|
|
23356
|
-
}
|
|
23357
|
-
get itemSize() {
|
|
23358
|
-
return this._cdkFixedSizeVirtualScrollInputs.itemSize;
|
|
23359
|
-
}
|
|
23360
|
-
set itemSize(value) {
|
|
23361
|
-
this._cdkFixedSizeVirtualScrollInputs.itemSize = coerceNumberProperty(value);
|
|
23362
|
-
this.updateFixedSizeVirtualScrollInputs();
|
|
23363
|
-
}
|
|
23364
|
-
get minBufferPx() {
|
|
23365
|
-
return this._cdkFixedSizeVirtualScrollInputs.minBufferPx;
|
|
23703
|
+
this.rowActionService = rowActionService;
|
|
23704
|
+
this.expand = expand;
|
|
23705
|
+
this.expandableRows = expandableRows;
|
|
23706
|
+
this.commonStrings = commonStrings;
|
|
23707
|
+
this.replacedRow = false;
|
|
23708
|
+
/* reference to the enum so that template can access it */
|
|
23709
|
+
this.SELECTION_TYPE = SelectionType;
|
|
23710
|
+
this.subscriptions = [];
|
|
23366
23711
|
}
|
|
23367
|
-
set
|
|
23368
|
-
this.
|
|
23369
|
-
this.updateFixedSizeVirtualScrollInputs();
|
|
23712
|
+
set replace(value) {
|
|
23713
|
+
this.expand.setReplace(!!value);
|
|
23370
23714
|
}
|
|
23371
|
-
get
|
|
23372
|
-
return this.
|
|
23715
|
+
get beginningOfExpandableContentAriaText() {
|
|
23716
|
+
return (this._beginningOfExpandableContentAriaText ||
|
|
23717
|
+
`${this.commonStrings.keys.datagridExpandableBeginningOf} ${this.commonStrings.keys.datagridExpandableRowContent}`);
|
|
23373
23718
|
}
|
|
23374
|
-
|
|
23375
|
-
this.
|
|
23376
|
-
|
|
23719
|
+
get endOfExpandableContentAriaText() {
|
|
23720
|
+
return (this._endOfExpandableContentAriaText ||
|
|
23721
|
+
`${this.commonStrings.keys.datagridExpandableEndOf} ${this.commonStrings.keys.datagridExpandableRowContent}`);
|
|
23377
23722
|
}
|
|
23378
|
-
|
|
23379
|
-
this.
|
|
23380
|
-
this.
|
|
23381
|
-
this.cdkVirtualFor = createCdkVirtualForOfDirective(this.viewContainerRef, this.templateRef, this.iterableDiffers, this.viewRepeater, this.virtualScrollViewport, this.ngZone);
|
|
23382
|
-
this.virtualScrollViewport.ngOnInit();
|
|
23383
|
-
});
|
|
23384
|
-
this.gridRoleElement = this.datagridElementRef.nativeElement.querySelector('[role="grid"]');
|
|
23385
|
-
this.updateCdkVirtualForInputs();
|
|
23386
|
-
this.subscriptions.push(this.items.change.subscribe(newItems => {
|
|
23387
|
-
this.cdkVirtualFor.cdkVirtualForOf = newItems;
|
|
23388
|
-
}), this.cdkVirtualFor.dataStream.subscribe(data => {
|
|
23389
|
-
this.updateAriaRowCount(data.length);
|
|
23390
|
-
}), this.virtualScrollViewport.renderedRangeStream.subscribe(renderedRange => {
|
|
23391
|
-
this.renderedRangeChange.emit(renderedRange);
|
|
23392
|
-
}), this.datagrid.refresh.subscribe(datagridState => {
|
|
23393
|
-
if (datagridState.filters) {
|
|
23394
|
-
this.virtualScrollViewport.scrollToIndex(0);
|
|
23395
|
-
}
|
|
23396
|
-
}), this.columnsService.columnsStateChange.subscribe(() => {
|
|
23397
|
-
this.viewRepeater.detach();
|
|
23723
|
+
ngAfterContentInit() {
|
|
23724
|
+
this.subscriptions.push(this.expand.replace.subscribe(replaceChange => {
|
|
23725
|
+
this.replacedRow = replaceChange;
|
|
23398
23726
|
}));
|
|
23399
23727
|
}
|
|
23400
|
-
ngDoCheck() {
|
|
23401
|
-
var _a;
|
|
23402
|
-
(_a = this.cdkVirtualFor) === null || _a === void 0 ? void 0 : _a.ngDoCheck();
|
|
23403
|
-
this.updateAriaRowIndexes();
|
|
23404
|
-
}
|
|
23405
23728
|
ngOnDestroy() {
|
|
23406
|
-
|
|
23407
|
-
(_a = this.cdkVirtualFor) === null || _a === void 0 ? void 0 : _a.ngOnDestroy();
|
|
23408
|
-
(_b = this.virtualScrollViewport) === null || _b === void 0 ? void 0 : _b.ngOnDestroy();
|
|
23409
|
-
(_c = this.mutationChanges) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
23410
|
-
this.subscriptions.forEach(subscription => {
|
|
23411
|
-
subscription.unsubscribe();
|
|
23412
|
-
});
|
|
23413
|
-
}
|
|
23414
|
-
updateCdkVirtualForInputs() {
|
|
23415
|
-
if (this.cdkVirtualFor) {
|
|
23416
|
-
for (const cdkVirtualForInputKey of Object.keys(this.cdkVirtualForInputs)) {
|
|
23417
|
-
if (this.cdkVirtualFor[cdkVirtualForInputKey] !== this.cdkVirtualForInputs[cdkVirtualForInputKey]) {
|
|
23418
|
-
this.cdkVirtualFor[cdkVirtualForInputKey] = this.cdkVirtualForInputs[cdkVirtualForInputKey];
|
|
23419
|
-
}
|
|
23420
|
-
}
|
|
23421
|
-
}
|
|
23422
|
-
}
|
|
23423
|
-
updateFixedSizeVirtualScrollInputs() {
|
|
23424
|
-
if (this.virtualScrollStrategy) {
|
|
23425
|
-
this.virtualScrollStrategy.updateItemAndBufferSize(this._cdkFixedSizeVirtualScrollInputs.itemSize, this._cdkFixedSizeVirtualScrollInputs.minBufferPx, this._cdkFixedSizeVirtualScrollInputs.maxBufferPx);
|
|
23426
|
-
}
|
|
23427
|
-
}
|
|
23428
|
-
updateAriaRowCount(rowCount) {
|
|
23429
|
-
var _a;
|
|
23430
|
-
(_a = this.gridRoleElement) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-rowcount', rowCount.toString());
|
|
23431
|
-
}
|
|
23432
|
-
updateAriaRowIndexes() {
|
|
23433
|
-
for (let i = 0; i < this.viewContainerRef.length; i++) {
|
|
23434
|
-
const viewRef = this.viewContainerRef.get(i);
|
|
23435
|
-
const rootElements = viewRef.rootNodes;
|
|
23436
|
-
const datagridRowElement = rootElements.find(rowElement => rowElement.tagName === 'CLR-DG-ROW');
|
|
23437
|
-
const rowRoleElement = datagridRowElement === null || datagridRowElement === void 0 ? void 0 : datagridRowElement.querySelector('[role="row"]');
|
|
23438
|
-
// aria-rowindex should start with one, not zero, so we have to add one to the zero-based index
|
|
23439
|
-
rowRoleElement === null || rowRoleElement === void 0 ? void 0 : rowRoleElement.setAttribute('aria-rowindex', (viewRef.context.index + 1).toString());
|
|
23440
|
-
}
|
|
23441
|
-
}
|
|
23442
|
-
createVirtualScrollViewportForDatagrid(changeDetectorRef, ngZone, renderer2, directionality, scrollDispatcher, viewportRuler, datagridElementRef, virtualScrollStrategy) {
|
|
23443
|
-
const datagridDivElement = datagridElementRef.nativeElement.querySelector('.datagrid');
|
|
23444
|
-
const datagridTableElement = datagridElementRef.nativeElement.querySelector('.datagrid-table');
|
|
23445
|
-
const datagridRowsElement = datagridElementRef.nativeElement.querySelector('.datagrid-rows');
|
|
23446
|
-
const datagridDivElementRef = { nativeElement: datagridDivElement };
|
|
23447
|
-
let topOffset = 0;
|
|
23448
|
-
let totalContentSize = 0;
|
|
23449
|
-
function updateDatagridElementStyles() {
|
|
23450
|
-
datagridRowsElement.style.transform = `translateY(${topOffset}px)`;
|
|
23451
|
-
datagridRowsElement.style.height = `${totalContentSize - topOffset}px`;
|
|
23452
|
-
}
|
|
23453
|
-
const virtualScrollViewport = createCdkVirtualScrollViewport(datagridDivElementRef, changeDetectorRef, ngZone, renderer2, virtualScrollStrategy, directionality, scrollDispatcher, viewportRuler, null);
|
|
23454
|
-
virtualScrollViewport._contentWrapper = {
|
|
23455
|
-
nativeElement: {
|
|
23456
|
-
style: {
|
|
23457
|
-
set transform(value) {
|
|
23458
|
-
var _a;
|
|
23459
|
-
topOffset = value === undefined ? 0 : +((_a = /translateY\(([0-9]+)px\)/.exec(value)) === null || _a === void 0 ? void 0 : _a[1]);
|
|
23460
|
-
updateDatagridElementStyles();
|
|
23461
|
-
},
|
|
23462
|
-
},
|
|
23463
|
-
},
|
|
23464
|
-
};
|
|
23465
|
-
virtualScrollViewport.setTotalContentSize = (value) => {
|
|
23466
|
-
totalContentSize = value;
|
|
23467
|
-
datagridTableElement.style.height = `${totalContentSize}px`;
|
|
23468
|
-
updateDatagridElementStyles();
|
|
23469
|
-
};
|
|
23470
|
-
return virtualScrollViewport;
|
|
23729
|
+
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
23471
23730
|
}
|
|
23472
23731
|
}
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23732
|
+
ClrDatagridRowDetail.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridRowDetail, deps: [{ token: Selection }, { token: RowActionService }, { token: DatagridIfExpandService }, { token: ExpandableRowsCount }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
23733
|
+
ClrDatagridRowDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridRowDetail, selector: "clr-dg-row-detail", inputs: { _beginningOfExpandableContentAriaText: ["clrRowDetailBeginningAriaText", "_beginningOfExpandableContentAriaText"], _endOfExpandableContentAriaText: ["clrRowDetailEndAriaText", "_endOfExpandableContentAriaText"], replace: ["clrDgReplace", "replace"] }, host: { attributes: { "role": "row" }, properties: { "class.datagrid-row-flex": "true", "class.datagrid-row-detail": "true", "attr.id": "expand.expandableId" } }, queries: [{ propertyName: "cells", predicate: ClrDatagridCell }], ngImport: i0, template: `
|
|
23734
|
+
<div class="clr-sr-only">
|
|
23735
|
+
{{ beginningOfExpandableContentAriaText }}
|
|
23736
|
+
{{ commonStrings.keys.datagridExpandableRowsHelperText }}
|
|
23737
|
+
</div>
|
|
23738
|
+
<ng-container *ngIf="this.cells?.length > 0" [ngTemplateOutlet]="noCells"></ng-container>
|
|
23739
|
+
|
|
23740
|
+
<ng-container *ngIf="this.cells?.length === 0">
|
|
23741
|
+
<clr-dg-cell class="datagrid-container">
|
|
23742
|
+
<ng-container [ngTemplateOutlet]="noCells"></ng-container>
|
|
23743
|
+
</clr-dg-cell>
|
|
23744
|
+
</ng-container>
|
|
23745
|
+
|
|
23746
|
+
<ng-template #noCells>
|
|
23747
|
+
<ng-content></ng-content>
|
|
23748
|
+
</ng-template>
|
|
23749
|
+
<div class="clr-sr-only">{{ endOfExpandableContentAriaText }}</div>
|
|
23750
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ClrDatagridCell, selector: "clr-dg-cell" }, { kind: "directive", type: DatagridCellRenderer, selector: "clr-dg-cell" }] });
|
|
23751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridRowDetail, decorators: [{
|
|
23752
|
+
type: Component,
|
|
23477
23753
|
args: [{
|
|
23478
|
-
selector: '
|
|
23479
|
-
|
|
23754
|
+
selector: 'clr-dg-row-detail',
|
|
23755
|
+
template: `
|
|
23756
|
+
<div class="clr-sr-only">
|
|
23757
|
+
{{ beginningOfExpandableContentAriaText }}
|
|
23758
|
+
{{ commonStrings.keys.datagridExpandableRowsHelperText }}
|
|
23759
|
+
</div>
|
|
23760
|
+
<ng-container *ngIf="this.cells?.length > 0" [ngTemplateOutlet]="noCells"></ng-container>
|
|
23761
|
+
|
|
23762
|
+
<ng-container *ngIf="this.cells?.length === 0">
|
|
23763
|
+
<clr-dg-cell class="datagrid-container">
|
|
23764
|
+
<ng-container [ngTemplateOutlet]="noCells"></ng-container>
|
|
23765
|
+
</clr-dg-cell>
|
|
23766
|
+
</ng-container>
|
|
23767
|
+
|
|
23768
|
+
<ng-template #noCells>
|
|
23769
|
+
<ng-content></ng-content>
|
|
23770
|
+
</ng-template>
|
|
23771
|
+
<div class="clr-sr-only">{{ endOfExpandableContentAriaText }}</div>
|
|
23772
|
+
`,
|
|
23773
|
+
host: {
|
|
23774
|
+
'[class.datagrid-row-flex]': 'true',
|
|
23775
|
+
'[class.datagrid-row-detail]': 'true',
|
|
23776
|
+
'[attr.id]': 'expand.expandableId',
|
|
23777
|
+
role: 'row',
|
|
23778
|
+
},
|
|
23480
23779
|
}]
|
|
23481
|
-
}], ctorParameters: function () {
|
|
23482
|
-
return [{ type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: Items, decorators: [{
|
|
23483
|
-
type: SkipSelf
|
|
23484
|
-
}] }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i1$3.Directionality }, { type: i3$1.ScrollDispatcher }, { type: i3$1.ViewportRuler }, { type: ClrDatagrid }, { type: ColumnsService }, { type: i0.EnvironmentInjector }];
|
|
23485
|
-
}, propDecorators: { renderedRangeChange: [{
|
|
23486
|
-
type: Output
|
|
23487
|
-
}], cdkVirtualForOf: [{
|
|
23488
|
-
type: Input,
|
|
23489
|
-
args: ['clrVirtualRowsOf']
|
|
23490
|
-
}], cdkVirtualForTrackBy: [{
|
|
23491
|
-
type: Input,
|
|
23492
|
-
args: ['clrVirtualRowsTrackBy']
|
|
23493
|
-
}], cdkVirtualForTemplate: [{
|
|
23494
|
-
type: Input,
|
|
23495
|
-
args: ['clrVirtualRowsTemplate']
|
|
23496
|
-
}], cdkVirtualForTemplateCacheSize: [{
|
|
23497
|
-
type: Input,
|
|
23498
|
-
args: ['clrVirtualRowsTemplateCacheSize']
|
|
23499
|
-
}], itemSize: [{
|
|
23780
|
+
}], ctorParameters: function () { return [{ type: Selection }, { type: RowActionService }, { type: DatagridIfExpandService }, { type: ExpandableRowsCount }, { type: ClrCommonStringsService }]; }, propDecorators: { _beginningOfExpandableContentAriaText: [{
|
|
23500
23781
|
type: Input,
|
|
23501
|
-
args: ['
|
|
23502
|
-
}],
|
|
23782
|
+
args: ['clrRowDetailBeginningAriaText']
|
|
23783
|
+
}], _endOfExpandableContentAriaText: [{
|
|
23503
23784
|
type: Input,
|
|
23504
|
-
args: ['
|
|
23505
|
-
}],
|
|
23785
|
+
args: ['clrRowDetailEndAriaText']
|
|
23786
|
+
}], cells: [{
|
|
23787
|
+
type: ContentChildren,
|
|
23788
|
+
args: [ClrDatagridCell]
|
|
23789
|
+
}], replace: [{
|
|
23506
23790
|
type: Input,
|
|
23507
|
-
args: ['
|
|
23791
|
+
args: ['clrDgReplace']
|
|
23508
23792
|
}] } });
|
|
23509
|
-
function createCdkVirtualScrollViewport(datagridDivElementRef, changeDetectorRef, ngZone, renderer2, virtualScrollStrategy, directionality, scrollDispatcher, viewportRuler, scrollable) {
|
|
23510
|
-
if (+VERSION.major < 19) {
|
|
23511
|
-
return new CdkVirtualScrollViewport(datagridDivElementRef, changeDetectorRef, ngZone, virtualScrollStrategy, directionality, scrollDispatcher, viewportRuler, scrollable);
|
|
23512
|
-
}
|
|
23513
|
-
else {
|
|
23514
|
-
const virtualScrollViewportInjector = Injector.create({
|
|
23515
|
-
parent: inject(EnvironmentInjector),
|
|
23516
|
-
providers: [
|
|
23517
|
-
{ provide: ElementRef, useValue: datagridDivElementRef },
|
|
23518
|
-
{ provide: ChangeDetectorRef, useValue: changeDetectorRef },
|
|
23519
|
-
{ provide: NgZone, useValue: ngZone },
|
|
23520
|
-
{ provide: Renderer2, useValue: renderer2 },
|
|
23521
|
-
{ provide: VIRTUAL_SCROLL_STRATEGY, useValue: virtualScrollStrategy },
|
|
23522
|
-
{ provide: Directionality, useValue: directionality },
|
|
23523
|
-
{ provide: ScrollDispatcher, useValue: scrollDispatcher },
|
|
23524
|
-
{ provide: ViewportRuler, useValue: viewportRuler },
|
|
23525
|
-
{ provide: CdkVirtualScrollable, useValue: scrollable },
|
|
23526
|
-
{ provide: CdkVirtualScrollViewport, useClass: CdkVirtualScrollViewport },
|
|
23527
|
-
],
|
|
23528
|
-
});
|
|
23529
|
-
return virtualScrollViewportInjector.get(CdkVirtualScrollViewport);
|
|
23530
|
-
}
|
|
23531
|
-
}
|
|
23532
|
-
function createCdkVirtualForOfDirective(viewContainerRef, templateRef, iterableDiffers, viewRepeater, virtualScrollViewport, ngZone) {
|
|
23533
|
-
if (+VERSION.major < 19) {
|
|
23534
|
-
return new CdkVirtualForOf(viewContainerRef, templateRef, iterableDiffers, viewRepeater, virtualScrollViewport, ngZone);
|
|
23535
|
-
}
|
|
23536
|
-
else {
|
|
23537
|
-
const virtualScrollViewportInjector = Injector.create({
|
|
23538
|
-
parent: inject(EnvironmentInjector),
|
|
23539
|
-
providers: [{ provide: CdkVirtualScrollViewport, useValue: virtualScrollViewport }],
|
|
23540
|
-
});
|
|
23541
|
-
const cdkVirtualForInjector = Injector.create({
|
|
23542
|
-
parent: virtualScrollViewportInjector,
|
|
23543
|
-
providers: [
|
|
23544
|
-
{ provide: ViewContainerRef, useValue: viewContainerRef },
|
|
23545
|
-
{ provide: TemplateRef, useValue: templateRef },
|
|
23546
|
-
{ provide: IterableDiffers, useValue: iterableDiffers },
|
|
23547
|
-
{ provide: _VIEW_REPEATER_STRATEGY, useValue: viewRepeater },
|
|
23548
|
-
{ provide: NgZone, useValue: ngZone },
|
|
23549
|
-
{ provide: CdkVirtualForOf, useClass: CdkVirtualForOf },
|
|
23550
|
-
],
|
|
23551
|
-
});
|
|
23552
|
-
return cdkVirtualForInjector.get(CdkVirtualForOf);
|
|
23553
|
-
}
|
|
23554
|
-
}
|
|
23555
23793
|
|
|
23556
23794
|
/*
|
|
23557
23795
|
* Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
|
|
@@ -25460,7 +25698,7 @@ class ClrTreeNode {
|
|
|
25460
25698
|
}
|
|
25461
25699
|
}
|
|
25462
25700
|
ClrTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrTreeNode, deps: [{ token: PLATFORM_ID }, { token: ClrTreeNode, optional: true, skipSelf: true }, { token: TreeFeaturesService }, { token: IfExpandService }, { token: ClrCommonStringsService }, { token: TreeFocusManagerService }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
25463
|
-
ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrTreeNode, selector: "clr-tree-node", inputs: { expandable: ["clrExpandable", "expandable"], disabled: ["clrDisabled", "disabled"], selected: ["clrSelected", "selected"], expanded: ["clrExpanded", "expanded"], clrForTypeAhead: "clrForTypeAhead" }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true", "class.disabled": "this._model.disabled" } }, providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }], queries: [{ propertyName: "treeNodeLinkList", predicate: ClrTreeNodeLink }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [class.clr-form-control-disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n [disabled]=\"disabled\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"
|
|
25701
|
+
ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrTreeNode, selector: "clr-tree-node", inputs: { expandable: ["clrExpandable", "expandable"], disabled: ["clrDisabled", "disabled"], selected: ["clrSelected", "selected"], expanded: ["clrExpanded", "expanded"], clrForTypeAhead: "clrForTypeAhead" }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true", "class.disabled": "this._model.disabled" } }, providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }], queries: [{ propertyName: "treeNodeLinkList", predicate: ClrTreeNodeLink }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [class.clr-form-control-disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n [disabled]=\"disabled\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n [id]=\"nodeId + '-check'\"\n class=\"clr-checkbox\"\n [disabled]=\"disabled\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label [for]=\"nodeId + '-check'\" class=\"clr-control-label\">\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </label>\n </div>\n <div\n class=\"clr-treenode-content\"\n [class.clr-treenode-text-only]=\"treeNodeContentTextOnly\"\n (mouseup)=\"focusTreeNode()\"\n *ngIf=\"!featuresService.selectable\"\n >\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </div>\n\n <ng-template #treenodeContent>\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span> {{ariaSelected ? commonStrings.keys.selectedTreeNode : commonStrings.keys.unselectedTreeNode}}</span>\n </div>\n </ng-template>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: RecursiveChildren, selector: "clr-recursive-children", inputs: ["parent", "children"] }], animations: [
|
|
25464
25702
|
trigger('toggleChildrenAnim', [
|
|
25465
25703
|
transition('collapsed => expanded', [style({ height: 0 }), animate(200, style({ height: '*' }))]),
|
|
25466
25704
|
transition('expanded => collapsed', [style({ height: '*' }), animate(200, style({ height: 0 }))]),
|
|
@@ -25480,7 +25718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
25480
25718
|
], host: {
|
|
25481
25719
|
'[class.clr-tree-node]': 'true',
|
|
25482
25720
|
'[class.disabled]': 'this._model.disabled',
|
|
25483
|
-
}, template: "<!--\n ~ Copyright (c) 2016-2025 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<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [class.clr-form-control-disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n [disabled]=\"disabled\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"
|
|
25721
|
+
}, template: "<!--\n ~ Copyright (c) 2016-2025 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<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [class.clr-form-control-disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n [disabled]=\"disabled\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n [id]=\"nodeId + '-check'\"\n class=\"clr-checkbox\"\n [disabled]=\"disabled\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label [for]=\"nodeId + '-check'\" class=\"clr-control-label\">\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </label>\n </div>\n <div\n class=\"clr-treenode-content\"\n [class.clr-treenode-text-only]=\"treeNodeContentTextOnly\"\n (mouseup)=\"focusTreeNode()\"\n *ngIf=\"!featuresService.selectable\"\n >\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </div>\n\n <ng-template #treenodeContent>\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span> {{ariaSelected ? commonStrings.keys.selectedTreeNode : commonStrings.keys.unselectedTreeNode}}</span>\n </div>\n </ng-template>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n" }]
|
|
25484
25722
|
}], ctorParameters: function () {
|
|
25485
25723
|
return [{ type: undefined, decorators: [{
|
|
25486
25724
|
type: Inject,
|
|
@@ -26120,10 +26358,10 @@ class ClrAlertsPager {
|
|
|
26120
26358
|
}
|
|
26121
26359
|
}
|
|
26122
26360
|
ClrAlertsPager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlertsPager, deps: [{ token: MultiAlertService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
26123
|
-
ClrAlertsPager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAlertsPager, selector: "clr-alerts-pager", inputs: { currentAlert: ["clrCurrentAlert", "currentAlert"], currentAlertIndex: ["clrCurrentAlertIndex", "currentAlertIndex"] }, outputs: { currentAlertChange: "clrCurrentAlertChange", currentAlertIndexChange: "clrCurrentAlertIndexChange" }, host: { properties: { "class.alerts-pager": "true" } }, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<div class=\"alerts-pager-control\">\n <div class=\"alerts-page-down\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageDown()\" [attr.aria-label]=\"previousAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"left\"></cds-icon>\n </button>\n </div>\n <div class=\"alerts-pager-text\">{{this.multiAlertService.current+1}} / {{this.multiAlertService.count}}</div>\n <div class=\"alerts-page-up\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageUp()\" [attr.aria-label]=\"nextAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"right\"></cds-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }] });
|
|
26361
|
+
ClrAlertsPager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAlertsPager, selector: "clr-alerts-pager", inputs: { currentAlert: ["clrCurrentAlert", "currentAlert"], currentAlertIndex: ["clrCurrentAlertIndex", "currentAlertIndex"] }, outputs: { currentAlertChange: "clrCurrentAlertChange", currentAlertIndexChange: "clrCurrentAlertIndexChange" }, host: { properties: { "class.alerts-pager": "true" } }, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<div class=\"alerts-pager-control\">\n <div class=\"alerts-page-down\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageDown()\" [attr.aria-label]=\"previousAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"left\" [attr.title]=\"commonStrings.keys.previous\"></cds-icon>\n </button>\n </div>\n <div class=\"alerts-pager-text\">{{this.multiAlertService.current+1}} / {{this.multiAlertService.count}}</div>\n <div class=\"alerts-page-up\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageUp()\" [attr.aria-label]=\"nextAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"right\" [attr.title]=\"commonStrings.keys.next\"></cds-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }] });
|
|
26124
26362
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlertsPager, decorators: [{
|
|
26125
26363
|
type: Component,
|
|
26126
|
-
args: [{ selector: 'clr-alerts-pager', host: { '[class.alerts-pager]': 'true' }, template: "<!--\n ~ Copyright (c) 2016-2025 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<div class=\"alerts-pager-control\">\n <div class=\"alerts-page-down\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageDown()\" [attr.aria-label]=\"previousAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"left\"></cds-icon>\n </button>\n </div>\n <div class=\"alerts-pager-text\">{{this.multiAlertService.current+1}} / {{this.multiAlertService.count}}</div>\n <div class=\"alerts-page-up\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageUp()\" [attr.aria-label]=\"nextAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"right\"></cds-icon>\n </button>\n </div>\n</div>\n" }]
|
|
26364
|
+
args: [{ selector: 'clr-alerts-pager', host: { '[class.alerts-pager]': 'true' }, template: "<!--\n ~ Copyright (c) 2016-2025 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<div class=\"alerts-pager-control\">\n <div class=\"alerts-page-down\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageDown()\" [attr.aria-label]=\"previousAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"left\" [attr.title]=\"commonStrings.keys.previous\"></cds-icon>\n </button>\n </div>\n <div class=\"alerts-pager-text\">{{this.multiAlertService.current+1}} / {{this.multiAlertService.count}}</div>\n <div class=\"alerts-page-up\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageUp()\" [attr.aria-label]=\"nextAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"right\" [attr.title]=\"commonStrings.keys.next\"></cds-icon>\n </button>\n </div>\n</div>\n" }]
|
|
26127
26365
|
}], ctorParameters: function () { return [{ type: MultiAlertService }, { type: ClrCommonStringsService }]; }, propDecorators: { currentAlertChange: [{
|
|
26128
26366
|
type: Output,
|
|
26129
26367
|
args: ['clrCurrentAlertChange']
|
|
@@ -26341,6 +26579,7 @@ class ClrModal {
|
|
|
26341
26579
|
this._openChanged = new EventEmitter(false);
|
|
26342
26580
|
this.closable = true;
|
|
26343
26581
|
this.closeButtonAriaLabel = this.commonStrings.keys.close;
|
|
26582
|
+
this.size = 'md';
|
|
26344
26583
|
this.staticBackdrop = true;
|
|
26345
26584
|
this.skipAnimation = false;
|
|
26346
26585
|
this.stopClose = false;
|
|
@@ -26409,7 +26648,7 @@ class ClrModal {
|
|
|
26409
26648
|
}
|
|
26410
26649
|
}
|
|
26411
26650
|
ClrModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrModal, deps: [{ token: ScrollingService }, { token: ClrCommonStringsService }, { token: ModalStackService }, { token: ClrModalConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
26412
|
-
ClrModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrModal, selector: "clr-modal", inputs: { _open: ["clrModalOpen", "_open"], closable: ["clrModalClosable", "closable"], closeButtonAriaLabel: ["clrModalCloseButtonAriaLabel", "closeButtonAriaLabel"], size: ["clrModalSize", "size"], staticBackdrop: ["clrModalStaticBackdrop", "staticBackdrop"], skipAnimation: ["clrModalSkipAnimation", "skipAnimation"], stopClose: ["clrModalPreventClose", "stopClose"], labelledBy: ["clrModalLabelledById", "labelledBy"], bypassScrollService: ["clrModalOverrideScrollService", "bypassScrollService"] }, outputs: { _openChanged: "clrModalOpenChange", altClose: "clrModalAlternateClose" }, host: { properties: { "class.open": "this._open" } }, viewQueries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }, { propertyName: "bodyElementRef", first: true, predicate: ["body"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<div *ngIf=\"_open\" class=\"modal\" [class.modal-full-screen]=\"size == 'full-screen'\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n [@fadeMove]=\"fadeMove\"\n (@fadeMove.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy || modalId\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <ng-content select=\".leading-button\"></ng-content>\n <div class=\"modal-title-wrapper\" #title id=\"
|
|
26651
|
+
ClrModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrModal, selector: "clr-modal", inputs: { _open: ["clrModalOpen", "_open"], closable: ["clrModalClosable", "closable"], closeButtonAriaLabel: ["clrModalCloseButtonAriaLabel", "closeButtonAriaLabel"], size: ["clrModalSize", "size"], staticBackdrop: ["clrModalStaticBackdrop", "staticBackdrop"], skipAnimation: ["clrModalSkipAnimation", "skipAnimation"], stopClose: ["clrModalPreventClose", "stopClose"], labelledBy: ["clrModalLabelledById", "labelledBy"], bypassScrollService: ["clrModalOverrideScrollService", "bypassScrollService"] }, outputs: { _openChanged: "clrModalOpenChange", altClose: "clrModalAlternateClose" }, host: { properties: { "class.open": "this._open" } }, viewQueries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }, { propertyName: "bodyElementRef", first: true, predicate: ["body"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<div *ngIf=\"_open\" class=\"modal\" [class.modal-full-screen]=\"size == 'full-screen'\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n [@fadeMove]=\"fadeMove\"\n (@fadeMove.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy || modalId\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <ng-content select=\".leading-button\"></ng-content>\n <div class=\"modal-title-wrapper\" #title [id]=\"modalId\" cdkFocusInitial tabindex=\"-1\">\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div #body class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n</div>\n\n<div [@fade] *ngIf=\"backdrop\" class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"backdropClick()\"></div>\n", styles: [":host{display:none}:host.open{display:inline}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }], viewProviders: [ScrollingService], animations: [
|
|
26413
26652
|
trigger('fadeMove', [
|
|
26414
26653
|
transition('* => fadeDown', [
|
|
26415
26654
|
style({ opacity: 0, transform: 'translate(0, -25%)' }),
|
|
@@ -26444,7 +26683,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
26444
26683
|
transition('void => *', [style({ opacity: 0 }), animate('0.2s ease-in-out', style({ opacity: 0.85 }))]),
|
|
26445
26684
|
transition('* => void', [animate('0.2s ease-in-out', style({ opacity: 0 }))]),
|
|
26446
26685
|
]),
|
|
26447
|
-
], template: "<!--\n ~ Copyright (c) 2016-2025 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<div *ngIf=\"_open\" class=\"modal\" [class.modal-full-screen]=\"size == 'full-screen'\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n [@fadeMove]=\"fadeMove\"\n (@fadeMove.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy || modalId\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <ng-content select=\".leading-button\"></ng-content>\n <div class=\"modal-title-wrapper\" #title id=\"
|
|
26686
|
+
], template: "<!--\n ~ Copyright (c) 2016-2025 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<div *ngIf=\"_open\" class=\"modal\" [class.modal-full-screen]=\"size == 'full-screen'\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n [@fadeMove]=\"fadeMove\"\n (@fadeMove.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy || modalId\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <ng-content select=\".leading-button\"></ng-content>\n <div class=\"modal-title-wrapper\" #title [id]=\"modalId\" cdkFocusInitial tabindex=\"-1\">\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div #body class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n</div>\n\n<div [@fade] *ngIf=\"backdrop\" class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"backdropClick()\"></div>\n", styles: [":host{display:none}:host.open{display:inline}\n"] }]
|
|
26448
26687
|
}], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }, { type: ModalStackService }, { type: ClrModalConfigurationService }]; }, propDecorators: { title: [{
|
|
26449
26688
|
type: ViewChild,
|
|
26450
26689
|
args: ['title']
|
|
@@ -26613,11 +26852,15 @@ class ClrSidePanel {
|
|
|
26613
26852
|
this.altClose = new EventEmitter(false);
|
|
26614
26853
|
this._pinnable = false;
|
|
26615
26854
|
this._pinned = false;
|
|
26855
|
+
this._size = 'md';
|
|
26616
26856
|
}
|
|
26617
26857
|
get size() {
|
|
26618
26858
|
return this._size;
|
|
26619
26859
|
}
|
|
26620
26860
|
set size(value) {
|
|
26861
|
+
if (!value) {
|
|
26862
|
+
value = 'md';
|
|
26863
|
+
}
|
|
26621
26864
|
if (this._size !== value) {
|
|
26622
26865
|
this._size = value;
|
|
26623
26866
|
if (this.clrSidePanelPinnable && this.pinned) {
|
|
@@ -29154,6 +29397,23 @@ class ClrWizardStepnavItem {
|
|
|
29154
29397
|
this.pageGuard();
|
|
29155
29398
|
return this.pageCollection.previousPageIsCompleted(this.page);
|
|
29156
29399
|
}
|
|
29400
|
+
get stepIconId() {
|
|
29401
|
+
return `${this.id}-step-icon`;
|
|
29402
|
+
}
|
|
29403
|
+
get stepTextId() {
|
|
29404
|
+
return `${this.id}-step-text`;
|
|
29405
|
+
}
|
|
29406
|
+
get stepNumberId() {
|
|
29407
|
+
return `${this.id}-step-number`;
|
|
29408
|
+
}
|
|
29409
|
+
get stepTitleId() {
|
|
29410
|
+
return `${this.id}-step-title`;
|
|
29411
|
+
}
|
|
29412
|
+
get labelledby() {
|
|
29413
|
+
const textIds = [this.stepTextId, this.stepNumberId, this.stepTitleId];
|
|
29414
|
+
const allIds = this.isComplete ? [this.stepIconId, ...textIds] : textIds;
|
|
29415
|
+
return allIds.join(' ');
|
|
29416
|
+
}
|
|
29157
29417
|
click() {
|
|
29158
29418
|
this.pageGuard();
|
|
29159
29419
|
// if we click on our own stepnav or a disabled stepnav, we don't want to do anything
|
|
@@ -29175,25 +29435,30 @@ ClrWizardStepnavItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
29175
29435
|
class="btn btn-link clr-wizard-stepnav-link"
|
|
29176
29436
|
(click)="click()"
|
|
29177
29437
|
[attr.disabled]="isDisabled ? '' : null"
|
|
29438
|
+
[attr.aria-labelledby]="labelledby"
|
|
29178
29439
|
>
|
|
29179
29440
|
<div class="clr-wizard-stepnav-link-icon">
|
|
29180
29441
|
<cds-icon
|
|
29181
29442
|
*ngIf="hasError"
|
|
29443
|
+
[id]="stepIconId"
|
|
29182
29444
|
shape="error-standard"
|
|
29183
29445
|
role="img"
|
|
29184
29446
|
[attr.aria-label]="commonStrings.keys.wizardStepError"
|
|
29185
29447
|
></cds-icon>
|
|
29186
29448
|
<cds-icon
|
|
29187
29449
|
*ngIf="!hasError && isComplete"
|
|
29450
|
+
[id]="stepIconId"
|
|
29188
29451
|
shape="success-standard"
|
|
29189
29452
|
role="img"
|
|
29190
29453
|
[attr.aria-label]="commonStrings.keys.wizardStepSuccess"
|
|
29191
29454
|
></cds-icon>
|
|
29192
29455
|
</div>
|
|
29193
29456
|
|
|
29194
|
-
<span class="clr-sr-only">{{ commonStrings.keys.wizardStep }}</span>
|
|
29195
|
-
<div class="clr-wizard-stepnav-link-page-number"
|
|
29196
|
-
|
|
29457
|
+
<span [id]="stepTextId" class="clr-sr-only">{{ commonStrings.keys.wizardStep }}</span>
|
|
29458
|
+
<div [id]="stepNumberId" class="clr-wizard-stepnav-link-page-number">
|
|
29459
|
+
<ng-content></ng-content>
|
|
29460
|
+
</div>
|
|
29461
|
+
<span [id]="stepTitleId" class="clr-wizard-stepnav-link-title">
|
|
29197
29462
|
<ng-template [ngTemplateOutlet]="page.navTitle"></ng-template>
|
|
29198
29463
|
</span>
|
|
29199
29464
|
</button>
|
|
@@ -29208,25 +29473,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
29208
29473
|
class="btn btn-link clr-wizard-stepnav-link"
|
|
29209
29474
|
(click)="click()"
|
|
29210
29475
|
[attr.disabled]="isDisabled ? '' : null"
|
|
29476
|
+
[attr.aria-labelledby]="labelledby"
|
|
29211
29477
|
>
|
|
29212
29478
|
<div class="clr-wizard-stepnav-link-icon">
|
|
29213
29479
|
<cds-icon
|
|
29214
29480
|
*ngIf="hasError"
|
|
29481
|
+
[id]="stepIconId"
|
|
29215
29482
|
shape="error-standard"
|
|
29216
29483
|
role="img"
|
|
29217
29484
|
[attr.aria-label]="commonStrings.keys.wizardStepError"
|
|
29218
29485
|
></cds-icon>
|
|
29219
29486
|
<cds-icon
|
|
29220
29487
|
*ngIf="!hasError && isComplete"
|
|
29488
|
+
[id]="stepIconId"
|
|
29221
29489
|
shape="success-standard"
|
|
29222
29490
|
role="img"
|
|
29223
29491
|
[attr.aria-label]="commonStrings.keys.wizardStepSuccess"
|
|
29224
29492
|
></cds-icon>
|
|
29225
29493
|
</div>
|
|
29226
29494
|
|
|
29227
|
-
<span class="clr-sr-only">{{ commonStrings.keys.wizardStep }}</span>
|
|
29228
|
-
<div class="clr-wizard-stepnav-link-page-number"
|
|
29229
|
-
|
|
29495
|
+
<span [id]="stepTextId" class="clr-sr-only">{{ commonStrings.keys.wizardStep }}</span>
|
|
29496
|
+
<div [id]="stepNumberId" class="clr-wizard-stepnav-link-page-number">
|
|
29497
|
+
<ng-content></ng-content>
|
|
29498
|
+
</div>
|
|
29499
|
+
<span [id]="stepTitleId" class="clr-wizard-stepnav-link-title">
|
|
29230
29500
|
<ng-template [ngTemplateOutlet]="page.navTitle"></ng-template>
|
|
29231
29501
|
</span>
|
|
29232
29502
|
</button>
|
|
@@ -29261,37 +29531,43 @@ class ClrWizardStepnav {
|
|
|
29261
29531
|
}
|
|
29262
29532
|
}
|
|
29263
29533
|
ClrWizardStepnav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrWizardStepnav, deps: [{ token: PageCollectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
29264
|
-
ClrWizardStepnav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrWizardStepnav, selector: "clr-wizard-stepnav", host: { classAttribute: "clr-wizard-stepnav" }, ngImport: i0, template: `
|
|
29265
|
-
<
|
|
29266
|
-
<
|
|
29267
|
-
|
|
29268
|
-
|
|
29269
|
-
|
|
29270
|
-
|
|
29271
|
-
|
|
29272
|
-
|
|
29273
|
-
|
|
29274
|
-
|
|
29534
|
+
ClrWizardStepnav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrWizardStepnav, selector: "clr-wizard-stepnav", inputs: { label: "label" }, host: { classAttribute: "clr-wizard-stepnav" }, ngImport: i0, template: `
|
|
29535
|
+
<nav [attr.aria-label]="label">
|
|
29536
|
+
<ol class="clr-wizard-stepnav-list">
|
|
29537
|
+
<li
|
|
29538
|
+
*ngFor="let page of pageService.pages; let i = index"
|
|
29539
|
+
clr-wizard-stepnav-item
|
|
29540
|
+
[page]="page"
|
|
29541
|
+
class="clr-wizard-stepnav-item"
|
|
29542
|
+
>
|
|
29543
|
+
{{ i + 1 }}
|
|
29544
|
+
</li>
|
|
29545
|
+
</ol>
|
|
29546
|
+
</nav>
|
|
29275
29547
|
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ClrWizardStepnavItem, selector: "[clr-wizard-stepnav-item]", inputs: ["page"] }] });
|
|
29276
29548
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrWizardStepnav, decorators: [{
|
|
29277
29549
|
type: Component,
|
|
29278
29550
|
args: [{
|
|
29279
29551
|
selector: 'clr-wizard-stepnav',
|
|
29280
29552
|
template: `
|
|
29281
|
-
<
|
|
29282
|
-
<
|
|
29283
|
-
|
|
29284
|
-
|
|
29285
|
-
|
|
29286
|
-
|
|
29287
|
-
|
|
29288
|
-
|
|
29289
|
-
|
|
29290
|
-
|
|
29553
|
+
<nav [attr.aria-label]="label">
|
|
29554
|
+
<ol class="clr-wizard-stepnav-list">
|
|
29555
|
+
<li
|
|
29556
|
+
*ngFor="let page of pageService.pages; let i = index"
|
|
29557
|
+
clr-wizard-stepnav-item
|
|
29558
|
+
[page]="page"
|
|
29559
|
+
class="clr-wizard-stepnav-item"
|
|
29560
|
+
>
|
|
29561
|
+
{{ i + 1 }}
|
|
29562
|
+
</li>
|
|
29563
|
+
</ol>
|
|
29564
|
+
</nav>
|
|
29291
29565
|
`,
|
|
29292
29566
|
host: { class: 'clr-wizard-stepnav' },
|
|
29293
29567
|
}]
|
|
29294
|
-
}], ctorParameters: function () { return [{ type: PageCollectionService }]; }
|
|
29568
|
+
}], ctorParameters: function () { return [{ type: PageCollectionService }]; }, propDecorators: { label: [{
|
|
29569
|
+
type: Input
|
|
29570
|
+
}] } });
|
|
29295
29571
|
|
|
29296
29572
|
/*
|
|
29297
29573
|
* Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
|
|
@@ -29695,7 +29971,7 @@ class ClrWizard {
|
|
|
29695
29971
|
}
|
|
29696
29972
|
}
|
|
29697
29973
|
ClrWizard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrWizard, deps: [{ token: PLATFORM_ID }, { token: ClrCommonStringsService }, { token: WizardNavigationService }, { token: PageCollectionService }, { token: ButtonHubService }, { token: HeaderActionService }, { token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
|
|
29698
|
-
ClrWizard.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrWizard, selector: "clr-wizard", inputs: { stepnavAriaLabel: ["clrWizardStepnavAriaLabel", "stepnavAriaLabel"], size: ["clrWizardSize", "size"], closable: ["clrWizardClosable", "closable"], _stopModalAnimations: ["clrWizardPreventModalAnimation", "_stopModalAnimations"], forceForward: ["clrWizardForceForwardNavigation", "forceForward"], clrWizardOpen: "clrWizardOpen", stopNext: ["clrWizardPreventDefaultNext", "stopNext"], stopCancel: ["clrWizardPreventDefaultCancel", "stopCancel"], stopNavigation: ["clrWizardPreventNavigation", "stopNavigation"], disableStepnav: ["clrWizardDisableStepnav", "disableStepnav"] }, outputs: { _openChanged: "clrWizardOpenChange", onCancel: "clrWizardOnCancel", wizardFinished: "clrWizardOnFinish", onReset: "clrWizardOnReset", currentPageChanged: "clrWizardCurrentPageChanged", onMoveNext: "clrWizardOnNext", onMovePrevious: "clrWizardOnPrevious" }, host: { properties: { "class.clr-wizard": "true", "class.wizard-md": "size == 'md'", "class.wizard-lg": "size == 'lg'", "class.wizard-xl": "size == 'xl'", "class.lastPage": "navService.currentPageIsLast" } }, providers: [WizardNavigationService, PageCollectionService, ButtonHubService, HeaderActionService], queries: [{ propertyName: "wizardTitle", first: true, predicate: ClrWizardTitle, descendants: true }, { propertyName: "pages", predicate: ClrWizardPage, descendants: true }, { propertyName: "headerActions", predicate: ClrWizardHeaderAction }], viewQueries: [{ propertyName: "pageTitle", first: true, predicate: ["pageTitle"], descendants: true }, { propertyName: "modal", first: true, predicate: ClrModal, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalSkipAnimation]=\"stopModalAnimations\"\n [clrModalOverrideScrollService]=\"isInline\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <div class=\"modal-nav clr-wizard-stepnav-wrapper\" role=\"region\"
|
|
29974
|
+
ClrWizard.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrWizard, selector: "clr-wizard", inputs: { stepnavAriaLabel: ["clrWizardStepnavAriaLabel", "stepnavAriaLabel"], size: ["clrWizardSize", "size"], closable: ["clrWizardClosable", "closable"], _stopModalAnimations: ["clrWizardPreventModalAnimation", "_stopModalAnimations"], forceForward: ["clrWizardForceForwardNavigation", "forceForward"], clrWizardOpen: "clrWizardOpen", stopNext: ["clrWizardPreventDefaultNext", "stopNext"], stopCancel: ["clrWizardPreventDefaultCancel", "stopCancel"], stopNavigation: ["clrWizardPreventNavigation", "stopNavigation"], disableStepnav: ["clrWizardDisableStepnav", "disableStepnav"] }, outputs: { _openChanged: "clrWizardOpenChange", onCancel: "clrWizardOnCancel", wizardFinished: "clrWizardOnFinish", onReset: "clrWizardOnReset", currentPageChanged: "clrWizardCurrentPageChanged", onMoveNext: "clrWizardOnNext", onMovePrevious: "clrWizardOnPrevious" }, host: { properties: { "class.clr-wizard": "true", "class.wizard-md": "size == 'md'", "class.wizard-lg": "size == 'lg'", "class.wizard-xl": "size == 'xl'", "class.lastPage": "navService.currentPageIsLast" } }, providers: [WizardNavigationService, PageCollectionService, ButtonHubService, HeaderActionService], queries: [{ propertyName: "wizardTitle", first: true, predicate: ClrWizardTitle, descendants: true }, { propertyName: "pages", predicate: ClrWizardPage, descendants: true }, { propertyName: "headerActions", predicate: ClrWizardHeaderAction }], viewQueries: [{ propertyName: "pageTitle", first: true, predicate: ["pageTitle"], descendants: true }, { propertyName: "modal", first: true, predicate: ClrModal, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2025 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<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalSkipAnimation]=\"stopModalAnimations\"\n [clrModalOverrideScrollService]=\"isInline\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <div class=\"modal-nav clr-wizard-stepnav-wrapper\" role=\"region\">\n <div class=\"clr-wizard-title\" [id]=\"wizardId\" role=\"heading\" [attr.aria-level]=\"wizardTitle.headingLevel || 1\">\n <ng-content select=\"clr-wizard-title\"></ng-content>\n </div>\n <clr-wizard-stepnav [label]=\"stepnavAriaLabel\"></clr-wizard-stepnav>\n </div>\n\n <div class=\"modal-title\" role=\"heading\" [attr.aria-level]=\"navService.currentPage?.pageTitle.headingLevel || 2\">\n <span tabindex=\"-1\" #pageTitle class=\"modal-title-text\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPageTitle\"></ng-template>\n </span>\n\n <div class=\"modal-header-actions-wrapper\" *ngIf=\"headerActionService.displayHeaderActionsWrapper\">\n <div *ngIf=\"headerActionService.showWizardHeaderActions\">\n <ng-content select=\"clr-wizard-header-action\"></ng-content>\n </div>\n <div *ngIf=\"headerActionService.currentPageHasHeaderActions\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.headerActions\"></ng-template>\n </div>\n </div>\n </div>\n\n <div class=\"modal-body\">\n <main clr-wizard-pages-wrapper class=\"clr-wizard-content\">\n <ng-content></ng-content>\n </main>\n </div>\n <div class=\"modal-footer clr-wizard-footer\">\n <div class=\"clr-wizard-footer-buttons\">\n <div\n *ngIf=\"navService.currentPage && !navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-content select=\"clr-wizard-button\"></ng-content>\n </div>\n <div\n *ngIf=\"navService.currentPage && navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.buttons\"></ng-template>\n </div>\n </div>\n </div>\n</clr-modal>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ClrModal, selector: "clr-modal", inputs: ["clrModalOpen", "clrModalClosable", "clrModalCloseButtonAriaLabel", "clrModalSize", "clrModalStaticBackdrop", "clrModalSkipAnimation", "clrModalPreventClose", "clrModalLabelledById", "clrModalOverrideScrollService"], outputs: ["clrModalOpenChange", "clrModalAlternateClose"] }, { kind: "directive", type: ClrModalBody, selector: ".modal-body" }, { kind: "component", type: ClrWizardStepnav, selector: "clr-wizard-stepnav", inputs: ["label"] }] });
|
|
29699
29975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrWizard, decorators: [{
|
|
29700
29976
|
type: Component,
|
|
29701
29977
|
args: [{ selector: 'clr-wizard', providers: [WizardNavigationService, PageCollectionService, ButtonHubService, HeaderActionService], host: {
|
|
@@ -29704,7 +29980,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
29704
29980
|
'[class.wizard-lg]': "size == 'lg'",
|
|
29705
29981
|
'[class.wizard-xl]': "size == 'xl'",
|
|
29706
29982
|
'[class.lastPage]': 'navService.currentPageIsLast',
|
|
29707
|
-
}, template: "<!--\n ~ Copyright (c) 2016-2025 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<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalSkipAnimation]=\"stopModalAnimations\"\n [clrModalOverrideScrollService]=\"isInline\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <div class=\"modal-nav clr-wizard-stepnav-wrapper\" role=\"region\"
|
|
29983
|
+
}, template: "<!--\n ~ Copyright (c) 2016-2025 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<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalSkipAnimation]=\"stopModalAnimations\"\n [clrModalOverrideScrollService]=\"isInline\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <div class=\"modal-nav clr-wizard-stepnav-wrapper\" role=\"region\">\n <div class=\"clr-wizard-title\" [id]=\"wizardId\" role=\"heading\" [attr.aria-level]=\"wizardTitle.headingLevel || 1\">\n <ng-content select=\"clr-wizard-title\"></ng-content>\n </div>\n <clr-wizard-stepnav [label]=\"stepnavAriaLabel\"></clr-wizard-stepnav>\n </div>\n\n <div class=\"modal-title\" role=\"heading\" [attr.aria-level]=\"navService.currentPage?.pageTitle.headingLevel || 2\">\n <span tabindex=\"-1\" #pageTitle class=\"modal-title-text\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPageTitle\"></ng-template>\n </span>\n\n <div class=\"modal-header-actions-wrapper\" *ngIf=\"headerActionService.displayHeaderActionsWrapper\">\n <div *ngIf=\"headerActionService.showWizardHeaderActions\">\n <ng-content select=\"clr-wizard-header-action\"></ng-content>\n </div>\n <div *ngIf=\"headerActionService.currentPageHasHeaderActions\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.headerActions\"></ng-template>\n </div>\n </div>\n </div>\n\n <div class=\"modal-body\">\n <main clr-wizard-pages-wrapper class=\"clr-wizard-content\">\n <ng-content></ng-content>\n </main>\n </div>\n <div class=\"modal-footer clr-wizard-footer\">\n <div class=\"clr-wizard-footer-buttons\">\n <div\n *ngIf=\"navService.currentPage && !navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-content select=\"clr-wizard-button\"></ng-content>\n </div>\n <div\n *ngIf=\"navService.currentPage && navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.buttons\"></ng-template>\n </div>\n </div>\n </div>\n</clr-modal>\n" }]
|
|
29708
29984
|
}], ctorParameters: function () {
|
|
29709
29985
|
return [{ type: undefined, decorators: [{
|
|
29710
29986
|
type: Inject,
|