@adaptabletools/adaptable 18.0.0-canary.12 → 18.0.0-canary.14

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 (115) hide show
  1. package/base.css +1 -1
  2. package/base.css.map +1 -1
  3. package/index.css +1 -1
  4. package/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  7. package/src/AdaptableOptions/MenuOptions.d.ts +1 -53
  8. package/src/AdaptableOptions/MenuOptions.js +3 -3
  9. package/src/Api/AdaptableApi.d.ts +2 -2
  10. package/src/Api/ConfigApi.d.ts +2 -3
  11. package/src/Api/GridApi.d.ts +2 -1
  12. package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
  13. package/src/Api/Implementation/ConfigApiImpl.js +7 -7
  14. package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
  15. package/src/Api/Implementation/GridApiImpl.js +8 -1
  16. package/src/Api/Implementation/NoteApiImpl.d.ts +2 -2
  17. package/src/Api/Implementation/NoteApiImpl.js +8 -8
  18. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
  19. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
  20. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  21. package/src/Api/Internal/AdaptableInternalApi.d.ts +4 -2
  22. package/src/Api/Internal/AdaptableInternalApi.js +14 -11
  23. package/src/Api/Internal/CalculatedColumnInternalApi.js +3 -2
  24. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  25. package/src/Api/Internal/FreeTextColumnInternalApi.js +3 -2
  26. package/src/Api/Internal/GridInternalApi.d.ts +2 -0
  27. package/src/Api/Internal/GridInternalApi.js +15 -0
  28. package/src/Api/NoteApi.d.ts +5 -5
  29. package/src/Api/OptionsApi.d.ts +2 -2
  30. package/src/Api/UserInterfaceApi.d.ts +0 -11
  31. package/src/PredefinedConfig/AdaptableState.d.ts +1 -1
  32. package/src/PredefinedConfig/CommentState.d.ts +16 -12
  33. package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -1
  34. package/src/PredefinedConfig/Common/TransposeConfig.d.ts +25 -0
  35. package/src/PredefinedConfig/Common/TransposeConfig.js +1 -0
  36. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  37. package/src/PredefinedConfig/Common/Types.js +4 -1
  38. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  39. package/src/PredefinedConfig/NoteState.d.ts +1 -1
  40. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  41. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  42. package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +20 -20
  43. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
  44. package/src/Redux/Store/AdaptableStore.js +7 -7
  45. package/src/Strategy/CellSummaryModule.js +2 -1
  46. package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +1 -5
  47. package/src/Strategy/{CommentsModule.js → CommentModule.js} +5 -6
  48. package/src/Strategy/LayoutModule.d.ts +1 -0
  49. package/src/Strategy/LayoutModule.js +17 -1
  50. package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
  51. package/src/Strategy/{NotesModule.js → NoteModule.js} +7 -3
  52. package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
  53. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  54. package/src/Utilities/Constants/ModuleConstants.js +6 -6
  55. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  56. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +15 -2
  57. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
  58. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  59. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
  60. package/src/Utilities/ObjectFactory.d.ts +3 -3
  61. package/src/Utilities/ObjectFactory.js +4 -24
  62. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
  63. package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
  64. package/src/Utilities/Services/CellPopupService.js +2 -2
  65. package/src/Utilities/Services/Interface/ISummaryService.d.ts +17 -0
  66. package/src/Utilities/Services/Interface/ISummaryService.js +12 -0
  67. package/src/Utilities/Services/ModuleService.js +4 -0
  68. package/src/Utilities/Services/QueryLanguageService.js +2 -2
  69. package/src/Utilities/Services/SummaryService.d.ts +5 -14
  70. package/src/Utilities/Services/SummaryService.js +0 -12
  71. package/src/Utilities/adaptableQlUtils.d.ts +2 -0
  72. package/src/Utilities/adaptableQlUtils.js +14 -0
  73. package/src/View/AdaptableViewFactory.js +2 -2
  74. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
  75. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  76. package/src/View/Comments/CommentsEditor.js +1 -1
  77. package/src/View/Comments/CommentsPopup.js +8 -4
  78. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +5 -5
  79. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  80. package/src/View/Components/ValueSelector/index.js +1 -1
  81. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -1
  82. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
  83. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
  84. package/src/View/Layout/TransposedPopup.js +19 -18
  85. package/src/View/Layout/Wizard/LayoutWizard.js +8 -0
  86. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +8 -0
  87. package/src/View/Layout/Wizard/sections/RowSummarySection.js +150 -0
  88. package/src/View/Note/NotePopup.d.ts +2 -0
  89. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +3 -3
  90. package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
  91. package/src/agGrid/AdaptableAgGrid.js +7 -5
  92. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  93. package/src/agGrid/AgGridAdapter.js +5 -0
  94. package/src/agGrid/AgGridColumnAdapter.js +3 -3
  95. package/src/agGrid/AgGridMenuAdapter.js +10 -6
  96. package/src/agGrid/defaultAdaptableOptions.js +0 -7
  97. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
  98. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
  99. package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -14
  100. package/src/components/icons/note.js +2 -2
  101. package/src/env.js +2 -2
  102. package/src/metamodel/adaptable.metamodel.d.ts +61 -11
  103. package/src/metamodel/adaptable.metamodel.js +1 -1
  104. package/src/parser/src/parser.js +117 -1257
  105. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  106. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
  107. package/src/parser/src/types.d.ts +2 -2
  108. package/src/types.d.ts +5 -4
  109. package/tsconfig.esm.tsbuildinfo +1 -1
  110. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
  111. package/src/View/Notes/NotesPopup.d.ts +0 -2
  112. /package/src/Api/Internal/{NotesInternalApi.d.ts → NoteInternalApi.d.ts} +0 -0
  113. /package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +0 -0
  114. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  115. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -1,9 +1,10 @@
1
- import { AdaptableObject } from '../types';
2
- import { ConfigState } from './ConfigState';
1
+ import { CellAddress } from '../types';
2
+ import { InternalState } from './InternalState';
3
+ import { TypeUuid } from './Uuid';
3
4
  /**
4
- * Predefined Configuration for Comments Module
5
+ * Internal State used for Comments Module
5
6
  */
6
- export interface CommentState extends ConfigState {
7
+ export interface CommentState extends InternalState {
7
8
  /**
8
9
  * Collection of AdapTable Comments
9
10
  */
@@ -12,7 +13,11 @@ export interface CommentState extends ConfigState {
12
13
  /**
13
14
  * Comment that can be applied to a Cell in AdapTable
14
15
  */
15
- export interface AdaptableComment extends AdaptableObject {
16
+ export interface AdaptableComment {
17
+ /**
18
+ * Unique identifier for the Comment
19
+ */
20
+ Uuid?: TypeUuid;
16
21
  /**
17
22
  * When Comment was made
18
23
  */
@@ -32,15 +37,14 @@ export interface AdaptableComment extends AdaptableObject {
32
37
  */
33
38
  AdaptableId?: string;
34
39
  }
35
- export interface CommentThread extends AdaptableObject {
36
- /**
37
- * Value in Primary Key Column
38
- */
39
- PrimaryKeyValue: string | number;
40
+ /**
41
+ * Thread of Comments for an Adaptable Cell
42
+ */
43
+ export interface CommentThread extends CellAddress {
40
44
  /**
41
- * Id of Column containing the Note
45
+ * Unique identifier for Comment
42
46
  */
43
- ColumnId: string;
47
+ Uuid?: TypeUuid;
44
48
  /**
45
49
  * Collection of Comments for this Cell
46
50
  */
@@ -1,4 +1,4 @@
1
- import { SummarySupportedExpression } from '../../Utilities/Services/SummaryService';
1
+ import { SummarySupportedExpression } from "../../Utilities/Services/Interface/ISummaryService";
2
2
  export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
3
3
  /**
4
4
  * Position of Row Summary - 'Top' or 'Bottom'
@@ -8,6 +8,12 @@ export type RowSummaryPosition = 'Top' | 'Bottom';
8
8
  * Defines a Row Summary used in a Layout
9
9
  */
10
10
  export interface RowSummary {
11
+ /**
12
+ * Where Row Summary appears - 'Top' or 'Bottom'
13
+ */
11
14
  Position?: RowSummaryPosition;
15
+ /**
16
+ * Map of Columns with Summary Expressions
17
+ */
12
18
  ColumnsMap: Record<string, SummarySupportedExpression>;
13
19
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Config used when transposing a Grid
3
+ */
4
+ export interface TransposeConfig {
5
+ /**
6
+ * Column to use to do transposition
7
+ * @defaultValue Primary Key Column
8
+ */
9
+ transposedColumnId?: string;
10
+ /**
11
+ * Hide the Transposed Column
12
+ * @defaultValue true
13
+ */
14
+ hideTransposedColumn?: boolean;
15
+ /**
16
+ * Only show curerntly visible Columns
17
+ * @defaultValue false
18
+ */
19
+ visibleColumns?: boolean;
20
+ /**
21
+ * Only show curerntly visible Rows
22
+ * @defaultValue false
23
+ */
24
+ visibleRows?: boolean;
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -11,7 +11,7 @@ export declare const ALL_TOOLBARS: AdaptableDashboardToolbar[];
11
11
  /**
12
12
  * Modules which can appear in the AdapTable Status Bar
13
13
  */
14
- export type AdaptableStatusBarPanel = 'Alert' | 'CalculatedColumn' | 'BulkUpdate' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'ColumnFilter' | 'GridFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'SmartEdit' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
14
+ export type AdaptableStatusBarPanel = 'Alert' | 'CalculatedColumn' | 'BulkUpdate' | 'CellSummary' | 'Charting' | 'Comment' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'ColumnFilter' | 'GridFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'Note' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'SmartEdit' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
15
15
  export declare const ALL_STATUS_SUB_PANELS: AdaptableStatusBarPanel[];
16
16
  export type AdaptableToolPanels = AdaptableToolPanel[];
17
17
  /**
@@ -28,18 +28,18 @@ export type AdaptableModuleButtons = AdaptableModuleButton[];
28
28
  /**
29
29
  * List of all the Module buttons Adaptable provides - each Module has a popup for which this is a shortcut button
30
30
  */
31
- export type AdaptableModuleButton = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'ColumnFilter' | 'GridFilter' | 'NamedQuery' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme';
31
+ export type AdaptableModuleButton = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Comment' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'ColumnFilter' | 'GridFilter' | 'NamedQuery' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'Note' | 'OpenFin' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme';
32
32
  export type AdaptableStateKeys = AdaptableStateKey[];
33
33
  export type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFin' | 'IPushPull';
34
34
  /**
35
35
  * Modules provided by AdapTable, subject to Entitlements and usually have Predefined Config
36
36
  */
37
- export type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport' | 'GridFilter' | 'NamedQuery' | 'Comments';
37
+ export type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'Comment' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Note' | 'DataImport' | 'GridFilter' | 'NamedQuery';
38
38
  export declare const ALL_MODULES: AdaptableModule[];
39
39
  /**
40
40
  * Modules which can appear in the Settings Panel
41
41
  */
42
- export type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport' | 'GridFilter' | 'NamedQuery' | 'Comments';
42
+ export type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Note' | 'DataImport' | 'GridFilter' | 'NamedQuery' | 'Comment';
43
43
  export type TypeHint<Base, Literals> = (Base & {
44
44
  __subType?: true;
45
45
  }) | Literals;
@@ -26,6 +26,7 @@ export const ALL_STATUS_SUB_PANELS = [
26
26
  'BulkUpdate',
27
27
  'CalculatedColumn',
28
28
  'CellSummary',
29
+ 'Comment',
29
30
  'CustomSort',
30
31
  'Charting',
31
32
  'Dashboard',
@@ -40,6 +41,7 @@ export const ALL_STATUS_SUB_PANELS = [
40
41
  'FreeTextColumn',
41
42
  'GridInfo',
42
43
  'Layout',
44
+ 'Note',
43
45
  'PlusMinus',
44
46
  'QuickSearch',
45
47
  'Schedule',
@@ -77,7 +79,8 @@ export const ALL_MODULES = [
77
79
  ModuleConstants.BulkUpdateModuleId,
78
80
  ModuleConstants.CalculatedColumnModuleId,
79
81
  ModuleConstants.CellSummaryModuleId,
80
- ModuleConstants.NotesModuleId,
82
+ ModuleConstants.NoteModuleId,
83
+ ModuleConstants.CommentModuleId,
81
84
  ModuleConstants.ChartingModuleId,
82
85
  ModuleConstants.CustomSortModuleId,
83
86
  ModuleConstants.DashboardModuleId,
@@ -84,7 +84,7 @@ export interface Layout extends AdaptableObject {
84
84
  */
85
85
  SuppressAggFuncInHeader?: boolean;
86
86
  /**
87
- * Row summaries
87
+ * Row Summaries - Pinned Rows that display Aggregation Info for a whole column
88
88
  */
89
89
  RowSummaries?: RowSummary[];
90
90
  }
@@ -1,7 +1,7 @@
1
1
  import { AdaptableObject } from '../types';
2
2
  import { ConfigState } from './ConfigState';
3
3
  /**
4
- * Predefined Configuration for Notes Module
4
+ * Predefined Configuration for Note Module
5
5
  */
6
6
  export interface NoteState extends ConfigState {
7
7
  /**
@@ -46,7 +46,7 @@ export interface PredefinedConfig {
46
46
  /**
47
47
  * Collection of personal Notes that are edited at Cell level
48
48
  */
49
- Notes?: NoteState;
49
+ Note?: NoteState;
50
50
  /**
51
51
  * Large series of properties to give users full control over the look and feel of the *Dashboard* - the section above the grid with toolbars and buttons
52
52
  */
@@ -0,0 +1,38 @@
1
+ import * as Redux from 'redux';
2
+ import { AdaptableNote, NoteState } from '../../PredefinedConfig/NoteState';
3
+ import { CellAddress } from '../../types';
4
+ /**
5
+ * @ReduxAction A Note has been added
6
+ */
7
+ export declare const NOTE_ADD = "NOTE_ADD";
8
+ /**
9
+ * @ReduxAction A Note has been edited
10
+ */
11
+ export declare const NOTE_EDIT = "NOTE_EDIT";
12
+ /**
13
+ * @ReduxAction A Note has been deleted
14
+ */
15
+ export declare const NOTE_DELETE = "NOTE_DELETE";
16
+ /**
17
+ * @ReduxAction Note Module is ready
18
+ */
19
+ export declare const NOTE_READY = "NOTE_READY";
20
+ export interface AdaptableNoteAction extends Redux.Action {
21
+ adaptableNote: AdaptableNote;
22
+ }
23
+ export interface AdaptableNoteAddAction extends AdaptableNoteAction {
24
+ }
25
+ export interface AdaptableNoteEditAction extends AdaptableNoteAction {
26
+ }
27
+ export interface AdaptableNoteDeleteAction extends AdaptableNoteAction {
28
+ }
29
+ export interface NoteReadyAction extends Redux.Action {
30
+ noteState: NoteState;
31
+ }
32
+ export declare const NoteAdd: (note: AdaptableNote) => AdaptableNoteAddAction;
33
+ export declare const NoteEdit: (note: AdaptableNote) => AdaptableNoteEditAction;
34
+ export declare const NoteDelete: (note: AdaptableNote) => AdaptableNoteDeleteAction;
35
+ export declare const NoteReady: (note: NoteState) => NoteReadyAction;
36
+ export declare const GetAllNotesSelector: (state: NoteState) => AdaptableNote[];
37
+ export declare const GetNotesSelector: (state: NoteState, address: CellAddress) => AdaptableNote[];
38
+ export declare const NoteReducer: Redux.Reducer<NoteState>;
@@ -1,35 +1,35 @@
1
1
  import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
2
2
  import { EMPTY_ARRAY } from '../../Utilities/Constants/GeneralConstants';
3
3
  /**
4
- * @ReduxAction A Notes has been added
4
+ * @ReduxAction A Note has been added
5
5
  */
6
- export const NOTES_ADD = 'NOTES_ADD';
6
+ export const NOTE_ADD = 'NOTE_ADD';
7
7
  /**
8
- * @ReduxAction A Notes has been edited
8
+ * @ReduxAction A Note has been edited
9
9
  */
10
- export const NOTES_EDIT = 'NOTES_EDIT';
10
+ export const NOTE_EDIT = 'NOTE_EDIT';
11
11
  /**
12
- * @ReduxAction A Notes has been deleted
12
+ * @ReduxAction A Note has been deleted
13
13
  */
14
- export const NOTES_DELETE = 'NOTES_DELETE';
14
+ export const NOTE_DELETE = 'NOTE_DELETE';
15
15
  /**
16
- * @ReduxAction Notes Module is ready
16
+ * @ReduxAction Note Module is ready
17
17
  */
18
- export const NOTES_READY = 'NOTES_READY';
19
- export const NotesAdd = (note) => ({
20
- type: NOTES_ADD,
18
+ export const NOTE_READY = 'NOTE_READY';
19
+ export const NoteAdd = (note) => ({
20
+ type: NOTE_ADD,
21
21
  adaptableNote: note,
22
22
  });
23
- export const NotesEdit = (note) => ({
24
- type: NOTES_EDIT,
23
+ export const NoteEdit = (note) => ({
24
+ type: NOTE_EDIT,
25
25
  adaptableNote: note,
26
26
  });
27
- export const NotesDelete = (note) => ({
28
- type: NOTES_DELETE,
27
+ export const NoteDelete = (note) => ({
28
+ type: NOTE_DELETE,
29
29
  adaptableNote: note,
30
30
  });
31
- export const NotesReady = (note) => ({
32
- type: NOTES_READY,
31
+ export const NoteReady = (note) => ({
32
+ type: NOTE_READY,
33
33
  noteState: note,
34
34
  });
35
35
  export const GetAllNotesSelector = (state) => state.Notes;
@@ -55,20 +55,20 @@ export const GetNotesSelector = (state, address) => {
55
55
  const initialState = {
56
56
  Notes: EMPTY_ARRAY,
57
57
  };
58
- export const NotesReducer = (state = initialState, action) => {
58
+ export const NoteReducer = (state = initialState, action) => {
59
59
  let adaptableNotes;
60
60
  switch (action.type) {
61
- case NOTES_ADD: {
61
+ case NOTE_ADD: {
62
62
  const note = action.adaptableNote;
63
63
  AdaptableHelper.addUuidAndSource(note);
64
64
  adaptableNotes = [...state.Notes, note];
65
65
  return Object.assign(Object.assign({}, state), { Notes: adaptableNotes });
66
66
  }
67
- case NOTES_EDIT: {
67
+ case NOTE_EDIT: {
68
68
  const note = action.adaptableNote;
69
69
  return Object.assign(Object.assign({}, state), { Notes: state.Notes.map((abObject) => (abObject.Uuid === note.Uuid ? note : abObject)) });
70
70
  }
71
- case NOTES_DELETE: {
71
+ case NOTE_DELETE: {
72
72
  const note = action.adaptableNote;
73
73
  return Object.assign(Object.assign({}, state), { Notes: state.Notes.filter((abObject) => abObject.Uuid !== note.Uuid) });
74
74
  }
@@ -339,6 +339,6 @@ export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState)
339
339
  export declare const SystemQuickSearchFloatingVisibilitySelector: (state: SystemState) => boolean;
340
340
  export declare const SystemCommentsAndNotesSelector: (state: SystemState) => CellAddress;
341
341
  export declare const SystemCommentsAndNotesEditModeSelector: (state: SystemState) => boolean;
342
- export declare const SystemCommentsAndNotesFocusedEntitySelector: (state: SystemState) => "Note" | "Comment";
342
+ export declare const SystemCommentsAndNotesFocusedEntitySelector: (state: SystemState) => "Comment" | "Note";
343
343
  export declare const DataImportCompleted: (dataImportedInfo: DataImportedInfo) => DataImportCompletedAction;
344
344
  export declare const SystemReducer: Redux.Reducer<SystemState>;
@@ -29,7 +29,7 @@ import * as FreeTextColumnRedux from '../ActionsReducers/FreeTextColumnRedux';
29
29
  import * as GridRedux from '../ActionsReducers/GridRedux';
30
30
  import * as LayoutRedux from '../ActionsReducers/LayoutRedux';
31
31
  import * as NamedQueryRedux from '../ActionsReducers/NamedQueryRedux';
32
- import * as NotesRedux from '../ActionsReducers/NotesRedux';
32
+ import * as NoteRedux from '../ActionsReducers/NoteRedux';
33
33
  import * as PlusMinusRedux from '../ActionsReducers/PlusMinusRedux';
34
34
  import * as QueryRedux from '../ActionsReducers/QueryRedux';
35
35
  import * as QuickSearchRedux from '../ActionsReducers/QuickSearchRedux';
@@ -121,6 +121,7 @@ export class AdaptableStore {
121
121
  Popup: PopupRedux.PopupReducer,
122
122
  System: SystemRedux.SystemReducer,
123
123
  Plugins: PluginsRedux.PluginsReducer,
124
+ Comment: CommentsRedux.CommentsReducer,
124
125
  // Reducers for Persisted State
125
126
  Alert: AlertRedux.AlertReducer,
126
127
  FlashingCell: FlashingCellRedux.FlashingCellReducer,
@@ -142,8 +143,7 @@ export class AdaptableStore {
142
143
  ToolPanel: ToolPanelRedux.ToolPanelReducer,
143
144
  Charting: ChartingRedux.ChartingReducer,
144
145
  StyledColumn: StyledColumnRedux.StyledColumnReducer,
145
- Notes: NotesRedux.NotesReducer,
146
- Comment: CommentsRedux.CommentsReducer,
146
+ Note: NoteRedux.NoteReducer,
147
147
  Query: QueryRedux.QueryReducer,
148
148
  NamedQuery: NamedQueryRedux.NamedQueryReducer,
149
149
  };
@@ -861,12 +861,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
861
861
  * Note ACTIONS
862
862
  *******************/
863
863
  /**
864
- * Use Case: Notes has been edited/deleted/added
864
+ * Use Case: Note has been edited/deleted/added
865
865
  * Action: Triangle can be removed/added
866
866
  */
867
- case NotesRedux.NOTES_ADD:
868
- case NotesRedux.NOTES_EDIT:
869
- case NotesRedux.NOTES_DELETE: {
867
+ case NoteRedux.NOTE_ADD:
868
+ case NoteRedux.NOTE_EDIT:
869
+ case NoteRedux.NOTE_DELETE: {
870
870
  let returnAction = next(action);
871
871
  const node = adaptable.api.gridApi.getRowNodeForPrimaryKey(returnAction.adaptableNote.PrimaryKeyValue);
872
872
  adaptable.refreshCells([node], [returnAction.adaptableNote.ColumnId], true);
@@ -91,7 +91,8 @@ export class CellSummaryModule extends AdaptableModuleBase {
91
91
  const handleExpression = (functionName) => {
92
92
  const columnId = selectedCellInfo.columns[0].columnId;
93
93
  const rowNodes = selectedCellInfo.gridCells.map((gc) => gc.rowNode);
94
- return this.api.internalApi.getAdaptableInstance().SummaryService.evaluateExpressionValue({
94
+ return this.api.internalApi
95
+ .getSummaryService().evaluateExpressionValue({
95
96
  expression: {
96
97
  function: functionName,
97
98
  },
@@ -2,11 +2,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
2
2
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
3
3
  import { AdaptableModuleBase } from './AdaptableModuleBase';
4
4
  import { IModule } from './Interface/IModule';
5
- /**
6
- * In the first iteration a cell can have only one note, the
7
- * notes is a list to allow further development.
8
- */
9
- export declare class CommentsModule extends AdaptableModuleBase implements IModule {
5
+ export declare class CommentModule extends AdaptableModuleBase implements IModule {
10
6
  private adaptable;
11
7
  constructor(api: AdaptableApi);
12
8
  onAdaptableReady(): void;
@@ -1,13 +1,9 @@
1
1
  import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
2
2
  import { createBaseContext } from '../Utilities/ObjectFactory';
3
3
  import { AdaptableModuleBase } from './AdaptableModuleBase';
4
- /**
5
- * In the first iteration a cell can have only one note, the
6
- * notes is a list to allow further development.
7
- */
8
- export class CommentsModule extends AdaptableModuleBase {
4
+ export class CommentModule extends AdaptableModuleBase {
9
5
  constructor(api) {
10
- super(ModuleConstants.CommentsModuleId, ModuleConstants.CommentsFriendlyName, 'comments', 'CommentsPopup', 'comments', api);
6
+ super(ModuleConstants.CommentModuleId, ModuleConstants.CommentFriendlyName, 'comments', 'CommentsPopup', 'comments', api);
11
7
  this.adaptable = api.internalApi.getAdaptableInstance();
12
8
  }
13
9
  onAdaptableReady() {
@@ -18,6 +14,9 @@ export class CommentsModule extends AdaptableModuleBase {
18
14
  if (!options || !options.persistCommentThreads || !options.loadCommentThreads) {
19
15
  return false;
20
16
  }
17
+ if (this.api.optionsApi.getAutogeneratePrimaryKey()) {
18
+ return false;
19
+ }
21
20
  return super.isModuleAvailable();
22
21
  }
23
22
  async loadComments() {
@@ -13,6 +13,7 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
13
13
  protected LayoutState: LayoutState;
14
14
  constructor(api: AdaptableApi);
15
15
  onAdaptableReady(): void;
16
+ rowSummariesSubscribtions(): void;
16
17
  getModuleAdaptableObjects(): AdaptableObject[];
17
18
  getExplicitlyReferencedColumnIds(layout: Layout): string[];
18
19
  getTeamSharingReferences(adaptableObject: AdaptableObject): TeamSharingReferences;
@@ -35,6 +35,10 @@ export class LayoutModule extends AdaptableModuleBase {
35
35
  requestAnimationFrame(() => {
36
36
  this.api.layoutApi.internalApi.fireLayoutChangedEvent('ADAPTABLE_READY', null, this.api.layoutApi.getLayoutState());
37
37
  });
38
+ this.rowSummariesSubscribtions();
39
+ }
40
+ rowSummariesSubscribtions() {
41
+ // ROW SUMMARY
38
42
  this.evaluateRowSummary();
39
43
  this.api.eventApi.on('AdaptableStateReloaded', () => {
40
44
  this.evaluateRowSummary();
@@ -49,9 +53,21 @@ export class LayoutModule extends AdaptableModuleBase {
49
53
  });
50
54
  });
51
55
  this.api.eventApi.on('LayoutChanged', (event) => {
52
- this.evaluateRowSummary();
56
+ // exclude filter events, those are handled in another event
57
+ if (event.actionName.includes('FILTER')) {
58
+ return;
59
+ }
60
+ setTimeout(() => {
61
+ // the timeout is added so the grid has time to repond to the layout changed
62
+ this.evaluateRowSummary();
63
+ }, 16);
53
64
  });
54
65
  const adaptable = this.api.internalApi.getAdaptableInstance();
66
+ adaptable._on('AdapTableFiltersApplied', () => {
67
+ // we need to use this instead of layout changed
68
+ // so the rows have time to update
69
+ this.evaluateRowSummary();
70
+ });
55
71
  adaptable._on('FirstDataRendered', () => {
56
72
  this.evaluateRowSummary();
57
73
  });
@@ -2,9 +2,10 @@ import { AdaptableApi } from '../Api/AdaptableApi';
2
2
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
3
3
  import { AdaptableModuleBase } from './AdaptableModuleBase';
4
4
  import { IModule } from './Interface/IModule';
5
- export declare class NotesModule extends AdaptableModuleBase implements IModule {
5
+ export declare class NoteModule extends AdaptableModuleBase implements IModule {
6
6
  private adaptable;
7
7
  constructor(api: AdaptableApi);
8
+ isModuleAvailable(): boolean;
8
9
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
9
10
  private getAddRemoveNoteMenuItems;
10
11
  }
@@ -1,10 +1,14 @@
1
1
  import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
2
2
  import { AdaptableModuleBase } from './AdaptableModuleBase';
3
- export class NotesModule extends AdaptableModuleBase {
3
+ export class NoteModule extends AdaptableModuleBase {
4
4
  constructor(api) {
5
- super(ModuleConstants.NotesModuleId, ModuleConstants.NotesFriendlyName, 'note', 'NotesPopup', 'Notes', api);
5
+ super(ModuleConstants.NoteModuleId, ModuleConstants.NoteFriendlyName, 'note', 'NotePopup', 'Notes', api);
6
6
  this.adaptable = api.internalApi.getAdaptableInstance();
7
7
  }
8
+ isModuleAvailable() {
9
+ // Note module doesn't support autogenerated primary keys
10
+ return super.isModuleAvailable() && !this.api.optionsApi.getAutogeneratePrimaryKey();
11
+ }
8
12
  addContextMenuItems(menuContext) {
9
13
  var _a, _b;
10
14
  if (!this.isModuleAvailable()) {
@@ -32,7 +36,7 @@ export class NotesModule extends AdaptableModuleBase {
32
36
  return items;
33
37
  }
34
38
  // does not have note
35
- const [note] = (_a = this.adaptable.api.noteApi.getCellNotes({
39
+ const [note] = (_a = this.adaptable.api.noteApi.getNotesForCell({
36
40
  PrimaryKeyValue: menuContext.primaryKeyValue,
37
41
  ColumnId: menuContext.adaptableColumn.columnId,
38
42
  })) !== null && _a !== void 0 ? _a : [];
@@ -10,6 +10,9 @@ export const getScopeViewItems = (scope, api) => {
10
10
  if ('All' in scope) {
11
11
  values = ['All Columns'];
12
12
  }
13
+ if ('ColumnTypes' in scope) {
14
+ values = scope.ColumnTypes;
15
+ }
13
16
  return {
14
17
  label: 'Target',
15
18
  name: 'Target',
@@ -37,10 +37,10 @@ export declare const GridInfoModuleId: ModuleConstants;
37
37
  export declare const GridInfoFriendlyName = "Grid Info";
38
38
  export declare const ColumnInfoModuleId: ModuleConstants;
39
39
  export declare const ColumnInfoFriendlyName = "Column Info";
40
- export declare const NotesModuleId: ModuleConstants;
41
- export declare const NotesFriendlyName = "Notes";
42
- export declare const CommentsModuleId: ModuleConstants;
43
- export declare const CommentsFriendlyName = "Comments";
40
+ export declare const NoteModuleId: ModuleConstants;
41
+ export declare const NoteFriendlyName = "Note";
42
+ export declare const CommentModuleId: ModuleConstants;
43
+ export declare const CommentFriendlyName = "Comment";
44
44
  export declare const IPushPullModuleId: ModuleConstants;
45
45
  export declare const IPushPullFriendlyName = "IPushPull";
46
46
  export declare const LayoutModuleId: ModuleConstants;
@@ -108,12 +108,12 @@ export declare const ADAPTABLE_MODULE_MAP: {
108
108
  ToolPanel: string;
109
109
  SettingsPanel: string;
110
110
  StatusBar: string;
111
- Notes: string;
111
+ Note: string;
112
112
  ColumnInfo: string;
113
113
  DataImport: string;
114
114
  NamedQuery: string;
115
115
  GridFilter: string;
116
- Comments: string;
116
+ Comment: string;
117
117
  Query: string;
118
118
  Filter: string;
119
119
  };
@@ -36,10 +36,10 @@ export const GridInfoModuleId = 'GridInfo';
36
36
  export const GridInfoFriendlyName = 'Grid Info';
37
37
  export const ColumnInfoModuleId = 'ColumnInfo';
38
38
  export const ColumnInfoFriendlyName = 'Column Info';
39
- export const NotesModuleId = 'Notes';
40
- export const NotesFriendlyName = 'Notes';
41
- export const CommentsModuleId = 'Comments';
42
- export const CommentsFriendlyName = 'Comments';
39
+ export const NoteModuleId = 'Note';
40
+ export const NoteFriendlyName = 'Note';
41
+ export const CommentModuleId = 'Comment';
42
+ export const CommentFriendlyName = 'Comment';
43
43
  export const IPushPullModuleId = 'IPushPull';
44
44
  export const IPushPullFriendlyName = 'IPushPull';
45
45
  export const LayoutModuleId = 'Layout';
@@ -107,12 +107,12 @@ export const ADAPTABLE_MODULE_MAP = {
107
107
  [ToolPanelModuleId]: ToolPanelFriendlyName,
108
108
  [SettingsPanelModuleId]: SettingsPanelFriendlyName,
109
109
  [StatusBarModuleId]: StatusBarFriendlyName,
110
- [NotesModuleId]: NotesFriendlyName,
110
+ [NoteModuleId]: NoteFriendlyName,
111
111
  [ColumnInfoModuleId]: ColumnInfoFriendlyName,
112
112
  [DataImportModuleId]: DataImportFriendyName,
113
113
  [NamedQueryModuleId]: NamedQueryFriendlyName,
114
114
  [GridFilterModuleId]: GridFilterFriendlyName,
115
- [CommentsModuleId]: CommentsFriendlyName,
115
+ [CommentModuleId]: CommentFriendlyName,
116
116
  // Remove next version
117
117
  ['Query']: 'Query',
118
118
  ['Filter']: 'Filter',
@@ -41,7 +41,7 @@ export const DEFAULT_SETTINGS_PANEL_NAVIGATION_ITEMS = [
41
41
  'Charting',
42
42
  'Schedule',
43
43
  'TeamSharing',
44
- 'Notes',
45
- 'Comments',
44
+ 'Note',
45
+ 'Comment',
46
46
  'StateManagement',
47
47
  ];