@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
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
}(this, (function (exports, core, common, forms, ng2Dragula, core$1, forms$1, indicators, layout, popovers, rxjs, operators, listBuilderCommon, i18n) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
10
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
11
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
16
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
***************************************************************************** */
|
|
21
21
|
/* global Reflect, Promise */
|
|
22
22
|
|
|
@@ -109,8 +109,13 @@
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
function __createBinding(o, m, k, k2) {
|
|
113
|
+
if (k2 === undefined) k2 = k;
|
|
114
|
+
o[k2] = m[k];
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
function __exportStar(m, exports) {
|
|
113
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
118
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
function __values(o) {
|
|
@@ -219,12 +224,27 @@
|
|
|
219
224
|
}
|
|
220
225
|
|
|
221
226
|
(function (SkyGridMessageType) {
|
|
227
|
+
/**
|
|
228
|
+
* Selects the multiselect checkboxes for all rows in the grid.
|
|
229
|
+
*/
|
|
222
230
|
SkyGridMessageType[SkyGridMessageType["SelectAll"] = 0] = "SelectAll";
|
|
231
|
+
/**
|
|
232
|
+
* Clears the multiselect checkboxes for all rows in the grid.
|
|
233
|
+
*/
|
|
223
234
|
SkyGridMessageType[SkyGridMessageType["ClearAll"] = 1] = "ClearAll";
|
|
235
|
+
/**
|
|
236
|
+
* @internal
|
|
237
|
+
*/
|
|
224
238
|
SkyGridMessageType[SkyGridMessageType["PromptDeleteRow"] = 2] = "PromptDeleteRow";
|
|
239
|
+
/**
|
|
240
|
+
* @internal
|
|
241
|
+
*/
|
|
225
242
|
SkyGridMessageType[SkyGridMessageType["AbortDeleteRow"] = 3] = "AbortDeleteRow";
|
|
226
243
|
})(exports.SkyGridMessageType || (exports.SkyGridMessageType = {}));
|
|
227
244
|
|
|
245
|
+
/**
|
|
246
|
+
* @internal
|
|
247
|
+
*/
|
|
228
248
|
|
|
229
249
|
(function (SkyGridSelectedRowsSource) {
|
|
230
250
|
SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["CheckboxChange"] = 0] = "CheckboxChange";
|
|
@@ -234,17 +254,28 @@
|
|
|
234
254
|
SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectedRowIdsChange"] = 4] = "SelectedRowIdsChange";
|
|
235
255
|
})(exports.SkyGridSelectedRowsSource || (exports.SkyGridSelectedRowsSource = {}));
|
|
236
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Specifies the column information.
|
|
259
|
+
*/
|
|
237
260
|
var SkyGridColumnComponent = /** @class */ (function () {
|
|
238
261
|
function SkyGridColumnComponent() {
|
|
239
|
-
this.isSortable = true;
|
|
240
262
|
/**
|
|
241
263
|
* Specifies the horizontal alignment of the column's data and header.
|
|
242
264
|
* @default 'left'
|
|
243
265
|
*/
|
|
244
266
|
this.alignment = 'left';
|
|
245
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Indicates whether the column sorts the grid when users click the column header.
|
|
269
|
+
* @default true
|
|
270
|
+
*/
|
|
271
|
+
this.isSortable = true;
|
|
272
|
+
/**
|
|
273
|
+
* Specifies a search function to apply for the specific column. By default,
|
|
274
|
+
* the column executes a string compare on the column data.
|
|
275
|
+
* @default (value, searchText) => value.toString().toLowerCase().indexOf(searchText) !== -1
|
|
276
|
+
*/
|
|
277
|
+
/* tslint:disable-next-line:no-input-rename */
|
|
246
278
|
this.searchFunction = this.search;
|
|
247
|
-
/* tslint:enable:no-input-rename */
|
|
248
279
|
this.descriptionChanges = new core.EventEmitter();
|
|
249
280
|
this.descriptionModelChanges = new core.EventEmitter();
|
|
250
281
|
this.headingChanges = new core.EventEmitter();
|
|
@@ -296,46 +327,46 @@
|
|
|
296
327
|
};
|
|
297
328
|
__decorate([
|
|
298
329
|
core.Input()
|
|
299
|
-
], SkyGridColumnComponent.prototype, "
|
|
300
|
-
__decorate([
|
|
301
|
-
core.Input()
|
|
302
|
-
], SkyGridColumnComponent.prototype, "heading", void 0);
|
|
330
|
+
], SkyGridColumnComponent.prototype, "alignment", void 0);
|
|
303
331
|
__decorate([
|
|
304
332
|
core.Input()
|
|
305
|
-
], SkyGridColumnComponent.prototype, "
|
|
333
|
+
], SkyGridColumnComponent.prototype, "description", void 0);
|
|
306
334
|
__decorate([
|
|
307
335
|
core.Input()
|
|
308
|
-
], SkyGridColumnComponent.prototype, "
|
|
336
|
+
], SkyGridColumnComponent.prototype, "excludeFromHighlighting", void 0);
|
|
309
337
|
__decorate([
|
|
310
338
|
core.Input()
|
|
311
|
-
], SkyGridColumnComponent.prototype, "
|
|
339
|
+
], SkyGridColumnComponent.prototype, "field", void 0);
|
|
312
340
|
__decorate([
|
|
313
341
|
core.Input()
|
|
314
|
-
], SkyGridColumnComponent.prototype, "
|
|
342
|
+
], SkyGridColumnComponent.prototype, "heading", void 0);
|
|
315
343
|
__decorate([
|
|
316
344
|
core.Input()
|
|
317
|
-
], SkyGridColumnComponent.prototype, "
|
|
345
|
+
], SkyGridColumnComponent.prototype, "hidden", void 0);
|
|
318
346
|
__decorate([
|
|
319
347
|
core.Input()
|
|
320
|
-
], SkyGridColumnComponent.prototype, "
|
|
348
|
+
], SkyGridColumnComponent.prototype, "id", void 0);
|
|
321
349
|
__decorate([
|
|
322
350
|
core.Input()
|
|
323
|
-
], SkyGridColumnComponent.prototype, "
|
|
351
|
+
], SkyGridColumnComponent.prototype, "inlineHelpPopover", void 0);
|
|
324
352
|
__decorate([
|
|
325
353
|
core.Input()
|
|
326
354
|
], SkyGridColumnComponent.prototype, "isSortable", void 0);
|
|
327
355
|
__decorate([
|
|
328
356
|
core.Input()
|
|
329
|
-
], SkyGridColumnComponent.prototype, "
|
|
330
|
-
__decorate([
|
|
331
|
-
core.Input()
|
|
332
|
-
], SkyGridColumnComponent.prototype, "alignment", void 0);
|
|
357
|
+
], SkyGridColumnComponent.prototype, "locked", void 0);
|
|
333
358
|
__decorate([
|
|
334
359
|
core.Input('search')
|
|
335
360
|
], SkyGridColumnComponent.prototype, "searchFunction", void 0);
|
|
361
|
+
__decorate([
|
|
362
|
+
core.Input()
|
|
363
|
+
], SkyGridColumnComponent.prototype, "type", void 0);
|
|
336
364
|
__decorate([
|
|
337
365
|
core.Input('template')
|
|
338
366
|
], SkyGridColumnComponent.prototype, "templateInput", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
core.Input()
|
|
369
|
+
], SkyGridColumnComponent.prototype, "width", void 0);
|
|
339
370
|
__decorate([
|
|
340
371
|
core.ContentChildren(core.TemplateRef)
|
|
341
372
|
], SkyGridColumnComponent.prototype, "templates", void 0);
|
|
@@ -349,6 +380,9 @@
|
|
|
349
380
|
return SkyGridColumnComponent;
|
|
350
381
|
}());
|
|
351
382
|
|
|
383
|
+
/**
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
352
386
|
var SkyGridColumnModel = /** @class */ (function () {
|
|
353
387
|
function SkyGridColumnModel(template, data) {
|
|
354
388
|
this.isSortable = true;
|
|
@@ -377,6 +411,9 @@
|
|
|
377
411
|
var GRID_HEADER_RESIZE_HANDLE = '.sky-grid-resize-handle';
|
|
378
412
|
var GRID_ROW_DELETE_SELECTOR = '.sky-grid-row-delete-heading';
|
|
379
413
|
var GRID_MULTISELECT_SELECTOR = '.sky-grid-multiselect-cell';
|
|
414
|
+
/**
|
|
415
|
+
* @internal
|
|
416
|
+
*/
|
|
380
417
|
var SkyGridAdapterService = /** @class */ (function () {
|
|
381
418
|
function SkyGridAdapterService(rendererFactory) {
|
|
382
419
|
this.rendererFactory = rendererFactory;
|
|
@@ -435,7 +472,24 @@
|
|
|
435
472
|
this.renderer.setStyle(el.nativeElement, style, value);
|
|
436
473
|
}
|
|
437
474
|
};
|
|
438
|
-
SkyGridAdapterService.prototype.isLeftOfLocked = function (
|
|
475
|
+
SkyGridAdapterService.prototype.isLeftOfLocked = function (handle, columns) {
|
|
476
|
+
var e_1, _a;
|
|
477
|
+
var sourceColumn = handle;
|
|
478
|
+
try {
|
|
479
|
+
for (var _b = __values(Array.from(columns)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
480
|
+
var column = _c.value;
|
|
481
|
+
if (column.contains(handle)) {
|
|
482
|
+
sourceColumn = column;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
487
|
+
finally {
|
|
488
|
+
try {
|
|
489
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
490
|
+
}
|
|
491
|
+
finally { if (e_1) throw e_1.error; }
|
|
492
|
+
}
|
|
439
493
|
for (var i = (columns.length - 1); i >= 0; i--) {
|
|
440
494
|
if (columns[i].classList.contains('sky-grid-header-locked')) {
|
|
441
495
|
return true;
|
|
@@ -480,27 +534,70 @@
|
|
|
480
534
|
// https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
|
|
481
535
|
// Returns true if the element would be selected by the specified selector string.
|
|
482
536
|
if (!Element.prototype.matches) {
|
|
483
|
-
|
|
484
|
-
|
|
537
|
+
/* istanbul ignore next */
|
|
538
|
+
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
485
539
|
}
|
|
486
540
|
|
|
487
541
|
var nextId = 0;
|
|
488
542
|
var SkyGridComponent = /** @class */ (function () {
|
|
489
|
-
function SkyGridComponent(dragulaService, gridAdapter, skyWindow, uiConfigService
|
|
543
|
+
function SkyGridComponent(affixService, changeDetector, dragulaService, gridAdapter, overlayService, skyWindow, uiConfigService) {
|
|
544
|
+
this.affixService = affixService;
|
|
545
|
+
this.changeDetector = changeDetector;
|
|
490
546
|
this.dragulaService = dragulaService;
|
|
491
547
|
this.gridAdapter = gridAdapter;
|
|
548
|
+
this.overlayService = overlayService;
|
|
492
549
|
this.skyWindow = skyWindow;
|
|
493
550
|
this.uiConfigService = uiConfigService;
|
|
494
|
-
|
|
551
|
+
/**
|
|
552
|
+
* Indicates whether to enable the multiselect feature to display a column of
|
|
553
|
+
* checkboxes on the left side of the grid. You can specify a unique ID with
|
|
554
|
+
* the `multiselectRowId` property, but multiselect defaults to the `id` property on
|
|
555
|
+
* the `data` object. To include options to select and clear all multiselect checkboxes,
|
|
556
|
+
* we recommend the [list view grid](https://developer.blackbaud.com/skyux/components/list/grid) component.
|
|
557
|
+
* @default false
|
|
558
|
+
*/
|
|
495
559
|
this.enableMultiselect = false;
|
|
560
|
+
/**
|
|
561
|
+
* Specifies how the grid fits to its parent. The valid options are `width`,
|
|
562
|
+
* which fits the grid to the parent's full width, and `scroll`, which allows the grid
|
|
563
|
+
* to exceed the parent's width. If the grid does not have enough columns to fill
|
|
564
|
+
* the parent's width, it always stretches to the parent's full width.
|
|
565
|
+
*/
|
|
496
566
|
this.fit = 'width';
|
|
567
|
+
/**
|
|
568
|
+
* Indicates whether to display a toolbar with the grid.
|
|
569
|
+
*/
|
|
497
570
|
this.hasToolbar = false;
|
|
571
|
+
/**
|
|
572
|
+
* Provides an observable to send commands to the grid.
|
|
573
|
+
*/
|
|
498
574
|
this.messageStream = new rxjs.Subject();
|
|
575
|
+
/**
|
|
576
|
+
* Fires when the width of a column changes.
|
|
577
|
+
*/
|
|
499
578
|
this.columnWidthChange = new core.EventEmitter();
|
|
579
|
+
/**
|
|
580
|
+
* Fires when the selection of multiselect checkboxes changes.
|
|
581
|
+
* Emits an array of IDs for the selected rows based on the `multiselectRowId` property
|
|
582
|
+
* that the consumer provides.
|
|
583
|
+
*/
|
|
500
584
|
this.multiselectSelectionChange = new core.EventEmitter();
|
|
585
|
+
/**
|
|
586
|
+
* @internal
|
|
587
|
+
*/
|
|
501
588
|
this.rowDeleteCancel = new core.EventEmitter();
|
|
589
|
+
/**
|
|
590
|
+
* @internal
|
|
591
|
+
*/
|
|
502
592
|
this.rowDeleteConfirm = new core.EventEmitter();
|
|
593
|
+
/**
|
|
594
|
+
* Fires when the columns to display in the grid change or when the order of the columns changes.
|
|
595
|
+
* The event emits an array of IDs for the displayed columns that reflects the column order.
|
|
596
|
+
*/
|
|
503
597
|
this.selectedColumnIdsChange = new core.EventEmitter();
|
|
598
|
+
/**
|
|
599
|
+
* Fires when the active sort field changes.
|
|
600
|
+
*/
|
|
504
601
|
this.sortFieldChange = new core.EventEmitter();
|
|
505
602
|
this.columnResizeStep = 10;
|
|
506
603
|
this.gridId = ++nextId;
|
|
@@ -512,6 +609,7 @@
|
|
|
512
609
|
this.isDraggingResizeHandle = false;
|
|
513
610
|
this.isResized = false;
|
|
514
611
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
612
|
+
this.rowDeleteContents = {};
|
|
515
613
|
this.subscriptions = [];
|
|
516
614
|
this.scrollTriggered = false;
|
|
517
615
|
this.selectedColumnIdsSet = false;
|
|
@@ -526,6 +624,10 @@
|
|
|
526
624
|
get: function () {
|
|
527
625
|
return this._selectedColumnIds;
|
|
528
626
|
},
|
|
627
|
+
/**
|
|
628
|
+
* Specifies the columns to display in the grid based on the `id` or `field` properties
|
|
629
|
+
* of the columns. If no columns are specified, then the grid displays all columns.
|
|
630
|
+
*/
|
|
529
631
|
set: function (value) {
|
|
530
632
|
var currentIds = this._selectedColumnIds;
|
|
531
633
|
this._selectedColumnIds = value;
|
|
@@ -557,6 +659,11 @@
|
|
|
557
659
|
get: function () {
|
|
558
660
|
return this._selectedRowIds;
|
|
559
661
|
},
|
|
662
|
+
/**
|
|
663
|
+
* Specifies a set of IDs for the rows to select in a multiselect grid.
|
|
664
|
+
* The IDs match the `id` properties of the `data` objects.
|
|
665
|
+
* Rows with IDs that are not included are de-selected in the grid.
|
|
666
|
+
*/
|
|
560
667
|
set: function (value) {
|
|
561
668
|
if (value) {
|
|
562
669
|
this._selectedRowIds = value;
|
|
@@ -567,6 +674,13 @@
|
|
|
567
674
|
enumerable: true,
|
|
568
675
|
configurable: true
|
|
569
676
|
});
|
|
677
|
+
Object.defineProperty(SkyGridComponent.prototype, "tableWidth", {
|
|
678
|
+
get: function () {
|
|
679
|
+
return this.tableElementRef.nativeElement.offsetWidth;
|
|
680
|
+
},
|
|
681
|
+
enumerable: true,
|
|
682
|
+
configurable: true
|
|
683
|
+
});
|
|
570
684
|
SkyGridComponent.prototype.ngOnInit = function () {
|
|
571
685
|
var _this = this;
|
|
572
686
|
this.messageStream
|
|
@@ -597,12 +711,34 @@
|
|
|
597
711
|
SkyGridComponent.prototype.ngOnChanges = function (changes) {
|
|
598
712
|
var _this = this;
|
|
599
713
|
if (changes.columns && this.columns) {
|
|
714
|
+
if (this.selectedColumnIds) {
|
|
715
|
+
this.selectedColumnIds = this.selectedColumnIds.filter(function (columnId) { return _this.columns.find(function (column) { return column.id === columnId; }); });
|
|
716
|
+
}
|
|
600
717
|
this.setDisplayedColumns(true);
|
|
601
718
|
}
|
|
602
719
|
if (changes.data && this.data) {
|
|
603
720
|
this.transformData();
|
|
604
721
|
// This set timeout is necessary to ensure the data has rendered in the grid
|
|
605
722
|
setTimeout(function () {
|
|
723
|
+
// This cleans up any lingering row deletes for items that have been removed.
|
|
724
|
+
Object.keys(_this.rowDeleteContents).forEach(function (id) {
|
|
725
|
+
if (!_this.data.find(function (item) { return item.id === id; })) {
|
|
726
|
+
_this.destroyRowDelete(id);
|
|
727
|
+
}
|
|
728
|
+
else {
|
|
729
|
+
// The rows re-render thus messing up the affixers. We must reaffix them so that things
|
|
730
|
+
// continue to render correctly.
|
|
731
|
+
var rowElement = _this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + id + '"]');
|
|
732
|
+
_this.rowDeleteContents[id].affixer.affixTo(rowElement, {
|
|
733
|
+
autoFitContext: core$1.SkyAffixAutoFitContext.Viewport,
|
|
734
|
+
isSticky: true,
|
|
735
|
+
placement: 'above',
|
|
736
|
+
verticalAlignment: 'top',
|
|
737
|
+
horizontalAlignment: 'left',
|
|
738
|
+
enableAutoFit: false
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
});
|
|
606
742
|
_this.checkUserColumnWidthsForScroll();
|
|
607
743
|
});
|
|
608
744
|
}
|
|
@@ -611,12 +747,16 @@
|
|
|
611
747
|
}
|
|
612
748
|
};
|
|
613
749
|
SkyGridComponent.prototype.ngOnDestroy = function () {
|
|
750
|
+
var _this = this;
|
|
614
751
|
this.subscriptions.forEach(function (subscription) {
|
|
615
752
|
subscription.unsubscribe();
|
|
616
753
|
});
|
|
617
754
|
this.multiselectSelectionChange.complete();
|
|
618
755
|
this.ngUnsubscribe.next();
|
|
619
756
|
this.ngUnsubscribe.complete();
|
|
757
|
+
Object.keys(this.rowDeleteContents).forEach(function (id) {
|
|
758
|
+
_this.destroyRowDelete(id);
|
|
759
|
+
});
|
|
620
760
|
};
|
|
621
761
|
SkyGridComponent.prototype.onWindowResize = function () {
|
|
622
762
|
this.checkUserColumnWidthsForScroll();
|
|
@@ -849,6 +989,7 @@
|
|
|
849
989
|
SkyGridComponent.prototype.cancelRowDelete = function (id) {
|
|
850
990
|
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(function (config) { return config.id !== id; });
|
|
851
991
|
this.rowDeleteCancel.emit({ id: id });
|
|
992
|
+
this.destroyRowDelete(id);
|
|
852
993
|
};
|
|
853
994
|
SkyGridComponent.prototype.confirmRowDelete = function (id) {
|
|
854
995
|
this.rowDeleteConfigs.find(function (config) { return config.id === id; }).pending = true;
|
|
@@ -925,6 +1066,7 @@
|
|
|
925
1066
|
this.emitSelectedRows(exports.SkyGridSelectedRowsSource.ClearAll);
|
|
926
1067
|
};
|
|
927
1068
|
SkyGridComponent.prototype.handleIncomingMessages = function (message) {
|
|
1069
|
+
var _this = this;
|
|
928
1070
|
/* tslint:disable-next-line:switch-default */
|
|
929
1071
|
switch (message.type) {
|
|
930
1072
|
case exports.SkyGridMessageType.SelectAll:
|
|
@@ -944,6 +1086,41 @@
|
|
|
944
1086
|
}
|
|
945
1087
|
else {
|
|
946
1088
|
this.rowDeleteConfigs.push({ id: message.data.promptDeleteRow.id, pending: false });
|
|
1089
|
+
var overlay_1 = this.overlayService.create({
|
|
1090
|
+
enableScroll: true,
|
|
1091
|
+
showBackdrop: false,
|
|
1092
|
+
closeOnNavigation: true,
|
|
1093
|
+
enableClose: false,
|
|
1094
|
+
enablePointerEvents: true
|
|
1095
|
+
});
|
|
1096
|
+
overlay_1.attachTemplate(this.inlineDeleteTemplateRef, { $implicit: this.data.find(function (item) { return item.id === message.data.promptDeleteRow.id; }) });
|
|
1097
|
+
/**
|
|
1098
|
+
* We are manually setting the z-index here because overlays will always be on top of
|
|
1099
|
+
* the omnibar. This manual setting is 1 less than the omnibar's z-index of 1000. We
|
|
1100
|
+
* discussed changing the overlay service to allow for this but decided against that
|
|
1101
|
+
* change at this time due to its niche nature.
|
|
1102
|
+
*/
|
|
1103
|
+
overlay_1.componentRef.instance.zIndex = '999';
|
|
1104
|
+
setTimeout(function () {
|
|
1105
|
+
var inlineDeleteRef = _this.inlineDeleteRefs.toArray()
|
|
1106
|
+
.find(function (elRef) {
|
|
1107
|
+
return elRef.nativeElement.id === 'row-delete-ref-' + message.data.promptDeleteRow.id;
|
|
1108
|
+
});
|
|
1109
|
+
var affixer = _this.affixService.createAffixer(inlineDeleteRef);
|
|
1110
|
+
var rowElement = _this.tableElementRef.nativeElement.querySelector('[sky-cmp-id="' + message.data.promptDeleteRow.id + '"]');
|
|
1111
|
+
affixer.affixTo(rowElement, {
|
|
1112
|
+
autoFitContext: core$1.SkyAffixAutoFitContext.Viewport,
|
|
1113
|
+
isSticky: true,
|
|
1114
|
+
placement: 'above',
|
|
1115
|
+
verticalAlignment: 'top',
|
|
1116
|
+
horizontalAlignment: 'left',
|
|
1117
|
+
enableAutoFit: false
|
|
1118
|
+
});
|
|
1119
|
+
_this.rowDeleteContents[message.data.promptDeleteRow.id] = {
|
|
1120
|
+
affixer: affixer,
|
|
1121
|
+
overlay: overlay_1
|
|
1122
|
+
};
|
|
1123
|
+
});
|
|
947
1124
|
}
|
|
948
1125
|
}
|
|
949
1126
|
break;
|
|
@@ -952,6 +1129,7 @@
|
|
|
952
1129
|
/* istanbul ignore else */
|
|
953
1130
|
if (message.data && message.data.abortDeleteRow) {
|
|
954
1131
|
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(function (config) { return config.id !== message.data.abortDeleteRow.id; });
|
|
1132
|
+
this.destroyRowDelete(message.data.abortDeleteRow.id);
|
|
955
1133
|
}
|
|
956
1134
|
break;
|
|
957
1135
|
}
|
|
@@ -969,7 +1147,8 @@
|
|
|
969
1147
|
if (respectHidden === void 0) { respectHidden = false; }
|
|
970
1148
|
if (this.selectedColumnIds !== undefined) {
|
|
971
1149
|
// setup displayed columns
|
|
972
|
-
this.displayedColumns = this.selectedColumnIds
|
|
1150
|
+
this.displayedColumns = this.selectedColumnIds
|
|
1151
|
+
.filter(function (columnId) { return _this.columns.find(function (column) { return column.id === columnId; }); }).map(function (columnId) { return _this.columns.filter(function (column) { return column.id === columnId; })[0]; });
|
|
973
1152
|
}
|
|
974
1153
|
else if (respectHidden) {
|
|
975
1154
|
this.displayedColumns = this.columns.filter(function (column) {
|
|
@@ -1061,16 +1240,10 @@
|
|
|
1061
1240
|
}
|
|
1062
1241
|
this.changeDetector.detectChanges();
|
|
1063
1242
|
this.columnWidthChange.emit(this.getColumnWidthModelChange());
|
|
1064
|
-
// If in "scroll" mode, reset the full table width.
|
|
1065
|
-
// This prevents pixel "hopping" for the non-resized columns
|
|
1066
|
-
if (this.fit === 'scroll') {
|
|
1067
|
-
this.tableWidth = this.tableElementRef.nativeElement.offsetWidth;
|
|
1068
|
-
}
|
|
1069
1243
|
};
|
|
1070
1244
|
SkyGridComponent.prototype.initColumnWidths = function () {
|
|
1071
1245
|
var _this = this;
|
|
1072
1246
|
// Establish table width.
|
|
1073
|
-
this.tableWidth = this.tableElementRef.nativeElement.offsetWidth;
|
|
1074
1247
|
this.showTopScroll = true;
|
|
1075
1248
|
// Set column widths based on the width initially given by the browser.
|
|
1076
1249
|
// computedWidth prevents accidental overflow for browsers with sub-pixel widths.
|
|
@@ -1122,7 +1295,6 @@
|
|
|
1122
1295
|
this.skyWindow.nativeWindow.setTimeout(function () {
|
|
1123
1296
|
_this.gridAdapter.setStyle(_this.tableElementRef, 'width', "auto");
|
|
1124
1297
|
_this.changeDetector.detectChanges();
|
|
1125
|
-
_this.tableWidth = _this.tableElementRef.nativeElement.offsetWidth;
|
|
1126
1298
|
_this.gridAdapter.setStyle(_this.tableElementRef, 'width', _this.tableWidth + "px");
|
|
1127
1299
|
_this.changeDetector.detectChanges();
|
|
1128
1300
|
});
|
|
@@ -1148,6 +1320,14 @@
|
|
|
1148
1320
|
SkyGridComponent.prototype.addDelimeter = function (text, delimiter) {
|
|
1149
1321
|
return text.filter(function (val) { return val; }).join(delimiter);
|
|
1150
1322
|
};
|
|
1323
|
+
SkyGridComponent.prototype.destroyRowDelete = function (id) {
|
|
1324
|
+
var rowDeleteContents = this.rowDeleteContents[id];
|
|
1325
|
+
if (rowDeleteContents) {
|
|
1326
|
+
rowDeleteContents.affixer.destroy();
|
|
1327
|
+
this.overlayService.close(rowDeleteContents.overlay);
|
|
1328
|
+
delete this.rowDeleteContents[id];
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1151
1331
|
SkyGridComponent.prototype.emitSelectedRows = function (source) {
|
|
1152
1332
|
var selectedRows = {
|
|
1153
1333
|
selectedRowIds: this.getSelectedRows(),
|
|
@@ -1244,11 +1424,13 @@
|
|
|
1244
1424
|
});
|
|
1245
1425
|
};
|
|
1246
1426
|
SkyGridComponent.ctorParameters = function () { return [
|
|
1427
|
+
{ type: core$1.SkyAffixService },
|
|
1428
|
+
{ type: core.ChangeDetectorRef },
|
|
1247
1429
|
{ type: ng2Dragula.DragulaService },
|
|
1248
1430
|
{ type: SkyGridAdapterService },
|
|
1431
|
+
{ type: core$1.SkyOverlayService },
|
|
1249
1432
|
{ type: core$1.SkyAppWindowRef },
|
|
1250
|
-
{ type: core$1.SkyUIConfigService }
|
|
1251
|
-
{ type: core.ChangeDetectorRef }
|
|
1433
|
+
{ type: core$1.SkyUIConfigService }
|
|
1252
1434
|
]; };
|
|
1253
1435
|
__decorate([
|
|
1254
1436
|
core.Input()
|
|
@@ -1282,19 +1464,19 @@
|
|
|
1282
1464
|
], SkyGridComponent.prototype, "rowHighlightedId", void 0);
|
|
1283
1465
|
__decorate([
|
|
1284
1466
|
core.Input()
|
|
1285
|
-
], SkyGridComponent.prototype, "
|
|
1467
|
+
], SkyGridComponent.prototype, "selectedColumnIds", null);
|
|
1286
1468
|
__decorate([
|
|
1287
1469
|
core.Input()
|
|
1288
|
-
], SkyGridComponent.prototype, "
|
|
1470
|
+
], SkyGridComponent.prototype, "selectedRowIds", null);
|
|
1289
1471
|
__decorate([
|
|
1290
1472
|
core.Input()
|
|
1291
|
-
], SkyGridComponent.prototype, "
|
|
1473
|
+
], SkyGridComponent.prototype, "settingsKey", void 0);
|
|
1292
1474
|
__decorate([
|
|
1293
1475
|
core.Input()
|
|
1294
|
-
], SkyGridComponent.prototype, "
|
|
1476
|
+
], SkyGridComponent.prototype, "sortField", void 0);
|
|
1295
1477
|
__decorate([
|
|
1296
1478
|
core.Input()
|
|
1297
|
-
], SkyGridComponent.prototype, "
|
|
1479
|
+
], SkyGridComponent.prototype, "width", void 0);
|
|
1298
1480
|
__decorate([
|
|
1299
1481
|
core.Output()
|
|
1300
1482
|
], SkyGridComponent.prototype, "columnWidthChange", void 0);
|
|
@@ -1314,7 +1496,7 @@
|
|
|
1314
1496
|
core.Output()
|
|
1315
1497
|
], SkyGridComponent.prototype, "sortFieldChange", void 0);
|
|
1316
1498
|
__decorate([
|
|
1317
|
-
core.ContentChildren(SkyGridColumnComponent
|
|
1499
|
+
core.ContentChildren(SkyGridColumnComponent)
|
|
1318
1500
|
], SkyGridComponent.prototype, "columnComponents", void 0);
|
|
1319
1501
|
__decorate([
|
|
1320
1502
|
core.ViewChildren('gridCol')
|
|
@@ -1322,6 +1504,12 @@
|
|
|
1322
1504
|
__decorate([
|
|
1323
1505
|
core.ViewChildren('colSizeRange')
|
|
1324
1506
|
], SkyGridComponent.prototype, "columnRangeInputElementRefs", void 0);
|
|
1507
|
+
__decorate([
|
|
1508
|
+
core.ViewChildren('inlineDeleteRef')
|
|
1509
|
+
], SkyGridComponent.prototype, "inlineDeleteRefs", void 0);
|
|
1510
|
+
__decorate([
|
|
1511
|
+
core.ViewChild('inlineDeleteTemplateRef', { read: core.TemplateRef })
|
|
1512
|
+
], SkyGridComponent.prototype, "inlineDeleteTemplateRef", void 0);
|
|
1325
1513
|
__decorate([
|
|
1326
1514
|
core.ViewChild('gridContainer')
|
|
1327
1515
|
], SkyGridComponent.prototype, "tableContainerElementRef", void 0);
|
|
@@ -1340,18 +1528,21 @@
|
|
|
1340
1528
|
SkyGridComponent = __decorate([
|
|
1341
1529
|
core.Component({
|
|
1342
1530
|
selector: 'sky-grid',
|
|
1343
|
-
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=\"
|
|
1531
|
+
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",
|
|
1344
1532
|
viewProviders: [ng2Dragula.DragulaService],
|
|
1345
1533
|
providers: [
|
|
1346
1534
|
SkyGridAdapterService
|
|
1347
1535
|
],
|
|
1348
1536
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1349
|
-
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-
|
|
1537
|
+
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}"]
|
|
1350
1538
|
})
|
|
1351
1539
|
], SkyGridComponent);
|
|
1352
1540
|
return SkyGridComponent;
|
|
1353
1541
|
}());
|
|
1354
1542
|
|
|
1543
|
+
/**
|
|
1544
|
+
* @internal
|
|
1545
|
+
*/
|
|
1355
1546
|
var SkyGridCellComponent = /** @class */ (function () {
|
|
1356
1547
|
function SkyGridCellComponent() {
|
|
1357
1548
|
}
|
|
@@ -1449,11 +1640,13 @@
|
|
|
1449
1640
|
common.CommonModule,
|
|
1450
1641
|
ng2Dragula.DragulaModule,
|
|
1451
1642
|
forms.FormsModule,
|
|
1643
|
+
core$1.SkyAffixModule,
|
|
1452
1644
|
forms$1.SkyCheckboxModule,
|
|
1453
1645
|
SkyGridsResourcesModule,
|
|
1454
1646
|
indicators.SkyHelpInlineModule,
|
|
1455
1647
|
indicators.SkyIconModule,
|
|
1456
1648
|
layout.SkyInlineDeleteModule,
|
|
1649
|
+
core$1.SkyOverlayModule,
|
|
1457
1650
|
popovers.SkyPopoverModule,
|
|
1458
1651
|
indicators.SkyTextHighlightModule
|
|
1459
1652
|
],
|