@adaptabletools/adaptable 19.0.6 → 19.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "19.0.6",
3
+ "version": "19.1.0",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -62,7 +62,7 @@
62
62
  "react-toastify": "9.1.3"
63
63
  },
64
64
  "peerDependencies": {
65
- "@ag-grid-community/core": ">=32.1.0"
65
+ "@ag-grid-community/core": ">=32.3.0"
66
66
  },
67
67
  "publishTimestamp": 0,
68
68
  "type": "module",
@@ -16,19 +16,19 @@ export interface FormatColumnOptions {
16
16
  */
17
17
  export interface CustomDisplayFormatter {
18
18
  /**
19
- * Format Id
19
+ * Custom Format Id
20
20
  */
21
21
  id: string;
22
22
  /**
23
- * Format Description
23
+ * Custom Format Description
24
24
  */
25
25
  label?: string;
26
26
  /**
27
- * Function used to render Custom Display Format
27
+ * Function used to render the Custom Display Format
28
28
  */
29
29
  handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
30
30
  /**
31
- * Where Custom Display Format can be applied
31
+ * Used by Format Columns wizard to show where Custom Display Format can be applied
32
32
  */
33
33
  scope: ColumnScope;
34
34
  }
@@ -9,9 +9,9 @@ const GridOptionsForm = (props) => {
9
9
  return (React.createElement(Box, { p: 2 },
10
10
  React.createElement(HelpBlock, null, "Grid Options"),
11
11
  React.createElement(FormLayout, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
12
- React.createElement(FormRow, { label: "Enable Range Selection" },
13
- React.createElement(CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
14
- gridOptions = Object.assign(Object.assign({}, gridOptions), { enableRangeSelection: enableRangeSelection });
12
+ React.createElement(FormRow, { label: "Enable Cell Selection" },
13
+ React.createElement(CheckBox, { checked: !!gridOptions.cellSelection, onChange: (enableCellSelection) => {
14
+ gridOptions = Object.assign(Object.assign({}, gridOptions), { cellSelection: enableCellSelection });
15
15
  props.onChangedGridOptions(gridOptions);
16
16
  } })),
17
17
  React.createElement(FormRow, { label: "Show Filter Bar" },
@@ -78,6 +78,6 @@ export const prepareGridOptions = (dataSourceInfo, defaultGridOptions) => {
78
78
  });
79
79
  const gridOptions = Object.assign(Object.assign({}, defaultGridOptions), { defaultColDef: {
80
80
  floatingFilter: true,
81
- }, rowData: dataSourceInfo.data, columnDefs, enableRangeSelection: true, rowSelection: 'multiple', rowHeight: 30 });
81
+ }, rowData: dataSourceInfo.data, columnDefs, cellSelection: true, rowSelection: 'multiple', rowHeight: 30 });
82
82
  return gridOptions;
83
83
  };
@@ -268,7 +268,7 @@ const buildGridOptions = (mainAdaptableInstance, changeHistoryLog) => {
268
268
  },
269
269
  ],
270
270
  rowData: mapChangeHistoryRowData(changeHistoryLog, mainAdaptableInstance),
271
- enableRangeSelection: true,
271
+ cellSelection: true,
272
272
  suppressColumnVirtualisation: false,
273
273
  sideBar: false,
274
274
  rowSelection: 'multiple',
@@ -108,7 +108,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
108
108
  private listenerPivotChanged;
109
109
  private listenerColumnRowGroupChanged;
110
110
  private listenerColumnResized;
111
- private listenerRangeSelectionChanged;
111
+ private listenerCellSelectionChanged;
112
112
  private listenerSortChanged;
113
113
  private listenerModelUpdated;
114
114
  private columnMinMaxValuesCache;
@@ -1238,11 +1238,21 @@ export class AdaptableAgGrid {
1238
1238
  }
1239
1239
  isGridRowSelectable() {
1240
1240
  const rowSelection = this.agGridAdapter.getAgGridApi().getGridOption('rowSelection');
1241
- return rowSelection === 'single' || rowSelection === 'multiple';
1241
+ if (rowSelection == undefined) {
1242
+ return false;
1243
+ }
1244
+ if (rowSelection === 'single' || rowSelection === 'multiple') {
1245
+ return true;
1246
+ }
1247
+ if (rowSelection.mode === 'singleRow' || rowSelection.mode === 'multiRow') {
1248
+ return true;
1249
+ }
1250
+ return false;
1242
1251
  }
1243
1252
  isGridRangeSelectable() {
1244
1253
  return (this.agGridAdapter.isModulePresent(ModuleNames.RangeSelectionModule) &&
1245
- this.agGridAdapter.getGridOption('enableRangeSelection'));
1254
+ (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1255
+ !!this.agGridAdapter.getGridOption('cellSelection')));
1246
1256
  }
1247
1257
  initAdaptableStore() {
1248
1258
  const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
@@ -1391,7 +1401,6 @@ export class AdaptableAgGrid {
1391
1401
  const columnEventsThatTriggersStateChange = [
1392
1402
  'columnMoved',
1393
1403
  'gridColumnsChanged',
1394
- 'columnEverythingChanged',
1395
1404
  'displayedColumnsChanged',
1396
1405
  'columnVisible',
1397
1406
  'newColumnsLoaded',
@@ -1550,7 +1559,7 @@ export class AdaptableAgGrid {
1550
1559
  }
1551
1560
  this.refreshSelectedCellsState();
1552
1561
  }, 250);
1553
- this.agGridAdapter.getAgGridApi().addEventListener('rangeSelectionChanged', (this.listenerRangeSelectionChanged = (params) => {
1562
+ this.agGridAdapter.getAgGridApi().addEventListener('cellSelectionChanged', (this.listenerCellSelectionChanged = (params) => {
1554
1563
  if (params.finished == true) {
1555
1564
  this.debouncedSetSelectedCells();
1556
1565
  }
@@ -2010,7 +2019,7 @@ export class AdaptableAgGrid {
2010
2019
  }
2011
2020
  selectColumn(columnId, config) {
2012
2021
  if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
2013
- this.agGridAdapter.getAgGridApi().clearRangeSelection();
2022
+ this.agGridAdapter.getAgGridApi().clearCellSelection();
2014
2023
  }
2015
2024
  const cellRangeParams = {
2016
2025
  rowStartIndex: 0,
@@ -2022,7 +2031,7 @@ export class AdaptableAgGrid {
2022
2031
  }
2023
2032
  selectColumns(columnIds, config) {
2024
2033
  if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
2025
- this.agGridAdapter.getAgGridApi().clearRangeSelection();
2034
+ this.agGridAdapter.getAgGridApi().clearCellSelection();
2026
2035
  }
2027
2036
  const rowCount = this.agGridAdapter.getAgGridApi().getDisplayedRowCount();
2028
2037
  columnIds.forEach((colId) => {
@@ -2041,7 +2050,7 @@ export class AdaptableAgGrid {
2041
2050
  deselectAll() {
2042
2051
  // need to do both as first just clears selected rows and second clears ranges
2043
2052
  this.agGridAdapter.getAgGridApi().deselectAll();
2044
- this.agGridAdapter.getAgGridApi().clearRangeSelection();
2053
+ this.agGridAdapter.getAgGridApi().clearCellSelection();
2045
2054
  }
2046
2055
  setGridData(dataSource) {
2047
2056
  if (!this.isReady) {
@@ -2110,13 +2119,7 @@ export class AdaptableAgGrid {
2110
2119
  if (!rowNode) {
2111
2120
  return false;
2112
2121
  }
2113
- if (rowNode.isEmptyRowGroupNode()) {
2114
- return true;
2115
- }
2116
- if (rowNode.group && rowNode.group === true) {
2117
- return true;
2118
- }
2119
- if (rowNode.leafGroup && rowNode.leafGroup === true) {
2122
+ if (rowNode.group === true || rowNode.leafGroup === true) {
2120
2123
  return true;
2121
2124
  }
2122
2125
  return false;
@@ -2588,7 +2591,7 @@ export class AdaptableAgGrid {
2588
2591
  }
2589
2592
  selectCells(columnIds, startNode, endNode, clearSelection) {
2590
2593
  if (clearSelection) {
2591
- this.agGridAdapter.getAgGridApi().clearRangeSelection();
2594
+ this.agGridAdapter.getAgGridApi().clearCellSelection();
2592
2595
  }
2593
2596
  const cellRangeParams = {
2594
2597
  rowStartIndex: startNode.rowIndex,
@@ -2990,7 +2993,7 @@ export class AdaptableAgGrid {
2990
2993
  .removeEventListener('columnRowGroupChanged', this.listenerColumnRowGroupChanged);
2991
2994
  this.agGridAdapter
2992
2995
  .getAgGridApi()
2993
- .removeEventListener('rangeSelectionChanged', this.listenerRangeSelectionChanged);
2996
+ .removeEventListener('cellSelectionChanged', this.listenerCellSelectionChanged);
2994
2997
  this.agGridAdapter
2995
2998
  .getAgGridApi()
2996
2999
  .removeEventListener('columnResized', this.listenerColumnResized);
@@ -3015,7 +3018,7 @@ export class AdaptableAgGrid {
3015
3018
  this.listenerPivotChanged = null;
3016
3019
  this.listenerCellEditingStarted = null;
3017
3020
  this.listenerColumnRowGroupChanged = null;
3018
- this.listenerRangeSelectionChanged = null;
3021
+ this.listenerCellSelectionChanged = null;
3019
3022
  this.listenerColumnResized = null;
3020
3023
  this.listenerGlobalSetRowSelection = null;
3021
3024
  this.listenerSortChanged = null;
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1729787590726 || Date.now(),
4
- VERSION: "19.0.6" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1730745764263 || Date.now(),
4
+ VERSION: "19.1.0" || '--current-version--',
5
5
  };