@adaptabletools/adaptable 22.0.0-canary.7 → 22.0.0-canary.9
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/agGrid.d.ts +9 -9
- package/agGrid.js +1 -0
- package/index.css +63 -71
- package/index.css.map +1 -1
- package/index.d.ts +66 -0
- package/index.js +73 -0
- package/package.json +3 -3
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
- package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +10 -10
- package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
- package/src/AdaptableState/Common/AdaptableRowContext.js +1 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
- package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
- package/src/AdaptableState/InitialState.d.ts +9 -0
- package/src/AdaptableState/LayoutState.d.ts +1 -2
- package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
- package/src/AdaptableState/UserInterfaceState.js +1 -0
- package/src/Api/GridApi.d.ts +5 -9
- package/src/Api/Implementation/AlertApiImpl.js +2 -6
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
- package/src/Api/Implementation/GridApiImpl.js +9 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +3 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -5
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
- package/src/Api/LayoutApi.d.ts +6 -0
- package/src/Api/UserInterfaceApi.d.ts +17 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +21 -0
- package/src/Redux/Store/AdaptableStore.js +27 -0
- package/src/Utilities/resolveContainerElement.d.ts +23 -0
- package/src/Utilities/resolveContainerElement.js +44 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +36 -1
- package/src/View/Components/WizardSummaryPage.js +1 -1
- package/src/View/Dashboard/CustomToolbar.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +144 -138
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
- package/src/View/UIHelper.d.ts +2 -1
- package/src/View/UIHelper.js +8 -14
- package/src/agGrid/Adaptable.js +11 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
- package/src/agGrid/AdaptableAgGrid.js +112 -31
- package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +9 -1
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/Select/Select.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +62 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +6 -3
- package/themes/dark.css +30 -29
- package/themes/light.css +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -1,40 +1,80 @@
|
|
|
1
|
+
import type { BaseContext } from '../AdaptableState/Common/BaseContext';
|
|
2
|
+
/**
|
|
3
|
+
* CSS Selector used to target elements by CSS selectors (e.g. class, attribute, etc.) rather than elementID
|
|
4
|
+
*/
|
|
5
|
+
export interface AdaptableCSSSelector {
|
|
6
|
+
/**
|
|
7
|
+
* CSS Selector that locates DOM element
|
|
8
|
+
*/
|
|
9
|
+
selector: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A resolved (non-function) container reference
|
|
13
|
+
*
|
|
14
|
+
* - `string` — an element ID (resolved via `document.getElementById`)
|
|
15
|
+
* - `AdaptableCSSSelector` — a CSS selector (resolved via `document.querySelector`)
|
|
16
|
+
* - `HTMLElement` — a direct reference to a DOM element
|
|
17
|
+
*/
|
|
18
|
+
export type AdaptableContainerValue = string | AdaptableCSSSelector | HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* Context available to `adaptableContainer` and `agGridContainer` function callbacks (resolve **before** AdapTable initialises, so `adaptableApi` not available)
|
|
21
|
+
*/
|
|
22
|
+
export interface InitContainerContext {
|
|
23
|
+
/**
|
|
24
|
+
* Id of current AdapTable instance
|
|
25
|
+
*/
|
|
26
|
+
adaptableId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Current Adaptable State Key
|
|
29
|
+
*/
|
|
30
|
+
adaptableStateKey: string;
|
|
31
|
+
/**
|
|
32
|
+
* Custom application Context provided in `AdaptableOptions.adaptableContext`
|
|
33
|
+
*/
|
|
34
|
+
adaptableContext: any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Context available to `modalContainer`, `systemStatusContainer`, `alertContainer` and `transposedViewContainer` function callbacks
|
|
38
|
+
*/
|
|
39
|
+
export type ContainerContext = BaseContext;
|
|
1
40
|
/**
|
|
2
41
|
* Options for managing the different div elements required by AdapTable
|
|
3
42
|
*/
|
|
4
43
|
export interface ContainerOptions {
|
|
5
44
|
/**
|
|
6
|
-
* Div containing AdapTable;
|
|
7
|
-
*
|
|
45
|
+
* Div containing AdapTable; element Id, CSS Selector, HTMLElement, or function returning one of these
|
|
8
46
|
* @defaultValue "adaptable"
|
|
9
47
|
* @gridInfoItem
|
|
10
48
|
*/
|
|
11
|
-
adaptableContainer?:
|
|
49
|
+
adaptableContainer?: AdaptableContainerValue | ((context: InitContainerContext) => AdaptableContainerValue);
|
|
12
50
|
/**
|
|
13
|
-
* Div containing AG Grid instance;
|
|
14
|
-
*
|
|
51
|
+
* Div containing AG Grid instance; element Id, CSS Selector, HTMLElement, or function returning one of these.
|
|
15
52
|
* @defaultValue "grid"
|
|
16
53
|
* @gridInfoItem
|
|
17
54
|
*/
|
|
18
|
-
agGridContainer?:
|
|
55
|
+
agGridContainer?: AdaptableContainerValue | ((context: InitContainerContext) => AdaptableContainerValue);
|
|
19
56
|
/**
|
|
20
|
-
* Name of div where popups appear
|
|
21
|
-
*
|
|
57
|
+
* Name of div where popups appear;element Id, CSS Selector, HTMLElement, or function returning one of these
|
|
22
58
|
* @defaultValue undefined (centre of screen)
|
|
23
59
|
* @gridInfoItem
|
|
24
60
|
*/
|
|
25
|
-
modalContainer?:
|
|
61
|
+
modalContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue);
|
|
26
62
|
/**
|
|
27
|
-
* Div to show System Status
|
|
28
|
-
*
|
|
63
|
+
* Div to show System Status Messages; elementId, CSS Selector, HTMLElement, or function returning one of these
|
|
29
64
|
* @defaultValue undefined
|
|
30
65
|
* @gridInfoItem
|
|
31
66
|
*/
|
|
32
|
-
systemStatusContainer?:
|
|
67
|
+
systemStatusContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue);
|
|
33
68
|
/**
|
|
34
|
-
* Div to display
|
|
35
|
-
*
|
|
69
|
+
* Div to display Alerts; elementId, CSS Selector, HTMLElement, or function returning one of these
|
|
36
70
|
* @defaultValue undefined
|
|
37
71
|
* @gridInfoItem
|
|
38
72
|
*/
|
|
39
|
-
alertContainer?:
|
|
73
|
+
alertContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue);
|
|
74
|
+
/**
|
|
75
|
+
* Div to render a Transposed View; elementId, CSS Selector, HTMLElement, or function returning one of these
|
|
76
|
+
* @defaultValue undefined (rendered in a draggable popup window)
|
|
77
|
+
* @gridInfoItem
|
|
78
|
+
*/
|
|
79
|
+
transposedViewContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue);
|
|
40
80
|
}
|
|
@@ -24,6 +24,7 @@ import { StyledColumnState } from './StyledColumnState';
|
|
|
24
24
|
import { NoteState } from './NoteState';
|
|
25
25
|
import { NamedQueryState } from './NamedQueryState';
|
|
26
26
|
import { CommentState } from './CommentState';
|
|
27
|
+
import { UserInterfaceState } from './UserInterfaceState';
|
|
27
28
|
/**
|
|
28
29
|
* The main state object of Adaptable
|
|
29
30
|
*/
|
|
@@ -56,6 +57,7 @@ export interface AdaptablePersistentState {
|
|
|
56
57
|
TeamSharing: TeamSharingState;
|
|
57
58
|
Theme: ThemeState;
|
|
58
59
|
ToolPanel: ToolPanelState;
|
|
60
|
+
UserInterface: UserInterfaceState;
|
|
59
61
|
}
|
|
60
62
|
/**
|
|
61
63
|
* The state which is available in the internal Redux store but never persisted
|
|
@@ -9,17 +9,17 @@ export type AdaptableColumnDataType = 'text' | 'number' | 'boolean' | 'date' | '
|
|
|
9
9
|
/**
|
|
10
10
|
* Column Types recognised by AdapTable; to be set in GridOptions
|
|
11
11
|
*/
|
|
12
|
-
export type
|
|
13
|
-
export declare const HIDDEN_COLUMN_TYPE:
|
|
12
|
+
export type AdaptableColumnTypeName = 'hiddenColumn' | 'calculatedColumn' | 'freeTextColumn' | 'actionColumn' | 'fdc3Column' | 'pivotAnyTotal' | 'pivotGrandTotal' | 'pivotColumnTotal' | 'pivotAggregationTotal';
|
|
13
|
+
export declare const HIDDEN_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
14
14
|
export declare const hiddenColDefConfig: ColDef;
|
|
15
|
-
export declare const CALCULATED_COLUMN_TYPE:
|
|
16
|
-
export declare const FREE_TEXT_COLUMN_TYPE:
|
|
17
|
-
export declare const ACTION_COLUMN_TYPE:
|
|
18
|
-
export declare const FDC3_COLUMN_TYPE:
|
|
19
|
-
export declare const PIVOT_ANY_TOTAL_COLUMN_TYPE:
|
|
20
|
-
export declare const PIVOT_GRAND_TOTAL_COLUMN_TYPE:
|
|
21
|
-
export declare const PIVOT_COLUMN_TOTAL_COLUMN_TYPE:
|
|
22
|
-
export declare const PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE:
|
|
15
|
+
export declare const CALCULATED_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
16
|
+
export declare const FREE_TEXT_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
17
|
+
export declare const ACTION_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
18
|
+
export declare const FDC3_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
19
|
+
export declare const PIVOT_ANY_TOTAL_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
20
|
+
export declare const PIVOT_GRAND_TOTAL_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
21
|
+
export declare const PIVOT_COLUMN_TOTAL_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
22
|
+
export declare const PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE: AdaptableColumnTypeName;
|
|
23
23
|
export declare function getColumnTypeFriendlyName(columnType: string): string;
|
|
24
24
|
/**
|
|
25
25
|
* Base class for AdapTable Column containing most important properties
|
|
@@ -9,3 +9,12 @@ export interface AdaptableColumnContext<TData = any> extends BaseContext {
|
|
|
9
9
|
*/
|
|
10
10
|
column: AdaptableColumn<TData>;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Context provided for callbacks involving multiple Columns
|
|
14
|
+
*/
|
|
15
|
+
export interface AdaptableColumnsContext<TData = any> extends BaseContext {
|
|
16
|
+
/**
|
|
17
|
+
* All Columns
|
|
18
|
+
*/
|
|
19
|
+
columns: AdaptableColumn<TData>[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
+
import { BaseContext } from './BaseContext';
|
|
3
|
+
/**
|
|
4
|
+
* Context provided for per Row callbacks
|
|
5
|
+
*/
|
|
6
|
+
export interface AdaptableRowContext<TData = any> extends BaseContext {
|
|
7
|
+
/**
|
|
8
|
+
* The current Row
|
|
9
|
+
*/
|
|
10
|
+
rowNode: IRowNode<TData>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AdaptableColumnsContext } from '../../types';
|
|
2
|
+
import type { TypeHint } from './Types';
|
|
1
3
|
/**
|
|
2
4
|
* Config used when transposing a Grid
|
|
3
5
|
*/
|
|
@@ -13,18 +15,18 @@ export interface TransposeConfig {
|
|
|
13
15
|
*/
|
|
14
16
|
hideTransposedColumn?: boolean;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue
|
|
18
|
+
* Autosize columns in transposed view
|
|
19
|
+
* @defaultValue true
|
|
18
20
|
*/
|
|
19
|
-
|
|
21
|
+
autosize?: boolean;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue
|
|
23
|
+
* ColumnIds of Columns to Transpose
|
|
24
|
+
* @defaultValue all Columns in Grid
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
columnsToTranspose?: string[] | ((context: AdaptableColumnsContext) => string[]);
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @defaultValue
|
|
28
|
+
* Rows to Transpose: All, VisibleOnly or via an Expression
|
|
29
|
+
* @defaultValue All
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
rowsToTranspose?: TypeHint<string, 'VisibleOnly' | 'All'>;
|
|
30
32
|
}
|
|
@@ -19,6 +19,7 @@ import { StatusBarState } from './StatusBarState';
|
|
|
19
19
|
import { StyledColumnState } from './StyledColumnState';
|
|
20
20
|
import { ThemeState } from './ThemeState';
|
|
21
21
|
import { ToolPanelState } from './ToolPanelState';
|
|
22
|
+
import { UserInterfaceState } from './UserInterfaceState';
|
|
22
23
|
/**
|
|
23
24
|
* The initial state of Adaptable which is populated at design-time and used to create the Adaptable State - must include at least one Layout.
|
|
24
25
|
*/
|
|
@@ -107,6 +108,10 @@ export interface InitialState {
|
|
|
107
108
|
* Sets order & visibility of Tool Panel controls in AdapTable ToolPanel (on right of grid)
|
|
108
109
|
*/
|
|
109
110
|
ToolPanel?: ToolPanelState;
|
|
111
|
+
/**
|
|
112
|
+
* Controls the visibility of AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Menus etc.)
|
|
113
|
+
*/
|
|
114
|
+
UserInterface?: UserInterfaceState;
|
|
110
115
|
}
|
|
111
116
|
/**
|
|
112
117
|
* Deprecated initial state object (now replaced by InitialState)
|
|
@@ -197,4 +202,8 @@ export interface PredefinedConfig {
|
|
|
197
202
|
* Sets the order and visibility of the Tool Panel controls in the AdapTable ToolPanel (on right of grid)
|
|
198
203
|
*/
|
|
199
204
|
ToolPanel?: ToolPanelState;
|
|
205
|
+
/**
|
|
206
|
+
* Controls the visibility of AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Menus etc.)
|
|
207
|
+
*/
|
|
208
|
+
UserInterface?: UserInterfaceState;
|
|
200
209
|
}
|
|
@@ -166,8 +166,7 @@ export interface PivotLayout extends LayoutBase {
|
|
|
166
166
|
*/
|
|
167
167
|
PivotColumnTotal?: PivotTotalPosition;
|
|
168
168
|
/**
|
|
169
|
-
* Ordered list of Pivot Result
|
|
170
|
-
* Set to `true` to enable tracking the current display order (will be populated automatically).
|
|
169
|
+
* Ordered list of Pivot Result Columns; set to `true` to track current display order, or provide custom list
|
|
171
170
|
*/
|
|
172
171
|
PivotResultColumnsOrder?: string[] | boolean;
|
|
173
172
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
|
+
/**
|
|
3
|
+
* Adaptable State Section for the User Interface
|
|
4
|
+
*
|
|
5
|
+
* Controls the visibility and behaviour of AdapTable UI elements
|
|
6
|
+
*/
|
|
7
|
+
export interface UserInterfaceState extends BaseState {
|
|
8
|
+
/**
|
|
9
|
+
* Whether to hide all AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Column and Context Menus etc.)
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue false
|
|
12
|
+
*/
|
|
13
|
+
HideAdaptableUI?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SelectedCellInfo } from '../AdaptableState/Selection/SelectedCellInfo';
|
|
|
2
2
|
import { SelectedRowInfo } from '../AdaptableState/Selection/SelectedRowInfo';
|
|
3
3
|
import { ColumnSort } from '../AdaptableState/Common/ColumnSort';
|
|
4
4
|
import { CellUpdateRequest, GridCell } from '../AdaptableState/Selection/GridCell';
|
|
5
|
-
import { DataUpdateConfig } from '../AdaptableState/Common/DataUpdateConfig';
|
|
5
|
+
import { DataRowConfig, DataUpdateConfig } from '../AdaptableState/Common/DataUpdateConfig';
|
|
6
6
|
import { CellDataChangedInfo } from '../AdaptableState/Common/CellDataChangedInfo';
|
|
7
7
|
import { CellHighlightInfo } from '../AdaptableState/Common/CellHighlightInfo';
|
|
8
8
|
import { RowHighlightInfo } from '../AdaptableState/Common/RowHighlightInfo';
|
|
@@ -71,15 +71,11 @@ export interface GridApi {
|
|
|
71
71
|
*/
|
|
72
72
|
deleteGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @param
|
|
76
|
-
* @param
|
|
74
|
+
* Adds, Updates or Deletes rows in AdapTable (and AG Grid) in single transaction
|
|
75
|
+
* @param dataRowConfig - Rows to add, update or remove
|
|
76
|
+
* @param dataUpdateConfig - batch option and callback function to run post transaction
|
|
77
77
|
*/
|
|
78
|
-
manageGridData(
|
|
79
|
-
add?: any[];
|
|
80
|
-
update?: any[];
|
|
81
|
-
delete?: any[];
|
|
82
|
-
}, config?: DataUpdateConfig): Promise<{
|
|
78
|
+
manageGridData(dataRowConfig: DataRowConfig, dataUpdateConfig?: DataUpdateConfig): Promise<{
|
|
83
79
|
addedRows: IRowNode[];
|
|
84
80
|
updatedRows: IRowNode[];
|
|
85
81
|
removedRows: IRowNode[];
|
|
@@ -7,6 +7,7 @@ import ObjectFactory from '../../Utilities/ObjectFactory';
|
|
|
7
7
|
import { isAdaptableCellChangedAlert, isAdaptableRowChangedAlert, } from '../../AdaptableState/Common/AdaptableAlert';
|
|
8
8
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
9
9
|
import { AlertInternalApi } from '../Internal/AlertInternalApi';
|
|
10
|
+
import { resolveContainerElement } from '../../Utilities/resolveContainerElement';
|
|
10
11
|
export class AlertApiImpl extends ApiBase {
|
|
11
12
|
internalApi;
|
|
12
13
|
constructor(_adaptable) {
|
|
@@ -62,12 +63,7 @@ export class AlertApiImpl extends ApiBase {
|
|
|
62
63
|
}
|
|
63
64
|
// Show Alert in a Div (if one has been set)
|
|
64
65
|
if (alertProperties.ShowInDiv) {
|
|
65
|
-
|
|
66
|
-
let optionsDiv = this.getContainerOptions().alertContainer;
|
|
67
|
-
if (optionsDiv) {
|
|
68
|
-
alertDiv =
|
|
69
|
-
typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
|
|
70
|
-
}
|
|
66
|
+
const alertDiv = resolveContainerElement(this.getContainerOptions().alertContainer, this.getAdaptableInternalApi().buildBaseContext());
|
|
71
67
|
if (alertDiv) {
|
|
72
68
|
let alertString = alertToShow.header + ': ' + alertToShow.message;
|
|
73
69
|
alertDiv.innerHTML = alertString;
|
|
@@ -83,7 +83,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
83
83
|
getPrimaryKeyColumn(): AdaptableColumn<any>;
|
|
84
84
|
getDefaultAggFunc(columnId: string): string;
|
|
85
85
|
openColumnInfoSettingsPanel(): void;
|
|
86
|
-
getColumnTypes(): import("../../AdaptableState/Common/Types").TypeHint<string, import("../../types").
|
|
86
|
+
getColumnTypes(): import("../../AdaptableState/Common/Types").TypeHint<string, import("../../types").AdaptableColumnTypeName>[];
|
|
87
87
|
getColumnsByColumnType(columnType: string): AdaptableColumn[];
|
|
88
88
|
getRowGroupedColumns(): AdaptableColumn[];
|
|
89
89
|
setColumnCaption(columnId: string, caption: string): void;
|
|
@@ -4,7 +4,7 @@ import { SelectedCellInfo } from '../../AdaptableState/Selection/SelectedCellInf
|
|
|
4
4
|
import { SelectedRowInfo } from '../../AdaptableState/Selection/SelectedRowInfo';
|
|
5
5
|
import { CellUpdateRequest, GridCell } from '../../AdaptableState/Selection/GridCell';
|
|
6
6
|
import { ColumnSort } from '../../AdaptableState/Common/ColumnSort';
|
|
7
|
-
import { DataUpdateConfig } from '../../AdaptableState/Common/DataUpdateConfig';
|
|
7
|
+
import { DataRowConfig, DataUpdateConfig } from '../../AdaptableState/Common/DataUpdateConfig';
|
|
8
8
|
import { CellHighlightInfo } from '../../AdaptableState/Common/CellHighlightInfo';
|
|
9
9
|
import { RowHighlightInfo } from '../../AdaptableState/Common/RowHighlightInfo';
|
|
10
10
|
import { ColDef, ColGroupDef, Column, ColumnState, IRowNode, RowModelType } from 'ag-grid-enterprise';
|
|
@@ -35,11 +35,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
35
35
|
addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
36
36
|
undoCellEdit(cellDataChangedInfo: CellDataChangedInfo): boolean;
|
|
37
37
|
deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
38
|
-
manageGridData(
|
|
39
|
-
add?: any[];
|
|
40
|
-
update?: any[];
|
|
41
|
-
delete?: any[];
|
|
42
|
-
}, config?: DataUpdateConfig): Promise<{
|
|
38
|
+
manageGridData(dataRowConfig: DataRowConfig, dataUpdateConfig?: DataUpdateConfig): Promise<{
|
|
43
39
|
addedRows: IRowNode[];
|
|
44
40
|
updatedRows: IRowNode[];
|
|
45
41
|
removedRows: IRowNode[];
|
|
@@ -95,18 +95,18 @@ export class GridApiImpl extends ApiBase {
|
|
|
95
95
|
}
|
|
96
96
|
return [];
|
|
97
97
|
}
|
|
98
|
-
async manageGridData(
|
|
99
|
-
const transactionResult = await this._adaptable.manageGridRows(
|
|
98
|
+
async manageGridData(dataRowConfig, dataUpdateConfig) {
|
|
99
|
+
const transactionResult = await this._adaptable.manageGridRows(dataRowConfig, dataUpdateConfig);
|
|
100
100
|
if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
|
|
101
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.delete, transactionResult.removedRows, 'Delete');
|
|
101
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.delete, transactionResult.removedRows, 'Delete');
|
|
102
102
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
103
103
|
}
|
|
104
104
|
if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
|
|
105
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.update, transactionResult.updatedRows, 'Update');
|
|
105
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.update, transactionResult.updatedRows, 'Update');
|
|
106
106
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
107
107
|
}
|
|
108
108
|
if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
|
|
109
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.add, transactionResult.addedRows, 'Add');
|
|
109
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.add, transactionResult.addedRows, 'Add');
|
|
110
110
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
111
111
|
}
|
|
112
112
|
return transactionResult;
|
|
@@ -607,9 +607,9 @@ export class GridApiImpl extends ApiBase {
|
|
|
607
607
|
showTransposedView(transposeConfig = {}) {
|
|
608
608
|
const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
|
|
609
609
|
const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
|
|
610
|
-
const visibleColumns = transposeConfig.visibleColumns ?? false;
|
|
611
|
-
const visibleRows = transposeConfig.visibleRows ?? false;
|
|
612
610
|
const autosize = transposeConfig.autosize ?? true;
|
|
611
|
+
const columnsToTranspose = transposeConfig.columnsToTranspose;
|
|
612
|
+
const rowsToTranspose = transposeConfig.rowsToTranspose;
|
|
613
613
|
this.getAdaptableInternalApi().showPopupWindow({
|
|
614
614
|
id: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
615
615
|
factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
@@ -618,9 +618,9 @@ export class GridApiImpl extends ApiBase {
|
|
|
618
618
|
popupProps: {
|
|
619
619
|
transposedColumnId,
|
|
620
620
|
hideTransposedColumn,
|
|
621
|
-
visibleColumns,
|
|
622
|
-
visibleRows,
|
|
623
621
|
autosize,
|
|
622
|
+
columnsToTranspose,
|
|
623
|
+
rowsToTranspose,
|
|
624
624
|
},
|
|
625
625
|
});
|
|
626
626
|
}
|
|
@@ -24,6 +24,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
24
24
|
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
25
25
|
getCurrentLayoutName(): string;
|
|
26
26
|
getLayoutByName(layoutName: string): Layout | null;
|
|
27
|
+
setExtendedLayout(extendedLayout: ExtendedLayout): void;
|
|
27
28
|
createOrUpdateExtendedLayout(extendedLayoutInfo: ExtendedLayout): void;
|
|
28
29
|
getExtendedLayoutByName(layoutName: string): ExtendedLayout | undefined;
|
|
29
30
|
cloneExtendedLayout(extendedLayoutToClone: ExtendedLayout, layoutName: string): ExtendedLayout | false;
|
|
@@ -90,6 +90,9 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
setExtendedLayout(extendedLayout) {
|
|
94
|
+
this.setLayout(extendedLayout.Layout.Name);
|
|
95
|
+
}
|
|
93
96
|
createOrUpdateExtendedLayout(extendedLayoutInfo) {
|
|
94
97
|
const config = {
|
|
95
98
|
includeLayoutNotExtendedObjects: true,
|
|
@@ -7,6 +7,7 @@ import { createElement } from 'react';
|
|
|
7
7
|
import UIHelper from '../../View/UIHelper';
|
|
8
8
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
9
9
|
import { SystemStatusInternalApi } from '../Internal/SystemStatusInternalApi';
|
|
10
|
+
import { resolveContainerElement } from '../../Utilities/resolveContainerElement';
|
|
10
11
|
export class SystemStatusApiImpl extends ApiBase {
|
|
11
12
|
systemStatusDiv;
|
|
12
13
|
internalApi;
|
|
@@ -48,11 +49,7 @@ export class SystemStatusApiImpl extends ApiBase {
|
|
|
48
49
|
}
|
|
49
50
|
displayMessageInDiv(statusMessage, statusFurtherInformation, messageType) {
|
|
50
51
|
if (!this.systemStatusDiv) {
|
|
51
|
-
|
|
52
|
-
if (optionsDiv) {
|
|
53
|
-
this.systemStatusDiv =
|
|
54
|
-
typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
|
|
55
|
-
}
|
|
52
|
+
this.systemStatusDiv = resolveContainerElement(this.getContainerOptions().systemStatusContainer, this.getAdaptableInternalApi().buildBaseContext());
|
|
56
53
|
}
|
|
57
54
|
if (this.systemStatusDiv) {
|
|
58
55
|
if (StringExtensions.IsNotNullOrEmpty(statusFurtherInformation)) {
|
|
@@ -6,6 +6,7 @@ import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
|
|
|
6
6
|
import { UserInterfaceApi } from '../UserInterfaceApi';
|
|
7
7
|
import { ProgressIndicatorConfig } from '../../AdaptableState/Common/ProgressIndicatorConfig';
|
|
8
8
|
import { ApiBase } from './ApiBase';
|
|
9
|
+
import { UserInterfaceState } from '../../AdaptableState/UserInterfaceState';
|
|
9
10
|
export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfaceApi {
|
|
10
11
|
internalApi: UserInterfaceInternalApi;
|
|
11
12
|
private showProgressIndicatorTimeout;
|
|
@@ -26,4 +27,8 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
26
27
|
close: () => void;
|
|
27
28
|
};
|
|
28
29
|
closeCustomWindowPopup(windowId: string): void;
|
|
30
|
+
getUserInterfaceState(): UserInterfaceState;
|
|
31
|
+
isAdaptableUIVisible(): boolean;
|
|
32
|
+
hideAdaptableUI(): void;
|
|
33
|
+
showAdaptableUI(): void;
|
|
29
34
|
}
|
|
@@ -4,6 +4,7 @@ import { CUSTOM_WINDOW_FACTORY_ID } from '../../View/Components/Popups/WindowPop
|
|
|
4
4
|
import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
|
|
5
5
|
import { ApiBase } from './ApiBase';
|
|
6
6
|
import { ProgressIndicatorHide, ProgressIndicatorShow, } from '../../Redux/ActionsReducers/PopupRedux';
|
|
7
|
+
import * as UserInterfaceRedux from '../../Redux/ActionsReducers/UserInterfaceRedux';
|
|
7
8
|
export class UserInterfaceApiImpl extends ApiBase {
|
|
8
9
|
internalApi;
|
|
9
10
|
showProgressIndicatorTimeout = null;
|
|
@@ -128,4 +129,16 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
128
129
|
closeCustomWindowPopup(windowId) {
|
|
129
130
|
this.dispatchAction(PopupRedux.PopupHideWindow(windowId));
|
|
130
131
|
}
|
|
132
|
+
getUserInterfaceState() {
|
|
133
|
+
return this.getAdaptableState().UserInterface;
|
|
134
|
+
}
|
|
135
|
+
isAdaptableUIVisible() {
|
|
136
|
+
return !(this.getUserInterfaceState().HideAdaptableUI ?? false);
|
|
137
|
+
}
|
|
138
|
+
hideAdaptableUI() {
|
|
139
|
+
this.dispatchAction(UserInterfaceRedux.UserInterfaceSetHideAdaptableUI(true));
|
|
140
|
+
}
|
|
141
|
+
showAdaptableUI() {
|
|
142
|
+
this.dispatchAction(UserInterfaceRedux.UserInterfaceSetHideAdaptableUI(false));
|
|
143
|
+
}
|
|
131
144
|
}
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -57,6 +57,12 @@ export interface LayoutApi {
|
|
|
57
57
|
*/
|
|
58
58
|
getLayoutByName(layoutName: string): Layout | null;
|
|
59
59
|
/**
|
|
60
|
+
* Sets (i.e. selects) the Extended Layout
|
|
61
|
+
* @param extendedLayout Extended Layout to set
|
|
62
|
+
*/
|
|
63
|
+
setExtendedLayout(extendedLayout: ExtendedLayout): void;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
60
66
|
* Retrieves Layout with the given name
|
|
61
67
|
* @param layoutName Layout to retrieve
|
|
62
68
|
* @returns layout
|
|
@@ -3,6 +3,7 @@ import { AdaptableObject, AdaptableObjectTag } from '../AdaptableState/Common/Ad
|
|
|
3
3
|
import { AdaptableModule, CustomIcon } from '../types';
|
|
4
4
|
import { CustomWindowConfig } from '../AdaptableState/Common/CustomWindowConfig';
|
|
5
5
|
import { ProgressIndicatorConfig } from '../AdaptableState/Common/ProgressIndicatorConfig';
|
|
6
|
+
import { UserInterfaceState } from '../AdaptableState/UserInterfaceState';
|
|
6
7
|
/**
|
|
7
8
|
* Functions relating to User Interface section of Adaptable State
|
|
8
9
|
*/
|
|
@@ -78,4 +79,20 @@ export interface UserInterfaceApi {
|
|
|
78
79
|
* @param windowId window popup id
|
|
79
80
|
*/
|
|
80
81
|
closeCustomWindowPopup(windowId: string): void;
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves the current User Interface State
|
|
84
|
+
*/
|
|
85
|
+
getUserInterfaceState(): UserInterfaceState;
|
|
86
|
+
/**
|
|
87
|
+
* Returns whether the AdapTable UI is currently visible
|
|
88
|
+
*/
|
|
89
|
+
isAdaptableUIVisible(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Hides all AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Column and Context Menus etc.)
|
|
92
|
+
*/
|
|
93
|
+
hideAdaptableUI(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Shows all AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Column and Context Menus etc.)
|
|
96
|
+
*/
|
|
97
|
+
showAdaptableUI(): void;
|
|
81
98
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Redux from 'redux';
|
|
2
|
+
import { UserInterfaceState } from '../../AdaptableState/UserInterfaceState';
|
|
3
|
+
/**
|
|
4
|
+
* @ReduxAction Sets whether all AdapTable UI elements are hidden
|
|
5
|
+
*/
|
|
6
|
+
export declare const USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = "USER_INTERFACE_SET_HIDE_ADAPTABLE_UI";
|
|
7
|
+
export interface UserInterfaceSetHideAdaptableUIAction extends Redux.Action {
|
|
8
|
+
hideAdaptableUI: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const UserInterfaceSetHideAdaptableUI: (hideAdaptableUI: boolean) => UserInterfaceSetHideAdaptableUIAction;
|
|
11
|
+
export declare const UserInterfaceReducer: Redux.Reducer<UserInterfaceState>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ReduxAction Sets whether all AdapTable UI elements are hidden
|
|
3
|
+
*/
|
|
4
|
+
export const USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = 'USER_INTERFACE_SET_HIDE_ADAPTABLE_UI';
|
|
5
|
+
export const UserInterfaceSetHideAdaptableUI = (hideAdaptableUI) => ({
|
|
6
|
+
type: USER_INTERFACE_SET_HIDE_ADAPTABLE_UI,
|
|
7
|
+
hideAdaptableUI,
|
|
8
|
+
});
|
|
9
|
+
const initialState = {
|
|
10
|
+
HideAdaptableUI: false,
|
|
11
|
+
};
|
|
12
|
+
export const UserInterfaceReducer = (state = initialState, action) => {
|
|
13
|
+
switch (action.type) {
|
|
14
|
+
case USER_INTERFACE_SET_HIDE_ADAPTABLE_UI:
|
|
15
|
+
return Object.assign({}, state, {
|
|
16
|
+
HideAdaptableUI: action.hideAdaptableUI,
|
|
17
|
+
});
|
|
18
|
+
default:
|
|
19
|
+
return state;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -38,6 +38,7 @@ import * as InternalRedux from '../ActionsReducers/InternalRedux';
|
|
|
38
38
|
import * as TeamSharingRedux from '../ActionsReducers/TeamSharingRedux';
|
|
39
39
|
import * as ThemeRedux from '../ActionsReducers/ThemeRedux';
|
|
40
40
|
import * as ToolPanelRedux from '../ActionsReducers/ToolPanelRedux';
|
|
41
|
+
import * as UserInterfaceRedux from '../ActionsReducers/UserInterfaceRedux';
|
|
41
42
|
import { areAdaptableProfileTracksEnabled, getMarker } from '../../devTools';
|
|
42
43
|
import { isAdaptableSharedEntity, isCustomSharedEntity, } from '../../AdaptableState/TeamSharingState';
|
|
43
44
|
import { buildAdaptableStateFunctionConfig } from './buildAdaptableStateFunctionConfig';
|
|
@@ -121,6 +122,7 @@ export class AdaptableStore {
|
|
|
121
122
|
TeamSharing: TeamSharingRedux.TeamSharingReducer,
|
|
122
123
|
Theme: ThemeRedux.ThemeReducer,
|
|
123
124
|
ToolPanel: ToolPanelRedux.ToolPanelReducer,
|
|
125
|
+
UserInterface: UserInterfaceRedux.UserInterfaceReducer,
|
|
124
126
|
};
|
|
125
127
|
// allow plugins to participate in the root reducer
|
|
126
128
|
adaptable.forPlugins((plugin) => {
|
|
@@ -992,6 +994,31 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
992
994
|
module.setUpScheduleJobs();
|
|
993
995
|
return returnAction;
|
|
994
996
|
}
|
|
997
|
+
/*******************
|
|
998
|
+
* USER INTERFACE ACTIONS
|
|
999
|
+
*******************/
|
|
1000
|
+
case UserInterfaceRedux.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI: {
|
|
1001
|
+
const returnAction = next(action);
|
|
1002
|
+
const { hideAdaptableUI } = action;
|
|
1003
|
+
// Hide or show Dashboard
|
|
1004
|
+
middlewareAPI.dispatch(DashboardRedux.DashboardSetIsHidden(hideAdaptableUI));
|
|
1005
|
+
// Hide or show Adaptable ToolPanel in the AG Grid sidebar
|
|
1006
|
+
if (hideAdaptableUI) {
|
|
1007
|
+
adaptable.hideAdaptableToolPanel();
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
adaptable.showAdaptableToolPanel();
|
|
1011
|
+
}
|
|
1012
|
+
// Hide or show Adaptable StatusBar panels
|
|
1013
|
+
if (hideAdaptableUI) {
|
|
1014
|
+
adaptable.hideAdaptableStatusBar();
|
|
1015
|
+
}
|
|
1016
|
+
else {
|
|
1017
|
+
adaptable.showAdaptableStatusBar();
|
|
1018
|
+
}
|
|
1019
|
+
// Column and Context Menus are handled in the AgGridMenuAdapter
|
|
1020
|
+
return returnAction;
|
|
1021
|
+
}
|
|
995
1022
|
/*******************
|
|
996
1023
|
* DASHBOARD ACTIONS
|
|
997
1024
|
*******************/
|