@skyux/list-builder-view-grids 5.0.0 → 5.0.1
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-list-builder-view-grids-testing.umd.js +6 -6
- package/bundles/skyux-list-builder-view-grids-testing.umd.js.map +1 -1
- package/bundles/skyux-list-builder-view-grids.umd.js +147 -130
- package/bundles/skyux-list-builder-view-grids.umd.js.map +1 -1
- package/documentation.json +80 -75
- package/esm2015/modules/column-selector/column-selector-modal.component.js +5 -5
- package/esm2015/modules/column-selector/column-selector-modal.module.js +9 -13
- package/esm2015/modules/list-column-selector-action/list-column-selector-action.component.js +29 -27
- package/esm2015/modules/list-column-selector-action/list-column-selector-action.module.js +11 -15
- package/esm2015/modules/list-column-selector-action/list-column-selector-button.component.js +5 -5
- package/esm2015/modules/list-view-grid/list-view-grid.component.js +73 -58
- package/esm2015/modules/list-view-grid/list-view-grid.module.js +10 -12
- package/esm2015/modules/list-view-grid/state/columns/columns.orchestrator.js +3 -4
- package/esm2015/modules/list-view-grid/state/columns/load.action.js +1 -1
- package/esm2015/modules/list-view-grid/state/displayed-columns/displayed-columns.orchestrator.js +3 -4
- package/esm2015/modules/list-view-grid/state/displayed-columns/load.action.js +1 -1
- package/esm2015/modules/list-view-grid/state/grid-state-action.type.js +1 -1
- package/esm2015/modules/list-view-grid/state/grid-state.model.js +1 -1
- package/esm2015/modules/list-view-grid/state/grid-state.rxstate.js +4 -4
- package/esm2015/modules/list-view-grid/state/grid-state.state-node.js +5 -6
- package/esm2015/modules/list-view-grid/types/list-view-grid-message-type.js +1 -1
- package/esm2015/modules/list-view-grid/types/list-view-grid-message.js +1 -1
- package/esm2015/modules/shared/sky-list-builder-view-grids-resources.module.js +27 -12
- package/esm2015/testing/list-view-grid-fixture-cell.js +1 -1
- package/esm2015/testing/list-view-grid-fixture-header.js +1 -1
- package/esm2015/testing/list-view-grid-fixture-row.js +1 -1
- package/esm2015/testing/list-view-grid-fixture.js +4 -4
- package/fesm2015/skyux-list-builder-view-grids-testing.js +3 -3
- package/fesm2015/skyux-list-builder-view-grids-testing.js.map +1 -1
- package/fesm2015/skyux-list-builder-view-grids.js +161 -142
- package/fesm2015/skyux-list-builder-view-grids.js.map +1 -1
- package/package.json +9 -9
|
@@ -49,50 +49,46 @@ class SkyColumnSelectorComponent {
|
|
|
49
49
|
this.instance.save(this.newSelectedColumnIds);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
SkyColumnSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
53
|
-
SkyColumnSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
52
|
+
SkyColumnSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyColumnSelectorComponent, deps: [{ token: SkyColumnSelectorContext }, { token: i2.SkyModalInstance }], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
+
SkyColumnSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyColumnSelectorComponent, selector: "sky-column-selector", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n {{ 'skyux_grid_column_picker_header' | skyLibResources }}\n </sky-modal-header>\n <sky-modal-content>\n <sky-list\n #list\n [data]=\"context.columns\"\n [selectedIds]=\"context.selectedColumnIds\"\n (selectedIdsChange)=\"selectedColumnsChange($event)\"\n >\n <sky-list-toolbar\n [placeholder]=\"\n 'skyux_grid_column_picker_search_placeholder' | skyLibResources\n \"\n >\n </sky-list-toolbar>\n\n <sky-list-view-checklist label=\"heading\" description=\"description\">\n </sky-list-view-checklist>\n </sky-list>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n sky-cmp-id=\"apply-changes\"\n class=\"sky-btn sky-btn-primary\"\n (click)=\"applyChanges()\"\n >\n {{ 'skyux_grid_column_picker_submit' | skyLibResources }}\n </button>\n <button\n sky-cmp-id=\"cancel\"\n class=\"sky-btn sky-btn-link\"\n (click)=\"cancelChanges()\"\n >\n {{ 'skyux_grid_column_picker_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n", components: [{ type: i2.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i2.λ4, selector: "sky-modal-header" }, { type: i2.λ2, selector: "sky-modal-content" }, { type: i1.SkyListComponent, selector: "sky-list", inputs: ["data", "dataProvider", "defaultView", "initialTotal", "selectedIds", "sortFields", "appliedFilters", "search"], outputs: ["selectedIdsChange", "appliedFiltersChange"] }, { type: i1.SkyListToolbarComponent, selector: "sky-list-toolbar", inputs: ["inMemorySearchEnabled", "placeholder", "searchEnabled", "sortSelectorEnabled", "toolbarType", "searchText"] }, { type: i4.SkyListViewChecklistComponent, selector: "sky-list-view-checklist", inputs: ["name", "search", "label", "description", "selectMode", "showOnlySelected"] }, { type: i2.λ3, selector: "sky-modal-footer" }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe } });
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyColumnSelectorComponent, decorators: [{
|
|
55
55
|
type: Component,
|
|
56
56
|
args: [{
|
|
57
57
|
selector: 'sky-column-selector',
|
|
58
|
-
templateUrl: './column-selector-modal.component.html'
|
|
58
|
+
templateUrl: './column-selector-modal.component.html',
|
|
59
59
|
}]
|
|
60
60
|
}], ctorParameters: function () { return [{ type: SkyColumnSelectorContext }, { type: i2.SkyModalInstance }]; } });
|
|
61
61
|
|
|
62
62
|
class SkyColumnSelectorModule {
|
|
63
63
|
}
|
|
64
|
-
SkyColumnSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
65
|
-
SkyColumnSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
64
|
+
SkyColumnSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyColumnSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
65
|
+
SkyColumnSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyColumnSelectorModule, declarations: [SkyColumnSelectorComponent], imports: [CommonModule,
|
|
66
66
|
SkyI18nModule,
|
|
67
67
|
SkyModalModule,
|
|
68
68
|
SkyListModule,
|
|
69
69
|
SkyListToolbarModule,
|
|
70
70
|
SkyListViewChecklistModule] });
|
|
71
|
-
SkyColumnSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
71
|
+
SkyColumnSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyColumnSelectorModule, imports: [[
|
|
72
72
|
CommonModule,
|
|
73
73
|
SkyI18nModule,
|
|
74
74
|
SkyModalModule,
|
|
75
75
|
SkyListModule,
|
|
76
76
|
SkyListToolbarModule,
|
|
77
|
-
SkyListViewChecklistModule
|
|
77
|
+
SkyListViewChecklistModule,
|
|
78
78
|
]] });
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyColumnSelectorModule, decorators: [{
|
|
80
80
|
type: NgModule,
|
|
81
81
|
args: [{
|
|
82
|
-
declarations: [
|
|
83
|
-
SkyColumnSelectorComponent
|
|
84
|
-
],
|
|
82
|
+
declarations: [SkyColumnSelectorComponent],
|
|
85
83
|
imports: [
|
|
86
84
|
CommonModule,
|
|
87
85
|
SkyI18nModule,
|
|
88
86
|
SkyModalModule,
|
|
89
87
|
SkyListModule,
|
|
90
88
|
SkyListToolbarModule,
|
|
91
|
-
SkyListViewChecklistModule
|
|
89
|
+
SkyListViewChecklistModule,
|
|
92
90
|
],
|
|
93
|
-
entryComponents: [
|
|
94
|
-
SkyColumnSelectorComponent
|
|
95
|
-
]
|
|
91
|
+
entryComponents: [SkyColumnSelectorComponent],
|
|
96
92
|
}]
|
|
97
93
|
}] });
|
|
98
94
|
|
|
@@ -109,14 +105,14 @@ class ListViewDisplayedGridColumnsLoadAction {
|
|
|
109
105
|
class SkyListColumnSelectorButtonComponent {
|
|
110
106
|
constructor() { }
|
|
111
107
|
}
|
|
112
|
-
SkyListColumnSelectorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
113
|
-
SkyListColumnSelectorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
108
|
+
SkyListColumnSelectorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
SkyListColumnSelectorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListColumnSelectorButtonComponent, selector: "sky-list-column-selector-button", ngImport: i0, template: "<button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_grid_columns_button' | skyLibResources\"\n [title]=\"'skyux_grid_columns_button' | skyLibResources\"\n>\n <sky-icon icon=\"columns\"></sky-icon>\n <span class=\"sky-column-selector-action-btn-text\">\n {{ 'skyux_grid_columns_toolbar_button' | skyLibResources }}\n </span>\n</button>\n", styles: [":host .sky-column-selector-action-btn-text{display:none}:host-context(.sky-responsive-container-xs) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-sm) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-md) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-lg) .sky-column-selector-action-btn-text{display:none}@media (min-width: 768px){:host .sky-column-selector-action-btn-text{display:inline}}:host-context(.sky-responsive-container-sm) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-md) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-lg) .sky-column-selector-action-btn-text{display:inline}\n"], components: [{ type: i1$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe } });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorButtonComponent, decorators: [{
|
|
115
111
|
type: Component,
|
|
116
112
|
args: [{
|
|
117
113
|
selector: 'sky-list-column-selector-button',
|
|
118
114
|
templateUrl: './list-column-selector-button.component.html',
|
|
119
|
-
styleUrls: ['./list-column-selector-button.component.scss']
|
|
115
|
+
styleUrls: ['./list-column-selector-button.component.scss'],
|
|
120
116
|
}]
|
|
121
117
|
}], ctorParameters: function () { return []; } });
|
|
122
118
|
|
|
@@ -141,21 +137,21 @@ class SkyListColumnSelectorActionComponent {
|
|
|
141
137
|
let columnChooserItem = new ListToolbarItemModel({
|
|
142
138
|
id: 'column-chooser',
|
|
143
139
|
template: this.columnChooserTemplate,
|
|
144
|
-
location: 'left'
|
|
140
|
+
location: 'left',
|
|
145
141
|
});
|
|
146
|
-
this.dispatcher.toolbarAddItems([
|
|
147
|
-
columnChooserItem
|
|
148
|
-
], this.columnSelectorActionItemToolbarIndex);
|
|
142
|
+
this.dispatcher.toolbarAddItems([columnChooserItem], this.columnSelectorActionItemToolbarIndex);
|
|
149
143
|
}
|
|
150
144
|
}
|
|
151
145
|
get isInGridView() {
|
|
152
|
-
return this.listState.pipe(map(s => s.views.active), map((activeView) => {
|
|
153
|
-
return this.gridView &&
|
|
146
|
+
return this.listState.pipe(map((s) => s.views.active), map((activeView) => {
|
|
147
|
+
return this.gridView && activeView === this.gridView.id;
|
|
154
148
|
}), distinctUntilChanged());
|
|
155
149
|
}
|
|
156
150
|
get isInGridViewAndSecondary() {
|
|
157
|
-
return this.listState.pipe(map(s => s.views.active), map((activeView) => {
|
|
158
|
-
return this.secondaryActions &&
|
|
151
|
+
return this.listState.pipe(map((s) => s.views.active), map((activeView) => {
|
|
152
|
+
return (this.secondaryActions &&
|
|
153
|
+
this.gridView &&
|
|
154
|
+
activeView === this.gridView.id);
|
|
159
155
|
}), distinctUntilChanged());
|
|
160
156
|
}
|
|
161
157
|
openColumnSelector() {
|
|
@@ -164,7 +160,9 @@ class SkyListColumnSelectorActionComponent {
|
|
|
164
160
|
if (this.gridView) {
|
|
165
161
|
let columns = [];
|
|
166
162
|
let selectedColumnIds = [];
|
|
167
|
-
this.gridView.gridState
|
|
163
|
+
this.gridView.gridState
|
|
164
|
+
.pipe(take(1))
|
|
165
|
+
.subscribe((state) => {
|
|
168
166
|
columns = state.columns.items
|
|
169
167
|
.filter((item) => {
|
|
170
168
|
return !item.locked;
|
|
@@ -173,7 +171,7 @@ class SkyListColumnSelectorActionComponent {
|
|
|
173
171
|
return {
|
|
174
172
|
id: item.id,
|
|
175
173
|
heading: item.heading,
|
|
176
|
-
description: item.description
|
|
174
|
+
description: item.description,
|
|
177
175
|
};
|
|
178
176
|
});
|
|
179
177
|
selectedColumnIds = state.displayedColumns.items
|
|
@@ -190,14 +188,13 @@ class SkyListColumnSelectorActionComponent {
|
|
|
190
188
|
provide: SkyColumnSelectorContext,
|
|
191
189
|
useValue: {
|
|
192
190
|
columns,
|
|
193
|
-
selectedColumnIds
|
|
194
|
-
}
|
|
195
|
-
}
|
|
191
|
+
selectedColumnIds,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
196
194
|
],
|
|
197
|
-
helpKey: this.helpKey
|
|
195
|
+
helpKey: this.helpKey,
|
|
198
196
|
});
|
|
199
|
-
modalInstance.helpOpened
|
|
200
|
-
.subscribe((helpKey) => {
|
|
197
|
+
modalInstance.helpOpened.subscribe((helpKey) => {
|
|
201
198
|
this.helpOpened.emit(helpKey);
|
|
202
199
|
this.helpOpened.complete();
|
|
203
200
|
});
|
|
@@ -205,7 +202,8 @@ class SkyListColumnSelectorActionComponent {
|
|
|
205
202
|
if (result.reason === 'save' && result.data) {
|
|
206
203
|
let newSelectedIds = result.data;
|
|
207
204
|
let newDisplayedColumns = [];
|
|
208
|
-
this.gridView.gridState
|
|
205
|
+
this.gridView.gridState
|
|
206
|
+
.pipe(take(1))
|
|
209
207
|
.subscribe((state) => {
|
|
210
208
|
newDisplayedColumns = state.columns.items.filter((item) => {
|
|
211
209
|
return newSelectedIds.indexOf(item.id) > -1 || item.locked;
|
|
@@ -217,13 +215,13 @@ class SkyListColumnSelectorActionComponent {
|
|
|
217
215
|
}
|
|
218
216
|
}
|
|
219
217
|
}
|
|
220
|
-
SkyListColumnSelectorActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
221
|
-
SkyListColumnSelectorActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
218
|
+
SkyListColumnSelectorActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorActionComponent, deps: [{ token: i1.ListState }, { token: i2.SkyModalService }, { token: i1.ListStateDispatcher }, { token: i1.SkyListSecondaryActionsComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
219
|
+
SkyListColumnSelectorActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListColumnSelectorActionComponent, selector: "sky-list-column-selector-action", inputs: { gridView: "gridView", helpKey: "helpKey" }, outputs: { helpOpened: "helpOpened" }, viewQueries: [{ propertyName: "columnChooserTemplate", first: true, predicate: ["columnChooser"], descendants: true, static: true }], ngImport: i0, template: "<ng-container *ngIf=\"isInGridViewAndSecondary | async\">\n <sky-list-secondary-action>\n <button type=\"button\" (click)=\"openColumnSelector()\">\n {{ 'skyux_grid_columns_button' | skyLibResources }}\n </button>\n </sky-list-secondary-action>\n</ng-container>\n\n<ng-template #columnChooser>\n <sky-list-column-selector-button\n *ngIf=\"isInGridView | async\"\n (click)=\"openColumnSelector()\"\n >\n </sky-list-column-selector-button>\n</ng-template>\n", components: [{ type: i1.λ6, selector: "sky-list-secondary-action" }, { type: SkyListColumnSelectorButtonComponent, selector: "sky-list-column-selector-button" }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4$1.AsyncPipe, "skyLibResources": i5.SkyLibResourcesPipe } });
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorActionComponent, decorators: [{
|
|
223
221
|
type: Component,
|
|
224
222
|
args: [{
|
|
225
223
|
selector: 'sky-list-column-selector-action',
|
|
226
|
-
templateUrl: './list-column-selector-action.component.html'
|
|
224
|
+
templateUrl: './list-column-selector-action.component.html',
|
|
227
225
|
}]
|
|
228
226
|
}], ctorParameters: function () { return [{ type: i1.ListState }, { type: i2.SkyModalService }, { type: i1.ListStateDispatcher }, { type: i1.SkyListSecondaryActionsComponent, decorators: [{
|
|
229
227
|
type: Optional
|
|
@@ -236,35 +234,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
236
234
|
}], columnChooserTemplate: [{
|
|
237
235
|
type: ViewChild,
|
|
238
236
|
args: ['columnChooser', {
|
|
239
|
-
static: true
|
|
237
|
+
static: true,
|
|
240
238
|
}]
|
|
241
239
|
}] } });
|
|
242
240
|
|
|
243
241
|
class SkyListColumnSelectorActionModule {
|
|
244
242
|
}
|
|
245
|
-
SkyListColumnSelectorActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
246
|
-
SkyListColumnSelectorActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
243
|
+
SkyListColumnSelectorActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
244
|
+
SkyListColumnSelectorActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorActionModule, declarations: [SkyListColumnSelectorActionComponent,
|
|
247
245
|
SkyListColumnSelectorButtonComponent], imports: [CommonModule,
|
|
248
246
|
SkyI18nModule,
|
|
249
247
|
SkyModalModule,
|
|
250
248
|
SkyListSecondaryActionsModule,
|
|
251
249
|
SkyListToolbarModule,
|
|
252
|
-
SkyIconModule], exports: [SkyListColumnSelectorActionComponent,
|
|
253
|
-
|
|
254
|
-
SkyListColumnSelectorActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: SkyListColumnSelectorActionModule, imports: [[
|
|
250
|
+
SkyIconModule], exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule] });
|
|
251
|
+
SkyListColumnSelectorActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorActionModule, imports: [[
|
|
255
252
|
CommonModule,
|
|
256
253
|
SkyI18nModule,
|
|
257
254
|
SkyModalModule,
|
|
258
255
|
SkyListSecondaryActionsModule,
|
|
259
256
|
SkyListToolbarModule,
|
|
260
|
-
SkyIconModule
|
|
257
|
+
SkyIconModule,
|
|
261
258
|
], SkyColumnSelectorModule] });
|
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListColumnSelectorActionModule, decorators: [{
|
|
263
260
|
type: NgModule,
|
|
264
261
|
args: [{
|
|
265
262
|
declarations: [
|
|
266
263
|
SkyListColumnSelectorActionComponent,
|
|
267
|
-
SkyListColumnSelectorButtonComponent
|
|
264
|
+
SkyListColumnSelectorButtonComponent,
|
|
268
265
|
],
|
|
269
266
|
imports: [
|
|
270
267
|
CommonModule,
|
|
@@ -272,12 +269,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
272
269
|
SkyModalModule,
|
|
273
270
|
SkyListSecondaryActionsModule,
|
|
274
271
|
SkyListToolbarModule,
|
|
275
|
-
SkyIconModule
|
|
272
|
+
SkyIconModule,
|
|
276
273
|
],
|
|
277
|
-
exports: [
|
|
278
|
-
SkyListColumnSelectorActionComponent,
|
|
279
|
-
SkyColumnSelectorModule
|
|
280
|
-
]
|
|
274
|
+
exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule],
|
|
281
275
|
}]
|
|
282
276
|
}] });
|
|
283
277
|
|
|
@@ -286,9 +280,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
286
280
|
*/
|
|
287
281
|
class GridStateDispatcher extends StateDispatcher {
|
|
288
282
|
}
|
|
289
|
-
GridStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
290
|
-
GridStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
283
|
+
GridStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: GridStateDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
284
|
+
GridStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: GridStateDispatcher });
|
|
285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: GridStateDispatcher, decorators: [{
|
|
292
286
|
type: Injectable
|
|
293
287
|
}] });
|
|
294
288
|
/**
|
|
@@ -314,11 +308,10 @@ class ListViewGridColumnsOrchestrator extends GridStateOrchestrator {
|
|
|
314
308
|
/* istanbul ignore next */
|
|
315
309
|
constructor() {
|
|
316
310
|
super();
|
|
317
|
-
this
|
|
318
|
-
.register(ListViewGridColumnsLoadAction, this.load);
|
|
311
|
+
this.register(ListViewGridColumnsLoadAction, this.load);
|
|
319
312
|
}
|
|
320
313
|
load(state, action) {
|
|
321
|
-
const newColumns = action.columns.map(g => new SkyGridColumnModel(g.template, g));
|
|
314
|
+
const newColumns = action.columns.map((g) => new SkyGridColumnModel(g.template, g));
|
|
322
315
|
if (action.refresh) {
|
|
323
316
|
return new AsyncList([...newColumns], new Date());
|
|
324
317
|
}
|
|
@@ -333,11 +326,10 @@ class ListViewDisplayedGridColumnsOrchestrator extends GridStateOrchestrator {
|
|
|
333
326
|
/* istanbul ignore next */
|
|
334
327
|
constructor() {
|
|
335
328
|
super();
|
|
336
|
-
this
|
|
337
|
-
.register(ListViewDisplayedGridColumnsLoadAction, this.load);
|
|
329
|
+
this.register(ListViewDisplayedGridColumnsLoadAction, this.load);
|
|
338
330
|
}
|
|
339
331
|
load(state, action) {
|
|
340
|
-
const newColumns = action.columns.map(g => new SkyGridColumnModel(g.template, g));
|
|
332
|
+
const newColumns = action.columns.map((g) => new SkyGridColumnModel(g.template, g));
|
|
341
333
|
if (action.refresh) {
|
|
342
334
|
return new AsyncList([...newColumns], new Date());
|
|
343
335
|
}
|
|
@@ -362,15 +354,14 @@ class GridState extends StateNode {
|
|
|
362
354
|
/* istanbul ignore next */
|
|
363
355
|
constructor(initialState, dispatcher) {
|
|
364
356
|
super(initialState, dispatcher);
|
|
365
|
-
this
|
|
366
|
-
.register('columns', ListViewGridColumnsOrchestrator)
|
|
357
|
+
this.register('columns', ListViewGridColumnsOrchestrator)
|
|
367
358
|
.register('displayedColumns', ListViewDisplayedGridColumnsOrchestrator)
|
|
368
359
|
.begin();
|
|
369
360
|
}
|
|
370
361
|
}
|
|
371
|
-
GridState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
372
|
-
GridState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
362
|
+
GridState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: GridState, deps: [{ token: GridStateModel }, { token: GridStateDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
363
|
+
GridState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: GridState });
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: GridState, decorators: [{
|
|
374
365
|
type: Injectable
|
|
375
366
|
}], ctorParameters: function () { return [{ type: GridStateModel }, { type: GridStateDispatcher }]; } });
|
|
376
367
|
|
|
@@ -468,19 +459,20 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
468
459
|
}
|
|
469
460
|
get gridHeight() {
|
|
470
461
|
/* istanbul ignore next */
|
|
471
|
-
return
|
|
462
|
+
return typeof this.height === 'number'
|
|
472
463
|
? of(this.height)
|
|
473
464
|
: this.height;
|
|
474
465
|
}
|
|
475
466
|
get gridWidth() {
|
|
476
467
|
/* istanbul ignore next */
|
|
477
|
-
return
|
|
468
|
+
return typeof this.width === 'number'
|
|
478
469
|
? of(this.width)
|
|
479
470
|
: this.width;
|
|
480
471
|
}
|
|
481
472
|
ngAfterContentInit() {
|
|
482
473
|
// Watch for selection changes and update multiselectSelectedIds for local comparison.
|
|
483
|
-
this.state
|
|
474
|
+
this.state
|
|
475
|
+
.pipe(map((s) => s.selected.item), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.selectedMapEqual))
|
|
484
476
|
.subscribe((items) => {
|
|
485
477
|
const selectedIds = [];
|
|
486
478
|
items.selectedIdMap.forEach((isSelected, id) => {
|
|
@@ -494,7 +486,7 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
494
486
|
if (this.columnComponents.length === 0) {
|
|
495
487
|
throw new Error('Grid view requires at least one sky-grid-column to render.');
|
|
496
488
|
}
|
|
497
|
-
let columnModels = this.columnComponents.map(columnComponent => {
|
|
489
|
+
let columnModels = this.columnComponents.map((columnComponent) => {
|
|
498
490
|
return new SkyGridColumnModel(columnComponent.template, columnComponent);
|
|
499
491
|
});
|
|
500
492
|
if (this.width && !isObservable(this.width)) {
|
|
@@ -504,7 +496,7 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
504
496
|
this.height = of(this.height);
|
|
505
497
|
}
|
|
506
498
|
// Setup Observables for template
|
|
507
|
-
this.columns = this.gridState.pipe(map(s => s.columns.items), distinctUntilChanged(this.arraysEqual), takeUntil(this.ngUnsubscribe));
|
|
499
|
+
this.columns = this.gridState.pipe(map((s) => s.columns.items), distinctUntilChanged(this.arraysEqual), takeUntil(this.ngUnsubscribe));
|
|
508
500
|
this.selectedColumnIds = this.getSelectedIds();
|
|
509
501
|
this.items = this.getGridItems();
|
|
510
502
|
this.loading = this.state.pipe(map((s) => {
|
|
@@ -520,12 +512,13 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
520
512
|
/* sanity check */
|
|
521
513
|
return undefined;
|
|
522
514
|
}), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
|
|
523
|
-
this.gridState
|
|
524
|
-
.
|
|
515
|
+
this.gridState
|
|
516
|
+
.pipe(map((s) => s.columns.items), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.arraysEqual))
|
|
517
|
+
.subscribe((columns) => {
|
|
525
518
|
/* istanbul ignore else */
|
|
526
519
|
if (this.hiddenColumns) {
|
|
527
520
|
getValue(this.hiddenColumns, (hiddenColumns) => {
|
|
528
|
-
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter(x => {
|
|
521
|
+
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => {
|
|
529
522
|
/* istanbul ignore next */
|
|
530
523
|
/* sanity check */
|
|
531
524
|
let id = x.id || x.field;
|
|
@@ -536,14 +529,14 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
536
529
|
else if (this.displayedColumns) {
|
|
537
530
|
/* istanbul ignore next */
|
|
538
531
|
getValue(this.displayedColumns, (displayedColumns) => {
|
|
539
|
-
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter(x => displayedColumns.indexOf(x.id || x.field) !== -1), true));
|
|
532
|
+
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => displayedColumns.indexOf(x.id || x.field) !== -1), true));
|
|
540
533
|
});
|
|
541
534
|
}
|
|
542
535
|
else {
|
|
543
|
-
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter(x => !x.hidden), true));
|
|
536
|
+
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => !x.hidden), true));
|
|
544
537
|
}
|
|
545
538
|
});
|
|
546
|
-
this.currentSearchText = this.state.pipe(map(s => s.search.searchText), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
|
|
539
|
+
this.currentSearchText = this.state.pipe(map((s) => s.search.searchText), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
|
|
547
540
|
this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
|
|
548
541
|
this.handleColumnChange();
|
|
549
542
|
if (this.enableMultiselect) {
|
|
@@ -562,10 +555,11 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
562
555
|
onMultiselectSelectionChange(event) {
|
|
563
556
|
if (event.source === SkyGridSelectedRowsSource.CheckboxChange ||
|
|
564
557
|
event.source === SkyGridSelectedRowsSource.RowClick) {
|
|
565
|
-
this.state
|
|
558
|
+
this.state
|
|
559
|
+
.pipe(map((s) => s.items.items), take(1))
|
|
566
560
|
.subscribe((items) => {
|
|
567
|
-
const newItemIds = this.arrayIntersection(items.map(i => i.id), this.multiselectSelectedIds);
|
|
568
|
-
const newIds = items.filter(i => i.isSelected).map(i => i.id);
|
|
561
|
+
const newItemIds = this.arrayIntersection(items.map((i) => i.id), this.multiselectSelectedIds);
|
|
562
|
+
const newIds = items.filter((i) => i.isSelected).map((i) => i.id);
|
|
569
563
|
// Check for deselected ids & send message to dispatcher.
|
|
570
564
|
const deselectedIds = this.arrayDiff(newItemIds, newIds);
|
|
571
565
|
if (deselectedIds.length > 0) {
|
|
@@ -580,12 +574,12 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
580
574
|
}
|
|
581
575
|
}
|
|
582
576
|
columnIdsChanged(selectedColumnIds) {
|
|
583
|
-
this.selectedColumnIds.pipe(take(1))
|
|
584
|
-
.
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
.subscribe(columns => {
|
|
588
|
-
let displayedColumns = selectedColumnIds.map(columnId => columns.filter(c => c.id === columnId)[0]);
|
|
577
|
+
this.selectedColumnIds.pipe(take(1)).subscribe((currentIds) => {
|
|
578
|
+
if (!this.arraysEqual(selectedColumnIds, currentIds)) {
|
|
579
|
+
this.gridState
|
|
580
|
+
.pipe(map((s) => s.columns.items), take(1))
|
|
581
|
+
.subscribe((columns) => {
|
|
582
|
+
let displayedColumns = selectedColumnIds.map((columnId) => columns.filter((c) => c.id === columnId)[0]);
|
|
589
583
|
this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(displayedColumns, true));
|
|
590
584
|
});
|
|
591
585
|
}
|
|
@@ -606,24 +600,27 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
606
600
|
update, the searchText update was consumed after the resulting list item update. Scanning the
|
|
607
601
|
previous value of items lastUpdate ensures that we only receive the latest items.
|
|
608
602
|
*/
|
|
609
|
-
this.gridState
|
|
610
|
-
|
|
603
|
+
this.gridState
|
|
604
|
+
.pipe(takeUntil(this.ngUnsubscribe), scan((previousValue, newValue) => {
|
|
605
|
+
if (previousValue.displayedColumns.lastUpdate >
|
|
606
|
+
newValue.displayedColumns.lastUpdate) {
|
|
611
607
|
return previousValue;
|
|
612
608
|
}
|
|
613
609
|
else {
|
|
614
610
|
return newValue;
|
|
615
611
|
}
|
|
616
|
-
}), map(s => s.displayedColumns.items), distinctUntilChanged(this.arraysEqual))
|
|
617
|
-
.subscribe(displayedColumns => {
|
|
618
|
-
let setFunctions = this.searchFunction !== undefined
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
.
|
|
622
|
-
|
|
612
|
+
}), map((s) => s.displayedColumns.items), distinctUntilChanged(this.arraysEqual))
|
|
613
|
+
.subscribe((displayedColumns) => {
|
|
614
|
+
let setFunctions = this.searchFunction !== undefined
|
|
615
|
+
? [this.searchFunction]
|
|
616
|
+
: displayedColumns
|
|
617
|
+
.map((column) => (data, searchText) => column.searchFunction(getData(data, column.field), searchText))
|
|
618
|
+
.filter((c) => c !== undefined);
|
|
619
|
+
this.state.pipe(take(1)).subscribe((s) => {
|
|
623
620
|
this.dispatcher.searchSetOptions(new ListSearchModel({
|
|
624
621
|
searchText: s.search.searchText,
|
|
625
622
|
functions: setFunctions,
|
|
626
|
-
fieldSelectors: displayedColumns.map(d => d.field)
|
|
623
|
+
fieldSelectors: displayedColumns.map((d) => d.field),
|
|
627
624
|
}));
|
|
628
625
|
});
|
|
629
626
|
});
|
|
@@ -636,16 +633,16 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
636
633
|
this.gridMessageStream.next({
|
|
637
634
|
type: SkyGridMessageType.AbortDeleteRow,
|
|
638
635
|
data: {
|
|
639
|
-
abortDeleteRow: message.data.abortDeleteRow
|
|
640
|
-
}
|
|
636
|
+
abortDeleteRow: message.data.abortDeleteRow,
|
|
637
|
+
},
|
|
641
638
|
});
|
|
642
639
|
}
|
|
643
640
|
else if (message.type === SkyListViewGridMessageType.PromptDeleteRow) {
|
|
644
641
|
this.gridMessageStream.next({
|
|
645
642
|
type: SkyGridMessageType.PromptDeleteRow,
|
|
646
643
|
data: {
|
|
647
|
-
promptDeleteRow: message.data.promptDeleteRow
|
|
648
|
-
}
|
|
644
|
+
promptDeleteRow: message.data.promptDeleteRow,
|
|
645
|
+
},
|
|
649
646
|
});
|
|
650
647
|
}
|
|
651
648
|
});
|
|
@@ -653,20 +650,23 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
653
650
|
}
|
|
654
651
|
handleColumnChange() {
|
|
655
652
|
// watch for changes in column components
|
|
656
|
-
this.columnComponents.changes
|
|
653
|
+
this.columnComponents.changes
|
|
654
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
657
655
|
.subscribe((columnComponents) => {
|
|
658
|
-
let columnModels = this.columnComponents.map(column => {
|
|
656
|
+
let columnModels = this.columnComponents.map((column) => {
|
|
659
657
|
return new SkyGridColumnModel(column.template, column);
|
|
660
658
|
});
|
|
661
659
|
this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
|
|
662
660
|
});
|
|
663
661
|
// Watch for column heading changes:
|
|
664
662
|
this.columnComponents.forEach((comp) => {
|
|
665
|
-
comp.headingModelChanges
|
|
663
|
+
comp.headingModelChanges
|
|
664
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
666
665
|
.subscribe((change) => {
|
|
667
666
|
this.gridComponent.updateColumnHeading(change);
|
|
668
667
|
});
|
|
669
|
-
comp.descriptionModelChanges
|
|
668
|
+
comp.descriptionModelChanges
|
|
669
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
670
670
|
.subscribe((change) => {
|
|
671
671
|
this.gridComponent.updateColumnDescription(change);
|
|
672
672
|
});
|
|
@@ -697,7 +697,7 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
697
697
|
static properties to a static state object with observable properties that you can subscribe
|
|
698
698
|
to.
|
|
699
699
|
*/
|
|
700
|
-
return this.gridState.pipe(map(s => s.displayedColumns), scan((previousValue, newValue) => {
|
|
700
|
+
return this.gridState.pipe(map((s) => s.displayedColumns), scan((previousValue, newValue) => {
|
|
701
701
|
if (previousValue.lastUpdate > newValue.lastUpdate) {
|
|
702
702
|
return previousValue;
|
|
703
703
|
}
|
|
@@ -746,26 +746,29 @@ class SkyListViewGridComponent extends ListViewComponent {
|
|
|
746
746
|
return true;
|
|
747
747
|
}
|
|
748
748
|
arrayDiff(arrA, arrB) {
|
|
749
|
-
return arrA.filter(i => arrB.indexOf(i) < 0);
|
|
749
|
+
return arrA.filter((i) => arrB.indexOf(i) < 0);
|
|
750
750
|
}
|
|
751
751
|
arrayIntersection(arrA, arrB) {
|
|
752
|
-
return arrA.filter(value => -1 !== arrB.indexOf(value));
|
|
752
|
+
return arrA.filter((value) => -1 !== arrB.indexOf(value));
|
|
753
753
|
}
|
|
754
754
|
arraysEqual(arrayA, arrayB) {
|
|
755
|
-
return arrayA.length === arrayB.length &&
|
|
756
|
-
arrayA.every((value, index) => value === arrayB[index]);
|
|
755
|
+
return (arrayA.length === arrayB.length &&
|
|
756
|
+
arrayA.every((value, index) => value === arrayB[index]));
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
SkyListViewGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
760
|
-
SkyListViewGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
759
|
+
SkyListViewGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListViewGridComponent, deps: [{ token: i1.ListState }, { token: i1.ListStateDispatcher }, { token: GridState }, { token: GridStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
760
|
+
SkyListViewGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListViewGridComponent, selector: "sky-list-view-grid", inputs: { name: "name", displayedColumns: "displayedColumns", hiddenColumns: "hiddenColumns", fit: "fit", width: "width", height: "height", highlightSearchText: "highlightSearchText", messageStream: "messageStream", rowHighlightedId: "rowHighlightedId", enableMultiselect: "enableMultiselect", settingsKey: "settingsKey", searchFunction: ["search", "searchFunction"] }, outputs: { rowDeleteCancel: "rowDeleteCancel", rowDeleteConfirm: "rowDeleteConfirm", selectedColumnIdsChange: "selectedColumnIdsChange" }, providers: [
|
|
761
761
|
/* tslint:disable */
|
|
762
|
-
{
|
|
762
|
+
{
|
|
763
|
+
provide: ListViewComponent,
|
|
764
|
+
useExisting: forwardRef(() => SkyListViewGridComponent),
|
|
765
|
+
},
|
|
763
766
|
/* tslint:enable */
|
|
764
767
|
GridState,
|
|
765
768
|
GridStateDispatcher,
|
|
766
|
-
GridStateModel
|
|
767
|
-
], queries: [{ propertyName: "columnComponents", predicate: SkyGridColumnComponent }], viewQueries: [{ propertyName: "gridComponent", first: true, predicate: SkyGridComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"active | async\">\n <sky-grid\n [columns]=\"columns | async\"\n [data]=\"items | async\"\n [enableMultiselect]=\"enableMultiselect\"\n [fit]=\"fit\"\n [height]=\"gridHeight | async\"\n [highlightText]=\"highlightSearchText ? (currentSearchText | async) : undefined\"\n [rowHighlightedId]=\"rowHighlightedId\"\n [messageStream]=\"gridMessageStream\"\n [selectedColumnIds]=\"selectedColumnIds | async\"\n [selectedRowIds]=\"multiselectSelectedIds\"\n [settingsKey]=\"settingsKey\"\n [sortField]=\"sortField | async\"\n [width]=\"gridWidth | async\"\n (multiselectSelectionChange)=\"onMultiselectSelectionChange($event)\"\n (rowDeleteCancel)=\"cancelRowDelete($event)\"\n (rowDeleteConfirm)=\"confirmRowDelete($event)\"\n (selectedColumnIdsChange)=\"columnIdsChanged($event)\"\n (sortFieldChange)=\"sortFieldChanged($event)\"\n #skyGrid\n >\n </sky-grid>\n <sky-wait
|
|
768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
769
|
+
GridStateModel,
|
|
770
|
+
], queries: [{ propertyName: "columnComponents", predicate: SkyGridColumnComponent }], viewQueries: [{ propertyName: "gridComponent", first: true, predicate: SkyGridComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"active | async\">\n <sky-grid\n [columns]=\"columns | async\"\n [data]=\"items | async\"\n [enableMultiselect]=\"enableMultiselect\"\n [fit]=\"fit\"\n [height]=\"gridHeight | async\"\n [highlightText]=\"\n highlightSearchText ? (currentSearchText | async) : undefined\n \"\n [rowHighlightedId]=\"rowHighlightedId\"\n [messageStream]=\"gridMessageStream\"\n [selectedColumnIds]=\"selectedColumnIds | async\"\n [selectedRowIds]=\"multiselectSelectedIds\"\n [settingsKey]=\"settingsKey\"\n [sortField]=\"sortField | async\"\n [width]=\"gridWidth | async\"\n (multiselectSelectionChange)=\"onMultiselectSelectionChange($event)\"\n (rowDeleteCancel)=\"cancelRowDelete($event)\"\n (rowDeleteConfirm)=\"confirmRowDelete($event)\"\n (selectedColumnIdsChange)=\"columnIdsChanged($event)\"\n (sortFieldChange)=\"sortFieldChanged($event)\"\n #skyGrid\n >\n </sky-grid>\n <sky-wait [isWaiting]=\"loading | async\"> </sky-wait>\n</div>\n", styles: [":host ::ng-deep .sky-grid-heading{border-top:0!important}\n"], components: [{ type: i4$2.SkyGridComponent, selector: "sky-grid", inputs: ["columns", "data", "enableMultiselect", "fit", "hasToolbar", "height", "highlightText", "messageStream", "multiselectRowId", "rowHighlightedId", "selectedColumnIds", "selectedRowIds", "settingsKey", "sortField", "width"], outputs: ["columnWidthChange", "multiselectSelectionChange", "rowDeleteCancel", "rowDeleteConfirm", "selectedColumnIdsChange", "sortFieldChange"] }, { type: i1$1.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListViewGridComponent, decorators: [{
|
|
769
772
|
type: Component,
|
|
770
773
|
args: [{
|
|
771
774
|
selector: 'sky-list-view-grid',
|
|
@@ -773,13 +776,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
773
776
|
styleUrls: ['./list-view-grid.component.scss'],
|
|
774
777
|
providers: [
|
|
775
778
|
/* tslint:disable */
|
|
776
|
-
{
|
|
779
|
+
{
|
|
780
|
+
provide: ListViewComponent,
|
|
781
|
+
useExisting: forwardRef(() => SkyListViewGridComponent),
|
|
782
|
+
},
|
|
777
783
|
/* tslint:enable */
|
|
778
784
|
GridState,
|
|
779
785
|
GridStateDispatcher,
|
|
780
|
-
GridStateModel
|
|
786
|
+
GridStateModel,
|
|
781
787
|
],
|
|
782
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
788
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
783
789
|
}]
|
|
784
790
|
}], ctorParameters: function () { return [{ type: i1.ListState }, { type: i1.ListStateDispatcher }, { type: GridState }, { type: GridStateDispatcher }]; }, propDecorators: { name: [{
|
|
785
791
|
type: Input
|
|
@@ -827,7 +833,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
827
833
|
* To update this file, simply rerun the command.
|
|
828
834
|
*/
|
|
829
835
|
const RESOURCES = {
|
|
830
|
-
'EN-US': {
|
|
836
|
+
'EN-US': {
|
|
837
|
+
skyux_grid_column_picker_cancel: { message: 'Cancel' },
|
|
838
|
+
skyux_grid_column_picker_header: {
|
|
839
|
+
message: 'Choose columns to show in the list',
|
|
840
|
+
},
|
|
841
|
+
skyux_grid_column_picker_search_placeholder: {
|
|
842
|
+
message: 'Search for columns',
|
|
843
|
+
},
|
|
844
|
+
skyux_grid_column_picker_submit: { message: 'Apply changes' },
|
|
845
|
+
skyux_grid_columns_button: { message: 'Choose columns' },
|
|
846
|
+
skyux_grid_columns_toolbar_button: { message: 'Columns' },
|
|
847
|
+
},
|
|
831
848
|
};
|
|
832
849
|
class SkyListBuilderViewGridsResourcesProvider {
|
|
833
850
|
getString(localeInfo, name) {
|
|
@@ -839,58 +856,60 @@ class SkyListBuilderViewGridsResourcesProvider {
|
|
|
839
856
|
*/
|
|
840
857
|
class SkyListBuilderViewGridsResourcesModule {
|
|
841
858
|
}
|
|
842
|
-
SkyListBuilderViewGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
843
|
-
SkyListBuilderViewGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
844
|
-
SkyListBuilderViewGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
859
|
+
SkyListBuilderViewGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
860
|
+
SkyListBuilderViewGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, exports: [SkyI18nModule] });
|
|
861
|
+
SkyListBuilderViewGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, providers: [
|
|
862
|
+
{
|
|
845
863
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
846
864
|
useClass: SkyListBuilderViewGridsResourcesProvider,
|
|
847
|
-
multi: true
|
|
848
|
-
}
|
|
849
|
-
|
|
865
|
+
multi: true,
|
|
866
|
+
},
|
|
867
|
+
], imports: [SkyI18nModule] });
|
|
868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, decorators: [{
|
|
850
869
|
type: NgModule,
|
|
851
870
|
args: [{
|
|
852
871
|
exports: [SkyI18nModule],
|
|
853
|
-
providers: [
|
|
872
|
+
providers: [
|
|
873
|
+
{
|
|
854
874
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
855
875
|
useClass: SkyListBuilderViewGridsResourcesProvider,
|
|
856
|
-
multi: true
|
|
857
|
-
}
|
|
876
|
+
multi: true,
|
|
877
|
+
},
|
|
878
|
+
],
|
|
858
879
|
}]
|
|
859
880
|
}] });
|
|
860
881
|
|
|
861
882
|
class SkyListViewGridModule {
|
|
862
883
|
}
|
|
863
|
-
SkyListViewGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
864
|
-
SkyListViewGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
884
|
+
SkyListViewGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListViewGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
885
|
+
SkyListViewGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListViewGridModule, declarations: [SkyListViewGridComponent], imports: [CommonModule,
|
|
865
886
|
SkyWaitModule,
|
|
866
887
|
SkyGridModule,
|
|
867
888
|
SkyListBuilderViewGridsResourcesModule], exports: [SkyListViewGridComponent,
|
|
868
889
|
SkyListColumnSelectorActionModule,
|
|
869
890
|
SkyGridModule] });
|
|
870
|
-
SkyListViewGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
891
|
+
SkyListViewGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListViewGridModule, imports: [[
|
|
871
892
|
CommonModule,
|
|
872
893
|
SkyWaitModule,
|
|
873
894
|
SkyGridModule,
|
|
874
|
-
SkyListBuilderViewGridsResourcesModule
|
|
895
|
+
SkyListBuilderViewGridsResourcesModule,
|
|
875
896
|
], SkyListColumnSelectorActionModule,
|
|
876
897
|
SkyGridModule] });
|
|
877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListViewGridModule, decorators: [{
|
|
878
899
|
type: NgModule,
|
|
879
900
|
args: [{
|
|
880
|
-
declarations: [
|
|
881
|
-
SkyListViewGridComponent
|
|
882
|
-
],
|
|
901
|
+
declarations: [SkyListViewGridComponent],
|
|
883
902
|
imports: [
|
|
884
903
|
CommonModule,
|
|
885
904
|
SkyWaitModule,
|
|
886
905
|
SkyGridModule,
|
|
887
|
-
SkyListBuilderViewGridsResourcesModule
|
|
906
|
+
SkyListBuilderViewGridsResourcesModule,
|
|
888
907
|
],
|
|
889
908
|
exports: [
|
|
890
909
|
SkyListViewGridComponent,
|
|
891
910
|
SkyListColumnSelectorActionModule,
|
|
892
|
-
SkyGridModule
|
|
893
|
-
]
|
|
911
|
+
SkyGridModule,
|
|
912
|
+
],
|
|
894
913
|
}]
|
|
895
914
|
}] });
|
|
896
915
|
|