@adaptabletools/adaptable 18.0.0-canary.22 → 18.0.0-canary.24

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 (47) hide show
  1. package/base.css +2 -0
  2. package/base.css.map +1 -1
  3. package/index.css +4 -0
  4. package/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
  7. package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
  8. package/src/AdaptableOptions/CommentOptions.d.ts +3 -3
  9. package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/GroupingOptions.d.ts +0 -15
  11. package/src/AdaptableOptions/StateOptions.d.ts +1 -1
  12. package/src/Api/ColumnApi.d.ts +4 -0
  13. package/src/Api/CommentApi.d.ts +12 -13
  14. package/src/Api/GridApi.d.ts +4 -0
  15. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  16. package/src/Api/Implementation/ColumnApiImpl.js +7 -0
  17. package/src/Api/Implementation/CommentsApiImpl.d.ts +3 -3
  18. package/src/Api/Implementation/CommentsApiImpl.js +5 -5
  19. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  20. package/src/Api/Implementation/GridApiImpl.js +3 -0
  21. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
  22. package/src/Api/Implementation/LayoutApiImpl.js +3 -0
  23. package/src/Api/LayoutApi.d.ts +4 -0
  24. package/src/PredefinedConfig/Common/Menu.d.ts +2 -2
  25. package/src/PredefinedConfig/Common/Menu.js +9 -2
  26. package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
  27. package/src/Redux/ActionsReducers/CommentsRedux.js +0 -34
  28. package/src/Redux/Store/AdaptableStore.js +4 -4
  29. package/src/Strategy/ColumnFilterModule.js +2 -2
  30. package/src/Strategy/CommentModule.d.ts +0 -1
  31. package/src/Strategy/CommentModule.js +7 -7
  32. package/src/Strategy/DashboardModule.js +1 -1
  33. package/src/Strategy/ExportModule.js +1 -1
  34. package/src/Strategy/Fdc3Module.js +1 -1
  35. package/src/Strategy/FormatColumnModule.js +2 -2
  36. package/src/Strategy/StyledColumnModule.js +1 -1
  37. package/src/View/Comments/CommentsEditor.js +4 -6
  38. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -1
  39. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  40. package/src/View/Note/NotePopup.js +2 -2
  41. package/src/agGrid/AdaptableAgGrid.d.ts +1 -10
  42. package/src/agGrid/AdaptableAgGrid.js +11 -41
  43. package/src/env.js +2 -2
  44. package/src/metamodel/adaptable.metamodel.d.ts +0 -10
  45. package/src/metamodel/adaptable.metamodel.js +1 -1
  46. package/src/types.d.ts +1 -1
  47. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -8,14 +8,14 @@ export interface CommentOptions<TData = any> {
8
8
  */
9
9
  isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
10
10
  /**
11
- * Loads Comments
11
+ * Loads the Comment Threads
12
12
  */
13
13
  loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
14
14
  /**
15
- * Saves changed Comments
15
+ * Persists the current Comment Threads
16
16
  * @param commentThreads
17
17
  */
18
- persistCommentThreads?(commentThreads: CommentThread[]): void;
18
+ persistCommentThreads?(commentThreads: CommentThread[]): Promise<void>;
19
19
  /**
20
20
  * Format string for formatting in the Comments Popup
21
21
  *
@@ -5,7 +5,7 @@ import { IRowNode } from '@ag-grid-community/core';
5
5
  */
6
6
  export interface DataImportOptions<T = Record<string, any>> {
7
7
  /**
8
- * File extensions that the Data Import function accepts
8
+ * Custom File Handlers to use for Data Import
9
9
  */
10
10
  fileHandlers?: DataImportFileHandler<T>[];
11
11
  /**
@@ -60,7 +60,7 @@ export interface DataImportFileHandler<T = Record<string, any>> {
60
60
  */
61
61
  fileExtension?: string;
62
62
  /**
63
- * Function which handles the File
63
+ * Async function which handles the import returning a Data Record
64
64
  */
65
65
  handleFile: (file: File) => Promise<T[]>;
66
66
  }
@@ -1,5 +1,3 @@
1
- import { AdaptableColumn, BaseContext } from '../../types';
2
- import { KeyCreatorParams } from '@ag-grid-community/core';
3
1
  /**
4
2
  * Options for managing Row and Column Groups in AdapTable
5
3
  */
@@ -19,16 +17,3 @@ export interface GroupingOptions<TData = any> {
19
17
  */
20
18
  autoOrderGroupedColumns?: boolean;
21
19
  }
22
- /**
23
- * Context used when setting a value for Balanced Row Groups
24
- */
25
- export interface BalancedGroupsKeyContext<TData = any> extends BaseContext {
26
- /**
27
- * AdapTable Column being grouped
28
- */
29
- adaptableColumn: AdaptableColumn<TData>;
30
- /**
31
- * AG Grid's Key Creator Params
32
- */
33
- params: KeyCreatorParams<TData>;
34
- }
@@ -34,7 +34,7 @@ export interface StateOptions {
34
34
  */
35
35
  debounceStateDelay?: number;
36
36
  /**
37
- * Automatically migrate the state from the previous version of Adaptable to the current version.
37
+ * Automatically migrate State from previous AdapTable version to current one
38
38
  *
39
39
  * @defaultValue true
40
40
  */
@@ -271,4 +271,8 @@ export interface ColumnApi {
271
271
  * @param columnType the columnType to filter by
272
272
  */
273
273
  getColumnsByColumnType(columnType: string): AdaptableColumn[];
274
+ /**
275
+ * Returns all columns currently Row Grouped
276
+ */
277
+ getRowGroupedColumns(): AdaptableColumn[];
274
278
  }
@@ -24,34 +24,33 @@ export interface CommentApi {
24
24
  */
25
25
  deleteComment(comment: AdaptableComment, cellAddress: CellAddress): void;
26
26
  /**
27
- * Get Comments for a particular cell
28
- * @param CellAddress
27
+ * Create a new Comment Thread
28
+ *
29
+ * @param commentThread
29
30
  */
30
- getComments(cellAddress: CellAddress): AdaptableComment[];
31
+ addCommentThread(commentThread: CommentThread): void;
31
32
  /**
32
33
  * Delete all Comments for a particular cell
33
34
  * @param cellAddress
34
35
  */
35
36
  deleteCommentThread(cellAddress: CellAddress): void;
36
37
  /**
37
- * Return all Comments for a particular cell
38
+ * Return the Comment Thread for a particular cell
38
39
  * @param cellAddress
39
40
  */
40
41
  getCommentThread(cellAddress: CellAddress): CommentThread | undefined;
41
42
  /**
42
- * Return all Comment Threads
43
+ * Return all Comment Threads in the grid
43
44
  */
44
- getCommentThreads(): CommentThread[];
45
+ getGridComments(): CommentThread[];
45
46
  /**
46
- * Create a new Comment Thread
47
+ * Sets the Comment Threads in the grid
47
48
  *
48
- * @param commentThread
49
+ * @param commentThreads new cell comments
49
50
  */
50
- addCommentThread(commentThread: CommentThread): void;
51
+ setGridComments(commentThreads: CommentThread[]): void;
51
52
  /**
52
- * Load all Comment Threads
53
- *
54
- * @param commentThreads new cell comments
53
+ * Clear all Comment Threads in the grid
55
54
  */
56
- loadCommentThreads(commentThreads: CommentThread[]): void;
55
+ clearGridComments(): void;
57
56
  }
@@ -366,6 +366,10 @@ export interface GridApi {
366
366
  * Whether Grid is currently showing Row Groups
367
367
  */
368
368
  isGridRowGrouped(): boolean;
369
+ /**
370
+ * Whether Grid is currently in Pivot Mode
371
+ */
372
+ isGridInPivotMode(): boolean;
369
373
  /**
370
374
  * Whether given Row Node is a Row Group
371
375
  * @param rowNode Node to check
@@ -67,4 +67,5 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
67
67
  openColumnInfoSettingsPanel(): void;
68
68
  getColumnTypes(): string[];
69
69
  getColumnsByColumnType(columnType: string): AdaptableColumn[];
70
+ getRowGroupedColumns(): AdaptableColumn[];
70
71
  }
@@ -356,4 +356,11 @@ export class ColumnApiImpl extends ApiBase {
356
356
  return ((_a = c.columnTypes) !== null && _a !== void 0 ? _a : []).includes(columnType);
357
357
  });
358
358
  }
359
+ getRowGroupedColumns() {
360
+ var _a;
361
+ return (_a = this.getLayoutApi()
362
+ .getCurrentRowGroupsColumnIds()) === null || _a === void 0 ? void 0 : _a.map((n) => {
363
+ return this.getColumnWithColumnId(n);
364
+ });
365
+ }
359
366
  }
@@ -6,13 +6,13 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
6
6
  export declare class CommentsApiImpl extends ApiBase implements CommentApi {
7
7
  internalApi: CommentsInternalApi;
8
8
  constructor(adaptable: IAdaptable);
9
- getComments(address: CellAddress): AdaptableComment[];
10
9
  getCommentThread(address: CellAddress): CommentThread | undefined;
11
- getCommentThreads(): CommentThread[];
10
+ getGridComments(): CommentThread[];
12
11
  editComment(comment: AdaptableComment, address: CellAddress): void;
13
12
  deleteComment(comment: AdaptableComment, address: CellAddress): void;
14
13
  addComment(commentText: AdaptableComment['Value'], address: CellAddress): void;
15
14
  addCommentThread(commentThread: CommentThread): void;
16
15
  deleteCommentThread(cellAddress: CellAddress): void;
17
- loadCommentThreads(cellComments: CommentThread[]): void;
16
+ setGridComments(cellComments: CommentThread[]): void;
17
+ clearGridComments(): void;
18
18
  }
@@ -8,13 +8,10 @@ export class CommentsApiImpl extends ApiBase {
8
8
  super(adaptable);
9
9
  this.internalApi = new CommentsInternalApi(adaptable);
10
10
  }
11
- getComments(address) {
12
- return CommentRedux.GetCommentsSelector(this.getAdaptableState().Comment, address);
13
- }
14
11
  getCommentThread(address) {
15
12
  return CommentRedux.GetCellCommentSelector(this.getAdaptableState().Comment, address);
16
13
  }
17
- getCommentThreads() {
14
+ getGridComments() {
18
15
  var _a;
19
16
  return (_a = this.getAdaptableState().Comment.CommentThreads) !== null && _a !== void 0 ? _a : [];
20
17
  }
@@ -41,7 +38,10 @@ export class CommentsApiImpl extends ApiBase {
41
38
  deleteCommentThread(cellAddress) {
42
39
  this.dispatchAction(CommentRedux.CommentsCellDelete({ cellAddress }));
43
40
  }
44
- loadCommentThreads(cellComments) {
41
+ setGridComments(cellComments) {
45
42
  this.dispatchAction(CommentRedux.CommentsSet({ commentThread: cellComments }));
46
43
  }
44
+ clearGridComments() {
45
+ this.setGridComments([]);
46
+ }
47
47
  }
@@ -95,6 +95,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
95
95
  isGridGroupable(): boolean;
96
96
  isGridSelectable(): boolean;
97
97
  isGridRowGrouped(): boolean;
98
+ isGridInPivotMode(): boolean;
98
99
  isGroupRowNode(rowNode: IRowNode): boolean;
99
100
  isQuickFilterAvailable(): boolean;
100
101
  redrawGrid(): void;
@@ -356,6 +356,9 @@ export class GridApiImpl extends ApiBase {
356
356
  isGridRowGrouped() {
357
357
  return this.adaptable.isGridGroupingActive();
358
358
  }
359
+ isGridInPivotMode() {
360
+ return this.getLayoutApi().isCurrentLayoutPivot();
361
+ }
359
362
  isGroupRowNode(rowNode) {
360
363
  return this.adaptable.isGroupRowNode(rowNode);
361
364
  }
@@ -16,6 +16,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
16
16
  [key: string]: boolean;
17
17
  };
18
18
  getCurrentVisibleColumnIds(): string[];
19
+ getCurrentRowGroupsColumnIds(): string[];
19
20
  setLayout(layoutName: string): void;
20
21
  getCurrentLayout(): Layout;
21
22
  getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
@@ -34,6 +34,9 @@ export class LayoutApiImpl extends ApiBase {
34
34
  getCurrentVisibleColumnIds() {
35
35
  return this.getCurrentLayout().Columns;
36
36
  }
37
+ getCurrentRowGroupsColumnIds() {
38
+ return this.getCurrentLayout().RowGroupedColumns;
39
+ }
37
40
  setLayout(layoutName) {
38
41
  if (StringExtensions.IsNotNullOrEmpty(layoutName) &&
39
42
  layoutName !== this.getCurrentLayoutName()) {
@@ -42,6 +42,10 @@ export interface LayoutApi {
42
42
  * Retrieves array of visible ColumnIds in current Layout
43
43
  */
44
44
  getCurrentVisibleColumnIds(): string[];
45
+ /**
46
+ * Retrieves array of visible ColumnIds in current Layout
47
+ */
48
+ getCurrentRowGroupsColumnIds(): string[];
45
49
  /**
46
50
  * Retrieves name of current Layout
47
51
  */
@@ -10,11 +10,11 @@ export type AdaptableContextMenuItemName = (typeof ADAPTABLE_CONTEXT_MENU_ITEMS)
10
10
  /**
11
11
  * List of Shipped Adaptable Column Menu Items
12
12
  */
13
- export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal", "parent"];
13
+ export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-parent", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-parent", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-parent", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-parent", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal"];
14
14
  /**
15
15
  * List of Shipped Adaptable Context Menu Items
16
16
  */
17
- export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
17
+ export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-parent", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-parent", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-parent", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-parent", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
18
18
  /**
19
19
  * Menu item used by Adaptable in both Column and Context Menus
20
20
  */
@@ -4,6 +4,7 @@
4
4
  export const ADAPTABLE_COLUMN_MENU_ITEMS = [
5
5
  'calculated-column-edit',
6
6
  'cell-summary-show',
7
+ 'column-filter-parent',
7
8
  'column-filter-bar-hide',
8
9
  'column-filter-bar-show',
9
10
  'column-filter-clear',
@@ -13,6 +14,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
13
14
  'column-info-show',
14
15
  'custom-sort-add',
15
16
  'custom-sort-edit',
17
+ 'dashboard-parent',
16
18
  'dashboard-collapse',
17
19
  'dashboard-configure',
18
20
  'dashboard-dock',
@@ -23,6 +25,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
23
25
  'data-import',
24
26
  'flashing-cell-add',
25
27
  'flashing-cell-delete',
28
+ 'format-column-parent',
26
29
  'format-column-add',
27
30
  'format-column-edit',
28
31
  'free-text-column-edit',
@@ -38,6 +41,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
38
41
  'layout-select-all',
39
42
  'plus-minus-add',
40
43
  'settings-panel-open',
44
+ 'styled-column-parent',
41
45
  'styled-column-badge-add',
42
46
  'styled-column-badge-edit',
43
47
  'styled-column-gradient-add',
@@ -47,8 +51,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
47
51
  'styled-column-sparkline-add',
48
52
  'styled-column-sparkline-edit',
49
53
  'system-status-show',
50
- 'internal',
51
- 'parent',
54
+ 'internal', // used by AdapTable in Settings Panel
52
55
  ];
53
56
  /**
54
57
  * List of Shipped Adaptable Context Menu Items
@@ -58,6 +61,7 @@ export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
58
61
  'bulk-update-apply',
59
62
  'calculated-column-edit',
60
63
  'cell-summary-show',
64
+ 'column-filter-parent',
61
65
  'column-filter-on-cell-value',
62
66
  'column-filter-clear',
63
67
  'column-filter-suspend',
@@ -65,6 +69,7 @@ export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
65
69
  'column-info-show',
66
70
  'comment-add',
67
71
  'comment-remove',
72
+ 'dashboard-parent',
68
73
  'dashboard-collapse',
69
74
  'dashboard-configure',
70
75
  'dashboard-dock',
@@ -73,12 +78,14 @@ export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
73
78
  'dashboard-hide',
74
79
  'dashboard-show',
75
80
  'data-import',
81
+ 'export-parent',
76
82
  'export-clipboard',
77
83
  'export-csv',
78
84
  'export-excel',
79
85
  'export-json',
80
86
  'export-table',
81
87
  'export-custom-destination',
88
+ 'fdc3-parent',
82
89
  'fdc3-broadcast',
83
90
  'fdc3-raise-intent',
84
91
  'flashing-cell-clear',
@@ -71,9 +71,5 @@ export declare const CommentsDelete: ({ commentUuid, cellAddress, }: {
71
71
  commentUuid: AdaptableComment['Uuid'];
72
72
  cellAddress: CellAddress;
73
73
  }) => AdaptableCommentsDeleteAction;
74
- export declare const CommentsReady: (commentstate: CommentState) => NoteReadyAction;
75
- export declare const GetGridCellCommentsSelector: (state: CommentState, address: CellAddress) => CommentThread;
76
- export declare const GetCommentsSelector: (state: CommentState, address: CellAddress) => AdaptableComment[] | undefined;
77
- export declare const GetGetCommentsByUuidSelector: (state: CommentState, uuid: string) => AdaptableComment | undefined;
78
74
  export declare const GetCellCommentSelector: (state: CommentState, address: CellAddress) => CommentThread | undefined;
79
75
  export declare const CommentsReducer: Redux.Reducer<CommentState>;
@@ -53,40 +53,6 @@ export const CommentsDelete = ({ commentUuid, cellAddress, }) => ({
53
53
  cellAddress,
54
54
  commentUuid,
55
55
  });
56
- export const CommentsReady = (commentstate) => ({
57
- type: COMMENTS_READY,
58
- commentState: commentstate,
59
- });
60
- export const GetGridCellCommentsSelector = (state, address) => {
61
- var _a;
62
- if (!address) {
63
- return null;
64
- }
65
- return ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((cellComments) => {
66
- return CellPopupService.isSameAddress(cellComments, address);
67
- });
68
- };
69
- export const GetCommentsSelector = (state, address) => {
70
- var _a, _b;
71
- if (!address) {
72
- return [];
73
- }
74
- const comments = (_b = ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((cellComments) => {
75
- return CellPopupService.isSameAddress(cellComments, address);
76
- })) === null || _b === void 0 ? void 0 : _b.Comments;
77
- return comments;
78
- };
79
- export const GetGetCommentsByUuidSelector = (state, uuid) => {
80
- var _a;
81
- for (const commentThread of (_a = state.CommentThreads) !== null && _a !== void 0 ? _a : []) {
82
- for (const comment of commentThread.Comments) {
83
- if (comment.Uuid === uuid) {
84
- return comment;
85
- }
86
- }
87
- }
88
- return undefined;
89
- };
90
56
  export const GetCellCommentSelector = (state, address) => {
91
57
  var _a;
92
58
  if (!address) {
@@ -906,8 +906,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
906
906
  adaptable.refreshCells([node], [columnId], true);
907
907
  requestAnimationFrame(() => {
908
908
  var _a, _b;
909
- const commentThreads = adaptable.api.commentApi.getCommentThreads();
910
- adaptable.api.eventApi.emit('CommentChanged', adaptable.api.commentApi.getCommentThreads());
909
+ const commentThreads = adaptable.api.commentApi.getGridComments();
910
+ adaptable.api.eventApi.emit('CommentChanged', adaptable.api.commentApi.getGridComments());
911
911
  (_b = (_a = adaptable.api.optionsApi
912
912
  .getCommentOptions()) === null || _a === void 0 ? void 0 : _a.persistCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, commentThreads);
913
913
  });
@@ -915,9 +915,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
915
915
  return returnAction;
916
916
  }
917
917
  case CommentsRedux.COMMENTS_LOAD: {
918
- const previousCommentThreads = adaptable.api.commentApi.getCommentThreads();
918
+ const previousCommentThreads = adaptable.api.commentApi.getGridComments();
919
919
  let returnAction = next(action);
920
- const newCommentThreads = (_j = adaptable.api.commentApi.getCommentThreads()) !== null && _j !== void 0 ? _j : [];
920
+ const newCommentThreads = (_j = adaptable.api.commentApi.getGridComments()) !== null && _j !== void 0 ? _j : [];
921
921
  requestAnimationFrame(() => {
922
922
  let addedCommentThreads = [];
923
923
  let deletedCommentThreads = [];
@@ -63,7 +63,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
63
63
  if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
64
64
  return [
65
65
  {
66
- name: 'parent',
66
+ name: 'column-filter-parent',
67
67
  label: this.moduleInfo.FriendlyName,
68
68
  isVisible: true,
69
69
  module: this.moduleInfo.ModuleName,
@@ -111,7 +111,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
111
111
  }));
112
112
  return [
113
113
  {
114
- name: 'parent',
114
+ name: 'column-filter-parent',
115
115
  label: this.moduleInfo.FriendlyName,
116
116
  isVisible: true,
117
117
  module: this.moduleInfo.ModuleName,
@@ -3,7 +3,6 @@ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Commo
3
3
  import { AdaptableModuleBase } from './AdaptableModuleBase';
4
4
  import { IModule } from './Interface/IModule';
5
5
  export declare class CommentModule extends AdaptableModuleBase implements IModule {
6
- private adaptable;
7
6
  constructor(api: AdaptableApi);
8
7
  onAdaptableReady(): void;
9
8
  isModuleAvailable(): boolean;
@@ -22,7 +22,7 @@ export class CommentModule extends AdaptableModuleBase {
22
22
  var _a, _b;
23
23
  const commentThreads = await ((_b = (_a = this.api.optionsApi
24
24
  .getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, createBaseContext(this.api)));
25
- this.api.commentApi.loadCommentThreads(commentThreads);
25
+ this.api.commentApi.setGridComments(commentThreads);
26
26
  }
27
27
  addContextMenuItems(menuContext) {
28
28
  var _a, _b;
@@ -38,17 +38,17 @@ export class CommentModule extends AdaptableModuleBase {
38
38
  return items;
39
39
  }
40
40
  getAddRemoveCommentsMenuItems(menuContext) {
41
+ var _a;
41
42
  const items = [];
42
- // does not have note
43
+ if (!this.api.commentApi.internalApi.areCommentsAvailable()) {
44
+ return items;
45
+ }
43
46
  const cellAddress = {
44
47
  PrimaryKeyValue: menuContext.primaryKeyValue,
45
48
  ColumnId: menuContext.adaptableColumn.columnId,
46
49
  };
47
- const comments = this.api.commentApi.getComments(cellAddress);
48
- if (!this.api.commentApi.internalApi.areCommentsAvailable()) {
49
- return items;
50
- }
51
- if (comments) {
50
+ const cellComments = (_a = this.api.commentApi.getCommentThread(cellAddress)) === null || _a === void 0 ? void 0 : _a.Comments;
51
+ if (cellComments) {
52
52
  items.push(this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
53
53
  this.api.commentApi.deleteCommentThread(cellAddress);
54
54
  }));
@@ -49,7 +49,7 @@ export class DashboardModule extends AdaptableModuleBase {
49
49
  }
50
50
  return [
51
51
  {
52
- name: 'parent',
52
+ name: 'dashboard-parent',
53
53
  label: this.moduleInfo.FriendlyName,
54
54
  isVisible: true,
55
55
  module: this.moduleInfo.ModuleName,
@@ -95,7 +95,7 @@ export class ExportModule extends AdaptableModuleBase {
95
95
  }
96
96
  buildExportMenuItem(label, subItems) {
97
97
  return {
98
- name: 'parent',
98
+ name: 'export-parent',
99
99
  label: label,
100
100
  module: this.moduleInfo.ModuleName,
101
101
  isVisible: true,
@@ -27,7 +27,7 @@ export class Fdc3Module extends AdaptableModuleBase {
27
27
  contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
28
28
  if (contextMenuItems.length > 1) {
29
29
  const groupMenuItem = {
30
- name: 'parent',
30
+ name: 'fdc3-parent',
31
31
  module: this.moduleInfo.ModuleName,
32
32
  label: 'FDC3',
33
33
  icon: {
@@ -62,7 +62,7 @@ export class FormatColumnModule extends AdaptableModuleBase {
62
62
  };
63
63
  const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
64
64
  returnColumnMenuItems.push({
65
- name: 'parent',
65
+ name: 'format-column-parent',
66
66
  label: 'Format Column',
67
67
  module: this.moduleInfo.ModuleName,
68
68
  isVisible: true,
@@ -79,7 +79,7 @@ export class FormatColumnModule extends AdaptableModuleBase {
79
79
  .getModuleInfoByModule('FormatColumn');
80
80
  const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
81
81
  returnColumnMenuItems.push({
82
- name: 'parent',
82
+ name: 'format-column-parent',
83
83
  label: 'Format Column',
84
84
  module: this.moduleInfo.ModuleName,
85
85
  isVisible: true,
@@ -117,7 +117,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
117
117
  defaultCurrentSectionName: 'Style',
118
118
  } }));
119
119
  returnColumnMenuItems.push({
120
- name: 'parent',
120
+ name: 'styled-column-parent',
121
121
  label: 'Create Styled Column',
122
122
  module: this.moduleInfo.ModuleName,
123
123
  isVisible: true,
@@ -62,13 +62,11 @@ export const CommentsEditor = (props) => {
62
62
  const isOwnComment = ((_a = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _a === void 0 ? void 0 : _a.UserName)
63
63
  ? ((_b = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _b === void 0 ? void 0 : _b.UserName) === userId
64
64
  : true; // no owner means it's the current user
65
- return (React.createElement(Box, { p: 2, key: (_c = comment.Uuid) !== null && _c !== void 0 ? _c : index, style: {
66
- borderBottom: '1px solid var(--ab-color-primarydark)',
67
- } },
65
+ return (React.createElement(Box, { p: 2, key: (_c = comment.Uuid) !== null && _c !== void 0 ? _c : index, className: "ab-Comment" },
68
66
  React.createElement(Flex, { mb: 2, alignItems: "center" },
69
67
  React.createElement(Box, null,
70
- React.createElement(Box, { fontSize: 3, fontWeight: "bold" }, (_d = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _d === void 0 ? void 0 : _d.UserName),
71
- comment.Timestamp && (React.createElement(Box, { fontSize: 2 }, formatDate(comment.Timestamp, 'MM.DD.YYYY HH:mm')))),
68
+ React.createElement(Box, { "data-name": "comment-username", fontSize: 3, fontWeight: "bold" }, (_d = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _d === void 0 ? void 0 : _d.UserName),
69
+ comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 }, formatDate(comment.Timestamp, 'MM.DD.YYYY HH:mm')))),
72
70
  React.createElement(Box, { flex: 1 }),
73
71
  React.createElement(SimpleButton, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }),
74
72
  React.createElement(SimpleButton, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
@@ -83,7 +81,7 @@ export const CommentsEditor = (props) => {
83
81
  }
84
82
  }, onChange: (event) => {
85
83
  adaptable.api.commentApi.editComment(Object.assign(Object.assign({}, comment), { Value: event.target.value }), cellAddress);
86
- } })) : (React.createElement(Text, null, comment.Value)))));
84
+ } })) : (React.createElement(Text, { "data-name": "comment-text" }, comment.Value)))));
87
85
  })),
88
86
  React.createElement(AdaptableInput, { autoFocus: !comments || comments.length === 0, value: newCommentText, disabled: isReadOnlyModule, onChange: (event) => {
89
87
  setNewCommentText(event.target.value);
@@ -20,7 +20,7 @@ export const useMenuItems = () => {
20
20
  item.module !== 'CustomSettingsPanel' &&
21
21
  !STANDALONE_MODULE_POPUPS.includes(item.module) &&
22
22
  item.isVisible);
23
- return navigationItems
23
+ let navItems = navigationItems
24
24
  .map((moduleName) => {
25
25
  var _a, _b;
26
26
  if (moduleName === '-') {
@@ -40,5 +40,13 @@ export const useMenuItems = () => {
40
40
  return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
41
41
  })
42
42
  .filter(Boolean);
43
+ // remove sequential '-' items
44
+ navItems = navItems.filter((item, index) => {
45
+ if (item === '-' && navItems[index - 1] === '-') {
46
+ return false;
47
+ }
48
+ return true;
49
+ });
50
+ return navItems;
43
51
  }, [allMenuItems]);
44
52
  };
@@ -52,7 +52,7 @@ export const FilterSection = (props) => {
52
52
  React.createElement(Tabs.Content, null,
53
53
  React.createElement(FormLayout, { mb: 2 },
54
54
  React.createElement(FormRow, { label: "Add Column Filter" },
55
- React.createElement(ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select column to create filter", onChange: (option) => {
55
+ React.createElement(ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select Column to create Filter", onChange: (option) => {
56
56
  props.onChange(Object.assign(Object.assign({}, layout), { ColumnFilters: [
57
57
  ...layoutFilters,
58
58
  {
@@ -15,10 +15,10 @@ const tableDOMProps = {
15
15
  },
16
16
  };
17
17
  export const NotePopup = (props) => {
18
- var _a;
18
+ var _a, _b, _c, _d;
19
19
  const adaptable = useAdaptable();
20
20
  const primaryKeyHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId);
21
- const dateFormat = (_a = adaptable.api.optionsApi.getNoteOptions().dateFormat) !== null && _a !== void 0 ? _a : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
21
+ const dateFormat = (_d = (_c = (_b = (_a = adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.dateFormat) !== null && _d !== void 0 ? _d : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
22
22
  const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
23
23
  const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
24
24
  const columnsMap = React.useMemo(() => {