@adaptabletools/adaptable 15.0.0-canary.1 → 15.0.0-canary.3
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/bundle.cjs.js +210 -210
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/ActionOptions.d.ts +30 -30
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -13
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +4 -4
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -14
- package/src/AdaptableOptions/ChartingOptions.d.ts +2 -3
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -6
- package/src/AdaptableOptions/EditOptions.d.ts +8 -8
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExpressionOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -3
- package/src/AdaptableOptions/GeneralOptions.d.ts +9 -9
- package/src/AdaptableOptions/MenuOptions.d.ts +3 -3
- package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
- package/src/AdaptableOptions/SearchOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +23 -23
- package/src/Api/ChartingApi.d.ts +18 -19
- package/src/Api/EventApi.d.ts +13 -1
- package/src/Api/Events/ActionRowSubmitted.d.ts +7 -7
- package/src/Api/Events/AdaptableReady.d.ts +2 -2
- package/src/Api/Events/GridDataChanged.d.ts +3 -3
- package/src/Api/Events/ThemeChanged.d.ts +6 -0
- package/src/Api/GridApi.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
- package/src/Api/Implementation/ThemeApiImpl.js +14 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +18 -0
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +7 -7
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +4 -4
- package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +4 -4
- package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
- package/src/PredefinedConfig/Common/Menu.d.ts +8 -8
- package/src/PredefinedConfig/Selection/GridCell.d.ts +3 -3
- package/src/PredefinedConfig/Selection/GridRow.d.ts +3 -3
- package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +3 -3
- package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +2 -2
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
- package/src/PredefinedConfig/StatusBarState.js +1 -1
- package/src/PredefinedConfig/SystemState.d.ts +1 -2
- package/src/PredefinedConfig/ThemeState.d.ts +4 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/ThemeRedux.d.ts +27 -0
- package/src/Redux/ActionsReducers/ThemeRedux.js +63 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ObjectFactory.d.ts +3 -1
- package/src/Utilities/ObjectFactory.js +10 -1
- package/src/Utilities/Services/Interface/IThemeService.d.ts +3 -0
- package/src/Utilities/Services/Interface/IThemeService.js +2 -0
- package/src/Utilities/Services/MetamodelService.d.ts +2 -0
- package/src/Utilities/Services/MetamodelService.js +26 -19
- package/src/Utilities/Services/ThemeService.d.ts +12 -0
- package/src/Utilities/Services/ThemeService.js +49 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +5 -5
- package/src/View/Charting/ShowChartButton.js +2 -1
- package/src/View/Charting/useChartingElements.js +2 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
- package/src/View/Theme/ThemeEditor.d.ts +7 -0
- package/src/View/Theme/ThemeEditor.js +186 -0
- package/src/View/Theme/ThemePopup.d.ts +3 -0
- package/src/View/Theme/ThemePopup.js +30 -6
- package/src/agGrid/Adaptable.d.ts +3 -2
- package/src/agGrid/Adaptable.js +8 -17
- package/src/agGrid/createAgStatusPanelComponent.js +1 -1
- package/src/metamodel/adaptable-metamodel-model.d.ts +9 -9
- package/src/metamodel/adaptable.metamodel.d.ts +1698 -3141
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -65,6 +65,7 @@ const weightedAverage_1 = require("./weightedAverage");
|
|
|
65
65
|
const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColumns");
|
|
66
66
|
const renderReactRoot_1 = require("../renderReactRoot");
|
|
67
67
|
const ChartingService_1 = require("../Utilities/Services/ChartingService");
|
|
68
|
+
const ThemeService_1 = require("../Utilities/Services/ThemeService");
|
|
68
69
|
const tinycolor = require('tinycolor2');
|
|
69
70
|
const GROUP_PATH_SEPARATOR = '/';
|
|
70
71
|
// IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
|
|
@@ -429,6 +430,7 @@ class Adaptable {
|
|
|
429
430
|
// create the services
|
|
430
431
|
this.LicenseService = this.initLicenseService();
|
|
431
432
|
this.ChartingService = new ChartingService_1.ChartingService(this.api);
|
|
433
|
+
this.ThemeService = new ThemeService_1.ThemeService(this.api);
|
|
432
434
|
this.ValidationService = new ValidationService_1.ValidationService(this.api);
|
|
433
435
|
this.ReportService = new ReportService_1.ReportService(this.api);
|
|
434
436
|
this.ModuleService = new ModuleService_1.ModuleService(this.api);
|
|
@@ -647,7 +649,7 @@ class Adaptable {
|
|
|
647
649
|
this.initAgGridContainerFromInitializedAgGrid();
|
|
648
650
|
return Promise.resolve(true);
|
|
649
651
|
}, () => {
|
|
650
|
-
(0, LoggingHelper_1.ConsoleLogError)(`Could not find any
|
|
652
|
+
(0, LoggingHelper_1.ConsoleLogError)(`Could not find any AG Grid instance rendered. Could not find reference to AG Grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AG Grid`);
|
|
651
653
|
return Promise.reject(false);
|
|
652
654
|
});
|
|
653
655
|
}
|
|
@@ -1583,7 +1585,7 @@ class Adaptable {
|
|
|
1583
1585
|
layout.ColumnSorts = columnSorts;
|
|
1584
1586
|
layout.RowGroupedColumns = groupedColumns;
|
|
1585
1587
|
if (Object.keys(aggregatedColumns).length) {
|
|
1586
|
-
//
|
|
1588
|
+
// AG Grid aggregations are not 1-1 with adaptable column-aggregations
|
|
1587
1589
|
layout.AggregationColumns = this.mapAggregationColumnsFromGrid(aggregatedColumns, currentLayout);
|
|
1588
1590
|
}
|
|
1589
1591
|
else {
|
|
@@ -2149,7 +2151,7 @@ class Adaptable {
|
|
|
2149
2151
|
this.gridOptions.api.redrawRows(redrawRowsParams);
|
|
2150
2152
|
}
|
|
2151
2153
|
catch (ex) {
|
|
2152
|
-
(0, LoggingHelper_1.ConsoleLogError)('
|
|
2154
|
+
(0, LoggingHelper_1.ConsoleLogError)('AG Grid redrawRows was unable to find some row nodes. Tried to redraw row nodes: ', rowNodes, ex);
|
|
2153
2155
|
}
|
|
2154
2156
|
}
|
|
2155
2157
|
refreshCells(rowNodes, columns, forceUpdate, suppressFlash = false) {
|
|
@@ -2516,18 +2518,7 @@ class Adaptable {
|
|
|
2516
2518
|
return justGroupColDefs;
|
|
2517
2519
|
}
|
|
2518
2520
|
getFirstRowNode() {
|
|
2519
|
-
|
|
2520
|
-
let rowNode;
|
|
2521
|
-
let foundNode = false;
|
|
2522
|
-
this.gridOptions.api.forEachNode((node) => {
|
|
2523
|
-
if (!foundNode) {
|
|
2524
|
-
if (!node.group) {
|
|
2525
|
-
rowNode = node;
|
|
2526
|
-
foundNode = true;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
});
|
|
2530
|
-
return rowNode;
|
|
2521
|
+
return this.gridOptions.api.getDisplayedRowAtIndex(0);
|
|
2531
2522
|
}
|
|
2532
2523
|
getFirstDisplayedRowNode() {
|
|
2533
2524
|
const firstDisplayedRowIndex = this.gridOptions.api.getFirstDisplayedRow();
|
|
@@ -3048,7 +3039,7 @@ class Adaptable {
|
|
|
3048
3039
|
const agFilterModel = this.gridOptions.api.getFilterModel();
|
|
3049
3040
|
(this.gridOptions.columnApi.getColumns() || []).forEach((col) => {
|
|
3050
3041
|
/**
|
|
3051
|
-
* When
|
|
3042
|
+
* When AG Grid filters are used active state should not be removed for all columns.
|
|
3052
3043
|
* Need to check if the column has a filter model.
|
|
3053
3044
|
*/
|
|
3054
3045
|
const isColumnInFilterModel = agFilterModel && agFilterModel[col.getColId()];
|
|
@@ -3209,7 +3200,7 @@ class Adaptable {
|
|
|
3209
3200
|
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), (!styledColumn
|
|
3210
3201
|
? this.getFormatColumnCellStyle(abColumn, activeFormatColumnsWithStyle, params)
|
|
3211
3202
|
: {})), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
3212
|
-
// remove null values,
|
|
3203
|
+
// remove null values, AG Grid 29 fails, it asumes they are strings
|
|
3213
3204
|
Object.keys(result).forEach((key) => {
|
|
3214
3205
|
if (result[key] === null || result[key] === undefined) {
|
|
3215
3206
|
delete result[key];
|
|
@@ -14,7 +14,7 @@ const createAgStatusPanelComponent = (component, adaptable, context) => {
|
|
|
14
14
|
}), adaptable);
|
|
15
15
|
return (React.createElement("div", { className: "ab-StatusBar", ref: (node) => {
|
|
16
16
|
if (node) {
|
|
17
|
-
// in React rendering,
|
|
17
|
+
// in React rendering, AG Grid renders an additional extra div
|
|
18
18
|
// around the status panel container, with className of 'ag-react-container'
|
|
19
19
|
// which needs to be stretched in order to fill the status panel
|
|
20
20
|
node.parentElement.style.display = 'flex';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export declare type AdaptableMetamodel = Record<string, MetamodelItem>;
|
|
2
2
|
export interface MetamodelItem {
|
|
3
3
|
name: string;
|
|
4
|
-
kind: '
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
kind: 'A' | 'I' | 'C';
|
|
5
|
+
desc: string;
|
|
6
|
+
props?: MetamodelItemProperty[];
|
|
7
7
|
}
|
|
8
8
|
export interface MetamodelItemProperty {
|
|
9
9
|
name: string;
|
|
10
10
|
kind: MetamodelItemPropertyKind;
|
|
11
|
-
|
|
12
|
-
uiLabel
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
desc: string;
|
|
12
|
+
uiLabel?: string;
|
|
13
|
+
ref?: string;
|
|
14
|
+
isOpt?: boolean;
|
|
15
|
+
defVal?: unknown;
|
|
16
16
|
gridInfo?: 'item' | 'container';
|
|
17
17
|
noCode?: 'item' | 'container';
|
|
18
18
|
}
|
|
19
|
-
export declare type MetamodelItemPropertyKind = '
|
|
19
|
+
export declare type MetamodelItemPropertyKind = 'R' | 'n' | 's' | 'b' | 'd' | 'f' | 'a' | 'i' | 'u';
|