@skyux/grids 5.5.0-alpha.0 → 5.6.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/bundles/skyux-grids.umd.js +299 -248
- package/documentation.json +365 -324
- package/esm2015/lib/modules/grid/grid-adapter.service.js +5 -5
- package/esm2015/lib/modules/grid/grid-adapter.service.js.map +1 -1
- package/esm2015/lib/modules/grid/grid-cell.component.js +2 -2
- package/esm2015/lib/modules/grid/grid-cell.component.js.map +1 -1
- package/esm2015/lib/modules/grid/grid-column.component.js.map +1 -1
- package/esm2015/lib/modules/grid/grid-column.model.js.map +1 -1
- package/esm2015/lib/modules/grid/grid.component.js +88 -55
- package/esm2015/lib/modules/grid/grid.component.js.map +1 -1
- package/esm2015/lib/modules/grid/grid.module.js +6 -6
- package/esm2015/lib/modules/grid/grid.module.js.map +1 -1
- package/esm2015/lib/modules/shared/skyux-grids-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/skyux-grids-resources.module.js.map +1 -1
- package/fesm2015/skyux-grids.js +251 -218
- package/fesm2015/skyux-grids.js.map +1 -1
- package/lib/modules/grid/grid-adapter.service.d.ts +1 -1
- package/lib/modules/grid/grid.component.d.ts +5 -4
- package/package.json +22 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/grids', ['exports', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.grids = {}), global.ng.
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@skyux/core'), require('@skyux/forms'), require('@skyux/indicators'), require('@skyux/layout'), require('@skyux/popovers'), require('ng2-dragula'), require('@skyux/i18n'), require('@skyux/list-builder-common'), require('rxjs'), require('rxjs/operators')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@skyux/grids', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@skyux/core', '@skyux/forms', '@skyux/indicators', '@skyux/layout', '@skyux/popovers', 'ng2-dragula', '@skyux/i18n', '@skyux/list-builder-common', 'rxjs', 'rxjs/operators'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.grids = {}), global.ng.common, global.ng.core, global.ng.forms, global.i1, global.i5, global.i4, global.i7, global.i9, global.i2, global.i11, global.listBuilderCommon, global.rxjs, global.rxjs.operators));
|
|
5
|
+
})(this, (function (exports, i8, i0, i10, i1, i5, i4, i7, i9, i2, i11, listBuilderCommon, rxjs, operators) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -22,17 +22,238 @@
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
25
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
27
|
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
28
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
29
28
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
30
29
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
31
30
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
32
31
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
33
32
|
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
33
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
34
34
|
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
38
|
+
* The contents of this file were automatically generated by
|
|
39
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/skyux-grids' schematic.
|
|
40
|
+
* To update this file, simply rerun the command.
|
|
41
|
+
*/
|
|
42
|
+
var RESOURCES = {
|
|
43
|
+
'EN-US': { skyux_grid_multiselect_select_row: { message: 'Select row' } },
|
|
44
|
+
};
|
|
45
|
+
var SkyuxGridsResourcesProvider = /** @class */ (function () {
|
|
46
|
+
function SkyuxGridsResourcesProvider() {
|
|
47
|
+
}
|
|
48
|
+
SkyuxGridsResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
49
|
+
return i11.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
50
|
+
};
|
|
51
|
+
return SkyuxGridsResourcesProvider;
|
|
52
|
+
}());
|
|
53
|
+
/**
|
|
54
|
+
* Import into any component library module that needs to use resource strings.
|
|
55
|
+
*/
|
|
56
|
+
var SkyuxGridsResourcesModule = /** @class */ (function () {
|
|
57
|
+
function SkyuxGridsResourcesModule() {
|
|
58
|
+
}
|
|
59
|
+
return SkyuxGridsResourcesModule;
|
|
60
|
+
}());
|
|
61
|
+
SkyuxGridsResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
62
|
+
SkyuxGridsResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, exports: [i11.SkyI18nModule] });
|
|
63
|
+
SkyuxGridsResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, providers: [
|
|
64
|
+
{
|
|
65
|
+
provide: i11.SKY_LIB_RESOURCES_PROVIDERS,
|
|
66
|
+
useClass: SkyuxGridsResourcesProvider,
|
|
67
|
+
multi: true,
|
|
68
|
+
},
|
|
69
|
+
], imports: [i11.SkyI18nModule] });
|
|
70
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, decorators: [{
|
|
71
|
+
type: i0.NgModule,
|
|
72
|
+
args: [{
|
|
73
|
+
exports: [i11.SkyI18nModule],
|
|
74
|
+
providers: [
|
|
75
|
+
{
|
|
76
|
+
provide: i11.SKY_LIB_RESOURCES_PROVIDERS,
|
|
77
|
+
useClass: SkyuxGridsResourcesProvider,
|
|
78
|
+
multi: true,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
}]
|
|
82
|
+
}] });
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
var SkyGridCellComponent = /** @class */ (function () {
|
|
88
|
+
function SkyGridCellComponent() {
|
|
89
|
+
}
|
|
90
|
+
SkyGridCellComponent.prototype.ngOnInit = function () {
|
|
91
|
+
this.container.createEmbeddedView(this.template, this);
|
|
92
|
+
};
|
|
93
|
+
Object.defineProperty(SkyGridCellComponent.prototype, "row", {
|
|
94
|
+
get: function () {
|
|
95
|
+
return this.item.data;
|
|
96
|
+
},
|
|
97
|
+
enumerable: false,
|
|
98
|
+
configurable: true
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(SkyGridCellComponent.prototype, "value", {
|
|
101
|
+
get: function () {
|
|
102
|
+
if (this.item.data && (this.fieldSelector || this.columnId)) {
|
|
103
|
+
return listBuilderCommon.getData(this.item.data, this.fieldSelector || this.columnId);
|
|
104
|
+
}
|
|
105
|
+
return undefined;
|
|
106
|
+
},
|
|
107
|
+
enumerable: false,
|
|
108
|
+
configurable: true
|
|
109
|
+
});
|
|
110
|
+
return SkyGridCellComponent;
|
|
111
|
+
}());
|
|
112
|
+
SkyGridCellComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridCellComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
113
|
+
SkyGridCellComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, 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__namespace.ChangeDetectionStrategy.OnPush });
|
|
114
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridCellComponent, decorators: [{
|
|
115
|
+
type: i0.Component,
|
|
116
|
+
args: [{
|
|
117
|
+
selector: 'sky-grid-cell',
|
|
118
|
+
template: '<ng-template #cell></ng-template>',
|
|
119
|
+
styles: [":host{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px;min-height:35px}\n"],
|
|
120
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
121
|
+
}]
|
|
122
|
+
}], propDecorators: { item: [{
|
|
123
|
+
type: i0.Input
|
|
124
|
+
}], columnId: [{
|
|
125
|
+
type: i0.Input
|
|
126
|
+
}], template: [{
|
|
127
|
+
type: i0.Input
|
|
128
|
+
}], fieldSelector: [{
|
|
129
|
+
type: i0.Input
|
|
130
|
+
}], container: [{
|
|
131
|
+
type: i0.ViewChild,
|
|
132
|
+
args: ['cell', {
|
|
133
|
+
read: i0.ViewContainerRef,
|
|
134
|
+
static: true,
|
|
135
|
+
}]
|
|
136
|
+
}] } });
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Specifies the column information.
|
|
140
|
+
*/
|
|
141
|
+
var SkyGridColumnComponent = /** @class */ (function () {
|
|
142
|
+
function SkyGridColumnComponent() {
|
|
143
|
+
/**
|
|
144
|
+
* Specifies the horizontal alignment of the column's data and header.
|
|
145
|
+
* Options include: `"left"`, `"center"`, and `"right"`.
|
|
146
|
+
* @default "left"
|
|
147
|
+
*/
|
|
148
|
+
this.alignment = 'left';
|
|
149
|
+
/**
|
|
150
|
+
* Indicates whether the column sorts the grid when users click the column header.
|
|
151
|
+
* @default true
|
|
152
|
+
*/
|
|
153
|
+
this.isSortable = true;
|
|
154
|
+
/**
|
|
155
|
+
* Specifies a search function to apply for the specific column. By default,
|
|
156
|
+
* the column executes a string compare on the column data.
|
|
157
|
+
* @default (value, searchText) => value.toString().toLowerCase().indexOf(searchText) !== -1
|
|
158
|
+
*/
|
|
159
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
160
|
+
this.searchFunction = this.search;
|
|
161
|
+
this.descriptionChanges = new i0.EventEmitter();
|
|
162
|
+
this.descriptionModelChanges = new i0.EventEmitter();
|
|
163
|
+
this.headingChanges = new i0.EventEmitter();
|
|
164
|
+
this.headingModelChanges = new i0.EventEmitter();
|
|
165
|
+
this.inlineHelpPopoverModelChanges = new i0.EventEmitter();
|
|
166
|
+
}
|
|
167
|
+
SkyGridColumnComponent.prototype.ngOnChanges = function (changes) {
|
|
168
|
+
if (changes.heading && changes.heading.firstChange === false) {
|
|
169
|
+
this.headingChanges.emit(this.heading);
|
|
170
|
+
this.headingModelChanges.emit({
|
|
171
|
+
value: this.heading,
|
|
172
|
+
id: this.id,
|
|
173
|
+
field: this.field,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (changes.description && changes.description.firstChange === false) {
|
|
177
|
+
this.descriptionChanges.emit(this.description);
|
|
178
|
+
this.descriptionModelChanges.emit({
|
|
179
|
+
value: this.description,
|
|
180
|
+
id: this.id,
|
|
181
|
+
field: this.field,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (changes.inlineHelpPopover &&
|
|
185
|
+
changes.inlineHelpPopover.firstChange === false) {
|
|
186
|
+
this.inlineHelpPopoverModelChanges.emit({
|
|
187
|
+
value: this.inlineHelpPopover,
|
|
188
|
+
id: this.id,
|
|
189
|
+
field: this.field,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
Object.defineProperty(SkyGridColumnComponent.prototype, "template", {
|
|
194
|
+
get: function () {
|
|
195
|
+
if (this.templates.length > 0) {
|
|
196
|
+
return this.templates.first;
|
|
197
|
+
}
|
|
198
|
+
return this.templateInput;
|
|
199
|
+
},
|
|
200
|
+
enumerable: false,
|
|
201
|
+
configurable: true
|
|
202
|
+
});
|
|
203
|
+
SkyGridColumnComponent.prototype.search = function (value, searchText) {
|
|
204
|
+
/* tslint:disable:no-null-keyword */
|
|
205
|
+
if (value !== undefined && value !== null) {
|
|
206
|
+
return value.toString().toLowerCase().indexOf(searchText) !== -1;
|
|
207
|
+
}
|
|
208
|
+
/* tslint:enable */
|
|
209
|
+
return false;
|
|
210
|
+
};
|
|
211
|
+
return SkyGridColumnComponent;
|
|
212
|
+
}());
|
|
213
|
+
SkyGridColumnComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridColumnComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
214
|
+
SkyGridColumnComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef }], usesOnChanges: true, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
215
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridColumnComponent, decorators: [{
|
|
216
|
+
type: i0.Component,
|
|
217
|
+
args: [{
|
|
218
|
+
selector: 'sky-grid-column',
|
|
219
|
+
template: '<ng-content></ng-content>',
|
|
220
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
221
|
+
}]
|
|
222
|
+
}], propDecorators: { alignment: [{
|
|
223
|
+
type: i0.Input
|
|
224
|
+
}], description: [{
|
|
225
|
+
type: i0.Input
|
|
226
|
+
}], excludeFromHighlighting: [{
|
|
227
|
+
type: i0.Input
|
|
228
|
+
}], field: [{
|
|
229
|
+
type: i0.Input
|
|
230
|
+
}], heading: [{
|
|
231
|
+
type: i0.Input
|
|
232
|
+
}], hidden: [{
|
|
233
|
+
type: i0.Input
|
|
234
|
+
}], id: [{
|
|
235
|
+
type: i0.Input
|
|
236
|
+
}], inlineHelpPopover: [{
|
|
237
|
+
type: i0.Input
|
|
238
|
+
}], isSortable: [{
|
|
239
|
+
type: i0.Input
|
|
240
|
+
}], locked: [{
|
|
241
|
+
type: i0.Input
|
|
242
|
+
}], searchFunction: [{
|
|
243
|
+
type: i0.Input,
|
|
244
|
+
args: ['search']
|
|
245
|
+
}], type: [{
|
|
246
|
+
type: i0.Input
|
|
247
|
+
}], templateInput: [{
|
|
248
|
+
type: i0.Input,
|
|
249
|
+
args: ['template']
|
|
250
|
+
}], width: [{
|
|
251
|
+
type: i0.Input
|
|
252
|
+
}], templates: [{
|
|
253
|
+
type: i0.ContentChildren,
|
|
254
|
+
args: [i0.TemplateRef]
|
|
255
|
+
}] } });
|
|
256
|
+
|
|
36
257
|
/*! *****************************************************************************
|
|
37
258
|
Copyright (c) Microsoft Corporation.
|
|
38
259
|
|
|
@@ -453,125 +674,6 @@
|
|
|
453
674
|
type: i0.Injectable
|
|
454
675
|
}], ctorParameters: function () { return [{ type: i0__namespace.RendererFactory2 }]; } });
|
|
455
676
|
|
|
456
|
-
/**
|
|
457
|
-
* Specifies the column information.
|
|
458
|
-
*/
|
|
459
|
-
var SkyGridColumnComponent = /** @class */ (function () {
|
|
460
|
-
function SkyGridColumnComponent() {
|
|
461
|
-
/**
|
|
462
|
-
* Specifies the horizontal alignment of the column's data and header.
|
|
463
|
-
* Options include: `"left"`, `"center"`, and `"right"`.
|
|
464
|
-
* @default "left"
|
|
465
|
-
*/
|
|
466
|
-
this.alignment = 'left';
|
|
467
|
-
/**
|
|
468
|
-
* Indicates whether the column sorts the grid when users click the column header.
|
|
469
|
-
* @default true
|
|
470
|
-
*/
|
|
471
|
-
this.isSortable = true;
|
|
472
|
-
/**
|
|
473
|
-
* Specifies a search function to apply for the specific column. By default,
|
|
474
|
-
* the column executes a string compare on the column data.
|
|
475
|
-
* @default (value, searchText) => value.toString().toLowerCase().indexOf(searchText) !== -1
|
|
476
|
-
*/
|
|
477
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
478
|
-
this.searchFunction = this.search;
|
|
479
|
-
this.descriptionChanges = new i0.EventEmitter();
|
|
480
|
-
this.descriptionModelChanges = new i0.EventEmitter();
|
|
481
|
-
this.headingChanges = new i0.EventEmitter();
|
|
482
|
-
this.headingModelChanges = new i0.EventEmitter();
|
|
483
|
-
this.inlineHelpPopoverModelChanges = new i0.EventEmitter();
|
|
484
|
-
}
|
|
485
|
-
SkyGridColumnComponent.prototype.ngOnChanges = function (changes) {
|
|
486
|
-
if (changes.heading && changes.heading.firstChange === false) {
|
|
487
|
-
this.headingChanges.emit(this.heading);
|
|
488
|
-
this.headingModelChanges.emit({
|
|
489
|
-
value: this.heading,
|
|
490
|
-
id: this.id,
|
|
491
|
-
field: this.field,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
if (changes.description && changes.description.firstChange === false) {
|
|
495
|
-
this.descriptionChanges.emit(this.description);
|
|
496
|
-
this.descriptionModelChanges.emit({
|
|
497
|
-
value: this.description,
|
|
498
|
-
id: this.id,
|
|
499
|
-
field: this.field,
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
if (changes.inlineHelpPopover &&
|
|
503
|
-
changes.inlineHelpPopover.firstChange === false) {
|
|
504
|
-
this.inlineHelpPopoverModelChanges.emit({
|
|
505
|
-
value: this.inlineHelpPopover,
|
|
506
|
-
id: this.id,
|
|
507
|
-
field: this.field,
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
Object.defineProperty(SkyGridColumnComponent.prototype, "template", {
|
|
512
|
-
get: function () {
|
|
513
|
-
if (this.templates.length > 0) {
|
|
514
|
-
return this.templates.first;
|
|
515
|
-
}
|
|
516
|
-
return this.templateInput;
|
|
517
|
-
},
|
|
518
|
-
enumerable: false,
|
|
519
|
-
configurable: true
|
|
520
|
-
});
|
|
521
|
-
SkyGridColumnComponent.prototype.search = function (value, searchText) {
|
|
522
|
-
/* tslint:disable:no-null-keyword */
|
|
523
|
-
if (value !== undefined && value !== null) {
|
|
524
|
-
return value.toString().toLowerCase().indexOf(searchText) !== -1;
|
|
525
|
-
}
|
|
526
|
-
/* tslint:enable */
|
|
527
|
-
return false;
|
|
528
|
-
};
|
|
529
|
-
return SkyGridColumnComponent;
|
|
530
|
-
}());
|
|
531
|
-
SkyGridColumnComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridColumnComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
532
|
-
SkyGridColumnComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef }], usesOnChanges: true, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
533
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridColumnComponent, decorators: [{
|
|
534
|
-
type: i0.Component,
|
|
535
|
-
args: [{
|
|
536
|
-
selector: 'sky-grid-column',
|
|
537
|
-
template: '<ng-content></ng-content>',
|
|
538
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
539
|
-
}]
|
|
540
|
-
}], propDecorators: { alignment: [{
|
|
541
|
-
type: i0.Input
|
|
542
|
-
}], description: [{
|
|
543
|
-
type: i0.Input
|
|
544
|
-
}], excludeFromHighlighting: [{
|
|
545
|
-
type: i0.Input
|
|
546
|
-
}], field: [{
|
|
547
|
-
type: i0.Input
|
|
548
|
-
}], heading: [{
|
|
549
|
-
type: i0.Input
|
|
550
|
-
}], hidden: [{
|
|
551
|
-
type: i0.Input
|
|
552
|
-
}], id: [{
|
|
553
|
-
type: i0.Input
|
|
554
|
-
}], inlineHelpPopover: [{
|
|
555
|
-
type: i0.Input
|
|
556
|
-
}], isSortable: [{
|
|
557
|
-
type: i0.Input
|
|
558
|
-
}], locked: [{
|
|
559
|
-
type: i0.Input
|
|
560
|
-
}], searchFunction: [{
|
|
561
|
-
type: i0.Input,
|
|
562
|
-
args: ['search']
|
|
563
|
-
}], type: [{
|
|
564
|
-
type: i0.Input
|
|
565
|
-
}], templateInput: [{
|
|
566
|
-
type: i0.Input,
|
|
567
|
-
args: ['template']
|
|
568
|
-
}], width: [{
|
|
569
|
-
type: i0.Input
|
|
570
|
-
}], templates: [{
|
|
571
|
-
type: i0.ContentChildren,
|
|
572
|
-
args: [i0.TemplateRef]
|
|
573
|
-
}] } });
|
|
574
|
-
|
|
575
677
|
/**
|
|
576
678
|
* @internal
|
|
577
679
|
*/
|
|
@@ -630,60 +732,6 @@
|
|
|
630
732
|
SkyGridSelectedRowsSource[SkyGridSelectedRowsSource["SelectedRowIdsChange"] = 4] = "SelectedRowIdsChange";
|
|
631
733
|
})(exports.SkyGridSelectedRowsSource || (exports.SkyGridSelectedRowsSource = {}));
|
|
632
734
|
|
|
633
|
-
/**
|
|
634
|
-
* @internal
|
|
635
|
-
*/
|
|
636
|
-
var SkyGridCellComponent = /** @class */ (function () {
|
|
637
|
-
function SkyGridCellComponent() {
|
|
638
|
-
}
|
|
639
|
-
SkyGridCellComponent.prototype.ngOnInit = function () {
|
|
640
|
-
this.container.createEmbeddedView(this.template, this);
|
|
641
|
-
};
|
|
642
|
-
Object.defineProperty(SkyGridCellComponent.prototype, "row", {
|
|
643
|
-
get: function () {
|
|
644
|
-
return this.item.data;
|
|
645
|
-
},
|
|
646
|
-
enumerable: false,
|
|
647
|
-
configurable: true
|
|
648
|
-
});
|
|
649
|
-
Object.defineProperty(SkyGridCellComponent.prototype, "value", {
|
|
650
|
-
get: function () {
|
|
651
|
-
if (this.item.data && (this.fieldSelector || this.columnId)) {
|
|
652
|
-
return listBuilderCommon.getData(this.item.data, this.fieldSelector || this.columnId);
|
|
653
|
-
}
|
|
654
|
-
return undefined;
|
|
655
|
-
},
|
|
656
|
-
enumerable: false,
|
|
657
|
-
configurable: true
|
|
658
|
-
});
|
|
659
|
-
return SkyGridCellComponent;
|
|
660
|
-
}());
|
|
661
|
-
SkyGridCellComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridCellComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
662
|
-
SkyGridCellComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, 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__namespace.ChangeDetectionStrategy.OnPush });
|
|
663
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridCellComponent, decorators: [{
|
|
664
|
-
type: i0.Component,
|
|
665
|
-
args: [{
|
|
666
|
-
selector: 'sky-grid-cell',
|
|
667
|
-
template: '<ng-template #cell></ng-template>',
|
|
668
|
-
styles: [":host{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px;min-height:35px}\n"],
|
|
669
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
670
|
-
}]
|
|
671
|
-
}], propDecorators: { item: [{
|
|
672
|
-
type: i0.Input
|
|
673
|
-
}], columnId: [{
|
|
674
|
-
type: i0.Input
|
|
675
|
-
}], template: [{
|
|
676
|
-
type: i0.Input
|
|
677
|
-
}], fieldSelector: [{
|
|
678
|
-
type: i0.Input
|
|
679
|
-
}], container: [{
|
|
680
|
-
type: i0.ViewChild,
|
|
681
|
-
args: ['cell', {
|
|
682
|
-
read: i0.ViewContainerRef,
|
|
683
|
-
static: true,
|
|
684
|
-
}]
|
|
685
|
-
}] } });
|
|
686
|
-
|
|
687
735
|
var nextId = 0;
|
|
688
736
|
var SkyGridComponent = /** @class */ (function () {
|
|
689
737
|
function SkyGridComponent(affixService, changeDetector, dragulaService, gridAdapter, overlayService, skyWindow, uiConfigService) {
|
|
@@ -767,6 +815,26 @@
|
|
|
767
815
|
descending: false,
|
|
768
816
|
});
|
|
769
817
|
}
|
|
818
|
+
Object.defineProperty(SkyGridComponent.prototype, "columns", {
|
|
819
|
+
get: function () {
|
|
820
|
+
return this._columns;
|
|
821
|
+
},
|
|
822
|
+
/**
|
|
823
|
+
* Specifies columns and column properties for the grid.
|
|
824
|
+
*/
|
|
825
|
+
set: function (newColumns) {
|
|
826
|
+
var oldColumns = this.columns;
|
|
827
|
+
this._columns = newColumns;
|
|
828
|
+
if (oldColumns) {
|
|
829
|
+
this.transferColumnWidths(oldColumns, this.columns);
|
|
830
|
+
this.isResized = false;
|
|
831
|
+
this.setDisplayedColumns(true);
|
|
832
|
+
}
|
|
833
|
+
this.changeDetector.markForCheck();
|
|
834
|
+
},
|
|
835
|
+
enumerable: false,
|
|
836
|
+
configurable: true
|
|
837
|
+
});
|
|
770
838
|
Object.defineProperty(SkyGridComponent.prototype, "selectedColumnIds", {
|
|
771
839
|
get: function () {
|
|
772
840
|
return this._selectedColumnIds;
|
|
@@ -1307,23 +1375,27 @@
|
|
|
1307
1375
|
SkyGridComponent.prototype.setDisplayedColumns = function (respectHidden) {
|
|
1308
1376
|
var _this = this;
|
|
1309
1377
|
if (respectHidden === void 0) { respectHidden = false; }
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1378
|
+
/* sanity check */
|
|
1379
|
+
/* istanbul ignore else */
|
|
1380
|
+
if (this.columns) {
|
|
1381
|
+
if (this.selectedColumnIds !== undefined) {
|
|
1382
|
+
// setup displayed columns
|
|
1383
|
+
this.displayedColumns = this.selectedColumnIds
|
|
1384
|
+
.filter(function (columnId) {
|
|
1385
|
+
return _this.columns.find(function (column) { return column.id === columnId; });
|
|
1386
|
+
})
|
|
1387
|
+
.map(function (columnId) {
|
|
1388
|
+
return _this.columns.filter(function (column) { return column.id === columnId; })[0];
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
else if (respectHidden) {
|
|
1392
|
+
this.displayedColumns = this.columns.filter(function (column) {
|
|
1393
|
+
return !column.hidden;
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
this.displayedColumns = this.columns;
|
|
1398
|
+
}
|
|
1327
1399
|
}
|
|
1328
1400
|
};
|
|
1329
1401
|
SkyGridComponent.prototype.transformData = function () {
|
|
@@ -1377,8 +1449,6 @@
|
|
|
1377
1449
|
SkyGridComponent.prototype.updateColumns = function () {
|
|
1378
1450
|
var _this = this;
|
|
1379
1451
|
this.getColumnsFromComponent();
|
|
1380
|
-
this.setDisplayedColumns(true);
|
|
1381
|
-
this.changeDetector.markForCheck();
|
|
1382
1452
|
// This set timeout is necessary to ensure the columns have rendered in the grid
|
|
1383
1453
|
setTimeout(function () {
|
|
1384
1454
|
_this.checkUserColumnWidthsForScroll();
|
|
@@ -1434,6 +1504,35 @@
|
|
|
1434
1504
|
}
|
|
1435
1505
|
this.changeDetector.detectChanges();
|
|
1436
1506
|
};
|
|
1507
|
+
SkyGridComponent.prototype.transferColumnWidths = function (oldColumns, newColumns) {
|
|
1508
|
+
var e_1, _a;
|
|
1509
|
+
/* sanity check */
|
|
1510
|
+
/* istanbul ignore else */
|
|
1511
|
+
if (oldColumns && newColumns) {
|
|
1512
|
+
var _loop_1 = function (oldColumn) {
|
|
1513
|
+
if (oldColumn.width) {
|
|
1514
|
+
var matchingColumn = newColumns.find(function (newColumn) { return oldColumn.id === newColumn.id; });
|
|
1515
|
+
if (matchingColumn && !matchingColumn.width) {
|
|
1516
|
+
matchingColumn.width = oldColumn.width;
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
try {
|
|
1521
|
+
for (var oldColumns_1 = __values(oldColumns), oldColumns_1_1 = oldColumns_1.next(); !oldColumns_1_1.done; oldColumns_1_1 = oldColumns_1.next()) {
|
|
1522
|
+
var oldColumn = oldColumns_1_1.value;
|
|
1523
|
+
_loop_1(oldColumn);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1527
|
+
finally {
|
|
1528
|
+
try {
|
|
1529
|
+
if (oldColumns_1_1 && !oldColumns_1_1.done && (_a = oldColumns_1.return)) _a.call(oldColumns_1);
|
|
1530
|
+
}
|
|
1531
|
+
finally { if (e_1) throw e_1.error; }
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
this.changeDetector.markForCheck();
|
|
1535
|
+
};
|
|
1437
1536
|
SkyGridComponent.prototype.getColumnWidthModelChange = function () {
|
|
1438
1537
|
var columnWidthModelChange = new Array();
|
|
1439
1538
|
this.columns.forEach(function (column) {
|
|
@@ -1593,12 +1692,12 @@
|
|
|
1593
1692
|
return SkyGridComponent;
|
|
1594
1693
|
}());
|
|
1595
1694
|
SkyGridComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridComponent, deps: [{ token: i1__namespace.SkyAffixService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.DragulaService }, { token: SkyGridAdapterService }, { token: i1__namespace.SkyOverlayService }, { token: i1__namespace.SkyAppWindowRef }, { token: i1__namespace.SkyUIConfigService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1596
|
-
SkyGridComponent.ɵcmp = i0__namespace.ɵɵ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: i0.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__namespace, 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__namespace.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i4__namespace.λ3, selector: "sky-help-inline", outputs: ["actionClick"] }, { type: i5__namespace.λ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__namespace.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.DragulaDirective, selector: "[dragula]", inputs: ["dragula", "dragulaModel", "dragulaOptions"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { type: i10__namespace.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i10__namespace.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__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4__namespace.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { type: i8__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "skyLibResources": i11__namespace.SkyLibResourcesPipe, "async": i8__namespace.AsyncPipe }, viewProviders: [i2.DragulaService], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1695
|
+
SkyGridComponent.ɵcmp = i0__namespace.ɵɵ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: i0.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__namespace, 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.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__namespace.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i4__namespace.λ3, selector: "sky-help-inline", outputs: ["actionClick"] }, { type: i5__namespace.λ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__namespace.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.DragulaDirective, selector: "[dragula]", inputs: ["dragula", "dragulaModel", "dragulaOptions"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { type: i10__namespace.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i10__namespace.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__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4__namespace.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { type: i8__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "skyLibResources": i11__namespace.SkyLibResourcesPipe, "async": i8__namespace.AsyncPipe }, viewProviders: [i2.DragulaService], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1597
1696
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyGridComponent, decorators: [{
|
|
1598
1697
|
type: i0.Component,
|
|
1599
1698
|
args: [{
|
|
1600
1699
|
selector: 'sky-grid',
|
|
1601
|
-
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.
|
|
1700
|
+
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.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",
|
|
1602
1701
|
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"],
|
|
1603
1702
|
viewProviders: [i2.DragulaService],
|
|
1604
1703
|
providers: [SkyGridAdapterService],
|
|
@@ -1678,54 +1777,6 @@
|
|
|
1678
1777
|
args: ['window:resize']
|
|
1679
1778
|
}] } });
|
|
1680
1779
|
|
|
1681
|
-
/**
|
|
1682
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
1683
|
-
* The contents of this file were automatically generated by
|
|
1684
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/skyux-grids' schematic.
|
|
1685
|
-
* To update this file, simply rerun the command.
|
|
1686
|
-
*/
|
|
1687
|
-
var RESOURCES = {
|
|
1688
|
-
'EN-US': { skyux_grid_multiselect_select_row: { message: 'Select row' } },
|
|
1689
|
-
};
|
|
1690
|
-
var SkyuxGridsResourcesProvider = /** @class */ (function () {
|
|
1691
|
-
function SkyuxGridsResourcesProvider() {
|
|
1692
|
-
}
|
|
1693
|
-
SkyuxGridsResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
1694
|
-
return i11.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
1695
|
-
};
|
|
1696
|
-
return SkyuxGridsResourcesProvider;
|
|
1697
|
-
}());
|
|
1698
|
-
/**
|
|
1699
|
-
* Import into any component library module that needs to use resource strings.
|
|
1700
|
-
*/
|
|
1701
|
-
var SkyuxGridsResourcesModule = /** @class */ (function () {
|
|
1702
|
-
function SkyuxGridsResourcesModule() {
|
|
1703
|
-
}
|
|
1704
|
-
return SkyuxGridsResourcesModule;
|
|
1705
|
-
}());
|
|
1706
|
-
SkyuxGridsResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1707
|
-
SkyuxGridsResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, exports: [i11.SkyI18nModule] });
|
|
1708
|
-
SkyuxGridsResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, providers: [
|
|
1709
|
-
{
|
|
1710
|
-
provide: i11.SKY_LIB_RESOURCES_PROVIDERS,
|
|
1711
|
-
useClass: SkyuxGridsResourcesProvider,
|
|
1712
|
-
multi: true,
|
|
1713
|
-
},
|
|
1714
|
-
], imports: [i11.SkyI18nModule] });
|
|
1715
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyuxGridsResourcesModule, decorators: [{
|
|
1716
|
-
type: i0.NgModule,
|
|
1717
|
-
args: [{
|
|
1718
|
-
exports: [i11.SkyI18nModule],
|
|
1719
|
-
providers: [
|
|
1720
|
-
{
|
|
1721
|
-
provide: i11.SKY_LIB_RESOURCES_PROVIDERS,
|
|
1722
|
-
useClass: SkyuxGridsResourcesProvider,
|
|
1723
|
-
multi: true,
|
|
1724
|
-
},
|
|
1725
|
-
],
|
|
1726
|
-
}]
|
|
1727
|
-
}] });
|
|
1728
|
-
|
|
1729
1780
|
var SkyGridModule = /** @class */ (function () {
|
|
1730
1781
|
function SkyGridModule() {
|
|
1731
1782
|
}
|