@adaptabletools/adaptable-cjs 18.0.0-canary.16 → 18.0.0-canary.18
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 +4 -3
- 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/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +6 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +98 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +17 -1
- package/src/Redux/Store/AdaptableStore.js +11 -6
- 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.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +43 -39
- 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.js +1 -1
- 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 +31 -22
- 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 +26 -5
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +125 -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/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +25 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +29 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +7 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- package/src/components/Datepicker/index.js +3 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -15
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "18.0.0-canary.
|
|
3
|
+
"version": "18.0.0-canary.18",
|
|
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
|
|
@@ -103,9 +103,10 @@ export interface ColumnFilterOptions<TData = any> {
|
|
|
103
103
|
*/
|
|
104
104
|
showSuspendFilterButton?: boolean;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* @
|
|
106
|
+
* Show Date Picker (or Date Input) in Filter controls
|
|
107
|
+
* @gridInfoItem
|
|
108
|
+
* @noCodeItem
|
|
109
|
+
* @defaultValue true
|
|
109
110
|
*/
|
|
110
111
|
showDatePicker?: boolean;
|
|
111
112
|
}
|
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
|
}
|
|
@@ -6,7 +6,6 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
8
8
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
9
|
-
const weightedAverage_1 = require("../../agGrid/weightedAverage");
|
|
10
9
|
class CellSummaryApiImpl extends ApiBase_1.ApiBase {
|
|
11
10
|
openCellSummaryPopupSettingsPanel() {
|
|
12
11
|
this.showModulePopup(ModuleConstants.CellSummaryModuleId);
|
|
@@ -17,12 +16,6 @@ class CellSummaryApiImpl extends ApiBase_1.ApiBase {
|
|
|
17
16
|
getCellSummaryOperationDefinitions() {
|
|
18
17
|
var _a;
|
|
19
18
|
let cellSummaryOperations = (_a = this.getCellSummaryOptions().cellSummaryOperations) !== null && _a !== void 0 ? _a : [];
|
|
20
|
-
if (this.isWeightedAverageCellSummaryAvailable()) {
|
|
21
|
-
cellSummaryOperations = [
|
|
22
|
-
...cellSummaryOperations,
|
|
23
|
-
this.getWeightedAverageCellSummaryOperation(),
|
|
24
|
-
];
|
|
25
|
-
}
|
|
26
19
|
return cellSummaryOperations;
|
|
27
20
|
}
|
|
28
21
|
setCurrentCellSummaryOperation(operation) {
|
|
@@ -54,6 +47,8 @@ class CellSummaryApiImpl extends ApiBase_1.ApiBase {
|
|
|
54
47
|
return cellSummary.Std_Deviation;
|
|
55
48
|
case Enums_1.SummaryOperation.Only:
|
|
56
49
|
return cellSummary.Only;
|
|
50
|
+
case Enums_1.SummaryOperation.Weighted_Average:
|
|
51
|
+
return cellSummary.Weighted_Average;
|
|
57
52
|
default:
|
|
58
53
|
return cellSummary[operation];
|
|
59
54
|
}
|
|
@@ -65,21 +60,5 @@ class CellSummaryApiImpl extends ApiBase_1.ApiBase {
|
|
|
65
60
|
: cellSummaryOperation.operationName;
|
|
66
61
|
return this.getCellSummaryOperationValue(summaryOperation);
|
|
67
62
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Weighted average is availabe only if the current layout has at leat a Weighted Average aggregation defined.
|
|
70
|
-
*/
|
|
71
|
-
isWeightedAverageCellSummaryAvailable() {
|
|
72
|
-
const currentLayout = this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
73
|
-
if (currentLayout.AggregationColumns == undefined) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
return Object.values(currentLayout.AggregationColumns).some((aggCol) => typeof aggCol === 'object' && aggCol.type === 'weightedAverage');
|
|
77
|
-
}
|
|
78
|
-
getWeightedAverageCellSummaryOperation() {
|
|
79
|
-
return {
|
|
80
|
-
operationName: 'Weighted Avg',
|
|
81
|
-
operationFunction: weightedAverage_1.cellSummaryWeightedAverage,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
63
|
}
|
|
85
64
|
exports.CellSummaryApiImpl = CellSummaryApiImpl;
|
|
@@ -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
|
}
|
|
@@ -529,7 +529,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
529
529
|
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
|
|
530
530
|
return this.getRowCount();
|
|
531
531
|
}
|
|
532
|
-
showTransposedView(transposeConfig) {
|
|
532
|
+
showTransposedView(transposeConfig = {}) {
|
|
533
533
|
var _a, _b, _c, _d;
|
|
534
534
|
const transposedColumnId = (_a = transposeConfig.transposedColumnId) !== null && _a !== void 0 ? _a : this.getAdaptableApi().optionsApi.getPrimaryKey();
|
|
535
535
|
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;
|
|
@@ -106,9 +106,6 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
106
106
|
getEntitlementService() {
|
|
107
107
|
return this.adaptable.EntitlementService;
|
|
108
108
|
}
|
|
109
|
-
getSummaryService() {
|
|
110
|
-
return this.adaptable.SummaryService;
|
|
111
|
-
}
|
|
112
109
|
getQueryLanguageService() {
|
|
113
110
|
return this.adaptable.QueryLanguageService;
|
|
114
111
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { GridFilter } from '../../types';
|
|
2
3
|
export declare class GridFilterInternalApi extends ApiBase {
|
|
3
4
|
fireGridFilterAppliedEvent(): void;
|
|
5
|
+
/**
|
|
6
|
+
* Compares to Grid Filters to see if they are identical
|
|
7
|
+
*/
|
|
8
|
+
isGridFilterDifferent(oldFilter: GridFilter, newFilter: GridFilter): boolean;
|
|
4
9
|
}
|
|
@@ -19,5 +19,11 @@ class GridFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
19
19
|
adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Compares to Grid Filters to see if they are identical
|
|
24
|
+
*/
|
|
25
|
+
isGridFilterDifferent(oldFilter, newFilter) {
|
|
26
|
+
return (oldFilter === null || oldFilter === void 0 ? void 0 : oldFilter.Expression) === (newFilter === null || newFilter === void 0 ? void 0 : newFilter.Expression);
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
exports.GridFilterInternalApi = GridFilterInternalApi;
|
|
@@ -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",
|
|
@@ -78,6 +78,7 @@ var SummaryOperation;
|
|
|
78
78
|
SummaryOperation["Count"] = "Count";
|
|
79
79
|
SummaryOperation["Std_Deviation"] = "Std Deviation";
|
|
80
80
|
SummaryOperation["Only"] = "Only";
|
|
81
|
+
SummaryOperation["Weighted_Average"] = "Weighted Avg";
|
|
81
82
|
})(SummaryOperation = exports.SummaryOperation || (exports.SummaryOperation = {}));
|
|
82
83
|
var FilterOnDataChangeOptions;
|
|
83
84
|
(function (FilterOnDataChangeOptions) {
|
|
@@ -5,12 +5,26 @@ 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
|
+
export type AdaptableColumnMenuItemName = (typeof ADAPTABLE_COLUMN_MENU_ITEMS)[number];
|
|
9
|
+
export type AdaptableContextMenuItemName = (typeof ADAPTABLE_CONTEXT_MENU_ITEMS)[number];
|
|
10
|
+
/**
|
|
11
|
+
* List of Shipped Adaptable Column Menu Items
|
|
12
|
+
*/
|
|
13
|
+
export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal", "parent"];
|
|
14
|
+
/**
|
|
15
|
+
* List of Shipped Adaptable Context Menu Items
|
|
16
|
+
*/
|
|
17
|
+
export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
|
|
8
18
|
/**
|
|
9
19
|
* Menu item used by Adaptable in both Column and Context Menus
|
|
10
20
|
*/
|
|
11
21
|
export interface AdaptableMenuItem {
|
|
12
22
|
/**
|
|
13
|
-
*
|
|
23
|
+
* Unique name for the Menu Item
|
|
24
|
+
*/
|
|
25
|
+
name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
26
|
+
/**
|
|
27
|
+
* Text that appears in the menu
|
|
14
28
|
*/
|
|
15
29
|
label: string;
|
|
16
30
|
/**
|
|
@@ -1,2 +1,100 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ADAPTABLE_CONTEXT_MENU_ITEMS = exports.ADAPTABLE_COLUMN_MENU_ITEMS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* List of Shipped Adaptable Column Menu Items
|
|
6
|
+
*/
|
|
7
|
+
exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
8
|
+
'calculated-column-edit',
|
|
9
|
+
'cell-summary-show',
|
|
10
|
+
'column-filter-bar-hide',
|
|
11
|
+
'column-filter-bar-show',
|
|
12
|
+
'column-filter-clear',
|
|
13
|
+
'column-filter-on-cell-value',
|
|
14
|
+
'column-filter-suspend',
|
|
15
|
+
'column-filter-unsuspend',
|
|
16
|
+
'column-info-show',
|
|
17
|
+
'custom-sort-add',
|
|
18
|
+
'custom-sort-edit',
|
|
19
|
+
'dashboard-collapse',
|
|
20
|
+
'dashboard-configure',
|
|
21
|
+
'dashboard-dock',
|
|
22
|
+
'dashboard-expand',
|
|
23
|
+
'dashboard-float',
|
|
24
|
+
'dashboard-hide',
|
|
25
|
+
'dashboard-show',
|
|
26
|
+
'data-import',
|
|
27
|
+
'flashing-cell-add',
|
|
28
|
+
'flashing-cell-delete',
|
|
29
|
+
'format-column-add',
|
|
30
|
+
'format-column-edit',
|
|
31
|
+
'free-text-column-edit',
|
|
32
|
+
'grid-info-show',
|
|
33
|
+
'layout-column-caption-change',
|
|
34
|
+
'layout-column-hide',
|
|
35
|
+
'layout-column-select',
|
|
36
|
+
'layout-column-select-preserve',
|
|
37
|
+
'layout-column-select-reset',
|
|
38
|
+
'layout-edit',
|
|
39
|
+
'layout-grid-parent',
|
|
40
|
+
'layout-select-parent',
|
|
41
|
+
'layout-select-all',
|
|
42
|
+
'plus-minus-add',
|
|
43
|
+
'settings-panel-open',
|
|
44
|
+
'styled-column-badge-add',
|
|
45
|
+
'styled-column-badge-edit',
|
|
46
|
+
'styled-column-gradient-add',
|
|
47
|
+
'styled-column-gradient-edit',
|
|
48
|
+
'styled-column-percent-bar-add',
|
|
49
|
+
'styled-column-percent-bar-edit',
|
|
50
|
+
'styled-column-sparkline-add',
|
|
51
|
+
'styled-column-sparkline-edit',
|
|
52
|
+
'system-status-show',
|
|
53
|
+
'internal',
|
|
54
|
+
'parent',
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* List of Shipped Adaptable Context Menu Items
|
|
58
|
+
*/
|
|
59
|
+
exports.ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
60
|
+
'alert-clear',
|
|
61
|
+
'bulk-update-apply',
|
|
62
|
+
'calculated-column-edit',
|
|
63
|
+
'cell-summary-show',
|
|
64
|
+
'column-filter-on-cell-value',
|
|
65
|
+
'column-filter-clear',
|
|
66
|
+
'column-filter-suspend',
|
|
67
|
+
'column-filter-unsuspend',
|
|
68
|
+
'column-info-show',
|
|
69
|
+
'comment-add',
|
|
70
|
+
'comment-remove',
|
|
71
|
+
'dashboard-collapse',
|
|
72
|
+
'dashboard-configure',
|
|
73
|
+
'dashboard-dock',
|
|
74
|
+
'dashboard-expand',
|
|
75
|
+
'dashboard-float',
|
|
76
|
+
'dashboard-hide',
|
|
77
|
+
'dashboard-show',
|
|
78
|
+
'data-import',
|
|
79
|
+
'export-clipboard',
|
|
80
|
+
'export-csv',
|
|
81
|
+
'export-excel',
|
|
82
|
+
'export-json',
|
|
83
|
+
'export-table',
|
|
84
|
+
'export-custom-destination',
|
|
85
|
+
'fdc3-broadcast',
|
|
86
|
+
'fdc3-raise-intent',
|
|
87
|
+
'flashing-cell-clear',
|
|
88
|
+
'flashing-row-clear',
|
|
89
|
+
'grid-info-show',
|
|
90
|
+
'layout-aggregated-view',
|
|
91
|
+
'layout-auto-size',
|
|
92
|
+
'layout-clear-selection',
|
|
93
|
+
'layout-edit',
|
|
94
|
+
'layout-select-all',
|
|
95
|
+
'note-add',
|
|
96
|
+
'note-remove',
|
|
97
|
+
'settings-panel-open',
|
|
98
|
+
'smart-edit-apply',
|
|
99
|
+
'system-status-show',
|
|
100
|
+
];
|
|
@@ -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,4 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROW_SUMMARY_ROW_ID = void 0;
|
|
3
|
+
exports.summarySupportedExpressions = exports.WEIGHTED_AVERAGE_AGGREATED_FUNCTION = exports.ROW_SUMMARY_ROW_ID = void 0;
|
|
4
4
|
exports.ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
|
|
5
|
+
exports.WEIGHTED_AVERAGE_AGGREATED_FUNCTION = 'WEIGHTED_AVERAGE';
|
|
6
|
+
exports.summarySupportedExpressions = [
|
|
7
|
+
'SUM',
|
|
8
|
+
'AVG',
|
|
9
|
+
'MIN',
|
|
10
|
+
'MAX',
|
|
11
|
+
'COUNT',
|
|
12
|
+
'MEDIAN',
|
|
13
|
+
'MODE',
|
|
14
|
+
'DISTINCT',
|
|
15
|
+
'ONLY',
|
|
16
|
+
'STD_DEVIATION',
|
|
17
|
+
'OLDEST',
|
|
18
|
+
'YOUNGEST',
|
|
19
|
+
exports.WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
|
|
20
|
+
];
|
|
@@ -269,7 +269,7 @@ exports.AdaptableStore = AdaptableStore;
|
|
|
269
269
|
const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
270
270
|
return function (next) {
|
|
271
271
|
return function (action) {
|
|
272
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
272
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
273
273
|
switch (action.type) {
|
|
274
274
|
/*******************
|
|
275
275
|
* NAMED QUERY ACTIONS
|
|
@@ -777,7 +777,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
777
777
|
draftLayoutAction = GridRedux.LayoutDraftColumnFilterUnsuspendAll();
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
|
-
// GRID FILTER
|
|
781
780
|
returnAction = next(draftLayoutAction);
|
|
782
781
|
}
|
|
783
782
|
setTimeout(() => {
|
|
@@ -807,7 +806,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
807
806
|
returnAction = action;
|
|
808
807
|
}
|
|
809
808
|
else {
|
|
810
|
-
//
|
|
809
|
+
// This is different to what we do with column filters?
|
|
811
810
|
switch (action.type) {
|
|
812
811
|
case LayoutRedux.LAYOUT_GRID_FILTER_SET:
|
|
813
812
|
returnAction = GridRedux.LayoutDraftGridFilterSet(Object.assign(Object.assign({}, currentLayout.GridFilter), { Expression: action.gridFilter }));
|
|
@@ -1018,12 +1017,18 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1018
1017
|
let returnAction = next(action);
|
|
1019
1018
|
const newLayoutState = middlewareAPI.getState().Layout;
|
|
1020
1019
|
adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
|
|
1020
|
+
// Tell Grid to apply column filtering if filters have been changed in a loaded Layout
|
|
1021
1021
|
const oldFilters = (_k = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
|
|
1022
1022
|
const newFilters = (_l = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _l === void 0 ? void 0 : _l.ColumnFilters;
|
|
1023
|
-
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1024
1023
|
if (adaptable.api.columnFilterApi.internalApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
|
|
1025
1024
|
adaptable.applyColumnFiltering();
|
|
1026
1025
|
}
|
|
1026
|
+
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1027
|
+
const oldGridFilter = (_m = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _m === void 0 ? void 0 : _m.GridFilter;
|
|
1028
|
+
const newGridFilter = (_o = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _o === void 0 ? void 0 : _o.GridFilter;
|
|
1029
|
+
if (adaptable.api.gridFilterApi.internalApi.isGridFilterDifferent(oldGridFilter, newGridFilter)) {
|
|
1030
|
+
adaptable.applyGridFiltering();
|
|
1031
|
+
}
|
|
1027
1032
|
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
1028
1033
|
returnAction.type == LayoutRedux.LAYOUT_DELETE ||
|
|
1029
1034
|
returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
|
|
@@ -1036,7 +1041,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1036
1041
|
// tell grid the layout has been selected
|
|
1037
1042
|
adaptable.setLayout(currentLayout);
|
|
1038
1043
|
}
|
|
1039
|
-
if (!((
|
|
1044
|
+
if (!((_p = adaptable.adaptableOptions.layoutOptions) === null || _p === void 0 ? void 0 : _p.autoSaveLayouts)) {
|
|
1040
1045
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
1041
1046
|
}
|
|
1042
1047
|
}
|
|
@@ -1044,7 +1049,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1044
1049
|
returnAction.type == LayoutRedux.LAYOUT_SAVE) {
|
|
1045
1050
|
const actionTyped = action;
|
|
1046
1051
|
// if autosave is false
|
|
1047
|
-
if (!((
|
|
1052
|
+
if (!((_q = adaptable.adaptableOptions.layoutOptions) === null || _q === void 0 ? void 0 : _q.autoSaveLayouts)) {
|
|
1048
1053
|
// and the current layout is saved, make sure we also update the draft
|
|
1049
1054
|
if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
|
|
1050
1055
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
|
|
@@ -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, AdaptableContextMenuItemName, ContextMenuContext, AdaptableColumnMenuItemName } 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: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
44
45
|
Label: string;
|
|
45
46
|
ComponentName: string;
|
|
46
47
|
Icon: AdaptableSystemIconName;
|
|
47
48
|
PopupParams?: ModuleParams;
|
|
48
49
|
}): MenuItemShowPopup;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
createMenuItemClickFunction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
|
|
51
|
+
createMenuItemReduxAction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
|
|
52
|
+
createMenuItemShowPopup(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
|
|
52
53
|
getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
53
54
|
getModuleNamedQueryReferences(): string[];
|
|
54
55
|
getModuleCalculatedColumnReferences(): CalculatedColumn[];
|
|
@@ -82,6 +82,7 @@ class AdaptableModuleBase {
|
|
|
82
82
|
maxWidth: this.getPopupMaxWidth(),
|
|
83
83
|
};
|
|
84
84
|
return this.createMainMenuItemShowPopup({
|
|
85
|
+
Name: 'internal',
|
|
85
86
|
Label: this.moduleInfo.FriendlyName,
|
|
86
87
|
ComponentName: this.moduleInfo.Popup,
|
|
87
88
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -102,20 +103,20 @@ class AdaptableModuleBase {
|
|
|
102
103
|
return undefined;
|
|
103
104
|
}
|
|
104
105
|
// creates the menu items in the main dropdown
|
|
105
|
-
createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }) {
|
|
106
|
-
return new MenuItem_1.MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
106
|
+
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }) {
|
|
107
|
+
return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
107
108
|
}
|
|
108
109
|
// creates a menu item for the column menu to perform a function
|
|
109
|
-
|
|
110
|
-
return new MenuItem_1.MenuItemDoClickFunction(Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
110
|
+
createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
|
|
111
|
+
return new MenuItem_1.MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
111
112
|
}
|
|
112
113
|
// creates a menu item for the column menu to enact a Redux action
|
|
113
|
-
|
|
114
|
-
return new MenuItem_1.MenuItemDoReduxAction(Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
114
|
+
createMenuItemReduxAction(Name, Label, Icon, Action) {
|
|
115
|
+
return new MenuItem_1.MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
115
116
|
}
|
|
116
117
|
// popups called by the column menu - invisible if module is hidden or readonly
|
|
117
|
-
|
|
118
|
-
return new MenuItem_1.MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
118
|
+
createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
|
|
119
|
+
return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
119
120
|
}
|
|
120
121
|
getTeamSharingAction() {
|
|
121
122
|
return undefined;
|
|
@@ -87,7 +87,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
87
87
|
relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
88
88
|
}
|
|
89
89
|
if (relevantAlert) {
|
|
90
|
-
items.push(this.
|
|
90
|
+
items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -26,7 +26,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
26
26
|
let popUpParams = {
|
|
27
27
|
source: 'ContextMenu',
|
|
28
28
|
};
|
|
29
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
29
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'bulk-update-apply',
|
|
30
30
|
Label: 'Apply Bulk Update',
|
|
31
31
|
ComponentName: this.moduleInfo.Popup,
|
|
32
32
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -61,7 +61,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
61
61
|
source: 'ColumnMenu',
|
|
62
62
|
};
|
|
63
63
|
return [
|
|
64
|
-
this.
|
|
64
|
+
this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
65
65
|
];
|
|
66
66
|
}
|
|
67
67
|
getTeamSharingAction() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
|
-
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
4
|
-
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
5
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
6
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
7
|
-
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
8
|
-
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
9
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
5
|
+
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
6
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
7
|
+
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
8
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
9
|
+
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
10
10
|
export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
|
|
11
11
|
cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmary>;
|
|
12
12
|
constructor(api: AdaptableApi);
|
|
@@ -15,6 +15,7 @@ export declare class CellSummaryModule extends AdaptableModuleBase implements IC
|
|
|
15
15
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
private createCellSummaryMenuItem;
|
|
17
17
|
createCellSummary(selectedCellInfo: SelectedCellInfo): CellSummmary;
|
|
18
|
+
private getWeightedAverageCellSummary;
|
|
18
19
|
getViewProperties(): {
|
|
19
20
|
getStatusBarPanelProps(): {
|
|
20
21
|
view: () => JSX.Element;
|