@adaptabletools/adaptable 20.2.4 → 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 +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +4 -4
- package/src/AdaptableOptions/DataSetOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +25 -8
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +4 -0
- package/src/AdaptableState/Common/AggregationColumns.d.ts +6 -0
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +3 -3
- package/src/AdaptableState/LayoutState.d.ts +17 -16
- package/src/Api/AdaptableApi.d.ts +42 -42
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/ExportApi.d.ts +7 -8
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ExportApiImpl.js +20 -11
- package/src/Api/Internal/ExportInternalApi.js +4 -4
- package/src/Api/OptionsApi.d.ts +1 -7
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.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/agGrid/AdaptableAgGrid.js +1 -0
- package/src/agGrid/AgGridAdapter.js +1 -0
- 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/index.js +22 -20
- package/src/metamodel/adaptable.metamodel.d.ts +34 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- 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.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
|
|
8
|
+
* Collection of Data Sets to provide data to AdapTable
|
|
9
9
|
*/
|
|
10
10
|
dataSets?: DataSet[];
|
|
11
11
|
}
|
|
@@ -24,7 +24,7 @@ export interface ExportOptions<TData = any> {
|
|
|
24
24
|
/**
|
|
25
25
|
* User-provided Report Destinations (in addition to those shipped in AdapTable)
|
|
26
26
|
*/
|
|
27
|
-
customDestinations?: CustomDestination[];
|
|
27
|
+
customDestinations?: CustomDestination[] | ((context: CustomDestinationsContext) => CustomDestination[]);
|
|
28
28
|
/**
|
|
29
29
|
* System Reports to use; leave unset for all, empty array for none
|
|
30
30
|
*
|
|
@@ -104,7 +104,7 @@ export interface SystemReportNamesContext extends BaseContext {
|
|
|
104
104
|
*/
|
|
105
105
|
defaultSystemReportNames: SystemReportName[];
|
|
106
106
|
/**
|
|
107
|
-
* Name of
|
|
107
|
+
* Name of current Layout
|
|
108
108
|
*/
|
|
109
109
|
currentLayoutName: string;
|
|
110
110
|
}
|
|
@@ -117,11 +117,11 @@ export interface SystemReportFormatsContext extends BaseContext {
|
|
|
117
117
|
*/
|
|
118
118
|
defaultSystemReportFormats: SystemReportFormat[];
|
|
119
119
|
/**
|
|
120
|
-
* Name of
|
|
120
|
+
* Name of current Layout
|
|
121
121
|
*/
|
|
122
122
|
currentLayoutName: string;
|
|
123
123
|
/**
|
|
124
|
-
* Name of
|
|
124
|
+
* Name of current Report
|
|
125
125
|
*/
|
|
126
126
|
currentReportName?: ReportNameType;
|
|
127
127
|
}
|
|
@@ -130,19 +130,36 @@ export interface SystemReportFormatsContext extends BaseContext {
|
|
|
130
130
|
*/
|
|
131
131
|
export interface SystemExportDestinationsContext extends BaseContext {
|
|
132
132
|
/**
|
|
133
|
-
* Default System
|
|
133
|
+
* Default System Export Destinations
|
|
134
134
|
*/
|
|
135
135
|
defaultSystemExportDestinations: SystemExportDestination[];
|
|
136
136
|
/**
|
|
137
|
-
* Name of
|
|
137
|
+
* Name of current Layout
|
|
138
|
+
*/
|
|
139
|
+
currentLayoutName: string;
|
|
140
|
+
/**
|
|
141
|
+
* Name of current Report
|
|
142
|
+
*/
|
|
143
|
+
currentReportName?: ReportNameType;
|
|
144
|
+
/**
|
|
145
|
+
* Format of current Report
|
|
146
|
+
*/
|
|
147
|
+
currentReportFormat?: ReportFormatType;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Context provided to `ExportOptions.customDestinations` callback
|
|
151
|
+
*/
|
|
152
|
+
export interface CustomDestinationsContext extends BaseContext {
|
|
153
|
+
/**
|
|
154
|
+
* Name of current Layout
|
|
138
155
|
*/
|
|
139
156
|
currentLayoutName: string;
|
|
140
157
|
/**
|
|
141
|
-
* Name of
|
|
158
|
+
* Name of current Report
|
|
142
159
|
*/
|
|
143
160
|
currentReportName?: ReportNameType;
|
|
144
161
|
/**
|
|
145
|
-
* Format of
|
|
162
|
+
* Format of current Report
|
|
146
163
|
*/
|
|
147
164
|
currentReportFormat?: ReportFormatType;
|
|
148
165
|
}
|
|
@@ -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
|
*/
|
|
@@ -7,7 +7,13 @@ export type AggregationColumnValue = string | true | WeightedAverageAggregation;
|
|
|
7
7
|
* Defines an Aggregated Column in a Table Layout
|
|
8
8
|
*/
|
|
9
9
|
export type TableAggregationColumns = {
|
|
10
|
+
/**
|
|
11
|
+
* The Column being Aggretated
|
|
12
|
+
*/
|
|
10
13
|
ColumnId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The type of Aggregation
|
|
16
|
+
*/
|
|
11
17
|
AggFunc: AggregationColumnValue;
|
|
12
18
|
}[];
|
|
13
19
|
/**
|
|
@@ -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;
|
|
@@ -80,12 +80,7 @@ export interface LayoutBase extends AdaptableObject {
|
|
|
80
80
|
*/
|
|
81
81
|
AutoSizeColumns?: boolean;
|
|
82
82
|
/**
|
|
83
|
-
* Position of the Grand Total Row in the Layout
|
|
84
|
-
* @property {boolean | string} GrandTotalRow
|
|
85
|
-
* - 'top' | 'bottom' - Scrollable position at grid edges
|
|
86
|
-
* - 'pinnedTop' | 'pinnedBottom' - Fixed position at grid edges
|
|
87
|
-
* - true - Same as 'pinnedTop'
|
|
88
|
-
* - false/null - Hidden
|
|
83
|
+
* Position of the Grand Total Row in the Layout
|
|
89
84
|
*/
|
|
90
85
|
GrandTotalRow?: 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom' | boolean;
|
|
91
86
|
}
|
|
@@ -191,22 +186,28 @@ export type RowGroupValuesWithExceptionKeys = {
|
|
|
191
186
|
RowGroupDefaultBehavior: 'expanded' | 'collapsed';
|
|
192
187
|
} & XOR<{
|
|
193
188
|
/**
|
|
194
|
-
* @deprecated - use GroupKeys instead
|
|
195
|
-
* to configure the row group expand / collapse behaviour for each combination of row grouped columns.
|
|
189
|
+
* @deprecated - use GroupKeys instead which enables listing exceptions on a per Column basis
|
|
196
190
|
*/
|
|
197
191
|
ExceptionGroupKeys?: any[][];
|
|
198
192
|
}, {
|
|
199
193
|
/**
|
|
200
|
-
*
|
|
201
|
-
* The default value is configured via RowGroupDefaultBehavior, but exceptions are configured by the GroupKeys array.
|
|
202
|
-
* Each item in the GroupKeys array is a an object with `RowGroupedColumns` and `ExceptionGroupKeys`. Those properties
|
|
203
|
-
* configure the collapse/expand exceptions for the specific row group columns.
|
|
194
|
+
* Configures Row Group Expand / Collapse behaviour together with per Column Exceptions
|
|
204
195
|
*/
|
|
205
|
-
GroupKeys?:
|
|
206
|
-
RowGroupedColumns: string[];
|
|
207
|
-
ExceptionGroupKeys?: any[][];
|
|
208
|
-
}[];
|
|
196
|
+
GroupKeys?: GroupKeys[];
|
|
209
197
|
}>;
|
|
198
|
+
/**
|
|
199
|
+
* Enables setting Row Group behaviour with exceptions
|
|
200
|
+
*/
|
|
201
|
+
export interface GroupKeys {
|
|
202
|
+
/**
|
|
203
|
+
* Columns that are Row Grouped
|
|
204
|
+
*/
|
|
205
|
+
RowGroupedColumns: string[];
|
|
206
|
+
/**
|
|
207
|
+
* Exceptions to default behaviour, provided as array or arrays
|
|
208
|
+
*/
|
|
209
|
+
ExceptionGroupKeys?: any[][];
|
|
210
|
+
}
|
|
210
211
|
/**
|
|
211
212
|
* Manages Column Group expand / collapse behaviour, including exceptions
|
|
212
213
|
*/
|
|
@@ -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/ExportApi.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export interface ExportApi {
|
|
|
22
22
|
* Retrieves available System Export Destinations (configured in Export Options)
|
|
23
23
|
*/
|
|
24
24
|
getAvailableSystemDestinations(): SystemExportDestination[];
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves available Custom Destinations (configured in Export Options)
|
|
27
|
+
*/
|
|
28
|
+
getAvailableCustomDestinations(): CustomDestination[];
|
|
25
29
|
/**
|
|
26
30
|
* Retrieves name of currently selected Report
|
|
27
31
|
*/
|
|
@@ -60,11 +64,6 @@ export interface ExportApi {
|
|
|
60
64
|
* Retrieves all Report Formats that are available
|
|
61
65
|
*/
|
|
62
66
|
getAllFormats(): ReportFormatType[];
|
|
63
|
-
/**
|
|
64
|
-
* Retrieves all Custom Destinations from Export Options
|
|
65
|
-
* @returns custom destinations
|
|
66
|
-
*/
|
|
67
|
-
getCustomDestinations(): CustomDestination[];
|
|
68
67
|
/**
|
|
69
68
|
* Retrieves Destination with the given name
|
|
70
69
|
* @param destinationName destination to retrieve
|
|
@@ -120,10 +119,10 @@ export interface ExportApi {
|
|
|
120
119
|
*/
|
|
121
120
|
updateReports(reports: Report[]): Report[];
|
|
122
121
|
/**
|
|
123
|
-
* If the given destination is a
|
|
122
|
+
* If the given destination is a System one
|
|
124
123
|
* @param destination destination to check
|
|
125
124
|
*/
|
|
126
|
-
|
|
125
|
+
isExportDestinationSystem(destinationName: ExportDestinationType): boolean;
|
|
127
126
|
/**
|
|
128
127
|
* Retrieves the Export Destinations that are supported for the given Report Format
|
|
129
128
|
* @param reportFormat - report format to check
|
|
@@ -144,7 +143,7 @@ export interface ExportApi {
|
|
|
144
143
|
* @param format - format of the report
|
|
145
144
|
* @param destination - destination to export to
|
|
146
145
|
* @param exportConfig - optional export configuration
|
|
147
|
-
|
|
146
|
+
*/
|
|
148
147
|
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;
|
|
149
148
|
/**
|
|
150
149
|
* Gets the data for the Report with the given Name in the given Format
|
|
@@ -19,6 +19,8 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
19
19
|
getAvailableSystemReports(): SystemReportName[];
|
|
20
20
|
getAvailableSystemFormats(): SystemReportFormat[];
|
|
21
21
|
getAvailableSystemDestinations(): SystemExportDestination[];
|
|
22
|
+
getAvailableCustomDestinations(): CustomDestination[];
|
|
23
|
+
isExportDestinationSystem(destinationName: string): boolean;
|
|
22
24
|
getAllExportDestinations(): ExportDestinationType[];
|
|
23
25
|
getAllFormats(): ReportFormatType[];
|
|
24
26
|
getAllReports(): Report[];
|
|
@@ -26,8 +28,6 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
26
28
|
clearReport(): void;
|
|
27
29
|
selectFormat(reportFormat: ReportFormatType | null): void;
|
|
28
30
|
clearFormat(): void;
|
|
29
|
-
getCustomDestinations(): CustomDestination[];
|
|
30
|
-
isExportDestinationCustom(destinationName: string): boolean;
|
|
31
31
|
getExportDestinationForm(destinationName: string): AdaptableForm<ExportFormContext> | undefined;
|
|
32
32
|
canExportToExcel(): boolean;
|
|
33
33
|
canExportToCsv(): boolean;
|
|
@@ -2,7 +2,7 @@ import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
|
|
|
2
2
|
import { ApiBase } from './ApiBase';
|
|
3
3
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
4
4
|
import { ExportInternalApi } from '../Internal/ExportInternalApi';
|
|
5
|
-
import { ALL_DATA_REPORT, EMPTY_STRING, SYSTEM_EXPORT_DESTINATIONS, SYSTEM_REPORT_FORMATS, SYSTEM_REPORT_NAMES, VISUAL_EXCEL_FORMAT_REPORT, } from '../../Utilities/Constants/GeneralConstants';
|
|
5
|
+
import { ALL_DATA_REPORT, CLIPBOARD_EXPORT_DESTINATION, DOWNLOAD_EXPORT_DESTINATION, EMPTY_STRING, SYSTEM_EXPORT_DESTINATIONS, SYSTEM_REPORT_FORMATS, SYSTEM_REPORT_NAMES, VISUAL_EXCEL_FORMAT_REPORT, } from '../../Utilities/Constants/GeneralConstants';
|
|
6
6
|
export class ExportApiImpl extends ApiBase {
|
|
7
7
|
constructor(_adaptable) {
|
|
8
8
|
super(_adaptable);
|
|
@@ -38,7 +38,7 @@ export class ExportApiImpl extends ApiBase {
|
|
|
38
38
|
if (this.internalApi.isSystemDestination(destinationName)) {
|
|
39
39
|
return destinationName;
|
|
40
40
|
}
|
|
41
|
-
return this.
|
|
41
|
+
return this.getAvailableCustomDestinations().find((destination) => destination.name === destinationName);
|
|
42
42
|
}
|
|
43
43
|
getAvailableSystemReports() {
|
|
44
44
|
const systemReportNamesOption = this.getExportOptions().systemReportNames;
|
|
@@ -93,10 +93,26 @@ export class ExportApiImpl extends ApiBase {
|
|
|
93
93
|
return true;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
+
getAvailableCustomDestinations() {
|
|
97
|
+
const customDestinationsOption = this.getExportOptions().customDestinations;
|
|
98
|
+
const customDestinations = typeof customDestinationsOption === 'function'
|
|
99
|
+
? customDestinationsOption({
|
|
100
|
+
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
101
|
+
currentLayoutName: this.getLayoutApi().getCurrentLayoutName(),
|
|
102
|
+
currentReportName: this.getExportApi().getCurrentReportName(),
|
|
103
|
+
currentReportFormat: this.getExportApi().getCurrentReportFormat(),
|
|
104
|
+
})
|
|
105
|
+
: customDestinationsOption;
|
|
106
|
+
return customDestinations ?? [];
|
|
107
|
+
}
|
|
108
|
+
isExportDestinationSystem(destinationName) {
|
|
109
|
+
return (destinationName == DOWNLOAD_EXPORT_DESTINATION ||
|
|
110
|
+
destinationName == CLIPBOARD_EXPORT_DESTINATION);
|
|
111
|
+
}
|
|
96
112
|
getAllExportDestinations() {
|
|
97
113
|
const destinationItems = [
|
|
98
114
|
...this.getAvailableSystemDestinations(),
|
|
99
|
-
...this.
|
|
115
|
+
...this.getAvailableCustomDestinations().map((destination) => destination.name),
|
|
100
116
|
];
|
|
101
117
|
return destinationItems;
|
|
102
118
|
}
|
|
@@ -122,15 +138,8 @@ export class ExportApiImpl extends ApiBase {
|
|
|
122
138
|
clearFormat() {
|
|
123
139
|
this.selectFormat(null);
|
|
124
140
|
}
|
|
125
|
-
getCustomDestinations() {
|
|
126
|
-
return this.getExportOptions().customDestinations ?? [];
|
|
127
|
-
}
|
|
128
|
-
isExportDestinationCustom(destinationName) {
|
|
129
|
-
return this.getCustomDestinations().some((destination) => destination.name === destinationName);
|
|
130
|
-
}
|
|
131
141
|
getExportDestinationForm(destinationName) {
|
|
132
|
-
return this.
|
|
133
|
-
?.form;
|
|
142
|
+
return this.getAvailableCustomDestinations().find((destination) => destination.name === destinationName)?.form;
|
|
134
143
|
}
|
|
135
144
|
canExportToExcel() {
|
|
136
145
|
return this._adaptable.canExportToExcel();
|
|
@@ -209,7 +209,7 @@ export class ExportInternalApi extends ApiBase {
|
|
|
209
209
|
this.logWarn(`No report result to send to destination for report '${report.Name}, format '${format}' and destination '${destination}'`);
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
|
-
if (this.getExportApi().
|
|
212
|
+
if (!this.getExportApi().isExportDestinationSystem(destination)) {
|
|
213
213
|
this.sendReportToCustomDestination(reportResult, report, format, destination);
|
|
214
214
|
}
|
|
215
215
|
if (destination === 'Download') {
|
|
@@ -232,9 +232,9 @@ export class ExportInternalApi extends ApiBase {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
sendReportToCustomDestination(reportResult, report, format, destination) {
|
|
235
|
-
const customDestination = this.
|
|
236
|
-
.
|
|
237
|
-
.
|
|
235
|
+
const customDestination = this.getExportApi()
|
|
236
|
+
.getAvailableCustomDestinations()
|
|
237
|
+
.find((cd) => cd.name == destination);
|
|
238
238
|
if (customDestination?.form) {
|
|
239
239
|
this.getAdaptableInternalApi().dispatchReduxAction(PopupRedux.PopupShowForm({
|
|
240
240
|
Id: 'export-destination-form',
|
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
|
*/
|
|
@@ -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);
|
|
@@ -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
|
};
|
|
@@ -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!
|