@adaptabletools/adaptable 14.0.0-canary.1 → 14.0.0-canary.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.
- package/bundle.cjs.js +149 -149
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/AdaptableApi.d.ts +17 -9
- package/src/Api/ColumnApi.d.ts +2 -10
- package/src/Api/ConfigApi.d.ts +1 -5
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +6 -1
- package/src/Api/Implementation/ApiBase.js +15 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnApiImpl.js +0 -8
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ConfigApiImpl.js +3 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +36 -0
- package/src/Api/Implementation/OptionsApiImpl.js +100 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +7 -1
- package/src/Api/Internal/AdaptableInternalApi.js +8 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +8 -0
- package/src/Api/Internal/ExportInternalApi.js +51 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +11 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +10 -0
- package/src/Api/OptionsApi.d.ts +131 -0
- package/src/Api/OptionsApi.js +2 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -0
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +26 -2
- package/src/Redux/Store/AdaptableStore.js +6 -0
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.js +1 -2
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +2 -4
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +8 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -2
- package/src/Strategy/FreeTextColumnModule.js +1 -2
- package/src/Strategy/LayoutModule.js +6 -6
- package/src/Strategy/SettingsPanelModule.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -2
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -4
- package/src/Utilities/Services/ChartingService.js +1 -1
- package/src/Utilities/Services/EntitlementService.js +4 -4
- package/src/Utilities/Services/Interface/IReportService.d.ts +7 -1
- package/src/Utilities/Services/QueryLanguageService.js +3 -3
- package/src/Utilities/Services/ReportService.d.ts +10 -2
- package/src/Utilities/Services/ReportService.js +40 -31
- package/src/Utilities/Services/TeamSharingService.js +3 -3
- package/src/Utilities/Services/ValidationService.js +6 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +11 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +6 -27
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/EntityRulesEditor/Utilities.d.ts +2 -2
- package/src/View/Components/EntityRulesEditor/Utilities.js +19 -12
- package/src/View/Components/FilterForm/FilterForm.js +6 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +7 -9
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +1 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +1 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -2
- package/src/View/Dashboard/Dashboard.js +5 -5
- package/src/View/Dashboard/DashboardPopup.js +2 -3
- package/src/View/Dashboard/DashboardViewPanel.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -2
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Filter/FilterViewPanel.js +3 -3
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +5 -14
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +4 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +3 -3
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +9 -3
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +1 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -3
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +119 -38
- package/src/agGrid/PercentBarRenderer.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +18 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "14.0.0-canary.
|
|
3
|
+
"version": "14.0.0-canary.3",
|
|
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",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1671805663015;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -39,6 +39,7 @@ import { ChartingApi } from './ChartingApi';
|
|
|
39
39
|
import { SettingsPanelApi } from './SettingsPanelApi';
|
|
40
40
|
import { StatusBarApi } from './StatusBarApi';
|
|
41
41
|
import { StyledColumnApi } from './StyledColumnApi';
|
|
42
|
+
import { OptionsApi } from './OptionsApi';
|
|
42
43
|
/**
|
|
43
44
|
*
|
|
44
45
|
* The `AdaptableApi` provides developers with run-time access to AdapTable.
|
|
@@ -74,6 +75,10 @@ export interface AdaptableApi {
|
|
|
74
75
|
* Provides access to the Cell Summary Module
|
|
75
76
|
*/
|
|
76
77
|
cellSummaryApi: CellSummaryApi;
|
|
78
|
+
/**
|
|
79
|
+
* Provides run-time access to Charting Module and state
|
|
80
|
+
*/
|
|
81
|
+
chartingApi: ChartingApi;
|
|
77
82
|
/**
|
|
78
83
|
* Provides a number of column-related methods
|
|
79
84
|
*/
|
|
@@ -134,6 +139,10 @@ export interface AdaptableApi {
|
|
|
134
139
|
* Provides access to the Layout Module
|
|
135
140
|
*/
|
|
136
141
|
layoutApi: LayoutApi;
|
|
142
|
+
/**
|
|
143
|
+
* Provides access to Adaptable Options
|
|
144
|
+
*/
|
|
145
|
+
optionsApi: OptionsApi;
|
|
137
146
|
/**
|
|
138
147
|
* Provides access to the Plus Minus Module
|
|
139
148
|
*/
|
|
@@ -151,7 +160,7 @@ export interface AdaptableApi {
|
|
|
151
160
|
*/
|
|
152
161
|
queryApi: QueryApi;
|
|
153
162
|
/**
|
|
154
|
-
*
|
|
163
|
+
* Manages AdapTableQL (Query Language)
|
|
155
164
|
*/
|
|
156
165
|
queryLanguageApi: QueryLanguageApi;
|
|
157
166
|
/**
|
|
@@ -178,6 +187,13 @@ export interface AdaptableApi {
|
|
|
178
187
|
* Provides access to the Smart Edit Module
|
|
179
188
|
*/
|
|
180
189
|
smartEditApi: SmartEditApi;
|
|
190
|
+
/**
|
|
191
|
+
* Provides run-time access to the AdapTable Status Bar
|
|
192
|
+
*/
|
|
193
|
+
statusBarApi: StatusBarApi;
|
|
194
|
+
/**
|
|
195
|
+
* Provides access to the Styled Column Module
|
|
196
|
+
*/
|
|
181
197
|
styledColumnApi: StyledColumnApi;
|
|
182
198
|
/**
|
|
183
199
|
* Methods related to displaying System Status and application health messages
|
|
@@ -199,14 +215,6 @@ export interface AdaptableApi {
|
|
|
199
215
|
* Manages User Interface Options where colours, styles and permitted values are configured
|
|
200
216
|
*/
|
|
201
217
|
userInterfaceApi: UserInterfaceApi;
|
|
202
|
-
/**
|
|
203
|
-
* Provides run-time access to Charting Module and state
|
|
204
|
-
*/
|
|
205
|
-
chartingApi: ChartingApi;
|
|
206
|
-
/**
|
|
207
|
-
* Provides run-time access to the AdapTable Status Bar
|
|
208
|
-
*/
|
|
209
|
-
statusBarApi: StatusBarApi;
|
|
210
218
|
/**
|
|
211
219
|
* Cleanup method - should be called only when using the vanilla javascript component, as framework components cleanup is performed when the component is destroyed/unmounted.
|
|
212
220
|
* This destroys the Adaptable instance.
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { AdaptableColumn, AdaptableColumnDataType, GridCell } from '../../types'
|
|
|
6
6
|
export interface ColumnApi {
|
|
7
7
|
/**
|
|
8
8
|
* Returns all Columns
|
|
9
|
-
|
|
9
|
+
*/
|
|
10
10
|
getColumns(): AdaptableColumn[];
|
|
11
11
|
/**
|
|
12
12
|
* Returns all visible Columns
|
|
13
|
-
|
|
13
|
+
*/
|
|
14
14
|
getVisibleColumns(): AdaptableColumn[];
|
|
15
15
|
/**
|
|
16
16
|
* Returns all numeric Columns
|
|
@@ -241,14 +241,6 @@ export interface ColumnApi {
|
|
|
241
241
|
* @deprecated internal method, will be removed in next major release
|
|
242
242
|
*/
|
|
243
243
|
getAgGridColumnType(columnId: string): string | string[];
|
|
244
|
-
/**
|
|
245
|
-
* @deprecated use `getFilterableColumns()` instead
|
|
246
|
-
*/
|
|
247
|
-
getFiltrableColumns(): AdaptableColumn[];
|
|
248
|
-
/**
|
|
249
|
-
* @deprecated us `getAggregatableColumns` instead
|
|
250
|
-
*/
|
|
251
|
-
getAggregetableColumns(): AdaptableColumn[];
|
|
252
244
|
/**
|
|
253
245
|
* @deprecated use `StyledColumnApi.hasPercentBarStyle()` or `StyledColumnApi.hasGradientStyle()` instead
|
|
254
246
|
*/
|
package/src/Api/ConfigApi.d.ts
CHANGED
|
@@ -22,11 +22,7 @@ import { QueryState } from '../PredefinedConfig/QueryState';
|
|
|
22
22
|
*/
|
|
23
23
|
export interface ConfigApi {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
configInit(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Changes the key used for persisting the Adaptablestate into localStorage
|
|
25
|
+
* Changes the key used for persisting the AdaptableState into localStorage
|
|
30
26
|
* @param adaptableStateKey key for persisting the AdaptableState into localStorage
|
|
31
27
|
*/
|
|
32
28
|
setAdaptableStateKey(adaptableStateKey: string, config?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
2
|
import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi';
|
|
3
|
-
import { AdaptableApi, SettingsPanelApi } from '../../types';
|
|
3
|
+
import { AdaptableApi, OptionsApi, SettingsPanelApi } from '../../types';
|
|
4
4
|
import { AlertApi } from '../AlertApi';
|
|
5
5
|
import { BulkUpdateApi } from '../BulkUpdateApi';
|
|
6
6
|
import { CalendarApi } from '../CalendarApi';
|
|
@@ -44,6 +44,7 @@ import { StyledColumnApi } from '../StyledColumnApi';
|
|
|
44
44
|
export declare class AdaptableApiImpl implements AdaptableApi {
|
|
45
45
|
protected adaptable: IAdaptable;
|
|
46
46
|
internalApi: AdaptableInternalApi;
|
|
47
|
+
optionsApi: OptionsApi;
|
|
47
48
|
actionApi: ActionApi;
|
|
48
49
|
applicationApi: ApplicationApi;
|
|
49
50
|
alertApi: AlertApi;
|
|
@@ -43,11 +43,13 @@ const ActionApiImpl_1 = require("./ActionApiImpl");
|
|
|
43
43
|
const StyledColumnApiImpl_1 = require("./StyledColumnApiImpl");
|
|
44
44
|
const CalendarApiImpl_1 = require("./CalendarApiImpl");
|
|
45
45
|
const EntitlementApiImpl_1 = require("./EntitlementApiImpl");
|
|
46
|
+
const OptionsApiImpl_1 = require("./OptionsApiImpl");
|
|
46
47
|
class AdaptableApiImpl {
|
|
47
48
|
constructor(adaptable) {
|
|
48
49
|
this.adaptable = adaptable;
|
|
49
50
|
this.destroyed = false;
|
|
50
51
|
this.adaptable = adaptable;
|
|
52
|
+
this.optionsApi = new OptionsApiImpl_1.OptionsApiImpl(adaptable);
|
|
51
53
|
this.actionApi = new ActionApiImpl_1.ActionApiImpl(adaptable);
|
|
52
54
|
this.applicationApi = new ApplicationApiImpl_1.ApplicationApiImpl(adaptable);
|
|
53
55
|
this.alertApi = new AlertApiImpl_1.AlertApiImpl(adaptable);
|
|
@@ -101,6 +103,7 @@ class AdaptableApiImpl {
|
|
|
101
103
|
}
|
|
102
104
|
this.destroyed = true;
|
|
103
105
|
this.eventApi.destroy();
|
|
106
|
+
this.optionsApi = null;
|
|
104
107
|
this.alertApi = null;
|
|
105
108
|
this.applicationApi = null;
|
|
106
109
|
this.bulkUpdateApi = null;
|
|
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
|
7
7
|
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
9
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
10
|
-
import { ActionApi, ActionOptions, AlertApi, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CellSummaryApi, ChartingApi, ColumnApi, ConfigApi, ContainerOptions, CustomSortApi, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataSetApi, EditOptions, EntitlementApi, EventApi, ExportApi, FilterApi, FilterOptions, FlashingCellApi, FormatColumnApi, FreeTextColumnApi, GeneralOptions, GridApi, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, PluginsApi, PlusMinusApi, PredicateApi, QueryApi, QueryLanguageApi, QuickSearchApi, ScheduleApi, ScopeApi, SearchOptions, SettingsPanelApi, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, UserInterfaceApi, UserInterfaceOptions } from '../../types';
|
|
10
|
+
import { ActionApi, ActionOptions, AlertApi, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CellSummaryApi, ChartingApi, ChartingOptions, ColumnApi, ConfigApi, ContainerOptions, CustomSortApi, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, FilterApi, FilterOptions, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FreeTextColumnApi, GeneralOptions, GridApi, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, PluginsApi, PlusMinusApi, PredicateApi, QueryApi, QueryLanguageApi, QuickSearchApi, ScheduleApi, ScopeApi, SearchOptions, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, UserInterfaceApi, UserInterfaceOptions } from '../../types';
|
|
11
11
|
import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
|
|
12
12
|
import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
|
|
13
13
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
@@ -70,6 +70,11 @@ export declare abstract class ApiBase {
|
|
|
70
70
|
protected getUserInterfaceOptions(): UserInterfaceOptions;
|
|
71
71
|
protected getToolPanelOptions(): ToolPanelOptions;
|
|
72
72
|
protected getExpressionOptions(): ExpressionOptions;
|
|
73
|
+
protected getChartingOptions(): ChartingOptions;
|
|
74
|
+
protected getDataChangeHistoryOptions(): DataChangeHistoryOptions;
|
|
75
|
+
protected getEntitlementOptions(): EntitlementOptions;
|
|
76
|
+
protected getFlashingCellOptions(): FlashingCellOptions;
|
|
77
|
+
protected getSettingsPanelOptions(): SettingsPanelOptions;
|
|
73
78
|
protected getAdaptableApi(): AdaptableApi;
|
|
74
79
|
protected getActionApi(): ActionApi;
|
|
75
80
|
protected getApplicationApi(): ApplicationApi;
|
|
@@ -139,6 +139,21 @@ class ApiBase {
|
|
|
139
139
|
getExpressionOptions() {
|
|
140
140
|
return this.getAdaptableQLOptions().expressionOptions;
|
|
141
141
|
}
|
|
142
|
+
getChartingOptions() {
|
|
143
|
+
return this.adaptable.adaptableOptions.chartingOptions;
|
|
144
|
+
}
|
|
145
|
+
getDataChangeHistoryOptions() {
|
|
146
|
+
return this.adaptable.adaptableOptions.dataChangeHistoryOptions;
|
|
147
|
+
}
|
|
148
|
+
getEntitlementOptions() {
|
|
149
|
+
return this.adaptable.adaptableOptions.entitlementOptions;
|
|
150
|
+
}
|
|
151
|
+
getFlashingCellOptions() {
|
|
152
|
+
return this.adaptable.adaptableOptions.flashingCellOptions;
|
|
153
|
+
}
|
|
154
|
+
getSettingsPanelOptions() {
|
|
155
|
+
return this.adaptable.adaptableOptions.settingsPanelOptions;
|
|
156
|
+
}
|
|
142
157
|
getAdaptableApi() {
|
|
143
158
|
return this.adaptable.api;
|
|
144
159
|
}
|
|
@@ -68,11 +68,9 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
68
68
|
getArrayColumns(): AdaptableColumn[];
|
|
69
69
|
getSortableColumns(): AdaptableColumn[];
|
|
70
70
|
getFilterableColumns(): AdaptableColumn[];
|
|
71
|
-
getFiltrableColumns(): AdaptableColumn[];
|
|
72
71
|
getGroupableColumns(): AdaptableColumn[];
|
|
73
72
|
getPivotableColumns(): AdaptableColumn[];
|
|
74
73
|
getAggregatableColumns(): AdaptableColumn[];
|
|
75
|
-
getAggregetableColumns(): AdaptableColumn[];
|
|
76
74
|
getQueryableColumns(): AdaptableColumn[];
|
|
77
75
|
private logMissingColumnWarning;
|
|
78
76
|
getDistinctDisplayValuesForColumn(columnId: string): any[];
|
|
@@ -355,10 +355,6 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
355
355
|
getFilterableColumns() {
|
|
356
356
|
return this.getColumns().filter((c) => c.filterable);
|
|
357
357
|
}
|
|
358
|
-
getFiltrableColumns() {
|
|
359
|
-
(0, logDeprecation_1.logDeprecation)('ColumnApi', 'getFiltrableColumns', 'getFilterableColumns');
|
|
360
|
-
return this.getFilterableColumns();
|
|
361
|
-
}
|
|
362
358
|
getGroupableColumns() {
|
|
363
359
|
return this.getColumns().filter((c) => c.groupable);
|
|
364
360
|
}
|
|
@@ -368,10 +364,6 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
368
364
|
getAggregatableColumns() {
|
|
369
365
|
return this.getColumns().filter((c) => c.aggregatable && c.dataType == 'Number');
|
|
370
366
|
}
|
|
371
|
-
getAggregetableColumns() {
|
|
372
|
-
(0, logDeprecation_1.logDeprecation)('ColumnApi', 'getAggregetableColumns', 'getAggregatableColumns');
|
|
373
|
-
return this.getAggregatableColumns();
|
|
374
|
-
}
|
|
375
367
|
getQueryableColumns() {
|
|
376
368
|
return this.getColumns().filter((c) => c.queryable);
|
|
377
369
|
}
|
|
@@ -17,7 +17,7 @@ import { FreeTextColumnState } from '../../PredefinedConfig/FreeTextColumnState'
|
|
|
17
17
|
import { ToolPanelState } from '../../PredefinedConfig/ToolPanelState';
|
|
18
18
|
import { ConfigApi } from '../ConfigApi';
|
|
19
19
|
import { AdaptableModule, AdaptableStateKey } from '../../PredefinedConfig/Common/Types';
|
|
20
|
-
import { AdaptableSearchState, AdaptableSortState, ScheduleState } from '../../types';
|
|
20
|
+
import { AdaptableOptions, AdaptableSearchState, AdaptableSortState, ScheduleState } from '../../types';
|
|
21
21
|
import { QueryState } from '../../PredefinedConfig/QueryState';
|
|
22
22
|
import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
|
|
23
23
|
import { ChartingState } from '../../PredefinedConfig/ChartingState';
|
|
@@ -35,6 +35,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
|
35
35
|
}): void;
|
|
36
36
|
getAdaptableSearchState(): AdaptableSearchState;
|
|
37
37
|
getAdaptableSortState(): AdaptableSortState;
|
|
38
|
+
getAdaptableOptions(): Readonly<AdaptableOptions>;
|
|
38
39
|
setAdaptableStateKey(adaptableStateKey: string, config?: {
|
|
39
40
|
predefinedConfig: PredefinedConfig;
|
|
40
41
|
flushCurrentState?: boolean;
|
|
@@ -113,6 +113,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
113
113
|
};
|
|
114
114
|
return adaptableSortState;
|
|
115
115
|
}
|
|
116
|
+
getAdaptableOptions() {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
116
119
|
setAdaptableStateKey(adaptableStateKey, config) {
|
|
117
120
|
return new Promise((resolve, reject) => {
|
|
118
121
|
this.adaptable.api.internalApi.executeWithProgressIndicator(`Initialising...`, () => {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
3
|
+
import { ActionOptions, AdaptableOptions, AdaptableQLOptions, AlertOptions, ChartingOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, GeneralOptions, LayoutOptions, MenuOptions, NotificationsOptions, OptionsApi, SearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../../types';
|
|
4
|
+
export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
5
|
+
getAdaptableId(): string;
|
|
6
|
+
getAdaptableStateKey(): string;
|
|
7
|
+
getAgGridOptions(): GridOptions;
|
|
8
|
+
getAutogeneratePrimaryKey(): boolean;
|
|
9
|
+
getLicenseKey(): string;
|
|
10
|
+
getPrimaryKey(): string;
|
|
11
|
+
getUserName(): string;
|
|
12
|
+
getAdaptableOptions(): AdaptableOptions;
|
|
13
|
+
getActionOptions(): ActionOptions;
|
|
14
|
+
getColumnOptions(): ColumnOptions;
|
|
15
|
+
getContainerOptions(): ContainerOptions;
|
|
16
|
+
getNotificationsOptions(): NotificationsOptions;
|
|
17
|
+
getAlertOptions(): AlertOptions;
|
|
18
|
+
getDashboardOptions(): DashboardOptions;
|
|
19
|
+
getEditOptions(): EditOptions;
|
|
20
|
+
getExportOptions(): ExportOptions;
|
|
21
|
+
getGeneralOptions(): GeneralOptions;
|
|
22
|
+
getLayoutOptions(): LayoutOptions;
|
|
23
|
+
getMenuOptions(): MenuOptions;
|
|
24
|
+
getFilterOptions(): FilterOptions;
|
|
25
|
+
getAdaptableQLOptions(): AdaptableQLOptions;
|
|
26
|
+
getSearchOptions(): SearchOptions;
|
|
27
|
+
getStateOptions(): StateOptions;
|
|
28
|
+
getTeamSharingOptions(): TeamSharingOptions;
|
|
29
|
+
getUserInterfaceOptions(): UserInterfaceOptions;
|
|
30
|
+
getToolPanelOptions(): ToolPanelOptions;
|
|
31
|
+
getChartingOptions(): ChartingOptions;
|
|
32
|
+
getDataChangeHistoryOptions(): DataChangeHistoryOptions;
|
|
33
|
+
getEntitlementOptions(): EntitlementOptions;
|
|
34
|
+
getFlashingCellOptions(): FlashingCellOptions;
|
|
35
|
+
getSettingsPanelOptions(): SettingsPanelOptions;
|
|
36
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptionsApiImpl = void 0;
|
|
4
|
+
const ApiBase_1 = require("./ApiBase");
|
|
5
|
+
class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
6
|
+
getAdaptableId() {
|
|
7
|
+
return this.adaptable.adaptableOptions.adaptableId;
|
|
8
|
+
}
|
|
9
|
+
getAdaptableStateKey() {
|
|
10
|
+
return this.adaptable.adaptableOptions.adaptableStateKey;
|
|
11
|
+
}
|
|
12
|
+
getAgGridOptions() {
|
|
13
|
+
return this.adaptable.adaptableOptions.gridOptions;
|
|
14
|
+
}
|
|
15
|
+
getAutogeneratePrimaryKey() {
|
|
16
|
+
return this.adaptable.adaptableOptions.autogeneratePrimaryKey;
|
|
17
|
+
}
|
|
18
|
+
getLicenseKey() {
|
|
19
|
+
return this.adaptable.adaptableOptions.licenseKey;
|
|
20
|
+
}
|
|
21
|
+
getPrimaryKey() {
|
|
22
|
+
return this.adaptable.adaptableOptions.primaryKey;
|
|
23
|
+
}
|
|
24
|
+
getUserName() {
|
|
25
|
+
return this.adaptable.adaptableOptions.userName;
|
|
26
|
+
}
|
|
27
|
+
getAdaptableOptions() {
|
|
28
|
+
return this.getOptions();
|
|
29
|
+
}
|
|
30
|
+
getActionOptions() {
|
|
31
|
+
return this.getOptions().actionOptions;
|
|
32
|
+
}
|
|
33
|
+
getColumnOptions() {
|
|
34
|
+
return this.getOptions().columnOptions;
|
|
35
|
+
}
|
|
36
|
+
getContainerOptions() {
|
|
37
|
+
return this.getOptions().containerOptions;
|
|
38
|
+
}
|
|
39
|
+
getNotificationsOptions() {
|
|
40
|
+
return this.getOptions().notificationsOptions;
|
|
41
|
+
}
|
|
42
|
+
getAlertOptions() {
|
|
43
|
+
return this.getOptions().alertOptions;
|
|
44
|
+
}
|
|
45
|
+
getDashboardOptions() {
|
|
46
|
+
return this.getOptions().dashboardOptions;
|
|
47
|
+
}
|
|
48
|
+
getEditOptions() {
|
|
49
|
+
return this.getOptions().editOptions;
|
|
50
|
+
}
|
|
51
|
+
getExportOptions() {
|
|
52
|
+
return this.getOptions().exportOptions;
|
|
53
|
+
}
|
|
54
|
+
getGeneralOptions() {
|
|
55
|
+
return this.getOptions().generalOptions;
|
|
56
|
+
}
|
|
57
|
+
getLayoutOptions() {
|
|
58
|
+
return this.getOptions().layoutOptions;
|
|
59
|
+
}
|
|
60
|
+
getMenuOptions() {
|
|
61
|
+
return this.getOptions().menuOptions;
|
|
62
|
+
}
|
|
63
|
+
getFilterOptions() {
|
|
64
|
+
return this.getOptions().filterOptions;
|
|
65
|
+
}
|
|
66
|
+
getAdaptableQLOptions() {
|
|
67
|
+
return this.getOptions().adaptableQLOptions;
|
|
68
|
+
}
|
|
69
|
+
getSearchOptions() {
|
|
70
|
+
return this.getOptions().searchOptions;
|
|
71
|
+
}
|
|
72
|
+
getStateOptions() {
|
|
73
|
+
return this.getOptions().stateOptions;
|
|
74
|
+
}
|
|
75
|
+
getTeamSharingOptions() {
|
|
76
|
+
return this.getOptions().teamSharingOptions;
|
|
77
|
+
}
|
|
78
|
+
getUserInterfaceOptions() {
|
|
79
|
+
return this.getOptions().userInterfaceOptions;
|
|
80
|
+
}
|
|
81
|
+
getToolPanelOptions() {
|
|
82
|
+
return this.getOptions().toolPanelOptions;
|
|
83
|
+
}
|
|
84
|
+
getChartingOptions() {
|
|
85
|
+
return this.getOptions().chartingOptions;
|
|
86
|
+
}
|
|
87
|
+
getDataChangeHistoryOptions() {
|
|
88
|
+
return this.getOptions().dataChangeHistoryOptions;
|
|
89
|
+
}
|
|
90
|
+
getEntitlementOptions() {
|
|
91
|
+
return this.getOptions().entitlementOptions;
|
|
92
|
+
}
|
|
93
|
+
getFlashingCellOptions() {
|
|
94
|
+
return this.getOptions().flashingCellOptions;
|
|
95
|
+
}
|
|
96
|
+
getSettingsPanelOptions() {
|
|
97
|
+
return this.getOptions().settingsPanelOptions;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.OptionsApiImpl = OptionsApiImpl;
|
|
@@ -46,11 +46,17 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
46
46
|
isGridInTreeMode(): boolean;
|
|
47
47
|
getToolbarTitle(): string;
|
|
48
48
|
buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated use `OptionsApi.getPrimaryKey()`
|
|
51
|
+
*/
|
|
49
52
|
getPrimaryKey(): any;
|
|
50
53
|
getAdaptableInstance(): IAdaptable;
|
|
51
54
|
getAgGridInstance(): any;
|
|
52
55
|
getPredefinedConfig(): any;
|
|
53
56
|
getState(): AdaptableState;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated use OptionsApi.getAdaptableOptions()
|
|
59
|
+
*/
|
|
54
60
|
getAdaptableOptions(): AdaptableOptions;
|
|
55
61
|
getValidationService(): IValidationService;
|
|
56
62
|
getModuleService(): IModuleService;
|
|
@@ -80,7 +86,7 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
80
86
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
81
87
|
initializeDataChangeHistory(): void;
|
|
82
88
|
isTextComparisonCaseSensitive(): boolean;
|
|
83
|
-
executeWithProgressIndicator(label: string, executeFn: () => void): void;
|
|
89
|
+
executeWithProgressIndicator(label: string, executeFn: () => void, errorHandlingFn?: () => void): void;
|
|
84
90
|
hideProgressIndicator(): void;
|
|
85
91
|
getCorrectEnglishVariant(wordToSpell: string): string;
|
|
86
92
|
shouldDisplayTagSections(): boolean;
|
|
@@ -79,6 +79,9 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
79
79
|
var _a;
|
|
80
80
|
return Object.assign(Object.assign({}, config), { rowData: (_a = config.rowNode) === null || _a === void 0 ? void 0 : _a.data, changedAt: Date.now() });
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated use `OptionsApi.getPrimaryKey()`
|
|
84
|
+
*/
|
|
82
85
|
getPrimaryKey() {
|
|
83
86
|
return this.adaptable.adaptableOptions.primaryKey;
|
|
84
87
|
}
|
|
@@ -94,6 +97,9 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
94
97
|
getState() {
|
|
95
98
|
return this.getAdaptableState();
|
|
96
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* @deprecated use OptionsApi.getAdaptableOptions()
|
|
102
|
+
*/
|
|
97
103
|
getAdaptableOptions() {
|
|
98
104
|
return this.getOptions();
|
|
99
105
|
}
|
|
@@ -261,7 +267,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
261
267
|
isTextComparisonCaseSensitive() {
|
|
262
268
|
return this.adaptable.adaptableOptions.adaptableQLOptions.caseSensitiveTextComparisons;
|
|
263
269
|
}
|
|
264
|
-
executeWithProgressIndicator(label, executeFn) {
|
|
270
|
+
executeWithProgressIndicator(label, executeFn, errorHandlingFn) {
|
|
265
271
|
this.dispatchReduxAction((0, SystemRedux_1.SystemProgressIndicatorShow)(label));
|
|
266
272
|
// setTimeout required to give the ProgressIndicator rendering a head-start (see RAF in ProgressIndicator implementation)
|
|
267
273
|
setTimeout(() => {
|
|
@@ -269,6 +275,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
269
275
|
executeFn();
|
|
270
276
|
}
|
|
271
277
|
catch (error) {
|
|
278
|
+
errorHandlingFn === null || errorHandlingFn === void 0 ? void 0 : errorHandlingFn();
|
|
272
279
|
this.hideProgressIndicator();
|
|
273
280
|
(0, LoggingHelper_1.LogAdaptableError)('Unexpected error while executing a function with a progress indicator', error);
|
|
274
281
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
2
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
3
3
|
import { Report } from '../../PredefinedConfig/ExportState';
|
|
4
|
+
import { AdaptableColumnType } from '../../PredefinedConfig/Common/Types';
|
|
5
|
+
import { ExcelDataType } from '@ag-grid-community/core';
|
|
6
|
+
import { AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
7
|
+
import { DataFormatType } from '../../AdaptableOptions/ExportOptions';
|
|
4
8
|
export declare class ExportInternalApi extends ApiBase {
|
|
5
9
|
/**
|
|
6
10
|
* Whether given data change affects given report
|
|
@@ -8,4 +12,8 @@ export declare class ExportInternalApi extends ApiBase {
|
|
|
8
12
|
* @param report report to check
|
|
9
13
|
*/
|
|
10
14
|
isDataChangeInReport(cellDataChangedInfo: CellDataChangedInfo, report: Report): boolean;
|
|
15
|
+
getExcelDataType(adaptableColumnType: string | string[] | AdaptableColumnType | AdaptableColumnType[]): ExcelDataType;
|
|
16
|
+
isVisualDataExportInProgress(): boolean;
|
|
17
|
+
isDateCellExportedAsFormattedValue(): boolean;
|
|
18
|
+
getCellExportFormatType(columnDataType: AdaptableColumnDataType): DataFormatType;
|
|
11
19
|
}
|
|
@@ -69,5 +69,56 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
69
69
|
return this.adaptable.isRowNodeVisible(cellDataChangedInfo.rowNode);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
getExcelDataType(adaptableColumnType) {
|
|
73
|
+
const mapColumnTypeToExcelType = (columnType) => {
|
|
74
|
+
switch (columnType) {
|
|
75
|
+
case 'abColDefNumber':
|
|
76
|
+
return 'Number';
|
|
77
|
+
case 'abColDefBoolean':
|
|
78
|
+
return 'Boolean';
|
|
79
|
+
case 'abColDefDate':
|
|
80
|
+
return 'DateTime';
|
|
81
|
+
case 'abColDefString':
|
|
82
|
+
default:
|
|
83
|
+
return 'String';
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
if (Array.isArray(adaptableColumnType)) {
|
|
87
|
+
const validColumnType = adaptableColumnType.find((colType) => colType.startsWith('abColDef'));
|
|
88
|
+
if (!validColumnType) {
|
|
89
|
+
return 'String';
|
|
90
|
+
}
|
|
91
|
+
return mapColumnTypeToExcelType(validColumnType);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return mapColumnTypeToExcelType(adaptableColumnType);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
isVisualDataExportInProgress() {
|
|
98
|
+
return this.getAdaptableState().System.Export.inProgressVisualData;
|
|
99
|
+
}
|
|
100
|
+
isDateCellExportedAsFormattedValue() {
|
|
101
|
+
return (!!this.getExportOptions().exportDateFormat ||
|
|
102
|
+
this.getCellExportFormatType('Date') === 'formattedValue');
|
|
103
|
+
}
|
|
104
|
+
getCellExportFormatType(columnDataType) {
|
|
105
|
+
const exportOptions = this.getExportOptions();
|
|
106
|
+
if (exportOptions.exportFormatType === 'rawValue' ||
|
|
107
|
+
exportOptions.exportFormatType === 'formattedValue') {
|
|
108
|
+
return exportOptions.exportFormatType;
|
|
109
|
+
}
|
|
110
|
+
// format is customized based on column data type
|
|
111
|
+
switch (columnDataType) {
|
|
112
|
+
case 'String':
|
|
113
|
+
return exportOptions.exportFormatType.string;
|
|
114
|
+
case 'Number':
|
|
115
|
+
return exportOptions.exportFormatType.number;
|
|
116
|
+
case 'Date':
|
|
117
|
+
return exportOptions.exportFormatType.date;
|
|
118
|
+
default:
|
|
119
|
+
// default to rawValue for all other column types
|
|
120
|
+
return 'rawValue';
|
|
121
|
+
}
|
|
122
|
+
}
|
|
72
123
|
}
|
|
73
124
|
exports.ExportInternalApi = ExportInternalApi;
|
|
@@ -101,6 +101,17 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
101
101
|
node: RowNode;
|
|
102
102
|
value: any;
|
|
103
103
|
}): FormatColumn[];
|
|
104
|
+
/**
|
|
105
|
+
* Extract from the given FormatColumns the one which is the most relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
106
|
+
*
|
|
107
|
+
* @param formatColumns
|
|
108
|
+
* @param column
|
|
109
|
+
* @param params
|
|
110
|
+
*/
|
|
111
|
+
getMostRelevantFormatColumnForColumn(formatColumns: FormatColumn[], column: AdaptableColumn, params: {
|
|
112
|
+
node: RowNode;
|
|
113
|
+
value: any;
|
|
114
|
+
}): FormatColumn | undefined;
|
|
104
115
|
/**
|
|
105
116
|
* Retrieves all Format Columns which have an Expression
|
|
106
117
|
* @returns Format Columns with Expression
|
|
@@ -212,6 +212,16 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
212
212
|
getFormatColumnsRelevantForColumn(formatColumns, column, params) {
|
|
213
213
|
return formatColumns.filter((formatColumn) => this.isFormatColumnRelevantForColumn(formatColumn, column, params));
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Extract from the given FormatColumns the one which is the most relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
217
|
+
*
|
|
218
|
+
* @param formatColumns
|
|
219
|
+
* @param column
|
|
220
|
+
* @param params
|
|
221
|
+
*/
|
|
222
|
+
getMostRelevantFormatColumnForColumn(formatColumns, column, params) {
|
|
223
|
+
return formatColumns.find((formatColumn) => this.isFormatColumnRelevantForColumn(formatColumn, column, params));
|
|
224
|
+
}
|
|
215
225
|
/**
|
|
216
226
|
* Retrieves all Format Columns which have an Expression
|
|
217
227
|
* @returns Format Columns with Expression
|