@adaptabletools/adaptable-cjs 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.
Files changed (69) hide show
  1. package/agGrid.d.ts +9 -9
  2. package/agGrid.js +1 -0
  3. package/index.css +63 -71
  4. package/index.css.map +1 -1
  5. package/index.d.ts +66 -0
  6. package/index.js +85 -0
  7. package/package.json +3 -3
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
  9. package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
  11. package/src/AdaptableState/AdaptableState.d.ts +2 -0
  12. package/src/AdaptableState/Common/AdaptableColumn.d.ts +10 -10
  13. package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
  14. package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
  15. package/src/AdaptableState/Common/AdaptableRowContext.js +2 -0
  16. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
  17. package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
  18. package/src/AdaptableState/InitialState.d.ts +9 -0
  19. package/src/AdaptableState/LayoutState.d.ts +1 -2
  20. package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
  21. package/src/AdaptableState/UserInterfaceState.js +2 -0
  22. package/src/Api/GridApi.d.ts +5 -9
  23. package/src/Api/Implementation/AlertApiImpl.js +2 -6
  24. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  25. package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
  26. package/src/Api/Implementation/GridApiImpl.js +9 -9
  27. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
  28. package/src/Api/Implementation/LayoutApiImpl.js +3 -0
  29. package/src/Api/Implementation/SystemStatusApiImpl.js +2 -5
  30. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
  31. package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
  32. package/src/Api/LayoutApi.d.ts +6 -0
  33. package/src/Api/UserInterfaceApi.d.ts +17 -0
  34. package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
  35. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +26 -0
  36. package/src/Redux/Store/AdaptableStore.js +27 -0
  37. package/src/Utilities/resolveContainerElement.d.ts +23 -0
  38. package/src/Utilities/resolveContainerElement.js +47 -0
  39. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  40. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
  41. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
  42. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
  43. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
  44. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +35 -0
  45. package/src/View/Components/WizardSummaryPage.js +1 -1
  46. package/src/View/Dashboard/CustomToolbar.js +1 -1
  47. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  48. package/src/View/Layout/TransposedPopup.js +144 -138
  49. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
  50. package/src/View/UIHelper.d.ts +2 -1
  51. package/src/View/UIHelper.js +8 -14
  52. package/src/agGrid/Adaptable.js +11 -11
  53. package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
  54. package/src/agGrid/AdaptableAgGrid.js +112 -31
  55. package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
  56. package/src/agGrid/AgGridMenuAdapter.js +9 -1
  57. package/src/components/CheckBox/index.js +1 -1
  58. package/src/components/Dropdown/Arrows.js +1 -1
  59. package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
  60. package/src/components/FormLayout/index.js +1 -1
  61. package/src/components/Select/Select.js +1 -1
  62. package/src/components/Tree/TreeDropdown/index.js +1 -1
  63. package/src/env.js +2 -2
  64. package/src/metamodel/adaptable.metamodel.d.ts +62 -0
  65. package/src/metamodel/adaptable.metamodel.js +1 -1
  66. package/src/types.d.ts +6 -3
  67. package/themes/dark.css +30 -29
  68. package/themes/light.css +4 -2
  69. package/tsconfig.cjs.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; string Id or HTMLElement
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?: string | HTMLElement;
49
+ adaptableContainer?: AdaptableContainerValue | ((context: InitContainerContext) => AdaptableContainerValue);
12
50
  /**
13
- * Div containing AG Grid instance; string Id or HTMLElement
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?: string | HTMLElement;
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?: string | HTMLElement;
61
+ modalContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue);
26
62
  /**
27
- * Div to show System Status messages; string Id or HTMLElement
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?: string | HTMLElement;
67
+ systemStatusContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue);
33
68
  /**
34
- * Div to display Alert messages; string Id or HTMLElement
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?: string | HTMLElement;
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 AdaptableColumnType = 'hiddenColumn' | 'calculatedColumn' | 'freeTextColumn' | 'actionColumn' | 'fdc3Column' | 'pivotAnyTotal' | 'pivotGrandTotal' | 'pivotColumnTotal' | 'pivotAggregationTotal';
13
- export declare const HIDDEN_COLUMN_TYPE: AdaptableColumnType;
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: AdaptableColumnType;
16
- export declare const FREE_TEXT_COLUMN_TYPE: AdaptableColumnType;
17
- export declare const ACTION_COLUMN_TYPE: AdaptableColumnType;
18
- export declare const FDC3_COLUMN_TYPE: AdaptableColumnType;
19
- export declare const PIVOT_ANY_TOTAL_COLUMN_TYPE: AdaptableColumnType;
20
- export declare const PIVOT_GRAND_TOTAL_COLUMN_TYPE: AdaptableColumnType;
21
- export declare const PIVOT_COLUMN_TOTAL_COLUMN_TYPE: AdaptableColumnType;
22
- export declare const PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE: AdaptableColumnType;
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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -19,3 +19,10 @@ export interface DataUpdateConfig {
19
19
  */
20
20
  addIndex?: number;
21
21
  }
22
+ export interface DataRowConfig {
23
+ dataRows: {
24
+ add?: any[];
25
+ update?: any[];
26
+ delete?: any[];
27
+ };
28
+ }
@@ -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
- * Only show curerntly visible Columns
17
- * @defaultValue false
18
+ * Autosize columns in transposed view
19
+ * @defaultValue true
18
20
  */
19
- visibleColumns?: boolean;
21
+ autosize?: boolean;
20
22
  /**
21
- * Only show curerntly visible Rows
22
- * @defaultValue false
23
+ * ColumnIds of Columns to Transpose
24
+ * @defaultValue all Columns in Grid
23
25
  */
24
- visibleRows?: boolean;
26
+ columnsToTranspose?: string[] | ((context: AdaptableColumnsContext) => string[]);
25
27
  /**
26
- * Autosize columns in transposed view
27
- * @defaultValue true
28
+ * Rows to Transpose: All, VisibleOnly or via an Expression
29
+ * @defaultValue All
28
30
  */
29
- autosize?: boolean;
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 Column Ids to control their display order.
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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- * Applies a data transaction (add, update, remove) to AdapTable (and AG Grid)
75
- * @param dataRows - Rows to add, update or remove (via transaction)
76
- * @param config - batch option and callback function to run post transaction
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(dataRows: {
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[];
@@ -11,6 +11,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectF
11
11
  const AdaptableAlert_1 = require("../../AdaptableState/Common/AdaptableAlert");
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
13
13
  const AlertInternalApi_1 = require("../Internal/AlertInternalApi");
14
+ const resolveContainerElement_1 = require("../../Utilities/resolveContainerElement");
14
15
  class AlertApiImpl extends ApiBase_1.ApiBase {
15
16
  internalApi;
16
17
  constructor(_adaptable) {
@@ -66,12 +67,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
66
67
  }
67
68
  // Show Alert in a Div (if one has been set)
68
69
  if (alertProperties.ShowInDiv) {
69
- let alertDiv;
70
- let optionsDiv = this.getContainerOptions().alertContainer;
71
- if (optionsDiv) {
72
- alertDiv =
73
- typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
74
- }
70
+ const alertDiv = (0, resolveContainerElement_1.resolveContainerElement)(this.getContainerOptions().alertContainer, this.getAdaptableInternalApi().buildBaseContext());
75
71
  if (alertDiv) {
76
72
  let alertString = alertToShow.header + ': ' + alertToShow.message;
77
73
  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").AdaptableColumnType>[];
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(dataRows: {
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[];
@@ -99,18 +99,18 @@ class GridApiImpl extends ApiBase_1.ApiBase {
99
99
  }
100
100
  return [];
101
101
  }
102
- async manageGridData(dataRows, config) {
103
- const transactionResult = await this._adaptable.manageGridRows(dataRows, config);
102
+ async manageGridData(dataRowConfig, dataUpdateConfig) {
103
+ const transactionResult = await this._adaptable.manageGridRows(dataRowConfig, dataUpdateConfig);
104
104
  if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
105
- const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.delete, transactionResult.removedRows, 'Delete');
105
+ const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.delete, transactionResult.removedRows, 'Delete');
106
106
  this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
107
107
  }
108
108
  if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
109
- const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.update, transactionResult.updatedRows, 'Update');
109
+ const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.update, transactionResult.updatedRows, 'Update');
110
110
  this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
111
111
  }
112
112
  if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
113
- const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.add, transactionResult.addedRows, 'Add');
113
+ const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.add, transactionResult.addedRows, 'Add');
114
114
  this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
115
115
  }
116
116
  return transactionResult;
@@ -611,9 +611,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
611
611
  showTransposedView(transposeConfig = {}) {
612
612
  const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
613
613
  const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
614
- const visibleColumns = transposeConfig.visibleColumns ?? false;
615
- const visibleRows = transposeConfig.visibleRows ?? false;
616
614
  const autosize = transposeConfig.autosize ?? true;
615
+ const columnsToTranspose = transposeConfig.columnsToTranspose;
616
+ const rowsToTranspose = transposeConfig.rowsToTranspose;
617
617
  this.getAdaptableInternalApi().showPopupWindow({
618
618
  id: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
619
619
  factoryId: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
@@ -622,9 +622,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
622
622
  popupProps: {
623
623
  transposedColumnId,
624
624
  hideTransposedColumn,
625
- visibleColumns,
626
- visibleRows,
627
625
  autosize,
626
+ columnsToTranspose,
627
+ rowsToTranspose,
628
628
  },
629
629
  });
630
630
  }
@@ -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;
@@ -94,6 +94,9 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
94
94
  }
95
95
  }
96
96
  }
97
+ setExtendedLayout(extendedLayout) {
98
+ this.setLayout(extendedLayout.Layout.Name);
99
+ }
97
100
  createOrUpdateExtendedLayout(extendedLayoutInfo) {
98
101
  const config = {
99
102
  includeLayoutNotExtendedObjects: true,
@@ -11,6 +11,7 @@ const react_1 = require("react");
11
11
  const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
13
13
  const SystemStatusInternalApi_1 = require("../Internal/SystemStatusInternalApi");
14
+ const resolveContainerElement_1 = require("../../Utilities/resolveContainerElement");
14
15
  class SystemStatusApiImpl extends ApiBase_1.ApiBase {
15
16
  systemStatusDiv;
16
17
  internalApi;
@@ -52,11 +53,7 @@ class SystemStatusApiImpl extends ApiBase_1.ApiBase {
52
53
  }
53
54
  displayMessageInDiv(statusMessage, statusFurtherInformation, messageType) {
54
55
  if (!this.systemStatusDiv) {
55
- let optionsDiv = this.getContainerOptions().systemStatusContainer;
56
- if (optionsDiv) {
57
- this.systemStatusDiv =
58
- typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
59
- }
56
+ this.systemStatusDiv = (0, resolveContainerElement_1.resolveContainerElement)(this.getContainerOptions().systemStatusContainer, this.getAdaptableInternalApi().buildBaseContext());
60
57
  }
61
58
  if (this.systemStatusDiv) {
62
59
  if (StringExtensions_1.default.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
  }
@@ -8,6 +8,7 @@ const WindowPopups_1 = require("../../View/Components/Popups/WindowPopups/Window
8
8
  const UserInterfaceInternalApi_1 = require("../Internal/UserInterfaceInternalApi");
9
9
  const ApiBase_1 = require("./ApiBase");
10
10
  const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
11
+ const UserInterfaceRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/UserInterfaceRedux"));
11
12
  class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
12
13
  internalApi;
13
14
  showProgressIndicatorTimeout = null;
@@ -132,5 +133,17 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
132
133
  closeCustomWindowPopup(windowId) {
133
134
  this.dispatchAction(PopupRedux.PopupHideWindow(windowId));
134
135
  }
136
+ getUserInterfaceState() {
137
+ return this.getAdaptableState().UserInterface;
138
+ }
139
+ isAdaptableUIVisible() {
140
+ return !(this.getUserInterfaceState().HideAdaptableUI ?? false);
141
+ }
142
+ hideAdaptableUI() {
143
+ this.dispatchAction(UserInterfaceRedux.UserInterfaceSetHideAdaptableUI(true));
144
+ }
145
+ showAdaptableUI() {
146
+ this.dispatchAction(UserInterfaceRedux.UserInterfaceSetHideAdaptableUI(false));
147
+ }
135
148
  }
136
149
  exports.UserInterfaceApiImpl = UserInterfaceApiImpl;
@@ -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,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserInterfaceReducer = exports.UserInterfaceSetHideAdaptableUI = exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = void 0;
4
+ /**
5
+ * @ReduxAction Sets whether all AdapTable UI elements are hidden
6
+ */
7
+ exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = 'USER_INTERFACE_SET_HIDE_ADAPTABLE_UI';
8
+ const UserInterfaceSetHideAdaptableUI = (hideAdaptableUI) => ({
9
+ type: exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI,
10
+ hideAdaptableUI,
11
+ });
12
+ exports.UserInterfaceSetHideAdaptableUI = UserInterfaceSetHideAdaptableUI;
13
+ const initialState = {
14
+ HideAdaptableUI: false,
15
+ };
16
+ const UserInterfaceReducer = (state = initialState, action) => {
17
+ switch (action.type) {
18
+ case exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI:
19
+ return Object.assign({}, state, {
20
+ HideAdaptableUI: action.hideAdaptableUI,
21
+ });
22
+ default:
23
+ return state;
24
+ }
25
+ };
26
+ exports.UserInterfaceReducer = UserInterfaceReducer;
@@ -42,6 +42,7 @@ const InternalRedux = tslib_1.__importStar(require("../ActionsReducers/InternalR
42
42
  const TeamSharingRedux = tslib_1.__importStar(require("../ActionsReducers/TeamSharingRedux"));
43
43
  const ThemeRedux = tslib_1.__importStar(require("../ActionsReducers/ThemeRedux"));
44
44
  const ToolPanelRedux = tslib_1.__importStar(require("../ActionsReducers/ToolPanelRedux"));
45
+ const UserInterfaceRedux = tslib_1.__importStar(require("../ActionsReducers/UserInterfaceRedux"));
45
46
  const devTools_1 = require("../../devTools");
46
47
  const TeamSharingState_1 = require("../../AdaptableState/TeamSharingState");
47
48
  const buildAdaptableStateFunctionConfig_1 = require("./buildAdaptableStateFunctionConfig");
@@ -127,6 +128,7 @@ class AdaptableStore {
127
128
  TeamSharing: TeamSharingRedux.TeamSharingReducer,
128
129
  Theme: ThemeRedux.ThemeReducer,
129
130
  ToolPanel: ToolPanelRedux.ToolPanelReducer,
131
+ UserInterface: UserInterfaceRedux.UserInterfaceReducer,
130
132
  };
131
133
  // allow plugins to participate in the root reducer
132
134
  adaptable.forPlugins((plugin) => {
@@ -999,6 +1001,31 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
999
1001
  module.setUpScheduleJobs();
1000
1002
  return returnAction;
1001
1003
  }
1004
+ /*******************
1005
+ * USER INTERFACE ACTIONS
1006
+ *******************/
1007
+ case UserInterfaceRedux.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI: {
1008
+ const returnAction = next(action);
1009
+ const { hideAdaptableUI } = action;
1010
+ // Hide or show Dashboard
1011
+ middlewareAPI.dispatch(DashboardRedux.DashboardSetIsHidden(hideAdaptableUI));
1012
+ // Hide or show Adaptable ToolPanel in the AG Grid sidebar
1013
+ if (hideAdaptableUI) {
1014
+ adaptable.hideAdaptableToolPanel();
1015
+ }
1016
+ else {
1017
+ adaptable.showAdaptableToolPanel();
1018
+ }
1019
+ // Hide or show Adaptable StatusBar panels
1020
+ if (hideAdaptableUI) {
1021
+ adaptable.hideAdaptableStatusBar();
1022
+ }
1023
+ else {
1024
+ adaptable.showAdaptableStatusBar();
1025
+ }
1026
+ // Column and Context Menus are handled in the AgGridMenuAdapter
1027
+ return returnAction;
1028
+ }
1002
1029
  /*******************
1003
1030
  * DASHBOARD ACTIONS
1004
1031
  *******************/