@skyux/list-builder-view-grids 5.7.2 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +2 -2
- package/esm2020/index.mjs +21 -0
- package/esm2020/lib/modules/column-selector/column-selector-context.mjs +9 -0
- package/esm2020/lib/modules/column-selector/column-selector-modal.component.mjs +38 -0
- package/esm2020/lib/modules/column-selector/column-selector-modal.module.mjs +40 -0
- package/esm2020/lib/modules/list-column-selector-action/list-column-selector-action.component.mjs +133 -0
- package/esm2020/lib/modules/list-column-selector-action/list-column-selector-action.module.mjs +47 -0
- package/esm2020/lib/modules/list-column-selector-action/list-column-selector-button.component.mjs +13 -0
- package/esm2020/lib/modules/list-view-grid/list-view-grid.component.mjs +460 -0
- package/esm2020/lib/modules/list-view-grid/list-view-grid.module.mjs +42 -0
- package/esm2020/lib/modules/list-view-grid/state/columns/columns.orchestrator.mjs +22 -0
- package/esm2020/lib/modules/list-view-grid/state/columns/load.action.mjs +10 -0
- package/esm2020/lib/modules/list-view-grid/state/displayed-columns/displayed-columns.orchestrator.mjs +22 -0
- package/esm2020/lib/modules/list-view-grid/state/displayed-columns/load.action.mjs +10 -0
- package/esm2020/lib/modules/list-view-grid/state/grid-state-action.type.mjs +2 -0
- package/esm2020/lib/modules/list-view-grid/state/grid-state.model.mjs +11 -0
- package/esm2020/lib/modules/list-view-grid/state/grid-state.rxstate.mjs +19 -0
- package/esm2020/lib/modules/list-view-grid/state/grid-state.state-node.mjs +27 -0
- package/esm2020/lib/modules/list-view-grid/types/list-view-grid-message-type.mjs +15 -0
- package/esm2020/lib/modules/list-view-grid/types/list-view-grid-message.mjs +2 -0
- package/esm2020/lib/modules/list-view-grid/types/list-view-grid-row-delete-cancel-args.mjs +2 -0
- package/esm2020/lib/modules/list-view-grid/types/list-view-grid-row-delete-confirm-args.mjs +2 -0
- package/esm2020/lib/modules/shared/sky-list-builder-view-grids-resources.module.mjs +56 -0
- package/esm2020/skyux-list-builder-view-grids.mjs +5 -0
- package/esm2020/testing/list-view-grid-fixture-cell.mjs +2 -0
- package/esm2020/testing/list-view-grid-fixture-header.mjs +2 -0
- package/esm2020/testing/list-view-grid-fixture-row.mjs +2 -0
- package/esm2020/testing/list-view-grid-fixture.mjs +66 -0
- package/esm2020/testing/public-api.mjs +5 -0
- package/esm2020/testing/skyux-list-builder-view-grids-testing.mjs +5 -0
- package/fesm2015/{skyux-list-builder-view-grids-testing.js → skyux-list-builder-view-grids-testing.mjs} +1 -1
- package/fesm2015/skyux-list-builder-view-grids-testing.mjs.map +1 -0
- package/fesm2015/skyux-list-builder-view-grids.mjs +905 -0
- package/fesm2015/skyux-list-builder-view-grids.mjs.map +1 -0
- package/{esm2015/testing/list-view-grid-fixture.js → fesm2020/skyux-list-builder-view-grids-testing.mjs} +9 -2
- package/fesm2020/skyux-list-builder-view-grids-testing.mjs.map +1 -0
- package/{fesm2015/skyux-list-builder-view-grids.js → fesm2020/skyux-list-builder-view-grids.mjs} +40 -57
- package/fesm2020/skyux-list-builder-view-grids.mjs.map +1 -0
- package/package.json +42 -18
- package/testing/package.json +5 -5
- package/bundles/skyux-list-builder-view-grids-testing.umd.js +0 -81
- package/bundles/skyux-list-builder-view-grids.umd.js +0 -1359
- package/esm2015/index.js +0 -21
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/column-selector/column-selector-context.js +0 -9
- package/esm2015/lib/modules/column-selector/column-selector-context.js.map +0 -1
- package/esm2015/lib/modules/column-selector/column-selector-modal.component.js +0 -41
- package/esm2015/lib/modules/column-selector/column-selector-modal.component.js.map +0 -1
- package/esm2015/lib/modules/column-selector/column-selector-modal.module.js +0 -41
- package/esm2015/lib/modules/column-selector/column-selector-modal.module.js.map +0 -1
- package/esm2015/lib/modules/list-column-selector-action/list-column-selector-action.component.js +0 -136
- package/esm2015/lib/modules/list-column-selector-action/list-column-selector-action.component.js.map +0 -1
- package/esm2015/lib/modules/list-column-selector-action/list-column-selector-action.module.js +0 -47
- package/esm2015/lib/modules/list-column-selector-action/list-column-selector-action.module.js.map +0 -1
- package/esm2015/lib/modules/list-column-selector-action/list-column-selector-button.component.js +0 -17
- package/esm2015/lib/modules/list-column-selector-action/list-column-selector-button.component.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/list-view-grid.component.js +0 -466
- package/esm2015/lib/modules/list-view-grid/list-view-grid.component.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/list-view-grid.module.js +0 -42
- package/esm2015/lib/modules/list-view-grid/list-view-grid.module.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/columns/columns.orchestrator.js +0 -22
- package/esm2015/lib/modules/list-view-grid/state/columns/columns.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/columns/load.action.js +0 -10
- package/esm2015/lib/modules/list-view-grid/state/columns/load.action.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/displayed-columns/displayed-columns.orchestrator.js +0 -22
- package/esm2015/lib/modules/list-view-grid/state/displayed-columns/displayed-columns.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/displayed-columns/load.action.js +0 -10
- package/esm2015/lib/modules/list-view-grid/state/displayed-columns/load.action.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/grid-state-action.type.js +0 -2
- package/esm2015/lib/modules/list-view-grid/state/grid-state-action.type.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/grid-state.model.js +0 -11
- package/esm2015/lib/modules/list-view-grid/state/grid-state.model.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/grid-state.rxstate.js +0 -19
- package/esm2015/lib/modules/list-view-grid/state/grid-state.rxstate.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/state/grid-state.state-node.js +0 -27
- package/esm2015/lib/modules/list-view-grid/state/grid-state.state-node.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-message-type.js +0 -15
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-message-type.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-message.js +0 -2
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-message.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-row-delete-cancel-args.js +0 -2
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-row-delete-cancel-args.js.map +0 -1
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-row-delete-confirm-args.js +0 -2
- package/esm2015/lib/modules/list-view-grid/types/list-view-grid-row-delete-confirm-args.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-list-builder-view-grids-resources.module.js +0 -56
- package/esm2015/lib/modules/shared/sky-list-builder-view-grids-resources.module.js.map +0 -1
- package/esm2015/skyux-list-builder-view-grids.js +0 -5
- package/esm2015/skyux-list-builder-view-grids.js.map +0 -1
- package/esm2015/testing/list-view-grid-fixture-cell.js +0 -2
- package/esm2015/testing/list-view-grid-fixture-cell.js.map +0 -1
- package/esm2015/testing/list-view-grid-fixture-header.js +0 -2
- package/esm2015/testing/list-view-grid-fixture-header.js.map +0 -1
- package/esm2015/testing/list-view-grid-fixture-row.js +0 -2
- package/esm2015/testing/list-view-grid-fixture-row.js.map +0 -1
- package/esm2015/testing/list-view-grid-fixture.js.map +0 -1
- package/esm2015/testing/public-api.js +0 -5
- package/esm2015/testing/public-api.js.map +0 -1
- package/esm2015/testing/skyux-list-builder-view-grids-testing.js +0 -5
- package/esm2015/testing/skyux-list-builder-view-grids-testing.js.map +0 -1
- package/fesm2015/skyux-list-builder-view-grids-testing.js.map +0 -1
- package/fesm2015/skyux-list-builder-view-grids.js.map +0 -1
|
@@ -1,1359 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/i18n'), require('@skyux/list-builder'), require('@skyux/list-builder-view-checklist'), require('@skyux/modals'), require('@skyux/indicators'), require('rxjs/operators'), require('@skyux/grids'), require('@skyux/list-builder-common'), require('rxjs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/list-builder-view-grids', ['exports', '@angular/common', '@angular/core', '@skyux/i18n', '@skyux/list-builder', '@skyux/list-builder-view-checklist', '@skyux/modals', '@skyux/indicators', 'rxjs/operators', '@skyux/grids', '@skyux/list-builder-common', 'rxjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["list-builder-view-grids"] = {}), global.ng.common, global.ng.core, global.i5, global.i1, global.i4, global.i2, global.i1$1, global.rxjs.operators, global.i4$2, global.listBuilderCommon, global.rxjs));
|
|
5
|
-
})(this, (function (exports, i4$1, i0, i5, i1, i4, i2, i1$1, operators, i4$2, listBuilderCommon, rxjs) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
26
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
32
|
-
var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
|
|
33
|
-
|
|
34
|
-
/* istanbul ignore next */
|
|
35
|
-
/* Code coverage having problems with no statements in classes */
|
|
36
|
-
var SkyColumnSelectorContext = /** @class */ (function () {
|
|
37
|
-
function SkyColumnSelectorContext() {
|
|
38
|
-
}
|
|
39
|
-
return SkyColumnSelectorContext;
|
|
40
|
-
}());
|
|
41
|
-
/* istanbul ignore next */
|
|
42
|
-
/* Code coverage having problems with no statements in classes */
|
|
43
|
-
var SkyColumnSelectorModel = /** @class */ (function () {
|
|
44
|
-
function SkyColumnSelectorModel() {
|
|
45
|
-
}
|
|
46
|
-
return SkyColumnSelectorModel;
|
|
47
|
-
}());
|
|
48
|
-
|
|
49
|
-
var SkyColumnSelectorComponent = /** @class */ (function () {
|
|
50
|
-
function SkyColumnSelectorComponent(context, instance) {
|
|
51
|
-
this.context = context;
|
|
52
|
-
this.instance = instance;
|
|
53
|
-
this.newSelectedColumnIds = [];
|
|
54
|
-
this.newSelectedColumnIds = context.selectedColumnIds;
|
|
55
|
-
}
|
|
56
|
-
SkyColumnSelectorComponent.prototype.selectedColumnsChange = function (selectedMap) {
|
|
57
|
-
var _this = this;
|
|
58
|
-
this.newSelectedColumnIds = [];
|
|
59
|
-
selectedMap.forEach(function (value, key) {
|
|
60
|
-
if (value) {
|
|
61
|
-
_this.newSelectedColumnIds.push(key);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
SkyColumnSelectorComponent.prototype.cancelChanges = function () {
|
|
66
|
-
this.instance.cancel();
|
|
67
|
-
};
|
|
68
|
-
SkyColumnSelectorComponent.prototype.applyChanges = function () {
|
|
69
|
-
this.instance.save(this.newSelectedColumnIds);
|
|
70
|
-
};
|
|
71
|
-
return SkyColumnSelectorComponent;
|
|
72
|
-
}());
|
|
73
|
-
SkyColumnSelectorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyColumnSelectorComponent, deps: [{ token: SkyColumnSelectorContext }, { token: i2__namespace.SkyModalInstance }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
74
|
-
SkyColumnSelectorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyColumnSelectorComponent, selector: "sky-column-selector", ngImport: i0__namespace, template: "<sky-modal>\n <sky-modal-header>\n {{ 'skyux_grid_column_picker_header' | skyLibResources }}\n </sky-modal-header>\n <sky-modal-content>\n <sky-list\n #list\n [data]=\"context.columns\"\n [selectedIds]=\"context.selectedColumnIds\"\n (selectedIdsChange)=\"selectedColumnsChange($event)\"\n >\n <sky-list-toolbar\n [placeholder]=\"\n 'skyux_grid_column_picker_search_placeholder' | skyLibResources\n \"\n >\n </sky-list-toolbar>\n\n <sky-list-view-checklist label=\"heading\" description=\"description\">\n </sky-list-view-checklist>\n </sky-list>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n sky-cmp-id=\"apply-changes\"\n class=\"sky-btn sky-btn-primary\"\n (click)=\"applyChanges()\"\n >\n {{ 'skyux_grid_column_picker_submit' | skyLibResources }}\n </button>\n <button\n sky-cmp-id=\"cancel\"\n class=\"sky-btn sky-btn-link\"\n (click)=\"cancelChanges()\"\n >\n {{ 'skyux_grid_column_picker_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n", components: [{ type: i2__namespace.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i2__namespace.λ4, selector: "sky-modal-header" }, { type: i2__namespace.λ2, selector: "sky-modal-content" }, { type: i1__namespace.SkyListComponent, selector: "sky-list", inputs: ["data", "dataProvider", "defaultView", "initialTotal", "selectedIds", "sortFields", "appliedFilters", "search"], outputs: ["selectedIdsChange", "appliedFiltersChange"] }, { type: i1__namespace.SkyListToolbarComponent, selector: "sky-list-toolbar", inputs: ["inMemorySearchEnabled", "placeholder", "searchEnabled", "sortSelectorEnabled", "toolbarType", "searchText"] }, { type: i4__namespace.SkyListViewChecklistComponent, selector: "sky-list-view-checklist", inputs: ["name", "search", "label", "description", "selectMode", "showOnlySelected"] }, { type: i2__namespace.λ3, selector: "sky-modal-footer" }], pipes: { "skyLibResources": i5__namespace.SkyLibResourcesPipe } });
|
|
75
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyColumnSelectorComponent, decorators: [{
|
|
76
|
-
type: i0.Component,
|
|
77
|
-
args: [{
|
|
78
|
-
selector: 'sky-column-selector',
|
|
79
|
-
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",
|
|
80
|
-
}]
|
|
81
|
-
}], ctorParameters: function () { return [{ type: SkyColumnSelectorContext }, { type: i2__namespace.SkyModalInstance }]; } });
|
|
82
|
-
|
|
83
|
-
var SkyColumnSelectorModule = /** @class */ (function () {
|
|
84
|
-
function SkyColumnSelectorModule() {
|
|
85
|
-
}
|
|
86
|
-
return SkyColumnSelectorModule;
|
|
87
|
-
}());
|
|
88
|
-
SkyColumnSelectorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyColumnSelectorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
89
|
-
SkyColumnSelectorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyColumnSelectorModule, declarations: [SkyColumnSelectorComponent], imports: [i4$1.CommonModule,
|
|
90
|
-
i5.SkyI18nModule,
|
|
91
|
-
i2.SkyModalModule,
|
|
92
|
-
i1.SkyListModule,
|
|
93
|
-
i1.SkyListToolbarModule,
|
|
94
|
-
i4.SkyListViewChecklistModule] });
|
|
95
|
-
SkyColumnSelectorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyColumnSelectorModule, imports: [[
|
|
96
|
-
i4$1.CommonModule,
|
|
97
|
-
i5.SkyI18nModule,
|
|
98
|
-
i2.SkyModalModule,
|
|
99
|
-
i1.SkyListModule,
|
|
100
|
-
i1.SkyListToolbarModule,
|
|
101
|
-
i4.SkyListViewChecklistModule,
|
|
102
|
-
]] });
|
|
103
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyColumnSelectorModule, decorators: [{
|
|
104
|
-
type: i0.NgModule,
|
|
105
|
-
args: [{
|
|
106
|
-
declarations: [SkyColumnSelectorComponent],
|
|
107
|
-
imports: [
|
|
108
|
-
i4$1.CommonModule,
|
|
109
|
-
i5.SkyI18nModule,
|
|
110
|
-
i2.SkyModalModule,
|
|
111
|
-
i1.SkyListModule,
|
|
112
|
-
i1.SkyListToolbarModule,
|
|
113
|
-
i4.SkyListViewChecklistModule,
|
|
114
|
-
],
|
|
115
|
-
entryComponents: [SkyColumnSelectorComponent],
|
|
116
|
-
}]
|
|
117
|
-
}] });
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @internal
|
|
121
|
-
*/
|
|
122
|
-
var ListViewDisplayedGridColumnsLoadAction = /** @class */ (function () {
|
|
123
|
-
function ListViewDisplayedGridColumnsLoadAction(columns, refresh) {
|
|
124
|
-
if (refresh === void 0) { refresh = false; }
|
|
125
|
-
this.columns = columns;
|
|
126
|
-
this.refresh = refresh;
|
|
127
|
-
}
|
|
128
|
-
return ListViewDisplayedGridColumnsLoadAction;
|
|
129
|
-
}());
|
|
130
|
-
|
|
131
|
-
var SkyListColumnSelectorButtonComponent = /** @class */ (function () {
|
|
132
|
-
function SkyListColumnSelectorButtonComponent() {
|
|
133
|
-
}
|
|
134
|
-
return SkyListColumnSelectorButtonComponent;
|
|
135
|
-
}());
|
|
136
|
-
SkyListColumnSelectorButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
137
|
-
SkyListColumnSelectorButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListColumnSelectorButtonComponent, selector: "sky-list-column-selector-button", ngImport: i0__namespace, template: "<button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_grid_columns_button' | skyLibResources\"\n [title]=\"'skyux_grid_columns_button' | skyLibResources\"\n>\n <sky-icon icon=\"columns\"></sky-icon>\n <span class=\"sky-column-selector-action-btn-text\">\n {{ 'skyux_grid_columns_toolbar_button' | skyLibResources }}\n </span>\n</button>\n", styles: [":host .sky-column-selector-action-btn-text{display:none}:host-context(.sky-responsive-container-xs) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-sm) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-md) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-lg) .sky-column-selector-action-btn-text{display:none}@media (min-width: 768px){:host .sky-column-selector-action-btn-text{display:inline}}:host-context(.sky-responsive-container-sm) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-md) .sky-column-selector-action-btn-text,:host-context(.sky-responsive-container-lg) .sky-column-selector-action-btn-text{display:inline}\n"], components: [{ type: i1__namespace$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], pipes: { "skyLibResources": i5__namespace.SkyLibResourcesPipe } });
|
|
138
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorButtonComponent, decorators: [{
|
|
139
|
-
type: i0.Component,
|
|
140
|
-
args: [{
|
|
141
|
-
selector: 'sky-list-column-selector-button',
|
|
142
|
-
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",
|
|
143
|
-
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"],
|
|
144
|
-
}]
|
|
145
|
-
}] });
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Provides a column selector modal for a list grid view when placed in a
|
|
149
|
-
* [list toolbar](https://developer.blackbaud.com/skyux/components/list/toolbar).
|
|
150
|
-
*/
|
|
151
|
-
var SkyListColumnSelectorActionComponent = /** @class */ (function () {
|
|
152
|
-
function SkyListColumnSelectorActionComponent(listState, modalService, dispatcher, secondaryActions) {
|
|
153
|
-
this.listState = listState;
|
|
154
|
-
this.modalService = modalService;
|
|
155
|
-
this.dispatcher = dispatcher;
|
|
156
|
-
this.secondaryActions = secondaryActions;
|
|
157
|
-
/**
|
|
158
|
-
* Fires when users click the help button and broadcasts the `helpKey`.
|
|
159
|
-
*/
|
|
160
|
-
this.helpOpened = new i0.EventEmitter();
|
|
161
|
-
this.columnSelectorActionItemToolbarIndex = 7000;
|
|
162
|
-
}
|
|
163
|
-
SkyListColumnSelectorActionComponent.prototype.ngAfterContentInit = function () {
|
|
164
|
-
if (!this.secondaryActions) {
|
|
165
|
-
var columnChooserItem = new i1.ListToolbarItemModel({
|
|
166
|
-
id: 'column-chooser',
|
|
167
|
-
template: this.columnChooserTemplate,
|
|
168
|
-
location: 'left',
|
|
169
|
-
});
|
|
170
|
-
this.dispatcher.toolbarAddItems([columnChooserItem], this.columnSelectorActionItemToolbarIndex);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
Object.defineProperty(SkyListColumnSelectorActionComponent.prototype, "isInGridView", {
|
|
174
|
-
get: function () {
|
|
175
|
-
var _this = this;
|
|
176
|
-
return this.listState.pipe(operators.map(function (s) { return s.views.active; }), operators.map(function (activeView) {
|
|
177
|
-
return _this.gridView && activeView === _this.gridView.id;
|
|
178
|
-
}), operators.distinctUntilChanged());
|
|
179
|
-
},
|
|
180
|
-
enumerable: false,
|
|
181
|
-
configurable: true
|
|
182
|
-
});
|
|
183
|
-
Object.defineProperty(SkyListColumnSelectorActionComponent.prototype, "isInGridViewAndSecondary", {
|
|
184
|
-
get: function () {
|
|
185
|
-
var _this = this;
|
|
186
|
-
return this.listState.pipe(operators.map(function (s) { return s.views.active; }), operators.map(function (activeView) {
|
|
187
|
-
return (_this.secondaryActions &&
|
|
188
|
-
_this.gridView &&
|
|
189
|
-
activeView === _this.gridView.id);
|
|
190
|
-
}), operators.distinctUntilChanged());
|
|
191
|
-
},
|
|
192
|
-
enumerable: false,
|
|
193
|
-
configurable: true
|
|
194
|
-
});
|
|
195
|
-
SkyListColumnSelectorActionComponent.prototype.openColumnSelector = function () {
|
|
196
|
-
var _this = this;
|
|
197
|
-
/* istanbul ignore else */
|
|
198
|
-
/* sanity check */
|
|
199
|
-
if (this.gridView) {
|
|
200
|
-
var columns_1 = [];
|
|
201
|
-
var selectedColumnIds_1 = [];
|
|
202
|
-
this.gridView.gridState
|
|
203
|
-
.pipe(operators.take(1))
|
|
204
|
-
.subscribe(function (state) {
|
|
205
|
-
columns_1 = state.columns.items
|
|
206
|
-
.filter(function (item) {
|
|
207
|
-
return !item.locked;
|
|
208
|
-
})
|
|
209
|
-
.map(function (item) {
|
|
210
|
-
return {
|
|
211
|
-
id: item.id,
|
|
212
|
-
heading: item.heading,
|
|
213
|
-
description: item.description,
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
selectedColumnIds_1 = state.displayedColumns.items
|
|
217
|
-
.filter(function (item) {
|
|
218
|
-
return !item.locked;
|
|
219
|
-
})
|
|
220
|
-
.map(function (item) {
|
|
221
|
-
return item.id;
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
var modalInstance = this.modalService.open(SkyColumnSelectorComponent, {
|
|
225
|
-
providers: [
|
|
226
|
-
{
|
|
227
|
-
provide: SkyColumnSelectorContext,
|
|
228
|
-
useValue: {
|
|
229
|
-
columns: columns_1,
|
|
230
|
-
selectedColumnIds: selectedColumnIds_1,
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
helpKey: this.helpKey,
|
|
235
|
-
});
|
|
236
|
-
modalInstance.helpOpened.subscribe(function (helpKey) {
|
|
237
|
-
_this.helpOpened.emit(helpKey);
|
|
238
|
-
_this.helpOpened.complete();
|
|
239
|
-
});
|
|
240
|
-
modalInstance.closed.subscribe(function (result) {
|
|
241
|
-
if (result.reason === 'save' && result.data) {
|
|
242
|
-
var newSelectedIds_1 = result.data;
|
|
243
|
-
var newDisplayedColumns_1 = [];
|
|
244
|
-
_this.gridView.gridState
|
|
245
|
-
.pipe(operators.take(1))
|
|
246
|
-
.subscribe(function (state) {
|
|
247
|
-
newDisplayedColumns_1 = state.columns.items.filter(function (item) {
|
|
248
|
-
return newSelectedIds_1.indexOf(item.id) > -1 || item.locked;
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
_this.gridView.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(newDisplayedColumns_1, true));
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
return SkyListColumnSelectorActionComponent;
|
|
257
|
-
}());
|
|
258
|
-
SkyListColumnSelectorActionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorActionComponent, deps: [{ token: i1__namespace.ListState }, { token: i2__namespace.SkyModalService }, { token: i1__namespace.ListStateDispatcher }, { token: i1__namespace.SkyListSecondaryActionsComponent, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
259
|
-
SkyListColumnSelectorActionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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__namespace, template: "<ng-container *ngIf=\"isInGridViewAndSecondary | async\">\n <sky-list-secondary-action>\n <button type=\"button\" (click)=\"openColumnSelector()\">\n {{ 'skyux_grid_columns_button' | skyLibResources }}\n </button>\n </sky-list-secondary-action>\n</ng-container>\n\n<ng-template #columnChooser>\n <sky-list-column-selector-button\n *ngIf=\"isInGridView | async\"\n (click)=\"openColumnSelector()\"\n >\n </sky-list-column-selector-button>\n</ng-template>\n", components: [{ type: i1__namespace.λ6, selector: "sky-list-secondary-action" }, { type: SkyListColumnSelectorButtonComponent, selector: "sky-list-column-selector-button" }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "skyLibResources": i5__namespace.SkyLibResourcesPipe } });
|
|
260
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorActionComponent, decorators: [{
|
|
261
|
-
type: i0.Component,
|
|
262
|
-
args: [{
|
|
263
|
-
selector: 'sky-list-column-selector-action',
|
|
264
|
-
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",
|
|
265
|
-
}]
|
|
266
|
-
}], ctorParameters: function () {
|
|
267
|
-
return [{ type: i1__namespace.ListState }, { type: i2__namespace.SkyModalService }, { type: i1__namespace.ListStateDispatcher }, { type: i1__namespace.SkyListSecondaryActionsComponent, decorators: [{
|
|
268
|
-
type: i0.Optional
|
|
269
|
-
}] }];
|
|
270
|
-
}, propDecorators: { gridView: [{
|
|
271
|
-
type: i0.Input
|
|
272
|
-
}], helpKey: [{
|
|
273
|
-
type: i0.Input
|
|
274
|
-
}], helpOpened: [{
|
|
275
|
-
type: i0.Output
|
|
276
|
-
}], columnChooserTemplate: [{
|
|
277
|
-
type: i0.ViewChild,
|
|
278
|
-
args: ['columnChooser', {
|
|
279
|
-
static: true,
|
|
280
|
-
}]
|
|
281
|
-
}] } });
|
|
282
|
-
|
|
283
|
-
var SkyListColumnSelectorActionModule = /** @class */ (function () {
|
|
284
|
-
function SkyListColumnSelectorActionModule() {
|
|
285
|
-
}
|
|
286
|
-
return SkyListColumnSelectorActionModule;
|
|
287
|
-
}());
|
|
288
|
-
SkyListColumnSelectorActionModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorActionModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
289
|
-
SkyListColumnSelectorActionModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorActionModule, declarations: [SkyListColumnSelectorActionComponent,
|
|
290
|
-
SkyListColumnSelectorButtonComponent], imports: [i4$1.CommonModule,
|
|
291
|
-
i5.SkyI18nModule,
|
|
292
|
-
i2.SkyModalModule,
|
|
293
|
-
i1.SkyListSecondaryActionsModule,
|
|
294
|
-
i1.SkyListToolbarModule,
|
|
295
|
-
i1$1.SkyIconModule], exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule] });
|
|
296
|
-
SkyListColumnSelectorActionModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorActionModule, imports: [[
|
|
297
|
-
i4$1.CommonModule,
|
|
298
|
-
i5.SkyI18nModule,
|
|
299
|
-
i2.SkyModalModule,
|
|
300
|
-
i1.SkyListSecondaryActionsModule,
|
|
301
|
-
i1.SkyListToolbarModule,
|
|
302
|
-
i1$1.SkyIconModule,
|
|
303
|
-
], SkyColumnSelectorModule] });
|
|
304
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListColumnSelectorActionModule, decorators: [{
|
|
305
|
-
type: i0.NgModule,
|
|
306
|
-
args: [{
|
|
307
|
-
declarations: [
|
|
308
|
-
SkyListColumnSelectorActionComponent,
|
|
309
|
-
SkyListColumnSelectorButtonComponent,
|
|
310
|
-
],
|
|
311
|
-
imports: [
|
|
312
|
-
i4$1.CommonModule,
|
|
313
|
-
i5.SkyI18nModule,
|
|
314
|
-
i2.SkyModalModule,
|
|
315
|
-
i1.SkyListSecondaryActionsModule,
|
|
316
|
-
i1.SkyListToolbarModule,
|
|
317
|
-
i1$1.SkyIconModule,
|
|
318
|
-
],
|
|
319
|
-
exports: [SkyListColumnSelectorActionComponent, SkyColumnSelectorModule],
|
|
320
|
-
}]
|
|
321
|
-
}] });
|
|
322
|
-
|
|
323
|
-
/*! *****************************************************************************
|
|
324
|
-
Copyright (c) Microsoft Corporation.
|
|
325
|
-
|
|
326
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
327
|
-
purpose with or without fee is hereby granted.
|
|
328
|
-
|
|
329
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
330
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
331
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
332
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
333
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
334
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
335
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
336
|
-
***************************************************************************** */
|
|
337
|
-
/* global Reflect, Promise */
|
|
338
|
-
var extendStatics = function (d, b) {
|
|
339
|
-
extendStatics = Object.setPrototypeOf ||
|
|
340
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
341
|
-
function (d, b) { for (var p in b)
|
|
342
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
343
|
-
d[p] = b[p]; };
|
|
344
|
-
return extendStatics(d, b);
|
|
345
|
-
};
|
|
346
|
-
function __extends(d, b) {
|
|
347
|
-
if (typeof b !== "function" && b !== null)
|
|
348
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
349
|
-
extendStatics(d, b);
|
|
350
|
-
function __() { this.constructor = d; }
|
|
351
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
352
|
-
}
|
|
353
|
-
var __assign = function () {
|
|
354
|
-
__assign = Object.assign || function __assign(t) {
|
|
355
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
356
|
-
s = arguments[i];
|
|
357
|
-
for (var p in s)
|
|
358
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
359
|
-
t[p] = s[p];
|
|
360
|
-
}
|
|
361
|
-
return t;
|
|
362
|
-
};
|
|
363
|
-
return __assign.apply(this, arguments);
|
|
364
|
-
};
|
|
365
|
-
function __rest(s, e) {
|
|
366
|
-
var t = {};
|
|
367
|
-
for (var p in s)
|
|
368
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
369
|
-
t[p] = s[p];
|
|
370
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
371
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
372
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
373
|
-
t[p[i]] = s[p[i]];
|
|
374
|
-
}
|
|
375
|
-
return t;
|
|
376
|
-
}
|
|
377
|
-
function __decorate(decorators, target, key, desc) {
|
|
378
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
379
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
380
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
381
|
-
else
|
|
382
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
383
|
-
if (d = decorators[i])
|
|
384
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
385
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
386
|
-
}
|
|
387
|
-
function __param(paramIndex, decorator) {
|
|
388
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
389
|
-
}
|
|
390
|
-
function __metadata(metadataKey, metadataValue) {
|
|
391
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
392
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
393
|
-
}
|
|
394
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
395
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
396
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
397
|
-
function fulfilled(value) { try {
|
|
398
|
-
step(generator.next(value));
|
|
399
|
-
}
|
|
400
|
-
catch (e) {
|
|
401
|
-
reject(e);
|
|
402
|
-
} }
|
|
403
|
-
function rejected(value) { try {
|
|
404
|
-
step(generator["throw"](value));
|
|
405
|
-
}
|
|
406
|
-
catch (e) {
|
|
407
|
-
reject(e);
|
|
408
|
-
} }
|
|
409
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
410
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
function __generator(thisArg, body) {
|
|
414
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
415
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
416
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
417
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
418
|
-
function step(op) {
|
|
419
|
-
if (f)
|
|
420
|
-
throw new TypeError("Generator is already executing.");
|
|
421
|
-
while (_)
|
|
422
|
-
try {
|
|
423
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
424
|
-
return t;
|
|
425
|
-
if (y = 0, t)
|
|
426
|
-
op = [op[0] & 2, t.value];
|
|
427
|
-
switch (op[0]) {
|
|
428
|
-
case 0:
|
|
429
|
-
case 1:
|
|
430
|
-
t = op;
|
|
431
|
-
break;
|
|
432
|
-
case 4:
|
|
433
|
-
_.label++;
|
|
434
|
-
return { value: op[1], done: false };
|
|
435
|
-
case 5:
|
|
436
|
-
_.label++;
|
|
437
|
-
y = op[1];
|
|
438
|
-
op = [0];
|
|
439
|
-
continue;
|
|
440
|
-
case 7:
|
|
441
|
-
op = _.ops.pop();
|
|
442
|
-
_.trys.pop();
|
|
443
|
-
continue;
|
|
444
|
-
default:
|
|
445
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
446
|
-
_ = 0;
|
|
447
|
-
continue;
|
|
448
|
-
}
|
|
449
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
450
|
-
_.label = op[1];
|
|
451
|
-
break;
|
|
452
|
-
}
|
|
453
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
454
|
-
_.label = t[1];
|
|
455
|
-
t = op;
|
|
456
|
-
break;
|
|
457
|
-
}
|
|
458
|
-
if (t && _.label < t[2]) {
|
|
459
|
-
_.label = t[2];
|
|
460
|
-
_.ops.push(op);
|
|
461
|
-
break;
|
|
462
|
-
}
|
|
463
|
-
if (t[2])
|
|
464
|
-
_.ops.pop();
|
|
465
|
-
_.trys.pop();
|
|
466
|
-
continue;
|
|
467
|
-
}
|
|
468
|
-
op = body.call(thisArg, _);
|
|
469
|
-
}
|
|
470
|
-
catch (e) {
|
|
471
|
-
op = [6, e];
|
|
472
|
-
y = 0;
|
|
473
|
-
}
|
|
474
|
-
finally {
|
|
475
|
-
f = t = 0;
|
|
476
|
-
}
|
|
477
|
-
if (op[0] & 5)
|
|
478
|
-
throw op[1];
|
|
479
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
483
|
-
if (k2 === undefined)
|
|
484
|
-
k2 = k;
|
|
485
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
486
|
-
}) : (function (o, m, k, k2) {
|
|
487
|
-
if (k2 === undefined)
|
|
488
|
-
k2 = k;
|
|
489
|
-
o[k2] = m[k];
|
|
490
|
-
});
|
|
491
|
-
function __exportStar(m, o) {
|
|
492
|
-
for (var p in m)
|
|
493
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
494
|
-
__createBinding(o, m, p);
|
|
495
|
-
}
|
|
496
|
-
function __values(o) {
|
|
497
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
498
|
-
if (m)
|
|
499
|
-
return m.call(o);
|
|
500
|
-
if (o && typeof o.length === "number")
|
|
501
|
-
return {
|
|
502
|
-
next: function () {
|
|
503
|
-
if (o && i >= o.length)
|
|
504
|
-
o = void 0;
|
|
505
|
-
return { value: o && o[i++], done: !o };
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
509
|
-
}
|
|
510
|
-
function __read(o, n) {
|
|
511
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
512
|
-
if (!m)
|
|
513
|
-
return o;
|
|
514
|
-
var i = m.call(o), r, ar = [], e;
|
|
515
|
-
try {
|
|
516
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
517
|
-
ar.push(r.value);
|
|
518
|
-
}
|
|
519
|
-
catch (error) {
|
|
520
|
-
e = { error: error };
|
|
521
|
-
}
|
|
522
|
-
finally {
|
|
523
|
-
try {
|
|
524
|
-
if (r && !r.done && (m = i["return"]))
|
|
525
|
-
m.call(i);
|
|
526
|
-
}
|
|
527
|
-
finally {
|
|
528
|
-
if (e)
|
|
529
|
-
throw e.error;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
return ar;
|
|
533
|
-
}
|
|
534
|
-
/** @deprecated */
|
|
535
|
-
function __spread() {
|
|
536
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
537
|
-
ar = ar.concat(__read(arguments[i]));
|
|
538
|
-
return ar;
|
|
539
|
-
}
|
|
540
|
-
/** @deprecated */
|
|
541
|
-
function __spreadArrays() {
|
|
542
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
543
|
-
s += arguments[i].length;
|
|
544
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
545
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
546
|
-
r[k] = a[j];
|
|
547
|
-
return r;
|
|
548
|
-
}
|
|
549
|
-
function __spreadArray(to, from, pack) {
|
|
550
|
-
if (pack || arguments.length === 2)
|
|
551
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
552
|
-
if (ar || !(i in from)) {
|
|
553
|
-
if (!ar)
|
|
554
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
555
|
-
ar[i] = from[i];
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
559
|
-
}
|
|
560
|
-
function __await(v) {
|
|
561
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
562
|
-
}
|
|
563
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
564
|
-
if (!Symbol.asyncIterator)
|
|
565
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
566
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
567
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
568
|
-
function verb(n) { if (g[n])
|
|
569
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
570
|
-
function resume(n, v) { try {
|
|
571
|
-
step(g[n](v));
|
|
572
|
-
}
|
|
573
|
-
catch (e) {
|
|
574
|
-
settle(q[0][3], e);
|
|
575
|
-
} }
|
|
576
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
577
|
-
function fulfill(value) { resume("next", value); }
|
|
578
|
-
function reject(value) { resume("throw", value); }
|
|
579
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
580
|
-
resume(q[0][0], q[0][1]); }
|
|
581
|
-
}
|
|
582
|
-
function __asyncDelegator(o) {
|
|
583
|
-
var i, p;
|
|
584
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
585
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
586
|
-
}
|
|
587
|
-
function __asyncValues(o) {
|
|
588
|
-
if (!Symbol.asyncIterator)
|
|
589
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
590
|
-
var m = o[Symbol.asyncIterator], i;
|
|
591
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
592
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
593
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
594
|
-
}
|
|
595
|
-
function __makeTemplateObject(cooked, raw) {
|
|
596
|
-
if (Object.defineProperty) {
|
|
597
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
598
|
-
}
|
|
599
|
-
else {
|
|
600
|
-
cooked.raw = raw;
|
|
601
|
-
}
|
|
602
|
-
return cooked;
|
|
603
|
-
}
|
|
604
|
-
;
|
|
605
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
606
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
607
|
-
}) : function (o, v) {
|
|
608
|
-
o["default"] = v;
|
|
609
|
-
};
|
|
610
|
-
function __importStar(mod) {
|
|
611
|
-
if (mod && mod.__esModule)
|
|
612
|
-
return mod;
|
|
613
|
-
var result = {};
|
|
614
|
-
if (mod != null)
|
|
615
|
-
for (var k in mod)
|
|
616
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
617
|
-
__createBinding(result, mod, k);
|
|
618
|
-
__setModuleDefault(result, mod);
|
|
619
|
-
return result;
|
|
620
|
-
}
|
|
621
|
-
function __importDefault(mod) {
|
|
622
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
623
|
-
}
|
|
624
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
625
|
-
if (kind === "a" && !f)
|
|
626
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
627
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
628
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
629
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
630
|
-
}
|
|
631
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
632
|
-
if (kind === "m")
|
|
633
|
-
throw new TypeError("Private method is not writable");
|
|
634
|
-
if (kind === "a" && !f)
|
|
635
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
636
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
637
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
638
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* @internal
|
|
643
|
-
*/
|
|
644
|
-
var ListViewGridColumnsLoadAction = /** @class */ (function () {
|
|
645
|
-
function ListViewGridColumnsLoadAction(columns, refresh) {
|
|
646
|
-
if (refresh === void 0) { refresh = false; }
|
|
647
|
-
this.columns = columns;
|
|
648
|
-
this.refresh = refresh;
|
|
649
|
-
}
|
|
650
|
-
return ListViewGridColumnsLoadAction;
|
|
651
|
-
}());
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* @internal
|
|
655
|
-
*/
|
|
656
|
-
var GridStateModel = /** @class */ (function () {
|
|
657
|
-
function GridStateModel() {
|
|
658
|
-
this.columns = new listBuilderCommon.AsyncList();
|
|
659
|
-
this.displayedColumns = new listBuilderCommon.AsyncList();
|
|
660
|
-
}
|
|
661
|
-
return GridStateModel;
|
|
662
|
-
}());
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* @internal
|
|
666
|
-
*/
|
|
667
|
-
var GridStateDispatcher = /** @class */ (function (_super) {
|
|
668
|
-
__extends(GridStateDispatcher, _super);
|
|
669
|
-
function GridStateDispatcher() {
|
|
670
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
671
|
-
}
|
|
672
|
-
return GridStateDispatcher;
|
|
673
|
-
}(listBuilderCommon.StateDispatcher));
|
|
674
|
-
GridStateDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GridStateDispatcher, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
675
|
-
GridStateDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GridStateDispatcher });
|
|
676
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GridStateDispatcher, decorators: [{
|
|
677
|
-
type: i0.Injectable
|
|
678
|
-
}] });
|
|
679
|
-
/**
|
|
680
|
-
* @internal
|
|
681
|
-
*/
|
|
682
|
-
var GridStateOrchestrator = /** @class */ (function (_super) {
|
|
683
|
-
__extends(GridStateOrchestrator, _super);
|
|
684
|
-
function GridStateOrchestrator() {
|
|
685
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
686
|
-
}
|
|
687
|
-
return GridStateOrchestrator;
|
|
688
|
-
}(listBuilderCommon.StateOrchestrator));
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* @internal
|
|
692
|
-
*/
|
|
693
|
-
var ListViewGridColumnsOrchestrator = /** @class */ (function (_super) {
|
|
694
|
-
__extends(ListViewGridColumnsOrchestrator, _super);
|
|
695
|
-
/* istanbul ignore next */
|
|
696
|
-
function ListViewGridColumnsOrchestrator() {
|
|
697
|
-
var _this = _super.call(this) || this;
|
|
698
|
-
_this.register(ListViewGridColumnsLoadAction, _this.load);
|
|
699
|
-
return _this;
|
|
700
|
-
}
|
|
701
|
-
ListViewGridColumnsOrchestrator.prototype.load = function (state, action) {
|
|
702
|
-
var newColumns = action.columns.map(function (g) { return new i4$2.SkyGridColumnModel(g.template, g); });
|
|
703
|
-
if (action.refresh) {
|
|
704
|
-
return new listBuilderCommon.AsyncList(__spreadArray([], __read(newColumns)), new Date());
|
|
705
|
-
}
|
|
706
|
-
return new listBuilderCommon.AsyncList(__spreadArray(__spreadArray([], __read(state.items)), __read(newColumns)), new Date());
|
|
707
|
-
};
|
|
708
|
-
return ListViewGridColumnsOrchestrator;
|
|
709
|
-
}(GridStateOrchestrator));
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* @internal
|
|
713
|
-
*/
|
|
714
|
-
var ListViewDisplayedGridColumnsOrchestrator = /** @class */ (function (_super) {
|
|
715
|
-
__extends(ListViewDisplayedGridColumnsOrchestrator, _super);
|
|
716
|
-
/* istanbul ignore next */
|
|
717
|
-
function ListViewDisplayedGridColumnsOrchestrator() {
|
|
718
|
-
var _this = _super.call(this) || this;
|
|
719
|
-
_this.register(ListViewDisplayedGridColumnsLoadAction, _this.load);
|
|
720
|
-
return _this;
|
|
721
|
-
}
|
|
722
|
-
ListViewDisplayedGridColumnsOrchestrator.prototype.load = function (state, action) {
|
|
723
|
-
var newColumns = action.columns.map(function (g) { return new i4$2.SkyGridColumnModel(g.template, g); });
|
|
724
|
-
if (action.refresh) {
|
|
725
|
-
return new listBuilderCommon.AsyncList(__spreadArray([], __read(newColumns)), new Date());
|
|
726
|
-
}
|
|
727
|
-
return new listBuilderCommon.AsyncList(__spreadArray(__spreadArray([], __read(state.items)), __read(newColumns)), new Date());
|
|
728
|
-
};
|
|
729
|
-
return ListViewDisplayedGridColumnsOrchestrator;
|
|
730
|
-
}(GridStateOrchestrator));
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* @internal
|
|
734
|
-
*/
|
|
735
|
-
var GridState = /** @class */ (function (_super) {
|
|
736
|
-
__extends(GridState, _super);
|
|
737
|
-
/* istanbul ignore next */
|
|
738
|
-
function GridState(initialState, dispatcher) {
|
|
739
|
-
var _this = _super.call(this, initialState, dispatcher) || this;
|
|
740
|
-
_this.register('columns', ListViewGridColumnsOrchestrator)
|
|
741
|
-
.register('displayedColumns', ListViewDisplayedGridColumnsOrchestrator)
|
|
742
|
-
.begin();
|
|
743
|
-
return _this;
|
|
744
|
-
}
|
|
745
|
-
return GridState;
|
|
746
|
-
}(listBuilderCommon.StateNode));
|
|
747
|
-
GridState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GridState, deps: [{ token: GridStateModel }, { token: GridStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
748
|
-
GridState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GridState });
|
|
749
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GridState, decorators: [{
|
|
750
|
-
type: i0.Injectable
|
|
751
|
-
}], ctorParameters: function () { return [{ type: GridStateModel }, { type: GridStateDispatcher }]; } });
|
|
752
|
-
|
|
753
|
-
/**
|
|
754
|
-
* The command for the list view grid to respond to.
|
|
755
|
-
*/
|
|
756
|
-
exports.SkyListViewGridMessageType = void 0;
|
|
757
|
-
(function (SkyListViewGridMessageType) {
|
|
758
|
-
/**
|
|
759
|
-
* Deletes of a row in the list view grid.
|
|
760
|
-
*/
|
|
761
|
-
SkyListViewGridMessageType[SkyListViewGridMessageType["PromptDeleteRow"] = 0] = "PromptDeleteRow";
|
|
762
|
-
/**
|
|
763
|
-
* Cancels the deletion of a row in the list view grid.
|
|
764
|
-
*/
|
|
765
|
-
SkyListViewGridMessageType[SkyListViewGridMessageType["AbortDeleteRow"] = 1] = "AbortDeleteRow";
|
|
766
|
-
})(exports.SkyListViewGridMessageType || (exports.SkyListViewGridMessageType = {}));
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* Displays a grid for a
|
|
770
|
-
* [SKY UX-themed list of data](https://developer.blackbaud.com/skyux/components/list/overview)
|
|
771
|
-
* using the [grid component](https://developer.blackbaud.com/skyux/components/grid).
|
|
772
|
-
* You must install `SkyListModule` as a dependency.
|
|
773
|
-
*/
|
|
774
|
-
var SkyListViewGridComponent = /** @class */ (function (_super) {
|
|
775
|
-
__extends(SkyListViewGridComponent, _super);
|
|
776
|
-
function SkyListViewGridComponent(state, dispatcher, gridState, gridDispatcher) {
|
|
777
|
-
var _this = _super.call(this, state, 'Grid View') || this;
|
|
778
|
-
_this.dispatcher = dispatcher;
|
|
779
|
-
_this.gridState = gridState;
|
|
780
|
-
_this.gridDispatcher = gridDispatcher;
|
|
781
|
-
/**
|
|
782
|
-
* Specifies how the grid fits to its parent. `"width"` fits the grid to the parent's full
|
|
783
|
-
* width, and `"scroll"` allows the grid to exceed the parent's width. If the grid does not have
|
|
784
|
-
* enough columns to fill the parent's width, it always stretches to the parent's full width.
|
|
785
|
-
* @default "width"
|
|
786
|
-
*/
|
|
787
|
-
_this.fit = 'width';
|
|
788
|
-
/**
|
|
789
|
-
* Indicates whether to highlight search text within the grid.
|
|
790
|
-
* @default true
|
|
791
|
-
*/
|
|
792
|
-
_this.highlightSearchText = true;
|
|
793
|
-
/**
|
|
794
|
-
* Indicates whether to enable the multiselect feature to display a column of checkboxes
|
|
795
|
-
* on the left side of the grid. Multiselect also displays an action bar with buttons to
|
|
796
|
-
* select and clear all checkboxes. Multiselect defaults to the `id` property on the list's
|
|
797
|
-
* `data` object.
|
|
798
|
-
* @default false
|
|
799
|
-
*/
|
|
800
|
-
_this.enableMultiselect = false;
|
|
801
|
-
/**
|
|
802
|
-
* Fires when users cancel the deletion of a row.
|
|
803
|
-
*/
|
|
804
|
-
_this.rowDeleteCancel = new i0.EventEmitter();
|
|
805
|
-
/**
|
|
806
|
-
* Fires when users confirm the deletion of a row.
|
|
807
|
-
*/
|
|
808
|
-
_this.rowDeleteConfirm = new i0.EventEmitter();
|
|
809
|
-
/**
|
|
810
|
-
* Fires when columns change. This includes changes to the displayed columns and changes
|
|
811
|
-
* to the order of columns. The event emits an array of IDs for the displayed columns that
|
|
812
|
-
* reflects the column order.
|
|
813
|
-
*/
|
|
814
|
-
_this.selectedColumnIdsChange = new i0.EventEmitter();
|
|
815
|
-
/**
|
|
816
|
-
* Message stream for communicating with the internal grid instance
|
|
817
|
-
* @interal
|
|
818
|
-
*/
|
|
819
|
-
_this.gridMessageStream = new rxjs.Subject();
|
|
820
|
-
_this.multiselectSelectedIds = [];
|
|
821
|
-
_this.ngUnsubscribe = new rxjs.Subject();
|
|
822
|
-
_this._messageStream = new rxjs.Subject();
|
|
823
|
-
return _this;
|
|
824
|
-
}
|
|
825
|
-
Object.defineProperty(SkyListViewGridComponent.prototype, "name", {
|
|
826
|
-
/**
|
|
827
|
-
* Specifies the name of the view.
|
|
828
|
-
* @required
|
|
829
|
-
*/
|
|
830
|
-
set: function (value) {
|
|
831
|
-
this.viewName = value;
|
|
832
|
-
},
|
|
833
|
-
enumerable: false,
|
|
834
|
-
configurable: true
|
|
835
|
-
});
|
|
836
|
-
Object.defineProperty(SkyListViewGridComponent.prototype, "messageStream", {
|
|
837
|
-
get: function () {
|
|
838
|
-
return this._messageStream;
|
|
839
|
-
},
|
|
840
|
-
/**
|
|
841
|
-
* Provides an observable to send commands to the grid.
|
|
842
|
-
* The commands should respect the `SkyListViewGridMessage` type.
|
|
843
|
-
*/
|
|
844
|
-
set: function (stream) {
|
|
845
|
-
/* istanbul ignore else */
|
|
846
|
-
if (this._messageStream) {
|
|
847
|
-
this._messageStream.unsubscribe();
|
|
848
|
-
}
|
|
849
|
-
this._messageStream = stream;
|
|
850
|
-
this.initInlineDeleteMessages();
|
|
851
|
-
},
|
|
852
|
-
enumerable: false,
|
|
853
|
-
configurable: true
|
|
854
|
-
});
|
|
855
|
-
Object.defineProperty(SkyListViewGridComponent.prototype, "gridHeight", {
|
|
856
|
-
get: function () {
|
|
857
|
-
/* istanbul ignore next */
|
|
858
|
-
return typeof this.height === 'number'
|
|
859
|
-
? rxjs.of(this.height)
|
|
860
|
-
: this.height;
|
|
861
|
-
},
|
|
862
|
-
enumerable: false,
|
|
863
|
-
configurable: true
|
|
864
|
-
});
|
|
865
|
-
Object.defineProperty(SkyListViewGridComponent.prototype, "gridWidth", {
|
|
866
|
-
get: function () {
|
|
867
|
-
/* istanbul ignore next */
|
|
868
|
-
return typeof this.width === 'number'
|
|
869
|
-
? rxjs.of(this.width)
|
|
870
|
-
: this.width;
|
|
871
|
-
},
|
|
872
|
-
enumerable: false,
|
|
873
|
-
configurable: true
|
|
874
|
-
});
|
|
875
|
-
SkyListViewGridComponent.prototype.ngAfterContentInit = function () {
|
|
876
|
-
var _this = this;
|
|
877
|
-
// Watch for selection changes and update multiselectSelectedIds for local comparison.
|
|
878
|
-
this.state
|
|
879
|
-
.pipe(operators.map(function (s) { return s.selected.item; }), operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged(this.selectedMapEqual))
|
|
880
|
-
.subscribe(function (items) {
|
|
881
|
-
var selectedIds = [];
|
|
882
|
-
items.selectedIdMap.forEach(function (isSelected, id) {
|
|
883
|
-
if (items.selectedIdMap.get(id) === true) {
|
|
884
|
-
selectedIds.push(id);
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
_this.multiselectSelectedIds = selectedIds;
|
|
888
|
-
});
|
|
889
|
-
/* istanbul ignore next */
|
|
890
|
-
if (this.columnComponents.length === 0) {
|
|
891
|
-
throw new Error('Grid view requires at least one sky-grid-column to render.');
|
|
892
|
-
}
|
|
893
|
-
var columnModels = this.columnComponents.map(function (columnComponent) {
|
|
894
|
-
return new i4$2.SkyGridColumnModel(columnComponent.template, columnComponent);
|
|
895
|
-
});
|
|
896
|
-
if (this.width && !listBuilderCommon.isObservable(this.width)) {
|
|
897
|
-
this.width = rxjs.of(this.width);
|
|
898
|
-
}
|
|
899
|
-
if (this.height && !listBuilderCommon.isObservable(this.height)) {
|
|
900
|
-
this.height = rxjs.of(this.height);
|
|
901
|
-
}
|
|
902
|
-
// Setup Observables for template
|
|
903
|
-
this.columns = this.gridState.pipe(operators.map(function (s) { return s.columns.items; }), operators.distinctUntilChanged(this.arraysEqual), operators.takeUntil(this.ngUnsubscribe));
|
|
904
|
-
this.selectedColumnIds = this.getSelectedIds();
|
|
905
|
-
this.items = this.getGridItems();
|
|
906
|
-
this.loading = this.state.pipe(operators.map(function (s) {
|
|
907
|
-
return s.items.loading;
|
|
908
|
-
}), operators.distinctUntilChanged(), operators.takeUntil(this.ngUnsubscribe));
|
|
909
|
-
this.sortField = this.state.pipe(operators.map(function (s) {
|
|
910
|
-
/* istanbul ignore else */
|
|
911
|
-
/* sanity check */
|
|
912
|
-
if (s.sort && s.sort.fieldSelectors) {
|
|
913
|
-
return s.sort.fieldSelectors[0];
|
|
914
|
-
}
|
|
915
|
-
/* istanbul ignore next */
|
|
916
|
-
/* sanity check */
|
|
917
|
-
return undefined;
|
|
918
|
-
}), operators.distinctUntilChanged(), operators.takeUntil(this.ngUnsubscribe));
|
|
919
|
-
this.gridState
|
|
920
|
-
.pipe(operators.map(function (s) { return s.columns.items; }), operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged(this.arraysEqual))
|
|
921
|
-
.subscribe(function (columns) {
|
|
922
|
-
/* istanbul ignore else */
|
|
923
|
-
if (_this.hiddenColumns) {
|
|
924
|
-
listBuilderCommon.getValue(_this.hiddenColumns, function (hiddenColumns) {
|
|
925
|
-
_this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter(function (x) {
|
|
926
|
-
/* istanbul ignore next */
|
|
927
|
-
/* sanity check */
|
|
928
|
-
var id = x.id || x.field;
|
|
929
|
-
return hiddenColumns.indexOf(id) === -1;
|
|
930
|
-
}), true));
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
else if (_this.displayedColumns) {
|
|
934
|
-
/* istanbul ignore next */
|
|
935
|
-
listBuilderCommon.getValue(_this.displayedColumns, function (displayedColumns) {
|
|
936
|
-
_this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter(function (x) { return displayedColumns.indexOf(x.id || x.field) !== -1; }), true));
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
else {
|
|
940
|
-
_this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(columns.filter(function (x) { return !x.hidden; }), true));
|
|
941
|
-
}
|
|
942
|
-
});
|
|
943
|
-
this.currentSearchText = this.state.pipe(operators.map(function (s) { return s.search.searchText; }), operators.distinctUntilChanged(), operators.takeUntil(this.ngUnsubscribe));
|
|
944
|
-
this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
|
|
945
|
-
this.handleColumnChange();
|
|
946
|
-
if (this.enableMultiselect) {
|
|
947
|
-
this.dispatcher.toolbarShowMultiselectToolbar(true);
|
|
948
|
-
}
|
|
949
|
-
this.initInlineDeleteMessages();
|
|
950
|
-
};
|
|
951
|
-
SkyListViewGridComponent.prototype.ngOnDestroy = function () {
|
|
952
|
-
this.ngUnsubscribe.next();
|
|
953
|
-
this.ngUnsubscribe.complete();
|
|
954
|
-
};
|
|
955
|
-
/**
|
|
956
|
-
* If user makes selection, tell list-builder to update the list state.
|
|
957
|
-
* This logic should only run on user interaction - NOT programmatic updates.
|
|
958
|
-
*/
|
|
959
|
-
SkyListViewGridComponent.prototype.onMultiselectSelectionChange = function (event) {
|
|
960
|
-
var _this = this;
|
|
961
|
-
if (event.source === i4$2.SkyGridSelectedRowsSource.CheckboxChange ||
|
|
962
|
-
event.source === i4$2.SkyGridSelectedRowsSource.RowClick) {
|
|
963
|
-
this.state
|
|
964
|
-
.pipe(operators.map(function (s) { return s.items.items; }), operators.take(1))
|
|
965
|
-
.subscribe(function (items) {
|
|
966
|
-
var newItemIds = _this.arrayIntersection(items.map(function (i) { return i.id; }), _this.multiselectSelectedIds);
|
|
967
|
-
var newIds = items.filter(function (i) { return i.isSelected; }).map(function (i) { return i.id; });
|
|
968
|
-
// Check for deselected ids & send message to dispatcher.
|
|
969
|
-
var deselectedIds = _this.arrayDiff(newItemIds, newIds);
|
|
970
|
-
if (deselectedIds.length > 0) {
|
|
971
|
-
_this.dispatcher.setSelected(deselectedIds, false);
|
|
972
|
-
}
|
|
973
|
-
// Check for selected ids & send message to dispatcher.
|
|
974
|
-
var selectedIds = _this.arrayDiff(newIds, newItemIds);
|
|
975
|
-
if (selectedIds.length > 0) {
|
|
976
|
-
_this.dispatcher.setSelected(selectedIds, true);
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
SkyListViewGridComponent.prototype.columnIdsChanged = function (selectedColumnIds) {
|
|
982
|
-
var _this = this;
|
|
983
|
-
this.selectedColumnIds.pipe(operators.take(1)).subscribe(function (currentIds) {
|
|
984
|
-
if (!_this.arraysEqual(selectedColumnIds, currentIds)) {
|
|
985
|
-
_this.gridState
|
|
986
|
-
.pipe(operators.map(function (s) { return s.columns.items; }), operators.take(1))
|
|
987
|
-
.subscribe(function (columns) {
|
|
988
|
-
var displayedColumns = selectedColumnIds.map(function (columnId) { return columns.filter(function (c) { return c.id === columnId; })[0]; });
|
|
989
|
-
_this.gridDispatcher.next(new ListViewDisplayedGridColumnsLoadAction(displayedColumns, true));
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
});
|
|
993
|
-
};
|
|
994
|
-
SkyListViewGridComponent.prototype.cancelRowDelete = function (args) {
|
|
995
|
-
this.rowDeleteCancel.emit(args);
|
|
996
|
-
};
|
|
997
|
-
SkyListViewGridComponent.prototype.confirmRowDelete = function (args) {
|
|
998
|
-
this.rowDeleteConfirm.emit(args);
|
|
999
|
-
};
|
|
1000
|
-
SkyListViewGridComponent.prototype.sortFieldChanged = function (sortField) {
|
|
1001
|
-
this.dispatcher.sortSetFieldSelectors([sortField]);
|
|
1002
|
-
};
|
|
1003
|
-
SkyListViewGridComponent.prototype.onViewActive = function () {
|
|
1004
|
-
var _this = this;
|
|
1005
|
-
/*
|
|
1006
|
-
Ran into problem where state updates were consumed out of order. For example, on search text
|
|
1007
|
-
update, the searchText update was consumed after the resulting list item update. Scanning the
|
|
1008
|
-
previous value of items lastUpdate ensures that we only receive the latest items.
|
|
1009
|
-
*/
|
|
1010
|
-
this.gridState
|
|
1011
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.scan(function (previousValue, newValue) {
|
|
1012
|
-
if (previousValue.displayedColumns.lastUpdate >
|
|
1013
|
-
newValue.displayedColumns.lastUpdate) {
|
|
1014
|
-
return previousValue;
|
|
1015
|
-
}
|
|
1016
|
-
else {
|
|
1017
|
-
return newValue;
|
|
1018
|
-
}
|
|
1019
|
-
}), operators.map(function (s) { return s.displayedColumns.items; }), operators.distinctUntilChanged(this.arraysEqual))
|
|
1020
|
-
.subscribe(function (displayedColumns) {
|
|
1021
|
-
var setFunctions = _this.searchFunction !== undefined
|
|
1022
|
-
? [_this.searchFunction]
|
|
1023
|
-
: displayedColumns
|
|
1024
|
-
.map(function (column) { return function (data, searchText) { return column.searchFunction(listBuilderCommon.getData(data, column.field), searchText); }; })
|
|
1025
|
-
.filter(function (c) { return c !== undefined; });
|
|
1026
|
-
_this.state.pipe(operators.take(1)).subscribe(function (s) {
|
|
1027
|
-
_this.dispatcher.searchSetOptions(new i1.ListSearchModel({
|
|
1028
|
-
searchText: s.search.searchText,
|
|
1029
|
-
functions: setFunctions,
|
|
1030
|
-
fieldSelectors: displayedColumns.map(function (d) { return d.field; }),
|
|
1031
|
-
}));
|
|
1032
|
-
});
|
|
1033
|
-
});
|
|
1034
|
-
};
|
|
1035
|
-
SkyListViewGridComponent.prototype.initInlineDeleteMessages = function () {
|
|
1036
|
-
var _this = this;
|
|
1037
|
-
/* istanbul ignore next */
|
|
1038
|
-
if (this.messageStream) {
|
|
1039
|
-
this.messageStream.subscribe(function (message) {
|
|
1040
|
-
if (message.type === exports.SkyListViewGridMessageType.AbortDeleteRow) {
|
|
1041
|
-
_this.gridMessageStream.next({
|
|
1042
|
-
type: i4$2.SkyGridMessageType.AbortDeleteRow,
|
|
1043
|
-
data: {
|
|
1044
|
-
abortDeleteRow: message.data.abortDeleteRow,
|
|
1045
|
-
},
|
|
1046
|
-
});
|
|
1047
|
-
}
|
|
1048
|
-
else if (message.type === exports.SkyListViewGridMessageType.PromptDeleteRow) {
|
|
1049
|
-
_this.gridMessageStream.next({
|
|
1050
|
-
type: i4$2.SkyGridMessageType.PromptDeleteRow,
|
|
1051
|
-
data: {
|
|
1052
|
-
promptDeleteRow: message.data.promptDeleteRow,
|
|
1053
|
-
},
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
};
|
|
1059
|
-
SkyListViewGridComponent.prototype.handleColumnChange = function () {
|
|
1060
|
-
var _this = this;
|
|
1061
|
-
// watch for changes in column components
|
|
1062
|
-
this.columnComponents.changes
|
|
1063
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1064
|
-
.subscribe(function (columnComponents) {
|
|
1065
|
-
var columnModels = _this.columnComponents.map(function (column) {
|
|
1066
|
-
return new i4$2.SkyGridColumnModel(column.template, column);
|
|
1067
|
-
});
|
|
1068
|
-
_this.gridDispatcher.next(new ListViewGridColumnsLoadAction(columnModels, true));
|
|
1069
|
-
});
|
|
1070
|
-
// Watch for column heading changes:
|
|
1071
|
-
this.columnComponents.forEach(function (comp) {
|
|
1072
|
-
comp.headingModelChanges
|
|
1073
|
-
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
1074
|
-
.subscribe(function (change) {
|
|
1075
|
-
_this.gridComponent.updateColumnHeading(change);
|
|
1076
|
-
});
|
|
1077
|
-
comp.descriptionModelChanges
|
|
1078
|
-
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
1079
|
-
.subscribe(function (change) {
|
|
1080
|
-
_this.gridComponent.updateColumnDescription(change);
|
|
1081
|
-
});
|
|
1082
|
-
});
|
|
1083
|
-
};
|
|
1084
|
-
SkyListViewGridComponent.prototype.getGridItems = function () {
|
|
1085
|
-
/*
|
|
1086
|
-
Same problem as above. We should move from having a state object observable with a bunch of
|
|
1087
|
-
static properties to a static state object with observable properties that you can subscribe
|
|
1088
|
-
to.
|
|
1089
|
-
*/
|
|
1090
|
-
return this.state.pipe(operators.map(function (s) {
|
|
1091
|
-
return s.items;
|
|
1092
|
-
}), operators.scan(function (previousValue, newValue) {
|
|
1093
|
-
if (previousValue.lastUpdate > newValue.lastUpdate) {
|
|
1094
|
-
return previousValue;
|
|
1095
|
-
}
|
|
1096
|
-
else {
|
|
1097
|
-
return newValue;
|
|
1098
|
-
}
|
|
1099
|
-
}), operators.map(function (result) {
|
|
1100
|
-
return result.items;
|
|
1101
|
-
}), operators.distinctUntilChanged());
|
|
1102
|
-
};
|
|
1103
|
-
SkyListViewGridComponent.prototype.getSelectedIds = function () {
|
|
1104
|
-
var _this = this;
|
|
1105
|
-
/*
|
|
1106
|
-
Same problem as above. We should move from having a state object observable with a bunch of
|
|
1107
|
-
static properties to a static state object with observable properties that you can subscribe
|
|
1108
|
-
to.
|
|
1109
|
-
*/
|
|
1110
|
-
return this.gridState.pipe(operators.map(function (s) { return s.displayedColumns; }), operators.scan(function (previousValue, newValue) {
|
|
1111
|
-
if (previousValue.lastUpdate > newValue.lastUpdate) {
|
|
1112
|
-
return previousValue;
|
|
1113
|
-
}
|
|
1114
|
-
else {
|
|
1115
|
-
return newValue;
|
|
1116
|
-
}
|
|
1117
|
-
}), operators.map(function (result) {
|
|
1118
|
-
/* istanbul ignore next */
|
|
1119
|
-
/* sanity check */
|
|
1120
|
-
return result.items.map(function (column) {
|
|
1121
|
-
return column.id || column.field;
|
|
1122
|
-
});
|
|
1123
|
-
}), operators.distinctUntilChanged(function (previousValue, newValue) {
|
|
1124
|
-
return _this.haveColumnIdsChanged(previousValue, newValue);
|
|
1125
|
-
}));
|
|
1126
|
-
};
|
|
1127
|
-
SkyListViewGridComponent.prototype.haveColumnIdsChanged = function (previousValue, newValue) {
|
|
1128
|
-
if (previousValue.length !== newValue.length) {
|
|
1129
|
-
this.selectedColumnIdsChange.emit(newValue);
|
|
1130
|
-
return false;
|
|
1131
|
-
}
|
|
1132
|
-
for (var i = 0; i < previousValue.length; i++) {
|
|
1133
|
-
/* istanbul ignore if */
|
|
1134
|
-
if (previousValue[i] !== newValue[i]) {
|
|
1135
|
-
this.selectedColumnIdsChange.emit(newValue);
|
|
1136
|
-
return false;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
return true;
|
|
1140
|
-
};
|
|
1141
|
-
SkyListViewGridComponent.prototype.selectedMapEqual = function (prev, next) {
|
|
1142
|
-
if (prev.selectedIdMap.size !== next.selectedIdMap.size) {
|
|
1143
|
-
return false;
|
|
1144
|
-
}
|
|
1145
|
-
var keys = [];
|
|
1146
|
-
next.selectedIdMap.forEach(function (value, key) {
|
|
1147
|
-
keys.push(key);
|
|
1148
|
-
});
|
|
1149
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1150
|
-
var key = keys[i];
|
|
1151
|
-
var value = next.selectedIdMap.get(key);
|
|
1152
|
-
if (value !== prev.selectedIdMap.get(key)) {
|
|
1153
|
-
return false;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
return true;
|
|
1157
|
-
};
|
|
1158
|
-
SkyListViewGridComponent.prototype.arrayDiff = function (arrA, arrB) {
|
|
1159
|
-
return arrA.filter(function (i) { return arrB.indexOf(i) < 0; });
|
|
1160
|
-
};
|
|
1161
|
-
SkyListViewGridComponent.prototype.arrayIntersection = function (arrA, arrB) {
|
|
1162
|
-
return arrA.filter(function (value) { return -1 !== arrB.indexOf(value); });
|
|
1163
|
-
};
|
|
1164
|
-
SkyListViewGridComponent.prototype.arraysEqual = function (arrayA, arrayB) {
|
|
1165
|
-
return (arrayA.length === arrayB.length &&
|
|
1166
|
-
arrayA.every(function (value, index) { return value === arrayB[index]; }));
|
|
1167
|
-
};
|
|
1168
|
-
return SkyListViewGridComponent;
|
|
1169
|
-
}(i1.ListViewComponent));
|
|
1170
|
-
SkyListViewGridComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListViewGridComponent, deps: [{ token: i1__namespace.ListState }, { token: i1__namespace.ListStateDispatcher }, { token: GridState }, { token: GridStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1171
|
-
SkyListViewGridComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: [
|
|
1172
|
-
/* tslint:disable */
|
|
1173
|
-
{
|
|
1174
|
-
provide: i1.ListViewComponent,
|
|
1175
|
-
useExisting: i0.forwardRef(function () { return SkyListViewGridComponent; }),
|
|
1176
|
-
},
|
|
1177
|
-
/* tslint:enable */
|
|
1178
|
-
GridState,
|
|
1179
|
-
GridStateDispatcher,
|
|
1180
|
-
GridStateModel,
|
|
1181
|
-
], queries: [{ propertyName: "columnComponents", predicate: i4$2.SkyGridColumnComponent }], viewQueries: [{ propertyName: "gridComponent", first: true, predicate: i4$2.SkyGridComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div *ngIf=\"active | async\">\n <sky-grid\n [columns]=\"columns | async\"\n [data]=\"items | async\"\n [enableMultiselect]=\"enableMultiselect\"\n [fit]=\"fit\"\n [height]=\"gridHeight | async\"\n [highlightText]=\"\n highlightSearchText ? (currentSearchText | async) : undefined\n \"\n [rowHighlightedId]=\"rowHighlightedId\"\n [messageStream]=\"gridMessageStream\"\n [selectedColumnIds]=\"selectedColumnIds | async\"\n [selectedRowIds]=\"multiselectSelectedIds\"\n [settingsKey]=\"settingsKey\"\n [sortField]=\"sortField | async\"\n [width]=\"gridWidth | async\"\n (multiselectSelectionChange)=\"onMultiselectSelectionChange($event)\"\n (rowDeleteCancel)=\"cancelRowDelete($event)\"\n (rowDeleteConfirm)=\"confirmRowDelete($event)\"\n (selectedColumnIdsChange)=\"columnIdsChanged($event)\"\n (sortFieldChange)=\"sortFieldChanged($event)\"\n #skyGrid\n >\n </sky-grid>\n <sky-wait [isWaiting]=\"loading | async\"> </sky-wait>\n</div>\n", styles: [":host ::ng-deep .sky-grid-heading{border-top:0!important}\n"], components: [{ type: i4__namespace$2.SkyGridComponent, selector: "sky-grid", inputs: ["columns", "data", "enableMultiselect", "fit", "hasToolbar", "height", "highlightText", "messageStream", "multiselectRowId", "rowHighlightedId", "selectedColumnIds", "selectedRowIds", "settingsKey", "sortField", "width"], outputs: ["columnWidthChange", "multiselectSelectionChange", "rowDeleteCancel", "rowDeleteConfirm", "selectedColumnIdsChange", "sortFieldChange"] }, { type: i1__namespace$1.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1182
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListViewGridComponent, decorators: [{
|
|
1183
|
-
type: i0.Component,
|
|
1184
|
-
args: [{
|
|
1185
|
-
selector: 'sky-list-view-grid',
|
|
1186
|
-
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",
|
|
1187
|
-
styles: [":host ::ng-deep .sky-grid-heading{border-top:0!important}\n"],
|
|
1188
|
-
providers: [
|
|
1189
|
-
/* tslint:disable */
|
|
1190
|
-
{
|
|
1191
|
-
provide: i1.ListViewComponent,
|
|
1192
|
-
useExisting: i0.forwardRef(function () { return SkyListViewGridComponent; }),
|
|
1193
|
-
},
|
|
1194
|
-
/* tslint:enable */
|
|
1195
|
-
GridState,
|
|
1196
|
-
GridStateDispatcher,
|
|
1197
|
-
GridStateModel,
|
|
1198
|
-
],
|
|
1199
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1200
|
-
}]
|
|
1201
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.ListState }, { type: i1__namespace.ListStateDispatcher }, { type: GridState }, { type: GridStateDispatcher }]; }, propDecorators: { name: [{
|
|
1202
|
-
type: i0.Input
|
|
1203
|
-
}], displayedColumns: [{
|
|
1204
|
-
type: i0.Input
|
|
1205
|
-
}], hiddenColumns: [{
|
|
1206
|
-
type: i0.Input
|
|
1207
|
-
}], fit: [{
|
|
1208
|
-
type: i0.Input
|
|
1209
|
-
}], width: [{
|
|
1210
|
-
type: i0.Input
|
|
1211
|
-
}], height: [{
|
|
1212
|
-
type: i0.Input
|
|
1213
|
-
}], highlightSearchText: [{
|
|
1214
|
-
type: i0.Input
|
|
1215
|
-
}], messageStream: [{
|
|
1216
|
-
type: i0.Input
|
|
1217
|
-
}], rowHighlightedId: [{
|
|
1218
|
-
type: i0.Input
|
|
1219
|
-
}], enableMultiselect: [{
|
|
1220
|
-
type: i0.Input
|
|
1221
|
-
}], settingsKey: [{
|
|
1222
|
-
type: i0.Input
|
|
1223
|
-
}], rowDeleteCancel: [{
|
|
1224
|
-
type: i0.Output
|
|
1225
|
-
}], rowDeleteConfirm: [{
|
|
1226
|
-
type: i0.Output
|
|
1227
|
-
}], selectedColumnIdsChange: [{
|
|
1228
|
-
type: i0.Output
|
|
1229
|
-
}], gridComponent: [{
|
|
1230
|
-
type: i0.ViewChild,
|
|
1231
|
-
args: [i4$2.SkyGridComponent]
|
|
1232
|
-
}], searchFunction: [{
|
|
1233
|
-
type: i0.Input,
|
|
1234
|
-
args: ['search']
|
|
1235
|
-
}], columnComponents: [{
|
|
1236
|
-
type: i0.ContentChildren,
|
|
1237
|
-
args: [i4$2.SkyGridColumnComponent]
|
|
1238
|
-
}] } });
|
|
1239
|
-
|
|
1240
|
-
/**
|
|
1241
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
1242
|
-
* The contents of this file were automatically generated by
|
|
1243
|
-
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-list-builder-view-grids' schematic.
|
|
1244
|
-
* To update this file, simply rerun the command.
|
|
1245
|
-
*/
|
|
1246
|
-
var RESOURCES = {
|
|
1247
|
-
'EN-US': {
|
|
1248
|
-
skyux_grid_column_picker_cancel: { message: 'Cancel' },
|
|
1249
|
-
skyux_grid_column_picker_header: {
|
|
1250
|
-
message: 'Choose columns to show in the list',
|
|
1251
|
-
},
|
|
1252
|
-
skyux_grid_column_picker_search_placeholder: {
|
|
1253
|
-
message: 'Search for columns',
|
|
1254
|
-
},
|
|
1255
|
-
skyux_grid_column_picker_submit: { message: 'Apply changes' },
|
|
1256
|
-
skyux_grid_columns_button: { message: 'Choose columns' },
|
|
1257
|
-
skyux_grid_columns_toolbar_button: { message: 'Columns' },
|
|
1258
|
-
},
|
|
1259
|
-
};
|
|
1260
|
-
var SkyListBuilderViewGridsResourcesProvider = /** @class */ (function () {
|
|
1261
|
-
function SkyListBuilderViewGridsResourcesProvider() {
|
|
1262
|
-
}
|
|
1263
|
-
SkyListBuilderViewGridsResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
1264
|
-
return i5.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
1265
|
-
};
|
|
1266
|
-
return SkyListBuilderViewGridsResourcesProvider;
|
|
1267
|
-
}());
|
|
1268
|
-
/**
|
|
1269
|
-
* Import into any component library module that needs to use resource strings.
|
|
1270
|
-
*/
|
|
1271
|
-
var SkyListBuilderViewGridsResourcesModule = /** @class */ (function () {
|
|
1272
|
-
function SkyListBuilderViewGridsResourcesModule() {
|
|
1273
|
-
}
|
|
1274
|
-
return SkyListBuilderViewGridsResourcesModule;
|
|
1275
|
-
}());
|
|
1276
|
-
SkyListBuilderViewGridsResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderViewGridsResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1277
|
-
SkyListBuilderViewGridsResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderViewGridsResourcesModule, exports: [i5.SkyI18nModule] });
|
|
1278
|
-
SkyListBuilderViewGridsResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderViewGridsResourcesModule, providers: [
|
|
1279
|
-
{
|
|
1280
|
-
provide: i5.SKY_LIB_RESOURCES_PROVIDERS,
|
|
1281
|
-
useClass: SkyListBuilderViewGridsResourcesProvider,
|
|
1282
|
-
multi: true,
|
|
1283
|
-
},
|
|
1284
|
-
], imports: [i5.SkyI18nModule] });
|
|
1285
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderViewGridsResourcesModule, decorators: [{
|
|
1286
|
-
type: i0.NgModule,
|
|
1287
|
-
args: [{
|
|
1288
|
-
exports: [i5.SkyI18nModule],
|
|
1289
|
-
providers: [
|
|
1290
|
-
{
|
|
1291
|
-
provide: i5.SKY_LIB_RESOURCES_PROVIDERS,
|
|
1292
|
-
useClass: SkyListBuilderViewGridsResourcesProvider,
|
|
1293
|
-
multi: true,
|
|
1294
|
-
},
|
|
1295
|
-
],
|
|
1296
|
-
}]
|
|
1297
|
-
}] });
|
|
1298
|
-
|
|
1299
|
-
var SkyListViewGridModule = /** @class */ (function () {
|
|
1300
|
-
function SkyListViewGridModule() {
|
|
1301
|
-
}
|
|
1302
|
-
return SkyListViewGridModule;
|
|
1303
|
-
}());
|
|
1304
|
-
SkyListViewGridModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListViewGridModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1305
|
-
SkyListViewGridModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListViewGridModule, declarations: [SkyListViewGridComponent], imports: [i4$1.CommonModule,
|
|
1306
|
-
i1$1.SkyWaitModule,
|
|
1307
|
-
i4$2.SkyGridModule,
|
|
1308
|
-
SkyListBuilderViewGridsResourcesModule], exports: [SkyListViewGridComponent,
|
|
1309
|
-
SkyListColumnSelectorActionModule,
|
|
1310
|
-
i4$2.SkyGridModule] });
|
|
1311
|
-
SkyListViewGridModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListViewGridModule, imports: [[
|
|
1312
|
-
i4$1.CommonModule,
|
|
1313
|
-
i1$1.SkyWaitModule,
|
|
1314
|
-
i4$2.SkyGridModule,
|
|
1315
|
-
SkyListBuilderViewGridsResourcesModule,
|
|
1316
|
-
], SkyListColumnSelectorActionModule,
|
|
1317
|
-
i4$2.SkyGridModule] });
|
|
1318
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListViewGridModule, decorators: [{
|
|
1319
|
-
type: i0.NgModule,
|
|
1320
|
-
args: [{
|
|
1321
|
-
declarations: [SkyListViewGridComponent],
|
|
1322
|
-
imports: [
|
|
1323
|
-
i4$1.CommonModule,
|
|
1324
|
-
i1$1.SkyWaitModule,
|
|
1325
|
-
i4$2.SkyGridModule,
|
|
1326
|
-
SkyListBuilderViewGridsResourcesModule,
|
|
1327
|
-
],
|
|
1328
|
-
exports: [
|
|
1329
|
-
SkyListViewGridComponent,
|
|
1330
|
-
SkyListColumnSelectorActionModule,
|
|
1331
|
-
i4$2.SkyGridModule,
|
|
1332
|
-
],
|
|
1333
|
-
}]
|
|
1334
|
-
}] });
|
|
1335
|
-
|
|
1336
|
-
/**
|
|
1337
|
-
* Generated bundle index. Do not edit.
|
|
1338
|
-
*/
|
|
1339
|
-
|
|
1340
|
-
exports.GridState = GridState;
|
|
1341
|
-
exports.GridStateDispatcher = GridStateDispatcher;
|
|
1342
|
-
exports.GridStateModel = GridStateModel;
|
|
1343
|
-
exports.GridStateOrchestrator = GridStateOrchestrator;
|
|
1344
|
-
exports.ListViewDisplayedGridColumnsLoadAction = ListViewDisplayedGridColumnsLoadAction;
|
|
1345
|
-
exports.ListViewDisplayedGridColumnsOrchestrator = ListViewDisplayedGridColumnsOrchestrator;
|
|
1346
|
-
exports.ListViewGridColumnsLoadAction = ListViewGridColumnsLoadAction;
|
|
1347
|
-
exports.ListViewGridColumnsOrchestrator = ListViewGridColumnsOrchestrator;
|
|
1348
|
-
exports.SkyColumnSelectorContext = SkyColumnSelectorContext;
|
|
1349
|
-
exports.SkyColumnSelectorModel = SkyColumnSelectorModel;
|
|
1350
|
-
exports.SkyColumnSelectorModule = SkyColumnSelectorModule;
|
|
1351
|
-
exports.SkyListColumnSelectorActionModule = SkyListColumnSelectorActionModule;
|
|
1352
|
-
exports.SkyListViewGridComponent = SkyListViewGridComponent;
|
|
1353
|
-
exports.SkyListViewGridModule = SkyListViewGridModule;
|
|
1354
|
-
exports["λ1"] = SkyListColumnSelectorActionComponent;
|
|
1355
|
-
|
|
1356
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1357
|
-
|
|
1358
|
-
}));
|
|
1359
|
-
//# sourceMappingURL=skyux-list-builder-view-grids.umd.js.map
|