@adaptabletools/adaptable 15.0.0-canary.0 → 15.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs.js +247 -262
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +42 -42
- package/src/AdaptableOptions/ActionOptions.d.ts +31 -31
- 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 +25 -25
- package/src/Api/ChartingApi.d.ts +22 -18
- package/src/Api/ColumnApi.d.ts +3 -3
- package/src/Api/EventApi.d.ts +13 -1
- package/src/Api/Events/ActionRowSubmitted.d.ts +8 -8
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/Events/ThemeChanged.d.ts +6 -0
- package/src/Api/FilterApi.d.ts +2 -2
- package/src/Api/FinanceApi.d.ts +9 -9
- package/src/Api/FormatColumnApi.d.ts +6 -6
- package/src/Api/FreeTextColumnApi.d.ts +3 -3
- package/src/Api/GridApi.d.ts +30 -30
- package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ChartingApiImpl.js +4 -1
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
- package/src/Api/Implementation/FilterApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -6
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +29 -29
- package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
- package/src/Api/Implementation/ThemeApiImpl.js +14 -0
- package/src/Api/Internal/ActionInternalApi.d.ts +3 -3
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -3
- package/src/Api/Internal/AlertInternalApi.d.ts +3 -3
- package/src/Api/Internal/FilterInternalApi.d.ts +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +7 -7
- package/src/Api/Internal/GridInternalApi.d.ts +4 -4
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -3
- 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 +5 -6
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
- package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +5 -5
- package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
- package/src/PredefinedConfig/Common/Menu.d.ts +9 -9
- package/src/PredefinedConfig/Selection/GridCell.d.ts +4 -4
- package/src/PredefinedConfig/Selection/GridRow.d.ts +4 -4
- 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 +5 -5
- 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/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
- package/src/Utilities/Interface/Preview.d.ts +2 -2
- package/src/Utilities/ObjectFactory.d.ts +5 -3
- package/src/Utilities/ObjectFactory.js +10 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +2 -2
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -2
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/Interface/IReportService.d.ts +3 -3
- 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/QueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/ReportService.d.ts +4 -4
- 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 +2 -2
- 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/ActionColumnRenderer.js +1 -0
- package/src/agGrid/Adaptable.d.ts +42 -41
- package/src/agGrid/Adaptable.js +20 -27
- 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()];
|
|
@@ -3197,14 +3188,6 @@ class Adaptable {
|
|
|
3197
3188
|
}
|
|
3198
3189
|
setupColumnCellStyle({ col, colId, abColumn }) {
|
|
3199
3190
|
this.setColDefProperty(col, 'cellStyle', (userCellStyle) => {
|
|
3200
|
-
const defaultCellStyle = {
|
|
3201
|
-
backgroundColor: null,
|
|
3202
|
-
color: null,
|
|
3203
|
-
fontWeight: null,
|
|
3204
|
-
fontStyle: null,
|
|
3205
|
-
fontSize: null,
|
|
3206
|
-
borderColor: null,
|
|
3207
|
-
};
|
|
3208
3191
|
const activeFormatColumnsWithStyle = this.api.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(abColumn);
|
|
3209
3192
|
let styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(colId);
|
|
3210
3193
|
if (styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.IsSuspended) {
|
|
@@ -3214,9 +3197,15 @@ class Adaptable {
|
|
|
3214
3197
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
3215
3198
|
const cellStyle = (params) => {
|
|
3216
3199
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
3217
|
-
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
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
|
|
3218
3201
|
? this.getFormatColumnCellStyle(abColumn, activeFormatColumnsWithStyle, params)
|
|
3219
3202
|
: {})), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
3203
|
+
// remove null values, AG Grid 29 fails, it asumes they are strings
|
|
3204
|
+
Object.keys(result).forEach((key) => {
|
|
3205
|
+
if (result[key] === null || result[key] === undefined) {
|
|
3206
|
+
delete result[key];
|
|
3207
|
+
}
|
|
3208
|
+
});
|
|
3220
3209
|
return result;
|
|
3221
3210
|
};
|
|
3222
3211
|
return cellStyle;
|
|
@@ -3259,7 +3248,6 @@ class Adaptable {
|
|
|
3259
3248
|
.flat()
|
|
3260
3249
|
.filter((x) => !!x);
|
|
3261
3250
|
const result = returnValue.length ? returnValue : undefined;
|
|
3262
|
-
// console.log(result);
|
|
3263
3251
|
return result;
|
|
3264
3252
|
};
|
|
3265
3253
|
return cellClass;
|
|
@@ -4663,6 +4651,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4663
4651
|
// recreating the standard AG Grid styling for row groups: 'Parent -> Child'
|
|
4664
4652
|
// additionally the values are formatted
|
|
4665
4653
|
let rowGroupNode = params.node;
|
|
4654
|
+
const isFooterRow = rowGroupNode.footer;
|
|
4666
4655
|
const rowGroupSummary = [(_a = this.processRowGroupForExcelExport(rowGroupNode)) !== null && _a !== void 0 ? _a : ''];
|
|
4667
4656
|
while (rowGroupNode.parent) {
|
|
4668
4657
|
rowGroupNode = rowGroupNode.parent;
|
|
@@ -4671,7 +4660,11 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4671
4660
|
rowGroupSummary.push(formattedParentNode);
|
|
4672
4661
|
}
|
|
4673
4662
|
}
|
|
4674
|
-
|
|
4663
|
+
let summary = rowGroupSummary.reverse().join(' -> ');
|
|
4664
|
+
if (isFooterRow) {
|
|
4665
|
+
summary = `Total: ${summary}`;
|
|
4666
|
+
}
|
|
4667
|
+
return summary;
|
|
4675
4668
|
},
|
|
4676
4669
|
});
|
|
4677
4670
|
// keep only the user defined props
|
|
@@ -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';
|