@adaptabletools/adaptable 16.0.0-canary.2 → 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 (189) hide show
  1. package/README.md +2 -0
  2. package/base.css +62 -54
  3. package/base.css.map +1 -1
  4. package/bundle.cjs.js +159 -159
  5. package/index.css +82 -70
  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 +5 -1
  11. package/src/AdaptableOptions/ActionRowOptions.d.ts +8 -5
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +9 -4
  13. package/src/AdaptableOptions/ColumnOptions.d.ts +1 -10
  14. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -2
  15. package/src/AdaptableOptions/Fdc3Options.d.ts +150 -0
  16. package/src/AdaptableOptions/Fdc3Options.js +5 -0
  17. package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
  18. package/src/AdaptableOptions/FinancePluginOptions.d.ts +9 -9
  19. package/src/AdaptableOptions/FormatColumnOptions.d.ts +7 -7
  20. package/src/AdaptableOptions/GroupingOptions.d.ts +6 -11
  21. package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +1 -1
  22. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  23. package/src/AdaptableOptions/TeamSharingOptions.d.ts +5 -0
  24. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +21 -11
  25. package/src/Api/AdaptableApi.d.ts +7 -2
  26. package/src/Api/ColumnApi.d.ts +18 -7
  27. package/src/Api/DataChangeHistoryApi.d.ts +6 -0
  28. package/src/Api/EventApi.d.ts +22 -9
  29. package/src/Api/Events/ChexboxColumnClicked.d.ts +1 -0
  30. package/src/Api/Events/ScheduleTriggered.d.ts +11 -0
  31. package/src/Api/Events/ThemeChanged.d.ts +0 -6
  32. package/src/Api/Events/ThemeEdited.d.ts +11 -0
  33. package/src/Api/Events/ThemeEdited.js +2 -0
  34. package/src/Api/Fdc3Api.d.ts +83 -0
  35. package/src/Api/Fdc3Api.js +2 -0
  36. package/src/Api/FinanceApi.d.ts +12 -12
  37. package/src/Api/Implementation/ActionRowApiImpl.js +7 -5
  38. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  39. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  40. package/src/Api/Implementation/ApiBase.d.ts +4 -0
  41. package/src/Api/Implementation/ApiBase.js +6 -0
  42. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -0
  43. package/src/Api/Implementation/ChartingApiImpl.js +4 -0
  44. package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -1
  45. package/src/Api/Implementation/ColumnApiImpl.js +22 -3
  46. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
  47. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
  48. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +26 -0
  49. package/src/Api/Implementation/Fdc3ApiImpl.js +79 -0
  50. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
  51. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  52. package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
  53. package/src/Api/Implementation/PredicateApiImpl.js +8 -8
  54. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -0
  55. package/src/Api/Implementation/QuickSearchApiImpl.js +7 -0
  56. package/src/Api/Implementation/ScheduleApiImpl.d.ts +4 -0
  57. package/src/Api/Implementation/ScheduleApiImpl.js +5 -0
  58. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +0 -3
  59. package/src/Api/Implementation/StyledColumnApiImpl.js +0 -26
  60. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
  61. package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -0
  62. package/src/Api/Internal/AdaptableInternalApi.d.ts +5 -3
  63. package/src/Api/Internal/AdaptableInternalApi.js +18 -12
  64. package/src/Api/Internal/AlertInternalApi.js +7 -2
  65. package/src/Api/Internal/Fdc3InternalApi.d.ts +11 -0
  66. package/src/Api/Internal/Fdc3InternalApi.js +72 -0
  67. package/src/Api/Internal/FilterInternalApi.js +8 -4
  68. package/src/Api/Internal/FormatColumnInternalApi.js +11 -13
  69. package/src/Api/Internal/ScheduleInternalApi.d.ts +8 -0
  70. package/src/Api/Internal/ScheduleInternalApi.js +20 -0
  71. package/src/Api/Internal/StyledColumnInternalApi.d.ts +5 -2
  72. package/src/Api/Internal/StyledColumnInternalApi.js +29 -2
  73. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +5 -0
  74. package/src/Api/Internal/UserInterfaceInternalApi.js +18 -0
  75. package/src/Api/OptionsApi.d.ts +6 -1
  76. package/src/Api/PredicateApi.d.ts +5 -5
  77. package/src/Api/QuickSearchApi.d.ts +8 -0
  78. package/src/Api/StyledColumnApi.d.ts +0 -14
  79. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  80. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +7 -7
  81. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -15
  82. package/src/PredefinedConfig/Common/AdaptablePredicate.js +65 -41
  83. package/src/PredefinedConfig/Common/{FDC3Context.d.ts → FDC3Context_DEPR.d.ts} +19 -19
  84. package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +2 -0
  85. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +53 -0
  86. package/src/PredefinedConfig/Common/Fdc3Context.js +35 -0
  87. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +68 -0
  88. package/src/PredefinedConfig/Common/Fdc3Intent.js +75 -0
  89. package/src/PredefinedConfig/Common/Types.d.ts +2 -2
  90. package/src/PredefinedConfig/StyledColumnState.d.ts +3 -2
  91. package/src/PredefinedConfig/SystemState.d.ts +3 -0
  92. package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
  93. package/src/Redux/ActionsReducers/SystemRedux.d.ts +17 -6
  94. package/src/Redux/ActionsReducers/SystemRedux.js +33 -3
  95. package/src/Redux/Store/AdaptableStore.js +3 -4
  96. package/src/Strategy/AdaptableModuleBase.d.ts +6 -6
  97. package/src/Strategy/Fdc3Module.d.ts +13 -0
  98. package/src/Strategy/Fdc3Module.js +85 -0
  99. package/src/Strategy/FlashingCellModule.js +6 -2
  100. package/src/Strategy/Interface/IModule.d.ts +2 -2
  101. package/src/Strategy/ScheduleModule.js +3 -2
  102. package/src/Strategy/StyledColumnModule.js +24 -15
  103. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  104. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  105. package/src/Utilities/Constants/ModuleConstants.js +5 -2
  106. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -3
  107. package/src/Utilities/MenuItem.d.ts +4 -4
  108. package/src/Utilities/Services/Fdc3Service.d.ts +20 -0
  109. package/src/Utilities/Services/Fdc3Service.js +87 -0
  110. package/src/Utilities/Services/MetamodelService.js +5 -1
  111. package/src/Utilities/Services/ModuleService.js +1 -1
  112. package/src/Utilities/Services/QueryLanguageService.js +1 -1
  113. package/src/Utilities/Services/RowEditService.js +1 -1
  114. package/src/Utilities/Services/TeamSharingService.d.ts +2 -0
  115. package/src/Utilities/Services/TeamSharingService.js +60 -3
  116. package/src/Utilities/Services/ValidationService.js +6 -2
  117. package/src/View/AdaptableView.js +9 -7
  118. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +9 -0
  119. package/src/View/Charting/useChartingElements.js +1 -1
  120. package/src/View/Components/AdaptableButton/index.d.ts +3 -0
  121. package/src/View/Components/AdaptableButton/index.js +18 -0
  122. package/src/View/Components/AdaptableIconComponent/index.d.ts +7 -0
  123. package/src/View/Components/AdaptableIconComponent/index.js +16 -0
  124. package/src/View/Components/AdaptableIconComponent/useCustomIcon.d.ts +2 -0
  125. package/src/View/Components/AdaptableIconComponent/useCustomIcon.js +12 -0
  126. package/src/{components → View/Components}/Badge/index.d.ts +1 -1
  127. package/src/{components → View/Components}/Badge/index.js +1 -1
  128. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  129. package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
  130. package/src/View/Components/FilterForm/QuickFilterForm.js +3 -2
  131. package/src/View/Components/Panels/PanelWithButton.d.ts +2 -2
  132. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
  133. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
  134. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
  135. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  136. package/src/View/Components/PredicateEditor/PredicateEditor.js +4 -4
  137. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -2
  138. package/src/View/Dashboard/Dashboard.js +3 -3
  139. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -0
  140. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +13 -7
  141. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +7 -1
  142. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
  143. package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -2
  144. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  145. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.d.ts +2 -0
  146. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +26 -0
  147. package/src/View/QuickSearch/QuickSearchInput.d.ts +6 -0
  148. package/src/View/QuickSearch/QuickSearchInput.js +22 -0
  149. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +2 -5
  150. package/src/View/QuickSearch/QuickSearchViewPanel.js +5 -19
  151. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
  152. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
  153. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -5
  154. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +2 -9
  155. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -1
  156. package/src/View/UIHelper.d.ts +2 -2
  157. package/src/agGrid/ActionColumnRenderer.d.ts +0 -2
  158. package/src/agGrid/ActionColumnRenderer.js +21 -6
  159. package/src/agGrid/Adaptable.d.ts +7 -2
  160. package/src/agGrid/Adaptable.js +82 -37
  161. package/src/agGrid/BadgeRenderer.js +19 -20
  162. package/src/agGrid/CheckboxRenderer.js +1 -1
  163. package/src/agGrid/agGridHelper.js +4 -0
  164. package/src/agGrid/agGridMenuHelper.js +11 -4
  165. package/src/agGrid/attachAddaptableColumnTypes.d.ts +1 -0
  166. package/src/agGrid/attachAddaptableColumnTypes.js +5 -4
  167. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  168. package/src/components/Drawer/index.d.ts +6 -0
  169. package/src/components/Drawer/index.js +60 -0
  170. package/src/components/ExpressionEditor/index.js +4 -2
  171. package/src/components/Icon/index.d.ts +11 -0
  172. package/src/components/{AdaptableIconComponent → Icon}/index.js +10 -10
  173. package/src/components/IconSelector/IconSelector.js +3 -3
  174. package/src/components/SimpleButton/index.js +10 -10
  175. package/src/components/Toggle/Toggle.d.ts +2 -2
  176. package/src/components/Toggle/Toggle.js +2 -2
  177. package/src/components/icons/fdc3.d.ts +3 -0
  178. package/src/components/icons/fdc3.js +9 -0
  179. package/src/components/icons/index.d.ts +4 -4
  180. package/src/components/icons/index.js +9 -7
  181. package/src/metamodel/adaptable.metamodel.d.ts +117 -47
  182. package/src/metamodel/adaptable.metamodel.js +1 -1
  183. package/src/types.d.ts +9 -5
  184. package/version.d.ts +1 -1
  185. package/version.js +1 -1
  186. package/src/View/Components/AdaptableViewIcon/index.d.ts +0 -10
  187. package/src/View/Components/AdaptableViewIcon/index.js +0 -18
  188. package/src/components/AdaptableIconComponent/index.d.ts +0 -11
  189. /package/src/{PredefinedConfig/Common/FDC3Context.js → Api/Events/ScheduleTriggered.js} +0 -0
@@ -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
@@ -10,14 +10,16 @@ class ActionRowApiImpl extends ApiBase_1.ApiBase {
10
10
  this.internalApi = new ActionRowInternalApi_1.ActionRowInternalApi(adaptable);
11
11
  }
12
12
  getActionRowButtons() {
13
- const actionRowButtons = this.getActionRowOptions().actionRowButtons;
14
- return typeof actionRowButtons === 'function'
15
- ? actionRowButtons({
13
+ var actionRowButtons = this.getActionRowOptions().actionRowButtons;
14
+ if (typeof actionRowButtons === 'function') {
15
+ const context = {
16
16
  adaptableApi: this.getAdaptableApi(),
17
17
  userName: this.getOptions().userName,
18
18
  adaptableId: this.getOptions().adaptableId,
19
- })
20
- : actionRowButtons !== null && actionRowButtons !== void 0 ? actionRowButtons : [];
19
+ };
20
+ actionRowButtons = actionRowButtons(context);
21
+ }
22
+ return actionRowButtons !== null && actionRowButtons !== void 0 ? actionRowButtons : [];
21
23
  }
22
24
  displayEditActionRow(primaryKey) {
23
25
  const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(primaryKey);
@@ -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
  }
@@ -20,6 +20,7 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
20
20
  showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
21
21
  closeChartDefinition(chartDefinition: ChartDefinition): void;
22
22
  editChartDefinition(editedChartDefinition: ChartDefinition): void;
23
+ updateAgChart(chartDefinition: ChartDefinition): void;
23
24
  addChartDefinition(chart: ChartDefinition): void;
24
25
  getChartingOpenState(): {
25
26
  charts: {
@@ -74,6 +74,10 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
74
74
  }
75
75
  editChartDefinition(editedChartDefinition) {
76
76
  this.dispatchAction(ChartingRedux.ChartingEditChart(editedChartDefinition));
77
+ this.updateAgChart(editedChartDefinition);
78
+ }
79
+ updateAgChart(chartDefinition) {
80
+ this.adaptable.updateChart(chartDefinition);
77
81
  }
78
82
  addChartDefinition(chart) {
79
83
  this.dispatchAction(ChartingRedux.ChartingAddChart(chart));
@@ -26,7 +26,8 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
26
26
  getColumnWithColumnId(columnId: string, logWarning?: boolean): AdaptableColumn | undefined;
27
27
  hasNumberDataType(columnId: string): boolean;
28
28
  hasBooleanDataType(columnId: string): boolean;
29
- hasArrayDataType(columnId: string): boolean;
29
+ hasStringArrayDataType(columnId: string): boolean;
30
+ hasNumericArrayDataType(columnId: string): boolean;
30
31
  hasDateDataType(columnId: string): boolean;
31
32
  getColumnDataTypeForColumnId(columnId: string): AdaptableColumnDataType | undefined;
32
33
  getFriendlyNameForColumnId(columnId: string): string;
@@ -39,10 +40,12 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
39
40
  getColumnWithFriendlyName(columnFriendlyName: string, logWarning?: boolean): AdaptableColumn;
40
41
  getColumnsOfType(dataType: AdaptableColumnDataType): AdaptableColumn[];
41
42
  getNumericColumns(): AdaptableColumn[];
43
+ getNumericArrayColumns(): AdaptableColumn[];
42
44
  getNumberArrayColumns(): AdaptableColumn[];
43
45
  getTupleNumberArrayColumns(): AdaptableColumn[];
44
46
  getObjectNumberArrayColumns(): AdaptableColumn[];
45
47
  getStringColumns(): AdaptableColumn[];
48
+ getStringArrayColumns(): AdaptableColumn[];
46
49
  getDateColumns(): AdaptableColumn[];
47
50
  getBooleanColumns(): AdaptableColumn[];
48
51
  getArrayColumns(): AdaptableColumn[];
@@ -76,7 +76,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
76
76
  }
77
77
  isActionColumn(columnId) {
78
78
  var _a;
79
- return (((_a = this.adaptable.api.actionColumnApi.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((cc) => cc.columnId == columnId)) != null);
79
+ return (((_a = this.adaptable.api.actionColumnApi
80
+ .getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((cc) => cc.columnId == columnId)) != null);
80
81
  }
81
82
  getColumnWithColumnId(columnId, logWarning) {
82
83
  if (columnId == undefined) {
@@ -112,7 +113,14 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
112
113
  }
113
114
  return (column === null || column === void 0 ? void 0 : column.dataType) == 'Boolean';
114
115
  }
115
- hasArrayDataType(columnId) {
116
+ hasStringArrayDataType(columnId) {
117
+ const column = this.getColumnWithColumnId(columnId);
118
+ if (!column) {
119
+ return false;
120
+ }
121
+ return (column === null || column === void 0 ? void 0 : column.dataType) == 'StringArray';
122
+ }
123
+ hasNumericArrayDataType(columnId) {
116
124
  const column = this.getColumnWithColumnId(columnId);
117
125
  if (!column) {
118
126
  return false;
@@ -226,6 +234,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
226
234
  return this.getNumericColumns();
227
235
  case 'String':
228
236
  return this.getStringColumns();
237
+ case 'StringArray':
238
+ return this.getStringArrayColumns();
229
239
  case 'NumberArray':
230
240
  return this.getNumberArrayColumns();
231
241
  case 'ObjectNumberArray':
@@ -239,6 +249,11 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
239
249
  getNumericColumns() {
240
250
  return this.getColumns().filter((c) => c.dataType == 'Number');
241
251
  }
252
+ getNumericArrayColumns() {
253
+ return this.getNumberArrayColumns()
254
+ .concat(this.getTupleNumberArrayColumns())
255
+ .concat(this.getObjectNumberArrayColumns());
256
+ }
242
257
  getNumberArrayColumns() {
243
258
  return this.getColumns().filter((c) => c.dataType == 'NumberArray');
244
259
  }
@@ -251,6 +266,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
251
266
  getStringColumns() {
252
267
  return this.getColumns().filter((c) => c.dataType == 'String');
253
268
  }
269
+ getStringArrayColumns() {
270
+ return this.getColumns().filter((c) => c.dataType == 'String');
271
+ }
254
272
  getDateColumns() {
255
273
  return this.getColumns().filter((c) => c.dataType == 'Date');
256
274
  }
@@ -260,7 +278,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
260
278
  getArrayColumns() {
261
279
  return this.getColumns().filter((c) => c.dataType == 'NumberArray' ||
262
280
  c.dataType == 'TupleNumberArray' ||
263
- c.dataType == 'ObjectNumberArray');
281
+ c.dataType == 'ObjectNumberArray' ||
282
+ c.dataType == 'StringArray');
264
283
  }
265
284
  getSortableColumns() {
266
285
  return this.getColumns().filter((c) => c.sortable);
@@ -8,5 +8,6 @@ export declare class DataChangeHistoryApiImpl extends ApiBase implements DataCha
8
8
  suspendDataChangeHistory(): void;
9
9
  getDataChangeHistoryLog(): CellDataChangedInfo[];
10
10
  undoDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
11
+ clearDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
11
12
  openDataChangeHistorySettingsPanel(): void;
12
13
  }
@@ -40,6 +40,9 @@ class DataChangeHistoryApiImpl extends ApiBase_1.ApiBase {
40
40
  undoDataChangeHistoryEntry(dataChangeInfo) {
41
41
  this.dispatchAction((0, SystemRedux_1.SystemDataChangeHistoryUndo)(dataChangeInfo));
42
42
  }
43
+ clearDataChangeHistoryEntry(dataChangeInfo) {
44
+ this.dispatchAction((0, SystemRedux_1.SystemDataChangeHistoryClearRow)(dataChangeInfo));
45
+ }
43
46
  openDataChangeHistorySettingsPanel() {
44
47
  this.showModulePopup(ModuleConstants.DataChangeHistoryModuleId);
45
48
  }
@@ -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;
@@ -1,6 +1,6 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { PredicateApi } from '../PredicateApi';
3
- import { PredicateDefHandlerParams, PredicateModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
3
+ import { PredicateDefHandlerContext, PredicateModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
4
4
  import { AdaptablePredicate, AdaptablePredicateDef, AdaptableColumnPredicate } from '../../types';
5
5
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
6
6
  import { PredicateInternalApi } from '../Internal/PredicateInternalApi';
@@ -17,8 +17,8 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
17
17
  predicateToString(predicate: AdaptableColumnPredicate): string | undefined;
18
18
  isValidPredicate(predicate: AdaptableColumnPredicate | undefined): boolean;
19
19
  isEveryPredicateValid(predicates: AdaptablePredicate[]): boolean;
20
- handleColumnPredicate(predicate: AdaptableColumnPredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
21
- handleColumnPredicates(predicates: AdaptableColumnPredicate[], params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
22
- handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
23
- handlePredicates(predicates: AdaptablePredicate[], params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
20
+ handleColumnPredicate(predicate: AdaptableColumnPredicate | undefined, context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
21
+ handleColumnPredicates(predicates: AdaptableColumnPredicate[], context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
22
+ handlePredicate(predicate: AdaptablePredicate | undefined, context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
23
+ handlePredicates(predicates: AdaptablePredicate[], params: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
24
24
  }
@@ -70,22 +70,22 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
70
70
  isEveryPredicateValid(predicates) {
71
71
  return predicates.every((predicate) => this.isValidPredicate(predicate));
72
72
  }
73
- handleColumnPredicate(predicate, params, defaultReturn) {
73
+ handleColumnPredicate(predicate, context, defaultReturn) {
74
74
  if (!predicate.ColumnId) {
75
- return this.handlePredicate(predicate, params, defaultReturn);
75
+ return this.handlePredicate(predicate, context, defaultReturn);
76
76
  }
77
- const paramsForColumn = Object.assign(Object.assign({}, params), { column: this.adaptable.api.columnApi.getColumnWithColumnId(predicate.ColumnId),
77
+ const paramsForColumn = Object.assign(Object.assign({}, context), { column: this.adaptable.api.columnApi.getColumnWithColumnId(predicate.ColumnId),
78
78
  // value: params?.node?.data?.[predicate.ColumnId],
79
- value: this.adaptable.api.gridApi.getRawValueFromRowNode(params.node, predicate.ColumnId) });
79
+ value: this.adaptable.api.gridApi.getRawValueFromRowNode(context.node, predicate.ColumnId) });
80
80
  if ('oldValue' in paramsForColumn) {
81
81
  delete paramsForColumn.oldValue;
82
82
  }
83
83
  return this.handlePredicate(predicate, paramsForColumn, defaultReturn);
84
84
  }
85
- handleColumnPredicates(predicates, params, defaultReturn) {
86
- return predicates.every((predicate) => this.handleColumnPredicate(predicate, params, defaultReturn));
85
+ handleColumnPredicates(predicates, context, defaultReturn) {
86
+ return predicates.every((predicate) => this.handleColumnPredicate(predicate, context, defaultReturn));
87
87
  }
88
- handlePredicate(predicate, params, defaultReturn) {
88
+ handlePredicate(predicate, context, defaultReturn) {
89
89
  var _a;
90
90
  if (!predicate) {
91
91
  return defaultReturn;
@@ -98,7 +98,7 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
98
98
  return defaultReturn;
99
99
  }
100
100
  try {
101
- return predicateDef.handler(Object.assign({ api: this.getAdaptableApi(), inputs: predicate.Inputs }, params));
101
+ return predicateDef.handler(Object.assign({ adaptableApi: this.getAdaptableApi(), inputs: predicate.Inputs }, context));
102
102
  }
103
103
  catch (error) {
104
104
  console.error(`Error in predicate ${predicateDef.label}`, error);
@@ -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
  }