@adaptabletools/adaptable 18.0.0-canary.15 → 18.0.0-canary.17
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/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +5 -1
- package/src/AdaptableOptions/MenuOptions.js +71 -70
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +0 -3
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +10 -1
- package/src/PredefinedConfig/Common/Menu.js +71 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +16 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +12 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -5
- package/src/Strategy/AdaptableModuleBase.js +9 -8
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +7 -6
- package/src/Strategy/CellSummaryModule.js +37 -12
- package/src/Strategy/ColumnFilterModule.js +8 -7
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/CommentModule.js +2 -2
- package/src/Strategy/CustomSortModule.js +2 -1
- package/src/Strategy/DashboardModule.js +8 -7
- package/src/Strategy/DataImportModule.d.ts +1 -1
- package/src/Strategy/DataImportModule.js +5 -5
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -4
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/LayoutModule.js +32 -23
- package/src/Strategy/NoteModule.js +2 -2
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -0
- package/src/Strategy/StyledColumnModule.js +23 -5
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +124 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +42 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +26 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +26 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +14 -14
- package/src/agGrid/AgGridMenuAdapter.js +7 -5
- package/src/agGrid/defaultAdaptableOptions.js +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +6 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -12
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.0.0-canary.
|
|
3
|
+
"version": "18.0.0-canary.17",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -31,7 +31,6 @@ import { AgGridAdapter } from '../agGrid/AgGridAdapter';
|
|
|
31
31
|
import { AgGridColumnAdapter } from '../agGrid/AgGridColumnAdapter';
|
|
32
32
|
import { AgGridMenuAdapter } from '../agGrid/AgGridMenuAdapter';
|
|
33
33
|
import { RowEditService } from '../Utilities/Services/RowEditService';
|
|
34
|
-
import { ISummaryService } from '../Utilities/Services/Interface/ISummaryService';
|
|
35
34
|
/**
|
|
36
35
|
* Contains AG Grid Options and Modules - used when instantiating AdapTable vanilla
|
|
37
36
|
*/
|
|
@@ -91,7 +90,6 @@ export interface IAdaptable {
|
|
|
91
90
|
RowEditService: RowEditService;
|
|
92
91
|
Fdc3Service: Fdc3Service;
|
|
93
92
|
CellPopupService: CellPopupService;
|
|
94
|
-
SummaryService: ISummaryService;
|
|
95
93
|
/**
|
|
96
94
|
* INTERNAL ADAPTABLE EVENTS
|
|
97
95
|
* These are not called externally - for that we use eventapi
|
|
@@ -102,6 +102,13 @@ export interface ColumnFilterOptions<TData = any> {
|
|
|
102
102
|
* @noCodeItem
|
|
103
103
|
*/
|
|
104
104
|
showSuspendFilterButton?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Show Date Picker (or Date Input) in Filter controls
|
|
107
|
+
* @gridInfoItem
|
|
108
|
+
* @noCodeItem
|
|
109
|
+
* @defaultValue true
|
|
110
|
+
*/
|
|
111
|
+
showDatePicker?: boolean;
|
|
105
112
|
}
|
|
106
113
|
/**
|
|
107
114
|
* Options for managing the Filter Bar (aka Quick Filter)
|
|
@@ -177,6 +177,10 @@ type ModuleGroup = {
|
|
|
177
177
|
icon?: AdaptableIcon;
|
|
178
178
|
title: string;
|
|
179
179
|
};
|
|
180
|
-
export declare const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
181
180
|
export declare const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
181
|
+
/**
|
|
182
|
+
* Defines the order of Menu Items in the CONTEXT Menu
|
|
183
|
+
* The items commented out do not have a Context Menu Option
|
|
184
|
+
*/
|
|
185
|
+
export declare const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
182
186
|
export {};
|
|
@@ -1,95 +1,96 @@
|
|
|
1
1
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
2
|
-
export const
|
|
3
|
-
ModuleConstants.
|
|
2
|
+
export const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
3
|
+
ModuleConstants.CalculatedColumnModuleId,
|
|
4
|
+
ModuleConstants.CellSummaryModuleId,
|
|
5
|
+
ModuleConstants.ColumnFilterModuleId,
|
|
6
|
+
ModuleConstants.ColumnInfoModuleId,
|
|
7
|
+
ModuleConstants.CustomSortModuleId,
|
|
4
8
|
ModuleConstants.DashboardModuleId,
|
|
5
|
-
ModuleConstants.
|
|
6
|
-
ModuleConstants.StatusBarModuleId,
|
|
7
|
-
ModuleConstants.LayoutModuleId,
|
|
8
|
-
ModuleConstants.FormatColumnModuleId,
|
|
9
|
-
ModuleConstants.StyledColumnModuleId,
|
|
9
|
+
ModuleConstants.DataImportModuleId,
|
|
10
10
|
ModuleConstants.FlashingCellModuleId,
|
|
11
|
-
ModuleConstants.
|
|
12
|
-
ModuleConstants.
|
|
13
|
-
ModuleConstants.Fdc3ModuleId,
|
|
11
|
+
ModuleConstants.FormatColumnModuleId,
|
|
12
|
+
ModuleConstants.FreeTextColumnModuleId,
|
|
14
13
|
ModuleConstants.GridInfoModuleId,
|
|
15
|
-
ModuleConstants.
|
|
14
|
+
ModuleConstants.LayoutModuleId,
|
|
15
|
+
ModuleConstants.PlusMinusModuleId,
|
|
16
|
+
ModuleConstants.SettingsPanelModuleId,
|
|
17
|
+
ModuleConstants.StyledColumnModuleId,
|
|
18
|
+
ModuleConstants.SystemStatusModuleId, // Single Item - Always present
|
|
19
|
+
/*
|
|
20
|
+
// Modules that dont provide a Column Menu
|
|
16
21
|
ModuleConstants.AlertModuleId,
|
|
17
|
-
ModuleConstants.
|
|
18
|
-
ModuleConstants.
|
|
19
|
-
ModuleConstants.
|
|
20
|
-
{
|
|
21
|
-
title: 'Edit',
|
|
22
|
-
icon: {
|
|
23
|
-
name: 'edit',
|
|
24
|
-
},
|
|
25
|
-
modules: [ModuleConstants.SmartEditModuleId, ModuleConstants.BulkUpdateModuleId],
|
|
26
|
-
},
|
|
27
|
-
ModuleConstants.TeamSharingModuleId,
|
|
22
|
+
ModuleConstants.BulkUpdateModuleId,
|
|
23
|
+
ModuleConstants.ChartingModuleId,
|
|
24
|
+
ModuleConstants.CommentModuleId,
|
|
28
25
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
29
26
|
ModuleConstants.DataSetModuleId,
|
|
30
|
-
ModuleConstants.
|
|
27
|
+
ModuleConstants.ExportModuleId,
|
|
28
|
+
ModuleConstants.Fdc3ModuleId,
|
|
29
|
+
ModuleConstants.GridFilterModuleId,
|
|
31
30
|
ModuleConstants.NamedQueryModuleId,
|
|
31
|
+
ModuleConstants.NoteModuleId,
|
|
32
32
|
ModuleConstants.QuickSearchModuleId,
|
|
33
|
-
ModuleConstants.DataSetModuleId,
|
|
34
|
-
ModuleConstants.AlertModuleId,
|
|
35
|
-
ModuleConstants.SystemStatusModuleId,
|
|
36
|
-
ModuleConstants.CalculatedColumnModuleId,
|
|
37
|
-
ModuleConstants.FreeTextColumnModuleId,
|
|
38
|
-
ModuleConstants.ExportModuleId,
|
|
39
|
-
ModuleConstants.DataImportModuleId,
|
|
40
|
-
ModuleConstants.DataChangeHistoryModuleId,
|
|
41
|
-
ModuleConstants.PlusMinusModuleId,
|
|
42
|
-
ModuleConstants.ShortcutModuleId,
|
|
43
|
-
ModuleConstants.TeamSharingModuleId,
|
|
44
33
|
ModuleConstants.ScheduleModuleId,
|
|
34
|
+
ModuleConstants.ShortcutModuleId,
|
|
35
|
+
ModuleConstants.SmartEditModuleId,
|
|
45
36
|
ModuleConstants.StateManagementModuleId,
|
|
37
|
+
ModuleConstants.StatusBarModuleId,
|
|
38
|
+
ModuleConstants.TeamSharingModuleId,
|
|
46
39
|
ModuleConstants.ThemeModuleId,
|
|
47
|
-
ModuleConstants.ChartingModuleId,
|
|
48
|
-
ModuleConstants.NoteModuleId,
|
|
49
|
-
ModuleConstants.CommentModuleId,
|
|
50
|
-
];
|
|
51
|
-
export const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
52
|
-
ModuleConstants.SettingsPanelModuleId,
|
|
53
|
-
ModuleConstants.DashboardModuleId,
|
|
54
40
|
ModuleConstants.ToolPanelModuleId,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
ModuleConstants.Fdc3ModuleId,
|
|
63
|
-
ModuleConstants.GridInfoModuleId,
|
|
64
|
-
ModuleConstants.ColumnInfoModuleId,
|
|
41
|
+
*/
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Defines the order of Menu Items in the CONTEXT Menu
|
|
45
|
+
* The items commented out do not have a Context Menu Option
|
|
46
|
+
*/
|
|
47
|
+
export const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
65
48
|
ModuleConstants.AlertModuleId,
|
|
49
|
+
ModuleConstants.BulkUpdateModuleId,
|
|
66
50
|
ModuleConstants.CalculatedColumnModuleId,
|
|
67
|
-
ModuleConstants.
|
|
51
|
+
ModuleConstants.CellSummaryModuleId,
|
|
68
52
|
ModuleConstants.ColumnFilterModuleId,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ModuleConstants.
|
|
53
|
+
ModuleConstants.ColumnInfoModuleId,
|
|
54
|
+
ModuleConstants.CommentModuleId,
|
|
55
|
+
ModuleConstants.DashboardModuleId,
|
|
56
|
+
ModuleConstants.DataImportModuleId,
|
|
57
|
+
ModuleConstants.ExportModuleId,
|
|
58
|
+
ModuleConstants.Fdc3ModuleId,
|
|
59
|
+
ModuleConstants.FlashingCellModuleId,
|
|
60
|
+
ModuleConstants.GridInfoModuleId,
|
|
61
|
+
ModuleConstants.LayoutModuleId,
|
|
62
|
+
ModuleConstants.NoteModuleId,
|
|
63
|
+
ModuleConstants.SettingsPanelModuleId,
|
|
64
|
+
ModuleConstants.SmartEditModuleId,
|
|
65
|
+
ModuleConstants.SystemStatusModuleId, // Single Item - Always present
|
|
66
|
+
// this currently doesnt work
|
|
67
|
+
// {
|
|
68
|
+
// title: 'Edit',
|
|
69
|
+
// icon: {
|
|
70
|
+
// name: 'edit',
|
|
71
|
+
// },
|
|
72
|
+
// modules: [ModuleConstants.SmartEditModuleId, ModuleConstants.BulkUpdateModuleId],
|
|
73
|
+
// },
|
|
74
|
+
/*
|
|
75
|
+
// Modules that dont provide a Context Menu
|
|
76
|
+
ModuleConstants.ChartingModuleId,
|
|
77
|
+
ModuleConstants.CustomSortModuleId,
|
|
74
78
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
75
79
|
ModuleConstants.DataSetModuleId,
|
|
80
|
+
ModuleConstants.FormatColumnModuleId,
|
|
76
81
|
ModuleConstants.FreeTextColumnModuleId,
|
|
82
|
+
ModuleConstants.GridFilterModuleId,
|
|
77
83
|
ModuleConstants.NamedQueryModuleId,
|
|
78
|
-
ModuleConstants.QuickSearchModuleId,
|
|
79
|
-
ModuleConstants.DataSetModuleId,
|
|
80
|
-
ModuleConstants.AlertModuleId,
|
|
81
|
-
ModuleConstants.SystemStatusModuleId,
|
|
82
|
-
ModuleConstants.CalculatedColumnModuleId,
|
|
83
|
-
ModuleConstants.FreeTextColumnModuleId,
|
|
84
|
-
ModuleConstants.ExportModuleId,
|
|
85
|
-
ModuleConstants.DataImportModuleId,
|
|
86
|
-
ModuleConstants.DataChangeHistoryModuleId,
|
|
87
84
|
ModuleConstants.PlusMinusModuleId,
|
|
88
|
-
ModuleConstants.
|
|
89
|
-
ModuleConstants.TeamSharingModuleId,
|
|
85
|
+
ModuleConstants.QuickSearchModuleId,
|
|
90
86
|
ModuleConstants.ScheduleModuleId,
|
|
87
|
+
ModuleConstants.ShortcutModuleId,
|
|
91
88
|
ModuleConstants.StateManagementModuleId,
|
|
89
|
+
ModuleConstants.StatusBarModuleId,
|
|
90
|
+
ModuleConstants.StyledColumnModuleId,
|
|
91
|
+
ModuleConstants.TeamSharingModuleId,
|
|
92
92
|
ModuleConstants.ThemeModuleId,
|
|
93
|
-
ModuleConstants.
|
|
94
|
-
|
|
93
|
+
ModuleConstants.ToolPanelModuleId,
|
|
94
|
+
|
|
95
|
+
*/
|
|
95
96
|
];
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -9,9 +9,4 @@ export declare class CellSummaryApiImpl extends ApiBase implements CellSummaryAp
|
|
|
9
9
|
setCurrentCellSummaryOperation(operation: SummaryOperation | string): void;
|
|
10
10
|
getCellSummaryOperationValue(operation: SummaryOperation | string): any;
|
|
11
11
|
getCurrentCellSummaryOperationValue(): any;
|
|
12
|
-
/**
|
|
13
|
-
* Weighted average is availabe only if the current layout has at leat a Weighted Average aggregation defined.
|
|
14
|
-
*/
|
|
15
|
-
private isWeightedAverageCellSummaryAvailable;
|
|
16
|
-
private getWeightedAverageCellSummaryOperation;
|
|
17
12
|
}
|
|
@@ -2,7 +2,6 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
3
3
|
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
4
4
|
import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
|
|
5
|
-
import { cellSummaryWeightedAverage } from '../../agGrid/weightedAverage';
|
|
6
5
|
export class CellSummaryApiImpl extends ApiBase {
|
|
7
6
|
openCellSummaryPopupSettingsPanel() {
|
|
8
7
|
this.showModulePopup(ModuleConstants.CellSummaryModuleId);
|
|
@@ -13,12 +12,6 @@ export class CellSummaryApiImpl extends ApiBase {
|
|
|
13
12
|
getCellSummaryOperationDefinitions() {
|
|
14
13
|
var _a;
|
|
15
14
|
let cellSummaryOperations = (_a = this.getCellSummaryOptions().cellSummaryOperations) !== null && _a !== void 0 ? _a : [];
|
|
16
|
-
if (this.isWeightedAverageCellSummaryAvailable()) {
|
|
17
|
-
cellSummaryOperations = [
|
|
18
|
-
...cellSummaryOperations,
|
|
19
|
-
this.getWeightedAverageCellSummaryOperation(),
|
|
20
|
-
];
|
|
21
|
-
}
|
|
22
15
|
return cellSummaryOperations;
|
|
23
16
|
}
|
|
24
17
|
setCurrentCellSummaryOperation(operation) {
|
|
@@ -50,6 +43,8 @@ export class CellSummaryApiImpl extends ApiBase {
|
|
|
50
43
|
return cellSummary.Std_Deviation;
|
|
51
44
|
case SummaryOperation.Only:
|
|
52
45
|
return cellSummary.Only;
|
|
46
|
+
case SummaryOperation.Weighted_Average:
|
|
47
|
+
return cellSummary.Weighted_Average;
|
|
53
48
|
default:
|
|
54
49
|
return cellSummary[operation];
|
|
55
50
|
}
|
|
@@ -61,20 +56,4 @@ export class CellSummaryApiImpl extends ApiBase {
|
|
|
61
56
|
: cellSummaryOperation.operationName;
|
|
62
57
|
return this.getCellSummaryOperationValue(summaryOperation);
|
|
63
58
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Weighted average is availabe only if the current layout has at leat a Weighted Average aggregation defined.
|
|
66
|
-
*/
|
|
67
|
-
isWeightedAverageCellSummaryAvailable() {
|
|
68
|
-
const currentLayout = this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
69
|
-
if (currentLayout.AggregationColumns == undefined) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
return Object.values(currentLayout.AggregationColumns).some((aggCol) => typeof aggCol === 'object' && aggCol.type === 'weightedAverage');
|
|
73
|
-
}
|
|
74
|
-
getWeightedAverageCellSummaryOperation() {
|
|
75
|
-
return {
|
|
76
|
-
operationName: 'Weighted Avg',
|
|
77
|
-
operationFunction: cellSummaryWeightedAverage,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
59
|
}
|
|
@@ -132,5 +132,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
132
132
|
openGridInfoSettingsPanel(): void;
|
|
133
133
|
getAgGridRowModelType(): RowModelType;
|
|
134
134
|
getVisibleRowCount(): number;
|
|
135
|
-
showTransposedView(transposeConfig
|
|
135
|
+
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
136
136
|
}
|
|
@@ -525,7 +525,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
525
525
|
logDeprecation(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
|
|
526
526
|
return this.getRowCount();
|
|
527
527
|
}
|
|
528
|
-
showTransposedView(transposeConfig) {
|
|
528
|
+
showTransposedView(transposeConfig = {}) {
|
|
529
529
|
var _a, _b, _c, _d;
|
|
530
530
|
const transposedColumnId = (_a = transposeConfig.transposedColumnId) !== null && _a !== void 0 ? _a : this.getAdaptableApi().optionsApi.getPrimaryKey();
|
|
531
531
|
const hideTransposedColumn = (_b = transposeConfig.hideTransposedColumn) !== null && _b !== void 0 ? _b : true;
|
|
@@ -27,7 +27,6 @@ import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedCo
|
|
|
27
27
|
import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
|
|
28
28
|
import { CellPopupService } from '../../Utilities/Services/CellPopupService';
|
|
29
29
|
import { RowEditService } from '../../Utilities/Services/RowEditService';
|
|
30
|
-
import { ISummaryService } from '../../Utilities/Services/Interface/ISummaryService';
|
|
31
30
|
export declare class AdaptableInternalApi extends ApiBase {
|
|
32
31
|
getSystemState(): SystemState;
|
|
33
32
|
showPopupConfirmation(confirmation: UIConfirmation): void;
|
|
@@ -61,7 +60,6 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
61
60
|
getReportService(): IReportService;
|
|
62
61
|
getCalculatedColumnExpressionService(): ICalculatedColumnExpressionService;
|
|
63
62
|
getEntitlementService(): IEntitlementService;
|
|
64
|
-
getSummaryService(): ISummaryService;
|
|
65
63
|
getQueryLanguageService(): IQueryLanguageService;
|
|
66
64
|
getAlertService(): IAlertService;
|
|
67
65
|
getTeamSharingService(): ITeamSharingService;
|
|
@@ -102,9 +102,6 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
102
102
|
getEntitlementService() {
|
|
103
103
|
return this.adaptable.EntitlementService;
|
|
104
104
|
}
|
|
105
|
-
getSummaryService() {
|
|
106
|
-
return this.adaptable.SummaryService;
|
|
107
|
-
}
|
|
108
105
|
getQueryLanguageService() {
|
|
109
106
|
return this.adaptable.QueryLanguageService;
|
|
110
107
|
}
|
|
@@ -60,7 +60,8 @@ export declare enum SummaryOperation {
|
|
|
60
60
|
Min = "Min",
|
|
61
61
|
Count = "Count",
|
|
62
62
|
Std_Deviation = "Std Deviation",
|
|
63
|
-
Only = "Only"
|
|
63
|
+
Only = "Only",
|
|
64
|
+
Weighted_Average = "Weighted Avg"
|
|
64
65
|
}
|
|
65
66
|
export declare enum FilterOnDataChangeOptions {
|
|
66
67
|
Always = "Always",
|
|
@@ -75,6 +75,7 @@ export var SummaryOperation;
|
|
|
75
75
|
SummaryOperation["Count"] = "Count";
|
|
76
76
|
SummaryOperation["Std_Deviation"] = "Std Deviation";
|
|
77
77
|
SummaryOperation["Only"] = "Only";
|
|
78
|
+
SummaryOperation["Weighted_Average"] = "Weighted Avg";
|
|
78
79
|
})(SummaryOperation || (SummaryOperation = {}));
|
|
79
80
|
export var FilterOnDataChangeOptions;
|
|
80
81
|
(function (FilterOnDataChangeOptions) {
|
|
@@ -5,12 +5,21 @@ import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
|
|
|
5
5
|
import { SelectedRowInfo } from '../Selection/SelectedRowInfo';
|
|
6
6
|
import { Column, IRowNode } from '@ag-grid-community/core';
|
|
7
7
|
import { AdaptableIcon, BaseContext } from '../../types';
|
|
8
|
+
/**
|
|
9
|
+
* List of Shipped Adaptable Menu Items
|
|
10
|
+
*/
|
|
11
|
+
export declare const ADAPTABLE_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-info", "comment-add", "comment-remove", "custom-sort-add", "custom-sort-edit", "dashboard", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3", "fdc3-broadcast", "fdc3-raise-intent", "filter", "filter-bar-visbility", "filter-clear", "filter-suspend", "filter-cell-value", "flashing-cell-add", "flashing-cell-clear", "flashing-cell-delete", "flashing-row-clear", "format-column", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid", "layout-select", "layout-select-all", "note-add", "note-remove", "plus-minus-add", "smart-edit-apply", "settings-panel-open", "styled-column-badge", "styled-column", "styled-column-gradient", "styled-column-percent-bar", "styled-column-sparkline", "system-status-show", "internal"];
|
|
12
|
+
export type AdaptableMenuItemName = typeof ADAPTABLE_MENU_ITEMS[number];
|
|
8
13
|
/**
|
|
9
14
|
* Menu item used by Adaptable in both Column and Context Menus
|
|
10
15
|
*/
|
|
11
16
|
export interface AdaptableMenuItem {
|
|
12
17
|
/**
|
|
13
|
-
*
|
|
18
|
+
* Unique name for the Menu Item
|
|
19
|
+
*/
|
|
20
|
+
name: AdaptableMenuItemName;
|
|
21
|
+
/**
|
|
22
|
+
* Text that appears in the menu
|
|
14
23
|
*/
|
|
15
24
|
label: string;
|
|
16
25
|
/**
|
|
@@ -1 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* List of Shipped Adaptable Menu Items
|
|
3
|
+
*/
|
|
4
|
+
export const ADAPTABLE_MENU_ITEMS = [
|
|
5
|
+
'alert-clear',
|
|
6
|
+
'bulk-update-apply',
|
|
7
|
+
'calculated-column-edit',
|
|
8
|
+
'cell-summary-show',
|
|
9
|
+
'column-info',
|
|
10
|
+
'comment-add',
|
|
11
|
+
'comment-remove',
|
|
12
|
+
'custom-sort-add',
|
|
13
|
+
'custom-sort-edit',
|
|
14
|
+
'dashboard',
|
|
15
|
+
'dashboard-collapse',
|
|
16
|
+
'dashboard-configure',
|
|
17
|
+
'dashboard-dock',
|
|
18
|
+
'dashboard-expand',
|
|
19
|
+
'dashboard-float',
|
|
20
|
+
'dashboard-hide',
|
|
21
|
+
'dashboard-show',
|
|
22
|
+
'data-import',
|
|
23
|
+
'export',
|
|
24
|
+
'export-clipboard',
|
|
25
|
+
'export-csv',
|
|
26
|
+
'export-excel',
|
|
27
|
+
'export-json',
|
|
28
|
+
'export-table',
|
|
29
|
+
'export-custom-destination',
|
|
30
|
+
'fdc3',
|
|
31
|
+
'fdc3-broadcast',
|
|
32
|
+
'fdc3-raise-intent',
|
|
33
|
+
'filter',
|
|
34
|
+
'filter-bar-visbility',
|
|
35
|
+
'filter-clear',
|
|
36
|
+
'filter-suspend',
|
|
37
|
+
'filter-cell-value',
|
|
38
|
+
'flashing-cell-add',
|
|
39
|
+
'flashing-cell-clear',
|
|
40
|
+
'flashing-cell-delete',
|
|
41
|
+
'flashing-row-clear',
|
|
42
|
+
'format-column',
|
|
43
|
+
'format-column-add',
|
|
44
|
+
'format-column-edit',
|
|
45
|
+
'free-text-column-edit',
|
|
46
|
+
'grid-info',
|
|
47
|
+
'layout-aggregated-view',
|
|
48
|
+
'layout-auto-size',
|
|
49
|
+
'layout-clear-selection',
|
|
50
|
+
'layout-column-caption-change',
|
|
51
|
+
'layout-column-hide',
|
|
52
|
+
'layout-column-select',
|
|
53
|
+
'layout-column-select-preserve',
|
|
54
|
+
'layout-column-select-reset',
|
|
55
|
+
'layout-edit',
|
|
56
|
+
'layout-grid',
|
|
57
|
+
'layout-select',
|
|
58
|
+
'layout-select-all',
|
|
59
|
+
'note-add',
|
|
60
|
+
'note-remove',
|
|
61
|
+
'plus-minus-add',
|
|
62
|
+
'smart-edit-apply',
|
|
63
|
+
'settings-panel-open',
|
|
64
|
+
'styled-column-badge',
|
|
65
|
+
'styled-column',
|
|
66
|
+
'styled-column-gradient',
|
|
67
|
+
'styled-column-percent-bar',
|
|
68
|
+
'styled-column-sparkline',
|
|
69
|
+
'system-status-show',
|
|
70
|
+
'internal' // used by AdapTable in Settings Panel
|
|
71
|
+
];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { SummarySupportedExpression } from "../../Utilities/Services/Interface/ISummaryService";
|
|
2
1
|
export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
|
|
2
|
+
export declare const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = "WEIGHTED_AVERAGE";
|
|
3
|
+
export declare const summarySupportedExpressions: readonly ["SUM", "AVG", "MIN", "MAX", "COUNT", "MEDIAN", "MODE", "DISTINCT", "ONLY", "STD_DEVIATION", "OLDEST", "YOUNGEST", "WEIGHTED_AVERAGE"];
|
|
4
|
+
export type SummarySupportedExpression = (typeof summarySupportedExpressions)[number];
|
|
3
5
|
/**
|
|
4
6
|
* Position of Row Summary - 'Top' or 'Bottom'
|
|
5
7
|
*/
|
|
@@ -1 +1,17 @@
|
|
|
1
1
|
export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
|
|
2
|
+
export const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = 'WEIGHTED_AVERAGE';
|
|
3
|
+
export const summarySupportedExpressions = [
|
|
4
|
+
'SUM',
|
|
5
|
+
'AVG',
|
|
6
|
+
'MIN',
|
|
7
|
+
'MAX',
|
|
8
|
+
'COUNT',
|
|
9
|
+
'MEDIAN',
|
|
10
|
+
'MODE',
|
|
11
|
+
'DISTINCT',
|
|
12
|
+
'ONLY',
|
|
13
|
+
'STD_DEVIATION',
|
|
14
|
+
'OLDEST',
|
|
15
|
+
'YOUNGEST',
|
|
16
|
+
WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
|
|
17
|
+
];
|
|
@@ -269,8 +269,10 @@ export const LayoutReducer = (state = initialState, action) => {
|
|
|
269
269
|
return Object.assign(Object.assign({}, state), { Layouts });
|
|
270
270
|
}
|
|
271
271
|
case LAYOUT_COLUMN_FILTER_ADD: {
|
|
272
|
-
let columnFilters = [...((_b = currentLayout.ColumnFilters) !== null && _b !== void 0 ? _b : [])];
|
|
273
272
|
const columnFilterAction = action.columnFilter;
|
|
273
|
+
let columnFilters = ((_b = currentLayout.ColumnFilters) !== null && _b !== void 0 ? _b : []).filter(
|
|
274
|
+
// make sure we are not adding a filter that already exists
|
|
275
|
+
(cf) => cf.ColumnId !== columnFilterAction.ColumnId);
|
|
274
276
|
AdaptableHelper.addUuidAndSource(columnFilterAction);
|
|
275
277
|
columnFilters.push(columnFilterAction);
|
|
276
278
|
const Layouts = state.Layouts.map((layout) => {
|
|
@@ -283,10 +285,13 @@ export const LayoutReducer = (state = initialState, action) => {
|
|
|
283
285
|
}
|
|
284
286
|
case LAYOUT_COLUMN_FILTER_EDIT: {
|
|
285
287
|
const columnFilterAction = action.columnFilter;
|
|
286
|
-
|
|
288
|
+
// it is safer to change the col id, we cannot have multiple filter on the same id
|
|
289
|
+
// first we filter out other filters with the same colId, to ensure we have only one
|
|
290
|
+
const cleanColumnFilters = ((_c = currentLayout.ColumnFilters) !== null && _c !== void 0 ? _c : []).filter((cf) => cf.ColumnId !== columnFilterAction.ColumnId);
|
|
291
|
+
cleanColumnFilters.push(columnFilterAction);
|
|
287
292
|
const Layouts = state.Layouts.map((layout) => {
|
|
288
293
|
if (layout.Name === currentLayout.Name) {
|
|
289
|
-
return Object.assign(Object.assign({}, layout), { ColumnFilters:
|
|
294
|
+
return Object.assign(Object.assign({}, layout), { ColumnFilters: cleanColumnFilters });
|
|
290
295
|
}
|
|
291
296
|
return layout;
|
|
292
297
|
});
|
|
@@ -302,14 +307,11 @@ export const LayoutReducer = (state = initialState, action) => {
|
|
|
302
307
|
return Object.assign(Object.assign({}, state), { Layouts });
|
|
303
308
|
}
|
|
304
309
|
case LAYOUT_COLUMN_FILTER_CLEAR: {
|
|
305
|
-
let columnFilters = [...((_d = currentLayout.ColumnFilters) !== null && _d !== void 0 ? _d : [])];
|
|
306
310
|
const actionTypedDelete = action;
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
columnFilters.splice(index, 1);
|
|
312
|
-
}
|
|
311
|
+
const columnFilters = ((_d = currentLayout.ColumnFilters) !== null && _d !== void 0 ? _d : []).filter((cf) => {
|
|
312
|
+
// make sure we are deleting all filters on the same column
|
|
313
|
+
return cf.ColumnId !== actionTypedDelete.columnFilter.ColumnId;
|
|
314
|
+
});
|
|
313
315
|
const Layouts = state.Layouts.map((layout) => {
|
|
314
316
|
if (layout.Name === currentLayout.Name) {
|
|
315
317
|
return Object.assign(Object.assign({}, layout), { ColumnFilters: columnFilters });
|
|
@@ -3,7 +3,7 @@ import { Action } from 'redux';
|
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
5
5
|
import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
|
|
6
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
6
|
+
import { AdaptableMenuItem, AdaptableMenuItemName, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
8
8
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
9
9
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -40,15 +40,16 @@ export declare abstract class AdaptableModuleBase implements IModule {
|
|
|
40
40
|
addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
|
|
41
41
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
42
42
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
43
|
-
createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }: {
|
|
43
|
+
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }: {
|
|
44
|
+
Name: AdaptableMenuItemName;
|
|
44
45
|
Label: string;
|
|
45
46
|
ComponentName: string;
|
|
46
47
|
Icon: AdaptableSystemIconName;
|
|
47
48
|
PopupParams?: ModuleParams;
|
|
48
49
|
}): MenuItemShowPopup;
|
|
49
|
-
createColumnMenuItemClickFunction(Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
|
|
50
|
-
createColumnMenuItemReduxAction(Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
|
|
51
|
-
createColumnMenuItemShowPopup(Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
|
|
50
|
+
createColumnMenuItemClickFunction(Name: AdaptableMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
|
|
51
|
+
createColumnMenuItemReduxAction(Name: AdaptableMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
|
|
52
|
+
createColumnMenuItemShowPopup(Name: AdaptableMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
|
|
52
53
|
getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
53
54
|
getModuleNamedQueryReferences(): string[];
|
|
54
55
|
getModuleCalculatedColumnReferences(): CalculatedColumn[];
|
|
@@ -78,6 +78,7 @@ export class AdaptableModuleBase {
|
|
|
78
78
|
maxWidth: this.getPopupMaxWidth(),
|
|
79
79
|
};
|
|
80
80
|
return this.createMainMenuItemShowPopup({
|
|
81
|
+
Name: 'internal',
|
|
81
82
|
Label: this.moduleInfo.FriendlyName,
|
|
82
83
|
ComponentName: this.moduleInfo.Popup,
|
|
83
84
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -98,20 +99,20 @@ export class AdaptableModuleBase {
|
|
|
98
99
|
return undefined;
|
|
99
100
|
}
|
|
100
101
|
// creates the menu items in the main dropdown
|
|
101
|
-
createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }) {
|
|
102
|
-
return new MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
102
|
+
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }) {
|
|
103
|
+
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
103
104
|
}
|
|
104
105
|
// creates a menu item for the column menu to perform a function
|
|
105
|
-
createColumnMenuItemClickFunction(Label, Icon, ClickFunction) {
|
|
106
|
-
return new MenuItemDoClickFunction(Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
106
|
+
createColumnMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
|
|
107
|
+
return new MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
107
108
|
}
|
|
108
109
|
// creates a menu item for the column menu to enact a Redux action
|
|
109
|
-
createColumnMenuItemReduxAction(Label, Icon, Action) {
|
|
110
|
-
return new MenuItemDoReduxAction(Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
110
|
+
createColumnMenuItemReduxAction(Name, Label, Icon, Action) {
|
|
111
|
+
return new MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
111
112
|
}
|
|
112
113
|
// popups called by the column menu - invisible if module is hidden or readonly
|
|
113
|
-
createColumnMenuItemShowPopup(Label, ComponentName, Icon, PopupParams) {
|
|
114
|
-
return new MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
114
|
+
createColumnMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
|
|
115
|
+
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
115
116
|
}
|
|
116
117
|
getTeamSharingAction() {
|
|
117
118
|
return undefined;
|
|
@@ -83,7 +83,7 @@ export class AlertModule extends AdaptableModuleBase {
|
|
|
83
83
|
relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
84
84
|
}
|
|
85
85
|
if (relevantAlert) {
|
|
86
|
-
items.push(this.createColumnMenuItemReduxAction('Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
86
|
+
items.push(this.createColumnMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -22,7 +22,7 @@ export class BulkUpdateModule extends AdaptableModuleBase {
|
|
|
22
22
|
let popUpParams = {
|
|
23
23
|
source: 'ContextMenu',
|
|
24
24
|
};
|
|
25
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
25
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'bulk-update-apply',
|
|
26
26
|
Label: 'Apply Bulk Update',
|
|
27
27
|
ComponentName: this.moduleInfo.Popup,
|
|
28
28
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -57,7 +57,7 @@ export class CalculatedColumnModule extends AdaptableModuleBase {
|
|
|
57
57
|
source: 'ColumnMenu',
|
|
58
58
|
};
|
|
59
59
|
return [
|
|
60
|
-
this.createColumnMenuItemShowPopup('Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
60
|
+
this.createColumnMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
61
61
|
];
|
|
62
62
|
}
|
|
63
63
|
getTeamSharingAction() {
|