@adaptabletools/adaptable 11.1.15 → 11.2.0

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 (196) hide show
  1. package/base.css +2 -0
  2. package/bundle.cjs.js +98 -98
  3. package/index.css +3 -0
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/AlertOptions.d.ts +8 -2
  8. package/src/AdaptableOptions/DashboardOptions.d.ts +4 -3
  9. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/FilterOptions.d.ts +5 -4
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +56 -10
  12. package/src/AdaptableOptions/ToolPanelOptions.d.ts +4 -3
  13. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +18 -16
  14. package/src/Api/AdaptableApi.d.ts +10 -0
  15. package/src/Api/AlertApi.d.ts +3 -1
  16. package/src/Api/ConditionalStyleApi.d.ts +3 -1
  17. package/src/Api/ConfigApi.d.ts +3 -3
  18. package/src/Api/CustomSortApi.d.ts +3 -1
  19. package/src/Api/EventApi.d.ts +14 -0
  20. package/src/Api/Events/LayoutChanged.d.ts +1 -1
  21. package/src/Api/ExportApi.d.ts +16 -0
  22. package/src/Api/FinanceApi.d.ts +104 -3
  23. package/src/Api/FlashingCellApi.d.ts +3 -1
  24. package/src/Api/FormatColumnApi.d.ts +3 -1
  25. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.js +53 -0
  27. package/src/Api/Implementation/AlertApiImpl.d.ts +3 -1
  28. package/src/Api/Implementation/AlertApiImpl.js +7 -6
  29. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  30. package/src/Api/Implementation/ApiBase.js +5 -2
  31. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +3 -1
  32. package/src/Api/Implementation/ConditionalStyleApiImpl.js +5 -4
  33. package/src/Api/Implementation/ConfigApiImpl.js +5 -1
  34. package/src/Api/Implementation/CustomSortApiImpl.d.ts +3 -1
  35. package/src/Api/Implementation/CustomSortApiImpl.js +6 -5
  36. package/src/Api/Implementation/EventApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/EventApiImpl.js +4 -0
  38. package/src/Api/Implementation/ExportApiImpl.d.ts +3 -0
  39. package/src/Api/Implementation/ExportApiImpl.js +10 -0
  40. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -1
  41. package/src/Api/Implementation/FlashingCellApiImpl.js +8 -6
  42. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -1
  43. package/src/Api/Implementation/FormatColumnApiImpl.js +7 -6
  44. package/src/Api/Implementation/InternalApiImpl.d.ts +14 -5
  45. package/src/Api/Implementation/InternalApiImpl.js +75 -3
  46. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +3 -1
  47. package/src/Api/Implementation/PlusMinusApiImpl.js +6 -8
  48. package/src/Api/Implementation/ScheduleApiImpl.d.ts +17 -6
  49. package/src/Api/Implementation/ScheduleApiImpl.js +25 -12
  50. package/src/Api/Implementation/ShortcutApiImpl.d.ts +3 -1
  51. package/src/Api/Implementation/ShortcutApiImpl.js +5 -4
  52. package/src/Api/Implementation/ToolPanelApiImpl.d.ts +1 -2
  53. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  54. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  55. package/src/Api/InternalApi.d.ts +14 -7
  56. package/src/Api/LayoutApi.d.ts +4 -6
  57. package/src/Api/PlusMinusApi.d.ts +3 -1
  58. package/src/Api/ScheduleApi.d.ts +20 -6
  59. package/src/Api/ShortcutApi.d.ts +3 -1
  60. package/src/Api/ToolPanelApi.d.ts +1 -2
  61. package/src/PredefinedConfig/AlertState.d.ts +3 -3
  62. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +2 -5
  63. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -1
  64. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +4 -3
  65. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -1
  66. package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -0
  67. package/src/PredefinedConfig/Common/BaseContext.d.ts +10 -0
  68. package/src/PredefinedConfig/Common/BaseContext.js +2 -0
  69. package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -3
  70. package/src/PredefinedConfig/Common/FDC3Context.d.ts +9 -9
  71. package/src/PredefinedConfig/Common/Menu.d.ts +4 -13
  72. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
  73. package/src/PredefinedConfig/DataSourceState.d.ts +2 -2
  74. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  75. package/src/PredefinedConfig/SystemState.d.ts +1 -0
  76. package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -5
  77. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  78. package/src/Redux/ActionsReducers/SystemRedux.js +11 -1
  79. package/src/Redux/Store/AdaptableStore.d.ts +1 -0
  80. package/src/Redux/Store/AdaptableStore.js +6 -1
  81. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
  82. package/src/Strategy/AdaptableModuleBase.d.ts +5 -0
  83. package/src/Strategy/AdaptableModuleBase.js +9 -0
  84. package/src/Strategy/AlertModule.d.ts +4 -1
  85. package/src/Strategy/AlertModule.js +12 -4
  86. package/src/Strategy/CalculatedColumnModule.d.ts +3 -17
  87. package/src/Strategy/CalculatedColumnModule.js +2 -0
  88. package/src/Strategy/ConditionalStyleModule.d.ts +4 -1
  89. package/src/Strategy/ConditionalStyleModule.js +12 -4
  90. package/src/Strategy/CustomSortModule.d.ts +4 -1
  91. package/src/Strategy/CustomSortModule.js +10 -3
  92. package/src/Strategy/DataSourceModule.js +2 -0
  93. package/src/Strategy/ExportModule.d.ts +5 -3
  94. package/src/Strategy/ExportModule.js +10 -0
  95. package/src/Strategy/FlashingCellModule.d.ts +4 -1
  96. package/src/Strategy/FlashingCellModule.js +10 -5
  97. package/src/Strategy/FormatColumnModule.d.ts +4 -1
  98. package/src/Strategy/FormatColumnModule.js +10 -3
  99. package/src/Strategy/FreeTextColumnModule.js +2 -0
  100. package/src/Strategy/Interface/IModule.d.ts +6 -3
  101. package/src/Strategy/Interface/IScheduleModule.d.ts +1 -1
  102. package/src/Strategy/LayoutModule.d.ts +2 -1
  103. package/src/Strategy/LayoutModule.js +35 -2
  104. package/src/Strategy/PlusMinusModule.d.ts +4 -1
  105. package/src/Strategy/PlusMinusModule.js +15 -7
  106. package/src/Strategy/QueryModule.d.ts +2 -8
  107. package/src/Strategy/QueryModule.js +2 -0
  108. package/src/Strategy/ScheduleModule.d.ts +8 -4
  109. package/src/Strategy/ScheduleModule.js +16 -9
  110. package/src/Strategy/ShortcutModule.d.ts +4 -1
  111. package/src/Strategy/ShortcutModule.js +14 -4
  112. package/src/Strategy/StatusBarModule.d.ts +2 -1
  113. package/src/Strategy/StatusBarModule.js +2 -3
  114. package/src/Strategy/Utilities/getAlertBehaviourViewItems.d.ts +2 -2
  115. package/src/Strategy/Utilities/getAlertBehaviourViewItems.js +2 -2
  116. package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +4 -0
  117. package/src/Strategy/Utilities/getObjectTagsViewItems.js +13 -0
  118. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  119. package/src/Utilities/Emitter.d.ts +1 -0
  120. package/src/Utilities/Emitter.js +14 -0
  121. package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
  122. package/src/Utilities/Interface/MessagePopups.d.ts +3 -3
  123. package/src/Utilities/ObjectFactory.d.ts +2 -2
  124. package/src/Utilities/Services/AlertService.js +1 -1
  125. package/src/Utilities/Services/DataService.js +1 -1
  126. package/src/Utilities/Services/Interface/IModuleService.d.ts +1 -1
  127. package/src/Utilities/Services/ModuleService.d.ts +1 -1
  128. package/src/Utilities/Services/ModuleService.js +1 -0
  129. package/src/View/Alert/AlertStatusSubPanel.js +2 -1
  130. package/src/View/Alert/Wizard/AlertWizard.js +9 -0
  131. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -4
  132. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +9 -0
  133. package/src/View/ColorPicker.d.ts +1 -1
  134. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  135. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  136. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -0
  137. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  138. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  139. package/src/View/Components/FilterForm/QuickFilterForm.js +11 -7
  140. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  141. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  142. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
  143. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +22 -0
  144. package/src/View/Components/Popups/AdaptableToaster.js +12 -1
  145. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +3 -3
  146. package/src/View/Components/TagValueSelector/index.d.ts +13 -0
  147. package/src/View/Components/TagValueSelector/index.js +22 -0
  148. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -2
  149. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +9 -0
  150. package/src/View/CustomSort/Wizard/CustomSortWizard.js +9 -0
  151. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +1 -1
  152. package/src/View/DataSource/Wizard/DataSourceWizard.js +10 -0
  153. package/src/View/Export/ExportSelector.d.ts +4 -0
  154. package/src/View/Export/ExportSelector.js +75 -0
  155. package/src/View/Export/ExportViewPanel.js +6 -7
  156. package/src/View/Export/ReportExportDropdown.d.ts +2 -5
  157. package/src/View/Export/Wizard/NewReportWizard.js +9 -0
  158. package/src/View/Export/constants.d.ts +2 -0
  159. package/src/View/Export/constants.js +5 -0
  160. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +9 -0
  161. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
  162. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +9 -0
  163. package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -1
  164. package/src/View/GridInfo/GridOptionsComponent.js +0 -1
  165. package/src/View/Layout/LayoutCloneButton.d.ts +6 -0
  166. package/src/View/Layout/LayoutCloneButton.js +15 -0
  167. package/src/View/Layout/LayoutRadioSelector.d.ts +2 -1
  168. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  169. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -1
  170. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  171. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -0
  172. package/src/View/Query/Wizard/NamedQueryWizard.js +9 -0
  173. package/src/View/Schedule/Wizard/ScheduleWizard.js +10 -0
  174. package/src/View/Shortcut/Wizard/ShortcutWizard.js +10 -0
  175. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  176. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  177. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +8 -0
  178. package/src/View/Wizard/ObjectTagsWizardSection.js +22 -0
  179. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  180. package/src/View/Wizard/OnePageAdaptableWizard.js +12 -5
  181. package/src/agGrid/Adaptable.d.ts +14 -1
  182. package/src/agGrid/Adaptable.js +103 -68
  183. package/src/agGrid/agGridHelper.js +2 -1
  184. package/src/agGrid/createAgStatusPanelComponent.js +1 -0
  185. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +8 -7
  186. package/src/components/Datepicker/index.d.ts +1 -1
  187. package/src/components/ExpressionEditor/index.js +5 -2
  188. package/src/components/Input/index.d.ts +1 -1
  189. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  190. package/src/components/PopupWithFooter.d.ts +1 -1
  191. package/src/components/Textarea/index.d.ts +1 -1
  192. package/src/metamodel/adaptable.metamodel.d.ts +44 -2
  193. package/src/metamodel/adaptable.metamodel.js +235 -21
  194. package/src/types.d.ts +6 -5
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
package/index.css CHANGED
@@ -3691,6 +3691,9 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
3691
3691
  .ab-Adaptable-Object-List__Item__label:hover .ab-Adaptable-Object-List__Item__edit-property {
3692
3692
  visibility: visible; }
3693
3693
 
3694
+ .ab-StatusBar {
3695
+ display: flex; }
3696
+
3694
3697
  .ab-StatusBar__SubPanel {
3695
3698
  padding: var(--ab-cmp-adaptable-statusbar-sub-panel__padding);
3696
3699
  border: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "11.1.15",
3
+ "version": "11.2.0",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -56,6 +56,6 @@
56
56
  "uuid": "^3.3.2"
57
57
  },
58
58
  "peerDependencies": {
59
- "@ag-grid-community/all-modules": ">=27.1.0"
59
+ "@ag-grid-community/all-modules": ">=27.2.0"
60
60
  }
61
61
  }
@@ -1,2 +1,2 @@
1
- declare const _default: 1651496293230;
1
+ declare const _default: 1652269439987;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1651496293230;
3
+ exports.default = 1652269439987;
@@ -1,6 +1,6 @@
1
+ import { BaseContext } from '../../types';
1
2
  import { AlertButton, AlertDefinition } from '../PredefinedConfig/AlertState';
2
3
  import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
3
- import { ButtonContext } from '../PredefinedConfig/Common/AdaptableButton';
4
4
  import { AdaptableForm, AdaptableFormData } from '../PredefinedConfig/Common/AdaptableForm';
5
5
  import { CellDataChangedInfo } from '../types';
6
6
  /**
@@ -28,6 +28,12 @@ export interface AlertOptions {
28
28
  * @gridInfoItem
29
29
  */
30
30
  rowHighlightDuration?: number;
31
+ /**
32
+ * How long (in ms) the status-panel will be highlighted when an Alert Fires
33
+ *
34
+ * @defaultValue 2000
35
+ */
36
+ statusbarHighlightDuration?: number;
31
37
  /**
32
38
  * Custom onClick Handlers for Buttons (displayed in Alert Forms)
33
39
  */
@@ -77,7 +83,7 @@ export declare type AlertForm = {
77
83
  /**
78
84
  * Context required by functions when using an Alert Button
79
85
  */
80
- export interface AlertButtonContext extends ButtonContext {
86
+ export interface AlertButtonContext extends BaseContext {
81
87
  /**
82
88
  * Alert that has been triggered
83
89
  */
@@ -1,7 +1,8 @@
1
1
  import { AdaptableApi } from '../Api/AdaptableApi';
2
- import { AdaptableButton, ButtonContext } from '../PredefinedConfig/Common/AdaptableButton';
2
+ import { AdaptableButton } from '../PredefinedConfig/Common/AdaptableButton';
3
3
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
4
4
  import { DashboardState } from '../PredefinedConfig/DashboardState';
5
+ import { BaseContext } from '../types';
5
6
  import { AdaptableFrameworkComponent } from './AdaptableFrameworkComponent';
6
7
  /**
7
8
  * Options related to the Dashboard in Adaptable.
@@ -75,7 +76,7 @@ export interface CustomToolbar extends AdaptableObject {
75
76
  /**
76
77
  * Context required by functions when using a Dashboard Button
77
78
  */
78
- export interface DashboardButtonContext extends ButtonContext {
79
+ export interface DashboardButtonContext extends BaseContext {
79
80
  /**
80
81
  * Current Dashboard State
81
82
  */
@@ -84,7 +85,7 @@ export interface DashboardButtonContext extends ButtonContext {
84
85
  /**
85
86
  * Context required by functions when using a Custom Toolbar Button
86
87
  */
87
- export interface CustomToolbarButtonContext extends ButtonContext {
88
+ export interface CustomToolbarButtonContext extends BaseContext {
88
89
  /**
89
90
  * Custom Toolbar which hosts the Button
90
91
  */
@@ -1,6 +1,6 @@
1
1
  import { AdaptableForm, AdaptableFormData } from '../PredefinedConfig/Common/AdaptableForm';
2
2
  import { ReportData, Report, SystemReportNames } from '../PredefinedConfig/ExportState';
3
- import { ButtonContext } from '../PredefinedConfig/Common/AdaptableButton';
3
+ import { BaseContext } from '../types';
4
4
  /**
5
5
  * Options regarding Exporting data from AdapTable
6
6
  */
@@ -86,7 +86,7 @@ export interface CustomDestination {
86
86
  /**
87
87
  * Context required by functions when using an Export Button
88
88
  */
89
- export interface ExportButtonContext extends ButtonContext {
89
+ export interface ExportButtonContext extends BaseContext {
90
90
  /**
91
91
  * The exported report
92
92
  */
@@ -1,6 +1,7 @@
1
1
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
2
2
  import { FilterActionOnDataChange } from '../PredefinedConfig/Common/FilterActionOnDataChange';
3
- import { SystemFilterPredicateIds } from '../PredefinedConfig/FilterState';
3
+ import { SystemFilterPredicateId, SystemFilterPredicateIds } from '../PredefinedConfig/FilterState';
4
+ import { StrictExtract } from '../Utilities/Extensions/TypeExtensions';
4
5
  /**
5
6
  * Options for managing Filtering in AdapTable
6
7
  */
@@ -111,21 +112,21 @@ export interface FilterOptions {
111
112
  * @defaultValue Equals
112
113
  * @gridInfoItem
113
114
  */
114
- defaultNumericColumnFilter?: 'GreaterThan' | 'LessThan' | 'Equals' | 'NotEquals' | ((column: AdaptableColumn) => 'GreaterThan' | 'LessThan' | 'Equals' | 'NotEquals');
115
+ defaultNumericColumnFilter?: StrictExtract<SystemFilterPredicateId, 'GreaterThan' | 'LessThan' | 'Equals' | 'NotEquals' | 'Values'> | ((column: AdaptableColumn) => StrictExtract<SystemFilterPredicateId, 'GreaterThan' | 'LessThan' | 'Equals' | 'NotEquals' | 'Values'>);
115
116
  /**
116
117
  * Default filter type for string Columns
117
118
  *
118
119
  * @defaultValue Contains
119
120
  * @gridInfoItem
120
121
  */
121
- defaultStringColumnFilter?: 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | ((column: AdaptableColumn) => 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex');
122
+ defaultStringColumnFilter?: StrictExtract<SystemFilterPredicateId, 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Values'> | ((column: AdaptableColumn) => StrictExtract<SystemFilterPredicateId, 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Values'>);
122
123
  /**
123
124
  * Default filter type for date Columns
124
125
  *
125
126
  * @defaultValue On
126
127
  * @gridInfoItem
127
128
  */
128
- defaultDateColumnFilter?: 'After' | 'Before' | 'On' | 'NotOn' | ((column: AdaptableColumn) => 'After' | 'Before' | 'On' | 'NotOn');
129
+ defaultDateColumnFilter?: StrictExtract<SystemFilterPredicateId, 'After' | 'Before' | 'On' | 'NotOn' | 'Values'> | ((column: AdaptableColumn) => StrictExtract<SystemFilterPredicateId, 'After' | 'Before' | 'On' | 'NotOn' | 'Values'>);
129
130
  /**
130
131
  * Whether to open the Filter Form on the Values or Predicates tab
131
132
  *
@@ -1,3 +1,16 @@
1
+ import { AdaptableApi } from '../Api/AdaptableApi';
2
+ import { AlertDefinition } from '../PredefinedConfig/AlertState';
3
+ import { ConditionalStyle } from '../PredefinedConfig/ConditionalStyleState';
4
+ import { CustomSort } from '../PredefinedConfig/CustomSortState';
5
+ import { FlashingCellDefinition } from '../PredefinedConfig/FlashingCellState';
6
+ import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
7
+ import { PlusMinusNudge } from '../PredefinedConfig/PlusMinusState';
8
+ import { Shortcut } from '../PredefinedConfig/ShortcutState';
9
+ import { BaseSchedule } from '../PredefinedConfig/Common/Schedule';
10
+ import { Layout } from '../PredefinedConfig/LayoutState';
11
+ import { AdaptableModule } from '../PredefinedConfig/Common/Types';
12
+ import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
13
+ import { BaseContext } from '../../types';
1
14
  /**
2
15
  * Options for configuring Layouts; these manage Column visibility, order, sorting, grouping and width
3
16
  *
@@ -11,7 +24,9 @@ export interface LayoutOptions {
11
24
  */
12
25
  includeExpandedRowGroups?: boolean;
13
26
  /**
14
- * Whether RowGroups display all as expanded, all as closed or dynamically (i.e. saved in Layout)
27
+ * Whether Row Groups display all as expanded, all as closed or dynamically (i.e. saved in Layout)
28
+ * @defaultValue 'closed'
29
+ * @gridInfoItem
15
30
  */
16
31
  displayRowGroups?: 'dynamic' | 'expanded' | 'closed';
17
32
  /**
@@ -43,14 +58,45 @@ export interface LayoutOptions {
43
58
  */
44
59
  createDefaultLayout?: boolean;
45
60
  /**
46
- * Options to customize how layout items are shown in Settings Panel
61
+ * Customize how Layouts are displayed in Settings Panel
62
+ */
63
+ viewOptions?: LayoutViewOptions;
64
+ /**
65
+ * Checks if the provided AdaptableObject is available in the given Layout
66
+ */
67
+ isObjectAvailableInLayout?: (context: IsObjectAvailableInLayoutContext) => boolean;
68
+ /**
69
+ * Automatically generate a tag for each existing layout
47
70
  */
48
- view?: {
49
- /**
50
- * How many columns to display in the inline layout preview
51
- *
52
- * @defaultValue 10
53
- */
54
- maxColumnsToDisplay?: number;
55
- };
71
+ autoGenerateTagsForLayouts?: boolean | ((context: AutoGenerateTagsForLayoutsContext) => AdaptableObjectTag[]);
72
+ }
73
+ /**
74
+ * Customize how Layouts are displayed in Settings Panel
75
+ */
76
+ export interface LayoutViewOptions {
77
+ /**
78
+ * How many columns to display in inline Layout preview
79
+ *
80
+ * @defaultValue 10
81
+ */
82
+ maxColumnsToDisplay?: number;
83
+ }
84
+ /**
85
+ * Context for `LayoutOptions.isObjectAvailableInLayout` method
86
+ */
87
+ export interface IsObjectAvailableInLayoutContext {
88
+ abObject: LayoutAssociatedObject;
89
+ module: AdaptableModule;
90
+ layout: Layout;
91
+ adaptableApi: AdaptableApi;
92
+ }
93
+ /**
94
+ * Types of objects that can be associated with a Layout
95
+ */
96
+ export declare type LayoutAssociatedObject = AlertDefinition | ConditionalStyle | CustomSort | FlashingCellDefinition | FormatColumn | PlusMinusNudge | Shortcut | BaseSchedule;
97
+ /**
98
+ * Context for `LayoutOptions.autoGenerateTagsForLayouts` method
99
+ */
100
+ export interface AutoGenerateTagsForLayoutsContext extends BaseContext {
101
+ layouts: Layout[];
56
102
  }
@@ -1,8 +1,9 @@
1
1
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
2
2
  import { AdaptableApi } from '../Api/AdaptableApi';
3
3
  import { AdaptableFrameworkComponent } from './AdaptableFrameworkComponent';
4
- import { AdaptableButton, ButtonContext } from '../PredefinedConfig/Common/AdaptableButton';
4
+ import { AdaptableButton } from '../PredefinedConfig/Common/AdaptableButton';
5
5
  import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
6
+ import { BaseContext } from '../types';
6
7
  /**
7
8
  * Options related to managing the AdapTable ToolPanel Component
8
9
  */
@@ -97,13 +98,13 @@ export interface CustomToolPanel extends AdaptableObject {
97
98
  /**
98
99
  * Context required by functions when using a ToolPanel Button
99
100
  */
100
- export interface ToolPanelButtonContext extends ButtonContext {
101
+ export interface ToolPanelButtonContext extends BaseContext {
101
102
  /**
102
103
  * Current ToolPanel State
103
104
  */
104
105
  toolPanelState: ToolPanelState;
105
106
  }
106
- export interface CustomToolPanelButtonContext extends ButtonContext {
107
+ export interface CustomToolPanelButtonContext extends BaseContext {
107
108
  /**
108
109
  *The Custom ToolPanel which contains the button
109
110
  */
@@ -2,11 +2,11 @@ import { AdaptableIcon } from '../PredefinedConfig/Common/AdaptableIcon';
2
2
  import { DateInputOptions } from './DateInputOptions';
3
3
  import { AdaptableScope } from '../PredefinedConfig/Common/AdaptableScope';
4
4
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
5
- import { AdaptableButton, ButtonContext } from '../PredefinedConfig/Common/AdaptableButton';
5
+ import { AdaptableButton } from '../PredefinedConfig/Common/AdaptableButton';
6
6
  import { RowNode } from '@ag-grid-community/all-modules';
7
- import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
7
+ import { AdaptableObject, AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
8
8
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
9
- import { AdaptableApi, GridCell } from '../../types';
9
+ import { AdaptableApi, BaseContext, GridCell } from '../../types';
10
10
  /**
11
11
  * Options for managing the User Interface of AdapTable
12
12
  */
@@ -18,6 +18,7 @@ export interface UserInterfaceOptions {
18
18
  * @gridInfoItem
19
19
  */
20
20
  useCustomMacLikeScrollbars?: boolean;
21
+ testproperty?: any;
21
22
  /**
22
23
  * The application icon to appear in Dashboard and elsewhere (e.g. OpenFin notifications)
23
24
  *
@@ -70,6 +71,10 @@ export interface UserInterfaceOptions {
70
71
  * @gridInfoItem
71
72
  */
72
73
  styleClassNames?: string[];
74
+ /**
75
+ * Optional list of AdaptableObjectTags that can be associated with AdaptableObjects
76
+ */
77
+ objectTags?: AdaptableObjectTag[] | ((adaptableApi: AdaptableApi) => AdaptableObjectTag[]);
73
78
  /**
74
79
  * Optional list of Column Types - used primarily for special columns
75
80
  *
@@ -109,13 +114,13 @@ export interface PermittedValues extends BasePermittedValues {
109
114
  /**
110
115
  * Values to display: either hardcoded list or a function
111
116
  */
112
- values?: any[] | ((params: PermittedValuesParams) => any[]);
117
+ values?: any[] | ((context: PermittedValuesContext) => any[]);
113
118
  }
114
119
  /**
115
120
  * Used to define permitted values for inline column editor
116
121
  */
117
122
  export interface EditLookUpPermittedValues extends BasePermittedValues {
118
- values?: any[] | ((params: EditLookUpParams) => any[]);
123
+ values?: any[] | ((context: EditLookUpContext) => any[]);
119
124
  }
120
125
  /**
121
126
  * Used to define values inside the floating filter and floating filter (quick filter)
@@ -126,19 +131,19 @@ export interface FilterPermittedValues extends BasePermittedValues {
126
131
  * @defaultValue false
127
132
  */
128
133
  suppressFilterSearchBar?: boolean;
129
- values: (params: FilterPermittedValuesParams) => any[] | Promise<any[]>;
134
+ values: (context: FilterPermittedValuesContext) => any[] | Promise<any[]>;
130
135
  }
131
136
  /**
132
137
  * Custom column values for custom sort.
133
138
  */
134
139
  export interface CustomSortPermittedValues extends BasePermittedValues {
135
- values: (params: PermittedValuesParams) => any[] | Promise<any[]>;
140
+ values: (context: PermittedValuesContext) => any[] | Promise<any[]>;
136
141
  }
137
142
  /**
138
143
  * User to define permitted values when updating cells via bulk update
139
144
  */
140
145
  export interface BulkUpdatePermittedValues extends BasePermittedValues {
141
- values: (params: BulkUpdatePermittedValuesParams) => any[] | Promise<any[]>;
146
+ values: (context: BulkUpdatePermittedValuesContext) => any[] | Promise<any[]>;
142
147
  }
143
148
  /**
144
149
  * Use PermittedValues instead
@@ -173,7 +178,7 @@ export interface ActionColumn extends AdaptableObject {
173
178
  /**
174
179
  * Context required by functions when using an Action Column Button
175
180
  */
176
- export interface ActionColumnButtonContext extends ButtonContext {
181
+ export interface ActionColumnButtonContext extends BaseContext {
177
182
  /**
178
183
  * Action Column in question
179
184
  */
@@ -211,10 +216,7 @@ export interface ActionColumnSettings {
211
216
  */
212
217
  suppressMovable?: boolean;
213
218
  }
214
- export interface BaseParams {
215
- adaptableApi: AdaptableApi;
216
- }
217
- export interface EditLookUpParams extends BaseParams {
219
+ export interface EditLookUpContext extends BaseContext {
218
220
  /**
219
221
  * Column displaying the Edit LookUp
220
222
  */
@@ -224,13 +226,13 @@ export interface EditLookUpParams extends BaseParams {
224
226
  */
225
227
  gridCell: GridCell;
226
228
  }
227
- export interface PermittedValuesParams extends BaseParams {
229
+ export interface PermittedValuesContext extends BaseContext {
228
230
  /**
229
231
  * Column whose values are being displayed
230
232
  */
231
233
  column: AdaptableColumn;
232
234
  }
233
- export interface FilterPermittedValuesParams extends BaseParams {
235
+ export interface FilterPermittedValuesContext extends BaseContext {
234
236
  /**
235
237
  * Column hosting the filter form
236
238
  */
@@ -240,7 +242,7 @@ export interface FilterPermittedValuesParams extends BaseParams {
240
242
  */
241
243
  filter: string;
242
244
  }
243
- export interface BulkUpdatePermittedValuesParams extends BaseParams {
245
+ export interface BulkUpdatePermittedValuesContext extends BaseContext {
244
246
  /**
245
247
  * Column being edited via Bulk Update
246
248
  */
@@ -203,9 +203,19 @@ export interface AdaptableApi {
203
203
  internalApi: InternalApi;
204
204
  /**
205
205
  * Cleanup method - should be called only when using the vanilla javascript component, as framework components cleanup is performed when the component is destroyed/unmounted.
206
+ * This destroys the Adaptable instance.
206
207
  */
207
208
  destroy: (config?: {
208
209
  unmount: boolean;
209
210
  destroyApi?: boolean;
210
211
  }) => void;
212
+ isDestroyed: () => boolean;
213
+ /**
214
+ * Cleanup method that only cleans up this api instance (clears event listeners and sets every property to null), but does not destroy the Adaptable instance.
215
+ *
216
+ */
217
+ internalDestroySelf: (config?: {
218
+ unmount: boolean;
219
+ destroyApi?: boolean;
220
+ }) => void;
211
221
  }
@@ -24,7 +24,9 @@ export interface AlertApi {
24
24
  * Retrieves all Alert Definitions in Alert State
25
25
  * @returns alert definitions
26
26
  */
27
- getAlertDefinitions(): AlertDefinition[];
27
+ getAlertDefinitions(config?: {
28
+ includeLayoutNotAssociatedObjects?: boolean;
29
+ }): AlertDefinition[];
28
30
  /**
29
31
  * Retrieves alert definition by id
30
32
  * @param id alert definition id
@@ -12,7 +12,9 @@ export interface ConditionalStyleApi {
12
12
  /**
13
13
  * Gets all Conditional Styles in Adaptable State
14
14
  */
15
- getAllConditionalStyle(): ConditionalStyle[];
15
+ getAllConditionalStyle(config?: {
16
+ includeLayoutNotAssociatedObjects?: boolean;
17
+ }): ConditionalStyle[];
16
18
  /**
17
19
  * Get conditional style by id
18
20
  * @param id conditional style id
@@ -54,7 +54,7 @@ export interface ConfigApi {
54
54
  */
55
55
  copyUserStateToClipboard(): void;
56
56
  /**
57
- * Loads supplied user state, replacing (not merging) existing User State.
57
+ * Loads supplied user state, replacing (NOT merging) existing User(persisted) State.
58
58
  * @param state
59
59
  */
60
60
  loadUserState(state: {
@@ -67,11 +67,11 @@ export interface ConfigApi {
67
67
  /**
68
68
  * Retrieves the PERSISTED state in Adaptable
69
69
  *
70
- * @deprecated use {@link getPersistedState} instead
70
+ * @deprecated use `getPersistedState()` instead
71
71
  */
72
72
  getAllUserState(): ConfigState[];
73
73
  /**
74
- * Retrieves the PERSISTED state in Adaptable
74
+ * Retrieves the persisted state in Adaptable. This is the state that was last stored with the `StatusOptions.persistState()` function.
75
75
  */
76
76
  getPersistedState(): AdaptablePersistentState;
77
77
  /**
@@ -10,7 +10,9 @@ export interface CustomSortApi {
10
10
  /**
11
11
  * Retrieves all Custom Sorts in Adaptable State
12
12
  */
13
- getAllCustomSort(): CustomSort[];
13
+ getAllCustomSort(config?: {
14
+ includeLayoutNotAssociatedObjects?: boolean;
15
+ }): CustomSort[];
14
16
  /**
15
17
  * Retrieves Custom Sort by id
16
18
  * @param id Custom Sort id
@@ -205,11 +205,25 @@ export interface EventApi {
205
205
  * ```
206
206
  */
207
207
  on(eventName: 'AdaptableReady', callback: (adaptableReadyInfo: AdaptableReadyInfo) => void): VoidFunction;
208
+ /**
209
+ * Fired when Adaptable is destroyed
210
+ * @param eventName - AdaptableDestroy
211
+ * @param callback - A callback for listening to `AdaptableDestroy`
212
+ * @returns the unsubscribe function
213
+ *
214
+ * @example Use as
215
+ * ```
216
+ * adaptableApi.eventApi.on('AdaptableDestroy', () => { .....[do stuff]...})
217
+ * ```
218
+ */
219
+ on(eventName: 'AdaptableDestroy', callback: () => void): VoidFunction;
208
220
  /**
209
221
  * Unsubscribe from AdaptableReady
210
222
  */
211
223
  off(eventName: 'AdaptableReady', callback: (adaptableReadyInfo: AdaptableReadyInfo) => void): void;
212
224
  emitSync(eventName: 'DashboardChanged', data?: any): any[];
213
225
  emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
226
+ emitSync(eventName: 'AdaptableDestroy'): any[];
214
227
  emit(eventName: 'AdaptableReady' | 'AlertFired' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'AdaptableStateChanged' | 'DashboardChanged' | 'CellChanged' | 'GridDataChanged' | 'LayoutChanged' | 'LiveDataChanged' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'FDC3MessageSent', data?: any): Promise<any>;
228
+ destroy(): void;
215
229
  }
@@ -11,7 +11,7 @@ export interface LayoutChangedInfo extends BaseEventInfo {
11
11
  /**
12
12
  * Previous Layout State
13
13
  */
14
- oldLayoutState: LayoutState;
14
+ oldLayoutState: LayoutState | undefined;
15
15
  /**
16
16
  * Current Layout State
17
17
  */
@@ -34,6 +34,10 @@ export interface ExportApi {
34
34
  * @returns export destination
35
35
  */
36
36
  getDestinationByName(destinationName: ExportDestination | string): ExportDestination | CustomDestination | undefined;
37
+ /**
38
+ * Retrieves the current Export destination
39
+ */
40
+ getCurrentDestination(): ExportDestination | CustomDestination | undefined;
37
41
  /**
38
42
  * Retrieves name of currently selected Report
39
43
  */
@@ -64,6 +68,18 @@ export interface ExportApi {
64
68
  * @param destinationData any custom destination data
65
69
  */
66
70
  sendReport(reportName: string, destination: 'Excel' | 'CSV' | 'Clipboard' | 'JSON' | string): void;
71
+ /**
72
+ * Selects the report in the dashboard and statusbar UI
73
+ *
74
+ * @param reportName name of Report to select
75
+ */
76
+ selectReport(reportName: string): void;
77
+ /**
78
+ * Selects the report destination in the dashboard and statusbar UI
79
+ *
80
+ * @param destinationName name of Report to select
81
+ */
82
+ selectDestination(destinationName: string): void;
67
83
  /**
68
84
  * If this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible
69
85
  */
@@ -1,10 +1,111 @@
1
- import { FinancePluginOptions } from '../AdaptableOptions/FinancePluginOptions';
1
+ import { RowNode } from '@ag-grid-community/all-modules';
2
+ import { ContactColumn, ContactIntent, CountryColumn, FDC3Intent, FinancePluginOptions, InstrumentColumn, InstrumentIntent, OrganizationColumn, PositionColumn, PositionIntent } from '../AdaptableOptions/FinancePluginOptions';
3
+ import { ContactContext, ContactListContext, CountryContext, FDC3Context, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext } from '../types';
2
4
  /**
3
- * Provides run-time access to the OpenFin Plugin
5
+ * Provides run-time access to the Finance Plugin
4
6
  */
5
7
  export interface FinanceApi {
6
8
  /**
7
- * Retrieves the OpenFinPlugOptions provided in OpenFin Plugin
9
+ * Retrieves the FinancePlugOptions provided in the Finance Plugin
8
10
  */
9
11
  getPluginOptions(): FinancePluginOptions;
12
+ /**
13
+ * Creates Instrument Context
14
+ * @param instrumentColumn Instrument Column to create Context For
15
+ * @param rowNode Row Node to use for Context Data
16
+ */
17
+ createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: RowNode): InstrumentContext;
18
+ /**
19
+ * Creates Instrumentlist Context
20
+ * @param instrumentColumn Instrument Column to create Context For
21
+ * @param rowNode Row Nodes to use for Context Data
22
+ */
23
+ createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: RowNode[]): InstrumentListContext;
24
+ /**
25
+ * Creates Position Context
26
+ * @param instrumentColumn Position Column to create Context For
27
+ * @param rowNode Row Node to use for Context Data
28
+ */
29
+ createFDC3PositionContext(positionColumn: PositionColumn, rowNode: RowNode): PositionContext;
30
+ /**
31
+ * Creates Portfolio Context
32
+ * @param instrumentColumn Position Column to create Context For
33
+ * @param rowNode Row Nodes to use for Context Data
34
+ */
35
+ createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: RowNode[]): PortfolioContext;
36
+ /**
37
+ * Creates Contact Context
38
+ * @param instrumentColumn Contact Column to create Context For
39
+ * @param rowNode Row Node to use for Context Data
40
+ */
41
+ createFDC3ContactContext(contactColumn: ContactColumn, rowNode: RowNode): ContactContext;
42
+ /**
43
+ * Creates Contact List Context
44
+ * @param instrumentColumn Contact Column to create Context For
45
+ * @param rowNode Row Nodes to use for Context Data
46
+ */
47
+ createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: RowNode[]): ContactListContext;
48
+ /**
49
+ * Creates Organization Context
50
+ * @param instrumentColumn Organization Column to create Context For
51
+ * @param rowNode Row Node to use for Context Data
52
+ */
53
+ createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: RowNode): OrganizationContext;
54
+ /**
55
+ * Creates Country Context
56
+ * @param instrumentColumn Country Column to create Context For
57
+ * @param rowNode Row Node to use for Context Data
58
+ */
59
+ createFDC3CountryContext(countryColumn: CountryColumn, rowNode: RowNode): CountryContext;
60
+ /**
61
+ * Gets Instrument Column with given Id
62
+ * @param instrumentColumnId Column to Look
63
+ */
64
+ getInstrumentColumnById(instrumentColumnId: string): InstrumentColumn;
65
+ /**
66
+ * Gets Position Column with given Id
67
+ * @param instrumentColumnId Column to Look
68
+ */
69
+ getPositionColumnById(positionColumnId: string): PositionColumn;
70
+ /**
71
+ * Gets Contact Column with given Id
72
+ * @param instrumentColumnId Column to Look
73
+ */
74
+ getContactColumnById(contactColumnId: string): ContactColumn;
75
+ /**
76
+ * Gets Organization Column with given Id
77
+ * @param instrumentColumnId Column to Look
78
+ */
79
+ getOrganizationColumnById(organizationColumnId: string): OrganizationColumn;
80
+ /**
81
+ * Gets Country Column with given Id
82
+ * @param instrumentColumnId Column to Look
83
+ */
84
+ getCountryColumnById(countryColumnId: string): CountryColumn;
85
+ /**
86
+ * Publishes an FDC3 Message Event of type `Broadcast`
87
+ * @param context context for Event
88
+ */
89
+ publishBroadcastFDC3MessageEvent(context: FDC3Context): void;
90
+ /**
91
+ * Publishes an FDC3 Message Event of type `Raise Event`
92
+ * @param context context for Event
93
+ * @param intent FDC3 Intent to Raise
94
+ */
95
+ publishRaiseFDC3IntentEvent(context: FDC3Context, intent: FDC3Intent): void;
96
+ /**
97
+ * Checks whether the Instrument Intent is valid for Instrument Lists
98
+ * @param intent FDC3 Intent to check
99
+ */
100
+ isValidInstrumentlistIntent(intent: InstrumentIntent): boolean;
101
+ /**
102
+ * Checks whether the Contact Intent is valid for Contact Lists
103
+ * @param intent FDC3 Intent to check
104
+ */
105
+ isValidContactlistIntent(intent: ContactIntent): boolean;
106
+ /**
107
+ * Checks whether the Position Intent is valid for single Positions (and not Portfolios)
108
+ * @param intent FDC3 Intent to check
109
+ */
110
+ isValidPositionIntent(intent: PositionIntent): boolean;
10
111
  }
@@ -14,7 +14,9 @@ export interface FlashingCellApi {
14
14
  /**
15
15
  * Retrieves all Flashing cell Definitions in Flashing Cell State
16
16
  */
17
- getFlashingCellDefinitions(): FlashingCellDefinition[];
17
+ getFlashingCellDefinitions(config?: {
18
+ includeLayoutNotAssociatedObjects?: boolean;
19
+ }): FlashingCellDefinition[];
18
20
  /**
19
21
  * Retrieves Flashing cell Definition By Id
20
22
  * @param id Flashing Cell Definition Id