@skyux/grids 5.9.4 → 6.0.0-beta.10

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.
Files changed (97) hide show
  1. package/documentation.json +387 -295
  2. package/esm2020/index.mjs +20 -0
  3. package/esm2020/lib/modules/grid/grid-adapter.service.mjs +88 -0
  4. package/esm2020/lib/modules/grid/grid-cell.component.mjs +42 -0
  5. package/esm2020/lib/modules/grid/grid-column.component.mjs +115 -0
  6. package/esm2020/lib/modules/grid/grid-column.model.mjs +26 -0
  7. package/esm2020/lib/modules/grid/grid.component.mjs +1034 -0
  8. package/esm2020/lib/modules/grid/grid.module.mjs +74 -0
  9. package/esm2020/lib/modules/grid/types/grid-column-alignment.mjs +2 -0
  10. package/esm2020/lib/modules/grid/types/grid-column-description-model-change.mjs +2 -0
  11. package/esm2020/lib/modules/grid/types/grid-column-heading-model-change.mjs +2 -0
  12. package/esm2020/lib/modules/grid/types/grid-column-inline-help-popover-model-change.mjs +2 -0
  13. package/esm2020/lib/modules/grid/types/grid-column-width-model-change.mjs +2 -0
  14. package/esm2020/lib/modules/grid/types/grid-message-type.mjs +23 -0
  15. package/esm2020/lib/modules/grid/types/grid-message.mjs +2 -0
  16. package/esm2020/lib/modules/grid/types/grid-row-delete-cancel-args.mjs +2 -0
  17. package/esm2020/lib/modules/grid/types/grid-row-delete-config.mjs +2 -0
  18. package/esm2020/lib/modules/grid/types/grid-row-delete-confirm-args.mjs +2 -0
  19. package/esm2020/lib/modules/grid/types/grid-row-delete-contents.mjs +2 -0
  20. package/esm2020/lib/modules/grid/types/grid-selected-rows-model-change.mjs +2 -0
  21. package/esm2020/lib/modules/grid/types/grid-selected-rows-source.mjs +13 -0
  22. package/esm2020/lib/modules/grid/types/grid-ui-config.mjs +2 -0
  23. package/esm2020/lib/modules/shared/sky-grids-resources.module.mjs +45 -0
  24. package/esm2020/skyux-grids.mjs +5 -0
  25. package/fesm2015/{skyux-grids.js → skyux-grids.mjs} +56 -47
  26. package/fesm2015/skyux-grids.mjs.map +1 -0
  27. package/fesm2020/skyux-grids.mjs +1443 -0
  28. package/fesm2020/skyux-grids.mjs.map +1 -0
  29. package/lib/modules/grid/grid-adapter.service.d.ts +1 -1
  30. package/lib/modules/grid/grid-cell.component.d.ts +1 -0
  31. package/lib/modules/grid/grid-column.component.d.ts +1 -0
  32. package/lib/modules/grid/grid-column.model.d.ts +1 -0
  33. package/lib/modules/grid/grid.component.d.ts +6 -2
  34. package/lib/modules/grid/grid.module.d.ts +3 -0
  35. package/lib/modules/grid/types/grid-column-alignment.d.ts +1 -0
  36. package/lib/modules/grid/types/grid-column-description-model-change.d.ts +1 -0
  37. package/lib/modules/grid/types/grid-column-heading-model-change.d.ts +1 -0
  38. package/lib/modules/grid/types/grid-column-inline-help-popover-model-change.d.ts +1 -0
  39. package/lib/modules/grid/types/grid-column-width-model-change.d.ts +3 -0
  40. package/lib/modules/grid/types/grid-message-type.d.ts +3 -0
  41. package/lib/modules/grid/types/grid-message.d.ts +3 -0
  42. package/lib/modules/grid/types/grid-row-delete-cancel-args.d.ts +1 -0
  43. package/lib/modules/grid/types/grid-row-delete-config.d.ts +1 -0
  44. package/lib/modules/grid/types/grid-row-delete-confirm-args.d.ts +1 -0
  45. package/lib/modules/grid/types/grid-row-delete-contents.d.ts +1 -0
  46. package/lib/modules/grid/types/grid-selected-rows-model-change.d.ts +3 -0
  47. package/lib/modules/grid/types/grid-selected-rows-source.d.ts +1 -0
  48. package/lib/modules/grid/types/grid-ui-config.d.ts +1 -0
  49. package/package.json +33 -17
  50. package/bundles/skyux-grids.umd.js +0 -1853
  51. package/esm2015/index.js +0 -20
  52. package/esm2015/index.js.map +0 -1
  53. package/esm2015/lib/modules/grid/grid-adapter.service.js +0 -84
  54. package/esm2015/lib/modules/grid/grid-adapter.service.js.map +0 -1
  55. package/esm2015/lib/modules/grid/grid-cell.component.js +0 -46
  56. package/esm2015/lib/modules/grid/grid-cell.component.js.map +0 -1
  57. package/esm2015/lib/modules/grid/grid-column.component.js +0 -116
  58. package/esm2015/lib/modules/grid/grid-column.component.js.map +0 -1
  59. package/esm2015/lib/modules/grid/grid-column.model.js +0 -25
  60. package/esm2015/lib/modules/grid/grid-column.model.js.map +0 -1
  61. package/esm2015/lib/modules/grid/grid.component.js +0 -1032
  62. package/esm2015/lib/modules/grid/grid.component.js.map +0 -1
  63. package/esm2015/lib/modules/grid/grid.module.js +0 -71
  64. package/esm2015/lib/modules/grid/grid.module.js.map +0 -1
  65. package/esm2015/lib/modules/grid/types/grid-column-alignment.js +0 -2
  66. package/esm2015/lib/modules/grid/types/grid-column-alignment.js.map +0 -1
  67. package/esm2015/lib/modules/grid/types/grid-column-description-model-change.js +0 -2
  68. package/esm2015/lib/modules/grid/types/grid-column-description-model-change.js.map +0 -1
  69. package/esm2015/lib/modules/grid/types/grid-column-heading-model-change.js +0 -2
  70. package/esm2015/lib/modules/grid/types/grid-column-heading-model-change.js.map +0 -1
  71. package/esm2015/lib/modules/grid/types/grid-column-inline-help-popover-model-change.js +0 -2
  72. package/esm2015/lib/modules/grid/types/grid-column-inline-help-popover-model-change.js.map +0 -1
  73. package/esm2015/lib/modules/grid/types/grid-column-width-model-change.js +0 -2
  74. package/esm2015/lib/modules/grid/types/grid-column-width-model-change.js.map +0 -1
  75. package/esm2015/lib/modules/grid/types/grid-message-type.js +0 -20
  76. package/esm2015/lib/modules/grid/types/grid-message-type.js.map +0 -1
  77. package/esm2015/lib/modules/grid/types/grid-message.js +0 -2
  78. package/esm2015/lib/modules/grid/types/grid-message.js.map +0 -1
  79. package/esm2015/lib/modules/grid/types/grid-row-delete-cancel-args.js +0 -2
  80. package/esm2015/lib/modules/grid/types/grid-row-delete-cancel-args.js.map +0 -1
  81. package/esm2015/lib/modules/grid/types/grid-row-delete-config.js +0 -2
  82. package/esm2015/lib/modules/grid/types/grid-row-delete-config.js.map +0 -1
  83. package/esm2015/lib/modules/grid/types/grid-row-delete-confirm-args.js +0 -2
  84. package/esm2015/lib/modules/grid/types/grid-row-delete-confirm-args.js.map +0 -1
  85. package/esm2015/lib/modules/grid/types/grid-row-delete-contents.js +0 -2
  86. package/esm2015/lib/modules/grid/types/grid-row-delete-contents.js.map +0 -1
  87. package/esm2015/lib/modules/grid/types/grid-selected-rows-model-change.js +0 -2
  88. package/esm2015/lib/modules/grid/types/grid-selected-rows-model-change.js.map +0 -1
  89. package/esm2015/lib/modules/grid/types/grid-selected-rows-source.js +0 -12
  90. package/esm2015/lib/modules/grid/types/grid-selected-rows-source.js.map +0 -1
  91. package/esm2015/lib/modules/grid/types/grid-ui-config.js +0 -2
  92. package/esm2015/lib/modules/grid/types/grid-ui-config.js.map +0 -1
  93. package/esm2015/lib/modules/shared/sky-grids-resources.module.js +0 -45
  94. package/esm2015/lib/modules/shared/sky-grids-resources.module.js.map +0 -1
  95. package/esm2015/skyux-grids.js +0 -5
  96. package/esm2015/skyux-grids.js.map +0 -1
  97. package/fesm2015/skyux-grids.js.map +0 -1
@@ -0,0 +1,1443 @@
1
+ import * as i8 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { NgModule, ViewContainerRef, Component, ChangeDetectionStrategy, Input, ViewChild, EventEmitter, TemplateRef, ContentChildren, Injectable, Output, ViewChildren, HostListener } from '@angular/core';
5
+ import * as i10 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i1 from '@skyux/core';
8
+ import { SkyAffixAutoFitContext, SkyAffixModule, SkyOverlayModule } from '@skyux/core';
9
+ import * as i5 from '@skyux/forms';
10
+ import { SkyCheckboxModule } from '@skyux/forms';
11
+ import * as i4 from '@skyux/indicators';
12
+ import { SkyHelpInlineModule, SkyIconModule, SkyTextHighlightModule } from '@skyux/indicators';
13
+ import * as i7 from '@skyux/layout';
14
+ import { SkyInlineDeleteModule } from '@skyux/layout';
15
+ import * as i9 from '@skyux/popovers';
16
+ import { SkyPopoverModule } from '@skyux/popovers';
17
+ import * as i2 from 'ng2-dragula';
18
+ import { DragulaService, DragulaModule } from 'ng2-dragula';
19
+ import * as i11 from '@skyux/i18n';
20
+ import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
21
+ import { getData, ListItemModel } from '@skyux/list-builder-common';
22
+ import { Subject, BehaviorSubject, fromEvent, merge } from 'rxjs';
23
+ import { takeUntil, take, map, distinctUntilChanged, takeWhile } from 'rxjs/operators';
24
+
25
+ /**
26
+ * NOTICE: DO NOT MODIFY THIS FILE!
27
+ * The contents of this file were automatically generated by
28
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-grids' schematic.
29
+ * To update this file, simply rerun the command.
30
+ */
31
+ const RESOURCES = {
32
+ 'EN-US': { skyux_grid_multiselect_select_row: { message: 'Select row' } },
33
+ };
34
+ class SkyGridsResourcesProvider {
35
+ getString(localeInfo, name) {
36
+ return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
37
+ }
38
+ }
39
+ /**
40
+ * Import into any component library module that needs to use resource strings.
41
+ */
42
+ class SkyGridsResourcesModule {
43
+ }
44
+ SkyGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
45
+ SkyGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridsResourcesModule, exports: [SkyI18nModule] });
46
+ SkyGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridsResourcesModule, providers: [
47
+ {
48
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
49
+ useClass: SkyGridsResourcesProvider,
50
+ multi: true,
51
+ },
52
+ ], imports: [SkyI18nModule] });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridsResourcesModule, decorators: [{
54
+ type: NgModule,
55
+ args: [{
56
+ exports: [SkyI18nModule],
57
+ providers: [
58
+ {
59
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
60
+ useClass: SkyGridsResourcesProvider,
61
+ multi: true,
62
+ },
63
+ ],
64
+ }]
65
+ }] });
66
+
67
+ /**
68
+ * @internal
69
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
70
+ */
71
+ class SkyGridCellComponent {
72
+ ngOnInit() {
73
+ this.container.createEmbeddedView(this.template, this);
74
+ }
75
+ get row() {
76
+ return this.item.data;
77
+ }
78
+ get value() {
79
+ if (this.item.data && (this.fieldSelector || this.columnId)) {
80
+ return getData(this.item.data, this.fieldSelector || this.columnId);
81
+ }
82
+ return undefined;
83
+ }
84
+ }
85
+ SkyGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
86
+ SkyGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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 });
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridCellComponent, decorators: [{
88
+ type: Component,
89
+ args: [{ selector: 'sky-grid-cell', template: '<ng-template #cell></ng-template>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px;min-height:35px}\n"] }]
90
+ }], propDecorators: { item: [{
91
+ type: Input
92
+ }], columnId: [{
93
+ type: Input
94
+ }], template: [{
95
+ type: Input
96
+ }], fieldSelector: [{
97
+ type: Input
98
+ }], container: [{
99
+ type: ViewChild,
100
+ args: ['cell', {
101
+ read: ViewContainerRef,
102
+ static: true,
103
+ }]
104
+ }] } });
105
+
106
+ /**
107
+ * Specifies the column information.
108
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
109
+ */
110
+ class SkyGridColumnComponent {
111
+ constructor() {
112
+ /**
113
+ * Specifies the horizontal alignment of the column's data and header.
114
+ * Options include: `"left"`, `"center"`, and `"right"`.
115
+ * @default "left"
116
+ */
117
+ this.alignment = 'left';
118
+ /**
119
+ * Indicates whether the column sorts the grid when users click the column header.
120
+ * @default true
121
+ */
122
+ this.isSortable = true;
123
+ /**
124
+ * Specifies a search function to apply for the specific column. By default,
125
+ * the column executes a string compare on the column data.
126
+ * @default (value, searchText) => value.toString().toLowerCase().indexOf(searchText) !== -1
127
+ */
128
+ // eslint-disable-next-line @angular-eslint/no-input-rename
129
+ this.searchFunction = this.search;
130
+ this.descriptionChanges = new EventEmitter();
131
+ this.descriptionModelChanges = new EventEmitter();
132
+ this.headingChanges = new EventEmitter();
133
+ this.headingModelChanges = new EventEmitter();
134
+ this.inlineHelpPopoverModelChanges = new EventEmitter();
135
+ }
136
+ ngOnChanges(changes) {
137
+ if (changes.heading && changes.heading.firstChange === false) {
138
+ this.headingChanges.emit(this.heading);
139
+ this.headingModelChanges.emit({
140
+ value: this.heading,
141
+ id: this.id,
142
+ field: this.field,
143
+ });
144
+ }
145
+ if (changes.description && changes.description.firstChange === false) {
146
+ this.descriptionChanges.emit(this.description);
147
+ this.descriptionModelChanges.emit({
148
+ value: this.description,
149
+ id: this.id,
150
+ field: this.field,
151
+ });
152
+ }
153
+ if (changes.inlineHelpPopover &&
154
+ changes.inlineHelpPopover.firstChange === false) {
155
+ this.inlineHelpPopoverModelChanges.emit({
156
+ value: this.inlineHelpPopover,
157
+ id: this.id,
158
+ field: this.field,
159
+ });
160
+ }
161
+ }
162
+ get template() {
163
+ if (this.templates.length > 0) {
164
+ return this.templates.first;
165
+ }
166
+ return this.templateInput;
167
+ }
168
+ search(value, searchText) {
169
+ if (value !== undefined && value !== null) {
170
+ return value.toString().toLowerCase().indexOf(searchText) !== -1;
171
+ }
172
+ return false;
173
+ }
174
+ }
175
+ SkyGridColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
176
+ SkyGridColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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 });
177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridColumnComponent, decorators: [{
178
+ type: Component,
179
+ args: [{
180
+ selector: 'sky-grid-column',
181
+ template: '<ng-content></ng-content>',
182
+ changeDetection: ChangeDetectionStrategy.OnPush,
183
+ }]
184
+ }], propDecorators: { alignment: [{
185
+ type: Input
186
+ }], description: [{
187
+ type: Input
188
+ }], excludeFromHighlighting: [{
189
+ type: Input
190
+ }], field: [{
191
+ type: Input
192
+ }], heading: [{
193
+ type: Input
194
+ }], hidden: [{
195
+ type: Input
196
+ }], id: [{
197
+ type: Input
198
+ }], inlineHelpPopover: [{
199
+ type: Input
200
+ }], isSortable: [{
201
+ type: Input
202
+ }], locked: [{
203
+ type: Input
204
+ }], searchFunction: [{
205
+ type: Input,
206
+ args: ['search']
207
+ }], type: [{
208
+ type: Input
209
+ }], templateInput: [{
210
+ type: Input,
211
+ args: ['template']
212
+ }], width: [{
213
+ type: Input
214
+ }], templates: [{
215
+ type: ContentChildren,
216
+ args: [TemplateRef]
217
+ }] } });
218
+
219
+ const GRID_HEADER_DRAGGING_CLASS = 'sky-grid-header-dragging';
220
+ const GRID_HEADER_LOCKED_SELECTOR = '.sky-grid-header-locked';
221
+ const GRID_HEADER_RESIZE_HANDLE = '.sky-grid-resize-handle';
222
+ const GRID_ROW_DELETE_SELECTOR = '.sky-grid-row-delete-heading';
223
+ const GRID_MULTISELECT_SELECTOR = '.sky-grid-multiselect-cell';
224
+ /**
225
+ * @internal
226
+ */
227
+ class SkyGridAdapterService {
228
+ constructor(rendererFactory) {
229
+ this.rendererFactory = rendererFactory;
230
+ this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
231
+ }
232
+ initializeDragAndDrop(dragulaGroupName, dragulaService, dropCallback) {
233
+ dragulaService
234
+ .drag(dragulaGroupName)
235
+ .subscribe((args) => args.el.classList.add(GRID_HEADER_DRAGGING_CLASS));
236
+ dragulaService
237
+ .dragend(dragulaGroupName)
238
+ .subscribe((args) => args.el.classList.remove(GRID_HEADER_DRAGGING_CLASS));
239
+ dragulaService.drop(dragulaGroupName).subscribe((args) => {
240
+ const columnIds = [];
241
+ const nodes = args.target.querySelectorAll(`th:not(${GRID_MULTISELECT_SELECTOR}):not(${GRID_ROW_DELETE_SELECTOR})`);
242
+ for (let i = 0; i < nodes.length; i++) {
243
+ const el = nodes[i];
244
+ const id = el.getAttribute('sky-cmp-id');
245
+ columnIds.push(id);
246
+ }
247
+ dropCallback(columnIds);
248
+ });
249
+ dragulaService.createGroup(dragulaGroupName, {
250
+ moves: (el, container, handle) => {
251
+ const columns = container.querySelectorAll('th div');
252
+ const isLeftOfLocked = this.isLeftOfLocked(handle, columns);
253
+ return (!el.querySelector(GRID_HEADER_LOCKED_SELECTOR) &&
254
+ handle !== undefined &&
255
+ !handle.matches(GRID_HEADER_RESIZE_HANDLE) &&
256
+ !handle.matches(GRID_MULTISELECT_SELECTOR) &&
257
+ !handle.matches(GRID_ROW_DELETE_SELECTOR) &&
258
+ !isLeftOfLocked);
259
+ },
260
+ accepts: (el, target, source, sibling) => {
261
+ if (sibling === undefined || !sibling) {
262
+ return true;
263
+ }
264
+ const columns = source.querySelectorAll('th div');
265
+ const siblingDiv = sibling.querySelector('div');
266
+ const isLeftOfLocked = this.isLeftOfLocked(siblingDiv, columns);
267
+ return (!sibling.matches(GRID_HEADER_LOCKED_SELECTOR) &&
268
+ !sibling.matches(GRID_HEADER_RESIZE_HANDLE) &&
269
+ !isLeftOfLocked);
270
+ },
271
+ });
272
+ }
273
+ getRowHeight(el, index) {
274
+ return (el.nativeElement.querySelectorAll('tbody tr')[index].scrollHeight + 'px');
275
+ }
276
+ setStyle(el, style, value) {
277
+ if (el) {
278
+ this.renderer.setStyle(el.nativeElement, style, value);
279
+ }
280
+ }
281
+ isLeftOfLocked(handle, columns) {
282
+ let sourceColumn = handle;
283
+ for (const column of Array.from(columns)) {
284
+ if (column.contains(handle)) {
285
+ sourceColumn = column;
286
+ }
287
+ }
288
+ for (let i = columns.length - 1; i >= 0; i--) {
289
+ if (columns[i].classList.contains('sky-grid-header-locked')) {
290
+ return true;
291
+ }
292
+ if (columns[i] === sourceColumn) {
293
+ break;
294
+ }
295
+ }
296
+ return false;
297
+ }
298
+ }
299
+ SkyGridAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
300
+ SkyGridAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridAdapterService });
301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridAdapterService, decorators: [{
302
+ type: Injectable
303
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
304
+
305
+ /**
306
+ * @internal
307
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
308
+ */
309
+ class SkyGridColumnModel {
310
+ constructor(template, data) {
311
+ this.isSortable = true;
312
+ this.template = template;
313
+ if (data) {
314
+ this.id = data.id || data.field;
315
+ this.type = data.type;
316
+ this.field = data.field;
317
+ this.heading = data.heading;
318
+ this.inlineHelpPopover = data.inlineHelpPopover;
319
+ this.width = data.width ? Number(data.width) : undefined;
320
+ this.hidden = data.hidden;
321
+ this.locked = data.locked;
322
+ this.description = data.description;
323
+ this.searchFunction = data.searchFunction;
324
+ this.isSortable = data.isSortable;
325
+ this.excludeFromHighlighting = data.excludeFromHighlighting;
326
+ this.alignment = data.alignment;
327
+ }
328
+ }
329
+ }
330
+
331
+ /**
332
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
333
+ */
334
+ var SkyGridMessageType;
335
+ (function (SkyGridMessageType) {
336
+ /**
337
+ * Selects the multiselect checkboxes for all rows in the grid.
338
+ */
339
+ SkyGridMessageType[SkyGridMessageType["SelectAll"] = 0] = "SelectAll";
340
+ /**
341
+ * Clears the multiselect checkboxes for all rows in the grid.
342
+ */
343
+ SkyGridMessageType[SkyGridMessageType["ClearAll"] = 1] = "ClearAll";
344
+ /**
345
+ * @internal
346
+ */
347
+ SkyGridMessageType[SkyGridMessageType["PromptDeleteRow"] = 2] = "PromptDeleteRow";
348
+ /**
349
+ * @internal
350
+ */
351
+ SkyGridMessageType[SkyGridMessageType["AbortDeleteRow"] = 3] = "AbortDeleteRow";
352
+ })(SkyGridMessageType || (SkyGridMessageType = {}));
353
+
354
+ /**
355
+ * @internal
356
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
357
+ */
358
+ var SkyGridSelectedRowsSource;
359
+ (function (SkyGridSelectedRowsSource) {
360
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["CheckboxChange"] = 0] = "CheckboxChange";
361
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["ClearAll"] = 1] = "ClearAll";
362
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["RowClick"] = 2] = "RowClick";
363
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectAll"] = 3] = "SelectAll";
364
+ SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectedRowIdsChange"] = 4] = "SelectedRowIdsChange";
365
+ })(SkyGridSelectedRowsSource || (SkyGridSelectedRowsSource = {}));
366
+
367
+ let nextId = 0;
368
+ /**
369
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
370
+ */
371
+ class SkyGridComponent {
372
+ constructor(affixService, changeDetector, dragulaService, gridAdapter, overlayService, skyWindow, uiConfigService, logger) {
373
+ this.affixService = affixService;
374
+ this.changeDetector = changeDetector;
375
+ this.dragulaService = dragulaService;
376
+ this.gridAdapter = gridAdapter;
377
+ this.overlayService = overlayService;
378
+ this.skyWindow = skyWindow;
379
+ this.uiConfigService = uiConfigService;
380
+ /**
381
+ * Indicates whether to enable the multiselect feature to display a column of
382
+ * checkboxes on the left side of the grid. You can specify a unique ID with
383
+ * the `multiselectRowId` property, but multiselect defaults to the `id` property on
384
+ * the `data` object.
385
+ * @default false
386
+ */
387
+ this.enableMultiselect = false;
388
+ /**
389
+ * Specifies how the grid fits to its parent. The valid options are `width`,
390
+ * which fits the grid to the parent's full width, and `scroll`, which allows the grid
391
+ * to exceed the parent's width. If the grid does not have enough columns to fill
392
+ * the parent's width, it always stretches to the parent's full width.
393
+ * @default "width"
394
+ */
395
+ this.fit = 'width';
396
+ /**
397
+ * Indicates whether to display a toolbar with the grid.
398
+ */
399
+ this.hasToolbar = false;
400
+ /**
401
+ * Provides an observable to send commands to the grid.
402
+ */
403
+ this.messageStream = new Subject();
404
+ /**
405
+ * Fires when the width of a column changes.
406
+ */
407
+ this.columnWidthChange = new EventEmitter();
408
+ /**
409
+ * Fires when the selection of multiselect checkboxes changes.
410
+ * Emits an array of IDs for the selected rows based on the `multiselectRowId` property
411
+ * that the consumer provides.
412
+ */
413
+ this.multiselectSelectionChange = new EventEmitter();
414
+ /**
415
+ * @internal
416
+ */
417
+ this.rowDeleteCancel = new EventEmitter();
418
+ /**
419
+ * @internal
420
+ */
421
+ this.rowDeleteConfirm = new EventEmitter();
422
+ /**
423
+ * Fires when the columns to display in the grid change or when the order of the columns changes.
424
+ * The event emits an array of IDs for the displayed columns that reflects the column order.
425
+ */
426
+ this.selectedColumnIdsChange = new EventEmitter();
427
+ /**
428
+ * Fires when the active sort field changes.
429
+ */
430
+ this.sortFieldChange = new EventEmitter();
431
+ this.columnResizeStep = 10;
432
+ this.gridId = ++nextId;
433
+ this.rowDeleteConfigs = [];
434
+ this.maxColWidth = 9999; // This is an arbitrary number, as the input range picker won't work without a value.
435
+ this.minColWidth = 50;
436
+ this.showResizeBar = false;
437
+ this.showTopScroll = false;
438
+ this.isDraggingResizeHandle = false;
439
+ this.isResized = false;
440
+ this.ngUnsubscribe = new Subject();
441
+ this.rowDeleteContents = {};
442
+ this.subscriptions = [];
443
+ this.scrollTriggered = false;
444
+ this.selectedColumnIdsSet = false;
445
+ logger.deprecated('SkyGridComponent', {
446
+ deprecationMajorVersion: 6,
447
+ moreInfoUrl: 'https://developer.blackbaud.com/skyux/components/data-grid',
448
+ replacementRecommendation: 'Use data grid instead.',
449
+ });
450
+ this.displayedColumns = new Array();
451
+ this.items = new Array();
452
+ this.currentSortField = new BehaviorSubject({
453
+ fieldSelector: '',
454
+ descending: false,
455
+ });
456
+ this.dragulaGroupName = `sky-grids-group-${this.gridId}`;
457
+ }
458
+ /**
459
+ * Specifies columns and column properties for the grid.
460
+ */
461
+ set columns(newColumns) {
462
+ const oldColumns = this.columns;
463
+ this._columns = newColumns;
464
+ if (oldColumns) {
465
+ this.transferColumnWidths(oldColumns, this.columns);
466
+ this.isResized = false;
467
+ this.setDisplayedColumns(true);
468
+ }
469
+ this.changeDetector.markForCheck();
470
+ }
471
+ get columns() {
472
+ return this._columns;
473
+ }
474
+ /**
475
+ * Specifies the columns to display in the grid based on the `id` or `field` properties
476
+ * of the columns. If no columns are specified, then the grid displays all columns.
477
+ */
478
+ set selectedColumnIds(value) {
479
+ const currentIds = this._selectedColumnIds;
480
+ this._selectedColumnIds = value;
481
+ if (this.columns) {
482
+ this.setDisplayedColumns();
483
+ }
484
+ // Ensure that the ids have changed.
485
+ if (!currentIds || !value || !this.arraysEqual(value, currentIds)) {
486
+ // This variable ensures that we do not set user config options or fire the change event
487
+ // on the first time that the columns are set up
488
+ if (this.selectedColumnIdsSet) {
489
+ this.setUserConfig({
490
+ selectedColumnIds: value,
491
+ });
492
+ this.selectedColumnIdsChange.emit(this._selectedColumnIds);
493
+ if (this.isResized) {
494
+ this.resetTableWidth();
495
+ }
496
+ }
497
+ }
498
+ this.selectedColumnIdsSet = true;
499
+ }
500
+ get selectedColumnIds() {
501
+ return this._selectedColumnIds;
502
+ }
503
+ /**
504
+ * Specifies a set of IDs for the rows to select in a multiselect grid.
505
+ * The IDs match the `id` properties of the `data` objects.
506
+ * Rows with IDs that are not included are de-selected in the grid.
507
+ */
508
+ set selectedRowIds(value) {
509
+ if (value) {
510
+ this._selectedRowIds = value;
511
+ this.applySelectedRows();
512
+ this.emitSelectedRows(SkyGridSelectedRowsSource.SelectedRowIdsChange);
513
+ }
514
+ }
515
+ get selectedRowIds() {
516
+ return this._selectedRowIds;
517
+ }
518
+ get tableWidth() {
519
+ return this.tableElementRef.nativeElement.offsetWidth;
520
+ }
521
+ ngOnInit() {
522
+ this.messageStream
523
+ .pipe(takeUntil(this.ngUnsubscribe))
524
+ .subscribe((message) => {
525
+ this.handleIncomingMessages(message);
526
+ });
527
+ }
528
+ ngAfterContentInit() {
529
+ if (this.settingsKey) {
530
+ this.applyUserConfig().then(() => {
531
+ this.initColumns();
532
+ });
533
+ }
534
+ else {
535
+ this.initColumns();
536
+ }
537
+ // Setup column drag-and-drop.
538
+ this.gridAdapter.initializeDragAndDrop(this.dragulaGroupName, this.dragulaService, (selectedColumnIds) => {
539
+ this.onHeaderDrop(selectedColumnIds);
540
+ });
541
+ this.applySelectedRows();
542
+ }
543
+ ngAfterViewInit() {
544
+ this.checkUserColumnWidthsForScroll();
545
+ }
546
+ ngOnChanges(changes) {
547
+ if (changes.columns && this.columns) {
548
+ if (this.selectedColumnIds) {
549
+ this.selectedColumnIds = this.selectedColumnIds.filter((columnId) => {
550
+ return this.columns.find((column) => column.id === columnId);
551
+ });
552
+ }
553
+ this.setDisplayedColumns(true);
554
+ }
555
+ if (changes.data && this.data) {
556
+ this.transformData();
557
+ // This set timeout is necessary to ensure the data has rendered in the grid
558
+ setTimeout(() => {
559
+ // This cleans up any lingering row deletes for items that have been removed.
560
+ Object.keys(this.rowDeleteContents).forEach((id) => {
561
+ if (!this.data.find((item) => item.id === id)) {
562
+ this.destroyRowDelete(id);
563
+ }
564
+ else {
565
+ // The rows re-render thus messing up the affixers. We must reaffix them so that things
566
+ // continue to render correctly.
567
+ const rowElement = this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + id + '"]');
568
+ this.rowDeleteContents[id].affixer.affixTo(rowElement, {
569
+ autoFitContext: SkyAffixAutoFitContext.Viewport,
570
+ isSticky: true,
571
+ placement: 'above',
572
+ verticalAlignment: 'top',
573
+ horizontalAlignment: 'left',
574
+ enableAutoFit: false,
575
+ });
576
+ }
577
+ });
578
+ this.checkUserColumnWidthsForScroll();
579
+ });
580
+ }
581
+ if (changes.sortField) {
582
+ this.setSortHeaders();
583
+ }
584
+ }
585
+ ngOnDestroy() {
586
+ this.subscriptions.forEach((subscription) => {
587
+ subscription.unsubscribe();
588
+ });
589
+ this.multiselectSelectionChange.complete();
590
+ this.ngUnsubscribe.next();
591
+ this.ngUnsubscribe.complete();
592
+ Object.keys(this.rowDeleteContents).forEach((id) => {
593
+ this.destroyRowDelete(id);
594
+ });
595
+ this.dragulaService.destroy(this.dragulaGroupName);
596
+ }
597
+ onWindowResize() {
598
+ this.checkUserColumnWidthsForScroll();
599
+ }
600
+ getTopScrollWidth() {
601
+ return this.tableElementRef.nativeElement.scrollWidth;
602
+ }
603
+ getTableClassNames() {
604
+ const classNames = [];
605
+ if (this.fit !== 'scroll') {
606
+ classNames.push('sky-grid-fit');
607
+ }
608
+ if (this.hasToolbar) {
609
+ classNames.push('sky-grid-has-toolbar');
610
+ }
611
+ return this.addDelimeter(classNames, ' ');
612
+ }
613
+ getTableHeaderClassNames(column) {
614
+ const classNames = [];
615
+ if (column && column.locked) {
616
+ classNames.push('sky-grid-header-locked');
617
+ }
618
+ return this.addDelimeter(classNames, ' ');
619
+ }
620
+ getCaretIconNames(column) {
621
+ const iconNames = [];
622
+ this.getSortDirection(column.field).subscribe((sortDir) => {
623
+ if (sortDir === 'asc') {
624
+ iconNames.push('caret-up');
625
+ }
626
+ if (sortDir === 'desc') {
627
+ iconNames.push('caret-down');
628
+ }
629
+ });
630
+ return this.addDelimeter(iconNames, ' ');
631
+ }
632
+ onKeydown(event, column) {
633
+ const key = event.key.toLowerCase();
634
+ if (key === 'enter' || key === ' ') {
635
+ this.sortByColumn(column);
636
+ }
637
+ }
638
+ sortByColumn(column) {
639
+ if (!this.isDraggingResizeHandle && column.isSortable) {
640
+ this.currentSortField
641
+ .pipe(take(1), map((field) => {
642
+ let selector = {
643
+ fieldSelector: column.field,
644
+ descending: true,
645
+ };
646
+ if (field &&
647
+ field.fieldSelector === column.field &&
648
+ field.descending) {
649
+ selector = {
650
+ fieldSelector: column.field,
651
+ descending: false,
652
+ };
653
+ }
654
+ this.sortFieldChange.emit(selector);
655
+ this.currentSortField.next(selector);
656
+ }))
657
+ .subscribe();
658
+ }
659
+ }
660
+ getSortDirection(columnField) {
661
+ return this.currentSortField.pipe(distinctUntilChanged(), map((field) => {
662
+ return field.fieldSelector === columnField
663
+ ? field.descending
664
+ ? 'desc'
665
+ : 'asc'
666
+ : undefined;
667
+ }));
668
+ }
669
+ getAriaSortDirection(column) {
670
+ return this.currentSortField.pipe(distinctUntilChanged(), map((field) => {
671
+ return field.fieldSelector === column.field
672
+ ? field.descending
673
+ ? 'descending'
674
+ : 'ascending'
675
+ : column.isSortable
676
+ ? 'none'
677
+ : undefined;
678
+ }));
679
+ }
680
+ getCaretVisibility(columnField) {
681
+ return this.currentSortField.pipe(distinctUntilChanged(), map((field) => {
682
+ return field.fieldSelector === columnField ? 'visible' : 'hidden';
683
+ }));
684
+ }
685
+ getHelpInlineClass(columnField) {
686
+ return this.getCaretVisibility(columnField).pipe(map((visibility) => {
687
+ return visibility === 'hidden';
688
+ }));
689
+ }
690
+ onMultiselectCheckboxChange() {
691
+ this.emitSelectedRows(SkyGridSelectedRowsSource.CheckboxChange);
692
+ }
693
+ updateColumnHeading(change) {
694
+ const foundColumnModel = this.columns.find((column) => {
695
+ return ((change.id !== undefined && change.id === column.id) ||
696
+ (change.field !== undefined && change.field === column.field));
697
+ });
698
+ /* istanbul ignore else */
699
+ if (foundColumnModel) {
700
+ foundColumnModel.heading = change.value;
701
+ this.changeDetector.markForCheck();
702
+ }
703
+ }
704
+ updateInlineHelpPopover(change) {
705
+ const foundColumnModel = this.columns.find((column) => {
706
+ return ((change.id !== undefined && change.id === column.id) ||
707
+ (change.field !== undefined && change.field === column.field));
708
+ });
709
+ /* istanbul ignore else */
710
+ if (foundColumnModel) {
711
+ foundColumnModel.inlineHelpPopover = change.value;
712
+ this.changeDetector.markForCheck();
713
+ }
714
+ }
715
+ updateColumnDescription(change) {
716
+ const foundColumnModel = this.columns.find((column) => {
717
+ return ((change.id !== undefined && change.id === column.id) ||
718
+ (change.field !== undefined && change.field === column.field));
719
+ });
720
+ /* istanbul ignore else */
721
+ if (foundColumnModel) {
722
+ foundColumnModel.description = change.value;
723
+ this.changeDetector.markForCheck();
724
+ }
725
+ }
726
+ onResizeColumnStart(event) {
727
+ // If this table hasn't been resized, initialize all the resize widths.
728
+ if (!this.isResized) {
729
+ this.initColumnWidths();
730
+ this.isResized = true;
731
+ }
732
+ this.initializeResizeColumn(event);
733
+ this.isDraggingResizeHandle = true;
734
+ this.xPosStart = event.pageX;
735
+ this.showResizeBar = true;
736
+ // Show visual indicator of where mouse is dragging (resizeBar).
737
+ this.changeDetector.detectChanges();
738
+ this.setResizeBarPosition(event.pageX);
739
+ event.preventDefault();
740
+ event.stopPropagation();
741
+ const mouseMoveEvent = fromEvent(document, 'mousemove');
742
+ const touchMoveEvent = fromEvent(document, 'touchmove');
743
+ merge(mouseMoveEvent, touchMoveEvent)
744
+ .pipe(takeWhile(() => {
745
+ return this.isDraggingResizeHandle;
746
+ }))
747
+ .subscribe((moveEvent) => {
748
+ this.onResizeHandleMove(moveEvent);
749
+ });
750
+ const mouseUpEvent = fromEvent(document, 'mouseup');
751
+ const touchEndEvent = fromEvent(document, 'touchend');
752
+ merge(mouseUpEvent, touchEndEvent)
753
+ .pipe(takeWhile(() => {
754
+ return this.isDraggingResizeHandle;
755
+ }))
756
+ .subscribe((endEvent) => {
757
+ this.onResizeHandleRelease(endEvent);
758
+ });
759
+ }
760
+ onKeydownResizeCol(event) {
761
+ // If this table hasn't been resized, initialize all the resize widths.
762
+ if (!this.isResized) {
763
+ this.initColumnWidths();
764
+ this.isResized = true;
765
+ }
766
+ this.initializeResizeColumn(event);
767
+ }
768
+ onInputChangeResizeCol(event) {
769
+ const input = event.target;
770
+ const newValue = Number(input.value);
771
+ const deltaX = newValue - this.startColumnWidth;
772
+ this.resizeColumnByIndex(this.activeResizeColumnIndex, newValue, deltaX);
773
+ const left = input.getBoundingClientRect().left;
774
+ this.setResizeBarPosition(left);
775
+ }
776
+ onResizeHandleMove(event) {
777
+ const deltaX = event.pageX - this.xPosStart;
778
+ const newColWidth = this.startColumnWidth + deltaX;
779
+ if (newColWidth <= this.minColWidth) {
780
+ event.stopPropagation();
781
+ return;
782
+ }
783
+ const max = this.getMaxRangeByIndex(this.activeResizeColumnIndex);
784
+ if (this.fit === 'width' && newColWidth > max) {
785
+ event.stopPropagation();
786
+ return;
787
+ }
788
+ this.setResizeBarPosition(event.pageX);
789
+ }
790
+ onResizeHandleBlur(event) {
791
+ this.showResizeBar = false;
792
+ }
793
+ onResizeHandleFocus(event) {
794
+ this.showResizeBar = true;
795
+ this.changeDetector.detectChanges();
796
+ const target = event.target;
797
+ const left = target.getBoundingClientRect().left;
798
+ this.setResizeBarPosition(left);
799
+ }
800
+ onResizeHandleRelease(event) {
801
+ this.showResizeBar = false;
802
+ const deltaX = event.pageX - this.xPosStart;
803
+ const newColWidth = this.startColumnWidth + deltaX;
804
+ this.resizeColumnByIndex(this.activeResizeColumnIndex, newColWidth, deltaX);
805
+ this.isDraggingResizeHandle = false;
806
+ this.activeResizeColumnIndex = undefined;
807
+ event.stopPropagation();
808
+ this.changeDetector.markForCheck();
809
+ }
810
+ onRowClick(event, selectedItem) {
811
+ /* istanbul ignore else */
812
+ if (this.enableMultiselect) {
813
+ if (event.target === event.currentTarget ||
814
+ !this.isInteractiveElement(event)) {
815
+ selectedItem.isSelected = !selectedItem.isSelected;
816
+ this.changeDetector.markForCheck();
817
+ this.emitSelectedRows(SkyGridSelectedRowsSource.RowClick);
818
+ }
819
+ }
820
+ }
821
+ isRowHighlighted(id) {
822
+ if (this.rowHighlightedId) {
823
+ return id === this.rowHighlightedId;
824
+ }
825
+ return false;
826
+ }
827
+ getRowHeight(index) {
828
+ return this.gridAdapter.getRowHeight(this.tableElementRef, index);
829
+ }
830
+ cancelRowDelete(id) {
831
+ this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== id);
832
+ this.rowDeleteCancel.emit({ id: id });
833
+ this.destroyRowDelete(id);
834
+ }
835
+ confirmRowDelete(id) {
836
+ this.rowDeleteConfigs.find((config) => config.id === id).pending = true;
837
+ this.rowDeleteConfirm.emit({ id: id });
838
+ }
839
+ getRowDeleteItem(id) {
840
+ return this.rowDeleteConfigs.find((rowDelete) => rowDelete.id === id);
841
+ }
842
+ // Prevent touch devices from inadvertently scrolling grid while dragging columns.
843
+ onTouchMove(event) {
844
+ event.preventDefault();
845
+ }
846
+ onTopScroll(event) {
847
+ /* sanity check */
848
+ /* istanbul ignore else */
849
+ if (this.tableContainerElementRef) {
850
+ if (this.scrollTriggered) {
851
+ this.scrollTriggered = false;
852
+ this.tableContainerElementRef.nativeElement.scrollLeft =
853
+ this.topScrollContainerElementRef.nativeElement.scrollLeft;
854
+ }
855
+ else {
856
+ this.scrollTriggered = true;
857
+ }
858
+ }
859
+ }
860
+ onGridScroll(event) {
861
+ /* sanity check */
862
+ /* istanbul ignore else */
863
+ if (this.topScrollContainerElementRef) {
864
+ if (this.scrollTriggered) {
865
+ this.scrollTriggered = false;
866
+ this.topScrollContainerElementRef.nativeElement.scrollLeft =
867
+ this.tableContainerElementRef.nativeElement.scrollLeft;
868
+ }
869
+ else {
870
+ this.scrollTriggered = true;
871
+ }
872
+ }
873
+ }
874
+ checkUserColumnWidthsForScroll() {
875
+ if (!this.showTopScroll &&
876
+ this.columnElementRefs &&
877
+ this.columnElementRefs.length > 0) {
878
+ let columnsWidthTotal = 0;
879
+ const windowSize = this.skyWindow.nativeWindow.innerWidth;
880
+ this.columnElementRefs.forEach((col) => {
881
+ if (!this.showTopScroll) {
882
+ const computedWidth = parseFloat(window.getComputedStyle(col.nativeElement).width);
883
+ const offsetWidth = col.nativeElement.offsetWidth;
884
+ const width = Math.max(computedWidth || offsetWidth, this.minColWidth);
885
+ columnsWidthTotal = columnsWidthTotal + width;
886
+ if (columnsWidthTotal > windowSize) {
887
+ this.showTopScroll = true;
888
+ setTimeout(() => {
889
+ this.changeDetector.markForCheck();
890
+ });
891
+ }
892
+ }
893
+ });
894
+ }
895
+ }
896
+ multiselectSelectAll() {
897
+ for (let i = 0; i < this.items.length; i++) {
898
+ this.items[i].isSelected = true;
899
+ }
900
+ this.changeDetector.markForCheck();
901
+ this.emitSelectedRows(SkyGridSelectedRowsSource.SelectAll);
902
+ }
903
+ multiselectClearAll() {
904
+ for (let i = 0; i < this.items.length; i++) {
905
+ this.items[i].isSelected = false;
906
+ }
907
+ this.changeDetector.markForCheck();
908
+ this.emitSelectedRows(SkyGridSelectedRowsSource.ClearAll);
909
+ }
910
+ handleIncomingMessages(message) {
911
+ switch (message.type) {
912
+ case SkyGridMessageType.SelectAll:
913
+ this.multiselectSelectAll();
914
+ break;
915
+ case SkyGridMessageType.ClearAll:
916
+ this.multiselectClearAll();
917
+ break;
918
+ case SkyGridMessageType.PromptDeleteRow:
919
+ /* sanity check */
920
+ /* istanbul ignore else */
921
+ if (message.data && message.data.promptDeleteRow) {
922
+ const existingConfig = this.rowDeleteConfigs.find((config) => config.id === message.data.promptDeleteRow.id);
923
+ if (existingConfig) {
924
+ existingConfig.pending = false;
925
+ }
926
+ else {
927
+ this.rowDeleteConfigs.push({
928
+ id: message.data.promptDeleteRow.id,
929
+ pending: false,
930
+ });
931
+ const overlay = this.overlayService.create({
932
+ enableScroll: true,
933
+ showBackdrop: false,
934
+ closeOnNavigation: true,
935
+ enableClose: false,
936
+ enablePointerEvents: true,
937
+ });
938
+ overlay.attachTemplate(this.inlineDeleteTemplateRef, {
939
+ $implicit: this.data.find((item) => item.id === message.data.promptDeleteRow.id),
940
+ });
941
+ /**
942
+ * We are manually setting the z-index here because overlays will always be on top of
943
+ * the omnibar. This manual setting is 1 less than the omnibar's z-index of 1000. We
944
+ * discussed changing the overlay service to allow for this but decided against that
945
+ * change at this time due to its niche nature.
946
+ */
947
+ overlay.componentRef.instance.zIndex = '999';
948
+ setTimeout(() => {
949
+ const inlineDeleteRef = this.inlineDeleteRefs
950
+ .toArray()
951
+ .find((elRef) => {
952
+ return (elRef.nativeElement.id ===
953
+ 'row-delete-ref-' + message.data.promptDeleteRow.id);
954
+ });
955
+ const affixer = this.affixService.createAffixer(inlineDeleteRef);
956
+ const rowElement = this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + message.data.promptDeleteRow.id + '"]');
957
+ affixer.affixTo(rowElement, {
958
+ autoFitContext: SkyAffixAutoFitContext.Viewport,
959
+ isSticky: true,
960
+ placement: 'above',
961
+ verticalAlignment: 'top',
962
+ horizontalAlignment: 'left',
963
+ enableAutoFit: false,
964
+ });
965
+ this.rowDeleteContents[message.data.promptDeleteRow.id] = {
966
+ affixer: affixer,
967
+ overlay: overlay,
968
+ };
969
+ });
970
+ }
971
+ }
972
+ break;
973
+ case SkyGridMessageType.AbortDeleteRow:
974
+ /* sanity check */
975
+ /* istanbul ignore else */
976
+ if (message.data && message.data.abortDeleteRow) {
977
+ this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== message.data.abortDeleteRow.id);
978
+ this.destroyRowDelete(message.data.abortDeleteRow.id);
979
+ }
980
+ break;
981
+ }
982
+ this.changeDetector.markForCheck();
983
+ }
984
+ onHeaderDrop(newColumnIds) {
985
+ // update selected columnIds
986
+ this.selectedColumnIdsSet = true;
987
+ this.selectedColumnIds = newColumnIds;
988
+ // mark for check because we are using ChangeDetectionStrategy.onPush
989
+ this.changeDetector.markForCheck();
990
+ }
991
+ setDisplayedColumns(respectHidden = false) {
992
+ /* sanity check */
993
+ /* istanbul ignore else */
994
+ if (this.columns) {
995
+ if (this.selectedColumnIds !== undefined) {
996
+ // setup displayed columns
997
+ this.displayedColumns = this.selectedColumnIds
998
+ .filter((columnId) => {
999
+ return this.columns.find((column) => column.id === columnId);
1000
+ })
1001
+ .map((columnId) => {
1002
+ return this.columns.filter((column) => column.id === columnId)[0];
1003
+ });
1004
+ }
1005
+ else if (respectHidden) {
1006
+ this.displayedColumns = this.columns.filter((column) => {
1007
+ return !column.hidden;
1008
+ });
1009
+ }
1010
+ else {
1011
+ this.displayedColumns = this.columns;
1012
+ }
1013
+ }
1014
+ }
1015
+ transformData() {
1016
+ // Transform data into object with id and data properties
1017
+ if (this.data &&
1018
+ this.data.length > 0 &&
1019
+ this.data[0].id &&
1020
+ !this.data[0].data) {
1021
+ if (this.multiselectRowId) {
1022
+ this.items = this.getGridDataWithSelectedRows();
1023
+ }
1024
+ else {
1025
+ this.items = this.data.map((item) => new ListItemModel(item.id, item));
1026
+ }
1027
+ }
1028
+ else {
1029
+ this.items = this.data;
1030
+ }
1031
+ }
1032
+ getGridDataWithSelectedRows() {
1033
+ const selectedRows = this.getSelectedRows();
1034
+ return this.data.map((item) => {
1035
+ let checked;
1036
+ if (Object.prototype.hasOwnProperty.call(item, this.multiselectRowId)) {
1037
+ checked = selectedRows.indexOf(item[this.multiselectRowId]) > -1;
1038
+ }
1039
+ else {
1040
+ checked = selectedRows.indexOf(item.id) > -1;
1041
+ }
1042
+ return new ListItemModel(item.id, item, checked);
1043
+ });
1044
+ }
1045
+ applySelectedRows() {
1046
+ if (this.items && this.items.length > 0 && this.selectedRowIds) {
1047
+ for (let i = 0; i < this.items.length; i++) {
1048
+ this.items[i].isSelected =
1049
+ this.selectedRowIds.indexOf(this.items[i].id) > -1;
1050
+ }
1051
+ this.changeDetector.markForCheck();
1052
+ }
1053
+ }
1054
+ setSortHeaders() {
1055
+ this.currentSortField.next(this.sortField || { fieldSelector: '', descending: false });
1056
+ }
1057
+ getColumnsFromComponent() {
1058
+ this.columns = this.columnComponents.map((columnComponent) => {
1059
+ return new SkyGridColumnModel(columnComponent.template, columnComponent);
1060
+ });
1061
+ }
1062
+ updateColumns() {
1063
+ this.getColumnsFromComponent();
1064
+ // This set timeout is necessary to ensure the columns have rendered in the grid
1065
+ setTimeout(() => {
1066
+ this.checkUserColumnWidthsForScroll();
1067
+ });
1068
+ }
1069
+ resizeColumnByIndex(columnIndex, newColWidth, deltaX) {
1070
+ const column = this.getColumnModelByIndex(columnIndex);
1071
+ // Prevent accidental shrinkage below minimum width.
1072
+ if (newColWidth <= this.minColWidth) {
1073
+ deltaX = deltaX + this.minColWidth - newColWidth;
1074
+ newColWidth = this.minColWidth;
1075
+ }
1076
+ // fit=width adds/removes width from the last column
1077
+ // fit=scroll adds/removes width from the table
1078
+ if (this.fit === 'width') {
1079
+ const lastColumn = this.getLastDisplayedColumn();
1080
+ // Prevent accidental growth that would bump last column off screen.
1081
+ const max = this.getMaxRangeByIndex(columnIndex);
1082
+ if (newColWidth > max) {
1083
+ newColWidth = max;
1084
+ deltaX = max - this.startColumnWidth;
1085
+ }
1086
+ column.width = newColWidth;
1087
+ lastColumn.width = lastColumn.width - deltaX;
1088
+ this.updateMaxRange();
1089
+ }
1090
+ else {
1091
+ this.gridAdapter.setStyle(this.tableElementRef, 'width', `${this.tableWidth + deltaX}px`);
1092
+ column.width = newColWidth;
1093
+ }
1094
+ this.changeDetector.detectChanges();
1095
+ this.columnWidthChange.emit(this.getColumnWidthModelChange());
1096
+ }
1097
+ initColumnWidths() {
1098
+ // Establish table width.
1099
+ this.showTopScroll = true;
1100
+ // Set column widths based on the width initially given by the browser.
1101
+ // computedWidth prevents accidental overflow for browsers with sub-pixel widths.
1102
+ this.columnElementRefs.forEach((col, index) => {
1103
+ const computedWidth = parseFloat(window.getComputedStyle(col.nativeElement).width);
1104
+ const offsetWidth = col.nativeElement.offsetWidth;
1105
+ /* istanbul ignore next */
1106
+ this.getColumnModelByIndex(index).width = Math.max(computedWidth || offsetWidth, this.minColWidth);
1107
+ });
1108
+ // 'scroll' tables should be allowed to expand outside of their constraints.
1109
+ if (this.fit === 'scroll') {
1110
+ this.gridAdapter.setStyle(this.tableElementRef, 'min-width', 'auto');
1111
+ }
1112
+ // Update max limits for input ranges.
1113
+ if (this.fit === 'width') {
1114
+ this.updateMaxRange();
1115
+ }
1116
+ this.changeDetector.detectChanges();
1117
+ }
1118
+ transferColumnWidths(oldColumns, newColumns) {
1119
+ /* sanity check */
1120
+ /* istanbul ignore else */
1121
+ if (oldColumns && newColumns) {
1122
+ for (const oldColumn of oldColumns) {
1123
+ if (oldColumn.width) {
1124
+ const matchingColumn = newColumns.find((newColumn) => oldColumn.id === newColumn.id);
1125
+ if (matchingColumn && !matchingColumn.width) {
1126
+ matchingColumn.width = oldColumn.width;
1127
+ }
1128
+ }
1129
+ }
1130
+ }
1131
+ this.changeDetector.markForCheck();
1132
+ }
1133
+ getColumnWidthModelChange() {
1134
+ const columnWidthModelChange = new Array();
1135
+ this.columns.forEach((column) => {
1136
+ columnWidthModelChange.push({
1137
+ id: column.id,
1138
+ field: column.field,
1139
+ width: column.width,
1140
+ });
1141
+ });
1142
+ return columnWidthModelChange;
1143
+ }
1144
+ updateMaxRange() {
1145
+ const leftoverWidth = this.getLastDisplayedColumn().width - this.minColWidth;
1146
+ this.displayedColumns.forEach((column, index) => {
1147
+ const newMaxRange = column.width + leftoverWidth;
1148
+ const rangeInput = this.getRangeInputByIndex(index);
1149
+ rangeInput.nativeElement.max = newMaxRange;
1150
+ rangeInput.nativeElement.setAttribute('aria-valuemax', newMaxRange);
1151
+ });
1152
+ }
1153
+ initializeResizeColumn(event) {
1154
+ const clickTarget = event.target;
1155
+ this.activeResizeColumnIndex = clickTarget.getAttribute('sky-cmp-index');
1156
+ const column = this.getColumnModelByIndex(this.activeResizeColumnIndex);
1157
+ this.startColumnWidth = column.width;
1158
+ }
1159
+ resetTableWidth() {
1160
+ this.skyWindow.nativeWindow.setTimeout(() => {
1161
+ this.gridAdapter.setStyle(this.tableElementRef, 'width', `auto`);
1162
+ this.changeDetector.detectChanges();
1163
+ this.gridAdapter.setStyle(this.tableElementRef, 'width', `${this.tableWidth}px`);
1164
+ this.changeDetector.detectChanges();
1165
+ });
1166
+ }
1167
+ getRangeInputByIndex(index) {
1168
+ return this.columnRangeInputElementRefs.find((input) => input.nativeElement.getAttribute('sky-cmp-index') === index.toString());
1169
+ }
1170
+ getColumnModelByIndex(index) {
1171
+ return this.displayedColumns[Number(index)];
1172
+ }
1173
+ getMaxRangeByIndex(index) {
1174
+ const columnElementRef = this.columnElementRefs.find((th) => th.nativeElement.getAttribute('sky-cmp-index') === index);
1175
+ const rangeInput = columnElementRef.nativeElement.querySelector('.sky-grid-column-input-aria-only');
1176
+ return Number(rangeInput.max);
1177
+ }
1178
+ getLastDisplayedColumn() {
1179
+ return this.getColumnModelByIndex(this.displayedColumns.length - 1);
1180
+ }
1181
+ addDelimeter(text, delimiter) {
1182
+ return text.filter((val) => val).join(delimiter);
1183
+ }
1184
+ destroyRowDelete(id) {
1185
+ const rowDeleteContents = this.rowDeleteContents[id];
1186
+ /* istanbul ignore else */
1187
+ if (rowDeleteContents) {
1188
+ rowDeleteContents.affixer.destroy();
1189
+ this.overlayService.close(rowDeleteContents.overlay);
1190
+ delete this.rowDeleteContents[id];
1191
+ }
1192
+ }
1193
+ emitSelectedRows(source) {
1194
+ const selectedRows = {
1195
+ selectedRowIds: this.getSelectedRows(),
1196
+ source: source,
1197
+ };
1198
+ this.multiselectSelectionChange.emit(selectedRows);
1199
+ }
1200
+ getSelectedRows() {
1201
+ return this.items
1202
+ .filter((item) => {
1203
+ return item.isSelected;
1204
+ })
1205
+ .map((item) => {
1206
+ if (Object.prototype.hasOwnProperty.call(item.data, this.multiselectRowId)) {
1207
+ return item.data[this.multiselectRowId];
1208
+ }
1209
+ return item.id;
1210
+ });
1211
+ }
1212
+ isInteractiveElement(event) {
1213
+ const interactiveElSelectors = `
1214
+ a,
1215
+ button,
1216
+ input,
1217
+ label,
1218
+ option,
1219
+ select,
1220
+ textarea,
1221
+ details,
1222
+ dialog,
1223
+ menu,
1224
+ menuitem,
1225
+ summary`;
1226
+ return event.target.closest(interactiveElSelectors);
1227
+ }
1228
+ setResizeBarPosition(xPosition) {
1229
+ const parentScroll = this.tableContainerElementRef.nativeElement.scrollLeft;
1230
+ const resizeBarX = xPosition -
1231
+ this.tableElementRef.nativeElement.getBoundingClientRect().left -
1232
+ parentScroll;
1233
+ this.gridAdapter.setStyle(this.resizeBar, 'left', resizeBarX + 'px');
1234
+ }
1235
+ applyUserConfig() {
1236
+ return new Promise((resolve) => {
1237
+ this.uiConfigService
1238
+ .getConfig(this.settingsKey)
1239
+ .pipe(take(1))
1240
+ .subscribe((config) => {
1241
+ /* istanbul ignore else */
1242
+ if (config && config.selectedColumnIds) {
1243
+ // Remove any columnIds that don't exist in the current data set.
1244
+ this.selectedColumnIds = config.selectedColumnIds.filter((id) => this.columns.find((column) => column.id === id));
1245
+ this.changeDetector.markForCheck();
1246
+ }
1247
+ resolve();
1248
+ }, () => {
1249
+ resolve();
1250
+ });
1251
+ });
1252
+ }
1253
+ setUserConfig(config) {
1254
+ if (!this.settingsKey) {
1255
+ return;
1256
+ }
1257
+ this.uiConfigService
1258
+ .setConfig(this.settingsKey, config)
1259
+ .pipe(takeUntil(this.ngUnsubscribe))
1260
+ .subscribe(
1261
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1262
+ () => { }, (err) => {
1263
+ console.warn('Could not save grid settings.');
1264
+ console.warn(err);
1265
+ });
1266
+ }
1267
+ initColumns() {
1268
+ /* istanbul ignore else */
1269
+ if (this.columnComponents.length !== 0 || this.columns !== undefined) {
1270
+ /* istanbul ignore else */
1271
+ /* sanity check */
1272
+ if (this.columnComponents.length > 0) {
1273
+ this.getColumnsFromComponent();
1274
+ }
1275
+ this.transformData();
1276
+ this.setDisplayedColumns(true);
1277
+ this.changeDetector.markForCheck();
1278
+ }
1279
+ // Watch for added/removed columns:
1280
+ this.subscriptions.push(this.columnComponents.changes.subscribe(() => this.updateColumns()));
1281
+ // Watch for column heading changes:
1282
+ this.columnComponents.forEach((comp) => {
1283
+ this.subscriptions.push(comp.headingModelChanges.subscribe((change) => {
1284
+ this.updateColumnHeading(change);
1285
+ }));
1286
+ this.subscriptions.push(comp.descriptionModelChanges.subscribe((change) => {
1287
+ this.updateColumnDescription(change);
1288
+ }));
1289
+ this.subscriptions.push(comp.inlineHelpPopoverModelChanges.subscribe((change) => {
1290
+ this.updateInlineHelpPopover(change);
1291
+ }));
1292
+ });
1293
+ }
1294
+ arraysEqual(arrayA, arrayB) {
1295
+ return (arrayA.length === arrayB.length &&
1296
+ arrayA.every((value, index) => value === arrayB[index]));
1297
+ }
1298
+ }
1299
+ SkyGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", 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 }, { token: i1.SkyLogService }], target: i0.ɵɵFactoryTarget.Component });
1300
+ SkyGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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]=\"dragulaGroupName\">\n <th\n *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\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.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"], outputs: ["dragulaModelChange"] }, { 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 });
1301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridComponent, decorators: [{
1302
+ type: Component,
1303
+ args: [{ selector: 'sky-grid', viewProviders: [DragulaService], providers: [SkyGridAdapterService], changeDetection: ChangeDetectionStrategy.OnPush, 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]=\"dragulaGroupName\">\n <th\n *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\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.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"] }]
1304
+ }], ctorParameters: function () { return [{ type: i1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i2.DragulaService }, { type: SkyGridAdapterService }, { type: i1.SkyOverlayService }, { type: i1.SkyAppWindowRef }, { type: i1.SkyUIConfigService }, { type: i1.SkyLogService }]; }, propDecorators: { columns: [{
1305
+ type: Input
1306
+ }], data: [{
1307
+ type: Input
1308
+ }], enableMultiselect: [{
1309
+ type: Input
1310
+ }], fit: [{
1311
+ type: Input
1312
+ }], hasToolbar: [{
1313
+ type: Input
1314
+ }], height: [{
1315
+ type: Input
1316
+ }], highlightText: [{
1317
+ type: Input
1318
+ }], messageStream: [{
1319
+ type: Input
1320
+ }], multiselectRowId: [{
1321
+ type: Input
1322
+ }], rowHighlightedId: [{
1323
+ type: Input
1324
+ }], selectedColumnIds: [{
1325
+ type: Input
1326
+ }], selectedRowIds: [{
1327
+ type: Input
1328
+ }], settingsKey: [{
1329
+ type: Input
1330
+ }], sortField: [{
1331
+ type: Input
1332
+ }], width: [{
1333
+ type: Input
1334
+ }], columnWidthChange: [{
1335
+ type: Output
1336
+ }], multiselectSelectionChange: [{
1337
+ type: Output
1338
+ }], rowDeleteCancel: [{
1339
+ type: Output
1340
+ }], rowDeleteConfirm: [{
1341
+ type: Output
1342
+ }], selectedColumnIdsChange: [{
1343
+ type: Output
1344
+ }], sortFieldChange: [{
1345
+ type: Output
1346
+ }], columnComponents: [{
1347
+ type: ContentChildren,
1348
+ args: [SkyGridColumnComponent]
1349
+ }], columnElementRefs: [{
1350
+ type: ViewChildren,
1351
+ args: ['gridCol']
1352
+ }], columnRangeInputElementRefs: [{
1353
+ type: ViewChildren,
1354
+ args: ['colSizeRange']
1355
+ }], inlineDeleteRefs: [{
1356
+ type: ViewChildren,
1357
+ args: ['inlineDeleteRef']
1358
+ }], inlineDeleteTemplateRef: [{
1359
+ type: ViewChild,
1360
+ args: ['inlineDeleteTemplateRef', { read: TemplateRef }]
1361
+ }], tableContainerElementRef: [{
1362
+ type: ViewChild,
1363
+ args: ['gridContainer']
1364
+ }], tableElementRef: [{
1365
+ type: ViewChild,
1366
+ args: ['gridTable']
1367
+ }], topScrollContainerElementRef: [{
1368
+ type: ViewChild,
1369
+ args: ['topScrollContainer']
1370
+ }], resizeBar: [{
1371
+ type: ViewChild,
1372
+ args: ['resizeBar']
1373
+ }], onWindowResize: [{
1374
+ type: HostListener,
1375
+ args: ['window:resize']
1376
+ }] } });
1377
+
1378
+ /**
1379
+ * @deprecated `SkyGridComponent` and its features are deprecated. We recommend using the data grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-grid
1380
+ */
1381
+ class SkyGridModule {
1382
+ }
1383
+ SkyGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1384
+ SkyGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridModule, declarations: [SkyGridComponent,
1385
+ SkyGridColumnComponent,
1386
+ SkyGridCellComponent], imports: [CommonModule,
1387
+ DragulaModule,
1388
+ FormsModule,
1389
+ SkyAffixModule,
1390
+ SkyCheckboxModule,
1391
+ SkyGridsResourcesModule,
1392
+ SkyHelpInlineModule,
1393
+ SkyIconModule,
1394
+ SkyInlineDeleteModule,
1395
+ SkyOverlayModule,
1396
+ SkyPopoverModule,
1397
+ SkyTextHighlightModule], exports: [SkyGridComponent, SkyGridColumnComponent] });
1398
+ SkyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridModule, imports: [[
1399
+ CommonModule,
1400
+ DragulaModule,
1401
+ FormsModule,
1402
+ SkyAffixModule,
1403
+ SkyCheckboxModule,
1404
+ SkyGridsResourcesModule,
1405
+ SkyHelpInlineModule,
1406
+ SkyIconModule,
1407
+ SkyInlineDeleteModule,
1408
+ SkyOverlayModule,
1409
+ SkyPopoverModule,
1410
+ SkyTextHighlightModule,
1411
+ ]] });
1412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyGridModule, decorators: [{
1413
+ type: NgModule,
1414
+ args: [{
1415
+ declarations: [
1416
+ SkyGridComponent,
1417
+ SkyGridColumnComponent,
1418
+ SkyGridCellComponent,
1419
+ ],
1420
+ imports: [
1421
+ CommonModule,
1422
+ DragulaModule,
1423
+ FormsModule,
1424
+ SkyAffixModule,
1425
+ SkyCheckboxModule,
1426
+ SkyGridsResourcesModule,
1427
+ SkyHelpInlineModule,
1428
+ SkyIconModule,
1429
+ SkyInlineDeleteModule,
1430
+ SkyOverlayModule,
1431
+ SkyPopoverModule,
1432
+ SkyTextHighlightModule,
1433
+ ],
1434
+ exports: [SkyGridComponent, SkyGridColumnComponent],
1435
+ }]
1436
+ }] });
1437
+
1438
+ /**
1439
+ * Generated bundle index. Do not edit.
1440
+ */
1441
+
1442
+ export { SkyGridColumnComponent, SkyGridColumnModel, SkyGridComponent, SkyGridMessageType, SkyGridModule, SkyGridSelectedRowsSource };
1443
+ //# sourceMappingURL=skyux-grids.mjs.map