@adaptabletools/adaptable 16.0.9 → 16.1.0-canary.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 (260) hide show
  1. package/agGrid.d.ts +4 -0
  2. package/agGrid.js +4 -0
  3. package/base.css +16 -14
  4. package/base.css.map +1 -1
  5. package/bundle.cjs.js +171 -170
  6. package/index.css +18 -14
  7. package/index.css.map +1 -1
  8. package/package.json +1 -1
  9. package/publishTimestamp.d.ts +1 -1
  10. package/publishTimestamp.js +1 -1
  11. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +12 -1
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -2
  13. package/src/AdaptableOptions/ChartingOptions.d.ts +48 -3
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +17 -0
  15. package/src/AdaptableOptions/DataImportOptions.d.ts +57 -0
  16. package/src/AdaptableOptions/MenuOptions.d.ts +147 -8
  17. package/src/AdaptableOptions/MenuOptions.js +75 -0
  18. package/src/AdaptableOptions/NotesOptions.d.ts +23 -0
  19. package/src/AdaptableOptions/QuickSearchOptions.d.ts +8 -0
  20. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -0
  21. package/src/Api/AdaptableApi.d.ts +8 -3
  22. package/src/Api/ChartingApi.d.ts +30 -0
  23. package/src/Api/ColumnApi.d.ts +5 -0
  24. package/src/Api/ConfigApi.d.ts +4 -3
  25. package/src/Api/DataImportApi.d.ts +9 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.d.ts +4 -2
  27. package/src/Api/Implementation/AdaptableApiImpl.js +4 -2
  28. package/src/Api/Implementation/ApiBase.d.ts +2 -2
  29. package/src/Api/Implementation/ApiBase.js +2 -2
  30. package/src/Api/Implementation/ChartingApiImpl.d.ts +8 -2
  31. package/src/Api/Implementation/ChartingApiImpl.js +64 -0
  32. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  33. package/src/Api/Implementation/ColumnApiImpl.js +4 -0
  34. package/src/Api/Implementation/ConfigApiImpl.d.ts +3 -2
  35. package/src/Api/Implementation/ConfigApiImpl.js +9 -9
  36. package/src/Api/Implementation/DataImportApiImpl.d.ts +10 -0
  37. package/src/Api/Implementation/DataImportApiImpl.js +14 -0
  38. package/src/Api/Implementation/ExpressionApiImpl.js +1 -1
  39. package/src/Api/Implementation/NotesApiImpl.d.ts +20 -0
  40. package/src/Api/Implementation/NotesApiImpl.js +58 -0
  41. package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
  42. package/src/Api/Implementation/OptionsApiImpl.js +5 -2
  43. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +7 -1
  44. package/src/Api/Implementation/UserInterfaceApiImpl.js +30 -0
  45. package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
  46. package/src/Api/Internal/AdaptableInternalApi.js +0 -6
  47. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  48. package/src/Api/Internal/CalculatedColumnInternalApi.js +12 -0
  49. package/src/Api/Internal/ChartingInternalApi.d.ts +7 -0
  50. package/src/Api/Internal/ChartingInternalApi.js +45 -0
  51. package/src/Api/Internal/ColumnInternalApi.d.ts +3 -0
  52. package/src/Api/Internal/ColumnInternalApi.js +3 -0
  53. package/src/Api/Internal/DataImportInternalApi.d.ts +4 -0
  54. package/src/Api/Internal/DataImportInternalApi.js +49 -0
  55. package/src/Api/NotesAPi.d.ts +50 -0
  56. package/src/Api/NotesAPi.js +2 -0
  57. package/src/Api/OptionsApi.d.ts +8 -3
  58. package/src/Api/UserInterfaceApi.d.ts +22 -0
  59. package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
  60. package/src/PredefinedConfig/ChartingState.d.ts +22 -0
  61. package/src/PredefinedConfig/ChartingState.js +9 -0
  62. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +12 -0
  63. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  64. package/src/PredefinedConfig/Common/Menu.d.ts +2 -7
  65. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  66. package/src/PredefinedConfig/Common/Types.js +3 -1
  67. package/src/PredefinedConfig/NotesState.d.ts +59 -0
  68. package/src/PredefinedConfig/NotesState.js +2 -0
  69. package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
  70. package/src/PredefinedConfig/SystemState.d.ts +5 -3
  71. package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -3
  72. package/src/Redux/ActionsReducers/ChartingRedux.js +52 -5
  73. package/src/Redux/ActionsReducers/NotesRedux.d.ts +39 -0
  74. package/src/Redux/ActionsReducers/NotesRedux.js +88 -0
  75. package/src/Redux/ActionsReducers/SystemRedux.d.ts +10 -10
  76. package/src/Redux/ActionsReducers/SystemRedux.js +23 -22
  77. package/src/Redux/Store/AdaptableStore.js +19 -11
  78. package/src/Strategy/ChartingModule.d.ts +5 -2
  79. package/src/Strategy/ChartingModule.js +28 -7
  80. package/src/Strategy/ColumnInfoModule.d.ts +11 -0
  81. package/src/Strategy/ColumnInfoModule.js +47 -0
  82. package/src/Strategy/DataImportModule.d.ts +11 -0
  83. package/src/Strategy/DataImportModule.js +36 -0
  84. package/src/Strategy/DataSetModule.js +1 -0
  85. package/src/Strategy/Fdc3Module.js +3 -2
  86. package/src/Strategy/FilterModule.js +5 -0
  87. package/src/Strategy/GridInfoModule.js +13 -82
  88. package/src/Strategy/Interface/IModule.d.ts +2 -0
  89. package/src/Strategy/LayoutModule.js +1 -0
  90. package/src/Strategy/{CommentsModule.d.ts → NotesModule.d.ts} +6 -6
  91. package/src/Strategy/{CommentsModule.js → NotesModule.js} +41 -41
  92. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.d.ts +2 -0
  93. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +20 -18
  94. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  95. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
  96. package/src/Utilities/Constants/ModuleConstants.d.ts +9 -3
  97. package/src/Utilities/Constants/ModuleConstants.js +11 -5
  98. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -1
  99. package/src/Utilities/Defaults/DefaultSettingsPanel.js +3 -1
  100. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
  101. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +36 -10
  102. package/src/Utilities/Extensions/ObjectExtensions.d.ts +1 -0
  103. package/src/Utilities/Extensions/ObjectExtensions.js +5 -1
  104. package/src/Utilities/Helpers/AdaptableHelper.js +2 -0
  105. package/src/Utilities/Interface/MessagePopups.d.ts +2 -2
  106. package/src/Utilities/ObjectFactory.d.ts +2 -1
  107. package/src/Utilities/ObjectFactory.js +10 -2
  108. package/src/Utilities/Services/Interface/IEntitlementService.d.ts +4 -0
  109. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  110. package/src/Utilities/Services/ModuleService.js +2 -0
  111. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -2
  112. package/src/Utilities/Services/QueryLanguageService.js +1 -6
  113. package/src/Utilities/Services/ValidationService.js +15 -5
  114. package/src/View/AdaptableView.js +2 -2
  115. package/src/View/AdaptableViewFactory.js +7 -3
  116. package/src/View/Alert/Wizard/AlertButtonsEditor.js +20 -4
  117. package/src/View/Alert/Wizard/AlertWizard.js +14 -7
  118. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
  119. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +2 -0
  120. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +25 -46
  121. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +8 -0
  122. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +19 -0
  123. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +2 -0
  124. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +44 -3
  125. package/src/View/CalculatedColumn/utils.d.ts +2 -0
  126. package/src/View/CalculatedColumn/utils.js +14 -0
  127. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.d.ts +6 -0
  128. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +47 -0
  129. package/src/View/Charting/ChartingWizard/{PreviewChartSection.d.ts → AgChargingWizard/PreviewChartSection.d.ts} +1 -1
  130. package/src/View/Charting/ChartingWizard/{PreviewChartSection.js → AgChargingWizard/PreviewChartSection.js} +2 -2
  131. package/src/View/Charting/ChartingWizard/{SettingsSection.d.ts → AgChargingWizard/SettingsSection.d.ts} +1 -1
  132. package/src/View/Charting/ChartingWizard/{SettingsSection.js → AgChargingWizard/SettingsSection.js} +4 -4
  133. package/src/View/Charting/ChartingWizard/AgChargingWizard/index.d.ts +1 -0
  134. package/src/View/Charting/ChartingWizard/AgChargingWizard/index.js +4 -0
  135. package/src/View/Charting/ChartingWizard/ChartingWizard.d.ts +4 -3
  136. package/src/View/Charting/ChartingWizard/ChartingWizard.js +12 -39
  137. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.d.ts +6 -0
  138. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +59 -0
  139. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +9 -0
  140. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +25 -0
  141. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/index.d.ts +1 -0
  142. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/index.js +4 -0
  143. package/src/View/Charting/ChartingWizard/index.d.ts +1 -0
  144. package/src/View/Charting/ChartingWizard/index.js +4 -0
  145. package/src/View/Charting/DeleteChartButton.d.ts +2 -1
  146. package/src/View/Charting/DeleteChartButton.js +4 -2
  147. package/src/View/Charting/EditChartButton.d.ts +2 -1
  148. package/src/View/Charting/ShowChartButton.js +47 -16
  149. package/src/View/Charting/{useChartState.d.ts → useAgChartState.d.ts} +1 -1
  150. package/src/View/Charting/{useChartState.js → useAgChartState.js} +7 -7
  151. package/src/View/Charting/useChartingElements.d.ts +2 -1
  152. package/src/View/Charting/useChartingElements.js +36 -26
  153. package/src/View/Charting/useExternalChartState.d.ts +7 -0
  154. package/src/View/Charting/useExternalChartState.js +56 -0
  155. package/src/View/ColumnInfo/ColumnInfo.d.ts +5 -0
  156. package/src/View/ColumnInfo/ColumnInfo.js +185 -0
  157. package/src/View/ColumnInfo/ColumnInfoPopup.d.ts +3 -0
  158. package/src/View/ColumnInfo/ColumnInfoPopup.js +15 -0
  159. package/src/View/Components/AdaptableIconSelector/index.d.ts +1 -1
  160. package/src/View/Components/ExternalRenderer.d.ts +1 -0
  161. package/src/View/Components/ExternalRenderer.js +2 -1
  162. package/src/View/Components/Panels/PanelWithImage.js +3 -3
  163. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
  164. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +4 -1
  165. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -0
  166. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +1 -0
  167. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +12 -2
  168. package/src/View/Components/Selectors/ColumnSelector.js +1 -1
  169. package/src/View/DataImport/DataImportPopup.d.ts +6 -0
  170. package/src/View/DataImport/DataImportPopup.js +32 -0
  171. package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +8 -0
  172. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +176 -0
  173. package/src/View/DataImport/DataImportWizard/index.d.ts +1 -0
  174. package/src/View/DataImport/DataImportWizard/index.js +4 -0
  175. package/src/View/DataImport/DataImportWizard/sections/DataPreview.d.ts +10 -0
  176. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +154 -0
  177. package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +9 -0
  178. package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +24 -0
  179. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.d.ts +8 -0
  180. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.js +11 -0
  181. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +13 -0
  182. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +23 -0
  183. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.d.ts +8 -0
  184. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +13 -0
  185. package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.d.ts +1 -0
  186. package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.js +4 -0
  187. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.d.ts +11 -0
  188. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +35 -0
  189. package/src/View/DataImport/systemFileHandlers.d.ts +3 -0
  190. package/src/View/DataImport/systemFileHandlers.js +44 -0
  191. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -1
  192. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
  193. package/src/View/GridInfo/{AdaptableObjectsSummary.js → GridInfoPopup/AdaptableObjectsSummary.js} +2 -2
  194. package/src/View/GridInfo/{AdaptableOptionsComponent.d.ts → GridInfoPopup/AdaptableOptionsComponent.d.ts} +1 -1
  195. package/src/View/GridInfo/{AdaptableOptionsComponent.js → GridInfoPopup/AdaptableOptionsComponent.js} +6 -6
  196. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.d.ts +6 -0
  197. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +82 -0
  198. package/src/View/GridInfo/GridInfoPopup/index.d.ts +1 -0
  199. package/src/View/GridInfo/GridInfoPopup/index.js +4 -0
  200. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  201. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  202. package/src/View/Notes/NotesListing.d.ts +2 -0
  203. package/src/View/{Comments/CommentListing.js → Notes/NotesListing.js} +13 -14
  204. package/src/View/Notes/NotesPopup.d.ts +2 -0
  205. package/src/View/{Comments/CommentPopup.js → Notes/NotesPopup.js} +21 -21
  206. package/src/View/Shortcut/Wizard/ShortcutWizard.js +6 -1
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +14 -0
  208. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  209. package/src/View/Wizard/OnePageWizards.d.ts +1 -0
  210. package/src/View/Wizard/OnePageWizards.js +2 -2
  211. package/src/agGrid/Adaptable.d.ts +1 -1
  212. package/src/agGrid/Adaptable.js +28 -16
  213. package/src/agGrid/agGridHelper.d.ts +3 -3
  214. package/src/agGrid/agGridHelper.js +58 -30
  215. package/src/agGrid/agGridMenuHelper.d.ts +20 -9
  216. package/src/agGrid/agGridMenuHelper.js +292 -135
  217. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  218. package/src/components/ExpressionEditor/EditorInput.js +15 -6
  219. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
  220. package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +5 -5
  221. package/src/components/ExpressionEditor/editorButtonsQuantileAggregatedScalar.d.ts +2 -0
  222. package/src/components/ExpressionEditor/editorButtonsQuantileAggregatedScalar.js +25 -0
  223. package/src/components/ExpressionEditor/index.d.ts +1 -1
  224. package/src/components/ExpressionEditor/index.js +2 -1
  225. package/src/components/FileDroppable/index.d.ts +2 -1
  226. package/src/components/FileDroppable/index.js +8 -7
  227. package/src/components/icons/import.d.ts +3 -0
  228. package/src/components/icons/import.js +7 -0
  229. package/src/components/icons/index.js +4 -0
  230. package/src/components/icons/note.d.ts +3 -0
  231. package/src/components/icons/note.js +7 -0
  232. package/src/metamodel/adaptable.metamodel.d.ts +243 -61
  233. package/src/metamodel/adaptable.metamodel.js +1 -1
  234. package/src/parser/src/index.d.ts +2 -2
  235. package/src/parser/src/index.js +4 -4
  236. package/src/parser/src/tokenizer.d.ts +1 -1
  237. package/src/parser/src/tokenizer.js +14 -6
  238. package/src/parser/src/types.d.ts +2 -2
  239. package/src/types.d.ts +9 -8
  240. package/version.d.ts +1 -1
  241. package/version.js +1 -1
  242. package/src/AdaptableOptions/CommentsOptions.d.ts +0 -23
  243. package/src/Api/CommentsApi.d.ts +0 -50
  244. package/src/Api/Implementation/CommentsApiImpl.d.ts +0 -20
  245. package/src/Api/Implementation/CommentsApiImpl.js +0 -58
  246. package/src/PredefinedConfig/CommentsState.d.ts +0 -59
  247. package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -39
  248. package/src/Redux/ActionsReducers/CommentsRedux.js +0 -92
  249. package/src/View/Comments/CommentListing.d.ts +0 -2
  250. package/src/View/Comments/CommentPopup.d.ts +0 -2
  251. package/src/View/GridInfo/ColumnInfoComponent.d.ts +0 -20
  252. package/src/View/GridInfo/ColumnInfoComponent.js +0 -176
  253. package/src/View/GridInfo/GridInfoPopup.d.ts +0 -16
  254. package/src/View/GridInfo/GridInfoPopup.js +0 -117
  255. package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -16
  256. package/src/View/GridInfo/GridOptionsComponent.js +0 -36
  257. /package/src/AdaptableOptions/{CommentsOptions.js → DataImportOptions.js} +0 -0
  258. /package/src/{Api/CommentsApi.js → AdaptableOptions/NotesOptions.js} +0 -0
  259. /package/src/{PredefinedConfig/CommentsState.js → Api/DataImportApi.js} +0 -0
  260. /package/src/View/GridInfo/{AdaptableObjectsSummary.d.ts → GridInfoPopup/AdaptableObjectsSummary.d.ts} +0 -0
@@ -1,33 +1,44 @@
1
1
  import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
2
- import { AdaptableColumn, BaseContext } from '../types';
2
+ import { AdaptableColumn, AdaptableIcon, AdaptableModule, BaseContext } from '../types';
3
3
  /**
4
4
  * Options for managing menus in AdapTable
5
5
  */
6
6
  export interface MenuOptions<TData = any> {
7
7
  /**
8
- * Show Adaptable Context Menu (or specific items); can be boolean value or function invoked for each menu item
8
+ * Adds 'Ungroup' Column Menu item to a row grouped column menu
9
9
  *
10
10
  * @defaultValue true
11
11
  * @gridInfoItem
12
12
  */
13
- showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext<TData>) => boolean);
13
+ showUngroupColumnMenuItem?: boolean;
14
14
  /**
15
- * Show Adaptable Column Menu (or specific items); can be boolean value or function invoked for each menu item
15
+ * Customised Context Menu. Default context menu items are available in the provided context.
16
+ */
17
+ customContextMenu?: (menuContext: CustomContextMenuContext<TData>) => CustomContextMenuItem[];
18
+ /**
19
+ * Customised Column Menu. Default column menu items are available in the provided context.
20
+ */
21
+ customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
22
+ /**
23
+ * Show Adaptable Context Menu (or specific items); can be boolean value or function invoked for each menu item
16
24
  *
25
+ * @deprecated Use `customContextMenu` instead
17
26
  * @defaultValue true
18
27
  * @gridInfoItem
19
28
  */
20
- showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext<TData>) => boolean);
29
+ showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext<TData>) => boolean);
21
30
  /**
22
- * Adds 'Ungroup' Column Menu item to a row grouped column
31
+ * Show Adaptable Column Menu (or specific items); can be boolean value or function invoked for each menu item
23
32
  *
33
+ * @deprecated Use `customContextMenu` instead
24
34
  * @defaultValue true
25
35
  * @gridInfoItem
26
36
  */
27
- showUngroupColumnMenuItem?: boolean;
37
+ showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext<TData>) => boolean);
28
38
  /**
29
39
  * Order in which AG Grid, AdapTable and User Menu sections will appear in Column Menu (list or function)
30
40
  *
41
+ * @deprecated Use `customColumnMenu` instead
31
42
  * @defaultValue 'aggrid', 'adaptable', 'user'
32
43
  * @gridInfoItem
33
44
  */
@@ -35,19 +46,143 @@ export interface MenuOptions<TData = any> {
35
46
  /**
36
47
  * Order in which AG Grid, AdapTable and User Menu sections will appear in Context Menu (list or function)
37
48
  *
49
+ * @deprecated Use `customContextMenu` instead
38
50
  * @defaultValue 'aggrid', 'adaptable', 'user'
39
51
  * @gridInfoItem
40
52
  */
41
53
  contextMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
42
54
  /**
43
55
  * User-defined Menu Items to add to the Column Menu
56
+ *
57
+ * @deprecated Use `customColumnMenu` instead
44
58
  */
45
59
  columnMenuItems?: UserMenuItem<ColumnMenuContext>[];
46
60
  /**
47
- * User-defined Menu Items to add to the Context Menu
61
+ * Customised Context Menu. Default context menu items are available in the provided context.
62
+ *
63
+ * @deprecated Use `customContextMenu` instead
48
64
  */
49
65
  contextMenuItems?: UserMenuItem<ContextMenuContext>[];
50
66
  }
67
+ /**
68
+ * Context info provided when building Custom Context Menus
69
+ */
70
+ export interface CustomContextMenuContext<TData = any> extends ContextMenuContext<TData> {
71
+ /**
72
+ * Default AG Grid Menu Items
73
+ */
74
+ defaultAgGridMenuItems: AgGridMenuItem<AgGridContextMenuItemType>[];
75
+ /**
76
+ * Default Adaptable Menu Items
77
+ */
78
+ defaultAdaptableMenuItems: AdaptableSystemMenuItem[];
79
+ }
80
+ /**
81
+ * Context info provided when building Custom Context Menus
82
+ */
83
+ export interface CustomColumnMenuContext<TData = any> extends ColumnMenuContext<TData> {
84
+ /**
85
+ * Default AG Grid Menu Items
86
+ */
87
+ defaultAgGridMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
88
+ /**
89
+ * Default Adaptable Menu Items
90
+ */
91
+ defaultAdaptableMenuItems: AdaptableSystemMenuItem[];
92
+ }
93
+ /**
94
+ * Custom Context Menu Item
95
+ */
96
+ export declare type CustomContextMenuItem = AgGridMenuItem<AgGridContextMenuItemType> | AdaptableSystemMenuItem | UserContextMenuItem | '-' | {
97
+ menuType: 'Group';
98
+ label: string;
99
+ subMenuItems: CustomContextMenuItem[];
100
+ disabled?: boolean;
101
+ icon?: AdaptableIcon;
102
+ };
103
+ /**
104
+ * Custom Column Menu Item
105
+ */
106
+ export declare type CustomColumnMenuItem = AgGridMenuItem<AgGridColumnMenuItemType> | AdaptableSystemMenuItem | UserColumnMenuItem | '-' | {
107
+ menuType: 'Group';
108
+ label: string;
109
+ subMenuItems: CustomColumnMenuItem[];
110
+ disabled?: boolean;
111
+ icon?: AdaptableIcon;
112
+ };
113
+ /**
114
+ * Menu Item that is provided by AG Grid
115
+ */
116
+ export interface AgGridMenuItem<MENU_TYPE> {
117
+ menuType: 'AgGrid';
118
+ name: MENU_TYPE;
119
+ }
120
+ /**
121
+ * Context Menu Item that is provided by AdapTable
122
+ */
123
+ export interface AdaptableSystemMenuItem extends AdaptableMenuItem {
124
+ menuType: 'Adaptable';
125
+ }
126
+ /**
127
+ * Context Menu Item that is provided by User
128
+ */
129
+ export interface UserContextMenuItem {
130
+ menuType: 'User';
131
+ /**
132
+ * Text to appear in the Menu Item
133
+ */
134
+ label: string;
135
+ /**
136
+ * Function invoked when the Menu Item is clicked
137
+ */
138
+ onClick?: (menuContext: ContextMenuContext) => void;
139
+ /**
140
+ * Whether menu item is disabled
141
+ */
142
+ disabled?: boolean;
143
+ /**
144
+ * Whether menu item is hidden
145
+ */
146
+ hidden?: boolean;
147
+ /**
148
+ * Optional icon to display
149
+ */
150
+ icon?: AdaptableIcon;
151
+ /**
152
+ * Array of Menu Items, enabling limitless levels of menus
153
+ */
154
+ subMenuItems?: CustomContextMenuItem[];
155
+ }
156
+ /**
157
+ * Context Menu Item that is provided by User
158
+ */
159
+ export interface UserColumnMenuItem {
160
+ menuType: 'User';
161
+ /**
162
+ * Text to appear in the Menu Item
163
+ */
164
+ label: string;
165
+ /**
166
+ * Function invoked when the Menu Item is clicked
167
+ */
168
+ onClick?: (menuContext: ColumnMenuContext) => void;
169
+ /**
170
+ * Whether menu item is disabled
171
+ */
172
+ disabled?: boolean;
173
+ /**
174
+ * Whether menu item is hidden
175
+ */
176
+ hidden?: boolean;
177
+ /**
178
+ * Optional icon to display
179
+ */
180
+ icon?: AdaptableIcon;
181
+ /**
182
+ * Array of Menu Items, enabling limitless levels of menus
183
+ */
184
+ subMenuItems?: CustomColumnMenuItem[];
185
+ }
51
186
  /**
52
187
  * Context used when ordering Menu Sections
53
188
  */
@@ -57,3 +192,7 @@ export interface MenuOrderContext extends BaseContext {
57
192
  */
58
193
  column: AdaptableColumn;
59
194
  }
195
+ export declare type AgGridContextMenuItemType = 'autoSizeAll' | 'expandAll' | 'contractAll' | 'copy' | 'copyWithHeaders' | 'cut' | 'paste' | 'resetColumns' | 'export' | 'csvExport' | 'excelExport' | 'chartRange' | 'pivotChart';
196
+ export declare type AgGridColumnMenuItemType = 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll';
197
+ export declare const DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER: AdaptableModule[];
198
+ export declare const DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER: AdaptableModule[];
@@ -1,2 +1,77 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
6
+ exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER = [
7
+ ModuleConstants.SettingsPanelModuleId,
8
+ ModuleConstants.LayoutModuleId,
9
+ ModuleConstants.FlashingCellModuleId,
10
+ ModuleConstants.FormatColumnModuleId,
11
+ ModuleConstants.StyledColumnModuleId,
12
+ ModuleConstants.CustomSortModuleId,
13
+ ModuleConstants.CellSummaryModuleId,
14
+ ModuleConstants.Fdc3ModuleId,
15
+ ModuleConstants.PlusMinusModuleId,
16
+ ModuleConstants.DashboardModuleId,
17
+ ModuleConstants.SystemStatusModuleId,
18
+ ModuleConstants.GridInfoModuleId,
19
+ ModuleConstants.ColumnInfoModuleId,
20
+ ModuleConstants.DataImportModuleId,
21
+ ModuleConstants.AlertModuleId,
22
+ ModuleConstants.CalculatedColumnModuleId,
23
+ ModuleConstants.ExportModuleId,
24
+ ModuleConstants.FilterModuleId,
25
+ ModuleConstants.SmartEditModuleId,
26
+ ModuleConstants.BulkUpdateModuleId,
27
+ ModuleConstants.TeamSharingModuleId,
28
+ ModuleConstants.DataChangeHistoryModuleId,
29
+ ModuleConstants.DataSetModuleId,
30
+ ModuleConstants.FreeTextColumnModuleId,
31
+ ModuleConstants.QueryModuleId,
32
+ ModuleConstants.QuickSearchModuleId,
33
+ ModuleConstants.ScheduleModuleId,
34
+ ModuleConstants.ShortcutModuleId,
35
+ ModuleConstants.StateManagementModuleId,
36
+ ModuleConstants.ToolPanelModuleId,
37
+ ModuleConstants.ThemeModuleId,
38
+ ModuleConstants.StatusBarModuleId,
39
+ ModuleConstants.ChartingModuleId,
40
+ ModuleConstants.NotesModuleId,
41
+ ];
42
+ exports.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = [
43
+ ModuleConstants.SettingsPanelModuleId,
44
+ ModuleConstants.LayoutModuleId,
45
+ ModuleConstants.FlashingCellModuleId,
46
+ ModuleConstants.FormatColumnModuleId,
47
+ ModuleConstants.StyledColumnModuleId,
48
+ ModuleConstants.CustomSortModuleId,
49
+ ModuleConstants.CellSummaryModuleId,
50
+ ModuleConstants.Fdc3ModuleId,
51
+ ModuleConstants.PlusMinusModuleId,
52
+ ModuleConstants.DashboardModuleId,
53
+ ModuleConstants.SystemStatusModuleId,
54
+ ModuleConstants.GridInfoModuleId,
55
+ ModuleConstants.ColumnInfoModuleId,
56
+ ModuleConstants.DataImportModuleId,
57
+ ModuleConstants.AlertModuleId,
58
+ ModuleConstants.CalculatedColumnModuleId,
59
+ ModuleConstants.ExportModuleId,
60
+ ModuleConstants.FilterModuleId,
61
+ ModuleConstants.SmartEditModuleId,
62
+ ModuleConstants.BulkUpdateModuleId,
63
+ ModuleConstants.TeamSharingModuleId,
64
+ ModuleConstants.DataChangeHistoryModuleId,
65
+ ModuleConstants.DataSetModuleId,
66
+ ModuleConstants.FreeTextColumnModuleId,
67
+ ModuleConstants.QueryModuleId,
68
+ ModuleConstants.QuickSearchModuleId,
69
+ ModuleConstants.ScheduleModuleId,
70
+ ModuleConstants.ShortcutModuleId,
71
+ ModuleConstants.StateManagementModuleId,
72
+ ModuleConstants.ToolPanelModuleId,
73
+ ModuleConstants.ThemeModuleId,
74
+ ModuleConstants.StatusBarModuleId,
75
+ ModuleConstants.ChartingModuleId,
76
+ ModuleConstants.NotesModuleId,
77
+ ];
@@ -0,0 +1,23 @@
1
+ import { BaseContext } from '../../types';
2
+ /**
3
+ * Options for managing AdapTable Notes
4
+ */
5
+ export interface NotesOptions<TData = any> {
6
+ /**
7
+ * Whether a cell can be noted on
8
+ */
9
+ isCellNotable?: (context: NotableCellContext) => boolean;
10
+ }
11
+ /**
12
+ * Context used when determining if a Note can be added to a Cell
13
+ */
14
+ export interface NotableCellContext extends BaseContext {
15
+ /**
16
+ * Value in Primary Key Column
17
+ */
18
+ primaryKeyValue: string;
19
+ /**
20
+ * Column where Note will be displayed
21
+ */
22
+ columnId: string;
23
+ }
@@ -39,6 +39,14 @@ export interface QuickSearchOptions<TData = any> {
39
39
  * @noCodeItem
40
40
  */
41
41
  runQuickSearchOnRowGroups?: boolean;
42
+ /**
43
+ * Include Pivot columns when Quick Searching (highlight only)
44
+ *
45
+ * @defaultValue true
46
+ * @gridInfoItem
47
+ * @noCodeItem
48
+ */
49
+ runQuickSearchOnPivotColumns?: boolean;
42
50
  /**
43
51
  * Run Quick Search using Case Sensitivity
44
52
  *
@@ -82,6 +82,7 @@ export interface UserInterfaceOptions<TData = any> {
82
82
  /**
83
83
  * Which sections to show in the Grid Info Screen
84
84
  * @defaultValue ['GridSummary', 'AdaptableOptions', 'ColumnInfo', 'AdaptableObjects']
85
+ * @deprecated
85
86
  */
86
87
  gridInfoSections?: GridInfoSections;
87
88
  /**
@@ -218,6 +219,7 @@ export interface BulkUpdatePermittedValuesContext<TData = any> extends Permitted
218
219
  export declare type GridInfoSections = GridInfoSection[];
219
220
  /**
220
221
  * Tabs available in the Grid Info Settings Panel
222
+ * @deprecated
221
223
  */
222
224
  export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo' | 'AdaptableObjects';
223
225
  /**
@@ -41,8 +41,9 @@ import { StyledColumnApi } from './StyledColumnApi';
41
41
  import { OptionsApi } from './OptionsApi';
42
42
  import { ActionColumnApi } from './ActionColumnApi';
43
43
  import { ActionRowApi } from './ActionRowApi';
44
- import { CommentsApi } from './CommentsApi';
44
+ import { NotesApi } from './NotesAPi';
45
45
  import { Fdc3Api } from './Fdc3Api';
46
+ import { DataImportApi } from './DataImportApi';
46
47
  /**
47
48
  *
48
49
  * The `AdaptableApi` provides developers with run-time access to AdapTable.
@@ -223,9 +224,13 @@ export interface AdaptableApi {
223
224
  */
224
225
  userInterfaceApi: UserInterfaceApi;
225
226
  /**
226
- * Provides access to the Comments Module
227
+ * Provides access to the Notes Module
227
228
  */
228
- commentsApi: CommentsApi;
229
+ notesApi: NotesApi;
230
+ /**
231
+ * Provides access to the Data Import Module
232
+ */
233
+ dataImportApi: DataImportApi;
229
234
  /**
230
235
  * Manages the FDC3 capabilities of AdapTable
231
236
  */
@@ -1,4 +1,5 @@
1
1
  import { ChartModel, ChartRef } from '@ag-grid-community/core';
2
+ import { ExternalChartDefinition } from '../PredefinedConfig/ChartingState';
2
3
  import { ChartContainer, ChartDefinition } from '../types';
3
4
  import { ChartingOpenState } from './Events/ChartChanged';
4
5
  /**
@@ -21,6 +22,10 @@ export interface ChartingApi {
21
22
  * Retrieves all adaptable Chart definitions
22
23
  */
23
24
  getChartDefinitions(): ChartDefinition[];
25
+ /**
26
+ * Retrieves all adaptable external Chart definitions
27
+ */
28
+ getExternalChartDefinitions(): ExternalChartDefinition[];
24
29
  /**
25
30
  * Retrieves Chart definition by uuid
26
31
  * @param uuid Chart uuid
@@ -90,4 +95,29 @@ export interface ChartingApi {
90
95
  * @param chartDefinition Chart to add
91
96
  */
92
97
  getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
98
+ /**
99
+ * Add new external chart definition
100
+ *
101
+ * @param chartDef external chart definition
102
+ * @param options
103
+ * @param options.saveStrategy whether to ask the user to provide a name for the chart
104
+ */
105
+ addExternalChartDefinition(chartDef: ExternalChartDefinition, options?: {
106
+ saveStrategy: 'auto' | 'manual';
107
+ }): void;
108
+ /**
109
+ * Edit existing external chart definition
110
+ * @param chartDef external chart definition
111
+ */
112
+ editExternalChartDefinition(chartDef: ExternalChartDefinition): void;
113
+ /**
114
+ * Delete external chart definition
115
+ * @param chartDefinition chart definition
116
+ */
117
+ deleteExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
118
+ /**
119
+ * Retrieves Chart definition by name
120
+ * @param name Chart name
121
+ */
122
+ getExternalChartDefinitionByName(name: string): ExternalChartDefinition | undefined;
93
123
  }
@@ -202,6 +202,11 @@ export interface ColumnApi {
202
202
  * @param columnId ColumnId to lookup
203
203
  */
204
204
  getFriendlyNameForColumnId(columnId: string): string;
205
+ /**
206
+ * Checks if Column has already been created
207
+ * @param columnId ColumnId to check
208
+ */
209
+ doesColumnExist(columnId: string): boolean;
205
210
  /**
206
211
  * Retrieves Friendly Names for given ColumnIds
207
212
  * @param columnIds ColumnIds to lookup
@@ -15,8 +15,9 @@ import { AdaptablePersistentState, AdaptableState } from '../PredefinedConfig/Ad
15
15
  import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
16
16
  import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
17
17
  import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
18
- import { AdaptableSearchState, AdaptableSortState, CommentsState, PredefinedConfig, ScheduleState } from '../types';
18
+ import { AdaptableSearchState, AdaptableSortState, PredefinedConfig, ScheduleState } from '../types';
19
19
  import { QueryState } from '../PredefinedConfig/QueryState';
20
+ import { NotesState } from '../PredefinedConfig/NotesState';
20
21
  /**
21
22
  * Range of functions to access Predefined Config and Adaptable State
22
23
  */
@@ -105,10 +106,10 @@ export interface ConfigApi {
105
106
  */
106
107
  getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
107
108
  /**
108
- * Returns Comment section of Adaptable State
109
+ * Returns Notes section of Adaptable State
109
110
  * @param returnJson return as JSON rather than object
110
111
  */
111
- getCommentsState(returnJson?: boolean): CommentsState;
112
+ getNotesState(returnJson?: boolean): NotesState;
112
113
  /**
113
114
  * Returns Custom Sort section of Adaptable State
114
115
  * @param returnJson return as JSON rather than object
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Provides run-time access to the Settings Panel
3
+ **/
4
+ export interface DataImportApi {
5
+ /**
6
+ * Opens the Data Import Wizard
7
+ */
8
+ openImportWizard(): void;
9
+ }
@@ -42,8 +42,9 @@ import { StatusBarApi } from '../StatusBarApi';
42
42
  import { StyledColumnApi } from '../StyledColumnApi';
43
43
  import { ActionColumnApi } from '../ActionColumnApi';
44
44
  import { ActionRowApi } from '../ActionRowApi';
45
- import { CommentsApi } from '../CommentsApi';
45
+ import { NotesApi } from '../NotesAPi';
46
46
  import { Fdc3Api } from '../Fdc3Api';
47
+ import { DataImportApiImpl } from './DataImportApiImpl';
47
48
  export declare class AdaptableApiImpl implements AdaptableApi {
48
49
  protected adaptable: IAdaptable;
49
50
  internalApi: AdaptableInternalApi;
@@ -90,8 +91,9 @@ export declare class AdaptableApiImpl implements AdaptableApi {
90
91
  dataChangeHistoryApi: DataChangeHistoryApi;
91
92
  chartingApi: ChartingApi;
92
93
  statusBarApi: StatusBarApi;
93
- commentsApi: CommentsApi;
94
+ notesApi: NotesApi;
94
95
  fdc3Api: Fdc3Api;
96
+ dataImportApi: DataImportApiImpl;
95
97
  private destroyed;
96
98
  constructor(adaptable: IAdaptable);
97
99
  /**
@@ -45,8 +45,9 @@ 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 CommentsApiImpl_1 = require("./CommentsApiImpl");
48
+ const NotesApiImpl_1 = require("./NotesApiImpl");
49
49
  const Fdc3ApiImpl_1 = require("./Fdc3ApiImpl");
50
+ const DataImportApiImpl_1 = require("./DataImportApiImpl");
50
51
  class AdaptableApiImpl {
51
52
  constructor(adaptable) {
52
53
  this.adaptable = adaptable;
@@ -95,8 +96,9 @@ class AdaptableApiImpl {
95
96
  this.dataChangeHistoryApi = new DataChangeHistoryApiImpl_1.DataChangeHistoryApiImpl(adaptable);
96
97
  this.chartingApi = new ChartingApiImpl_1.ChartingApiImpl(adaptable);
97
98
  this.statusBarApi = new StatusBarApiImpl_1.StatusBarApiImpl(adaptable);
98
- this.commentsApi = new CommentsApiImpl_1.CommentsApiImpl(adaptable);
99
+ this.notesApi = new NotesApiImpl_1.NotesApiImpl(adaptable);
99
100
  this.fdc3Api = new Fdc3ApiImpl_1.Fdc3ApiImpl(adaptable);
101
+ this.dataImportApi = new DataImportApiImpl_1.DataImportApiImpl(adaptable);
100
102
  // adaptable internal api
101
103
  this.internalApi = new AdaptableInternalApi_1.AdaptableInternalApi(adaptable);
102
104
  }
@@ -20,7 +20,7 @@ import { ExpressionApi } from '../ExpressionApi';
20
20
  import { CalendarOptions } from '../../AdaptableOptions/CalendarOptions';
21
21
  import { Fdc3Api } from '../Fdc3Api';
22
22
  import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
23
- import { CommentOptions } from '../../AdaptableOptions/CommentsOptions';
23
+ import { NotesOptions } from '../../AdaptableOptions/NotesOptions';
24
24
  export declare abstract class ApiBase {
25
25
  protected adaptable: IAdaptable;
26
26
  /**
@@ -64,7 +64,7 @@ export declare abstract class ApiBase {
64
64
  protected getActionColumnOptions(): ActionColumnOptions;
65
65
  protected getActionRowOptions(): ActionRowOptions;
66
66
  protected getColumnOptions(): ColumnOptions;
67
- protected getCommentOptions(): CommentOptions;
67
+ protected getNotesOptions(): NotesOptions;
68
68
  protected getCustomSortOptions(): CustomSortOptions;
69
69
  protected getDataSetOptions(): DataSetOptions;
70
70
  protected getCalendarOptions(): CalendarOptions;
@@ -102,8 +102,8 @@ class ApiBase {
102
102
  getColumnOptions() {
103
103
  return this.getOptions().columnOptions;
104
104
  }
105
- getCommentOptions() {
106
- return this.getOptions().commentOptions;
105
+ getNotesOptions() {
106
+ return this.getOptions().notesOptions;
107
107
  }
108
108
  getCustomSortOptions() {
109
109
  return this.getOptions().customSortOptions;
@@ -2,10 +2,9 @@ import { ChartModel, ChartRef } from '@ag-grid-community/core';
2
2
  import { ChartingApi } from '../ChartingApi';
3
3
  import { ApiBase } from './ApiBase';
4
4
  import { ChartContainer, ChartDefinition } from '../../types';
5
- import { ChartingInternalApi } from '../Internal/ChartingInternalApi';
6
5
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
6
+ import { ExternalChartDefinition } from '../../PredefinedConfig/ChartingState';
7
7
  export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
8
- internalApi: ChartingInternalApi;
9
8
  constructor(adaptable: IAdaptable);
10
9
  isChartingEnabled(): boolean;
11
10
  getCurrentChartModels(): ChartModel[];
@@ -32,4 +31,11 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
32
31
  getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
33
32
  setChartReadOnly(chartDefinition: ChartDefinition): void;
34
33
  setChartEditable(chartDefinition: ChartDefinition): void;
34
+ addExternalChartDefinition(chartDefinition: ExternalChartDefinition, options: {
35
+ saveStrategy: 'auto' | 'manual';
36
+ }): void;
37
+ editExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
38
+ deleteExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
39
+ getExternalChartDefinitions(): ExternalChartDefinition<unknown>[];
40
+ getExternalChartDefinitionByName(name: string): ExternalChartDefinition | undefined;
35
41
  }
@@ -115,5 +115,69 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
115
115
  setChartEditable(chartDefinition) {
116
116
  this.dispatchAction(ChartingRedux.ChartingEditChart(Object.assign(Object.assign({}, chartDefinition), { IsReadOnly: false })));
117
117
  }
118
+ addExternalChartDefinition(chartDefinition, options) {
119
+ var _a, _b, _c;
120
+ const saveStrategy = (_a = options === null || options === void 0 ? void 0 : options.saveStrategy) !== null && _a !== void 0 ? _a : 'manual';
121
+ if (saveStrategy === 'auto') {
122
+ this.dispatchAction(ChartingRedux.ChartingAddExternalChart(Object.assign(Object.assign({}, chartDefinition), { Name: (_b = chartDefinition.Name) !== null && _b !== void 0 ? _b : this.internalApi.getUniqueChartName() })));
123
+ }
124
+ else {
125
+ const alert = {
126
+ alertType: 'generic',
127
+ header: 'Save chart',
128
+ message: 'Do you want to save this Chart?',
129
+ alertDefinition: Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyAlertDefinition()), { MessageType: 'Info', AlertProperties: {
130
+ DisplayNotification: true,
131
+ NotificationDuration: 'always',
132
+ }, AlertForm: {
133
+ Buttons: [
134
+ {
135
+ Label: 'Save',
136
+ Action: (context) => {
137
+ this.dispatchAction(ChartingRedux.ChartingAddExternalChart(Object.assign(Object.assign({}, chartDefinition), { Name: context.formData.name || this.internalApi.getUniqueChartName() })));
138
+ },
139
+ ButtonStyle: {
140
+ tone: 'info',
141
+ variant: 'raised',
142
+ },
143
+ },
144
+ {
145
+ Label: 'Dismiss',
146
+ ButtonStyle: {
147
+ tone: 'neutral',
148
+ variant: 'raised',
149
+ },
150
+ },
151
+ ],
152
+ fields: [
153
+ {
154
+ name: 'name',
155
+ label: 'Name',
156
+ fieldType: 'text',
157
+ defaultValue: (_c = chartDefinition.Name) !== null && _c !== void 0 ? _c : '',
158
+ },
159
+ ],
160
+ } }),
161
+ };
162
+ this.adaptable.api.alertApi.showAdaptableAlert(alert);
163
+ }
164
+ }
165
+ editExternalChartDefinition(chartDefinition) {
166
+ this.dispatchAction(ChartingRedux.ChartingEditExternalChart(chartDefinition));
167
+ }
168
+ deleteExternalChartDefinition(chartDefinition) {
169
+ this.dispatchAction(ChartingRedux.ChartingDeleteExternalChart(chartDefinition));
170
+ }
171
+ getExternalChartDefinitions() {
172
+ return this.getAdaptableState().Charting.ExternalChartDefinitions;
173
+ }
174
+ getExternalChartDefinitionByName(name) {
175
+ if (StringExtensions_1.default.IsNotNullOrEmpty(name)) {
176
+ let chartDefinition = this.getExternalChartDefinitions().find((c) => c.Name == name);
177
+ if (this.checkItemExists(chartDefinition, name, 'Chart')) {
178
+ return chartDefinition;
179
+ }
180
+ }
181
+ }
118
182
  }
119
183
  exports.ChartingApiImpl = ChartingApiImpl;
@@ -32,6 +32,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
32
32
  hasDateDataType(columnId: string): boolean;
33
33
  getColumnDataTypeForColumnId(columnId: string): AdaptableColumnDataType | undefined;
34
34
  getFriendlyNameForColumnId(columnId: string): string;
35
+ doesColumnExist(columnId: string): boolean;
35
36
  getFriendlyNamesForColumnIds(columnIds: string[]): string[];
36
37
  getColumnIdForFriendlyName(friendlyName: string): string;
37
38
  getColumnIdsForFriendlyNames(friendlyNames: string[]): string[];
@@ -164,6 +164,10 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
164
164
  this.logMissingColumnWarning(columnId);
165
165
  return result;
166
166
  }
167
+ doesColumnExist(columnId) {
168
+ const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
169
+ return foundColumn ? true : false;
170
+ }
167
171
  getFriendlyNamesForColumnIds(columnIds) {
168
172
  const friendlyNames = [];
169
173
  if (ArrayExtensions_1.default.IsNullOrEmpty(columnIds)) {