@skyux/data-manager 5.5.0-beta.0 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/skyux-data-manager.umd.js +22 -22
- package/documentation.json +98 -98
- package/esm2015/lib/modules/data-manager/data-manager-column-picker/data-manager-column-picker-context.js.map +1 -1
- package/esm2015/lib/modules/data-manager/data-manager-column-picker/data-manager-column-picker.component.js +8 -8
- package/esm2015/lib/modules/data-manager/data-manager-column-picker/data-manager-column-picker.component.js.map +1 -1
- package/esm2015/lib/modules/data-manager/data-manager-toolbar/data-manager-toolbar.component.js +2 -2
- package/esm2015/lib/modules/data-manager/data-manager-toolbar/data-manager-toolbar.component.js.map +1 -1
- package/esm2015/lib/modules/data-manager/data-manager.component.js +1 -1
- package/esm2015/lib/modules/data-manager/data-manager.component.js.map +1 -1
- package/esm2015/lib/modules/data-manager/data-manager.module.js +5 -5
- package/esm2015/lib/modules/data-manager/data-manager.module.js.map +1 -1
- package/esm2015/lib/modules/data-manager/data-manager.service.js +6 -6
- package/esm2015/lib/modules/data-manager/data-manager.service.js.map +1 -1
- package/esm2015/lib/modules/data-manager/data-view.component.js +1 -1
- package/esm2015/lib/modules/data-manager/data-view.component.js.map +1 -1
- package/esm2015/lib/modules/data-manager/models/data-manager-init-args.js.map +1 -1
- package/esm2015/lib/modules/data-manager/models/data-manager-state-options.js.map +1 -1
- package/esm2015/lib/modules/data-manager/models/data-manager-state.js +2 -2
- package/esm2015/lib/modules/data-manager/models/data-manager-state.js.map +1 -1
- package/esm2015/lib/modules/data-manager/models/data-view-config.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-data-manager-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-data-manager-resources.module.js.map +1 -1
- package/fesm2015/skyux-data-manager.js +42 -42
- package/fesm2015/skyux-data-manager.js.map +1 -1
- package/lib/modules/data-manager/data-manager-column-picker/data-manager-column-picker.component.d.ts +2 -2
- package/lib/modules/data-manager/data-manager-toolbar/data-manager-toolbar.component.d.ts +1 -1
- package/lib/modules/data-manager/data-manager.component.d.ts +1 -1
- package/lib/modules/data-manager/data-manager.service.d.ts +1 -1
- package/lib/modules/data-manager/models/data-manager-state.d.ts +1 -1
- package/package.json +17 -15
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-view-config.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/data-manager/src/lib/modules/data-manager/models/data-view-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyDataManagerColumnPickerOption } from './data-manager-column-picker-option';\
|
1
|
+
{"version":3,"file":"data-view-config.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/data-manager/src/lib/modules/data-manager/models/data-view-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyDataManagerColumnPickerOption } from './data-manager-column-picker-option';\nimport { SkyDataManagerColumnPickerSortStrategy } from './data-manager-column-picker-sort-strategy';\n\n/**\n * The data view config contains settings that apply to the specific view, such as\n * column picker options and the buttons to display in the toolbar.\n */\nexport interface SkyDataViewConfig {\n /**\n * An untyped property that can track any view config information relevant to a\n * data view that the existing options do not include.\n */\n additionalOptions?: Object;\n /**\n * The column data to pass to the column picker. Columns that are always displayed should be\n * passed in addition to the optional columns. See SkyDataManagerColumnPickerOption.\n */\n columnOptions?: SkyDataManagerColumnPickerOption[];\n /**\n * Indicates whether to display the column picker button for this view.\n */\n columnPickerEnabled?: boolean;\n /**\n * The strategy used to sort the options in the column picker. If no strategy is provided the columns will be sorted\n * by selected then alphabetical.\n */\n columnPickerSortStrategy?: SkyDataManagerColumnPickerSortStrategy;\n /**\n * Inidicates whether to display the filter button for this view.\n */\n filterButtonEnabled?: boolean;\n /**\n * The Font Awesome icon name to use for this view in the view switcher.\n * Required if you have more than one view. Do not include the `fa-` prefix.\n */\n icon?: string;\n /**\n * The unique ID for this view.\n */\n id: string;\n /**\n * Indicates whether to display the multiselect toolbar for this view.\n */\n multiselectToolbarEnabled?: boolean;\n /**\n * The name of the view. This is used in the ARIA label for the view switcher.\n */\n name: string;\n /**\n * The function called when a user selects the \"Clear all\" button on the multi-select toolbar.\n * Update your displayed data to indicate it is not selected in this function.\n */\n onClearAllClick?: Function;\n /**\n * The function called when a user selects the \"Select all\" button on the multi-select toolbar.\n * Update your displayed data to indicate it is selected in this function.\n */\n onSelectAllClick?: Function;\n /**\n * Indicates whether to display the search box for this view.\n */\n searchEnabled?: boolean;\n /**\n * Specifies placeholder text to display in the search input until users enter search criteria.\n * See the <a href=\"https://developer.blackbaud.com/skyux/components/search\">search component</a> for the default value.\n */\n searchPlaceholderText?: string;\n /**\n * Sets the `expandMode` property on the search box for this view.\n * See the <a href=\"https://developer.blackbaud.com/skyux/components/search\">search component</a> for valid options and the default value.\n */\n searchExpandMode?: string;\n /**\n * Indicates whether to include the \"Filter\" text on the displayed filter button for this view.\n * If it is not set, no text appears.\n */\n showFilterButtonText?: boolean;\n /**\n * Indicates whether to include the \"Sort\" text on the displayed sort button for this view.\n * If it is not set, no text appears.\n */\n showSortButtonText?: boolean;\n /**\n * Indicates whether to display the sort button in this view.\n */\n sortEnabled?: boolean;\n}\n"]}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* To update this file, simply rerun the command.
|
6
6
|
*/
|
7
7
|
import { NgModule } from '@angular/core';
|
8
|
-
import {
|
8
|
+
import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
const RESOURCES = {
|
11
11
|
'EN-US': {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sky-data-manager-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/data-manager/src/lib/modules/shared/sky-data-manager-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
1
|
+
{"version":3,"file":"sky-data-manager-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/data-manager/src/lib/modules/shared/sky-data-manager-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,sCAAsC,EAAE;YACtC,OAAO,EAAE,oCAAoC;SAC9C;QACD,6CAA6C,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;QAC3E,sCAAsC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC7D,0CAA0C,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;QACrE,yCAAyC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;QACnE,6CAA6C,EAAE;YAC7C,OAAO,EAAE,0BAA0B;SACpC;QACD,uCAAuC,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KAChE;CACF,CAAC;AAEF,MAAM,OAAO,+BAA+B;IAGnC,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,6BAA6B;;2HAA7B,6BAA6B;4HAA7B,6BAA6B,YAT9B,aAAa;4HASZ,6BAA6B,aAR7B;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,+BAA+B;YACzC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,6BAA6B;kBAVzC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,+BAA+B;4BACzC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-data-manager' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_data_manager_column_picker_title: {\n message: 'Choose columns to show in the list',\n },\n skyux_data_manager_apply_changes_button_title: { message: 'Apply changes' },\n skyux_data_manager_cancel_button_title: { message: 'Cancel' },\n skyux_data_manager_select_all_button_title: { message: 'Select all' },\n skyux_data_manager_clear_all_button_title: { message: 'Clear all' },\n skyux_data_manager_show_selected_option_title: {\n message: 'Show only selected items',\n },\n skyux_data_manager_columns_button_title: { message: 'Columns' },\n },\n};\n\nexport class SkyDataManagerResourcesProvider\n implements SkyLibResourcesProvider\n{\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyDataManagerResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyDataManagerResourcesModule {}\n"]}
|
@@ -1,15 +1,15 @@
|
|
1
|
+
import * as i9 from '@angular/common';
|
2
|
+
import { CommonModule } from '@angular/common';
|
1
3
|
import * as i0 from '@angular/core';
|
2
4
|
import { NgModule, Injectable, Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
3
5
|
import * as i10 from '@angular/forms';
|
4
6
|
import { FormsModule } from '@angular/forms';
|
5
|
-
import * as i9 from '@angular/common';
|
6
|
-
import { CommonModule } from '@angular/common';
|
7
7
|
import * as i1 from '@skyux/core';
|
8
8
|
import { SkyViewkeeperModule } from '@skyux/core';
|
9
|
-
import * as i6 from '@skyux/indicators';
|
10
|
-
import { SkyIconModule } from '@skyux/indicators';
|
11
9
|
import * as i8$1 from '@skyux/forms';
|
12
10
|
import { SkyCheckboxModule, SkyRadioModule } from '@skyux/forms';
|
11
|
+
import * as i6 from '@skyux/indicators';
|
12
|
+
import { SkyIconModule } from '@skyux/indicators';
|
13
13
|
import * as i4 from '@skyux/layout';
|
14
14
|
import { SkyBackToTopMessageType, SkyBackToTopModule, SkyToolbarModule } from '@skyux/layout';
|
15
15
|
import * as i8 from '@skyux/lists';
|
@@ -77,20 +77,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
77
77
|
}]
|
78
78
|
}] });
|
79
79
|
|
80
|
-
var SkyDataManagerColumnPickerSortStrategy;
|
81
|
-
(function (SkyDataManagerColumnPickerSortStrategy) {
|
82
|
-
SkyDataManagerColumnPickerSortStrategy["None"] = "none";
|
83
|
-
SkyDataManagerColumnPickerSortStrategy["SelectedThenAlphabetical"] = "selectedThenAlphabetical";
|
84
|
-
})(SkyDataManagerColumnPickerSortStrategy || (SkyDataManagerColumnPickerSortStrategy = {}));
|
85
|
-
|
86
|
-
class SkyDataManagerColumnPickerContext {
|
87
|
-
constructor(columnOptions, displayedColumnIds, columnPickerSortStrategy = SkyDataManagerColumnPickerSortStrategy.SelectedThenAlphabetical) {
|
88
|
-
this.columnOptions = columnOptions;
|
89
|
-
this.displayedColumnIds = displayedColumnIds;
|
90
|
-
this.columnPickerSortStrategy = columnPickerSortStrategy;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
80
|
class SkyDataViewState {
|
95
81
|
constructor(data) {
|
96
82
|
this.columnIds = [];
|
@@ -113,7 +99,7 @@ class SkyDataViewState {
|
|
113
99
|
class SkyDataManagerState {
|
114
100
|
constructor(data) {
|
115
101
|
this.views = [];
|
116
|
-
|
102
|
+
const views = data.views && data.views.map((view) => new SkyDataViewState(view));
|
117
103
|
this.activeSortOption = data.activeSortOption;
|
118
104
|
this.additionalData = data.additionalData;
|
119
105
|
this.filterData = data.filterData;
|
@@ -123,7 +109,7 @@ class SkyDataManagerState {
|
|
123
109
|
this.views = views || [];
|
124
110
|
}
|
125
111
|
getStateOptions() {
|
126
|
-
|
112
|
+
const viewStates = this.views.map((view) => {
|
127
113
|
return view.getViewStateOptions();
|
128
114
|
});
|
129
115
|
return {
|
@@ -242,7 +228,7 @@ class SkyDataManagerService {
|
|
242
228
|
* @param viewConfig The SkyDataViewConfig settings for the view being registered.
|
243
229
|
*/
|
244
230
|
initDataView(viewConfig) {
|
245
|
-
|
231
|
+
const currentViews = this.views.value;
|
246
232
|
if (this.getViewById(viewConfig.id)) {
|
247
233
|
console.warn(`A data manager view with the id ${viewConfig.id} has already been initialized.`);
|
248
234
|
return;
|
@@ -261,7 +247,7 @@ class SkyDataManagerService {
|
|
261
247
|
const dataState = change.dataState;
|
262
248
|
const currentViewState = dataState.getViewStateById(viewConfig.id);
|
263
249
|
if (!currentViewState) {
|
264
|
-
|
250
|
+
const newViewState = new SkyDataViewState({ viewId: viewConfig.id });
|
265
251
|
// Ensure that the view state's available columns match with the view config. Also,
|
266
252
|
// add columns to the `displayedColumnIds` as long as they are not `initialHide`
|
267
253
|
if (viewConfig.columnOptions) {
|
@@ -392,7 +378,7 @@ class SkyDataManagerService {
|
|
392
378
|
* @param view The new `SkyDataViewConfig` containing all properties.
|
393
379
|
*/
|
394
380
|
updateViewConfig(view) {
|
395
|
-
|
381
|
+
const currentViews = this.views.value;
|
396
382
|
const existingViewIndex = currentViews.findIndex((currentView) => currentView.id === view.id);
|
397
383
|
if (existingViewIndex === -1) {
|
398
384
|
console.error('A view with the id {id} does not exist.', view.id);
|
@@ -412,10 +398,10 @@ class SkyDataManagerService {
|
|
412
398
|
}
|
413
399
|
filterDataStateProperties(state, properties) {
|
414
400
|
const stateProperties = state.getStateOptions();
|
415
|
-
|
416
|
-
for (
|
401
|
+
const filteredStateProperties = {};
|
402
|
+
for (const property of properties) {
|
417
403
|
/* istanbul ignore else */
|
418
|
-
if (
|
404
|
+
if (Object.prototype.hasOwnProperty.call(stateProperties, property)) {
|
419
405
|
filteredStateProperties[property] = stateProperties[property];
|
420
406
|
}
|
421
407
|
}
|
@@ -435,6 +421,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
435
421
|
type: Injectable
|
436
422
|
}], ctorParameters: function () { return [{ type: i1.SkyUIConfigService }]; } });
|
437
423
|
|
424
|
+
var SkyDataManagerColumnPickerSortStrategy;
|
425
|
+
(function (SkyDataManagerColumnPickerSortStrategy) {
|
426
|
+
SkyDataManagerColumnPickerSortStrategy["None"] = "none";
|
427
|
+
SkyDataManagerColumnPickerSortStrategy["SelectedThenAlphabetical"] = "selectedThenAlphabetical";
|
428
|
+
})(SkyDataManagerColumnPickerSortStrategy || (SkyDataManagerColumnPickerSortStrategy = {}));
|
429
|
+
|
430
|
+
class SkyDataManagerColumnPickerContext {
|
431
|
+
constructor(columnOptions, displayedColumnIds, columnPickerSortStrategy = SkyDataManagerColumnPickerSortStrategy.SelectedThenAlphabetical) {
|
432
|
+
this.columnOptions = columnOptions;
|
433
|
+
this.displayedColumnIds = displayedColumnIds;
|
434
|
+
this.columnPickerSortStrategy = columnPickerSortStrategy;
|
435
|
+
}
|
436
|
+
}
|
437
|
+
|
438
438
|
/**
|
439
439
|
* The top-level data manager component. Provide `SkyDataManagerService` at this level.
|
440
440
|
*/
|
@@ -795,12 +795,12 @@ class SkyDataManagerColumnPickerComponent {
|
|
795
795
|
searchColumns(columns) {
|
796
796
|
var _a;
|
797
797
|
let searchedColumns = columns;
|
798
|
-
|
798
|
+
const searchText = this.dataState && ((_a = this.dataState.searchText) === null || _a === void 0 ? void 0 : _a.toUpperCase());
|
799
799
|
if (searchText) {
|
800
800
|
searchedColumns = columns.filter(function (item) {
|
801
801
|
let property;
|
802
802
|
for (property in item) {
|
803
|
-
if (
|
803
|
+
if (Object.prototype.hasOwnProperty.call(item, property) &&
|
804
804
|
(property === 'label' || property === 'description')) {
|
805
805
|
const propertyText = item[property] && item[property].toUpperCase();
|
806
806
|
if (propertyText && propertyText.indexOf(searchText) > -1) {
|
@@ -832,11 +832,11 @@ class SkyDataManagerColumnPickerComponent {
|
|
832
832
|
const allColumnOptions = this.context.columnOptions;
|
833
833
|
const visibleColumnIds = this.context.displayedColumnIds;
|
834
834
|
let formattedColumnOptions = [];
|
835
|
-
|
836
|
-
for (
|
835
|
+
const unselectedColumnOptions = [];
|
836
|
+
for (const columnOption of allColumnOptions) {
|
837
837
|
// format the column with the properties the column picker needs
|
838
838
|
const colIndex = visibleColumnIds.indexOf(columnOption.id);
|
839
|
-
|
839
|
+
const formattedColumn = {
|
840
840
|
alwaysDisplayed: columnOption.alwaysDisplayed,
|
841
841
|
id: columnOption.id,
|
842
842
|
label: columnOption.label,
|
@@ -881,6 +881,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
881
881
|
}]
|
882
882
|
}], ctorParameters: function () { return [{ type: SkyDataManagerColumnPickerContext }, { type: SkyDataManagerService }, { type: i3.SkyModalInstance }, { type: i4$1.SkyLibResourcesService }]; } });
|
883
883
|
|
884
|
+
class SkyDataManagerColumnPickerImplService {
|
885
|
+
getComponentType() {
|
886
|
+
return SkyDataManagerColumnPickerComponent;
|
887
|
+
}
|
888
|
+
}
|
889
|
+
SkyDataManagerColumnPickerImplService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerColumnPickerImplService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
890
|
+
SkyDataManagerColumnPickerImplService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerColumnPickerImplService });
|
891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerColumnPickerImplService, decorators: [{
|
892
|
+
type: Injectable
|
893
|
+
}] });
|
894
|
+
|
884
895
|
/**
|
885
896
|
* A wrapper for an item to be rendered in `SkyDataManagerToolbarComponent`. The contents are
|
886
897
|
* rendered after the standard toolbar actions and before the search box. Each item should be
|
@@ -950,17 +961,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
950
961
|
}]
|
951
962
|
}] });
|
952
963
|
|
953
|
-
class SkyDataManagerColumnPickerImplService {
|
954
|
-
getComponentType() {
|
955
|
-
return SkyDataManagerColumnPickerComponent;
|
956
|
-
}
|
957
|
-
}
|
958
|
-
SkyDataManagerColumnPickerImplService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerColumnPickerImplService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
959
|
-
SkyDataManagerColumnPickerImplService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerColumnPickerImplService });
|
960
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerColumnPickerImplService, decorators: [{
|
961
|
-
type: Injectable
|
962
|
-
}] });
|
963
|
-
|
964
964
|
class SkyDataManagerModule {
|
965
965
|
}
|
966
966
|
SkyDataManagerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDataManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|