@adaptabletools/adaptable 18.0.0-canary.1 → 18.0.0-canary.11

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 (264) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +9 -26
  3. package/base.css +11 -3
  4. package/base.css.map +1 -1
  5. package/index.css +88 -70
  6. package/index.css.map +1 -1
  7. package/package.json +4 -5
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -108
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +12 -6
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
  11. package/src/AdaptableOptions/ColumnOptions.d.ts +4 -2
  12. package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
  13. package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/MenuOptions.js +1 -5
  15. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
  16. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  17. package/src/Api/AdaptableApi.d.ts +5 -0
  18. package/src/Api/BulkUpdateApi.d.ts +0 -5
  19. package/src/Api/ConfigApi.d.ts +1 -1
  20. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  21. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  22. package/src/Api/GridApi.d.ts +18 -13
  23. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  24. package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
  25. package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  27. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  28. package/src/Api/Implementation/ApiBase.js +4 -1
  29. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  30. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  31. package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
  32. package/src/Api/Implementation/CommentsApiImpl.js +7 -1
  33. package/src/Api/Implementation/ConfigApiImpl.js +13 -5
  34. package/src/Api/Implementation/GridApiImpl.d.ts +4 -3
  35. package/src/Api/Implementation/GridApiImpl.js +33 -14
  36. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  37. package/src/Api/Implementation/LayoutApiImpl.js +15 -0
  38. package/src/Api/Implementation/NotesApiImpl.d.ts +6 -4
  39. package/src/Api/Implementation/NotesApiImpl.js +9 -8
  40. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
  41. package/src/Api/Implementation/OptionsApiImpl.js +12 -2
  42. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  43. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  44. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  45. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  46. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  47. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  48. package/src/Api/Internal/ActionRowInternalApi.js +106 -0
  49. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
  50. package/src/Api/Internal/AdaptableInternalApi.js +10 -8
  51. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  52. package/src/Api/Internal/CalculatedColumnInternalApi.js +70 -0
  53. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
  55. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  56. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  57. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  58. package/src/Api/Internal/CommentsInternalApi.js +14 -0
  59. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  60. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  61. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  62. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  63. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  64. package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -0
  65. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  66. package/src/Api/Internal/GridInternalApi.d.ts +21 -3
  67. package/src/Api/Internal/GridInternalApi.js +126 -7
  68. package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
  69. package/src/Api/Internal/NotesInternalApi.js +14 -0
  70. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  71. package/src/Api/InteropioPluginApi.d.ts +2 -2
  72. package/src/Api/LayoutApi.d.ts +11 -0
  73. package/src/Api/OptionsApi.d.ts +5 -1
  74. package/src/Api/ScopeApi.d.ts +10 -0
  75. package/src/EnvVars.d.ts +3 -0
  76. package/src/EnvVars.js +4 -0
  77. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  78. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  79. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  80. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  81. package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
  82. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
  83. package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
  84. package/src/PredefinedConfig/Common/RowSummary.js +1 -0
  85. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  86. package/src/PredefinedConfig/NotesState.d.ts +10 -20
  87. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  88. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  89. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  90. package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
  91. package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
  92. package/src/Redux/ActionsReducers/NotesRedux.js +8 -7
  93. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  94. package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
  95. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  96. package/src/Redux/Store/AdaptableStore.js +33 -50
  97. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
  98. package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
  99. package/src/Strategy/AdaptableModuleBase.js +4 -7
  100. package/src/Strategy/AlertModule.d.ts +1 -2
  101. package/src/Strategy/AlertModule.js +2 -55
  102. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  103. package/src/Strategy/CalculatedColumnModule.js +5 -25
  104. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  105. package/src/Strategy/CellSummaryModule.js +50 -21
  106. package/src/Strategy/ChartingModule.d.ts +0 -1
  107. package/src/Strategy/ChartingModule.js +2 -22
  108. package/src/Strategy/ColumnFilterModule.d.ts +1 -2
  109. package/src/Strategy/ColumnFilterModule.js +1 -64
  110. package/src/Strategy/CommentsModule.d.ts +1 -0
  111. package/src/Strategy/CommentsModule.js +5 -1
  112. package/src/Strategy/CustomSortModule.js +1 -1
  113. package/src/Strategy/DashboardModule.d.ts +1 -2
  114. package/src/Strategy/DashboardModule.js +1 -8
  115. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  116. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  117. package/src/Strategy/DataSetModule.d.ts +1 -1
  118. package/src/Strategy/DataSetModule.js +1 -1
  119. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  120. package/src/Strategy/FlashingCellModule.js +2 -15
  121. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  122. package/src/Strategy/FormatColumnModule.js +0 -47
  123. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  124. package/src/Strategy/FreeTextColumnModule.js +0 -30
  125. package/src/Strategy/GridFilterModule.d.ts +0 -1
  126. package/src/Strategy/GridFilterModule.js +0 -37
  127. package/src/Strategy/Interface/IModule.d.ts +0 -1
  128. package/src/Strategy/LayoutModule.d.ts +8 -3
  129. package/src/Strategy/LayoutModule.js +108 -53
  130. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  131. package/src/Strategy/NamedQueryModule.js +0 -19
  132. package/src/Strategy/NotesModule.js +3 -4
  133. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  134. package/src/Strategy/PlusMinusModule.js +1 -1
  135. package/src/Strategy/ScheduleModule.d.ts +1 -1
  136. package/src/Strategy/ScheduleModule.js +1 -1
  137. package/src/Strategy/ShortcutModule.d.ts +1 -1
  138. package/src/Strategy/ShortcutModule.js +1 -1
  139. package/src/Strategy/StyledColumnModule.d.ts +0 -1
  140. package/src/Strategy/StyledColumnModule.js +0 -21
  141. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  142. package/src/Strategy/TeamSharingModule.js +5 -5
  143. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  144. package/src/Strategy/ToolPanelModule.js +0 -23
  145. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  146. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  147. package/src/Utilities/Constants/GeneralConstants.js +1 -0
  148. package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
  149. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
  150. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
  151. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  152. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  153. package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
  154. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  155. package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
  156. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  157. package/src/Utilities/Helpers/Helper.js +4 -0
  158. package/src/Utilities/ObjectFactory.js +6 -6
  159. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
  160. package/src/Utilities/Services/AggregatedScalarLiveValue.js +14 -9
  161. package/src/Utilities/Services/CellPopupService.js +0 -1
  162. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  163. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  164. package/src/Utilities/Services/LicenseService/index.js +1 -181
  165. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  166. package/src/Utilities/Services/MetamodelService.js +6 -3
  167. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  168. package/src/Utilities/Services/QueryLanguageService.js +2 -1
  169. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  170. package/src/Utilities/Services/RowEditService.js +3 -1
  171. package/src/Utilities/Services/SummaryService.d.ts +19 -0
  172. package/src/Utilities/Services/SummaryService.js +29 -0
  173. package/src/Utilities/license/decode.js +1 -65
  174. package/src/Utilities/license/hashing.js +1 -43
  175. package/src/View/AdaptableView.js +1 -3
  176. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  177. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  178. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
  179. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
  180. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  181. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  182. package/src/View/Comments/CommentsPopup.js +12 -8
  183. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  184. package/src/View/Components/NewScopeComponent.js +34 -1
  185. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  186. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  187. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  188. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
  189. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  190. package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
  191. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  192. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  193. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
  194. package/src/View/GridFilter/GridFilterViewPanel.js +7 -3
  195. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  196. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  197. package/src/View/Layout/TransposedPopup.js +194 -0
  198. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  199. package/src/View/License/LicenseWatermark.js +1 -61
  200. package/src/View/Notes/NotesPopup.js +9 -11
  201. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  202. package/src/View/Theme/ThemeSelector.js +3 -3
  203. package/src/agGrid/ActionColumnRenderer.js +7 -6
  204. package/src/agGrid/Adaptable.d.ts +3 -455
  205. package/src/agGrid/Adaptable.js +8 -5292
  206. package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
  207. package/src/agGrid/AdaptableAgGrid.js +3936 -0
  208. package/src/agGrid/AdaptableLogger.js +77 -11
  209. package/src/agGrid/AgGridAdapter.d.ts +62 -0
  210. package/src/agGrid/AgGridAdapter.js +577 -0
  211. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  212. package/src/agGrid/AgGridColumnAdapter.js +824 -0
  213. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  214. package/src/agGrid/AgGridMenuAdapter.js +271 -0
  215. package/src/agGrid/AgGridOptionsService.d.ts +12 -0
  216. package/src/agGrid/AgGridOptionsService.js +54 -0
  217. package/src/agGrid/BadgeRenderer.js +1 -1
  218. package/src/agGrid/CheckboxRenderer.js +1 -1
  219. package/src/agGrid/FilterWrapper.d.ts +2 -2
  220. package/src/agGrid/FilterWrapper.js +1 -1
  221. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  222. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  223. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +70 -9
  224. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
  225. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  226. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  227. package/src/components/Datepicker/index.d.ts +1 -1
  228. package/src/components/InfiniteTable/index.js +2 -2
  229. package/src/components/Input/index.d.ts +1 -1
  230. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  231. package/src/components/Modal/index.d.ts +1 -0
  232. package/src/components/Modal/index.js +4 -3
  233. package/src/components/Select/Select.d.ts +2 -0
  234. package/src/components/Select/Select.js +2 -2
  235. package/src/components/icons/index.js +2 -0
  236. package/src/components/icons/rows.d.ts +3 -0
  237. package/src/components/icons/rows.js +4 -0
  238. package/src/env.js +2 -2
  239. package/src/metamodel/adaptable.metamodel.d.ts +74 -11
  240. package/src/metamodel/adaptable.metamodel.js +1 -9313
  241. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  242. package/src/migration/AdaptableUpgradeHelper.js +48 -0
  243. package/src/migration/VersionUpgrade.d.ts +8 -0
  244. package/src/migration/VersionUpgrade.js +11 -0
  245. package/src/migration/VersionUpgrade17.d.ts +18 -0
  246. package/src/migration/VersionUpgrade17.js +342 -0
  247. package/src/migration/VersionUpgrade18.d.ts +5 -0
  248. package/src/migration/VersionUpgrade18.js +6 -0
  249. package/src/parser/src/types.d.ts +5 -0
  250. package/src/types.d.ts +7 -3
  251. package/tsconfig.esm.tsbuildinfo +1 -1
  252. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  253. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  254. package/src/Utilities/Services/Interface/IRowEditService.js +0 -1
  255. package/src/View/Components/ScopeComponent.d.ts +0 -24
  256. package/src/View/Components/ScopeComponent.js +0 -133
  257. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  258. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
  259. package/src/agGrid/agGridHelper.d.ts +0 -57
  260. package/src/agGrid/agGridHelper.js +0 -686
  261. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  262. package/src/agGrid/agGridMenuHelper.js +0 -668
  263. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  264. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
@@ -3,12 +3,15 @@ import { SortOrder } from '../../PredefinedConfig/Common/Enums';
3
3
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
4
4
  import * as GridRedux from '../../Redux/ActionsReducers/GridRedux';
5
5
  import NumberExtensions from '../../Utilities/Extensions/NumberExtensions';
6
+ import { convertAdaptableStyleToCSS } from '../../Utilities/Helpers/StyleHelper';
7
+ import UIHelper from '../../View/UIHelper';
8
+ import { createBaseContext } from '../../Utilities/ObjectFactory';
6
9
  export class GridInternalApi extends ApiBase {
7
10
  /**
8
11
  * Fires Grid Sorted Event
9
12
  */
10
13
  fireGridSortedEvent() {
11
- if (this.adaptable.isLive) {
14
+ if (this.adaptable.isReady) {
12
15
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
13
16
  const adaptableApi = this.getAdaptableApi();
14
17
  const gridSortedInfo = {
@@ -24,7 +27,7 @@ export class GridInternalApi extends ApiBase {
24
27
  * Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
25
28
  */
26
29
  fireCellChangedEvent(cellDataChangedInfo) {
27
- if (this.adaptable.isLive) {
30
+ if (this.adaptable.isReady) {
28
31
  const cellChangedInfo = {
29
32
  adaptableApi: this.adaptable.api,
30
33
  cellChange: cellDataChangedInfo,
@@ -38,7 +41,7 @@ export class GridInternalApi extends ApiBase {
38
41
  * Fires Grid Data Changed Event - when a row has changed in AG Grid
39
42
  */
40
43
  fireGridDataChangedEvent(dataRows, rowNodes, rowTrigger) {
41
- if (this.adaptable.isLive) {
44
+ if (this.adaptable.isReady) {
42
45
  const gridDataChangedInfo = {
43
46
  changedAt: Date.now(),
44
47
  adaptableApi: this.adaptable.api,
@@ -88,7 +91,7 @@ export class GridInternalApi extends ApiBase {
88
91
  const distinctValuesParams = {
89
92
  visibleRowsOnly: showFilteredRowsOnly,
90
93
  };
91
- const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterListValuesForColumn(abColumn, filter, distinctValuesParams);
94
+ const { gridCells, suppressClientSideFilter } = await this.getDistinctFilterListValuesForColumn(abColumn, filter, distinctValuesParams);
92
95
  const sortedDistinctValues = this.sortDistinctValues(gridCells, abColumn);
93
96
  let shouldShowValuesCount = false;
94
97
  const showValuesCountFunction = this.getColumnFilterOptions().valuesFilterOptions.showValuesCount;
@@ -128,6 +131,26 @@ export class GridInternalApi extends ApiBase {
128
131
  suppressClientSideFilter,
129
132
  };
130
133
  }
134
+ async getDistinctFilterListValuesForColumn(column, filter, distinctValuesParams) {
135
+ var _a;
136
+ const filterPermittedValues = (_a = this.getUserInterfaceApi().getFilterPermittedValuesForColumn(column)) !== null && _a !== void 0 ? _a : {
137
+ suppressFilterSearchBar: false,
138
+ values: () => undefined,
139
+ };
140
+ let preparedPermittedValues = undefined;
141
+ try {
142
+ const filterPermittedValuesParams = Object.assign(Object.assign({}, createBaseContext(this.adaptable.api)), { column: column, searchFilter: filter });
143
+ preparedPermittedValues = await (filterPermittedValues === null || filterPermittedValues === void 0 ? void 0 : filterPermittedValues.values(filterPermittedValuesParams));
144
+ }
145
+ catch (error) {
146
+ this.adaptable.logger.consoleError(`Failed to load filter permitted values`, column, filter, error);
147
+ }
148
+ distinctValuesParams.permittedValues = preparedPermittedValues;
149
+ return {
150
+ suppressClientSideFilter: filterPermittedValues.suppressFilterSearchBar,
151
+ gridCells: this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams),
152
+ };
153
+ }
131
154
  /**
132
155
  * Gets all distinct Custom Sort values for the Column with the given ColumnId
133
156
  * @param columnId Column to check
@@ -140,11 +163,24 @@ export class GridInternalApi extends ApiBase {
140
163
  const distinctValuesParams = {
141
164
  visibleRowsOnly: false,
142
165
  };
143
- const gridCells = await this.adaptable.getDistinctCustomSortValuesForColumn(abColumn, distinctValuesParams);
166
+ const gridCells = await this.getDistinctCustomSortValuesForColumn(abColumn, distinctValuesParams);
144
167
  return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
145
168
  return cv.normalisedValue;
146
169
  });
147
170
  }
171
+ async getDistinctCustomSortValuesForColumn(column, distinctValuesParams) {
172
+ const customSortPermittedValues = await this.getUserInterfaceApi().getCustomSortPermittedValuesForColumn(column);
173
+ let preparedPermittedValues = undefined;
174
+ try {
175
+ const permittedValuesParams = Object.assign(Object.assign({}, createBaseContext(this.adaptable.api)), { column: column });
176
+ preparedPermittedValues = await (customSortPermittedValues === null || customSortPermittedValues === void 0 ? void 0 : customSortPermittedValues.values(permittedValuesParams));
177
+ }
178
+ catch (error) {
179
+ this.adaptable.logger.consoleError(`Failed to load custom sort permitted values`, column, error);
180
+ }
181
+ distinctValuesParams.permittedValues = preparedPermittedValues;
182
+ return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
183
+ }
148
184
  /**
149
185
  * Gets all distinct Bulk Update values for the Column with the given ColumnId
150
186
  * @param columnId Column to check
@@ -158,11 +194,24 @@ export class GridInternalApi extends ApiBase {
158
194
  const distinctValuesParams = {
159
195
  visibleRowsOnly: false,
160
196
  };
161
- const gridCells = await this.adaptable.getDistinctBulkUpdateValuesForColumn(abColumn, selectedGridCells, distinctValuesParams);
197
+ const gridCells = await this.getDistinctBulkUpdateValuesForColumn(abColumn, selectedGridCells, distinctValuesParams);
162
198
  return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
163
199
  return cv.normalisedValue;
164
200
  });
165
201
  }
202
+ async getDistinctBulkUpdateValuesForColumn(column, selectedGridCells, distinctValuesParams) {
203
+ const bulkUpdatePermittedValues = await this.getUserInterfaceApi().getBulkUpdatePermittedValuesForColumn(column);
204
+ let preparedPermittedValues = undefined;
205
+ try {
206
+ const bulkUpdatePermittedValuesParams = Object.assign(Object.assign({}, createBaseContext(this.adaptable.api)), { column: column, gridCells: selectedGridCells });
207
+ preparedPermittedValues = await (bulkUpdatePermittedValues === null || bulkUpdatePermittedValues === void 0 ? void 0 : bulkUpdatePermittedValues.values(bulkUpdatePermittedValuesParams));
208
+ }
209
+ catch (error) {
210
+ this.adaptable.logger.consoleError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
211
+ }
212
+ distinctValuesParams.permittedValues = preparedPermittedValues;
213
+ return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
214
+ }
166
215
  /**
167
216
  * Gets all distinct visible (after current filters are applied) display values in the Column with the given ColumnId
168
217
  * @param columnId Column to check
@@ -257,7 +306,7 @@ export class GridInternalApi extends ApiBase {
257
306
  this.dispatchAction(GridRedux.GridSetSelectedRows(selectedRowInfo));
258
307
  }
259
308
  buildStandaloneColumnHeader(column) {
260
- return this.adaptable.buildStandaloneColumnHeader(column);
309
+ return this.adaptable.agGridMenuAdapter.buildStandaloneColumnHeader(column);
261
310
  }
262
311
  getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
263
312
  if (!editLookUpItem || !column) {
@@ -285,4 +334,74 @@ export class GridInternalApi extends ApiBase {
285
334
  // this will use the columnApi method that first looks for permitted values and then distinct values
286
335
  return this.getDistinctDisplayValuesForColumn(column.columnId);
287
336
  }
337
+ getAgGridDataType(dataType) {
338
+ if (!dataType) {
339
+ return 'abColDefString';
340
+ }
341
+ switch (dataType) {
342
+ case 'Boolean':
343
+ return 'abColDefBoolean';
344
+ case 'Date':
345
+ return 'abColDefDate';
346
+ case 'Number':
347
+ return 'abColDefNumber';
348
+ case 'Object':
349
+ return 'abColDefObject';
350
+ case 'String':
351
+ return 'abColDefString';
352
+ case 'NumberArray':
353
+ return 'abColDefNumberArray';
354
+ case 'TupleNumberArray':
355
+ return 'abColDefTupleNumberArray';
356
+ case 'ObjectNumberArray':
357
+ return 'abColDefObjectNumberArray';
358
+ default:
359
+ return 'abColDefCustom';
360
+ }
361
+ }
362
+ getRowHighlightStyle(params) {
363
+ var _a;
364
+ const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
365
+ const highlightRow = (_a = this.getAdaptableApi()
366
+ .internalApi.getSystemState()
367
+ .HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
368
+ return highlightRow.primaryKeyValue === primaryKeyValue;
369
+ });
370
+ if (highlightRow) {
371
+ return convertAdaptableStyleToCSS(highlightRow.highlightStyle);
372
+ }
373
+ }
374
+ getAlertRowStyle(params) {
375
+ var _a, _b;
376
+ const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
377
+ const highlightRow = (_b = (_a = alert === null || alert === void 0 ? void 0 : alert.alertDefinition) === null || _a === void 0 ? void 0 : _a.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow;
378
+ if (highlightRow) {
379
+ return typeof highlightRow === 'object'
380
+ ? convertAdaptableStyleToCSS(highlightRow)
381
+ : {
382
+ backgroundColor: UIHelper.getColorByMessageType(alert.alertDefinition.MessageType),
383
+ };
384
+ }
385
+ return null;
386
+ }
387
+ getAlertRowClass(params) {
388
+ var _a, _b;
389
+ const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
390
+ const highlightRow = (_b = (_a = alert === null || alert === void 0 ? void 0 : alert.alertDefinition) === null || _a === void 0 ? void 0 : _a.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow;
391
+ return typeof highlightRow === 'object' && (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName)
392
+ ? highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName
393
+ : null;
394
+ }
395
+ getRowHighlightClass(params) {
396
+ var _a;
397
+ const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
398
+ const highlightRow = (_a = this.getAdaptableApi()
399
+ .internalApi.getSystemState()
400
+ .HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
401
+ return highlightRow.primaryKeyValue === primaryKeyValue;
402
+ });
403
+ return typeof (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.highlightStyle) === 'object'
404
+ ? highlightRow.highlightStyle.ClassName
405
+ : null;
406
+ }
288
407
  }
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class NotesInternalApi extends ApiBase {
3
+ areNotesAvailable(): boolean;
4
+ }
@@ -0,0 +1,14 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export class NotesInternalApi extends ApiBase {
3
+ areNotesAvailable() {
4
+ var _a;
5
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
6
+ if (currentLayout.EnablePivot) {
7
+ return false;
8
+ }
9
+ if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
10
+ return false;
11
+ }
12
+ return true;
13
+ }
14
+ }
@@ -5,7 +5,7 @@ export class TeamSharingInternalApi extends ApiBase {
5
5
  * @param sharedEntity Entity that has been changed
6
6
  */
7
7
  fireTeamSharingEntityChangedEvent(sharedEntity) {
8
- if (this.adaptable.isLive) {
8
+ if (this.adaptable.isReady) {
9
9
  const teamSharingEntityChangedInfo = {
10
10
  adaptableApi: this.adaptable.api,
11
11
  sharedEntity: sharedEntity,
@@ -1,10 +1,10 @@
1
1
  import { InteropioPluginOptions } from '../AdaptableOptions/InteropioPluginOptions';
2
2
  /**
3
- * Provides run-time access to the Glue42Web Plugin
3
+ * Provides run-time access to the Interopio Plugin
4
4
  */
5
5
  export interface InteropioPluginApi {
6
6
  /**
7
- * Retrieves the Glue42WebPlugOptions provided in Glue42Web Plugin
7
+ * Retrieves the InteropioPlugOptions provided in interopio Plugin
8
8
  */
9
9
  getPluginOptions(): InteropioPluginOptions;
10
10
  }
@@ -163,6 +163,17 @@ export interface LayoutApi {
163
163
  * @param layoutName layout from which to remove Column
164
164
  */
165
165
  removeColumnFromLayout(columnId: string, layoutName: string): void;
166
+ /**
167
+ * Adds a Column to a given Layout
168
+ * @param columnId Column to add
169
+ * @param layoutName layout to which to add Column
170
+ */
171
+ addColumnToLayout(columnId: string, layoutName: string): void;
172
+ /**
173
+ * Adds a Column to Current Layout
174
+ * @param columnId Column to add
175
+ */
176
+ addColumnToCurrentLayout(columnId: string): void;
166
177
  /**
167
178
  * Returns what the layout supports.
168
179
  * This takes into account the data-source.
@@ -5,7 +5,7 @@ import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions,
5
5
  import { Fdc3Options } from '../AdaptableOptions/Fdc3Options';
6
6
  import { ExpressionOptions } from '../AdaptableOptions/ExpressionOptions';
7
7
  import { DataImportOptions } from '../AdaptableOptions/DataImportOptions';
8
- import { CommentsOptions } from '../AdaptableOptions/CommentsOptions';
8
+ import { CommentsOptions } from '../AdaptableOptions/CommentOptions';
9
9
  /**
10
10
  * Range of functions to access Adaptable Options
11
11
  */
@@ -42,6 +42,10 @@ export interface OptionsApi {
42
42
  * Returns `AdaptableOptions.actionColumnOptions`
43
43
  */
44
44
  getActionColumnOptions(): Readonly<ActionColumnOptions>;
45
+ /**
46
+ * Returns available columns types defined under columnOptions.columnTypes
47
+ */
48
+ getColumnTypes(): string[];
45
49
  /**
46
50
  * Returns `AdaptableOptions.actionRowOptions`
47
51
  */
@@ -31,6 +31,11 @@ export interface ScopeApi {
31
31
  * @param scope Scope to check
32
32
  */
33
33
  scopeHasDataType(scope: AdaptableScope): boolean;
34
+ /**
35
+ * True if Scope contains ColumnTypes
36
+ * @param scope Scope to check
37
+ */
38
+ scopeHasColumnType(scope: AdaptableScope): boolean;
34
39
  /**
35
40
  * True if the Scope is DataTypes and contains only Boolean
36
41
  * @param scope Scope to check
@@ -87,6 +92,11 @@ export interface ScopeApi {
87
92
  * @param scope Scope to check
88
93
  */
89
94
  getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
95
+ /**
96
+ * Returns all the ColumnTypes in the Scope
97
+ * @param scope Scope to check
98
+ */
99
+ getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
90
100
  /**
91
101
  * Returns all the DataTypes in the Scope
92
102
  * @param scope Scope to check
@@ -0,0 +1,3 @@
1
+ export declare const ADAPTABLE_VERSION: any;
2
+ export declare const ADAPTABLE_PUBLISH_TIMESTAMP: any;
3
+ export declare const INFINITE_TABLE_LICENSE_KEY: any;
package/src/EnvVars.js ADDED
@@ -0,0 +1,4 @@
1
+ import env from './env';
2
+ export const ADAPTABLE_VERSION = env.VERSION;
3
+ export const ADAPTABLE_PUBLISH_TIMESTAMP = env.PUBLISH_TIMESTAMP;
4
+ export const INFINITE_TABLE_LICENSE_KEY = env.INFINITE_TABLE_LICENSE_KEY;
@@ -19,6 +19,10 @@ export interface AdaptableColumnBase extends AdaptableObject {
19
19
  * DataType of the Column
20
20
  */
21
21
  dataType: AdaptableColumnDataType;
22
+ /**
23
+ * Column Types of the Column
24
+ */
25
+ columnTypes?: string[];
22
26
  }
23
27
  export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
24
28
  oldColumns: AdaptableColumn[];
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
54
54
  /**
55
55
  * All AdapTable System Icon names
56
56
  */
57
- export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter';
57
+ export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter' | 'rows';
@@ -8,7 +8,10 @@ export type ScopeDataTypes<Type = ScopeDataType> = {
8
8
  export type ScopeColumnIds = {
9
9
  ColumnIds: string[];
10
10
  };
11
+ export type ScopeColumnTypes = {
12
+ ColumnTypes: string[];
13
+ };
11
14
  /**
12
15
  * Defines where a given Object / Module is active
13
16
  */
14
- export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds;
17
+ export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds | ScopeColumnTypes;
@@ -16,3 +16,4 @@ export interface WeightedAverageAggregation {
16
16
  * Defines which Columns in a Layout display Aggregated values when Row-Grouped
17
17
  */
18
18
  export type AggregationColumns = Record<string, string | true | WeightedAverageAggregation>;
19
+ export declare const isWeightedAverageAggregation: (aggFunc: AggregationColumns[keyof AggregationColumns]) => aggFunc is WeightedAverageAggregation;
@@ -1 +1,4 @@
1
1
  export const WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
2
+ export const isWeightedAverageAggregation = (aggFunc) => {
3
+ return (aggFunc === null || aggFunc === void 0 ? void 0 : aggFunc.type) === 'weightedAverage';
4
+ };
@@ -6,6 +6,14 @@ export interface DataUpdateConfig {
6
6
  * Whether data should be updated asynchronously
7
7
  */
8
8
  runAsync?: boolean;
9
+ /**
10
+ * Whether to flush async updates.
11
+ *
12
+ * If `true`, any async transactions will be flushed.
13
+ * This flag can be true even if you runAsync is `false`.
14
+ * So even if the currenct transaction/operation is synchronous, this will flush existing async transactions.
15
+ */
16
+ flushAsync?: boolean;
9
17
  /**
10
18
  * Callback function invoked when a batch successfully updates
11
19
  */
@@ -0,0 +1,7 @@
1
+ import { SummarySupportedExpression } from '../../Utilities/Services/SummaryService';
2
+ export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
3
+ export type RowSummaryPosition = 'Top' | 'Bottom';
4
+ export interface RowSummary {
5
+ Position?: RowSummaryPosition;
6
+ ColumnsMap: Record<string, SummarySupportedExpression>;
7
+ }
@@ -0,0 +1 @@
1
+ export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
@@ -3,6 +3,7 @@ import { AdaptableObject } from './Common/AdaptableObject';
3
3
  import { ColumnSort } from './Common/ColumnSort';
4
4
  import { ColumnFilter, GridFilter } from '../types';
5
5
  import { AggregationColumns } from './Common/AggregationColumns';
6
+ import { RowSummary } from './Common/RowSummary';
6
7
  /**
7
8
  * Predefined Configuration for the Layout Module
8
9
  */
@@ -82,4 +83,8 @@ export interface Layout extends AdaptableObject {
82
83
  * Whether to include the aggFunc name in the column header: e.g. 'sum(Bank Balance)' will just be 'Bank Balance'
83
84
  */
84
85
  SuppressAggFuncInHeader?: boolean;
86
+ /**
87
+ * Row summaries
88
+ */
89
+ RowSummaries?: RowSummary[];
85
90
  }
@@ -1,5 +1,14 @@
1
1
  import { AdaptableObject } from '../types';
2
2
  import { ConfigState } from './ConfigState';
3
+ /**
4
+ * Predefined Configuration for Notes Module
5
+ */
6
+ export interface NotesState extends ConfigState {
7
+ /**
8
+ * Collection of AdapTable Notes
9
+ */
10
+ Notes?: AdaptableNotes;
11
+ }
3
12
  /**
4
13
  * Note that can be applied to a Cell in AdapTable
5
14
  */
@@ -11,13 +20,7 @@ export interface AdaptableNote extends AdaptableObject {
11
20
  /**
12
21
  * Value of the Note
13
22
  */
14
- Value: string;
15
- /**
16
- * Author of the Note
17
- */
18
- Author: {
19
- UserName: string;
20
- };
23
+ Text: string;
21
24
  /**
22
25
  * Value in Grid's Primary Key Column
23
26
  */
@@ -26,21 +29,8 @@ export interface AdaptableNote extends AdaptableObject {
26
29
  * Id of Column containing the Note
27
30
  */
28
31
  ColumnId: string;
29
- /**
30
- * Id of this AdapTable instance
31
- */
32
- AdaptableId: string;
33
32
  }
34
33
  /**
35
34
  * Collection of Cell Notes
36
35
  */
37
36
  export type AdaptableNotes = AdaptableNote[];
38
- /**
39
- * Predefined Configuration for Notes Module
40
- */
41
- export interface NotesState extends ConfigState {
42
- /**
43
- * Collection of AdapTable Notes
44
- */
45
- Notes?: AdaptableNotes;
46
- }
@@ -44,7 +44,7 @@ export interface PredefinedConfig {
44
44
  */
45
45
  CustomSort?: CustomSortState;
46
46
  /**
47
- * Collection of notes that can be edited on cell level
47
+ * Collection of personal Notes that are edited at Cell level
48
48
  */
49
49
  Notes?: NotesState;
50
50
  /**
@@ -20,6 +20,10 @@ export type { OpenFinReport };
20
20
  type ROW_PRIMARY_KEY = string;
21
21
  type COLUMN_ID_OR_WHOLE_ROW_LABEL = string;
22
22
  export type DataChangeHistoryMode = 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
23
+ export type SystemRowSummary = {
24
+ Position: 'Top' | 'Bottom';
25
+ RowData: Record<string, any>;
26
+ };
23
27
  /**
24
28
  * Internal state, used by Adaptable during a session; none of it is provided through Predefined Config, nor is it persisted
25
29
  */
@@ -103,6 +107,9 @@ export interface SystemState extends InternalState, IPushPullState, OpenFinState
103
107
  focusedEntity?: 'Note' | 'Comment';
104
108
  popupPosition?: CellAddress | null;
105
109
  };
110
+ RowSummary?: {
111
+ rowSummaries?: SystemRowSummary[];
112
+ };
106
113
  }
107
114
  export interface ProgressIndicator {
108
115
  active: boolean;
@@ -30,6 +30,10 @@ export declare const LAYOUT_SELECT = "LAYOUT_SELECT";
30
30
  * @ReduxAction A Layout has been (auto)saved
31
31
  */
32
32
  export declare const LAYOUT_SAVE = "LAYOUT_SAVE";
33
+ /**
34
+ * @ReduxAction A Column has been added
35
+ */
36
+ export declare const LAYOUT_ADD_COLUMN = "LAYOUT_ADD_COLUMN";
33
37
  /**
34
38
  * @ReduxAction A Column has been removed
35
39
  */
@@ -145,6 +149,10 @@ export interface LayoutSetColumnCaptionAction extends Redux.Action {
145
149
  columnId: string;
146
150
  caption: string;
147
151
  }
152
+ export interface LayoutAddColumnAction extends Redux.Action {
153
+ layoutName: string;
154
+ columnId: string;
155
+ }
148
156
  export interface LayoutRemoveColumnAction extends Redux.Action {
149
157
  layoutName: string;
150
158
  columnId: string;
@@ -163,6 +171,7 @@ export declare const LayoutAdd: (layout: Layout) => LayoutAddAction;
163
171
  export declare const LayoutDelete: (layout: Layout) => LayoutDeleteAction;
164
172
  export declare const LayoutSave: (layout: Layout) => LayoutSaveAction;
165
173
  export declare const LayoutSetColumnCaption: (layoutName: string, columnId: string, caption: string) => LayoutSetColumnCaptionAction;
174
+ export declare const LayoutAddColumn: (layoutName: string, columnId: string) => LayoutAddColumnAction;
166
175
  export declare const LayoutRemoveColumn: (layoutName: string, columnId: string) => LayoutRemoveColumnAction;
167
176
  export declare const LayoutSelect: (layoutName: string) => LayoutSelectAction;
168
177
  export declare const LayoutReady: (layoutState: LayoutState) => LayoutReadyAction;
@@ -28,6 +28,10 @@ export const LAYOUT_SELECT = 'LAYOUT_SELECT';
28
28
  * @ReduxAction A Layout has been (auto)saved
29
29
  */
30
30
  export const LAYOUT_SAVE = 'LAYOUT_SAVE';
31
+ /**
32
+ * @ReduxAction A Column has been added
33
+ */
34
+ export const LAYOUT_ADD_COLUMN = 'LAYOUT_ADD_COLUMN';
31
35
  /**
32
36
  * @ReduxAction A Column has been removed
33
37
  */
@@ -149,6 +153,11 @@ export const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
149
153
  columnId,
150
154
  caption,
151
155
  });
156
+ export const LayoutAddColumn = (layoutName, columnId) => ({
157
+ type: LAYOUT_ADD_COLUMN,
158
+ layoutName,
159
+ columnId,
160
+ });
152
161
  export const LayoutRemoveColumn = (layoutName, columnId) => ({
153
162
  type: LAYOUT_REMOVE_COLUMN,
154
163
  layoutName,
@@ -218,6 +227,17 @@ export const LayoutReducer = (state = initialState, action) => {
218
227
  }
219
228
  return state;
220
229
  }
230
+ case LAYOUT_ADD_COLUMN: {
231
+ const addColumnAction = action;
232
+ const layoutname = addColumnAction.layoutName;
233
+ const colToAdd = addColumnAction.columnId;
234
+ let layoutToUpdate = state.Layouts.find((l) => l.Name === layoutname);
235
+ if (layoutToUpdate) {
236
+ layoutToUpdate.Columns.push(colToAdd);
237
+ return Object.assign(Object.assign({}, state), { Layouts: state.Layouts.map((abObject) => abObject.Uuid === layoutToUpdate.Uuid ? layoutToUpdate : abObject) });
238
+ }
239
+ return state;
240
+ }
221
241
  case LAYOUT_REMOVE_COLUMN: {
222
242
  const removeColumnAction = action;
223
243
  const layoutname = removeColumnAction.layoutName;
@@ -1,5 +1,6 @@
1
1
  import { AdaptableNote, NotesState } from '../../PredefinedConfig/NotesState';
2
2
  import * as Redux from 'redux';
3
+ import { CellAddress } from '../../types';
3
4
  /**
4
5
  * @ReduxAction A Notes has been added
5
6
  */
@@ -32,8 +33,6 @@ export declare const NotesAdd: (note: AdaptableNote) => AdaptableNotesAddAction;
32
33
  export declare const NotesEdit: (note: AdaptableNote) => AdaptableNotesEditAction;
33
34
  export declare const NotesDelete: (note: AdaptableNote) => AdaptableNotesDeleteAction;
34
35
  export declare const NotesReady: (note: NotesState) => NoteReadyAction;
35
- export declare const GetNotesSelector: (state: NotesState, config?: {
36
- PrimaryKeyValue: string | number;
37
- ColumnId: string;
38
- }) => AdaptableNote[];
36
+ export declare const GetAllNotesSelector: (state: NotesState) => AdaptableNote[];
37
+ export declare const GetNotesSelector: (state: NotesState, address: CellAddress) => AdaptableNote[];
39
38
  export declare const NotesReducer: Redux.Reducer<NotesState>;
@@ -32,21 +32,22 @@ export const NotesReady = (note) => ({
32
32
  type: NOTES_READY,
33
33
  notesState: note,
34
34
  });
35
- export const GetNotesSelector = (state, config) => {
35
+ export const GetAllNotesSelector = (state) => state.Notes;
36
+ export const GetNotesSelector = (state, address) => {
36
37
  var _a;
37
- if (!config) {
38
+ if (!address) {
38
39
  return [];
39
40
  }
40
41
  return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
41
- if (note.PrimaryKeyValue === config.PrimaryKeyValue && note.ColumnId === config.ColumnId) {
42
+ if (note.PrimaryKeyValue === address.PrimaryKeyValue && note.ColumnId === address.ColumnId) {
42
43
  // happy check
43
44
  return true;
44
45
  }
45
46
  // Primary keys retreived from the grid dom are always strings, so we must also consider them strings
46
- if ((typeof config.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
47
- (typeof config.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
48
- return (note.PrimaryKeyValue.toString() === config.PrimaryKeyValue.toString() &&
49
- note.ColumnId === config.ColumnId);
47
+ if ((typeof address.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
48
+ (typeof address.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
49
+ return (note.PrimaryKeyValue.toString() === address.PrimaryKeyValue.toString() &&
50
+ note.ColumnId === address.ColumnId);
50
51
  }
51
52
  return false;
52
53
  });