@adaptabletools/adaptable-cjs 18.0.0-canary.1 → 18.0.0-canary.10

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 (259) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +5 -21
  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 +2 -6
  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 +107 -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 +71 -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 +18 -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 +60 -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 +18 -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 +8 -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 +5 -1
  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 +4 -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 +22 -1
  91. package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
  92. package/src/Redux/ActionsReducers/NotesRedux.js +10 -8
  93. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  94. package/src/Redux/ActionsReducers/SystemRedux.js +16 -3
  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 +3 -2
  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 +6 -1
  154. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  155. package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
  156. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  157. package/src/Utilities/Helpers/Helper.js +6 -1
  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 +19 -7
  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 +33 -0
  173. package/src/View/AdaptableView.js +1 -3
  174. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  175. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  176. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  177. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  178. package/src/View/Comments/CommentsPopup.js +12 -8
  179. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  180. package/src/View/Components/NewScopeComponent.js +34 -1
  181. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  182. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  183. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  184. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
  185. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  186. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  187. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  188. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  189. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
  190. package/src/View/GridFilter/GridFilterViewPanel.js +6 -2
  191. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  192. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  193. package/src/View/Layout/TransposedPopup.js +199 -0
  194. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  195. package/src/View/Notes/NotesPopup.js +8 -10
  196. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  197. package/src/View/Theme/ThemeSelector.js +2 -2
  198. package/src/agGrid/ActionColumnRenderer.js +7 -6
  199. package/src/agGrid/Adaptable.d.ts +3 -455
  200. package/src/agGrid/Adaptable.js +7 -5291
  201. package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
  202. package/src/agGrid/AdaptableAgGrid.js +3941 -0
  203. package/src/agGrid/AdaptableLogger.js +78 -13
  204. package/src/agGrid/AgGridAdapter.d.ts +62 -0
  205. package/src/agGrid/AgGridAdapter.js +582 -0
  206. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  207. package/src/agGrid/AgGridColumnAdapter.js +829 -0
  208. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  209. package/src/agGrid/AgGridMenuAdapter.js +276 -0
  210. package/src/agGrid/AgGridOptionsService.d.ts +12 -0
  211. package/src/agGrid/AgGridOptionsService.js +58 -0
  212. package/src/agGrid/BadgeRenderer.js +1 -1
  213. package/src/agGrid/CheckboxRenderer.js +1 -1
  214. package/src/agGrid/FilterWrapper.d.ts +2 -2
  215. package/src/agGrid/FilterWrapper.js +1 -1
  216. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  217. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  218. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +73 -10
  219. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
  220. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  221. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  222. package/src/components/Datepicker/index.d.ts +1 -1
  223. package/src/components/InfiniteTable/index.js +2 -2
  224. package/src/components/Input/index.d.ts +1 -1
  225. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  226. package/src/components/Modal/index.d.ts +1 -0
  227. package/src/components/Modal/index.js +6 -4
  228. package/src/components/Select/Select.d.ts +2 -0
  229. package/src/components/Select/Select.js +2 -2
  230. package/src/components/icons/index.js +2 -0
  231. package/src/components/icons/rows.d.ts +3 -0
  232. package/src/components/icons/rows.js +7 -0
  233. package/src/env.js +2 -2
  234. package/src/metamodel/adaptable.metamodel.d.ts +74 -11
  235. package/src/metamodel/adaptable.metamodel.js +147 -34
  236. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  237. package/src/migration/AdaptableUpgradeHelper.js +52 -0
  238. package/src/migration/VersionUpgrade.d.ts +8 -0
  239. package/src/migration/VersionUpgrade.js +15 -0
  240. package/src/migration/VersionUpgrade17.d.ts +18 -0
  241. package/src/migration/VersionUpgrade17.js +347 -0
  242. package/src/migration/VersionUpgrade18.d.ts +5 -0
  243. package/src/migration/VersionUpgrade18.js +10 -0
  244. package/src/parser/src/types.d.ts +5 -0
  245. package/src/types.d.ts +7 -3
  246. package/tsconfig.cjs.tsbuildinfo +1 -1
  247. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  248. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  249. package/src/Utilities/Services/Interface/IRowEditService.js +0 -2
  250. package/src/View/Components/ScopeComponent.d.ts +0 -24
  251. package/src/View/Components/ScopeComponent.js +0 -138
  252. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  253. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
  254. package/src/agGrid/agGridHelper.d.ts +0 -57
  255. package/src/agGrid/agGridHelper.js +0 -691
  256. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  257. package/src/agGrid/agGridMenuHelper.js +0 -673
  258. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  259. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
@@ -7,12 +7,15 @@ const Enums_1 = require("../../PredefinedConfig/Common/Enums");
7
7
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
8
8
  const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
9
9
  const NumberExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/NumberExtensions"));
10
+ const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
11
+ const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
12
+ const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
10
13
  class GridInternalApi extends ApiBase_1.ApiBase {
11
14
  /**
12
15
  * Fires Grid Sorted Event
13
16
  */
14
17
  fireGridSortedEvent() {
15
- if (this.adaptable.isLive) {
18
+ if (this.adaptable.isReady) {
16
19
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
17
20
  const adaptableApi = this.getAdaptableApi();
18
21
  const gridSortedInfo = {
@@ -28,7 +31,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
28
31
  * Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
29
32
  */
30
33
  fireCellChangedEvent(cellDataChangedInfo) {
31
- if (this.adaptable.isLive) {
34
+ if (this.adaptable.isReady) {
32
35
  const cellChangedInfo = {
33
36
  adaptableApi: this.adaptable.api,
34
37
  cellChange: cellDataChangedInfo,
@@ -42,7 +45,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
42
45
  * Fires Grid Data Changed Event - when a row has changed in AG Grid
43
46
  */
44
47
  fireGridDataChangedEvent(dataRows, rowNodes, rowTrigger) {
45
- if (this.adaptable.isLive) {
48
+ if (this.adaptable.isReady) {
46
49
  const gridDataChangedInfo = {
47
50
  changedAt: Date.now(),
48
51
  adaptableApi: this.adaptable.api,
@@ -92,7 +95,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
92
95
  const distinctValuesParams = {
93
96
  visibleRowsOnly: showFilteredRowsOnly,
94
97
  };
95
- const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterListValuesForColumn(abColumn, filter, distinctValuesParams);
98
+ const { gridCells, suppressClientSideFilter } = await this.getDistinctFilterListValuesForColumn(abColumn, filter, distinctValuesParams);
96
99
  const sortedDistinctValues = this.sortDistinctValues(gridCells, abColumn);
97
100
  let shouldShowValuesCount = false;
98
101
  const showValuesCountFunction = this.getColumnFilterOptions().valuesFilterOptions.showValuesCount;
@@ -132,6 +135,26 @@ class GridInternalApi extends ApiBase_1.ApiBase {
132
135
  suppressClientSideFilter,
133
136
  };
134
137
  }
138
+ async getDistinctFilterListValuesForColumn(column, filter, distinctValuesParams) {
139
+ var _a;
140
+ const filterPermittedValues = (_a = this.getUserInterfaceApi().getFilterPermittedValuesForColumn(column)) !== null && _a !== void 0 ? _a : {
141
+ suppressFilterSearchBar: false,
142
+ values: () => undefined,
143
+ };
144
+ let preparedPermittedValues = undefined;
145
+ try {
146
+ const filterPermittedValuesParams = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)), { column: column, searchFilter: filter });
147
+ preparedPermittedValues = await (filterPermittedValues === null || filterPermittedValues === void 0 ? void 0 : filterPermittedValues.values(filterPermittedValuesParams));
148
+ }
149
+ catch (error) {
150
+ this.adaptable.logger.consoleError(`Failed to load filter permitted values`, column, filter, error);
151
+ }
152
+ distinctValuesParams.permittedValues = preparedPermittedValues;
153
+ return {
154
+ suppressClientSideFilter: filterPermittedValues.suppressFilterSearchBar,
155
+ gridCells: this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams),
156
+ };
157
+ }
135
158
  /**
136
159
  * Gets all distinct Custom Sort values for the Column with the given ColumnId
137
160
  * @param columnId Column to check
@@ -144,11 +167,24 @@ class GridInternalApi extends ApiBase_1.ApiBase {
144
167
  const distinctValuesParams = {
145
168
  visibleRowsOnly: false,
146
169
  };
147
- const gridCells = await this.adaptable.getDistinctCustomSortValuesForColumn(abColumn, distinctValuesParams);
170
+ const gridCells = await this.getDistinctCustomSortValuesForColumn(abColumn, distinctValuesParams);
148
171
  return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
149
172
  return cv.normalisedValue;
150
173
  });
151
174
  }
175
+ async getDistinctCustomSortValuesForColumn(column, distinctValuesParams) {
176
+ const customSortPermittedValues = await this.getUserInterfaceApi().getCustomSortPermittedValuesForColumn(column);
177
+ let preparedPermittedValues = undefined;
178
+ try {
179
+ const permittedValuesParams = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)), { column: column });
180
+ preparedPermittedValues = await (customSortPermittedValues === null || customSortPermittedValues === void 0 ? void 0 : customSortPermittedValues.values(permittedValuesParams));
181
+ }
182
+ catch (error) {
183
+ this.adaptable.logger.consoleError(`Failed to load custom sort permitted values`, column, error);
184
+ }
185
+ distinctValuesParams.permittedValues = preparedPermittedValues;
186
+ return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
187
+ }
152
188
  /**
153
189
  * Gets all distinct Bulk Update values for the Column with the given ColumnId
154
190
  * @param columnId Column to check
@@ -162,11 +198,24 @@ class GridInternalApi extends ApiBase_1.ApiBase {
162
198
  const distinctValuesParams = {
163
199
  visibleRowsOnly: false,
164
200
  };
165
- const gridCells = await this.adaptable.getDistinctBulkUpdateValuesForColumn(abColumn, selectedGridCells, distinctValuesParams);
201
+ const gridCells = await this.getDistinctBulkUpdateValuesForColumn(abColumn, selectedGridCells, distinctValuesParams);
166
202
  return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
167
203
  return cv.normalisedValue;
168
204
  });
169
205
  }
206
+ async getDistinctBulkUpdateValuesForColumn(column, selectedGridCells, distinctValuesParams) {
207
+ const bulkUpdatePermittedValues = await this.getUserInterfaceApi().getBulkUpdatePermittedValuesForColumn(column);
208
+ let preparedPermittedValues = undefined;
209
+ try {
210
+ const bulkUpdatePermittedValuesParams = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)), { column: column, gridCells: selectedGridCells });
211
+ preparedPermittedValues = await (bulkUpdatePermittedValues === null || bulkUpdatePermittedValues === void 0 ? void 0 : bulkUpdatePermittedValues.values(bulkUpdatePermittedValuesParams));
212
+ }
213
+ catch (error) {
214
+ this.adaptable.logger.consoleError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
215
+ }
216
+ distinctValuesParams.permittedValues = preparedPermittedValues;
217
+ return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
218
+ }
170
219
  /**
171
220
  * Gets all distinct visible (after current filters are applied) display values in the Column with the given ColumnId
172
221
  * @param columnId Column to check
@@ -261,7 +310,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
261
310
  this.dispatchAction(GridRedux.GridSetSelectedRows(selectedRowInfo));
262
311
  }
263
312
  buildStandaloneColumnHeader(column) {
264
- return this.adaptable.buildStandaloneColumnHeader(column);
313
+ return this.adaptable.agGridMenuAdapter.buildStandaloneColumnHeader(column);
265
314
  }
266
315
  getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
267
316
  if (!editLookUpItem || !column) {
@@ -289,5 +338,75 @@ class GridInternalApi extends ApiBase_1.ApiBase {
289
338
  // this will use the columnApi method that first looks for permitted values and then distinct values
290
339
  return this.getDistinctDisplayValuesForColumn(column.columnId);
291
340
  }
341
+ getAgGridDataType(dataType) {
342
+ if (!dataType) {
343
+ return 'abColDefString';
344
+ }
345
+ switch (dataType) {
346
+ case 'Boolean':
347
+ return 'abColDefBoolean';
348
+ case 'Date':
349
+ return 'abColDefDate';
350
+ case 'Number':
351
+ return 'abColDefNumber';
352
+ case 'Object':
353
+ return 'abColDefObject';
354
+ case 'String':
355
+ return 'abColDefString';
356
+ case 'NumberArray':
357
+ return 'abColDefNumberArray';
358
+ case 'TupleNumberArray':
359
+ return 'abColDefTupleNumberArray';
360
+ case 'ObjectNumberArray':
361
+ return 'abColDefObjectNumberArray';
362
+ default:
363
+ return 'abColDefCustom';
364
+ }
365
+ }
366
+ getRowHighlightStyle(params) {
367
+ var _a;
368
+ const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
369
+ const highlightRow = (_a = this.getAdaptableApi()
370
+ .internalApi.getSystemState()
371
+ .HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
372
+ return highlightRow.primaryKeyValue === primaryKeyValue;
373
+ });
374
+ if (highlightRow) {
375
+ return (0, StyleHelper_1.convertAdaptableStyleToCSS)(highlightRow.highlightStyle);
376
+ }
377
+ }
378
+ getAlertRowStyle(params) {
379
+ var _a, _b;
380
+ const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
381
+ 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;
382
+ if (highlightRow) {
383
+ return typeof highlightRow === 'object'
384
+ ? (0, StyleHelper_1.convertAdaptableStyleToCSS)(highlightRow)
385
+ : {
386
+ backgroundColor: UIHelper_1.default.getColorByMessageType(alert.alertDefinition.MessageType),
387
+ };
388
+ }
389
+ return null;
390
+ }
391
+ getAlertRowClass(params) {
392
+ var _a, _b;
393
+ const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
394
+ 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;
395
+ return typeof highlightRow === 'object' && (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName)
396
+ ? highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName
397
+ : null;
398
+ }
399
+ getRowHighlightClass(params) {
400
+ var _a;
401
+ const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
402
+ const highlightRow = (_a = this.getAdaptableApi()
403
+ .internalApi.getSystemState()
404
+ .HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
405
+ return highlightRow.primaryKeyValue === primaryKeyValue;
406
+ });
407
+ return typeof (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.highlightStyle) === 'object'
408
+ ? highlightRow.highlightStyle.ClassName
409
+ : null;
410
+ }
292
411
  }
293
412
  exports.GridInternalApi = GridInternalApi;
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class NotesInternalApi extends ApiBase {
3
+ areNotesAvailable(): boolean;
4
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotesInternalApi = void 0;
4
+ const ApiBase_1 = require("../Implementation/ApiBase");
5
+ class NotesInternalApi extends ApiBase_1.ApiBase {
6
+ areNotesAvailable() {
7
+ var _a;
8
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
9
+ if (currentLayout.EnablePivot) {
10
+ return false;
11
+ }
12
+ if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
13
+ return false;
14
+ }
15
+ return true;
16
+ }
17
+ }
18
+ exports.NotesInternalApi = NotesInternalApi;
@@ -8,7 +8,7 @@ class TeamSharingInternalApi extends ApiBase_1.ApiBase {
8
8
  * @param sharedEntity Entity that has been changed
9
9
  */
10
10
  fireTeamSharingEntityChangedEvent(sharedEntity) {
11
- if (this.adaptable.isLive) {
11
+ if (this.adaptable.isReady) {
12
12
  const teamSharingEntityChangedInfo = {
13
13
  adaptableApi: this.adaptable.api,
14
14
  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,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INFINITE_TABLE_LICENSE_KEY = exports.ADAPTABLE_PUBLISH_TIMESTAMP = exports.ADAPTABLE_VERSION = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const env_1 = tslib_1.__importDefault(require("./env"));
6
+ exports.ADAPTABLE_VERSION = env_1.default.VERSION;
7
+ exports.ADAPTABLE_PUBLISH_TIMESTAMP = env_1.default.PUBLISH_TIMESTAMP;
8
+ exports.INFINITE_TABLE_LICENSE_KEY = env_1.default.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,4 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
3
+ exports.isWeightedAverageAggregation = exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
4
4
  exports.WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
5
+ const isWeightedAverageAggregation = (aggFunc) => {
6
+ return (aggFunc === null || aggFunc === void 0 ? void 0 : aggFunc.type) === 'weightedAverage';
7
+ };
8
+ exports.isWeightedAverageAggregation = isWeightedAverageAggregation;
@@ -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,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ROW_SUMMARY_ROW_ID = void 0;
4
+ exports.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;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LayoutGridFilterClear = exports.LayoutGridFilterUnSuspend = exports.LayoutGridFilterSuspend = exports.LayoutGridFilterSet = exports.LayoutColumnFilterUnSuspendAll = exports.LayoutColumnFilterSuspendAll = exports.LayoutColumnFilterUnSuspend = exports.LayoutColumnFilterSuspend = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_GRID_FILTER_CLEAR = exports.LAYOUT_GRID_FILTER_SET = exports.LAYOUT_GRID_FILTER_UNSUSPEND = exports.LAYOUT_GRID_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = exports.LAYOUT_COLUMN_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = void 0;
3
+ exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutAddColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LayoutGridFilterClear = exports.LayoutGridFilterUnSuspend = exports.LayoutGridFilterSuspend = exports.LayoutGridFilterSet = exports.LayoutColumnFilterUnSuspendAll = exports.LayoutColumnFilterSuspendAll = exports.LayoutColumnFilterUnSuspend = exports.LayoutColumnFilterSuspend = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_GRID_FILTER_CLEAR = exports.LAYOUT_GRID_FILTER_SET = exports.LAYOUT_GRID_FILTER_UNSUSPEND = exports.LAYOUT_GRID_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = exports.LAYOUT_COLUMN_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_ADD_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
6
6
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
@@ -32,6 +32,10 @@ exports.LAYOUT_SELECT = 'LAYOUT_SELECT';
32
32
  * @ReduxAction A Layout has been (auto)saved
33
33
  */
34
34
  exports.LAYOUT_SAVE = 'LAYOUT_SAVE';
35
+ /**
36
+ * @ReduxAction A Column has been added
37
+ */
38
+ exports.LAYOUT_ADD_COLUMN = 'LAYOUT_ADD_COLUMN';
35
39
  /**
36
40
  * @ReduxAction A Column has been removed
37
41
  */
@@ -170,6 +174,12 @@ const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
170
174
  caption,
171
175
  });
172
176
  exports.LayoutSetColumnCaption = LayoutSetColumnCaption;
177
+ const LayoutAddColumn = (layoutName, columnId) => ({
178
+ type: exports.LAYOUT_ADD_COLUMN,
179
+ layoutName,
180
+ columnId,
181
+ });
182
+ exports.LayoutAddColumn = LayoutAddColumn;
173
183
  const LayoutRemoveColumn = (layoutName, columnId) => ({
174
184
  type: exports.LAYOUT_REMOVE_COLUMN,
175
185
  layoutName,
@@ -243,6 +253,17 @@ const LayoutReducer = (state = initialState, action) => {
243
253
  }
244
254
  return state;
245
255
  }
256
+ case exports.LAYOUT_ADD_COLUMN: {
257
+ const addColumnAction = action;
258
+ const layoutname = addColumnAction.layoutName;
259
+ const colToAdd = addColumnAction.columnId;
260
+ let layoutToUpdate = state.Layouts.find((l) => l.Name === layoutname);
261
+ if (layoutToUpdate) {
262
+ layoutToUpdate.Columns.push(colToAdd);
263
+ return Object.assign(Object.assign({}, state), { Layouts: state.Layouts.map((abObject) => abObject.Uuid === layoutToUpdate.Uuid ? layoutToUpdate : abObject) });
264
+ }
265
+ return state;
266
+ }
246
267
  case exports.LAYOUT_REMOVE_COLUMN: {
247
268
  const removeColumnAction = action;
248
269
  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>;