@adaptabletools/adaptable-cjs 20.1.1 → 20.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 (46) hide show
  1. package/package.json +1 -1
  2. package/src/Utilities/Services/DataService.js +1 -0
  3. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  4. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
  5. package/src/View/CellSummary/CellSummaryDetails.js +1 -1
  6. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
  7. package/src/View/ColumnInfo/ColumnInfo.js +1 -1
  8. package/src/View/Comments/CommentsPopup.js +1 -1
  9. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +3 -0
  10. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +7 -1
  11. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -1
  12. package/src/View/Components/PreviewResultsPanel.js +1 -1
  13. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +2 -2
  14. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  15. package/src/View/Components/WizardSummaryPage.js +1 -1
  16. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  17. package/src/View/Dashboard/Dashboard.js +2 -2
  18. package/src/View/Dashboard/DashboardToolbarFactory.js +1 -1
  19. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +8 -9
  20. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +1 -1
  21. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  22. package/src/View/DataSet/DataSetViewPanel.js +1 -1
  23. package/src/View/Export/ReportFormatSelector.js +1 -1
  24. package/src/View/Export/ReportNameSelector.js +1 -1
  25. package/src/View/Filter/FilterViewPanel.js +2 -2
  26. package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
  27. package/src/View/Layout/LayoutViewPanel.js +1 -1
  28. package/src/View/Layout/PivotDetailsPopoup.js +1 -1
  29. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  30. package/src/View/Note/NotePopup.js +1 -1
  31. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
  32. package/src/View/StateManagement/components/LoadButton.js +1 -1
  33. package/src/View/Theme/ThemeSelector.js +1 -1
  34. package/src/agGrid/AdaptableAgGrid.d.ts +10 -0
  35. package/src/agGrid/AdaptableAgGrid.js +38 -15
  36. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  37. package/src/components/Icon/index.js +1 -1
  38. package/src/components/InfiniteTable/index.d.ts +2 -2
  39. package/src/components/InfiniteTable/index.js +3 -3
  40. package/src/components/List/GridList/index.js +1 -1
  41. package/src/components/Select/Select.d.ts +1 -0
  42. package/src/components/Select/Select.js +1 -1
  43. package/src/components/SimpleButton/index.js +5 -1
  44. package/src/env.js +2 -2
  45. package/src/layout-manager/src/index.js +32 -3
  46. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -16,7 +16,7 @@ const GridList = (props) => {
16
16
  };
17
17
  }).filter((data) => !!data.item);
18
18
  return (React.createElement(InfiniteTable_1.DataSource, { data: data, primaryKey: "id" },
19
- React.createElement(InfiniteTable_1.InfiniteTable, { header: false, showZebraRows: props.showZebraRows, rowHeight: props.rowHeight ?? '--ab-grid-row-height', domProps: {
19
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { header: false, showZebraRows: props.showZebraRows, rowHeight: props.rowHeight ?? '--ab-grid-row-height', domProps: {
20
20
  className: (0, join_1.default)(baseClassName, props.className),
21
21
  style: {
22
22
  minHeight: '15rem',
@@ -43,6 +43,7 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
43
43
  };
44
44
  onInputChange?: (value: string) => void;
45
45
  onMenuOpen?: VoidFunction;
46
+ 'aria-label'?: string;
46
47
  size?: 'small' | 'normal';
47
48
  isCreatable?: boolean;
48
49
  menuPortalTarget?: HTMLElement;
@@ -369,7 +369,7 @@ const Select = function (props) {
369
369
  setInputValue(value);
370
370
  props.onInputChange?.(value);
371
371
  }, [props.onInputChange, isMulti]);
372
- return (React.createElement(SelectComponent, { ref: ref, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
372
+ return (React.createElement(SelectComponent, { ref: ref, "aria-label": props['aria-label'], inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
373
373
  // This needed so the menu is not clipped by overflow: hidden
374
374
  menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
375
375
  if (isMulti) {
@@ -85,7 +85,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
85
85
  const fontWeight = buttonProps.fontWeight
86
86
  ? theme_1.default[buttonProps.fontWeight] ?? buttonProps.fontWeight ?? 'normal'
87
87
  : 'normal';
88
- const btn = (React.createElement(rebass_1.Button, { ...buttonProps, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : '', fontWeight ? `${exports.baseClassName}--font-weight=${fontWeight}` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`), ref: theRef }, children));
88
+ const btn = (React.createElement(rebass_1.Button, { ...buttonProps, "aria-label": buttonProps['aria-label'] ||
89
+ buttonProps.label ||
90
+ tooltip ||
91
+ buttonProps.title ||
92
+ `${buttonProps.key}`, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : '', fontWeight ? `${exports.baseClassName}--font-weight=${fontWeight}` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`), ref: theRef }, children));
89
93
  return tooltip ? React.createElement(Tooltip_1.default, { label: tooltip }, btn) : btn;
90
94
  });
91
95
  exports.default = SimpleButton;
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  NEXT_PUBLIC_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" || '',
5
- PUBLISH_TIMESTAMP: 1746613800736 || Date.now(),
6
- VERSION: "20.1.1" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1747299023006 || Date.now(),
6
+ VERSION: "20.1.3" || '--current-version--',
7
7
  };
@@ -245,19 +245,28 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
245
245
  : this.getTableLayoutModelFromGrid();
246
246
  }
247
247
  getPivotLayoutModelFromGrid() {
248
- const pivotResultColumnsSet = new Set((this.gridApi.getPivotResultColumns() || []).map((col) => col.getColId()));
248
+ const pivotResultColumns = this.gridApi.getPivotResultColumns() || [];
249
+ const pivotResultColumnsSet = new Set(pivotResultColumns.map((col) => col.getColId()));
249
250
  const prevLayout = this.currentLayout;
250
251
  const columnState = this.gridApi
251
252
  .getColumnState()
252
253
  .filter((col) => !pivotResultColumnsSet.has(col.colId));
253
254
  let PivotColumns = this.gridApi.getPivotColumns().map((col) => col.getColId());
254
255
  const layout = this.getUndecidedLayoutModelFromGrid(columnState);
256
+ let ColumnWidths = layout.ColumnWidths || {};
257
+ //let's also include the column widths of the pivotResult columns
258
+ pivotResultColumns.forEach((col) => {
259
+ ColumnWidths[col.getColId()] = col.getActualWidth();
260
+ });
261
+ if (!Object.keys(ColumnWidths).length) {
262
+ ColumnWidths = undefined;
263
+ }
255
264
  delete layout.TableColumns;
256
265
  const pivotLayout = {
257
266
  PivotColumns,
258
267
  ColumnPinning: layout.ColumnPinning,
259
268
  ColumnSorts: layout.ColumnSorts,
260
- ColumnWidths: layout.ColumnWidths,
269
+ ColumnWidths,
261
270
  ColumnVisibility: layout.ColumnVisibility,
262
271
  RowGroupValues: layout.RowGroupValues,
263
272
  PivotGroupedColumns: layout.RowGroupedColumns,
@@ -824,7 +833,10 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
824
833
  return acc;
825
834
  }, {});
826
835
  columnState.applyOrder = true;
827
- const columnIds = getColumnOrderIdsForAllColDefs([...layout.PivotColumns, ...layout.PivotAggregationColumns.map((col) => col.ColumnId)], this.gridApi.getColumnDefs());
836
+ const columnIds = getColumnOrderIdsForAllColDefs([
837
+ ...layout.PivotColumns,
838
+ ...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),
839
+ ], this.gridApi.getColumnDefs());
828
840
  const pivotAggsToIndexes = layout.PivotAggregationColumns.reduce((acc, { ColumnId }, index) => {
829
841
  acc[ColumnId] = index;
830
842
  return acc;
@@ -1039,6 +1051,23 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
1039
1051
  // now recompute and apply the last one
1040
1052
  this.computePivotAggregations(layout, columnState);
1041
1053
  this.gridApi.applyColumnState(columnState);
1054
+ // let's also include the column widths of the pivotResult columns
1055
+ // we can't simply include those in the columnState because the columnState will also apply order
1056
+ // but we don't want to affect the order of the pivotResult columns
1057
+ // so we'll do it manually, and apply the widths after the columnState
1058
+ // by using the gridApi.setColumnWidths method
1059
+ if (layout.ColumnWidths) {
1060
+ const colWidthForPivotResultColumns = [];
1061
+ (this.gridApi.getPivotResultColumns() || []).forEach((col) => {
1062
+ const colId = col.getColId();
1063
+ if (layout.ColumnWidths[colId]) {
1064
+ colWidthForPivotResultColumns.push({ key: colId, newWidth: layout.ColumnWidths[colId] });
1065
+ }
1066
+ });
1067
+ if (colWidthForPivotResultColumns.length) {
1068
+ this.gridApi.setColumnWidths(colWidthForPivotResultColumns);
1069
+ }
1070
+ }
1042
1071
  this.applyPivotExpandLevel(layout);
1043
1072
  const hasGroupedColumns = layout.PivotGroupedColumns && layout.PivotGroupedColumns.length;
1044
1073
  // but also let's not forget to apply the row group values