@adaptabletools/adaptable 16.0.3-canary.3 → 16.0.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.3",
3
+ "version": "16.0.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: 1692804275971;
1
+ declare const _default: 1692820717271;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1692804275971;
3
+ exports.default = 1692820717271;
@@ -1,4 +1,4 @@
1
- import { ChartContext, ChatInitSettingsContext, ContactContext, ContactListContext, CountryContext, CurrencyContext, EmailContext, Fdc3Context, Fdc3ContextType, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext, TimeRangeContext, ValuationContext } from '../PredefinedConfig/Common/Fdc3Context';
1
+ import { ChartContext, ChatInitSettingsContext, ContactContext, ContactListContext, CountryContext, CurrencyContext, EmailContext, Fdc3Context, Fdc3ContextType, Fdc3StandardContextType, 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
4
  import { Context, ContextMetadata, IntentResolution, IntentResult } from '@finos/fdc3';
@@ -65,6 +65,20 @@ export interface Fdc3Options {
65
65
  * Customises FDC3 Actions column
66
66
  */
67
67
  actionColumnDefaultConfiguration?: ActionColumnDefaultConfiguration;
68
+ /**
69
+ * Customises FDC3 UI Controls
70
+ */
71
+ uiControlsDefaultConfiguration?: {
72
+ contexts?: {
73
+ [contextName in Fdc3StandardContextType]?: UIControlConfig;
74
+ };
75
+ intents?: {
76
+ [intentName in Fdc3StandardIntentType]?: UIControlConfig;
77
+ };
78
+ };
79
+ }
80
+ export interface UIControlConfig {
81
+ icon?: AdaptableIcon;
68
82
  }
69
83
  /**
70
84
  * Default configuration to use for an FDC3 ACtion Column
@@ -219,7 +233,14 @@ export interface RaiseIntentConfig<K extends Fdc3StandardIntentType = any> {
219
233
  * Columns to display a 'Raise Intent' Context Menu item
220
234
  */
221
235
  contextMenu?: {
236
+ /**
237
+ * Columns to display a 'Raise Intent' Context Menu item
238
+ */
222
239
  columnIds: string[];
240
+ /**
241
+ * Menu Item's Icon; can be an AdaptableIcon or function that provides `AdaptableIcon` object
242
+ */
243
+ icon?: '_defaultFdc3' | AdaptableIcon;
223
244
  };
224
245
  /**
225
246
  * Definition of Action Button (to be put in default FDC3 Action Column)
@@ -247,7 +268,14 @@ export interface BroadcastConfig {
247
268
  * Columns to display a 'Broadcast' Context Menu item
248
269
  */
249
270
  contextMenu?: {
271
+ /**
272
+ * Columns to display a 'Broadcast' Context Menu item
273
+ */
250
274
  columnIds: string[];
275
+ /**
276
+ * Menu Item's Icon; can be an AdaptableIcon or function that provides `AdaptableIcon` object
277
+ */
278
+ icon?: '_defaultFdc3' | AdaptableIcon;
251
279
  };
252
280
  /**
253
281
  * Definition of Action Button (to be put in default FDC3 Action Column)
@@ -69,8 +69,8 @@ class Fdc3ApiImpl extends ApiBase_1.ApiBase {
69
69
  return this.broadcastFromRow(rowNode, contextType);
70
70
  }
71
71
  getContextLabel(contextType) {
72
- var _a;
73
- return (_a = Fdc3Context_1.ContextLabels[contextType]) !== null && _a !== void 0 ? _a : contextType;
72
+ var _a, _b;
73
+ return (_b = (_a = Fdc3Context_1.ContextConfiguration[contextType]) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : contextType;
74
74
  }
75
75
  isStandardContextType(contextType) {
76
76
  return this.internalApi.isStandardContextType(contextType);
@@ -6,10 +6,11 @@ import { BroadcastConfig, RaiseIntentConfig } from '../../AdaptableOptions/Fdc3O
6
6
  import { Fdc3IntentType, Fdc3StandardIntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
7
7
  import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
8
8
  import { ActionColumnContext } from '../../AdaptableOptions/ActionColumnOptions';
9
- declare type WithContext<K> = K & {
9
+ import { AdaptableIcon } from '../../PredefinedConfig/Common/AdaptableIcon';
10
+ export declare type WithContext<K> = K & {
10
11
  contextType: Fdc3ContextType;
11
12
  };
12
- declare type WithIntent<K> = K & {
13
+ export declare type WithIntent<K> = K & {
13
14
  intentType: Fdc3IntentType;
14
15
  };
15
16
  export declare class Fdc3InternalApi extends ApiBase {
@@ -24,6 +25,8 @@ export declare class Fdc3InternalApi extends ApiBase {
24
25
  isStandardIntentType(intentType: string): intentType is Fdc3StandardIntentType;
25
26
  getAllRaiseIntentConfigs(): WithIntent<RaiseIntentConfig>[];
26
27
  getAllBroadcastContextConfigs(): WithContext<BroadcastConfig>[];
28
+ getDefaultIconForIntent(intentType: Fdc3IntentType): AdaptableIcon;
29
+ getDefaultIconForContext(contextType: Fdc3ContextType): AdaptableIcon;
27
30
  private mapRowValueToContextData;
28
31
  private isAtLeastOneActionButtonConfigured;
29
32
  private getIntentConfigsWithActionButtons;
@@ -32,5 +35,5 @@ export declare class Fdc3InternalApi extends ApiBase {
32
35
  private getDefaultFdc3ButtonLabel;
33
36
  private getDefaultFdc3ButtonIcon;
34
37
  private getDefaultFdc3ButtonStyle;
38
+ private getFdc3Service;
35
39
  }
36
- export {};
@@ -202,6 +202,24 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
202
202
  });
203
203
  return result;
204
204
  }
205
+ getDefaultIconForIntent(intentType) {
206
+ var _a, _b;
207
+ const defaultConfig = this.getFdc3Service().getUiControlsDefaultConfiguration();
208
+ // @ts-ignore
209
+ const intentIcon = (_b = (_a = defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.intents[intentType]) === null || _a === void 0 ? void 0 : _a.icon) !== null && _b !== void 0 ? _b : {
210
+ name: 'fdc3',
211
+ };
212
+ return intentIcon;
213
+ }
214
+ getDefaultIconForContext(contextType) {
215
+ var _a, _b;
216
+ const defaultConfig = this.getFdc3Service().getUiControlsDefaultConfiguration();
217
+ // @ts-ignore
218
+ const contextIcon = (_b = (_a = defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.contexts[contextType]) === null || _a === void 0 ? void 0 : _a.icon) !== null && _b !== void 0 ? _b : {
219
+ name: 'fdc3',
220
+ };
221
+ return contextIcon;
222
+ }
205
223
  mapRowValueToContextData(rowNode, contextMapping = {}) {
206
224
  // recursively map the row node values to the context data
207
225
  const mapContext = (obj) => {
@@ -336,10 +354,12 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
336
354
  return '';
337
355
  }
338
356
  getDefaultFdc3ButtonIcon(fdc3Info) {
339
- // TODO AFL: extends with intend&context specific icons
340
- return {
341
- name: 'fdc3',
342
- };
357
+ if (fdc3Info.action === 'raiseIntent') {
358
+ return this.getDefaultIconForIntent(fdc3Info.intent);
359
+ }
360
+ else {
361
+ return this.getDefaultIconForContext(fdc3Info.contextType);
362
+ }
343
363
  }
344
364
  getDefaultFdc3ButtonStyle(fdcInfo) {
345
365
  return {
@@ -347,5 +367,8 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
347
367
  tone: 'neutral',
348
368
  };
349
369
  }
370
+ getFdc3Service() {
371
+ return this.adaptable.Fdc3Service;
372
+ }
350
373
  }
351
374
  exports.Fdc3InternalApi = Fdc3InternalApi;
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
54
54
  /**
55
55
  * All AdapTable System Icon names
56
56
  */
57
- export declare type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold';
57
+ export declare type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold';
@@ -65,5 +65,66 @@ export declare type PositionContext = TypedFdc3Context<Position, ContextTypes.Po
65
65
  export declare type TimeRangeContext = TypedFdc3Context<TimeRange, ContextTypes.TimeRange>;
66
66
  export declare type ValuationContext = TypedFdc3Context<Valuation, ContextTypes.Valuation>;
67
67
  export declare type NothingContext = TypedFdc3Context<Nothing, ContextTypes.Nothing>;
68
- export declare const ContextLabels: Record<Fdc3StandardContextType, string>;
68
+ export declare const ContextConfiguration: {
69
+ readonly "fdc3.chart": {
70
+ readonly label: "Chart";
71
+ readonly icon: "pie-chart";
72
+ };
73
+ readonly "fdc3.chat.initSettings": {
74
+ readonly label: "ChatInitSettings";
75
+ readonly icon: "chat";
76
+ };
77
+ readonly "fdc3.contact": {
78
+ readonly label: "Contact";
79
+ readonly icon: "badge";
80
+ };
81
+ readonly "fdc3.contactList": {
82
+ readonly label: "ContactList";
83
+ readonly icon: "badge";
84
+ };
85
+ readonly "fdc3.country": {
86
+ readonly label: "Country";
87
+ readonly icon: "flag";
88
+ };
89
+ readonly "fdc3.currency": {
90
+ readonly label: "Currency";
91
+ readonly icon: "dollar";
92
+ };
93
+ readonly "fdc3.email": {
94
+ readonly label: "Email";
95
+ readonly icon: "mail";
96
+ };
97
+ readonly "fdc3.instrument": {
98
+ readonly label: "Instrument";
99
+ readonly icon: "fdc3";
100
+ };
101
+ readonly "fdc3.instrumentList": {
102
+ readonly label: "InstrumentList";
103
+ readonly icon: "fdc3";
104
+ };
105
+ readonly "fdc3.organization": {
106
+ readonly label: "Organization";
107
+ readonly icon: "fdc3";
108
+ };
109
+ readonly "fdc3.portfolio": {
110
+ readonly label: "Portfolio";
111
+ readonly icon: "fdc3";
112
+ };
113
+ readonly "fdc3.position": {
114
+ readonly label: "Position";
115
+ readonly icon: "fdc3";
116
+ };
117
+ readonly "fdc3.timerange": {
118
+ readonly label: "TimeRange";
119
+ readonly icon: "date-range";
120
+ };
121
+ readonly "fdc3.valuation": {
122
+ readonly label: "Valuation";
123
+ readonly icon: "fdc3";
124
+ };
125
+ readonly "fdc3.nothing": {
126
+ readonly label: "Nothing";
127
+ readonly icon: "fdc3";
128
+ };
129
+ };
69
130
  export declare const StandardContextTypes: Fdc3StandardContextType[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StandardContextTypes = exports.ContextLabels = exports.NothingContextKey = exports.ValuationContextKey = exports.TimeRangeContextKey = exports.PositionContextKey = exports.PortfolioContextKey = exports.OrganizationContextKey = exports.InstrumentListContextKey = exports.InstrumentContextKey = exports.EmailContextKey = exports.CurrencyContextKey = exports.CountryContextKey = exports.ContactListContextKey = exports.ContactContextKey = exports.ChatInitSettingsContextKey = exports.ChartContextKey = void 0;
3
+ exports.StandardContextTypes = exports.ContextConfiguration = exports.NothingContextKey = exports.ValuationContextKey = exports.TimeRangeContextKey = exports.PositionContextKey = exports.PortfolioContextKey = exports.OrganizationContextKey = exports.InstrumentListContextKey = exports.InstrumentContextKey = exports.EmailContextKey = exports.CurrencyContextKey = exports.CountryContextKey = exports.ContactListContextKey = exports.ContactContextKey = exports.ChatInitSettingsContextKey = exports.ChartContextKey = void 0;
4
4
  exports.ChartContextKey = 'fdc3.chart';
5
5
  exports.ChatInitSettingsContextKey = 'fdc3.chat.initSettings';
6
6
  exports.ContactContextKey = 'fdc3.contact';
@@ -16,21 +16,66 @@ exports.PositionContextKey = 'fdc3.position';
16
16
  exports.TimeRangeContextKey = 'fdc3.timerange';
17
17
  exports.ValuationContextKey = 'fdc3.valuation';
18
18
  exports.NothingContextKey = 'fdc3.nothing';
19
- exports.ContextLabels = {
20
- [exports.ChartContextKey]: 'Chart',
21
- [exports.ChatInitSettingsContextKey]: 'ChatInitSettings',
22
- [exports.ContactContextKey]: 'Contact',
23
- [exports.ContactListContextKey]: 'ContactList',
24
- [exports.CountryContextKey]: 'Country',
25
- [exports.CurrencyContextKey]: 'Currency',
26
- [exports.EmailContextKey]: 'Email',
27
- [exports.InstrumentContextKey]: 'Instrument',
28
- [exports.InstrumentListContextKey]: 'InstrumentList',
29
- [exports.OrganizationContextKey]: 'Organization',
30
- [exports.PortfolioContextKey]: 'Portfolio',
31
- [exports.PositionContextKey]: 'Position',
32
- [exports.TimeRangeContextKey]: 'TimeRange',
33
- [exports.ValuationContextKey]: 'Valuation',
34
- [exports.NothingContextKey]: 'Nothing',
19
+ exports.ContextConfiguration = {
20
+ [exports.ChartContextKey]: {
21
+ label: 'Chart',
22
+ icon: 'pie-chart',
23
+ },
24
+ [exports.ChatInitSettingsContextKey]: {
25
+ label: 'ChatInitSettings',
26
+ icon: 'chat',
27
+ },
28
+ [exports.ContactContextKey]: {
29
+ label: 'Contact',
30
+ icon: 'badge',
31
+ },
32
+ [exports.ContactListContextKey]: {
33
+ label: 'ContactList',
34
+ icon: 'badge',
35
+ },
36
+ [exports.CountryContextKey]: {
37
+ label: 'Country',
38
+ icon: 'flag',
39
+ },
40
+ [exports.CurrencyContextKey]: {
41
+ label: 'Currency',
42
+ icon: 'dollar',
43
+ },
44
+ [exports.EmailContextKey]: {
45
+ label: 'Email',
46
+ icon: 'mail',
47
+ },
48
+ [exports.InstrumentContextKey]: {
49
+ label: 'Instrument',
50
+ icon: 'fdc3',
51
+ },
52
+ [exports.InstrumentListContextKey]: {
53
+ label: 'InstrumentList',
54
+ icon: 'fdc3',
55
+ },
56
+ [exports.OrganizationContextKey]: {
57
+ label: 'Organization',
58
+ icon: 'fdc3',
59
+ },
60
+ [exports.PortfolioContextKey]: {
61
+ label: 'Portfolio',
62
+ icon: 'fdc3',
63
+ },
64
+ [exports.PositionContextKey]: {
65
+ label: 'Position',
66
+ icon: 'fdc3',
67
+ },
68
+ [exports.TimeRangeContextKey]: {
69
+ label: 'TimeRange',
70
+ icon: 'date-range',
71
+ },
72
+ [exports.ValuationContextKey]: {
73
+ label: 'Valuation',
74
+ icon: 'fdc3',
75
+ },
76
+ [exports.NothingContextKey]: {
77
+ label: 'Nothing',
78
+ icon: 'fdc3',
79
+ },
35
80
  };
36
- exports.StandardContextTypes = Object.keys(exports.ContextLabels);
81
+ exports.StandardContextTypes = Object.keys(exports.ContextConfiguration);
@@ -15,45 +15,59 @@ export declare const ViewResearchIntent = "ViewResearch";
15
15
  export declare const Fdc3IntentConfiguration: {
16
16
  readonly StartCall: {
17
17
  readonly contexts: readonly ["fdc3.contact", "fdc3.contactList", "fdc3.nothing"];
18
+ readonly icon: "call";
18
19
  };
19
20
  readonly StartChat: {
20
21
  readonly contexts: readonly ["fdc3.contact", "fdc3.contactList", "fdc3.chat.initSettings", "fdc3.nothing"];
22
+ readonly icon: "chat";
21
23
  };
22
24
  readonly StartEmail: {
23
25
  readonly contexts: readonly ["fdc3.email"];
26
+ readonly icon: "mail";
24
27
  };
25
28
  readonly ViewAnalysis: {
26
29
  readonly contexts: readonly ["fdc3.instrument", "fdc3.organization", "fdc3.portfolio", "fdc3.nothing"];
30
+ readonly icon: "spark-line";
27
31
  };
28
32
  readonly ViewChart: {
29
33
  readonly contexts: readonly ["fdc3.chart", "fdc3.instrument", "fdc3.organization", "fdc3.portfolio", "fdc3.position", "fdc3.nothing"];
34
+ readonly icon: "pie-chart";
30
35
  };
31
36
  readonly ViewContact: {
32
37
  readonly contexts: readonly ["fdc3.contact", "fdc3.nothing"];
38
+ readonly icon: "person";
33
39
  };
34
40
  readonly ViewHoldings: {
35
41
  readonly contexts: readonly ["fdc3.instrument", "fdc3.instrumentList", "fdc3.organization", "fdc3.nothing"];
42
+ readonly icon: "fdc3";
36
43
  };
37
44
  readonly ViewInstrument: {
38
45
  readonly contexts: readonly ["fdc3.instrument", "fdc3.nothing"];
46
+ readonly icon: "fdc3";
39
47
  };
40
48
  readonly ViewInteractions: {
41
49
  readonly contexts: readonly ["fdc3.contact", "fdc3.instrumentList", "fdc3.organization", "fdc3.nothing"];
50
+ readonly icon: "fdc3";
42
51
  };
43
52
  readonly ViewNews: {
44
53
  readonly contexts: readonly ["fdc3.country", "fdc3.instrument", "fdc3.instrumentList", "fdc3.organization", "fdc3.portfolio", "fdc3.nothing"];
54
+ readonly icon: "news";
45
55
  };
46
56
  readonly ViewOrders: {
47
57
  readonly contexts: readonly ["fdc3.contact", "fdc3.instrumentList", "fdc3.organization", "fdc3.nothing"];
58
+ readonly icon: "fdc3";
48
59
  };
49
60
  readonly ViewProfile: {
50
61
  readonly contexts: readonly ["fdc3.contact", "fdc3.organization", "fdc3.nothing"];
62
+ readonly icon: "badge";
51
63
  };
52
64
  readonly ViewQuote: {
53
65
  readonly contexts: readonly ["fdc3.instrument", "fdc3.nothing"];
66
+ readonly icon: "quote";
54
67
  };
55
68
  readonly ViewResearch: {
56
69
  readonly contexts: readonly ["fdc3.contact", "fdc3.instrumentList", "fdc3.organization", "fdc3.nothing"];
70
+ readonly icon: "science";
57
71
  };
58
72
  };
59
73
  export declare const Fdc3StandardIntents: ("StartCall" | "StartChat" | "StartEmail" | "ViewAnalysis" | "ViewChart" | "ViewContact" | "ViewHoldings" | "ViewInstrument" | "ViewInteractions" | "ViewNews" | "ViewOrders" | "ViewProfile" | "ViewQuote" | "ViewResearch")[];
@@ -19,6 +19,7 @@ exports.ViewResearchIntent = 'ViewResearch';
19
19
  exports.Fdc3IntentConfiguration = {
20
20
  [exports.StartCallIntent]: {
21
21
  contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.ContactListContextKey, Fdc3Context_1.NothingContextKey],
22
+ icon: 'call',
22
23
  },
23
24
  [exports.StartChatIntent]: {
24
25
  contexts: [
@@ -27,9 +28,11 @@ exports.Fdc3IntentConfiguration = {
27
28
  Fdc3Context_1.ChatInitSettingsContextKey,
28
29
  Fdc3Context_1.NothingContextKey,
29
30
  ],
31
+ icon: 'chat',
30
32
  },
31
33
  [exports.StartEmailIntent]: {
32
34
  contexts: [Fdc3Context_1.EmailContextKey],
35
+ icon: 'mail',
33
36
  },
34
37
  [exports.ViewAnalysisIntent]: {
35
38
  contexts: [
@@ -38,6 +41,7 @@ exports.Fdc3IntentConfiguration = {
38
41
  Fdc3Context_1.PortfolioContextKey,
39
42
  Fdc3Context_1.NothingContextKey,
40
43
  ],
44
+ icon: 'spark-line',
41
45
  },
42
46
  [exports.ViewChartIntent]: {
43
47
  contexts: [
@@ -48,9 +52,11 @@ exports.Fdc3IntentConfiguration = {
48
52
  Fdc3Context_1.PositionContextKey,
49
53
  Fdc3Context_1.NothingContextKey,
50
54
  ],
55
+ icon: 'pie-chart',
51
56
  },
52
57
  [exports.ViewContactIntent]: {
53
58
  contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.NothingContextKey],
59
+ icon: 'person',
54
60
  },
55
61
  [exports.ViewHoldingsIntent]: {
56
62
  contexts: [
@@ -59,9 +65,11 @@ exports.Fdc3IntentConfiguration = {
59
65
  Fdc3Context_1.OrganizationContextKey,
60
66
  Fdc3Context_1.NothingContextKey,
61
67
  ],
68
+ icon: 'fdc3',
62
69
  },
63
70
  [exports.ViewInstrumentIntent]: {
64
71
  contexts: [Fdc3Context_1.InstrumentContextKey, Fdc3Context_1.NothingContextKey],
72
+ icon: 'fdc3',
65
73
  },
66
74
  [exports.ViewInteractionsIntent]: {
67
75
  contexts: [
@@ -70,6 +78,7 @@ exports.Fdc3IntentConfiguration = {
70
78
  Fdc3Context_1.OrganizationContextKey,
71
79
  Fdc3Context_1.NothingContextKey,
72
80
  ],
81
+ icon: 'fdc3',
73
82
  },
74
83
  [exports.ViewNewsIntent]: {
75
84
  contexts: [
@@ -80,6 +89,7 @@ exports.Fdc3IntentConfiguration = {
80
89
  Fdc3Context_1.PortfolioContextKey,
81
90
  Fdc3Context_1.NothingContextKey,
82
91
  ],
92
+ icon: 'news',
83
93
  },
84
94
  [exports.ViewOrdersIntent]: {
85
95
  contexts: [
@@ -88,12 +98,15 @@ exports.Fdc3IntentConfiguration = {
88
98
  Fdc3Context_1.OrganizationContextKey,
89
99
  Fdc3Context_1.NothingContextKey,
90
100
  ],
101
+ icon: 'fdc3',
91
102
  },
92
103
  [exports.ViewProfileIntent]: {
93
104
  contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.OrganizationContextKey, Fdc3Context_1.NothingContextKey],
105
+ icon: 'badge',
94
106
  },
95
107
  [exports.ViewQuoteIntent]: {
96
108
  contexts: [Fdc3Context_1.InstrumentContextKey, Fdc3Context_1.NothingContextKey],
109
+ icon: 'quote',
97
110
  },
98
111
  [exports.ViewResearchIntent]: {
99
112
  contexts: [
@@ -102,6 +115,7 @@ exports.Fdc3IntentConfiguration = {
102
115
  Fdc3Context_1.OrganizationContextKey,
103
116
  Fdc3Context_1.NothingContextKey,
104
117
  ],
118
+ icon: 'science',
105
119
  },
106
120
  };
107
121
  exports.Fdc3StandardIntents = Object.keys(exports.Fdc3IntentConfiguration);
@@ -19,13 +19,13 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  .internalApi.getAllRaiseIntentConfigs()
20
20
  .filter((raiseIntentConfig) => { var _a; return (_a = raiseIntentConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); })
21
21
  .forEach((raiseIntentConfig) => {
22
- contextMenuItems.push(this.buildRaiseIntentMenuItem(raiseIntentConfig.intentType, raiseIntentConfig.contextType, currentRowNode));
22
+ contextMenuItems.push(this.buildRaiseIntentMenuItem(raiseIntentConfig, currentRowNode));
23
23
  });
24
24
  this.getFdc3Api()
25
25
  .internalApi.getAllBroadcastContextConfigs()
26
26
  .filter((broadcastConfig) => { var _a; return (_a = broadcastConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); })
27
27
  .forEach((broadcastConfig) => {
28
- contextMenuItems.push(this.buildBroadcastMenuItem(broadcastConfig.contextType, currentRowNode));
28
+ contextMenuItems.push(this.buildBroadcastMenuItem(broadcastConfig, currentRowNode));
29
29
  });
30
30
  if (contextMenuItems.length > 1) {
31
31
  const groupMenuItem = {
@@ -38,31 +38,42 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
38
38
  };
39
39
  return [groupMenuItem];
40
40
  }
41
- else if (contextMenuItems.length === 1) {
42
- contextMenuItems[0].icon = {
43
- name: 'fdc3',
44
- };
45
- return contextMenuItems;
46
- }
41
+ return contextMenuItems;
47
42
  }
48
- buildRaiseIntentMenuItem(intent, context, rowNode) {
43
+ buildRaiseIntentMenuItem(intentConfig, rowNode) {
44
+ var _a, _b, _c;
45
+ const { intentType, contextType } = intentConfig;
49
46
  const menuItem = {
50
- label: `Raise ${intent}`,
47
+ label: `Raise ${intentType}`,
51
48
  onClick: () => {
52
- this.getFdc3Api().raiseIntentFromRow(rowNode, intent, context);
49
+ this.getFdc3Api().raiseIntentFromRow(rowNode, intentType, contextType);
53
50
  },
54
51
  isVisible: true,
55
52
  };
53
+ if ((_a = intentConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.icon) {
54
+ const menuItemIcon = ((_b = intentConfig.contextMenu) === null || _b === void 0 ? void 0 : _b.icon) === '_defaultFdc3'
55
+ ? this.getFdc3Api().internalApi.getDefaultIconForContext(contextType)
56
+ : (_c = intentConfig.contextMenu) === null || _c === void 0 ? void 0 : _c.icon;
57
+ menuItem.icon = menuItemIcon;
58
+ }
56
59
  return menuItem;
57
60
  }
58
- buildBroadcastMenuItem(context, rowNode) {
61
+ buildBroadcastMenuItem(contextConfig, rowNode) {
62
+ var _a, _b, _c;
63
+ const { contextType } = contextConfig;
59
64
  const menuItem = {
60
- label: `Broadcast ${this.getFdc3Api().getContextLabel(context)}`,
65
+ label: `Broadcast ${this.getFdc3Api().getContextLabel(contextType)}`,
61
66
  onClick: () => {
62
- this.getFdc3Api().broadcastFromRow(rowNode, context);
67
+ this.getFdc3Api().broadcastFromRow(rowNode, contextType);
63
68
  },
64
69
  isVisible: true,
65
70
  };
71
+ if ((_a = contextConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.icon) {
72
+ const menuItemIcon = ((_b = contextConfig.contextMenu) === null || _b === void 0 ? void 0 : _b.icon) === '_defaultFdc3'
73
+ ? this.getFdc3Api().internalApi.getDefaultIconForContext(contextType)
74
+ : (_c = contextConfig.contextMenu) === null || _c === void 0 ? void 0 : _c.icon;
75
+ menuItem.icon = menuItemIcon;
76
+ }
66
77
  return menuItem;
67
78
  }
68
79
  getFdc3Api() {
@@ -303,5 +303,10 @@ exports.DefaultAdaptableOptions = {
303
303
  resizable: true,
304
304
  movable: false,
305
305
  },
306
+ uiControlsDefaultConfiguration: {
307
+ // default config is set in FDC3 Service, to make it easier to overview
308
+ contexts: {},
309
+ intents: {},
310
+ },
306
311
  },
307
312
  };
@@ -47,6 +47,7 @@ function assignAdaptableOptions(adaptableOptions) {
47
47
  returnedAdaptableOptions.settingsPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.settingsPanelOptions, adaptableOptions.settingsPanelOptions);
48
48
  returnedAdaptableOptions.fdc3Options = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options, adaptableOptions.fdc3Options);
49
49
  returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration, returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration);
50
+ returnedAdaptableOptions.fdc3Options.uiControlsDefaultConfiguration = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options.uiControlsDefaultConfiguration, returnedAdaptableOptions.fdc3Options.uiControlsDefaultConfiguration);
50
51
  const { predefinedConfig } = returnedAdaptableOptions;
51
52
  if (predefinedConfig) {
52
53
  returnedAdaptableOptions.predefinedConfig =
@@ -1,5 +1,6 @@
1
1
  import { IAdaptableService } from './Interface/IAdaptableService';
2
2
  import { AdaptableApi } from '../../Api/AdaptableApi';
3
+ import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
3
4
  import { DesktopAgent, IntentResolution } from '@finos/fdc3';
4
5
  import { Context } from '@finos/fdc3/dist/context/ContextTypes';
5
6
  import { AppIdentifier } from '@finos/fdc3/dist/api/AppIdentifier';
@@ -8,7 +9,9 @@ export declare class Fdc3Service implements IAdaptableService {
8
9
  private contextHandlerSubscriptions;
9
10
  private intentHandlerSubscriptions;
10
11
  loggedAgentError: boolean;
12
+ private uiControlsDefaultConfiguration;
11
13
  constructor(adaptableApi: AdaptableApi);
14
+ getUiControlsDefaultConfiguration(): Fdc3Options['uiControlsDefaultConfiguration'];
12
15
  getDesktopAgent(): DesktopAgent;
13
16
  destroy(): void;
14
17
  raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
@@ -18,4 +21,5 @@ export declare class Fdc3Service implements IAdaptableService {
18
21
  private logFdc3Error;
19
22
  private getFdc3Api;
20
23
  private getFdc3Options;
24
+ private buildUiControlsDefaultConfiguration;
21
25
  }