@adaptabletools/adaptable 18.0.0-canary.17 → 18.0.0-canary.19
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/package.json +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +2 -2
- package/src/AdaptableOptions/CommentOptions.d.ts +9 -6
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
- package/src/AdaptableOptions/NoteOptions.d.ts +4 -4
- package/src/Api/Events/GridDataChanged.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +12 -0
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +6 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +1 -5
- package/src/PredefinedConfig/Common/Menu.d.ts +9 -4
- package/src/PredefinedConfig/Common/Menu.js +61 -35
- package/src/PredefinedConfig/NoteState.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.js +25 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +5 -5
- package/src/Strategy/AdaptableModuleBase.js +3 -3
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/ColumnFilterModule.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +44 -41
- package/src/Strategy/ColumnInfoModule.js +2 -2
- package/src/Strategy/CommentModule.js +7 -16
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +8 -8
- package/src/Strategy/DataImportModule.js +1 -1
- package/src/Strategy/ExportModule.js +3 -3
- package/src/Strategy/Fdc3Module.js +1 -1
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/LayoutModule.js +13 -13
- package/src/Strategy/NoteModule.js +8 -11
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/StyledColumnModule.js +13 -10
- package/src/Strategy/SystemStatusModule.js +1 -1
- package/src/Utilities/MenuItem.d.ts +7 -7
- package/src/View/Comments/CommentsEditor.js +7 -6
- package/src/View/Comments/CommentsPopup.js +2 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Note/NotePopup.js +5 -3
- package/src/agGrid/AdaptableAgGrid.js +0 -20
- package/src/agGrid/defaultAdaptableOptions.js +0 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +13 -16
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.0.0-canary.
|
|
3
|
+
"version": "18.0.0-canary.19",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -134,11 +134,11 @@ export interface AdaptableOptions<TData = any> {
|
|
|
134
134
|
*/
|
|
135
135
|
containerOptions?: ContainerOptions;
|
|
136
136
|
/**
|
|
137
|
-
* Options for managing Notes
|
|
137
|
+
* Options for managing personal Notes
|
|
138
138
|
*/
|
|
139
139
|
noteOptions?: NoteOptions;
|
|
140
140
|
/**
|
|
141
|
-
* Options for managing
|
|
141
|
+
* Options for managing collaborative Comments
|
|
142
142
|
*/
|
|
143
143
|
commentOptions?: CommentOptions<TData>;
|
|
144
144
|
/**
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { CommentThread, BaseContext,
|
|
1
|
+
import { CommentThread, BaseContext, GridCell } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Options for managing Comments and Comment Threads in AdapTable
|
|
4
4
|
*/
|
|
5
5
|
export interface CommentOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
|
-
* Whether a cell can
|
|
7
|
+
* Whether a cell can contain Comments
|
|
8
8
|
*/
|
|
9
9
|
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
|
|
10
10
|
/**
|
|
11
|
-
* Loads
|
|
11
|
+
* Loads Comments
|
|
12
12
|
*/
|
|
13
13
|
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
|
|
14
14
|
/**
|
|
15
|
-
* Called when Comments change
|
|
15
|
+
* Called when Comments change and need to be saved
|
|
16
16
|
* @param commentThreads
|
|
17
17
|
*/
|
|
18
18
|
persistCommentThreads?(commentThreads: CommentThread[]): void;
|
|
@@ -22,9 +22,12 @@ export interface CommentOptions<TData = any> {
|
|
|
22
22
|
*/
|
|
23
23
|
export interface CommentableCellContext extends BaseContext {
|
|
24
24
|
/**
|
|
25
|
-
* Cell in AdapTable which
|
|
25
|
+
* Grid Cell in AdapTable which has been clicked
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
gridCell: GridCell;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Context used when loading Comments
|
|
31
|
+
*/
|
|
29
32
|
export interface CommentLoadContext extends BaseContext {
|
|
30
33
|
}
|
|
@@ -4,13 +4,6 @@ import { KeyCreatorParams } from '@ag-grid-community/core';
|
|
|
4
4
|
* Options for managing Row and Column Groups in AdapTable
|
|
5
5
|
*/
|
|
6
6
|
export interface GroupingOptions<TData = any> {
|
|
7
|
-
/**
|
|
8
|
-
* Show aggregated totals row at top of Grid when row grouping
|
|
9
|
-
*
|
|
10
|
-
* @defaultValue false
|
|
11
|
-
* @gridInfoItem
|
|
12
|
-
*/
|
|
13
|
-
showGroupingTotalsAsHeader?: boolean;
|
|
14
7
|
/**
|
|
15
8
|
* Value to use for 'Balanced Groups' (string columns only)
|
|
16
9
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseContext,
|
|
1
|
+
import { BaseContext, GridCell } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Options for managing AdapTable Notes
|
|
4
4
|
*/
|
|
@@ -13,7 +13,7 @@ export interface NoteOptions<TData = any> {
|
|
|
13
13
|
*/
|
|
14
14
|
export interface NotableCellContext extends BaseContext {
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Grid Cell in AdapTable which has been clicked
|
|
17
|
+
*/
|
|
18
|
+
gridCell: GridCell;
|
|
19
19
|
}
|
|
@@ -13,7 +13,7 @@ export type GridDataChangeTrigger = 'Add' | 'Edit' | 'Delete' | 'Load';
|
|
|
13
13
|
*/
|
|
14
14
|
dataRows: TData[];
|
|
15
15
|
/**
|
|
16
|
-
* Trigger for row change:
|
|
16
|
+
* Trigger for row change: Load, Add, Edit, or Delete
|
|
17
17
|
*/
|
|
18
18
|
rowTrigger: GridDataChangeTrigger;
|
|
19
19
|
/**
|
|
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
|
7
7
|
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
9
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
10
|
-
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions } from '../../types';
|
|
10
|
+
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, CommentOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions } from '../../types';
|
|
11
11
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
12
12
|
export declare abstract class ApiBase {
|
|
13
13
|
protected adaptable: IAdaptable;
|
|
@@ -53,6 +53,7 @@ export declare abstract class ApiBase {
|
|
|
53
53
|
protected getActionColumnOptions(): ActionColumnOptions;
|
|
54
54
|
protected getActionRowOptions(): ActionRowOptions;
|
|
55
55
|
protected getColumnOptions(): ColumnOptions;
|
|
56
|
+
protected getCommentOptions(): CommentOptions;
|
|
56
57
|
protected getNoteOptions(): NoteOptions;
|
|
57
58
|
protected getCustomSortOptions(): CustomSortOptions;
|
|
58
59
|
protected getDataSetOptions(): DataSetOptions;
|
|
@@ -49,6 +49,7 @@ export declare class ColumnFilterInternalApi extends ApiBase {
|
|
|
49
49
|
* Fires Column Filter Applied Event - typically used to enable filtering on the server
|
|
50
50
|
*/
|
|
51
51
|
fireColumnFilterAppliedEvent(): void;
|
|
52
|
+
fireGridFilterAppliedEvent(): void;
|
|
52
53
|
/**
|
|
53
54
|
* Compares to sets of Column Filters to see if they are identical
|
|
54
55
|
* @param filters1
|
|
@@ -182,6 +182,18 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
182
182
|
this.adaptable.api.eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
+
fireGridFilterAppliedEvent() {
|
|
186
|
+
if (this.adaptable.isReady) {
|
|
187
|
+
const adaptableApi = this.getAdaptableApi();
|
|
188
|
+
const gridFilterAppliedInfo = {
|
|
189
|
+
columnFilters: this.getColumnFilterApi().getColumnFilters(),
|
|
190
|
+
adaptableApi: adaptableApi,
|
|
191
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
192
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
193
|
+
};
|
|
194
|
+
this.adaptable.api.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
185
197
|
/**
|
|
186
198
|
* Compares to sets of Column Filters to see if they are identical
|
|
187
199
|
* @param filters1
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { GridFilter } from '../../types';
|
|
2
3
|
export declare class GridFilterInternalApi extends ApiBase {
|
|
3
4
|
fireGridFilterAppliedEvent(): void;
|
|
5
|
+
/**
|
|
6
|
+
* Compares to Grid Filters to see if they are identical
|
|
7
|
+
*/
|
|
8
|
+
isGridFilterDifferent(oldFilter: GridFilter, newFilter: GridFilter): boolean;
|
|
4
9
|
}
|
|
@@ -16,4 +16,10 @@ export class GridFilterInternalApi extends ApiBase {
|
|
|
16
16
|
adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Compares to Grid Filters to see if they are identical
|
|
21
|
+
*/
|
|
22
|
+
isGridFilterDifferent(oldFilter, newFilter) {
|
|
23
|
+
return (oldFilter === null || oldFilter === void 0 ? void 0 : oldFilter.Expression) === (newFilter === null || newFilter === void 0 ? void 0 : newFilter.Expression);
|
|
24
|
+
}
|
|
19
25
|
}
|
|
@@ -7,11 +7,7 @@ export interface DataUpdateConfig {
|
|
|
7
7
|
*/
|
|
8
8
|
runAsync?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether to flush async updates
|
|
11
|
-
*
|
|
12
|
-
* If `true`, any async transactions will be flushed.
|
|
13
|
-
* This flag can be true even if you runAsync is `false`.
|
|
14
|
-
* So even if the currenct transaction/operation is synchronous, this will flush existing async transactions.
|
|
10
|
+
* Whether to flush async updates
|
|
15
11
|
*/
|
|
16
12
|
flushAsync?: boolean;
|
|
17
13
|
/**
|
|
@@ -5,11 +5,16 @@ import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
|
|
|
5
5
|
import { SelectedRowInfo } from '../Selection/SelectedRowInfo';
|
|
6
6
|
import { Column, IRowNode } from '@ag-grid-community/core';
|
|
7
7
|
import { AdaptableIcon, BaseContext } from '../../types';
|
|
8
|
+
export type AdaptableColumnMenuItemName = (typeof ADAPTABLE_COLUMN_MENU_ITEMS)[number];
|
|
9
|
+
export type AdaptableContextMenuItemName = (typeof ADAPTABLE_CONTEXT_MENU_ITEMS)[number];
|
|
8
10
|
/**
|
|
9
|
-
* List of Shipped Adaptable Menu Items
|
|
11
|
+
* List of Shipped Adaptable Column Menu Items
|
|
10
12
|
*/
|
|
11
|
-
export declare const
|
|
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"];
|
|
14
|
+
/**
|
|
15
|
+
* List of Shipped Adaptable Context Menu Items
|
|
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"];
|
|
13
18
|
/**
|
|
14
19
|
* Menu item used by Adaptable in both Column and Context Menus
|
|
15
20
|
*/
|
|
@@ -17,7 +22,7 @@ export interface AdaptableMenuItem {
|
|
|
17
22
|
/**
|
|
18
23
|
* Unique name for the Menu Item
|
|
19
24
|
*/
|
|
20
|
-
name:
|
|
25
|
+
name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
21
26
|
/**
|
|
22
27
|
* Text that appears in the menu
|
|
23
28
|
*/
|
|
@@ -1,17 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* List of Shipped Adaptable Menu Items
|
|
2
|
+
* List of Shipped Adaptable Column Menu Items
|
|
3
3
|
*/
|
|
4
|
-
export const
|
|
4
|
+
export const ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
5
|
+
'calculated-column-edit',
|
|
6
|
+
'cell-summary-show',
|
|
7
|
+
'column-filter-bar-hide',
|
|
8
|
+
'column-filter-bar-show',
|
|
9
|
+
'column-filter-clear',
|
|
10
|
+
'column-filter-on-cell-value',
|
|
11
|
+
'column-filter-suspend',
|
|
12
|
+
'column-filter-unsuspend',
|
|
13
|
+
'column-info-show',
|
|
14
|
+
'custom-sort-add',
|
|
15
|
+
'custom-sort-edit',
|
|
16
|
+
'dashboard-collapse',
|
|
17
|
+
'dashboard-configure',
|
|
18
|
+
'dashboard-dock',
|
|
19
|
+
'dashboard-expand',
|
|
20
|
+
'dashboard-float',
|
|
21
|
+
'dashboard-hide',
|
|
22
|
+
'dashboard-show',
|
|
23
|
+
'data-import',
|
|
24
|
+
'flashing-cell-add',
|
|
25
|
+
'flashing-cell-delete',
|
|
26
|
+
'format-column-add',
|
|
27
|
+
'format-column-edit',
|
|
28
|
+
'free-text-column-edit',
|
|
29
|
+
'grid-info-show',
|
|
30
|
+
'layout-column-caption-change',
|
|
31
|
+
'layout-column-hide',
|
|
32
|
+
'layout-column-select',
|
|
33
|
+
'layout-column-select-preserve',
|
|
34
|
+
'layout-column-select-reset',
|
|
35
|
+
'layout-edit',
|
|
36
|
+
'layout-grid-parent',
|
|
37
|
+
'layout-select-parent',
|
|
38
|
+
'layout-select-all',
|
|
39
|
+
'plus-minus-add',
|
|
40
|
+
'settings-panel-open',
|
|
41
|
+
'styled-column-badge-add',
|
|
42
|
+
'styled-column-badge-edit',
|
|
43
|
+
'styled-column-gradient-add',
|
|
44
|
+
'styled-column-gradient-edit',
|
|
45
|
+
'styled-column-percent-bar-add',
|
|
46
|
+
'styled-column-percent-bar-edit',
|
|
47
|
+
'styled-column-sparkline-add',
|
|
48
|
+
'styled-column-sparkline-edit',
|
|
49
|
+
'system-status-show',
|
|
50
|
+
'internal',
|
|
51
|
+
'parent',
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* List of Shipped Adaptable Context Menu Items
|
|
55
|
+
*/
|
|
56
|
+
export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
5
57
|
'alert-clear',
|
|
6
58
|
'bulk-update-apply',
|
|
7
59
|
'calculated-column-edit',
|
|
8
60
|
'cell-summary-show',
|
|
9
|
-
'column-
|
|
61
|
+
'column-filter-on-cell-value',
|
|
62
|
+
'column-filter-clear',
|
|
63
|
+
'column-filter-suspend',
|
|
64
|
+
'column-filter-unsuspend',
|
|
65
|
+
'column-info-show',
|
|
10
66
|
'comment-add',
|
|
11
67
|
'comment-remove',
|
|
12
|
-
'custom-sort-add',
|
|
13
|
-
'custom-sort-edit',
|
|
14
|
-
'dashboard',
|
|
15
68
|
'dashboard-collapse',
|
|
16
69
|
'dashboard-configure',
|
|
17
70
|
'dashboard-dock',
|
|
@@ -20,52 +73,25 @@ export const ADAPTABLE_MENU_ITEMS = [
|
|
|
20
73
|
'dashboard-hide',
|
|
21
74
|
'dashboard-show',
|
|
22
75
|
'data-import',
|
|
23
|
-
'export',
|
|
24
76
|
'export-clipboard',
|
|
25
77
|
'export-csv',
|
|
26
78
|
'export-excel',
|
|
27
79
|
'export-json',
|
|
28
80
|
'export-table',
|
|
29
81
|
'export-custom-destination',
|
|
30
|
-
'fdc3',
|
|
31
82
|
'fdc3-broadcast',
|
|
32
83
|
'fdc3-raise-intent',
|
|
33
|
-
'filter',
|
|
34
|
-
'filter-bar-visbility',
|
|
35
|
-
'filter-clear',
|
|
36
|
-
'filter-suspend',
|
|
37
|
-
'filter-cell-value',
|
|
38
|
-
'flashing-cell-add',
|
|
39
84
|
'flashing-cell-clear',
|
|
40
|
-
'flashing-cell-delete',
|
|
41
85
|
'flashing-row-clear',
|
|
42
|
-
'
|
|
43
|
-
'format-column-add',
|
|
44
|
-
'format-column-edit',
|
|
45
|
-
'free-text-column-edit',
|
|
46
|
-
'grid-info',
|
|
86
|
+
'grid-info-show',
|
|
47
87
|
'layout-aggregated-view',
|
|
48
88
|
'layout-auto-size',
|
|
49
89
|
'layout-clear-selection',
|
|
50
|
-
'layout-column-caption-change',
|
|
51
|
-
'layout-column-hide',
|
|
52
|
-
'layout-column-select',
|
|
53
|
-
'layout-column-select-preserve',
|
|
54
|
-
'layout-column-select-reset',
|
|
55
90
|
'layout-edit',
|
|
56
|
-
'layout-grid',
|
|
57
|
-
'layout-select',
|
|
58
91
|
'layout-select-all',
|
|
59
92
|
'note-add',
|
|
60
93
|
'note-remove',
|
|
61
|
-
'plus-minus-add',
|
|
62
|
-
'smart-edit-apply',
|
|
63
94
|
'settings-panel-open',
|
|
64
|
-
'
|
|
65
|
-
'styled-column',
|
|
66
|
-
'styled-column-gradient',
|
|
67
|
-
'styled-column-percent-bar',
|
|
68
|
-
'styled-column-sparkline',
|
|
95
|
+
'smart-edit-apply',
|
|
69
96
|
'system-status-show',
|
|
70
|
-
'internal' // used by AdapTable in Settings Panel
|
|
71
97
|
];
|
|
@@ -262,7 +262,7 @@ export class AdaptableStore {
|
|
|
262
262
|
const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
263
263
|
return function (next) {
|
|
264
264
|
return function (action) {
|
|
265
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
265
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
266
266
|
switch (action.type) {
|
|
267
267
|
/*******************
|
|
268
268
|
* NAMED QUERY ACTIONS
|
|
@@ -770,7 +770,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
770
770
|
draftLayoutAction = GridRedux.LayoutDraftColumnFilterUnsuspendAll();
|
|
771
771
|
break;
|
|
772
772
|
}
|
|
773
|
-
// GRID FILTER
|
|
774
773
|
returnAction = next(draftLayoutAction);
|
|
775
774
|
}
|
|
776
775
|
setTimeout(() => {
|
|
@@ -790,17 +789,27 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
790
789
|
case LayoutRedux.LAYOUT_GRID_FILTER_CLEAR:
|
|
791
790
|
case LayoutRedux.LAYOUT_GRID_FILTER_SUSPEND:
|
|
792
791
|
case LayoutRedux.LAYOUT_GRID_FILTER_UNSUSPEND: {
|
|
793
|
-
setTimeout(() => adaptable.applyGridFiltering(), 5);
|
|
794
|
-
adaptable.api.gridFilterApi.internalApi.fireGridFilterAppliedEvent();
|
|
795
|
-
adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, null, middlewareAPI.getState().Layout);
|
|
796
792
|
const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
|
|
797
793
|
let returnAction;
|
|
794
|
+
// - calls GridFilterApplied - examples
|
|
795
|
+
adaptable.api.gridFilterApi.internalApi.fireGridFilterAppliedEvent();
|
|
796
|
+
// - layout change event, row summary is triggered
|
|
797
|
+
adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, null, middlewareAPI.getState().Layout);
|
|
798
|
+
setTimeout(() => {
|
|
799
|
+
// - agGridApi.onFilterChanged
|
|
800
|
+
// - internal 'AdapTableFiltersApplied' event - evaluates row summary
|
|
801
|
+
// - refresh selected cells and rows
|
|
802
|
+
adaptable.applyGridFiltering();
|
|
803
|
+
}, 5);
|
|
798
804
|
if (((_h = adaptable.adaptableOptions.layoutOptions) === null || _h === void 0 ? void 0 : _h.autoSaveLayouts) &&
|
|
799
805
|
!currentLayout.IsReadOnly) {
|
|
800
|
-
|
|
806
|
+
return next(action);
|
|
801
807
|
}
|
|
802
808
|
else {
|
|
803
|
-
|
|
809
|
+
if (!middlewareAPI.getState().Grid.CurrentLayout) {
|
|
810
|
+
const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
|
|
811
|
+
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
812
|
+
}
|
|
804
813
|
switch (action.type) {
|
|
805
814
|
case LayoutRedux.LAYOUT_GRID_FILTER_SET:
|
|
806
815
|
returnAction = GridRedux.LayoutDraftGridFilterSet(Object.assign(Object.assign({}, currentLayout.GridFilter), { Expression: action.gridFilter }));
|
|
@@ -1011,12 +1020,18 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1011
1020
|
let returnAction = next(action);
|
|
1012
1021
|
const newLayoutState = middlewareAPI.getState().Layout;
|
|
1013
1022
|
adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
|
|
1023
|
+
// Tell Grid to apply column filtering if filters have been changed in a loaded Layout
|
|
1014
1024
|
const oldFilters = (_k = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
|
|
1015
1025
|
const newFilters = (_l = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _l === void 0 ? void 0 : _l.ColumnFilters;
|
|
1016
|
-
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1017
1026
|
if (adaptable.api.columnFilterApi.internalApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
|
|
1018
1027
|
adaptable.applyColumnFiltering();
|
|
1019
1028
|
}
|
|
1029
|
+
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1030
|
+
const oldGridFilter = (_m = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _m === void 0 ? void 0 : _m.GridFilter;
|
|
1031
|
+
const newGridFilter = (_o = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _o === void 0 ? void 0 : _o.GridFilter;
|
|
1032
|
+
if (adaptable.api.gridFilterApi.internalApi.isGridFilterDifferent(oldGridFilter, newGridFilter)) {
|
|
1033
|
+
adaptable.applyGridFiltering();
|
|
1034
|
+
}
|
|
1020
1035
|
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
1021
1036
|
returnAction.type == LayoutRedux.LAYOUT_DELETE ||
|
|
1022
1037
|
returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
|
|
@@ -1029,7 +1044,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1029
1044
|
// tell grid the layout has been selected
|
|
1030
1045
|
adaptable.setLayout(currentLayout);
|
|
1031
1046
|
}
|
|
1032
|
-
if (!((
|
|
1047
|
+
if (!((_p = adaptable.adaptableOptions.layoutOptions) === null || _p === void 0 ? void 0 : _p.autoSaveLayouts)) {
|
|
1033
1048
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
1034
1049
|
}
|
|
1035
1050
|
}
|
|
@@ -1037,7 +1052,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1037
1052
|
returnAction.type == LayoutRedux.LAYOUT_SAVE) {
|
|
1038
1053
|
const actionTyped = action;
|
|
1039
1054
|
// if autosave is false
|
|
1040
|
-
if (!((
|
|
1055
|
+
if (!((_q = adaptable.adaptableOptions.layoutOptions) === null || _q === void 0 ? void 0 : _q.autoSaveLayouts)) {
|
|
1041
1056
|
// and the current layout is saved, make sure we also update the draft
|
|
1042
1057
|
if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
|
|
1043
1058
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
|
|
@@ -3,7 +3,7 @@ import { Action } from 'redux';
|
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
5
5
|
import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
|
|
6
|
-
import { AdaptableMenuItem,
|
|
6
|
+
import { AdaptableMenuItem, AdaptableContextMenuItemName, ContextMenuContext, AdaptableColumnMenuItemName } from '../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
8
8
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
9
9
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -41,15 +41,15 @@ export declare abstract class AdaptableModuleBase implements IModule {
|
|
|
41
41
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
42
42
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
43
43
|
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }: {
|
|
44
|
-
Name:
|
|
44
|
+
Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
45
45
|
Label: string;
|
|
46
46
|
ComponentName: string;
|
|
47
47
|
Icon: AdaptableSystemIconName;
|
|
48
48
|
PopupParams?: ModuleParams;
|
|
49
49
|
}): MenuItemShowPopup;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
createMenuItemClickFunction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
|
|
51
|
+
createMenuItemReduxAction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
|
|
52
|
+
createMenuItemShowPopup(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
|
|
53
53
|
getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
54
54
|
getModuleNamedQueryReferences(): string[];
|
|
55
55
|
getModuleCalculatedColumnReferences(): CalculatedColumn[];
|
|
@@ -103,15 +103,15 @@ export class AdaptableModuleBase {
|
|
|
103
103
|
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
104
104
|
}
|
|
105
105
|
// creates a menu item for the column menu to perform a function
|
|
106
|
-
|
|
106
|
+
createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
|
|
107
107
|
return new MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
108
108
|
}
|
|
109
109
|
// creates a menu item for the column menu to enact a Redux action
|
|
110
|
-
|
|
110
|
+
createMenuItemReduxAction(Name, Label, Icon, Action) {
|
|
111
111
|
return new MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
112
112
|
}
|
|
113
113
|
// popups called by the column menu - invisible if module is hidden or readonly
|
|
114
|
-
|
|
114
|
+
createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
|
|
115
115
|
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
116
116
|
}
|
|
117
117
|
getTeamSharingAction() {
|
|
@@ -83,7 +83,7 @@ export class AlertModule extends AdaptableModuleBase {
|
|
|
83
83
|
relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
84
84
|
}
|
|
85
85
|
if (relevantAlert) {
|
|
86
|
-
items.push(this.
|
|
86
|
+
items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -57,7 +57,7 @@ export class CalculatedColumnModule extends AdaptableModuleBase {
|
|
|
57
57
|
source: 'ColumnMenu',
|
|
58
58
|
};
|
|
59
59
|
return [
|
|
60
|
-
this.
|
|
60
|
+
this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
61
61
|
];
|
|
62
62
|
}
|
|
63
63
|
getTeamSharingAction() {
|
|
@@ -13,8 +13,8 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
|
|
|
13
13
|
getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
15
|
onAdaptableReady(): void;
|
|
16
|
-
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
17
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
18
18
|
private getExistingColumnFilter;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
20
20
|
toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;
|