@skyux/list-builder-view-grids 7.0.0-beta.11 → 7.0.0-beta.13

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.
Files changed (63) hide show
  1. package/documentation.json +1 -67
  2. package/esm2020/index.mjs +20 -20
  3. package/esm2020/lib/modules/column-selector/column-selector-context.mjs +14 -14
  4. package/esm2020/lib/modules/column-selector/column-selector-modal.component.mjs +37 -37
  5. package/esm2020/lib/modules/column-selector/column-selector-modal.module.mjs +40 -40
  6. package/esm2020/lib/modules/list-column-selector-action/list-column-selector-action.component.mjs +132 -132
  7. package/esm2020/lib/modules/list-column-selector-action/list-column-selector-action.module.mjs +47 -47
  8. package/esm2020/lib/modules/list-column-selector-action/list-column-selector-button.component.mjs +12 -12
  9. package/esm2020/lib/modules/list-view-grid/list-view-grid.component.mjs +463 -463
  10. package/esm2020/lib/modules/list-view-grid/list-view-grid.module.mjs +42 -42
  11. package/esm2020/lib/modules/list-view-grid/state/columns/columns.orchestrator.mjs +22 -22
  12. package/esm2020/lib/modules/list-view-grid/state/columns/load.action.mjs +10 -10
  13. package/esm2020/lib/modules/list-view-grid/state/displayed-columns/displayed-columns.orchestrator.mjs +22 -22
  14. package/esm2020/lib/modules/list-view-grid/state/displayed-columns/load.action.mjs +10 -10
  15. package/esm2020/lib/modules/list-view-grid/state/grid-state-action.type.mjs +1 -1
  16. package/esm2020/lib/modules/list-view-grid/state/grid-state.model.mjs +11 -11
  17. package/esm2020/lib/modules/list-view-grid/state/grid-state.rxstate.mjs +19 -19
  18. package/esm2020/lib/modules/list-view-grid/state/grid-state.state-node.mjs +27 -27
  19. package/esm2020/lib/modules/list-view-grid/types/list-view-grid-message-type.mjs +15 -15
  20. package/esm2020/lib/modules/list-view-grid/types/list-view-grid-message.mjs +1 -1
  21. package/esm2020/lib/modules/list-view-grid/types/list-view-grid-row-delete-cancel-args.mjs +1 -1
  22. package/esm2020/lib/modules/list-view-grid/types/list-view-grid-row-delete-confirm-args.mjs +1 -1
  23. package/esm2020/lib/modules/shared/sky-list-builder-view-grids-resources.module.mjs +55 -55
  24. package/esm2020/skyux-list-builder-view-grids.mjs +4 -4
  25. package/esm2020/testing/list-view-grid-fixture-cell.mjs +1 -1
  26. package/esm2020/testing/list-view-grid-fixture-header.mjs +1 -1
  27. package/esm2020/testing/list-view-grid-fixture-row.mjs +1 -1
  28. package/esm2020/testing/list-view-grid-fixture.mjs +66 -66
  29. package/esm2020/testing/public-api.mjs +4 -4
  30. package/esm2020/testing/skyux-list-builder-view-grids-testing.mjs +4 -4
  31. package/fesm2015/skyux-list-builder-view-grids-testing.mjs +65 -65
  32. package/fesm2015/skyux-list-builder-view-grids.mjs +866 -866
  33. package/fesm2020/skyux-list-builder-view-grids-testing.mjs +65 -65
  34. package/fesm2020/skyux-list-builder-view-grids.mjs +864 -864
  35. package/index.d.ts +18 -18
  36. package/lib/modules/column-selector/column-selector-context.d.ts +15 -15
  37. package/lib/modules/column-selector/column-selector-modal.component.d.ts +14 -14
  38. package/lib/modules/column-selector/column-selector-modal.module.d.ts +15 -15
  39. package/lib/modules/list-column-selector-action/list-column-selector-action.component.d.ts +39 -39
  40. package/lib/modules/list-column-selector-action/list-column-selector-action.module.d.ts +17 -17
  41. package/lib/modules/list-column-selector-action/list-column-selector-button.component.d.ts +5 -5
  42. package/lib/modules/list-view-grid/list-view-grid.component.d.ts +147 -147
  43. package/lib/modules/list-view-grid/list-view-grid.module.d.ts +15 -15
  44. package/lib/modules/list-view-grid/state/columns/columns.orchestrator.d.ts +11 -11
  45. package/lib/modules/list-view-grid/state/columns/load.action.d.ts +10 -10
  46. package/lib/modules/list-view-grid/state/displayed-columns/displayed-columns.orchestrator.d.ts +11 -11
  47. package/lib/modules/list-view-grid/state/displayed-columns/load.action.d.ts +10 -10
  48. package/lib/modules/list-view-grid/state/grid-state-action.type.d.ts +6 -6
  49. package/lib/modules/list-view-grid/state/grid-state.model.d.ts +10 -10
  50. package/lib/modules/list-view-grid/state/grid-state.rxstate.d.ts +16 -16
  51. package/lib/modules/list-view-grid/state/grid-state.state-node.d.ts +13 -13
  52. package/lib/modules/list-view-grid/types/list-view-grid-message-type.d.ts +14 -14
  53. package/lib/modules/list-view-grid/types/list-view-grid-message.d.ts +22 -22
  54. package/lib/modules/list-view-grid/types/list-view-grid-row-delete-cancel-args.d.ts +9 -9
  55. package/lib/modules/list-view-grid/types/list-view-grid-row-delete-confirm-args.d.ts +9 -9
  56. package/lib/modules/shared/sky-list-builder-view-grids-resources.module.d.ts +14 -14
  57. package/package.json +10 -10
  58. package/testing/index.d.ts +5 -5
  59. package/testing/list-view-grid-fixture-cell.d.ts +17 -17
  60. package/testing/list-view-grid-fixture-header.d.ts +14 -14
  61. package/testing/list-view-grid-fixture-row.d.ts +8 -8
  62. package/testing/list-view-grid-fixture.d.ts +27 -27
  63. package/testing/public-api.d.ts +4 -4
@@ -19,906 +19,906 @@ import { AsyncList, StateDispatcher, StateOrchestrator, StateNode, isObservable,
19
19
  import { Subject, of } from 'rxjs';
20
20
  import * as i4$1 from '@skyux/core';
21
21
 
22
- /* istanbul ignore next */
23
- /* Code coverage having problems with no statements in classes */
24
- /**
25
- * @deprecated
26
- */
27
- class SkyColumnSelectorContext {
28
- }
29
- /* istanbul ignore next */
30
- /* Code coverage having problems with no statements in classes */
31
- /**
32
- * @deprecated
33
- */
34
- class SkyColumnSelectorModel {
22
+ /* istanbul ignore next */
23
+ /* Code coverage having problems with no statements in classes */
24
+ /**
25
+ * @deprecated
26
+ */
27
+ class SkyColumnSelectorContext {
28
+ }
29
+ /* istanbul ignore next */
30
+ /* Code coverage having problems with no statements in classes */
31
+ /**
32
+ * @deprecated
33
+ */
34
+ class SkyColumnSelectorModel {
35
35
  }
36
36
 
37
- class SkyColumnSelectorComponent {
38
- constructor(context, instance) {
39
- this.context = context;
40
- this.instance = instance;
41
- this.newSelectedColumnIds = [];
42
- this.newSelectedColumnIds = context.selectedColumnIds;
43
- }
44
- selectedColumnsChange(selectedMap) {
45
- this.newSelectedColumnIds = [];
46
- selectedMap.forEach((value, key) => {
47
- if (value) {
48
- this.newSelectedColumnIds.push(key);
49
- }
50
- });
51
- }
52
- cancelChanges() {
53
- this.instance.cancel();
54
- }
55
- applyChanges() {
56
- this.instance.save(this.newSelectedColumnIds);
57
- }
58
- }
59
- SkyColumnSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorComponent, deps: [{ token: SkyColumnSelectorContext }, { token: i2.SkyModalInstance }], target: i0.ɵɵFactoryTarget.Component });
60
- SkyColumnSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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", dependencies: [{ kind: "component", type: i2.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { kind: "component", type: i2.λ2, selector: "sky-modal-content" }, { kind: "component", type: i2.λ3, selector: "sky-modal-footer" }, { kind: "component", type: i2.λ4, selector: "sky-modal-header" }, { kind: "component", type: i1.SkyListComponent, selector: "sky-list", inputs: ["data", "dataProvider", "defaultView", "initialTotal", "selectedIds", "sortFields", "appliedFilters", "search"], outputs: ["selectedIdsChange", "appliedFiltersChange"] }, { kind: "component", type: i1.SkyListToolbarComponent, selector: "sky-list-toolbar", inputs: ["inMemorySearchEnabled", "placeholder", "searchEnabled", "sortSelectorEnabled", "toolbarType", "searchText"] }, { kind: "component", type: i4.SkyListViewChecklistComponent, selector: "sky-list-view-checklist", inputs: ["name", "search", "label", "description", "selectMode", "showOnlySelected"] }, { kind: "pipe", type: i5.SkyLibResourcesPipe, name: "skyLibResources" }] });
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorComponent, decorators: [{
62
- type: Component,
63
- args: [{ selector: 'sky-column-selector', 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" }]
37
+ class SkyColumnSelectorComponent {
38
+ constructor(context, instance) {
39
+ this.context = context;
40
+ this.instance = instance;
41
+ this.newSelectedColumnIds = [];
42
+ this.newSelectedColumnIds = context.selectedColumnIds;
43
+ }
44
+ selectedColumnsChange(selectedMap) {
45
+ this.newSelectedColumnIds = [];
46
+ selectedMap.forEach((value, key) => {
47
+ if (value) {
48
+ this.newSelectedColumnIds.push(key);
49
+ }
50
+ });
51
+ }
52
+ cancelChanges() {
53
+ this.instance.cancel();
54
+ }
55
+ applyChanges() {
56
+ this.instance.save(this.newSelectedColumnIds);
57
+ }
58
+ }
59
+ SkyColumnSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorComponent, deps: [{ token: SkyColumnSelectorContext }, { token: i2.SkyModalInstance }], target: i0.ɵɵFactoryTarget.Component });
60
+ SkyColumnSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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", dependencies: [{ kind: "component", type: i2.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { kind: "component", type: i2.λ2, selector: "sky-modal-content" }, { kind: "component", type: i2.λ3, selector: "sky-modal-footer" }, { kind: "component", type: i2.λ4, selector: "sky-modal-header" }, { kind: "component", type: i1.SkyListComponent, selector: "sky-list", inputs: ["data", "dataProvider", "defaultView", "initialTotal", "selectedIds", "sortFields", "appliedFilters", "search"], outputs: ["selectedIdsChange", "appliedFiltersChange"] }, { kind: "component", type: i1.SkyListToolbarComponent, selector: "sky-list-toolbar", inputs: ["inMemorySearchEnabled", "placeholder", "searchEnabled", "sortSelectorEnabled", "toolbarType", "searchText"] }, { kind: "component", type: i4.SkyListViewChecklistComponent, selector: "sky-list-view-checklist", inputs: ["name", "search", "label", "description", "selectMode", "showOnlySelected"] }, { kind: "pipe", type: i5.SkyLibResourcesPipe, name: "skyLibResources" }] });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorComponent, decorators: [{
62
+ type: Component,
63
+ args: [{ selector: 'sky-column-selector', 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" }]
64
64
  }], ctorParameters: function () { return [{ type: SkyColumnSelectorContext }, { type: i2.SkyModalInstance }]; } });
65
65
 
66
- /**
67
- * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
68
- */
69
- class SkyColumnSelectorModule {
70
- }
71
- SkyColumnSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
72
- SkyColumnSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, declarations: [SkyColumnSelectorComponent], imports: [CommonModule,
73
- SkyI18nModule,
74
- SkyModalModule,
75
- SkyListModule,
76
- SkyListToolbarModule,
77
- SkyListViewChecklistModule] });
78
- SkyColumnSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, imports: [CommonModule,
79
- SkyI18nModule,
80
- SkyModalModule,
81
- SkyListModule,
82
- SkyListToolbarModule,
83
- SkyListViewChecklistModule] });
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, decorators: [{
85
- type: NgModule,
86
- args: [{
87
- declarations: [SkyColumnSelectorComponent],
88
- imports: [
89
- CommonModule,
90
- SkyI18nModule,
91
- SkyModalModule,
92
- SkyListModule,
93
- SkyListToolbarModule,
94
- SkyListViewChecklistModule,
95
- ],
96
- }]
66
+ /**
67
+ * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
68
+ */
69
+ class SkyColumnSelectorModule {
70
+ }
71
+ SkyColumnSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
72
+ SkyColumnSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, declarations: [SkyColumnSelectorComponent], imports: [CommonModule,
73
+ SkyI18nModule,
74
+ SkyModalModule,
75
+ SkyListModule,
76
+ SkyListToolbarModule,
77
+ SkyListViewChecklistModule] });
78
+ SkyColumnSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, imports: [CommonModule,
79
+ SkyI18nModule,
80
+ SkyModalModule,
81
+ SkyListModule,
82
+ SkyListToolbarModule,
83
+ SkyListViewChecklistModule] });
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyColumnSelectorModule, decorators: [{
85
+ type: NgModule,
86
+ args: [{
87
+ declarations: [SkyColumnSelectorComponent],
88
+ imports: [
89
+ CommonModule,
90
+ SkyI18nModule,
91
+ SkyModalModule,
92
+ SkyListModule,
93
+ SkyListToolbarModule,
94
+ SkyListViewChecklistModule,
95
+ ],
96
+ }]
97
97
  }] });
98
98
 
99
- /**
100
- * @internal
101
- * @deprecated
102
- */
103
- class ListViewDisplayedGridColumnsLoadAction {
104
- constructor(columns, refresh = false) {
105
- this.columns = columns;
106
- this.refresh = refresh;
107
- }
99
+ /**
100
+ * @internal
101
+ * @deprecated
102
+ */
103
+ class ListViewDisplayedGridColumnsLoadAction {
104
+ constructor(columns, refresh = false) {
105
+ this.columns = columns;
106
+ this.refresh = refresh;
107
+ }
108
108
  }
109
109
 
110
- class SkyListColumnSelectorButtonComponent {
111
- }
112
- SkyListColumnSelectorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
113
- SkyListColumnSelectorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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"], dependencies: [{ kind: "component", type: i1$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "pipe", type: i5.SkyLibResourcesPipe, name: "skyLibResources" }] });
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorButtonComponent, decorators: [{
115
- type: Component,
116
- args: [{ selector: 'sky-list-column-selector-button', 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"] }]
110
+ class SkyListColumnSelectorButtonComponent {
111
+ }
112
+ SkyListColumnSelectorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
113
+ SkyListColumnSelectorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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"], dependencies: [{ kind: "component", type: i1$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "pipe", type: i5.SkyLibResourcesPipe, name: "skyLibResources" }] });
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorButtonComponent, decorators: [{
115
+ type: Component,
116
+ args: [{ selector: 'sky-list-column-selector-button', 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"] }]
117
117
  }] });
118
118
 
119
- /**
120
- * Provides a column selector modal for a list grid view when placed in a
121
- * [list toolbar](https://developer.blackbaud.com/skyux/components/list/toolbar).
122
- */
123
- class SkyListColumnSelectorActionComponent {
124
- constructor(listState, modalService, dispatcher, secondaryActions) {
125
- this.listState = listState;
126
- this.modalService = modalService;
127
- this.dispatcher = dispatcher;
128
- this.secondaryActions = secondaryActions;
129
- /**
130
- * Fires when users click the help button and broadcasts the `helpKey`.
131
- */
132
- this.helpOpened = new EventEmitter();
133
- this.columnSelectorActionItemToolbarIndex = 7000;
134
- }
135
- ngAfterContentInit() {
136
- if (!this.secondaryActions) {
137
- const columnChooserItem = new ListToolbarItemModel({
138
- id: 'column-chooser',
139
- template: this.columnChooserTemplate,
140
- location: 'left',
141
- });
142
- this.dispatcher.toolbarAddItems([columnChooserItem], this.columnSelectorActionItemToolbarIndex);
143
- }
144
- }
145
- get isInGridView() {
146
- return this.listState.pipe(map((s) => s.views.active), map((activeView) => {
147
- return this.gridView && activeView === this.gridView.id;
148
- }), distinctUntilChanged());
149
- }
150
- get isInGridViewAndSecondary() {
151
- return this.listState.pipe(map((s) => s.views.active), map((activeView) => {
152
- return (this.secondaryActions &&
153
- this.gridView &&
154
- activeView === this.gridView.id);
155
- }), distinctUntilChanged());
156
- }
157
- openColumnSelector() {
158
- /* istanbul ignore else */
159
- /* sanity check */
160
- if (this.gridView) {
161
- let columns = [];
162
- let selectedColumnIds = [];
163
- this.gridView.gridState
164
- .pipe(take(1))
165
- .subscribe((state) => {
166
- columns = state.columns.items
167
- .filter((item) => {
168
- return !item.locked;
169
- })
170
- .map((item) => {
171
- return {
172
- id: item.id,
173
- heading: item.heading,
174
- description: item.description,
175
- };
176
- });
177
- selectedColumnIds = state.displayedColumns.items
178
- .filter((item) => {
179
- return !item.locked;
180
- })
181
- .map((item) => {
182
- return item.id;
183
- });
184
- });
185
- const modalInstance = this.modalService.open(SkyColumnSelectorComponent, {
186
- providers: [
187
- {
188
- provide: SkyColumnSelectorContext,
189
- useValue: {
190
- columns,
191
- selectedColumnIds,
192
- },
193
- },
194
- ],
195
- helpKey: this.helpKey,
196
- });
197
- modalInstance.helpOpened.subscribe((helpKey) => {
198
- this.helpOpened.emit(helpKey);
199
- this.helpOpened.complete();
200
- });
201
- modalInstance.closed.subscribe((result) => {
202
- if (result.reason === 'save' && result.data) {
203
- const newSelectedIds = result.data;
204
- let newDisplayedColumns = [];
205
- this.gridView.gridState
206
- .pipe(take(1))
207
- .subscribe((state) => {
208
- newDisplayedColumns = state.columns.items.filter((item) => {
209
- return newSelectedIds.indexOf(item.id) > -1 || item.locked;
210
- });
211
- });
212
- this.gridView.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(newDisplayedColumns, true));
213
- }
214
- });
215
- }
216
- }
217
- }
218
- SkyListColumnSelectorActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", 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: "14.0.0", version: "14.2.0", 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", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.λ6, selector: "sky-list-secondary-action" }, { kind: "component", type: SkyListColumnSelectorButtonComponent, selector: "sky-list-column-selector-button" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.SkyLibResourcesPipe, name: "skyLibResources" }] });
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionComponent, decorators: [{
221
- type: Component,
222
- args: [{ selector: 'sky-list-column-selector-action', 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" }]
223
- }], ctorParameters: function () {
224
- return [{ type: i1.ListState }, { type: i2.SkyModalService }, { type: i1.ListStateDispatcher }, { type: i1.SkyListSecondaryActionsComponent, decorators: [{
225
- type: Optional
226
- }] }];
227
- }, propDecorators: { gridView: [{
228
- type: Input
229
- }], helpKey: [{
230
- type: Input
231
- }], helpOpened: [{
232
- type: Output
233
- }], columnChooserTemplate: [{
234
- type: ViewChild,
235
- args: ['columnChooser', {
236
- static: true,
237
- }]
119
+ /**
120
+ * Provides a column selector modal for a list grid view when placed in a
121
+ * [list toolbar](https://developer.blackbaud.com/skyux/components/list/toolbar).
122
+ */
123
+ class SkyListColumnSelectorActionComponent {
124
+ constructor(listState, modalService, dispatcher, secondaryActions) {
125
+ this.listState = listState;
126
+ this.modalService = modalService;
127
+ this.dispatcher = dispatcher;
128
+ this.secondaryActions = secondaryActions;
129
+ /**
130
+ * Fires when users click the help button and broadcasts the `helpKey`.
131
+ */
132
+ this.helpOpened = new EventEmitter();
133
+ this.columnSelectorActionItemToolbarIndex = 7000;
134
+ }
135
+ ngAfterContentInit() {
136
+ if (!this.secondaryActions) {
137
+ const columnChooserItem = new ListToolbarItemModel({
138
+ id: 'column-chooser',
139
+ template: this.columnChooserTemplate,
140
+ location: 'left',
141
+ });
142
+ this.dispatcher.toolbarAddItems([columnChooserItem], this.columnSelectorActionItemToolbarIndex);
143
+ }
144
+ }
145
+ get isInGridView() {
146
+ return this.listState.pipe(map((s) => s.views.active), map((activeView) => {
147
+ return this.gridView && activeView === this.gridView.id;
148
+ }), distinctUntilChanged());
149
+ }
150
+ get isInGridViewAndSecondary() {
151
+ return this.listState.pipe(map((s) => s.views.active), map((activeView) => {
152
+ return (this.secondaryActions &&
153
+ this.gridView &&
154
+ activeView === this.gridView.id);
155
+ }), distinctUntilChanged());
156
+ }
157
+ openColumnSelector() {
158
+ /* istanbul ignore else */
159
+ /* sanity check */
160
+ if (this.gridView) {
161
+ let columns = [];
162
+ let selectedColumnIds = [];
163
+ this.gridView.gridState
164
+ .pipe(take(1))
165
+ .subscribe((state) => {
166
+ columns = state.columns.items
167
+ .filter((item) => {
168
+ return !item.locked;
169
+ })
170
+ .map((item) => {
171
+ return {
172
+ id: item.id,
173
+ heading: item.heading,
174
+ description: item.description,
175
+ };
176
+ });
177
+ selectedColumnIds = state.displayedColumns.items
178
+ .filter((item) => {
179
+ return !item.locked;
180
+ })
181
+ .map((item) => {
182
+ return item.id;
183
+ });
184
+ });
185
+ const modalInstance = this.modalService.open(SkyColumnSelectorComponent, {
186
+ providers: [
187
+ {
188
+ provide: SkyColumnSelectorContext,
189
+ useValue: {
190
+ columns,
191
+ selectedColumnIds,
192
+ },
193
+ },
194
+ ],
195
+ helpKey: this.helpKey,
196
+ });
197
+ modalInstance.helpOpened.subscribe((helpKey) => {
198
+ this.helpOpened.emit(helpKey);
199
+ this.helpOpened.complete();
200
+ });
201
+ modalInstance.closed.subscribe((result) => {
202
+ if (result.reason === 'save' && result.data) {
203
+ const newSelectedIds = result.data;
204
+ let newDisplayedColumns = [];
205
+ this.gridView.gridState
206
+ .pipe(take(1))
207
+ .subscribe((state) => {
208
+ newDisplayedColumns = state.columns.items.filter((item) => {
209
+ return newSelectedIds.indexOf(item.id) > -1 || item.locked;
210
+ });
211
+ });
212
+ this.gridView.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(newDisplayedColumns, true));
213
+ }
214
+ });
215
+ }
216
+ }
217
+ }
218
+ SkyListColumnSelectorActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", 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: "14.0.0", version: "14.2.0", 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", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.λ6, selector: "sky-list-secondary-action" }, { kind: "component", type: SkyListColumnSelectorButtonComponent, selector: "sky-list-column-selector-button" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.SkyLibResourcesPipe, name: "skyLibResources" }] });
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionComponent, decorators: [{
221
+ type: Component,
222
+ args: [{ selector: 'sky-list-column-selector-action', 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" }]
223
+ }], ctorParameters: function () {
224
+ return [{ type: i1.ListState }, { type: i2.SkyModalService }, { type: i1.ListStateDispatcher }, { type: i1.SkyListSecondaryActionsComponent, decorators: [{
225
+ type: Optional
226
+ }] }];
227
+ }, propDecorators: { gridView: [{
228
+ type: Input
229
+ }], helpKey: [{
230
+ type: Input
231
+ }], helpOpened: [{
232
+ type: Output
233
+ }], columnChooserTemplate: [{
234
+ type: ViewChild,
235
+ args: ['columnChooser', {
236
+ static: true,
237
+ }]
238
238
  }] } });
239
239
 
240
- /**
241
- * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
242
- */
243
- class SkyListColumnSelectorActionModule {
244
- }
245
- SkyListColumnSelectorActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
246
- SkyListColumnSelectorActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, declarations: [SkyListColumnSelectorActionComponent,
247
- SkyListColumnSelectorButtonComponent], imports: [CommonModule,
248
- SkyI18nModule,
249
- SkyModalModule,
250
- SkyListSecondaryActionsModule,
251
- SkyListToolbarModule,
252
- SkyIconModule], exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule] });
253
- SkyListColumnSelectorActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, imports: [CommonModule,
254
- SkyI18nModule,
255
- SkyModalModule,
256
- SkyListSecondaryActionsModule,
257
- SkyListToolbarModule,
258
- SkyIconModule, SkyColumnSelectorModule] });
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, decorators: [{
260
- type: NgModule,
261
- args: [{
262
- declarations: [
263
- SkyListColumnSelectorActionComponent,
264
- SkyListColumnSelectorButtonComponent,
265
- ],
266
- imports: [
267
- CommonModule,
268
- SkyI18nModule,
269
- SkyModalModule,
270
- SkyListSecondaryActionsModule,
271
- SkyListToolbarModule,
272
- SkyIconModule,
273
- ],
274
- exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule],
275
- }]
240
+ /**
241
+ * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
242
+ */
243
+ class SkyListColumnSelectorActionModule {
244
+ }
245
+ SkyListColumnSelectorActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
246
+ SkyListColumnSelectorActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, declarations: [SkyListColumnSelectorActionComponent,
247
+ SkyListColumnSelectorButtonComponent], imports: [CommonModule,
248
+ SkyI18nModule,
249
+ SkyModalModule,
250
+ SkyListSecondaryActionsModule,
251
+ SkyListToolbarModule,
252
+ SkyIconModule], exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule] });
253
+ SkyListColumnSelectorActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, imports: [CommonModule,
254
+ SkyI18nModule,
255
+ SkyModalModule,
256
+ SkyListSecondaryActionsModule,
257
+ SkyListToolbarModule,
258
+ SkyIconModule, SkyColumnSelectorModule] });
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListColumnSelectorActionModule, decorators: [{
260
+ type: NgModule,
261
+ args: [{
262
+ declarations: [
263
+ SkyListColumnSelectorActionComponent,
264
+ SkyListColumnSelectorButtonComponent,
265
+ ],
266
+ imports: [
267
+ CommonModule,
268
+ SkyI18nModule,
269
+ SkyModalModule,
270
+ SkyListSecondaryActionsModule,
271
+ SkyListToolbarModule,
272
+ SkyIconModule,
273
+ ],
274
+ exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule],
275
+ }]
276
276
  }] });
277
277
 
278
- /**
279
- * @internal
280
- * @deprecated
281
- */
282
- class ListViewGridColumnsLoadAction {
283
- constructor(columns, refresh = false) {
284
- this.columns = columns;
285
- this.refresh = refresh;
286
- }
278
+ /**
279
+ * @internal
280
+ * @deprecated
281
+ */
282
+ class ListViewGridColumnsLoadAction {
283
+ constructor(columns, refresh = false) {
284
+ this.columns = columns;
285
+ this.refresh = refresh;
286
+ }
287
287
  }
288
288
 
289
- /**
290
- * @internal
291
- * @deprecated
292
- */
293
- class GridStateModel {
294
- constructor() {
295
- this.columns = new AsyncList();
296
- this.displayedColumns = new AsyncList();
297
- }
289
+ /**
290
+ * @internal
291
+ * @deprecated
292
+ */
293
+ class GridStateModel {
294
+ constructor() {
295
+ this.columns = new AsyncList();
296
+ this.displayedColumns = new AsyncList();
297
+ }
298
298
  }
299
299
 
300
- /**
301
- * @internal
302
- * @deprecated
303
- */
304
- class GridStateDispatcher extends StateDispatcher {
305
- }
306
- GridStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridStateDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
307
- GridStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridStateDispatcher });
308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridStateDispatcher, decorators: [{
309
- type: Injectable
310
- }] });
311
- /**
312
- * @internal
313
- */
314
- class GridStateOrchestrator extends StateOrchestrator {
300
+ /**
301
+ * @internal
302
+ * @deprecated
303
+ */
304
+ class GridStateDispatcher extends StateDispatcher {
305
+ }
306
+ GridStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridStateDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
307
+ GridStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridStateDispatcher });
308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridStateDispatcher, decorators: [{
309
+ type: Injectable
310
+ }] });
311
+ /**
312
+ * @internal
313
+ */
314
+ class GridStateOrchestrator extends StateOrchestrator {
315
315
  }
316
316
 
317
- /**
318
- * @internal
319
- * @deprecated
320
- */
321
- class ListViewGridColumnsOrchestrator extends GridStateOrchestrator {
322
- /* istanbul ignore next */
323
- constructor() {
324
- super();
325
- this.register(ListViewGridColumnsLoadAction, this.load);
326
- }
327
- load(state, action) {
328
- const newColumns = action.columns.map((g) => new SkyGridColumnModel(g.template, g));
329
- if (action.refresh) {
330
- return new AsyncList([...newColumns], new Date());
331
- }
332
- return new AsyncList([...state.items, ...newColumns], new Date());
333
- }
317
+ /**
318
+ * @internal
319
+ * @deprecated
320
+ */
321
+ class ListViewGridColumnsOrchestrator extends GridStateOrchestrator {
322
+ /* istanbul ignore next */
323
+ constructor() {
324
+ super();
325
+ this.register(ListViewGridColumnsLoadAction, this.load);
326
+ }
327
+ load(state, action) {
328
+ const newColumns = action.columns.map((g) => new SkyGridColumnModel(g.template, g));
329
+ if (action.refresh) {
330
+ return new AsyncList([...newColumns], new Date());
331
+ }
332
+ return new AsyncList([...state.items, ...newColumns], new Date());
333
+ }
334
334
  }
335
335
 
336
- /**
337
- * @internal
338
- * @deprecated
339
- */
340
- class ListViewDisplayedGridColumnsOrchestrator extends GridStateOrchestrator {
341
- /* istanbul ignore next */
342
- constructor() {
343
- super();
344
- this.register(ListViewDisplayedGridColumnsLoadAction, this.load);
345
- }
346
- load(state, action) {
347
- const newColumns = action.columns.map((g) => new SkyGridColumnModel(g.template, g));
348
- if (action.refresh) {
349
- return new AsyncList([...newColumns], new Date());
350
- }
351
- return new AsyncList([...state.items, ...newColumns], new Date());
352
- }
336
+ /**
337
+ * @internal
338
+ * @deprecated
339
+ */
340
+ class ListViewDisplayedGridColumnsOrchestrator extends GridStateOrchestrator {
341
+ /* istanbul ignore next */
342
+ constructor() {
343
+ super();
344
+ this.register(ListViewDisplayedGridColumnsLoadAction, this.load);
345
+ }
346
+ load(state, action) {
347
+ const newColumns = action.columns.map((g) => new SkyGridColumnModel(g.template, g));
348
+ if (action.refresh) {
349
+ return new AsyncList([...newColumns], new Date());
350
+ }
351
+ return new AsyncList([...state.items, ...newColumns], new Date());
352
+ }
353
353
  }
354
354
 
355
- /**
356
- * @internal
357
- * @deprecated
358
- */
359
- class GridState extends StateNode {
360
- /* istanbul ignore next */
361
- constructor(initialState, dispatcher) {
362
- super(initialState, dispatcher);
363
- this.register('columns', ListViewGridColumnsOrchestrator)
364
- .register('displayedColumns', ListViewDisplayedGridColumnsOrchestrator)
365
- .begin();
366
- }
367
- }
368
- GridState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridState, deps: [{ token: GridStateModel }, { token: GridStateDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
369
- GridState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridState });
370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridState, decorators: [{
371
- type: Injectable
355
+ /**
356
+ * @internal
357
+ * @deprecated
358
+ */
359
+ class GridState extends StateNode {
360
+ /* istanbul ignore next */
361
+ constructor(initialState, dispatcher) {
362
+ super(initialState, dispatcher);
363
+ this.register('columns', ListViewGridColumnsOrchestrator)
364
+ .register('displayedColumns', ListViewDisplayedGridColumnsOrchestrator)
365
+ .begin();
366
+ }
367
+ }
368
+ GridState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridState, deps: [{ token: GridStateModel }, { token: GridStateDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
369
+ GridState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridState });
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GridState, decorators: [{
371
+ type: Injectable
372
372
  }], ctorParameters: function () { return [{ type: GridStateModel }, { type: GridStateDispatcher }]; } });
373
373
 
374
- /**
375
- * The command for the list view grid to respond to.
376
- * @deprecated
377
- */
378
- var SkyListViewGridMessageType;
379
- (function (SkyListViewGridMessageType) {
380
- /**
381
- * Deletes of a row in the list view grid.
382
- */
383
- SkyListViewGridMessageType[SkyListViewGridMessageType["PromptDeleteRow"] = 0] = "PromptDeleteRow";
384
- /**
385
- * Cancels the deletion of a row in the list view grid.
386
- */
387
- SkyListViewGridMessageType[SkyListViewGridMessageType["AbortDeleteRow"] = 1] = "AbortDeleteRow";
374
+ /**
375
+ * The command for the list view grid to respond to.
376
+ * @deprecated
377
+ */
378
+ var SkyListViewGridMessageType;
379
+ (function (SkyListViewGridMessageType) {
380
+ /**
381
+ * Deletes of a row in the list view grid.
382
+ */
383
+ SkyListViewGridMessageType[SkyListViewGridMessageType["PromptDeleteRow"] = 0] = "PromptDeleteRow";
384
+ /**
385
+ * Cancels the deletion of a row in the list view grid.
386
+ */
387
+ SkyListViewGridMessageType[SkyListViewGridMessageType["AbortDeleteRow"] = 1] = "AbortDeleteRow";
388
388
  })(SkyListViewGridMessageType || (SkyListViewGridMessageType = {}));
389
389
 
390
- /**
391
- * Displays a grid for a
392
- * [SKY UX-themed list of data](https://developer.blackbaud.com/skyux/components/list/overview)
393
- * using the [grid component](https://developer.blackbaud.com/skyux/components/grid).
394
- * You must install `SkyListModule` as a dependency.
395
- * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
396
- */
397
- class SkyListViewGridComponent extends ListViewComponent {
398
- constructor(state, dispatcher, gridState, gridDispatcher, logger) {
399
- super(state, 'Grid View');
400
- this.dispatcher = dispatcher;
401
- this.gridState = gridState;
402
- this.gridDispatcher = gridDispatcher;
403
- /**
404
- * Specifies how the grid fits to its parent. `"width"` fits the grid to the parent's full
405
- * width, and `"scroll"` allows the grid to exceed the parent's width. If the grid does not have
406
- * enough columns to fill the parent's width, it always stretches to the parent's full width.
407
- * @default "width"
408
- */
409
- this.fit = 'width';
410
- /**
411
- * Indicates whether to highlight search text within the grid.
412
- * @default true
413
- */
414
- this.highlightSearchText = true;
415
- /**
416
- * Indicates whether to enable the multiselect feature to display a column of checkboxes
417
- * on the left side of the grid. Multiselect also displays an action bar with buttons to
418
- * select and clear all checkboxes. Multiselect defaults to the `id` property on the list's
419
- * `data` object.
420
- * @default false
421
- */
422
- this.enableMultiselect = false;
423
- /**
424
- * Fires when users cancel the deletion of a row.
425
- */
426
- this.rowDeleteCancel = new EventEmitter();
427
- /**
428
- * Fires when users confirm the deletion of a row.
429
- */
430
- this.rowDeleteConfirm = new EventEmitter();
431
- /**
432
- * Fires when columns change. This includes changes to the displayed columns and changes
433
- * to the order of columns. The event emits an array of IDs for the displayed columns that
434
- * reflects the column order.
435
- */
436
- this.selectedColumnIdsChange = new EventEmitter();
437
- /**
438
- * Message stream for communicating with the internal grid instance
439
- * @interal
440
- */
441
- this.gridMessageStream = new Subject();
442
- this.multiselectSelectedIds = [];
443
- this.ngUnsubscribe = new Subject();
444
- this._messageStream = new Subject();
445
- logger.deprecated('SkyListViewGridComponent', {
446
- deprecationMajorVersion: 6,
447
- moreInfoUrl: 'https://developer.blackbaud.com/skyux/components/data-entry-grid',
448
- replacementRecommendation: 'Use data entry grid instead.',
449
- });
450
- }
451
- /**
452
- * Specifies the name of the view.
453
- * @required
454
- */
455
- set name(value) {
456
- this.viewName = value;
457
- }
458
- /**
459
- * Provides an observable to send commands to the grid.
460
- * The commands should respect the `SkyListViewGridMessage` type.
461
- */
462
- set messageStream(stream) {
463
- /* istanbul ignore else */
464
- if (this._messageStream) {
465
- this._messageStream.unsubscribe();
466
- }
467
- this._messageStream = stream;
468
- this.initInlineDeleteMessages();
469
- }
470
- get messageStream() {
471
- return this._messageStream;
472
- }
473
- get gridHeight() {
474
- /* istanbul ignore next */
475
- return typeof this.height === 'number'
476
- ? of(this.height)
477
- : this.height;
478
- }
479
- get gridWidth() {
480
- /* istanbul ignore next */
481
- return typeof this.width === 'number'
482
- ? of(this.width)
483
- : this.width;
484
- }
485
- ngAfterContentInit() {
486
- // Watch for selection changes and update multiselectSelectedIds for local comparison.
487
- this.state
488
- .pipe(map((s) => s.selected.item), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.selectedMapEqual))
489
- .subscribe((items) => {
490
- const selectedIds = [];
491
- items.selectedIdMap.forEach((isSelected, id) => {
492
- if (items.selectedIdMap.get(id) === true) {
493
- selectedIds.push(id);
494
- }
495
- });
496
- this.multiselectSelectedIds = selectedIds;
497
- });
498
- /* istanbul ignore next */
499
- if (this.columnComponents.length === 0) {
500
- throw new Error('Grid view requires at least one sky-grid-column to render.');
501
- }
502
- const columnModels = this.columnComponents.map((columnComponent) => {
503
- return new SkyGridColumnModel(columnComponent.template, columnComponent);
504
- });
505
- if (this.width && !isObservable(this.width)) {
506
- this.width = of(this.width);
507
- }
508
- if (this.height && !isObservable(this.height)) {
509
- this.height = of(this.height);
510
- }
511
- // Setup Observables for template
512
- this.columns = this.gridState.pipe(map((s) => s.columns.items), distinctUntilChanged(this.arraysEqual), takeUntil(this.ngUnsubscribe));
513
- this.selectedColumnIds = this.getSelectedIds();
514
- this.items = this.getGridItems();
515
- this.loading = this.state.pipe(map((s) => {
516
- return s.items.loading;
517
- }), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
518
- this.sortField = this.state.pipe(map((s) => {
519
- /* istanbul ignore else */
520
- /* sanity check */
521
- if (s.sort && s.sort.fieldSelectors) {
522
- return s.sort.fieldSelectors[0];
523
- }
524
- /* istanbul ignore next */
525
- /* sanity check */
526
- return undefined;
527
- }), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
528
- this.gridState
529
- .pipe(map((s) => s.columns.items), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.arraysEqual))
530
- .subscribe((columns) => {
531
- /* istanbul ignore else */
532
- if (this.hiddenColumns) {
533
- getValue(this.hiddenColumns, (hiddenColumns) => {
534
- this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => {
535
- /* istanbul ignore next */
536
- /* sanity check */
537
- const id = x.id || x.field;
538
- return hiddenColumns.indexOf(id) === -1;
539
- }), true));
540
- });
541
- }
542
- else if (this.displayedColumns) {
543
- /* istanbul ignore next */
544
- getValue(this.displayedColumns, (displayedColumns) => {
545
- this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => displayedColumns.indexOf(x.id || x.field) !== -1), true));
546
- });
547
- }
548
- else {
549
- this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => !x.hidden), true));
550
- }
551
- });
552
- this.currentSearchText = this.state.pipe(map((s) => s.search.searchText), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
553
- this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
554
- this.handleColumnChange();
555
- if (this.enableMultiselect) {
556
- this.dispatcher.toolbarShowMultiselectToolbar(true);
557
- }
558
- this.initInlineDeleteMessages();
559
- }
560
- ngOnDestroy() {
561
- this.ngUnsubscribe.next();
562
- this.ngUnsubscribe.complete();
563
- }
564
- /**
565
- * If user makes selection, tell list-builder to update the list state.
566
- * This logic should only run on user interaction - NOT programmatic updates.
567
- */
568
- onMultiselectSelectionChange(event) {
569
- if (event.source === SkyGridSelectedRowsSource.CheckboxChange ||
570
- event.source === SkyGridSelectedRowsSource.RowClick) {
571
- this.state
572
- .pipe(map((s) => s.items.items), take(1))
573
- .subscribe((items) => {
574
- const newItemIds = this.arrayIntersection(items.map((i) => i.id), this.multiselectSelectedIds);
575
- const newIds = items.filter((i) => i.isSelected).map((i) => i.id);
576
- // Check for deselected ids & send message to dispatcher.
577
- const deselectedIds = this.arrayDiff(newItemIds, newIds);
578
- if (deselectedIds.length > 0) {
579
- this.dispatcher.setSelected(deselectedIds, false);
580
- }
581
- // Check for selected ids & send message to dispatcher.
582
- const selectedIds = this.arrayDiff(newIds, newItemIds);
583
- if (selectedIds.length > 0) {
584
- this.dispatcher.setSelected(selectedIds, true);
585
- }
586
- });
587
- }
588
- }
589
- columnIdsChanged(selectedColumnIds) {
590
- this.selectedColumnIds.pipe(take(1)).subscribe((currentIds) => {
591
- if (!this.arraysEqual(selectedColumnIds, currentIds)) {
592
- this.gridState
593
- .pipe(map((s) => s.columns.items), take(1))
594
- .subscribe((columns) => {
595
- const displayedColumns = selectedColumnIds.map((columnId) => columns.filter((c) => c.id === columnId)[0]);
596
- this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(displayedColumns, true));
597
- });
598
- }
599
- });
600
- }
601
- cancelRowDelete(args) {
602
- this.rowDeleteCancel.emit(args);
603
- }
604
- confirmRowDelete(args) {
605
- this.rowDeleteConfirm.emit(args);
606
- }
607
- sortFieldChanged(sortField) {
608
- this.dispatcher.sortSetFieldSelectors([sortField]);
609
- }
610
- onViewActive() {
611
- /*
612
- Ran into problem where state updates were consumed out of order. For example, on search text
613
- update, the searchText update was consumed after the resulting list item update. Scanning the
614
- previous value of items lastUpdate ensures that we only receive the latest items.
615
- */
616
- this.gridState
617
- .pipe(takeUntil(this.ngUnsubscribe), scan((previousValue, newValue) => {
618
- if (previousValue.displayedColumns.lastUpdate >
619
- newValue.displayedColumns.lastUpdate) {
620
- return previousValue;
621
- }
622
- else {
623
- return newValue;
624
- }
625
- }), map((s) => s.displayedColumns.items), distinctUntilChanged(this.arraysEqual))
626
- .subscribe((displayedColumns) => {
627
- const setFunctions = this.searchFunction !== undefined
628
- ? [this.searchFunction]
629
- : displayedColumns
630
- .map((column) => (data, searchText) => column.searchFunction(getData(data, column.field), searchText))
631
- .filter((c) => c !== undefined);
632
- this.state.pipe(take(1)).subscribe((s) => {
633
- this.dispatcher.searchSetOptions(new ListSearchModel({
634
- searchText: s.search.searchText,
635
- functions: setFunctions,
636
- fieldSelectors: displayedColumns.map((d) => d.field),
637
- }));
638
- });
639
- });
640
- }
641
- initInlineDeleteMessages() {
642
- /* istanbul ignore next */
643
- if (this.messageStream) {
644
- this.messageStream.subscribe((message) => {
645
- if (message.type === SkyListViewGridMessageType.AbortDeleteRow) {
646
- this.gridMessageStream.next({
647
- type: SkyGridMessageType.AbortDeleteRow,
648
- data: {
649
- abortDeleteRow: message.data.abortDeleteRow,
650
- },
651
- });
652
- }
653
- else if (message.type === SkyListViewGridMessageType.PromptDeleteRow) {
654
- this.gridMessageStream.next({
655
- type: SkyGridMessageType.PromptDeleteRow,
656
- data: {
657
- promptDeleteRow: message.data.promptDeleteRow,
658
- },
659
- });
660
- }
661
- });
662
- }
663
- }
664
- handleColumnChange() {
665
- // watch for changes in column components
666
- this.columnComponents.changes
667
- .pipe(takeUntil(this.ngUnsubscribe))
668
- .subscribe((columnComponents) => {
669
- const columnModels = this.columnComponents.map((column) => {
670
- return new SkyGridColumnModel(column.template, column);
671
- });
672
- this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
673
- });
674
- // Watch for column heading changes:
675
- this.columnComponents.forEach((comp) => {
676
- comp.headingModelChanges
677
- .pipe(takeUntil(this.ngUnsubscribe))
678
- .subscribe((change) => {
679
- this.gridComponent.updateColumnHeading(change);
680
- });
681
- comp.descriptionModelChanges
682
- .pipe(takeUntil(this.ngUnsubscribe))
683
- .subscribe((change) => {
684
- this.gridComponent.updateColumnDescription(change);
685
- });
686
- });
687
- }
688
- getGridItems() {
689
- /*
690
- Same problem as above. We should move from having a state object observable with a bunch of
691
- static properties to a static state object with observable properties that you can subscribe
692
- to.
693
- */
694
- return this.state.pipe(map((s) => {
695
- return s.items;
696
- }), scan((previousValue, newValue) => {
697
- if (previousValue.lastUpdate > newValue.lastUpdate) {
698
- return previousValue;
699
- }
700
- else {
701
- return newValue;
702
- }
703
- }), map((result) => {
704
- return result.items;
705
- }), distinctUntilChanged());
706
- }
707
- getSelectedIds() {
708
- /*
709
- Same problem as above. We should move from having a state object observable with a bunch of
710
- static properties to a static state object with observable properties that you can subscribe
711
- to.
712
- */
713
- return this.gridState.pipe(map((s) => s.displayedColumns), scan((previousValue, newValue) => {
714
- if (previousValue.lastUpdate > newValue.lastUpdate) {
715
- return previousValue;
716
- }
717
- else {
718
- return newValue;
719
- }
720
- }), map((result) => {
721
- /* istanbul ignore next */
722
- /* sanity check */
723
- return result.items.map((column) => {
724
- return column.id || column.field;
725
- });
726
- }), distinctUntilChanged((previousValue, newValue) => {
727
- return this.haveColumnIdsChanged(previousValue, newValue);
728
- }));
729
- }
730
- haveColumnIdsChanged(previousValue, newValue) {
731
- if (previousValue.length !== newValue.length) {
732
- this.selectedColumnIdsChange.emit(newValue);
733
- return false;
734
- }
735
- for (let i = 0; i < previousValue.length; i++) {
736
- /* istanbul ignore if */
737
- if (previousValue[i] !== newValue[i]) {
738
- this.selectedColumnIdsChange.emit(newValue);
739
- return false;
740
- }
741
- }
742
- return true;
743
- }
744
- selectedMapEqual(prev, next) {
745
- if (prev.selectedIdMap.size !== next.selectedIdMap.size) {
746
- return false;
747
- }
748
- const keys = [];
749
- next.selectedIdMap.forEach((value, key) => {
750
- keys.push(key);
751
- });
752
- for (let i = 0; i < keys.length; i++) {
753
- const key = keys[i];
754
- const value = next.selectedIdMap.get(key);
755
- if (value !== prev.selectedIdMap.get(key)) {
756
- return false;
757
- }
758
- }
759
- return true;
760
- }
761
- arrayDiff(arrA, arrB) {
762
- return arrA.filter((i) => arrB.indexOf(i) < 0);
763
- }
764
- arrayIntersection(arrA, arrB) {
765
- return arrA.filter((value) => -1 !== arrB.indexOf(value));
766
- }
767
- arraysEqual(arrayA, arrayB) {
768
- return (arrayA.length === arrayB.length &&
769
- arrayA.every((value, index) => value === arrayB[index]));
770
- }
771
- }
772
- SkyListViewGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridComponent, deps: [{ token: i1.ListState }, { token: i1.ListStateDispatcher }, { token: GridState }, { token: GridStateDispatcher }, { token: i4$1.SkyLogService }], target: i0.ɵɵFactoryTarget.Component });
773
- SkyListViewGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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: [
774
- {
775
- provide: ListViewComponent,
776
- useExisting: forwardRef(() => SkyListViewGridComponent),
777
- },
778
- GridState,
779
- GridStateDispatcher,
780
- GridStateModel,
781
- ], 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"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { kind: "component", type: i7.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"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
782
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridComponent, decorators: [{
783
- type: Component,
784
- args: [{ selector: 'sky-list-view-grid', providers: [
785
- {
786
- provide: ListViewComponent,
787
- useExisting: forwardRef(() => SkyListViewGridComponent),
788
- },
789
- GridState,
790
- GridStateDispatcher,
791
- GridStateModel,
792
- ], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
793
- }], ctorParameters: function () { return [{ type: i1.ListState }, { type: i1.ListStateDispatcher }, { type: GridState }, { type: GridStateDispatcher }, { type: i4$1.SkyLogService }]; }, propDecorators: { name: [{
794
- type: Input
795
- }], displayedColumns: [{
796
- type: Input
797
- }], hiddenColumns: [{
798
- type: Input
799
- }], fit: [{
800
- type: Input
801
- }], width: [{
802
- type: Input
803
- }], height: [{
804
- type: Input
805
- }], highlightSearchText: [{
806
- type: Input
807
- }], messageStream: [{
808
- type: Input
809
- }], rowHighlightedId: [{
810
- type: Input
811
- }], enableMultiselect: [{
812
- type: Input
813
- }], settingsKey: [{
814
- type: Input
815
- }], rowDeleteCancel: [{
816
- type: Output
817
- }], rowDeleteConfirm: [{
818
- type: Output
819
- }], selectedColumnIdsChange: [{
820
- type: Output
821
- }], gridComponent: [{
822
- type: ViewChild,
823
- args: [SkyGridComponent]
824
- }], searchFunction: [{
825
- type: Input,
826
- args: ['search']
827
- }], columnComponents: [{
828
- type: ContentChildren,
829
- args: [SkyGridColumnComponent]
390
+ /**
391
+ * Displays a grid for a
392
+ * [SKY UX-themed list of data](https://developer.blackbaud.com/skyux/components/list/overview)
393
+ * using the [grid component](https://developer.blackbaud.com/skyux/components/grid).
394
+ * You must install `SkyListModule` as a dependency.
395
+ * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
396
+ */
397
+ class SkyListViewGridComponent extends ListViewComponent {
398
+ constructor(state, dispatcher, gridState, gridDispatcher, logger) {
399
+ super(state, 'Grid View');
400
+ this.dispatcher = dispatcher;
401
+ this.gridState = gridState;
402
+ this.gridDispatcher = gridDispatcher;
403
+ /**
404
+ * Specifies how the grid fits to its parent. `"width"` fits the grid to the parent's full
405
+ * width, and `"scroll"` allows the grid to exceed the parent's width. If the grid does not have
406
+ * enough columns to fill the parent's width, it always stretches to the parent's full width.
407
+ * @default "width"
408
+ */
409
+ this.fit = 'width';
410
+ /**
411
+ * Indicates whether to highlight search text within the grid.
412
+ * @default true
413
+ */
414
+ this.highlightSearchText = true;
415
+ /**
416
+ * Indicates whether to enable the multiselect feature to display a column of checkboxes
417
+ * on the left side of the grid. Multiselect also displays an action bar with buttons to
418
+ * select and clear all checkboxes. Multiselect defaults to the `id` property on the list's
419
+ * `data` object.
420
+ * @default false
421
+ */
422
+ this.enableMultiselect = false;
423
+ /**
424
+ * Fires when users cancel the deletion of a row.
425
+ */
426
+ this.rowDeleteCancel = new EventEmitter();
427
+ /**
428
+ * Fires when users confirm the deletion of a row.
429
+ */
430
+ this.rowDeleteConfirm = new EventEmitter();
431
+ /**
432
+ * Fires when columns change. This includes changes to the displayed columns and changes
433
+ * to the order of columns. The event emits an array of IDs for the displayed columns that
434
+ * reflects the column order.
435
+ */
436
+ this.selectedColumnIdsChange = new EventEmitter();
437
+ /**
438
+ * Message stream for communicating with the internal grid instance
439
+ * @interal
440
+ */
441
+ this.gridMessageStream = new Subject();
442
+ this.multiselectSelectedIds = [];
443
+ this.ngUnsubscribe = new Subject();
444
+ this._messageStream = new Subject();
445
+ logger.deprecated('SkyListViewGridComponent', {
446
+ deprecationMajorVersion: 6,
447
+ moreInfoUrl: 'https://developer.blackbaud.com/skyux/components/data-entry-grid',
448
+ replacementRecommendation: 'Use data entry grid instead.',
449
+ });
450
+ }
451
+ /**
452
+ * Specifies the name of the view.
453
+ * @required
454
+ */
455
+ set name(value) {
456
+ this.viewName = value;
457
+ }
458
+ /**
459
+ * Provides an observable to send commands to the grid.
460
+ * The commands should respect the `SkyListViewGridMessage` type.
461
+ */
462
+ set messageStream(stream) {
463
+ /* istanbul ignore else */
464
+ if (this._messageStream) {
465
+ this._messageStream.unsubscribe();
466
+ }
467
+ this._messageStream = stream;
468
+ this.initInlineDeleteMessages();
469
+ }
470
+ get messageStream() {
471
+ return this._messageStream;
472
+ }
473
+ get gridHeight() {
474
+ /* istanbul ignore next */
475
+ return typeof this.height === 'number'
476
+ ? of(this.height)
477
+ : this.height;
478
+ }
479
+ get gridWidth() {
480
+ /* istanbul ignore next */
481
+ return typeof this.width === 'number'
482
+ ? of(this.width)
483
+ : this.width;
484
+ }
485
+ ngAfterContentInit() {
486
+ // Watch for selection changes and update multiselectSelectedIds for local comparison.
487
+ this.state
488
+ .pipe(map((s) => s.selected.item), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.selectedMapEqual))
489
+ .subscribe((items) => {
490
+ const selectedIds = [];
491
+ items.selectedIdMap.forEach((isSelected, id) => {
492
+ if (items.selectedIdMap.get(id) === true) {
493
+ selectedIds.push(id);
494
+ }
495
+ });
496
+ this.multiselectSelectedIds = selectedIds;
497
+ });
498
+ /* istanbul ignore next */
499
+ if (this.columnComponents.length === 0) {
500
+ throw new Error('Grid view requires at least one sky-grid-column to render.');
501
+ }
502
+ const columnModels = this.columnComponents.map((columnComponent) => {
503
+ return new SkyGridColumnModel(columnComponent.template, columnComponent);
504
+ });
505
+ if (this.width && !isObservable(this.width)) {
506
+ this.width = of(this.width);
507
+ }
508
+ if (this.height && !isObservable(this.height)) {
509
+ this.height = of(this.height);
510
+ }
511
+ // Setup Observables for template
512
+ this.columns = this.gridState.pipe(map((s) => s.columns.items), distinctUntilChanged(this.arraysEqual), takeUntil(this.ngUnsubscribe));
513
+ this.selectedColumnIds = this.getSelectedIds();
514
+ this.items = this.getGridItems();
515
+ this.loading = this.state.pipe(map((s) => {
516
+ return s.items.loading;
517
+ }), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
518
+ this.sortField = this.state.pipe(map((s) => {
519
+ /* istanbul ignore else */
520
+ /* sanity check */
521
+ if (s.sort && s.sort.fieldSelectors) {
522
+ return s.sort.fieldSelectors[0];
523
+ }
524
+ /* istanbul ignore next */
525
+ /* sanity check */
526
+ return undefined;
527
+ }), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
528
+ this.gridState
529
+ .pipe(map((s) => s.columns.items), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.arraysEqual))
530
+ .subscribe((columns) => {
531
+ /* istanbul ignore else */
532
+ if (this.hiddenColumns) {
533
+ getValue(this.hiddenColumns, (hiddenColumns) => {
534
+ this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => {
535
+ /* istanbul ignore next */
536
+ /* sanity check */
537
+ const id = x.id || x.field;
538
+ return hiddenColumns.indexOf(id) === -1;
539
+ }), true));
540
+ });
541
+ }
542
+ else if (this.displayedColumns) {
543
+ /* istanbul ignore next */
544
+ getValue(this.displayedColumns, (displayedColumns) => {
545
+ this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => displayedColumns.indexOf(x.id || x.field) !== -1), true));
546
+ });
547
+ }
548
+ else {
549
+ this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter((x) => !x.hidden), true));
550
+ }
551
+ });
552
+ this.currentSearchText = this.state.pipe(map((s) => s.search.searchText), distinctUntilChanged(), takeUntil(this.ngUnsubscribe));
553
+ this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
554
+ this.handleColumnChange();
555
+ if (this.enableMultiselect) {
556
+ this.dispatcher.toolbarShowMultiselectToolbar(true);
557
+ }
558
+ this.initInlineDeleteMessages();
559
+ }
560
+ ngOnDestroy() {
561
+ this.ngUnsubscribe.next();
562
+ this.ngUnsubscribe.complete();
563
+ }
564
+ /**
565
+ * If user makes selection, tell list-builder to update the list state.
566
+ * This logic should only run on user interaction - NOT programmatic updates.
567
+ */
568
+ onMultiselectSelectionChange(event) {
569
+ if (event.source === SkyGridSelectedRowsSource.CheckboxChange ||
570
+ event.source === SkyGridSelectedRowsSource.RowClick) {
571
+ this.state
572
+ .pipe(map((s) => s.items.items), take(1))
573
+ .subscribe((items) => {
574
+ const newItemIds = this.arrayIntersection(items.map((i) => i.id), this.multiselectSelectedIds);
575
+ const newIds = items.filter((i) => i.isSelected).map((i) => i.id);
576
+ // Check for deselected ids & send message to dispatcher.
577
+ const deselectedIds = this.arrayDiff(newItemIds, newIds);
578
+ if (deselectedIds.length > 0) {
579
+ this.dispatcher.setSelected(deselectedIds, false);
580
+ }
581
+ // Check for selected ids & send message to dispatcher.
582
+ const selectedIds = this.arrayDiff(newIds, newItemIds);
583
+ if (selectedIds.length > 0) {
584
+ this.dispatcher.setSelected(selectedIds, true);
585
+ }
586
+ });
587
+ }
588
+ }
589
+ columnIdsChanged(selectedColumnIds) {
590
+ this.selectedColumnIds.pipe(take(1)).subscribe((currentIds) => {
591
+ if (!this.arraysEqual(selectedColumnIds, currentIds)) {
592
+ this.gridState
593
+ .pipe(map((s) => s.columns.items), take(1))
594
+ .subscribe((columns) => {
595
+ const displayedColumns = selectedColumnIds.map((columnId) => columns.filter((c) => c.id === columnId)[0]);
596
+ this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(displayedColumns, true));
597
+ });
598
+ }
599
+ });
600
+ }
601
+ cancelRowDelete(args) {
602
+ this.rowDeleteCancel.emit(args);
603
+ }
604
+ confirmRowDelete(args) {
605
+ this.rowDeleteConfirm.emit(args);
606
+ }
607
+ sortFieldChanged(sortField) {
608
+ this.dispatcher.sortSetFieldSelectors([sortField]);
609
+ }
610
+ onViewActive() {
611
+ /*
612
+ Ran into problem where state updates were consumed out of order. For example, on search text
613
+ update, the searchText update was consumed after the resulting list item update. Scanning the
614
+ previous value of items lastUpdate ensures that we only receive the latest items.
615
+ */
616
+ this.gridState
617
+ .pipe(takeUntil(this.ngUnsubscribe), scan((previousValue, newValue) => {
618
+ if (previousValue.displayedColumns.lastUpdate >
619
+ newValue.displayedColumns.lastUpdate) {
620
+ return previousValue;
621
+ }
622
+ else {
623
+ return newValue;
624
+ }
625
+ }), map((s) => s.displayedColumns.items), distinctUntilChanged(this.arraysEqual))
626
+ .subscribe((displayedColumns) => {
627
+ const setFunctions = this.searchFunction !== undefined
628
+ ? [this.searchFunction]
629
+ : displayedColumns
630
+ .map((column) => (data, searchText) => column.searchFunction(getData(data, column.field), searchText))
631
+ .filter((c) => c !== undefined);
632
+ this.state.pipe(take(1)).subscribe((s) => {
633
+ this.dispatcher.searchSetOptions(new ListSearchModel({
634
+ searchText: s.search.searchText,
635
+ functions: setFunctions,
636
+ fieldSelectors: displayedColumns.map((d) => d.field),
637
+ }));
638
+ });
639
+ });
640
+ }
641
+ initInlineDeleteMessages() {
642
+ /* istanbul ignore next */
643
+ if (this.messageStream) {
644
+ this.messageStream.subscribe((message) => {
645
+ if (message.type === SkyListViewGridMessageType.AbortDeleteRow) {
646
+ this.gridMessageStream.next({
647
+ type: SkyGridMessageType.AbortDeleteRow,
648
+ data: {
649
+ abortDeleteRow: message.data.abortDeleteRow,
650
+ },
651
+ });
652
+ }
653
+ else if (message.type === SkyListViewGridMessageType.PromptDeleteRow) {
654
+ this.gridMessageStream.next({
655
+ type: SkyGridMessageType.PromptDeleteRow,
656
+ data: {
657
+ promptDeleteRow: message.data.promptDeleteRow,
658
+ },
659
+ });
660
+ }
661
+ });
662
+ }
663
+ }
664
+ handleColumnChange() {
665
+ // watch for changes in column components
666
+ this.columnComponents.changes
667
+ .pipe(takeUntil(this.ngUnsubscribe))
668
+ .subscribe((columnComponents) => {
669
+ const columnModels = this.columnComponents.map((column) => {
670
+ return new SkyGridColumnModel(column.template, column);
671
+ });
672
+ this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
673
+ });
674
+ // Watch for column heading changes:
675
+ this.columnComponents.forEach((comp) => {
676
+ comp.headingModelChanges
677
+ .pipe(takeUntil(this.ngUnsubscribe))
678
+ .subscribe((change) => {
679
+ this.gridComponent.updateColumnHeading(change);
680
+ });
681
+ comp.descriptionModelChanges
682
+ .pipe(takeUntil(this.ngUnsubscribe))
683
+ .subscribe((change) => {
684
+ this.gridComponent.updateColumnDescription(change);
685
+ });
686
+ });
687
+ }
688
+ getGridItems() {
689
+ /*
690
+ Same problem as above. We should move from having a state object observable with a bunch of
691
+ static properties to a static state object with observable properties that you can subscribe
692
+ to.
693
+ */
694
+ return this.state.pipe(map((s) => {
695
+ return s.items;
696
+ }), scan((previousValue, newValue) => {
697
+ if (previousValue.lastUpdate > newValue.lastUpdate) {
698
+ return previousValue;
699
+ }
700
+ else {
701
+ return newValue;
702
+ }
703
+ }), map((result) => {
704
+ return result.items;
705
+ }), distinctUntilChanged());
706
+ }
707
+ getSelectedIds() {
708
+ /*
709
+ Same problem as above. We should move from having a state object observable with a bunch of
710
+ static properties to a static state object with observable properties that you can subscribe
711
+ to.
712
+ */
713
+ return this.gridState.pipe(map((s) => s.displayedColumns), scan((previousValue, newValue) => {
714
+ if (previousValue.lastUpdate > newValue.lastUpdate) {
715
+ return previousValue;
716
+ }
717
+ else {
718
+ return newValue;
719
+ }
720
+ }), map((result) => {
721
+ /* istanbul ignore next */
722
+ /* sanity check */
723
+ return result.items.map((column) => {
724
+ return column.id || column.field;
725
+ });
726
+ }), distinctUntilChanged((previousValue, newValue) => {
727
+ return this.haveColumnIdsChanged(previousValue, newValue);
728
+ }));
729
+ }
730
+ haveColumnIdsChanged(previousValue, newValue) {
731
+ if (previousValue.length !== newValue.length) {
732
+ this.selectedColumnIdsChange.emit(newValue);
733
+ return false;
734
+ }
735
+ for (let i = 0; i < previousValue.length; i++) {
736
+ /* istanbul ignore if */
737
+ if (previousValue[i] !== newValue[i]) {
738
+ this.selectedColumnIdsChange.emit(newValue);
739
+ return false;
740
+ }
741
+ }
742
+ return true;
743
+ }
744
+ selectedMapEqual(prev, next) {
745
+ if (prev.selectedIdMap.size !== next.selectedIdMap.size) {
746
+ return false;
747
+ }
748
+ const keys = [];
749
+ next.selectedIdMap.forEach((value, key) => {
750
+ keys.push(key);
751
+ });
752
+ for (let i = 0; i < keys.length; i++) {
753
+ const key = keys[i];
754
+ const value = next.selectedIdMap.get(key);
755
+ if (value !== prev.selectedIdMap.get(key)) {
756
+ return false;
757
+ }
758
+ }
759
+ return true;
760
+ }
761
+ arrayDiff(arrA, arrB) {
762
+ return arrA.filter((i) => arrB.indexOf(i) < 0);
763
+ }
764
+ arrayIntersection(arrA, arrB) {
765
+ return arrA.filter((value) => -1 !== arrB.indexOf(value));
766
+ }
767
+ arraysEqual(arrayA, arrayB) {
768
+ return (arrayA.length === arrayB.length &&
769
+ arrayA.every((value, index) => value === arrayB[index]));
770
+ }
771
+ }
772
+ SkyListViewGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridComponent, deps: [{ token: i1.ListState }, { token: i1.ListStateDispatcher }, { token: GridState }, { token: GridStateDispatcher }, { token: i4$1.SkyLogService }], target: i0.ɵɵFactoryTarget.Component });
773
+ SkyListViewGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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: [
774
+ {
775
+ provide: ListViewComponent,
776
+ useExisting: forwardRef(() => SkyListViewGridComponent),
777
+ },
778
+ GridState,
779
+ GridStateDispatcher,
780
+ GridStateModel,
781
+ ], 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"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { kind: "component", type: i7.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"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
782
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridComponent, decorators: [{
783
+ type: Component,
784
+ args: [{ selector: 'sky-list-view-grid', providers: [
785
+ {
786
+ provide: ListViewComponent,
787
+ useExisting: forwardRef(() => SkyListViewGridComponent),
788
+ },
789
+ GridState,
790
+ GridStateDispatcher,
791
+ GridStateModel,
792
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
793
+ }], ctorParameters: function () { return [{ type: i1.ListState }, { type: i1.ListStateDispatcher }, { type: GridState }, { type: GridStateDispatcher }, { type: i4$1.SkyLogService }]; }, propDecorators: { name: [{
794
+ type: Input
795
+ }], displayedColumns: [{
796
+ type: Input
797
+ }], hiddenColumns: [{
798
+ type: Input
799
+ }], fit: [{
800
+ type: Input
801
+ }], width: [{
802
+ type: Input
803
+ }], height: [{
804
+ type: Input
805
+ }], highlightSearchText: [{
806
+ type: Input
807
+ }], messageStream: [{
808
+ type: Input
809
+ }], rowHighlightedId: [{
810
+ type: Input
811
+ }], enableMultiselect: [{
812
+ type: Input
813
+ }], settingsKey: [{
814
+ type: Input
815
+ }], rowDeleteCancel: [{
816
+ type: Output
817
+ }], rowDeleteConfirm: [{
818
+ type: Output
819
+ }], selectedColumnIdsChange: [{
820
+ type: Output
821
+ }], gridComponent: [{
822
+ type: ViewChild,
823
+ args: [SkyGridComponent]
824
+ }], searchFunction: [{
825
+ type: Input,
826
+ args: ['search']
827
+ }], columnComponents: [{
828
+ type: ContentChildren,
829
+ args: [SkyGridColumnComponent]
830
830
  }] } });
831
831
 
832
- /**
833
- * NOTICE: DO NOT MODIFY THIS FILE!
834
- * The contents of this file were automatically generated by
835
- * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-list-builder-view-grids' schematic.
836
- * To update this file, simply rerun the command.
837
- */
838
- const RESOURCES = {
839
- 'EN-US': {
840
- skyux_grid_column_picker_cancel: { message: 'Cancel' },
841
- skyux_grid_column_picker_header: {
842
- message: 'Choose columns to show in the list',
843
- },
844
- skyux_grid_column_picker_search_placeholder: {
845
- message: 'Search for columns',
846
- },
847
- skyux_grid_column_picker_submit: { message: 'Apply changes' },
848
- skyux_grid_columns_button: { message: 'Choose columns' },
849
- skyux_grid_columns_toolbar_button: { message: 'Columns' },
850
- },
851
- };
852
- class SkyListBuilderViewGridsResourcesProvider {
853
- getString(localeInfo, name) {
854
- return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
855
- }
856
- }
857
- /**
858
- * Import into any component library module that needs to use resource strings.
859
- */
860
- class SkyListBuilderViewGridsResourcesModule {
861
- }
862
- SkyListBuilderViewGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
863
- SkyListBuilderViewGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, exports: [SkyI18nModule] });
864
- SkyListBuilderViewGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, providers: [
865
- {
866
- provide: SKY_LIB_RESOURCES_PROVIDERS,
867
- useClass: SkyListBuilderViewGridsResourcesProvider,
868
- multi: true,
869
- },
870
- ], imports: [SkyI18nModule] });
871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, decorators: [{
872
- type: NgModule,
873
- args: [{
874
- exports: [SkyI18nModule],
875
- providers: [
876
- {
877
- provide: SKY_LIB_RESOURCES_PROVIDERS,
878
- useClass: SkyListBuilderViewGridsResourcesProvider,
879
- multi: true,
880
- },
881
- ],
882
- }]
832
+ /**
833
+ * NOTICE: DO NOT MODIFY THIS FILE!
834
+ * The contents of this file were automatically generated by
835
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-list-builder-view-grids' schematic.
836
+ * To update this file, simply rerun the command.
837
+ */
838
+ const RESOURCES = {
839
+ 'EN-US': {
840
+ skyux_grid_column_picker_cancel: { message: 'Cancel' },
841
+ skyux_grid_column_picker_header: {
842
+ message: 'Choose columns to show in the list',
843
+ },
844
+ skyux_grid_column_picker_search_placeholder: {
845
+ message: 'Search for columns',
846
+ },
847
+ skyux_grid_column_picker_submit: { message: 'Apply changes' },
848
+ skyux_grid_columns_button: { message: 'Choose columns' },
849
+ skyux_grid_columns_toolbar_button: { message: 'Columns' },
850
+ },
851
+ };
852
+ class SkyListBuilderViewGridsResourcesProvider {
853
+ getString(localeInfo, name) {
854
+ return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
855
+ }
856
+ }
857
+ /**
858
+ * Import into any component library module that needs to use resource strings.
859
+ */
860
+ class SkyListBuilderViewGridsResourcesModule {
861
+ }
862
+ SkyListBuilderViewGridsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
863
+ SkyListBuilderViewGridsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, exports: [SkyI18nModule] });
864
+ SkyListBuilderViewGridsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, providers: [
865
+ {
866
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
867
+ useClass: SkyListBuilderViewGridsResourcesProvider,
868
+ multi: true,
869
+ },
870
+ ], imports: [SkyI18nModule] });
871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListBuilderViewGridsResourcesModule, decorators: [{
872
+ type: NgModule,
873
+ args: [{
874
+ exports: [SkyI18nModule],
875
+ providers: [
876
+ {
877
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
878
+ useClass: SkyListBuilderViewGridsResourcesProvider,
879
+ multi: true,
880
+ },
881
+ ],
882
+ }]
883
883
  }] });
884
884
 
885
- /**
886
- * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
887
- */
888
- class SkyListViewGridModule {
889
- }
890
- SkyListViewGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
891
- SkyListViewGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, declarations: [SkyListViewGridComponent], imports: [CommonModule,
892
- SkyWaitModule,
893
- SkyGridModule,
894
- SkyListBuilderViewGridsResourcesModule], exports: [SkyListViewGridComponent,
895
- SkyListColumnSelectorActionModule,
896
- SkyGridModule] });
897
- SkyListViewGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, imports: [CommonModule,
898
- SkyWaitModule,
899
- SkyGridModule,
900
- SkyListBuilderViewGridsResourcesModule, SkyListColumnSelectorActionModule,
901
- SkyGridModule] });
902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, decorators: [{
903
- type: NgModule,
904
- args: [{
905
- declarations: [SkyListViewGridComponent],
906
- imports: [
907
- CommonModule,
908
- SkyWaitModule,
909
- SkyGridModule,
910
- SkyListBuilderViewGridsResourcesModule,
911
- ],
912
- exports: [
913
- SkyListViewGridComponent,
914
- SkyListColumnSelectorActionModule,
915
- SkyGridModule,
916
- ],
917
- }]
885
+ /**
886
+ * @deprecated List builder view grid and its features are deprecated. Use data entry grid instead. For more information, see https://developer.blackbaud.com/skyux/components/data-entry-grid.
887
+ */
888
+ class SkyListViewGridModule {
889
+ }
890
+ SkyListViewGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
891
+ SkyListViewGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, declarations: [SkyListViewGridComponent], imports: [CommonModule,
892
+ SkyWaitModule,
893
+ SkyGridModule,
894
+ SkyListBuilderViewGridsResourcesModule], exports: [SkyListViewGridComponent,
895
+ SkyListColumnSelectorActionModule,
896
+ SkyGridModule] });
897
+ SkyListViewGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, imports: [CommonModule,
898
+ SkyWaitModule,
899
+ SkyGridModule,
900
+ SkyListBuilderViewGridsResourcesModule, SkyListColumnSelectorActionModule,
901
+ SkyGridModule] });
902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyListViewGridModule, decorators: [{
903
+ type: NgModule,
904
+ args: [{
905
+ declarations: [SkyListViewGridComponent],
906
+ imports: [
907
+ CommonModule,
908
+ SkyWaitModule,
909
+ SkyGridModule,
910
+ SkyListBuilderViewGridsResourcesModule,
911
+ ],
912
+ exports: [
913
+ SkyListViewGridComponent,
914
+ SkyListColumnSelectorActionModule,
915
+ SkyGridModule,
916
+ ],
917
+ }]
918
918
  }] });
919
919
 
920
- /**
921
- * Generated bundle index. Do not edit.
920
+ /**
921
+ * Generated bundle index. Do not edit.
922
922
  */
923
923
 
924
924
  export { GridState, GridStateDispatcher, GridStateModel, GridStateOrchestrator, ListViewDisplayedGridColumnsLoadAction, ListViewDisplayedGridColumnsOrchestrator, ListViewGridColumnsLoadAction, ListViewGridColumnsOrchestrator, SkyColumnSelectorContext, SkyColumnSelectorModel, SkyColumnSelectorModule, SkyListColumnSelectorActionModule, SkyListViewGridComponent, SkyListViewGridMessageType, SkyListViewGridModule, SkyListColumnSelectorActionComponent as λ1 };