@adaptabletools/adaptable 10.0.3 → 10.0.4-canary.3

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 (267) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/base.css +16 -6
  4. package/bundle.cjs.js +350 -0
  5. package/index.css +20 -6
  6. package/package.json +1 -5
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +14 -12
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
  12. package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
  13. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
  15. package/src/AdaptableOptions/EditOptions.d.ts +2 -3
  16. package/src/AdaptableOptions/FilterOptions.d.ts +8 -8
  17. package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
  18. package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
  19. package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
  20. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  21. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +29 -12
  22. package/src/Api/AdaptableApi.d.ts +12 -12
  23. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  24. package/src/Api/ColumnApi.d.ts +16 -5
  25. package/src/Api/EventApi.d.ts +1 -1
  26. package/src/Api/Events/AdaptableReady.d.ts +5 -8
  27. package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
  28. package/src/Api/Events/AlertFired.d.ts +2 -1
  29. package/src/Api/Events/BaseEventInfo.d.ts +10 -0
  30. package/src/Api/Events/BaseEventInfo.js +2 -0
  31. package/src/Api/Events/CellChanged.d.ts +2 -1
  32. package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
  33. package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
  34. package/src/Api/Events/DashboardChanged.d.ts +2 -1
  35. package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
  36. package/src/Api/Events/GridDataChanged.d.ts +2 -1
  37. package/src/Api/Events/LayoutChanged.d.ts +2 -1
  38. package/src/Api/Events/LiveDataChanged.d.ts +2 -1
  39. package/src/Api/Events/SearchChanged.d.ts +2 -1
  40. package/src/Api/Events/SelectionChanged.d.ts +2 -1
  41. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
  42. package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
  43. package/src/Api/Events/ThemeChanged.d.ts +2 -1
  44. package/src/Api/GridApi.d.ts +10 -10
  45. package/src/Api/Implementation/AlertApiImpl.js +17 -17
  46. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  47. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  48. package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -3
  49. package/src/Api/Implementation/ColumnApiImpl.js +43 -44
  50. package/src/Api/Implementation/ConfigApiImpl.js +0 -24
  51. package/src/Api/Implementation/DashboardApiImpl.js +2 -1
  52. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  53. package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
  54. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -2
  55. package/src/Api/Implementation/GridApiImpl.d.ts +2 -2
  56. package/src/Api/Implementation/GridApiImpl.js +14 -13
  57. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -2
  58. package/src/Api/Implementation/InternalApiImpl.js +5 -5
  59. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  60. package/src/Api/Implementation/LayoutApiImpl.js +19 -3
  61. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
  62. package/src/Api/Implementation/PluginsApiImpl.js +1 -1
  63. package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
  64. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  65. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
  66. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  67. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  68. package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
  69. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
  70. package/src/Api/Implementation/UserInterfaceApiImpl.js +18 -13
  71. package/src/Api/InternalApi.d.ts +2 -2
  72. package/src/Api/LayoutApi.d.ts +7 -0
  73. package/src/Api/PluginsApi.d.ts +1 -7
  74. package/src/Api/TeamSharingApi.d.ts +1 -1
  75. package/src/Api/ThemeApi.d.ts +2 -2
  76. package/src/Api/UserInterfaceApi.d.ts +6 -5
  77. package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
  78. package/src/PredefinedConfig/AlertState.d.ts +2 -3
  79. package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
  80. package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
  81. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  82. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
  83. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  84. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
  85. package/src/PredefinedConfig/Common/AdaptablePredicate.js +3 -3
  86. package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
  87. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
  88. package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
  89. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
  90. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  91. package/src/PredefinedConfig/Common/Types.js +9 -7
  92. package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
  93. package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
  94. package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
  95. package/src/PredefinedConfig/ExportState.d.ts +3 -3
  96. package/src/PredefinedConfig/FilterState.d.ts +2 -2
  97. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  98. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  99. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  100. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
  101. package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
  102. package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
  103. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  104. package/src/PredefinedConfig/ThemeState.d.ts +5 -1
  105. package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
  106. package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
  107. package/src/Redux/ActionsReducers/GridRedux.js +2 -2
  108. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
  109. package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
  110. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  111. package/src/Redux/DeadRedux.d.ts +4 -8
  112. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
  113. package/src/Redux/Store/AdaptableStore.d.ts +3 -3
  114. package/src/Redux/Store/AdaptableStore.js +21 -16
  115. package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
  116. package/src/Strategy/AdaptableModuleBase.js +8 -8
  117. package/src/Strategy/AlertModule.d.ts +2 -2
  118. package/src/Strategy/AlertModule.js +13 -105
  119. package/src/Strategy/BulkUpdateModule.d.ts +2 -2
  120. package/src/Strategy/BulkUpdateModule.js +7 -7
  121. package/src/Strategy/CalculatedColumnModule.js +1 -1
  122. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  123. package/src/Strategy/CellSummaryModule.js +3 -3
  124. package/src/Strategy/ConditionalStyleModule.js +3 -3
  125. package/src/Strategy/CustomSortModule.js +2 -2
  126. package/src/Strategy/DashboardModule.d.ts +2 -2
  127. package/src/Strategy/DataChangeHistoryModule.js +2 -2
  128. package/src/Strategy/ExportModule.d.ts +2 -2
  129. package/src/Strategy/ExportModule.js +1 -1
  130. package/src/Strategy/FilterModule.d.ts +2 -2
  131. package/src/Strategy/FilterModule.js +4 -4
  132. package/src/Strategy/FormatColumnModule.js +6 -6
  133. package/src/Strategy/FreeTextColumnModule.js +1 -1
  134. package/src/Strategy/GridInfoModule.d.ts +2 -2
  135. package/src/Strategy/Interface/IModule.d.ts +2 -2
  136. package/src/Strategy/LayoutModule.d.ts +2 -2
  137. package/src/Strategy/LayoutModule.js +22 -9
  138. package/src/Strategy/PlusMinusModule.js +8 -9
  139. package/src/Strategy/SmartEditModule.d.ts +2 -2
  140. package/src/Strategy/SmartEditModule.js +8 -9
  141. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  142. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  143. package/src/Utilities/Constants/GeneralConstants.js +2 -1
  144. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  145. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  146. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -7
  147. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  148. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  149. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  150. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  151. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  152. package/src/Utilities/Interface/Preview.d.ts +2 -1
  153. package/src/Utilities/ObjectFactory.js +1 -1
  154. package/src/Utilities/Services/DataService.js +5 -5
  155. package/src/Utilities/Services/LicenseService.js +16 -2
  156. package/src/Utilities/Services/MetamodelService.js +0 -1
  157. package/src/Utilities/Services/ReportService.js +12 -11
  158. package/src/Utilities/Services/ValidationService.js +4 -5
  159. package/src/View/AdaptableViewFactory.d.ts +2 -1
  160. package/src/View/AdaptableViewFactory.js +2 -0
  161. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
  162. package/src/View/Alert/AlertPopup.js +1 -1
  163. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  164. package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -3
  165. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  166. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  167. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  168. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
  169. package/src/View/Components/ColumnSelector/index.js +2 -2
  170. package/src/View/Components/FilterForm/FilterForm.js +18 -20
  171. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -1
  172. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  173. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -17
  174. package/src/View/Components/NewScopeComponent.js +1 -1
  175. package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
  176. package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
  177. package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
  178. package/src/View/Components/PreviewResultsPanel.js +1 -1
  179. package/src/View/Components/RangesComponent.js +2 -2
  180. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  181. package/src/View/Components/Selectors/ColumnValueSelector.js +4 -4
  182. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
  183. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  184. package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
  185. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  186. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  187. package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
  188. package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
  189. package/src/View/CustomSort/CustomSortPopup.js +2 -2
  190. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  191. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
  192. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
  193. package/src/View/Dashboard/Dashboard.js +2 -3
  194. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
  195. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
  196. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
  197. package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
  198. package/src/View/Export/ExportViewPanel.js +6 -6
  199. package/src/View/Filter/FilterSummary.js +2 -2
  200. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  201. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  202. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  203. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +1 -1
  204. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +2 -2
  205. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  206. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  207. package/src/View/GridInfo/GridOptionsComponent.js +1 -1
  208. package/src/View/Layout/LayoutViewPanel.js +2 -2
  209. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  210. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  211. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  212. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  213. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  214. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  215. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  216. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  217. package/src/View/Query/QueryViewPanel.js +3 -3
  218. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  219. package/src/View/Schedule/SchedulePopup.js +3 -3
  220. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
  221. package/src/View/SmartEdit/SmartEditPopup.js +1 -1
  222. package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
  223. package/src/View/StateManagement/StateManagementPopup.js +21 -114
  224. package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
  225. package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
  226. package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
  227. package/src/View/StateManagement/components/ClearButton.js +9 -0
  228. package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
  229. package/src/View/StateManagement/components/ExportDropdown.js +43 -0
  230. package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
  231. package/src/View/StateManagement/components/LoadButton.js +38 -0
  232. package/src/View/StateManagement/handleExportState.d.ts +1 -0
  233. package/src/View/StateManagement/handleExportState.js +22 -0
  234. package/src/View/Theme/ThemeViewPanel.js +1 -1
  235. package/src/agGrid/ActionColumnRenderer.js +1 -1
  236. package/src/agGrid/Adaptable.d.ts +9 -8
  237. package/src/agGrid/Adaptable.js +174 -132
  238. package/src/agGrid/agGridHelper.d.ts +4 -4
  239. package/src/agGrid/agGridHelper.js +46 -46
  240. package/src/agGrid/agGridMenuHelper.d.ts +15 -13
  241. package/src/agGrid/agGridMenuHelper.js +55 -47
  242. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
  243. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
  244. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
  245. package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
  246. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
  247. package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
  248. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
  249. package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
  250. package/src/components/Datepicker/index.js +9 -5
  251. package/src/components/ExpressionEditor/index.js +7 -7
  252. package/src/components/Modal/index.d.ts +1 -1
  253. package/src/components/OverlayTrigger/index.js +3 -3
  254. package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
  255. package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
  256. package/src/components/ProgressIndicator/ProgressIndicator.js +1 -1
  257. package/src/components/icons/index.js +2 -0
  258. package/src/components/icons/upload.d.ts +3 -0
  259. package/src/components/icons/upload.js +8 -0
  260. package/src/metamodel/adaptable.metamodel.d.ts +104 -50
  261. package/src/metamodel/adaptable.metamodel.js +358 -300
  262. package/src/types.d.ts +2 -2
  263. package/version.d.ts +1 -1
  264. package/version.js +1 -1
  265. package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
  266. package/src/PredefinedConfig/DeprecatedState.js +0 -5
  267. package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
@@ -20,6 +20,10 @@ export declare const LAYOUT_SELECT = "LAYOUT_SELECT";
20
20
  * @ReduxAction A Layout has been (auto)saved
21
21
  */
22
22
  export declare const LAYOUT_SAVE = "LAYOUT_SAVE";
23
+ /**
24
+ * @ReduxAction A new caption / header has been set for a Column in the Layout
25
+ */
26
+ export declare const LAYOUT_SET_COLUMN_CAPTION = "LAYOUT_SET_COLUMN_CAPTION";
23
27
  export declare const LAYOUT_UPDATE_CURRENT_DRAFT = "LAYOUT_UPDATE_CURRENT_DRAFT";
24
28
  /**
25
29
  * @ReduxAction Layout Module is ready
@@ -36,14 +40,19 @@ export interface LayoutDeleteAction extends LayoutAction {
36
40
  }
37
41
  export interface LayoutSaveAction extends LayoutAction {
38
42
  }
43
+ export interface LayoutSetColumnCaptionAction extends Redux.Action {
44
+ layoutName: string;
45
+ columnId: string;
46
+ caption: string;
47
+ }
39
48
  export interface LayoutUpdateCurrentDraftAction extends LayoutAction {
40
49
  }
41
50
  export interface LayoutSelectAction extends Redux.Action {
42
51
  layoutName: string;
43
52
  }
44
- export interface LayoutIncludeVendorStateAction extends Redux.Action {
53
+ export interface LayoutIncludeAgGridStateAction extends Redux.Action {
45
54
  }
46
- export interface LayoutExcludeVendorStateAction extends Redux.Action {
55
+ export interface LayoutExcludeAgGridStateAction extends Redux.Action {
47
56
  }
48
57
  export interface LayoutReadyAction extends Redux.Action {
49
58
  layoutState: LayoutState;
@@ -51,6 +60,7 @@ export interface LayoutReadyAction extends Redux.Action {
51
60
  export declare const LayoutAdd: (layout: Layout) => LayoutAddAction;
52
61
  export declare const LayoutDelete: (layout: Layout) => LayoutDeleteAction;
53
62
  export declare const LayoutSave: (layout: Layout) => LayoutSaveAction;
63
+ export declare const LayoutSetColumnCaption: (layoutName: string, columnId: string, caption: string) => LayoutSetColumnCaptionAction;
54
64
  export declare const LayoutSelect: (layoutName: string) => LayoutSelectAction;
55
65
  export declare const LayoutUpdateCurrentDraft: (layout: Layout) => LayoutUpdateCurrentDraftAction;
56
66
  export declare const LayoutReady: (layoutState: LayoutState) => LayoutReadyAction;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutReducer = exports.LayoutReady = exports.LayoutUpdateCurrentDraft = exports.LayoutSelect = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LAYOUT_READY = exports.LAYOUT_UPDATE_CURRENT_DRAFT = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = void 0;
3
+ exports.LayoutReducer = exports.LayoutReady = exports.LayoutUpdateCurrentDraft = exports.LayoutSelect = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LAYOUT_READY = exports.LAYOUT_UPDATE_CURRENT_DRAFT = exports.LAYOUT_SET_COLUMN_CAPTION = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
6
6
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
@@ -24,6 +24,10 @@ exports.LAYOUT_SELECT = 'LAYOUT_SELECT';
24
24
  * @ReduxAction A Layout has been (auto)saved
25
25
  */
26
26
  exports.LAYOUT_SAVE = 'LAYOUT_SAVE';
27
+ /**
28
+ * @ReduxAction A new caption / header has been set for a Column in the Layout
29
+ */
30
+ exports.LAYOUT_SET_COLUMN_CAPTION = 'LAYOUT_SET_COLUMN_CAPTION';
27
31
  exports.LAYOUT_UPDATE_CURRENT_DRAFT = 'LAYOUT_UPDATE_CURRENT_DRAFT';
28
32
  /**
29
33
  * @ReduxAction Layout Module is ready
@@ -41,6 +45,12 @@ exports.LayoutSave = (layout) => ({
41
45
  type: exports.LAYOUT_SAVE,
42
46
  layout,
43
47
  });
48
+ exports.LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
49
+ type: exports.LAYOUT_SET_COLUMN_CAPTION,
50
+ layoutName,
51
+ columnId,
52
+ caption,
53
+ });
44
54
  exports.LayoutSelect = (layoutName) => ({
45
55
  type: exports.LAYOUT_SELECT,
46
56
  layoutName,
@@ -83,6 +93,19 @@ exports.LayoutReducer = (state = initialState, action) => {
83
93
  const newLayouts = state.Layouts.filter((abObject) => abObject.Uuid !== actionLayout.Uuid);
84
94
  return Object.assign(Object.assign({}, state), { CurrentLayout: state.CurrentLayout === actionLayout.Name ? newLayouts[0].Name : state.CurrentLayout, Layouts: newLayouts });
85
95
  }
96
+ case exports.LAYOUT_SET_COLUMN_CAPTION: {
97
+ const setColumnCaptionAction = action;
98
+ const currentLayoutName = setColumnCaptionAction.layoutName;
99
+ let currentLayout = state.Layouts.find((l) => l.Name === currentLayoutName);
100
+ if (currentLayout) {
101
+ currentLayout.ColumnHeadersMap[setColumnCaptionAction.columnId] =
102
+ setColumnCaptionAction.caption;
103
+ return Object.assign({}, state, {
104
+ Layouts: state.Layouts.map((abObject) => abObject.Uuid === currentLayout.Uuid ? currentLayout : abObject),
105
+ });
106
+ }
107
+ return state;
108
+ }
86
109
  default:
87
110
  return state;
88
111
  }
@@ -497,6 +497,6 @@ exports.SystemReducer = (state = initialState, action) => {
497
497
  return state;
498
498
  }
499
499
  };
500
- const getDataChangeHistoryKey = ({ columnId, primaryKeyValue }) => {
500
+ const getDataChangeHistoryKey = ({ column: columnId, primaryKeyValue, }) => {
501
501
  return JSON.stringify({ columnId, primaryKeyValue });
502
502
  };
@@ -1,25 +1,21 @@
1
1
  import * as Redux from 'redux';
2
- import { FlashingCellState } from '../PredefinedConfig/DeprecatedState';
3
- import { UpdatedRowState } from '../PredefinedConfig/DeprecatedState';
4
- import { PercentBarState } from '../PredefinedConfig/DeprecatedState';
5
- import { GradientColumnState } from '../PredefinedConfig/DeprecatedState';
6
2
  export declare const GRADIENT_COLUMN_CLEAR = "GRADIENT_COLUMN_CLEAR";
7
3
  export interface GradientColumnClearAction extends Redux.Action {
8
4
  }
9
5
  export declare const GradientColumnClear: () => GradientColumnClearAction;
10
- export declare const GradientColumnReducer: Redux.Reducer<GradientColumnState>;
6
+ export declare const GradientColumnReducer: Redux.Reducer<any>;
11
7
  export declare const PERCENT_BAR_CLEAR = "PERCENT_BAR_CLEAR";
12
8
  export interface PercentBarClearAction extends Redux.Action {
13
9
  }
14
10
  export declare const PercentBarClear: () => PercentBarClearAction;
15
- export declare const PercentBarReducer: Redux.Reducer<PercentBarState>;
11
+ export declare const PercentBarReducer: Redux.Reducer<any>;
16
12
  export declare const FLASHING_CELL_CLEAR = "FLASHING_CELL_CLEAR";
17
13
  export interface FlashingCellClearAction extends Redux.Action {
18
14
  }
19
15
  export declare const FlashingCellClear: () => FlashingCellClearAction;
20
- export declare const FlashingCellReducer: Redux.Reducer<FlashingCellState>;
16
+ export declare const FlashingCellReducer: Redux.Reducer<any>;
21
17
  export declare const UPDATED_ROW_CLEAR = "UPDATED_ROW_CLEAR";
22
18
  export interface UpdatedRowClearAction extends Redux.Action {
23
19
  }
24
20
  export declare const UpdatedRowClear: () => UpdatedRowClearAction;
25
- export declare const UpdatedRowReducer: Redux.Reducer<UpdatedRowState>;
21
+ export declare const UpdatedRowReducer: Redux.Reducer<any>;
@@ -83,6 +83,7 @@ class AdaptableReduxLocalStorageEngine {
83
83
  return this.saveNow(state, getState);
84
84
  }
85
85
  saveNow(state, getState) {
86
+ var _a;
86
87
  const config = {
87
88
  adaptableId: this.adaptableId,
88
89
  adaptableStateKey: this.adaptableStateKey,
@@ -92,7 +93,11 @@ class AdaptableReduxLocalStorageEngine {
92
93
  if (getState) {
93
94
  result = getState(state, config);
94
95
  }
95
- return (this.persistState || persistState)(result, config).catch(rejectWithMessage);
96
+ const promise = (_a = (this.persistState || persistState)(result, config)) === null || _a === void 0 ? void 0 : _a.catch(rejectWithMessage);
97
+ if (!(promise instanceof Promise)) {
98
+ LoggingHelper_1.ConsoleLogByMessageType('stateOptions.persistState should return a promise, it returned', 'Error', promise);
99
+ }
100
+ return promise;
96
101
  }
97
102
  }
98
103
  function rejectWithMessage(error) {
@@ -22,7 +22,7 @@ export declare const LoadState: (State: {
22
22
  [s: string]: ConfigState;
23
23
  }) => LoadStateAction;
24
24
  export declare class AdaptableStore implements IAdaptableStore {
25
- private isVendorReady;
25
+ private isAgGridReady;
26
26
  TheStore: Redux.Store<AdaptableState>;
27
27
  Load: Promise<any>;
28
28
  private emitter;
@@ -36,9 +36,9 @@ export declare class AdaptableStore implements IAdaptableStore {
36
36
  /**
37
37
  *
38
38
  * @param adaptable The Adaptable instance
39
- * @param isVendorReady A promise which is resolved when the underlying grid is ready for binding
39
+ * @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
40
40
  */
41
- constructor(adaptable: IAdaptable, isVendorReady: Promise<any>);
41
+ constructor(adaptable: IAdaptable, isAgGridReady: Promise<any>);
42
42
  getCurrentStorageState(): AdaptableState;
43
43
  saveStateNow(adaptable: IAdaptable): Promise<any>;
44
44
  loadStore: (adaptable: IAdaptable, adaptableStateKey: string, predefinedConfig?: PredefinedConfig) => Promise<any>;
@@ -66,13 +66,13 @@ class AdaptableStore {
66
66
  /**
67
67
  *
68
68
  * @param adaptable The Adaptable instance
69
- * @param isVendorReady A promise which is resolved when the underlying grid is ready for binding
69
+ * @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
70
70
  */
71
- constructor(adaptable, isVendorReady) {
71
+ constructor(adaptable, isAgGridReady) {
72
72
  /*
73
- This is the main store for Adaptable State
74
- */
75
- this.isVendorReady = isVendorReady;
73
+ This is the main store for Adaptable State
74
+ */
75
+ this.isAgGridReady = isAgGridReady;
76
76
  this.loadStorageInProgress = false;
77
77
  this.loadStateOnStartup = true; // set to false if you want no state
78
78
  this.on = (eventName, callback) => {
@@ -95,8 +95,8 @@ class AdaptableStore {
95
95
  this.TheStore.dispatch(exports.LoadState(adaptable.adaptableOptions.stateOptions.applyState(storedState)));
96
96
  }
97
97
  })
98
- // we need the vendor grid to be ready because several states(ex. Layout) depend on its API
99
- .then(() => this.isVendorReady)
98
+ // we need AG Grid to be ready because several states(ex. Layout) depend on its API
99
+ .then(() => this.isAgGridReady)
100
100
  .then(() => {
101
101
  this.TheStore.dispatch(exports.InitState());
102
102
  // END STATE LOAD
@@ -313,7 +313,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
313
313
  *******************/
314
314
  case SystemRedux.SYSTEM_FLASHING_ALERT_ADD:
315
315
  case SystemRedux.SYSTEM_FLASHING_ALERT_DELETE: {
316
- const { flashingAlert: FlashingAlert, } = action;
316
+ const { flashingAlert: FlashingAlert } = action;
317
317
  const { dataChangedInfo } = FlashingAlert;
318
318
  let ret = next(action);
319
319
  if (dataChangedInfo) {
@@ -386,7 +386,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
386
386
  if (((_c = actionTyped.alert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
387
387
  actionTyped.alert.dataChangedInfo) {
388
388
  let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
389
- adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
389
+ adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
390
390
  }
391
391
  return ret;
392
392
  }
@@ -402,7 +402,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
402
402
  var _a;
403
403
  if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) && alert.dataChangedInfo) {
404
404
  let rowNode = alert.dataChangedInfo.rowNode;
405
- adaptable.refreshCells([rowNode], [alert.dataChangedInfo.columnId], true);
405
+ adaptable.refreshCells([rowNode], [alert.dataChangedInfo.column.columnId], true);
406
406
  }
407
407
  });
408
408
  return ret;
@@ -416,7 +416,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
416
416
  let ret = next(action);
417
417
  if (actionTyped.alert.dataChangedInfo) {
418
418
  let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
419
- adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
419
+ adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
420
420
  }
421
421
  return ret;
422
422
  }
@@ -682,13 +682,15 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
682
682
  case LayoutRedux.LAYOUT_EDIT:
683
683
  case LayoutRedux.LAYOUT_SAVE:
684
684
  case LayoutRedux.LAYOUT_DELETE:
685
+ case LayoutRedux.LAYOUT_SET_COLUMN_CAPTION:
685
686
  case LayoutRedux.LAYOUT_SELECT: {
686
687
  const oldLayoutState = middlewareAPI.getState().Layout;
687
688
  let returnAction = next(action);
688
689
  const newLayoutState = middlewareAPI.getState().Layout;
689
690
  adaptable.api.layoutApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
690
691
  if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
691
- returnAction.type == LayoutRedux.LAYOUT_DELETE) {
692
+ returnAction.type == LayoutRedux.LAYOUT_DELETE ||
693
+ returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
692
694
  let gridState = middlewareAPI.getState().Grid;
693
695
  let currentLayout = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout);
694
696
  if (gridState.CurrentLayout) {
@@ -1049,7 +1051,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1049
1051
  case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
1050
1052
  let returnAction = next(action);
1051
1053
  const actionTyped = action;
1052
- const [importStepActions, needsOverwriteConfirmation,] = adaptable.api.internalApi
1054
+ const [importStepActions, needsOverwriteConfirmation] = adaptable.api.internalApi
1053
1055
  .getTeamSharingService()
1054
1056
  .buildSharedEntityImportActions(actionTyped.SharedEntity);
1055
1057
  const processImportAction = TeamSharingRedux.TeamSharingProcessImport(importStepActions);
@@ -1122,14 +1124,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1122
1124
  .getSharedEntities(adaptableId)
1123
1125
  .then((sharedEntities) => {
1124
1126
  // check if remote server has a newer revision
1125
- const [localRevision, remoteRevision,] = adaptable.api.internalApi
1127
+ const [localRevision, remoteRevision] = adaptable.api.internalApi
1126
1128
  .getTeamSharingService()
1127
1129
  .getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, sharedEntities);
1128
1130
  if (remoteRevision > localRevision) {
1129
1131
  // if remote has a newer version, we will NOT overwrite it
1130
1132
  return;
1131
1133
  }
1132
- const [updatedSharedEntities, newActiveEntities,] = adaptable.api.internalApi
1134
+ const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
1133
1135
  .getTeamSharingService()
1134
1136
  .updateActiveSharedEntity(ChangedAdaptableObject, UserName, sharedEntities);
1135
1137
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newActiveEntities));
@@ -1195,7 +1197,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1195
1197
  case GridRedux.GRID_REFRESH_CELLS: {
1196
1198
  const actionTyped = action;
1197
1199
  let ret = next(action);
1198
- adaptable.refreshCells(actionTyped.rows, actionTyped.columnIds, true);
1200
+ adaptable.refreshCells(actionTyped.rowNodes, actionTyped.columnIds, true);
1199
1201
  return ret;
1200
1202
  }
1201
1203
  case GridRedux.GRID_SET_SORT: {
@@ -1246,6 +1248,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1246
1248
  *******************/
1247
1249
  case exports.INIT_STATE: {
1248
1250
  let returnAction = next(action);
1251
+ if (adaptable.isDestroyed) {
1252
+ return returnAction;
1253
+ }
1249
1254
  // make sure we have the grid columns in state, before we do any layout work
1250
1255
  adaptable.updateColumnsIntoStore();
1251
1256
  const layoutState = middlewareAPI.getState().Layout;
@@ -3,7 +3,7 @@ import { Action } from 'redux';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
5
5
  import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
6
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
6
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
7
7
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
8
8
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
9
9
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
@@ -33,7 +33,7 @@ export declare abstract class AdaptableModuleBase implements IModule {
33
33
  addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
34
34
  addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
35
35
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
36
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
36
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
37
37
  createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }: {
38
38
  Label: string;
39
39
  ComponentName: string;
@@ -118,26 +118,26 @@ class AdaptableModuleBase {
118
118
  return false;
119
119
  }
120
120
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(functionType)) {
121
- if (functionType == 'sort' && !column.IsSparkline) {
122
- return column.Sortable;
121
+ if (functionType == 'sort' && !column.isSparkline) {
122
+ return column.sortable;
123
123
  }
124
124
  else if (functionType == 'editable') {
125
- return !column.ReadOnly;
125
+ return !column.readOnly;
126
126
  }
127
127
  else if (functionType == 'style') {
128
- return !column.IsSparkline;
128
+ return !column.isSparkline;
129
129
  }
130
130
  else if (functionType == 'sparkline') {
131
- return column.IsSparkline;
131
+ return column.isSparkline;
132
132
  }
133
133
  else if (functionType == 'numeric') {
134
- return column.DataType == Enums_1.DataType.Number;
134
+ return column.dataType == Enums_1.DataType.Number;
135
135
  }
136
136
  else if (functionType == 'filter') {
137
- return column.Filterable;
137
+ return column.filterable;
138
138
  }
139
139
  else if (functionType == 'quickfilter') {
140
- return this.api.columnApi.usesAdaptableQuickFilter(column.ColumnId);
140
+ return this.api.columnApi.usesAdaptableQuickFilter(column.columnId);
141
141
  }
142
142
  }
143
143
  return true;
@@ -2,7 +2,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
2
2
  import { AlertDefinition } from '../PredefinedConfig/AlertState';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
5
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
5
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
6
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
7
7
  import { AdaptableModuleBase } from './AdaptableModuleBase';
8
8
  import { IModule } from './Interface/IModule';
@@ -14,7 +14,7 @@ export declare class AlertModule extends AdaptableModuleBase implements IModule
14
14
  getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
15
15
  updateOldConfig(): void;
16
16
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
17
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
17
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
18
18
  protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
19
19
  private handleReactiveAlertTriggered;
20
20
  private showAlertForDefinitions;
@@ -22,7 +22,8 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
22
22
  }
23
23
  if (this.api.internalApi.getAdaptableOptions().notificationsOptions
24
24
  .dataChangeDetectionPolicy === 'formattedValue') {
25
- const { oldValue, newValue, columnId } = dataChangedInfo;
25
+ const { oldValue, newValue } = dataChangedInfo;
26
+ const columnId = dataChangedInfo.column.columnId;
26
27
  const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
27
28
  const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
28
29
  if (oldFormattedValue === newFormattedValue) {
@@ -50,7 +51,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
50
51
  else if (this.api.scopeApi.scopeHasColumns(alertDefinition.Scope)) {
51
52
  return this.api.scopeApi
52
53
  .getColumnsForScope(alertDefinition.Scope)
53
- .map((adaptableColumn) => adaptableColumn.ColumnId);
54
+ .map((adaptableColumn) => adaptableColumn.columnId);
54
55
  }
55
56
  return [];
56
57
  }
@@ -62,7 +63,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
62
63
  return this.api.queryApi.getReferencedNamedQueryNames(queryExpression);
63
64
  }
64
65
  updateOldConfig() {
65
- var _a, _b, _c;
66
+ var _a, _b;
66
67
  /*
67
68
  Need to do 4 things here:
68
69
  1. Make all (new) Flashing Alerts have a Predicate if none exists
@@ -71,7 +72,6 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
71
72
  4. Convert old Updated Rows into Flashing Alerts
72
73
  */
73
74
  let oldAlertDefinitions = [];
74
- let newAlertDefinitions = [];
75
75
  // 1. Make all (new) Flashing Alerts have a Predicate if none exists
76
76
  (_a = this.api.alertApi
77
77
  .getAlertState()
@@ -97,102 +97,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
97
97
  oldAlertDefinitions.push(alertDefinition);
98
98
  }
99
99
  });
100
- // 3. Convert old Flashing Cells into Flashing Alerts
101
- let flashingCellState = this.api.internalApi.getState().FlashingCell;
102
- (_c = flashingCellState === null || flashingCellState === void 0 ? void 0 : flashingCellState.FlashingCells) === null || _c === void 0 ? void 0 : _c.forEach((flashingCell) => {
103
- if (flashingCell.IsLive) {
104
- let upColor = flashingCell.UpColor
105
- ? flashingCell.UpColor
106
- : flashingCellState.DefaultUpColor
107
- ? flashingCellState.DefaultUpColor
108
- : this.api.internalApi.getAdaptableOptions().notificationsOptions
109
- .flashingAlertDefaultProperties.UpChangeStyle.BackColor;
110
- let downColor = flashingCell.UpColor
111
- ? flashingCell.DownColor
112
- : flashingCellState.DefautDownColor
113
- ? flashingCellState.DefautDownColor
114
- : this.api.internalApi.getAdaptableOptions().notificationsOptions
115
- .flashingAlertDefaultProperties.DownChangeStyle.BackColor;
116
- let duration = flashingCell.FlashingCellDuration
117
- ? flashingCell.FlashingCellDuration
118
- : flashingCellState.DefaultDuration
119
- ? flashingCellState.DefaultDuration
120
- : this.api.internalApi.getAdaptableOptions().notificationsOptions
121
- .flashingAlertDefaultProperties.FlashDuration;
122
- let flashingAlertDefinition = {
123
- Rule: {
124
- Predicate: ANY_PREDICATE,
125
- },
126
- FlashTarget: 'cell',
127
- FlashDuration: duration,
128
- Scope: {
129
- ColumnIds: [flashingCell.ColumnId],
130
- },
131
- UpChangeStyle: {
132
- BackColor: upColor,
133
- },
134
- DownChangeStyle: {
135
- BackColor: downColor,
136
- },
137
- };
138
- // this.api.alertApi.addFlashingAlertDefinition(flashingAlertDefinition);
139
- newAlertDefinitions.push(flashingAlertDefinition);
140
- LoggingHelper_1.LogAdaptableWarning(`Updating incorrect Predefined Config for Flashing Alert: ${flashingCell.ColumnId}`);
141
- }
142
- });
143
- // 4. Convert old Updated Rows into Flashing Alerts
144
- let updatedRowState = this.api.internalApi.getState().UpdatedRow;
145
- if (updatedRowState === null || updatedRowState === void 0 ? void 0 : updatedRowState.EnableUpdatedRow) {
146
- let flashingAlertDefinition = {
147
- Rule: {
148
- Predicate: ANY_PREDICATE,
149
- },
150
- FlashTarget: 'row',
151
- Scope: {
152
- All: true,
153
- },
154
- };
155
- if (updatedRowState.Duration) {
156
- flashingAlertDefinition.FlashDuration =
157
- updatedRowState.Duration == 'Always' ? 'always' : updatedRowState.Duration;
158
- }
159
- else {
160
- flashingAlertDefinition.FlashDuration = 'always';
161
- }
162
- if (updatedRowState.UpColor) {
163
- flashingAlertDefinition.UpChangeStyle = {
164
- BackColor: updatedRowState.UpColor,
165
- };
166
- }
167
- else {
168
- flashingAlertDefinition.UpChangeStyle = undefined;
169
- }
170
- if (updatedRowState.DownColor) {
171
- flashingAlertDefinition.DownChangeStyle = {
172
- BackColor: updatedRowState.DownColor,
173
- };
174
- }
175
- else {
176
- flashingAlertDefinition.DownChangeStyle = undefined;
177
- }
178
- if (updatedRowState.NeutralColor) {
179
- flashingAlertDefinition.NeutralChangeStyle = {
180
- BackColor: updatedRowState.NeutralColor,
181
- };
182
- }
183
- else {
184
- flashingAlertDefinition.NeutralChangeStyle = undefined;
185
- }
186
- newAlertDefinitions.push(flashingAlertDefinition);
187
- }
188
- this.api.alertApi.addFlashingAlertDefinitions(newAlertDefinitions);
189
- this.api.alertApi.editFlashingAlertDefinitions(oldAlertDefinitions);
190
- this.api.internalApi.clearUpdatedRowState();
191
- this.api.internalApi.clearFlashingCellState();
192
100
  }
193
101
  addColumnMenuItems(column) {
194
102
  if (column && this.isModuleEditable()) {
195
- if (!this.api.columnApi.isCalculatedColumn(column.ColumnId)) {
103
+ if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
196
104
  const flashingAlertDefinitions = this.api.alertApi.getFlashingAlertDefinitions();
197
105
  const flashingAlertForCurrentColumn = flashingAlertDefinitions.find((flashingAlertDefinition) => {
198
106
  return this.api.scopeApi.isColumnInScope(column, flashingAlertDefinition.Scope);
@@ -205,7 +113,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
205
113
  return [
206
114
  this.createColumnMenuItemReduxAction('Add Flashing Alert', this.moduleInfo.Glyph, AlertRedux.FlashingAlertDefinitionAdd({
207
115
  Scope: {
208
- ColumnIds: [column.ColumnId],
116
+ ColumnIds: [column.columnId],
209
117
  },
210
118
  Rule: {
211
119
  Predicate: { PredicateId: 'Any' },
@@ -229,7 +137,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
229
137
  }
230
138
  }
231
139
  const flashingAlertForRow = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue);
232
- const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.ColumnId);
140
+ const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
233
141
  if (flashingAlertForRow && flashingAlertForRow.flashTarget === 'row') {
234
142
  items.push(this.createColumnMenuItemReduxAction('Clear Flashing Alert for Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingAlertDelete(flashingAlertForRow)));
235
143
  }
@@ -272,12 +180,12 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
272
180
  showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
273
181
  alertDefinitions.forEach((alertDefinition) => {
274
182
  // might be better to do a single alert with all the messages?
275
- this.api.alertApi.showAlert(this.api.columnApi.getFriendlyNameFromColumnId(dataChangedInfo.columnId), this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
183
+ this.api.alertApi.showAlert(dataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
276
184
  });
277
185
  }
278
186
  showFlashingAlertsForDefinitions(dataChangedInfo, flashingAlertDefinitions = []) {
279
- const allColumnIds = this.api.columnApi.getColumns().map((c) => c.ColumnId);
280
- const columnDataType = this.api.columnApi.getColumnDataTypeFromColumnId(dataChangedInfo.columnId);
187
+ const allColumnIds = this.api.columnApi.getColumns().map((c) => c.columnId);
188
+ const columnDataType = dataChangedInfo.column.dataType;
281
189
  const numeric = columnDataType === 'Number';
282
190
  const isComparableType = numeric || columnDataType === 'Date';
283
191
  let up = false;
@@ -292,7 +200,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
292
200
  }
293
201
  flashingAlertDefinitions.forEach((flashingAlertDefinition) => {
294
202
  const flashTarget = this.api.alertApi.getFlashingAlertFlashTarget(flashingAlertDefinition);
295
- const flashColumnIds = { [dataChangedInfo.columnId]: true };
203
+ const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
296
204
  if (flashTarget === 'row') {
297
205
  allColumnIds.forEach((colId) => {
298
206
  flashColumnIds[colId] = true;
@@ -319,7 +227,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
319
227
  }
320
228
  getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
321
229
  let relatedAlertDefinitions = definitions
322
- .filter((v) => this.api.scopeApi.isColumnInScope(this.api.columnApi.getColumnFromId(dataChangedEvent.columnId), v.Scope))
230
+ .filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
323
231
  .filter((alertDefinition) => !AdaptableQuery_1.isReactiveQuery(alertDefinition.Rule));
324
232
  let triggeredAlerts = [];
325
233
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
@@ -353,7 +261,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
353
261
  // TODO send real display value
354
262
  displayValue: null,
355
263
  node: dataChangedEvent.rowNode,
356
- column: this.api.columnApi.getColumnFromId(dataChangedEvent.columnId),
264
+ column: dataChangedEvent.column,
357
265
  }, defaultNoPredicateReturn);
358
266
  }
359
267
  getTeamSharingAction() {
@@ -1,12 +1,12 @@
1
1
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
2
  import { IBulkUpdateModule, BulkUpdateValidationResult } from './Interface/IBulkUpdateModule';
3
3
  import { PreviewInfo } from '../Utilities/Interface/Preview';
4
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
4
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
5
5
  import { AccessLevel, AdaptableApi } from '../types';
6
6
  export declare class BulkUpdateModule extends AdaptableModuleBase implements IBulkUpdateModule {
7
7
  constructor(api: AdaptableApi);
8
8
  getViewAccessLevel(): AccessLevel;
9
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
9
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
10
10
  checkCorrectCellSelection(): BulkUpdateValidationResult;
11
11
  buildPreviewValues(bulkUpdateValue: any): PreviewInfo;
12
12
  }
@@ -20,7 +20,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
20
20
  let menuItemShowPopup = undefined;
21
21
  if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
22
22
  if (menuContext.adaptableColumn &&
23
- !menuContext.adaptableColumn.ReadOnly &&
23
+ !menuContext.adaptableColumn.readOnly &&
24
24
  menuContext.isSelectedCell &&
25
25
  menuContext.isSingleSelectedColumn &&
26
26
  this.api.gridApi.areCellsEditable(menuContext.selectedCellInfo.gridCells)) {
@@ -70,7 +70,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
70
70
  };
71
71
  }
72
72
  let selectedColumn = selectedCellInfo.columns[0];
73
- if (selectedColumn && selectedColumn.ReadOnly) {
73
+ if (selectedColumn && selectedColumn.readOnly) {
74
74
  return {
75
75
  IsValid: false,
76
76
  Alert: {
@@ -99,12 +99,12 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
99
99
  return null;
100
100
  }
101
101
  let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
102
- let columnId = '';
102
+ let column;
103
103
  if (!this.api.internalApi.isGridInPivotMode()) {
104
104
  if (selectedCellInfo != null && selectedCellInfo.columns.length > 0) {
105
- columnId = selectedCellInfo.columns[0].ColumnId;
105
+ column = this.api.columnApi.getColumnFromId(selectedCellInfo.columns[0].columnId);
106
106
  let typedBulkUpdateValue;
107
- switch (selectedCellInfo.columns[0].DataType) {
107
+ switch (column.dataType) {
108
108
  case Enums_1.DataType.Number:
109
109
  typedBulkUpdateValue = Number(bulkUpdateValue);
110
110
  break;
@@ -119,7 +119,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
119
119
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
120
120
  oldValue: selectedCell.rawValue,
121
121
  newValue: typedBulkUpdateValue,
122
- columnId: selectedCell.columnId,
122
+ column: selectedCell.column,
123
123
  primaryKeyValue: selectedCell.primaryKeyValue,
124
124
  rowNode: selectedCell.rowNode,
125
125
  trigger: 'edit',
@@ -139,7 +139,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
139
139
  }
140
140
  }
141
141
  return {
142
- columnId: columnId,
142
+ column: column,
143
143
  previewResults: previewResults,
144
144
  previewValidationSummary: PreviewHelper_1.PreviewHelper.GetPreviewValidationSummary(previewResults),
145
145
  };