@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
@@ -93,8 +93,7 @@ class QueryLanguageService {
93
93
  }
94
94
  const force = (_a = config === null || config === void 0 ? void 0 : config.force) !== null && _a !== void 0 ? _a : false;
95
95
  // see if validation should be performed
96
- if (!this.adaptableApi.optionsApi.getExpressionOptions()
97
- .performExpressionValidation &&
96
+ if (!this.adaptableApi.optionsApi.getExpressionOptions().performExpressionValidation &&
98
97
  !force) {
99
98
  const result = { isValid: true, errorMessage: '' };
100
99
  this.cacheBooleanValidation.set(cacheKey, result);
@@ -266,10 +265,6 @@ class QueryLanguageService {
266
265
  getNamedQueryNamesFromExpression(input = '') {
267
266
  return this.getNodesFromExpression(input, 'QUERY');
268
267
  }
269
- isCumulativeAggregate(input) {
270
- var _a;
271
- return !!((_a = this.getNodesFromExpression(input, 'CUMUL')) === null || _a === void 0 ? void 0 : _a.length);
272
- }
273
268
  getExpressionWithColumnFriendlyNames(expression = '') {
274
269
  let result = expression;
275
270
  const columnIds = this.getColumnsFromExpression(expression);
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
5
5
  const ArrayExtensions_1 = require("../Extensions/ArrayExtensions");
6
6
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
7
7
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
8
- const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
9
8
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
10
9
  class ValidationService {
11
10
  constructor(adaptableApi) {
@@ -53,10 +52,21 @@ class ValidationService {
53
52
  cellDataChangedInfo: cellDataChangedInfo,
54
53
  };
55
54
  this.adaptableApi.alertApi.internalApi.publishAlertFiredEvent(alert);
56
- failedRules.forEach((alertDefinition) => {
57
- const alert = ObjectFactory_1.default.CreateCellChangedAlert(cellDataChangedInfo.column.friendlyName, this.adaptableApi.alertApi.internalApi.getAlertDescription(alertDefinition, cellDataChangedInfo), alertDefinition, cellDataChangedInfo);
58
- this.adaptableApi.alertApi.showAdaptableAlert(alert);
59
- });
55
+ // This is not needed because the change event is triggered regardless
56
+ // if the edit is succesful. This is because (I think) Adaptable uses a non-standard way ot detecting data changes.
57
+ // https://github.com/AdaptableTools/adaptable/issues/2197
58
+ // failedRules.forEach((alertDefinition) => {
59
+ // const alert: AdaptableAlert = ObjectFactory.CreateCellChangedAlert(
60
+ // cellDataChangedInfo.column.friendlyName,
61
+ // this.adaptableApi.alertApi.internalApi.getAlertDescription(
62
+ // alertDefinition,
63
+ // cellDataChangedInfo
64
+ // ),
65
+ // alertDefinition,
66
+ // cellDataChangedInfo
67
+ // );
68
+ // this.adaptableApi.alertApi.showAdaptableAlert(alert);
69
+ // });
60
70
  return false;
61
71
  }
62
72
  return true;
@@ -7,7 +7,6 @@ const react_redux_1 = require("react-redux");
7
7
  const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
8
8
  const Toastify_1 = require("../components/Toastify");
9
9
  const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
10
- const CommentPopup_1 = require("./Comments/CommentPopup");
11
10
  const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingScreen");
12
11
  const AdaptablePopup_1 = require("./Components/Popups/AdaptablePopup");
13
12
  const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopupConfirmation");
@@ -16,6 +15,7 @@ const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
16
15
  const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
17
16
  const Dashboard_1 = require("./Dashboard/Dashboard");
18
17
  const License_1 = require("./License");
18
+ const NotesPopup_1 = require("./Notes/NotesPopup");
19
19
  const FloatingQuickSearch_1 = require("./QuickSearch/FloatingQuickSearch/FloatingQuickSearch");
20
20
  const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
21
21
  class AdaptableView extends React.Component {
@@ -24,7 +24,7 @@ class AdaptableView extends React.Component {
24
24
  const watermark = (_d = (_c = (_b = (_a = this.props.AdaptableApi) === null || _a === void 0 ? void 0 : _a.internalApi) === null || _b === void 0 ? void 0 : _b.getSystemState()) === null || _c === void 0 ? void 0 : _c.License) === null || _d === void 0 ? void 0 : _d.watermark;
25
25
  const adaptableOptions = this.props.AdaptableApi.optionsApi.getAdaptableOptions();
26
26
  return (React.createElement("div", null,
27
- React.createElement(CommentPopup_1.CommentPopup, null),
27
+ React.createElement(NotesPopup_1.NotePopup, null),
28
28
  React.createElement(FloatingQuickSearch_1.QuickSearchDrawer, null),
29
29
  this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
30
30
  this.props.AdaptableApi.optionsApi.getUserInterfaceOptions().showLoadingScreen && (React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup })),
@@ -6,7 +6,7 @@ const SmartEditPopup_1 = require("./SmartEdit/SmartEditPopup");
6
6
  const QuickSearchPopup_1 = require("./QuickSearch/QuickSearchPopup");
7
7
  const ThemePopup_1 = require("./Theme/ThemePopup");
8
8
  const ToolPanelPopup_1 = require("./Components/ToolPanel/ToolPanelPopup");
9
- const GridInfoPopup_1 = require("./GridInfo/GridInfoPopup");
9
+ const GridInfoPopup_1 = require("./GridInfo/GridInfoPopup/GridInfoPopup");
10
10
  const DashboardPopup_1 = require("./Dashboard/DashboardPopup");
11
11
  const StateManagementPopup_1 = require("./StateManagement/StateManagementPopup");
12
12
  const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
@@ -31,12 +31,15 @@ const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHist
31
31
  const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
32
32
  const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
33
33
  const ChartingViewPanel_1 = require("./Charting/ChartingViewPanel");
34
- const CommentListing_1 = require("./Comments/CommentListing");
34
+ const ColumnInfoPopup_1 = require("./ColumnInfo/ColumnInfoPopup");
35
+ const NotesListing_1 = require("./Notes/NotesListing");
36
+ const DataImportPopup_1 = require("./DataImport/DataImportPopup");
35
37
  exports.AdaptableViewFactory = {
36
38
  BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
37
39
  DashboardPopup: DashboardPopup_1.DashboardPopup,
38
40
  StateManagementPopup: StateManagementPopup_1.StateManagementPopup,
39
41
  GridInfoPopup: GridInfoPopup_1.GridInfoPopup,
42
+ ColumnInfoPopup: ColumnInfoPopup_1.ColumnInfoPopup,
40
43
  StatusBarPopup: StatusBarPopup_1.StatusBarPopup,
41
44
  QuickSearchPopup: QuickSearchPopup_1.QuickSearchPopup,
42
45
  CellSummaryPopup: CellSummaryPopup_1.CellSummaryPopup,
@@ -45,7 +48,8 @@ exports.AdaptableViewFactory = {
45
48
  ToolPanelPopup: ToolPanelPopup_1.ToolPanelPopup,
46
49
  SystemStatusPopup: SystemStatusPopup_1.SystemStatusPopup,
47
50
  DataChangeHistoryPopup: DataChangeHistoryPopup_1.DataChangeHistoryPopup,
48
- CommentsPopup: CommentListing_1.CommentsListing,
51
+ NotesPopup: NotesListing_1.NotesListing,
52
+ DataImportPopup: DataImportPopup_1.DataImportPopup,
49
53
  };
50
54
  exports.AdaptableViewPanelFactory = new Map([
51
55
  [ModuleConstants.AlertModuleId, AlertViewPanel_1.AlertViewPanelControl],
@@ -12,6 +12,7 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayou
12
12
  const CheckBox_1 = require("../../../components/CheckBox");
13
13
  const Helper_1 = require("../../../Utilities/Helpers/Helper");
14
14
  const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
15
+ const AdaptableIconSelector_1 = require("../../Components/AdaptableIconSelector");
15
16
  const AlertButtonsEditor = (props) => {
16
17
  const { api, adaptableAlert } = props;
17
18
  const onChange = (newButtons) => {
@@ -67,7 +68,7 @@ const AlertButtonsEditor = (props) => {
67
68
  ]);
68
69
  } }, "Add")),
69
70
  AlertButtons.map((button, index) => {
70
- var _a, _b;
71
+ var _a, _b, _c;
71
72
  let buttonStyle = button.ButtonStyle;
72
73
  let buttonLabel = button.Label;
73
74
  let btnActions = [];
@@ -120,6 +121,19 @@ const AlertButtonsEditor = (props) => {
120
121
  return btn;
121
122
  }));
122
123
  };
124
+ let iconSelector = null;
125
+ if (!button.icon || (button.icon && 'name' in button.icon)) {
126
+ iconSelector = (React.createElement(AdaptableIconSelector_1.AdaptableIconSelector, { value: button.icon && 'name' in button.icon ? (_a = button === null || button === void 0 ? void 0 : button.icon) === null || _a === void 0 ? void 0 : _a.name : '', onChange: (iconName) => {
127
+ onChange(AlertButtons.map((btn) => {
128
+ if (btn === button) {
129
+ return Object.assign(Object.assign({}, btn), { icon: {
130
+ name: iconName,
131
+ } });
132
+ }
133
+ return btn;
134
+ }));
135
+ } }));
136
+ }
123
137
  return (React.createElement(rebass_1.Box, { key: index, marginLeft: 3, style: {
124
138
  borderTop: index ? '1px dashed var(--ab-color-inputborder)' : '',
125
139
  } },
@@ -144,7 +158,7 @@ const AlertButtonsEditor = (props) => {
144
158
  React.createElement(rebass_1.Text, { fontSize: 2 },
145
159
  "Variant:",
146
160
  ' ',
147
- StringExtensions_1.default.CapitaliseFirstLetter((_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'raised'))),
161
+ StringExtensions_1.default.CapitaliseFirstLetter((_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _b !== void 0 ? _b : 'raised'))),
148
162
  React.createElement(DropdownButton_1.default, { columns: ['label'], marginLeft: 2, style: { minWidth: 120 }, items: [
149
163
  {
150
164
  label: 'Use Alert Tone',
@@ -162,7 +176,7 @@ const AlertButtonsEditor = (props) => {
162
176
  React.createElement(rebass_1.Text, { fontSize: 2 },
163
177
  "Tone:",
164
178
  ' ',
165
- StringExtensions_1.default.CapitaliseFirstLetter((_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'Use alert tone'))),
179
+ StringExtensions_1.default.CapitaliseFirstLetter((_c = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _c !== void 0 ? _c : 'Use alert tone'))),
166
180
  React.createElement(SimpleButton_1.default, { icon: "close", tone: "error", disabled: AlertButtons.length <= 1, marginLeft: 1, variant: "text", tooltip: AlertButtons.length <= 1 ? 'Cannot remove last button' : 'Remove button', onClick: () => {
167
181
  onChange(AlertButtons.filter((btn) => btn !== button));
168
182
  } }))),
@@ -178,7 +192,9 @@ const AlertButtonsEditor = (props) => {
178
192
  btnUserFunctions.length > 1 ? 's' : '',
179
193
  ":",
180
194
  ' ',
181
- btnUserFunctions.join(', ')))) : null))));
195
+ btnUserFunctions.join(', ')))) : null),
196
+ iconSelector && (React.createElement(FormLayout_1.FormRow, { label: React.createElement(rebass_1.Text, { fontSize: 2 }, "Icon") },
197
+ React.createElement(rebass_1.Box, null, iconSelector))))));
182
198
  })));
183
199
  };
184
200
  exports.AlertButtonsEditor = AlertButtonsEditor;
@@ -30,17 +30,24 @@ const AlertWizard = (props) => {
30
30
  const dispatch = (0, react_redux_1.useDispatch)();
31
31
  const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
32
32
  const [alertDefinition, setAlertDefinition] = (0, react_1.useState)(() => {
33
- var _a;
33
+ var _a, _b, _c, _d, _e, _f, _g;
34
34
  const alertDefinition = props.data
35
35
  ? (0, Helper_1.cloneObject)(props.data)
36
36
  : ObjectFactory_1.default.CreateEmptyAlertDefinition();
37
- if (!alertDefinition.Rule.BooleanExpression &&
38
- !alertDefinition.Rule.ObservableExpression &&
39
- !alertDefinition.Rule.AggregatedBooleanExpression &&
40
- !alertDefinition.Rule.Predicates) {
41
- alertDefinition.Rule.BooleanExpression = '';
37
+ if (!((_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.BooleanExpression) &&
38
+ !((_b = alertDefinition.Rule) === null || _b === void 0 ? void 0 : _b.ObservableExpression) &&
39
+ !((_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.AggregatedBooleanExpression) &&
40
+ !((_d = alertDefinition.Rule) === null || _d === void 0 ? void 0 : _d.Predicates)) {
41
+ alertDefinition.Rule = {
42
+ BooleanExpression: '',
43
+ };
44
+ }
45
+ if (((_e = props.popupParams) === null || _e === void 0 ? void 0 : _e.column) && ((_f = props.popupParams) === null || _f === void 0 ? void 0 : _f.action) === 'New') {
46
+ alertDefinition.Scope = {
47
+ ColumnIds: [props.popupParams.column.columnId],
48
+ };
42
49
  }
43
- alertDefinition.MessageType = (_a = alertDefinition.MessageType) !== null && _a !== void 0 ? _a : GeneralConstants_1.ALERT_DEFAULT_MESSAGE_TYPE;
50
+ alertDefinition.MessageType = (_g = alertDefinition.MessageType) !== null && _g !== void 0 ? _g : GeneralConstants_1.ALERT_DEFAULT_MESSAGE_TYPE;
44
51
  return alertDefinition;
45
52
  });
46
53
  // Alert type is based initialy on data, but can be changed by the user
@@ -15,4 +15,4 @@ export declare class CalculatedColumnSummaryComponent extends React.Component<Ca
15
15
  onCloseWizard(): void;
16
16
  onFinishWizard: (calculatedColumn: CalculatedColumn) => void;
17
17
  }
18
- export declare let CalculatedColumnSummary: import("react-redux").ConnectedComponent<typeof CalculatedColumnSummaryComponent, import("react-redux").Omit<React.ClassAttributes<CalculatedColumnSummaryComponent> & CalculatedColumnSummaryProps, "key" | "ref" | "onSuspend" | "api" | "accessLevel" | "modalContainer" | "CalculatedColumns" | "moduleInfo" | "popupParams" | "onClearPopupParams" | "teamSharingActivated" | "onClosePopup" | "onUnSuspend" | "onShare" | "onEdit" | "summarisedColumn" | "onDeleteConfirm">>;
18
+ export declare let CalculatedColumnSummary: import("react-redux").ConnectedComponent<typeof CalculatedColumnSummaryComponent, import("react-redux").Omit<React.ClassAttributes<CalculatedColumnSummaryComponent> & CalculatedColumnSummaryProps, "key" | "ref" | "onSuspend" | "api" | "accessLevel" | "modalContainer" | "CalculatedColumns" | "moduleInfo" | "popupParams" | "onClearPopupParams" | "teamSharingActivated" | "onClosePopup" | "onUnSuspend" | "onShare" | "onDeleteConfirm" | "onEdit" | "summarisedColumn">>;
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { CalculatedColumn } from '../../../types';
3
3
  import { AdaptableApi } from '../../../Api/AdaptableApi';
4
+ import { ExpressionType } from './CalculatedColumnWizard';
4
5
  export declare type CalculatedColumnExpressionWizardSectionProps = {
5
6
  onChange: (data: CalculatedColumn) => void;
7
+ expressionType: ExpressionType;
6
8
  };
7
9
  export declare const renderCalculatedColumnExpressionSummary: (data: CalculatedColumn) => JSX.Element;
8
10
  export declare const isValidCalculatedColumnExpression: (data: CalculatedColumn, api: AdaptableApi) => true | string;
@@ -9,7 +9,7 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
9
  const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
10
10
  const Tabs_1 = require("../../../components/Tabs");
11
11
  const CodeBlock_1 = require("../../../components/CodeBlock");
12
- const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
12
+ const StringExtensions_1 = require("../../../Utilities/Extensions/StringExtensions");
13
13
  const renderCalculatedColumnExpressionSummary = (data) => {
14
14
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
15
15
  return (React.createElement(rebass_1.Box, { fontSize: 2 },
@@ -32,58 +32,37 @@ const isValidCalculatedColumnExpression = (data, api) => {
32
32
  return true;
33
33
  };
34
34
  exports.isValidCalculatedColumnExpression = isValidCalculatedColumnExpression;
35
- const QueryTab = (props) => {
36
- const { type, label, disabled = false } = props, tabProps = tslib_1.__rest(props, ["type", "label", "disabled"]);
37
- const text = (React.createElement(rebass_1.Flex, { flexDirection: "column" },
38
- label,
39
- " ",
40
- React.createElement(rebass_1.Text, { fontSize: 2 }, "query")));
41
- return (React.createElement(Tabs_1.Tabs.Tab, Object.assign({ style: { flex: 1 } }, tabProps), !disabled ? (React.createElement(Radio_1.default, { tabIndex: -1, margin: 0, checked: type === props.value, style: { alignItems: 'baseline' } }, text)) : (text)));
42
- };
43
- // needed here to be considered a child Tab component, inside the Tabs component
44
- QueryTab.defaultProps = {
45
- isTabsTab: true,
46
- };
47
35
  const CalculatedColumnExpressionWizardSection = (props) => {
48
36
  const { api, data, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
49
37
  const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
50
- const [selectedTab, setSelectedTab] = React.useState(() => {
51
- return data.Query.AggregatedScalarExpression == undefined
52
- ? 'ScalarExpression'
53
- : api.internalApi
54
- .getQueryLanguageService()
55
- .isCumulativeAggregate(data.Query.AggregatedScalarExpression)
56
- ? 'CumulativeAggregateExpression'
57
- : 'AggregatedScalarExpression';
58
- });
59
- const updateExpressionType = (expressionType) => {
60
- setSelectedTab(expressionType);
61
- if (expressionType === 'ScalarExpression') {
62
- props.onChange(Object.assign(Object.assign({}, data), { Query: {
63
- ScalarExpression: '',
64
- } }));
65
- }
66
- else {
67
- // CumulativeAggregateExpression & AggregatedScalarExpression use the same property
68
- props.onChange(Object.assign(Object.assign({}, data), { Query: {
69
- AggregatedScalarExpression: '',
70
- } }));
71
- }
72
- };
73
38
  const setCalculatedColumnExpression = (calculatedColumnQuery) => {
74
39
  const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
75
40
  const dataType = calculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumnQuery);
76
41
  props.onChange(Object.assign(Object.assign({}, data), { Query: calculatedColumnQuery, CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType }) }));
77
42
  };
78
- return (React.createElement(Tabs_1.Tabs, { onValueChange: updateExpressionType, value: selectedTab, p: 2, style: { height: '100%', flex: 1, overflow: 'auto' } },
79
- React.createElement(QueryTab, { value: "ScalarExpression", type: selectedTab, label: "Scalar" }),
80
- React.createElement(Tabs_1.Tabs.Content, { value: 'ScalarExpression' },
81
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'scalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.ScalarExpression, onChange: (ScalarExpression) => setCalculatedColumnExpression({ ScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), isFullExpression: true, api: api })),
82
- React.createElement(QueryTab, { value: "AggregatedScalarExpression", type: selectedTab, label: "Aggregated Scalar" }),
83
- React.createElement(Tabs_1.Tabs.Content, { value: 'AggregatedScalarExpression' },
84
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedScalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.AggregatedScalarExpression, onChange: (AggregatedScalarExpression) => setCalculatedColumnExpression({ AggregatedScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), isFullExpression: true, api: api })),
85
- React.createElement(QueryTab, { value: "CumulativeAggregateExpression", type: selectedTab, label: "Cumulative" }),
86
- React.createElement(Tabs_1.Tabs.Content, { value: 'CumulativeAggregateExpression' },
87
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'cumulativeAggregatedScalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.AggregatedScalarExpression, onChange: (AggregatedScalarExpression) => setCalculatedColumnExpression({ AggregatedScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), isFullExpression: true, api: api }))));
43
+ const getEditorType = (expressionType) => {
44
+ switch (expressionType) {
45
+ case 'AggregatedScalarExpression':
46
+ return 'aggregatedScalar';
47
+ case 'CumulativeAggregatedExpression':
48
+ return 'cumulativeAggregatedScalar';
49
+ case 'QuantileAggregatedExpression':
50
+ return 'quantileAggregatedScalar';
51
+ }
52
+ };
53
+ return (React.createElement(Tabs_1.Tabs, { autoFocus: false },
54
+ React.createElement(Tabs_1.Tabs.Tab, null, (0, StringExtensions_1.Humanize)(props.expressionType)),
55
+ React.createElement(Tabs_1.Tabs.Content, null, (() => {
56
+ switch (props.expressionType) {
57
+ case 'ScalarExpression':
58
+ return (React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'scalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.ScalarExpression, onChange: (ScalarExpression) => setCalculatedColumnExpression({ ScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), isFullExpression: true, api: api }));
59
+ case 'AggregatedScalarExpression':
60
+ case 'CumulativeAggregatedExpression':
61
+ case 'QuantileAggregatedExpression':
62
+ return (React.createElement(ExpressionEditor_1.ExpressionEditor, { type: getEditorType(props.expressionType), module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.AggregatedScalarExpression, onChange: (AggregatedScalarExpression) => setCalculatedColumnExpression({ AggregatedScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), isFullExpression: true, api: api }));
63
+ default:
64
+ return React.createElement(React.Fragment, null);
65
+ }
66
+ })())));
88
67
  };
89
68
  exports.CalculatedColumnExpressionWizardSection = CalculatedColumnExpressionWizardSection;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ExpressionType } from './CalculatedColumnWizard';
3
+ declare type CalculatedColumnTypeWizardSectionProps = {
4
+ onTypeChange: (type: ExpressionType) => void;
5
+ type: ExpressionType;
6
+ };
7
+ export declare const CalculatedColumnTypeWizardSection: (props: CalculatedColumnTypeWizardSectionProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CalculatedColumnTypeWizardSection = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const Tabs_1 = require("../../../components/Tabs");
8
+ const TypeRadio_1 = require("../../Wizard/TypeRadio");
9
+ const CalculatedColumnTypeWizardSection = (props) => {
10
+ return (React.createElement(Tabs_1.Tabs, null,
11
+ React.createElement(Tabs_1.Tabs.Tab, null, "Calculated Column Type"),
12
+ React.createElement(Tabs_1.Tabs.Content, null,
13
+ React.createElement(rebass_1.Flex, { flexDirection: "column" },
14
+ React.createElement(TypeRadio_1.TypeRadio, { text: 'Scalar Expression', description: "The calculated value is derived from other cells in the row", checked: props.type === 'ScalarExpression', onClick: () => props.onTypeChange('ScalarExpression') }),
15
+ React.createElement(TypeRadio_1.TypeRadio, { text: 'Aggregated Scalar Expression', description: "The calculated value is derived from other rows", checked: props.type === 'AggregatedScalarExpression', onClick: () => props.onTypeChange('AggregatedScalarExpression') }),
16
+ React.createElement(TypeRadio_1.TypeRadio, { text: 'Cumulative Aggregated Expression', description: "The calculated value is derived cumulatively from other rows", checked: props.type === 'CumulativeAggregatedExpression', onClick: () => props.onTypeChange('CumulativeAggregatedExpression') }),
17
+ React.createElement(TypeRadio_1.TypeRadio, { text: 'Quantile Aggregated Expression', description: "The calculated value is derived from other rows using quantile aggregations", checked: props.type === 'QuantileAggregatedExpression', onClick: () => props.onTypeChange('QuantileAggregatedExpression') })))));
18
+ };
19
+ exports.CalculatedColumnTypeWizardSection = CalculatedColumnTypeWizardSection;
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { CalculatedColumn } from '../../../types';
3
3
  import { AdaptableOnePageWizardProps } from '../../Wizard/Interface/IAdaptableWizard';
4
+ export declare const calculatedColumnTypes: readonly ["ScalarExpression", "AggregatedScalarExpression", "CumulativeAggregatedExpression", "QuantileAggregatedExpression"];
5
+ export declare type ExpressionType = typeof calculatedColumnTypes[number];
4
6
  export interface CalculatedColumnWizardProps extends AdaptableOnePageWizardProps<CalculatedColumn> {
5
7
  }
6
8
  export declare const CalculatedColumnWizard: (props: CalculatedColumnWizardProps) => JSX.Element;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CalculatedColumnWizard = void 0;
3
+ exports.CalculatedColumnWizard = exports.calculatedColumnTypes = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
+ const react_1 = require("react");
6
7
  const rebass_1 = require("rebass");
7
8
  const Helper_1 = require("../../../Utilities/Helpers/Helper");
8
- const react_1 = require("react");
9
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
10
10
  const CalculatedColumnExpressionWizardSection_1 = require("./CalculatedColumnExpressionWizardSection");
11
11
  const CalculatedColumnDefinitionWizardSection_1 = require("./CalculatedColumnDefinitionWizardSection");
@@ -15,6 +15,16 @@ const react_redux_1 = require("react-redux");
15
15
  const CalculatedColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CalculatedColumnRedux"));
16
16
  const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
17
17
  const CalculatedColumnSettingsWizardSection_1 = require("./CalculatedColumnSettingsWizardSection");
18
+ const utils_1 = require("../utils");
19
+ const StringExtensions_1 = require("../../../Utilities/Extensions/StringExtensions");
20
+ const Tag_1 = require("../../../components/Tag");
21
+ const CalculatedColumnTypeSection_1 = require("./CalculatedColumnTypeSection");
22
+ exports.calculatedColumnTypes = [
23
+ 'ScalarExpression',
24
+ 'AggregatedScalarExpression',
25
+ 'CumulativeAggregatedExpression',
26
+ 'QuantileAggregatedExpression',
27
+ ];
18
28
  const CalculatedColumnWizard = (props) => {
19
29
  var _a;
20
30
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -43,7 +53,37 @@ const CalculatedColumnWizard = (props) => {
43
53
  }
44
54
  props.onCloseWizard();
45
55
  };
56
+ const [expressionType, setExpressionType] = (0, react_1.useState)(() => {
57
+ var _a;
58
+ return (_a = (0, utils_1.getExpressionType)(props.data, adaptable.api)) !== null && _a !== void 0 ? _a : 'ScalarExpression';
59
+ });
60
+ const handleExpressionTypeChange = (type) => {
61
+ setExpressionType(type);
62
+ if (expressionType === 'ScalarExpression') {
63
+ setCalculatedColumn(Object.assign(Object.assign({}, calculatedColumn), { Query: {
64
+ ScalarExpression: '',
65
+ } }));
66
+ }
67
+ else {
68
+ // Aggregated, Cumulative & Quantile are all AggregatedScalarExpression
69
+ setCalculatedColumn(Object.assign(Object.assign({}, calculatedColumn), { Query: {
70
+ AggregatedScalarExpression: '',
71
+ } }));
72
+ }
73
+ };
46
74
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: calculatedColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
75
+ {
76
+ title: 'Type',
77
+ renderSummary: () => {
78
+ return (React.createElement(rebass_1.Box, null,
79
+ "Expression Type: ",
80
+ React.createElement(Tag_1.Tag, null, (0, StringExtensions_1.Humanize)(expressionType))));
81
+ },
82
+ render: () => {
83
+ return (React.createElement(rebass_1.Box, { p: 2 },
84
+ React.createElement(CalculatedColumnTypeSection_1.CalculatedColumnTypeWizardSection, { type: expressionType, onTypeChange: handleExpressionTypeChange })));
85
+ },
86
+ },
47
87
  {
48
88
  title: 'Definition',
49
89
  details: 'Specify Column details',
@@ -60,7 +100,8 @@ const CalculatedColumnWizard = (props) => {
60
100
  isValid: CalculatedColumnExpressionWizardSection_1.isValidCalculatedColumnExpression,
61
101
  renderSummary: CalculatedColumnExpressionWizardSection_1.renderCalculatedColumnExpressionSummary,
62
102
  render: () => {
63
- return React.createElement(CalculatedColumnExpressionWizardSection_1.CalculatedColumnExpressionWizardSection, { onChange: setCalculatedColumn });
103
+ return (React.createElement(rebass_1.Box, { p: 2 },
104
+ React.createElement(CalculatedColumnExpressionWizardSection_1.CalculatedColumnExpressionWizardSection, { expressionType: expressionType, onChange: setCalculatedColumn })));
64
105
  },
65
106
  },
66
107
  {
@@ -0,0 +1,2 @@
1
+ import { AdaptableApi, CalculatedColumn } from '../../types';
2
+ export declare const getExpressionType: (calculatedColumn: CalculatedColumn, api: AdaptableApi) => "ScalarExpression" | "AggregatedScalarExpression" | "CumulativeAggregatedExpression" | "QuantileAggregatedExpression";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExpressionType = void 0;
4
+ const getExpressionType = (calculatedColumn, api) => {
5
+ var _a;
6
+ return ((_a = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.AggregatedScalarExpression) == undefined
7
+ ? 'ScalarExpression'
8
+ : api.calculatedColumnApi.internalApi.isCumulativeAggregatedExpression(calculatedColumn.Query.AggregatedScalarExpression)
9
+ ? 'CumulativeAggregatedExpression'
10
+ : api.calculatedColumnApi.internalApi.isQuantileAggregatedExpression(calculatedColumn.Query.AggregatedScalarExpression)
11
+ ? 'QuantileAggregatedExpression'
12
+ : 'AggregatedScalarExpression';
13
+ };
14
+ exports.getExpressionType = getExpressionType;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { ChartDefinition } from '../../../../types';
3
+ import { AdaptableOnePageWizardProps } from '../../../Wizard/Interface/IAdaptableWizard';
4
+ export interface AgChargingWizardProps extends AdaptableOnePageWizardProps<ChartDefinition> {
5
+ }
6
+ export declare const AgChargingWizard: React.FunctionComponent<AgChargingWizardProps>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgChargingWizard = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const AdaptableContext_1 = require("../../../AdaptableContext");
8
+ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
9
+ const PreviewChartSection_1 = require("./PreviewChartSection");
10
+ const SettingsSection_1 = require("./SettingsSection");
11
+ const ObjectTagsWizardSection_1 = require("../../../Wizard/ObjectTagsWizardSection");
12
+ const AgChargingWizard = (props) => {
13
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
14
+ const [chartDefinition, setChartDefinition] = React.useState(() => {
15
+ var _a, _b;
16
+ return (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
17
+ });
18
+ const handleFinish = React.useCallback(() => {
19
+ adaptable.api.chartingApi.editChartDefinition(chartDefinition);
20
+ props.onFinishWizard(chartDefinition);
21
+ }, [chartDefinition]);
22
+ return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: chartDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
23
+ {
24
+ title: 'Settings',
25
+ details: 'Chart Settings',
26
+ isValid: SettingsSection_1.isSettingsValid,
27
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
28
+ React.createElement(SettingsSection_1.SettingsSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
29
+ },
30
+ {
31
+ details: 'Select Chart Tags',
32
+ title: 'Tags',
33
+ isVisible: () => adaptable.api.internalApi.shouldDisplayTagSections(),
34
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
35
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setChartDefinition }))),
36
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
37
+ },
38
+ '-',
39
+ {
40
+ title: 'Preview Chart',
41
+ details: 'Chart Preview',
42
+ render: () => (React.createElement(rebass_1.Box, { p: 2 },
43
+ React.createElement(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
44
+ },
45
+ ] }));
46
+ };
47
+ exports.AgChargingWizard = AgChargingWizard;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ChartDefinition } from '../../../types';
2
+ import { ChartDefinition } from '../../../../types';
3
3
  export declare const PreviewChartSection: React.FunctionComponent<{
4
4
  chartDefinition: ChartDefinition;
5
5
  onChange: (chartDefinition: ChartDefinition) => void;
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
8
- const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
9
- const AdaptableContext_1 = require("../../AdaptableContext");
8
+ const SystemRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/SystemRedux"));
9
+ const AdaptableContext_1 = require("../../../AdaptableContext");
10
10
  const PreviewChartSection = (props) => {
11
11
  const currentChartModels = (0, react_redux_1.useSelector)((state) => SystemRedux.SystemChartingCurrentChartModelsSelector(state.System));
12
12
  const [localChartId, setLocalChartId] = React.useState(null);
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi, ChartDefinition } from '../../../types';
2
+ import { AdaptableApi, ChartDefinition } from '../../../../types';
3
3
  export declare const isSettingsValid: (chartDefinition: ChartDefinition, api: AdaptableApi) => true | string;
4
4
  export interface SettingsSectionProps {
5
5
  chartDefinition: ChartDefinition;
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SettingsSection = exports.isSettingsValid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const CheckBox_1 = require("../../../components/CheckBox");
7
- const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
8
- const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
9
- const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
6
+ const CheckBox_1 = require("../../../../components/CheckBox");
7
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
8
+ const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
9
+ const AdaptableInput_1 = tslib_1.__importDefault(require("../../../Components/AdaptableInput"));
10
10
  const isSettingsValid = (chartDefinition, api) => {
11
11
  if (!chartDefinition.Name) {
12
12
  return 'Name is mandatory';
@@ -0,0 +1 @@
1
+ export * from './AgChargingWizard';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./AgChargingWizard"), exports);
@@ -1,6 +1,7 @@
1
- import * as React from 'react';
1
+ import { FunctionComponent } from 'react';
2
+ import { ExternalChartDefinition } from '../../../PredefinedConfig/ChartingState';
2
3
  import { ChartDefinition } from '../../../types';
3
4
  import { AdaptableOnePageWizardProps } from '../../Wizard/Interface/IAdaptableWizard';
4
- export interface ChartingWizardProps extends AdaptableOnePageWizardProps<ChartDefinition> {
5
+ export interface AgChargingWizardProps extends AdaptableOnePageWizardProps<ChartDefinition | ExternalChartDefinition> {
5
6
  }
6
- export declare const ChartingWizard: React.FunctionComponent<ChartingWizardProps>;
7
+ export declare const ChartingWizard: FunctionComponent<AgChargingWizardProps>;