@adaptabletools/adaptable 11.1.1 → 11.1.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.
Files changed (57) hide show
  1. package/base.css +2 -0
  2. package/bundle.cjs.js +97 -97
  3. package/index.css +3 -0
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  8. package/src/AdaptableOptions/LayoutOptions.d.ts +11 -0
  9. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  10. package/src/Api/Implementation/GridApiImpl.js +9 -10
  11. package/src/Api/Implementation/InternalApiImpl.js +1 -1
  12. package/src/Api/Implementation/LayoutApiImpl.js +7 -1
  13. package/src/Strategy/CalculatedColumnModule.js +5 -0
  14. package/src/Strategy/FreeTextColumnModule.js +1 -1
  15. package/src/Strategy/Interface/IModule.d.ts +2 -1
  16. package/src/Strategy/LayoutModule.d.ts +23 -0
  17. package/src/Strategy/LayoutModule.js +70 -0
  18. package/src/Strategy/Utilities/getFlashingCellStyleViewItems.d.ts +1 -0
  19. package/src/Strategy/Utilities/getFlashingCellStyleViewItems.js +2 -1
  20. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
  21. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  22. package/src/Utilities/Helpers/StyleHelper.d.ts +1 -0
  23. package/src/Utilities/Helpers/StyleHelper.js +13 -1
  24. package/src/View/AdaptableViewFactory.js +2 -4
  25. package/src/View/ColorPicker.d.ts +4 -2
  26. package/src/View/ColorPicker.js +16 -4
  27. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +24 -19
  28. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +3 -1
  29. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +23 -15
  30. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +2 -0
  31. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +9 -5
  32. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  33. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  34. package/src/View/Components/RangesComponent.js +4 -6
  35. package/src/View/Components/StyleComponent.js +6 -9
  36. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  37. package/src/View/Components/ValueSelector/index.js +1 -1
  38. package/src/View/Dashboard/CustomToolbarWrapper.js +9 -1
  39. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -3
  40. package/src/View/GridInfo/AdaptableObjectsSummary.d.ts +2 -0
  41. package/src/View/GridInfo/AdaptableObjectsSummary.js +26 -0
  42. package/src/View/GridInfo/GridInfoPopup.js +11 -3
  43. package/src/View/Layout/LayoutEditorStandalonePopup.js +3 -4
  44. package/src/View/Layout/LayoutRadioSelector.d.ts +5 -0
  45. package/src/View/Layout/LayoutRadioSelector.js +18 -0
  46. package/src/View/Query/ExpandedQueryPopup.d.ts +2 -18
  47. package/src/View/Query/ExpandedQueryPopup.js +42 -57
  48. package/src/View/Query/QueryViewPanel.js +8 -5
  49. package/src/agGrid/Adaptable.d.ts +2 -1
  50. package/src/agGrid/Adaptable.js +16 -16
  51. package/src/components/ExpressionEditor/index.js +0 -1
  52. package/src/components/OverlayTrigger/index.js +1 -0
  53. package/src/components/Radio/index.d.ts +1 -1
  54. package/src/components/Radio/index.js +2 -2
  55. package/src/metamodel/adaptable.metamodel.js +7 -0
  56. package/version.d.ts +1 -1
  57. package/version.js +1 -1
@@ -817,7 +817,8 @@ class Adaptable {
817
817
  if (reverseGradient) {
818
818
  alpha = 1 - alpha;
819
819
  }
820
- style.backgroundColor = tinycolor(cellBackColor).setAlpha(alpha).toRgbString();
820
+ const preparedColor = StyleHelper_1.getVariableColor(cellBackColor);
821
+ style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
821
822
  }
822
823
  if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
823
824
  style.paddingTop = 0;
@@ -1483,27 +1484,23 @@ class Adaptable {
1483
1484
  this.agGridHelper.fireSelectionChangedEvent();
1484
1485
  return selectedRowInfo;
1485
1486
  }
1486
- setValue(cellDataChangedInfo) {
1487
+ setDataValue(value, column, primaryKeyValue, rowNode) {
1487
1488
  // note: because we use RowNode.setDataValue() this will cause Validation to fire
1488
1489
  // see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
1489
1490
  let newValue;
1490
- let dataType = cellDataChangedInfo.column.dataType;
1491
- newValue =
1492
- dataType == Enums_1.DataType.Number
1493
- ? Number(cellDataChangedInfo.newValue)
1494
- : cellDataChangedInfo.newValue;
1491
+ let dataType = column.dataType;
1492
+ newValue = dataType == Enums_1.DataType.Number ? Number(value) : value;
1495
1493
  if (dataType == undefined) {
1496
1494
  return; // no point continuing as probably a wrong column
1497
1495
  }
1498
- if (cellDataChangedInfo.rowNode) {
1499
- cellDataChangedInfo.rowNode.setDataValue(cellDataChangedInfo.column.columnId, newValue);
1496
+ if (rowNode) {
1497
+ rowNode.setDataValue(column.columnId, newValue);
1500
1498
  }
1501
1499
  else {
1502
1500
  if (this.useRowNodeLookUp) {
1503
- const rowNode = this.gridOptions.api.getRowNode(cellDataChangedInfo.primaryKeyValue);
1501
+ const rowNode = this.gridOptions.api.getRowNode(primaryKeyValue);
1504
1502
  if (rowNode != null) {
1505
- rowNode.setDataValue(cellDataChangedInfo.column.columnId, newValue);
1506
- cellDataChangedInfo.rowNode = rowNode;
1503
+ rowNode.setDataValue(column.columnId, newValue);
1507
1504
  }
1508
1505
  }
1509
1506
  else {
@@ -1511,9 +1508,8 @@ class Adaptable {
1511
1508
  // prefer not to use this method but if we do then at least we can prevent further lookups once we find
1512
1509
  this.gridOptions.api.getModel().forEachNode((rowNode) => {
1513
1510
  if (!isUpdated) {
1514
- if (cellDataChangedInfo.primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
1515
- rowNode.setDataValue(cellDataChangedInfo.column.columnId, newValue);
1516
- cellDataChangedInfo.rowNode = rowNode;
1511
+ if (primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
1512
+ rowNode.setDataValue(column.columnId, newValue);
1517
1513
  isUpdated = true;
1518
1514
  }
1519
1515
  }
@@ -1521,6 +1517,9 @@ class Adaptable {
1521
1517
  }
1522
1518
  }
1523
1519
  }
1520
+ setCellValue(cellDataChangedInfo) {
1521
+ this.setDataValue(cellDataChangedInfo.newValue, cellDataChangedInfo.column, cellDataChangedInfo.primaryKeyValue, cellDataChangedInfo.rowNode);
1522
+ }
1524
1523
  cancelEdit() {
1525
1524
  this.gridOptions.api.stopEditing(true);
1526
1525
  }
@@ -4195,7 +4194,8 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4195
4194
  }
4196
4195
  convertCSSToExcelStyle(style) {
4197
4196
  const getHexColor = (color) => {
4198
- const t = tinycolor(color);
4197
+ const preparedColor = StyleHelper_1.getVariableColor(color);
4198
+ const t = tinycolor(preparedColor);
4199
4199
  const a = t.getAlpha();
4200
4200
  return tinycolor.mix(tinycolor('white'), t, a * 100).toHexString();
4201
4201
  };
@@ -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',
@@ -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
  },
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "11.1.1";
1
+ declare const _default: "11.1.2";
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'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '11.1.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version