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

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 (84) 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 +145 -145
  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 +150 -0
  14. package/src/AdaptableOptions/Fdc3Options.js +5 -0
  15. package/src/AdaptableOptions/FinancePluginOptions.d.ts +9 -9
  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/EventApi.d.ts +3 -3
  21. package/src/Api/Events/ThemeChanged.d.ts +0 -6
  22. package/src/Api/Events/ThemeEdited.d.ts +11 -0
  23. package/src/Api/Fdc3Api.d.ts +83 -0
  24. package/src/Api/Fdc3Api.js +2 -0
  25. package/src/Api/FinanceApi.d.ts +12 -12
  26. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  27. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  28. package/src/Api/Implementation/ApiBase.d.ts +4 -0
  29. package/src/Api/Implementation/ApiBase.js +6 -0
  30. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +26 -0
  31. package/src/Api/Implementation/Fdc3ApiImpl.js +79 -0
  32. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
  33. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  34. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -0
  35. package/src/Api/Implementation/QuickSearchApiImpl.js +7 -0
  36. package/src/Api/Internal/AdaptableInternalApi.d.ts +5 -3
  37. package/src/Api/Internal/AdaptableInternalApi.js +16 -10
  38. package/src/Api/Internal/Fdc3InternalApi.d.ts +11 -0
  39. package/src/Api/Internal/Fdc3InternalApi.js +72 -0
  40. package/src/Api/OptionsApi.d.ts +5 -0
  41. package/src/Api/QuickSearchApi.d.ts +8 -0
  42. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  43. package/src/PredefinedConfig/Common/{FDC3Context.d.ts → FDC3Context_DEPR.d.ts} +19 -19
  44. package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +2 -0
  45. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +53 -0
  46. package/src/PredefinedConfig/Common/Fdc3Context.js +35 -0
  47. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +68 -0
  48. package/src/PredefinedConfig/Common/Fdc3Intent.js +75 -0
  49. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  50. package/src/PredefinedConfig/SystemState.d.ts +3 -0
  51. package/src/Redux/ActionsReducers/SystemRedux.d.ts +12 -6
  52. package/src/Redux/ActionsReducers/SystemRedux.js +18 -2
  53. package/src/Redux/Store/AdaptableStore.js +2 -2
  54. package/src/Strategy/Fdc3Module.d.ts +13 -0
  55. package/src/Strategy/Fdc3Module.js +85 -0
  56. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  57. package/src/Utilities/Constants/ModuleConstants.js +5 -2
  58. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -1
  59. package/src/Utilities/Services/Fdc3Service.d.ts +20 -0
  60. package/src/Utilities/Services/Fdc3Service.js +87 -0
  61. package/src/View/AdaptableView.js +9 -7
  62. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +9 -0
  63. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.d.ts +2 -0
  64. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +26 -0
  65. package/src/View/QuickSearch/QuickSearchInput.d.ts +6 -0
  66. package/src/View/QuickSearch/QuickSearchInput.js +22 -0
  67. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +2 -5
  68. package/src/View/QuickSearch/QuickSearchViewPanel.js +5 -19
  69. package/src/agGrid/ActionColumnRenderer.js +1 -1
  70. package/src/agGrid/Adaptable.d.ts +2 -0
  71. package/src/agGrid/Adaptable.js +21 -12
  72. package/src/agGrid/agGridHelper.js +2 -0
  73. package/src/components/Drawer/index.d.ts +6 -0
  74. package/src/components/Drawer/index.js +60 -0
  75. package/src/components/ExpressionEditor/index.js +4 -2
  76. package/src/components/icons/fdc3.d.ts +3 -0
  77. package/src/components/icons/fdc3.js +9 -0
  78. package/src/components/icons/index.js +3 -1
  79. package/src/metamodel/adaptable.metamodel.d.ts +45 -16
  80. package/src/metamodel/adaptable.metamodel.js +1 -1
  81. package/src/types.d.ts +6 -3
  82. package/version.d.ts +1 -1
  83. package/version.js +1 -1
  84. /package/src/{PredefinedConfig/Common/FDC3Context.js → Api/Events/ThemeEdited.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { AdaptableApi, AdaptableIcon, ContextMenuContext, FDC3Context, GridCell } from '../../types';
2
- import { CustomFDC3Context } from '../PredefinedConfig/Common/FDC3Context';
1
+ import { AdaptableApi, AdaptableIcon, ContextMenuContext, FDC3Context_DEPR, GridCell } from '../../types';
2
+ import { CustomFDC3Context } from '../PredefinedConfig/Common/FDC3Context_DEPR';
3
3
  /**
4
4
  * Options required for when using the Finance plugin
5
5
  */
@@ -50,11 +50,11 @@ export interface FinancePluginOptions {
50
50
  /**
51
51
  * Called when an intent from `availableIntents` is raised.
52
52
  */
53
- onFDC3Intent?: (intent: FDC3Intent | CustomFDC3Intent, context: FDC3Context, adaptableApi: AdaptableApi) => void;
53
+ onFDC3Intent?: (intent: FDC3Intent | CustomFDC3Intent, context: FDC3Context_DEPR, adaptableApi: AdaptableApi) => void;
54
54
  /**
55
55
  * Called when a context changes.
56
56
  */
57
- onFDC3Context?: (context: FDC3Context, adaptableApi: AdaptableApi) => void;
57
+ onFDC3Context?: (context: FDC3Context_DEPR, adaptableApi: AdaptableApi) => void;
58
58
  }
59
59
  /**
60
60
  * An FDC3 Column - will raise FDC3 intents and broadcast FDC3 messages
@@ -280,7 +280,7 @@ export interface RaiseFDC3IntentContext extends ContextMenuContext {
280
280
  /**
281
281
  * Function that handles FDC3 Context
282
282
  */
283
- export declare type FDC3ContextHandler = (context: FDC3Context) => void;
283
+ export declare type FDC3ContextHandler = (context: FDC3Context_DEPR) => void;
284
284
  /**
285
285
  * Defines a Desktop Agent which supports FDC3
286
286
  */
@@ -288,19 +288,19 @@ export interface FDC3DesktopAgent {
288
288
  /**
289
289
  * Raises an Intent
290
290
  */
291
- raiseIntent: (intent: FDC3Intent, context: FDC3Context) => void;
291
+ raiseIntent: (intent: FDC3Intent, context: FDC3Context_DEPR) => void;
292
292
  /**
293
293
  * Broadcasts an FDC3 Message
294
294
  */
295
- broadcast: (context: FDC3Context) => void;
295
+ broadcast: (context: FDC3Context_DEPR) => void;
296
296
  /**
297
297
  * Raises an FDC3 Intent for a given Context
298
298
  */
299
- raiseIntentForContext: (context: FDC3Context) => void;
299
+ raiseIntentForContext: (context: FDC3Context_DEPR) => void;
300
300
  /**
301
301
  * Adds an FDC3 Intent Listener
302
302
  */
303
- addIntentListener: (intent: FDC3Intent | CustomFDC3Intent, listener: (context: FDC3Context) => void) => void;
303
+ addIntentListener: (intent: FDC3Intent | CustomFDC3Intent, listener: (context: FDC3Context_DEPR) => void) => void;
304
304
  /**
305
305
  * Adds an FDC3 Context Listener
306
306
  */
@@ -21,6 +21,14 @@ export interface GroupingOptions<TData = any> {
21
21
  * @noCodeItem
22
22
  */
23
23
  restoreUngroupedColumns?: boolean;
24
+ /**
25
+ * Order Row Grouped Columns automatically, using Adaptable State if available (Custom or Column Sort)
26
+ *
27
+ * @defaultValue true
28
+ * @gridInfoItem
29
+ * @noCodeItem
30
+ */
31
+ autoOrderGroupedColumns?: boolean;
24
32
  }
25
33
  /**
26
34
  * Context used when setting a value for Unbalanced Row Groups
@@ -1,5 +1,5 @@
1
1
  import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
2
- import { AdaptableFDC3EventInfo } from '../PredefinedConfig/Common/FDC3Context';
2
+ import { AdaptableFDC3EventInfo } from '../PredefinedConfig/Common/FDC3Context_DEPR';
3
3
  /**
4
4
  * Options required for when using the OpenFin plugin
5
5
  */
@@ -31,23 +31,23 @@ export interface UserInterfaceOptions<TData = any> {
31
31
  */
32
32
  dateInputOptions?: DateInputOptions;
33
33
  /**
34
- * List of values which are permitted (e.g. to show in Filter, Custom Sort etc.)
34
+ * List of Column values to display (e.g. in Filter, Custom Sort etc.)
35
35
  */
36
36
  permittedValues?: PermittedValues<TData>[];
37
37
  /**
38
- * Dropdown values displayed when column is being edited; when not defined defaults to permittedValues
38
+ * Dropdown values displayed when column is being edited
39
39
  */
40
40
  editLookUpItems?: EditLookUpPermittedValues<TData>[];
41
41
  /**
42
- * Custom column values for 'IN' filter; when not defined defaults to permittedValues
42
+ * Custom column values for Values ('IN') Filter
43
43
  */
44
44
  filterPermittedValues?: FilterPermittedValues<TData>[];
45
45
  /**
46
- * Custom column values for defining Custom Sort; when not defined defaults to permittedValues
46
+ * Custom column values for defining Custom Sort
47
47
  */
48
48
  customSortPermittedValues?: CustomSortPermittedValues<TData>[];
49
49
  /**
50
- * Custom column values for editing via bulk-update; when not defined defaults to permittedValues
50
+ * Custom column values for editing via bulk-update
51
51
  */
52
52
  bulkUpdatePermittedValues?: BulkUpdatePermittedValues<TData>[];
53
53
  /**
@@ -92,7 +92,7 @@ export interface UserInterfaceOptions<TData = any> {
92
92
  */
93
93
  showAdapTableVersion?: boolean;
94
94
  /**
95
- * English variant to use in UI labels
95
+ * English variant to use in AdapTable UI
96
96
  *
97
97
  * @defaultValue 'GB'
98
98
  * @gridInfoItem
@@ -41,6 +41,7 @@ import { StyledColumnApi } from './StyledColumnApi';
41
41
  import { OptionsApi } from './OptionsApi';
42
42
  import { ActionColumnApi } from './ActionColumnApi';
43
43
  import { ActionRowApi } from './ActionRowApi';
44
+ import { Fdc3Api } from './Fdc3Api';
44
45
  /**
45
46
  *
46
47
  * The `AdaptableApi` provides developers with run-time access to AdapTable.
@@ -53,8 +54,8 @@ export interface AdaptableApi {
53
54
  */
54
55
  actionColumnApi: ActionColumnApi;
55
56
  /**
56
- * Provides access to Action Rows
57
- */
57
+ * Provides access to Action Rows
58
+ */
58
59
  actionRowApi: ActionRowApi;
59
60
  /**
60
61
  * Provides access to the Alert Module
@@ -220,6 +221,10 @@ export interface AdaptableApi {
220
221
  * Manages User Interface Options where colours, styles and permitted values are configured
221
222
  */
222
223
  userInterfaceApi: UserInterfaceApi;
224
+ /**
225
+ * Manages the FDC3 capabilities of AdapTable
226
+ */
227
+ fdc3Api: Fdc3Api;
223
228
  /**
224
229
  * Cleanup method - should be called only when using the vanilla javascript component, as framework components cleanup is performed when the component is destroyed/unmounted.
225
230
  * This destroys the Adaptable instance.
@@ -106,7 +106,7 @@ export interface EventApi {
106
106
  */
107
107
  off(eventName: 'SelectionChanged', callback: (selectionChangedInfo: SelectionChangedInfo) => void): void;
108
108
  /**
109
- * Event fired whenever the **selected theme of AdapTable is changed**.
109
+ * Event fired whenever the selected theme of AdapTable is changed
110
110
  * @param eventName ThemeChanged
111
111
  * @param callback ThemeChangedInfo which just contains the name of the current Theme
112
112
  * @returns the unsubscribe function
@@ -117,9 +117,9 @@ export interface EventApi {
117
117
  */
118
118
  off(eventName: 'ThemeChanged', callback: (themeChangedInfo: ThemeChangedInfo) => void): void;
119
119
  /**
120
- * Event fired whenever the a theme has been edited
120
+ * Event fired whenever a theme has been edited
121
121
  * @param eventName ThemeEdited
122
- * @param callback ThemeChangedInfo which just contains the name of the current Theme
122
+ * @param callback ThemeEditedInfo which just contains the name of the current Theme
123
123
  * @returns the unsubscribe function
124
124
  */
125
125
  on(eventName: 'ThemeEdited', callback: (themeEditedInfo: ThemeEditedInfo) => void): VoidFunction;
@@ -9,9 +9,3 @@ export interface ThemeChangedInfo extends BaseEventInfo {
9
9
  */
10
10
  theme: AdaptableTheme | string;
11
11
  }
12
- export interface ThemeEditedInfo extends BaseEventInfo {
13
- /**
14
- * The has been edited
15
- */
16
- theme: AdaptableTheme;
17
- }
@@ -0,0 +1,11 @@
1
+ import { AdaptableTheme } from '../../PredefinedConfig/ThemeState';
2
+ import { BaseEventInfo } from './BaseEventInfo';
3
+ /**
4
+ * Object returned by the `ThemeEdited` event
5
+ */
6
+ export interface ThemeEditedInfo extends BaseEventInfo {
7
+ /**
8
+ * Theme which has been edited
9
+ */
10
+ theme: AdaptableTheme;
11
+ }
@@ -0,0 +1,83 @@
1
+ import { Fdc3Context, Fdc3ContextType } from '../PredefinedConfig/Common/Fdc3Context';
2
+ import { IRowNode } from '@ag-grid-community/core';
3
+ import { DesktopAgent, IntentResolution, AppIdentifier } from '@finos/fdc3';
4
+ import { 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): 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, 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, 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, contextType: Fdc3ContextType, 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, contextType: Fdc3ContextType, 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, 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, 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): 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): Promise<void> | undefined;
83
+ }
@@ -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
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';
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 | CustomFDC3Intent): 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
  }
@@ -0,0 +1,26 @@
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
+ private getFdc3Service;
26
+ }
@@ -0,0 +1,79 @@
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
+ getFdc3Service() {
76
+ return this.adaptable.api.internalApi.getFdc3Service();
77
+ }
78
+ }
79
+ 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;