@adaptabletools/adaptable 16.0.3-canary.1 → 16.0.3-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "16.0.3-canary.1",
3
+ "version": "16.0.3-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",
@@ -1,2 +1,2 @@
1
- declare const _default: 1692792415311;
1
+ declare const _default: 1692804275971;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1692792415311;
3
+ exports.default = 1692804275971;
@@ -1,8 +1,8 @@
1
- import { ChartContext, ChatInitSettingsContext, ContactContext, ContactListContext, CountryContext, CurrencyContext, EmailContext, Fdc3Context, Fdc3ContextType, Fdc3CustomContext, Fdc3CustomContextType, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext, TimeRangeContext, ValuationContext } from '../PredefinedConfig/Common/Fdc3Context';
1
+ import { ChartContext, ChatInitSettingsContext, ContactContext, ContactListContext, CountryContext, CurrencyContext, EmailContext, Fdc3Context, Fdc3ContextType, 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, DesktopAgent, IntentResolution, IntentResult } from '@finos/fdc3';
5
- import { CompatibleContext, Fdc3CustomIntentType, Fdc3IntentType } from '../PredefinedConfig/Common/Fdc3Intent';
4
+ import { Context, ContextMetadata, IntentResolution, IntentResult } from '@finos/fdc3';
5
+ import { CompatibleContext, Fdc3IntentType, Fdc3StandardIntentType } from '../PredefinedConfig/Common/Fdc3Intent';
6
6
  import { AdaptableIcon } from '../PredefinedConfig/Common/AdaptableIcon';
7
7
  import { ButtonStyle } from '../PredefinedConfig/Common/ButtonStyle';
8
8
  /**
@@ -15,10 +15,6 @@ export interface Fdc3Options {
15
15
  * @defaultValue false
16
16
  */
17
17
  enableLogging?: boolean;
18
- /**
19
- * TODO AFL
20
- */
21
- desktopAgentProvider?: Promise<DesktopAgent>;
22
18
  /**
23
19
  * Maps Context Type to AdapTable Grid Data
24
20
  */
@@ -38,7 +34,7 @@ export interface Fdc3Options {
38
34
  /**
39
35
  * Subscribe to given standard Intent(s)
40
36
  */
41
- listensFor?: (Fdc3IntentType | Fdc3CustomIntentType)[];
37
+ listensFor?: Fdc3IntentType[];
42
38
  /**
43
39
  * Handles incoming Intents (standard and custom)
44
40
  */
@@ -59,7 +55,7 @@ export interface Fdc3Options {
59
55
  /**
60
56
  * Subscribe to given standard Context(s)
61
57
  */
62
- listensFor?: (Fdc3ContextType | Fdc3CustomContextType)[];
58
+ listensFor?: Fdc3ContextType[];
63
59
  /**
64
60
  * Handles incoming Contexts (standard and custom)
65
61
  */
@@ -107,7 +103,7 @@ export interface ResolveContextDataContext extends BaseContext {
107
103
  /**
108
104
  * FDC3 Context Type
109
105
  */
110
- contextType: Fdc3ContextType | Fdc3CustomContextType;
106
+ contextType: Fdc3ContextType;
111
107
  /**
112
108
  * FDC3 Context Data which has been mapped from the grid data based on the given configuration in `gridDataContextMapping`
113
109
  */
@@ -145,7 +141,7 @@ export interface HandleFdc3IntentContext extends HandleFdc3Context {
145
141
  /**
146
142
  * The FDC3 Intent
147
143
  */
148
- intent: Fdc3IntentType | Fdc3CustomIntentType;
144
+ intent: Fdc3IntentType;
149
145
  }
150
146
  export declare const ColumnRefTypePrefix = "_colId.";
151
147
  export declare const FieldRefTypePrefix = "_field.";
@@ -214,7 +210,7 @@ export interface BroadcastConfiguration {
214
210
  /**
215
211
  * Config used when raising an FDC3 Intent
216
212
  */
217
- export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
213
+ export interface RaiseIntentConfig<K extends Fdc3StandardIntentType = any> {
218
214
  /**
219
215
  * Key of Context being Raised
220
216
  */
@@ -283,11 +279,11 @@ export interface Fdc3ButtonContext extends BaseContext {
283
279
  /**
284
280
  * The FDC3 Context
285
281
  */
286
- context: Fdc3Context | Fdc3CustomContext;
282
+ context: Fdc3Context;
287
283
  /**
288
284
  * The FDC3 Intent
289
285
  */
290
- intent?: Fdc3IntentType | Fdc3CustomIntentType;
286
+ intent?: Fdc3IntentType;
291
287
  /**
292
288
  * The row node which is the source of the context data
293
289
  */
@@ -1,7 +1,7 @@
1
- import { Fdc3Context, Fdc3ContextType, Fdc3CustomContextType } from '../PredefinedConfig/Common/Fdc3Context';
1
+ import { Fdc3Context, Fdc3StandardContextType, Fdc3ContextType } from '../PredefinedConfig/Common/Fdc3Context';
2
2
  import { IRowNode } from '@ag-grid-community/core';
3
- import { DesktopAgent, IntentResolution, AppIdentifier } from '@finos/fdc3';
4
- import { Fdc3CustomIntentType, Fdc3IntentType } from '../PredefinedConfig/Common/Fdc3Intent';
3
+ import { AppIdentifier, DesktopAgent, IntentResolution } from '@finos/fdc3';
4
+ import { Fdc3IntentType, Fdc3StandardIntentType } from '../PredefinedConfig/Common/Fdc3Intent';
5
5
  /**
6
6
  * Provides run-time access to AdapTable's FDC3 functionality
7
7
  */
@@ -14,30 +14,30 @@ export interface Fdc3Api {
14
14
  * Returns the human-friendly label for the given Context Type
15
15
  * @param contextType - The FDC3 Context Type
16
16
  */
17
- getContextLabel(contextType: Fdc3ContextType | Fdc3CustomContextType): string;
17
+ getContextLabel(contextType: Fdc3ContextType): string;
18
18
  /**
19
19
  * Builds FDC3 Context Data based on the given Context Type and Row Node
20
20
  * @param contextType - The FDC3 Context Type
21
21
  * @param rowNode - The Row Node
22
22
  */
23
- buildContextDataFromRow(contextType: Fdc3ContextType | Fdc3CustomContextType, rowNode: IRowNode): Fdc3Context;
23
+ buildContextDataFromRow(contextType: Fdc3ContextType, rowNode: IRowNode): Fdc3Context;
24
24
  /**
25
25
  * Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value
26
26
  * @param contextType - The FDC3 Context Type
27
27
  * @param primaryKeyValue - The Primary Key Value
28
28
  */
29
- buildContextDataForPrimaryKey(contextType: Fdc3ContextType | Fdc3CustomContextType, primaryKeyValue: string | number): Fdc3Context | undefined;
29
+ buildContextDataForPrimaryKey(contextType: Fdc3ContextType, primaryKeyValue: string | number): Fdc3Context | undefined;
30
30
  /**
31
31
  * Returns the FDC3 Context Type for the given Intent
32
32
  * @param intent - The FDC3 Intent
33
33
  */
34
- getPossibleContextTypes(intent: Fdc3IntentType): Fdc3ContextType[];
34
+ getPossibleContextTypes(intent: Fdc3StandardIntentType): Fdc3StandardContextType[];
35
35
  /**
36
36
  * Checks if the given Context Type is compatible with the given Intent
37
37
  * @param contextType - The FDC3 Context Type
38
38
  * @param intent - The FDC3 Intent
39
39
  */
40
- isContextCompatibleWithIntent(contextType: Fdc3ContextType, intent: Fdc3IntentType): boolean;
40
+ isContextCompatibleWithIntent(contextType: Fdc3StandardContextType, intent: Fdc3StandardIntentType): boolean;
41
41
  /**
42
42
  * Raises an Intent with the given Context from the given Row Node
43
43
  * @param rowNode - The Row Node
@@ -45,7 +45,7 @@ export interface Fdc3Api {
45
45
  * @param contextType - The FDC3 Context Type
46
46
  * @param appIdentifier - The App Identifier
47
47
  */
48
- raiseIntentFromRow(rowNode: IRowNode, intent: Fdc3IntentType | Fdc3CustomIntentType, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
48
+ raiseIntentFromRow(rowNode: IRowNode, intent: Fdc3IntentType, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
49
49
  /**
50
50
  * Raises an Intent with the given Context from the given Row Node with the given Primary Key Value
51
51
  * @param primaryKeyValue - The Primary Key Value
@@ -53,33 +53,33 @@ export interface Fdc3Api {
53
53
  * @param contextType - The FDC3 Context Type
54
54
  * @param appIdentifier - The App Identifier
55
55
  */
56
- raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Fdc3IntentType | Fdc3CustomIntentType, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
56
+ raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Fdc3IntentType, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
57
57
  /**
58
58
  * Finds and raises an Intent based on the given Context from the given Row Node
59
59
  * @param rowNode - The Row Node
60
60
  * @param contextType - The FDC3 Context Type
61
61
  * @param appIdentifier - The App Identifier
62
62
  */
63
- raiseIntentForContextFromRow(rowNode: IRowNode, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
63
+ raiseIntentForContextFromRow(rowNode: IRowNode, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
64
64
  /**
65
65
  * Finds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value
66
66
  * @param primaryKeyValue - The Primary Key Value
67
67
  * @param contextType - The FDC3 Context Type
68
68
  * @param appIdentifier - The App Identifier
69
69
  */
70
- raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
70
+ raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
71
71
  /**
72
72
  * Broadcasts the given Context from the given Row Node
73
73
  * @param rowNode - The Row Node
74
74
  * @param contextType - The FDC3 Context Type
75
75
  */
76
- broadcastFromRow(rowNode: IRowNode, contextType: Fdc3ContextType | Fdc3CustomContextType): Promise<void>;
76
+ broadcastFromRow(rowNode: IRowNode, contextType: Fdc3ContextType): Promise<void>;
77
77
  /**
78
78
  * Broadcasts the given Context from the given Row Node with the given Primary Key Value
79
79
  * @param primaryKeyValue - The Primary Key Value
80
80
  * @param contextType - The FDC3 Context Type
81
81
  */
82
- broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType | Fdc3CustomContextType): Promise<void> | undefined;
82
+ broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType): Promise<void> | undefined;
83
83
  /**
84
84
  * Checks if the given Context Type is a FDC3 standard Context Type
85
85
  */
@@ -4,24 +4,24 @@ import { ApiBase } from './ApiBase';
4
4
  import { Fdc3Api } from '../Fdc3Api';
5
5
  import { Fdc3InternalApi } from '../Internal/Fdc3InternalApi';
6
6
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
7
- import { Fdc3Context, Fdc3ContextType } from '../../PredefinedConfig/Common/Fdc3Context';
8
- import { Fdc3IntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
7
+ import { Fdc3Context, Fdc3StandardContextType } from '../../PredefinedConfig/Common/Fdc3Context';
8
+ import { Fdc3StandardIntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
9
9
  import { AppIdentifier } from '@finos/fdc3/dist/api/AppIdentifier';
10
10
  export declare class Fdc3ApiImpl extends ApiBase implements Fdc3Api {
11
11
  internalApi: Fdc3InternalApi;
12
12
  constructor(adaptable: IAdaptable);
13
13
  getDesktopAgent(): DesktopAgent;
14
- buildContextDataFromRow(contextType: Fdc3ContextType, rowNode: IRowNode): Fdc3Context;
15
- buildContextDataForPrimaryKey(contextType: Fdc3ContextType, primaryKeyValue: string | number): Fdc3Context | undefined;
16
- getPossibleContextTypes(intent: Fdc3IntentType): Fdc3ContextType[];
17
- isContextCompatibleWithIntent(contextType: Fdc3ContextType, intent: Fdc3IntentType): boolean;
18
- raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Fdc3IntentType, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
19
- raiseIntentFromRow(rowNode: IRowNode, intent: Fdc3IntentType, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
20
- raiseIntentForContextFromRow(rowNode: IRowNode, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
21
- raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
22
- broadcastFromRow(rowNode: IRowNode, contextType: Fdc3ContextType): Promise<void>;
23
- broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType): Promise<void> | undefined;
24
- getContextLabel(contextType: Fdc3ContextType): string;
14
+ buildContextDataFromRow(contextType: Fdc3StandardContextType, rowNode: IRowNode): Fdc3Context;
15
+ buildContextDataForPrimaryKey(contextType: Fdc3StandardContextType, primaryKeyValue: string | number): Fdc3Context | undefined;
16
+ getPossibleContextTypes(intent: Fdc3StandardIntentType): Fdc3StandardContextType[];
17
+ isContextCompatibleWithIntent(contextType: Fdc3StandardContextType, intent: Fdc3StandardIntentType): boolean;
18
+ raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Fdc3StandardIntentType, contextType: Fdc3StandardContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
19
+ raiseIntentFromRow(rowNode: IRowNode, intent: Fdc3StandardIntentType, contextType: Fdc3StandardContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
20
+ raiseIntentForContextFromRow(rowNode: IRowNode, contextType: Fdc3StandardContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
21
+ raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3StandardContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
22
+ broadcastFromRow(rowNode: IRowNode, contextType: Fdc3StandardContextType): Promise<void>;
23
+ broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3StandardContextType): Promise<void> | undefined;
24
+ getContextLabel(contextType: Fdc3StandardContextType): string;
25
25
  isStandardContextType(contextType: string): boolean;
26
26
  isStandardIntentType(intentType: string): boolean;
27
27
  private getFdc3Service;
@@ -1,27 +1,27 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
- import { Fdc3Context, Fdc3ContextType, Fdc3CustomContextType } from '../../PredefinedConfig/Common/Fdc3Context';
2
+ import { Fdc3ContextType, Fdc3Context, Fdc3StandardContextType } from '../../PredefinedConfig/Common/Fdc3Context';
3
3
  import { ColDef, IRowNode } from '@ag-grid-community/core';
4
4
  import { AppIdentifier, Context, IntentResolution } from '@finos/fdc3';
5
5
  import { BroadcastConfig, RaiseIntentConfig } from '../../AdaptableOptions/Fdc3Options';
6
- import { Fdc3CustomIntentType, Fdc3IntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
6
+ import { Fdc3IntentType, Fdc3StandardIntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
7
7
  import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
8
8
  import { ActionColumnContext } from '../../AdaptableOptions/ActionColumnOptions';
9
9
  declare type WithContext<K> = K & {
10
- contextType: Fdc3ContextType | Fdc3CustomContextType;
10
+ contextType: Fdc3ContextType;
11
11
  };
12
12
  declare type WithIntent<K> = K & {
13
- intentType: Fdc3IntentType | Fdc3CustomIntentType;
13
+ intentType: Fdc3IntentType;
14
14
  };
15
15
  export declare class Fdc3InternalApi extends ApiBase {
16
- mapRowToContextData(contextType: Fdc3ContextType | Fdc3CustomContextType, rowNode: IRowNode): Fdc3Context;
16
+ mapRowToContextData(contextType: Fdc3ContextType, rowNode: IRowNode): Fdc3Context;
17
17
  getFdc3ActionColDefs(): ColDef[];
18
18
  getButtonsForFdc3MainActionColumn(): AdaptableButton<ActionColumnContext<any>>[];
19
19
  getButtonsForFdc3StandaloneActionColumn(columnId: string): AdaptableButton<ActionColumnContext<any>>[];
20
20
  isFdc3MainActionColumn(columnId: string): boolean;
21
21
  isFdc3StandaloneActionColumn(columnId: string, columnType: string | string[]): boolean;
22
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;
23
+ isStandardContextType(contextType: string): contextType is Fdc3StandardContextType;
24
+ isStandardIntentType(intentType: string): intentType is Fdc3StandardIntentType;
25
25
  getAllRaiseIntentConfigs(): WithIntent<RaiseIntentConfig>[];
26
26
  getAllBroadcastContextConfigs(): WithContext<BroadcastConfig>[];
27
27
  private mapRowValueToContextData;
@@ -145,15 +145,15 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
145
145
  return types.includes(GeneralConstants_1.AB_FDC3_COLUMN) && !this.isFdc3MainActionColumn(columnId);
146
146
  }
147
147
  handleIntentResolution(intentResolution, context, raisedIntent, app) {
148
- var _a;
148
+ var _a, _b;
149
149
  const relevantRaiseIntentConfig = this.getAllRaiseIntentConfigs().find((config) => config.intentType === raisedIntent && config.contextType === context.type);
150
150
  if (typeof (relevantRaiseIntentConfig === null || relevantRaiseIntentConfig === void 0 ? void 0 : relevantRaiseIntentConfig.handleIntentResolution) === 'function') {
151
151
  // call intent specific resolution handler
152
152
  relevantRaiseIntentConfig.handleIntentResolution(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { intentResolution }));
153
153
  }
154
154
  else {
155
- // call global resolution handler
156
- (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.handleIntentResolution(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { intentResolution }));
155
+ // call global resolution handler (if any)
156
+ (_b = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.handleIntentResolution) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { intentResolution }));
157
157
  }
158
158
  }
159
159
  isStandardContextType(contextType) {
@@ -1,9 +1,10 @@
1
1
  import { Chart, ChatInitSettings, Contact, ContactList, Context, Country, Currency, Email, Instrument, InstrumentList, Nothing, Organization, Portfolio, Position, TimeRange, Valuation, ContextTypes } from '@finos/fdc3';
2
2
  /**
3
- * FDC3 (2.0) Context Types supported by AdapTable
3
+ * FDC3 (2.0) Standard Context Types supported by AdapTable
4
4
  */
5
- export declare type Fdc3ContextType = ChartContextType | ChatInitSettingsContextType | ContactContextType | ContactListContextType | CountryContextType | CurrencyContextType | EmailContextType | InstrumentContextType | InstrumentListContextType | OrganizationContextType | PortfolioContextType | PositionContextType | TimeRangeContextType | ValuationContextType | NothingContextType;
5
+ export declare type Fdc3StandardContextType = ChartContextType | ChatInitSettingsContextType | ContactContextType | ContactListContextType | CountryContextType | CurrencyContextType | EmailContextType | InstrumentContextType | InstrumentListContextType | OrganizationContextType | PortfolioContextType | PositionContextType | TimeRangeContextType | ValuationContextType | NothingContextType;
6
6
  export declare type Fdc3CustomContextType = string;
7
+ export declare type Fdc3ContextType = Fdc3StandardContextType | Fdc3CustomContextType;
7
8
  export declare const ChartContextKey = "fdc3.chart";
8
9
  export declare type ChartContextType = typeof ChartContextKey;
9
10
  export declare const ChatInitSettingsContextKey = "fdc3.chat.initSettings";
@@ -37,9 +38,16 @@ export declare type NothingContextType = typeof NothingContextKey;
37
38
  /**
38
39
  * FDC3 (2.0) Contexts
39
40
  */
40
- export declare type Fdc3Context = ChartContext | ChatInitSettingsContext | ContactContext | ContactListContext | CountryContext | CurrencyContext | EmailContext | InstrumentContext | InstrumentListContext | OrganizationContext | PortfolioContext | PositionContext | TimeRangeContext | ValuationContext | NothingContext;
41
+ export declare type Fdc3StandardContext = ChartContext | ChatInitSettingsContext | ContactContext | ContactListContext | CountryContext | CurrencyContext | EmailContext | InstrumentContext | InstrumentListContext | OrganizationContext | PortfolioContext | PositionContext | TimeRangeContext | ValuationContext | NothingContext;
42
+ /**
43
+ * FDC3 (2.0) Custom Context
44
+ */
41
45
  export declare type Fdc3CustomContext = Context;
42
- export declare type TypedFdc3Context<CONTEXT, TYPE extends Fdc3ContextType> = CONTEXT & {
46
+ /**
47
+ * FDC3 (2.0) Generic Context (Standard or Custom)
48
+ */
49
+ export declare type Fdc3Context = Fdc3StandardContext | Fdc3CustomContext;
50
+ export declare type TypedFdc3Context<CONTEXT, TYPE extends Fdc3StandardContextType> = CONTEXT & {
43
51
  type: TYPE;
44
52
  };
45
53
  export declare type ChartContext = TypedFdc3Context<Chart, ContextTypes.Chart>;
@@ -57,5 +65,5 @@ export declare type PositionContext = TypedFdc3Context<Position, ContextTypes.Po
57
65
  export declare type TimeRangeContext = TypedFdc3Context<TimeRange, ContextTypes.TimeRange>;
58
66
  export declare type ValuationContext = TypedFdc3Context<Valuation, ContextTypes.Valuation>;
59
67
  export declare type NothingContext = TypedFdc3Context<Nothing, ContextTypes.Nothing>;
60
- export declare const ContextLabels: Record<Fdc3ContextType, string>;
61
- export declare const StandardContextTypes: Fdc3ContextType[];
68
+ export declare const ContextLabels: Record<Fdc3StandardContextType, string>;
69
+ export declare const StandardContextTypes: Fdc3StandardContextType[];
@@ -60,12 +60,16 @@ export declare const Fdc3StandardIntents: ("StartCall" | "StartChat" | "StartEma
60
60
  /**
61
61
  * All FDC3 standard intents
62
62
  */
63
- export declare type Fdc3IntentType = typeof Fdc3StandardIntents[number];
63
+ export declare type Fdc3StandardIntentType = typeof Fdc3StandardIntents[number];
64
64
  /**
65
65
  * Custom FDC3 intent
66
66
  */
67
67
  export declare type Fdc3CustomIntentType = string;
68
+ /**
69
+ * Generic FDC3 intent (standard or custom)
70
+ */
71
+ export declare type Fdc3IntentType = Fdc3StandardIntentType | Fdc3CustomIntentType;
68
72
  /**
69
73
  * Valid context for a given FDC3 intent
70
74
  */
71
- export declare type CompatibleContext<F extends Fdc3IntentType> = typeof Fdc3IntentConfiguration[F]['contexts'][number];
75
+ export declare type CompatibleContext<F extends Fdc3StandardIntentType> = typeof Fdc3IntentConfiguration[F]['contexts'][number];
@@ -15,6 +15,7 @@ export declare class Fdc3Service implements IAdaptableService {
15
15
  raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
16
16
  broadcast(context: Context): Promise<void>;
17
17
  private logFdc3Event;
18
+ private logFdc3Error;
18
19
  private getFdc3Api;
19
20
  private getFdc3Options;
20
21
  }
@@ -47,7 +47,7 @@ class Fdc3Service {
47
47
  getDesktopAgent() {
48
48
  if (globalThis.fdc3 == null && !this.loggedAgentError) {
49
49
  this.loggedAgentError = true;
50
- this.adaptableApi.logError('FDC3 Desktop Agent not found. This should be provided by the wrapper application.');
50
+ this.adaptableApi.consoleError('FDC3 Desktop Agent not found. This should be provided by the wrapper application.');
51
51
  }
52
52
  return globalThis.fdc3;
53
53
  }
@@ -59,28 +59,43 @@ class Fdc3Service {
59
59
  if (!this.getDesktopAgent()) {
60
60
  return;
61
61
  }
62
- this.logFdc3Event('OUT', `raise ${intent}`, JSON.stringify(context));
63
- const intentResolution = await this.getDesktopAgent().raiseIntent(intent, context, app);
64
- this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
65
- this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, intent, app);
66
- return intentResolution;
62
+ try {
63
+ this.logFdc3Event('OUT', `raise ${intent}`, JSON.stringify(context));
64
+ const intentResolution = await this.getDesktopAgent().raiseIntent(intent, context, app);
65
+ this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
66
+ this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, intent, app);
67
+ return intentResolution;
68
+ }
69
+ catch (error) {
70
+ this.logFdc3Error(error);
71
+ }
67
72
  }
68
73
  async raiseIntentForContext(context, app) {
69
74
  if (!this.getDesktopAgent()) {
70
75
  return;
71
76
  }
72
- this.logFdc3Event('OUT', `raise for context`, JSON.stringify(context));
73
- const intentResolution = await this.getDesktopAgent().raiseIntentForContext(context, app);
74
- this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
75
- this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, null, app);
76
- return intentResolution;
77
+ try {
78
+ this.logFdc3Event('OUT', `raise for context`, JSON.stringify(context));
79
+ const intentResolution = await this.getDesktopAgent().raiseIntentForContext(context, app);
80
+ this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
81
+ this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, null, app);
82
+ return intentResolution;
83
+ }
84
+ catch (error) {
85
+ this.logFdc3Error(error);
86
+ }
77
87
  }
78
88
  broadcast(context) {
79
89
  if (!this.getDesktopAgent()) {
80
90
  return;
81
91
  }
82
- this.logFdc3Event('OUT', `broadcast`, JSON.stringify(context));
83
- return this.getDesktopAgent().broadcast(context);
92
+ try {
93
+ this.logFdc3Event('OUT', `broadcast`, JSON.stringify(context));
94
+ return this.getDesktopAgent().broadcast(context);
95
+ }
96
+ catch (error) {
97
+ this.logFdc3Error(error);
98
+ }
84
99
  }
85
100
  logFdc3Event(type, ...params) {
86
101
  if (!this.getFdc3Options().enableLogging) {
@@ -90,6 +105,10 @@ class Fdc3Service {
90
105
  .getAdaptableInstance()
91
106
  .logger.consoleLog(`FDC3::${type} - `, params.join(' : '));
92
107
  }
108
+ logFdc3Error(error) {
109
+ this.adaptableApi.consoleError(`FDC3 error`, error);
110
+ this.adaptableApi.alertApi.showAlertError('FDC3 Error', 'See console for details');
111
+ }
93
112
  getFdc3Api() {
94
113
  return this.adaptableApi.fdc3Api;
95
114
  }
@@ -53,8 +53,8 @@ class MetamodelService {
53
53
  validationErrors.push('gridOptions was removed from AdapTable Options in Version 16 and is no longer used');
54
54
  return;
55
55
  }
56
- if (optionKey === '_gridOptions') {
57
- // gridOptions is a special case as it's NOT a public property, but we set and use it internally
56
+ if (optionKey === '_gridOptions' || optionKey === 'fdc3Options') {
57
+ // skip special cases
58
58
  return;
59
59
  }
60
60
  const optionMetamodel = (_a = optionsObjectMetamodel === null || optionsObjectMetamodel === void 0 ? void 0 : optionsObjectMetamodel.props) === null || _a === void 0 ? void 0 : _a.find((metamodelProperty) => metamodelProperty.name === optionKey);
@@ -2656,19 +2656,19 @@ export declare const ADAPTABLE_METAMODEL: {
2656
2656
  name: string;
2657
2657
  kind: string;
2658
2658
  desc: string;
2659
+ ref: string;
2659
2660
  isOpt?: undefined;
2660
- ref?: undefined;
2661
2661
  } | {
2662
2662
  name: string;
2663
2663
  kind: string;
2664
2664
  desc: string;
2665
2665
  isOpt: boolean;
2666
- ref?: undefined;
2666
+ ref: string;
2667
2667
  } | {
2668
2668
  name: string;
2669
2669
  kind: string;
2670
2670
  desc: string;
2671
- ref: string;
2671
+ ref?: undefined;
2672
2672
  isOpt?: undefined;
2673
2673
  })[];
2674
2674
  };
@@ -2677,7 +2677,7 @@ export declare const ADAPTABLE_METAMODEL: {
2677
2677
  kind: string;
2678
2678
  desc: string;
2679
2679
  };
2680
- Fdc3ContextType: {
2680
+ Fdc3CustomContext: {
2681
2681
  name: string;
2682
2682
  kind: string;
2683
2683
  desc: string;
@@ -2719,6 +2719,16 @@ export declare const ADAPTABLE_METAMODEL: {
2719
2719
  ref?: undefined;
2720
2720
  })[];
2721
2721
  };
2722
+ Fdc3StandardContextType: {
2723
+ name: string;
2724
+ kind: string;
2725
+ desc: string;
2726
+ };
2727
+ Fdc3StandardIntentType: {
2728
+ name: string;
2729
+ kind: string;
2730
+ desc: string;
2731
+ };
2722
2732
  FilterActionOnDataChange: {
2723
2733
  name: string;
2724
2734
  kind: string;
@@ -3282,6 +3292,7 @@ export declare const ADAPTABLE_METAMODEL: {
3282
3292
  name: string;
3283
3293
  kind: string;
3284
3294
  desc: string;
3295
+ ref: string;
3285
3296
  }[];
3286
3297
  };
3287
3298
  HandleFdc3IntentResolutionContext: {
@@ -4065,14 +4076,14 @@ export declare const ADAPTABLE_METAMODEL: {
4065
4076
  name: string;
4066
4077
  kind: string;
4067
4078
  desc: string;
4079
+ ref: string;
4068
4080
  isOpt?: undefined;
4069
- ref?: undefined;
4070
4081
  } | {
4071
4082
  name: string;
4072
4083
  kind: string;
4073
4084
  desc: string;
4074
- ref: string;
4075
4085
  isOpt?: undefined;
4086
+ ref?: undefined;
4076
4087
  })[];
4077
4088
  };
4078
4089
  RowHighlightInfo: {