@adaptabletools/adaptable 11.1.1-canary.2 → 11.1.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.
Files changed (73) hide show
  1. package/README.md +6 -4
  2. package/base.css +2 -0
  3. package/bundle.cjs.js +97 -97
  4. package/index.css +3 -0
  5. package/package.json +2 -2
  6. package/publishTimestamp.d.ts +1 -1
  7. package/publishTimestamp.js +1 -1
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  9. package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
  10. package/src/AdaptableOptions/LayoutOptions.d.ts +11 -0
  11. package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -2
  12. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  13. package/src/Api/Implementation/EventApiImpl.js +2 -1
  14. package/src/Api/Implementation/GridApiImpl.js +9 -10
  15. package/src/Api/Implementation/InternalApiImpl.js +1 -1
  16. package/src/Api/Implementation/LayoutApiImpl.js +7 -1
  17. package/src/Api/QueryLanguageApi.d.ts +6 -6
  18. package/src/Strategy/AlertModule.js +24 -5
  19. package/src/Strategy/CalculatedColumnModule.js +5 -0
  20. package/src/Strategy/FreeTextColumnModule.js +1 -1
  21. package/src/Strategy/Interface/IModule.d.ts +2 -1
  22. package/src/Strategy/LayoutModule.d.ts +23 -0
  23. package/src/Strategy/LayoutModule.js +70 -0
  24. package/src/Strategy/Utilities/getFlashingCellStyleViewItems.d.ts +1 -0
  25. package/src/Strategy/Utilities/getFlashingCellStyleViewItems.js +2 -1
  26. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  27. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
  28. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  29. package/src/Utilities/Emitter.d.ts +1 -1
  30. package/src/Utilities/Emitter.js +3 -6
  31. package/src/Utilities/Helpers/StyleHelper.d.ts +1 -0
  32. package/src/Utilities/Helpers/StyleHelper.js +13 -1
  33. package/src/View/AdaptableViewFactory.js +2 -4
  34. package/src/View/ColorPicker.d.ts +4 -2
  35. package/src/View/ColorPicker.js +16 -4
  36. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +24 -19
  37. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +3 -1
  38. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +23 -15
  39. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +2 -0
  40. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +9 -5
  41. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  42. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  43. package/src/View/Components/RangesComponent.js +4 -6
  44. package/src/View/Components/StyleComponent.js +6 -9
  45. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  46. package/src/View/Components/ValueSelector/index.js +1 -1
  47. package/src/View/Dashboard/CustomToolbarWrapper.js +9 -1
  48. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -3
  49. package/src/View/GridInfo/AdaptableObjectsSummary.d.ts +2 -0
  50. package/src/View/GridInfo/AdaptableObjectsSummary.js +26 -0
  51. package/src/View/GridInfo/GridInfoPopup.js +13 -5
  52. package/src/View/Layout/LayoutEditorStandalonePopup.js +3 -4
  53. package/src/View/Layout/LayoutRadioSelector.d.ts +5 -0
  54. package/src/View/Layout/LayoutRadioSelector.js +18 -0
  55. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -4
  56. package/src/View/Layout/Wizard/LayoutEditorWizard.js +6 -1
  57. package/src/View/Query/ExpandedQueryPopup.d.ts +2 -18
  58. package/src/View/Query/ExpandedQueryPopup.js +42 -57
  59. package/src/View/Query/QueryViewPanel.js +8 -5
  60. package/src/agGrid/Adaptable.d.ts +3 -1
  61. package/src/agGrid/Adaptable.js +80 -50
  62. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -0
  63. package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -2
  64. package/src/components/ExpressionEditor/index.js +0 -1
  65. package/src/components/OverlayTrigger/index.js +1 -0
  66. package/src/components/Radio/index.d.ts +1 -1
  67. package/src/components/Radio/index.js +2 -2
  68. package/src/metamodel/adaptable.metamodel.d.ts +5 -0
  69. package/src/metamodel/adaptable.metamodel.js +20 -8
  70. package/src/types.d.ts +1 -1
  71. package/version.d.ts +1 -1
  72. package/version.js +1 -1
  73. package/LICENSE.md +0 -264
@@ -9,62 +9,47 @@ const ExpressionEditor_1 = require("../../components/ExpressionEditor");
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
10
10
  const QueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QueryRedux"));
11
11
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
12
- const PanelWithButton_1 = require("../Components/Panels/PanelWithButton");
13
12
  const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
14
13
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
15
- class ExpandedQueryPopupComponent extends React.Component {
16
- constructor(props) {
17
- super(props);
18
- this.state = {
19
- namedQuery: false,
20
- expression: this.props.popupParams.value,
21
- };
22
- }
23
- render() {
24
- const isExpressionValid = this.props.api.internalApi
25
- .getQueryLanguageService()
26
- .validateBoolean(this.state.expression, ModuleConstants_1.QueryModuleId).isValid;
27
- const initialData = this.props.api.internalApi.getQueryPreviewData();
28
- const namedQueryValidationError = this.state.namedQuery
29
- ? this.props.api.queryApi.isValidNamedQueryName(this.state.namedQuery).message
30
- : '';
31
- const hasNamedQueryError = StringExtensions_1.IsNotNullOrEmpty(namedQueryValidationError);
32
- return (React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: {
33
- namedQuery: this.state.namedQuery,
34
- setNamedQuery: (namedQuery) => this.setState({ namedQuery }),
35
- } },
36
- React.createElement(PanelWithButton_1.PanelWithButton, { headerText: "Current Query", bodyProps: {
37
- padding: 0,
38
- style: { display: 'flex', flexDirection: 'column' },
39
- }, glyphicon: this.props.moduleInfo.Glyph },
40
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: (expression) => this.setState({ expression }), initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getAllNamedQuery(), api: this.props.api }),
41
- React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, backgroundColor: "primary", alignItems: "center" },
42
- React.createElement(SimpleButton_1.default, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
43
- this.props.onClosePopup();
44
- } }, "CLOSE"),
45
- React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, style: {
46
- flex: 1,
47
- color: 'var(--ab-color-error)',
48
- textAlign: 'end',
49
- } }, namedQueryValidationError),
50
- React.createElement(SimpleButton_1.default, { variant: "raised", tone: "accent", "data-name": "action-run", margin: 1, onClick: () => {
51
- if (this.state.namedQuery) {
52
- this.props.onAddNamedQuery(this.state.namedQuery);
53
- }
54
- this.props.onRunQuery(this.state.expression);
55
- this.props.onClosePopup();
56
- }, disabled: !isExpressionValid || StringExtensions_1.IsNullOrEmpty(this.state.expression) || hasNamedQueryError }, "Run Query")))));
57
- }
58
- }
59
- function mapStateToProps() {
60
- return {
61
- // GridState: state.Grid,
62
- };
63
- }
64
- function mapDispatchToProps(dispatch) {
65
- return {
66
- onRunQuery: (expression) => dispatch(QueryRedux.QueryRun(expression)),
67
- onAddNamedQuery: (namedQuery) => dispatch(QueryRedux.NamedQueryAdd(namedQuery)),
68
- };
69
- }
70
- exports.ExpandedQueryPopup = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(ExpandedQueryPopupComponent);
14
+ exports.ExpandedQueryPopup = (props) => {
15
+ const dispatch = react_redux_1.useDispatch();
16
+ const [namedQuery, setNamedQuery] = React.useState(null);
17
+ const [expression, setExpression] = React.useState(props.popupProps.value);
18
+ const isExpressionValid = props.api.internalApi
19
+ .getQueryLanguageService()
20
+ .validateBoolean(expression, ModuleConstants_1.QueryModuleId).isValid;
21
+ const initialData = React.useMemo(() => props.api.internalApi.getQueryPreviewData(), []);
22
+ const namedQueryValidationError = namedQuery
23
+ ? props.api.queryApi.isValidNamedQueryName(namedQuery).message
24
+ : '';
25
+ const hasNamedQueryError = StringExtensions_1.IsNotNullOrEmpty(namedQueryValidationError);
26
+ const onRunQuery = (expression) => dispatch(QueryRedux.QueryRun(expression));
27
+ const onAddNamedQuery = (namedQuery) => dispatch(QueryRedux.NamedQueryAdd(namedQuery));
28
+ return (React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: {
29
+ namedQuery: namedQuery,
30
+ setNamedQuery: (newQuery) => {
31
+ setNamedQuery(newQuery);
32
+ },
33
+ } },
34
+ React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column" },
35
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: expression, onChange: (expression) => setExpression(expression), initialData: initialData, columns: props.api.columnApi.getQueryableColumns(), namedQueries: props.api.queryApi.getAllNamedQuery(), api: props.api }),
36
+ React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, backgroundColor: "primary", alignItems: "center" },
37
+ React.createElement(SimpleButton_1.default, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
38
+ props.onDismiss();
39
+ } }, "CLOSE"),
40
+ React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, style: {
41
+ flex: 1,
42
+ color: 'var(--ab-color-error)',
43
+ textAlign: 'end',
44
+ } }, namedQueryValidationError),
45
+ React.createElement(SimpleButton_1.default, { variant: "raised", tone: "accent", "data-name": "action-run", margin: 1, onClick: () => {
46
+ if (namedQuery) {
47
+ onAddNamedQuery({
48
+ Name: namedQuery.Name,
49
+ BooleanExpression: expression,
50
+ });
51
+ }
52
+ onRunQuery(expression);
53
+ props.onDismiss();
54
+ }, disabled: !isExpressionValid || StringExtensions_1.IsNullOrEmpty(expression) || hasNamedQueryError }, "Run Query")))));
55
+ };
@@ -22,6 +22,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
22
22
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
23
23
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
24
24
  const react_redux_1 = require("react-redux");
25
+ const windowFactory_1 = require("../Components/Popups/WindowPopups/windowFactory");
25
26
  class QueryViewPanelComponent extends React.Component {
26
27
  constructor(props) {
27
28
  super(props);
@@ -165,11 +166,13 @@ function mapDispatchToProps(dispatch) {
165
166
  source: 'Toolbar',
166
167
  value,
167
168
  })),
168
- onExpand: (value) => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.QueryModuleId, 'ExpandedQueryPopup', {
169
- source: 'Toolbar',
170
- value,
171
- }, {
172
- footer: null,
169
+ onExpand: (value) => dispatch(PopupRedux.PopupShowWindow({
170
+ Id: windowFactory_1.WINDOW_QUERY_EDITOR,
171
+ Title: 'Current Query',
172
+ Icon: 'query',
173
+ PopupProps: {
174
+ value: value,
175
+ },
173
176
  })),
174
177
  };
175
178
  }
@@ -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
- setValue(cellDataChangedInfo: CellDataChangedInfo): void;
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[];
@@ -202,7 +202,6 @@ class Adaptable {
202
202
  this.getGroupAndColumnDefs = () => {
203
203
  const colDefs = [].concat(this.currentColumnDefs || this.gridOptions.columnDefs);
204
204
  return colDefs;
205
- // return this.gridOptions.columnApi.getAllColumns().map((c) => c.getColDef());
206
205
  };
207
206
  this.getColumnDefsWithCorrectVisibility = () => {
208
207
  const visibleColIds = this.api.layoutApi.getCurrentVisibleColumnIdsMap();
@@ -818,7 +817,8 @@ class Adaptable {
818
817
  if (reverseGradient) {
819
818
  alpha = 1 - alpha;
820
819
  }
821
- style.backgroundColor = tinycolor(cellBackColor).setAlpha(alpha).toRgbString();
820
+ const preparedColor = StyleHelper_1.getVariableColor(cellBackColor);
821
+ style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
822
822
  }
823
823
  if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
824
824
  style.paddingTop = 0;
@@ -903,6 +903,20 @@ class Adaptable {
903
903
  ? flashingCell.flashingCellDefinition.DownChangeStyle
904
904
  : flashingCell.flashingCellDefinition.NeutralChangeStyle)) !== null && _a !== void 0 ? _a : {});
905
905
  }
906
+ getFlashingCellClass(col, params) {
907
+ var _a, _b, _c;
908
+ const primaryKey = params.node.aggData
909
+ ? params.node.id
910
+ : this.getPrimaryKeyValueFromRowNode(params.node);
911
+ const flashingCell = this.api.internalApi.getAdaptableFlashingCellFor(primaryKey, col.columnId);
912
+ if (!flashingCell) {
913
+ return;
914
+ }
915
+ return flashingCell.direction === 'up'
916
+ ? (_a = flashingCell.flashingCellDefinition.UpChangeStyle) === null || _a === void 0 ? void 0 : _a.ClassName : flashingCell.direction === 'down'
917
+ ? (_b = flashingCell.flashingCellDefinition.DownChangeStyle) === null || _b === void 0 ? void 0 : _b.ClassName : flashingCell.direction === 'neutral'
918
+ ? (_c = flashingCell.flashingCellDefinition.NeutralChangeStyle) === null || _c === void 0 ? void 0 : _c.ClassName : undefined;
919
+ }
906
920
  getCellHighlightStyle(col, params) {
907
921
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
908
922
  const cellHightlight = this.api.internalApi
@@ -994,8 +1008,7 @@ class Adaptable {
994
1008
  return (_b = conditionalStyle.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
995
1009
  }
996
1010
  })
997
- .filter((x) => !!x)
998
- .join(' ');
1011
+ .filter((x) => !!x);
999
1012
  return classNames;
1000
1013
  }
1001
1014
  getEditableCellClass(abColumn, params) {
@@ -1484,27 +1497,23 @@ class Adaptable {
1484
1497
  this.agGridHelper.fireSelectionChangedEvent();
1485
1498
  return selectedRowInfo;
1486
1499
  }
1487
- setValue(cellDataChangedInfo) {
1500
+ setDataValue(value, column, primaryKeyValue, rowNode) {
1488
1501
  // note: because we use RowNode.setDataValue() this will cause Validation to fire
1489
1502
  // see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
1490
1503
  let newValue;
1491
- let dataType = cellDataChangedInfo.column.dataType;
1492
- newValue =
1493
- dataType == Enums_1.DataType.Number
1494
- ? Number(cellDataChangedInfo.newValue)
1495
- : cellDataChangedInfo.newValue;
1504
+ let dataType = column.dataType;
1505
+ newValue = dataType == Enums_1.DataType.Number ? Number(value) : value;
1496
1506
  if (dataType == undefined) {
1497
1507
  return; // no point continuing as probably a wrong column
1498
1508
  }
1499
- if (cellDataChangedInfo.rowNode) {
1500
- cellDataChangedInfo.rowNode.setDataValue(cellDataChangedInfo.column.columnId, newValue);
1509
+ if (rowNode) {
1510
+ rowNode.setDataValue(column.columnId, newValue);
1501
1511
  }
1502
1512
  else {
1503
1513
  if (this.useRowNodeLookUp) {
1504
- const rowNode = this.gridOptions.api.getRowNode(cellDataChangedInfo.primaryKeyValue);
1514
+ const rowNode = this.gridOptions.api.getRowNode(primaryKeyValue);
1505
1515
  if (rowNode != null) {
1506
- rowNode.setDataValue(cellDataChangedInfo.column.columnId, newValue);
1507
- cellDataChangedInfo.rowNode = rowNode;
1516
+ rowNode.setDataValue(column.columnId, newValue);
1508
1517
  }
1509
1518
  }
1510
1519
  else {
@@ -1512,9 +1521,8 @@ class Adaptable {
1512
1521
  // prefer not to use this method but if we do then at least we can prevent further lookups once we find
1513
1522
  this.gridOptions.api.getModel().forEachNode((rowNode) => {
1514
1523
  if (!isUpdated) {
1515
- if (cellDataChangedInfo.primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
1516
- rowNode.setDataValue(cellDataChangedInfo.column.columnId, newValue);
1517
- cellDataChangedInfo.rowNode = rowNode;
1524
+ if (primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
1525
+ rowNode.setDataValue(column.columnId, newValue);
1518
1526
  isUpdated = true;
1519
1527
  }
1520
1528
  }
@@ -1522,6 +1530,9 @@ class Adaptable {
1522
1530
  }
1523
1531
  }
1524
1532
  }
1533
+ setCellValue(cellDataChangedInfo) {
1534
+ this.setDataValue(cellDataChangedInfo.newValue, cellDataChangedInfo.column, cellDataChangedInfo.primaryKeyValue, cellDataChangedInfo.rowNode);
1535
+ }
1525
1536
  cancelEdit() {
1526
1537
  this.gridOptions.api.stopEditing(true);
1527
1538
  }
@@ -2064,20 +2075,57 @@ class Adaptable {
2064
2075
  });
2065
2076
  }
2066
2077
  updateColDefsForSpecialColumns() {
2078
+ const allColDefs = this.getGroupAndColumnDefs();
2067
2079
  const specialColDefs = this.getColDefsForSpecialColumns();
2068
- const isUserColDef = (colDef) => {
2080
+ const isSpecialColDef = (colDef) => {
2069
2081
  const { type } = colDef;
2070
2082
  if (type === GeneralConstants_1.AB_SPECIAL_COLUMN || (Array.isArray(type) && type.includes(GeneralConstants_1.AB_SPECIAL_COLUMN))) {
2071
- return false;
2083
+ return true;
2072
2084
  }
2073
- return true;
2085
+ return false;
2074
2086
  };
2075
- // const userColDefs = this.gridOptions.columnApi
2076
- // .getAllColumns()
2077
- // .map((col) => col.getColDef())
2078
- const userColDefs = this.getGroupAndColumnDefs().filter(isUserColDef);
2079
- const allDefs = [...userColDefs, ...specialColDefs];
2080
- this.safeSetColDefs(allDefs);
2087
+ const isColGroupDef = (columnDefinition) => {
2088
+ // @ts-ignore
2089
+ return columnDefinition['children'] != null;
2090
+ };
2091
+ const processedSpecialColDefIds = [];
2092
+ const mapColDefs = (colDefs) => {
2093
+ return colDefs.map((colDef) => {
2094
+ if (isColGroupDef(colDef)) {
2095
+ // if it's a group column, recursively map its children
2096
+ colDef.children = mapColDefs(colDef.children);
2097
+ return colDef;
2098
+ }
2099
+ else {
2100
+ if (!isSpecialColDef(colDef)) {
2101
+ // if it's not a special column, return it as is
2102
+ return colDef;
2103
+ }
2104
+ const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
2105
+ if (newlyCreatedSpecialColDef) {
2106
+ // if it's a special column and we have a special col def for it, return the special col def
2107
+ processedSpecialColDefIds.push(colDef.colId);
2108
+ // merge the user defined colDef with the special col def
2109
+ // this way the user may provide some custom settings for the special col def (tooltip, etc)
2110
+ const mergedColDef = Object.assign(Object.assign({}, colDef), newlyCreatedSpecialColDef);
2111
+ return mergedColDef;
2112
+ }
2113
+ else {
2114
+ // otherwise, return the original col def
2115
+ return colDef;
2116
+ }
2117
+ }
2118
+ });
2119
+ };
2120
+ const resultColDefs = mapColDefs(allColDefs);
2121
+ // check if there are any special colDefs that were not processed
2122
+ // in that case, add them to the end of the colDefs
2123
+ specialColDefs.forEach((specialColDef) => {
2124
+ if (!processedSpecialColDefIds.includes(specialColDef.colId)) {
2125
+ resultColDefs.push(specialColDef);
2126
+ }
2127
+ });
2128
+ this.safeSetColDefs(resultColDefs);
2081
2129
  this.setLayout();
2082
2130
  }
2083
2131
  cleanupFloatingFilters_WORKAROUND() {
@@ -2809,14 +2857,13 @@ class Adaptable {
2809
2857
  const hasConditionalStylesWithClassNames = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles);
2810
2858
  const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
2811
2859
  const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
2812
- const classNameMap = {};
2813
2860
  const cellClass = (params) => {
2814
- var _a;
2815
2861
  const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
2816
2862
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
2817
2863
  const editableClassName = this.getEditableCellClass(abColumn, params);
2818
2864
  const readonlyClassName = this.getReadonlyCellClass(abColumn, params);
2819
2865
  const highlightAlertClassName = this.getAlertCellClass(abColumn, params);
2866
+ const flashingClassName = this.getFlashingCellClass(abColumn, params);
2820
2867
  const returnValue = [
2821
2868
  this.getExcelClassNameForCell(colId, primaryKeyValue),
2822
2869
  typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
@@ -2828,29 +2875,11 @@ class Adaptable {
2828
2875
  editableClassName,
2829
2876
  readonlyClassName,
2830
2877
  highlightAlertClassName,
2878
+ flashingClassName,
2831
2879
  ]
2832
- // we flatten the array because 'userCellClass' might return a string[]
2880
+ // we flatten the array because some rules ('userCellClass',conditionalStyles etc) might return a string[]
2833
2881
  .flat()
2834
2882
  .filter((x) => !!x);
2835
- const returnValueHash = returnValue.join(' ');
2836
- const primaryKey = this.getPrimaryKeyValueFromRowNode(params.node);
2837
- const key = `${primaryKey}:${params.colDef.colId}`;
2838
- if (classNameMap[key] &&
2839
- classNameMap[key] !== returnValueHash &&
2840
- // only hard-reset when removing class-names
2841
- // ag-grid does not remove class-names, it accumulates them
2842
- // https://www.ag-grid.com/javascript-data-grid/cell-styles/#refresh-of-styles
2843
- returnValueHash.length < ((_a = classNameMap[key]) === null || _a === void 0 ? void 0 : _a.length)) {
2844
- setTimeout(() => {
2845
- /**
2846
- * This is called inside a getter function, inside ag-grid.
2847
- * To allow ag-grid run it's logic, the redraw is done inside an timeout
2848
- * to make sure it is not done in an inappropriate time.
2849
- */
2850
- params.api.redrawRows({ rowNodes: [params.node] });
2851
- }, 0);
2852
- }
2853
- classNameMap[key] = returnValueHash;
2854
2883
  return returnValue.length ? returnValue : undefined;
2855
2884
  };
2856
2885
  return cellClass;
@@ -4162,7 +4191,8 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4162
4191
  }
4163
4192
  convertCSSToExcelStyle(style) {
4164
4193
  const getHexColor = (color) => {
4165
- const t = tinycolor(color);
4194
+ const preparedColor = StyleHelper_1.getVariableColor(color);
4195
+ const t = tinycolor(preparedColor);
4166
4196
  const a = t.getAlpha();
4167
4197
  return tinycolor.mix(tinycolor('white'), t, a * 100).toHexString();
4168
4198
  };
@@ -50,6 +50,8 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
50
50
  afterGuiAttached(): void;
51
51
  destroy(): void;
52
52
  private onValueChange;
53
+ private getStartValue;
53
54
  private shouldClearExistingValue;
55
+ private isValidChar;
54
56
  }
55
57
  export {};
@@ -40,7 +40,7 @@ class AdaptableNumberEditor {
40
40
  };
41
41
  }
42
42
  init(params) {
43
- this.value = this.shouldClearExistingValue(params) ? '' : params.value;
43
+ this.value = this.getStartValue(params);
44
44
  this.params = params;
45
45
  this.columnId = params.column.getColId();
46
46
  const { valueParser } = params.column.getColDef();
@@ -72,7 +72,7 @@ class AdaptableNumberEditor {
72
72
  afterGuiAttached() {
73
73
  var _a, _b;
74
74
  const adaptable = this.params.api.__adaptable;
75
- const defaultValue = this.shouldClearExistingValue(this.params) ? '' : this.params.value;
75
+ const defaultValue = this.value;
76
76
  const editorElement = (React.createElement(InternalAdaptableNumberEditor_1.InternalAdaptableNumberEditor, { defaultValue: defaultValue, showClearButton: (_a = this.params.showClearButton) !== null && _a !== void 0 ? _a : true, emptyValue: (_b = this.params.emptyValue) !== null && _b !== void 0 ? _b : '', onValueChange: this.onValueChange, ref: (editor) => {
77
77
  this.editor = editor;
78
78
  editor === null || editor === void 0 ? void 0 : editor.focus();
@@ -92,8 +92,22 @@ class AdaptableNumberEditor {
92
92
  destroy() {
93
93
  react_dom_1.unmountComponentAtNode(this.el);
94
94
  }
95
+ getStartValue(params) {
96
+ if (this.shouldClearExistingValue(params)) {
97
+ return '';
98
+ }
99
+ if (params.charPress && this.isValidChar(params.charPress)) {
100
+ return params.charPress;
101
+ }
102
+ return params.value;
103
+ }
95
104
  shouldClearExistingValue(params) {
96
105
  return params.eventKey === all_modules_1.KeyCode.BACKSPACE || params.eventKey === all_modules_1.KeyCode.DELETE;
97
106
  }
107
+ isValidChar(char) {
108
+ // allow only digits
109
+ return ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char);
110
+ // we do NOT allow key shortcuts for starting non-digits (minus sign, decimal separators) as the input[number] handling is very buggy and we would open a can of worms
111
+ }
98
112
  }
99
113
  exports.AdaptableNumberEditor = AdaptableNumberEditor;
@@ -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
  } },
@@ -173,6 +173,7 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
173
173
  width: 0,
174
174
  height: 0,
175
175
  pointerEvents: 'none',
176
+ display: 'inline-flex',
176
177
  } }),
177
178
  overlay));
178
179
  });
@@ -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": "how long AdapTable waits for AG Grid before giving up connecting to it; useful when AG Grid is instantiated separately (eg: by AdapTable React or AdapTable Angular)",
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",
@@ -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": "&#39;BottomRight&#39;",
8595
- "reference": "unknown"
8602
+ "reference": "TOAST_POSITIONS"
8596
8603
  },
8597
8604
  {
8598
8605
  "name": "showApplicationIcon",
8599
8606
  "kind": "boolean",
8600
- "description": "Displays the application icon in Notifications (if provided in `UserInterfaceOptions`)",
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 an Alert when a System Status Message is set",
8624
+ "description": "Display System Status Messages as Notifications",
8618
8625
  "uiLabel": "Show System Status Message Notifications",
8619
8626
  "isOptional": true,
8620
8627
  "gridInfo": "item",
@@ -9495,24 +9502,24 @@ exports.ADAPTABLE_METAMODEL = {
9495
9502
  "QueryLanguageApi": {
9496
9503
  "name": "QueryLanguageApi",
9497
9504
  "kind": "Interface",
9498
- "description": "Manages AdapTableQL (Query Language)",
9505
+ "description": "Functions related to AdapTableQL (the Adaptable Query Language)",
9499
9506
  "properties": [
9500
9507
  {
9501
9508
  "name": "getAdaptableQueryExpression",
9502
9509
  "kind": "function",
9503
- "description": "Returns the Expression string of the given AdaptableQuery, which may be either a Boolean, an AggregatedBoolean, a Scalar, an AggregatedScalar or an ObservableExpression expression",
9510
+ "description": "Returns the Expression string of the given AdaptableQuery: can be Boolean, AggregatedBoolean, Scalar, AggregatedScalar or Observable Expression",
9504
9511
  "uiLabel": "Get Adaptable Query Expression"
9505
9512
  },
9506
9513
  {
9507
9514
  "name": "getASTForExpression",
9508
9515
  "kind": "function",
9509
- "description": "Runs the AST that AdapTableQL creates for a expression - useful when evaluating remotely",
9516
+ "description": "Runs the AST that AdapTableQL creates for an Expression - useful when evaluating remotely",
9510
9517
  "uiLabel": "Get AST For Expression"
9511
9518
  },
9512
9519
  {
9513
9520
  "name": "getColumnsFromExpression",
9514
9521
  "kind": "function",
9515
- "description": "Returns all Columns referenced in a QueryExpression",
9522
+ "description": "Returns all Columns referenced in an Expression",
9516
9523
  "uiLabel": "Get Columns From Expression"
9517
9524
  },
9518
9525
  {
@@ -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-canary.2";
1
+ declare const _default: "11.1.3";
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.1-canary.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '11.1.3'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version