@adaptabletools/adaptable 20.2.5 → 20.2.7
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 +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +4 -4
- package/src/AdaptableOptions/DataSetOptions.d.ts +1 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +4 -0
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +42 -42
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +2 -2
- package/src/Api/GridFilterApi.d.ts +10 -1
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +3 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +10 -0
- package/src/Api/Implementation/LayoutHelpers.js +4 -4
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StateApiImpl.js +7 -4
- package/src/Api/OptionsApi.d.ts +1 -7
- package/src/Api/StateApi.d.ts +7 -0
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/View/Components/ReorderDraggable/index.js +2 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +4 -2
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchInput.d.ts +1 -0
- package/src/View/QuickSearch/QuickSearchInput.js +1 -1
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +2 -9
- package/src/View/StateManagement/components/ExportDropdown.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +1 -0
- package/src/agGrid/AgGridAdapter.js +3 -2
- package/src/agGrid/AgGridColumnAdapter.js +4 -3
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +4 -4
- package/src/layout-manager/src/index.js +5 -3
- package/src/layout-manager/src/isLayoutEqual.js +0 -1
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "20.2.
|
|
3
|
+
"version": "20.2.7",
|
|
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
|
|
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:
|
|
35
|
+
* Columns to display: `AllColumns`, `VisibleColumns`, `SelectedColumns`, `ScopeColumns`
|
|
36
36
|
*/
|
|
37
37
|
ReportColumnScope: ReportColumnScope;
|
|
38
38
|
/**
|
|
39
|
-
* Rows to export:
|
|
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
|
|
25
|
+
* Where Format will be applied: whole Row, some Columns, or Columns of DataType
|
|
26
26
|
*/
|
|
27
27
|
Scope: ColumnScope;
|
|
28
28
|
/**
|
|
29
|
-
* Rule
|
|
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 (
|
|
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
|
-
*
|
|
96
|
+
* Provides access to Column Menu
|
|
97
97
|
*/
|
|
98
|
-
|
|
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
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo,
|
|
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
|
*/
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -503,10 +503,10 @@ export interface GridApi {
|
|
|
503
503
|
*/
|
|
504
504
|
refreshRowNode(rowNode: IRowNode): void;
|
|
505
505
|
/**
|
|
506
|
-
* Forces
|
|
506
|
+
* Forces re-render of given rows (if none provided, all rows are refreshed)
|
|
507
507
|
* @param rowNodes AG Grid rows
|
|
508
508
|
*/
|
|
509
|
-
refreshRowNodes(rowNodes
|
|
509
|
+
refreshRowNodes(rowNodes?: IRowNode[]): void;
|
|
510
510
|
/**
|
|
511
511
|
* Forces a re-render of all Group Rows (including aggregations)
|
|
512
512
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridFilter } from '../types';
|
|
1
|
+
import { GridFilter, NamedQuery } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Provides run-time access to Grid Filter section of Adaptable State.
|
|
4
4
|
*/
|
|
@@ -8,6 +8,10 @@ export interface GridFilterApi {
|
|
|
8
8
|
* @returns Grid Filter
|
|
9
9
|
*/
|
|
10
10
|
getCurrentGridFilter(): GridFilter | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Re-applies the Grid Filter
|
|
13
|
+
*/
|
|
14
|
+
reApplyGridFilter(): void;
|
|
11
15
|
/**
|
|
12
16
|
* Retrieves the Grid Filter's Expression from the current layout
|
|
13
17
|
* @returns Grid Filter Expression
|
|
@@ -18,6 +22,11 @@ export interface GridFilterApi {
|
|
|
18
22
|
* @param expression filter string
|
|
19
23
|
*/
|
|
20
24
|
setGridFilterExpression(expression: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the Grid Filter (for the current layout)
|
|
27
|
+
* @param namedQuery: NamedQuery to use
|
|
28
|
+
*/
|
|
29
|
+
setGridFilterExpressionUsingNamedQuery(namedQuery: NamedQuery): void;
|
|
21
30
|
/**
|
|
22
31
|
* Clears the Grid Filter (for the current Layout)
|
|
23
32
|
*/
|
|
@@ -126,7 +126,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
126
126
|
refreshColumns(columnIds: string[]): void;
|
|
127
127
|
refreshRowByPrimaryKey(primaryKey: any): void;
|
|
128
128
|
refreshRowNode(rowNode: IRowNode): void;
|
|
129
|
-
refreshRowNodes(rowNodes
|
|
129
|
+
refreshRowNodes(rowNodes?: IRowNode[]): void;
|
|
130
130
|
refreshGroupRowNodes(): void;
|
|
131
131
|
isCellEditable(gridCell: GridCell): boolean;
|
|
132
132
|
isCellEdited(gridCell: GridCell): boolean;
|
|
@@ -2,13 +2,15 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
2
2
|
import { GridFilterApi } from '../GridFilterApi';
|
|
3
3
|
import { GridFilterInternalApi } from '../Internal/GridFilterInternalApi';
|
|
4
4
|
import { ApiBase } from './ApiBase';
|
|
5
|
-
import { GridFilter } from '../../types';
|
|
5
|
+
import { GridFilter, NamedQuery } from '../../types';
|
|
6
6
|
export declare class GridFilterApiImpl extends ApiBase implements GridFilterApi {
|
|
7
7
|
internalApi: GridFilterInternalApi;
|
|
8
8
|
constructor(_adaptable: IAdaptable);
|
|
9
|
+
reApplyGridFilter(): void;
|
|
9
10
|
getCurrentGridFilter(): GridFilter | undefined;
|
|
10
11
|
getCurrentGridFilterExpression(): string | undefined;
|
|
11
12
|
setGridFilterExpression(filter: string): void;
|
|
13
|
+
setGridFilterExpressionUsingNamedQuery(namedQuery: NamedQuery): void;
|
|
12
14
|
clearGridFilter(): void;
|
|
13
15
|
openUIEditorForGridFilter(expression?: string): void;
|
|
14
16
|
suspendGridFilter(): void;
|
|
@@ -8,6 +8,12 @@ export class GridFilterApiImpl extends ApiBase {
|
|
|
8
8
|
super(_adaptable);
|
|
9
9
|
this.internalApi = new GridFilterInternalApi(_adaptable);
|
|
10
10
|
}
|
|
11
|
+
reApplyGridFilter() {
|
|
12
|
+
const currentGridFilter = this.getCurrentGridFilter();
|
|
13
|
+
if (currentGridFilter?.Expression) {
|
|
14
|
+
this.setGridFilterExpression(currentGridFilter.Expression);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
11
17
|
getCurrentGridFilter() {
|
|
12
18
|
return this.getLayoutApi().getCurrentLayout()?.GridFilter;
|
|
13
19
|
}
|
|
@@ -21,6 +27,10 @@ export class GridFilterApiImpl extends ApiBase {
|
|
|
21
27
|
setGridFilterExpression(filter) {
|
|
22
28
|
this.dispatchAction(LayoutRedux.LayoutGridFilterSet(filter));
|
|
23
29
|
}
|
|
30
|
+
setGridFilterExpressionUsingNamedQuery(namedQuery) {
|
|
31
|
+
const expressionString = 'QUERY("' + namedQuery.Name + '")';
|
|
32
|
+
this.setGridFilterExpression(expressionString);
|
|
33
|
+
}
|
|
24
34
|
clearGridFilter() {
|
|
25
35
|
this.dispatchAction(LayoutRedux.LayoutGridFilterClear());
|
|
26
36
|
}
|
|
@@ -161,7 +161,7 @@ export const tableLayoutToTableLayoutModel = (tableLayout) => {
|
|
|
161
161
|
};
|
|
162
162
|
});
|
|
163
163
|
const result = simplifyTableLayoutModel({
|
|
164
|
-
|
|
164
|
+
Name: tableLayout.Name,
|
|
165
165
|
SuppressAggFuncInHeader: tableLayout.SuppressAggFuncInHeader,
|
|
166
166
|
TableColumns: tableLayout.TableColumns,
|
|
167
167
|
ColumnWidths: tableLayout.ColumnWidths,
|
|
@@ -223,7 +223,7 @@ export const pivotLayoutToPivotLayoutModel = (pivotLayout) => {
|
|
|
223
223
|
pivotLayout = structuredClone(pivotLayout);
|
|
224
224
|
cleanupAdaptableObjectPrimitives(pivotLayout);
|
|
225
225
|
const result = simplifyPivotLayoutModel({
|
|
226
|
-
|
|
226
|
+
Name: pivotLayout.Name,
|
|
227
227
|
SuppressAggFuncInHeader: pivotLayout.SuppressAggFuncInHeader,
|
|
228
228
|
ColumnWidths: pivotLayout.ColumnWidths,
|
|
229
229
|
ColumnVisibility: pivotLayout.ColumnVisibility,
|
|
@@ -292,7 +292,7 @@ function toAggFunc(aggFunc) {
|
|
|
292
292
|
}
|
|
293
293
|
export const tableLayoutModelToTableLayout = (layoutModel) => {
|
|
294
294
|
const tableLayout = {
|
|
295
|
-
Name: layoutModel.
|
|
295
|
+
Name: layoutModel.Name,
|
|
296
296
|
TableColumns: layoutModel.TableColumns,
|
|
297
297
|
ColumnWidths: layoutModel.ColumnWidths,
|
|
298
298
|
ColumnVisibility: layoutModel.ColumnVisibility,
|
|
@@ -395,7 +395,7 @@ function toAggregationColumnValue(columnAggregationModel) {
|
|
|
395
395
|
}
|
|
396
396
|
export const pivotLayoutModelToPivotLayout = (layoutModel) => {
|
|
397
397
|
const pivotLayout = {
|
|
398
|
-
Name: layoutModel.
|
|
398
|
+
Name: layoutModel.Name,
|
|
399
399
|
PivotColumns: layoutModel.PivotColumns,
|
|
400
400
|
TableColumns: layoutModel.TableColumns,
|
|
401
401
|
ColumnWidths: layoutModel.ColumnWidths,
|
|
@@ -31,6 +31,7 @@ export declare class StateApiImpl extends ApiBase implements StateApi {
|
|
|
31
31
|
reloadInitialState(newInitialState?: InitialState): void;
|
|
32
32
|
getAllState(): AdaptableState;
|
|
33
33
|
getPersistedState(): AdaptablePersistentState;
|
|
34
|
+
getPersistentState(): AdaptablePersistentState;
|
|
34
35
|
getAllUserState(): BaseState[];
|
|
35
36
|
loadUserState(state: InitialState): void;
|
|
36
37
|
getAdaptableFilterState(): AdaptableFilterState;
|
|
@@ -53,7 +53,7 @@ export class StateApiImpl extends ApiBase {
|
|
|
53
53
|
}
|
|
54
54
|
reloadInitialState(newInitialState) {
|
|
55
55
|
const adaptableOptions = this.getOptions();
|
|
56
|
-
const oldState = this.
|
|
56
|
+
const oldState = this.getPersistentState();
|
|
57
57
|
// clearing filters so that AG Grid doesnt display the filter icon in a column header after grid reloads
|
|
58
58
|
// but this is a hack so would be nicer if there was a better way to do this
|
|
59
59
|
this.getGridApi().clearFiltering();
|
|
@@ -71,7 +71,7 @@ export class StateApiImpl extends ApiBase {
|
|
|
71
71
|
initialState: newInitialState || adaptableOptions.initialState,
|
|
72
72
|
flushCurrentState: false,
|
|
73
73
|
}).then(() => {
|
|
74
|
-
const newState = this.
|
|
74
|
+
const newState = this.getPersistentState();
|
|
75
75
|
this.getEventApi().internalApi.fireAdaptableStateReloadedEvent(oldState, newState);
|
|
76
76
|
});
|
|
77
77
|
});
|
|
@@ -81,11 +81,14 @@ export class StateApiImpl extends ApiBase {
|
|
|
81
81
|
return this.getAdaptableState();
|
|
82
82
|
}
|
|
83
83
|
getPersistedState() {
|
|
84
|
-
|
|
84
|
+
logDeprecation(this.getAdatableLogger(), 'StateApi', 'getPersistedState', 'getPersistentState');
|
|
85
|
+
return this.getPersistentState();
|
|
86
|
+
}
|
|
87
|
+
getPersistentState() {
|
|
85
88
|
return this.getAdaptableStore().getCurrentStorageState();
|
|
86
89
|
}
|
|
87
90
|
getAllUserState() {
|
|
88
|
-
return Object.values(this.
|
|
91
|
+
return Object.values(this.getPersistentState());
|
|
89
92
|
}
|
|
90
93
|
loadUserState(state) {
|
|
91
94
|
this.setAdaptableStateKey(this.getOptions().adaptableStateKey, {
|
package/src/Api/OptionsApi.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { CustomSortOptions } from '../
|
|
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
|
*/
|
package/src/Api/StateApi.d.ts
CHANGED
|
@@ -69,8 +69,15 @@ export interface StateApi {
|
|
|
69
69
|
getAllState(): AdaptableState;
|
|
70
70
|
/**
|
|
71
71
|
* Retrieves persisted state in AdapTable, i.e. state last stored with `StateOptions.persistState()` function
|
|
72
|
+
*
|
|
73
|
+
* @deprecated use `getPersistentState()` instead
|
|
72
74
|
*/
|
|
73
75
|
getPersistedState(): AdaptablePersistentState;
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves the persistent state in Adaptable, i.e. state that is passed to the `StateOptions.persistState()` function.
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
getPersistentState(): AdaptablePersistentState;
|
|
74
81
|
/**
|
|
75
82
|
* Gets filter-related sections of Adaptable State
|
|
76
83
|
*/
|
|
@@ -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));
|
|
@@ -13,7 +13,8 @@ export function ReorderDraggable(props) {
|
|
|
13
13
|
return (React.createElement(Flex, { className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier ?? index, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option", ...flexProps },
|
|
14
14
|
React.createElement(Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
|
|
15
15
|
reorderable ? (React.createElement(Box, { mr: 3, ...dragHandleProps },
|
|
16
|
-
React.createElement(Icon, { name: "drag", style: { cursor: 'grab' } }))) :
|
|
16
|
+
React.createElement(Icon, { name: "drag", style: { cursor: 'grab' } }))) : (React.createElement(Box, { mr: 3 },
|
|
17
|
+
React.createElement(Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }))),
|
|
17
18
|
props.renderOption(option, index))));
|
|
18
19
|
};
|
|
19
20
|
const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
|
|
@@ -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);
|
|
@@ -376,7 +376,9 @@ export const ColumnsSection = (props) => {
|
|
|
376
376
|
React.createElement(Box, null,
|
|
377
377
|
React.createElement(NaturallySizedIcon, { name: "info" })),
|
|
378
378
|
React.createElement(Text, { ml: 1 }, "Expand each Column to set Width, Pinnning and a custom Header")),
|
|
379
|
-
React.createElement(ReorderDraggable, { toIdentifier: (option) => `${option.columnId}`,
|
|
379
|
+
React.createElement(ReorderDraggable, { toIdentifier: (option) => `${option.columnId}`, isOptionDraggable: (option) => {
|
|
380
|
+
return option.moveable;
|
|
381
|
+
}, order: currentOrder, renderOption: (option) => {
|
|
380
382
|
return (React.createElement(ColumnRow, { onColumnNameChange: handleColumnNameChange, onColumnWidthChange: handleColumnWidthChange, onColumnVisibilityChange: handleColumnVisibilityChange, onPinChange: handlePinChange, layout: layout, column: option }));
|
|
381
383
|
}, onChange: handleColumnsChange }),
|
|
382
384
|
renderSelectionSection({
|
|
@@ -22,7 +22,7 @@ export const PivotRowGroupingSection = (props) => {
|
|
|
22
22
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
23
23
|
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
24
24
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
25
|
-
return ArrayExtensions.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), layout.
|
|
25
|
+
return ArrayExtensions.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), layout.PivotGroupedColumns ?? [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
26
26
|
}, [layout, allGroupableColumns]);
|
|
27
27
|
const onChange = (layout) => {
|
|
28
28
|
props.onChange(normalizeLayout(layout));
|
|
@@ -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-
|
|
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 {
|
|
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
|
-
|
|
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
|
};
|
|
@@ -5,7 +5,7 @@ export const ExportDropdown = (props) => {
|
|
|
5
5
|
const handleChange = (destination) => {
|
|
6
6
|
switch (props.type) {
|
|
7
7
|
case 'adaptableState':
|
|
8
|
-
const adaptableState = props.api.stateApi.
|
|
8
|
+
const adaptableState = props.api.stateApi.getPersistentState();
|
|
9
9
|
handleExportState(destination, 'adaptableState', adaptableState);
|
|
10
10
|
break;
|
|
11
11
|
case 'initialState':
|
|
@@ -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,
|
|
@@ -620,8 +621,8 @@ export class AgGridAdapter {
|
|
|
620
621
|
return false;
|
|
621
622
|
}
|
|
622
623
|
isColumnSortable(colDef) {
|
|
623
|
-
if (colDef
|
|
624
|
-
return colDef.sortable;
|
|
624
|
+
if (colDef) {
|
|
625
|
+
return colDef.sortable ?? true;
|
|
625
626
|
}
|
|
626
627
|
return false;
|
|
627
628
|
}
|
|
@@ -109,9 +109,10 @@ export class AgGridColumnAdapter {
|
|
|
109
109
|
this.agGridApi.getAllGridColumns();
|
|
110
110
|
if (pivotMode) {
|
|
111
111
|
const pivotResultColumns = this.agGridApi.getPivotResultColumns() || [];
|
|
112
|
-
|
|
113
|
-
|
|
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 (
|
|
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:
|
|
4
|
-
VERSION: "20.2.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1751978297635 || Date.now(),
|
|
4
|
+
VERSION: "20.2.7" || '--current-version--',
|
|
5
5
|
};
|