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

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 (106) 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/AdaptableOptions/MenuOptions.d.ts +1 -53
  7. package/src/AdaptableOptions/MenuOptions.js +3 -3
  8. package/src/Api/AdaptableApi.d.ts +2 -2
  9. package/src/Api/ConfigApi.d.ts +2 -3
  10. package/src/Api/GridApi.d.ts +2 -1
  11. package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
  12. package/src/Api/Implementation/ConfigApiImpl.js +7 -7
  13. package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
  14. package/src/Api/Implementation/GridApiImpl.js +8 -1
  15. package/src/Api/Implementation/NoteApiImpl.d.ts +2 -2
  16. package/src/Api/Implementation/NoteApiImpl.js +8 -8
  17. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
  18. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
  19. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  20. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -2
  21. package/src/Api/Internal/AdaptableInternalApi.js +11 -11
  22. package/src/Api/Internal/CalculatedColumnInternalApi.js +3 -2
  23. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  24. package/src/Api/Internal/FreeTextColumnInternalApi.js +3 -2
  25. package/src/Api/Internal/GridInternalApi.d.ts +2 -0
  26. package/src/Api/Internal/GridInternalApi.js +15 -0
  27. package/src/Api/NoteApi.d.ts +5 -5
  28. package/src/Api/OptionsApi.d.ts +2 -2
  29. package/src/Api/UserInterfaceApi.d.ts +0 -11
  30. package/src/PredefinedConfig/AdaptableState.d.ts +1 -1
  31. package/src/PredefinedConfig/CommentState.d.ts +16 -12
  32. package/src/PredefinedConfig/Common/TransposeConfig.d.ts +6 -0
  33. package/src/PredefinedConfig/Common/TransposeConfig.js +1 -0
  34. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  35. package/src/PredefinedConfig/Common/Types.js +4 -1
  36. package/src/PredefinedConfig/NoteState.d.ts +1 -1
  37. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  38. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  39. package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +20 -20
  40. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
  41. package/src/Redux/Store/AdaptableStore.js +7 -7
  42. package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +1 -5
  43. package/src/Strategy/{CommentsModule.js → CommentModule.js} +5 -6
  44. package/src/Strategy/LayoutModule.d.ts +1 -0
  45. package/src/Strategy/LayoutModule.js +17 -1
  46. package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
  47. package/src/Strategy/{NotesModule.js → NoteModule.js} +7 -3
  48. package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
  49. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  50. package/src/Utilities/Constants/ModuleConstants.js +6 -6
  51. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  52. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +10 -0
  53. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
  54. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  55. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
  56. package/src/Utilities/ObjectFactory.d.ts +3 -3
  57. package/src/Utilities/ObjectFactory.js +4 -24
  58. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
  59. package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
  60. package/src/Utilities/Services/CellPopupService.js +2 -2
  61. package/src/Utilities/Services/ModuleService.js +4 -0
  62. package/src/Utilities/Services/QueryLanguageService.js +2 -2
  63. package/src/Utilities/Services/SummaryService.d.ts +1 -1
  64. package/src/Utilities/adaptableQlUtils.d.ts +2 -0
  65. package/src/Utilities/adaptableQlUtils.js +14 -0
  66. package/src/View/AdaptableViewFactory.js +2 -2
  67. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
  68. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  69. package/src/View/Comments/CommentsEditor.js +1 -1
  70. package/src/View/Comments/CommentsPopup.js +8 -4
  71. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +5 -5
  72. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  73. package/src/View/Components/ValueSelector/index.js +1 -1
  74. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -1
  75. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
  76. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
  77. package/src/View/Layout/TransposedPopup.js +19 -18
  78. package/src/View/Layout/Wizard/LayoutWizard.js +8 -0
  79. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +8 -0
  80. package/src/View/Layout/Wizard/sections/RowSummarySection.js +140 -0
  81. package/src/View/Note/NotePopup.d.ts +2 -0
  82. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +3 -3
  83. package/src/agGrid/AdaptableAgGrid.js +4 -4
  84. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  85. package/src/agGrid/AgGridAdapter.js +5 -0
  86. package/src/agGrid/AgGridColumnAdapter.js +3 -3
  87. package/src/agGrid/defaultAdaptableOptions.js +0 -7
  88. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
  89. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
  90. package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -14
  91. package/src/components/icons/note.js +2 -2
  92. package/src/env.js +2 -2
  93. package/src/metamodel/adaptable.metamodel.d.ts +36 -11
  94. package/src/metamodel/adaptable.metamodel.js +1 -1
  95. package/src/parser/src/parser.js +117 -1257
  96. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  97. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
  98. package/src/parser/src/types.d.ts +2 -2
  99. package/src/types.d.ts +1 -0
  100. package/tsconfig.esm.tsbuildinfo +1 -1
  101. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
  102. package/src/View/Notes/NotesPopup.d.ts +0 -2
  103. /package/src/Api/Internal/{NotesInternalApi.d.ts → NoteInternalApi.d.ts} +0 -0
  104. /package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +0 -0
  105. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  106. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -1,4 +1,4 @@
1
- import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
1
+ import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
2
2
  import { AdaptableColumn, AdaptableIcon, AdaptableModule, BaseContext } from '../types';
3
3
  /**
4
4
  * Options for managing menus in AdapTable – provided using 2 collections
@@ -12,58 +12,6 @@ export interface MenuOptions<TData = any> {
12
12
  * Customises Column Menu (default column menu items are available in the provided context)
13
13
  */
14
14
  customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
15
- /**
16
- * Show Adaptable Context Menu (or specific items); can be boolean value or function invoked for each menu item
17
- *
18
- * @deprecated Use `customContextMenu` instead
19
- * @defaultValue true
20
- * @gridInfoItem
21
- */
22
- showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext<TData>) => boolean);
23
- /**
24
- * Show AdapTable Column Menu (or specific items); can be boolean value or function invoked for each menu item
25
- *
26
- * @deprecated Use `customColumnMenu` instead
27
- * @defaultValue true
28
- * @gridInfoItem
29
- */
30
- showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext<TData>) => boolean);
31
- /**
32
- * Adds 'Ungroup' Column Menu item to a row grouped column menu
33
- *
34
- * @deprecated Now provided by AG Grid and property is ignored
35
- * @defaultValue true
36
- * @gridInfoItem
37
- */
38
- showUngroupColumnMenuItem?: boolean;
39
- /**
40
- * Order in which AG Grid, AdapTable and User Menu sections will appear in Column Menu (list or function)
41
- *
42
- * @deprecated Use `customColumnMenu` instead
43
- * @defaultValue 'aggrid', 'adaptable', 'user'
44
- * @gridInfoItem
45
- */
46
- columnMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
47
- /**
48
- * Order in which AG Grid, AdapTable and User Menu sections will appear in Context Menu (list or function)
49
- *
50
- * @deprecated Use `customContextMenu` instead
51
- * @defaultValue 'aggrid', 'adaptable', 'user'
52
- * @gridInfoItem
53
- */
54
- contextMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
55
- /**
56
- * User-defined Menu Items to add to the Column Menu
57
- *
58
- * @deprecated Use `customColumnMenu` instead
59
- */
60
- columnMenuItems?: UserMenuItem<ColumnMenuContext>[];
61
- /**
62
- * Customised Context Menu. Default context menu items are available in the provided context.
63
- *
64
- * @deprecated Use `customContextMenu` instead
65
- */
66
- contextMenuItems?: UserMenuItem<ContextMenuContext>[];
67
15
  }
68
16
  /**
69
17
  * Context info provided when building Custom Context Menus
@@ -45,8 +45,8 @@ export const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
45
45
  ModuleConstants.StateManagementModuleId,
46
46
  ModuleConstants.ThemeModuleId,
47
47
  ModuleConstants.ChartingModuleId,
48
- ModuleConstants.NotesModuleId,
49
- ModuleConstants.CommentsModuleId,
48
+ ModuleConstants.NoteModuleId,
49
+ ModuleConstants.CommentModuleId,
50
50
  ];
51
51
  export const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
52
52
  ModuleConstants.SettingsPanelModuleId,
@@ -91,5 +91,5 @@ export const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
91
91
  ModuleConstants.StateManagementModuleId,
92
92
  ModuleConstants.ThemeModuleId,
93
93
  ModuleConstants.ChartingModuleId,
94
- ModuleConstants.NotesModuleId,
94
+ ModuleConstants.NoteModuleId,
95
95
  ];
@@ -231,11 +231,11 @@ export interface AdaptableApi {
231
231
  */
232
232
  userInterfaceApi: UserInterfaceApi;
233
233
  /**
234
- * Provides access to the Notes Module
234
+ * Provides access to the Note Module
235
235
  */
236
236
  noteApi: NoteApi;
237
237
  /**
238
- * Provides access to the Comments Module
238
+ * Provides access to the Comment Module
239
239
  */
240
240
  commentApi: CommentApi;
241
241
  /**
@@ -15,8 +15,7 @@ import { AdaptablePersistentState, AdaptableState } from '../PredefinedConfig/Ad
15
15
  import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
16
16
  import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
17
17
  import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
18
- import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState } from '../types';
19
- import { NoteState } from '../PredefinedConfig/NoteState';
18
+ import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState, NoteState } from '../types';
20
19
  /**
21
20
  * Range of functions to access Predefined Config and Adaptable State
22
21
  */
@@ -105,7 +104,7 @@ export interface ConfigApi {
105
104
  */
106
105
  getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
107
106
  /**
108
- * Returns Notes section of Adaptable State
107
+ * Returns Note section of Adaptable State
109
108
  * @param returnJson return as JSON rather than object
110
109
  */
111
110
  getNoteState(returnJson?: boolean): NoteState;
@@ -10,6 +10,7 @@ import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
10
10
  import { IRowNode, RowModelType } from '@ag-grid-community/core';
11
11
  import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
12
12
  import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
13
+ import { TransposeConfig } from '../PredefinedConfig/Common/TransposeConfig';
13
14
  /**
14
15
  * Provides access to important properites of AdapTable e.g. sorting, selected cells etc.
15
16
  */
@@ -523,5 +524,5 @@ export interface GridApi {
523
524
  /**
524
525
  * Opens a window with a transposed view of Grid
525
526
  */
526
- showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
527
+ showTransposedView(transposeConfig: TransposeConfig): void;
527
528
  }
@@ -10,11 +10,8 @@ export class ActionColumnApiImpl extends ApiBase {
10
10
  return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
11
11
  }
12
12
  getColDefsForActionColumns() {
13
- const defaultActionColumnSettings = {
14
- resizable: true,
15
- suppressMenu: false,
16
- suppressMovable: false,
17
- };
13
+ const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
14
+ const defaultActionColumnSettings = Object.assign(Object.assign({}, defaultSpecialColumnSettings), { resizable: true, suppressMenu: false, suppressMovable: false });
18
15
  return this.getActionColumnApi()
19
16
  .getActionColumns()
20
17
  .map((actionColumn) => {
@@ -26,7 +23,7 @@ export class ActionColumnApiImpl extends ApiBase {
26
23
  editable: false,
27
24
  width: actionColumnSettings.width,
28
25
  resizable: actionColumnSettings.resizable,
29
- suppressMenu: actionColumnSettings.suppressMenu,
26
+ suppressHeaderMenuButton: actionColumnSettings.suppressMenu,
30
27
  suppressMovable: actionColumnSettings.suppressMovable,
31
28
  filter: false,
32
29
  sortable: false,
@@ -8,7 +8,7 @@ import * as AlertRedux from '../../Redux/ActionsReducers/AlertRedux';
8
8
  import * as BulkUpdateRedux from '../../Redux/ActionsReducers/BulkUpdateRedux';
9
9
  import * as CalculatedColumnRedux from '../../Redux/ActionsReducers/CalculatedColumnRedux';
10
10
  import * as ChartingRedux from '../../Redux/ActionsReducers/ChartingRedux';
11
- import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
11
+ import * as NoteRedux from '../../Redux/ActionsReducers/NoteRedux';
12
12
  import * as CustomSortRedux from '../../Redux/ActionsReducers/CustomSortRedux';
13
13
  import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
14
14
  import * as FormatColumnRedux from '../../Redux/ActionsReducers/FormatColumnRedux';
@@ -178,10 +178,10 @@ export class ConfigApiImpl extends ApiBase {
178
178
  return returnJson
179
179
  ? JSON.stringify(this.getAdaptableState().Charting)
180
180
  : this.getAdaptableState().Charting;
181
- case 'Notes':
181
+ case 'Note':
182
182
  return returnJson
183
- ? JSON.stringify(this.getAdaptableState().Notes)
184
- : this.getAdaptableState().Notes;
183
+ ? JSON.stringify(this.getAdaptableState().Note)
184
+ : this.getAdaptableState().Note;
185
185
  case 'CustomSort':
186
186
  return returnJson
187
187
  ? JSON.stringify(this.getAdaptableState().CustomSort)
@@ -259,7 +259,7 @@ export class ConfigApiImpl extends ApiBase {
259
259
  return this.getUserStateByStateKey('Charting', returnJson);
260
260
  }
261
261
  getNoteState(returnJson = false) {
262
- return this.getUserStateByStateKey('Notes', returnJson);
262
+ return this.getUserStateByStateKey('Note', returnJson);
263
263
  }
264
264
  getCustomSortState(returnJson = false) {
265
265
  return this.getUserStateByStateKey('CustomSort', returnJson);
@@ -314,8 +314,8 @@ export class ConfigApiImpl extends ApiBase {
314
314
  case 'Charting':
315
315
  this.dispatchAction(ChartingRedux.ChartingReady(this.getChartingState()));
316
316
  break;
317
- case 'Notes':
318
- this.dispatchAction(NotesRedux.NotesReady(this.getNoteState()));
317
+ case 'Note':
318
+ this.dispatchAction(NoteRedux.NoteReady(this.getNoteState()));
319
319
  break;
320
320
  case 'CustomSort':
321
321
  this.dispatchAction(CustomSortRedux.CustomSortReady(this.getCustomSortState()));
@@ -14,6 +14,7 @@ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChang
14
14
  import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
15
15
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
16
16
  import { GridInternalApi } from '../Internal/GridInternalApi';
17
+ import { TransposeConfig } from '../../PredefinedConfig/Common/TransposeConfig';
17
18
  export declare class GridApiImpl extends ApiBase implements GridApi {
18
19
  internalApi: GridInternalApi;
19
20
  constructor(adaptable: IAdaptable);
@@ -131,5 +132,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
131
132
  openGridInfoSettingsPanel(): void;
132
133
  getAgGridRowModelType(): RowModelType;
133
134
  getVisibleRowCount(): number;
134
- showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
135
+ showTransposedView(transposeConfig: TransposeConfig): void;
135
136
  }
@@ -525,7 +525,12 @@ export class GridApiImpl extends ApiBase {
525
525
  logDeprecation(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
526
526
  return this.getRowCount();
527
527
  }
528
- showTransposedView(transposedColumnId, hideTransposedColumn) {
528
+ showTransposedView(transposeConfig) {
529
+ var _a, _b, _c, _d;
530
+ const transposedColumnId = (_a = transposeConfig.transposedColumnId) !== null && _a !== void 0 ? _a : this.getAdaptableApi().optionsApi.getPrimaryKey();
531
+ const hideTransposedColumn = (_b = transposeConfig.hideTransposedColumn) !== null && _b !== void 0 ? _b : true;
532
+ const visibleColumns = (_c = transposeConfig.visibleColumns) !== null && _c !== void 0 ? _c : false;
533
+ const visibleRows = (_d = transposeConfig.visibleRows) !== null && _d !== void 0 ? _d : false;
529
534
  this.adaptable.api.internalApi.showPopupWindow({
530
535
  id: WINDOW_SHOW_TRANSPOSED_VIEW,
531
536
  factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
@@ -534,6 +539,8 @@ export class GridApiImpl extends ApiBase {
534
539
  popupProps: {
535
540
  transposedColumnId,
536
541
  hideTransposedColumn,
542
+ visibleColumns,
543
+ visibleRows,
537
544
  },
538
545
  });
539
546
  }
@@ -2,7 +2,7 @@ import { ApiBase } from './ApiBase';
2
2
  import { NoteApi } from '../NoteApi';
3
3
  import { AdaptableNote, AdaptableNotes, NoteState } from '../../PredefinedConfig/NoteState';
4
4
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
5
- import { NoteInternalApi } from '../Internal/NotesInternalApi';
5
+ import { NoteInternalApi } from '../Internal/NoteInternalApi';
6
6
  import { CellAddress } from '../../types';
7
7
  export declare class NoteApiImpl extends ApiBase implements NoteApi {
8
8
  internalApi: NoteInternalApi;
@@ -13,6 +13,6 @@ export declare class NoteApiImpl extends ApiBase implements NoteApi {
13
13
  deleteNote(note: AdaptableNote): void;
14
14
  getNoteState(): NoteState;
15
15
  getAllNotes(): AdaptableNotes;
16
- getCellNotes(address: CellAddress): AdaptableNote[];
16
+ getNotesForCell(address: CellAddress): AdaptableNote[];
17
17
  getNoteByUuid(uuid: string): AdaptableNote | undefined;
18
18
  }
@@ -1,6 +1,6 @@
1
1
  import { ApiBase } from './ApiBase';
2
- import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
3
- import { NoteInternalApi } from '../Internal/NotesInternalApi';
2
+ import * as NoteRedux from '../../Redux/ActionsReducers/NoteRedux';
3
+ import { NoteInternalApi } from '../Internal/NoteInternalApi';
4
4
  export class NoteApiImpl extends ApiBase {
5
5
  constructor(adaptable) {
6
6
  super(adaptable);
@@ -13,26 +13,26 @@ export class NoteApiImpl extends ApiBase {
13
13
  ColumnId: columnId,
14
14
  Timestamp: Date.now(),
15
15
  };
16
- this.dispatchAction(NotesRedux.NotesAdd(note));
16
+ this.dispatchAction(NoteRedux.NoteAdd(note));
17
17
  }
18
18
  editNote(note) {
19
19
  note.Timestamp = Date.now();
20
- this.dispatchAction(NotesRedux.NotesEdit(note));
20
+ this.dispatchAction(NoteRedux.NoteEdit(note));
21
21
  }
22
22
  updateNoteText(noteStr, note) {
23
23
  this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
24
24
  }
25
25
  deleteNote(note) {
26
- this.dispatchAction(NotesRedux.NotesDelete(note));
26
+ this.dispatchAction(NoteRedux.NoteDelete(note));
27
27
  }
28
28
  getNoteState() {
29
- return this.getAdaptableState().Notes;
29
+ return this.getAdaptableState().Note;
30
30
  }
31
31
  getAllNotes() {
32
32
  return this.getNoteState().Notes;
33
33
  }
34
- getCellNotes(address) {
35
- return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
34
+ getNotesForCell(address) {
35
+ return NoteRedux.GetNotesSelector(this.getAdaptableState().Note, address);
36
36
  }
37
37
  getNoteByUuid(uuid) {
38
38
  return this.getAllNotes().find((note) => note.Uuid === uuid);
@@ -2,7 +2,6 @@ import { ApiBase } from './ApiBase';
2
2
  import { UserInterfaceApi } from '../UserInterfaceApi';
3
3
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
5
- import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../../PredefinedConfig/Common/Menu';
6
5
  import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
7
6
  import { AdaptableObjectTag, CustomWindowConfig, GridCell } from '../../types';
8
7
  import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
@@ -24,8 +23,6 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
24
23
  getEditLookUpItems(): EditLookUpPermittedValues[];
25
24
  getEditLookUpItemForColumn(column: AdaptableColumn): EditLookUpPermittedValues | undefined;
26
25
  getEditLookUpValuesForEditLookUpItem(editLookUpItem: EditLookUpPermittedValues, gridCell: GridCell): any[] | undefined;
27
- addColumnMenuItem(userMenuItem: UserMenuItem<ColumnMenuContext>): void;
28
- addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
29
26
  getEditableCellStyle(): AdaptableStyle | undefined;
30
27
  getReadOnlyCellStyle(): AdaptableStyle | undefined;
31
28
  getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
@@ -142,14 +142,6 @@ export class UserInterfaceApiImpl extends ApiBase {
142
142
  }
143
143
  return this.adaptable.api.gridApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, gridCell.column, gridCell);
144
144
  }
145
- addColumnMenuItem(userMenuItem) {
146
- var _a;
147
- (_a = this.getMenuOptions().columnMenuItems) === null || _a === void 0 ? void 0 : _a.push(userMenuItem);
148
- }
149
- addContextMenuItem(userMenuItem) {
150
- var _a;
151
- (_a = this.getMenuOptions().contextMenuItems) === null || _a === void 0 ? void 0 : _a.push(userMenuItem);
152
- }
153
145
  getEditableCellStyle() {
154
146
  return this.getUserInterfaceOptions().editableCellStyle;
155
147
  }
@@ -220,7 +220,7 @@ export class ActionRowInternalApi extends ApiBase {
220
220
  lockVisible: true,
221
221
  suppressColumnsToolPanel: true,
222
222
  suppressFiltersToolPanel: true,
223
- suppressMenu: true,
223
+ suppressHeaderMenuButton: true,
224
224
  suppressMovable: true,
225
225
  filter: false,
226
226
  sortable: false,
@@ -105,8 +105,8 @@ export declare class AdaptableInternalApi extends ApiBase {
105
105
  getPreviousGroupedColumnsIndex(layoutId: string): {
106
106
  [key: string]: number;
107
107
  };
108
- getValueUsingField(rowData: Record<string, any>, columnValueKey: string): any;
109
- setValueUsingField(rowData: Record<string, any>, columnValueKey: string, newValue: any): Record<string, any>;
108
+ getValueUsingField(rowData: Record<string, any>, fieldName: string): any;
109
+ setValueUsingField(rowData: Record<string, any>, fieldName: string, newValue: any): Record<string, any>;
110
110
  findAdaptableObjectsByLookupCriteria<T extends AdaptableObjectWithScope>({ scope, tag, ids }: AdaptableObjectLookupCriteria, specificAdaptableObjects: T[]): T[];
111
111
  buildBaseContext(): BaseContext;
112
112
  getActionButtonsAndActionColumn(colDef: ColDef): {
@@ -366,17 +366,17 @@ export class AdaptableInternalApi extends ApiBase {
366
366
  return (_a = SystemRedux.SystemPreviousGroupedColumnsSelector(this.getAdaptableState().System)) === null || _a === void 0 ? void 0 : _a[layoutId];
367
367
  }
368
368
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/utils/object.ts#L205
369
- getValueUsingField(rowData, columnValueKey) {
370
- if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
369
+ getValueUsingField(rowData, fieldName) {
370
+ if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
371
371
  return;
372
372
  }
373
- const isColumnValueKeyNested = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
373
+ const isColumnValueKeyNested = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
374
374
  // if no '.', then it's not a deep value
375
375
  if (!isColumnValueKeyNested) {
376
- return rowData[columnValueKey];
376
+ return rowData[fieldName];
377
377
  }
378
378
  // otherwise it is a deep value, so need to dig for it
379
- const fields = columnValueKey.split('.');
379
+ const fields = fieldName.split('.');
380
380
  let currentObject = rowData;
381
381
  for (let i = 0; i < fields.length; i++) {
382
382
  if (currentObject == null) {
@@ -387,22 +387,22 @@ export class AdaptableInternalApi extends ApiBase {
387
387
  return currentObject;
388
388
  }
389
389
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/valueService/valueService.ts#L236
390
- setValueUsingField(rowData, columnValueKey, newValue) {
391
- if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
390
+ setValueUsingField(rowData, fieldName, newValue) {
391
+ if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
392
392
  return;
393
393
  }
394
- const isColumnValueKeyContainsDots = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
394
+ const isColumnValueKeyContainsDots = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
395
395
  let valuesAreSame = false;
396
396
  if (!isColumnValueKeyContainsDots) {
397
397
  // soft comparison to match strings and numbers
398
- valuesAreSame = rowData[columnValueKey] == newValue;
398
+ valuesAreSame = rowData[fieldName] == newValue;
399
399
  if (!valuesAreSame) {
400
- rowData[columnValueKey] = newValue;
400
+ rowData[fieldName] = newValue;
401
401
  }
402
402
  }
403
403
  else {
404
404
  // otherwise it is a deep value, so need to dig for it
405
- const fieldPieces = columnValueKey.split('.');
405
+ const fieldPieces = fieldName.split('.');
406
406
  let currentObject = rowData;
407
407
  while (fieldPieces.length > 0 && currentObject) {
408
408
  const fieldPiece = fieldPieces.shift();
@@ -92,7 +92,8 @@ export class CalculatedColumnInternalApi extends ApiBase {
92
92
  this.adaptable.api.eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
93
93
  }
94
94
  getColDefsForCalculatedColumns() {
95
- const defaultCalculatedColumnSettings = CreateEmptyCalculatedColumn().CalculatedColumnSettings;
95
+ const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
96
+ const defaultCalculatedColumnSettings = CreateEmptyCalculatedColumn(defaultSpecialColumnSettings).CalculatedColumnSettings;
96
97
  return this.getCalculatedColumnApi()
97
98
  .getCalculatedColumns()
98
99
  .map((calculatedColumn) => {
@@ -139,7 +140,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
139
140
  enableRowGroup: calculatedColumnSettings.Groupable,
140
141
  sortable: calculatedColumnSettings.Sortable,
141
142
  enablePivot: calculatedColumnSettings.Pivotable,
142
- suppressMenu: calculatedColumnSettings.SuppressMenu,
143
+ suppressHeaderMenuButton: calculatedColumnSettings.SuppressMenu,
143
144
  suppressMovable: calculatedColumnSettings.SuppressMovable,
144
145
  type: columnTypes,
145
146
  valueGetter,
@@ -39,7 +39,7 @@ export class Fdc3InternalApi extends ApiBase {
39
39
  editable: false,
40
40
  width: actionColumnConfig.width,
41
41
  resizable: actionColumnConfig.resizable,
42
- suppressMenu: true,
42
+ suppressHeaderMenuButton: true,
43
43
  suppressMovable: !actionColumnConfig.movable,
44
44
  filter: false,
45
45
  sortable: false,
@@ -59,7 +59,7 @@ export class Fdc3InternalApi extends ApiBase {
59
59
  editable: false,
60
60
  width: actionColumnConfig.defaultWidth,
61
61
  resizable: true,
62
- suppressMenu: true,
62
+ suppressHeaderMenuButton: true,
63
63
  suppressMovable: false,
64
64
  filter: false,
65
65
  sortable: false,
@@ -43,7 +43,8 @@ export class FreeTextColumnInternalApi extends ApiBase {
43
43
  return references;
44
44
  }
45
45
  getColDefsForFreeTextColumns() {
46
- const defaultFreeTextColumnSettings = CreateEmptyFreeTextColumn().FreeTextColumnSettings;
46
+ const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
47
+ const defaultFreeTextColumnSettings = CreateEmptyFreeTextColumn(defaultSpecialColumnSettings).FreeTextColumnSettings;
47
48
  return this.getFreeTextColumnApi()
48
49
  .getFreeTextColumns()
49
50
  .map((freeTextColumn) => {
@@ -74,7 +75,7 @@ export class FreeTextColumnInternalApi extends ApiBase {
74
75
  enableRowGroup: freeTextColumnSettings.Groupable,
75
76
  sortable: freeTextColumnSettings.Sortable,
76
77
  enablePivot: freeTextColumnSettings.Pivotable,
77
- suppressMenu: freeTextColumnSettings.SuppressMenu,
78
+ suppressHeaderMenuButton: freeTextColumnSettings.SuppressMenu,
78
79
  suppressMovable: freeTextColumnSettings.SuppressMovable,
79
80
  cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
80
81
  ? 'agLargeTextCellEditor'
@@ -10,6 +10,7 @@ import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
10
10
  import { EditLookUpPermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
11
11
  import { DistinctValuesParams } from '../../AdaptableInterfaces/IAdaptable';
12
12
  import { AdaptableColumnType } from '../../PredefinedConfig/Common/Types';
13
+ import { SpecialColumnSettings } from '../../PredefinedConfig/Common/SpecialColumnSettings';
13
14
  export declare class GridInternalApi extends ApiBase {
14
15
  /**
15
16
  * Fires Grid Sorted Event
@@ -96,4 +97,5 @@ export declare class GridInternalApi extends ApiBase {
96
97
  };
97
98
  getAlertRowClass(params: RowClassParams): string | null;
98
99
  getRowHighlightClass(params: RowClassParams): string | null;
100
+ deriveSpecialColumnSettingsFromAgGridDefaultColDef(): Partial<SpecialColumnSettings>;
99
101
  }
@@ -404,4 +404,19 @@ export class GridInternalApi extends ApiBase {
404
404
  ? highlightRow.highlightStyle.ClassName
405
405
  : null;
406
406
  }
407
+ deriveSpecialColumnSettingsFromAgGridDefaultColDef() {
408
+ const defaultColumnDefinition = this.adaptable.agGridAdapter.getDefaultColumnDefinition();
409
+ return {
410
+ Filterable: defaultColumnDefinition.filter,
411
+ Resizable: defaultColumnDefinition.resizable,
412
+ Groupable: defaultColumnDefinition.enableRowGroup,
413
+ Sortable: defaultColumnDefinition.sortable,
414
+ Pivotable: defaultColumnDefinition.enablePivot,
415
+ Aggregatable: defaultColumnDefinition.enableValue,
416
+ SuppressMenu: defaultColumnDefinition.suppressHeaderMenuButton,
417
+ SuppressMovable: defaultColumnDefinition.suppressMovable,
418
+ HeaderToolTip: defaultColumnDefinition.headerTooltip,
419
+ Width: defaultColumnDefinition.width,
420
+ };
421
+ }
407
422
  }
@@ -6,11 +6,11 @@ import { CellAddress } from '../../types';
6
6
  export interface NoteApi {
7
7
  /**
8
8
  * Adds a new Note
9
- * @param note
9
+ * @param text
10
10
  * @param primaryKeyValue
11
11
  * @param columnId
12
12
  */
13
- addNote(note: string, primaryKeyValue: any, columnId: string): void;
13
+ addNote(text: string, primaryKeyValue: any, columnId: string): void;
14
14
  /**
15
15
  * Edits a Note
16
16
  * @param note
@@ -18,10 +18,10 @@ export interface NoteApi {
18
18
  editNote(note: AdaptableNote): void;
19
19
  /**
20
20
  * Edits text of a Note
21
- * @param notetext
21
+ * @param text
22
22
  * @param note
23
23
  */
24
- updateNoteText(notetext: string, note: AdaptableNote): void;
24
+ updateNoteText(text: string, note: AdaptableNote): void;
25
25
  /**
26
26
  * Deletes a Note
27
27
  * @param note
@@ -39,7 +39,7 @@ export interface NoteApi {
39
39
  * Gets all Notes for a cell
40
40
  * @param CellAddress note position
41
41
  */
42
- getCellNotes(CellAddress: CellAddress): AdaptableNote[];
42
+ getNotesForCell(CellAddress: CellAddress): AdaptableNote[];
43
43
  /**
44
44
  * Returns a Note by uuid
45
45
  * @param uuid note uuid
@@ -143,8 +143,8 @@ export interface OptionsApi {
143
143
  */
144
144
  getFormatColumnOptions(): Readonly<FormatColumnOptions>;
145
145
  /**
146
- * Returns `AdaptableOptions.noteOptions`
147
- */
146
+ * Returns `AdaptableOptions.noteOptions`
147
+ */
148
148
  getNoteOptions(): Readonly<NoteOptions>;
149
149
  /**
150
150
  * Returns `AdaptableOptions.settingsPanelOptions`
@@ -1,6 +1,5 @@
1
1
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
2
2
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
3
- import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
4
3
  import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../AdaptableOptions/UserInterfaceOptions';
5
4
  import { GridCell } from '../PredefinedConfig/Selection/GridCell';
6
5
  import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
@@ -54,16 +53,6 @@ export interface UserInterfaceApi {
54
53
  * @param gridCell: the currently edited Grid Cell
55
54
  */
56
55
  getEditLookUpValuesForEditLookUpItem(editLookUpItem: EditLookUpPermittedValues, gridCell: GridCell): any[] | undefined;
57
- /**
58
- * Adds menu item to Column Menu
59
- * @param userMenuItem Menu Item to add
60
- */
61
- addColumnMenuItem(userMenuItem: UserMenuItem<ColumnMenuContext>): void;
62
- /**
63
- * Adds menu item to Context Menu
64
- * @param userMenuItem Menu Item to add
65
- */
66
- addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
67
56
  /**
68
57
  * Returns Style set for Editable cells
69
58
  */
@@ -57,7 +57,7 @@ export interface AdaptablePersistentState {
57
57
  Theme: ThemeState;
58
58
  ToolPanel: ToolPanelState;
59
59
  Charting: ChartingState;
60
- Notes: NoteState;
60
+ Note: NoteState;
61
61
  /**
62
62
  * @deprecated
63
63
  */
@@ -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
  */