@skyux/grids 5.0.0 → 5.0.1

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, TemplateRef, Component, ChangeDetectionStrategy, Input, ContentChildren, Injectable, ViewContainerRef, ViewChild, Output, ViewChildren, HostListener, NgModule } from '@angular/core';
2
+ import { Injectable, EventEmitter, TemplateRef, Component, ChangeDetectionStrategy, Input, ContentChildren, ViewContainerRef, ViewChild, Output, ViewChildren, HostListener, NgModule } from '@angular/core';
3
3
  import * as i8 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i10 from '@angular/forms';
@@ -16,43 +16,93 @@ import * as i7 from '@skyux/layout';
16
16
  import { SkyInlineDeleteModule } from '@skyux/layout';
17
17
  import * as i9 from '@skyux/popovers';
18
18
  import { SkyPopoverModule } from '@skyux/popovers';
19
+ import { getData, ListItemModel } from '@skyux/list-builder-common';
19
20
  import { Subject, BehaviorSubject, fromEvent, merge } from 'rxjs';
20
21
  import { takeUntil, take, map, distinctUntilChanged, takeWhile } from 'rxjs/operators';
21
- import { getData, ListItemModel } from '@skyux/list-builder-common';
22
22
  import * as i11 from '@skyux/i18n';
23
23
  import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
24
24
 
25
- var SkyGridMessageType;
26
- (function (SkyGridMessageType) {
27
- /**
28
- * Selects the multiselect checkboxes for all rows in the grid.
29
- */
30
- SkyGridMessageType[SkyGridMessageType["SelectAll"] = 0] = "SelectAll";
31
- /**
32
- * Clears the multiselect checkboxes for all rows in the grid.
33
- */
34
- SkyGridMessageType[SkyGridMessageType["ClearAll"] = 1] = "ClearAll";
35
- /**
36
- * @internal
37
- */
38
- SkyGridMessageType[SkyGridMessageType["PromptDeleteRow"] = 2] = "PromptDeleteRow";
39
- /**
40
- * @internal
41
- */
42
- SkyGridMessageType[SkyGridMessageType["AbortDeleteRow"] = 3] = "AbortDeleteRow";
43
- })(SkyGridMessageType || (SkyGridMessageType = {}));
44
-
25
+ const GRID_HEADER_DRAGGING_CLASS = 'sky-grid-header-dragging';
26
+ const GRID_HEADER_LOCKED_SELECTOR = '.sky-grid-header-locked';
27
+ const GRID_HEADER_RESIZE_HANDLE = '.sky-grid-resize-handle';
28
+ const GRID_ROW_DELETE_SELECTOR = '.sky-grid-row-delete-heading';
29
+ const GRID_MULTISELECT_SELECTOR = '.sky-grid-multiselect-cell';
45
30
  /**
46
31
  * @internal
47
32
  */
48
- var SkyGridSelectedRowsSource;
49
- (function (SkyGridSelectedRowsSource) {
50
- SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["CheckboxChange"] = 0] = "CheckboxChange";
51
- SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["ClearAll"] = 1] = "ClearAll";
52
- SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["RowClick"] = 2] = "RowClick";
53
- SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectAll"] = 3] = "SelectAll";
54
- SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectedRowIdsChange"] = 4] = "SelectedRowIdsChange";
55
- })(SkyGridSelectedRowsSource || (SkyGridSelectedRowsSource = {}));
33
+ class SkyGridAdapterService {
34
+ constructor(rendererFactory) {
35
+ this.rendererFactory = rendererFactory;
36
+ this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
37
+ }
38
+ initializeDragAndDrop(dragulaService, dropCallback) {
39
+ dragulaService.drag.subscribe(([, source]) => source.classList.add(GRID_HEADER_DRAGGING_CLASS));
40
+ dragulaService.dragend.subscribe(([, source]) => source.classList.remove(GRID_HEADER_DRAGGING_CLASS));
41
+ dragulaService.drop.subscribe(([, , container]) => {
42
+ let columnIds = [];
43
+ let nodes = container.querySelectorAll(`th:not(${GRID_MULTISELECT_SELECTOR}):not(${GRID_ROW_DELETE_SELECTOR})`);
44
+ for (let i = 0; i < nodes.length; i++) {
45
+ let el = nodes[i];
46
+ let id = el.getAttribute('sky-cmp-id');
47
+ columnIds.push(id);
48
+ }
49
+ dropCallback(columnIds);
50
+ });
51
+ dragulaService.setOptions('sky-grid-heading', {
52
+ moves: (el, container, handle) => {
53
+ const columns = container.querySelectorAll('th div');
54
+ const isLeftOfLocked = this.isLeftOfLocked(handle, columns);
55
+ return (!el.querySelector(GRID_HEADER_LOCKED_SELECTOR) &&
56
+ handle !== undefined &&
57
+ !handle.matches(GRID_HEADER_RESIZE_HANDLE) &&
58
+ !handle.matches(GRID_MULTISELECT_SELECTOR) &&
59
+ !handle.matches(GRID_ROW_DELETE_SELECTOR) &&
60
+ !isLeftOfLocked);
61
+ },
62
+ accepts: (el, target, source, sibling) => {
63
+ if (sibling === undefined || !sibling) {
64
+ return true;
65
+ }
66
+ const columns = source.querySelectorAll('th div');
67
+ const siblingDiv = sibling.querySelector('div');
68
+ const isLeftOfLocked = this.isLeftOfLocked(siblingDiv, columns);
69
+ return (!sibling.matches(GRID_HEADER_LOCKED_SELECTOR) &&
70
+ !sibling.matches(GRID_HEADER_RESIZE_HANDLE) &&
71
+ !isLeftOfLocked);
72
+ },
73
+ });
74
+ }
75
+ getRowHeight(el, index) {
76
+ return (el.nativeElement.querySelectorAll('tbody tr')[index].scrollHeight + 'px');
77
+ }
78
+ setStyle(el, style, value) {
79
+ if (el) {
80
+ this.renderer.setStyle(el.nativeElement, style, value);
81
+ }
82
+ }
83
+ isLeftOfLocked(handle, columns) {
84
+ let sourceColumn = handle;
85
+ for (let column of Array.from(columns)) {
86
+ if (column.contains(handle)) {
87
+ sourceColumn = column;
88
+ }
89
+ }
90
+ for (let i = columns.length - 1; i >= 0; i--) {
91
+ if (columns[i].classList.contains('sky-grid-header-locked')) {
92
+ return true;
93
+ }
94
+ if (columns[i] === sourceColumn) {
95
+ break;
96
+ }
97
+ }
98
+ return false;
99
+ }
100
+ }
101
+ SkyGridAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
102
+ SkyGridAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridAdapterService });
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridAdapterService, decorators: [{
104
+ type: Injectable
105
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
56
106
 
57
107
  /**
58
108
  * Specifies the column information.
@@ -74,7 +124,7 @@ class SkyGridColumnComponent {
74
124
  * the column executes a string compare on the column data.
75
125
  * @default (value, searchText) => value.toString().toLowerCase().indexOf(searchText) !== -1
76
126
  */
77
- /* tslint:disable-next-line:no-input-rename */
127
+ // eslint-disable-next-line @angular-eslint/no-input-rename
78
128
  this.searchFunction = this.search;
79
129
  this.descriptionChanges = new EventEmitter();
80
130
  this.descriptionModelChanges = new EventEmitter();
@@ -88,7 +138,7 @@ class SkyGridColumnComponent {
88
138
  this.headingModelChanges.emit({
89
139
  value: this.heading,
90
140
  id: this.id,
91
- field: this.field
141
+ field: this.field,
92
142
  });
93
143
  }
94
144
  if (changes.description && changes.description.firstChange === false) {
@@ -96,14 +146,15 @@ class SkyGridColumnComponent {
96
146
  this.descriptionModelChanges.emit({
97
147
  value: this.description,
98
148
  id: this.id,
99
- field: this.field
149
+ field: this.field,
100
150
  });
101
151
  }
102
- if (changes.inlineHelpPopover && changes.inlineHelpPopover.firstChange === false) {
152
+ if (changes.inlineHelpPopover &&
153
+ changes.inlineHelpPopover.firstChange === false) {
103
154
  this.inlineHelpPopoverModelChanges.emit({
104
155
  value: this.inlineHelpPopover,
105
156
  id: this.id,
106
- field: this.field
157
+ field: this.field,
107
158
  });
108
159
  }
109
160
  }
@@ -122,14 +173,14 @@ class SkyGridColumnComponent {
122
173
  return false;
123
174
  }
124
175
  }
125
- SkyGridColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
126
- SkyGridColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkyGridColumnComponent, selector: "sky-grid-column", inputs: { alignment: "alignment", description: "description", excludeFromHighlighting: "excludeFromHighlighting", field: "field", heading: "heading", hidden: "hidden", id: "id", inlineHelpPopover: "inlineHelpPopover", isSortable: "isSortable", locked: "locked", searchFunction: ["search", "searchFunction"], type: "type", templateInput: ["template", "templateInput"], width: "width" }, queries: [{ propertyName: "templates", predicate: TemplateRef }], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridColumnComponent, decorators: [{
176
+ SkyGridColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
177
+ SkyGridColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyGridColumnComponent, selector: "sky-grid-column", inputs: { alignment: "alignment", description: "description", excludeFromHighlighting: "excludeFromHighlighting", field: "field", heading: "heading", hidden: "hidden", id: "id", inlineHelpPopover: "inlineHelpPopover", isSortable: "isSortable", locked: "locked", searchFunction: ["search", "searchFunction"], type: "type", templateInput: ["template", "templateInput"], width: "width" }, queries: [{ propertyName: "templates", predicate: TemplateRef }], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridColumnComponent, decorators: [{
128
179
  type: Component,
129
180
  args: [{
130
181
  selector: 'sky-grid-column',
131
182
  template: '<ng-content></ng-content>',
132
- changeDetection: ChangeDetectionStrategy.OnPush
183
+ changeDetection: ChangeDetectionStrategy.OnPush,
133
184
  }]
134
185
  }], propDecorators: { alignment: [{
135
186
  type: Input
@@ -191,87 +242,37 @@ class SkyGridColumnModel {
191
242
  }
192
243
  }
193
244
 
194
- const GRID_HEADER_DRAGGING_CLASS = 'sky-grid-header-dragging';
195
- const GRID_HEADER_LOCKED_SELECTOR = '.sky-grid-header-locked';
196
- const GRID_HEADER_RESIZE_HANDLE = '.sky-grid-resize-handle';
197
- const GRID_ROW_DELETE_SELECTOR = '.sky-grid-row-delete-heading';
198
- const GRID_MULTISELECT_SELECTOR = '.sky-grid-multiselect-cell';
245
+ var SkyGridMessageType;
246
+ (function (SkyGridMessageType) {
247
+ /**
248
+ * Selects the multiselect checkboxes for all rows in the grid.
249
+ */
250
+ SkyGridMessageType[SkyGridMessageType["SelectAll"] = 0] = "SelectAll";
251
+ /**
252
+ * Clears the multiselect checkboxes for all rows in the grid.
253
+ */
254
+ SkyGridMessageType[SkyGridMessageType["ClearAll"] = 1] = "ClearAll";
255
+ /**
256
+ * @internal
257
+ */
258
+ SkyGridMessageType[SkyGridMessageType["PromptDeleteRow"] = 2] = "PromptDeleteRow";
259
+ /**
260
+ * @internal
261
+ */
262
+ SkyGridMessageType[SkyGridMessageType["AbortDeleteRow"] = 3] = "AbortDeleteRow";
263
+ })(SkyGridMessageType || (SkyGridMessageType = {}));
264
+
199
265
  /**
200
266
  * @internal
201
267
  */
202
- class SkyGridAdapterService {
203
- constructor(rendererFactory) {
204
- this.rendererFactory = rendererFactory;
205
- this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
206
- }
207
- initializeDragAndDrop(dragulaService, dropCallback) {
208
- dragulaService.drag.subscribe(([, source]) => source.classList.add(GRID_HEADER_DRAGGING_CLASS));
209
- dragulaService.dragend.subscribe(([, source]) => source.classList.remove(GRID_HEADER_DRAGGING_CLASS));
210
- dragulaService.drop.subscribe(([, , container]) => {
211
- let columnIds = [];
212
- let nodes = container.querySelectorAll(`th:not(${GRID_MULTISELECT_SELECTOR}):not(${GRID_ROW_DELETE_SELECTOR})`);
213
- for (let i = 0; i < nodes.length; i++) {
214
- let el = nodes[i];
215
- let id = el.getAttribute('sky-cmp-id');
216
- columnIds.push(id);
217
- }
218
- dropCallback(columnIds);
219
- });
220
- dragulaService.setOptions('sky-grid-heading', {
221
- moves: (el, container, handle) => {
222
- const columns = container.querySelectorAll('th div');
223
- const isLeftOfLocked = this.isLeftOfLocked(handle, columns);
224
- return !el.querySelector(GRID_HEADER_LOCKED_SELECTOR)
225
- && handle !== undefined
226
- && !handle.matches(GRID_HEADER_RESIZE_HANDLE)
227
- && !handle.matches(GRID_MULTISELECT_SELECTOR)
228
- && !handle.matches(GRID_ROW_DELETE_SELECTOR)
229
- && !isLeftOfLocked;
230
- },
231
- accepts: (el, target, source, sibling) => {
232
- if (sibling === undefined || !sibling) {
233
- return true;
234
- }
235
- const columns = source.querySelectorAll('th div');
236
- const siblingDiv = sibling.querySelector('div');
237
- const isLeftOfLocked = this.isLeftOfLocked(siblingDiv, columns);
238
- return ((!sibling.matches(GRID_HEADER_LOCKED_SELECTOR)
239
- && !sibling.matches(GRID_HEADER_RESIZE_HANDLE)))
240
- && !isLeftOfLocked;
241
- }
242
- });
243
- }
244
- getRowHeight(el, index) {
245
- return el.nativeElement.querySelectorAll('tbody tr')[index].scrollHeight + 'px';
246
- }
247
- setStyle(el, style, value) {
248
- if (el) {
249
- this.renderer.setStyle(el.nativeElement, style, value);
250
- }
251
- }
252
- isLeftOfLocked(handle, columns) {
253
- let sourceColumn = handle;
254
- for (let column of Array.from(columns)) {
255
- if (column.contains(handle)) {
256
- sourceColumn = column;
257
- }
258
- }
259
- for (let i = (columns.length - 1); i >= 0; i--) {
260
- if (columns[i].classList.contains('sky-grid-header-locked')) {
261
- return true;
262
- }
263
- if (columns[i] === sourceColumn) {
264
- break;
265
- }
266
- }
267
- return false;
268
- }
269
- }
270
- SkyGridAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
271
- SkyGridAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridAdapterService });
272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridAdapterService, decorators: [{
273
- type: Injectable
274
- }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
268
+ var SkyGridSelectedRowsSource;
269
+ (function (SkyGridSelectedRowsSource) {
270
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["CheckboxChange"] = 0] = "CheckboxChange";
271
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["ClearAll"] = 1] = "ClearAll";
272
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["RowClick"] = 2] = "RowClick";
273
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectAll"] = 3] = "SelectAll";
274
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectedRowIdsChange"] = 4] = "SelectedRowIdsChange";
275
+ })(SkyGridSelectedRowsSource || (SkyGridSelectedRowsSource = {}));
275
276
 
276
277
  /**
277
278
  * @internal
@@ -290,15 +291,15 @@ class SkyGridCellComponent {
290
291
  return undefined;
291
292
  }
292
293
  }
293
- SkyGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
294
- SkyGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkyGridCellComponent, selector: "sky-grid-cell", inputs: { item: "item", columnId: "columnId", template: "template", fieldSelector: "fieldSelector" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["cell"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<ng-template #cell></ng-template>', isInline: true, styles: [":host{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px;min-height:35px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridCellComponent, decorators: [{
294
+ SkyGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
295
+ SkyGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyGridCellComponent, selector: "sky-grid-cell", inputs: { item: "item", columnId: "columnId", template: "template", fieldSelector: "fieldSelector" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["cell"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<ng-template #cell></ng-template>', isInline: true, styles: [":host{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px;min-height:35px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridCellComponent, decorators: [{
296
297
  type: Component,
297
298
  args: [{
298
299
  selector: 'sky-grid-cell',
299
300
  template: '<ng-template #cell></ng-template>',
300
301
  styleUrls: ['./grid-cell.component.scss'],
301
- changeDetection: ChangeDetectionStrategy.OnPush
302
+ changeDetection: ChangeDetectionStrategy.OnPush,
302
303
  }]
303
304
  }], propDecorators: { item: [{
304
305
  type: Input
@@ -312,7 +313,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
312
313
  type: ViewChild,
313
314
  args: ['cell', {
314
315
  read: ViewContainerRef,
315
- static: true
316
+ static: true,
316
317
  }]
317
318
  }] } });
318
319
 
@@ -395,7 +396,7 @@ class SkyGridComponent {
395
396
  this.items = new Array();
396
397
  this.currentSortField = new BehaviorSubject({
397
398
  fieldSelector: '',
398
- descending: false
399
+ descending: false,
399
400
  });
400
401
  }
401
402
  /**
@@ -409,14 +410,12 @@ class SkyGridComponent {
409
410
  this.setDisplayedColumns();
410
411
  }
411
412
  // Ensure that the ids have changed.
412
- if (!currentIds ||
413
- !value ||
414
- !this.arraysEqual(value, currentIds)) {
413
+ if (!currentIds || !value || !this.arraysEqual(value, currentIds)) {
415
414
  // This variable ensures that we do not set user config options or fire the change event
416
415
  // on the first time that the columns are set up
417
416
  if (this.selectedColumnIdsSet) {
418
417
  this.setUserConfig({
419
- selectedColumnIds: value
418
+ selectedColumnIds: value,
420
419
  });
421
420
  this.selectedColumnIdsChange.emit(this._selectedColumnIds);
422
421
  if (this.isResized) {
@@ -475,7 +474,9 @@ class SkyGridComponent {
475
474
  ngOnChanges(changes) {
476
475
  if (changes.columns && this.columns) {
477
476
  if (this.selectedColumnIds) {
478
- this.selectedColumnIds = this.selectedColumnIds.filter(columnId => this.columns.find(column => column.id === columnId));
477
+ this.selectedColumnIds = this.selectedColumnIds.filter((columnId) => {
478
+ return this.columns.find((column) => column.id === columnId);
479
+ });
479
480
  }
480
481
  this.setDisplayedColumns(true);
481
482
  }
@@ -484,8 +485,8 @@ class SkyGridComponent {
484
485
  // This set timeout is necessary to ensure the data has rendered in the grid
485
486
  setTimeout(() => {
486
487
  // This cleans up any lingering row deletes for items that have been removed.
487
- Object.keys(this.rowDeleteContents).forEach(id => {
488
- if (!this.data.find(item => item.id === id)) {
488
+ Object.keys(this.rowDeleteContents).forEach((id) => {
489
+ if (!this.data.find((item) => item.id === id)) {
489
490
  this.destroyRowDelete(id);
490
491
  }
491
492
  else {
@@ -498,7 +499,7 @@ class SkyGridComponent {
498
499
  placement: 'above',
499
500
  verticalAlignment: 'top',
500
501
  horizontalAlignment: 'left',
501
- enableAutoFit: false
502
+ enableAutoFit: false,
502
503
  });
503
504
  }
504
505
  });
@@ -516,7 +517,7 @@ class SkyGridComponent {
516
517
  this.multiselectSelectionChange.complete();
517
518
  this.ngUnsubscribe.next();
518
519
  this.ngUnsubscribe.complete();
519
- Object.keys(this.rowDeleteContents).forEach(id => {
520
+ Object.keys(this.rowDeleteContents).forEach((id) => {
520
521
  this.destroyRowDelete(id);
521
522
  });
522
523
  }
@@ -564,15 +565,17 @@ class SkyGridComponent {
564
565
  sortByColumn(column) {
565
566
  if (!this.isDraggingResizeHandle && column.isSortable) {
566
567
  this.currentSortField
567
- .pipe(take(1), map(field => {
568
+ .pipe(take(1), map((field) => {
568
569
  let selector = {
569
570
  fieldSelector: column.field,
570
- descending: true
571
+ descending: true,
571
572
  };
572
- if (field && field.fieldSelector === column.field && field.descending) {
573
+ if (field &&
574
+ field.fieldSelector === column.field &&
575
+ field.descending) {
573
576
  selector = {
574
577
  fieldSelector: column.field,
575
- descending: false
578
+ descending: false,
576
579
  };
577
580
  }
578
581
  this.sortFieldChange.emit(selector);
@@ -582,28 +585,32 @@ class SkyGridComponent {
582
585
  }
583
586
  }
584
587
  getSortDirection(columnField) {
585
- return this.currentSortField
586
- .pipe(distinctUntilChanged(), map(field => {
587
- return field.fieldSelector === columnField ?
588
- (field.descending ? 'desc' : 'asc') : undefined;
588
+ return this.currentSortField.pipe(distinctUntilChanged(), map((field) => {
589
+ return field.fieldSelector === columnField
590
+ ? field.descending
591
+ ? 'desc'
592
+ : 'asc'
593
+ : undefined;
589
594
  }));
590
595
  }
591
596
  getAriaSortDirection(column) {
592
- return this.currentSortField
593
- .pipe(distinctUntilChanged(), map(field => {
594
- return field.fieldSelector === column.field ?
595
- (field.descending ? 'descending' : 'ascending') : (column.isSortable ? 'none' : undefined);
597
+ return this.currentSortField.pipe(distinctUntilChanged(), map((field) => {
598
+ return field.fieldSelector === column.field
599
+ ? field.descending
600
+ ? 'descending'
601
+ : 'ascending'
602
+ : column.isSortable
603
+ ? 'none'
604
+ : undefined;
596
605
  }));
597
606
  }
598
607
  getCaretVisibility(columnField) {
599
- return this.currentSortField
600
- .pipe(distinctUntilChanged(), map(field => {
608
+ return this.currentSortField.pipe(distinctUntilChanged(), map((field) => {
601
609
  return field.fieldSelector === columnField ? 'visible' : 'hidden';
602
610
  }));
603
611
  }
604
612
  getHelpInlineClass(columnField) {
605
- return this.getCaretVisibility(columnField)
606
- .pipe(map((visibility) => {
613
+ return this.getCaretVisibility(columnField).pipe(map((visibility) => {
607
614
  return visibility === 'hidden';
608
615
  }));
609
616
  }
@@ -612,8 +619,8 @@ class SkyGridComponent {
612
619
  }
613
620
  updateColumnHeading(change) {
614
621
  const foundColumnModel = this.columns.find((column) => {
615
- return (change.id !== undefined && change.id === column.id ||
616
- change.field !== undefined && change.field === column.field);
622
+ return ((change.id !== undefined && change.id === column.id) ||
623
+ (change.field !== undefined && change.field === column.field));
617
624
  });
618
625
  /* istanbul ignore else */
619
626
  if (foundColumnModel) {
@@ -623,8 +630,8 @@ class SkyGridComponent {
623
630
  }
624
631
  updateInlineHelpPopover(change) {
625
632
  const foundColumnModel = this.columns.find((column) => {
626
- return (change.id !== undefined && change.id === column.id ||
627
- change.field !== undefined && change.field === column.field);
633
+ return ((change.id !== undefined && change.id === column.id) ||
634
+ (change.field !== undefined && change.field === column.field));
628
635
  });
629
636
  /* istanbul ignore else */
630
637
  if (foundColumnModel) {
@@ -634,8 +641,8 @@ class SkyGridComponent {
634
641
  }
635
642
  updateColumnDescription(change) {
636
643
  const foundColumnModel = this.columns.find((column) => {
637
- return (change.id !== undefined && change.id === column.id ||
638
- change.field !== undefined && change.field === column.field);
644
+ return ((change.id !== undefined && change.id === column.id) ||
645
+ (change.field !== undefined && change.field === column.field));
639
646
  });
640
647
  /* istanbul ignore else */
641
648
  if (foundColumnModel) {
@@ -730,7 +737,8 @@ class SkyGridComponent {
730
737
  onRowClick(event, selectedItem) {
731
738
  /* istanbul ignore else */
732
739
  if (this.enableMultiselect) {
733
- if (event.target === event.currentTarget || !this.isInteractiveElement(event)) {
740
+ if (event.target === event.currentTarget ||
741
+ !this.isInteractiveElement(event)) {
734
742
  selectedItem.isSelected = !selectedItem.isSelected;
735
743
  this.changeDetector.markForCheck();
736
744
  this.emitSelectedRows(SkyGridSelectedRowsSource.RowClick);
@@ -747,16 +755,16 @@ class SkyGridComponent {
747
755
  return this.gridAdapter.getRowHeight(this.tableElementRef, index);
748
756
  }
749
757
  cancelRowDelete(id) {
750
- this.rowDeleteConfigs = this.rowDeleteConfigs.filter(config => config.id !== id);
758
+ this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== id);
751
759
  this.rowDeleteCancel.emit({ id: id });
752
760
  this.destroyRowDelete(id);
753
761
  }
754
762
  confirmRowDelete(id) {
755
- this.rowDeleteConfigs.find(config => config.id === id).pending = true;
763
+ this.rowDeleteConfigs.find((config) => config.id === id).pending = true;
756
764
  this.rowDeleteConfirm.emit({ id: id });
757
765
  }
758
766
  getRowDeleteItem(id) {
759
- return this.rowDeleteConfigs.find(rowDelete => rowDelete.id === id);
767
+ return this.rowDeleteConfigs.find((rowDelete) => rowDelete.id === id);
760
768
  }
761
769
  // Prevent touch devices from inadvertently scrolling grid while dragging columns.
762
770
  onTouchMove(event) {
@@ -791,10 +799,12 @@ class SkyGridComponent {
791
799
  }
792
800
  }
793
801
  checkUserColumnWidthsForScroll() {
794
- if (!this.showTopScroll && this.columnElementRefs && this.columnElementRefs.length > 0) {
802
+ if (!this.showTopScroll &&
803
+ this.columnElementRefs &&
804
+ this.columnElementRefs.length > 0) {
795
805
  let columnsWidthTotal = 0;
796
806
  const windowSize = this.skyWindow.nativeWindow.innerWidth;
797
- this.columnElementRefs.forEach(col => {
807
+ this.columnElementRefs.forEach((col) => {
798
808
  if (!this.showTopScroll) {
799
809
  let computedWidth = parseFloat(window.getComputedStyle(col.nativeElement).width);
800
810
  let offsetWidth = col.nativeElement.offsetWidth;
@@ -837,21 +847,25 @@ class SkyGridComponent {
837
847
  /* sanity check */
838
848
  /* istanbul ignore else */
839
849
  if (message.data && message.data.promptDeleteRow) {
840
- const existingConfig = this.rowDeleteConfigs
841
- .find(config => config.id === message.data.promptDeleteRow.id);
850
+ const existingConfig = this.rowDeleteConfigs.find((config) => config.id === message.data.promptDeleteRow.id);
842
851
  if (existingConfig) {
843
852
  existingConfig.pending = false;
844
853
  }
845
854
  else {
846
- this.rowDeleteConfigs.push({ id: message.data.promptDeleteRow.id, pending: false });
855
+ this.rowDeleteConfigs.push({
856
+ id: message.data.promptDeleteRow.id,
857
+ pending: false,
858
+ });
847
859
  let overlay = this.overlayService.create({
848
860
  enableScroll: true,
849
861
  showBackdrop: false,
850
862
  closeOnNavigation: true,
851
863
  enableClose: false,
852
- enablePointerEvents: true
864
+ enablePointerEvents: true,
865
+ });
866
+ overlay.attachTemplate(this.inlineDeleteTemplateRef, {
867
+ $implicit: this.data.find((item) => item.id === message.data.promptDeleteRow.id),
853
868
  });
854
- overlay.attachTemplate(this.inlineDeleteTemplateRef, { $implicit: this.data.find(item => item.id === message.data.promptDeleteRow.id) });
855
869
  /**
856
870
  * We are manually setting the z-index here because overlays will always be on top of
857
871
  * the omnibar. This manual setting is 1 less than the omnibar's z-index of 1000. We
@@ -860,9 +874,11 @@ class SkyGridComponent {
860
874
  */
861
875
  overlay.componentRef.instance.zIndex = '999';
862
876
  setTimeout(() => {
863
- const inlineDeleteRef = this.inlineDeleteRefs.toArray()
864
- .find(elRef => {
865
- return elRef.nativeElement.id === 'row-delete-ref-' + message.data.promptDeleteRow.id;
877
+ const inlineDeleteRef = this.inlineDeleteRefs
878
+ .toArray()
879
+ .find((elRef) => {
880
+ return (elRef.nativeElement.id ===
881
+ 'row-delete-ref-' + message.data.promptDeleteRow.id);
866
882
  });
867
883
  let affixer = this.affixService.createAffixer(inlineDeleteRef);
868
884
  let rowElement = this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + message.data.promptDeleteRow.id + '"]');
@@ -872,11 +888,11 @@ class SkyGridComponent {
872
888
  placement: 'above',
873
889
  verticalAlignment: 'top',
874
890
  horizontalAlignment: 'left',
875
- enableAutoFit: false
891
+ enableAutoFit: false,
876
892
  });
877
893
  this.rowDeleteContents[message.data.promptDeleteRow.id] = {
878
894
  affixer: affixer,
879
- overlay: overlay
895
+ overlay: overlay,
880
896
  };
881
897
  });
882
898
  }
@@ -886,7 +902,7 @@ class SkyGridComponent {
886
902
  /* sanity check */
887
903
  /* istanbul ignore else */
888
904
  if (message.data && message.data.abortDeleteRow) {
889
- this.rowDeleteConfigs = this.rowDeleteConfigs.filter(config => config.id !== message.data.abortDeleteRow.id);
905
+ this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== message.data.abortDeleteRow.id);
890
906
  this.destroyRowDelete(message.data.abortDeleteRow.id);
891
907
  }
892
908
  break;
@@ -904,10 +920,15 @@ class SkyGridComponent {
904
920
  if (this.selectedColumnIds !== undefined) {
905
921
  // setup displayed columns
906
922
  this.displayedColumns = this.selectedColumnIds
907
- .filter(columnId => this.columns.find(column => column.id === columnId)).map(columnId => this.columns.filter(column => column.id === columnId)[0]);
923
+ .filter((columnId) => {
924
+ return this.columns.find((column) => column.id === columnId);
925
+ })
926
+ .map((columnId) => {
927
+ return this.columns.filter((column) => column.id === columnId)[0];
928
+ });
908
929
  }
909
930
  else if (respectHidden) {
910
- this.displayedColumns = this.columns.filter(column => {
931
+ this.displayedColumns = this.columns.filter((column) => {
911
932
  return !column.hidden;
912
933
  });
913
934
  }
@@ -917,12 +938,15 @@ class SkyGridComponent {
917
938
  }
918
939
  transformData() {
919
940
  // Transform data into object with id and data properties
920
- if (this.data && this.data.length > 0 && this.data[0].id && !this.data[0].data) {
941
+ if (this.data &&
942
+ this.data.length > 0 &&
943
+ this.data[0].id &&
944
+ !this.data[0].data) {
921
945
  if (this.multiselectRowId) {
922
946
  this.items = this.getGridDataWithSelectedRows();
923
947
  }
924
948
  else {
925
- this.items = this.data.map(item => new ListItemModel(item.id, item));
949
+ this.items = this.data.map((item) => new ListItemModel(item.id, item));
926
950
  }
927
951
  }
928
952
  else {
@@ -931,7 +955,7 @@ class SkyGridComponent {
931
955
  }
932
956
  getGridDataWithSelectedRows() {
933
957
  let selectedRows = this.getSelectedRows();
934
- return this.data.map(item => {
958
+ return this.data.map((item) => {
935
959
  let checked;
936
960
  if (item.hasOwnProperty(this.multiselectRowId)) {
937
961
  checked = selectedRows.indexOf(item[this.multiselectRowId]) > -1;
@@ -945,7 +969,8 @@ class SkyGridComponent {
945
969
  applySelectedRows() {
946
970
  if (this.items && this.items.length > 0 && this.selectedRowIds) {
947
971
  for (let i = 0; i < this.items.length; i++) {
948
- this.items[i].isSelected = (this.selectedRowIds.indexOf(this.items[i].id) > -1);
972
+ this.items[i].isSelected =
973
+ this.selectedRowIds.indexOf(this.items[i].id) > -1;
949
974
  }
950
975
  this.changeDetector.markForCheck();
951
976
  }
@@ -954,7 +979,7 @@ class SkyGridComponent {
954
979
  this.currentSortField.next(this.sortField || { fieldSelector: '', descending: false });
955
980
  }
956
981
  getColumnsFromComponent() {
957
- this.columns = this.columnComponents.map(columnComponent => {
982
+ this.columns = this.columnComponents.map((columnComponent) => {
958
983
  return new SkyGridColumnModel(columnComponent.template, columnComponent);
959
984
  });
960
985
  }
@@ -1004,8 +1029,7 @@ class SkyGridComponent {
1004
1029
  let computedWidth = parseFloat(window.getComputedStyle(col.nativeElement).width);
1005
1030
  let offsetWidth = col.nativeElement.offsetWidth;
1006
1031
  /* istanbul ignore next */
1007
- let width = Math.max(computedWidth || offsetWidth, this.minColWidth);
1008
- this.getColumnModelByIndex(index).width = width;
1032
+ this.getColumnModelByIndex(index).width = Math.max(computedWidth || offsetWidth, this.minColWidth);
1009
1033
  });
1010
1034
  // 'scroll' tables should be allowed to expand outside of their constraints.
1011
1035
  if (this.fit === 'scroll') {
@@ -1019,11 +1043,11 @@ class SkyGridComponent {
1019
1043
  }
1020
1044
  getColumnWidthModelChange() {
1021
1045
  let columnWidthModelChange = new Array();
1022
- this.columns.forEach(column => {
1046
+ this.columns.forEach((column) => {
1023
1047
  columnWidthModelChange.push({
1024
1048
  id: column.id,
1025
1049
  field: column.field,
1026
- width: column.width
1050
+ width: column.width,
1027
1051
  });
1028
1052
  });
1029
1053
  return columnWidthModelChange;
@@ -1052,13 +1076,13 @@ class SkyGridComponent {
1052
1076
  });
1053
1077
  }
1054
1078
  getRangeInputByIndex(index) {
1055
- return this.columnRangeInputElementRefs.find(input => input.nativeElement.getAttribute('sky-cmp-index') === index.toString());
1079
+ return this.columnRangeInputElementRefs.find((input) => input.nativeElement.getAttribute('sky-cmp-index') === index.toString());
1056
1080
  }
1057
1081
  getColumnModelByIndex(index) {
1058
1082
  return this.displayedColumns[Number(index)];
1059
1083
  }
1060
1084
  getMaxRangeByIndex(index) {
1061
- let columnElementRef = this.columnElementRefs.find(th => th.nativeElement.getAttribute('sky-cmp-index') === index);
1085
+ let columnElementRef = this.columnElementRefs.find((th) => th.nativeElement.getAttribute('sky-cmp-index') === index);
1062
1086
  let rangeInput = columnElementRef.nativeElement.querySelector('.sky-grid-column-input-aria-only');
1063
1087
  return Number(rangeInput.max);
1064
1088
  }
@@ -1066,7 +1090,7 @@ class SkyGridComponent {
1066
1090
  return this.getColumnModelByIndex(this.displayedColumns.length - 1);
1067
1091
  }
1068
1092
  addDelimeter(text, delimiter) {
1069
- return text.filter(val => val).join(delimiter);
1093
+ return text.filter((val) => val).join(delimiter);
1070
1094
  }
1071
1095
  destroyRowDelete(id) {
1072
1096
  const rowDeleteContents = this.rowDeleteContents[id];
@@ -1080,14 +1104,16 @@ class SkyGridComponent {
1080
1104
  emitSelectedRows(source) {
1081
1105
  let selectedRows = {
1082
1106
  selectedRowIds: this.getSelectedRows(),
1083
- source: source
1107
+ source: source,
1084
1108
  };
1085
1109
  this.multiselectSelectionChange.emit(selectedRows);
1086
1110
  }
1087
1111
  getSelectedRows() {
1088
- return this.items.filter(item => {
1112
+ return this.items
1113
+ .filter((item) => {
1089
1114
  return item.isSelected;
1090
- }).map(item => {
1115
+ })
1116
+ .map((item) => {
1091
1117
  if (item.data.hasOwnProperty(this.multiselectRowId)) {
1092
1118
  return item.data[this.multiselectRowId];
1093
1119
  }
@@ -1112,19 +1138,21 @@ class SkyGridComponent {
1112
1138
  }
1113
1139
  setResizeBarPosition(xPosition) {
1114
1140
  let parentScroll = this.tableContainerElementRef.nativeElement.scrollLeft;
1115
- let resizeBarX = xPosition - this.tableElementRef.nativeElement.getBoundingClientRect().left - parentScroll;
1141
+ let resizeBarX = xPosition -
1142
+ this.tableElementRef.nativeElement.getBoundingClientRect().left -
1143
+ parentScroll;
1116
1144
  this.gridAdapter.setStyle(this.resizeBar, 'left', resizeBarX + 'px');
1117
1145
  }
1118
1146
  applyUserConfig() {
1119
1147
  return new Promise((resolve) => {
1120
- this.uiConfigService.getConfig(this.settingsKey)
1148
+ this.uiConfigService
1149
+ .getConfig(this.settingsKey)
1121
1150
  .pipe(take(1))
1122
1151
  .subscribe((config) => {
1123
1152
  /* istanbul ignore else */
1124
1153
  if (config && config.selectedColumnIds) {
1125
1154
  // Remove any columnIds that don't exist in the current data set.
1126
- const filteredColumnIds = config.selectedColumnIds.filter(id => this.columns.find(column => column.id === id));
1127
- this.selectedColumnIds = filteredColumnIds;
1155
+ this.selectedColumnIds = config.selectedColumnIds.filter((id) => this.columns.find((column) => column.id === id));
1128
1156
  this.changeDetector.markForCheck();
1129
1157
  }
1130
1158
  resolve();
@@ -1137,7 +1165,8 @@ class SkyGridComponent {
1137
1165
  if (!this.settingsKey) {
1138
1166
  return;
1139
1167
  }
1140
- this.uiConfigService.setConfig(this.settingsKey, config)
1168
+ this.uiConfigService
1169
+ .setConfig(this.settingsKey, config)
1141
1170
  .pipe(takeUntil(this.ngUnsubscribe))
1142
1171
  .subscribe(() => { }, (err) => {
1143
1172
  console.warn('Could not save grid settings.');
@@ -1146,8 +1175,7 @@ class SkyGridComponent {
1146
1175
  }
1147
1176
  initColumns() {
1148
1177
  /* istanbul ignore else */
1149
- if (this.columnComponents.length !== 0 ||
1150
- this.columns !== undefined) {
1178
+ if (this.columnComponents.length !== 0 || this.columns !== undefined) {
1151
1179
  /* istanbul ignore else */
1152
1180
  /* sanity check */
1153
1181
  if (this.columnComponents.length > 0) {
@@ -1161,40 +1189,33 @@ class SkyGridComponent {
1161
1189
  this.subscriptions.push(this.columnComponents.changes.subscribe(() => this.updateColumns()));
1162
1190
  // Watch for column heading changes:
1163
1191
  this.columnComponents.forEach((comp) => {
1164
- this.subscriptions.push(comp.headingModelChanges
1165
- .subscribe((change) => {
1192
+ this.subscriptions.push(comp.headingModelChanges.subscribe((change) => {
1166
1193
  this.updateColumnHeading(change);
1167
1194
  }));
1168
- this.subscriptions.push(comp.descriptionModelChanges
1169
- .subscribe((change) => {
1195
+ this.subscriptions.push(comp.descriptionModelChanges.subscribe((change) => {
1170
1196
  this.updateColumnDescription(change);
1171
1197
  }));
1172
- this.subscriptions.push(comp.inlineHelpPopoverModelChanges
1173
- .subscribe((change) => {
1198
+ this.subscriptions.push(comp.inlineHelpPopoverModelChanges.subscribe((change) => {
1174
1199
  this.updateInlineHelpPopover(change);
1175
1200
  }));
1176
1201
  });
1177
1202
  }
1178
1203
  arraysEqual(arrayA, arrayB) {
1179
- return arrayA.length === arrayB.length &&
1180
- arrayA.every((value, index) => value === arrayB[index]);
1204
+ return (arrayA.length === arrayB.length &&
1205
+ arrayA.every((value, index) => value === arrayB[index]));
1181
1206
  }
1182
1207
  }
1183
- SkyGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridComponent, deps: [{ token: i1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i2.DragulaService }, { token: SkyGridAdapterService }, { token: i1.SkyOverlayService }, { token: i1.SkyAppWindowRef }, { token: i1.SkyUIConfigService }], target: i0.ɵɵFactoryTarget.Component });
1184
- SkyGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkyGridComponent, selector: "sky-grid", inputs: { columns: "columns", data: "data", enableMultiselect: "enableMultiselect", fit: "fit", hasToolbar: "hasToolbar", height: "height", highlightText: "highlightText", messageStream: "messageStream", multiselectRowId: "multiselectRowId", rowHighlightedId: "rowHighlightedId", selectedColumnIds: "selectedColumnIds", selectedRowIds: "selectedRowIds", settingsKey: "settingsKey", sortField: "sortField", width: "width" }, outputs: { columnWidthChange: "columnWidthChange", multiselectSelectionChange: "multiselectSelectionChange", rowDeleteCancel: "rowDeleteCancel", rowDeleteConfirm: "rowDeleteConfirm", selectedColumnIdsChange: "selectedColumnIdsChange", sortFieldChange: "sortFieldChange" }, host: { listeners: { "window:resize": "onWindowResize()" } }, providers: [
1185
- SkyGridAdapterService
1186
- ], queries: [{ propertyName: "columnComponents", predicate: SkyGridColumnComponent }], viewQueries: [{ propertyName: "inlineDeleteTemplateRef", first: true, predicate: ["inlineDeleteTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "tableContainerElementRef", first: true, predicate: ["gridContainer"], descendants: true }, { propertyName: "tableElementRef", first: true, predicate: ["gridTable"], descendants: true }, { propertyName: "topScrollContainerElementRef", first: true, predicate: ["topScrollContainer"], descendants: true }, { propertyName: "resizeBar", first: true, predicate: ["resizeBar"], descendants: true }, { propertyName: "columnElementRefs", predicate: ["gridCol"], descendants: true }, { propertyName: "columnRangeInputElementRefs", predicate: ["colSizeRange"], descendants: true }, { propertyName: "inlineDeleteRefs", predicate: ["inlineDeleteRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sky-grid\">\n <div *ngIf=\"showTopScroll\"\n class=\"sky-grid-top-scroll-container\"\n (scroll)=\"onTopScroll($event)\"\n #topScrollContainer\n >\n <div\n class=\"sky-grid-top-scroll\"\n [style.width.px]=\"getTopScrollWidth()\"\n ></div>\n </div>\n <div\n class=\"sky-grid-table-container\"\n [style.height.px]=\"height\"\n [style.width.px]=\"width\"\n (scroll)=\"onGridScroll($event)\"\n #gridContainer\n >\n <table\n class=\"sky-grid-table\"\n [ngClass]=\"getTableClassNames()\"\n #gridTable>\n <thead>\n <tr dragula=\"sky-grid-heading\">\n <th *ngIf=\"enableMultiselect\"\n class=\"sky-grid-heading sky-grid-multiselect-cell sky-grid-header-locked\"\n scope=\"col\"\n [style.max-width.px]=\"minColWidth\"\n [style.width.px]=\"minColWidth\"\n >\n <span class=\"screen-reader-only\">\n {{ 'skyux_grid_multiselect_select_row' | skyLibResources }}\n </span>\n </th>\n <th *ngFor=\"let column of displayedColumns; let last = last, let i = index\"\n class=\"sky-grid-heading sky-field-label\"\n scope=\"col\"\n [attr.sky-cmp-index]=\"i\"\n [attr.sky-cmp-id]=\"column.id || column.field\"\n [attr.aria-sort]=\"getAriaSortDirection(column) | async\"\n [id]=\"'sky-grid-' + gridId + '-column-' + i\"\n [ngClass]=\"'sky-grid-column-alignment-' + column.alignment\"\n [style.max-width.px]=\"column.width\"\n [style.width.px]=\"column.width\"\n [tabIndex]=\"column.isSortable ? 0 : -1\"\n (mouseup)=\"sortByColumn(column)\"\n (keydown)=\"onKeydown($event, column)\"\n (touchmove)=\"onTouchMove($event)\"\n #gridCol\n >\n <div\n class=\"overflow\"\n [ngClass]=\"getTableHeaderClassNames(column)\"\n [style.max-width.px]=\"column.width - 1\"\n [style.width.px]=\"column.width - 1\"\n >\n <span *ngIf=\"(getCaretVisibility(column.field) | async) === 'hidden'\"\n class=\"sky-grid-header-caret-hidden-spacing\"\n ></span>\n <!-- The no spacing here is intentional to avoid extra spaces due to these being inline elements -->\n <span\n class=\"sky-grid-header-text\"\n >{{column.heading?.trim()}}</span>\n <sky-icon\n class=\"sky-grid-heading-sort\"\n [ngClass]=\"'sky-grid-heading-sort-' + (getCaretVisibility(column.field) | async)\"\n [icon]=\"getCaretIconNames(column)\"\n >\n </sky-icon>\n <sky-help-inline *ngIf=\"column.inlineHelpPopover\"\n [ngClass]=\"{\n 'sky-grid-help-inline-sort-hidden' : getHelpInlineClass(column.field) | async\n }\"\n [skyPopover]=\"column.inlineHelpPopover\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (mouseup)=\"$event.stopPropagation()\"\n >\n </sky-help-inline>\n </div>\n <span\n *ngIf=\"(fit==='width' && !last) || (fit==='scroll')\"\n aria-hidden=\"true\"\n class=\"sky-grid-resize-handle\"\n tabindex=\"-1\"\n [attr.sky-cmp-index]=\"i\"\n (mousedown)=\"onResizeColumnStart($event)\"\n (touchstart)=\"onResizeColumnStart($event)\"\n >\n </span>\n <input\n aria-label=\"Width of column\"\n class=\"sky-grid-column-input-aria-only\"\n role=\"slider\"\n type=\"range\"\n [attr.aria-controls]=\"'sky-grid-' + gridId + '-column-' + i\"\n [attr.aria-valuemin]=\"minColWidth\"\n [attr.aria-valuemax]=\"maxColWidth\"\n [attr.aria-valuenow]=\"column.width\"\n [attr.sky-cmp-index]=\"i\"\n [min]=\"minColWidth\"\n [max]=\"maxColWidth\"\n [step]=\"columnResizeStep\"\n [(ngModel)]=\"column.width\"\n (blur)=\"onResizeHandleBlur($event)\"\n (focus)=\"onResizeHandleFocus($event)\"\n (keydown)=\"onKeydownResizeCol($event)\"\n (change)=\"onInputChangeResizeCol($event)\"\n #colSizeRange />\n </th>\n </tr>\n </thead>\n <tbody class=\"sky-grid-tbody\">\n <tr\n class=\"sky-grid-row\"\n *ngFor=\"let item of items; let i = index\"\n [attr.aria-current]=\"isRowHighlighted(item.id) ? true : null\"\n [attr.aria-selected]=\"item.isSelected\"\n [attr.sky-cmp-id]=\"item.id\"\n [ngClass]=\"{\n 'sky-grid-multiselect-selected-row' : item.isSelected,\n 'sky-grid-multiselect-row' : enableMultiselect,\n 'sky-grid-row-highlight' : isRowHighlighted(item.id)\n }\"\n (click)=\"onRowClick($event, item)\"\n >\n <td *ngIf=\"enableMultiselect\"\n class=\"sky-grid-multiselect-cell sky-grid-header-locked\"\n >\n <div\n [style.max-width.px]=\"minColWidth\"\n [style.width.px]=\"minColWidth\"\n >\n <sky-checkbox\n [label]=\"'skyux_grid_multiselect_select_row' | skyLibResources\"\n (change)=\"onMultiselectCheckboxChange()\"\n [(ngModel)]=\"item.isSelected\"\n >\n </sky-checkbox>\n </div>\n </td>\n <td *ngFor=\"let column of displayedColumns; let last = last; let i = index\"\n class=\"sky-grid-cell\"\n [ngClass]=\"'sky-grid-column-alignment-' + column.alignment\"\n [style.max-width.px]=\"column.width\"\n [style.width.px]=\"column.width\"\n >\n <sky-grid-cell\n [skyHighlight]=\"!column.excludeFromHighlighting ? highlightText : undefined\"\n [template]=\"column.template || defaultCellTemplate\"\n [fieldSelector]=\"column.field\"\n [item]=\"item\"\n [columnId]=\"column.id\"\n [attr.sky-cmp-id]=\"column.id || column.field\">\n </sky-grid-cell>\n </td>\n </tr>\n </tbody>\n </table>\n <div *ngIf=\"showResizeBar\"\n aria-hidden=\"true\"\n id=\"sky-grid-resize-bar\"\n tabindex=\"-1\"\n #resizeBar\n >\n </div>\n </div>\n</div>\n\n<ng-template #defaultCellTemplate let-row=\"row\" let-value=\"value\">{{value}}</ng-template>\n\n<ng-template\n let-item\n #inlineDeleteTemplateRef\n>\n <div\n [id]=\"'row-delete-ref-' + item.id\"\n [ngStyle]='{\n \"height\": getRowHeight(0),\n \"position\": \"fixed\",\n \"width\": tableWidth + \"px\"\n }'\n #inlineDeleteRef\n >\n <sky-inline-delete\n [pending]=\"getRowDeleteItem(item.id).pending\"\n (cancelTriggered)=\"cancelRowDelete(item.id)\"\n (deleteTriggered)=\"confirmRowDelete(item.id)\"\n ></sky-inline-delete>\n </div>\n</ng-template>\n", styles: [".sky-grid{position:relative;display:block}.sky-grid-table-container{overflow:auto}.sky-grid-table{position:relative;table-layout:fixed;border-collapse:collapse;margin:0;font-size:15px;min-width:100%}.sky-grid-table.sky-grid-fit{max-width:100%;width:100%}.sky-grid-tbody{background-color:#fff}.sky-grid-row{border-bottom:1px dotted #cdcfd2}.sky-grid-row:nth-child(odd){background-color:#fbfbfb}.sky-grid-row.sky-grid-row-highlight{border-top:1px solid #0974a1;box-shadow:0 0 0 3px inset #0974a1}.sky-grid-row .sky-grid-cell{padding:0;min-width:10px}.sky-grid-heading{position:relative;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-right-width:0px;padding:0;cursor:pointer;background-color:#fff;overflow:visible;background-clip:padding-box;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;-moz-user-select:none;-ms-user-select:none;user-select:none}.sky-grid-heading:first-child{border-left:1px solid transparent}.sky-grid-heading.sky-grid-header-dragging{background-color:#eeeeef}.sky-grid-heading.sky-grid-column-alignment-left .sky-grid-heading-sort,.sky-grid-heading.sky-grid-column-alignment-center .sky-grid-heading-sort{width:14px}.sky-grid-heading.sky-grid-column-alignment-left .sky-grid-help-inline-sort-hidden,.sky-grid-heading.sky-grid-column-alignment-center .sky-grid-help-inline-sort-hidden{margin-left:-14px;margin-right:14px}.sky-grid-heading.sky-grid-column-alignment-right .sky-grid-header-caret-hidden-spacing{padding-left:14px}.sky-grid-heading.sky-grid-column-alignment-right .sky-grid-heading-sort-visible{width:14px}.sky-grid-heading div{padding:8px}.sky-grid-heading .overflow{text-overflow:ellipsis;white-space:nowrap;position:relative;z-index:1;overflow:hidden;min-width:100%}.sky-grid-heading .sky-grid-column-input-aria-only{-webkit-appearance:none;-moz-appearance:none;height:100%;width:5px;position:absolute;display:block;top:0;bottom:0;right:0}.sky-grid-heading .sky-grid-column-input-aria-only::-moz-range-track{background:transparent}.sky-grid-heading .sky-grid-column-input-aria-only::-moz-range-thumb{-webkit-appearance:none;-moz-appearance:none;width:0;height:0;border-radius:0;border:0 none;background:none;display:none}.sky-grid-heading .sky-grid-column-input-aria-only::-ms-thumb{-webkit-appearance:none;-moz-appearance:none;width:0;height:0;border-radius:0;border:0 none;background:none;display:none}.sky-grid-heading .sky-grid-column-input-aria-only::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;width:0;height:0;border-radius:0;border:0 none;background:none;display:none}.sky-grid-heading .sky-grid-column-input-aria-only:focus{background-color:#00b4f1}.sky-grid-column-alignment-left{text-align:left}.sky-grid-column-alignment-center{text-align:center}.sky-grid-column-alignment-right{text-align:right}.sky-grid-multiselect-cell{padding:0;text-align:center}.sky-grid-multiselect-cell ::ng-deep .sky-switch-control{margin:0 auto}th.sky-grid-multiselect-cell{cursor:default}th.sky-grid-multiselect-cell .screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}@-moz-document url-prefix(){.sky-grid-multiselect-row td{border-left:0px solid transparent;border-right:0px solid transparent}}.sky-grid-multiselect-row:hover{background-color:#e9e4f1}.sky-grid-multiselect-row:hover:nth-child(odd){background:#e9e4f1}.sky-grid-multiselect-selected-row{background:#f1eef6;border-top:1px solid #dadbf6;border-bottom:1px solid #dadbf6}.sky-grid-multiselect-selected-row:nth-child(odd){background:#f1eef6}.sky-grid-has-toolbar .sky-grid-heading{border-top-width:0px}.sky-grid-heading-sort.sky-grid-heading-sort-hidden{visibility:hidden}.sky-grid-heading-sort.sky-grid-heading-sort-visible{visibility:visible;padding-left:5px}.sky-grid-resize-handle{position:absolute;right:0;top:0;bottom:0;width:30px;z-index:2;min-height:20px;height:100%!important;vertical-align:middle;cursor:col-resize}.sky-grid-resize-handle:hover:after{background-color:#00b4f1}.sky-grid-resize-handle:after{position:absolute;right:0;top:0;bottom:0;width:5px;height:100%;content:\"\"}#sky-grid-resize-bar{position:absolute;top:0;left:0;z-index:99;height:100%;width:5px;background:#00b4f1;opacity:.6}tr{position:relative}.sky-grid-top-scroll-container{overflow:auto}.sky-grid-top-scroll{height:1px}\n"], components: [{ type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i4.λ3, selector: "sky-help-inline", outputs: ["actionClick"] }, { type: i5.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: SkyGridCellComponent, selector: "sky-grid-cell", inputs: ["item", "columnId", "template", "fieldSelector"] }, { type: i7.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.DragulaDirective, selector: "[dragula]", inputs: ["dragula", "dragulaModel", "dragulaOptions"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { type: i10.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "skyLibResources": i11.SkyLibResourcesPipe, "async": i8.AsyncPipe }, viewProviders: [DragulaService], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridComponent, decorators: [{
1208
+ SkyGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridComponent, deps: [{ token: i1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i2.DragulaService }, { token: SkyGridAdapterService }, { token: i1.SkyOverlayService }, { token: i1.SkyAppWindowRef }, { token: i1.SkyUIConfigService }], target: i0.ɵɵFactoryTarget.Component });
1209
+ SkyGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyGridComponent, selector: "sky-grid", inputs: { columns: "columns", data: "data", enableMultiselect: "enableMultiselect", fit: "fit", hasToolbar: "hasToolbar", height: "height", highlightText: "highlightText", messageStream: "messageStream", multiselectRowId: "multiselectRowId", rowHighlightedId: "rowHighlightedId", selectedColumnIds: "selectedColumnIds", selectedRowIds: "selectedRowIds", settingsKey: "settingsKey", sortField: "sortField", width: "width" }, outputs: { columnWidthChange: "columnWidthChange", multiselectSelectionChange: "multiselectSelectionChange", rowDeleteCancel: "rowDeleteCancel", rowDeleteConfirm: "rowDeleteConfirm", selectedColumnIdsChange: "selectedColumnIdsChange", sortFieldChange: "sortFieldChange" }, host: { listeners: { "window:resize": "onWindowResize()" } }, providers: [SkyGridAdapterService], queries: [{ propertyName: "columnComponents", predicate: SkyGridColumnComponent }], viewQueries: [{ propertyName: "inlineDeleteTemplateRef", first: true, predicate: ["inlineDeleteTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "tableContainerElementRef", first: true, predicate: ["gridContainer"], descendants: true }, { propertyName: "tableElementRef", first: true, predicate: ["gridTable"], descendants: true }, { propertyName: "topScrollContainerElementRef", first: true, predicate: ["topScrollContainer"], descendants: true }, { propertyName: "resizeBar", first: true, predicate: ["resizeBar"], descendants: true }, { propertyName: "columnElementRefs", predicate: ["gridCol"], descendants: true }, { propertyName: "columnRangeInputElementRefs", predicate: ["colSizeRange"], descendants: true }, { propertyName: "inlineDeleteRefs", predicate: ["inlineDeleteRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sky-grid\">\n <div\n *ngIf=\"showTopScroll\"\n class=\"sky-grid-top-scroll-container\"\n (scroll)=\"onTopScroll($event)\"\n #topScrollContainer\n >\n <div\n class=\"sky-grid-top-scroll\"\n [style.width.px]=\"getTopScrollWidth()\"\n ></div>\n </div>\n <div\n class=\"sky-grid-table-container\"\n [style.height.px]=\"height\"\n [style.width.px]=\"width\"\n (scroll)=\"onGridScroll($event)\"\n #gridContainer\n >\n <table class=\"sky-grid-table\" [ngClass]=\"getTableClassNames()\" #gridTable>\n <thead>\n <tr dragula=\"sky-grid-heading\">\n <th\n *ngIf=\"enableMultiselect\"\n class=\"\n sky-grid-heading sky-grid-multiselect-cell sky-grid-header-locked\n \"\n scope=\"col\"\n [style.max-width.px]=\"minColWidth\"\n [style.width.px]=\"minColWidth\"\n >\n <span class=\"screen-reader-only\">\n {{ 'skyux_grid_multiselect_select_row' | skyLibResources }}\n </span>\n </th>\n <th\n *ngFor=\"\n let column of displayedColumns;\n let last = last;\n let i = index\n \"\n class=\"sky-grid-heading sky-field-label\"\n scope=\"col\"\n [attr.sky-cmp-index]=\"i\"\n [attr.sky-cmp-id]=\"column.id || column.field\"\n [attr.aria-sort]=\"getAriaSortDirection(column) | async\"\n [id]=\"'sky-grid-' + gridId + '-column-' + i\"\n [ngClass]=\"'sky-grid-column-alignment-' + column.alignment\"\n [style.max-width.px]=\"column.width\"\n [style.width.px]=\"column.width\"\n [tabIndex]=\"column.isSortable ? 0 : -1\"\n (mouseup)=\"sortByColumn(column)\"\n (keydown)=\"onKeydown($event, column)\"\n (touchmove)=\"onTouchMove($event)\"\n #gridCol\n >\n <div\n class=\"overflow\"\n [ngClass]=\"getTableHeaderClassNames(column)\"\n [style.max-width.px]=\"column.width - 1\"\n [style.width.px]=\"column.width - 1\"\n >\n <span\n *ngIf=\"(getCaretVisibility(column.field) | async) === 'hidden'\"\n class=\"sky-grid-header-caret-hidden-spacing\"\n ></span>\n <!-- The no spacing here is intentional to avoid extra spaces due to these being inline elements -->\n <span class=\"sky-grid-header-text\">{{\n column.heading?.trim()\n }}</span>\n <sky-icon\n class=\"sky-grid-heading-sort\"\n [ngClass]=\"\n 'sky-grid-heading-sort-' +\n (getCaretVisibility(column.field) | async)\n \"\n [icon]=\"getCaretIconNames(column)\"\n >\n </sky-icon>\n <sky-help-inline\n *ngIf=\"column.inlineHelpPopover\"\n [ngClass]=\"{\n 'sky-grid-help-inline-sort-hidden':\n getHelpInlineClass(column.field) | async\n }\"\n [skyPopover]=\"column.inlineHelpPopover\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (mouseup)=\"$event.stopPropagation()\"\n >\n </sky-help-inline>\n </div>\n <span\n *ngIf=\"(fit === 'width' && !last) || fit === 'scroll'\"\n aria-hidden=\"true\"\n class=\"sky-grid-resize-handle\"\n tabindex=\"-1\"\n [attr.sky-cmp-index]=\"i\"\n (mousedown)=\"onResizeColumnStart($event)\"\n (touchstart)=\"onResizeColumnStart($event)\"\n >\n </span>\n <input\n aria-label=\"Width of column\"\n class=\"sky-grid-column-input-aria-only\"\n role=\"slider\"\n type=\"range\"\n [attr.aria-controls]=\"'sky-grid-' + gridId + '-column-' + i\"\n [attr.aria-valuemin]=\"minColWidth\"\n [attr.aria-valuemax]=\"maxColWidth\"\n [attr.aria-valuenow]=\"column.width\"\n [attr.sky-cmp-index]=\"i\"\n [min]=\"minColWidth\"\n [max]=\"maxColWidth\"\n [step]=\"columnResizeStep\"\n [(ngModel)]=\"column.width\"\n (blur)=\"onResizeHandleBlur($event)\"\n (focus)=\"onResizeHandleFocus($event)\"\n (keydown)=\"onKeydownResizeCol($event)\"\n (change)=\"onInputChangeResizeCol($event)\"\n #colSizeRange\n />\n </th>\n </tr>\n </thead>\n <tbody class=\"sky-grid-tbody\">\n <tr\n class=\"sky-grid-row\"\n *ngFor=\"let item of items; let i = index\"\n [attr.aria-current]=\"isRowHighlighted(item.id) ? true : null\"\n [attr.aria-selected]=\"item.isSelected\"\n [attr.sky-cmp-id]=\"item.id\"\n [ngClass]=\"{\n 'sky-grid-multiselect-selected-row': item.isSelected,\n 'sky-grid-multiselect-row': enableMultiselect,\n 'sky-grid-row-highlight': isRowHighlighted(item.id)\n }\"\n (click)=\"onRowClick($event, item)\"\n >\n <td\n *ngIf=\"enableMultiselect\"\n class=\"sky-grid-multiselect-cell sky-grid-header-locked\"\n >\n <div\n [style.max-width.px]=\"minColWidth\"\n [style.width.px]=\"minColWidth\"\n >\n <sky-checkbox\n [label]=\"'skyux_grid_multiselect_select_row' | skyLibResources\"\n (change)=\"onMultiselectCheckboxChange()\"\n [(ngModel)]=\"item.isSelected\"\n >\n </sky-checkbox>\n </div>\n </td>\n <td\n *ngFor=\"\n let column of displayedColumns;\n let last = last;\n let i = index\n \"\n class=\"sky-grid-cell\"\n [ngClass]=\"'sky-grid-column-alignment-' + column.alignment\"\n [style.max-width.px]=\"column.width\"\n [style.width.px]=\"column.width\"\n >\n <sky-grid-cell\n [skyHighlight]=\"\n !column.excludeFromHighlighting ? highlightText : undefined\n \"\n [template]=\"column.template || defaultCellTemplate\"\n [fieldSelector]=\"column.field\"\n [item]=\"item\"\n [columnId]=\"column.id\"\n [attr.sky-cmp-id]=\"column.id || column.field\"\n >\n </sky-grid-cell>\n </td>\n </tr>\n </tbody>\n </table>\n <div\n *ngIf=\"showResizeBar\"\n aria-hidden=\"true\"\n id=\"sky-grid-resize-bar\"\n tabindex=\"-1\"\n #resizeBar\n ></div>\n </div>\n</div>\n\n<ng-template #defaultCellTemplate let-row=\"row\" let-value=\"value\">{{\n value\n}}</ng-template>\n\n<ng-template let-item #inlineDeleteTemplateRef>\n <div\n [id]=\"'row-delete-ref-' + item.id\"\n [ngStyle]=\"{\n height: getRowHeight(0),\n position: 'fixed',\n width: tableWidth + 'px'\n }\"\n #inlineDeleteRef\n >\n <sky-inline-delete\n [pending]=\"getRowDeleteItem(item.id).pending\"\n (cancelTriggered)=\"cancelRowDelete(item.id)\"\n (deleteTriggered)=\"confirmRowDelete(item.id)\"\n ></sky-inline-delete>\n </div>\n</ng-template>\n", styles: [".sky-grid{position:relative;display:block}.sky-grid-table-container{overflow:auto}.sky-grid-table{position:relative;table-layout:fixed;border-collapse:collapse;margin:0;font-size:15px;min-width:100%}.sky-grid-table.sky-grid-fit{max-width:100%;width:100%}.sky-grid-tbody{background-color:#fff}.sky-grid-row{border-bottom:1px dotted #cdcfd2}.sky-grid-row:nth-child(odd){background-color:#fbfbfb}.sky-grid-row.sky-grid-row-highlight{border-top:1px solid #0974a1;box-shadow:0 0 0 3px inset #0974a1}.sky-grid-row .sky-grid-cell{padding:0;min-width:10px}.sky-grid-heading{position:relative;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-right-width:0px;padding:0;cursor:pointer;background-color:#fff;overflow:visible;background-clip:padding-box;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;user-select:none}.sky-grid-heading:first-child{border-left:1px solid transparent}.sky-grid-heading.sky-grid-header-dragging{background-color:#eeeeef}.sky-grid-heading.sky-grid-column-alignment-left .sky-grid-heading-sort,.sky-grid-heading.sky-grid-column-alignment-center .sky-grid-heading-sort{width:14px}.sky-grid-heading.sky-grid-column-alignment-left .sky-grid-help-inline-sort-hidden,.sky-grid-heading.sky-grid-column-alignment-center .sky-grid-help-inline-sort-hidden{margin-left:-14px;margin-right:14px}.sky-grid-heading.sky-grid-column-alignment-right .sky-grid-header-caret-hidden-spacing{padding-left:14px}.sky-grid-heading.sky-grid-column-alignment-right .sky-grid-heading-sort-visible{width:14px}.sky-grid-heading div{padding:8px}.sky-grid-heading .overflow{text-overflow:ellipsis;white-space:nowrap;position:relative;z-index:1;overflow:hidden;min-width:100%}.sky-grid-heading .sky-grid-column-input-aria-only{-webkit-appearance:none;-moz-appearance:none;height:100%;width:5px;position:absolute;display:block;top:0;bottom:0;right:0}.sky-grid-heading .sky-grid-column-input-aria-only::-moz-range-track{background:transparent}.sky-grid-heading .sky-grid-column-input-aria-only::-moz-range-thumb{-webkit-appearance:none;-moz-appearance:none;width:0;height:0;border-radius:0;border:0 none;background:none;display:none}.sky-grid-heading .sky-grid-column-input-aria-only::-ms-thumb{-webkit-appearance:none;-moz-appearance:none;width:0;height:0;border-radius:0;border:0 none;background:none;display:none}.sky-grid-heading .sky-grid-column-input-aria-only::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;width:0;height:0;border-radius:0;border:0 none;background:none;display:none}.sky-grid-heading .sky-grid-column-input-aria-only:focus{background-color:#00b4f1}.sky-grid-column-alignment-left{text-align:left}.sky-grid-column-alignment-center{text-align:center}.sky-grid-column-alignment-right{text-align:right}.sky-grid-multiselect-cell{padding:0;text-align:center}.sky-grid-multiselect-cell ::ng-deep .sky-switch-control{margin:0 auto}th.sky-grid-multiselect-cell{cursor:default}th.sky-grid-multiselect-cell .screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}@-moz-document url-prefix(){.sky-grid-multiselect-row td{border-left:0px solid transparent;border-right:0px solid transparent}}.sky-grid-multiselect-row:hover{background-color:#e9e4f1}.sky-grid-multiselect-row:hover:nth-child(odd){background:#e9e4f1}.sky-grid-multiselect-selected-row{background:#f1eef6;border-top:1px solid #dadbf6;border-bottom:1px solid #dadbf6}.sky-grid-multiselect-selected-row:nth-child(odd){background:#f1eef6}.sky-grid-has-toolbar .sky-grid-heading{border-top-width:0px}.sky-grid-heading-sort.sky-grid-heading-sort-hidden{visibility:hidden}.sky-grid-heading-sort.sky-grid-heading-sort-visible{visibility:visible;padding-left:5px}.sky-grid-resize-handle{position:absolute;right:0;top:0;bottom:0;width:30px;z-index:2;min-height:20px;height:100%!important;vertical-align:middle;cursor:col-resize}.sky-grid-resize-handle:hover:after{background-color:#00b4f1}.sky-grid-resize-handle:after{position:absolute;right:0;top:0;bottom:0;width:5px;height:100%;content:\"\"}#sky-grid-resize-bar{position:absolute;top:0;left:0;z-index:99;height:100%;width:5px;background:#00b4f1;opacity:.6}tr{position:relative}.sky-grid-top-scroll-container{overflow:auto}.sky-grid-top-scroll{height:1px}\n"], components: [{ type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i4.λ3, selector: "sky-help-inline", outputs: ["actionClick"] }, { type: i5.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: SkyGridCellComponent, selector: "sky-grid-cell", inputs: ["item", "columnId", "template", "fieldSelector"] }, { type: i7.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.DragulaDirective, selector: "[dragula]", inputs: ["dragula", "dragulaModel", "dragulaOptions"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { type: i10.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "skyLibResources": i11.SkyLibResourcesPipe, "async": i8.AsyncPipe }, viewProviders: [DragulaService], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridComponent, decorators: [{
1188
1211
  type: Component,
1189
1212
  args: [{
1190
1213
  selector: 'sky-grid',
1191
1214
  templateUrl: './grid.component.html',
1192
1215
  styleUrls: ['./grid.component.scss'],
1193
1216
  viewProviders: [DragulaService],
1194
- providers: [
1195
- SkyGridAdapterService
1196
- ],
1197
- changeDetection: ChangeDetectionStrategy.OnPush
1217
+ providers: [SkyGridAdapterService],
1218
+ changeDetection: ChangeDetectionStrategy.OnPush,
1198
1219
  }]
1199
1220
  }], ctorParameters: function () { return [{ type: i1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i2.DragulaService }, { type: SkyGridAdapterService }, { type: i1.SkyOverlayService }, { type: i1.SkyAppWindowRef }, { type: i1.SkyUIConfigService }]; }, propDecorators: { columns: [{
1200
1221
  type: Input
@@ -1277,7 +1298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
1277
1298
  * To update this file, simply rerun the command.
1278
1299
  */
1279
1300
  const RESOURCES = {
1280
- 'EN-US': { "skyux_grid_multiselect_select_row": { "message": "Select row" } },
1301
+ 'EN-US': { skyux_grid_multiselect_select_row: { message: 'Select row' } },
1281
1302
  };
1282
1303
  class SkyuxGridsResourcesProvider {
1283
1304
  getString(localeInfo, name) {
@@ -1289,29 +1310,33 @@ class SkyuxGridsResourcesProvider {
1289
1310
  */
1290
1311
  class SkyuxGridsResourcesModule {
1291
1312
  }
1292
- SkyuxGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyuxGridsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1293
- SkyuxGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyuxGridsResourcesModule, exports: [SkyI18nModule] });
1294
- SkyuxGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyuxGridsResourcesModule, providers: [{
1313
+ SkyuxGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyuxGridsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1314
+ SkyuxGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyuxGridsResourcesModule, exports: [SkyI18nModule] });
1315
+ SkyuxGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyuxGridsResourcesModule, providers: [
1316
+ {
1295
1317
  provide: SKY_LIB_RESOURCES_PROVIDERS,
1296
1318
  useClass: SkyuxGridsResourcesProvider,
1297
- multi: true
1298
- }], imports: [SkyI18nModule] });
1299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyuxGridsResourcesModule, decorators: [{
1319
+ multi: true,
1320
+ },
1321
+ ], imports: [SkyI18nModule] });
1322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyuxGridsResourcesModule, decorators: [{
1300
1323
  type: NgModule,
1301
1324
  args: [{
1302
1325
  exports: [SkyI18nModule],
1303
- providers: [{
1326
+ providers: [
1327
+ {
1304
1328
  provide: SKY_LIB_RESOURCES_PROVIDERS,
1305
1329
  useClass: SkyuxGridsResourcesProvider,
1306
- multi: true
1307
- }]
1330
+ multi: true,
1331
+ },
1332
+ ],
1308
1333
  }]
1309
1334
  }] });
1310
1335
 
1311
1336
  class SkyGridModule {
1312
1337
  }
1313
- SkyGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1314
- SkyGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridModule, declarations: [SkyGridComponent,
1338
+ SkyGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1339
+ SkyGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridModule, declarations: [SkyGridComponent,
1315
1340
  SkyGridColumnComponent,
1316
1341
  SkyGridCellComponent], imports: [CommonModule,
1317
1342
  DragulaModule,
@@ -1324,9 +1349,8 @@ SkyGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
1324
1349
  SkyInlineDeleteModule,
1325
1350
  SkyOverlayModule,
1326
1351
  SkyPopoverModule,
1327
- SkyTextHighlightModule], exports: [SkyGridComponent,
1328
- SkyGridColumnComponent] });
1329
- SkyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridModule, imports: [[
1352
+ SkyTextHighlightModule], exports: [SkyGridComponent, SkyGridColumnComponent] });
1353
+ SkyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridModule, imports: [[
1330
1354
  CommonModule,
1331
1355
  DragulaModule,
1332
1356
  FormsModule,
@@ -1338,15 +1362,15 @@ SkyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
1338
1362
  SkyInlineDeleteModule,
1339
1363
  SkyOverlayModule,
1340
1364
  SkyPopoverModule,
1341
- SkyTextHighlightModule
1365
+ SkyTextHighlightModule,
1342
1366
  ]] });
1343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyGridModule, decorators: [{
1367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyGridModule, decorators: [{
1344
1368
  type: NgModule,
1345
1369
  args: [{
1346
1370
  declarations: [
1347
1371
  SkyGridComponent,
1348
1372
  SkyGridColumnComponent,
1349
- SkyGridCellComponent
1373
+ SkyGridCellComponent,
1350
1374
  ],
1351
1375
  imports: [
1352
1376
  CommonModule,
@@ -1360,12 +1384,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
1360
1384
  SkyInlineDeleteModule,
1361
1385
  SkyOverlayModule,
1362
1386
  SkyPopoverModule,
1363
- SkyTextHighlightModule
1387
+ SkyTextHighlightModule,
1364
1388
  ],
1365
- exports: [
1366
- SkyGridComponent,
1367
- SkyGridColumnComponent
1368
- ]
1389
+ exports: [SkyGridComponent, SkyGridColumnComponent],
1369
1390
  }]
1370
1391
  }] });
1371
1392