@adaptabletools/adaptable-cjs 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.
- package/base.css +2 -0
- package/base.css.map +1 -1
- package/index.css +4 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/CommentOptions.d.ts +3 -3
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -15
- package/src/AdaptableOptions/StateOptions.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/CommentApi.d.ts +12 -13
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +7 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +3 -3
- package/src/Api/Implementation/CommentsApiImpl.js +5 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +3 -0
- package/src/Api/LayoutApi.d.ts +4 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.js +9 -2
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +1 -39
- package/src/Redux/Store/AdaptableStore.js +4 -4
- package/src/Strategy/ColumnFilterModule.js +2 -2
- package/src/Strategy/CommentModule.d.ts +0 -1
- package/src/Strategy/CommentModule.js +7 -7
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/Fdc3Module.js +1 -1
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/StyledColumnModule.js +1 -1
- package/src/View/Comments/CommentsEditor.js +4 -6
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Note/NotePopup.js +2 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -10
- package/src/agGrid/AdaptableAgGrid.js +11 -41
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -8,14 +8,14 @@ export interface CommentOptions<TData = any> {
|
|
|
8
8
|
*/
|
|
9
9
|
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
|
|
10
10
|
/**
|
|
11
|
-
* Loads
|
|
11
|
+
* Loads the Comment Threads
|
|
12
12
|
*/
|
|
13
13
|
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
37
|
+
* Automatically migrate State from previous AdapTable version to current one
|
|
38
38
|
*
|
|
39
39
|
* @defaultValue true
|
|
40
40
|
*/
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -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
|
}
|
package/src/Api/CommentApi.d.ts
CHANGED
|
@@ -24,34 +24,33 @@ export interface CommentApi {
|
|
|
24
24
|
*/
|
|
25
25
|
deleteComment(comment: AdaptableComment, cellAddress: CellAddress): void;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* Create a new Comment Thread
|
|
28
|
+
*
|
|
29
|
+
* @param commentThread
|
|
29
30
|
*/
|
|
30
|
-
|
|
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
|
|
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
|
-
|
|
45
|
+
getGridComments(): CommentThread[];
|
|
45
46
|
/**
|
|
46
|
-
*
|
|
47
|
+
* Sets the Comment Threads in the grid
|
|
47
48
|
*
|
|
48
|
-
* @param
|
|
49
|
+
* @param commentThreads new cell comments
|
|
49
50
|
*/
|
|
50
|
-
|
|
51
|
+
setGridComments(commentThreads: CommentThread[]): void;
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* @param commentThreads new cell comments
|
|
53
|
+
* Clear all Comment Threads in the grid
|
|
55
54
|
*/
|
|
56
|
-
|
|
55
|
+
clearGridComments(): void;
|
|
57
56
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -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
|
|
@@ -362,5 +362,12 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
362
362
|
return ((_a = c.columnTypes) !== null && _a !== void 0 ? _a : []).includes(columnType);
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
+
getRowGroupedColumns() {
|
|
366
|
+
var _a;
|
|
367
|
+
return (_a = this.getLayoutApi()
|
|
368
|
+
.getCurrentRowGroupsColumnIds()) === null || _a === void 0 ? void 0 : _a.map((n) => {
|
|
369
|
+
return this.getColumnWithColumnId(n);
|
|
370
|
+
});
|
|
371
|
+
}
|
|
365
372
|
}
|
|
366
373
|
exports.ColumnApiImpl = ColumnApiImpl;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
16
|
+
setGridComments(cellComments: CommentThread[]): void;
|
|
17
|
+
clearGridComments(): void;
|
|
18
18
|
}
|
|
@@ -12,13 +12,10 @@ class CommentsApiImpl extends ApiBase_1.ApiBase {
|
|
|
12
12
|
super(adaptable);
|
|
13
13
|
this.internalApi = new CommentsInternalApi_1.CommentsInternalApi(adaptable);
|
|
14
14
|
}
|
|
15
|
-
getComments(address) {
|
|
16
|
-
return CommentRedux.GetCommentsSelector(this.getAdaptableState().Comment, address);
|
|
17
|
-
}
|
|
18
15
|
getCommentThread(address) {
|
|
19
16
|
return CommentRedux.GetCellCommentSelector(this.getAdaptableState().Comment, address);
|
|
20
17
|
}
|
|
21
|
-
|
|
18
|
+
getGridComments() {
|
|
22
19
|
var _a;
|
|
23
20
|
return (_a = this.getAdaptableState().Comment.CommentThreads) !== null && _a !== void 0 ? _a : [];
|
|
24
21
|
}
|
|
@@ -45,8 +42,11 @@ class CommentsApiImpl extends ApiBase_1.ApiBase {
|
|
|
45
42
|
deleteCommentThread(cellAddress) {
|
|
46
43
|
this.dispatchAction(CommentRedux.CommentsCellDelete({ cellAddress }));
|
|
47
44
|
}
|
|
48
|
-
|
|
45
|
+
setGridComments(cellComments) {
|
|
49
46
|
this.dispatchAction(CommentRedux.CommentsSet({ commentThread: cellComments }));
|
|
50
47
|
}
|
|
48
|
+
clearGridComments() {
|
|
49
|
+
this.setGridComments([]);
|
|
50
|
+
}
|
|
51
51
|
}
|
|
52
52
|
exports.CommentsApiImpl = CommentsApiImpl;
|
|
@@ -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;
|
|
@@ -360,6 +360,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
360
360
|
isGridRowGrouped() {
|
|
361
361
|
return this.adaptable.isGridGroupingActive();
|
|
362
362
|
}
|
|
363
|
+
isGridInPivotMode() {
|
|
364
|
+
return this.getLayoutApi().isCurrentLayoutPivot();
|
|
365
|
+
}
|
|
363
366
|
isGroupRowNode(rowNode) {
|
|
364
367
|
return this.adaptable.isGroupRowNode(rowNode);
|
|
365
368
|
}
|
|
@@ -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;
|
|
@@ -38,6 +38,9 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
38
38
|
getCurrentVisibleColumnIds() {
|
|
39
39
|
return this.getCurrentLayout().Columns;
|
|
40
40
|
}
|
|
41
|
+
getCurrentRowGroupsColumnIds() {
|
|
42
|
+
return this.getCurrentLayout().RowGroupedColumns;
|
|
43
|
+
}
|
|
41
44
|
setLayout(layoutName) {
|
|
42
45
|
if (StringExtensions_1.default.IsNotNullOrEmpty(layoutName) &&
|
|
43
46
|
layoutName !== this.getCurrentLayoutName()) {
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -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"
|
|
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
|
*/
|
|
@@ -7,6 +7,7 @@ exports.ADAPTABLE_CONTEXT_MENU_ITEMS = exports.ADAPTABLE_COLUMN_MENU_ITEMS = voi
|
|
|
7
7
|
exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
8
8
|
'calculated-column-edit',
|
|
9
9
|
'cell-summary-show',
|
|
10
|
+
'column-filter-parent',
|
|
10
11
|
'column-filter-bar-hide',
|
|
11
12
|
'column-filter-bar-show',
|
|
12
13
|
'column-filter-clear',
|
|
@@ -16,6 +17,7 @@ exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
|
16
17
|
'column-info-show',
|
|
17
18
|
'custom-sort-add',
|
|
18
19
|
'custom-sort-edit',
|
|
20
|
+
'dashboard-parent',
|
|
19
21
|
'dashboard-collapse',
|
|
20
22
|
'dashboard-configure',
|
|
21
23
|
'dashboard-dock',
|
|
@@ -26,6 +28,7 @@ exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
|
26
28
|
'data-import',
|
|
27
29
|
'flashing-cell-add',
|
|
28
30
|
'flashing-cell-delete',
|
|
31
|
+
'format-column-parent',
|
|
29
32
|
'format-column-add',
|
|
30
33
|
'format-column-edit',
|
|
31
34
|
'free-text-column-edit',
|
|
@@ -41,6 +44,7 @@ exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
|
41
44
|
'layout-select-all',
|
|
42
45
|
'plus-minus-add',
|
|
43
46
|
'settings-panel-open',
|
|
47
|
+
'styled-column-parent',
|
|
44
48
|
'styled-column-badge-add',
|
|
45
49
|
'styled-column-badge-edit',
|
|
46
50
|
'styled-column-gradient-add',
|
|
@@ -50,8 +54,7 @@ exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
|
50
54
|
'styled-column-sparkline-add',
|
|
51
55
|
'styled-column-sparkline-edit',
|
|
52
56
|
'system-status-show',
|
|
53
|
-
'internal',
|
|
54
|
-
'parent',
|
|
57
|
+
'internal', // used by AdapTable in Settings Panel
|
|
55
58
|
];
|
|
56
59
|
/**
|
|
57
60
|
* List of Shipped Adaptable Context Menu Items
|
|
@@ -61,6 +64,7 @@ exports.ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
|
61
64
|
'bulk-update-apply',
|
|
62
65
|
'calculated-column-edit',
|
|
63
66
|
'cell-summary-show',
|
|
67
|
+
'column-filter-parent',
|
|
64
68
|
'column-filter-on-cell-value',
|
|
65
69
|
'column-filter-clear',
|
|
66
70
|
'column-filter-suspend',
|
|
@@ -68,6 +72,7 @@ exports.ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
|
68
72
|
'column-info-show',
|
|
69
73
|
'comment-add',
|
|
70
74
|
'comment-remove',
|
|
75
|
+
'dashboard-parent',
|
|
71
76
|
'dashboard-collapse',
|
|
72
77
|
'dashboard-configure',
|
|
73
78
|
'dashboard-dock',
|
|
@@ -76,12 +81,14 @@ exports.ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
|
76
81
|
'dashboard-hide',
|
|
77
82
|
'dashboard-show',
|
|
78
83
|
'data-import',
|
|
84
|
+
'export-parent',
|
|
79
85
|
'export-clipboard',
|
|
80
86
|
'export-csv',
|
|
81
87
|
'export-excel',
|
|
82
88
|
'export-json',
|
|
83
89
|
'export-table',
|
|
84
90
|
'export-custom-destination',
|
|
91
|
+
'fdc3-parent',
|
|
85
92
|
'fdc3-broadcast',
|
|
86
93
|
'fdc3-raise-intent',
|
|
87
94
|
'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>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommentsReducer = exports.GetCellCommentSelector = exports.
|
|
3
|
+
exports.CommentsReducer = exports.GetCellCommentSelector = exports.CommentsDelete = exports.CommentsEdit = exports.CommentsCellDelete = exports.CommentsCellAdd = exports.CommentsAdd = exports.CommentsSet = exports.COMMENTS_LOAD = exports.COMMENTS_READY = exports.COMMENTS_DELETE = exports.COMMENTS_EDIT = exports.COMMENTS_CELL_DELETE = exports.COMMENTS_CELL_ADD = exports.COMMENTS_ADD = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
6
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
@@ -63,44 +63,6 @@ const CommentsDelete = ({ commentUuid, cellAddress, }) => ({
|
|
|
63
63
|
commentUuid,
|
|
64
64
|
});
|
|
65
65
|
exports.CommentsDelete = CommentsDelete;
|
|
66
|
-
const CommentsReady = (commentstate) => ({
|
|
67
|
-
type: exports.COMMENTS_READY,
|
|
68
|
-
commentState: commentstate,
|
|
69
|
-
});
|
|
70
|
-
exports.CommentsReady = CommentsReady;
|
|
71
|
-
const GetGridCellCommentsSelector = (state, address) => {
|
|
72
|
-
var _a;
|
|
73
|
-
if (!address) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
return ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((cellComments) => {
|
|
77
|
-
return CellPopupService_1.CellPopupService.isSameAddress(cellComments, address);
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
exports.GetGridCellCommentsSelector = GetGridCellCommentsSelector;
|
|
81
|
-
const GetCommentsSelector = (state, address) => {
|
|
82
|
-
var _a, _b;
|
|
83
|
-
if (!address) {
|
|
84
|
-
return [];
|
|
85
|
-
}
|
|
86
|
-
const comments = (_b = ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((cellComments) => {
|
|
87
|
-
return CellPopupService_1.CellPopupService.isSameAddress(cellComments, address);
|
|
88
|
-
})) === null || _b === void 0 ? void 0 : _b.Comments;
|
|
89
|
-
return comments;
|
|
90
|
-
};
|
|
91
|
-
exports.GetCommentsSelector = GetCommentsSelector;
|
|
92
|
-
const GetGetCommentsByUuidSelector = (state, uuid) => {
|
|
93
|
-
var _a;
|
|
94
|
-
for (const commentThread of (_a = state.CommentThreads) !== null && _a !== void 0 ? _a : []) {
|
|
95
|
-
for (const comment of commentThread.Comments) {
|
|
96
|
-
if (comment.Uuid === uuid) {
|
|
97
|
-
return comment;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return undefined;
|
|
102
|
-
};
|
|
103
|
-
exports.GetGetCommentsByUuidSelector = GetGetCommentsByUuidSelector;
|
|
104
66
|
const GetCellCommentSelector = (state, address) => {
|
|
105
67
|
var _a;
|
|
106
68
|
if (!address) {
|
|
@@ -913,8 +913,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
913
913
|
adaptable.refreshCells([node], [columnId], true);
|
|
914
914
|
requestAnimationFrame(() => {
|
|
915
915
|
var _a, _b;
|
|
916
|
-
const commentThreads = adaptable.api.commentApi.
|
|
917
|
-
adaptable.api.eventApi.emit('CommentChanged', adaptable.api.commentApi.
|
|
916
|
+
const commentThreads = adaptable.api.commentApi.getGridComments();
|
|
917
|
+
adaptable.api.eventApi.emit('CommentChanged', adaptable.api.commentApi.getGridComments());
|
|
918
918
|
(_b = (_a = adaptable.api.optionsApi
|
|
919
919
|
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.persistCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, commentThreads);
|
|
920
920
|
});
|
|
@@ -922,9 +922,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
922
922
|
return returnAction;
|
|
923
923
|
}
|
|
924
924
|
case CommentsRedux.COMMENTS_LOAD: {
|
|
925
|
-
const previousCommentThreads = adaptable.api.commentApi.
|
|
925
|
+
const previousCommentThreads = adaptable.api.commentApi.getGridComments();
|
|
926
926
|
let returnAction = next(action);
|
|
927
|
-
const newCommentThreads = (_j = adaptable.api.commentApi.
|
|
927
|
+
const newCommentThreads = (_j = adaptable.api.commentApi.getGridComments()) !== null && _j !== void 0 ? _j : [];
|
|
928
928
|
requestAnimationFrame(() => {
|
|
929
929
|
let addedCommentThreads = [];
|
|
930
930
|
let deletedCommentThreads = [];
|
|
@@ -67,7 +67,7 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
67
67
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
68
68
|
return [
|
|
69
69
|
{
|
|
70
|
-
name: 'parent',
|
|
70
|
+
name: 'column-filter-parent',
|
|
71
71
|
label: this.moduleInfo.FriendlyName,
|
|
72
72
|
isVisible: true,
|
|
73
73
|
module: this.moduleInfo.ModuleName,
|
|
@@ -115,7 +115,7 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
115
115
|
}));
|
|
116
116
|
return [
|
|
117
117
|
{
|
|
118
|
-
name: 'parent',
|
|
118
|
+
name: 'column-filter-parent',
|
|
119
119
|
label: this.moduleInfo.FriendlyName,
|
|
120
120
|
isVisible: true,
|
|
121
121
|
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;
|
|
@@ -26,7 +26,7 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
26
26
|
var _a, _b;
|
|
27
27
|
const commentThreads = await ((_b = (_a = this.api.optionsApi
|
|
28
28
|
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, (0, ObjectFactory_1.createBaseContext)(this.api)));
|
|
29
|
-
this.api.commentApi.
|
|
29
|
+
this.api.commentApi.setGridComments(commentThreads);
|
|
30
30
|
}
|
|
31
31
|
addContextMenuItems(menuContext) {
|
|
32
32
|
var _a, _b;
|
|
@@ -42,17 +42,17 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
42
42
|
return items;
|
|
43
43
|
}
|
|
44
44
|
getAddRemoveCommentsMenuItems(menuContext) {
|
|
45
|
+
var _a;
|
|
45
46
|
const items = [];
|
|
46
|
-
|
|
47
|
+
if (!this.api.commentApi.internalApi.areCommentsAvailable()) {
|
|
48
|
+
return items;
|
|
49
|
+
}
|
|
47
50
|
const cellAddress = {
|
|
48
51
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
49
52
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
50
53
|
};
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return items;
|
|
54
|
-
}
|
|
55
|
-
if (comments) {
|
|
54
|
+
const cellComments = (_a = this.api.commentApi.getCommentThread(cellAddress)) === null || _a === void 0 ? void 0 : _a.Comments;
|
|
55
|
+
if (cellComments) {
|
|
56
56
|
items.push(this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
57
57
|
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
58
58
|
}));
|
|
@@ -99,7 +99,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
99
99
|
}
|
|
100
100
|
buildExportMenuItem(label, subItems) {
|
|
101
101
|
return {
|
|
102
|
-
name: 'parent',
|
|
102
|
+
name: 'export-parent',
|
|
103
103
|
label: label,
|
|
104
104
|
module: this.moduleInfo.ModuleName,
|
|
105
105
|
isVisible: true,
|
|
@@ -31,7 +31,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
32
32
|
if (contextMenuItems.length > 1) {
|
|
33
33
|
const groupMenuItem = {
|
|
34
|
-
name: 'parent',
|
|
34
|
+
name: 'fdc3-parent',
|
|
35
35
|
module: this.moduleInfo.ModuleName,
|
|
36
36
|
label: 'FDC3',
|
|
37
37
|
icon: {
|
|
@@ -66,7 +66,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
66
66
|
};
|
|
67
67
|
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
68
68
|
returnColumnMenuItems.push({
|
|
69
|
-
name: 'parent',
|
|
69
|
+
name: 'format-column-parent',
|
|
70
70
|
label: 'Format Column',
|
|
71
71
|
module: this.moduleInfo.ModuleName,
|
|
72
72
|
isVisible: true,
|
|
@@ -83,7 +83,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
83
83
|
.getModuleInfoByModule('FormatColumn');
|
|
84
84
|
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
85
85
|
returnColumnMenuItems.push({
|
|
86
|
-
name: 'parent',
|
|
86
|
+
name: 'format-column-parent',
|
|
87
87
|
label: 'Format Column',
|
|
88
88
|
module: this.moduleInfo.ModuleName,
|
|
89
89
|
isVisible: true,
|
|
@@ -121,7 +121,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
121
121
|
defaultCurrentSectionName: 'Style',
|
|
122
122
|
} }));
|
|
123
123
|
returnColumnMenuItems.push({
|
|
124
|
-
name: 'parent',
|
|
124
|
+
name: 'styled-column-parent',
|
|
125
125
|
label: 'Create Styled Column',
|
|
126
126
|
module: this.moduleInfo.ModuleName,
|
|
127
127
|
isVisible: true,
|
|
@@ -66,13 +66,11 @@ const CommentsEditor = (props) => {
|
|
|
66
66
|
const isOwnComment = ((_a = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _a === void 0 ? void 0 : _a.UserName)
|
|
67
67
|
? ((_b = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _b === void 0 ? void 0 : _b.UserName) === userId
|
|
68
68
|
: true; // no owner means it's the current user
|
|
69
|
-
return (React.createElement(rebass_1.Box, { p: 2, key: (_c = comment.Uuid) !== null && _c !== void 0 ? _c : index,
|
|
70
|
-
borderBottom: '1px solid var(--ab-color-primarydark)',
|
|
71
|
-
} },
|
|
69
|
+
return (React.createElement(rebass_1.Box, { p: 2, key: (_c = comment.Uuid) !== null && _c !== void 0 ? _c : index, className: "ab-Comment" },
|
|
72
70
|
React.createElement(rebass_1.Flex, { mb: 2, alignItems: "center" },
|
|
73
71
|
React.createElement(rebass_1.Box, null,
|
|
74
|
-
React.createElement(rebass_1.Box, { fontSize: 3, fontWeight: "bold" }, (_d = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _d === void 0 ? void 0 : _d.UserName),
|
|
75
|
-
comment.Timestamp && (React.createElement(rebass_1.Box, { fontSize: 2 }, (0, dateUtils_1.formatDate)(comment.Timestamp, 'MM.DD.YYYY HH:mm')))),
|
|
72
|
+
React.createElement(rebass_1.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),
|
|
73
|
+
comment.Timestamp && (React.createElement(rebass_1.Box, { "data-name": "comment-timestamp", fontSize: 2 }, (0, dateUtils_1.formatDate)(comment.Timestamp, 'MM.DD.YYYY HH:mm')))),
|
|
76
74
|
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
77
75
|
React.createElement(SimpleButton_1.default, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }),
|
|
78
76
|
React.createElement(SimpleButton_1.default, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
|
|
@@ -87,7 +85,7 @@ const CommentsEditor = (props) => {
|
|
|
87
85
|
}
|
|
88
86
|
}, onChange: (event) => {
|
|
89
87
|
adaptable.api.commentApi.editComment(Object.assign(Object.assign({}, comment), { Value: event.target.value }), cellAddress);
|
|
90
|
-
} })) : (React.createElement(rebass_1.Text,
|
|
88
|
+
} })) : (React.createElement(rebass_1.Text, { "data-name": "comment-text" }, comment.Value)))));
|
|
91
89
|
})),
|
|
92
90
|
React.createElement(AdaptableInput_1.default, { autoFocus: !comments || comments.length === 0, value: newCommentText, disabled: isReadOnlyModule, onChange: (event) => {
|
|
93
91
|
setNewCommentText(event.target.value);
|
|
@@ -24,7 +24,7 @@ const useMenuItems = () => {
|
|
|
24
24
|
item.module !== 'CustomSettingsPanel' &&
|
|
25
25
|
!DefaultSettingsPanel_1.STANDALONE_MODULE_POPUPS.includes(item.module) &&
|
|
26
26
|
item.isVisible);
|
|
27
|
-
|
|
27
|
+
let navItems = navigationItems
|
|
28
28
|
.map((moduleName) => {
|
|
29
29
|
var _a, _b;
|
|
30
30
|
if (moduleName === '-') {
|
|
@@ -44,6 +44,14 @@ const useMenuItems = () => {
|
|
|
44
44
|
return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
|
|
45
45
|
})
|
|
46
46
|
.filter(Boolean);
|
|
47
|
+
// remove sequential '-' items
|
|
48
|
+
navItems = navItems.filter((item, index) => {
|
|
49
|
+
if (item === '-' && navItems[index - 1] === '-') {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
});
|
|
54
|
+
return navItems;
|
|
47
55
|
}, [allMenuItems]);
|
|
48
56
|
};
|
|
49
57
|
exports.useMenuItems = useMenuItems;
|
|
@@ -58,7 +58,7 @@ const FilterSection = (props) => {
|
|
|
58
58
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
59
59
|
React.createElement(FormLayout_1.default, { mb: 2 },
|
|
60
60
|
React.createElement(FormLayout_1.FormRow, { label: "Add Column Filter" },
|
|
61
|
-
React.createElement(ColumnSelector_1.ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select
|
|
61
|
+
React.createElement(ColumnSelector_1.ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select Column to create Filter", onChange: (option) => {
|
|
62
62
|
props.onChange(Object.assign(Object.assign({}, layout), { ColumnFilters: [
|
|
63
63
|
...layoutFilters,
|
|
64
64
|
{
|