@adaptabletools/adaptable 18.1.9 → 18.1.10
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/AdaptableInterfaces/IAdaptable.d.ts +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +7 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -0
- package/src/Api/GridApi.d.ts +2 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +4 -0
- package/src/View/Components/ExternalRenderer.js +3 -1
- package/src/View/Dashboard/CustomToolbar.js +3 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -0
- package/src/agGrid/AdaptableAgGrid.js +14 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -8
- 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.1.
|
|
3
|
+
"version": "18.1.10",
|
|
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",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ChartModel, ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType, StatusPanelDef } from '@ag-grid-community/core';
|
|
2
3
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
4
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
@@ -90,6 +91,7 @@ export interface IAdaptable {
|
|
|
90
91
|
RowEditService: RowEditService;
|
|
91
92
|
Fdc3Service: Fdc3Service;
|
|
92
93
|
CellPopupService: CellPopupService;
|
|
94
|
+
_PRIVATE_adaptableJSXElement: JSX.Element;
|
|
93
95
|
/**
|
|
94
96
|
* INTERNAL ADAPTABLE EVENTS
|
|
95
97
|
* These are not called externally - for that we use eventapi
|
|
@@ -3,42 +3,42 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface ContainerOptions {
|
|
5
5
|
/**
|
|
6
|
-
* Div containing AdapTable
|
|
6
|
+
* Div containing AdapTable; string Id or HTMLElement
|
|
7
7
|
*
|
|
8
8
|
* @defaultValue "adaptable"
|
|
9
9
|
* @gridInfoItem
|
|
10
10
|
*/
|
|
11
11
|
adaptableContainer?: string | HTMLElement;
|
|
12
12
|
/**
|
|
13
|
-
* Div containing AG Grid instance
|
|
13
|
+
* Div containing AG Grid instance; string Id or HTMLElement
|
|
14
14
|
*
|
|
15
15
|
* @defaultValue "grid"
|
|
16
16
|
* @gridInfoItem
|
|
17
17
|
*/
|
|
18
18
|
agGridContainer?: string | HTMLElement;
|
|
19
19
|
/**
|
|
20
|
-
* How long
|
|
20
|
+
* How long to wait for AG Grid before giving up trying to connect
|
|
21
21
|
*
|
|
22
22
|
* @defaultValue 60s
|
|
23
23
|
* @gridInfoItem
|
|
24
24
|
*/
|
|
25
25
|
agGridContainerWaitTimeout?: number;
|
|
26
26
|
/**
|
|
27
|
-
* Name of div where
|
|
27
|
+
* Name of div where popups appear
|
|
28
28
|
*
|
|
29
|
-
* @defaultValue undefined
|
|
29
|
+
* @defaultValue undefined (centre of screen)
|
|
30
30
|
* @gridInfoItem
|
|
31
31
|
*/
|
|
32
32
|
modalContainer?: string | HTMLElement;
|
|
33
33
|
/**
|
|
34
|
-
* Div to show System Status messages
|
|
34
|
+
* Div to show System Status messages; string Id or HTMLElement
|
|
35
35
|
*
|
|
36
36
|
* @defaultValue undefined
|
|
37
37
|
* @gridInfoItem
|
|
38
38
|
*/
|
|
39
39
|
systemStatusContainer?: string | HTMLElement;
|
|
40
40
|
/**
|
|
41
|
-
* Div to
|
|
41
|
+
* Div to display Alert messages; string Id or HTMLElement
|
|
42
42
|
*
|
|
43
43
|
* @defaultValue undefined
|
|
44
44
|
* @gridInfoItem
|
|
@@ -27,6 +27,7 @@ export interface DataChangeHistoryOptions<TData = any> {
|
|
|
27
27
|
changeHistoryButton?: DataChangeHistoryButton<TData> | DataChangeHistoryButton<TData>[];
|
|
28
28
|
/**
|
|
29
29
|
* Whether to show all changes for each cell or just the last one
|
|
30
|
+
* @defaultValue true
|
|
30
31
|
*/
|
|
31
32
|
showLastDataChangeOnly?: boolean;
|
|
32
33
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -11,10 +11,12 @@ import { Column, IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
|
11
11
|
import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
|
|
12
12
|
import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
|
|
13
13
|
import { TransposeConfig } from '../PredefinedConfig/Common/TransposeConfig';
|
|
14
|
+
import { AdaptableVariant } from '../AdaptableInterfaces/IAdaptable';
|
|
14
15
|
/**
|
|
15
16
|
* Provides access to important properites of AdapTable e.g. sorting, selected cells etc.
|
|
16
17
|
*/
|
|
17
18
|
export interface GridApi {
|
|
19
|
+
getVariant(): AdaptableVariant;
|
|
18
20
|
/**
|
|
19
21
|
* Returns Grid section from AdapTable State
|
|
20
22
|
*/
|
|
@@ -12,12 +12,13 @@ import { Column, IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
|
12
12
|
import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
14
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
15
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
15
|
+
import { AdaptableVariant, IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
16
16
|
import { GridInternalApi } from '../Internal/GridInternalApi';
|
|
17
17
|
import { TransposeConfig } from '../../PredefinedConfig/Common/TransposeConfig';
|
|
18
18
|
export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
19
19
|
internalApi: GridInternalApi;
|
|
20
20
|
constructor(adaptable: IAdaptable);
|
|
21
|
+
getVariant(): AdaptableVariant;
|
|
21
22
|
getGridState(): GridState;
|
|
22
23
|
loadGridData(dataSource: any): void;
|
|
23
24
|
resetGridData(dataSource: any[]): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
3
|
import { UIConfirmation } from '../../Utilities/Interface/MessagePopups';
|
|
3
4
|
import { SystemState } from '../../PredefinedConfig/SystemState';
|
|
@@ -29,6 +30,7 @@ import { CellPopupService } from '../../Utilities/Services/CellPopupService';
|
|
|
29
30
|
import { RowEditService } from '../../Utilities/Services/RowEditService';
|
|
30
31
|
export declare class AdaptableInternalApi extends ApiBase {
|
|
31
32
|
getSystemState(): SystemState;
|
|
33
|
+
getAdaptableJSXElement(): JSX.Element;
|
|
32
34
|
showPopupConfirmation(confirmation: UIConfirmation): void;
|
|
33
35
|
showPopupScreen(module: AdaptableModule, componentName: string, popupParams?: ModuleParams, popupProps?: {
|
|
34
36
|
[key: string]: any;
|
|
@@ -12,6 +12,10 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
12
12
|
getSystemState() {
|
|
13
13
|
return this.getAdaptableState().System;
|
|
14
14
|
}
|
|
15
|
+
getAdaptableJSXElement() {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = this.adaptable._PRIVATE_adaptableJSXElement) !== null && _a !== void 0 ? _a : null;
|
|
18
|
+
}
|
|
15
19
|
// Popup Redux Actions
|
|
16
20
|
showPopupConfirmation(confirmation) {
|
|
17
21
|
this.dispatchAction(PopupRedux.PopupShowConfirmation(confirmation));
|
|
@@ -42,5 +42,7 @@ export const ExternalRenderer = (_a) => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}, []);
|
|
45
|
-
|
|
45
|
+
const RFC = adaptable.variant === 'react' ? frameworkComponent : null;
|
|
46
|
+
return RFC ? (React.createElement("div", Object.assign({}, rest, { ref: ref }),
|
|
47
|
+
React.createElement(RFC, { adaptableApi: adaptable.api }))) : (React.createElement("div", Object.assign({}, rest, { dangerouslySetInnerHTML: { __html: contentsHTML }, ref: ref })));
|
|
46
48
|
};
|
|
@@ -63,6 +63,8 @@ export const CustomToolbarCmp = (props) => {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
}, []);
|
|
66
|
+
const CustomReactFrameworkComponent = props.customToolbar
|
|
67
|
+
.frameworkComponent;
|
|
66
68
|
return (React.createElement(React.Fragment, null,
|
|
67
69
|
props.customToolbar.render && (React.createElement("div", { id: renderContentContainerId, ref: renderContentContainerRef, className: `ab-CustomToolbar__rendered-content ab-CustomToolbar--${props.customToolbar.name}`, style: { minHeight: 22 }, dangerouslySetInnerHTML: { __html: renderedContentHTML } })),
|
|
68
70
|
props.customToolbar.toolbarButtons && (React.createElement("div", { id: buttonsContainerId, className: `ab-CustomToolbar__buttons ab-CustomToolbar--${props.customToolbar.name}`, style: { minHeight: 22 } }, props.customToolbar.toolbarButtons.map((button, index) => {
|
|
@@ -91,7 +93,7 @@ export const CustomToolbarCmp = (props) => {
|
|
|
91
93
|
}, 16);
|
|
92
94
|
} }, buttonLabel));
|
|
93
95
|
}))),
|
|
94
|
-
|
|
96
|
+
CustomReactFrameworkComponent && (React.createElement("div", { id: componentContainerId, ref: componentContainerRef, style: { minHeight: 22 }, className: `ab-CustomToolbar__component ab-CustomToolbar--${props.customToolbar.name}` }, api.gridApi.getVariant() === 'react' ? (React.createElement(CustomReactFrameworkComponent, { adaptableApi: api })) : null))));
|
|
95
97
|
};
|
|
96
98
|
export const CustomToolbarWrapper = (props) => {
|
|
97
99
|
const { api } = useAdaptable();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
2
3
|
import { ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType } from '@ag-grid-community/core';
|
|
3
4
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
@@ -122,6 +123,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
122
123
|
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
123
124
|
*/
|
|
124
125
|
private adaptableStatusPanelKeys;
|
|
126
|
+
_PRIVATE_adaptableJSXElement: JSX.Element;
|
|
125
127
|
constructor();
|
|
126
128
|
static forEachAdaptable(fn: (adaptable: AdaptableAgGrid) => void): void;
|
|
127
129
|
private static collectInstance;
|
|
@@ -397,7 +397,19 @@ export class AdaptableAgGrid {
|
|
|
397
397
|
const adaptableContainerElem = this.getAdaptableContainerElement();
|
|
398
398
|
if (adaptableContainerElem != null) {
|
|
399
399
|
adaptableContainerElem.innerHTML = '';
|
|
400
|
-
|
|
400
|
+
if (this.variant === 'react') {
|
|
401
|
+
/**
|
|
402
|
+
* #no_additional_react_root
|
|
403
|
+
* This is only used for the React variant
|
|
404
|
+
* Where we don't want to create a new React render tree here
|
|
405
|
+
* by rendering it as a React root, but instead we want to
|
|
406
|
+
* render it as is in the React tree of our AdaptableReact component
|
|
407
|
+
*/
|
|
408
|
+
this._PRIVATE_adaptableJSXElement = AdaptableApp({ Adaptable: this });
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
this.unmountReactRoot = this.renderReactRoot(AdaptableApp({ Adaptable: this }), adaptableContainerElem);
|
|
412
|
+
}
|
|
401
413
|
}
|
|
402
414
|
this.lifecycleState = 'ready';
|
|
403
415
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
@@ -3772,7 +3784,7 @@ export class AdaptableAgGrid {
|
|
|
3772
3784
|
// same grid column state as a previous,
|
|
3773
3785
|
// so no need to update, as the layout has already been updated
|
|
3774
3786
|
// for this grid column state
|
|
3775
|
-
console.log('same state as before');
|
|
3787
|
+
// console.log('same state as before');
|
|
3776
3788
|
return;
|
|
3777
3789
|
}
|
|
3778
3790
|
this.previousAgGridLayoutState = stringifiedLayoutState;
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "18.1.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1721302170891 || Date.now(),
|
|
4
|
+
VERSION: "18.1.10" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -2751,14 +2751,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2751
2751
|
gridInfo: string;
|
|
2752
2752
|
defVal: string;
|
|
2753
2753
|
noCode?: undefined;
|
|
2754
|
-
} | {
|
|
2755
|
-
name: string;
|
|
2756
|
-
kind: string;
|
|
2757
|
-
desc: string;
|
|
2758
|
-
isOpt: boolean;
|
|
2759
|
-
gridInfo?: undefined;
|
|
2760
|
-
noCode?: undefined;
|
|
2761
|
-
defVal?: undefined;
|
|
2762
2754
|
})[];
|
|
2763
2755
|
};
|
|
2764
2756
|
DataFormatDataType: {
|