@adaptabletools/adaptable 11.1.1 → 11.1.4
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/base.css +2 -0
- package/bundle.cjs.js +119 -119
- package/index.css +3 -0
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
- package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
- package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +4 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +11 -0
- package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -2
- package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
- package/src/AdaptableOptions/SmartEdit.js +2 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +1 -1
- package/src/Api/Implementation/FilterApiImpl.js +8 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +15 -18
- package/src/Api/Implementation/InternalApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +7 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
- package/src/Api/SmartEditApi.d.ts +3 -2
- package/src/PredefinedConfig/ExportState.d.ts +0 -5
- package/src/PredefinedConfig/PopupState.d.ts +2 -1
- package/src/PredefinedConfig/SystemState.d.ts +2 -5
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
- package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
- package/src/Strategy/AlertModule.js +28 -6
- package/src/Strategy/CalculatedColumnModule.js +5 -0
- package/src/Strategy/ExportModule.js +14 -4
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/Interface/IModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.d.ts +23 -0
- package/src/Strategy/LayoutModule.js +70 -0
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +24 -13
- package/src/Strategy/Utilities/getFlashingCellStyleViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/getFlashingCellStyleViewItems.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
- package/src/Utilities/Helpers/StyleHelper.d.ts +1 -0
- package/src/Utilities/Helpers/StyleHelper.js +13 -1
- package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
- package/src/View/AdaptableView.js +2 -2
- package/src/View/AdaptableViewFactory.js +2 -4
- package/src/View/ColorPicker.d.ts +4 -2
- package/src/View/ColorPicker.js +16 -4
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +24 -19
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +3 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +23 -15
- package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
- package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +2 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +10 -6
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/RangesComponent.js +4 -6
- package/src/View/Components/StyleComponent.js +6 -9
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/Dashboard/CustomToolbarWrapper.js +9 -1
- package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
- package/src/View/DataSource/DataSourceViewPanel.js +15 -13
- package/src/View/Export/ExportViewPanel.d.ts +1 -3
- package/src/View/Export/ExportViewPanel.js +1 -17
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -3
- package/src/View/GridInfo/AdaptableObjectsSummary.d.ts +2 -0
- package/src/View/GridInfo/AdaptableObjectsSummary.js +26 -0
- package/src/View/GridInfo/GridInfoPopup.js +13 -5
- package/src/View/Layout/LayoutEditorStandalonePopup.js +3 -4
- package/src/View/Layout/LayoutRadioSelector.d.ts +5 -0
- package/src/View/Layout/LayoutRadioSelector.js +18 -0
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -4
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +6 -1
- package/src/View/Query/ExpandedQueryPopup.d.ts +2 -18
- package/src/View/Query/ExpandedQueryPopup.js +42 -57
- package/src/View/Query/QueryViewPanel.js +8 -5
- package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +15 -3
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
- package/src/agGrid/Adaptable.d.ts +7 -5
- package/src/agGrid/Adaptable.js +63 -56
- package/src/components/ExpressionEditor/index.js +0 -1
- package/src/components/OverlayTrigger/index.js +1 -0
- package/src/components/Radio/index.d.ts +1 -1
- package/src/components/Radio/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +5 -0
- package/src/metamodel/adaptable.metamodel.js +17 -5
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
- package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
- package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
- package/src/View/Export/ExportCustomDestinationFormPopups.js +0 -15
|
@@ -131,6 +131,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
131
131
|
private getAlertRowClass;
|
|
132
132
|
private getAlertRowStyle;
|
|
133
133
|
private getFlashingCellStyle;
|
|
134
|
+
private getFlashingCellClass;
|
|
134
135
|
private getCellHighlightStyle;
|
|
135
136
|
private getRowHighlightStyle;
|
|
136
137
|
private getRowHighlightClass;
|
|
@@ -150,7 +151,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
150
151
|
private updateLayoutFromGrid;
|
|
151
152
|
setSelectedCells(): SelectedCellInfo | undefined;
|
|
152
153
|
setSelectedRows(): SelectedRowInfo | undefined;
|
|
153
|
-
|
|
154
|
+
setDataValue(value: any, column: AdaptableColumn, primaryKeyValue: any, rowNode?: RowNode): void;
|
|
155
|
+
setCellValue(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
154
156
|
cancelEdit(): void;
|
|
155
157
|
isCellEditable(rowNode: RowNode, column: Column): boolean;
|
|
156
158
|
getDistinctValuesForColumn(column: AdaptableColumn, visibleRowsOnly: boolean, skipRowNode?: RowNode, permittedValues?: any[]): GridCell[];
|
|
@@ -164,8 +166,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
164
166
|
[key: string]: boolean;
|
|
165
167
|
}): GridCell[];
|
|
166
168
|
private addDistinctColumnValue;
|
|
167
|
-
private
|
|
168
|
-
getDisplayValue(
|
|
169
|
+
private isCustomRenderedColumn;
|
|
170
|
+
getDisplayValue(primaryKey: any, columnId: string): string | undefined;
|
|
169
171
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
170
172
|
getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): string | undefined;
|
|
171
173
|
getDisplayValueFromRawValue(columnId: string, rawValue: any): string | undefined;
|
|
@@ -312,7 +314,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
312
314
|
getGridData(): any[];
|
|
313
315
|
getFilteredData(): any[];
|
|
314
316
|
loadDataSource(dataSource: any[]): void;
|
|
315
|
-
updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]
|
|
317
|
+
updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
316
318
|
addRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
317
319
|
deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
318
320
|
getFirstGroupedColumn(): AdaptableColumn | undefined;
|
|
@@ -328,7 +330,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
328
330
|
showQuickFilter(): void;
|
|
329
331
|
hideQuickFilter(): void;
|
|
330
332
|
getAgGridColumnType(columnId: string): string | string[];
|
|
331
|
-
getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (
|
|
333
|
+
getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (valueA: any, valueB: any, nodeA?: RowNode, nodeB?: RowNode, isInverted?: boolean) => number | undefined;
|
|
332
334
|
getAgGridLightThemeName(): string;
|
|
333
335
|
getAgGridCurrentThemeName(): string;
|
|
334
336
|
applyAdaptableTheme(theme: AdaptableTheme | string): void;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -57,6 +57,7 @@ const MetamodelService_1 = require("../Utilities/Services/MetamodelService");
|
|
|
57
57
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
58
58
|
const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
|
|
59
59
|
const CheckboxRenderer_1 = require("./CheckboxRenderer");
|
|
60
|
+
const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
|
|
60
61
|
const tinycolor = require('tinycolor2');
|
|
61
62
|
all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
|
|
62
63
|
const GROUP_PATH_SEPARATOR = '/';
|
|
@@ -817,7 +818,8 @@ class Adaptable {
|
|
|
817
818
|
if (reverseGradient) {
|
|
818
819
|
alpha = 1 - alpha;
|
|
819
820
|
}
|
|
820
|
-
|
|
821
|
+
const preparedColor = StyleHelper_1.getVariableColor(cellBackColor);
|
|
822
|
+
style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
|
|
821
823
|
}
|
|
822
824
|
if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
|
|
823
825
|
style.paddingTop = 0;
|
|
@@ -902,6 +904,20 @@ class Adaptable {
|
|
|
902
904
|
? flashingCell.flashingCellDefinition.DownChangeStyle
|
|
903
905
|
: flashingCell.flashingCellDefinition.NeutralChangeStyle)) !== null && _a !== void 0 ? _a : {});
|
|
904
906
|
}
|
|
907
|
+
getFlashingCellClass(col, params) {
|
|
908
|
+
var _a, _b, _c;
|
|
909
|
+
const primaryKey = params.node.aggData
|
|
910
|
+
? params.node.id
|
|
911
|
+
: this.getPrimaryKeyValueFromRowNode(params.node);
|
|
912
|
+
const flashingCell = this.api.internalApi.getAdaptableFlashingCellFor(primaryKey, col.columnId);
|
|
913
|
+
if (!flashingCell) {
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
return flashingCell.direction === 'up'
|
|
917
|
+
? (_a = flashingCell.flashingCellDefinition.UpChangeStyle) === null || _a === void 0 ? void 0 : _a.ClassName : flashingCell.direction === 'down'
|
|
918
|
+
? (_b = flashingCell.flashingCellDefinition.DownChangeStyle) === null || _b === void 0 ? void 0 : _b.ClassName : flashingCell.direction === 'neutral'
|
|
919
|
+
? (_c = flashingCell.flashingCellDefinition.NeutralChangeStyle) === null || _c === void 0 ? void 0 : _c.ClassName : undefined;
|
|
920
|
+
}
|
|
905
921
|
getCellHighlightStyle(col, params) {
|
|
906
922
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
907
923
|
const cellHightlight = this.api.internalApi
|
|
@@ -993,8 +1009,7 @@ class Adaptable {
|
|
|
993
1009
|
return (_b = conditionalStyle.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
994
1010
|
}
|
|
995
1011
|
})
|
|
996
|
-
.filter((x) => !!x)
|
|
997
|
-
.join(' ');
|
|
1012
|
+
.filter((x) => !!x);
|
|
998
1013
|
return classNames;
|
|
999
1014
|
}
|
|
1000
1015
|
getEditableCellClass(abColumn, params) {
|
|
@@ -1483,27 +1498,23 @@ class Adaptable {
|
|
|
1483
1498
|
this.agGridHelper.fireSelectionChangedEvent();
|
|
1484
1499
|
return selectedRowInfo;
|
|
1485
1500
|
}
|
|
1486
|
-
|
|
1501
|
+
setDataValue(value, column, primaryKeyValue, rowNode) {
|
|
1487
1502
|
// note: because we use RowNode.setDataValue() this will cause Validation to fire
|
|
1488
1503
|
// see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
|
|
1489
1504
|
let newValue;
|
|
1490
|
-
let dataType =
|
|
1491
|
-
newValue =
|
|
1492
|
-
dataType == Enums_1.DataType.Number
|
|
1493
|
-
? Number(cellDataChangedInfo.newValue)
|
|
1494
|
-
: cellDataChangedInfo.newValue;
|
|
1505
|
+
let dataType = column.dataType;
|
|
1506
|
+
newValue = dataType == Enums_1.DataType.Number ? Number(value) : value;
|
|
1495
1507
|
if (dataType == undefined) {
|
|
1496
1508
|
return; // no point continuing as probably a wrong column
|
|
1497
1509
|
}
|
|
1498
|
-
if (
|
|
1499
|
-
|
|
1510
|
+
if (rowNode) {
|
|
1511
|
+
rowNode.setDataValue(column.columnId, newValue);
|
|
1500
1512
|
}
|
|
1501
1513
|
else {
|
|
1502
1514
|
if (this.useRowNodeLookUp) {
|
|
1503
|
-
const rowNode = this.gridOptions.api.getRowNode(
|
|
1515
|
+
const rowNode = this.gridOptions.api.getRowNode(primaryKeyValue);
|
|
1504
1516
|
if (rowNode != null) {
|
|
1505
|
-
rowNode.setDataValue(
|
|
1506
|
-
cellDataChangedInfo.rowNode = rowNode;
|
|
1517
|
+
rowNode.setDataValue(column.columnId, newValue);
|
|
1507
1518
|
}
|
|
1508
1519
|
}
|
|
1509
1520
|
else {
|
|
@@ -1511,9 +1522,8 @@ class Adaptable {
|
|
|
1511
1522
|
// prefer not to use this method but if we do then at least we can prevent further lookups once we find
|
|
1512
1523
|
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1513
1524
|
if (!isUpdated) {
|
|
1514
|
-
if (
|
|
1515
|
-
rowNode.setDataValue(
|
|
1516
|
-
cellDataChangedInfo.rowNode = rowNode;
|
|
1525
|
+
if (primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
|
|
1526
|
+
rowNode.setDataValue(column.columnId, newValue);
|
|
1517
1527
|
isUpdated = true;
|
|
1518
1528
|
}
|
|
1519
1529
|
}
|
|
@@ -1521,6 +1531,9 @@ class Adaptable {
|
|
|
1521
1531
|
}
|
|
1522
1532
|
}
|
|
1523
1533
|
}
|
|
1534
|
+
setCellValue(cellDataChangedInfo) {
|
|
1535
|
+
this.setDataValue(cellDataChangedInfo.newValue, cellDataChangedInfo.column, cellDataChangedInfo.primaryKeyValue, cellDataChangedInfo.rowNode);
|
|
1536
|
+
}
|
|
1524
1537
|
cancelEdit() {
|
|
1525
1538
|
this.gridOptions.api.stopEditing(true);
|
|
1526
1539
|
}
|
|
@@ -1679,27 +1692,27 @@ class Adaptable {
|
|
|
1679
1692
|
return undefined;
|
|
1680
1693
|
}
|
|
1681
1694
|
}
|
|
1682
|
-
|
|
1695
|
+
isCustomRenderedColumn(column) {
|
|
1683
1696
|
if (!column || column.isGrouped) {
|
|
1684
|
-
return
|
|
1697
|
+
return false;
|
|
1685
1698
|
}
|
|
1686
|
-
// we need to return false if the column has a cell
|
|
1699
|
+
// we need to return false if the column has a cell renderer i think...
|
|
1687
1700
|
const colDef = this.gridOptions.api.getColumnDef(column.columnId);
|
|
1688
1701
|
if (colDef && colDef.cellRenderer != null) {
|
|
1689
|
-
return
|
|
1702
|
+
return true;
|
|
1690
1703
|
}
|
|
1691
1704
|
if (this.api.columnApi.isFormatNumericStyleColumn(column)) {
|
|
1692
|
-
return
|
|
1705
|
+
return true;
|
|
1693
1706
|
}
|
|
1694
1707
|
if (this.api.columnApi.isBooleanColumn(column)) {
|
|
1695
|
-
return
|
|
1708
|
+
return true;
|
|
1696
1709
|
}
|
|
1697
|
-
return
|
|
1710
|
+
return false;
|
|
1698
1711
|
}
|
|
1699
|
-
getDisplayValue(
|
|
1712
|
+
getDisplayValue(primaryKey, columnId) {
|
|
1700
1713
|
let returnValue;
|
|
1701
1714
|
if (this.useRowNodeLookUp) {
|
|
1702
|
-
const rowNode = this.
|
|
1715
|
+
const rowNode = this.getRowNodeForPrimaryKey(primaryKey);
|
|
1703
1716
|
return this.getDisplayValueFromRowNode(rowNode, columnId);
|
|
1704
1717
|
}
|
|
1705
1718
|
else {
|
|
@@ -1707,7 +1720,7 @@ class Adaptable {
|
|
|
1707
1720
|
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1708
1721
|
if (!foundRow) {
|
|
1709
1722
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
1710
|
-
if (
|
|
1723
|
+
if (primaryKey == primaryKeyValue) {
|
|
1711
1724
|
returnValue = this.getDisplayValueFromRowNode(rowNode, columnId);
|
|
1712
1725
|
}
|
|
1713
1726
|
foundRow = true;
|
|
@@ -1790,10 +1803,17 @@ class Adaptable {
|
|
|
1790
1803
|
return formatterFn(params);
|
|
1791
1804
|
}
|
|
1792
1805
|
getNormalisedValueFromRowValue(rawValue, displayValue, column) {
|
|
1806
|
+
// not sure if the current implementation is correct:
|
|
1807
|
+
// the returned "normalised value" is actually the displayed value in almost all cases?!
|
|
1808
|
+
// ex. how to read the following: if 'rawValue' is NOT a number, return normalised version of rawValue, but if rawValue IS a number, return displayedValue of it (which will almost certainly will NOT be a number)
|
|
1809
|
+
// if (dataType === 'Number') {
|
|
1810
|
+
// return typeof rawValue !== 'number' ? Number(rawValue) : returnValue;
|
|
1811
|
+
// }
|
|
1812
|
+
// anyway, it seems to work so far (as of v11.1.3), so I'm leaving it for now :)
|
|
1793
1813
|
if (!column) {
|
|
1794
1814
|
return rawValue;
|
|
1795
1815
|
}
|
|
1796
|
-
const returnValue = this.
|
|
1816
|
+
const returnValue = this.isCustomRenderedColumn(column) ? rawValue : displayValue;
|
|
1797
1817
|
if (returnValue === undefined || returnValue === null) {
|
|
1798
1818
|
return rawValue;
|
|
1799
1819
|
}
|
|
@@ -1807,13 +1827,15 @@ class Adaptable {
|
|
|
1807
1827
|
if (dataType === 'Boolean') {
|
|
1808
1828
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : returnValue;
|
|
1809
1829
|
}
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
// -- an incorrect comparison is made (new Date().toString).incudes('query)
|
|
1830
|
+
if (dataType === 'Date') {
|
|
1831
|
+
return rawValue instanceof Date ? rawValue : DateHelper_1.parseDateValue(rawValue);
|
|
1832
|
+
}
|
|
1814
1833
|
return returnValue;
|
|
1815
1834
|
}
|
|
1816
1835
|
getRawValueFromRowNode(rowNode, columnId) {
|
|
1836
|
+
if (rowNode == null) {
|
|
1837
|
+
return undefined;
|
|
1838
|
+
}
|
|
1817
1839
|
return this.gridOptions.api.getValue(columnId, rowNode);
|
|
1818
1840
|
}
|
|
1819
1841
|
getDataRowFromRowNode(rowNode) {
|
|
@@ -2093,7 +2115,10 @@ class Adaptable {
|
|
|
2093
2115
|
if (newlyCreatedSpecialColDef) {
|
|
2094
2116
|
// if it's a special column and we have a special col def for it, return the special col def
|
|
2095
2117
|
processedSpecialColDefIds.push(colDef.colId);
|
|
2096
|
-
|
|
2118
|
+
// merge the user defined colDef with the special col def
|
|
2119
|
+
// this way the user may provide some custom settings for the special col def (tooltip, etc)
|
|
2120
|
+
const mergedColDef = Object.assign(Object.assign({}, colDef), newlyCreatedSpecialColDef);
|
|
2121
|
+
return mergedColDef;
|
|
2097
2122
|
}
|
|
2098
2123
|
else {
|
|
2099
2124
|
// otherwise, return the original col def
|
|
@@ -2842,14 +2867,13 @@ class Adaptable {
|
|
|
2842
2867
|
const hasConditionalStylesWithClassNames = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles);
|
|
2843
2868
|
const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
|
|
2844
2869
|
const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
|
|
2845
|
-
const classNameMap = {};
|
|
2846
2870
|
const cellClass = (params) => {
|
|
2847
|
-
var _a;
|
|
2848
2871
|
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
|
|
2849
2872
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2850
2873
|
const editableClassName = this.getEditableCellClass(abColumn, params);
|
|
2851
2874
|
const readonlyClassName = this.getReadonlyCellClass(abColumn, params);
|
|
2852
2875
|
const highlightAlertClassName = this.getAlertCellClass(abColumn, params);
|
|
2876
|
+
const flashingClassName = this.getFlashingCellClass(abColumn, params);
|
|
2853
2877
|
const returnValue = [
|
|
2854
2878
|
this.getExcelClassNameForCell(colId, primaryKeyValue),
|
|
2855
2879
|
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
@@ -2861,29 +2885,11 @@ class Adaptable {
|
|
|
2861
2885
|
editableClassName,
|
|
2862
2886
|
readonlyClassName,
|
|
2863
2887
|
highlightAlertClassName,
|
|
2888
|
+
flashingClassName,
|
|
2864
2889
|
]
|
|
2865
|
-
// we flatten the array because 'userCellClass' might return a string[]
|
|
2890
|
+
// we flatten the array because some rules ('userCellClass',conditionalStyles etc) might return a string[]
|
|
2866
2891
|
.flat()
|
|
2867
2892
|
.filter((x) => !!x);
|
|
2868
|
-
const returnValueHash = returnValue.join(' ');
|
|
2869
|
-
const primaryKey = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2870
|
-
const key = `${primaryKey}:${params.colDef.colId}`;
|
|
2871
|
-
if (classNameMap[key] &&
|
|
2872
|
-
classNameMap[key] !== returnValueHash &&
|
|
2873
|
-
// only hard-reset when removing class-names
|
|
2874
|
-
// ag-grid does not remove class-names, it accumulates them
|
|
2875
|
-
// https://www.ag-grid.com/javascript-data-grid/cell-styles/#refresh-of-styles
|
|
2876
|
-
returnValueHash.length < ((_a = classNameMap[key]) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2877
|
-
setTimeout(() => {
|
|
2878
|
-
/**
|
|
2879
|
-
* This is called inside a getter function, inside ag-grid.
|
|
2880
|
-
* To allow ag-grid run it's logic, the redraw is done inside an timeout
|
|
2881
|
-
* to make sure it is not done in an inappropriate time.
|
|
2882
|
-
*/
|
|
2883
|
-
params.api.redrawRows({ rowNodes: [params.node] });
|
|
2884
|
-
}, 0);
|
|
2885
|
-
}
|
|
2886
|
-
classNameMap[key] = returnValueHash;
|
|
2887
2893
|
return returnValue.length ? returnValue : undefined;
|
|
2888
2894
|
};
|
|
2889
2895
|
return cellClass;
|
|
@@ -4195,7 +4201,8 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4195
4201
|
}
|
|
4196
4202
|
convertCSSToExcelStyle(style) {
|
|
4197
4203
|
const getHexColor = (color) => {
|
|
4198
|
-
const
|
|
4204
|
+
const preparedColor = StyleHelper_1.getVariableColor(color);
|
|
4205
|
+
const t = tinycolor(preparedColor);
|
|
4199
4206
|
const a = t.getAlpha();
|
|
4200
4207
|
return tinycolor.mix(tinycolor('white'), t, a * 100).toHexString();
|
|
4201
4208
|
};
|
|
@@ -135,7 +135,6 @@ function ExpressionEditor(props) {
|
|
|
135
135
|
React.createElement(rebass_1.Box, { "data-name": "expression-column-picker", pb: 2, paddingLeft: 2, style: {
|
|
136
136
|
overflow: 'auto',
|
|
137
137
|
minWidth: 220,
|
|
138
|
-
maxWidth: '30%',
|
|
139
138
|
height: '100%',
|
|
140
139
|
paddingRight: 'var(--ab-space-2)',
|
|
141
140
|
} },
|
|
@@ -17,7 +17,7 @@ export declare const useRadioContext: <T extends unknown>() => {
|
|
|
17
17
|
onChange: (value: T) => void;
|
|
18
18
|
name: string;
|
|
19
19
|
};
|
|
20
|
-
declare const Radio: ({ children, checked, onChange, value, name, gapDistance, childrenPosition, as, id, tabIndex, ...props }: RadioProps) => JSX.Element;
|
|
20
|
+
declare const Radio: ({ children, checked, onChange, value, name, gapDistance, childrenPosition, as, id, tabIndex, disabled, ...props }: RadioProps) => JSX.Element;
|
|
21
21
|
export declare const RadioGroup: <T extends unknown>(props: FlexProps & {
|
|
22
22
|
orientation: 'horizontal' | 'vertical';
|
|
23
23
|
value?: T;
|
|
@@ -15,7 +15,7 @@ exports.useRadioContext = () => {
|
|
|
15
15
|
return React.useContext(RadioContext);
|
|
16
16
|
};
|
|
17
17
|
const Radio = (_a) => {
|
|
18
|
-
var { children, checked, onChange, value, name, gapDistance = 10, childrenPosition = 'end', as = 'label', id, tabIndex } = _a, props = tslib_1.__rest(_a, ["children", "checked", "onChange", "value", "name", "gapDistance", "childrenPosition", "as", "id", "tabIndex"]);
|
|
18
|
+
var { children, checked, onChange, value, name, gapDistance = 10, childrenPosition = 'end', as = 'label', id, tabIndex, disabled } = _a, props = tslib_1.__rest(_a, ["children", "checked", "onChange", "value", "name", "gapDistance", "childrenPosition", "as", "id", "tabIndex", "disabled"]);
|
|
19
19
|
const context = exports.useRadioContext();
|
|
20
20
|
const { value: contextValue, onChange: contextOnChange, name: contextName } = context;
|
|
21
21
|
const [stateChecked, setStateChecked] = react_1.useState(false);
|
|
@@ -44,7 +44,7 @@ const Radio = (_a) => {
|
|
|
44
44
|
return (React.createElement(rebass_1.Box, Object.assign({ className: "ab-Radio", my: 2 }, props, { style: Object.assign({ display: 'inline-flex', flexFlow: 'row', alignItems: 'center', cursor: 'pointer', position: 'relative' }, props.style), as: as }),
|
|
45
45
|
before,
|
|
46
46
|
beforeGap,
|
|
47
|
-
React.createElement("input", { className: "ab-Radio-input", id: id, checked: computedChecked, type: "radio", name: name !== null && name !== void 0 ? name : contextName, value: value, tabIndex: tabIndex, style: {
|
|
47
|
+
React.createElement("input", { disabled: disabled, className: "ab-Radio-input", id: id, checked: computedChecked, type: "radio", name: name !== null && name !== void 0 ? name : contextName, value: value, tabIndex: tabIndex, style: {
|
|
48
48
|
verticalAlign: 'middle',
|
|
49
49
|
borderRadius: '50%',
|
|
50
50
|
cursor: 'pointer',
|
|
@@ -3601,6 +3601,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3601
3601
|
isOptional: boolean;
|
|
3602
3602
|
}[];
|
|
3603
3603
|
};
|
|
3604
|
+
TOAST_POSITIONS: {
|
|
3605
|
+
name: string;
|
|
3606
|
+
kind: string;
|
|
3607
|
+
description: string;
|
|
3608
|
+
};
|
|
3604
3609
|
ToolPanelApi: {
|
|
3605
3610
|
name: string;
|
|
3606
3611
|
kind: string;
|
|
@@ -3574,7 +3574,7 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
3574
3574
|
{
|
|
3575
3575
|
"name": "agGridContainerWaitTimeout",
|
|
3576
3576
|
"kind": "number",
|
|
3577
|
-
"description": "
|
|
3577
|
+
"description": "How long AdapTable waits for AG Grid before giving up connecting to it",
|
|
3578
3578
|
"uiLabel": "Ag Grid Container Wait Timeout",
|
|
3579
3579
|
"isOptional": true,
|
|
3580
3580
|
"gridInfo": "item",
|
|
@@ -4287,7 +4287,7 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
4287
4287
|
{
|
|
4288
4288
|
"name": "buttonsLocation",
|
|
4289
4289
|
"kind": "unknown",
|
|
4290
|
-
"description": "
|
|
4290
|
+
"description": "Where in Dashboard to display Module and Custom Buttons",
|
|
4291
4291
|
"uiLabel": "Buttons Location",
|
|
4292
4292
|
"isOptional": true,
|
|
4293
4293
|
"defaultValue": "'right'"
|
|
@@ -8365,6 +8365,13 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
8365
8365
|
"isOptional": true,
|
|
8366
8366
|
"gridInfo": "item",
|
|
8367
8367
|
"defaultValue": "false"
|
|
8368
|
+
},
|
|
8369
|
+
{
|
|
8370
|
+
"name": "view",
|
|
8371
|
+
"kind": "unknown",
|
|
8372
|
+
"description": "Options to customize how layout items are shown in Settings Panel",
|
|
8373
|
+
"uiLabel": "View",
|
|
8374
|
+
"isOptional": true
|
|
8368
8375
|
}
|
|
8369
8376
|
]
|
|
8370
8377
|
},
|
|
@@ -8592,12 +8599,12 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
8592
8599
|
"isOptional": true,
|
|
8593
8600
|
"gridInfo": "item",
|
|
8594
8601
|
"defaultValue": "'BottomRight'",
|
|
8595
|
-
"reference": "
|
|
8602
|
+
"reference": "TOAST_POSITIONS"
|
|
8596
8603
|
},
|
|
8597
8604
|
{
|
|
8598
8605
|
"name": "showApplicationIcon",
|
|
8599
8606
|
"kind": "boolean",
|
|
8600
|
-
"description": "Displays the application icon in Notifications
|
|
8607
|
+
"description": "Displays the application icon in Notifications",
|
|
8601
8608
|
"uiLabel": "Show Application Icon",
|
|
8602
8609
|
"isOptional": true,
|
|
8603
8610
|
"defaultValue": "false"
|
|
@@ -8614,7 +8621,7 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
8614
8621
|
{
|
|
8615
8622
|
"name": "showSystemStatusMessageNotifications",
|
|
8616
8623
|
"kind": "boolean",
|
|
8617
|
-
"description": "Display
|
|
8624
|
+
"description": "Display System Status Messages as Notifications",
|
|
8618
8625
|
"uiLabel": "Show System Status Message Notifications",
|
|
8619
8626
|
"isOptional": true,
|
|
8620
8627
|
"gridInfo": "item",
|
|
@@ -11172,6 +11179,11 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
11172
11179
|
}
|
|
11173
11180
|
]
|
|
11174
11181
|
},
|
|
11182
|
+
"TOAST_POSITIONS": {
|
|
11183
|
+
"name": "TOAST_POSITIONS",
|
|
11184
|
+
"kind": "TypeAlias",
|
|
11185
|
+
"description": "Different positions offered by Notifications"
|
|
11186
|
+
},
|
|
11175
11187
|
"ToolPanelApi": {
|
|
11176
11188
|
"name": "ToolPanelApi",
|
|
11177
11189
|
"kind": "Interface",
|
package/src/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { AdaptableOptions } from './AdaptableOptions/AdaptableOptions';
|
|
|
9
9
|
export { AdaptablePlugin } from './AdaptableOptions/AdaptablePlugin';
|
|
10
10
|
export type { ContainerOptions } from './AdaptableOptions/ContainerOptions';
|
|
11
11
|
export type { FlashingCellOptions } from './AdaptableOptions/FlashingCellOptions';
|
|
12
|
-
export type { NotificationsOptions } from './AdaptableOptions/NotificationsOptions';
|
|
12
|
+
export type { TOAST_POSITIONS, NotificationsOptions, } from './AdaptableOptions/NotificationsOptions';
|
|
13
13
|
export type { AlertOptions, ActionHandler, AlertForm, AlertButtonContext, } from './AdaptableOptions/AlertOptions';
|
|
14
14
|
export type { DashboardOptions, CustomToolbar, DashboardButtonContext, CustomToolbarButtonContext, } from './AdaptableOptions/DashboardOptions';
|
|
15
15
|
export type { EditOptions, ValidationResult } from './AdaptableOptions/EditOptions';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "11.1.
|
|
1
|
+
declare const _default: "11.1.4";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '11.1.
|
|
3
|
+
exports.default = '11.1.4'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CustomDestination } from '../../AdaptableOptions/ExportOptions';
|
|
3
|
-
import { Report } from '../../PredefinedConfig/ExportState';
|
|
4
|
-
interface ExportCustomDestinationDialogProps {
|
|
5
|
-
report: Report;
|
|
6
|
-
customDestination: CustomDestination;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
onDismiss: () => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function ExportCustomDestinationDialog({ report, customDestination, isOpen, onDismiss, }: ExportCustomDestinationDialogProps): JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExportCustomDestinationDialog = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const rebass_1 = require("rebass");
|
|
7
|
-
const AdaptableForm_1 = require("../../PredefinedConfig/Common/AdaptableForm");
|
|
8
|
-
const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
|
|
9
|
-
const AdaptableFormComponent_1 = require("../../components/AdaptableFormComponent");
|
|
10
|
-
const AdaptableContext_1 = require("../AdaptableContext");
|
|
11
|
-
function ExportCustomDestinationDialog({ report, customDestination,
|
|
12
|
-
//onSubmit,
|
|
13
|
-
isOpen, onDismiss, }) {
|
|
14
|
-
const [data, setData] = React.useState({});
|
|
15
|
-
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
|
-
const context = React.useMemo(() => {
|
|
17
|
-
return {
|
|
18
|
-
adaptableApi: adaptable.api,
|
|
19
|
-
report,
|
|
20
|
-
reportData: undefined,
|
|
21
|
-
customDestination,
|
|
22
|
-
formData: data,
|
|
23
|
-
};
|
|
24
|
-
}, [data]);
|
|
25
|
-
const formDef = customDestination === null || customDestination === void 0 ? void 0 : customDestination.form;
|
|
26
|
-
React.useEffect(() => {
|
|
27
|
-
if (formDef) {
|
|
28
|
-
setData(Object.assign(Object.assign({}, AdaptableForm_1.getDefaultAdaptableFormData(formDef)), data));
|
|
29
|
-
}
|
|
30
|
-
}, [formDef]);
|
|
31
|
-
return (React.createElement(Dialog_1.default, { isOpen: isOpen, showCloseButton: false, style: { minHeight: 'auto', minWidth: 400 }, onDismiss: () => {
|
|
32
|
-
onDismiss();
|
|
33
|
-
} }, isOpen && (React.createElement(rebass_1.Box, { padding: 4 },
|
|
34
|
-
React.createElement(AdaptableFormComponent_1.AdaptableFormComponent, { formDef: formDef, data: data, context: context, onChange: setData, api: adaptable.api, displayTitle: true, onButtonClick: (button) => {
|
|
35
|
-
onDismiss();
|
|
36
|
-
// we want to give the current popup time to close
|
|
37
|
-
// and we reopen with a delay in case this button action causes another popup
|
|
38
|
-
setTimeout(() => {
|
|
39
|
-
var _a;
|
|
40
|
-
context.reportData = adaptable.api.internalApi
|
|
41
|
-
.getReportService()
|
|
42
|
-
.getReportData(report);
|
|
43
|
-
(_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, context);
|
|
44
|
-
}, 20);
|
|
45
|
-
} })))));
|
|
46
|
-
}
|
|
47
|
-
exports.ExportCustomDestinationDialog = ExportCustomDestinationDialog;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExportCustomDestinationFormPopups = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_redux_1 = require("react-redux");
|
|
7
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
8
|
-
const ExportCustomDestinationDialog_1 = require("./ExportCustomDestinationDialog");
|
|
9
|
-
exports.ExportCustomDestinationFormPopups = (props) => {
|
|
10
|
-
var _a;
|
|
11
|
-
const dispatch = react_redux_1.useDispatch();
|
|
12
|
-
const customDestinationPopups = react_redux_1.useSelector(SystemRedux.getSystemExportCustomDestinationPopups);
|
|
13
|
-
const handleDismiss = React.useCallback((config) => dispatch(SystemRedux.SystemExportCustomDestinationPopupHide(config)), []);
|
|
14
|
-
return (React.createElement(React.Fragment, null, (_a = (customDestinationPopups || [])) === null || _a === void 0 ? void 0 : _a.map((customDestinationPopup) => customDestinationPopup && (React.createElement(ExportCustomDestinationDialog_1.ExportCustomDestinationDialog, { isOpen: true, key: `${customDestinationPopup.ReportName}-${customDestinationPopup.ExportDestination.name}`, report: props.api.exportApi.getReportByName(customDestinationPopup.ReportName), customDestination: customDestinationPopup.ExportDestination, onDismiss: () => handleDismiss(customDestinationPopup) })))));
|
|
15
|
-
};
|