@adaptabletools/adaptable 16.0.2 → 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.
@@ -2,16 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Fdc3InternalApi = void 0;
4
4
  const ApiBase_1 = require("../Implementation/ApiBase");
5
+ const Fdc3Context_1 = require("../../PredefinedConfig/Common/Fdc3Context");
5
6
  const fdc3_1 = require("@finos/fdc3");
6
7
  const Fdc3Options_1 = require("../../AdaptableOptions/Fdc3Options");
8
+ const Fdc3Intent_1 = require("../../PredefinedConfig/Common/Fdc3Intent");
7
9
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
8
10
  const ActionColumnRenderer_1 = require("../../agGrid/ActionColumnRenderer");
9
11
  class Fdc3InternalApi extends ApiBase_1.ApiBase {
10
12
  mapRowToContextData(contextType, rowNode) {
11
- const contextMappedFromGridData = this.getFdc3Api().isStandardContextType(contextType)
12
- ? // @ts-ignore
13
- this.getMappedContextData(contextType, rowNode)
14
- : { type: contextType };
13
+ var _a, _b, _c;
14
+ if (contextType === fdc3_1.ContextTypes.Nothing) {
15
+ return { type: fdc3_1.ContextTypes.Nothing };
16
+ }
17
+ const mappedContextData = this.mapRowValueToContextData(rowNode, this.isStandardContextType(contextType) && contextType !== fdc3_1.ContextTypes.Nothing
18
+ ? (_a = this.getFdc3Options().gridDataContextMapping) === null || _a === void 0 ? void 0 : _a[contextType]
19
+ : (_c = (_b = this.getFdc3Options().gridDataContextMapping) === null || _b === void 0 ? void 0 : _b.custom) === null || _c === void 0 ? void 0 : _c[contextType]);
20
+ const contextMappedFromGridData = Object.assign({ type: contextType }, mappedContextData);
15
21
  const resolveContextDataFn = this.getFdc3Options().resolveContextData;
16
22
  if (typeof resolveContextDataFn === 'function') {
17
23
  return resolveContextDataFn(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { contextType,
@@ -22,23 +28,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
22
28
  return contextMappedFromGridData;
23
29
  }
24
30
  }
25
- /**
26
- * Computes the context based on the given `Fdc3Options.gridDataContextMapping` and the given `IRowNode`.
27
- */
28
- getMappedContextData(contextType, rowNode) {
29
- var _a;
30
- if (contextType === fdc3_1.ContextTypes.Nothing) {
31
- return { type: fdc3_1.ContextTypes.Nothing };
32
- }
33
- const contextMapping = (_a = this.getFdc3Options().gridDataContextMapping) === null || _a === void 0 ? void 0 : _a[contextType];
34
- if (!contextMapping) {
35
- return { type: contextType };
36
- }
37
- const mappedData = this.mapRowValueToContextData(rowNode, contextMapping);
38
- return Object.assign({ type: contextType }, mappedData);
39
- }
40
31
  getFdc3ActionColDefs() {
41
- var _a, _b, _c, _d;
42
32
  const actionColDefs = [];
43
33
  if (this.isAtLeastOneActionButtonConfigured()) {
44
34
  const actionColumnConfig = this.getFdc3Options().actionColumnDefaultConfiguration;
@@ -81,40 +71,14 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
81
71
  type: [GeneralConstants_1.AB_SPECIAL_COLUMN, GeneralConstants_1.AB_FDC3_COLUMN, 'abColDefObject'],
82
72
  };
83
73
  };
84
- const raiseIntents = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
85
- Object.keys(raiseIntents).forEach((intent) => {
86
- const intentConfigs = raiseIntents[intent];
87
- intentConfigs.forEach((intentConfig) => {
88
- if (!intentConfig.actionColumn) {
89
- return;
90
- }
91
- const intendActionColumnConfig = intentConfig.actionColumn;
92
- actionColDefs.push(buildColDef(intendActionColumnConfig));
93
- });
94
- });
95
- const raiseCustomIntents = ((_b = this.getFdc3Options().customIntents) === null || _b === void 0 ? void 0 : _b.raises) || {};
96
- Object.keys(raiseCustomIntents).forEach((intent) => {
97
- const intentConfigs = raiseCustomIntents[intent];
98
- intentConfigs.forEach((intentConfig) => {
99
- if (!intentConfig.actionColumn) {
100
- return;
101
- }
102
- const intendActionColumnConfig = intentConfig.actionColumn;
103
- actionColDefs.push(buildColDef(intendActionColumnConfig));
104
- });
105
- });
106
- const broadcastContexts = ((_c = this.getFdc3Options().contexts) === null || _c === void 0 ? void 0 : _c.broadcasts) || {};
107
- Object.keys(broadcastContexts).forEach((contextType) => {
108
- const contextConfig = broadcastContexts[contextType];
109
- if (!contextConfig.actionColumn) {
74
+ this.getAllRaiseIntentConfigs().forEach((intentConfig) => {
75
+ if (!intentConfig.actionColumn) {
110
76
  return;
111
77
  }
112
- const contextActionColumnConfig = contextConfig.actionColumn;
113
- actionColDefs.push(buildColDef(contextActionColumnConfig));
78
+ const intendActionColumnConfig = intentConfig.actionColumn;
79
+ actionColDefs.push(buildColDef(intendActionColumnConfig));
114
80
  });
115
- const broadcastCustomContexts = ((_d = this.getFdc3Options().customContexts) === null || _d === void 0 ? void 0 : _d.broadcasts) || {};
116
- Object.keys(broadcastCustomContexts).forEach((contextType) => {
117
- const contextConfig = broadcastCustomContexts[contextType];
81
+ this.getAllBroadcastContextConfigs().forEach((contextConfig) => {
118
82
  if (!contextConfig.actionColumn) {
119
83
  return;
120
84
  }
@@ -126,115 +90,48 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
126
90
  getButtonsForFdc3MainActionColumn() {
127
91
  const buttons = [];
128
92
  const intentButtonConfigs = this.getIntentConfigsWithActionButtons();
129
- Object.keys(intentButtonConfigs).forEach((intent) => {
130
- const intentConfigs = intentButtonConfigs[intent];
131
- intentConfigs.forEach((intentConfig) => {
132
- if (!intentConfig.actionButton) {
133
- return;
134
- }
135
- const intendActionButtonConfig = intentConfig.actionButton;
136
- buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(intendActionButtonConfig, {
137
- action: 'raiseIntent',
138
- intent,
139
- contextType: intentConfig.contextType,
140
- }));
141
- });
142
- });
143
- const intentCustomButtonConfigs = this.getCustomIntentConfigsWithActionButtons();
144
- Object.keys(intentCustomButtonConfigs).forEach((intent) => {
145
- const intentConfigs = intentCustomButtonConfigs[intent];
146
- intentConfigs.forEach((intentConfig) => {
147
- if (!intentConfig.actionButton) {
148
- return;
149
- }
150
- const intendActionButtonConfig = intentConfig.actionButton;
151
- buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(intendActionButtonConfig, {
152
- action: 'raiseIntent',
153
- intent,
154
- contextType: intentConfig.contextType,
155
- }));
156
- });
157
- });
158
- const broadcastButtonConfigs = this.getContextConfigsWithActionButtons();
159
- Object.keys(broadcastButtonConfigs).forEach((contextType) => {
160
- const contextConfig = broadcastButtonConfigs[contextType];
161
- if (!contextConfig.actionButton) {
93
+ intentButtonConfigs.forEach((intentConfig) => {
94
+ if (!intentConfig.actionButton) {
162
95
  return;
163
96
  }
164
- const contextActionButtonConfig = contextConfig.actionButton;
165
- buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(contextActionButtonConfig, {
166
- action: 'broadcastContext',
167
- contextType,
97
+ const intendActionButtonConfig = intentConfig.actionButton;
98
+ buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(intendActionButtonConfig, {
99
+ action: 'raiseIntent',
100
+ intent: intentConfig.intentType,
101
+ contextType: intentConfig.contextType,
168
102
  }));
169
103
  });
170
- const broadcastCustomButtonConfigs = this.getCustomContextConfigsWithActionButtons();
171
- Object.keys(broadcastCustomButtonConfigs).forEach((contextType) => {
172
- const contextConfig = broadcastCustomButtonConfigs[contextType];
104
+ const broadcastButtonConfigs = this.getContextConfigsWithActionButtons();
105
+ broadcastButtonConfigs.forEach((contextConfig) => {
173
106
  if (!contextConfig.actionButton) {
174
107
  return;
175
108
  }
176
109
  const contextActionButtonConfig = contextConfig.actionButton;
177
110
  buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(contextActionButtonConfig, {
178
111
  action: 'broadcastContext',
179
- contextType,
112
+ contextType: contextConfig.contextType,
180
113
  }));
181
114
  });
182
115
  return buttons;
183
116
  }
184
117
  getButtonsForFdc3StandaloneActionColumn(columnId) {
185
- var _a, _b, _c, _d;
186
118
  const buttons = [];
187
- // standard intents
188
- const intentButtonConfigs = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
189
- Object.keys(intentButtonConfigs).forEach((intent) => {
190
- const intentConfigs = intentButtonConfigs[intent];
191
- intentConfigs.forEach((intentConfig) => {
192
- var _a;
193
- if (((_a = intentConfig.actionColumn) === null || _a === void 0 ? void 0 : _a.columnId) === columnId) {
194
- buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(intentConfig.actionColumn.button, {
195
- action: 'raiseIntent',
196
- intent,
197
- contextType: intentConfig.contextType,
198
- }));
199
- }
200
- });
201
- });
202
- // standard contexts
203
- const broadcastButtonConfigs = ((_b = this.getFdc3Options().contexts) === null || _b === void 0 ? void 0 : _b.broadcasts) || {};
204
- Object.keys(broadcastButtonConfigs).forEach((contextType) => {
119
+ this.getAllRaiseIntentConfigs().forEach((intentConfig) => {
205
120
  var _a;
206
- const contextConfig = broadcastButtonConfigs[contextType];
207
- if (((_a = contextConfig.actionColumn) === null || _a === void 0 ? void 0 : _a.columnId) === columnId) {
208
- buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(contextConfig.actionColumn.button, {
209
- action: 'broadcastContext',
210
- contextType,
121
+ if (((_a = intentConfig.actionColumn) === null || _a === void 0 ? void 0 : _a.columnId) === columnId) {
122
+ buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(intentConfig.actionColumn.button, {
123
+ action: 'raiseIntent',
124
+ intent: intentConfig.intentType,
125
+ contextType: intentConfig.contextType,
211
126
  }));
212
127
  }
213
128
  });
214
- // custom intents
215
- const intentCustomButtonConfigs = ((_c = this.getFdc3Options().customIntents) === null || _c === void 0 ? void 0 : _c.raises) || {};
216
- Object.keys(intentCustomButtonConfigs).forEach((intent) => {
217
- const intentConfigs = intentCustomButtonConfigs[intent];
218
- intentConfigs.forEach((intentConfig) => {
219
- var _a;
220
- if (((_a = intentConfig.actionColumn) === null || _a === void 0 ? void 0 : _a.columnId) === columnId) {
221
- buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(intentConfig.actionColumn.button, {
222
- action: 'raiseIntent',
223
- intent,
224
- contextType: intentConfig.contextType,
225
- }));
226
- }
227
- });
228
- });
229
- // custom contexts
230
- const broadcastCustomButtonConfigs = ((_d = this.getFdc3Options().customContexts) === null || _d === void 0 ? void 0 : _d.broadcasts) || {};
231
- Object.keys(broadcastCustomButtonConfigs).forEach((contextType) => {
129
+ this.getAllBroadcastContextConfigs().forEach((contextConfig) => {
232
130
  var _a;
233
- const contextConfig = broadcastCustomButtonConfigs[contextType];
234
131
  if (((_a = contextConfig.actionColumn) === null || _a === void 0 ? void 0 : _a.columnId) === columnId) {
235
132
  buttons.push(this.mapFdc3ButtonConfigToAdaptableButton(contextConfig.actionColumn.button, {
236
133
  action: 'broadcastContext',
237
- contextType,
134
+ contextType: contextConfig.contextType,
238
135
  }));
239
136
  }
240
137
  });
@@ -248,68 +145,59 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
248
145
  return types.includes(GeneralConstants_1.AB_FDC3_COLUMN) && !this.isFdc3MainActionColumn(columnId);
249
146
  }
250
147
  handleIntentResolution(intentResolution, context, raisedIntent, app) {
251
- var _a, _b, _c;
252
- const raiseIntents = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises;
253
- const raiseCustomIntents = (_b = this.getFdc3Options().customIntents) === null || _b === void 0 ? void 0 : _b.raises;
254
- const raiseAllIntents = Object.assign(Object.assign({}, raiseIntents), raiseCustomIntents);
255
- const raiseIntentConfig = raiseAllIntents === null || raiseAllIntents === void 0 ? void 0 : raiseAllIntents[raisedIntent];
256
- if (raiseIntentConfig === null || raiseIntentConfig === void 0 ? void 0 : raiseIntentConfig.length) {
257
- const relevantContextConfig = raiseIntentConfig.find((config) => config.contextType === context.type);
258
- (_c = relevantContextConfig === null || relevantContextConfig === void 0 ? void 0 : relevantContextConfig.handleIntentResolution) === null || _c === void 0 ? void 0 : _c.call(relevantContextConfig, Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { intentResolution }));
148
+ var _a;
149
+ const relevantRaiseIntentConfig = this.getAllRaiseIntentConfigs().find((config) => config.intentType === raisedIntent && config.contextType === context.type);
150
+ if (typeof (relevantRaiseIntentConfig === null || relevantRaiseIntentConfig === void 0 ? void 0 : relevantRaiseIntentConfig.handleIntentResolution) === 'function') {
151
+ // call intent specific resolution handler
152
+ relevantRaiseIntentConfig.handleIntentResolution(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { intentResolution }));
153
+ }
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 }));
259
157
  }
260
158
  }
261
- isAtLeastOneActionButtonConfigured() {
262
- return (!!Object.keys(this.getIntentConfigsWithActionButtons()).length ||
263
- !!Object.keys(this.getContextConfigsWithActionButtons()).length ||
264
- !!Object.keys(this.getCustomIntentConfigsWithActionButtons()).length ||
265
- !!Object.keys(this.getCustomContextConfigsWithActionButtons()).length);
159
+ isStandardContextType(contextType) {
160
+ // @ts-ignore
161
+ return Fdc3Context_1.StandardContextTypes.includes(contextType);
266
162
  }
267
- getIntentConfigsWithActionButtons() {
268
- var _a;
269
- let result = {};
270
- const raiseIntents = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
271
- Object.keys(raiseIntents).forEach((intent) => {
272
- const intentConfigs = raiseIntents[intent];
273
- if (intentConfigs.some((intentConfig) => intentConfig.actionButton)) {
274
- // @ts-ignore
275
- result[intent] = raiseIntents[intent];
276
- }
277
- });
278
- return result;
163
+ isStandardIntentType(intentType) {
164
+ // @ts-ignore
165
+ return Fdc3Intent_1.Fdc3StandardIntents.includes(intentType);
279
166
  }
280
- getCustomIntentConfigsWithActionButtons() {
167
+ getAllRaiseIntentConfigs() {
281
168
  var _a;
282
- let result = {};
283
- const raiseIntents = ((_a = this.getFdc3Options().customIntents) === null || _a === void 0 ? void 0 : _a.raises) || {};
284
- Object.keys(raiseIntents).forEach((intent) => {
285
- const intentConfigs = raiseIntents[intent];
286
- if (intentConfigs.some((intentConfig) => intentConfig.actionButton)) {
287
- // @ts-ignore
288
- result[intent] = raiseIntents[intent];
169
+ const result = [];
170
+ const mapConfig = (intentType, intentConfigs) => intentConfigs.map((intentConfig) => (Object.assign(Object.assign({}, intentConfig), { intentType })));
171
+ const raiseIntentConfiguration = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
172
+ Object.keys(raiseIntentConfiguration).forEach((intentType) => {
173
+ if (intentType === 'custom') {
174
+ const customIntentConfigs = raiseIntentConfiguration[intentType];
175
+ Object.keys(customIntentConfigs).forEach((customIntentType) => {
176
+ result.push(...mapConfig(customIntentType, customIntentConfigs[customIntentType]));
177
+ });
289
178
  }
290
- });
291
- return result;
292
- }
293
- getContextConfigsWithActionButtons() {
294
- var _a;
295
- let result = {};
296
- const broadcastContexts = ((_a = this.getFdc3Options().contexts) === null || _a === void 0 ? void 0 : _a.broadcasts) || {};
297
- Object.keys(broadcastContexts).forEach((contextType) => {
298
- const contextConfig = broadcastContexts[contextType];
299
- if (contextConfig.actionButton) {
300
- result[contextType] = contextConfig;
179
+ else {
180
+ const intentConfigs = raiseIntentConfiguration[intentType];
181
+ result.push(...mapConfig(intentType, intentConfigs));
301
182
  }
302
183
  });
303
184
  return result;
304
185
  }
305
- getCustomContextConfigsWithActionButtons() {
186
+ getAllBroadcastContextConfigs() {
306
187
  var _a;
307
- let result = {};
308
- const broadcastContexts = ((_a = this.getFdc3Options().customContexts) === null || _a === void 0 ? void 0 : _a.broadcasts) || {};
309
- Object.keys(broadcastContexts).forEach((contextType) => {
310
- const contextConfig = broadcastContexts[contextType];
311
- if (contextConfig.actionButton) {
312
- result[contextType] = contextConfig;
188
+ const result = [];
189
+ const mapConfig = (contextType, contextConfig) => (Object.assign(Object.assign({}, contextConfig), { contextType }));
190
+ const broadcastContextConfiguration = ((_a = this.getFdc3Options().contexts) === null || _a === void 0 ? void 0 : _a.broadcasts) || {};
191
+ Object.keys(broadcastContextConfiguration).forEach((contextType) => {
192
+ if (contextType === 'custom') {
193
+ const customContextConfigs = broadcastContextConfiguration[contextType];
194
+ Object.keys(customContextConfigs).forEach((customContextType) => {
195
+ result.push(mapConfig(customContextType, customContextConfigs[customContextType]));
196
+ });
197
+ }
198
+ else {
199
+ const contextConfigs = broadcastContextConfiguration[contextType];
200
+ result.push(mapConfig(contextType, contextConfigs));
313
201
  }
314
202
  });
315
203
  return result;
@@ -350,6 +238,16 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
350
238
  };
351
239
  return mapContext(contextMapping);
352
240
  }
241
+ isAtLeastOneActionButtonConfigured() {
242
+ return (this.getIntentConfigsWithActionButtons().length ||
243
+ this.getContextConfigsWithActionButtons().length);
244
+ }
245
+ getIntentConfigsWithActionButtons() {
246
+ return this.getAllRaiseIntentConfigs().filter((intentConfig) => !!intentConfig.actionButton);
247
+ }
248
+ getContextConfigsWithActionButtons() {
249
+ return this.getAllBroadcastContextConfigs().filter((contextConfig) => !!contextConfig.actionButton);
250
+ }
353
251
  mapFdc3ButtonConfigToAdaptableButton(fdc3AdaptableButton, fdcInfo) {
354
252
  const buildFdc3Context = (context) => {
355
253
  return {
@@ -7,6 +7,5 @@ export declare class Fdc3Module extends AdaptableModuleBase implements IModule {
7
7
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
8
8
  private buildRaiseIntentMenuItem;
9
9
  private buildBroadcastMenuItem;
10
- private getFdc3Options;
11
10
  private getFdc3Api;
12
11
  }
@@ -9,50 +9,23 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
9
9
  super(ModuleConstants.Fdc3ModuleId, ModuleConstants.Fdc3FriendlyName, 'fdc3', null, 'The FDC3 Module - handles the FDC3 integration', api);
10
10
  }
11
11
  addContextMenuItems(menuContext) {
12
- var _a, _b, _c, _d;
13
12
  if (!this.isModuleAvailable()) {
14
13
  return;
15
14
  }
16
15
  const currentColumnId = menuContext.adaptableColumn.columnId;
17
16
  const currentRowNode = menuContext.rowNode;
18
17
  const contextMenuItems = [];
19
- // Raise Intent menu items
20
- // standard intents
21
- const raiseIntents = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
22
- Object.keys(raiseIntents).forEach((intent) => {
23
- const contextConfigs = raiseIntents[intent];
24
- const configsWithMenuItemsForCurrentColumn = contextConfigs.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
25
- configsWithMenuItemsForCurrentColumn.forEach((raiseContextConfig) => {
26
- contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.contextType, currentRowNode));
27
- });
18
+ this.getFdc3Api()
19
+ .internalApi.getAllRaiseIntentConfigs()
20
+ .filter((raiseIntentConfig) => { var _a; return (_a = raiseIntentConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); })
21
+ .forEach((raiseIntentConfig) => {
22
+ contextMenuItems.push(this.buildRaiseIntentMenuItem(raiseIntentConfig.intentType, raiseIntentConfig.contextType, currentRowNode));
28
23
  });
29
- // custom intents
30
- const raiseCustomIntents = ((_b = this.getFdc3Options().customIntents) === null || _b === void 0 ? void 0 : _b.raises) || {};
31
- Object.keys(raiseCustomIntents).forEach((intent) => {
32
- const contextConfigs = raiseCustomIntents[intent];
33
- const configsWithMenuItemsForCurrentColumn = contextConfigs.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
34
- configsWithMenuItemsForCurrentColumn.forEach((raiseContextConfig) => {
35
- contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.contextType, currentRowNode));
36
- });
37
- });
38
- // Broadcast menu items
39
- // standard contexts
40
- const broadcastContext = ((_c = this.getFdc3Options().contexts) === null || _c === void 0 ? void 0 : _c.broadcasts) || {};
41
- Object.keys(broadcastContext).forEach((contextType) => {
42
- var _a;
43
- const config = broadcastContext[contextType];
44
- if ((_a = config === null || config === void 0 ? void 0 : config.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId)) {
45
- contextMenuItems.push(this.buildBroadcastMenuItem(contextType, currentRowNode));
46
- }
47
- });
48
- // custom contexts
49
- const broadcastCustomContext = ((_d = this.getFdc3Options().customContexts) === null || _d === void 0 ? void 0 : _d.broadcasts) || {};
50
- Object.keys(broadcastCustomContext).forEach((contextType) => {
51
- var _a;
52
- const config = broadcastCustomContext[contextType];
53
- if ((_a = config === null || config === void 0 ? void 0 : config.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId)) {
54
- contextMenuItems.push(this.buildBroadcastMenuItem(contextType, currentRowNode));
55
- }
24
+ this.getFdc3Api()
25
+ .internalApi.getAllBroadcastContextConfigs()
26
+ .filter((broadcastConfig) => { var _a; return (_a = broadcastConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); })
27
+ .forEach((broadcastConfig) => {
28
+ contextMenuItems.push(this.buildBroadcastMenuItem(broadcastConfig.contextType, currentRowNode));
56
29
  });
57
30
  if (contextMenuItems.length > 1) {
58
31
  const groupMenuItem = {
@@ -92,9 +65,6 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
92
65
  };
93
66
  return menuItem;
94
67
  }
95
- getFdc3Options() {
96
- return this.api.optionsApi.getFdc3Options();
97
- }
98
68
  getFdc3Api() {
99
69
  return this.api.fdc3Api;
100
70
  }
@@ -9,7 +9,7 @@ exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expre
9
9
  exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-observable`;
10
10
  exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-boolean`;
11
11
  exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-scalar`;
12
- exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-scalar#cumulative-aggregation`;
12
+ exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-cumulative`;
13
13
  exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-predicate`;
14
14
  exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/getting-started-primary-key`;
15
15
  exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
@@ -8,11 +8,9 @@ class Fdc3Service {
8
8
  this.intentHandlerSubscriptions = [];
9
9
  this.loggedAgentError = false;
10
10
  this.adaptableApi.eventApi.on('AdaptableReady', () => {
11
- var _a, _b, _c, _d, _e, _f, _g, _h;
12
- const adaptableHandleIntentFn = this.getFdc3Options().handleIntent;
13
- const listenForStandardIntents = (_b = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.listensFor) !== null && _b !== void 0 ? _b : [];
14
- const listenForCustomIntents = (_d = (_c = this.getFdc3Options().customIntents) === null || _c === void 0 ? void 0 : _c.listensFor) !== null && _d !== void 0 ? _d : [];
15
- const listenForIntents = [...listenForStandardIntents, ...listenForCustomIntents];
11
+ var _a, _b, _c, _d, _e, _f;
12
+ const adaptableHandleIntentFn = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.handleIntent;
13
+ const listenForIntents = (_c = (_b = this.getFdc3Options().intents) === null || _b === void 0 ? void 0 : _b.listensFor) !== null && _c !== void 0 ? _c : [];
16
14
  if (listenForIntents.length) {
17
15
  if (!adaptableHandleIntentFn) {
18
16
  this.adaptableApi.logError(`Following FDC3 Intent Listener(s) have been provided but no 'handleIntent' function has been supplied in the FDC3 Options`, listenForIntents);
@@ -28,10 +26,8 @@ class Fdc3Service {
28
26
  }).then((listener) => this.intentHandlerSubscriptions.push(listener));
29
27
  });
30
28
  }
31
- const adaptableHandleContextFn = this.getFdc3Options().handleContext;
32
- const listenForStandardContexts = (_f = (_e = this.getFdc3Options().contexts) === null || _e === void 0 ? void 0 : _e.listensFor) !== null && _f !== void 0 ? _f : [];
33
- const listenForCustomContexts = (_h = (_g = this.getFdc3Options().customContexts) === null || _g === void 0 ? void 0 : _g.listensFor) !== null && _h !== void 0 ? _h : [];
34
- const listenForContexts = [...listenForStandardContexts, ...listenForCustomContexts];
29
+ const adaptableHandleContextFn = (_d = this.getFdc3Options().contexts) === null || _d === void 0 ? void 0 : _d.handleContext;
30
+ const listenForContexts = (_f = (_e = this.getFdc3Options().contexts) === null || _e === void 0 ? void 0 : _e.listensFor) !== null && _f !== void 0 ? _f : [];
35
31
  if (listenForContexts === null || listenForContexts === void 0 ? void 0 : listenForContexts.length) {
36
32
  if (!adaptableHandleContextFn) {
37
33
  this.adaptableApi.logError(`Following FDC3 Context Listener(s) have been provided but no 'handleContext' function has been supplied in the FDC3 Options`, listenForContexts);
@@ -60,24 +56,31 @@ class Fdc3Service {
60
56
  this.intentHandlerSubscriptions.forEach((subscription) => subscription.unsubscribe());
61
57
  }
62
58
  async raiseIntent(intent, context, app) {
63
- var _a;
59
+ if (!this.getDesktopAgent()) {
60
+ return;
61
+ }
64
62
  this.logFdc3Event('OUT', `raise ${intent}`, JSON.stringify(context));
65
- const intentResolution = await ((_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.raiseIntent(intent, context, app));
63
+ const intentResolution = await this.getDesktopAgent().raiseIntent(intent, context, app);
64
+ this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
66
65
  this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, intent, app);
67
66
  return intentResolution;
68
67
  }
69
68
  async raiseIntentForContext(context, app) {
70
- var _a;
69
+ if (!this.getDesktopAgent()) {
70
+ return;
71
+ }
71
72
  this.logFdc3Event('OUT', `raise for context`, JSON.stringify(context));
72
- const intentResolution = await ((_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.raiseIntentForContext(context, app));
73
- // TODO AFL
74
- // this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, null, app);
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);
75
76
  return intentResolution;
76
77
  }
77
78
  broadcast(context) {
78
- var _a;
79
+ if (!this.getDesktopAgent()) {
80
+ return;
81
+ }
79
82
  this.logFdc3Event('OUT', `broadcast`, JSON.stringify(context));
80
- return (_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.broadcast(context);
83
+ return this.getDesktopAgent().broadcast(context);
81
84
  }
82
85
  logFdc3Event(type, ...params) {
83
86
  if (!this.getFdc3Options().enableLogging) {
@@ -12,7 +12,7 @@ const QuickSearchInput = (props) => {
12
12
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
13
  const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
14
14
  const dispatch = (0, react_redux_1.useDispatch)();
15
- const onRunQuickSearch = (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText));
15
+ const onRunQuickSearch = react_1.default.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)), []);
16
16
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)({
17
17
  QuickSearchText,
18
18
  onRunQuickSearch,
@@ -378,7 +378,6 @@ export declare class Adaptable implements IAdaptable {
378
378
  setColumnSort(columnSorts: ColumnSort[]): void;
379
379
  clearColumnSort(): void;
380
380
  setGridData(dataSource: any[]): void;
381
- setInitialGridData(dataSource: any[]): void;
382
381
  getGridData(): any[];
383
382
  getFilteredData(): any[];
384
383
  updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
@@ -4277,9 +4277,6 @@ class Adaptable {
4277
4277
  this.gridOptions.api.setRowData(dataSource);
4278
4278
  this.updateColumnDataTypeIfRowDataIsEmpty();
4279
4279
  this.updateRowGroupsExpandedState();
4280
- }
4281
- setInitialGridData(dataSource) {
4282
- this.setGridData(dataSource);
4283
4280
  this.setupColumns();
4284
4281
  }
4285
4282
  getGridData() {
@@ -1287,6 +1287,19 @@ export declare const ADAPTABLE_METAMODEL: {
1287
1287
  name: string;
1288
1288
  kind: string;
1289
1289
  desc: string;
1290
+ props: ({
1291
+ name: string;
1292
+ kind: string;
1293
+ desc: string;
1294
+ isOpt: boolean;
1295
+ ref: string;
1296
+ } | {
1297
+ name: string;
1298
+ kind: string;
1299
+ desc: string;
1300
+ isOpt: boolean;
1301
+ ref?: undefined;
1302
+ })[];
1290
1303
  };
1291
1304
  BulkUpdatePermittedValues: {
1292
1305
  name: string;
@@ -3911,6 +3924,25 @@ export declare const ADAPTABLE_METAMODEL: {
3911
3924
  name: string;
3912
3925
  kind: string;
3913
3926
  desc: string;
3927
+ props: ({
3928
+ name: string;
3929
+ kind: string;
3930
+ desc: string;
3931
+ isOpt: boolean;
3932
+ ref: string;
3933
+ } | {
3934
+ name: string;
3935
+ kind: string;
3936
+ desc: string;
3937
+ isOpt: boolean;
3938
+ ref?: undefined;
3939
+ } | {
3940
+ name: string;
3941
+ kind: string;
3942
+ desc: string;
3943
+ isOpt?: undefined;
3944
+ ref?: undefined;
3945
+ })[];
3914
3946
  };
3915
3947
  RangeValueType: {
3916
3948
  name: string;