@adaptabletools/adaptable 16.0.0-canary.3 → 16.0.0-canary.5

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 (95) hide show
  1. package/README.md +2 -0
  2. package/base.css +31 -23
  3. package/base.css.map +1 -1
  4. package/bundle.cjs.js +184 -184
  5. package/index.css +43 -31
  6. package/index.css.map +1 -1
  7. package/package.json +10 -2
  8. package/publishTimestamp.d.ts +1 -1
  9. package/publishTimestamp.js +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +9 -4
  12. package/src/AdaptableOptions/ColumnOptions.d.ts +1 -10
  13. package/src/AdaptableOptions/Fdc3Options.d.ts +279 -0
  14. package/src/AdaptableOptions/Fdc3Options.js +5 -0
  15. package/src/AdaptableOptions/FinancePluginOptions.d.ts +25 -25
  16. package/src/AdaptableOptions/GroupingOptions.d.ts +8 -0
  17. package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +1 -1
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -6
  19. package/src/Api/AdaptableApi.d.ts +7 -2
  20. package/src/Api/ColumnApi.d.ts +0 -5
  21. package/src/Api/EventApi.d.ts +3 -3
  22. package/src/Api/Events/ThemeChanged.d.ts +0 -6
  23. package/src/Api/Events/ThemeEdited.d.ts +11 -0
  24. package/src/Api/Fdc3Api.d.ts +91 -0
  25. package/src/Api/Fdc3Api.js +2 -0
  26. package/src/Api/FinanceApi.d.ts +13 -13
  27. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  28. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  29. package/src/Api/Implementation/ApiBase.d.ts +4 -0
  30. package/src/Api/Implementation/ApiBase.js +6 -0
  31. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
  32. package/src/Api/Implementation/ColumnApiImpl.js +0 -3
  33. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +28 -0
  34. package/src/Api/Implementation/Fdc3ApiImpl.js +87 -0
  35. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
  36. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  37. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -0
  38. package/src/Api/Implementation/QuickSearchApiImpl.js +7 -0
  39. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  40. package/src/Api/Internal/AdaptableInternalApi.d.ts +11 -4
  41. package/src/Api/Internal/AdaptableInternalApi.js +59 -10
  42. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -0
  43. package/src/Api/Internal/ColumnInternalApi.js +4 -0
  44. package/src/Api/Internal/Fdc3InternalApi.d.ts +27 -0
  45. package/src/Api/Internal/Fdc3InternalApi.js +442 -0
  46. package/src/Api/OptionsApi.d.ts +5 -0
  47. package/src/Api/QuickSearchApi.d.ts +8 -0
  48. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  49. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  50. package/src/PredefinedConfig/Common/{FDC3Context.d.ts → FDC3Context_DEPR.d.ts} +22 -22
  51. package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +2 -0
  52. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +55 -0
  53. package/src/PredefinedConfig/Common/Fdc3Context.js +36 -0
  54. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +71 -0
  55. package/src/PredefinedConfig/Common/Fdc3Intent.js +107 -0
  56. package/src/PredefinedConfig/Common/Types.d.ts +2 -2
  57. package/src/PredefinedConfig/SystemState.d.ts +3 -0
  58. package/src/Redux/ActionsReducers/SystemRedux.d.ts +12 -6
  59. package/src/Redux/ActionsReducers/SystemRedux.js +18 -2
  60. package/src/Redux/Store/AdaptableStore.js +2 -2
  61. package/src/Strategy/Fdc3Module.d.ts +13 -0
  62. package/src/Strategy/Fdc3Module.js +105 -0
  63. package/src/Utilities/Constants/GeneralConstants.d.ts +4 -0
  64. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  65. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  66. package/src/Utilities/Constants/ModuleConstants.js +5 -2
  67. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +11 -1
  68. package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
  69. package/src/Utilities/Services/Fdc3Service.d.ts +20 -0
  70. package/src/Utilities/Services/Fdc3Service.js +92 -0
  71. package/src/View/AdaptableView.js +9 -7
  72. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +9 -0
  73. package/src/View/Layout/Wizard/sections/Utilities.js +1 -1
  74. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.d.ts +2 -0
  75. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +26 -0
  76. package/src/View/QuickSearch/QuickSearchInput.d.ts +6 -0
  77. package/src/View/QuickSearch/QuickSearchInput.js +22 -0
  78. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +2 -5
  79. package/src/View/QuickSearch/QuickSearchViewPanel.js +5 -19
  80. package/src/agGrid/ActionColumnRenderer.js +2 -31
  81. package/src/agGrid/Adaptable.d.ts +2 -0
  82. package/src/agGrid/Adaptable.js +22 -16
  83. package/src/agGrid/agGridHelper.js +7 -2
  84. package/src/components/Drawer/index.d.ts +6 -0
  85. package/src/components/Drawer/index.js +60 -0
  86. package/src/components/ExpressionEditor/index.js +4 -2
  87. package/src/components/icons/fdc3.d.ts +3 -0
  88. package/src/components/icons/fdc3.js +9 -0
  89. package/src/components/icons/index.js +3 -1
  90. package/src/metamodel/adaptable.metamodel.d.ts +161 -19
  91. package/src/metamodel/adaptable.metamodel.js +1 -1
  92. package/src/types.d.ts +8 -4
  93. package/version.d.ts +1 -1
  94. package/version.js +1 -1
  95. /package/src/{PredefinedConfig/Common/FDC3Context.js → Api/Events/ThemeEdited.js} +0 -0
@@ -0,0 +1,91 @@
1
+ import { Fdc3Context, Fdc3ContextType, Fdc3CustomContextType } from '../PredefinedConfig/Common/Fdc3Context';
2
+ import { IRowNode } from '@ag-grid-community/core';
3
+ import { DesktopAgent, IntentResolution, AppIdentifier } from '@finos/fdc3';
4
+ import { Fdc3CustomIntentType, Fdc3IntentType } from '../PredefinedConfig/Common/Fdc3Intent';
5
+ /**
6
+ * Provides run-time access to Alert function and associated State
7
+ */
8
+ export interface Fdc3Api {
9
+ /**
10
+ * Returns the FDC3 Desktop Agent
11
+ */
12
+ getDesktopAgent(): DesktopAgent;
13
+ /**
14
+ * Returns the human-friendly label for the given Context Type
15
+ * @param contextType - The FDC3 Context Type
16
+ */
17
+ getContextLabel(contextType: Fdc3ContextType | Fdc3CustomContextType): string;
18
+ /**
19
+ * Builds FDC3 Context Data based on the given Context Type and Row Node
20
+ * @param contextType - The FDC3 Context Type
21
+ * @param rowNode - The Row Node
22
+ */
23
+ buildContextDataFromRow(contextType: Fdc3ContextType | Fdc3CustomContextType, rowNode: IRowNode): Fdc3Context;
24
+ /**
25
+ * Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value
26
+ * @param contextType - The FDC3 Context Type
27
+ * @param primaryKeyValue - The Primary Key Value
28
+ */
29
+ buildContextDataForPrimaryKey(contextType: Fdc3ContextType | Fdc3CustomContextType, primaryKeyValue: string | number): Fdc3Context | undefined;
30
+ /**
31
+ * Returns the FDC3 Context Type for the given Intent
32
+ * @param intent - The FDC3 Intent
33
+ */
34
+ getPossibleContextTypes(intent: Fdc3IntentType): Fdc3ContextType[];
35
+ /**
36
+ * Checks if the given Context Type is compatible with the given Intent
37
+ * @param contextType - The FDC3 Context Type
38
+ * @param intent - The FDC3 Intent
39
+ */
40
+ isContextCompatibleWithIntent(contextType: Fdc3ContextType, intent: Fdc3IntentType): boolean;
41
+ /**
42
+ * Raises an Intent with the given Context from the given Row Node
43
+ * @param rowNode - The Row Node
44
+ * @param intent - The FDC3 Intent
45
+ * @param contextType - The FDC3 Context Type
46
+ * @param appIdentifier - The App Identifier
47
+ */
48
+ raiseIntentFromRow(rowNode: IRowNode, intent: Fdc3IntentType | Fdc3CustomIntentType, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
49
+ /**
50
+ * Raises an Intent with the given Context from the given Row Node with the given Primary Key Value
51
+ * @param primaryKeyValue - The Primary Key Value
52
+ * @param intent - The FDC3 Intent
53
+ * @param contextType - The FDC3 Context Type
54
+ * @param appIdentifier - The App Identifier
55
+ */
56
+ raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Fdc3IntentType | Fdc3CustomIntentType, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
57
+ /**
58
+ * Finds and raises an Intent based on the given Context from the given Row Node
59
+ * @param rowNode - The Row Node
60
+ * @param contextType - The FDC3 Context Type
61
+ * @param appIdentifier - The App Identifier
62
+ */
63
+ raiseIntentForContextFromRow(rowNode: IRowNode, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
64
+ /**
65
+ * Finds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value
66
+ * @param primaryKeyValue - The Primary Key Value
67
+ * @param contextType - The FDC3 Context Type
68
+ * @param appIdentifier - The App Identifier
69
+ */
70
+ raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType | Fdc3CustomContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
71
+ /**
72
+ * Broadcasts the given Context from the given Row Node
73
+ * @param rowNode - The Row Node
74
+ * @param contextType - The FDC3 Context Type
75
+ */
76
+ broadcastFromRow(rowNode: IRowNode, contextType: Fdc3ContextType | Fdc3CustomContextType): Promise<void>;
77
+ /**
78
+ * Broadcasts the given Context from the given Row Node with the given Primary Key Value
79
+ * @param primaryKeyValue - The Primary Key Value
80
+ * @param contextType - The FDC3 Context Type
81
+ */
82
+ broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType | Fdc3CustomContextType): Promise<void> | undefined;
83
+ /**
84
+ * Checks if the given Context Type is a FDC3 standard Context Type
85
+ */
86
+ isStandardContextType(contextType: string): boolean;
87
+ /**
88
+ * Checks if the given Intent is a FDC3 standard Intent Type
89
+ */
90
+ isStandardIntentType(intentType: string): boolean;
91
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  import { IRowNode } from '@ag-grid-community/core';
2
- import { ContactColumn, ContactIntent, CountryColumn, CustomFDC3Column, CustomFDC3Intent, FDC3Intent, FinancePluginOptions, InstrumentColumn, InstrumentIntent, OrganizationColumn, PositionColumn, PositionIntent } from '../AdaptableOptions/FinancePluginOptions';
3
- import { ContactContext, ContactListContext, ContextData, CountryContext, FDC3Context, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext } from '../types';
2
+ import { ContactColumn, ContactIntent, CountryColumn, CustomFDC3Column, CustomFDC3Intent_Depr, FDC3Intent_Depr, FinancePluginOptions, InstrumentColumn, InstrumentIntent, OrganizationColumn, PositionColumn, PositionIntent } from '../AdaptableOptions/FinancePluginOptions';
3
+ import { ContactContextDepr, ContactListContextDepr, ContextDataDepr, CountryContextDepr, FDC3Context_DEPR, InstrumentContextDepr, InstrumentListContextDepr, OrganizationContextDepr, PortfolioContextDepr, PositionContextDepr } from '../types';
4
4
  /**
5
5
  * Provides run-time access to the Finance Plugin
6
6
  */
@@ -15,56 +15,56 @@ export interface FinanceApi {
15
15
  * @param rowNode Row Node to use for Context Data
16
16
  * @param data custom Context Data
17
17
  */
18
- createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: IRowNode, data?: ContextData): InstrumentContext;
18
+ createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: IRowNode, data?: ContextDataDepr): InstrumentContextDepr;
19
19
  /**
20
20
  * Creates FDC3 Instrumentlist Context
21
21
  * @param instrumentColumn Instrument Column to create Context For
22
22
  * @param rowNode Row Nodes to use for Context Data
23
23
  * @param data custom Context Data
24
24
  */
25
- createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: IRowNode[], data?: ContextData): InstrumentListContext;
25
+ createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: IRowNode[], data?: ContextDataDepr): InstrumentListContextDepr;
26
26
  /**
27
27
  * Creates FDC3 Position Context
28
28
  * @param instrumentColumn Position Column to create Context For
29
29
  * @param rowNode Row Node to use for Context Data
30
30
  * @param data custom Context Data
31
31
  */
32
- createFDC3PositionContext(positionColumn: PositionColumn, rowNode: IRowNode, data?: ContextData): PositionContext;
32
+ createFDC3PositionContext(positionColumn: PositionColumn, rowNode: IRowNode, data?: ContextDataDepr): PositionContextDepr;
33
33
  /**
34
34
  * Creates FDC3 Portfolio Context
35
35
  * @param instrumentColumn Position Column to create Context For
36
36
  * @param rowNode Row Nodes to use for Context Data
37
37
  * @param data custom Context Data
38
38
  */
39
- createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: IRowNode[], data?: ContextData): PortfolioContext;
39
+ createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: IRowNode[], data?: ContextDataDepr): PortfolioContextDepr;
40
40
  /**
41
41
  * Creates FDC3 Contact Context
42
42
  * @param instrumentColumn Contact Column to create Context For
43
43
  * @param rowNode Row Node to use for Context Data
44
44
  * @param data custom Context Data
45
45
  */
46
- createFDC3ContactContext(contactColumn: ContactColumn, rowNode: IRowNode, data?: ContextData): ContactContext;
46
+ createFDC3ContactContext(contactColumn: ContactColumn, rowNode: IRowNode, data?: ContextDataDepr): ContactContextDepr;
47
47
  /**
48
48
  * Creates FDC3 Contact List Context
49
49
  * @param instrumentColumn Contact Column to create Context For
50
50
  * @param rowNode Row Nodes to use for Context Data
51
51
  * @param data custom Context Data
52
52
  */
53
- createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: IRowNode[], data?: ContextData): ContactListContext;
53
+ createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: IRowNode[], data?: ContextDataDepr): ContactListContextDepr;
54
54
  /**
55
55
  * Creates FDC3 Organization Context
56
56
  * @param instrumentColumn Organization Column to create Context For
57
57
  * @param rowNode Row Node to use for Context Data
58
58
  * @param data custom Context Data
59
59
  */
60
- createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: IRowNode, data?: ContextData): OrganizationContext;
60
+ createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: IRowNode, data?: ContextDataDepr): OrganizationContextDepr;
61
61
  /**
62
62
  * Creates FDC3 Country Context
63
63
  * @param instrumentColumn Country Column to create Context For
64
64
  * @param rowNode Row Node to use for Context Data
65
65
  * @param data custom Context Data
66
66
  */
67
- createFDC3CountryContext(countryColumn: CountryColumn, rowNode: IRowNode, data?: ContextData): CountryContext;
67
+ createFDC3CountryContext(countryColumn: CountryColumn, rowNode: IRowNode, data?: ContextDataDepr): CountryContextDepr;
68
68
  /**
69
69
  * Gets Instrument Column with given Id
70
70
  * @param instrumentColumnId Column to Look
@@ -95,18 +95,18 @@ export interface FinanceApi {
95
95
  * Publishes an FDC3 Message Event of type `Broadcast`
96
96
  * @param context context for Event
97
97
  */
98
- publishBroadcastFDC3MessageEvent(context: FDC3Context): void;
98
+ publishBroadcastFDC3MessageEvent(context: FDC3Context_DEPR): void;
99
99
  /**
100
100
  * Publishes an FDC3 Message Event of type `RaiseIntentForContext`
101
101
  * @param context context for Event
102
102
  */
103
- publishRaiseFDC3IntentForContextEvent(context: FDC3Context): void;
103
+ publishRaiseFDC3IntentForContextEvent(context: FDC3Context_DEPR): void;
104
104
  /**
105
105
  * Publishes an FDC3 Message Event of type `Raise Event`
106
106
  * @param context context for Event
107
107
  * @param intent FDC3 Intent to Raise
108
108
  */
109
- publishRaiseFDC3IntentEvent(context: FDC3Context, intent: FDC3Intent | CustomFDC3Intent): void;
109
+ publishRaiseFDC3IntentEvent(context: FDC3Context_DEPR, intent: FDC3Intent_Depr | CustomFDC3Intent_Depr): void;
110
110
  /**
111
111
  * Checks whether the Instrument Intent is valid for Instrument Lists
112
112
  * @param intent FDC3 Intent to check
@@ -42,6 +42,7 @@ import { StatusBarApi } from '../StatusBarApi';
42
42
  import { StyledColumnApi } from '../StyledColumnApi';
43
43
  import { ActionColumnApi } from '../ActionColumnApi';
44
44
  import { ActionRowApi } from '../ActionRowApi';
45
+ import { Fdc3Api } from '../Fdc3Api';
45
46
  export declare class AdaptableApiImpl implements AdaptableApi {
46
47
  protected adaptable: IAdaptable;
47
48
  internalApi: AdaptableInternalApi;
@@ -88,6 +89,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
88
89
  dataChangeHistoryApi: DataChangeHistoryApi;
89
90
  chartingApi: ChartingApi;
90
91
  statusBarApi: StatusBarApi;
92
+ fdc3Api: Fdc3Api;
91
93
  private destroyed;
92
94
  constructor(adaptable: IAdaptable);
93
95
  /**
@@ -45,6 +45,7 @@ const StyledColumnApiImpl_1 = require("./StyledColumnApiImpl");
45
45
  const CalendarApiImpl_1 = require("./CalendarApiImpl");
46
46
  const EntitlementApiImpl_1 = require("./EntitlementApiImpl");
47
47
  const OptionsApiImpl_1 = require("./OptionsApiImpl");
48
+ const Fdc3ApiImpl_1 = require("./Fdc3ApiImpl");
48
49
  class AdaptableApiImpl {
49
50
  constructor(adaptable) {
50
51
  this.adaptable = adaptable;
@@ -93,6 +94,7 @@ class AdaptableApiImpl {
93
94
  this.dataChangeHistoryApi = new DataChangeHistoryApiImpl_1.DataChangeHistoryApiImpl(adaptable);
94
95
  this.chartingApi = new ChartingApiImpl_1.ChartingApiImpl(adaptable);
95
96
  this.statusBarApi = new StatusBarApiImpl_1.StatusBarApiImpl(adaptable);
97
+ this.fdc3Api = new Fdc3ApiImpl_1.Fdc3ApiImpl(adaptable);
96
98
  // adaptable internal api
97
99
  this.internalApi = new AdaptableInternalApi_1.AdaptableInternalApi(adaptable);
98
100
  }
@@ -144,6 +146,7 @@ class AdaptableApiImpl {
144
146
  this.themeApi = null;
145
147
  this.toolPanelApi = null;
146
148
  this.userInterfaceApi = null;
149
+ this.fdc3Api = null;
147
150
  }
148
151
  destroy(config) {
149
152
  this.adaptable.destroy(config);
@@ -19,6 +19,8 @@ import { GroupingOptions } from '../../AdaptableOptions/GroupingOptions';
19
19
  import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
20
20
  import { ExpressionApi } from '../ExpressionApi';
21
21
  import { CalendarOptions } from '../../AdaptableOptions/CalendarOptions';
22
+ import { Fdc3Api } from '../Fdc3Api';
23
+ import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
22
24
  export declare abstract class ApiBase {
23
25
  protected adaptable: IAdaptable;
24
26
  /**
@@ -89,6 +91,7 @@ export declare abstract class ApiBase {
89
91
  protected getEntitlementOptions(): EntitlementOptions;
90
92
  protected getFlashingCellOptions(): FlashingCellOptions;
91
93
  protected getSettingsPanelOptions(): SettingsPanelOptions;
94
+ protected getFdc3Options(): Fdc3Options;
92
95
  protected getAdaptableApi(): AdaptableApi;
93
96
  protected getActionColumnApi(): ActionColumnApi;
94
97
  protected getActionRowApi(): ActionRowApi;
@@ -132,6 +135,7 @@ export declare abstract class ApiBase {
132
135
  protected getDataChangeHistoryApi(): DataChangeHistoryApi;
133
136
  protected getChartingApi(): ChartingApi;
134
137
  protected getStatusBarApi(): StatusBarApi;
138
+ protected getFdc3Api(): Fdc3Api;
135
139
  destroy(): void;
136
140
  }
137
141
  /**
@@ -183,6 +183,9 @@ class ApiBase {
183
183
  getSettingsPanelOptions() {
184
184
  return this.adaptable.adaptableOptions.settingsPanelOptions;
185
185
  }
186
+ getFdc3Options() {
187
+ return this.adaptable.adaptableOptions.fdc3Options;
188
+ }
186
189
  getAdaptableApi() {
187
190
  return this.adaptable.api;
188
191
  }
@@ -312,6 +315,9 @@ class ApiBase {
312
315
  getStatusBarApi() {
313
316
  return this.getAdaptableApi().statusBarApi;
314
317
  }
318
+ getFdc3Api() {
319
+ return this.getAdaptableApi().fdc3Api;
320
+ }
315
321
  destroy() {
316
322
  delete this.adaptable;
317
323
  }
@@ -58,7 +58,6 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
58
58
  getExportableColumns(): AdaptableColumn[];
59
59
  private logMissingColumnWarning;
60
60
  getPrimaryKeyColumn(): AdaptableColumn<any>;
61
- isActionRowButtonColumn(columnId: string): boolean;
62
61
  getDefaultAggFunc(columnId: string): string;
63
62
  isSpecialColumn(columnId: string): boolean;
64
63
  }
@@ -315,9 +315,6 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
315
315
  getPrimaryKeyColumn() {
316
316
  return this.getColumnWithColumnId(this.adaptable.adaptableOptions.primaryKey);
317
317
  }
318
- isActionRowButtonColumn(columnId) {
319
- return columnId === GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS;
320
- }
321
318
  getDefaultAggFunc(columnId) {
322
319
  var _a, _b, _c;
323
320
  const abColumn = this.getColumnWithColumnId(columnId);
@@ -0,0 +1,28 @@
1
+ import { IRowNode } from '@ag-grid-community/core';
2
+ import { DesktopAgent, IntentResolution } from '@finos/fdc3';
3
+ import { ApiBase } from './ApiBase';
4
+ import { Fdc3Api } from '../Fdc3Api';
5
+ import { Fdc3InternalApi } from '../Internal/Fdc3InternalApi';
6
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
7
+ import { Fdc3Context, Fdc3ContextType } from '../../PredefinedConfig/Common/Fdc3Context';
8
+ import { Fdc3IntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
9
+ import { AppIdentifier } from '@finos/fdc3/dist/api/AppIdentifier';
10
+ export declare class Fdc3ApiImpl extends ApiBase implements Fdc3Api {
11
+ internalApi: Fdc3InternalApi;
12
+ constructor(adaptable: IAdaptable);
13
+ getDesktopAgent(): DesktopAgent;
14
+ buildContextDataFromRow(contextType: Fdc3ContextType, rowNode: IRowNode): Fdc3Context;
15
+ buildContextDataForPrimaryKey(contextType: Fdc3ContextType, primaryKeyValue: string | number): Fdc3Context | undefined;
16
+ getPossibleContextTypes(intent: Fdc3IntentType): Fdc3ContextType[];
17
+ isContextCompatibleWithIntent(contextType: Fdc3ContextType, intent: Fdc3IntentType): boolean;
18
+ raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Fdc3IntentType, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
19
+ raiseIntentFromRow(rowNode: IRowNode, intent: Fdc3IntentType, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
20
+ raiseIntentForContextFromRow(rowNode: IRowNode, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
21
+ raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
22
+ broadcastFromRow(rowNode: IRowNode, contextType: Fdc3ContextType): Promise<void>;
23
+ broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: Fdc3ContextType): Promise<void> | undefined;
24
+ getContextLabel(contextType: Fdc3ContextType): string;
25
+ isStandardContextType(contextType: string): boolean;
26
+ isStandardIntentType(intentType: string): boolean;
27
+ private getFdc3Service;
28
+ }
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Fdc3ApiImpl = void 0;
4
+ const ApiBase_1 = require("./ApiBase");
5
+ const Fdc3InternalApi_1 = require("../Internal/Fdc3InternalApi");
6
+ const Fdc3Context_1 = require("../../PredefinedConfig/Common/Fdc3Context");
7
+ const Fdc3Intent_1 = require("../../PredefinedConfig/Common/Fdc3Intent");
8
+ class Fdc3ApiImpl extends ApiBase_1.ApiBase {
9
+ constructor(adaptable) {
10
+ super(adaptable);
11
+ this.internalApi = new Fdc3InternalApi_1.Fdc3InternalApi(adaptable);
12
+ }
13
+ getDesktopAgent() {
14
+ return this.getFdc3Service().getDesktopAgent();
15
+ }
16
+ buildContextDataFromRow(contextType, rowNode) {
17
+ return this.internalApi.mapRowToContextData(contextType, rowNode);
18
+ }
19
+ buildContextDataForPrimaryKey(contextType, primaryKeyValue) {
20
+ const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
21
+ if (!rowNode) {
22
+ this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
23
+ return undefined;
24
+ }
25
+ return this.buildContextDataFromRow(contextType, rowNode);
26
+ }
27
+ getPossibleContextTypes(intent) {
28
+ var _a;
29
+ const compatibleContexts = (_a = Fdc3Intent_1.Fdc3IntentConfiguration[intent]) === null || _a === void 0 ? void 0 : _a.contexts;
30
+ return compatibleContexts ? [...compatibleContexts] : [];
31
+ }
32
+ isContextCompatibleWithIntent(contextType, intent) {
33
+ return this.getPossibleContextTypes(intent).includes(contextType);
34
+ }
35
+ raiseIntentFromPrimaryKey(primaryKeyValue, intent, contextType, appIdentifier) {
36
+ const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
37
+ if (!rowNode) {
38
+ this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
39
+ return undefined;
40
+ }
41
+ return this.raiseIntentFromRow(rowNode, intent, contextType, appIdentifier);
42
+ }
43
+ raiseIntentFromRow(rowNode, intent, contextType, appIdentifier) {
44
+ const contextData = this.buildContextDataFromRow(contextType, rowNode);
45
+ return this.getFdc3Service().raiseIntent(intent, contextData, appIdentifier);
46
+ }
47
+ raiseIntentForContextFromRow(rowNode, contextType, appIdentifier) {
48
+ const contextData = this.buildContextDataFromRow(contextType, rowNode);
49
+ return this.getFdc3Service().raiseIntentForContext(contextData, appIdentifier);
50
+ }
51
+ raiseIntentForContextFromPrimaryKey(primaryKeyValue, contextType, appIdentifier) {
52
+ const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
53
+ if (!rowNode) {
54
+ this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
55
+ return undefined;
56
+ }
57
+ return this.raiseIntentForContextFromRow(rowNode, contextType, appIdentifier);
58
+ }
59
+ broadcastFromRow(rowNode, contextType) {
60
+ const contextData = this.buildContextDataFromRow(contextType, rowNode);
61
+ return this.getFdc3Service().broadcast(contextData);
62
+ }
63
+ broadcastFromPrimaryKey(primaryKeyValue, contextType) {
64
+ const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
65
+ if (!rowNode) {
66
+ this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
67
+ return undefined;
68
+ }
69
+ return this.broadcastFromRow(rowNode, contextType);
70
+ }
71
+ getContextLabel(contextType) {
72
+ var _a;
73
+ return (_a = Fdc3Context_1.ContextLabels[contextType]) !== null && _a !== void 0 ? _a : contextType;
74
+ }
75
+ isStandardContextType(contextType) {
76
+ // @ts-ignore
77
+ return Fdc3Context_1.StandardContextTypes.includes(contextType);
78
+ }
79
+ isStandardIntentType(intentType) {
80
+ // @ts-ignore
81
+ return Fdc3Intent_1.Fdc3StandardIntents.includes(intentType);
82
+ }
83
+ getFdc3Service() {
84
+ return this.adaptable.api.internalApi.getFdc3Service();
85
+ }
86
+ }
87
+ exports.Fdc3ApiImpl = Fdc3ApiImpl;
@@ -2,6 +2,7 @@ import { ApiBase } from './ApiBase';
2
2
  import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AdaptableQLOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, MenuOptions, NotificationsOptions, OptionsApi, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../../types';
3
3
  import { GroupingOptions } from '../../AdaptableOptions/GroupingOptions';
4
4
  import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
5
+ import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
5
6
  export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
6
7
  getAdaptableId(): string;
7
8
  getAdaptableStateKey(): string;
@@ -39,4 +40,5 @@ export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
39
40
  getEntitlementOptions(): EntitlementOptions;
40
41
  getFlashingCellOptions(): FlashingCellOptions;
41
42
  getSettingsPanelOptions(): SettingsPanelOptions;
43
+ getFdc3Options(): Fdc3Options;
42
44
  }
@@ -111,5 +111,8 @@ class OptionsApiImpl extends ApiBase_1.ApiBase {
111
111
  getSettingsPanelOptions() {
112
112
  return this.getOptions().settingsPanelOptions;
113
113
  }
114
+ getFdc3Options() {
115
+ return this.adaptable.adaptableOptions.fdc3Options;
116
+ }
114
117
  }
115
118
  exports.OptionsApiImpl = OptionsApiImpl;
@@ -10,4 +10,6 @@ export declare class QuickSearchApiImpl extends ApiBase implements QuickSearchAp
10
10
  getQuickSearchStyle(): AdaptableStyle;
11
11
  setQuickSearchStyle(style: AdaptableStyle): void;
12
12
  openQuickSearchSettingsPanel(): void;
13
+ showFloatingQuickSearch(): void;
14
+ hideFloatingQuickSearch(): void;
13
15
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QuickSearchApiImpl = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
6
+ const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
6
7
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
7
8
  const ApiBase_1 = require("./ApiBase");
8
9
  class QuickSearchApiImpl extends ApiBase_1.ApiBase {
@@ -27,5 +28,11 @@ class QuickSearchApiImpl extends ApiBase_1.ApiBase {
27
28
  openQuickSearchSettingsPanel() {
28
29
  this.showModulePopup(ModuleConstants.QuickSearchModuleId);
29
30
  }
31
+ showFloatingQuickSearch() {
32
+ this.dispatchAction(SystemRedux.SystemQuickSearchFloatingVisibility(true));
33
+ }
34
+ hideFloatingQuickSearch() {
35
+ this.dispatchAction(SystemRedux.SystemQuickSearchFloatingVisibility(false));
36
+ }
30
37
  }
31
38
  exports.QuickSearchApiImpl = QuickSearchApiImpl;
@@ -57,7 +57,7 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
57
57
  // if there is NO rowNode, do NOT display the non-editable fields as they will be empty
58
58
  return !!rowNode || this.isColumnEditable(column, rowNode);
59
59
  })
60
- .filter((column) => !this.getAdaptableApi().columnApi.isActionRowButtonColumn(column.columnId));
60
+ .filter((column) => !this.getAdaptableApi().columnApi.internalApi.isActionRowButtonColumn(column.columnId));
61
61
  return relevantColumns.map((column) => this.buildFormField(type, column, rowNode));
62
62
  }
63
63
  buidActionRowButtons(type, rowNode) {
@@ -3,11 +3,10 @@ import { UIConfirmation } from '../../Utilities/Interface/MessagePopups';
3
3
  import { SystemState } from '../../PredefinedConfig/SystemState';
4
4
  import { Action } from 'redux';
5
5
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
6
- import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
7
6
  import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
8
7
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
9
8
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
10
- import { AdaptableIcon, AdaptableObjectLookupCriteria, AdaptableQuery, AdaptableState, BaseContext } from '../../types';
9
+ import { ActionColumn, ActionColumnContext, AdaptableIcon, AdaptableObjectLookupCriteria, AdaptableQuery, AdaptableState, BaseContext } from '../../types';
11
10
  import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
12
11
  import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
13
12
  import { IReportService } from '../../Utilities/Services/Interface/IReportService';
@@ -26,6 +25,8 @@ import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodel
26
25
  import { IModuleCollection } from '../../Strategy/Interface/IModule';
27
26
  import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedConfig/Common/AdaptableObject';
28
27
  import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
28
+ import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
29
+ import { ColDef } from '@ag-grid-community/core/dist/esm/es6/entities/colDef';
29
30
  export declare class AdaptableInternalApi extends ApiBase {
30
31
  getSystemState(): SystemState;
31
32
  showPopupConfirmation(confirmation: UIConfirmation): void;
@@ -66,6 +67,7 @@ export declare class AdaptableInternalApi extends ApiBase {
66
67
  getTeamSharingService(): ITeamSharingService;
67
68
  getMetamodelService(): IMetamodelService;
68
69
  getRowEditService(): IRowEditService;
70
+ getFdc3Service(): Fdc3Service;
69
71
  getModules(): IModuleCollection;
70
72
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
71
73
  forAllRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
@@ -106,7 +108,12 @@ export declare class AdaptableInternalApi extends ApiBase {
106
108
  getPreviousGroupedColumnsIndex(layoutId: string): {
107
109
  [key: string]: number;
108
110
  };
109
- getValueUsingField(rowData: Record<string, any>, column: AdaptableColumn): any;
110
- setValueUsingField(rowData: Record<string, any>, column: AdaptableColumn, newValue: any): Record<string, any>;
111
+ getValueUsingField(rowData: Record<string, any>, columnValueKey: string): any;
112
+ setValueUsingField(rowData: Record<string, any>, columnValueKey: string, newValue: any): Record<string, any>;
111
113
  findAdaptableObjectsByLookupCriteria<T extends AdaptableObjectWithScope>({ scope, tag, ids }: AdaptableObjectLookupCriteria, specificAdaptableObjects: T[]): T[];
114
+ buildBaseContext(): BaseContext;
115
+ getActionButtonsAndActionColumn(colDef: ColDef): {
116
+ actionButtons: AdaptableButton<ActionColumnContext>[];
117
+ actionColumn: ActionColumn | undefined;
118
+ };
112
119
  }
@@ -12,6 +12,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
12
12
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
13
13
  const waitForCondition_1 = require("../../Utilities/waitForCondition");
14
14
  const Icon_1 = require("../../components/Icon");
15
+ const uuid_1 = require("../../components/utils/uuid");
15
16
  class AdaptableInternalApi extends ApiBase_1.ApiBase {
16
17
  getSystemState() {
17
18
  return this.getAdaptableState().System;
@@ -121,6 +122,9 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
121
122
  getRowEditService() {
122
123
  return this.adaptable.RowEditService;
123
124
  }
125
+ getFdc3Service() {
126
+ return this.adaptable.Fdc3Service;
127
+ }
124
128
  getModules() {
125
129
  return this.adaptable.adaptableModules;
126
130
  }
@@ -370,15 +374,13 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
370
374
  return (_a = SystemRedux.SystemPreviousGroupedColumnsSelector(this.getAdaptableState().System)) === null || _a === void 0 ? void 0 : _a[layoutId];
371
375
  }
372
376
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/utils/object.ts#L205
373
- getValueUsingField(rowData, column) {
374
- var _a;
375
- if (!rowData || !column) {
377
+ getValueUsingField(rowData, columnValueKey) {
378
+ if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
376
379
  return;
377
380
  }
378
- const columnValueKey = (_a = column.field) !== null && _a !== void 0 ? _a : column.columnId;
379
- const isColumnValueKeyContainsDots = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
381
+ const isColumnValueKeyNested = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
380
382
  // if no '.', then it's not a deep value
381
- if (!isColumnValueKeyContainsDots) {
383
+ if (!isColumnValueKeyNested) {
382
384
  return rowData[columnValueKey];
383
385
  }
384
386
  // otherwise it is a deep value, so need to dig for it
@@ -393,12 +395,10 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
393
395
  return currentObject;
394
396
  }
395
397
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/valueService/valueService.ts#L236
396
- setValueUsingField(rowData, column, newValue) {
397
- var _a;
398
- if (!rowData || !column) {
398
+ setValueUsingField(rowData, columnValueKey, newValue) {
399
+ if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
399
400
  return;
400
401
  }
401
- const columnValueKey = (_a = column.field) !== null && _a !== void 0 ? _a : column.columnId;
402
402
  const isColumnValueKeyContainsDots = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
403
403
  let valuesAreSame = false;
404
404
  if (!isColumnValueKeyContainsDots) {
@@ -447,5 +447,54 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
447
447
  }
448
448
  return locatedAdaptableObjects;
449
449
  }
450
+ buildBaseContext() {
451
+ return {
452
+ adaptableApi: this.getAdaptableApi(),
453
+ adaptableId: this.getAdaptableApi().optionsApi.getAdaptableId(),
454
+ userName: this.getAdaptableApi().optionsApi.getUserName(),
455
+ };
456
+ }
457
+ getActionButtonsAndActionColumn(colDef) {
458
+ var _a;
459
+ let actionColumn;
460
+ if (colDef.colId == GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS) {
461
+ const actionButtons = this.adaptable.getActionRowButtonDefs();
462
+ actionColumn = {
463
+ columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
464
+ actionColumnButton: actionButtons,
465
+ };
466
+ }
467
+ if (!actionColumn && this.getFdc3Api().internalApi.isFdc3MainActionColumn(colDef.colId)) {
468
+ const actionButtons = this.getFdc3Api().internalApi.getButtonsForFdc3MainActionColumn();
469
+ actionColumn = {
470
+ columnId: GeneralConstants_1.ADAPTABLE_FDC3_ACTION_COLUMN,
471
+ actionColumnButton: actionButtons,
472
+ };
473
+ }
474
+ if (!actionColumn &&
475
+ this.getFdc3Api().internalApi.isFdc3StandaloneActionColumn(colDef.colId, colDef.type)) {
476
+ const actionButtons = this.getFdc3Api().internalApi.getButtonsForFdc3StandaloneActionColumn(colDef.colId);
477
+ actionColumn = {
478
+ columnId: colDef.colId,
479
+ actionColumnButton: actionButtons,
480
+ };
481
+ }
482
+ if (!actionColumn) {
483
+ actionColumn = (_a = this.adaptable.api.actionColumnApi
484
+ .getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colDef.colId);
485
+ }
486
+ if (!(actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.actionColumnButton)) {
487
+ return {
488
+ actionButtons: [],
489
+ actionColumn,
490
+ };
491
+ }
492
+ let actionButtons = Array.isArray(actionColumn.actionColumnButton)
493
+ ? actionColumn.actionColumnButton
494
+ : [actionColumn.actionColumnButton];
495
+ // actionButtons don't have IDs, so we need to generate them to be used later as a react component key
496
+ actionButtons = actionButtons.map((actionButton) => (Object.assign(Object.assign({}, actionButton), { Uuid: (0, uuid_1.createUuid)() })));
497
+ return { actionButtons, actionColumn };
498
+ }
450
499
  }
451
500
  exports.AdaptableInternalApi = AdaptableInternalApi;
@@ -30,4 +30,5 @@ export declare class ColumnInternalApi extends ApiBase {
30
30
  * @param columnId Column to Check
31
31
  */
32
32
  usesAdaptableQuickFilter(columnId: string): boolean;
33
+ isActionRowButtonColumn(columnId: string): boolean;
33
34
  }