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