@adaptabletools/adaptable 12.0.1 → 12.0.4
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 +96 -96
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +6 -9
- package/src/AdaptableOptions/ExportOptions.d.ts +15 -0
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/IPushPullPluginOptions.d.ts +1 -3
- package/src/AdaptableOptions/StateOptions.d.ts +9 -23
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +34 -1
- package/src/Api/ChartingApi.d.ts +19 -2
- package/src/Api/Events/SearchChanged.d.ts +1 -1
- package/src/Api/FinanceApi.d.ts +8 -8
- package/src/Api/FormatColumnApi.d.ts +11 -6
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +6 -0
- package/src/Api/Implementation/ChartingApiImpl.js +17 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConfigApiImpl.js +11 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +4 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +36 -12
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/InternalApiImpl.js +1 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +7 -1
- package/src/Api/LayoutApi.d.ts +5 -0
- package/src/Api/StatusBarApi.d.ts +3 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -5
- package/src/PredefinedConfig/ChartingState.d.ts +20 -0
- package/src/PredefinedConfig/ChartingState.js +2 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +9 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +12 -3
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +1 -2
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.js +1 -2
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +6 -0
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -1
- package/src/PredefinedConfig/IPushPullState.d.ts +16 -5
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/TeamSharingState.d.ts +6 -0
- package/src/Redux/ActionsReducers/ChartingRedux.d.ts +23 -0
- package/src/Redux/ActionsReducers/ChartingRedux.js +38 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +30 -1
- package/src/Redux/ActionsReducers/GridRedux.js +105 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +10 -11
- package/src/Redux/ActionsReducers/LayoutRedux.js +10 -10
- package/src/Redux/Store/AdaptableStore.js +45 -8
- package/src/Strategy/AlertModule.js +3 -3
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/LayoutModule.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +23 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +9 -4
- package/src/Utilities/Helpers/Helper.js +1 -1
- package/src/Utilities/ObjectFactory.d.ts +5 -1
- package/src/Utilities/ObjectFactory.js +12 -2
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ReportService.js +5 -5
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +2 -9
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +38 -31
- package/src/View/Layout/LayoutViewPanel.d.ts +2 -2
- package/src/View/Layout/LayoutViewPanel.js +5 -5
- package/src/View/Layout/SaveLayoutButton.d.ts +2 -0
- package/src/View/Layout/SaveLayoutButton.js +30 -0
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +36 -20
- package/src/metamodel/adaptable.metamodel.d.ts +219 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -2
- 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": "12.0.
|
|
3
|
+
"version": "12.0.4",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1657113089379;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Column, GridOptions, RowNode } from '@ag-grid-community/all-modules';
|
|
1
|
+
import { ChartModel, ChartRef, Column, GridOptions, RowNode } from '@ag-grid-community/all-modules';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
|
|
@@ -160,7 +160,7 @@ export interface IAdaptable {
|
|
|
160
160
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
161
161
|
getRawValueFromRowNode(rowNode: RowNode, columnId: string): any;
|
|
162
162
|
getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): string | undefined;
|
|
163
|
-
getDisplayValueFromRawValue(columnId: string, rawValue: any): string | undefined;
|
|
163
|
+
getDisplayValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
|
|
164
164
|
getDataRowFromRowNode(rowNode: RowNode): any;
|
|
165
165
|
getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
|
|
166
166
|
getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
|
|
@@ -243,4 +243,6 @@ export interface IAdaptable {
|
|
|
243
243
|
skipSetupColumns?: boolean;
|
|
244
244
|
}): void;
|
|
245
245
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
246
|
+
showCharts(charts: ChartModel[]): ChartRef[];
|
|
247
|
+
getChartModels(): ChartModel[];
|
|
246
248
|
}
|
|
@@ -13,7 +13,7 @@ export interface AdaptableQLOptions {
|
|
|
13
13
|
*/
|
|
14
14
|
caseSensitiveTextComparisons?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Which searching and filtering
|
|
16
|
+
* Which searching and filtering Modules should take place on server
|
|
17
17
|
*
|
|
18
18
|
* @defaultValue undefined
|
|
19
19
|
* @gridInfoItem
|
|
@@ -7,28 +7,22 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface EditOptions {
|
|
9
9
|
/**
|
|
10
|
-
* Function to validate
|
|
11
|
-
*
|
|
12
|
-
* @defaultValue undefined
|
|
10
|
+
* Function to validate Adaptable data edits on Server
|
|
13
11
|
*/
|
|
14
12
|
validateOnServer?: (cellDataChangedInfo: CellDataChangedInfo) => Promise<ValidationResult>;
|
|
15
13
|
/**
|
|
16
|
-
*
|
|
14
|
+
* Whether to display message after Server Validation runs
|
|
17
15
|
*
|
|
18
16
|
* @defaultValue true
|
|
19
17
|
* @gridInfoItem
|
|
20
18
|
*/
|
|
21
19
|
displayServerValidationMessages?: boolean;
|
|
22
20
|
/**
|
|
23
|
-
* Function which checks if given Grid Cell is editable
|
|
24
|
-
*
|
|
25
|
-
* @defaultValue undefined
|
|
21
|
+
* Function which checks if a given Grid Cell is editable
|
|
26
22
|
*/
|
|
27
23
|
isCellEditable?: (gridCell: GridCell) => boolean;
|
|
28
24
|
/**
|
|
29
25
|
* Custom Operations to use in Smart Edit
|
|
30
|
-
*
|
|
31
|
-
* @defaultValue undefined
|
|
32
26
|
*/
|
|
33
27
|
smartEditCustomOperations?: SmartEditCustomOperation[];
|
|
34
28
|
}
|
|
@@ -58,6 +52,9 @@ export declare type SmartEditCustomOperation = {
|
|
|
58
52
|
*/
|
|
59
53
|
operation: (context: SmartEditOperationContext) => number;
|
|
60
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Operation used by Smart Edit - either System or Custom
|
|
57
|
+
*/
|
|
61
58
|
export declare type SmartEditOperation = SmartEditCustomOperation | MathOperation;
|
|
62
59
|
/**
|
|
63
60
|
* Context used in Custom Smart Edit Operations
|
|
@@ -101,9 +101,24 @@ export interface ExportFormContext extends FormContext {
|
|
|
101
101
|
*/
|
|
102
102
|
customDestination: CustomDestination;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* List of System Export Destinations
|
|
106
|
+
*/
|
|
104
107
|
export declare type SystemExportDestinations = SystemExportDestination[];
|
|
108
|
+
/**
|
|
109
|
+
* Export Destinations provided by AdapTable
|
|
110
|
+
*/
|
|
105
111
|
export declare type SystemExportDestination = 'Excel' | 'CSV' | 'Clipboard' | 'JSON';
|
|
112
|
+
/**
|
|
113
|
+
* Report Context sent when using Custom Export Destinations
|
|
114
|
+
*/
|
|
106
115
|
export interface ReportContext extends BaseContext {
|
|
116
|
+
/**
|
|
117
|
+
* Definition of Report being Run
|
|
118
|
+
*/
|
|
107
119
|
report: Report;
|
|
120
|
+
/**
|
|
121
|
+
* Data being exported in the Report
|
|
122
|
+
*/
|
|
108
123
|
reportData: ReportData;
|
|
109
124
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Options
|
|
3
|
-
*
|
|
4
|
-
* ipushpull allows users to collborate and share data in powerful ways and it integrates very closely with AdapTable.
|
|
2
|
+
* Options available in ipushpull plugin; allows users to collborate and share data in powerful ways
|
|
5
3
|
*/
|
|
6
4
|
export interface IPushPullPluginOptions {
|
|
7
5
|
/**
|
|
@@ -3,30 +3,22 @@ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
|
|
|
3
3
|
* Options related to Adaptable State hydration/dehydration - allows users to intercept state persistence and state loading with custom functionality
|
|
4
4
|
*/
|
|
5
5
|
export interface StateOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Allows the customization of state persistence
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue persists state to local storage
|
|
10
|
-
*/
|
|
11
|
-
persistState?: AdaptablePersistStateFunction;
|
|
12
6
|
/**
|
|
13
7
|
* Allows the customization of Adaptable State loading
|
|
14
|
-
*
|
|
15
|
-
* @defaultValue loads state from local storage
|
|
16
8
|
*/
|
|
17
9
|
loadState?: AdaptableLoadStateFunction;
|
|
10
|
+
/**
|
|
11
|
+
* Allows hooking into Adaptable State hydration
|
|
12
|
+
*/
|
|
13
|
+
applyState?: (state: any) => any;
|
|
18
14
|
/**
|
|
19
15
|
* Allows the customization of the Adaptable State that is going to be persisted
|
|
20
|
-
*
|
|
21
|
-
* @defaultValue undefined
|
|
22
16
|
*/
|
|
23
17
|
saveState?: AdaptableSaveStateFunction;
|
|
24
18
|
/**
|
|
25
|
-
* Allows
|
|
26
|
-
*
|
|
27
|
-
* @defaultValue undefined
|
|
19
|
+
* Allows the customization of Adaptable State persistence
|
|
28
20
|
*/
|
|
29
|
-
|
|
21
|
+
persistState?: AdaptablePersistStateFunction;
|
|
30
22
|
/**
|
|
31
23
|
* Allows clearing of remote Adaptable State
|
|
32
24
|
*
|
|
@@ -49,9 +41,7 @@ export declare type AdaptableStateFunctionConfig = {
|
|
|
49
41
|
url?: string;
|
|
50
42
|
};
|
|
51
43
|
/**
|
|
52
|
-
* Allows
|
|
53
|
-
*
|
|
54
|
-
* Used by the `persistState` function property in StateOptions
|
|
44
|
+
* Allows customization of state persistence - used `persistState` function in StateOptions
|
|
55
45
|
*
|
|
56
46
|
* @example
|
|
57
47
|
* ```
|
|
@@ -73,17 +63,13 @@ export interface AdaptableClearStateFunction {
|
|
|
73
63
|
({ adaptableId, adaptableStateKey, userName, url }: AdaptableStateFunctionConfig): Promise<any>;
|
|
74
64
|
}
|
|
75
65
|
/**
|
|
76
|
-
* Allows the customization
|
|
77
|
-
*
|
|
78
|
-
* Used by the `saveState` function property in StateOptions
|
|
66
|
+
* Allows the customization state persistence - used by `saveState` function in StateOptions
|
|
79
67
|
*/
|
|
80
68
|
export interface AdaptableSaveStateFunction {
|
|
81
69
|
(state: AdaptableState, { adaptableId, adaptableStateKey, userName, url }: AdaptableStateFunctionConfig): any;
|
|
82
70
|
}
|
|
83
71
|
/**
|
|
84
|
-
* Allows
|
|
85
|
-
*
|
|
86
|
-
* Userd by the `loadState` function property in StateOptions
|
|
72
|
+
* Allows customization of state loading - used by `loadState` function in StateOptions
|
|
87
73
|
*/
|
|
88
74
|
export interface AdaptableLoadStateFunction {
|
|
89
75
|
(config: AdaptableStateFunctionConfig): Promise<any>;
|
|
@@ -5,6 +5,7 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
|
5
5
|
import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
|
|
6
6
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
7
7
|
import { BaseContext, GridCell } from '../../types';
|
|
8
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
8
9
|
/**
|
|
9
10
|
* Options for managing the User Interface of AdapTable
|
|
10
11
|
*/
|
|
@@ -182,9 +183,41 @@ export declare type GridInfoSections = GridInfoSection[];
|
|
|
182
183
|
export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo' | 'AdaptableObjectsSummary';
|
|
183
184
|
export interface ObjectTagsContext extends BaseContext {
|
|
184
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Provides Custom Display Formats
|
|
188
|
+
*/
|
|
185
189
|
export declare type CustomDisplayFormatter = {
|
|
190
|
+
/**
|
|
191
|
+
* Id of the Formatted
|
|
192
|
+
*/
|
|
186
193
|
id: string;
|
|
194
|
+
/**
|
|
195
|
+
* Description
|
|
196
|
+
*/
|
|
187
197
|
label?: string;
|
|
188
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Function used to perform the Custom Display Format
|
|
200
|
+
*/
|
|
201
|
+
handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
|
|
202
|
+
/**
|
|
203
|
+
* Where the Custom Display Format can be applied
|
|
204
|
+
*/
|
|
189
205
|
scope: AdaptableScope;
|
|
190
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* Context used in handler of CustomDisplayFormatter
|
|
209
|
+
*/
|
|
210
|
+
export interface CustomDisplayFormatterContext extends BaseContext {
|
|
211
|
+
/**
|
|
212
|
+
* Column where Custom Display Format will apply
|
|
213
|
+
*/
|
|
214
|
+
adaptableColumn: AdaptableColumn;
|
|
215
|
+
/**
|
|
216
|
+
* Non-formatted Cell Value
|
|
217
|
+
*/
|
|
218
|
+
cellValue: any;
|
|
219
|
+
/**
|
|
220
|
+
* Node where Custom Display Format will apply
|
|
221
|
+
*/
|
|
222
|
+
rowNode: RowNode;
|
|
223
|
+
}
|
package/src/Api/ChartingApi.d.ts
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
import { ChartModel, ChartRef } from '@ag-grid-community/all-modules';
|
|
1
2
|
/**
|
|
2
|
-
* Provides run-time access to Charting Module and
|
|
3
|
+
* Provides run-time access to Charting Module and related State
|
|
3
4
|
*/
|
|
4
5
|
export interface ChartingApi {
|
|
5
6
|
/**
|
|
6
|
-
* Whether
|
|
7
|
+
* Whether AdapTable's charting functionality is available
|
|
7
8
|
*/
|
|
8
9
|
isChartingEnabled(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves current user-generated Charts
|
|
12
|
+
*/
|
|
13
|
+
getCurrentCharts(): ChartModel[];
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves persisted Charts from Adaptable State
|
|
16
|
+
*/
|
|
17
|
+
getPersistedCharts(): ChartModel[];
|
|
18
|
+
/**
|
|
19
|
+
* Saves all current Charts into Adaptable State
|
|
20
|
+
*/
|
|
21
|
+
saveCurrentCharts(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Displays all persisted Charts
|
|
24
|
+
*/
|
|
25
|
+
showPersistedCharts(): ChartRef[];
|
|
9
26
|
}
|
|
@@ -7,7 +7,7 @@ import { ColumnFilter, DataSet } from '../../types';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface SearchChangedInfo extends BaseEventInfo {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* How Search was changed: 'CurrentQuery', 'Filter', 'DataChange' or 'Sort'
|
|
11
11
|
*/
|
|
12
12
|
searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort';
|
|
13
13
|
/**
|
package/src/Api/FinanceApi.d.ts
CHANGED
|
@@ -10,49 +10,49 @@ export interface FinanceApi {
|
|
|
10
10
|
*/
|
|
11
11
|
getPluginOptions(): FinancePluginOptions;
|
|
12
12
|
/**
|
|
13
|
-
* Creates Instrument Context
|
|
13
|
+
* Creates FDC3 Instrument Context
|
|
14
14
|
* @param instrumentColumn Instrument Column to create Context For
|
|
15
15
|
* @param rowNode Row Node to use for Context Data
|
|
16
16
|
*/
|
|
17
17
|
createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: RowNode): InstrumentContext;
|
|
18
18
|
/**
|
|
19
|
-
* Creates Instrumentlist Context
|
|
19
|
+
* Creates FDC3 Instrumentlist Context
|
|
20
20
|
* @param instrumentColumn Instrument Column to create Context For
|
|
21
21
|
* @param rowNode Row Nodes to use for Context Data
|
|
22
22
|
*/
|
|
23
23
|
createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: RowNode[]): InstrumentListContext;
|
|
24
24
|
/**
|
|
25
|
-
* Creates Position Context
|
|
25
|
+
* Creates FDC3 Position Context
|
|
26
26
|
* @param instrumentColumn Position Column to create Context For
|
|
27
27
|
* @param rowNode Row Node to use for Context Data
|
|
28
28
|
*/
|
|
29
29
|
createFDC3PositionContext(positionColumn: PositionColumn, rowNode: RowNode): PositionContext;
|
|
30
30
|
/**
|
|
31
|
-
* Creates Portfolio Context
|
|
31
|
+
* Creates FDC3 Portfolio Context
|
|
32
32
|
* @param instrumentColumn Position Column to create Context For
|
|
33
33
|
* @param rowNode Row Nodes to use for Context Data
|
|
34
34
|
*/
|
|
35
35
|
createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: RowNode[]): PortfolioContext;
|
|
36
36
|
/**
|
|
37
|
-
* Creates Contact Context
|
|
37
|
+
* Creates FDC3 Contact Context
|
|
38
38
|
* @param instrumentColumn Contact Column to create Context For
|
|
39
39
|
* @param rowNode Row Node to use for Context Data
|
|
40
40
|
*/
|
|
41
41
|
createFDC3ContactContext(contactColumn: ContactColumn, rowNode: RowNode): ContactContext;
|
|
42
42
|
/**
|
|
43
|
-
* Creates Contact List Context
|
|
43
|
+
* Creates FDC3 Contact List Context
|
|
44
44
|
* @param instrumentColumn Contact Column to create Context For
|
|
45
45
|
* @param rowNode Row Nodes to use for Context Data
|
|
46
46
|
*/
|
|
47
47
|
createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: RowNode[]): ContactListContext;
|
|
48
48
|
/**
|
|
49
|
-
* Creates Organization Context
|
|
49
|
+
* Creates FDC3 Organization Context
|
|
50
50
|
* @param instrumentColumn Organization Column to create Context For
|
|
51
51
|
* @param rowNode Row Node to use for Context Data
|
|
52
52
|
*/
|
|
53
53
|
createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: RowNode): OrganizationContext;
|
|
54
54
|
/**
|
|
55
|
-
* Creates Country Context
|
|
55
|
+
* Creates FDC3 Country Context
|
|
56
56
|
* @param instrumentColumn Country Column to create Context For
|
|
57
57
|
* @param rowNode Row Node to use for Context Data
|
|
58
58
|
*/
|
|
@@ -181,22 +181,27 @@ export interface FormatColumnApi {
|
|
|
181
181
|
/**
|
|
182
182
|
* Format value according to format options.
|
|
183
183
|
*
|
|
184
|
-
* @param
|
|
184
|
+
* @param customDisplayFormatterContext context that includes value to format
|
|
185
185
|
* @param options formatter options
|
|
186
186
|
*/
|
|
187
|
-
getNumberFormattedValue(value: any, options: AdaptableFormat['Options']): any;
|
|
187
|
+
getNumberFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): any;
|
|
188
188
|
/**
|
|
189
189
|
* Format value according to format options.
|
|
190
190
|
*
|
|
191
|
-
* @param value value to format
|
|
191
|
+
* @param value context that includes value to format
|
|
192
192
|
* @param options formatter options
|
|
193
193
|
*/
|
|
194
|
-
getStringFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
194
|
+
getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
|
|
195
195
|
/**
|
|
196
196
|
* Format value according to format options.
|
|
197
197
|
*
|
|
198
|
-
* @param
|
|
198
|
+
* @param customDisplayFormatterContext context that includes value to format
|
|
199
199
|
* @param options formatter options
|
|
200
200
|
*/
|
|
201
|
-
getDateFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
201
|
+
getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
|
|
202
|
+
/**
|
|
203
|
+
* Checks if a Format Column contains a Custom Display Formatter
|
|
204
|
+
* @param formatColumn Format Column
|
|
205
|
+
*/
|
|
206
|
+
hasCustomDisplayFormatter(formatColumn: FormatColumn): boolean;
|
|
202
207
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -262,7 +262,7 @@ export interface GridApi {
|
|
|
262
262
|
* @param columnId ColumnId to lookup
|
|
263
263
|
* @param rawValue Raw Value
|
|
264
264
|
*/
|
|
265
|
-
getFormattedValueFromRawValue(columnId: string, rawValue: any): string | undefined;
|
|
265
|
+
getFormattedValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
|
|
266
266
|
/**
|
|
267
267
|
* Retrieves Display Value for Cell in given Row and Column
|
|
268
268
|
* @param rowNode Row to use
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { ChartModel } from '@ag-grid-community/core';
|
|
1
2
|
import { ChartingApi } from '../ChartingApi';
|
|
2
3
|
import { ApiBase } from './ApiBase';
|
|
4
|
+
import { ChartRef } from '@ag-grid-community/all-modules';
|
|
3
5
|
export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
4
6
|
isChartingEnabled(): boolean;
|
|
7
|
+
getCurrentCharts(): ChartModel[];
|
|
8
|
+
saveCurrentCharts(): void;
|
|
9
|
+
getPersistedCharts(): ChartModel[];
|
|
10
|
+
showPersistedCharts(): ChartRef[];
|
|
5
11
|
}
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChartingApiImpl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
|
+
const ChartingRedux = tslib_1.__importStar(require("./../../Redux/ActionsReducers/ChartingRedux"));
|
|
7
|
+
const ChartingRedux_1 = require("./../../Redux/ActionsReducers/ChartingRedux");
|
|
5
8
|
class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
6
9
|
isChartingEnabled() {
|
|
7
10
|
return this.adaptable.canGenerateCharts();
|
|
8
11
|
}
|
|
12
|
+
getCurrentCharts() {
|
|
13
|
+
return this.adaptable.getChartModels();
|
|
14
|
+
}
|
|
15
|
+
saveCurrentCharts() {
|
|
16
|
+
const currentCharts = this.getCurrentCharts();
|
|
17
|
+
this.dispatchAction(ChartingRedux.ChartingSetChartModels(currentCharts));
|
|
18
|
+
}
|
|
19
|
+
getPersistedCharts() {
|
|
20
|
+
return ChartingRedux_1.ChartingGetChartModels(this.getAdaptableState()).map((chart) => chart.model);
|
|
21
|
+
}
|
|
22
|
+
showPersistedCharts() {
|
|
23
|
+
const persistedCharts = this.getPersistedCharts();
|
|
24
|
+
return this.adaptable.showCharts(persistedCharts);
|
|
25
|
+
}
|
|
9
26
|
}
|
|
10
27
|
exports.ChartingApiImpl = ChartingApiImpl;
|
|
@@ -22,6 +22,7 @@ import { AdaptableSearchState, ScheduleState } from '../../types';
|
|
|
22
22
|
import { AdaptableSortState } from '../Events/SearchChanged';
|
|
23
23
|
import { QueryState } from '../../PredefinedConfig/QueryState';
|
|
24
24
|
import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
|
|
25
|
+
import { ChartingState } from '../../PredefinedConfig/ChartingState';
|
|
25
26
|
export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
26
27
|
configInit(): void;
|
|
27
28
|
copyAllStateToClipboard(): void;
|
|
@@ -47,6 +48,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
|
47
48
|
getAlertState(returnJson?: boolean): AlertState;
|
|
48
49
|
getApplicationState(returnJson?: boolean): ApplicationState;
|
|
49
50
|
getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
|
|
51
|
+
getChartingState(returnJson?: boolean): ChartingState;
|
|
50
52
|
getConditionalStyleState(returnJson?: boolean): ConditionalStyleState;
|
|
51
53
|
getCustomSortState(returnJson?: boolean): CustomSortState;
|
|
52
54
|
getDashboardState(returnJson?: boolean): DashboardState;
|
|
@@ -11,6 +11,7 @@ const DashboardRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers
|
|
|
11
11
|
const AlertRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/AlertRedux"));
|
|
12
12
|
const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
|
|
13
13
|
const CalculatedColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CalculatedColumnRedux"));
|
|
14
|
+
const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
|
|
14
15
|
const ConditionalStyleRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ConditionalStyleRedux"));
|
|
15
16
|
const CustomSortRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CustomSortRedux"));
|
|
16
17
|
const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
|
|
@@ -154,6 +155,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
154
155
|
return returnJson
|
|
155
156
|
? JSON.stringify(this.getAdaptableState().CalculatedColumn)
|
|
156
157
|
: this.getAdaptableState().CalculatedColumn;
|
|
158
|
+
case 'Charting':
|
|
159
|
+
return returnJson
|
|
160
|
+
? JSON.stringify(this.getAdaptableState().Charting)
|
|
161
|
+
: this.getAdaptableState().Charting;
|
|
157
162
|
case 'ConditionalStyle':
|
|
158
163
|
return returnJson
|
|
159
164
|
? JSON.stringify(this.getAdaptableState().ConditionalStyle)
|
|
@@ -231,6 +236,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
231
236
|
getCalculatedColumnState(returnJson = false) {
|
|
232
237
|
return this.getUserStateByStateKey('CalculatedColumn', returnJson);
|
|
233
238
|
}
|
|
239
|
+
getChartingState(returnJson = false) {
|
|
240
|
+
return this.getUserStateByStateKey('Charting', returnJson);
|
|
241
|
+
}
|
|
234
242
|
getConditionalStyleState(returnJson = false) {
|
|
235
243
|
return this.getUserStateByStateKey('ConditionalStyle', returnJson);
|
|
236
244
|
}
|
|
@@ -284,6 +292,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
284
292
|
case 'CalculatedColumn':
|
|
285
293
|
this.dispatchAction(CalculatedColumnRedux.CalculatedColumnReady(this.getCalculatedColumnState()));
|
|
286
294
|
break;
|
|
295
|
+
case 'Charting':
|
|
296
|
+
this.dispatchAction(ChartingRedux.ChartingReady(this.getChartingState()));
|
|
297
|
+
break;
|
|
287
298
|
case 'ConditionalStyle':
|
|
288
299
|
this.dispatchAction(ConditionalStyleRedux.ConditionalStyleReady(this.getConditionalStyleState()));
|
|
289
300
|
break;
|
|
@@ -45,7 +45,8 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
|
|
|
45
45
|
isCheckBoxStyleFormatColumn(column: AdaptableColumn): boolean;
|
|
46
46
|
fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
|
|
47
47
|
private applyCustomFormatters;
|
|
48
|
-
getNumberFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
49
|
-
getStringFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
50
|
-
getDateFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
48
|
+
getNumberFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
|
|
49
|
+
getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
|
|
50
|
+
getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
|
|
51
|
+
hasCustomDisplayFormatter(formatColumn: FormatColumn): boolean;
|
|
51
52
|
}
|
|
@@ -9,6 +9,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
|
|
|
9
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
10
10
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
11
11
|
const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
|
|
12
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
12
13
|
class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
13
14
|
getFormatColumnState() {
|
|
14
15
|
return this.getAdaptableState().FormatColumn;
|
|
@@ -273,7 +274,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
273
274
|
};
|
|
274
275
|
this.adaptable.api.eventApi.emit('CheckboxColumnClicked', checkboxColumnClickedInfo);
|
|
275
276
|
}
|
|
276
|
-
applyCustomFormatters(value, options) {
|
|
277
|
+
applyCustomFormatters(value, node, abColumn, options) {
|
|
277
278
|
var _a, _b, _c;
|
|
278
279
|
const columnCustomFormatters = (_a = options === null || options === void 0 ? void 0 : options.CustomDisplayFormats) !== null && _a !== void 0 ? _a : [];
|
|
279
280
|
if (!(columnCustomFormatters === null || columnCustomFormatters === void 0 ? void 0 : columnCustomFormatters.length)) {
|
|
@@ -283,24 +284,47 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
283
284
|
const customFormattersFromOptions = (_c = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
|
|
284
285
|
// formatters are applied in the order they are defined in the options
|
|
285
286
|
const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
|
|
286
|
-
|
|
287
|
+
const customDisplayFormatterContext = ObjectFactory_1.default.CreateCustomDisplayFormatterContext(value, node, abColumn, this.getAdaptableApi());
|
|
288
|
+
return customFormatters.reduce((context, formatter) => {
|
|
287
289
|
if (formatter && formatter.handler) {
|
|
288
|
-
return formatter.handler(
|
|
290
|
+
return formatter.handler(context);
|
|
289
291
|
}
|
|
290
|
-
return
|
|
291
|
-
},
|
|
292
|
+
return context.cellValue;
|
|
293
|
+
}, customDisplayFormatterContext);
|
|
292
294
|
}
|
|
293
|
-
getNumberFormattedValue(value, options) {
|
|
294
|
-
|
|
295
|
+
getNumberFormattedValue(value, node, abColumn, options) {
|
|
296
|
+
if (!value) {
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
|
|
295
300
|
return FormatHelper_1.default.NumberFormatter(preparedValue, options);
|
|
296
301
|
}
|
|
297
|
-
getStringFormattedValue(value, options) {
|
|
298
|
-
|
|
302
|
+
getStringFormattedValue(value, node, abColumn, options) {
|
|
303
|
+
const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
|
|
299
304
|
return FormatHelper_1.default.StringFormatter(preparedValue, options);
|
|
300
305
|
}
|
|
301
|
-
getDateFormattedValue(value, options) {
|
|
302
|
-
|
|
303
|
-
|
|
306
|
+
getDateFormattedValue(value, node, abColumn, options) {
|
|
307
|
+
if (!value) {
|
|
308
|
+
return undefined;
|
|
309
|
+
}
|
|
310
|
+
const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
|
|
311
|
+
const dateFormatterOptions = options;
|
|
312
|
+
// only use DateFormatter if we have a pattern
|
|
313
|
+
return dateFormatterOptions.Pattern
|
|
314
|
+
? FormatHelper_1.default.DateFormatter(preparedValue, options)
|
|
315
|
+
: preparedValue;
|
|
316
|
+
}
|
|
317
|
+
hasCustomDisplayFormatter(formatColumn) {
|
|
318
|
+
var _a;
|
|
319
|
+
if (!formatColumn || !formatColumn.DisplayFormat || !formatColumn.DisplayFormat.Options) {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
const options = formatColumn.DisplayFormat.Options;
|
|
323
|
+
const columnCustomFormatters = (_a = options === null || options === void 0 ? void 0 : options.CustomDisplayFormats) !== null && _a !== void 0 ? _a : [];
|
|
324
|
+
if (!(columnCustomFormatters === null || columnCustomFormatters === void 0 ? void 0 : columnCustomFormatters.length)) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
return true;
|
|
304
328
|
}
|
|
305
329
|
}
|
|
306
330
|
exports.FormatColumnApiImpl = FormatColumnApiImpl;
|
|
@@ -65,7 +65,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
65
65
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
66
66
|
getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
67
67
|
getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
68
|
-
getFormattedValueFromRawValue(columnId: string, rawValue: any): string | undefined;
|
|
68
|
+
getFormattedValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
|
|
69
69
|
getNormalisedValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
70
70
|
getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
|
|
71
71
|
getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
|
|
@@ -200,8 +200,8 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
200
200
|
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
201
201
|
return this.adaptable.getDisplayValueFromRowNode(rowNode, columnId);
|
|
202
202
|
}
|
|
203
|
-
getFormattedValueFromRawValue(columnId, rawValue) {
|
|
204
|
-
return this.adaptable.getDisplayValueFromRawValue(columnId, rawValue);
|
|
203
|
+
getFormattedValueFromRawValue(rowNode, columnId, rawValue) {
|
|
204
|
+
return this.adaptable.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
|
|
205
205
|
}
|
|
206
206
|
getNormalisedValueFromRowNode(rowNode, columnId) {
|
|
207
207
|
const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
|
|
@@ -6,7 +6,6 @@ const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Pop
|
|
|
6
6
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
7
7
|
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
8
8
|
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
9
|
-
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
10
9
|
const AlertRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/AlertRedux"));
|
|
11
10
|
const DeadRedux = tslib_1.__importStar(require("../../Redux/DeadRedux"));
|
|
12
11
|
const ApiBase_1 = require("./ApiBase");
|
|
@@ -239,7 +238,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
239
238
|
this.dispatchAction(SystemRedux.SetLastAppliedShortcut(gridCell));
|
|
240
239
|
}
|
|
241
240
|
updateCurrentDraftLayout(layout) {
|
|
242
|
-
this.dispatchAction(
|
|
241
|
+
this.dispatchAction(GridRedux.LayoutUpdateCurrentDraft(layout));
|
|
243
242
|
}
|
|
244
243
|
getPrimaryKey() {
|
|
245
244
|
return this.adaptable.adaptableOptions.primaryKey;
|
|
@@ -14,6 +14,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
14
14
|
fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
|
|
15
15
|
getCurrentLayout(): Layout;
|
|
16
16
|
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
17
|
+
areDraftAndCurrentLayoutEqual(): boolean;
|
|
17
18
|
getCurrentLayoutName(): string;
|
|
18
19
|
getLayoutByName(layoutName: string): Layout | null;
|
|
19
20
|
getAllLayout(): Layout[];
|