@clr/angular 16.5.0 → 16.5.2
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 +18 -6
- package/data/datagrid/datagrid-detail-header.d.ts +4 -1
- package/data/datagrid/datagrid-filter.d.ts +4 -2
- package/data/datagrid/datagrid-virtual-scroll.directive.d.ts +5 -2
- package/data/datagrid/datagrid.d.ts +1 -0
- package/data/datagrid/enums/column-changes.enum.d.ts +2 -1
- package/data/datagrid/providers/columns.service.d.ts +1 -0
- package/data/datagrid/providers/detail.service.d.ts +3 -0
- package/data/datagrid/render/main-renderer.d.ts +1 -1
- package/data/datagrid/utils/key-navigation-grid.controller.d.ts +1 -0
- package/esm2020/data/datagrid/datagrid-action-overflow.mjs +3 -1
- package/esm2020/data/datagrid/datagrid-detail-header.mjs +12 -6
- package/esm2020/data/datagrid/datagrid-detail.mjs +3 -3
- package/esm2020/data/datagrid/datagrid-filter.mjs +19 -12
- package/esm2020/data/datagrid/datagrid-row.mjs +3 -3
- package/esm2020/data/datagrid/datagrid-virtual-scroll.directive.mjs +13 -5
- package/esm2020/data/datagrid/datagrid.mjs +25 -11
- package/esm2020/data/datagrid/enums/column-changes.enum.mjs +3 -2
- package/esm2020/data/datagrid/providers/columns.service.mjs +9 -3
- package/esm2020/data/datagrid/providers/detail.service.mjs +9 -2
- package/esm2020/data/datagrid/render/cell-renderer.mjs +1 -3
- package/esm2020/data/datagrid/render/main-renderer.mjs +21 -16
- package/esm2020/data/datagrid/utils/key-navigation-grid.controller.mjs +6 -3
- package/esm2020/data/stack-view/stack-block.mjs +4 -2
- package/esm2020/forms/combobox/option.mjs +5 -4
- package/esm2020/forms/common/abstract-container.mjs +5 -2
- package/esm2020/modal/modal.mjs +15 -5
- package/esm2020/timeline/timeline-step.mjs +3 -3
- package/esm2020/timeline/timeline.mjs +3 -3
- package/fesm2015/clr-angular.mjs +315 -243
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +310 -238
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/forms/combobox/option.d.ts +1 -1
- package/modal/modal.d.ts +3 -1
- package/package.json +2 -2
package/fesm2015/clr-angular.mjs
CHANGED
|
@@ -4765,7 +4765,10 @@ class ClrAbstractContainer {
|
|
|
4765
4765
|
this.subscriptions = [];
|
|
4766
4766
|
this.subscriptions.push(this.ifControlStateService.statusChanges.subscribe((state) => {
|
|
4767
4767
|
this.state = state;
|
|
4768
|
-
|
|
4768
|
+
// Make sure everything is updated before dispatching the values for helpers
|
|
4769
|
+
setTimeout(() => {
|
|
4770
|
+
this.updateHelpers();
|
|
4771
|
+
});
|
|
4769
4772
|
}));
|
|
4770
4773
|
this.subscriptions.push(this.ngControlService.controlChanges.subscribe(control => {
|
|
4771
4774
|
this.control = control;
|
|
@@ -6850,7 +6853,8 @@ class ClrOption {
|
|
|
6850
6853
|
this.optionProxy.id = this._id;
|
|
6851
6854
|
}
|
|
6852
6855
|
}
|
|
6853
|
-
onClick() {
|
|
6856
|
+
onClick(event) {
|
|
6857
|
+
event.stopPropagation();
|
|
6854
6858
|
if (this.optionSelectionService.multiselectable) {
|
|
6855
6859
|
this.optionSelectionService.toggle(this.value);
|
|
6856
6860
|
}
|
|
@@ -6865,7 +6869,7 @@ class ClrOption {
|
|
|
6865
6869
|
}
|
|
6866
6870
|
}
|
|
6867
6871
|
ClrOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrOption, deps: [{ token: i0.ElementRef }, { token: ClrCommonStringsService }, { token: ComboboxFocusHandler }, { token: OptionSelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6868
|
-
ClrOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrOption, selector: "clr-option", inputs: { optionId: ["id", "optionId"], value: ["clrValue", "value"] }, host: { listeners: { "click": "onClick()" }, properties: { "class.clr-combobox-option": "true", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.id": "optionId", "class.active": "this.selected", "class.clr-focus": "this.focusClass" } }, ngImport: i0, template: `
|
|
6872
|
+
ClrOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrOption, selector: "clr-option", inputs: { optionId: ["id", "optionId"], value: ["clrValue", "value"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.clr-combobox-option": "true", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.id": "optionId", "class.active": "this.selected", "class.clr-focus": "this.focusClass" } }, ngImport: i0, template: `
|
|
6869
6873
|
<ng-content></ng-content>
|
|
6870
6874
|
<span *ngIf="selected" class="clr-sr-only">{{ commonStrings.keys.comboboxSelected }}</span>
|
|
6871
6875
|
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
@@ -6899,7 +6903,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
6899
6903
|
args: ['class.clr-focus']
|
|
6900
6904
|
}], onClick: [{
|
|
6901
6905
|
type: HostListener,
|
|
6902
|
-
args: ['click']
|
|
6906
|
+
args: ['click', ['$event']]
|
|
6903
6907
|
}] } });
|
|
6904
6908
|
|
|
6905
6909
|
/*
|
|
@@ -12145,6 +12149,196 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
12145
12149
|
type: Directive
|
|
12146
12150
|
}], ctorParameters: function () { return [{ type: FiltersProvider }]; } });
|
|
12147
12151
|
|
|
12152
|
+
/*
|
|
12153
|
+
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
|
|
12154
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
12155
|
+
* This software is released under MIT license.
|
|
12156
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
12157
|
+
*/
|
|
12158
|
+
function getTabableItems(el) {
|
|
12159
|
+
const tabableSelector = [
|
|
12160
|
+
'a[href]',
|
|
12161
|
+
'area[href]',
|
|
12162
|
+
'input:not([disabled])',
|
|
12163
|
+
'button:not([disabled])',
|
|
12164
|
+
'select:not([disabled])',
|
|
12165
|
+
'textarea:not([disabled])',
|
|
12166
|
+
'iframe',
|
|
12167
|
+
'object',
|
|
12168
|
+
'embed',
|
|
12169
|
+
'*[tabindex]',
|
|
12170
|
+
'*[contenteditable=true]',
|
|
12171
|
+
'[role=button]:not([disabled])',
|
|
12172
|
+
].join(',');
|
|
12173
|
+
return Array.from(el.querySelectorAll(tabableSelector));
|
|
12174
|
+
}
|
|
12175
|
+
class KeyNavigationGridController {
|
|
12176
|
+
constructor(zone) {
|
|
12177
|
+
this.zone = zone;
|
|
12178
|
+
this.skipItemFocus = false;
|
|
12179
|
+
this.listenersAdded = false;
|
|
12180
|
+
this.destroy$ = new Subject();
|
|
12181
|
+
this._activeCell = null;
|
|
12182
|
+
this.config = {
|
|
12183
|
+
keyGridRows: '[role=row]:not(.datagrid-placeholder)',
|
|
12184
|
+
keyGridCells: '[role=gridcell]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), [role=columnheader]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), .datagrid-detail-caret',
|
|
12185
|
+
keyGrid: '[role=grid]',
|
|
12186
|
+
};
|
|
12187
|
+
}
|
|
12188
|
+
get grid() {
|
|
12189
|
+
var _a;
|
|
12190
|
+
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector(this.config.keyGrid);
|
|
12191
|
+
}
|
|
12192
|
+
get rows() {
|
|
12193
|
+
var _a;
|
|
12194
|
+
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.config.keyGridRows);
|
|
12195
|
+
}
|
|
12196
|
+
get cells() {
|
|
12197
|
+
var _a;
|
|
12198
|
+
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.config.keyGridCells);
|
|
12199
|
+
}
|
|
12200
|
+
ngOnDestroy() {
|
|
12201
|
+
this.destroy$.next();
|
|
12202
|
+
this.destroy$.complete();
|
|
12203
|
+
}
|
|
12204
|
+
addListeners() {
|
|
12205
|
+
if (this.listenersAdded) {
|
|
12206
|
+
return;
|
|
12207
|
+
}
|
|
12208
|
+
this.zone.runOutsideAngular(() => {
|
|
12209
|
+
fromEvent(this.grid, 'mousedown')
|
|
12210
|
+
.pipe(takeUntil(this.destroy$))
|
|
12211
|
+
.subscribe((e) => {
|
|
12212
|
+
// preserve right click for context menus & keyboard mouse control https://apple.stackexchange.com/questions/32715/how-do-i-open-the-context-menu-from-a-mac-keyboard
|
|
12213
|
+
if (e.buttons === 1 && !e.ctrlKey) {
|
|
12214
|
+
const activeCell = this.cells
|
|
12215
|
+
? Array.from(this.cells).find(c => c === e.target || c === e.target.closest(this.config.keyGridCells))
|
|
12216
|
+
: null;
|
|
12217
|
+
if (activeCell) {
|
|
12218
|
+
this.setActiveCell(activeCell);
|
|
12219
|
+
}
|
|
12220
|
+
}
|
|
12221
|
+
});
|
|
12222
|
+
fromEvent(this.grid, 'wheel')
|
|
12223
|
+
.pipe(takeUntil(this.destroy$))
|
|
12224
|
+
.subscribe(() => {
|
|
12225
|
+
this.removeActiveCell();
|
|
12226
|
+
});
|
|
12227
|
+
fromEvent(this.grid, 'keydown')
|
|
12228
|
+
.pipe(takeUntil(this.destroy$))
|
|
12229
|
+
.subscribe((e) => {
|
|
12230
|
+
// Skip column resize events
|
|
12231
|
+
if (e.target.classList.contains('drag-handle') &&
|
|
12232
|
+
(e.code === 'ArrowLeft' || e.code === 'ArrowRight')) {
|
|
12233
|
+
return;
|
|
12234
|
+
}
|
|
12235
|
+
if (e.code === 'ArrowUp' ||
|
|
12236
|
+
e.code === 'ArrowDown' ||
|
|
12237
|
+
e.code === 'ArrowLeft' ||
|
|
12238
|
+
e.code === 'ArrowRight' ||
|
|
12239
|
+
e.code === 'End' ||
|
|
12240
|
+
e.code === 'Home' ||
|
|
12241
|
+
e.code === 'PageUp' ||
|
|
12242
|
+
e.code === 'PageDown') {
|
|
12243
|
+
const { x, y } = this.getNextItemCoordinate(e);
|
|
12244
|
+
const activeItem = this.rows
|
|
12245
|
+
? Array.from(this.rows[y].querySelectorAll(this.config.keyGridCells))[x]
|
|
12246
|
+
: null;
|
|
12247
|
+
if (activeItem) {
|
|
12248
|
+
this.setActiveCell(activeItem);
|
|
12249
|
+
}
|
|
12250
|
+
e.preventDefault();
|
|
12251
|
+
}
|
|
12252
|
+
});
|
|
12253
|
+
});
|
|
12254
|
+
this.listenersAdded = true;
|
|
12255
|
+
}
|
|
12256
|
+
initializeKeyGrid(host) {
|
|
12257
|
+
this.host = host;
|
|
12258
|
+
this.addListeners();
|
|
12259
|
+
this.resetKeyGrid();
|
|
12260
|
+
}
|
|
12261
|
+
resetKeyGrid() {
|
|
12262
|
+
var _a;
|
|
12263
|
+
(_a = this.cells) === null || _a === void 0 ? void 0 : _a.forEach((i) => i.setAttribute('tabindex', '-1'));
|
|
12264
|
+
const firstCell = this.cells ? this.cells[0] : null;
|
|
12265
|
+
firstCell === null || firstCell === void 0 ? void 0 : firstCell.setAttribute('tabindex', '0');
|
|
12266
|
+
}
|
|
12267
|
+
removeActiveCell() {
|
|
12268
|
+
this._activeCell = null;
|
|
12269
|
+
}
|
|
12270
|
+
getActiveCell() {
|
|
12271
|
+
return this._activeCell;
|
|
12272
|
+
}
|
|
12273
|
+
setActiveCell(activeCell) {
|
|
12274
|
+
const prior = this.cells ? Array.from(this.cells).find(c => c.getAttribute('tabindex') === '0') : null;
|
|
12275
|
+
if (prior) {
|
|
12276
|
+
prior.setAttribute('tabindex', '-1');
|
|
12277
|
+
}
|
|
12278
|
+
activeCell.setAttribute('tabindex', '0');
|
|
12279
|
+
this._activeCell = activeCell;
|
|
12280
|
+
const items = getTabableItems(activeCell);
|
|
12281
|
+
const item = activeCell.getAttribute('role') !== 'columnheader' && items[0] ? items[0] : activeCell;
|
|
12282
|
+
if (!this.skipItemFocus) {
|
|
12283
|
+
item.focus();
|
|
12284
|
+
}
|
|
12285
|
+
}
|
|
12286
|
+
getNextItemCoordinate(e) {
|
|
12287
|
+
var _a;
|
|
12288
|
+
let currentCell = this.cells ? Array.from(this.cells).find(i => i.getAttribute('tabindex') === '0') : null;
|
|
12289
|
+
if (e.code === 'Tab') {
|
|
12290
|
+
currentCell = document.activeElement;
|
|
12291
|
+
}
|
|
12292
|
+
const currentRow = this.rows && currentCell ? Array.from(this.rows).find(r => r.contains(currentCell)) : null;
|
|
12293
|
+
const numOfRows = this.rows ? this.rows.length - 1 : 0;
|
|
12294
|
+
const numOfColumns = this.cells ? Math.floor(this.cells.length / this.rows.length - 1) : 0;
|
|
12295
|
+
let x = currentRow && currentCell
|
|
12296
|
+
? Array.from(currentRow.querySelectorAll(this.config.keyGridCells)).indexOf(currentCell)
|
|
12297
|
+
: 0;
|
|
12298
|
+
let y = currentRow && currentCell && this.rows ? Array.from(this.rows).indexOf(currentRow) : 0;
|
|
12299
|
+
const dir = this.host.dir;
|
|
12300
|
+
const inlineStart = dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
|
|
12301
|
+
const inlineEnd = dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
|
|
12302
|
+
const itemsPerPage = Math.floor(((_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector('.datagrid').clientHeight) / this.rows[0].clientHeight) - 1 || 0;
|
|
12303
|
+
if (e.code === 'ArrowUp' && y !== 0) {
|
|
12304
|
+
y = y - 1;
|
|
12305
|
+
}
|
|
12306
|
+
else if (e.code === 'ArrowDown' && y < numOfRows) {
|
|
12307
|
+
y = y + 1;
|
|
12308
|
+
}
|
|
12309
|
+
else if (e.code === inlineStart && x !== 0) {
|
|
12310
|
+
x = x - 1;
|
|
12311
|
+
}
|
|
12312
|
+
else if (e.code === inlineEnd && x < numOfColumns) {
|
|
12313
|
+
x = x + 1;
|
|
12314
|
+
}
|
|
12315
|
+
else if (e.code === 'End') {
|
|
12316
|
+
x = numOfColumns;
|
|
12317
|
+
if (e.ctrlKey) {
|
|
12318
|
+
y = numOfRows;
|
|
12319
|
+
}
|
|
12320
|
+
}
|
|
12321
|
+
else if (e.code === 'Home') {
|
|
12322
|
+
x = 0;
|
|
12323
|
+
if (e.ctrlKey) {
|
|
12324
|
+
y = 0;
|
|
12325
|
+
}
|
|
12326
|
+
}
|
|
12327
|
+
else if (e.code === 'PageUp') {
|
|
12328
|
+
y = y - itemsPerPage > 0 ? y - itemsPerPage + 1 : 1;
|
|
12329
|
+
}
|
|
12330
|
+
else if (e.code === 'PageDown') {
|
|
12331
|
+
y = y + itemsPerPage < numOfRows ? y + itemsPerPage : numOfRows;
|
|
12332
|
+
}
|
|
12333
|
+
return { x, y };
|
|
12334
|
+
}
|
|
12335
|
+
}
|
|
12336
|
+
KeyNavigationGridController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12337
|
+
KeyNavigationGridController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController });
|
|
12338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController, decorators: [{
|
|
12339
|
+
type: Injectable
|
|
12340
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
12341
|
+
|
|
12148
12342
|
/*
|
|
12149
12343
|
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
|
|
12150
12344
|
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
@@ -12157,12 +12351,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
12157
12351
|
* since it can be anything (not just a text input).
|
|
12158
12352
|
*/
|
|
12159
12353
|
class ClrDatagridFilter extends DatagridFilterRegistrar {
|
|
12160
|
-
constructor(_filters, commonStrings, smartToggleService, platformId, elementRef) {
|
|
12354
|
+
constructor(_filters, commonStrings, smartToggleService, platformId, elementRef, keyNavigation) {
|
|
12161
12355
|
super(_filters);
|
|
12162
12356
|
this.commonStrings = commonStrings;
|
|
12163
12357
|
this.smartToggleService = smartToggleService;
|
|
12164
12358
|
this.platformId = platformId;
|
|
12165
12359
|
this.elementRef = elementRef;
|
|
12360
|
+
this.keyNavigation = keyNavigation;
|
|
12166
12361
|
this.openChange = new EventEmitter(false);
|
|
12167
12362
|
this.ariaExpanded = false;
|
|
12168
12363
|
this.popoverId = uniqueIdFactory();
|
|
@@ -12191,6 +12386,9 @@ class ClrDatagridFilter extends DatagridFilterRegistrar {
|
|
|
12191
12386
|
if (!open && isPlatformBrowser(this.platformId)) {
|
|
12192
12387
|
this.anchor.nativeElement.focus();
|
|
12193
12388
|
}
|
|
12389
|
+
if (this.keyNavigation) {
|
|
12390
|
+
this.keyNavigation.skipItemFocus = open;
|
|
12391
|
+
}
|
|
12194
12392
|
// keep track of the state
|
|
12195
12393
|
this._open = open;
|
|
12196
12394
|
}
|
|
@@ -12225,7 +12423,7 @@ class ClrDatagridFilter extends DatagridFilterRegistrar {
|
|
|
12225
12423
|
});
|
|
12226
12424
|
}
|
|
12227
12425
|
}
|
|
12228
|
-
ClrDatagridFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridFilter, deps: [{ token: FiltersProvider }, { token: ClrCommonStringsService }, { token: ClrPopoverToggleService }, { token: PLATFORM_ID }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12426
|
+
ClrDatagridFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridFilter, deps: [{ token: FiltersProvider }, { token: ClrCommonStringsService }, { token: ClrPopoverToggleService }, { token: PLATFORM_ID }, { token: i0.ElementRef }, { token: KeyNavigationGridController, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
12229
12427
|
ClrDatagridFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridFilter, selector: "clr-dg-filter", inputs: { open: ["clrDgFilterOpen", "open"], customFilter: ["clrDgFilter", "customFilter"] }, outputs: { openChange: "clrDgFilterOpenChange" }, providers: [{ provide: CustomFilter, useExisting: ClrDatagridFilter }], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
12230
12428
|
<button
|
|
12231
12429
|
class="datagrid-filter-toggle"
|
|
@@ -12311,7 +12509,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
12311
12509
|
return [{ type: FiltersProvider }, { type: ClrCommonStringsService }, { type: ClrPopoverToggleService }, { type: undefined, decorators: [{
|
|
12312
12510
|
type: Inject,
|
|
12313
12511
|
args: [PLATFORM_ID]
|
|
12314
|
-
}] }, { type: i0.ElementRef }
|
|
12512
|
+
}] }, { type: i0.ElementRef }, { type: KeyNavigationGridController, decorators: [{
|
|
12513
|
+
type: Optional
|
|
12514
|
+
}] }];
|
|
12315
12515
|
}, propDecorators: { openChange: [{
|
|
12316
12516
|
type: Output,
|
|
12317
12517
|
args: ['clrDgFilterOpenChange']
|
|
@@ -13074,6 +13274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
13074
13274
|
class DetailService {
|
|
13075
13275
|
constructor(modalStackService) {
|
|
13076
13276
|
this.modalStackService = modalStackService;
|
|
13277
|
+
this.preventScroll = false;
|
|
13077
13278
|
this.toggleState = false;
|
|
13078
13279
|
this._enabled = false;
|
|
13079
13280
|
this._state = new BehaviorSubject(this.toggleState);
|
|
@@ -13084,6 +13285,12 @@ class DetailService {
|
|
|
13084
13285
|
set enabled(state) {
|
|
13085
13286
|
this._enabled = state;
|
|
13086
13287
|
}
|
|
13288
|
+
get preventFocusScroll() {
|
|
13289
|
+
return this.preventScroll;
|
|
13290
|
+
}
|
|
13291
|
+
set preventFocusScroll(preventScroll) {
|
|
13292
|
+
this.preventScroll = preventScroll;
|
|
13293
|
+
}
|
|
13087
13294
|
get state() {
|
|
13088
13295
|
return this.cache;
|
|
13089
13296
|
}
|
|
@@ -13110,7 +13317,7 @@ class DetailService {
|
|
|
13110
13317
|
}
|
|
13111
13318
|
returnFocus() {
|
|
13112
13319
|
if (this.button) {
|
|
13113
|
-
this.button.focus();
|
|
13320
|
+
this.button.focus({ preventScroll: this.preventFocusScroll });
|
|
13114
13321
|
this.button = null;
|
|
13115
13322
|
}
|
|
13116
13323
|
}
|
|
@@ -15436,7 +15643,7 @@ ClrDatagridRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
|
15436
15643
|
DatagridIfExpandService,
|
|
15437
15644
|
{ provide: IfExpandService, useExisting: DatagridIfExpandService },
|
|
15438
15645
|
{ provide: LoadingListener, useExisting: DatagridIfExpandService },
|
|
15439
|
-
], 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 <clr-checkbox-wrapper>\n <input\n type=\"checkbox\"\n clrCheckbox\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 </clr-checkbox-wrapper>\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 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 *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 (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\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: ["for"] }, { kind: "directive", type: ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { 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" }] });
|
|
15646
|
+
], 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 <clr-checkbox-wrapper>\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n clrCheckbox\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 </clr-checkbox-wrapper>\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 [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: ["for"] }, { kind: "directive", type: ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { 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" }] });
|
|
15440
15647
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridRow, decorators: [{
|
|
15441
15648
|
type: Component,
|
|
15442
15649
|
args: [{ selector: 'clr-dg-row', host: {
|
|
@@ -15448,7 +15655,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
15448
15655
|
DatagridIfExpandService,
|
|
15449
15656
|
{ provide: IfExpandService, useExisting: DatagridIfExpandService },
|
|
15450
15657
|
{ provide: LoadingListener, useExisting: DatagridIfExpandService },
|
|
15451
|
-
], 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 <clr-checkbox-wrapper>\n <input\n type=\"checkbox\"\n clrCheckbox\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 </clr-checkbox-wrapper>\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 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 *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 (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\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" }]
|
|
15658
|
+
], 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 <clr-checkbox-wrapper>\n <input\n tabindex=\"-1\"\n type=\"checkbox\"\n clrCheckbox\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 </clr-checkbox-wrapper>\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 [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" }]
|
|
15452
15659
|
}], ctorParameters: function () {
|
|
15453
15660
|
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: [{
|
|
15454
15661
|
type: Inject,
|
|
@@ -15508,10 +15715,11 @@ var DatagridColumnChanges;
|
|
|
15508
15715
|
(function (DatagridColumnChanges) {
|
|
15509
15716
|
DatagridColumnChanges[DatagridColumnChanges["WIDTH"] = 0] = "WIDTH";
|
|
15510
15717
|
DatagridColumnChanges[DatagridColumnChanges["HIDDEN"] = 1] = "HIDDEN";
|
|
15718
|
+
DatagridColumnChanges[DatagridColumnChanges["INITIALIZE"] = 2] = "INITIALIZE";
|
|
15511
15719
|
})(DatagridColumnChanges || (DatagridColumnChanges = {}));
|
|
15512
15720
|
const ALL_COLUMN_CHANGES = Object.keys(DatagridColumnChanges)
|
|
15513
15721
|
.map(key => DatagridColumnChanges[key])
|
|
15514
|
-
.filter(key => key === parseInt(key, 10)); // extracts only integer keys
|
|
15722
|
+
.filter(key => key === parseInt(key, 10) && key !== DatagridColumnChanges.INITIALIZE); // extracts only integer keys
|
|
15515
15723
|
|
|
15516
15724
|
/*
|
|
15517
15725
|
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
|
|
@@ -15522,6 +15730,7 @@ const ALL_COLUMN_CHANGES = Object.keys(DatagridColumnChanges)
|
|
|
15522
15730
|
class ColumnsService {
|
|
15523
15731
|
constructor() {
|
|
15524
15732
|
this.columns = [];
|
|
15733
|
+
this.columnsStateChange = new BehaviorSubject(null);
|
|
15525
15734
|
this._cache = [];
|
|
15526
15735
|
}
|
|
15527
15736
|
get columnStates() {
|
|
@@ -15543,7 +15752,9 @@ class ColumnsService {
|
|
|
15543
15752
|
resetToLastCache() {
|
|
15544
15753
|
this._cache.forEach((state, index) => {
|
|
15545
15754
|
// Just emit the exact value from the cache
|
|
15546
|
-
|
|
15755
|
+
const cachedState = Object.assign(Object.assign({}, state), { changes: ALL_COLUMN_CHANGES });
|
|
15756
|
+
this.columns[index].next(cachedState);
|
|
15757
|
+
this.columnsStateChange.next(cachedState);
|
|
15547
15758
|
});
|
|
15548
15759
|
this._cache = [];
|
|
15549
15760
|
}
|
|
@@ -15555,7 +15766,9 @@ class ColumnsService {
|
|
|
15555
15766
|
this.emitStateChange(this.columns[columnIndex], diff);
|
|
15556
15767
|
}
|
|
15557
15768
|
emitStateChange(column, diff) {
|
|
15558
|
-
|
|
15769
|
+
const changedState = Object.assign(Object.assign({}, column.value), diff);
|
|
15770
|
+
column.next(changedState);
|
|
15771
|
+
this.columnsStateChange.next(changedState);
|
|
15559
15772
|
}
|
|
15560
15773
|
}
|
|
15561
15774
|
ColumnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -15631,193 +15844,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
15631
15844
|
type: Injectable
|
|
15632
15845
|
}], ctorParameters: function () { return [{ type: FiltersProvider }, { type: Sort }, { type: Page }, { type: StateDebouncer }]; } });
|
|
15633
15846
|
|
|
15634
|
-
/*
|
|
15635
|
-
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
|
|
15636
|
-
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
15637
|
-
* This software is released under MIT license.
|
|
15638
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
15639
|
-
*/
|
|
15640
|
-
function getTabableItems(el) {
|
|
15641
|
-
const tabableSelector = [
|
|
15642
|
-
'a[href]',
|
|
15643
|
-
'area[href]',
|
|
15644
|
-
'input:not([disabled])',
|
|
15645
|
-
'button:not([disabled])',
|
|
15646
|
-
'select:not([disabled])',
|
|
15647
|
-
'textarea:not([disabled])',
|
|
15648
|
-
'iframe',
|
|
15649
|
-
'object',
|
|
15650
|
-
'embed',
|
|
15651
|
-
'*[tabindex]',
|
|
15652
|
-
'*[contenteditable=true]',
|
|
15653
|
-
'[role=button]:not([disabled])',
|
|
15654
|
-
].join(',');
|
|
15655
|
-
return Array.from(el.querySelectorAll(tabableSelector));
|
|
15656
|
-
}
|
|
15657
|
-
class KeyNavigationGridController {
|
|
15658
|
-
constructor(zone) {
|
|
15659
|
-
this.zone = zone;
|
|
15660
|
-
this.listenersAdded = false;
|
|
15661
|
-
this.destroy$ = new Subject();
|
|
15662
|
-
this._activeCell = null;
|
|
15663
|
-
this.config = {
|
|
15664
|
-
keyGridRows: '[role=row]:not(.datagrid-placeholder)',
|
|
15665
|
-
keyGridCells: '[role=gridcell]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), [role=columnheader]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), .datagrid-detail-caret',
|
|
15666
|
-
keyGrid: '[role=grid]',
|
|
15667
|
-
};
|
|
15668
|
-
}
|
|
15669
|
-
get grid() {
|
|
15670
|
-
var _a;
|
|
15671
|
-
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector(this.config.keyGrid);
|
|
15672
|
-
}
|
|
15673
|
-
get rows() {
|
|
15674
|
-
var _a;
|
|
15675
|
-
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.config.keyGridRows);
|
|
15676
|
-
}
|
|
15677
|
-
get cells() {
|
|
15678
|
-
var _a;
|
|
15679
|
-
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.config.keyGridCells);
|
|
15680
|
-
}
|
|
15681
|
-
ngOnDestroy() {
|
|
15682
|
-
this.destroy$.next();
|
|
15683
|
-
this.destroy$.complete();
|
|
15684
|
-
}
|
|
15685
|
-
addListeners() {
|
|
15686
|
-
if (this.listenersAdded) {
|
|
15687
|
-
return;
|
|
15688
|
-
}
|
|
15689
|
-
this.zone.runOutsideAngular(() => {
|
|
15690
|
-
fromEvent(this.grid, 'mousedown')
|
|
15691
|
-
.pipe(takeUntil(this.destroy$))
|
|
15692
|
-
.subscribe((e) => {
|
|
15693
|
-
// preserve right click for context menus & keyboard mouse control https://apple.stackexchange.com/questions/32715/how-do-i-open-the-context-menu-from-a-mac-keyboard
|
|
15694
|
-
if (e.buttons === 1 && !e.ctrlKey) {
|
|
15695
|
-
const activeCell = this.cells
|
|
15696
|
-
? Array.from(this.cells).find(c => c === e.target || c === e.target.closest(this.config.keyGridCells))
|
|
15697
|
-
: null;
|
|
15698
|
-
if (activeCell) {
|
|
15699
|
-
this.setActiveCell(activeCell);
|
|
15700
|
-
}
|
|
15701
|
-
}
|
|
15702
|
-
});
|
|
15703
|
-
fromEvent(this.grid, 'wheel')
|
|
15704
|
-
.pipe(takeUntil(this.destroy$))
|
|
15705
|
-
.subscribe(() => {
|
|
15706
|
-
this.removeActiveCell();
|
|
15707
|
-
});
|
|
15708
|
-
fromEvent(this.grid, 'keydown')
|
|
15709
|
-
.pipe(takeUntil(this.destroy$))
|
|
15710
|
-
.subscribe((e) => {
|
|
15711
|
-
// Skip column resize events
|
|
15712
|
-
if (e.target.classList.contains('drag-handle') &&
|
|
15713
|
-
(e.code === 'ArrowLeft' || e.code === 'ArrowRight')) {
|
|
15714
|
-
return;
|
|
15715
|
-
}
|
|
15716
|
-
if (e.code === 'ArrowUp' ||
|
|
15717
|
-
e.code === 'ArrowDown' ||
|
|
15718
|
-
e.code === 'ArrowLeft' ||
|
|
15719
|
-
e.code === 'ArrowRight' ||
|
|
15720
|
-
e.code === 'End' ||
|
|
15721
|
-
e.code === 'Home' ||
|
|
15722
|
-
e.code === 'PageUp' ||
|
|
15723
|
-
e.code === 'PageDown') {
|
|
15724
|
-
const { x, y } = this.getNextItemCoordinate(e);
|
|
15725
|
-
const activeItem = this.rows
|
|
15726
|
-
? Array.from(this.rows[y].querySelectorAll(this.config.keyGridCells))[x]
|
|
15727
|
-
: null;
|
|
15728
|
-
if (activeItem) {
|
|
15729
|
-
this.setActiveCell(activeItem);
|
|
15730
|
-
}
|
|
15731
|
-
e.preventDefault();
|
|
15732
|
-
}
|
|
15733
|
-
});
|
|
15734
|
-
});
|
|
15735
|
-
this.listenersAdded = true;
|
|
15736
|
-
}
|
|
15737
|
-
initializeKeyGrid(host) {
|
|
15738
|
-
this.host = host;
|
|
15739
|
-
this.addListeners();
|
|
15740
|
-
this.resetKeyGrid();
|
|
15741
|
-
}
|
|
15742
|
-
resetKeyGrid() {
|
|
15743
|
-
var _a;
|
|
15744
|
-
(_a = this.cells) === null || _a === void 0 ? void 0 : _a.forEach((i) => i.setAttribute('tabindex', '-1'));
|
|
15745
|
-
const firstCell = this.cells ? this.cells[0] : null;
|
|
15746
|
-
firstCell === null || firstCell === void 0 ? void 0 : firstCell.setAttribute('tabindex', '0');
|
|
15747
|
-
}
|
|
15748
|
-
removeActiveCell() {
|
|
15749
|
-
this._activeCell = null;
|
|
15750
|
-
}
|
|
15751
|
-
getActiveCell() {
|
|
15752
|
-
return this._activeCell;
|
|
15753
|
-
}
|
|
15754
|
-
setActiveCell(activeCell) {
|
|
15755
|
-
const prior = this.cells ? Array.from(this.cells).find(c => c.getAttribute('tabindex') === '0') : null;
|
|
15756
|
-
if (prior) {
|
|
15757
|
-
prior.setAttribute('tabindex', '-1');
|
|
15758
|
-
}
|
|
15759
|
-
activeCell.setAttribute('tabindex', '0');
|
|
15760
|
-
const items = getTabableItems(activeCell);
|
|
15761
|
-
const item = activeCell.getAttribute('role') !== 'columnheader' && items[0] ? items[0] : activeCell;
|
|
15762
|
-
item.focus();
|
|
15763
|
-
this._activeCell = item;
|
|
15764
|
-
}
|
|
15765
|
-
getNextItemCoordinate(e) {
|
|
15766
|
-
var _a;
|
|
15767
|
-
let currentCell = this.cells ? Array.from(this.cells).find(i => i.getAttribute('tabindex') === '0') : null;
|
|
15768
|
-
if (e.code === 'Tab') {
|
|
15769
|
-
currentCell = document.activeElement;
|
|
15770
|
-
}
|
|
15771
|
-
const currentRow = this.rows && currentCell ? Array.from(this.rows).find(r => r.contains(currentCell)) : null;
|
|
15772
|
-
const numOfRows = this.rows ? this.rows.length - 1 : 0;
|
|
15773
|
-
const numOfColumns = this.cells ? Math.floor(this.cells.length / this.rows.length - 1) : 0;
|
|
15774
|
-
let x = currentRow && currentCell
|
|
15775
|
-
? Array.from(currentRow.querySelectorAll(this.config.keyGridCells)).indexOf(currentCell)
|
|
15776
|
-
: 0;
|
|
15777
|
-
let y = currentRow && currentCell && this.rows ? Array.from(this.rows).indexOf(currentRow) : 0;
|
|
15778
|
-
const dir = this.host.dir;
|
|
15779
|
-
const inlineStart = dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
|
|
15780
|
-
const inlineEnd = dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
|
|
15781
|
-
const itemsPerPage = Math.floor(((_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector('.datagrid').clientHeight) / this.rows[0].clientHeight) - 1 || 0;
|
|
15782
|
-
if (e.code === 'ArrowUp' && y !== 0) {
|
|
15783
|
-
y = y - 1;
|
|
15784
|
-
}
|
|
15785
|
-
else if (e.code === 'ArrowDown' && y < numOfRows) {
|
|
15786
|
-
y = y + 1;
|
|
15787
|
-
}
|
|
15788
|
-
else if (e.code === inlineStart && x !== 0) {
|
|
15789
|
-
x = x - 1;
|
|
15790
|
-
}
|
|
15791
|
-
else if (e.code === inlineEnd && x < numOfColumns) {
|
|
15792
|
-
x = x + 1;
|
|
15793
|
-
}
|
|
15794
|
-
else if (e.code === 'End') {
|
|
15795
|
-
x = numOfColumns;
|
|
15796
|
-
if (e.ctrlKey) {
|
|
15797
|
-
y = numOfRows;
|
|
15798
|
-
}
|
|
15799
|
-
}
|
|
15800
|
-
else if (e.code === 'Home') {
|
|
15801
|
-
x = 0;
|
|
15802
|
-
if (e.ctrlKey) {
|
|
15803
|
-
y = 0;
|
|
15804
|
-
}
|
|
15805
|
-
}
|
|
15806
|
-
else if (e.code === 'PageUp') {
|
|
15807
|
-
y = y - itemsPerPage > 0 ? y - itemsPerPage + 1 : 1;
|
|
15808
|
-
}
|
|
15809
|
-
else if (e.code === 'PageDown') {
|
|
15810
|
-
y = y + itemsPerPage < numOfRows ? y + itemsPerPage : numOfRows;
|
|
15811
|
-
}
|
|
15812
|
-
return { x, y };
|
|
15813
|
-
}
|
|
15814
|
-
}
|
|
15815
|
-
KeyNavigationGridController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15816
|
-
KeyNavigationGridController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController });
|
|
15817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: KeyNavigationGridController, decorators: [{
|
|
15818
|
-
type: Injectable
|
|
15819
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
15820
|
-
|
|
15821
15847
|
/*
|
|
15822
15848
|
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
|
|
15823
15849
|
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
@@ -15851,7 +15877,6 @@ class DatagridCellRenderer {
|
|
|
15851
15877
|
}
|
|
15852
15878
|
}
|
|
15853
15879
|
resetState(state) {
|
|
15854
|
-
state.changes = ALL_COLUMN_CHANGES;
|
|
15855
15880
|
this.setWidth(state);
|
|
15856
15881
|
this.setHidden(state);
|
|
15857
15882
|
}
|
|
@@ -16086,17 +16111,24 @@ class ClrDatagrid {
|
|
|
16086
16111
|
*/
|
|
16087
16112
|
if (row) {
|
|
16088
16113
|
this.detailService.open(row.item, row.detailButton.nativeElement);
|
|
16114
|
+
// always keep open when virtual scroll is available otherwise close it
|
|
16089
16115
|
}
|
|
16090
|
-
else if (!this.hasVirtualScroller
|
|
16091
|
-
|
|
16116
|
+
else if (!this.hasVirtualScroller) {
|
|
16117
|
+
// Using setTimeout to make sure the inner cycles in rows are done
|
|
16118
|
+
setTimeout(() => {
|
|
16119
|
+
this.detailService.close();
|
|
16120
|
+
});
|
|
16092
16121
|
}
|
|
16093
16122
|
}
|
|
16094
|
-
// retain active cell when navigating with PageUp and PageDown buttons in virtual scroller
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
this.
|
|
16098
|
-
|
|
16099
|
-
|
|
16123
|
+
// retain active cell when navigating with Up/Down Arrows, PageUp and PageDown buttons in virtual scroller
|
|
16124
|
+
if (this.hasVirtualScroller) {
|
|
16125
|
+
const active = this.keyNavigation.getActiveCell();
|
|
16126
|
+
const isFocusInsideDatagrid = this.datagrid.nativeElement.contains(document.activeElement);
|
|
16127
|
+
if (active && isFocusInsideDatagrid) {
|
|
16128
|
+
this.zone.runOutsideAngular(() => {
|
|
16129
|
+
setTimeout(() => this.keyNavigation.setActiveCell(active));
|
|
16130
|
+
});
|
|
16131
|
+
}
|
|
16100
16132
|
}
|
|
16101
16133
|
}));
|
|
16102
16134
|
}
|
|
@@ -16178,6 +16210,13 @@ class ClrDatagrid {
|
|
|
16178
16210
|
ngOnDestroy() {
|
|
16179
16211
|
this._subscriptions.forEach((sub) => sub.unsubscribe());
|
|
16180
16212
|
}
|
|
16213
|
+
toggleAllSelected($event) {
|
|
16214
|
+
$event.preventDefault();
|
|
16215
|
+
if (this.hasVirtualScroller) {
|
|
16216
|
+
return;
|
|
16217
|
+
}
|
|
16218
|
+
this.allSelected = !this.allSelected;
|
|
16219
|
+
}
|
|
16181
16220
|
resize() {
|
|
16182
16221
|
this.organizer.resize();
|
|
16183
16222
|
}
|
|
@@ -16205,7 +16244,7 @@ ClrDatagrid.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
|
16205
16244
|
ColumnsService,
|
|
16206
16245
|
DisplayModeService,
|
|
16207
16246
|
KeyNavigationGridController,
|
|
16208
|
-
], 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-2024 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)=\"
|
|
16247
|
+
], 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-2024 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=\"!hasVirtualScroller\" 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: ["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: ["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" }] });
|
|
16209
16248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagrid, decorators: [{
|
|
16210
16249
|
type: Component,
|
|
16211
16250
|
args: [{ selector: 'clr-datagrid', providers: [
|
|
@@ -16227,7 +16266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16227
16266
|
], host: {
|
|
16228
16267
|
'[class.datagrid-host]': 'true',
|
|
16229
16268
|
'[class.datagrid-detail-open]': 'detailService.isOpen',
|
|
16230
|
-
}, template: "<!--\n ~ Copyright (c) 2016-2024 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)=\"
|
|
16269
|
+
}, template: "<!--\n ~ Copyright (c) 2016-2024 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=\"!hasVirtualScroller\" 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" }]
|
|
16231
16270
|
}], ctorParameters: function () {
|
|
16232
16271
|
return [{ type: DatagridRenderOrganizer }, { type: Items }, { type: ExpandableRowsCount }, { type: Selection }, { type: RowActionService }, { type: StateProvider }, { type: DisplayModeService }, { type: i0.Renderer2 }, { type: DetailService }, { type: undefined, decorators: [{
|
|
16233
16272
|
type: Inject,
|
|
@@ -16398,6 +16437,7 @@ class ClrDatagridActionOverflow {
|
|
|
16398
16437
|
ClrDatagridActionOverflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridActionOverflow, deps: [{ token: RowActionService }, { token: ClrCommonStringsService }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: ClrPopoverToggleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
16399
16438
|
ClrDatagridActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridActionOverflow, selector: "clr-dg-action-overflow", inputs: { buttonLabel: ["clrDgActionOverflowButtonLabel", "buttonLabel"], open: ["clrDgActionOverflowOpen", "open"] }, outputs: { openChange: "clrDgActionOverflowOpenChange" }, viewQueries: [{ propertyName: "keyFocus", first: true, predicate: ClrKeyFocus, descendants: true }], hostDirectives: [{ directive: ClrPopoverHostDirective }], ngImport: i0, template: `
|
|
16400
16439
|
<button
|
|
16440
|
+
tabindex="-1"
|
|
16401
16441
|
class="datagrid-action-toggle"
|
|
16402
16442
|
type="button"
|
|
16403
16443
|
role="button"
|
|
@@ -16432,6 +16472,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16432
16472
|
hostDirectives: [ClrPopoverHostDirective],
|
|
16433
16473
|
template: `
|
|
16434
16474
|
<button
|
|
16475
|
+
tabindex="-1"
|
|
16435
16476
|
class="datagrid-action-toggle"
|
|
16436
16477
|
type="button"
|
|
16437
16478
|
role="button"
|
|
@@ -16781,10 +16822,13 @@ class ClrDatagridDetailHeader {
|
|
|
16781
16822
|
get titleId() {
|
|
16782
16823
|
return `${this.detailService.id}-title`;
|
|
16783
16824
|
}
|
|
16825
|
+
ngAfterViewInit() {
|
|
16826
|
+
this.title.nativeElement.focus();
|
|
16827
|
+
}
|
|
16784
16828
|
}
|
|
16785
16829
|
ClrDatagridDetailHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridDetailHeader, deps: [{ token: DetailService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
16786
|
-
ClrDatagridDetailHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridDetailHeader, selector: "clr-dg-detail-header", host: { properties: { "class.datagrid-detail-header": "true" } }, ngImport: i0, template: `
|
|
16787
|
-
<div class="datagrid-detail-header-title"
|
|
16830
|
+
ClrDatagridDetailHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridDetailHeader, selector: "clr-dg-detail-header", host: { properties: { "class.datagrid-detail-header": "true" } }, viewQueries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }], ngImport: i0, template: `
|
|
16831
|
+
<div #title class="datagrid-detail-header-title" tabindex="-1" [id]="titleId">
|
|
16788
16832
|
<ng-content></ng-content>
|
|
16789
16833
|
</div>
|
|
16790
16834
|
<div class="datagrid-detail-pane-close">
|
|
@@ -16806,7 +16850,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16806
16850
|
'[class.datagrid-detail-header]': 'true',
|
|
16807
16851
|
},
|
|
16808
16852
|
template: `
|
|
16809
|
-
<div class="datagrid-detail-header-title"
|
|
16853
|
+
<div #title class="datagrid-detail-header-title" tabindex="-1" [id]="titleId">
|
|
16810
16854
|
<ng-content></ng-content>
|
|
16811
16855
|
</div>
|
|
16812
16856
|
<div class="datagrid-detail-pane-close">
|
|
@@ -16821,7 +16865,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16821
16865
|
</div>
|
|
16822
16866
|
`,
|
|
16823
16867
|
}]
|
|
16824
|
-
}], ctorParameters: function () { return [{ type: DetailService }, { type: ClrCommonStringsService }]; }
|
|
16868
|
+
}], ctorParameters: function () { return [{ type: DetailService }, { type: ClrCommonStringsService }]; }, propDecorators: { title: [{
|
|
16869
|
+
type: ViewChild,
|
|
16870
|
+
args: ['title']
|
|
16871
|
+
}] } });
|
|
16825
16872
|
|
|
16826
16873
|
/*
|
|
16827
16874
|
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
|
|
@@ -16842,7 +16889,7 @@ ClrDatagridDetail.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versio
|
|
|
16842
16889
|
ClrDatagridDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridDetail, selector: "clr-dg-detail", host: { properties: { "class.datagrid-detail-pane": "true" } }, queries: [{ propertyName: "header", first: true, predicate: ClrDatagridDetailHeader, descendants: true }], ngImport: i0, template: `
|
|
16843
16890
|
<div
|
|
16844
16891
|
cdkTrapFocus
|
|
16845
|
-
[cdkTrapFocusAutoCapture]="
|
|
16892
|
+
[cdkTrapFocusAutoCapture]="!header"
|
|
16846
16893
|
class="datagrid-detail-pane-content"
|
|
16847
16894
|
*ngIf="detailService.isOpen"
|
|
16848
16895
|
role="dialog"
|
|
@@ -16867,7 +16914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16867
16914
|
template: `
|
|
16868
16915
|
<div
|
|
16869
16916
|
cdkTrapFocus
|
|
16870
|
-
[cdkTrapFocusAutoCapture]="
|
|
16917
|
+
[cdkTrapFocusAutoCapture]="!header"
|
|
16871
16918
|
class="datagrid-detail-pane-content"
|
|
16872
16919
|
*ngIf="detailService.isOpen"
|
|
16873
16920
|
role="dialog"
|
|
@@ -17723,7 +17770,7 @@ const defaultCdkFixedSizeVirtualScrollInputs = {
|
|
|
17723
17770
|
maxBufferPx: 400,
|
|
17724
17771
|
};
|
|
17725
17772
|
class ClrDatagridVirtualScrollDirective {
|
|
17726
|
-
constructor(changeDetectorRef, iterableDiffers, items, ngZone, templateRef, viewContainerRef, directionality, scrollDispatcher, viewportRuler, datagrid, injector) {
|
|
17773
|
+
constructor(changeDetectorRef, iterableDiffers, items, ngZone, templateRef, viewContainerRef, directionality, scrollDispatcher, viewportRuler, datagrid, columnsService, injector) {
|
|
17727
17774
|
this.changeDetectorRef = changeDetectorRef;
|
|
17728
17775
|
this.iterableDiffers = iterableDiffers;
|
|
17729
17776
|
this.items = items;
|
|
@@ -17734,6 +17781,7 @@ class ClrDatagridVirtualScrollDirective {
|
|
|
17734
17781
|
this.scrollDispatcher = scrollDispatcher;
|
|
17735
17782
|
this.viewportRuler = viewportRuler;
|
|
17736
17783
|
this.datagrid = datagrid;
|
|
17784
|
+
this.columnsService = columnsService;
|
|
17737
17785
|
this.injector = injector;
|
|
17738
17786
|
this.renderedRangeChange = new EventEmitter();
|
|
17739
17787
|
this._cdkFixedSizeVirtualScrollInputs = Object.assign({}, defaultCdkFixedSizeVirtualScrollInputs);
|
|
@@ -17746,12 +17794,16 @@ class ClrDatagridVirtualScrollDirective {
|
|
|
17746
17794
|
}
|
|
17747
17795
|
});
|
|
17748
17796
|
});
|
|
17797
|
+
this.viewRepeater = new _RecycleViewRepeaterStrategy();
|
|
17749
17798
|
this.cdkVirtualForInputs = {
|
|
17750
17799
|
cdkVirtualForTrackBy: index => index,
|
|
17751
17800
|
};
|
|
17752
17801
|
this.items.smartenUp();
|
|
17753
17802
|
this.datagrid.hasVirtualScroller = true;
|
|
17803
|
+
this.datagrid.detailService.preventFocusScroll = true;
|
|
17754
17804
|
this.datagridElementRef = this.datagrid.el;
|
|
17805
|
+
// default
|
|
17806
|
+
this.cdkVirtualForTemplateCacheSize = 20;
|
|
17755
17807
|
this.mutationChanges.observe(this.datagridElementRef.nativeElement, {
|
|
17756
17808
|
attributeFilter: ['class'],
|
|
17757
17809
|
attributeOldValue: true,
|
|
@@ -17812,7 +17864,7 @@ class ClrDatagridVirtualScrollDirective {
|
|
|
17812
17864
|
ngAfterViewInit() {
|
|
17813
17865
|
this.injector.runInContext(() => {
|
|
17814
17866
|
this.virtualScrollViewport = this.createVirtualScrollViewportForDatagrid(this.changeDetectorRef, this.ngZone, this.directionality, this.scrollDispatcher, this.viewportRuler, this.datagridElementRef, this.virtualScrollStrategy);
|
|
17815
|
-
this.cdkVirtualFor = new CdkVirtualForOf(this.viewContainerRef, this.templateRef, this.iterableDiffers,
|
|
17867
|
+
this.cdkVirtualFor = new CdkVirtualForOf(this.viewContainerRef, this.templateRef, this.iterableDiffers, this.viewRepeater, this.virtualScrollViewport, this.ngZone);
|
|
17816
17868
|
this.virtualScrollViewport.ngOnInit();
|
|
17817
17869
|
});
|
|
17818
17870
|
this.gridRoleElement = this.datagridElementRef.nativeElement.querySelector('[role="grid"]');
|
|
@@ -17827,6 +17879,8 @@ class ClrDatagridVirtualScrollDirective {
|
|
|
17827
17879
|
if (datagridState.filters) {
|
|
17828
17880
|
this.virtualScrollViewport.scrollToIndex(0);
|
|
17829
17881
|
}
|
|
17882
|
+
}), this.columnsService.columnsStateChange.subscribe(() => {
|
|
17883
|
+
this.viewRepeater.detach();
|
|
17830
17884
|
}));
|
|
17831
17885
|
}
|
|
17832
17886
|
ngDoCheck() {
|
|
@@ -17902,7 +17956,7 @@ class ClrDatagridVirtualScrollDirective {
|
|
|
17902
17956
|
return virtualScrollViewport;
|
|
17903
17957
|
}
|
|
17904
17958
|
}
|
|
17905
|
-
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.TemplateRef }, { token: i0.ViewContainerRef }, { token: i2.Directionality }, { token: i3$1.ScrollDispatcher }, { token: i3$1.ViewportRuler }, { token: ClrDatagrid }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
17959
|
+
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.TemplateRef }, { token: i0.ViewContainerRef }, { token: i2.Directionality }, { token: i3$1.ScrollDispatcher }, { token: i3$1.ViewportRuler }, { token: ClrDatagrid }, { token: ColumnsService }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
17906
17960
|
ClrDatagridVirtualScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: ClrDatagridVirtualScrollDirective, selector: "[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 });
|
|
17907
17961
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridVirtualScrollDirective, decorators: [{
|
|
17908
17962
|
type: Directive,
|
|
@@ -17913,7 +17967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
17913
17967
|
}], ctorParameters: function () {
|
|
17914
17968
|
return [{ type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: Items, decorators: [{
|
|
17915
17969
|
type: SkipSelf
|
|
17916
|
-
}] }, { type: i0.NgZone }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i2.Directionality }, { type: i3$1.ScrollDispatcher }, { type: i3$1.ViewportRuler }, { type: ClrDatagrid }, { type: i0.EnvironmentInjector }];
|
|
17970
|
+
}] }, { type: i0.NgZone }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i2.Directionality }, { type: i3$1.ScrollDispatcher }, { type: i3$1.ViewportRuler }, { type: ClrDatagrid }, { type: ColumnsService }, { type: i0.EnvironmentInjector }];
|
|
17917
17971
|
}, propDecorators: { renderedRangeChange: [{
|
|
17918
17972
|
type: Output
|
|
17919
17973
|
}], cdkVirtualForOf: [{
|
|
@@ -18141,6 +18195,9 @@ class DatagridMainRenderer {
|
|
|
18141
18195
|
this.subscriptions.push(this.detailService.stateChange.subscribe(state => this.toggleDetailPane(state)));
|
|
18142
18196
|
this.subscriptions.push(this.items.change.subscribe(() => (this.shouldStabilizeColumns = true)));
|
|
18143
18197
|
}
|
|
18198
|
+
ngOnInit() {
|
|
18199
|
+
this.columnsService.columnsStateChange.subscribe(change => this.columnStateChanged(change));
|
|
18200
|
+
}
|
|
18144
18201
|
ngAfterContentInit() {
|
|
18145
18202
|
this.setupColumns();
|
|
18146
18203
|
this.subscriptions.push(this.headers.changes.subscribe(() => {
|
|
@@ -18150,7 +18207,6 @@ class DatagridMainRenderer {
|
|
|
18150
18207
|
this.columnsSizesStable = false;
|
|
18151
18208
|
this.stabilizeColumns();
|
|
18152
18209
|
}));
|
|
18153
|
-
this.listenForColumnChanges();
|
|
18154
18210
|
}
|
|
18155
18211
|
// Initialize and set Table width for horizontal scrolling here.
|
|
18156
18212
|
ngAfterViewInit() {
|
|
@@ -18192,7 +18248,10 @@ class DatagridMainRenderer {
|
|
|
18192
18248
|
setupColumns() {
|
|
18193
18249
|
this.headers.forEach((header, index) => header.setColumnState(index));
|
|
18194
18250
|
this.columnsService.columns.splice(this.headers.length); // Trim any old columns
|
|
18195
|
-
|
|
18251
|
+
// Sets columnIndex for each column
|
|
18252
|
+
this.columnsService.columns.forEach((column, index) => {
|
|
18253
|
+
this.columnsService.emitStateChange(column, { changes: [DatagridColumnChanges.INITIALIZE], columnIndex: index });
|
|
18254
|
+
});
|
|
18196
18255
|
}
|
|
18197
18256
|
shouldComputeHeight() {
|
|
18198
18257
|
if (!this._heightSet && this.page.size > 0) {
|
|
@@ -18246,6 +18305,10 @@ class DatagridMainRenderer {
|
|
|
18246
18305
|
});
|
|
18247
18306
|
}
|
|
18248
18307
|
columnStateChanged(state) {
|
|
18308
|
+
// eslint-disable-next-line eqeqeq
|
|
18309
|
+
if (!this.headers || state.columnIndex == null) {
|
|
18310
|
+
return;
|
|
18311
|
+
}
|
|
18249
18312
|
const columnIndex = state.columnIndex;
|
|
18250
18313
|
if (state.changes && state.changes.length) {
|
|
18251
18314
|
state.changes.forEach(change => {
|
|
@@ -18253,7 +18316,7 @@ class DatagridMainRenderer {
|
|
|
18253
18316
|
case DatagridColumnChanges.WIDTH:
|
|
18254
18317
|
this.headers.get(columnIndex).setWidth(state);
|
|
18255
18318
|
this.rows.forEach(row => {
|
|
18256
|
-
if (row
|
|
18319
|
+
if ((row === null || row === void 0 ? void 0 : row.cells.length) === this.columnsService.columns.length) {
|
|
18257
18320
|
row.cells.get(columnIndex).setWidth(state);
|
|
18258
18321
|
}
|
|
18259
18322
|
});
|
|
@@ -18267,23 +18330,20 @@ class DatagridMainRenderer {
|
|
|
18267
18330
|
});
|
|
18268
18331
|
this.keyNavigation.resetKeyGrid();
|
|
18269
18332
|
break;
|
|
18333
|
+
case DatagridColumnChanges.INITIALIZE:
|
|
18334
|
+
if (state.hideable && state.hidden) {
|
|
18335
|
+
this.headers.get(columnIndex).setHidden(state);
|
|
18336
|
+
this.rows.forEach(row => {
|
|
18337
|
+
row.setCellsState();
|
|
18338
|
+
});
|
|
18339
|
+
}
|
|
18340
|
+
break;
|
|
18270
18341
|
default:
|
|
18271
18342
|
break;
|
|
18272
18343
|
}
|
|
18273
18344
|
});
|
|
18274
18345
|
}
|
|
18275
18346
|
}
|
|
18276
|
-
listenForColumnChanges() {
|
|
18277
|
-
this.columnsService.columns.forEach((column, index) => {
|
|
18278
|
-
this.columnsService.emitStateChange(column, { changes: [], columnIndex: index });
|
|
18279
|
-
});
|
|
18280
|
-
/*
|
|
18281
|
-
Merges all column subject so we can track them at once
|
|
18282
|
-
and receive only the changed column as result
|
|
18283
|
-
*/
|
|
18284
|
-
const columnChanges = merge(...this.columnsService.columns);
|
|
18285
|
-
this.subscriptions.push(columnChanges.subscribe(change => this.columnStateChanged(change)));
|
|
18286
|
-
}
|
|
18287
18347
|
/**
|
|
18288
18348
|
* Triggers a whole re-rendring cycle to set column sizes, if needed.
|
|
18289
18349
|
*/
|
|
@@ -18778,7 +18838,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
18778
18838
|
}] } });
|
|
18779
18839
|
function eventIsInputEvent(event) {
|
|
18780
18840
|
const targetElement = event === null || event === void 0 ? void 0 : event.target;
|
|
18781
|
-
return (targetElement === null || targetElement === void 0 ? void 0 : targetElement.tagName)
|
|
18841
|
+
return (targetElement === null || targetElement === void 0 ? void 0 : targetElement.tagName)
|
|
18842
|
+
? ['INPUT', 'TEXTAREA', 'BUTTON', 'A', 'SELECT', 'OPTION'].includes(targetElement.tagName)
|
|
18843
|
+
: false;
|
|
18782
18844
|
}
|
|
18783
18845
|
|
|
18784
18846
|
/*
|
|
@@ -23510,6 +23572,13 @@ class ClrModal {
|
|
|
23510
23572
|
this._openChanged.emit(true);
|
|
23511
23573
|
this.modalStackService.trackModalOpen(this);
|
|
23512
23574
|
}
|
|
23575
|
+
backdropClick() {
|
|
23576
|
+
if (this.staticBackdrop) {
|
|
23577
|
+
this.title.nativeElement.focus();
|
|
23578
|
+
return;
|
|
23579
|
+
}
|
|
23580
|
+
this.close();
|
|
23581
|
+
}
|
|
23513
23582
|
close() {
|
|
23514
23583
|
if (this.stopClose) {
|
|
23515
23584
|
this.altClose.emit(false);
|
|
@@ -23529,7 +23598,7 @@ class ClrModal {
|
|
|
23529
23598
|
}
|
|
23530
23599
|
}
|
|
23531
23600
|
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 });
|
|
23532
|
-
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" } }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2024 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 <div class=\"modal-title-wrapper\" 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 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\n <div [@fade] *ngIf=\"backdrop\" class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"
|
|
23601
|
+
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 }], usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2024 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 <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 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\n <div [@fade] *ngIf=\"backdrop\" class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"backdropClick()\"></div>\n</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: [
|
|
23533
23602
|
trigger('fadeMove', [
|
|
23534
23603
|
transition('* => fadeDown', [
|
|
23535
23604
|
style({ opacity: 0, transform: 'translate(0, -25%)' }),
|
|
@@ -23564,8 +23633,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
23564
23633
|
transition('void => *', [style({ opacity: 0 }), animate('0.2s ease-in-out', style({ opacity: 0.85 }))]),
|
|
23565
23634
|
transition('* => void', [animate('0.2s ease-in-out', style({ opacity: 0 }))]),
|
|
23566
23635
|
]),
|
|
23567
|
-
], template: "<!--\n ~ Copyright (c) 2016-2024 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 <div class=\"modal-title-wrapper\" 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 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\n <div [@fade] *ngIf=\"backdrop\" class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"
|
|
23568
|
-
}], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }, { type: ModalStackService }, { type: ClrModalConfigurationService }]; }, propDecorators: {
|
|
23636
|
+
], template: "<!--\n ~ Copyright (c) 2016-2024 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 <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 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\n <div [@fade] *ngIf=\"backdrop\" class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"backdropClick()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"] }]
|
|
23637
|
+
}], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }, { type: ModalStackService }, { type: ClrModalConfigurationService }]; }, propDecorators: { title: [{
|
|
23638
|
+
type: ViewChild,
|
|
23639
|
+
args: ['title']
|
|
23640
|
+
}], _open: [{
|
|
23569
23641
|
type: Input,
|
|
23570
23642
|
args: ['clrModalOpen']
|
|
23571
23643
|
}, {
|
|
@@ -24635,13 +24707,13 @@ class ClrTimeline {
|
|
|
24635
24707
|
}
|
|
24636
24708
|
}
|
|
24637
24709
|
ClrTimeline.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrTimeline, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24638
|
-
ClrTimeline.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrTimeline, selector: "clr-timeline", inputs: { layout: ["clrLayout", "layout"] }, host: { properties: { "class.clr-timeline": "true", "class.clr-timeline-vertical": "this.isVertical" } }, providers: [TimelineIconAttributeService], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
|
24710
|
+
ClrTimeline.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrTimeline, selector: "clr-timeline", inputs: { layout: ["clrLayout", "layout"] }, host: { properties: { "class.clr-timeline": "true", "attr.role": "\"list\"", "class.clr-timeline-vertical": "this.isVertical" } }, providers: [TimelineIconAttributeService], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
|
24639
24711
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrTimeline, decorators: [{
|
|
24640
24712
|
type: Component,
|
|
24641
24713
|
args: [{
|
|
24642
24714
|
selector: 'clr-timeline',
|
|
24643
24715
|
template: `<ng-content></ng-content>`,
|
|
24644
|
-
host: { '[class.clr-timeline]': 'true' },
|
|
24716
|
+
host: { '[class.clr-timeline]': 'true', '[attr.role]': '"list"' },
|
|
24645
24717
|
providers: [TimelineIconAttributeService],
|
|
24646
24718
|
}]
|
|
24647
24719
|
}], propDecorators: { layout: [{
|
|
@@ -24712,7 +24784,7 @@ class ClrTimelineStep {
|
|
|
24712
24784
|
}
|
|
24713
24785
|
}
|
|
24714
24786
|
ClrTimelineStep.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrTimelineStep, deps: [{ token: TimelineIconAttributeService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
24715
|
-
ClrTimelineStep.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrTimelineStep, selector: "clr-timeline-step", inputs: { state: ["clrState", "state"] }, host: { properties: { "class.clr-timeline-step": "true" } }, queries: [{ propertyName: "stepTitle", first: true, predicate: ClrTimelineStepTitle, descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
24787
|
+
ClrTimelineStep.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrTimelineStep, selector: "clr-timeline-step", inputs: { state: ["clrState", "state"] }, host: { properties: { "class.clr-timeline-step": "true", "attr.role": "\"listitem\"" } }, queries: [{ propertyName: "stepTitle", first: true, predicate: ClrTimelineStepTitle, descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
24716
24788
|
<ng-content select="clr-timeline-step-header"></ng-content>
|
|
24717
24789
|
<span class="clr-sr-only">{{ stepTitleText }}</span>
|
|
24718
24790
|
<ng-container *ngIf="!isProcessing; else processing">
|
|
@@ -24756,7 +24828,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
24756
24828
|
<clr-spinner clrMedium [attr.aria-label]="iconAriaLabel"></clr-spinner>
|
|
24757
24829
|
</ng-template>
|
|
24758
24830
|
`,
|
|
24759
|
-
host: { '[class.clr-timeline-step]': 'true' },
|
|
24831
|
+
host: { '[class.clr-timeline-step]': 'true', '[attr.role]': '"listitem"' },
|
|
24760
24832
|
}]
|
|
24761
24833
|
}], ctorParameters: function () {
|
|
24762
24834
|
return [{ type: TimelineIconAttributeService }, { type: undefined, decorators: [{
|