@adaptabletools/adaptable-cjs 18.0.0-canary.7 → 18.0.0-canary.9

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 (90) hide show
  1. package/base.css +7 -2
  2. package/base.css.map +1 -1
  3. package/index.css +9 -2
  4. package/index.css.map +1 -1
  5. package/package.json +2 -2
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -1
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
  8. package/src/Api/ConfigApi.d.ts +1 -1
  9. package/src/Api/GridApi.d.ts +4 -0
  10. package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
  11. package/src/Api/Implementation/CommentsApiImpl.js +5 -0
  12. package/src/Api/Implementation/ConfigApiImpl.js +6 -3
  13. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  14. package/src/Api/Implementation/GridApiImpl.js +13 -0
  15. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -4
  16. package/src/Api/Implementation/LayoutApiImpl.js +15 -14
  17. package/src/Api/Implementation/NotesApiImpl.d.ts +4 -0
  18. package/src/Api/Implementation/NotesApiImpl.js +5 -0
  19. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  20. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  21. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  22. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  23. package/src/Api/Internal/CommentsInternalApi.js +17 -0
  24. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  25. package/src/Api/Internal/FreeTextColumnInternalApi.js +1 -1
  26. package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
  27. package/src/Api/Internal/NotesInternalApi.js +17 -0
  28. package/src/Api/LayoutApi.d.ts +11 -8
  29. package/src/Api/ScopeApi.d.ts +10 -0
  30. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  31. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  32. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  33. package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
  34. package/src/PredefinedConfig/Common/RowSummary.js +4 -0
  35. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  36. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  37. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  38. package/src/Redux/ActionsReducers/LayoutRedux.js +22 -1
  39. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  40. package/src/Redux/ActionsReducers/SystemRedux.js +16 -3
  41. package/src/Redux/Store/AdaptableStore.js +11 -0
  42. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +2 -2
  43. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  44. package/src/Strategy/CellSummaryModule.js +50 -21
  45. package/src/Strategy/CommentsModule.js +3 -0
  46. package/src/Strategy/LayoutModule.d.ts +7 -0
  47. package/src/Strategy/LayoutModule.js +102 -3
  48. package/src/Strategy/NotesModule.js +3 -4
  49. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
  50. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
  51. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  52. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  53. package/src/Utilities/Extensions/ArrayExtensions.js +6 -1
  54. package/src/Utilities/ObjectFactory.js +6 -6
  55. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
  56. package/src/Utilities/Services/AggregatedScalarLiveValue.js +11 -8
  57. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  58. package/src/Utilities/Services/LicenseService/index.js +10 -5
  59. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  60. package/src/Utilities/Services/QueryLanguageService.js +2 -1
  61. package/src/Utilities/Services/SummaryService.d.ts +19 -0
  62. package/src/Utilities/Services/SummaryService.js +33 -0
  63. package/src/View/AdaptableView.js +1 -1
  64. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  65. package/src/View/Components/NewScopeComponent.js +32 -1
  66. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  67. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +7 -7
  68. package/src/View/Layout/TransposedPopup.js +7 -6
  69. package/src/agGrid/ActionColumnRenderer.js +3 -2
  70. package/src/agGrid/AdaptableAgGrid.d.ts +16 -2
  71. package/src/agGrid/AdaptableAgGrid.js +200 -90
  72. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  73. package/src/agGrid/AgGridAdapter.js +8 -0
  74. package/src/agGrid/AgGridColumnAdapter.js +14 -3
  75. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  76. package/src/components/Datepicker/index.d.ts +1 -1
  77. package/src/components/Input/index.d.ts +1 -1
  78. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  79. package/src/components/icons/index.js +2 -0
  80. package/src/components/icons/rows.d.ts +3 -0
  81. package/src/components/icons/rows.js +7 -0
  82. package/src/env.js +2 -2
  83. package/src/metamodel/adaptable.metamodel.d.ts +8 -0
  84. package/src/metamodel/adaptable.metamodel.js +18 -0
  85. package/src/parser/src/types.d.ts +5 -0
  86. package/tsconfig.cjs.tsbuildinfo +1 -1
  87. package/src/View/Components/ScopeComponent.d.ts +0 -24
  88. package/src/View/Components/ScopeComponent.js +0 -138
  89. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  90. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
@@ -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;
@@ -77,6 +77,7 @@ export declare const SYSTEM_VISUAL_EXPORT_END = "SYSTEM_VISUAL_EXPORT_END";
77
77
  export declare const SYSTEM_CELL_POPUP_SHOW = "SYSTEM_CELL_POPUP_SHOW";
78
78
  export declare const SYSTEM_CELL_POPUP_HIDE = "SYSTEM_CELL_POPUP_HIDE";
79
79
  export declare const SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = "SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY";
80
+ export declare const SYSTEM_SUMMARY_ROW_SET = "SYSTEM_SUMMARY_ROW_SET";
80
81
  export declare const DATA_IMPORT_COMPLETED = "DATA_IMPORT_COMPLETED";
81
82
  export interface DataImportCompletedAction extends Redux.Action {
82
83
  dataImportedInfo: DataImportedInfo;
@@ -328,6 +329,10 @@ export declare const SystemVisualExportEnd: () => SystemVisualExportEndAction;
328
329
  export declare const SystemQuickSearchFloatingVisibility: (visible: boolean) => SystemQuickSearchFloatingVisibilityAction;
329
330
  export declare const SystemCellPopupShow: (cellPosition: CellAddress, editMode?: boolean) => SystemCellPopupShowAction;
330
331
  export declare const SystemCellPopupEditFocusedEntity: (focusedEntity: 'Note' | 'Comment') => SystemCellPopupEditFocusedEntityAction;
332
+ export declare const SystemRowSummartSet: (systemRowSummaries: SystemState['RowSummary']['rowSummaries']) => {
333
+ readonly type: "SYSTEM_SUMMARY_ROW_SET";
334
+ readonly rowSummaries: import("../../PredefinedConfig/SystemState").SystemRowSummary[];
335
+ };
331
336
  export declare const SystemCellPopupHide: () => SystemCellPopupHideAction;
332
337
  export declare const SystemDisableDeleteConfirmationSelector: (state: SystemState) => boolean;
333
338
  export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState) => Record<string, Record<string, number>>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SYSTEM_DISABLE_DELETE_CONFIRMATION = exports.SYSTEM_FILTER_FORM_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_SHOW = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_CLEAR_ROW = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROWS_ADD = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT = exports.SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
4
- exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.DATA_IMPORT_COMPLETED = exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = exports.SYSTEM_CELL_POPUP_HIDE = exports.SYSTEM_CELL_POPUP_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
5
- exports.SystemReducer = exports.DataImportCompleted = exports.SystemCommentsAndNotesFocusedEntitySelector = exports.SystemCommentsAndNotesEditModeSelector = exports.SystemCommentsAndNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemCellPopupHide = exports.SystemCellPopupEditFocusedEntity = exports.SystemCellPopupShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryClearRow = void 0;
4
+ exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.DATA_IMPORT_COMPLETED = exports.SYSTEM_SUMMARY_ROW_SET = exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = exports.SYSTEM_CELL_POPUP_HIDE = exports.SYSTEM_CELL_POPUP_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
5
+ exports.SystemReducer = exports.DataImportCompleted = exports.SystemCommentsAndNotesFocusedEntitySelector = exports.SystemCommentsAndNotesEditModeSelector = exports.SystemCommentsAndNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemCellPopupHide = exports.SystemRowSummartSet = exports.SystemCellPopupEditFocusedEntity = exports.SystemCellPopupShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryClearRow = exports.SystemDataChangeHistoryUndo = void 0;
6
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
7
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
8
8
  const Helper_1 = require("../../Utilities/Helpers/Helper");
@@ -92,10 +92,12 @@ exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = 'SYSTEM_SET_QUICK_SEARCH_F
92
92
  // Data Export (Report)
93
93
  exports.SYSTEM_VISUAL_EXPORT_BEGIN = 'SYSTEM_VISUAL_EXPORT_BEGIN';
94
94
  exports.SYSTEM_VISUAL_EXPORT_END = 'SYSTEM_VISUAL_EXPORT_END';
95
- // Notes
95
+ // Notes and Comments
96
96
  exports.SYSTEM_CELL_POPUP_SHOW = 'SYSTEM_CELL_POPUP_SHOW';
97
97
  exports.SYSTEM_CELL_POPUP_HIDE = 'SYSTEM_CELL_POPUP_HIDE';
98
98
  exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = 'SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY';
99
+ // Row Summaries
100
+ exports.SYSTEM_SUMMARY_ROW_SET = 'SYSTEM_SUMMARY_ROW_SET';
99
101
  // Data Import
100
102
  exports.DATA_IMPORT_COMPLETED = 'DATA_IMPORT_COMPLETED';
101
103
  const SystemHighlightCellAdd = (cellHighlightInfo) => ({
@@ -380,6 +382,11 @@ const SystemCellPopupEditFocusedEntity = (focusedEntity) => ({
380
382
  focusedEntity,
381
383
  });
382
384
  exports.SystemCellPopupEditFocusedEntity = SystemCellPopupEditFocusedEntity;
385
+ const SystemRowSummartSet = (systemRowSummaries) => ({
386
+ type: exports.SYSTEM_SUMMARY_ROW_SET,
387
+ rowSummaries: systemRowSummaries,
388
+ });
389
+ exports.SystemRowSummartSet = SystemRowSummartSet;
383
390
  const SystemCellPopupHide = () => ({
384
391
  type: exports.SYSTEM_CELL_POPUP_HIDE,
385
392
  });
@@ -830,6 +837,12 @@ const SystemReducer = (state = initialState, action) => {
830
837
  popupPosition: null,
831
838
  } });
832
839
  }
840
+ case exports.SYSTEM_SUMMARY_ROW_SET: {
841
+ const typedAction = action;
842
+ return Object.assign(Object.assign({}, state), { RowSummary: {
843
+ rowSummaries: typedAction.rowSummaries,
844
+ } });
845
+ }
833
846
  default:
834
847
  return state;
835
848
  }
@@ -317,6 +317,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
317
317
  const ret = next(action);
318
318
  return ret;
319
319
  }
320
+ /*******************
321
+ * System Row Summary ACTIONS
322
+ *******************/
323
+ case SystemRedux.SYSTEM_SUMMARY_ROW_SET: {
324
+ let nextAction = next(action);
325
+ setTimeout(() => {
326
+ adaptable.setupRowSummaries();
327
+ }, 0);
328
+ return nextAction;
329
+ }
320
330
  /*******************
321
331
  * FLASHING CELL ACTIONS
322
332
  *******************/
@@ -1052,6 +1062,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1052
1062
  adaptable.setLayout(savingLayout);
1053
1063
  }
1054
1064
  }
1065
+ adaptable.refreshQuickFilter();
1055
1066
  return returnAction;
1056
1067
  }
1057
1068
  /*******************
@@ -10,8 +10,8 @@ export interface LoadStoreConfig {
10
10
  }
11
11
  export interface IAdaptableStore {
12
12
  TheStore: Redux.Store<AdaptableState>;
13
- Load: PromiseLike<any>;
14
- loadStore: (config: LoadStoreConfig) => PromiseLike<any>;
13
+ Load: Promise<any>;
14
+ loadStore: (config: LoadStoreConfig) => Promise<any>;
15
15
  getCurrentStorageState: () => AdaptableState | void;
16
16
  saveStateNow: (adaptable: IAdaptable) => Promise<any>;
17
17
  on: (eventName: string, callback: (data?: any) => any) => () => void;
@@ -8,6 +8,7 @@ import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
8
8
  import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
9
9
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
10
10
  export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
11
+ cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmary>;
11
12
  constructor(api: AdaptableApi);
12
13
  getViewAccessLevel(): AccessLevel;
13
14
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
@@ -10,6 +10,7 @@ const CellSummaryStatusPanel_1 = require("../View/CellSummary/CellSummaryStatusP
10
10
  class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
11
11
  constructor(api) {
12
12
  super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of cells using multiple summary operations', api);
13
+ this.cachedCellSummary = new WeakMap();
13
14
  }
14
15
  getViewAccessLevel() {
15
16
  return 'Full';
@@ -46,6 +47,9 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
46
47
  });
47
48
  }
48
49
  createCellSummary(selectedCellInfo) {
50
+ if (this.cachedCellSummary.has(selectedCellInfo)) {
51
+ return this.cachedCellSummary.get(selectedCellInfo);
52
+ }
49
53
  let selectedCellSummary;
50
54
  if (selectedCellInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.columns)) {
51
55
  let numericValues = [];
@@ -74,28 +78,52 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
74
78
  // copying so that we keep the order - needed for others
75
79
  const newNumericValues = [...numericValues];
76
80
  let hasNumericColumns = numericValues.length > 0;
77
- let distinctCount = ArrayExtensions_1.ArrayExtensions.RetrieveDistinct(allValues).length;
81
+ if (selectedCellInfo.columns.length > 1) {
82
+ return {
83
+ Sum: null,
84
+ Average: null,
85
+ Median: null,
86
+ Mode: null,
87
+ Distinct: null,
88
+ Max: null,
89
+ Min: null,
90
+ Count: null,
91
+ Std_Deviation: null,
92
+ Only: '',
93
+ };
94
+ }
95
+ const handleExpression = (functionName) => {
96
+ const columnId = selectedCellInfo.columns[0].columnId;
97
+ const rowNodes = selectedCellInfo.gridCells.map((gc) => gc.rowNode);
98
+ return this.api.internalApi.getAdaptableInstance().SummaryService.evaluateExpressionValue({
99
+ expression: {
100
+ function: functionName,
101
+ },
102
+ columnId: columnId,
103
+ getRowNodes: () => rowNodes,
104
+ }, ModuleConstants.CellSummaryModuleId);
105
+ };
106
+ const sumValue = hasNumericColumns ? handleExpression('SUM') : null;
107
+ const avgValue = hasNumericColumns ? Helper_1.Helper.roundNumber(handleExpression('AVG'), 2) : null;
108
+ const modeValue = hasNumericColumns ? handleExpression('MODE') : null;
109
+ const medianValue = hasNumericColumns ? handleExpression('MEDIAN') : null;
110
+ const distinctValue = handleExpression('DISTINCT');
111
+ const maxValue = hasNumericColumns ? handleExpression('MAX') : null;
112
+ const minValue = hasNumericColumns ? handleExpression('MIN') : null;
113
+ const stdDeviation = hasNumericColumns
114
+ ? Helper_1.Helper.roundNumberTo4dp(handleExpression('STD_DEVIATION'))
115
+ : null;
78
116
  selectedCellSummary = {
79
- Sum: hasNumericColumns
80
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.sumNumberArray(numericValues))
81
- : undefined,
82
- Average: hasNumericColumns
83
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.meanNumberArray(numericValues))
84
- : undefined,
85
- Median: hasNumericColumns
86
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.medianNumberArray(numericValues))
87
- : undefined,
88
- Mode: hasNumericColumns
89
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.modeNumberArray(numericValues))
90
- : undefined,
91
- Distinct: distinctCount,
92
- Max: hasNumericColumns ? Helper_1.Helper.roundNumberTo4dp(Math.max(...numericValues)) : undefined,
93
- Min: hasNumericColumns ? Helper_1.Helper.roundNumberTo4dp(Math.min(...numericValues)) : undefined,
117
+ Sum: sumValue,
118
+ Average: avgValue,
119
+ Median: medianValue,
120
+ Mode: modeValue,
121
+ Distinct: distinctValue,
122
+ Max: maxValue,
123
+ Min: minValue,
94
124
  Count: allValues.length,
95
- Std_Deviation: hasNumericColumns
96
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.standardDeviationNumberArray(numericValues))
97
- : undefined,
98
- Only: distinctCount == 1 ? JSON.stringify(allValues[0]) : '',
125
+ Std_Deviation: stdDeviation,
126
+ Only: distinctValue == 1 ? JSON.stringify(allValues[0]) : '',
99
127
  };
100
128
  numericValues = [...newNumericValues];
101
129
  const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
@@ -104,7 +132,7 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
104
132
  if (operation.operationFunction) {
105
133
  const cellSummaryOperationContext = {
106
134
  selectedCellInfo,
107
- distinctCount,
135
+ distinctCount: distinctValue,
108
136
  allValues,
109
137
  numericValues,
110
138
  numericColumns,
@@ -116,6 +144,7 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
116
144
  }
117
145
  });
118
146
  }
147
+ this.cachedCellSummary.set(selectedCellInfo, selectedCellSummary);
119
148
  return selectedCellSummary;
120
149
  }
121
150
  getViewProperties() {
@@ -59,6 +59,9 @@ class CommentsModule extends AdaptableModuleBase_1.AdaptableModuleBase {
59
59
  ColumnId: menuContext.adaptableColumn.columnId,
60
60
  };
61
61
  const comments = this.adaptable.api.commentApi.getComments(cellAddress);
62
+ if (!this.api.commentApi.internalApi.areCommentsAvailable()) {
63
+ return items;
64
+ }
62
65
  if (comments) {
63
66
  items.push(this.createColumnMenuItemClickFunction('Remove Comments', this.moduleInfo.Glyph, () => {
64
67
  this.api.commentApi.deleteCommentThread(cellAddress);
@@ -7,7 +7,9 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
7
7
  import { AdaptableApi } from '../Api/AdaptableApi';
8
8
  import { AdaptableModuleView, IModule, TeamSharingReferences } from './Interface/IModule';
9
9
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
10
+ import { AggregatedScalarLiveValue } from '../Utilities/Services/AggregatedScalarLiveValue';
10
11
  export declare class LayoutModule extends AdaptableModuleBase implements IModule {
12
+ cachedCellSummary: Map<string, AggregatedScalarLiveValue>;
11
13
  protected LayoutState: LayoutState;
12
14
  constructor(api: AdaptableApi);
13
15
  onAdaptableReady(): void;
@@ -42,4 +44,9 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
42
44
  getViewProperties(): AdaptableModuleView;
43
45
  handleLayoutChange(): void;
44
46
  getReferencedNamedQueryNames(layout: Layout): string[];
47
+ /**
48
+ *
49
+ * @param colId optional to evaluate only one column
50
+ */
51
+ private evaluateRowSummary;
45
52
  }
@@ -19,9 +19,13 @@ const windowFactory_1 = require("../View/Components/Popups/WindowPopups/windowFa
19
19
  const flattenDeep_1 = tslib_1.__importDefault(require("lodash/flattenDeep"));
20
20
  const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
21
21
  const getGridFilterPreview_1 = require("../View/Layout/Wizard/getGridFilterPreview");
22
+ const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
23
+ const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
24
+ const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
22
25
  class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
23
26
  constructor(api) {
24
27
  super(ModuleConstants.LayoutModuleId, ModuleConstants.LayoutFriendlyName, 'grid', 'LayoutPopup', 'Named sets of column visibility, order, groupings, aggregation, pivots etc.', api);
28
+ this.cachedCellSummary = new Map();
25
29
  }
26
30
  onAdaptableReady() {
27
31
  this.api.eventApi.on('LayoutChanged', (layoutChangedInfo) => {
@@ -35,6 +39,26 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
35
39
  requestAnimationFrame(() => {
36
40
  this.api.layoutApi.internalApi.fireLayoutChangedEvent('ADAPTABLE_READY', null, this.api.layoutApi.getLayoutState());
37
41
  });
42
+ this.evaluateRowSummary();
43
+ this.api.eventApi.on('AdaptableStateReloaded', () => {
44
+ this.evaluateRowSummary();
45
+ });
46
+ this.api.eventApi.on('GridDataChanged', (event) => {
47
+ this.evaluateRowSummary();
48
+ });
49
+ this.api.eventApi.on('CellChanged', (event) => {
50
+ const columnId = event.cellChange.column.columnId;
51
+ this.evaluateRowSummary({
52
+ columnId,
53
+ });
54
+ });
55
+ this.api.eventApi.on('LayoutChanged', (event) => {
56
+ this.evaluateRowSummary();
57
+ });
58
+ const adaptable = this.api.internalApi.getAdaptableInstance();
59
+ adaptable._on('FirstDataRendered', () => {
60
+ this.evaluateRowSummary();
61
+ });
38
62
  }
39
63
  getModuleAdaptableObjects() {
40
64
  return this.api.layoutApi.getLayouts();
@@ -199,7 +223,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
199
223
  }
200
224
  createViewPivotItemsMenuItem(menuContext) {
201
225
  // current group => menuContext.rowNode.field;
202
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
226
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
203
227
  const selectedCellInfo = (_a = menuContext.selectedCellInfo) !== null && _a !== void 0 ? _a : this.api.gridApi.getSelectedCellInfo();
204
228
  if (((_b = selectedCellInfo === null || selectedCellInfo === void 0 ? void 0 : selectedCellInfo.gridCells) === null || _b === void 0 ? void 0 : _b.length) !== 1) {
205
229
  return;
@@ -240,7 +264,9 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
240
264
  }
241
265
  const data = (0, flattenDeep_1.default)(getData(menuContext.rowNode.childrenAfterFilter));
242
266
  const rowGroups = currentLayout.RowGroupedColumns;
243
- const cellValue = isPivotColumn ? menuContext.rowNode.aggData[columnId] : gridCell.displayValue;
267
+ const cellValue = isPivotColumn
268
+ ? (_o = (_m = menuContext.rowNode) === null || _m === void 0 ? void 0 : _m.aggData) === null || _o === void 0 ? void 0 : _o[columnId]
269
+ : gridCell.displayValue;
244
270
  const popupProps = {
245
271
  hasPivotValue: isPivotColumn,
246
272
  columnId,
@@ -281,7 +307,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
281
307
  return this.getModuleAdaptableObjects().map((layout) => this.toView(layout));
282
308
  }
283
309
  toView(layout) {
284
- var _a, _b, _c, _d, _e, _f;
310
+ var _a, _b, _c, _d, _e, _f, _g;
285
311
  const maxColumnsToDisplay = (_b = (_a = this.api.optionsApi.getLayoutOptions().layoutViewOptions) === null || _a === void 0 ? void 0 : _a.maxColumnsToDisplay) !== null && _b !== void 0 ? _b : 10;
286
312
  const columnIdToFriendlyName = (columnId) => {
287
313
  return this.api.columnApi.getFriendlyNameForColumnId(columnId);
@@ -350,6 +376,22 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
350
376
  (layout === null || layout === void 0 ? void 0 : layout.GridFilter) &&
351
377
  StringExtensions_1.default.IsNotNullOrEmpty(layout.GridFilter.Expression) &&
352
378
  (0, getGridFilterPreview_1.getGridFilterViewItems)(layout),
379
+ ((_g = layout === null || layout === void 0 ? void 0 : layout.RowSummaries) === null || _g === void 0 ? void 0 : _g.length) && {
380
+ name: 'Row Summaries',
381
+ values: layout === null || layout === void 0 ? void 0 : layout.RowSummaries.map((rowSummary) => {
382
+ var _a;
383
+ const columns = Object.entries((_a = rowSummary.ColumnsMap) !== null && _a !== void 0 ? _a : {})
384
+ .map(([columnId, expression]) => {
385
+ if (columnId === 'Source' || columnId === 'Uuid') {
386
+ return '';
387
+ }
388
+ return `${expression}(${columnIdToFriendlyName(columnId)})`;
389
+ })
390
+ .filter(Boolean)
391
+ .join(', ');
392
+ return `${rowSummary.Position}: ${columns}`;
393
+ }),
394
+ },
353
395
  ].filter(Boolean),
354
396
  abObject: layout,
355
397
  };
@@ -404,5 +446,62 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
404
446
  }
405
447
  return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(layout.GridFilter.Expression);
406
448
  }
449
+ /**
450
+ *
451
+ * @param colId optional to evaluate only one column
452
+ */
453
+ evaluateRowSummary(reason) {
454
+ var _a;
455
+ const rowSummaries = (_a = this.api.layoutApi.getCurrentLayout().RowSummaries) !== null && _a !== void 0 ? _a : [];
456
+ const rowSummariesResults = rowSummaries.map(({ ColumnsMap, Position }) => {
457
+ return {
458
+ Position,
459
+ RowData: Object.entries(ColumnsMap !== null && ColumnsMap !== void 0 ? ColumnsMap : {}).reduce((acc, [columnId, expression]) => {
460
+ const key = `${columnId}-${expression}`;
461
+ let expressionLiveValue = this.cachedCellSummary.get(key);
462
+ if (expressionLiveValue) {
463
+ if (!reason) {
464
+ // refresh all of them
465
+ expressionLiveValue.refresh();
466
+ }
467
+ else if ('columnId' in reason && reason.columnId === columnId) {
468
+ expressionLiveValue.refresh();
469
+ }
470
+ }
471
+ if (!expressionLiveValue) {
472
+ try {
473
+ expressionLiveValue = this.api.internalApi
474
+ .getAdaptableInstance()
475
+ .SummaryService.evaluateScalarLiveValue({
476
+ expression: {
477
+ function: expression,
478
+ },
479
+ columnId: columnId,
480
+ getRowNodes: () => {
481
+ return this.api.gridApi.getVisibleRowNodes();
482
+ },
483
+ }, ModuleConstants.LayoutModuleId);
484
+ }
485
+ catch (e) {
486
+ this.api.logError('Error evaluating row summary', e);
487
+ }
488
+ this.cachedCellSummary.set(key, expressionLiveValue);
489
+ }
490
+ let value = null;
491
+ if (expressionLiveValue) {
492
+ value = expressionLiveValue.getGlobalAggregatedValue();
493
+ if (typeof value === 'number' && !isNaN(value)) {
494
+ value = Helper_1.default.roundNumber(value, 2);
495
+ }
496
+ }
497
+ acc[columnId] = value;
498
+ return acc;
499
+ }, {
500
+ [RowSummary_1.ROW_SUMMARY_ROW_ID]: true,
501
+ }),
502
+ };
503
+ });
504
+ this.api.internalApi.dispatchReduxAction((0, SystemRedux_1.SystemRowSummartSet)(rowSummariesResults));
505
+ }
407
506
  }
408
507
  exports.LayoutModule = LayoutModule;
@@ -9,10 +9,6 @@ class NotesModule extends AdaptableModuleBase_1.AdaptableModuleBase {
9
9
  super(ModuleConstants.NotesModuleId, ModuleConstants.NotesFriendlyName, 'note', 'NotesPopup', 'Notes', api);
10
10
  this.adaptable = api.internalApi.getAdaptableInstance();
11
11
  }
12
- // isModuleAvailable(): boolean {
13
- // // FIXME remove this once Notes feature is public
14
- // return true;
15
- // }
16
12
  addContextMenuItems(menuContext) {
17
13
  var _a, _b;
18
14
  if (!this.isModuleAvailable()) {
@@ -36,6 +32,9 @@ class NotesModule extends AdaptableModuleBase_1.AdaptableModuleBase {
36
32
  getAddRemoveNoteMenuItems(menuContext) {
37
33
  var _a;
38
34
  const items = [];
35
+ if (!this.api.notesApi.internalApi.areNotesAvailable()) {
36
+ return items;
37
+ }
39
38
  // does not have note
40
39
  const [note] = (_a = this.adaptable.api.notesApi.getCellNotes({
41
40
  PrimaryKeyValue: menuContext.primaryKeyValue,
@@ -6,7 +6,7 @@ import { AggregateParams } from './scalarAggregationHelper';
6
6
  * List of all the AggregatedScalar Functions available in AdaptableQL
7
7
  */
8
8
  export type AggregatedScalarFunctionName = ScalarAggregationFunction | OperandFunction;
9
- export type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'QUARTILE' | 'PERCENTILE' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL';
9
+ export type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'QUARTILE' | 'PERCENTILE' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL' | 'MEDIAN' | 'MODE' | 'DISTINCT' | 'ONLY' | 'STD_DEVIATION';
10
10
  type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY' | 'WEIGHT';
11
11
  export interface ScalarAggregationParameter extends BaseParameter<'aggregationScalar', ScalarAggregationFunction> {
12
12
  value: AggregatedScalarExpressionEvaluation;
@@ -28,6 +28,7 @@ export interface AggregatedScalarExpressionEvaluation {
28
28
  };
29
29
  sortByColumn?: string;
30
30
  rowFilterFn?: (rowNode: IRowNode) => boolean;
31
+ getRowNodes?: () => IRowNode[];
31
32
  }
32
33
  export interface CumulatedAggregationValue {
33
34
  currentValue: number;