@skyux/grids 4.0.3 → 4.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/bundles/skyux-grids.umd.js +245 -52
- package/bundles/skyux-grids.umd.js.map +1 -1
- package/bundles/skyux-grids.umd.min.js +11 -11
- package/bundles/skyux-grids.umd.min.js.map +1 -1
- package/esm2015/modules/grid/grid-adapter.service.js +11 -2
- package/esm2015/modules/grid/grid-cell.component.js +4 -1
- package/esm2015/modules/grid/grid-column.component.js +30 -19
- package/esm2015/modules/grid/grid-column.model.js +4 -1
- package/esm2015/modules/grid/grid.component.js +151 -23
- package/esm2015/modules/grid/grid.module.js +4 -2
- package/esm2015/modules/grid/types/grid-column-description-model-change.js +1 -1
- package/esm2015/modules/grid/types/grid-column-heading-model-change.js +1 -1
- package/esm2015/modules/grid/types/grid-column-inline-help-popover-model-change.js +1 -1
- package/esm2015/modules/grid/types/grid-column-width-model-change.js +1 -1
- package/esm2015/modules/grid/types/grid-message-type.js +13 -1
- package/esm2015/modules/grid/types/grid-message.js +1 -1
- package/esm2015/modules/grid/types/grid-row-delete-cancel-args.js +1 -1
- package/esm2015/modules/grid/types/grid-row-delete-config.js +1 -1
- package/esm2015/modules/grid/types/grid-row-delete-confirm-args.js +1 -1
- package/esm2015/modules/grid/types/grid-row-delete-contents.js +1 -0
- package/esm2015/modules/grid/types/grid-selected-rows-model-change.js +1 -1
- package/esm2015/modules/grid/types/grid-selected-rows-source.js +4 -1
- package/esm2015/modules/grid/types/grid-ui-config.js +1 -1
- package/esm2015/polyfills.js +3 -3
- package/esm5/modules/grid/grid-adapter.service.js +23 -3
- package/esm5/modules/grid/grid-cell.component.js +4 -1
- package/esm5/modules/grid/grid-column.component.js +30 -19
- package/esm5/modules/grid/grid-column.model.js +4 -1
- package/esm5/modules/grid/grid.component.js +157 -23
- package/esm5/modules/grid/grid.module.js +4 -2
- package/esm5/modules/grid/types/grid-column-description-model-change.js +1 -1
- package/esm5/modules/grid/types/grid-column-heading-model-change.js +1 -1
- package/esm5/modules/grid/types/grid-column-inline-help-popover-model-change.js +1 -1
- package/esm5/modules/grid/types/grid-column-width-model-change.js +1 -1
- package/esm5/modules/grid/types/grid-message-type.js +13 -1
- package/esm5/modules/grid/types/grid-message.js +1 -1
- package/esm5/modules/grid/types/grid-row-delete-cancel-args.js +1 -1
- package/esm5/modules/grid/types/grid-row-delete-config.js +1 -1
- package/esm5/modules/grid/types/grid-row-delete-confirm-args.js +1 -1
- package/esm5/modules/grid/types/grid-row-delete-contents.js +1 -0
- package/esm5/modules/grid/types/grid-selected-rows-model-change.js +1 -1
- package/esm5/modules/grid/types/grid-selected-rows-source.js +4 -1
- package/esm5/modules/grid/types/grid-ui-config.js +1 -1
- package/esm5/polyfills.js +3 -3
- package/fesm2015/skyux-grids.js +213 -42
- package/fesm2015/skyux-grids.js.map +1 -1
- package/fesm5/skyux-grids.js +231 -43
- package/fesm5/skyux-grids.js.map +1 -1
- package/modules/grid/grid-adapter.service.d.ts +3 -0
- package/modules/grid/grid-cell.component.d.ts +3 -0
- package/modules/grid/grid-column.component.d.ts +68 -12
- package/modules/grid/grid-column.model.d.ts +3 -0
- package/modules/grid/grid.component.d.ts +105 -7
- package/modules/grid/types/grid-column-description-model-change.d.ts +3 -0
- package/modules/grid/types/grid-column-heading-model-change.d.ts +3 -0
- package/modules/grid/types/grid-column-inline-help-popover-model-change.d.ts +3 -0
- package/modules/grid/types/grid-column-width-model-change.d.ts +9 -0
- package/modules/grid/types/grid-message-type.d.ts +12 -0
- package/modules/grid/types/grid-message.d.ts +6 -0
- package/modules/grid/types/grid-row-delete-cancel-args.d.ts +3 -0
- package/modules/grid/types/grid-row-delete-config.d.ts +3 -0
- package/modules/grid/types/grid-row-delete-confirm-args.d.ts +3 -0
- package/modules/grid/types/grid-row-delete-contents.d.ts +9 -0
- package/modules/grid/types/grid-selected-rows-model-change.d.ts +3 -0
- package/modules/grid/types/grid-selected-rows-source.d.ts +3 -0
- package/modules/grid/types/grid-ui-config.d.ts +3 -0
- package/package.json +3 -3
- package/skyux-grids.metadata.json +1 -1
- package/src/assets/img/grid-annotated.png +0 -0
- package/src/assets/img/grid-dont-use-complex.png +0 -0
- package/src/assets/img/grid-fit-scroll.png +0 -0
- package/src/assets/img/grid-fit-width.png +0 -0
- package/src/assets/img/grid-option-context-menu.png +0 -0
- package/src/assets/img/grid-option-filter.png +0 -0
- package/src/assets/img/grid-option-multi-dont-tile.png +0 -0
- package/src/assets/img/grid-option-multi.png +0 -0
- package/src/assets/img/grid-option-sort.png +0 -0
- package/src/assets/img/grid-option-template-column.png +0 -0
- package/src/assets/img/grid-reorder.png +0 -0
- package/src/assets/img/grid-resize.png +0 -0
- package/src/assets/img/grid-use-when.png +0 -0
package/fesm2015/skyux-grids.js
CHANGED
|
@@ -3,7 +3,7 @@ import { EventEmitter, Input, ContentChildren, TemplateRef, Component, ChangeDet
|
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { DragulaService, DragulaModule } from 'ng2-dragula';
|
|
6
|
-
import { SkyAppWindowRef, SkyUIConfigService } from '@skyux/core';
|
|
6
|
+
import { SkyAffixAutoFitContext, SkyAffixService, SkyOverlayService, SkyAppWindowRef, SkyUIConfigService, SkyAffixModule, SkyOverlayModule } from '@skyux/core';
|
|
7
7
|
import { SkyCheckboxModule } from '@skyux/forms';
|
|
8
8
|
import { SkyHelpInlineModule, SkyIconModule, SkyTextHighlightModule } from '@skyux/indicators';
|
|
9
9
|
import { SkyInlineDeleteModule } from '@skyux/layout';
|
|
@@ -15,12 +15,27 @@ import { getStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '
|
|
|
15
15
|
|
|
16
16
|
var SkyGridMessageType;
|
|
17
17
|
(function (SkyGridMessageType) {
|
|
18
|
+
/**
|
|
19
|
+
* Selects the multiselect checkboxes for all rows in the grid.
|
|
20
|
+
*/
|
|
18
21
|
SkyGridMessageType[SkyGridMessageType["SelectAll"] = 0] = "SelectAll";
|
|
22
|
+
/**
|
|
23
|
+
* Clears the multiselect checkboxes for all rows in the grid.
|
|
24
|
+
*/
|
|
19
25
|
SkyGridMessageType[SkyGridMessageType["ClearAll"] = 1] = "ClearAll";
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
20
29
|
SkyGridMessageType[SkyGridMessageType["PromptDeleteRow"] = 2] = "PromptDeleteRow";
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
21
33
|
SkyGridMessageType[SkyGridMessageType["AbortDeleteRow"] = 3] = "AbortDeleteRow";
|
|
22
34
|
})(SkyGridMessageType || (SkyGridMessageType = {}));
|
|
23
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
24
39
|
var SkyGridSelectedRowsSource;
|
|
25
40
|
(function (SkyGridSelectedRowsSource) {
|
|
26
41
|
SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["CheckboxChange"] = 0] = "CheckboxChange";
|
|
@@ -30,17 +45,28 @@ var SkyGridSelectedRowsSource;
|
|
|
30
45
|
SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectedRowIdsChange"] = 4] = "SelectedRowIdsChange";
|
|
31
46
|
})(SkyGridSelectedRowsSource || (SkyGridSelectedRowsSource = {}));
|
|
32
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Specifies the column information.
|
|
50
|
+
*/
|
|
33
51
|
let SkyGridColumnComponent = class SkyGridColumnComponent {
|
|
34
52
|
constructor() {
|
|
35
|
-
this.isSortable = true;
|
|
36
53
|
/**
|
|
37
54
|
* Specifies the horizontal alignment of the column's data and header.
|
|
38
55
|
* @default 'left'
|
|
39
56
|
*/
|
|
40
57
|
this.alignment = 'left';
|
|
41
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Indicates whether the column sorts the grid when users click the column header.
|
|
60
|
+
* @default true
|
|
61
|
+
*/
|
|
62
|
+
this.isSortable = true;
|
|
63
|
+
/**
|
|
64
|
+
* Specifies a search function to apply for the specific column. By default,
|
|
65
|
+
* the column executes a string compare on the column data.
|
|
66
|
+
* @default (value, searchText) => value.toString().toLowerCase().indexOf(searchText) !== -1
|
|
67
|
+
*/
|
|
68
|
+
/* tslint:disable-next-line:no-input-rename */
|
|
42
69
|
this.searchFunction = this.search;
|
|
43
|
-
/* tslint:enable:no-input-rename */
|
|
44
70
|
this.descriptionChanges = new EventEmitter();
|
|
45
71
|
this.descriptionModelChanges = new EventEmitter();
|
|
46
72
|
this.headingChanges = new EventEmitter();
|
|
@@ -89,46 +115,46 @@ let SkyGridColumnComponent = class SkyGridColumnComponent {
|
|
|
89
115
|
};
|
|
90
116
|
__decorate([
|
|
91
117
|
Input()
|
|
92
|
-
], SkyGridColumnComponent.prototype, "
|
|
93
|
-
__decorate([
|
|
94
|
-
Input()
|
|
95
|
-
], SkyGridColumnComponent.prototype, "heading", void 0);
|
|
118
|
+
], SkyGridColumnComponent.prototype, "alignment", void 0);
|
|
96
119
|
__decorate([
|
|
97
120
|
Input()
|
|
98
|
-
], SkyGridColumnComponent.prototype, "
|
|
121
|
+
], SkyGridColumnComponent.prototype, "description", void 0);
|
|
99
122
|
__decorate([
|
|
100
123
|
Input()
|
|
101
|
-
], SkyGridColumnComponent.prototype, "
|
|
124
|
+
], SkyGridColumnComponent.prototype, "excludeFromHighlighting", void 0);
|
|
102
125
|
__decorate([
|
|
103
126
|
Input()
|
|
104
|
-
], SkyGridColumnComponent.prototype, "
|
|
127
|
+
], SkyGridColumnComponent.prototype, "field", void 0);
|
|
105
128
|
__decorate([
|
|
106
129
|
Input()
|
|
107
|
-
], SkyGridColumnComponent.prototype, "
|
|
130
|
+
], SkyGridColumnComponent.prototype, "heading", void 0);
|
|
108
131
|
__decorate([
|
|
109
132
|
Input()
|
|
110
|
-
], SkyGridColumnComponent.prototype, "
|
|
133
|
+
], SkyGridColumnComponent.prototype, "hidden", void 0);
|
|
111
134
|
__decorate([
|
|
112
135
|
Input()
|
|
113
|
-
], SkyGridColumnComponent.prototype, "
|
|
136
|
+
], SkyGridColumnComponent.prototype, "id", void 0);
|
|
114
137
|
__decorate([
|
|
115
138
|
Input()
|
|
116
|
-
], SkyGridColumnComponent.prototype, "
|
|
139
|
+
], SkyGridColumnComponent.prototype, "inlineHelpPopover", void 0);
|
|
117
140
|
__decorate([
|
|
118
141
|
Input()
|
|
119
142
|
], SkyGridColumnComponent.prototype, "isSortable", void 0);
|
|
120
143
|
__decorate([
|
|
121
144
|
Input()
|
|
122
|
-
], SkyGridColumnComponent.prototype, "
|
|
123
|
-
__decorate([
|
|
124
|
-
Input()
|
|
125
|
-
], SkyGridColumnComponent.prototype, "alignment", void 0);
|
|
145
|
+
], SkyGridColumnComponent.prototype, "locked", void 0);
|
|
126
146
|
__decorate([
|
|
127
147
|
Input('search')
|
|
128
148
|
], SkyGridColumnComponent.prototype, "searchFunction", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
Input()
|
|
151
|
+
], SkyGridColumnComponent.prototype, "type", void 0);
|
|
129
152
|
__decorate([
|
|
130
153
|
Input('template')
|
|
131
154
|
], SkyGridColumnComponent.prototype, "templateInput", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
Input()
|
|
157
|
+
], SkyGridColumnComponent.prototype, "width", void 0);
|
|
132
158
|
__decorate([
|
|
133
159
|
ContentChildren(TemplateRef)
|
|
134
160
|
], SkyGridColumnComponent.prototype, "templates", void 0);
|
|
@@ -140,6 +166,9 @@ SkyGridColumnComponent = __decorate([
|
|
|
140
166
|
})
|
|
141
167
|
], SkyGridColumnComponent);
|
|
142
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
*/
|
|
143
172
|
class SkyGridColumnModel {
|
|
144
173
|
constructor(template, data) {
|
|
145
174
|
this.isSortable = true;
|
|
@@ -167,6 +196,9 @@ const GRID_HEADER_LOCKED_SELECTOR = '.sky-grid-header-locked';
|
|
|
167
196
|
const GRID_HEADER_RESIZE_HANDLE = '.sky-grid-resize-handle';
|
|
168
197
|
const GRID_ROW_DELETE_SELECTOR = '.sky-grid-row-delete-heading';
|
|
169
198
|
const GRID_MULTISELECT_SELECTOR = '.sky-grid-multiselect-cell';
|
|
199
|
+
/**
|
|
200
|
+
* @internal
|
|
201
|
+
*/
|
|
170
202
|
let SkyGridAdapterService = class SkyGridAdapterService {
|
|
171
203
|
constructor(rendererFactory) {
|
|
172
204
|
this.rendererFactory = rendererFactory;
|
|
@@ -217,7 +249,13 @@ let SkyGridAdapterService = class SkyGridAdapterService {
|
|
|
217
249
|
this.renderer.setStyle(el.nativeElement, style, value);
|
|
218
250
|
}
|
|
219
251
|
}
|
|
220
|
-
isLeftOfLocked(
|
|
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
|
+
}
|
|
221
259
|
for (let i = (columns.length - 1); i >= 0; i--) {
|
|
222
260
|
if (columns[i].classList.contains('sky-grid-header-locked')) {
|
|
223
261
|
return true;
|
|
@@ -261,27 +299,70 @@ if (!Element.prototype.closest) {
|
|
|
261
299
|
// https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
|
|
262
300
|
// Returns true if the element would be selected by the specified selector string.
|
|
263
301
|
if (!Element.prototype.matches) {
|
|
264
|
-
|
|
265
|
-
|
|
302
|
+
/* istanbul ignore next */
|
|
303
|
+
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
266
304
|
}
|
|
267
305
|
|
|
268
306
|
let nextId = 0;
|
|
269
307
|
let SkyGridComponent = class SkyGridComponent {
|
|
270
|
-
constructor(dragulaService, gridAdapter, skyWindow, uiConfigService
|
|
308
|
+
constructor(affixService, changeDetector, dragulaService, gridAdapter, overlayService, skyWindow, uiConfigService) {
|
|
309
|
+
this.affixService = affixService;
|
|
310
|
+
this.changeDetector = changeDetector;
|
|
271
311
|
this.dragulaService = dragulaService;
|
|
272
312
|
this.gridAdapter = gridAdapter;
|
|
313
|
+
this.overlayService = overlayService;
|
|
273
314
|
this.skyWindow = skyWindow;
|
|
274
315
|
this.uiConfigService = uiConfigService;
|
|
275
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Indicates whether to enable the multiselect feature to display a column of
|
|
318
|
+
* checkboxes on the left side of the grid. You can specify a unique ID with
|
|
319
|
+
* the `multiselectRowId` property, but multiselect defaults to the `id` property on
|
|
320
|
+
* the `data` object. To include options to select and clear all multiselect checkboxes,
|
|
321
|
+
* we recommend the [list view grid](https://developer.blackbaud.com/skyux/components/list/grid) component.
|
|
322
|
+
* @default false
|
|
323
|
+
*/
|
|
276
324
|
this.enableMultiselect = false;
|
|
325
|
+
/**
|
|
326
|
+
* Specifies how the grid fits to its parent. The valid options are `width`,
|
|
327
|
+
* which fits the grid to the parent's full width, and `scroll`, which allows the grid
|
|
328
|
+
* to exceed the parent's width. If the grid does not have enough columns to fill
|
|
329
|
+
* the parent's width, it always stretches to the parent's full width.
|
|
330
|
+
*/
|
|
277
331
|
this.fit = 'width';
|
|
332
|
+
/**
|
|
333
|
+
* Indicates whether to display a toolbar with the grid.
|
|
334
|
+
*/
|
|
278
335
|
this.hasToolbar = false;
|
|
336
|
+
/**
|
|
337
|
+
* Provides an observable to send commands to the grid.
|
|
338
|
+
*/
|
|
279
339
|
this.messageStream = new Subject();
|
|
340
|
+
/**
|
|
341
|
+
* Fires when the width of a column changes.
|
|
342
|
+
*/
|
|
280
343
|
this.columnWidthChange = new EventEmitter();
|
|
344
|
+
/**
|
|
345
|
+
* Fires when the selection of multiselect checkboxes changes.
|
|
346
|
+
* Emits an array of IDs for the selected rows based on the `multiselectRowId` property
|
|
347
|
+
* that the consumer provides.
|
|
348
|
+
*/
|
|
281
349
|
this.multiselectSelectionChange = new EventEmitter();
|
|
350
|
+
/**
|
|
351
|
+
* @internal
|
|
352
|
+
*/
|
|
282
353
|
this.rowDeleteCancel = new EventEmitter();
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
283
357
|
this.rowDeleteConfirm = new EventEmitter();
|
|
358
|
+
/**
|
|
359
|
+
* Fires when the columns to display in the grid change or when the order of the columns changes.
|
|
360
|
+
* The event emits an array of IDs for the displayed columns that reflects the column order.
|
|
361
|
+
*/
|
|
284
362
|
this.selectedColumnIdsChange = new EventEmitter();
|
|
363
|
+
/**
|
|
364
|
+
* Fires when the active sort field changes.
|
|
365
|
+
*/
|
|
285
366
|
this.sortFieldChange = new EventEmitter();
|
|
286
367
|
this.columnResizeStep = 10;
|
|
287
368
|
this.gridId = ++nextId;
|
|
@@ -293,6 +374,7 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
293
374
|
this.isDraggingResizeHandle = false;
|
|
294
375
|
this.isResized = false;
|
|
295
376
|
this.ngUnsubscribe = new Subject();
|
|
377
|
+
this.rowDeleteContents = {};
|
|
296
378
|
this.subscriptions = [];
|
|
297
379
|
this.scrollTriggered = false;
|
|
298
380
|
this.selectedColumnIdsSet = false;
|
|
@@ -303,6 +385,10 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
303
385
|
descending: false
|
|
304
386
|
});
|
|
305
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* Specifies the columns to display in the grid based on the `id` or `field` properties
|
|
390
|
+
* of the columns. If no columns are specified, then the grid displays all columns.
|
|
391
|
+
*/
|
|
306
392
|
set selectedColumnIds(value) {
|
|
307
393
|
const currentIds = this._selectedColumnIds;
|
|
308
394
|
this._selectedColumnIds = value;
|
|
@@ -330,6 +416,11 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
330
416
|
get selectedColumnIds() {
|
|
331
417
|
return this._selectedColumnIds;
|
|
332
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Specifies a set of IDs for the rows to select in a multiselect grid.
|
|
421
|
+
* The IDs match the `id` properties of the `data` objects.
|
|
422
|
+
* Rows with IDs that are not included are de-selected in the grid.
|
|
423
|
+
*/
|
|
333
424
|
set selectedRowIds(value) {
|
|
334
425
|
if (value) {
|
|
335
426
|
this._selectedRowIds = value;
|
|
@@ -340,6 +431,9 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
340
431
|
get selectedRowIds() {
|
|
341
432
|
return this._selectedRowIds;
|
|
342
433
|
}
|
|
434
|
+
get tableWidth() {
|
|
435
|
+
return this.tableElementRef.nativeElement.offsetWidth;
|
|
436
|
+
}
|
|
343
437
|
ngOnInit() {
|
|
344
438
|
this.messageStream
|
|
345
439
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
@@ -367,12 +461,34 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
367
461
|
}
|
|
368
462
|
ngOnChanges(changes) {
|
|
369
463
|
if (changes.columns && this.columns) {
|
|
464
|
+
if (this.selectedColumnIds) {
|
|
465
|
+
this.selectedColumnIds = this.selectedColumnIds.filter(columnId => this.columns.find(column => column.id === columnId));
|
|
466
|
+
}
|
|
370
467
|
this.setDisplayedColumns(true);
|
|
371
468
|
}
|
|
372
469
|
if (changes.data && this.data) {
|
|
373
470
|
this.transformData();
|
|
374
471
|
// This set timeout is necessary to ensure the data has rendered in the grid
|
|
375
472
|
setTimeout(() => {
|
|
473
|
+
// This cleans up any lingering row deletes for items that have been removed.
|
|
474
|
+
Object.keys(this.rowDeleteContents).forEach(id => {
|
|
475
|
+
if (!this.data.find(item => item.id === id)) {
|
|
476
|
+
this.destroyRowDelete(id);
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
// The rows re-render thus messing up the affixers. We must reaffix them so that things
|
|
480
|
+
// continue to render correctly.
|
|
481
|
+
let rowElement = this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + id + '"]');
|
|
482
|
+
this.rowDeleteContents[id].affixer.affixTo(rowElement, {
|
|
483
|
+
autoFitContext: SkyAffixAutoFitContext.Viewport,
|
|
484
|
+
isSticky: true,
|
|
485
|
+
placement: 'above',
|
|
486
|
+
verticalAlignment: 'top',
|
|
487
|
+
horizontalAlignment: 'left',
|
|
488
|
+
enableAutoFit: false
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
});
|
|
376
492
|
this.checkUserColumnWidthsForScroll();
|
|
377
493
|
});
|
|
378
494
|
}
|
|
@@ -387,6 +503,9 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
387
503
|
this.multiselectSelectionChange.complete();
|
|
388
504
|
this.ngUnsubscribe.next();
|
|
389
505
|
this.ngUnsubscribe.complete();
|
|
506
|
+
Object.keys(this.rowDeleteContents).forEach(id => {
|
|
507
|
+
this.destroyRowDelete(id);
|
|
508
|
+
});
|
|
390
509
|
}
|
|
391
510
|
onWindowResize() {
|
|
392
511
|
this.checkUserColumnWidthsForScroll();
|
|
@@ -617,6 +736,7 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
617
736
|
cancelRowDelete(id) {
|
|
618
737
|
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(config => config.id !== id);
|
|
619
738
|
this.rowDeleteCancel.emit({ id: id });
|
|
739
|
+
this.destroyRowDelete(id);
|
|
620
740
|
}
|
|
621
741
|
confirmRowDelete(id) {
|
|
622
742
|
this.rowDeleteConfigs.find(config => config.id === id).pending = true;
|
|
@@ -711,6 +831,41 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
711
831
|
}
|
|
712
832
|
else {
|
|
713
833
|
this.rowDeleteConfigs.push({ id: message.data.promptDeleteRow.id, pending: false });
|
|
834
|
+
let overlay = this.overlayService.create({
|
|
835
|
+
enableScroll: true,
|
|
836
|
+
showBackdrop: false,
|
|
837
|
+
closeOnNavigation: true,
|
|
838
|
+
enableClose: false,
|
|
839
|
+
enablePointerEvents: true
|
|
840
|
+
});
|
|
841
|
+
overlay.attachTemplate(this.inlineDeleteTemplateRef, { $implicit: this.data.find(item => item.id === message.data.promptDeleteRow.id) });
|
|
842
|
+
/**
|
|
843
|
+
* We are manually setting the z-index here because overlays will always be on top of
|
|
844
|
+
* the omnibar. This manual setting is 1 less than the omnibar's z-index of 1000. We
|
|
845
|
+
* discussed changing the overlay service to allow for this but decided against that
|
|
846
|
+
* change at this time due to its niche nature.
|
|
847
|
+
*/
|
|
848
|
+
overlay.componentRef.instance.zIndex = '999';
|
|
849
|
+
setTimeout(() => {
|
|
850
|
+
const inlineDeleteRef = this.inlineDeleteRefs.toArray()
|
|
851
|
+
.find(elRef => {
|
|
852
|
+
return elRef.nativeElement.id === 'row-delete-ref-' + message.data.promptDeleteRow.id;
|
|
853
|
+
});
|
|
854
|
+
let affixer = this.affixService.createAffixer(inlineDeleteRef);
|
|
855
|
+
let rowElement = this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + message.data.promptDeleteRow.id + '"]');
|
|
856
|
+
affixer.affixTo(rowElement, {
|
|
857
|
+
autoFitContext: SkyAffixAutoFitContext.Viewport,
|
|
858
|
+
isSticky: true,
|
|
859
|
+
placement: 'above',
|
|
860
|
+
verticalAlignment: 'top',
|
|
861
|
+
horizontalAlignment: 'left',
|
|
862
|
+
enableAutoFit: false
|
|
863
|
+
});
|
|
864
|
+
this.rowDeleteContents[message.data.promptDeleteRow.id] = {
|
|
865
|
+
affixer: affixer,
|
|
866
|
+
overlay: overlay
|
|
867
|
+
};
|
|
868
|
+
});
|
|
714
869
|
}
|
|
715
870
|
}
|
|
716
871
|
break;
|
|
@@ -719,6 +874,7 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
719
874
|
/* istanbul ignore else */
|
|
720
875
|
if (message.data && message.data.abortDeleteRow) {
|
|
721
876
|
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(config => config.id !== message.data.abortDeleteRow.id);
|
|
877
|
+
this.destroyRowDelete(message.data.abortDeleteRow.id);
|
|
722
878
|
}
|
|
723
879
|
break;
|
|
724
880
|
}
|
|
@@ -734,7 +890,8 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
734
890
|
setDisplayedColumns(respectHidden = false) {
|
|
735
891
|
if (this.selectedColumnIds !== undefined) {
|
|
736
892
|
// setup displayed columns
|
|
737
|
-
this.displayedColumns = this.selectedColumnIds
|
|
893
|
+
this.displayedColumns = this.selectedColumnIds
|
|
894
|
+
.filter(columnId => this.columns.find(column => column.id === columnId)).map(columnId => this.columns.filter(column => column.id === columnId)[0]);
|
|
738
895
|
}
|
|
739
896
|
else if (respectHidden) {
|
|
740
897
|
this.displayedColumns = this.columns.filter(column => {
|
|
@@ -824,15 +981,9 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
824
981
|
}
|
|
825
982
|
this.changeDetector.detectChanges();
|
|
826
983
|
this.columnWidthChange.emit(this.getColumnWidthModelChange());
|
|
827
|
-
// If in "scroll" mode, reset the full table width.
|
|
828
|
-
// This prevents pixel "hopping" for the non-resized columns
|
|
829
|
-
if (this.fit === 'scroll') {
|
|
830
|
-
this.tableWidth = this.tableElementRef.nativeElement.offsetWidth;
|
|
831
|
-
}
|
|
832
984
|
}
|
|
833
985
|
initColumnWidths() {
|
|
834
986
|
// Establish table width.
|
|
835
|
-
this.tableWidth = this.tableElementRef.nativeElement.offsetWidth;
|
|
836
987
|
this.showTopScroll = true;
|
|
837
988
|
// Set column widths based on the width initially given by the browser.
|
|
838
989
|
// computedWidth prevents accidental overflow for browsers with sub-pixel widths.
|
|
@@ -882,7 +1033,6 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
882
1033
|
this.skyWindow.nativeWindow.setTimeout(() => {
|
|
883
1034
|
this.gridAdapter.setStyle(this.tableElementRef, 'width', `auto`);
|
|
884
1035
|
this.changeDetector.detectChanges();
|
|
885
|
-
this.tableWidth = this.tableElementRef.nativeElement.offsetWidth;
|
|
886
1036
|
this.gridAdapter.setStyle(this.tableElementRef, 'width', `${this.tableWidth}px`);
|
|
887
1037
|
this.changeDetector.detectChanges();
|
|
888
1038
|
});
|
|
@@ -904,6 +1054,14 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
904
1054
|
addDelimeter(text, delimiter) {
|
|
905
1055
|
return text.filter(val => val).join(delimiter);
|
|
906
1056
|
}
|
|
1057
|
+
destroyRowDelete(id) {
|
|
1058
|
+
const rowDeleteContents = this.rowDeleteContents[id];
|
|
1059
|
+
if (rowDeleteContents) {
|
|
1060
|
+
rowDeleteContents.affixer.destroy();
|
|
1061
|
+
this.overlayService.close(rowDeleteContents.overlay);
|
|
1062
|
+
delete this.rowDeleteContents[id];
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
907
1065
|
emitSelectedRows(source) {
|
|
908
1066
|
let selectedRows = {
|
|
909
1067
|
selectedRowIds: this.getSelectedRows(),
|
|
@@ -1008,11 +1166,13 @@ let SkyGridComponent = class SkyGridComponent {
|
|
|
1008
1166
|
}
|
|
1009
1167
|
};
|
|
1010
1168
|
SkyGridComponent.ctorParameters = () => [
|
|
1169
|
+
{ type: SkyAffixService },
|
|
1170
|
+
{ type: ChangeDetectorRef },
|
|
1011
1171
|
{ type: DragulaService },
|
|
1012
1172
|
{ type: SkyGridAdapterService },
|
|
1173
|
+
{ type: SkyOverlayService },
|
|
1013
1174
|
{ type: SkyAppWindowRef },
|
|
1014
|
-
{ type: SkyUIConfigService }
|
|
1015
|
-
{ type: ChangeDetectorRef }
|
|
1175
|
+
{ type: SkyUIConfigService }
|
|
1016
1176
|
];
|
|
1017
1177
|
__decorate([
|
|
1018
1178
|
Input()
|
|
@@ -1046,19 +1206,19 @@ __decorate([
|
|
|
1046
1206
|
], SkyGridComponent.prototype, "rowHighlightedId", void 0);
|
|
1047
1207
|
__decorate([
|
|
1048
1208
|
Input()
|
|
1049
|
-
], SkyGridComponent.prototype, "
|
|
1209
|
+
], SkyGridComponent.prototype, "selectedColumnIds", null);
|
|
1050
1210
|
__decorate([
|
|
1051
1211
|
Input()
|
|
1052
|
-
], SkyGridComponent.prototype, "
|
|
1212
|
+
], SkyGridComponent.prototype, "selectedRowIds", null);
|
|
1053
1213
|
__decorate([
|
|
1054
1214
|
Input()
|
|
1055
|
-
], SkyGridComponent.prototype, "
|
|
1215
|
+
], SkyGridComponent.prototype, "settingsKey", void 0);
|
|
1056
1216
|
__decorate([
|
|
1057
1217
|
Input()
|
|
1058
|
-
], SkyGridComponent.prototype, "
|
|
1218
|
+
], SkyGridComponent.prototype, "sortField", void 0);
|
|
1059
1219
|
__decorate([
|
|
1060
1220
|
Input()
|
|
1061
|
-
], SkyGridComponent.prototype, "
|
|
1221
|
+
], SkyGridComponent.prototype, "width", void 0);
|
|
1062
1222
|
__decorate([
|
|
1063
1223
|
Output()
|
|
1064
1224
|
], SkyGridComponent.prototype, "columnWidthChange", void 0);
|
|
@@ -1078,7 +1238,7 @@ __decorate([
|
|
|
1078
1238
|
Output()
|
|
1079
1239
|
], SkyGridComponent.prototype, "sortFieldChange", void 0);
|
|
1080
1240
|
__decorate([
|
|
1081
|
-
ContentChildren(SkyGridColumnComponent
|
|
1241
|
+
ContentChildren(SkyGridColumnComponent)
|
|
1082
1242
|
], SkyGridComponent.prototype, "columnComponents", void 0);
|
|
1083
1243
|
__decorate([
|
|
1084
1244
|
ViewChildren('gridCol')
|
|
@@ -1086,6 +1246,12 @@ __decorate([
|
|
|
1086
1246
|
__decorate([
|
|
1087
1247
|
ViewChildren('colSizeRange')
|
|
1088
1248
|
], SkyGridComponent.prototype, "columnRangeInputElementRefs", void 0);
|
|
1249
|
+
__decorate([
|
|
1250
|
+
ViewChildren('inlineDeleteRef')
|
|
1251
|
+
], SkyGridComponent.prototype, "inlineDeleteRefs", void 0);
|
|
1252
|
+
__decorate([
|
|
1253
|
+
ViewChild('inlineDeleteTemplateRef', { read: TemplateRef })
|
|
1254
|
+
], SkyGridComponent.prototype, "inlineDeleteTemplateRef", void 0);
|
|
1089
1255
|
__decorate([
|
|
1090
1256
|
ViewChild('gridContainer')
|
|
1091
1257
|
], SkyGridComponent.prototype, "tableContainerElementRef", void 0);
|
|
@@ -1104,16 +1270,19 @@ __decorate([
|
|
|
1104
1270
|
SkyGridComponent = __decorate([
|
|
1105
1271
|
Component({
|
|
1106
1272
|
selector: 'sky-grid',
|
|
1107
|
-
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=\"
|
|
1273
|
+
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",
|
|
1108
1274
|
viewProviders: [DragulaService],
|
|
1109
1275
|
providers: [
|
|
1110
1276
|
SkyGridAdapterService
|
|
1111
1277
|
],
|
|
1112
1278
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1113
|
-
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:0 solid #cdcfd2;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-center .sky-grid-heading-sort,.sky-grid-heading.sky-grid-column-alignment-left .sky-grid-heading-sort{width:14px}.sky-grid-heading.sky-grid-column-alignment-center .sky-grid-help-inline-sort-hidden,.sky-grid-heading.sky-grid-column-alignment-left .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:0 0}.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;background:0 0;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;background:0 0;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;background:0 0;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-
|
|
1279
|
+
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:0 solid #cdcfd2;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-center .sky-grid-heading-sort,.sky-grid-heading.sky-grid-column-alignment-left .sky-grid-heading-sort{width:14px}.sky-grid-heading.sky-grid-column-alignment-center .sky-grid-help-inline-sort-hidden,.sky-grid-heading.sky-grid-column-alignment-left .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:0 0}.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;background:0 0;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;background:0 0;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;background:0 0;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:0;white-space:nowrap}@-moz-document url-prefix(){.sky-grid-multiselect-row td{border-left:0 solid transparent;border-right:0 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:0}.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}"]
|
|
1114
1280
|
})
|
|
1115
1281
|
], SkyGridComponent);
|
|
1116
1282
|
|
|
1283
|
+
/**
|
|
1284
|
+
* @internal
|
|
1285
|
+
*/
|
|
1117
1286
|
let SkyGridCellComponent = class SkyGridCellComponent {
|
|
1118
1287
|
ngOnInit() {
|
|
1119
1288
|
this.container.createEmbeddedView(this.template, this);
|
|
@@ -1195,11 +1364,13 @@ SkyGridModule = __decorate([
|
|
|
1195
1364
|
CommonModule,
|
|
1196
1365
|
DragulaModule,
|
|
1197
1366
|
FormsModule,
|
|
1367
|
+
SkyAffixModule,
|
|
1198
1368
|
SkyCheckboxModule,
|
|
1199
1369
|
SkyGridsResourcesModule,
|
|
1200
1370
|
SkyHelpInlineModule,
|
|
1201
1371
|
SkyIconModule,
|
|
1202
1372
|
SkyInlineDeleteModule,
|
|
1373
|
+
SkyOverlayModule,
|
|
1203
1374
|
SkyPopoverModule,
|
|
1204
1375
|
SkyTextHighlightModule
|
|
1205
1376
|
],
|