@adaptabletools/adaptable 16.0.3-canary.0 → 16.0.3-canary.1
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 +177 -168
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/Fdc3Options.d.ts +66 -54
- package/src/Api/GridApi.d.ts +11 -1
- package/src/Api/Implementation/Fdc3ApiImpl.js +2 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
- package/src/Api/Implementation/GridApiImpl.js +6 -0
- package/src/Api/Internal/Fdc3InternalApi.d.ts +14 -7
- package/src/Api/Internal/Fdc3InternalApi.js +85 -191
- package/src/Strategy/Fdc3Module.d.ts +0 -1
- package/src/Strategy/Fdc3Module.js +10 -40
- package/src/Utilities/Services/Fdc3Service.js +17 -15
- package/src/metamodel/adaptable.metamodel.js +1 -1
- 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": "16.0.3-canary.
|
|
3
|
+
"version": "16.0.3-canary.1",
|
|
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: 1692792415311;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChartContext, ChatInitSettingsContext, ContactContext, ContactListContext, CountryContext, CurrencyContext, EmailContext, Fdc3Context, Fdc3ContextType, Fdc3CustomContext, Fdc3CustomContextType, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext, TimeRangeContext, ValuationContext } from '../PredefinedConfig/Common/Fdc3Context';
|
|
2
2
|
import { BaseContext } from '../PredefinedConfig/Common/BaseContext';
|
|
3
3
|
import { IRowNode } from '@ag-grid-community/core';
|
|
4
|
-
import { Context, ContextMetadata, IntentResolution, IntentResult } from '@finos/fdc3';
|
|
4
|
+
import { Context, ContextMetadata, DesktopAgent, IntentResolution, IntentResult } from '@finos/fdc3';
|
|
5
5
|
import { CompatibleContext, Fdc3CustomIntentType, Fdc3IntentType } from '../PredefinedConfig/Common/Fdc3Intent';
|
|
6
6
|
import { AdaptableIcon } from '../PredefinedConfig/Common/AdaptableIcon';
|
|
7
7
|
import { ButtonStyle } from '../PredefinedConfig/Common/ButtonStyle';
|
|
@@ -15,6 +15,10 @@ export interface Fdc3Options {
|
|
|
15
15
|
* @defaultValue false
|
|
16
16
|
*/
|
|
17
17
|
enableLogging?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* TODO AFL
|
|
20
|
+
*/
|
|
21
|
+
desktopAgentProvider?: Promise<DesktopAgent>;
|
|
18
22
|
/**
|
|
19
23
|
* Maps Context Type to AdapTable Grid Data
|
|
20
24
|
*/
|
|
@@ -28,69 +32,39 @@ export interface Fdc3Options {
|
|
|
28
32
|
*/
|
|
29
33
|
intents?: {
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Raises given standard Intent(s) on various Grid Actions
|
|
32
36
|
*/
|
|
33
|
-
|
|
37
|
+
raises?: RaiseIntentConfiguration;
|
|
34
38
|
/**
|
|
35
|
-
*
|
|
39
|
+
* Subscribe to given standard Intent(s)
|
|
36
40
|
*/
|
|
37
|
-
|
|
38
|
-
[K in Fdc3IntentType]?: RaiseIntentConfig<K>[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Configures FDC3 custom Intents that AdapTable will listen for and raise
|
|
43
|
-
*/
|
|
44
|
-
customIntents?: {
|
|
41
|
+
listensFor?: (Fdc3IntentType | Fdc3CustomIntentType)[];
|
|
45
42
|
/**
|
|
46
|
-
*
|
|
43
|
+
* Handles incoming Intents (standard and custom)
|
|
47
44
|
*/
|
|
48
|
-
|
|
45
|
+
handleIntent?: (context: HandleFdc3IntentContext) => Promise<IntentResult> | void;
|
|
49
46
|
/**
|
|
50
|
-
*
|
|
47
|
+
* Handles the IntentResolution that a raised Intent might return
|
|
51
48
|
*/
|
|
52
|
-
|
|
53
|
-
[K in Fdc3CustomIntentType]: RaiseIntentConfig[];
|
|
54
|
-
};
|
|
49
|
+
handleIntentResolution?: (context: HandleFdc3IntentResolutionContext) => Promise<void>;
|
|
55
50
|
};
|
|
56
51
|
/**
|
|
57
52
|
* Configures FDC3 standard Contexts that AdapTable will listen for and broadcast
|
|
58
53
|
*/
|
|
59
54
|
contexts?: {
|
|
60
|
-
/**
|
|
61
|
-
* Subscribe to given standard Context(s)
|
|
62
|
-
*/
|
|
63
|
-
listensFor?: Fdc3ContextType[];
|
|
64
55
|
/**
|
|
65
56
|
* Broadcasts given standard Context(s) on various Grid Actions
|
|
66
57
|
*/
|
|
67
|
-
broadcasts?:
|
|
68
|
-
[K in Fdc3ContextType]?: BroadcastConfig;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Configures FDC3 custom Contexts that AdapTable will listen for and broadcast
|
|
73
|
-
*/
|
|
74
|
-
customContexts?: {
|
|
58
|
+
broadcasts?: BroadcastConfiguration;
|
|
75
59
|
/**
|
|
76
|
-
* Subscribe to given
|
|
60
|
+
* Subscribe to given standard Context(s)
|
|
77
61
|
*/
|
|
78
|
-
listensFor?: Fdc3CustomContextType[];
|
|
62
|
+
listensFor?: (Fdc3ContextType | Fdc3CustomContextType)[];
|
|
79
63
|
/**
|
|
80
|
-
*
|
|
64
|
+
* Handles incoming Contexts (standard and custom)
|
|
81
65
|
*/
|
|
82
|
-
|
|
83
|
-
[K in Fdc3CustomContextType]?: BroadcastConfig;
|
|
84
|
-
};
|
|
66
|
+
handleContext?: (context: HandleFdc3Context) => void;
|
|
85
67
|
};
|
|
86
|
-
/**
|
|
87
|
-
* Handles incoming Intents (standard and custom)
|
|
88
|
-
*/
|
|
89
|
-
handleIntent?: (context: HandleFdc3IntentContext) => Promise<IntentResult> | void;
|
|
90
|
-
/**
|
|
91
|
-
* Handles incoming Contexts (standard and custom)
|
|
92
|
-
*/
|
|
93
|
-
handleContext?: (context: HandleFdc3Context) => void;
|
|
94
68
|
/**
|
|
95
69
|
* Customises FDC3 Actions column
|
|
96
70
|
*/
|
|
@@ -173,6 +147,10 @@ export interface HandleFdc3IntentContext extends HandleFdc3Context {
|
|
|
173
147
|
*/
|
|
174
148
|
intent: Fdc3IntentType | Fdc3CustomIntentType;
|
|
175
149
|
}
|
|
150
|
+
export declare const ColumnRefTypePrefix = "_colId.";
|
|
151
|
+
export declare const FieldRefTypePrefix = "_field.";
|
|
152
|
+
export declare type GridDataRef = `_colId.${string}` | `_field.${string}`;
|
|
153
|
+
export declare type Fdc3ContentMapping<T> = PropertiesToGridRefs<Omit<T, 'type'>>;
|
|
176
154
|
/**
|
|
177
155
|
* Mapping of FDC3 Context Types to Grid Data/Columns
|
|
178
156
|
*/
|
|
@@ -195,10 +173,44 @@ export interface GridDataContextMapping {
|
|
|
195
173
|
[key: string]: Fdc3ContentMapping<Context>;
|
|
196
174
|
};
|
|
197
175
|
}
|
|
198
|
-
export
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
176
|
+
export interface RaiseIntentConfiguration {
|
|
177
|
+
StartCall?: RaiseIntentConfig<'StartCall'>[];
|
|
178
|
+
StartChat?: RaiseIntentConfig<'StartChat'>[];
|
|
179
|
+
StartEmail?: RaiseIntentConfig<'StartEmail'>[];
|
|
180
|
+
ViewAnalysis?: RaiseIntentConfig<'ViewAnalysis'>[];
|
|
181
|
+
ViewChart?: RaiseIntentConfig<'ViewChart'>[];
|
|
182
|
+
ViewContact?: RaiseIntentConfig<'ViewContact'>[];
|
|
183
|
+
ViewHoldings?: RaiseIntentConfig<'ViewHoldings'>[];
|
|
184
|
+
ViewInstrument?: RaiseIntentConfig<'ViewInstrument'>[];
|
|
185
|
+
ViewInteractions?: RaiseIntentConfig<'ViewInteractions'>[];
|
|
186
|
+
ViewNews?: RaiseIntentConfig<'ViewNews'>[];
|
|
187
|
+
ViewOrders?: RaiseIntentConfig<'ViewOrders'>[];
|
|
188
|
+
ViewProfile?: RaiseIntentConfig<'ViewProfile'>[];
|
|
189
|
+
ViewQuote?: RaiseIntentConfig<'ViewQuote'>[];
|
|
190
|
+
ViewResearch?: RaiseIntentConfig<'ViewResearch'>[];
|
|
191
|
+
custom?: {
|
|
192
|
+
[customIntent: string]: RaiseIntentConfig[];
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export interface BroadcastConfiguration {
|
|
196
|
+
'fdc3.chart'?: BroadcastConfig;
|
|
197
|
+
'fdc3.chat.initSettings'?: BroadcastConfig;
|
|
198
|
+
'fdc3.contact'?: BroadcastConfig;
|
|
199
|
+
'fdc3.contactList'?: BroadcastConfig;
|
|
200
|
+
'fdc3.country'?: BroadcastConfig;
|
|
201
|
+
'fdc3.currency'?: BroadcastConfig;
|
|
202
|
+
'fdc3.email'?: BroadcastConfig;
|
|
203
|
+
'fdc3.instrument'?: BroadcastConfig;
|
|
204
|
+
'fdc3.instrumentList'?: BroadcastConfig;
|
|
205
|
+
'fdc3.organization'?: BroadcastConfig;
|
|
206
|
+
'fdc3.portfolio'?: BroadcastConfig;
|
|
207
|
+
'fdc3.position'?: BroadcastConfig;
|
|
208
|
+
'fdc3.timerange'?: BroadcastConfig;
|
|
209
|
+
'fdc3.valuation'?: BroadcastConfig;
|
|
210
|
+
custom?: {
|
|
211
|
+
[customContext: string]: BroadcastConfig;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
202
214
|
/**
|
|
203
215
|
* Config used when raising an FDC3 Intent
|
|
204
216
|
*/
|
|
@@ -227,9 +239,9 @@ export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
|
|
|
227
239
|
width?: number;
|
|
228
240
|
};
|
|
229
241
|
/**
|
|
230
|
-
* Handles
|
|
242
|
+
* Handles the IntentResolution for this specific raise intent configuration
|
|
231
243
|
*/
|
|
232
|
-
handleIntentResolution?: (context: HandleFdc3IntentResolutionContext) => Promise<
|
|
244
|
+
handleIntentResolution?: (context: HandleFdc3IntentResolutionContext) => Promise<void>;
|
|
233
245
|
}
|
|
234
246
|
/**
|
|
235
247
|
* Config used when broadcasting FDC3 Context
|
|
@@ -242,12 +254,12 @@ export interface BroadcastConfig {
|
|
|
242
254
|
columnIds: string[];
|
|
243
255
|
};
|
|
244
256
|
/**
|
|
245
|
-
|
|
246
|
-
|
|
257
|
+
* Definition of Action Button (to be put in default FDC3 Action Column)
|
|
258
|
+
*/
|
|
247
259
|
actionButton?: Fdc3AdaptableButton;
|
|
248
260
|
/**
|
|
249
|
-
|
|
250
|
-
|
|
261
|
+
* Custom FDC3 Action Column definition to broadcast the Context
|
|
262
|
+
*/
|
|
251
263
|
actionColumn?: {
|
|
252
264
|
columnId: string;
|
|
253
265
|
friendlyName?: string;
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -434,7 +434,17 @@ export interface GridApi {
|
|
|
434
434
|
*/
|
|
435
435
|
unHighlightAllRows(): void;
|
|
436
436
|
/**
|
|
437
|
-
* Refresh
|
|
437
|
+
* Refresh Column Values in AdapTable
|
|
438
|
+
* @param columnId - the ID of the Column to refresh
|
|
439
|
+
*/
|
|
440
|
+
refreshColumn(columnId: string): void;
|
|
441
|
+
/**
|
|
442
|
+
* Refresh Columns Values in AdapTable
|
|
443
|
+
* @param columnIds - the IDs of the Columns to refresh
|
|
444
|
+
*/
|
|
445
|
+
refreshColumns(columnIds: string[]): void;
|
|
446
|
+
/**
|
|
447
|
+
* Refresh Cell Values in AdapTable
|
|
438
448
|
* @param rowNodes agGrid RowNodes which contain cells to refresh
|
|
439
449
|
* @param columnIds ColumnIds which contain cells to refresh
|
|
440
450
|
*/
|
|
@@ -73,12 +73,10 @@ class Fdc3ApiImpl extends ApiBase_1.ApiBase {
|
|
|
73
73
|
return (_a = Fdc3Context_1.ContextLabels[contextType]) !== null && _a !== void 0 ? _a : contextType;
|
|
74
74
|
}
|
|
75
75
|
isStandardContextType(contextType) {
|
|
76
|
-
|
|
77
|
-
return Fdc3Context_1.StandardContextTypes.includes(contextType);
|
|
76
|
+
return this.internalApi.isStandardContextType(contextType);
|
|
78
77
|
}
|
|
79
78
|
isStandardIntentType(intentType) {
|
|
80
|
-
|
|
81
|
-
return Fdc3Intent_1.Fdc3StandardIntents.includes(intentType);
|
|
79
|
+
return this.internalApi.isStandardIntentType(intentType);
|
|
82
80
|
}
|
|
83
81
|
getFdc3Service() {
|
|
84
82
|
return this.adaptable.api.internalApi.getFdc3Service();
|
|
@@ -109,6 +109,8 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
109
109
|
unHighlightRows(primaryKeyValues: RowsHighlightInfo['primaryKeyValues']): void;
|
|
110
110
|
unHighlightAllRows(): void;
|
|
111
111
|
refreshCells(rowNodes: IRowNode[], columnIds: string[]): void;
|
|
112
|
+
refreshColumn(columnId: string): void;
|
|
113
|
+
refreshColumns(columnIds: string[]): void;
|
|
112
114
|
refreshRowByPrimaryKey(primaryKey: any): void;
|
|
113
115
|
refreshRowNode(rowNode: IRowNode): void;
|
|
114
116
|
refreshRowNodes(rowNodes: IRowNode[]): void;
|
|
@@ -455,6 +455,12 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
455
455
|
refreshCells(rowNodes, columnIds) {
|
|
456
456
|
this.adaptable.refreshCells(rowNodes, columnIds, true);
|
|
457
457
|
}
|
|
458
|
+
refreshColumn(columnId) {
|
|
459
|
+
this.adaptable.refreshCells(null, [columnId], true);
|
|
460
|
+
}
|
|
461
|
+
refreshColumns(columnIds) {
|
|
462
|
+
this.adaptable.refreshCells(null, columnIds, true);
|
|
463
|
+
}
|
|
458
464
|
refreshRowByPrimaryKey(primaryKey) {
|
|
459
465
|
const rowNode = this.getRowNodeForPrimaryKey(primaryKey);
|
|
460
466
|
this.refreshRowNode(rowNode);
|
|
@@ -2,28 +2,35 @@ import { ApiBase } from '../Implementation/ApiBase';
|
|
|
2
2
|
import { Fdc3Context, Fdc3ContextType, Fdc3CustomContextType } from '../../PredefinedConfig/Common/Fdc3Context';
|
|
3
3
|
import { ColDef, IRowNode } from '@ag-grid-community/core';
|
|
4
4
|
import { AppIdentifier, Context, IntentResolution } from '@finos/fdc3';
|
|
5
|
+
import { BroadcastConfig, RaiseIntentConfig } from '../../AdaptableOptions/Fdc3Options';
|
|
6
|
+
import { Fdc3CustomIntentType, Fdc3IntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
|
|
5
7
|
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
6
8
|
import { ActionColumnContext } from '../../AdaptableOptions/ActionColumnOptions';
|
|
9
|
+
declare type WithContext<K> = K & {
|
|
10
|
+
contextType: Fdc3ContextType | Fdc3CustomContextType;
|
|
11
|
+
};
|
|
12
|
+
declare type WithIntent<K> = K & {
|
|
13
|
+
intentType: Fdc3IntentType | Fdc3CustomIntentType;
|
|
14
|
+
};
|
|
7
15
|
export declare class Fdc3InternalApi extends ApiBase {
|
|
8
16
|
mapRowToContextData(contextType: Fdc3ContextType | Fdc3CustomContextType, rowNode: IRowNode): Fdc3Context;
|
|
9
|
-
/**
|
|
10
|
-
* Computes the context based on the given `Fdc3Options.gridDataContextMapping` and the given `IRowNode`.
|
|
11
|
-
*/
|
|
12
|
-
getMappedContextData(contextType: Fdc3ContextType, rowNode: IRowNode): Fdc3Context;
|
|
13
17
|
getFdc3ActionColDefs(): ColDef[];
|
|
14
18
|
getButtonsForFdc3MainActionColumn(): AdaptableButton<ActionColumnContext<any>>[];
|
|
15
19
|
getButtonsForFdc3StandaloneActionColumn(columnId: string): AdaptableButton<ActionColumnContext<any>>[];
|
|
16
20
|
isFdc3MainActionColumn(columnId: string): boolean;
|
|
17
21
|
isFdc3StandaloneActionColumn(columnId: string, columnType: string | string[]): boolean;
|
|
18
22
|
handleIntentResolution(intentResolution: IntentResolution, context: Context, raisedIntent: string, app?: AppIdentifier): void;
|
|
23
|
+
isStandardContextType(contextType: string): contextType is Fdc3ContextType;
|
|
24
|
+
isStandardIntentType(intentType: string): intentType is Fdc3IntentType;
|
|
25
|
+
getAllRaiseIntentConfigs(): WithIntent<RaiseIntentConfig>[];
|
|
26
|
+
getAllBroadcastContextConfigs(): WithContext<BroadcastConfig>[];
|
|
27
|
+
private mapRowValueToContextData;
|
|
19
28
|
private isAtLeastOneActionButtonConfigured;
|
|
20
29
|
private getIntentConfigsWithActionButtons;
|
|
21
|
-
private getCustomIntentConfigsWithActionButtons;
|
|
22
30
|
private getContextConfigsWithActionButtons;
|
|
23
|
-
private getCustomContextConfigsWithActionButtons;
|
|
24
|
-
private mapRowValueToContextData;
|
|
25
31
|
private mapFdc3ButtonConfigToAdaptableButton;
|
|
26
32
|
private getDefaultFdc3ButtonLabel;
|
|
27
33
|
private getDefaultFdc3ButtonIcon;
|
|
28
34
|
private getDefaultFdc3ButtonStyle;
|
|
29
35
|
}
|
|
36
|
+
export {};
|