@adaptabletools/adaptable-cjs 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.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
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;
|
|
@@ -16,6 +16,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
16
16
|
super(adaptable);
|
|
17
17
|
this.internalApi = new GridInternalApi_1.GridInternalApi(adaptable);
|
|
18
18
|
}
|
|
19
|
+
getVariant() {
|
|
20
|
+
return this.adaptable.variant;
|
|
21
|
+
}
|
|
19
22
|
getGridState() {
|
|
20
23
|
return this.getAdaptableState().Grid;
|
|
21
24
|
}
|
|
@@ -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;
|
|
@@ -16,6 +16,10 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
16
16
|
getSystemState() {
|
|
17
17
|
return this.getAdaptableState().System;
|
|
18
18
|
}
|
|
19
|
+
getAdaptableJSXElement() {
|
|
20
|
+
var _a;
|
|
21
|
+
return (_a = this.adaptable._PRIVATE_adaptableJSXElement) !== null && _a !== void 0 ? _a : null;
|
|
22
|
+
}
|
|
19
23
|
// Popup Redux Actions
|
|
20
24
|
showPopupConfirmation(confirmation) {
|
|
21
25
|
this.dispatchAction(PopupRedux.PopupShowConfirmation(confirmation));
|
|
@@ -45,6 +45,8 @@ const ExternalRenderer = (_a) => {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}, []);
|
|
48
|
-
|
|
48
|
+
const RFC = adaptable.variant === 'react' ? frameworkComponent : null;
|
|
49
|
+
return RFC ? (React.createElement("div", Object.assign({}, rest, { ref: ref }),
|
|
50
|
+
React.createElement(RFC, { adaptableApi: adaptable.api }))) : (React.createElement("div", Object.assign({}, rest, { dangerouslySetInnerHTML: { __html: contentsHTML }, ref: ref })));
|
|
49
51
|
};
|
|
50
52
|
exports.ExternalRenderer = ExternalRenderer;
|
|
@@ -67,6 +67,8 @@ const CustomToolbarCmp = (props) => {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
}, []);
|
|
70
|
+
const CustomReactFrameworkComponent = props.customToolbar
|
|
71
|
+
.frameworkComponent;
|
|
70
72
|
return (React.createElement(React.Fragment, null,
|
|
71
73
|
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 } })),
|
|
72
74
|
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) => {
|
|
@@ -95,7 +97,7 @@ const CustomToolbarCmp = (props) => {
|
|
|
95
97
|
}, 16);
|
|
96
98
|
} }, buttonLabel));
|
|
97
99
|
}))),
|
|
98
|
-
|
|
100
|
+
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))));
|
|
99
101
|
};
|
|
100
102
|
exports.CustomToolbarCmp = CustomToolbarCmp;
|
|
101
103
|
const CustomToolbarWrapper = (props) => {
|
|
@@ -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;
|
|
@@ -401,7 +401,19 @@ class AdaptableAgGrid {
|
|
|
401
401
|
const adaptableContainerElem = this.getAdaptableContainerElement();
|
|
402
402
|
if (adaptableContainerElem != null) {
|
|
403
403
|
adaptableContainerElem.innerHTML = '';
|
|
404
|
-
|
|
404
|
+
if (this.variant === 'react') {
|
|
405
|
+
/**
|
|
406
|
+
* #no_additional_react_root
|
|
407
|
+
* This is only used for the React variant
|
|
408
|
+
* Where we don't want to create a new React render tree here
|
|
409
|
+
* by rendering it as a React root, but instead we want to
|
|
410
|
+
* render it as is in the React tree of our AdaptableReact component
|
|
411
|
+
*/
|
|
412
|
+
this._PRIVATE_adaptableJSXElement = (0, AdaptableView_1.AdaptableApp)({ Adaptable: this });
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
this.unmountReactRoot = this.renderReactRoot((0, AdaptableView_1.AdaptableApp)({ Adaptable: this }), adaptableContainerElem);
|
|
416
|
+
}
|
|
405
417
|
}
|
|
406
418
|
this.lifecycleState = 'ready';
|
|
407
419
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
@@ -3776,7 +3788,7 @@ class AdaptableAgGrid {
|
|
|
3776
3788
|
// same grid column state as a previous,
|
|
3777
3789
|
// so no need to update, as the layout has already been updated
|
|
3778
3790
|
// for this grid column state
|
|
3779
|
-
console.log('same state as before');
|
|
3791
|
+
// console.log('same state as before');
|
|
3780
3792
|
return;
|
|
3781
3793
|
}
|
|
3782
3794
|
this.previousAgGridLayoutState = stringifiedLayoutState;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "18.1.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1721302203425 || Date.now(),
|
|
6
|
+
VERSION: "18.1.10" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -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: {
|