@adaptabletools/adaptable 18.0.15 → 18.0.17

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.
@@ -123,6 +123,7 @@ export const QuickFilterValues = (props) => {
123
123
  }
124
124
  return null;
125
125
  };
126
+ const [defaultSize, setDefaultSize] = React.useState(undefined);
126
127
  return (React.createElement(OverlayTrigger, { showEvent: showEvent,
127
128
  // cannot hide on blur, because the form input receives the input when this is opened
128
129
  hideEvent: "mouseleave", hideDelay: 50, ref: (api) => {
@@ -136,18 +137,24 @@ export const QuickFilterValues = (props) => {
136
137
  }
137
138
  }, render: ({ targetWidth }) => {
138
139
  var _a;
139
- return (React.createElement(Resizable, { style: {
140
+ return (React.createElement(Resizable, { onResizeStop: (_e, _direction, element, _delta) => {
141
+ const { width, height } = element.getBoundingClientRect();
142
+ setDefaultSize({ width, height });
143
+ }, defaultSize: defaultSize, style: {
140
144
  fontSize: 'var(--ab-font-size-2)',
141
145
  border: '1px solid var(--ab-color-primarydark)',
142
146
  background: 'var(--ab-color-defaultbackground)',
143
147
  zIndex: 1000,
148
+ display: 'flex',
149
+ flexFlow: 'column',
150
+ flexWrap: 'nowrap',
144
151
  }, enable: {
145
152
  top: false,
146
153
  right: true,
147
- bottom: false,
154
+ bottom: true,
148
155
  left: false,
149
156
  topRight: false,
150
- bottomRight: false,
157
+ bottomRight: true,
151
158
  bottomLeft: false,
152
159
  topLeft: false,
153
160
  }, minWidth: getPopoverWidth(targetWidth) },
@@ -163,13 +170,7 @@ export const QuickFilterValues = (props) => {
163
170
  (_a = valuesDropdownRef.current) === null || _a === void 0 ? void 0 : _a.show();
164
171
  });
165
172
  }
166
- }, "data-name": "quick-filter-form", flexDirection: "column", style: {
167
- // fontSize: 'var(--ab-font-size-2)',
168
- // border: '1px solid var(--ab-color-primarydark)',
169
- // background: 'var(--ab-color-defaultbackground)',
170
- // zIndex: 1000,
171
- // width: getPopoverWidth(targetWidth),
172
- } },
173
+ }, "data-name": "quick-filter-form", flexDirection: "column", flex: 1, display: 'flex' },
173
174
  React.createElement(Flex, { m: 2 },
174
175
  React.createElement(SimpleButton, { onClick: () => clearColumnFilter() }, "Clear Filter"),
175
176
  ((_a = api.optionsApi.getColumnFilterOptions()) === null || _a === void 0 ? void 0 : _a.autoApplyFilter) == false && (React.createElement(SimpleButton, { ml: 2, onClick: () => {
@@ -196,6 +196,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
196
196
  getNormalisedValueFromRawValue(rawValue: any, column: AdaptableColumn): string | number | boolean | Date | unknown;
197
197
  updateColumnModelAndRefreshGrid(config?: {
198
198
  skipColDefsRefresh?: boolean;
199
+ preemptiveColumnStateRefresh?: boolean;
199
200
  }): void;
200
201
  redrawBody(): void;
201
202
  refreshHeader(): void;
@@ -1796,6 +1796,12 @@ export class AdaptableAgGrid {
1796
1796
  if (result == undefined && rowNode.data) {
1797
1797
  result = rowNode.data[this.adaptableOptions.primaryKey];
1798
1798
  }
1799
+ if (result == undefined && rowNode.id != undefined) {
1800
+ // when getPrimaryKeyValueFromRowNode is called for group rows,
1801
+ // which don't have a rowNode.data object, the result is undefined
1802
+ // but we do have an id property on the rowNode object, so we'll use that
1803
+ result = rowNode.id;
1804
+ }
1799
1805
  return result;
1800
1806
  }
1801
1807
  getRawValueFromRowNode(rowNode, columnId) {
@@ -1873,6 +1879,9 @@ export class AdaptableAgGrid {
1873
1879
  return rawValue;
1874
1880
  }
1875
1881
  updateColumnModelAndRefreshGrid(config) {
1882
+ if (config === null || config === void 0 ? void 0 : config.preemptiveColumnStateRefresh) {
1883
+ this.deriveAdaptableColumnStateFromAgGrid();
1884
+ }
1876
1885
  if (!(config === null || config === void 0 ? void 0 : config.skipColDefsRefresh)) {
1877
1886
  this.refreshColDefs();
1878
1887
  }
@@ -3153,13 +3162,8 @@ export class AdaptableAgGrid {
3153
3162
  return this.ReportService.getCellExportValueFromRawValue(rowNode, rawValue, columnId);
3154
3163
  }
3155
3164
  processCellForExcelExport(rowNode, columnId) {
3156
- var _a;
3157
3165
  if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
3158
- const cellKey = this.agGridColumnAdapter.getExcelClassNameForCell(columnId, (_a = this.getPrimaryKeyValueFromRowNode(rowNode)) !== null && _a !== void 0 ? _a : rowNode.id
3159
- // when getPrimaryKeyValueFromRowNode is called for group rows,
3160
- // which don't have a rowNode.data object, the result is undefined
3161
- // but we do have an id property on the rowNode object, so we'll use that
3162
- );
3166
+ const cellKey = this.agGridColumnAdapter.getExcelClassNameForCell(columnId, this.getPrimaryKeyValueFromRowNode(rowNode));
3163
3167
  const isoFormattedDate = this.ReportService.getExcelStyleWithFormattedDate(cellKey);
3164
3168
  if (isoFormattedDate) {
3165
3169
  // this is a Date cell which will be formatted by Excel
@@ -3720,6 +3724,7 @@ export class AdaptableAgGrid {
3720
3724
  */
3721
3725
  updateLayoutFromGrid() {
3722
3726
  var _a, _b;
3727
+ this.logger.info('updateLayoutFromGrid()');
3723
3728
  const agGridApi = this.agGridAdapter.getAgGridApi();
3724
3729
  const columnState = agGridApi.getColumnState();
3725
3730
  const expandedState = agGridApi.getState().rowGroupExpansion || { expandedRowGroupIds: [] };
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: 1716971671644 || Date.now(),
4
- VERSION: "18.0.15" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1717077872080 || Date.now(),
4
+ VERSION: "18.0.17" || '--current-version--',
5
5
  };