@adaptabletools/adaptable 16.0.0-canary.4 → 16.0.0-canary.6

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.
Files changed (42) hide show
  1. package/bundle.cjs.js +181 -181
  2. package/package.json +2 -2
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableOptions/Fdc3Options.d.ts +148 -19
  6. package/src/AdaptableOptions/FinancePluginOptions.d.ts +19 -19
  7. package/src/Api/ColumnApi.d.ts +0 -5
  8. package/src/Api/Fdc3Api.d.ts +19 -11
  9. package/src/Api/FinanceApi.d.ts +2 -2
  10. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
  11. package/src/Api/Implementation/ColumnApiImpl.js +0 -3
  12. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +2 -0
  13. package/src/Api/Implementation/Fdc3ApiImpl.js +8 -0
  14. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  15. package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -1
  16. package/src/Api/Internal/AdaptableInternalApi.js +43 -0
  17. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -0
  18. package/src/Api/Internal/ColumnInternalApi.js +4 -0
  19. package/src/Api/Internal/Fdc3InternalApi.d.ts +19 -3
  20. package/src/Api/Internal/Fdc3InternalApi.js +372 -2
  21. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  22. package/src/PredefinedConfig/Common/FDC3Context_DEPR.d.ts +3 -3
  23. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +2 -0
  24. package/src/PredefinedConfig/Common/Fdc3Context.js +6 -5
  25. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +20 -17
  26. package/src/PredefinedConfig/Common/Fdc3Intent.js +45 -13
  27. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  28. package/src/Strategy/Fdc3Module.js +25 -5
  29. package/src/Utilities/Constants/GeneralConstants.d.ts +4 -0
  30. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  31. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -0
  32. package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
  33. package/src/Utilities/Services/Fdc3Service.js +9 -4
  34. package/src/View/Layout/Wizard/sections/Utilities.js +1 -1
  35. package/src/agGrid/ActionColumnRenderer.js +2 -31
  36. package/src/agGrid/Adaptable.js +3 -5
  37. package/src/agGrid/agGridHelper.js +5 -2
  38. package/src/metamodel/adaptable.metamodel.d.ts +116 -3
  39. package/src/metamodel/adaptable.metamodel.js +1 -1
  40. package/src/types.d.ts +4 -3
  41. package/version.d.ts +1 -1
  42. package/version.js +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Fdc3IntentConfiguration = exports.ViewResearchIntent = exports.ViewQuoteIntent = exports.ViewProfileIntent = exports.ViewOrdersIntent = exports.ViewNewsIntent = exports.ViewInteractionsIntent = exports.ViewInstrumentIntent = exports.ViewHoldingsIntent = exports.ViewContactIntent = exports.ViewChartIntent = exports.ViewAnalysisIntent = exports.StartEmailIntent = exports.StartChatIntent = exports.StartCallIntent = void 0;
3
+ exports.Fdc3StandardIntents = exports.Fdc3IntentConfiguration = exports.ViewResearchIntent = exports.ViewQuoteIntent = exports.ViewProfileIntent = exports.ViewOrdersIntent = exports.ViewNewsIntent = exports.ViewInteractionsIntent = exports.ViewInstrumentIntent = exports.ViewHoldingsIntent = exports.ViewContactIntent = exports.ViewChartIntent = exports.ViewAnalysisIntent = exports.StartEmailIntent = exports.StartChatIntent = exports.StartCallIntent = void 0;
4
4
  const Fdc3Context_1 = require("./Fdc3Context");
5
5
  exports.StartCallIntent = 'StartCall';
6
6
  exports.StartChatIntent = 'StartChat';
@@ -18,16 +18,26 @@ exports.ViewQuoteIntent = 'ViewQuote';
18
18
  exports.ViewResearchIntent = 'ViewResearch';
19
19
  exports.Fdc3IntentConfiguration = {
20
20
  [exports.StartCallIntent]: {
21
- contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.ContactListContextKey],
21
+ contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.ContactListContextKey, Fdc3Context_1.NothingContextKey],
22
22
  },
23
23
  [exports.StartChatIntent]: {
24
- contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.ContactListContextKey, Fdc3Context_1.ChatInitSettingsContextKey],
24
+ contexts: [
25
+ Fdc3Context_1.ContactContextKey,
26
+ Fdc3Context_1.ContactListContextKey,
27
+ Fdc3Context_1.ChatInitSettingsContextKey,
28
+ Fdc3Context_1.NothingContextKey,
29
+ ],
25
30
  },
26
31
  [exports.StartEmailIntent]: {
27
32
  contexts: [Fdc3Context_1.EmailContextKey],
28
33
  },
29
34
  [exports.ViewAnalysisIntent]: {
30
- contexts: [Fdc3Context_1.InstrumentContextKey, Fdc3Context_1.OrganizationContextKey, Fdc3Context_1.PortfolioContextKey],
35
+ contexts: [
36
+ Fdc3Context_1.InstrumentContextKey,
37
+ Fdc3Context_1.OrganizationContextKey,
38
+ Fdc3Context_1.PortfolioContextKey,
39
+ Fdc3Context_1.NothingContextKey,
40
+ ],
31
41
  },
32
42
  [exports.ViewChartIntent]: {
33
43
  contexts: [
@@ -36,19 +46,30 @@ exports.Fdc3IntentConfiguration = {
36
46
  Fdc3Context_1.OrganizationContextKey,
37
47
  Fdc3Context_1.PortfolioContextKey,
38
48
  Fdc3Context_1.PositionContextKey,
49
+ Fdc3Context_1.NothingContextKey,
39
50
  ],
40
51
  },
41
52
  [exports.ViewContactIntent]: {
42
- contexts: [Fdc3Context_1.ContactContextKey],
53
+ contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.NothingContextKey],
43
54
  },
44
55
  [exports.ViewHoldingsIntent]: {
45
- contexts: [Fdc3Context_1.InstrumentContextKey, Fdc3Context_1.InstrumentListContextKey, Fdc3Context_1.OrganizationContextKey],
56
+ contexts: [
57
+ Fdc3Context_1.InstrumentContextKey,
58
+ Fdc3Context_1.InstrumentListContextKey,
59
+ Fdc3Context_1.OrganizationContextKey,
60
+ Fdc3Context_1.NothingContextKey,
61
+ ],
46
62
  },
47
63
  [exports.ViewInstrumentIntent]: {
48
- contexts: [Fdc3Context_1.InstrumentContextKey],
64
+ contexts: [Fdc3Context_1.InstrumentContextKey, Fdc3Context_1.NothingContextKey],
49
65
  },
50
66
  [exports.ViewInteractionsIntent]: {
51
- contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.InstrumentListContextKey, Fdc3Context_1.OrganizationContextKey],
67
+ contexts: [
68
+ Fdc3Context_1.ContactContextKey,
69
+ Fdc3Context_1.InstrumentListContextKey,
70
+ Fdc3Context_1.OrganizationContextKey,
71
+ Fdc3Context_1.NothingContextKey,
72
+ ],
52
73
  },
53
74
  [exports.ViewNewsIntent]: {
54
75
  contexts: [
@@ -57,19 +78,30 @@ exports.Fdc3IntentConfiguration = {
57
78
  Fdc3Context_1.InstrumentListContextKey,
58
79
  Fdc3Context_1.OrganizationContextKey,
59
80
  Fdc3Context_1.PortfolioContextKey,
81
+ Fdc3Context_1.NothingContextKey,
60
82
  ],
61
83
  },
62
84
  [exports.ViewOrdersIntent]: {
63
- contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.InstrumentListContextKey, Fdc3Context_1.OrganizationContextKey],
85
+ contexts: [
86
+ Fdc3Context_1.ContactContextKey,
87
+ Fdc3Context_1.InstrumentListContextKey,
88
+ Fdc3Context_1.OrganizationContextKey,
89
+ Fdc3Context_1.NothingContextKey,
90
+ ],
64
91
  },
65
92
  [exports.ViewProfileIntent]: {
66
- contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.OrganizationContextKey],
93
+ contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.OrganizationContextKey, Fdc3Context_1.NothingContextKey],
67
94
  },
68
95
  [exports.ViewQuoteIntent]: {
69
- contexts: [Fdc3Context_1.InstrumentContextKey],
96
+ contexts: [Fdc3Context_1.InstrumentContextKey, Fdc3Context_1.NothingContextKey],
70
97
  },
71
98
  [exports.ViewResearchIntent]: {
72
- contexts: [Fdc3Context_1.ContactContextKey, Fdc3Context_1.InstrumentListContextKey, Fdc3Context_1.OrganizationContextKey],
99
+ contexts: [
100
+ Fdc3Context_1.ContactContextKey,
101
+ Fdc3Context_1.InstrumentListContextKey,
102
+ Fdc3Context_1.OrganizationContextKey,
103
+ Fdc3Context_1.NothingContextKey,
104
+ ],
73
105
  },
74
106
  };
75
- const Fdc3Intents = Object.keys(exports.Fdc3IntentConfiguration);
107
+ exports.Fdc3StandardIntents = Object.keys(exports.Fdc3IntentConfiguration);
@@ -51,4 +51,4 @@ export declare type AdaptableQLModule = 'Alert' | 'CalculatedColumn' | 'Filter'
51
51
  /**
52
52
  * Column Types recognised by AdapTable; to be set in GridOptions
53
53
  */
54
- export declare type AdaptableColumnType = 'abColDefBoolean' | 'abColDefDate' | 'abColDefNumber' | 'abColDefString' | 'abColDefObject' | 'abColDefStringArray' | 'abColDefNumberArray' | 'abColDefTupleNumberArray' | 'abColDefObjectNumberArray' | 'abColDefCustom' | 'abSpecialColumn';
54
+ export declare type AdaptableColumnType = 'abColDefBoolean' | 'abColDefDate' | 'abColDefNumber' | 'abColDefString' | 'abColDefObject' | 'abColDefStringArray' | 'abColDefNumberArray' | 'abColDefTupleNumberArray' | 'abColDefObjectNumberArray' | 'abColDefCustom' | 'abSpecialColumn' | 'abRowActionsColumn' | 'abFdc3Column';
@@ -12,7 +12,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
12
12
  return this.getFdc3Options().enableFdc3;
13
13
  }
14
14
  addContextMenuItems(menuContext) {
15
- var _a, _b;
15
+ var _a, _b, _c, _d;
16
16
  if (!this.isModuleAvailable()) {
17
17
  return;
18
18
  }
@@ -20,16 +20,27 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
20
20
  const currentRowNode = menuContext.rowNode;
21
21
  const contextMenuItems = [];
22
22
  // Raise Intent menu items
23
+ // standard intents
23
24
  const raiseIntents = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
24
25
  Object.keys(raiseIntents).forEach((intent) => {
25
- const contexts = raiseIntents[intent];
26
- const configsWithMenuItemsForCurrentColumn = contexts.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
26
+ const contextConfigs = raiseIntents[intent];
27
+ const configsWithMenuItemsForCurrentColumn = contextConfigs.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
27
28
  configsWithMenuItemsForCurrentColumn.forEach((raiseContextConfig) => {
28
- contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.type, currentRowNode));
29
+ contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.contextType, currentRowNode));
30
+ });
31
+ });
32
+ // custom intents
33
+ const raiseCustomIntents = ((_b = this.getFdc3Options().customIntents) === null || _b === void 0 ? void 0 : _b.raises) || {};
34
+ Object.keys(raiseCustomIntents).forEach((intent) => {
35
+ const contextConfigs = raiseCustomIntents[intent];
36
+ const configsWithMenuItemsForCurrentColumn = contextConfigs.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
37
+ configsWithMenuItemsForCurrentColumn.forEach((raiseContextConfig) => {
38
+ contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.contextType, currentRowNode));
29
39
  });
30
40
  });
31
41
  // Broadcast menu items
32
- const broadcastContext = ((_b = this.getFdc3Options().contexts) === null || _b === void 0 ? void 0 : _b.broadcasts) || {};
42
+ // standard contexts
43
+ const broadcastContext = ((_c = this.getFdc3Options().contexts) === null || _c === void 0 ? void 0 : _c.broadcasts) || {};
33
44
  Object.keys(broadcastContext).forEach((contextType) => {
34
45
  var _a;
35
46
  const config = broadcastContext[contextType];
@@ -37,6 +48,15 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
37
48
  contextMenuItems.push(this.buildBroadcastMenuItem(contextType, currentRowNode));
38
49
  }
39
50
  });
51
+ // custom contexts
52
+ const broadcastCustomContext = ((_d = this.getFdc3Options().customContexts) === null || _d === void 0 ? void 0 : _d.broadcasts) || {};
53
+ Object.keys(broadcastCustomContext).forEach((contextType) => {
54
+ var _a;
55
+ const config = broadcastCustomContext[contextType];
56
+ if ((_a = config === null || config === void 0 ? void 0 : config.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId)) {
57
+ contextMenuItems.push(this.buildBroadcastMenuItem(contextType, currentRowNode));
58
+ }
59
+ });
40
60
  if (contextMenuItems.length > 1) {
41
61
  const groupMenuItem = {
42
62
  label: 'FDC3',
@@ -23,12 +23,16 @@ export declare const FILTER_THROTTLE: 'Always' | 'Never' | 'Throttle';
23
23
  export declare const EMPTY_STRING: string;
24
24
  export declare const EMPTY_ARRAY: any[];
25
25
  export declare const AB_SPECIAL_COLUMN: AdaptableColumnType;
26
+ export declare const AB_ROW_ACTIONS_COLUMN: AdaptableColumnType;
27
+ export declare const AB_FDC3_COLUMN: AdaptableColumnType;
26
28
  export declare const HALF_SECOND: number;
27
29
  export declare const AG_GRID_GROUPED_COLUMN: string;
28
30
  export declare const AG_GRID_PIVOT_COLUMN: string;
29
31
  export declare const AG_GRID_CHART_WINDOW = "AG Grid Window";
30
32
  export declare const ADAPTABLE_ROW_ACTION_BUTTONS = "adaptableRowActionButtons";
31
33
  export declare const ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = "(ActionRowButtons)";
34
+ export declare const ADAPTABLE_FDC3_ACTION_COLUMN = "fdc3ActionColumn";
35
+ export declare const ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = "(FDC3ActionColumn)";
32
36
  export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
33
37
  export declare const SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE: number;
34
38
  export declare const QUICK_SEARCH_DEFAULT_BACK_COLOR: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.SERVER_VALIDATION_MESSAGE_TYPE = exports.SERVER_VALIDATION_HEADER = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
4
- exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = void 0;
3
+ exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.SERVER_VALIDATION_MESSAGE_TYPE = exports.SERVER_VALIDATION_HEADER = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = exports.ADAPTABLE_FDC3_ACTION_COLUMN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_FDC3_COLUMN = exports.AB_ROW_ACTIONS_COLUMN = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
4
+ exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = void 0;
5
5
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
6
6
  const UIHelper_1 = require("../../View/UIHelper");
7
7
  exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
@@ -26,12 +26,16 @@ exports.FILTER_THROTTLE = 'Throttle';
26
26
  exports.EMPTY_STRING = '';
27
27
  exports.EMPTY_ARRAY = [];
28
28
  exports.AB_SPECIAL_COLUMN = 'abSpecialColumn';
29
+ exports.AB_ROW_ACTIONS_COLUMN = 'abRowActionsColumn';
30
+ exports.AB_FDC3_COLUMN = 'abFdc3Column';
29
31
  exports.HALF_SECOND = 500;
30
32
  exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
31
33
  exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
32
34
  exports.AG_GRID_CHART_WINDOW = 'AG Grid Window';
33
35
  exports.ADAPTABLE_ROW_ACTION_BUTTONS = 'adaptableRowActionButtons';
34
36
  exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = '(ActionRowButtons)';
37
+ exports.ADAPTABLE_FDC3_ACTION_COLUMN = 'fdc3ActionColumn';
38
+ exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = '(FDC3ActionColumn)';
35
39
  exports.DEFAULT_DATE_FORMAT_PATTERN = 'dd-MM-yyyy';
36
40
  /*
37
41
  Redux / State Defaults
@@ -297,5 +297,11 @@ exports.DefaultAdaptableOptions = {
297
297
  fdc3Options: {
298
298
  enableFdc3: false,
299
299
  enableLogging: false,
300
+ actionColumnDefaultConfiguration: {
301
+ headerName: 'FDC3 Actions',
302
+ width: 200,
303
+ resizable: true,
304
+ movable: false,
305
+ },
300
306
  },
301
307
  };
@@ -30,8 +30,7 @@ function assignAdaptableOptions(adaptableOptions) {
30
30
  // to do
31
31
  returnedAdaptableOptions.actionRowOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions, adaptableOptions.actionRowOptions);
32
32
  returnedAdaptableOptions.actionRowOptions.actionRowButtonOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowButtonOptions, returnedAdaptableOptions.actionRowOptions.actionRowButtonOptions);
33
- returnedAdaptableOptions.actionRowOptions.actionRowFormOptions =
34
- Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowFormOptions, returnedAdaptableOptions.actionRowOptions.actionRowFormOptions);
33
+ returnedAdaptableOptions.actionRowOptions.actionRowFormOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowFormOptions, returnedAdaptableOptions.actionRowOptions.actionRowFormOptions);
35
34
  returnedAdaptableOptions.containerOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions, adaptableOptions.containerOptions);
36
35
  returnedAdaptableOptions.groupingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.groupingOptions, adaptableOptions.groupingOptions);
37
36
  returnedAdaptableOptions.quickSearchOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.quickSearchOptions, adaptableOptions.quickSearchOptions);
@@ -46,6 +45,8 @@ function assignAdaptableOptions(adaptableOptions) {
46
45
  returnedAdaptableOptions.dataChangeHistoryOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dataChangeHistoryOptions, adaptableOptions.dataChangeHistoryOptions);
47
46
  returnedAdaptableOptions.chartingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.chartingOptions, adaptableOptions.chartingOptions);
48
47
  returnedAdaptableOptions.settingsPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.settingsPanelOptions, adaptableOptions.settingsPanelOptions);
48
+ returnedAdaptableOptions.fdc3Options = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options, adaptableOptions.fdc3Options);
49
+ returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration, returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration);
49
50
  const { predefinedConfig } = returnedAdaptableOptions;
50
51
  if (predefinedConfig) {
51
52
  returnedAdaptableOptions.predefinedConfig =
@@ -8,10 +8,12 @@ class Fdc3Service {
8
8
  this.intentHandlerSubscriptions = [];
9
9
  this.loggedAgentError = false;
10
10
  this.adaptableApi.eventApi.on('AdaptableReady', () => {
11
- var _a, _b;
11
+ var _a, _b, _c, _d, _e, _f, _g, _h;
12
12
  const adaptableHandleIntentFn = this.getFdc3Options().handleIntent;
13
- const listenForIntents = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.listensFor;
14
- if (listenForIntents === null || listenForIntents === void 0 ? void 0 : listenForIntents.length) {
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];
16
+ if (listenForIntents.length) {
15
17
  if (!adaptableHandleIntentFn) {
16
18
  this.adaptableApi.logError(`Following FDC3 Intent Listener(s) have been provided but no 'handleIntent' function has been supplied in the FDC3 Options`, listenForIntents);
17
19
  }
@@ -20,13 +22,16 @@ class Fdc3Service {
20
22
  (_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.addIntentListener(intent, (context, metadata) => {
21
23
  this.logFdc3Event('IN', `Intent`, JSON.stringify(context));
22
24
  const fnContext = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { context,
25
+ intent,
23
26
  metadata });
24
27
  adaptableHandleIntentFn === null || adaptableHandleIntentFn === void 0 ? void 0 : adaptableHandleIntentFn(fnContext);
25
28
  }).then((listener) => this.intentHandlerSubscriptions.push(listener));
26
29
  });
27
30
  }
28
31
  const adaptableHandleContextFn = this.getFdc3Options().handleContext;
29
- const listenForContexts = (_b = this.getFdc3Options().contexts) === null || _b === void 0 ? void 0 : _b.listensFor;
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];
30
35
  if (listenForContexts === null || listenForContexts === void 0 ? void 0 : listenForContexts.length) {
31
36
  if (!adaptableHandleContextFn) {
32
37
  this.adaptableApi.logError(`Following FDC3 Context Listener(s) have been provided but no 'handleContext' function has been supplied in the FDC3 Options`, listenForContexts);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.columnFilter = void 0;
4
- const columnFilter = (column, searchText) => [column.friendlyName, column.columnId].some((candidate) => candidate.toLowerCase().includes(searchText.toLowerCase()));
4
+ const columnFilter = (column, searchText) => [column.friendlyName, column.columnId].some((candidate) => candidate === null || candidate === void 0 ? void 0 : candidate.toLowerCase().includes(searchText.toLowerCase()));
5
5
  exports.columnFilter = columnFilter;
@@ -4,31 +4,8 @@ exports.ActionColumnRenderer = exports.ReactActionColumnRenderer = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const SimpleButton_1 = tslib_1.__importDefault(require("../components/SimpleButton"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
- const uuid_1 = require("../components/utils/uuid");
8
7
  const useRerender_1 = require("../components/utils/useRerender");
9
- const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
10
8
  const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
11
- function getActionButtonsAndActionColumn(adaptable, actionColumn, colId) {
12
- var _a;
13
- const actionCol = colId == GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS
14
- ? actionColumn
15
- : (_a = adaptable.api.actionColumnApi.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colId);
16
- if (actionCol && actionCol.actionColumnButton) {
17
- let actionButtons = Array.isArray(actionCol.actionColumnButton)
18
- ? actionCol.actionColumnButton
19
- : [actionCol.actionColumnButton];
20
- if (!actionButtons.length) {
21
- return;
22
- }
23
- // actionButtons don't have IDs, so we need to generate them to be used later as a react component key
24
- actionButtons = actionButtons.map((actionButton) => (Object.assign(Object.assign({}, actionButton), { Uuid: (0, uuid_1.createUuid)() })));
25
- return { actionButtons, actionColumn: actionCol };
26
- }
27
- return {
28
- actionButtons: [],
29
- actionColumn: actionCol,
30
- };
31
- }
32
9
  const ActionButtons = (props) => {
33
10
  const { buttons, adaptableApi, context, rerender } = props;
34
11
  return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
@@ -60,10 +37,7 @@ const ActionButtons = (props) => {
60
37
  const ReactActionColumnRenderer = (props) => {
61
38
  const rerender = (0, useRerender_1.useRerender)();
62
39
  const adaptable = props.api.__adaptable;
63
- const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, {
64
- columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
65
- actionColumnButton: adaptable.getActionRowButtonDefs(),
66
- }, props.colDef.colId);
40
+ const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(props.colDef);
67
41
  if (!actionColumn || !actionButtons.length) {
68
42
  return null;
69
43
  }
@@ -89,10 +63,7 @@ class ActionColumnRenderer {
89
63
  // gets called once before the renderer is used
90
64
  init(params) {
91
65
  const adaptable = params.api.__adaptable;
92
- const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, {
93
- columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
94
- actionColumnButton: adaptable.getActionRowButtonDefs(),
95
- }, params.colDef.colId);
66
+ const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(params.colDef);
96
67
  if (!actionColumn || !actionButtons.length) {
97
68
  return;
98
69
  }
@@ -2339,6 +2339,7 @@ class Adaptable {
2339
2339
  ...this.getColDefsForActionColumns(),
2340
2340
  ...this.getColDefsForFreeTextColumns(),
2341
2341
  ...this.getColDefsForActionRowColumns(),
2342
+ ...this.api.fdc3Api.internalApi.getFdc3ActionColDefs(),
2342
2343
  ];
2343
2344
  }
2344
2345
  getColDefsForFreeTextColumns() {
@@ -2481,10 +2482,6 @@ class Adaptable {
2481
2482
  if (!actionButtons.length) {
2482
2483
  return [];
2483
2484
  }
2484
- const actionRowColumn = {
2485
- columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
2486
- actionColumnButton: actionButtons,
2487
- };
2488
2485
  return [
2489
2486
  {
2490
2487
  headerName: '',
@@ -3369,7 +3366,8 @@ class Adaptable {
3369
3366
  const hasQuickSearchStyle = quickSearchStyle != undefined;
3370
3367
  const cellStyle = (params) => {
3371
3368
  const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
3372
- const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), this.getFormatColumnAndStyledColumnCellStyle(abColumn, colId, params)), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
3369
+ const userDefined = typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle;
3370
+ const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, userDefined), this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), this.getFormatColumnAndStyledColumnCellStyle(abColumn, colId, params)), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
3373
3371
  return (0, StyleHelper_1.normalizeStyleForAgGrid)(result);
3374
3372
  };
3375
3373
  return cellStyle;
@@ -174,14 +174,17 @@ class agGridHelper {
174
174
  createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups) {
175
175
  const colId = agGridColumn.getColId();
176
176
  const colDef = agGridColumn.getColDef();
177
- const isActionRowButtonColumn = this.adaptable.api.columnApi.isActionRowButtonColumn(colId);
177
+ const isActionRowButtonColumn = this.adaptable.api.columnApi.internalApi.isActionRowButtonColumn(colId);
178
+ const isFdc3MainActionColumn = this.adaptable.api.fdc3Api.internalApi.isFdc3MainActionColumn(colId);
178
179
  const columnFriendlyName = this.adaptable.adaptableOptions.columnOptions.columnFriendlyName;
179
180
  const customFriendlyName = typeof columnFriendlyName === 'function'
180
181
  ? columnFriendlyName({ colId: colId, agColumn: agGridColumn })
181
182
  : null;
182
183
  const friendlyName = customFriendlyName !== null && customFriendlyName !== void 0 ? customFriendlyName : (isActionRowButtonColumn
183
184
  ? GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME
184
- : this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header'));
185
+ : isFdc3MainActionColumn
186
+ ? GeneralConstants_1.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME
187
+ : this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header'));
185
188
  if (!this.initialAgGridColDefs[colId]) {
186
189
  this.initialAgGridColDefs[colId] = Object.assign({}, agGridColumn.getUserProvidedColDef());
187
190
  }
@@ -1939,7 +1939,7 @@ export declare const ADAPTABLE_METAMODEL: {
1939
1939
  kind: string;
1940
1940
  desc: string;
1941
1941
  };
1942
- CustomFDC3Intent: {
1942
+ CustomFDC3Intent_Depr: {
1943
1943
  name: string;
1944
1944
  kind: string;
1945
1945
  desc: string;
@@ -2702,7 +2702,31 @@ export declare const ADAPTABLE_METAMODEL: {
2702
2702
  desc: string;
2703
2703
  }[];
2704
2704
  };
2705
- FDC3Column: {
2705
+ Fdc3ButtonContext: {
2706
+ name: string;
2707
+ kind: string;
2708
+ desc: string;
2709
+ props: ({
2710
+ name: string;
2711
+ kind: string;
2712
+ desc: string;
2713
+ isOpt?: undefined;
2714
+ ref?: undefined;
2715
+ } | {
2716
+ name: string;
2717
+ kind: string;
2718
+ desc: string;
2719
+ isOpt: boolean;
2720
+ ref?: undefined;
2721
+ } | {
2722
+ name: string;
2723
+ kind: string;
2724
+ desc: string;
2725
+ ref: string;
2726
+ isOpt?: undefined;
2727
+ })[];
2728
+ };
2729
+ FDC3Column_Depr: {
2706
2730
  name: string;
2707
2731
  kind: string;
2708
2732
  desc: string;
@@ -2747,6 +2771,11 @@ export declare const ADAPTABLE_METAMODEL: {
2747
2771
  kind: string;
2748
2772
  desc: string;
2749
2773
  };
2774
+ Fdc3CustomIntentType: {
2775
+ name: string;
2776
+ kind: string;
2777
+ desc: string;
2778
+ };
2750
2779
  FDC3DesktopAgent: {
2751
2780
  name: string;
2752
2781
  kind: string;
@@ -2757,7 +2786,7 @@ export declare const ADAPTABLE_METAMODEL: {
2757
2786
  desc: string;
2758
2787
  }[];
2759
2788
  };
2760
- FDC3Intent: {
2789
+ FDC3Intent_Depr: {
2761
2790
  name: string;
2762
2791
  kind: string;
2763
2792
  desc: string;
@@ -2767,6 +2796,33 @@ export declare const ADAPTABLE_METAMODEL: {
2767
2796
  kind: string;
2768
2797
  desc: string;
2769
2798
  };
2799
+ Fdc3Options: {
2800
+ name: string;
2801
+ kind: string;
2802
+ desc: string;
2803
+ props: ({
2804
+ name: string;
2805
+ kind: string;
2806
+ desc: string;
2807
+ isOpt: boolean;
2808
+ defVal?: undefined;
2809
+ ref?: undefined;
2810
+ } | {
2811
+ name: string;
2812
+ kind: string;
2813
+ desc: string;
2814
+ isOpt: boolean;
2815
+ defVal: string;
2816
+ ref?: undefined;
2817
+ } | {
2818
+ name: string;
2819
+ kind: string;
2820
+ desc: string;
2821
+ isOpt: boolean;
2822
+ ref: string;
2823
+ defVal?: undefined;
2824
+ })[];
2825
+ };
2770
2826
  FilterActionOnDataChange: {
2771
2827
  name: string;
2772
2828
  kind: string;
@@ -3245,6 +3301,11 @@ export declare const ADAPTABLE_METAMODEL: {
3245
3301
  isOpt: boolean;
3246
3302
  })[];
3247
3303
  };
3304
+ GridDataContextMapping: {
3305
+ name: string;
3306
+ kind: string;
3307
+ desc: string;
3308
+ };
3248
3309
  GridInfoSection: {
3249
3310
  name: string;
3250
3311
  kind: string;
@@ -3317,6 +3378,34 @@ export declare const ADAPTABLE_METAMODEL: {
3317
3378
  defVal?: undefined;
3318
3379
  })[];
3319
3380
  };
3381
+ HandleFdc3Context: {
3382
+ name: string;
3383
+ kind: string;
3384
+ desc: string;
3385
+ props: ({
3386
+ name: string;
3387
+ kind: string;
3388
+ desc: string;
3389
+ ref: string;
3390
+ isOpt?: undefined;
3391
+ } | {
3392
+ name: string;
3393
+ kind: string;
3394
+ desc: string;
3395
+ isOpt: boolean;
3396
+ ref: string;
3397
+ })[];
3398
+ };
3399
+ HandleFdc3IntentContext: {
3400
+ name: string;
3401
+ kind: string;
3402
+ desc: string;
3403
+ props: {
3404
+ name: string;
3405
+ kind: string;
3406
+ desc: string;
3407
+ }[];
3408
+ };
3320
3409
  IAdaptableNoCodeWizard: {
3321
3410
  name: string;
3322
3411
  kind: string;
@@ -4231,6 +4320,30 @@ export declare const ADAPTABLE_METAMODEL: {
4231
4320
  ref: string;
4232
4321
  })[];
4233
4322
  };
4323
+ ResolveContextDataContext: {
4324
+ name: string;
4325
+ kind: string;
4326
+ desc: string;
4327
+ props: ({
4328
+ name: string;
4329
+ kind: string;
4330
+ desc: string;
4331
+ isOpt: boolean;
4332
+ ref: string;
4333
+ } | {
4334
+ name: string;
4335
+ kind: string;
4336
+ desc: string;
4337
+ isOpt?: undefined;
4338
+ ref?: undefined;
4339
+ } | {
4340
+ name: string;
4341
+ kind: string;
4342
+ desc: string;
4343
+ ref: string;
4344
+ isOpt?: undefined;
4345
+ })[];
4346
+ };
4234
4347
  RowHighlightInfo: {
4235
4348
  name: string;
4236
4349
  kind: string;