@adaptabletools/adaptable-react-aggrid 10.0.4-canary.5 → 11.0.0-canary.3
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/base.css +19 -15
- package/index.css +20 -17
- package/package.json +8 -6
- package/src/components/AdaptableReact.d.ts +5 -4
- package/src/components/AdaptableReact.js +2 -2
- package/src/setupFrameworkComponents.js +4 -2
package/base.css
CHANGED
|
@@ -1756,8 +1756,6 @@
|
|
|
1756
1756
|
.ab-Dialog:focus-within, .ab-Dialog:focus {
|
|
1757
1757
|
box-shadow: var(--ab-focus__box-shadow);
|
|
1758
1758
|
outline: var(--ab-focus__outline); }
|
|
1759
|
-
.ab-Dialog > * {
|
|
1760
|
-
flex: 1; }
|
|
1761
1759
|
.ab-Dialog__close-button {
|
|
1762
1760
|
position: absolute;
|
|
1763
1761
|
right: 6px;
|
|
@@ -2241,8 +2239,6 @@ input[type="number"].ab-Input:hover::-webkit-inner-spin-button:active {
|
|
|
2241
2239
|
pointer-events: none; }
|
|
2242
2240
|
.ab-FileDroppable, .ab-FileDroppable *, .ab-FileDroppable *:before, .ab-FileDroppable *:after {
|
|
2243
2241
|
box-sizing: border-box; }
|
|
2244
|
-
.ab-ChartContainer canvas {
|
|
2245
|
-
left: 0; }
|
|
2246
2242
|
.ab-WizardPanel > .ab-Panel__body {
|
|
2247
2243
|
display: flex;
|
|
2248
2244
|
flex-flow: column; }
|
|
@@ -2510,7 +2506,8 @@ input[type="number"].ab-Input:hover::-webkit-inner-spin-button:active {
|
|
|
2510
2506
|
--ab-cmp-Tag__font-size: var(--ab-font-size-3); }
|
|
2511
2507
|
.ab-Tag {
|
|
2512
2508
|
display: inline-flex;
|
|
2513
|
-
font-size: var(--ab-cmp-Tag__font-size);
|
|
2509
|
+
font-size: var(--ab-cmp-Tag__font-size);
|
|
2510
|
+
max-width: 100%; }
|
|
2514
2511
|
.ab-AdaptableOptions {
|
|
2515
2512
|
background: var(--ab-cmp-adaptable-options__background-color); }
|
|
2516
2513
|
.ab-GridOptions {
|
|
@@ -2720,6 +2717,9 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
|
|
|
2720
2717
|
margin-bottom: var(--ab-cmp-adaptable-object-list-item__margin-bottom); }
|
|
2721
2718
|
.ab-Adaptable-Object-List__Item__edit-property {
|
|
2722
2719
|
visibility: hidden; }
|
|
2720
|
+
.ab-Adaptable-Object-List__Item__values {
|
|
2721
|
+
min-width: 0;
|
|
2722
|
+
word-break: break-all; }
|
|
2723
2723
|
.ab-Adaptable-Object-List__Item__buttons {
|
|
2724
2724
|
padding-left: var(--ab-space-2);
|
|
2725
2725
|
min-width: 80px;
|
|
@@ -2757,7 +2757,7 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
|
|
|
2757
2757
|
.ab_div-colour-render-text {
|
|
2758
2758
|
position: absolute;
|
|
2759
2759
|
font-weight: normal;
|
|
2760
|
-
font-size:
|
|
2760
|
+
font-size: 12px;
|
|
2761
2761
|
z-index: 100; }
|
|
2762
2762
|
.ab_div-colour-render-div {
|
|
2763
2763
|
display: inline-block;
|
|
@@ -2781,21 +2781,25 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
|
|
|
2781
2781
|
border-style: none;
|
|
2782
2782
|
--ab-toast-cmp__shadow-color: var(--ab-color-accent);
|
|
2783
2783
|
box-shadow: 0 0 7px 2px var(--ab-toast-cmp__shadow-color);
|
|
2784
|
-
background: var(--ab-toast-cmp__shadow-color);
|
|
2784
|
+
background: var(--ab-toast-cmp__shadow-color);
|
|
2785
|
+
--toastify-text-color-info: var(--ab-color-text-on-primary);
|
|
2786
|
+
--toastify-text-color-success: var(--ab-color-text-on-primary);
|
|
2787
|
+
--toastify-text-color-warning: var(--ab-color-text-on-primary);
|
|
2788
|
+
--toastify-text-color-error: var(--ab-color-text-on-primary);
|
|
2789
|
+
--toastify-color-info: var(--ab-color-info);
|
|
2790
|
+
--toastify-color-success: var(--ab-color-success);
|
|
2791
|
+
--toastify-color-warning: var(--ab-color-warn);
|
|
2792
|
+
--toastify-color-error: var(--ab-color-error); }
|
|
2785
2793
|
.Toastify__toast-body {
|
|
2786
2794
|
padding: 0; }
|
|
2787
2795
|
.Toastify__toast--info {
|
|
2788
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-info);
|
|
2789
|
-
color: var(--ab-color-text-on-primary); }
|
|
2796
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-info); }
|
|
2790
2797
|
.Toastify__toast--success {
|
|
2791
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-success);
|
|
2792
|
-
color: var(--ab-color-text-on-primary); }
|
|
2798
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-success); }
|
|
2793
2799
|
.Toastify__toast--warning {
|
|
2794
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-warn);
|
|
2795
|
-
color: var(--ab-color-text-on-primary); }
|
|
2800
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-warn); }
|
|
2796
2801
|
.Toastify__toast--error {
|
|
2797
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-error);
|
|
2798
|
-
color: var(--ab-color-text-on-primary); }
|
|
2802
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-error); }
|
|
2799
2803
|
.ab--custom-mac-like-scrollbars .ab-Grid * ::-webkit-scrollbar,
|
|
2800
2804
|
.ab--custom-mac-like-scrollbars .ag-root * ::-webkit-scrollbar,
|
|
2801
2805
|
.ab--custom-mac-like-scrollbars .ab-Dashboard ::-webkit-scrollbar, .ab--custom-mac-like-scrollbars .ab-Dashboard * ::-webkit-scrollbar,
|
package/index.css
CHANGED
|
@@ -2402,9 +2402,6 @@ template {
|
|
|
2402
2402
|
box-shadow: var(--ab-focus__box-shadow);
|
|
2403
2403
|
outline: var(--ab-focus__outline); }
|
|
2404
2404
|
|
|
2405
|
-
.ab-Dialog > * {
|
|
2406
|
-
flex: 1; }
|
|
2407
|
-
|
|
2408
2405
|
.ab-Dialog__close-button {
|
|
2409
2406
|
position: absolute;
|
|
2410
2407
|
right: 6px;
|
|
@@ -3012,9 +3009,6 @@ input[type="number"].ab-Input:hover::-webkit-inner-spin-button:active {
|
|
|
3012
3009
|
.ab-FileDroppable, .ab-FileDroppable *, .ab-FileDroppable *:before, .ab-FileDroppable *:after {
|
|
3013
3010
|
box-sizing: border-box; }
|
|
3014
3011
|
|
|
3015
|
-
.ab-ChartContainer canvas {
|
|
3016
|
-
left: 0; }
|
|
3017
|
-
|
|
3018
3012
|
.ab-WizardPanel > .ab-Panel__body {
|
|
3019
3013
|
display: flex;
|
|
3020
3014
|
flex-flow: column; }
|
|
@@ -3345,7 +3339,8 @@ input[type="number"].ab-Input:hover::-webkit-inner-spin-button:active {
|
|
|
3345
3339
|
|
|
3346
3340
|
.ab-Tag {
|
|
3347
3341
|
display: inline-flex;
|
|
3348
|
-
font-size: var(--ab-cmp-Tag__font-size);
|
|
3342
|
+
font-size: var(--ab-cmp-Tag__font-size);
|
|
3343
|
+
max-width: 100%; }
|
|
3349
3344
|
|
|
3350
3345
|
.ab-AdaptableOptions {
|
|
3351
3346
|
background: var(--ab-cmp-adaptable-options__background-color); }
|
|
@@ -3616,6 +3611,10 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
|
|
|
3616
3611
|
.ab-Adaptable-Object-List__Item__edit-property {
|
|
3617
3612
|
visibility: hidden; }
|
|
3618
3613
|
|
|
3614
|
+
.ab-Adaptable-Object-List__Item__values {
|
|
3615
|
+
min-width: 0;
|
|
3616
|
+
word-break: break-all; }
|
|
3617
|
+
|
|
3619
3618
|
.ab-Adaptable-Object-List__Item__buttons {
|
|
3620
3619
|
padding-left: var(--ab-space-2);
|
|
3621
3620
|
min-width: 80px;
|
|
@@ -3666,7 +3665,7 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
|
|
|
3666
3665
|
.ab_div-colour-render-text {
|
|
3667
3666
|
position: absolute;
|
|
3668
3667
|
font-weight: normal;
|
|
3669
|
-
font-size:
|
|
3668
|
+
font-size: 12px;
|
|
3670
3669
|
z-index: 100; }
|
|
3671
3670
|
|
|
3672
3671
|
.ab_div-colour-render-div {
|
|
@@ -3695,26 +3694,30 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
|
|
|
3695
3694
|
border-style: none;
|
|
3696
3695
|
--ab-toast-cmp__shadow-color: var(--ab-color-accent);
|
|
3697
3696
|
box-shadow: 0 0 7px 2px var(--ab-toast-cmp__shadow-color);
|
|
3698
|
-
background: var(--ab-toast-cmp__shadow-color);
|
|
3697
|
+
background: var(--ab-toast-cmp__shadow-color);
|
|
3698
|
+
--toastify-text-color-info: var(--ab-color-text-on-primary);
|
|
3699
|
+
--toastify-text-color-success: var(--ab-color-text-on-primary);
|
|
3700
|
+
--toastify-text-color-warning: var(--ab-color-text-on-primary);
|
|
3701
|
+
--toastify-text-color-error: var(--ab-color-text-on-primary);
|
|
3702
|
+
--toastify-color-info: var(--ab-color-info);
|
|
3703
|
+
--toastify-color-success: var(--ab-color-success);
|
|
3704
|
+
--toastify-color-warning: var(--ab-color-warn);
|
|
3705
|
+
--toastify-color-error: var(--ab-color-error); }
|
|
3699
3706
|
|
|
3700
3707
|
.Toastify__toast-body {
|
|
3701
3708
|
padding: 0; }
|
|
3702
3709
|
|
|
3703
3710
|
.Toastify__toast--info {
|
|
3704
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-info);
|
|
3705
|
-
color: var(--ab-color-text-on-primary); }
|
|
3711
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-info); }
|
|
3706
3712
|
|
|
3707
3713
|
.Toastify__toast--success {
|
|
3708
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-success);
|
|
3709
|
-
color: var(--ab-color-text-on-primary); }
|
|
3714
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-success); }
|
|
3710
3715
|
|
|
3711
3716
|
.Toastify__toast--warning {
|
|
3712
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-warn);
|
|
3713
|
-
color: var(--ab-color-text-on-primary); }
|
|
3717
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-warn); }
|
|
3714
3718
|
|
|
3715
3719
|
.Toastify__toast--error {
|
|
3716
|
-
--ab-toast-cmp__shadow-color: var(--ab-color-error);
|
|
3717
|
-
color: var(--ab-color-text-on-primary); }
|
|
3720
|
+
--ab-toast-cmp__shadow-color: var(--ab-color-error); }
|
|
3718
3721
|
|
|
3719
3722
|
.ab--custom-mac-like-scrollbars .ab-Grid * ::-webkit-scrollbar,
|
|
3720
3723
|
.ab--custom-mac-like-scrollbars .ag-root * ::-webkit-scrollbar,
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-react-aggrid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0-canary.3",
|
|
4
4
|
"description": "React version of the powerful data-agnostic HTML5 datagrid add-on that sits on top of the agGrid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [],
|
|
6
|
-
"main": "src/index.js",
|
|
7
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
},
|
|
7
|
+
"main": "src/index.js",
|
|
8
|
+
"typings": "src/index.d.ts",
|
|
11
9
|
"lint-staged": {
|
|
12
10
|
"{src,test}/**/*.ts": [
|
|
13
11
|
"npx prettier --write",
|
|
@@ -20,12 +18,16 @@
|
|
|
20
18
|
}
|
|
21
19
|
},
|
|
22
20
|
"dependencies": {
|
|
23
|
-
"
|
|
21
|
+
"tslib": "^2.0.0",
|
|
22
|
+
"@adaptabletools/adaptable": "11.0.0-canary.3"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
26
25
|
"@ag-grid-community/all-modules": ">=26.2.0",
|
|
27
26
|
"@ag-grid-community/react": ">=26.2.0",
|
|
28
27
|
"react": ">=16.8.0",
|
|
29
28
|
"react-dom": ">=16.8.0"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=6.0.0"
|
|
30
32
|
}
|
|
31
33
|
}
|
|
@@ -2,16 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableApi } from '@adaptabletools/adaptable/types';
|
|
3
3
|
import { AdaptableOptions } from '@adaptabletools/adaptable/types';
|
|
4
4
|
import { GridOptions, Module } from '@ag-grid-community/all-modules';
|
|
5
|
-
|
|
5
|
+
export interface AdaptableReactProps extends React.HTMLProps<HTMLDivElement> {
|
|
6
6
|
adaptableOptions: AdaptableOptions;
|
|
7
|
-
|
|
7
|
+
gridOptions?: GridOptions;
|
|
8
8
|
/**
|
|
9
9
|
* An array of agGrid modules
|
|
10
10
|
*/
|
|
11
11
|
modules: Module[];
|
|
12
12
|
onAdaptableReady?: (adaptableReadyInfo: {
|
|
13
13
|
adaptableApi: AdaptableApi;
|
|
14
|
-
|
|
14
|
+
gridOptions: GridOptions;
|
|
15
15
|
}) => void;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
declare const AdaptableReact: React.FunctionComponent<AdaptableReactProps>;
|
|
17
18
|
export default AdaptableReact;
|
|
@@ -18,12 +18,12 @@ if (package_json_1.version !== version_1.default) {
|
|
|
18
18
|
}
|
|
19
19
|
const getRandomInt = (max) => Math.floor(Math.random() * Math.floor(max));
|
|
20
20
|
const AdaptableReact = (_a) => {
|
|
21
|
-
var { adaptableOptions,
|
|
21
|
+
var { adaptableOptions, gridOptions, onAdaptableReady, modules } = _a, props = tslib_1.__rest(_a, ["adaptableOptions", "gridOptions", "onAdaptableReady", "modules"]);
|
|
22
22
|
const seedId = react_1.useMemo(() => `${getRandomInt(1000)}-${Date.now()}`, []);
|
|
23
23
|
const adaptableContainerId = `adaptable-${seedId}`;
|
|
24
24
|
react_1.useLayoutEffect(() => {
|
|
25
25
|
let adaptableApi;
|
|
26
|
-
agGrid_1.default.initInternal(Object.assign(Object.assign({}, adaptableOptions), { containerOptions: Object.assign(Object.assign({}, adaptableOptions.containerOptions), { adaptableContainer: adaptableContainerId }),
|
|
26
|
+
agGrid_1.default.initInternal(Object.assign(Object.assign({}, adaptableOptions), { containerOptions: Object.assign(Object.assign({}, adaptableOptions.containerOptions), { adaptableContainer: adaptableContainerId }), gridOptions: gridOptions || adaptableOptions.gridOptions }), { waitForAgGrid: true, modules }).then((api) => {
|
|
27
27
|
adaptableApi = api;
|
|
28
28
|
logger_1.LogAdaptableInfo('AdaptableReady');
|
|
29
29
|
if (onAdaptableReady) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setupFrameworkComponents = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
4
6
|
const react_dom_1 = require("react-dom");
|
|
5
7
|
const logger_1 = require("./logger");
|
|
6
8
|
exports.setupFrameworkComponents = (adaptableApi) => {
|
|
@@ -10,8 +12,8 @@ exports.setupFrameworkComponents = (adaptableApi) => {
|
|
|
10
12
|
if (command === 'create') {
|
|
11
13
|
try {
|
|
12
14
|
logger_1.LogAdaptableInfo(`Mounting custom framework component ${componentType}`, containerDomNode);
|
|
13
|
-
const
|
|
14
|
-
react_dom_1.render(
|
|
15
|
+
const ReactComponent = frameworkComponent;
|
|
16
|
+
react_dom_1.render(React.createElement(ReactComponent, { adaptableApi: adaptableApi }), containerDomNode);
|
|
15
17
|
}
|
|
16
18
|
catch (err) {
|
|
17
19
|
logger_1.LogAdaptableError(`Cannot correctly mount custom framework component ${componentType}`, err);
|