@adaptabletools/adaptable-cjs 22.0.1 → 22.0.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 (30) hide show
  1. package/index.css +18 -14
  2. package/index.css.map +1 -1
  3. package/package.json +2 -2
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
  5. package/src/Api/Internal/ActionColumnInternalApi.js +9 -0
  6. package/src/Api/Internal/RowFormInternalApi.js +4 -1
  7. package/src/Api/Internal/ThemeInternalApi.d.ts +1 -0
  8. package/src/Api/Internal/ThemeInternalApi.js +3 -0
  9. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  10. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  11. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  12. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
  13. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
  14. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +5 -1
  15. package/src/View/Components/PreviewResultsPanel.js +7 -4
  16. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  17. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -3
  18. package/src/agGrid/AdaptableAgGrid.d.ts +2 -1
  19. package/src/agGrid/AdaptableAgGrid.js +1 -1
  20. package/src/agGrid/AgGridExportAdapter.js +6 -2
  21. package/src/components/Dropdown/index.js +3 -3
  22. package/src/env.js +2 -2
  23. package/src/layout-manager/src/destructurePivotColumnId.js +13 -7
  24. package/src/layout-manager/src/index.js +6 -5
  25. package/src/types.d.ts +0 -1
  26. package/tsconfig.cjs.tsbuildinfo +1 -1
  27. package/src/AdaptableOptions/IPushPullPluginOptions.d.ts +0 -35
  28. package/src/AdaptableOptions/IPushPullPluginOptions.js +0 -2
  29. package/src/Utilities/Interface/IPPStyle.d.ts +0 -31
  30. package/src/Utilities/Interface/IPPStyle.js +0 -2
@@ -543,7 +543,7 @@ const ColumnPropertiesEditor = (props) => {
543
543
  { label: 'Moveable', checked: props.column.moveable },
544
544
  { label: 'Pivotable', checked: props.column.pivotable },
545
545
  { label: 'Sortable', checked: props.column.sortable },
546
- ].map(({ label, checked }) => (React.createElement(Flex_1.Flex, { alignItems: "center", className: (0, clsx_1.default)({
546
+ ].map(({ label, checked }) => (React.createElement(Flex_1.Flex, { key: label, alignItems: "center", className: (0, clsx_1.default)({
547
547
  'twa:rounded-standard twa:gap-2': true,
548
548
  }) },
549
549
  React.createElement(Flex_1.Box, { className: "twa:size-5" }, checked ? (React.createElement(icons_1.Icon, { name: "check", className: "twa:text-success" })) : (React.createElement(icons_1.Icon, { name: "close", className: "twa:text-error" }))),
@@ -85,9 +85,7 @@ class SmartEditViewPanelComponent extends React.Component {
85
85
  !shouldDisable && (React.createElement(ButtonApply_1.ButtonApply, { onClick: () => this.onApplyClick(), style: applyButtonStyle, className: `ab-${elementType}__SmartEdit__apply`, tooltip: "Apply Smart Edit", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
86
86
  (this.props.PreviewInfo != null &&
87
87
  this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Apply Smart Edit')),
88
- !shouldDisable && (React.createElement(AdaptablePopover_1.AdaptablePopover, { headerText: "Preview Results", className: `ab-${elementType}__SmartEdit__info`,
89
- // tooltipText="Preview Results"
90
- bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
88
+ !shouldDisable && (React.createElement(AdaptablePopover_1.AdaptablePopover, { headerText: "Preview Results", className: `ab-${elementType}__SmartEdit__info`, bodyText: [previewPanel], popoverMinWidth: 360, popoverMaxWidth: 500, popupPadding: 0, MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
91
89
  }
92
90
  checkSelectedCells() {
93
91
  this.props.onSmartEditCheckSelectedCells();
@@ -16,6 +16,7 @@ import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLan
16
16
  import { IAlertService } from '../Utilities/Services/Interface/IAlertService';
17
17
  import { ITeamSharingService } from '../Utilities/Services/Interface/ITeamSharingService';
18
18
  import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelService';
19
+ import { IThemeService } from '../Utilities/Services/Interface/IThemeService';
19
20
  import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
20
21
  import { AnnotationsService } from '../Utilities/Services/AnnotationsService';
21
22
  import { IModuleCollection } from '../Strategy/Interface/IModule';
@@ -92,9 +93,9 @@ export declare class AdaptableAgGrid implements IAdaptable {
92
93
  Fdc3Service: Fdc3Service;
93
94
  AnnotationsService: AnnotationsService;
94
95
  FlashingCellService: FlashingCellService;
96
+ ThemeService: IThemeService;
95
97
  private LicenseService;
96
98
  private ChartingService;
97
- private ThemeService;
98
99
  private rowListeners;
99
100
  private throttleFilterOnDataChange;
100
101
  private debouncedSetSelectedRows;
@@ -200,9 +200,9 @@ class AdaptableAgGrid {
200
200
  Fdc3Service;
201
201
  AnnotationsService;
202
202
  FlashingCellService;
203
+ ThemeService;
203
204
  LicenseService;
204
205
  ChartingService;
205
- ThemeService;
206
206
  rowListeners;
207
207
  throttleFilterOnDataChange;
208
208
  debouncedSetSelectedRows;
@@ -351,7 +351,9 @@ class AgGridExportAdapter {
351
351
  let exportedColumnIds = [];
352
352
  switch (report.ReportColumnScope) {
353
353
  case 'AllColumns':
354
- exportedColumnIds = exportableColumnIds.filter((colId) => this.isTreeDataGrid() || !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId));
354
+ exportedColumnIds = exportableColumnIds.filter((colId) => this.isTreeDataGrid() ||
355
+ (!this.adaptableApi.columnApi.isAutoRowGroupColumn(colId) &&
356
+ !this.adaptableApi.columnApi.isSelectionColumn(colId)));
355
357
  break;
356
358
  case 'VisibleColumns':
357
359
  exportedColumnIds = getVisibleColumnIds();
@@ -360,7 +362,9 @@ class AgGridExportAdapter {
360
362
  // in this case we have to map the auto-group columns to the real keys
361
363
  exportedColumnIds = [
362
364
  ...groupColumnIds,
363
- ...exportedColumnIds.filter((columnId) => this.isTreeDataGrid() || !this.adaptableApi.columnApi.isAutoRowGroupColumn(columnId)),
365
+ ...exportedColumnIds.filter((columnId) => this.isTreeDataGrid() ||
366
+ (!this.adaptableApi.columnApi.isAutoRowGroupColumn(columnId) &&
367
+ !this.adaptableApi.columnApi.isSelectionColumn(columnId))),
364
368
  ];
365
369
  }
366
370
  break;
@@ -36,7 +36,7 @@ const Dropdown = (props) => {
36
36
  };
37
37
  options = lazyOptions;
38
38
  }
39
- let placeholder = props.emptyText || props.placeholder || 'Select an option';
39
+ let placeholder = props.emptyText || (typeof props.placeholder === 'string' ? props.placeholder : null) || 'Select an option';
40
40
  const finalOptions = options.map((option) => {
41
41
  if (typeof option === 'string') {
42
42
  option = {
@@ -66,7 +66,7 @@ const Dropdown = (props) => {
66
66
  return;
67
67
  }
68
68
  if (e.target === domRef.current) {
69
- selectRef.current.focus();
69
+ selectRef.current?.focus();
70
70
  }
71
71
  };
72
72
  const onBlur = () => {
@@ -80,7 +80,7 @@ const Dropdown = (props) => {
80
80
  selectedText = placeholder;
81
81
  }
82
82
  //20 ... 20 16
83
- const renderClearButton = () => (React.createElement(SimpleButton_1.default, { variant: "text", icon: "close", tone: "none", tooltip: "Clear", iconSize: 20, ...clearButtonProps, className: (0, twMerge_1.twMerge)('twa:p-0 twa:mr-1 twa:z-10 twa:color-inherit', clearButtonProps.className), style: {
83
+ const renderClearButton = () => (React.createElement(SimpleButton_1.default, { variant: "text", icon: "close", tone: "none", tooltip: "Clear", iconSize: 20, ...clearButtonProps, className: (0, twMerge_1.twMerge)('twa:p-0 twa:mr-1 twa:z-10 twa:color-inherit', clearButtonProps?.className), style: {
84
84
  ...(clearButtonProps ? clearButtonProps.style : null),
85
85
  }, onClick: (e) => {
86
86
  e.preventDefault();
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: 1772196204253 || Date.now(),
6
- VERSION: "22.0.1" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1773422119897 || Date.now(),
6
+ VERSION: "22.0.3" || '--current-version--',
7
7
  };
@@ -29,6 +29,10 @@ function destructurePivotColumnId(colDef, currentModel, logWarning) {
29
29
  const pivotColumnIds = pivotColsTxt.split('-');
30
30
  const pivotKeys = pivotKeysTxt.split('-');
31
31
  const pivotColumnId = pivotColumnIds[pivotKeys.length - 1];
32
+ if (aggregationColumnId !== '' && !currentModel.aggColIds.includes(aggregationColumnId)) {
33
+ logWarning(`Unknown aggregation column: ${aggregationColumnId}`);
34
+ return '!unknown!';
35
+ }
32
36
  return {
33
37
  pivotColumnIds,
34
38
  pivotKeys,
@@ -55,16 +59,18 @@ function destructurePivotColumnId(colDef, currentModel, logWarning) {
55
59
  return {
56
60
  pivotColumnIds,
57
61
  pivotKeys,
58
- pivotColumnId: pivotColumnIds[pivotKeys.length],
62
+ pivotColumnId: pivotColumnIds[pivotKeys.length - 1],
59
63
  };
60
64
  }
61
- // For regular pivot columns, work backwards to find aggregation column
62
- const parts = withoutPrefix.split('_');
63
- const lastPart = parts[parts.length - 1];
64
- // Find the longest matching aggregation column id from the end
65
- const aggregationColumnId = currentModel.aggColIds.find((aggId) => lastPart.endsWith(aggId));
65
+ // For regular pivot columns, work backwards to find aggregation column.
66
+ // Check if the full string ends with _${aggColId} rather than splitting by _,
67
+ // since agg column IDs may themselves contain underscores (e.g. github_stars).
68
+ // Sort by length descending so the longest match wins.
69
+ const aggregationColumnId = [...currentModel.aggColIds]
70
+ .sort((a, b) => b.length - a.length)
71
+ .find((aggId) => withoutPrefix.endsWith('_' + aggId));
66
72
  if (!aggregationColumnId) {
67
- logWarning(`Could not identify aggregation column in: ${lastPart}`);
73
+ logWarning(`Could not identify aggregation column in: ${withoutPrefix}`);
68
74
  return '!unknown!';
69
75
  }
70
76
  // Remove aggregation part and get pivot columns
@@ -406,11 +406,12 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
406
406
  PivotExpandLevel: prevLayout?.PivotExpandLevel ?? -1,
407
407
  };
408
408
  if (storePivotResultColumns) {
409
- // Get pivot result columns in display order (not creation order)
410
- const displayedPivotResultColumns = this.gridApi
411
- .getAllDisplayedColumns()
412
- .filter((col) => pivotResultColumnsSet.has(col.getColId()));
413
- pivotLayout.PivotResultColumnsOrder = displayedPivotResultColumns.map((col) => col.getColId());
409
+ // Save all pivot result columns (including hidden ones from collapsed
410
+ // groups) in their current order, so the order is fully preserved.
411
+ const allPivotResultColumnsInOrder = this.gridApi
412
+ .getColumnState()
413
+ .filter((col) => pivotResultColumnsSet.has(col.colId));
414
+ pivotLayout.PivotResultColumnsOrder = allPivotResultColumnsInOrder.map((col) => col.colId);
414
415
  }
415
416
  if (layout.SuppressAggFuncInHeader) {
416
417
  pivotLayout.SuppressAggFuncInHeader = layout.SuppressAggFuncInHeader;
package/src/types.d.ts CHANGED
@@ -28,7 +28,6 @@ export type { CellSummaryOptions } from './AdaptableOptions/CellSummaryOptions';
28
28
  export type { CustomSortOptions, ColumnValuesComparer } from './AdaptableOptions/CustomSortOptions';
29
29
  export type { NoteOptions, NotableCellContext } from './AdaptableOptions/NoteOptions';
30
30
  export type { CommentOptions, CommentableCellContext, CommentLoadContext, } from './AdaptableOptions/CommentOptions';
31
- export type { IPushPullPluginOptions } from './AdaptableOptions/IPushPullPluginOptions';
32
31
  export type { LayoutOptions, LayoutViewOptions, LayoutTagOptions, LayoutExtendedContext, AutoGenerateTagsForLayoutsContext, PivotPreviewColumnsContext, TableLayoutCreationDefaultProperties, PivotLayoutCreationDefaultProperties, LayoutCreationDefaultProperties, LayoutCreationDefaultPropertiesContext, } from './AdaptableOptions/LayoutOptions';
33
32
  export type { ChartingOptions, ChartContainer, ExternalChartingContext, ExternalChartingOptions, SaveChartBehaviour, } from './AdaptableOptions/ChartingOptions';
34
33
  export type { OpenFinPluginOptions } from './AdaptableOptions/OpenFinPluginOptions';