@adaptabletools/adaptable-react-aggrid 22.1.1 → 23.0.0-canary.1
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/index.css +2267 -333
- package/package.json +4 -4
- package/src/components/AdaptableOptionsWizardView.js +4 -3
- package/src/components/AdaptableProvider.d.ts +2 -2
- package/src/components/AdaptableProvider.js +14 -8
- package/src/components/AdaptableReact.js +2 -2
- package/src/setupFrameworkComponents.js +2 -2
- package/themes/dark.css +34 -6
- package/fonts/glyphicons-halflings-regular.eot +0 -0
- package/fonts/glyphicons-halflings-regular.svg +0 -288
- package/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/fonts/glyphicons-halflings-regular.woff +0 -0
- package/fonts/glyphicons-halflings-regular.woff2 +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-react-aggrid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0-canary.1",
|
|
4
4
|
"description": "React version of AdapTable - the powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "contact sales@adaptabletools.com for details",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.8.1",
|
|
10
10
|
"react-redux": "9.2.0",
|
|
11
|
-
"@adaptabletools/adaptable": "
|
|
11
|
+
"@adaptabletools/adaptable": "23.0.0-canary.1"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"ag-grid-enterprise": ">=35.
|
|
15
|
-
"ag-grid-react": ">=35.
|
|
14
|
+
"ag-grid-enterprise": ">=35.3.0",
|
|
15
|
+
"ag-grid-react": ">=35.3.0",
|
|
16
16
|
"react": "^18.0.0 || ^19.0.0",
|
|
17
17
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
18
18
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { AdaptableWizardView } from '@adaptabletools/adaptable';
|
|
3
4
|
import AdaptableReact from './AdaptableReact';
|
|
@@ -5,7 +6,7 @@ export const AdaptableOptionsWizardView = (props) => {
|
|
|
5
6
|
const { shouldRenderAdaptable, adaptableProps, ...adaptableWizardViewProps } = props;
|
|
6
7
|
const [adaptableConfig, setAdaptableConfig] = React.useState(null);
|
|
7
8
|
if (!adaptableConfig) {
|
|
8
|
-
return (
|
|
9
|
+
return (_jsx(AdaptableWizardView, { ...adaptableWizardViewProps, onInit: (adaptableOptions, gridOptions) => {
|
|
9
10
|
setAdaptableConfig({ adaptableOptions, gridOptions });
|
|
10
11
|
props?.onInit(adaptableOptions, gridOptions);
|
|
11
12
|
} }));
|
|
@@ -16,7 +17,7 @@ export const AdaptableOptionsWizardView = (props) => {
|
|
|
16
17
|
adaptableOptions: adaptableConfig.adaptableOptions,
|
|
17
18
|
gridOptions: adaptableConfig.gridOptions,
|
|
18
19
|
};
|
|
19
|
-
return
|
|
20
|
+
return _jsx(AdaptableReact, { ...preparedAdaptableProps });
|
|
20
21
|
}
|
|
21
|
-
return
|
|
22
|
+
return _jsx(_Fragment, {});
|
|
22
23
|
};
|
|
@@ -38,7 +38,7 @@ export declare const Adaptable: {
|
|
|
38
38
|
UI: (props: {
|
|
39
39
|
style?: React.CSSProperties;
|
|
40
40
|
className?: string;
|
|
41
|
-
}) =>
|
|
42
|
-
AgGridReact: (props: AgGridReactPropsWithoutGridOptionsAndModules) =>
|
|
41
|
+
}) => import("react").JSX.Element;
|
|
42
|
+
AgGridReact: (props: AgGridReactPropsWithoutGridOptionsAndModules) => import("react").JSX.Element;
|
|
43
43
|
};
|
|
44
44
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { useId, useState } from 'react';
|
|
3
4
|
import { AgGridReact } from 'ag-grid-react';
|
|
@@ -49,7 +50,13 @@ function usePromise() {
|
|
|
49
50
|
const AdaptableProvider = (props) => {
|
|
50
51
|
const [currentTransition, setCurrentTransition] = React.useState(AdaptableAgGridStateTransitions.AG_GRID_EMIT_PROPS);
|
|
51
52
|
const useIdResult = useId();
|
|
52
|
-
|
|
53
|
+
// Stable for the lifetime of this Provider — must not change when adaptableOptions
|
|
54
|
+
// is recreated on parent re-render (e.g. inline object literals in JSX).
|
|
55
|
+
const idRef = React.useRef(null);
|
|
56
|
+
if (idRef.current === null) {
|
|
57
|
+
idRef.current = `${props.adaptableOptions.adaptableId || 'adaptable'}-${useIdResult}`;
|
|
58
|
+
}
|
|
59
|
+
const id = idRef.current;
|
|
53
60
|
const [agGridProps, setAgGridProps] = React.useState();
|
|
54
61
|
const [gridOptions, setGridOptions] = React.useState(props.gridOptions);
|
|
55
62
|
const [agGridApi, setAgGridApi] = React.useState();
|
|
@@ -88,7 +95,7 @@ const AdaptableProvider = (props) => {
|
|
|
88
95
|
clearTimeout(timeoutId);
|
|
89
96
|
};
|
|
90
97
|
}, []);
|
|
91
|
-
return (
|
|
98
|
+
return (_jsx(AdaptableAgGridContext.Provider, { value: {
|
|
92
99
|
id,
|
|
93
100
|
onAdaptableReady,
|
|
94
101
|
adaptableApi,
|
|
@@ -121,17 +128,16 @@ const AdaptableProvider = (props) => {
|
|
|
121
128
|
...props,
|
|
122
129
|
renderAgGridFrameworkComponent,
|
|
123
130
|
},
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
?.TheStore ?? PLACEHOLDER_REDUX_STORE }, props.children)));
|
|
131
|
+
}, children: _jsx(ReduxProvider, { store: adaptableApi?.internalApi.getAdaptableInstance()?.adaptableStore?.TheStore ??
|
|
132
|
+
PLACEHOLDER_REDUX_STORE, children: props.children }) }));
|
|
127
133
|
};
|
|
128
134
|
// -- ADAPTABLE UI WRAPPER -
|
|
129
135
|
const AdaptableUI = (props) => {
|
|
130
|
-
const { adaptableProps, modules, gridOptions, transition, onAdaptableReady
|
|
136
|
+
const { adaptableProps, modules, gridOptions, transition, onAdaptableReady } = useAdaptableAgGridContext();
|
|
131
137
|
if (transition === AdaptableAgGridStateTransitions.AG_GRID_EMIT_PROPS) {
|
|
132
138
|
return null;
|
|
133
139
|
}
|
|
134
|
-
return (
|
|
140
|
+
return (_jsx(AdaptableReactComponent
|
|
135
141
|
// This needs to be first, so gridOptions is the one passed and not from props
|
|
136
142
|
, { ...adaptableProps, onAdaptableReady: onAdaptableReady, style: props.style, className: props.className, gridOptions: gridOptions, modules: modules }));
|
|
137
143
|
};
|
|
@@ -184,7 +190,7 @@ const AdaptableAgGridReact = (props) => {
|
|
|
184
190
|
if (transition !== AdaptableAgGridStateTransitions.INITIALIZE_AG_GRID) {
|
|
185
191
|
return null;
|
|
186
192
|
}
|
|
187
|
-
return (
|
|
193
|
+
return (_jsx(AgGridReact, { ref: agGridRef, ...agGridPassThroughProps, modules: modules, onGridReady: (event) => {
|
|
188
194
|
// this is not called extra in strict mode
|
|
189
195
|
setAgGridApi(event.api);
|
|
190
196
|
if (props.onGridReady) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState, useRef, useCallback } from 'react';
|
|
3
3
|
import { ColumnApiModule } from 'ag-grid-enterprise';
|
|
4
4
|
import { _AdaptableAgGrid } from '@adaptabletools/adaptable';
|
|
@@ -66,6 +66,6 @@ const AdaptableReact = ({ adaptableOptions, gridOptions, onAdaptableReady, ...pr
|
|
|
66
66
|
console.error('Failed to initialize AdaptableReact component', err);
|
|
67
67
|
});
|
|
68
68
|
}, [id]);
|
|
69
|
-
return (
|
|
69
|
+
return (_jsx("div", { style: props.style, ref: containerRef, id: adaptableContainerId, className: join(props.className, 'ab__react-wrapper'), children: adaptableJSXElement }));
|
|
70
70
|
};
|
|
71
71
|
export default AdaptableReact;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
const weakMap = new WeakMap();
|
|
3
3
|
export const setupFrameworkComponents = (adaptableApi) => {
|
|
4
4
|
adaptableApi.internalApi
|
|
@@ -13,7 +13,7 @@ export const setupFrameworkComponents = (adaptableApi) => {
|
|
|
13
13
|
const ReactComponent = frameworkComponent;
|
|
14
14
|
const unmount = adaptableApi.internalApi
|
|
15
15
|
.getAdaptableInstance()
|
|
16
|
-
.renderReactRoot(
|
|
16
|
+
.renderReactRoot(_jsx(ReactComponent, { adaptableApi: adaptableApi }), containerDomNode);
|
|
17
17
|
weakMap.set(containerDomNode, unmount);
|
|
18
18
|
}
|
|
19
19
|
catch (err) {
|
package/themes/dark.css
CHANGED
|
@@ -1,29 +1,57 @@
|
|
|
1
1
|
@layer adaptable.theme {
|
|
2
2
|
.ab--theme-dark {
|
|
3
|
+
/****** Shadcn colors ******/
|
|
4
|
+
--ab-color-background: oklch(0.145 0 0);
|
|
5
|
+
--ab-color-foreground: oklch(0.985 0 0);
|
|
6
|
+
--ab-color-secondary: oklch(0.269 0 0);
|
|
7
|
+
--ab-color-secondary-foreground: oklch(0.985 0 0);
|
|
8
|
+
--ab-color-destructive: oklch(0.396 0.141 25.723);
|
|
9
|
+
--ab-color-destructive-foreground: oklch(0.637 0.237 25.331);
|
|
10
|
+
--ab-color-border: oklch(0.269 0 0);
|
|
11
|
+
/******/
|
|
12
|
+
|
|
3
13
|
--ab-theme-loaded: dark;
|
|
4
14
|
|
|
5
15
|
--ab-cmp-input--disabled__background: #232323; /* #b6b7b8 */
|
|
6
16
|
|
|
7
17
|
--ab-color-defaultbackground: #3e444c;
|
|
8
18
|
--ab-color-text-on-defaultbackground: #e2e2e2;
|
|
19
|
+
/* Inputs/comboboxes: panel gray, not app chrome black */
|
|
20
|
+
--ab-color-input-background: var(--ab-color-defaultbackground);
|
|
9
21
|
|
|
10
22
|
--ab-color-primary: #262d2f;
|
|
23
|
+
--ab-color-primary-foreground: var(--ab-color-text-on-primary);
|
|
11
24
|
--ab-color-primarylight: #3d3e3f;
|
|
12
25
|
--ab-color-primarydark: #1c2021;
|
|
13
26
|
--ab-color-text-on-primary: #e2e2e2; /* F2F2F2 */
|
|
14
27
|
|
|
28
|
+
--ab-color-palette-1: #5c1a1a;
|
|
29
|
+
--ab-color-palette-2: #ffb4b4;
|
|
30
|
+
--ab-color-palette-3: #4a3b00;
|
|
31
|
+
--ab-color-palette-4: #ffd966;
|
|
32
|
+
--ab-color-palette-5: #1b4332;
|
|
33
|
+
--ab-color-palette-6: #95d5b2;
|
|
34
|
+
--ab-color-palette-7: #1a365d;
|
|
35
|
+
--ab-color-palette-8: #90cdf4;
|
|
36
|
+
--ab-color-palette-9: #2d3748;
|
|
37
|
+
--ab-color-palette-10: #e2e8f0;
|
|
38
|
+
--ab-color-palette-11: #44337a;
|
|
39
|
+
--ab-color-palette-12: #d6bcfa;
|
|
40
|
+
|
|
15
41
|
--ab-color-shadow: rgb(255 255 255 / 0.45);
|
|
16
42
|
--ab-cmp-modal-backdrop__background: rgba(255, 255, 255, 0.2);
|
|
17
43
|
|
|
18
44
|
--ab-dashboard__border: #555;
|
|
19
45
|
--ab-cmp-dropdownbutton-list-separator__border: 1px solid #555;
|
|
20
46
|
|
|
21
|
-
|
|
22
|
-
--ab-color-filtered-columns: var(--ab-color-text-on-primary);
|
|
23
|
-
--ab-color-filtered-columns-background: var(--ab-color-defaultbackground);
|
|
24
|
-
|
|
25
47
|
--ab-cmp-checkbox__border-color: var(--ab-color-text-on-primary);
|
|
26
48
|
--ab-cmp-checkbox--checked__border-color: var(--ab-color-accent);
|
|
49
|
+
|
|
50
|
+
/* Tabs: darker strip, lighter active tab + panel (inactive vs active was too similar) */
|
|
51
|
+
--ab-cmp-tabs-strip__background: var(--ab-color-primary);
|
|
52
|
+
--ab-cmp-tabs-active__background: var(--ab-color-defaultbackground);
|
|
53
|
+
--ab-cmp-tabs-inactive__opacity: 0.78;
|
|
54
|
+
--ab-cmp-tabs-inactive-separator__color: #555;
|
|
27
55
|
}
|
|
28
56
|
|
|
29
57
|
.ab--theme-dark input.ab-Input[type='number']::-webkit-outer-spin-button,.ab--theme-dark input.ab-Input[type='number']::-webkit-inner-spin-button {
|
|
@@ -41,8 +69,8 @@ as our dark theme is anyways applied on the document element.
|
|
|
41
69
|
|
|
42
70
|
*/
|
|
43
71
|
.ab--theme-dark {
|
|
44
|
-
--ab-color-
|
|
45
|
-
--ab-cmp-input__color: var(--ab-color-
|
|
72
|
+
--ab-color-input-foreground: var(--ab-color-text-on-primary);
|
|
73
|
+
--ab-cmp-input__color: var(--ab-color-input-foreground);
|
|
46
74
|
--ab-cmp-input__background: var(--ab-color-defaultbackground);
|
|
47
75
|
--ab-cmp-input--disabled__background: var(--ab-color-primarylight);
|
|
48
76
|
--ab-cmp-field-wrap__background: var(--ab-color-defaultbackground);
|
|
Binary file
|