@adaptabletools/adaptable 20.2.5 → 20.2.6

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": "20.2.5",
3
+ "version": "20.2.6",
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",
@@ -92,10 +92,6 @@ export interface AdaptableOptions<TData = any, TContext = Record<string, any>> {
92
92
  * Options for managing Action Columns
93
93
  */
94
94
  actionColumnOptions?: ActionColumnOptions<TData>;
95
- /**
96
- * Options for managing Row Forms
97
- */
98
- rowFormOptions?: RowFormOptions<TData>;
99
95
  /**
100
96
  * Options for managing Alerts in AdapTable
101
97
  *
@@ -237,6 +233,10 @@ export interface AdaptableOptions<TData = any, TContext = Record<string, any>> {
237
233
  * @noCodeContainer
238
234
  */
239
235
  quickSearchOptions?: QuickSearchOptions<TData>;
236
+ /**
237
+ * Options for managing Row Forms
238
+ */
239
+ rowFormOptions?: RowFormOptions<TData>;
240
240
  /**
241
241
  * Setting panel options
242
242
  *
@@ -5,7 +5,7 @@ import { FormContext } from '../AdaptableState/Common/FormContext';
5
5
  */
6
6
  export interface DataSetOptions<TData = any> {
7
7
  /**
8
- * Collection of Data Sets to provide Data to AdapTable
8
+ * Collection of Data Sets to provide data to AdapTable
9
9
  */
10
10
  dataSets?: DataSet[];
11
11
  }
@@ -95,6 +95,10 @@ export interface AdaptableColumn<TData = any> extends AdaptableColumnBase {
95
95
  * Is Column editable; returns FALSE if Column has conditional/dynamic editability, assuming some rows are editable
96
96
  */
97
97
  readOnly: boolean;
98
+ /**
99
+ * Is Column resizable
100
+ */
101
+ resizable: boolean;
98
102
  /**
99
103
  * Is Column currently visible
100
104
  */
@@ -32,11 +32,11 @@ export interface Report extends AdaptableObject {
32
32
  */
33
33
  Name: ReportNameType;
34
34
  /**
35
- * Columns to display: 'AllColumns', 'VisibleColumns', 'SelectedColumns', 'ScopeColumns'
35
+ * Columns to display: `AllColumns`, `VisibleColumns`, `SelectedColumns`, `ScopeColumns`
36
36
  */
37
37
  ReportColumnScope: ReportColumnScope;
38
38
  /**
39
- * Rows to export: 'AllRows', 'VisibleRows', 'SelectedRows', 'ExpressionRows'
39
+ * Rows to export: `AllRows`, `VisibleRows`, `SelectedRows`, `ExpressionRows`
40
40
  */
41
41
  ReportRowScope: ReportRowScope;
42
42
  /**
@@ -22,11 +22,11 @@ export interface FormatColumnState extends BaseState {
22
22
  */
23
23
  export interface FormatColumn extends SuspendableObject {
24
24
  /**
25
- * Where Format will be applied - whole Row, some Columns or all Columns of given DataType
25
+ * Where Format will be applied: whole Row, some Columns, or Columns of DataType
26
26
  */
27
27
  Scope: ColumnScope;
28
28
  /**
29
- * Rule used to decide whether to apply the Format; if undefined Format is always applied
29
+ * Rule to decide whether to apply Format; if undefined Format is always applied
30
30
  */
31
31
  Rule?: FormatColumnRule;
32
32
  /**
@@ -46,7 +46,7 @@ export interface FormatColumn extends SuspendableObject {
46
46
  */
47
47
  RowScope?: RowScope;
48
48
  /**
49
- * When to format Columns in Column Groups (can be 'Expanded', 'Collapsed' or 'Both')
49
+ * When to format Columns in Column Groups ('Expanded', 'Collapsed' or 'Both')
50
50
  *
51
51
  */
52
52
  ColumnGroupScope?: ColumnGroupScope;
@@ -72,14 +72,14 @@ export interface AdaptableApi {
72
72
  * Provides access to the Bulk Update Module
73
73
  */
74
74
  bulkUpdateApi: BulkUpdateApi;
75
- /**
76
- * Functions for managing Holidays
77
- */
78
- calendarApi: CalendarApi;
79
75
  /**
80
76
  * Provides access to the Calculated Column Module
81
77
  */
82
78
  calculatedColumnApi: CalculatedColumnApi;
79
+ /**
80
+ * Functions for managing Holidays
81
+ */
82
+ calendarApi: CalendarApi;
83
83
  /**
84
84
  * Provides access to the Cell Summary Module
85
85
  */
@@ -93,9 +93,21 @@ export interface AdaptableApi {
93
93
  */
94
94
  columnApi: ColumnApi;
95
95
  /**
96
- * Methods giving access to Adaptable State
96
+ * Provides access to Column Menu
97
97
  */
98
- stateApi: StateApi;
98
+ columnMenuApi: ColumnMenuApi;
99
+ /**
100
+ * Provides access to Context Menu
101
+ */
102
+ contextMenuApi: ContextMenuApi;
103
+ /**
104
+ * Provides access to the Comment Module
105
+ */
106
+ commentApi: CommentApi;
107
+ /**
108
+ * Manages the `Scope` object - used widely to determine where objects are applied
109
+ */
110
+ columnScopeApi: ColumnScopeApi;
99
111
  /**
100
112
  * Provides access to the Custom Sort Module
101
113
  */
@@ -108,6 +120,10 @@ export interface AdaptableApi {
108
120
  * Provides run-time access to the Data Changes Module
109
121
  **/
110
122
  dataChangeHistoryApi: DataChangeHistoryApi;
123
+ /**
124
+ * Provides access to the Data Import Module
125
+ */
126
+ dataImportApi: DataImportApi;
111
127
  /**
112
128
  * Provides access to Data Sets
113
129
  */
@@ -124,6 +140,14 @@ export interface AdaptableApi {
124
140
  * Provides access to the Export Module and Reports
125
141
  */
126
142
  exportApi: ExportApi;
143
+ /**
144
+ * Manages AdapTableQL Expressions
145
+ */
146
+ expressionApi: ExpressionApi;
147
+ /**
148
+ * Manages the FDC3 capabilities of AdapTable
149
+ */
150
+ fdc3Api: Fdc3Api;
127
151
  /**
128
152
  * Provides access to Filtering in AdapTable
129
153
  */
@@ -148,6 +172,14 @@ export interface AdaptableApi {
148
172
  * Provides access to the Layout Module
149
173
  */
150
174
  layoutApi: LayoutApi;
175
+ /**
176
+ * Provides access to the Named Query Module
177
+ */
178
+ namedQueryApi: NamedQueryApi;
179
+ /**
180
+ * Provides access to the Note Module
181
+ */
182
+ noteApi: NoteApi;
151
183
  /**
152
184
  * Provides access to Adaptable Options
153
185
  */
@@ -164,14 +196,6 @@ export interface AdaptableApi {
164
196
  * Manages the Predicate - a boolean-return function used in Filters and Alerts
165
197
  */
166
198
  predicateApi: PredicateApi;
167
- /**
168
- * Provides access to the Named Query Module
169
- */
170
- namedQueryApi: NamedQueryApi;
171
- /**
172
- * Manages AdapTableQL Expressions
173
- */
174
- expressionApi: ExpressionApi;
175
199
  /**
176
200
  * Provides access to the Quick Search Module
177
201
  */
@@ -188,10 +212,6 @@ export interface AdaptableApi {
188
212
  * Provides access to the Settings Panel
189
213
  */
190
214
  settingsPanelApi: SettingsPanelApi;
191
- /**
192
- * Manages the `Scope` object - used widely to determine where objects are applied
193
- */
194
- columnScopeApi: ColumnScopeApi;
195
215
  /**
196
216
  * Provides access to the Shortcut Module
197
217
  */
@@ -200,6 +220,10 @@ export interface AdaptableApi {
200
220
  * Provides access to the Smart Edit Module
201
221
  */
202
222
  smartEditApi: SmartEditApi;
223
+ /**
224
+ * Methods giving access to Adaptable State
225
+ */
226
+ stateApi: StateApi;
203
227
  /**
204
228
  * Provides run-time access to the AdapTable Status Bar
205
229
  */
@@ -228,30 +252,6 @@ export interface AdaptableApi {
228
252
  * Manages User Interface Options where colours, styles and custom column values are configured
229
253
  */
230
254
  userInterfaceApi: UserInterfaceApi;
231
- /**
232
- * Provides access to the Note Module
233
- */
234
- noteApi: NoteApi;
235
- /**
236
- * Provides access to Column Menu
237
- */
238
- columnMenuApi: ColumnMenuApi;
239
- /**
240
- * Provides access to Context Menu
241
- */
242
- contextMenuApi: ContextMenuApi;
243
- /**
244
- * Provides access to the Comment Module
245
- */
246
- commentApi: CommentApi;
247
- /**
248
- * Provides access to the Data Import Module
249
- */
250
- dataImportApi: DataImportApi;
251
- /**
252
- * Manages the FDC3 capabilities of AdapTable
253
- */
254
- fdc3Api: Fdc3Api;
255
255
  /**
256
256
  * Cleanup method - call only for vanilla JavaScript components, as framework components handle cleanup on destroy/unmount. By default, it unmounts the Adaptable component and destroys the AG Grid instance.
257
257
  * @param config - optional configuration object
@@ -1,4 +1,4 @@
1
- import { AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, RowChangedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowFormSubmittedInfo, RowSelectionChangedInfo, ScheduleTriggeredInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo } from '../types';
1
+ import { AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowChangedInfo, RowFormSubmittedInfo, RowSelectionChangedInfo, ScheduleTriggeredInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo } from '../types';
2
2
  /**
3
3
  * Responsible for publishing the many Events that AdapTable fires
4
4
  */
@@ -12,6 +12,7 @@ const ROW_GROUP_COLUMN_DEFAULTS = {
12
12
  friendlyName: 'Group',
13
13
  isPrimaryKey: false,
14
14
  readOnly: false,
15
+ resizable: true,
15
16
  visible: true,
16
17
  alwaysHidden: false,
17
18
  fieldOnly: false,
@@ -1,10 +1,4 @@
1
- import { CustomSortOptions } from '../AdaptableOptions/CustomSortOptions';
2
- import { DataSetOptions } from '../AdaptableOptions/DataSetOptions';
3
- import { ActionColumnOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnMenuOptions, ColumnOptions, ContainerOptions, ContextMenuOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, NoteOptions, NotificationsOptions, PredicateOptions, QuickSearchOptions, RowFormOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../types';
4
- import { Fdc3Options } from '../AdaptableOptions/Fdc3Options';
5
- import { ExpressionOptions } from '../AdaptableOptions/ExpressionOptions';
6
- import { DataImportOptions } from '../AdaptableOptions/DataImportOptions';
7
- import { CommentOptions } from '../AdaptableOptions/CommentOptions';
1
+ import { ActionColumnOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnMenuOptions, ColumnOptions, CommentOptions, ContainerOptions, ContextMenuOptions, CustomSortOptions, DashboardOptions, DataChangeHistoryOptions, DataImportOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, ExpressionOptions, Fdc3Options, FilterOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, NoteOptions, NotificationsOptions, PredicateOptions, QuickSearchOptions, RowFormOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../types';
8
2
  /**
9
3
  * Range of functions to access Adaptable Options
10
4
  */
@@ -25,9 +25,9 @@ export class TeamSharingModule extends AdaptableModuleBase {
25
25
  ];
26
26
  }
27
27
  onAdaptableReady() {
28
- // make sure there is no zombie import process remaining (in case a previous import crashed)
29
- this.api.internalApi.dispatchReduxAction(TeamSharingRedux.TeamSharingCommitImport());
30
28
  if (this.api.teamSharingApi.isTeamSharingAvailable()) {
29
+ // make sure there is no zombie import process remaining (in case a previous import crashed)
30
+ this.api.internalApi.dispatchReduxAction(TeamSharingRedux.TeamSharingCommitImport());
31
31
  this.api.teamSharingApi.refreshTeamSharing();
32
32
  }
33
33
  this.api.eventApi.on('AdaptableStateChanged', (adaptableStateChangedInfo) => this.handleStateChanged(adaptableStateChangedInfo));
@@ -87,7 +87,7 @@ const DashboardComponent = (props) => {
87
87
  };
88
88
  const renderQuickSearch = () => {
89
89
  return (React.createElement(Box, { ml: 2 },
90
- React.createElement(QuickSearchInput, { width: '7rem' })));
90
+ React.createElement(QuickSearchInput, { width: '7rem', className: "ab-DashboardToolbar__QuickSearch__text" })));
91
91
  };
92
92
  let instanceName = props.api.internalApi.getToolbarTitle();
93
93
  let dashboardOptions = props.api.optionsApi.getDashboardOptions();
@@ -184,7 +184,7 @@ const ColumnRow = (props) => {
184
184
  props.onColumnNameChange(props.column.columnId, event.target.value);
185
185
  }, value: customHeader })),
186
186
  React.createElement(FormRow, { label: "Width" },
187
- React.createElement(Input, { "data-name": "column-width", className: "ab-Layout-Wizard__ColumnRow__Input", type: "number", placeholder: "Column width", onChange: (event) => {
187
+ React.createElement(Input, { "data-name": "column-width", className: "ab-Layout-Wizard__ColumnRow__Input", type: "number", placeholder: "Column width", disabled: !props.column.resizable, onChange: (event) => {
188
188
  let value = parseFloat(event.target.value);
189
189
  value = typeof value === 'number' && !isNaN(value) ? value : void 0;
190
190
  props.onColumnWidthChange(props.column.columnId, value);
@@ -3,5 +3,6 @@ export interface QuickSearchInputProps {
3
3
  className?: string;
4
4
  autoFocus?: boolean;
5
5
  width?: string | number;
6
+ onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
6
7
  }
7
8
  export declare const QuickSearchInput: React.FunctionComponent<QuickSearchInputProps>;
@@ -17,7 +17,7 @@ export const QuickSearchInput = (props) => {
17
17
  QuickSearchText,
18
18
  onRunQuickSearch,
19
19
  });
20
- return (React.createElement(AdaptableFormControlTextClear, { "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: join('ab-DashboardToolbar__QuickSearch__text', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: isServerSideRowModel ? null : (React.createElement(Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
20
+ return (React.createElement(AdaptableFormControlTextClear, { onClick: props.onClick, "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: join('ab-QuickSearch__control', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: isServerSideRowModel ? null : (React.createElement(Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
21
21
  React.createElement(SimpleButton, { "aria-label": 'Previous Match', icon: "arrow-up", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoPreviousMatch() }),
22
22
  React.createElement(SimpleButton, { "aria-label": 'Next Match', icon: "arrow-down", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() }))) }));
23
23
  };
@@ -1,12 +1,5 @@
1
1
  import * as React from 'react';
2
- import { useDispatch, useSelector } from 'react-redux';
3
- import { useAdaptable } from '../AdaptableContext';
4
- import { AdaptableFormControlTextClear } from '../Components/Forms/AdaptableFormControlTextClear';
5
- import * as QuickSearchRedux from '../../Redux/ActionsReducers/QuickSearchRedux';
2
+ import { QuickSearchInput } from './QuickSearchInput';
6
3
  export const QuickSearchStatusBarContent = () => {
7
- const text = useSelector((state) => state.QuickSearch.QuickSearchText);
8
- const dispatch = useDispatch();
9
- const adaptable = useAdaptable();
10
- const handleTextChange = React.useCallback((text) => dispatch(QuickSearchRedux.QuickSearchRun(text)), []);
11
- return (React.createElement(AdaptableFormControlTextClear, { onClick: (event) => event.stopPropagation(), type: "text", inputStyle: { padding: '2px 3px', width: 90 }, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, value: text, OnTextChange: handleTextChange }));
4
+ return React.createElement(QuickSearchInput, { onClick: (event) => event.stopPropagation() });
12
5
  };
@@ -434,6 +434,7 @@ export class AdaptableAgGrid {
434
434
  this.refreshHeader();
435
435
  const currentLayout = this.api.layoutApi.getCurrentLayout();
436
436
  checkForDuplicateColumns(currentLayout);
437
+ this._prevLayout = currentLayout;
437
438
  this.__prevLayoutForRefresh = currentLayout;
438
439
  if (isPivotLayout(currentLayout)) {
439
440
  // this is very very strange!
@@ -471,6 +471,7 @@ export class AgGridAdapter {
471
471
  isTreeColumn,
472
472
  columnId: ColumnId,
473
473
  field: colDef.field,
474
+ resizable: colDef.resizable !== false,
474
475
  friendlyName: friendlyName,
475
476
  isPrimaryKey: ColumnId === pkColumn,
476
477
  dataType: dataType,
@@ -109,9 +109,10 @@ export class AgGridColumnAdapter {
109
109
  this.agGridApi.getAllGridColumns();
110
110
  if (pivotMode) {
111
111
  const pivotResultColumns = this.agGridApi.getPivotResultColumns() || [];
112
- if (pivotResultColumns.length) {
113
- cols = [...cols, ...pivotResultColumns];
114
- }
112
+ const autoGroupColumns = this.agGridApi
113
+ .getAllGridColumns()
114
+ .filter((column) => this.adaptableApi.columnApi.isAutoRowGroupColumn(column.getColId()));
115
+ cols = [...autoGroupColumns, ...cols, ...pivotResultColumns];
115
116
  }
116
117
  // this needs to be here, before the other setup below
117
118
  // so the setup methods below reference the correct columns in adaptable store
@@ -419,7 +419,7 @@ export class AgGridExportAdapter {
419
419
  let rawValue = rowNode.key;
420
420
  return { columnId, rawValue };
421
421
  }
422
- if (this.adaptableApi.columnApi.isPivotResultColumn(agColumn.getColId())) {
422
+ if (!!rowNode.aggData) {
423
423
  const columnId = agColumn.getColId();
424
424
  const rawValue = rowNode.aggData?.[columnId];
425
425
  return { columnId, rawValue };
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  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" || '',
3
- PUBLISH_TIMESTAMP: 1751286758695 || Date.now(),
4
- VERSION: "20.2.5" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1751633635859 || Date.now(),
4
+ VERSION: "20.2.6" || '--current-version--',
5
5
  };
@@ -1016,7 +1016,9 @@ export class LayoutManager extends LMEmitter {
1016
1016
  acc[colId] = index;
1017
1017
  return acc;
1018
1018
  }, {});
1019
- columnState.applyOrder = true;
1019
+ // having this set to true will change pivot column order when there is sorting
1020
+ // and we don't want that to happen #keep-sorted-columns-in-same-order-as-unsorted
1021
+ // columnState.applyOrder = true;
1020
1022
  const columnIds = getColumnOrderIdsForAllColDefs([
1021
1023
  ...layout.PivotColumns,
1022
1024
  ...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),