@adaptabletools/adaptable-react-aggrid-cjs 22.1.1-canary.1 → 23.0.0-canary.0
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 +2253 -342
- 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 -3
- package/themes/dark.css +27 -7
- 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-cjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0-canary.0",
|
|
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",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.8.1",
|
|
11
11
|
"react-redux": "9.2.0",
|
|
12
|
-
"@adaptabletools/adaptable-cjs": "
|
|
12
|
+
"@adaptabletools/adaptable-cjs": "23.0.0-canary.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"ag-grid-enterprise": ">=35.
|
|
16
|
-
"ag-grid-react": ">=35.
|
|
15
|
+
"ag-grid-enterprise": ">=35.3.0",
|
|
16
|
+
"ag-grid-react": ">=35.3.0",
|
|
17
17
|
"react": "^18.0.0 || ^19.0.0",
|
|
18
18
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
19
19
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdaptableOptionsWizardView = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const React = tslib_1.__importStar(require("react"));
|
|
6
7
|
const adaptable_1 = require("@adaptabletools/adaptable-cjs");
|
|
7
8
|
const AdaptableReact_1 = tslib_1.__importDefault(require("./AdaptableReact"));
|
|
@@ -9,7 +10,7 @@ const AdaptableOptionsWizardView = (props) => {
|
|
|
9
10
|
const { shouldRenderAdaptable, adaptableProps, ...adaptableWizardViewProps } = props;
|
|
10
11
|
const [adaptableConfig, setAdaptableConfig] = React.useState(null);
|
|
11
12
|
if (!adaptableConfig) {
|
|
12
|
-
return (
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(adaptable_1.AdaptableWizardView, { ...adaptableWizardViewProps, onInit: (adaptableOptions, gridOptions) => {
|
|
13
14
|
setAdaptableConfig({ adaptableOptions, gridOptions });
|
|
14
15
|
props?.onInit(adaptableOptions, gridOptions);
|
|
15
16
|
} }));
|
|
@@ -20,8 +21,8 @@ const AdaptableOptionsWizardView = (props) => {
|
|
|
20
21
|
adaptableOptions: adaptableConfig.adaptableOptions,
|
|
21
22
|
gridOptions: adaptableConfig.gridOptions,
|
|
22
23
|
};
|
|
23
|
-
return
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(AdaptableReact_1.default, { ...preparedAdaptableProps });
|
|
24
25
|
}
|
|
25
|
-
return
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
26
27
|
};
|
|
27
28
|
exports.AdaptableOptionsWizardView = AdaptableOptionsWizardView;
|
|
@@ -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 {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Adaptable = exports.useAdaptableAgGridContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const React = tslib_1.__importStar(require("react"));
|
|
6
7
|
const react_1 = require("react");
|
|
7
8
|
const ag_grid_react_1 = require("ag-grid-react");
|
|
@@ -54,7 +55,13 @@ function usePromise() {
|
|
|
54
55
|
const AdaptableProvider = (props) => {
|
|
55
56
|
const [currentTransition, setCurrentTransition] = React.useState(AdaptableAgGridStateTransitions.AG_GRID_EMIT_PROPS);
|
|
56
57
|
const useIdResult = (0, react_1.useId)();
|
|
57
|
-
|
|
58
|
+
// Stable for the lifetime of this Provider — must not change when adaptableOptions
|
|
59
|
+
// is recreated on parent re-render (e.g. inline object literals in JSX).
|
|
60
|
+
const idRef = React.useRef(null);
|
|
61
|
+
if (idRef.current === null) {
|
|
62
|
+
idRef.current = `${props.adaptableOptions.adaptableId || 'adaptable'}-${useIdResult}`;
|
|
63
|
+
}
|
|
64
|
+
const id = idRef.current;
|
|
58
65
|
const [agGridProps, setAgGridProps] = React.useState();
|
|
59
66
|
const [gridOptions, setGridOptions] = React.useState(props.gridOptions);
|
|
60
67
|
const [agGridApi, setAgGridApi] = React.useState();
|
|
@@ -93,7 +100,7 @@ const AdaptableProvider = (props) => {
|
|
|
93
100
|
clearTimeout(timeoutId);
|
|
94
101
|
};
|
|
95
102
|
}, []);
|
|
96
|
-
return (
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)(AdaptableAgGridContext.Provider, { value: {
|
|
97
104
|
id,
|
|
98
105
|
onAdaptableReady,
|
|
99
106
|
adaptableApi,
|
|
@@ -126,17 +133,16 @@ const AdaptableProvider = (props) => {
|
|
|
126
133
|
...props,
|
|
127
134
|
renderAgGridFrameworkComponent,
|
|
128
135
|
},
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
?.TheStore ?? PLACEHOLDER_REDUX_STORE }, props.children)));
|
|
136
|
+
}, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptableApi?.internalApi.getAdaptableInstance()?.adaptableStore?.TheStore ??
|
|
137
|
+
PLACEHOLDER_REDUX_STORE, children: props.children }) }));
|
|
132
138
|
};
|
|
133
139
|
// -- ADAPTABLE UI WRAPPER -
|
|
134
140
|
const AdaptableUI = (props) => {
|
|
135
|
-
const { adaptableProps, modules, gridOptions, transition, onAdaptableReady
|
|
141
|
+
const { adaptableProps, modules, gridOptions, transition, onAdaptableReady } = (0, exports.useAdaptableAgGridContext)();
|
|
136
142
|
if (transition === AdaptableAgGridStateTransitions.AG_GRID_EMIT_PROPS) {
|
|
137
143
|
return null;
|
|
138
144
|
}
|
|
139
|
-
return (
|
|
145
|
+
return ((0, jsx_runtime_1.jsx)(AdaptableReact_1.default
|
|
140
146
|
// This needs to be first, so gridOptions is the one passed and not from props
|
|
141
147
|
, { ...adaptableProps, onAdaptableReady: onAdaptableReady, style: props.style, className: props.className, gridOptions: gridOptions, modules: modules }));
|
|
142
148
|
};
|
|
@@ -189,7 +195,7 @@ const AdaptableAgGridReact = (props) => {
|
|
|
189
195
|
if (transition !== AdaptableAgGridStateTransitions.INITIALIZE_AG_GRID) {
|
|
190
196
|
return null;
|
|
191
197
|
}
|
|
192
|
-
return (
|
|
198
|
+
return ((0, jsx_runtime_1.jsx)(ag_grid_react_1.AgGridReact, { ref: agGridRef, ...agGridPassThroughProps, modules: modules, onGridReady: (event) => {
|
|
193
199
|
// this is not called extra in strict mode
|
|
194
200
|
setAgGridApi(event.api);
|
|
195
201
|
if (props.onGridReady) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
7
7
|
const adaptable_1 = require("@adaptabletools/adaptable-cjs");
|
|
@@ -69,6 +69,6 @@ const AdaptableReact = ({ adaptableOptions, gridOptions, onAdaptableReady, ...pr
|
|
|
69
69
|
console.error('Failed to initialize AdaptableReact component', err);
|
|
70
70
|
});
|
|
71
71
|
}, [id]);
|
|
72
|
-
return (
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: props.style, ref: containerRef, id: adaptableContainerId, className: (0, join_1.default)(props.className, 'ab__react-wrapper'), children: adaptableJSXElement }));
|
|
73
73
|
};
|
|
74
74
|
exports.default = AdaptableReact;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setupFrameworkComponents = void 0;
|
|
4
|
-
const
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
const weakMap = new WeakMap();
|
|
7
6
|
const setupFrameworkComponents = (adaptableApi) => {
|
|
8
7
|
adaptableApi.internalApi
|
|
@@ -17,7 +16,7 @@ const setupFrameworkComponents = (adaptableApi) => {
|
|
|
17
16
|
const ReactComponent = frameworkComponent;
|
|
18
17
|
const unmount = adaptableApi.internalApi
|
|
19
18
|
.getAdaptableInstance()
|
|
20
|
-
.renderReactRoot(
|
|
19
|
+
.renderReactRoot((0, jsx_runtime_1.jsx)(ReactComponent, { adaptableApi: adaptableApi }), containerDomNode);
|
|
21
20
|
weakMap.set(containerDomNode, unmount);
|
|
22
21
|
}
|
|
23
22
|
catch (err) {
|
package/themes/dark.css
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
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;
|
|
18
|
+
--ab-color-background: var(--ab-color-defaultbackground, #3e444c);
|
|
8
19
|
--ab-color-text-on-defaultbackground: #e2e2e2;
|
|
9
20
|
|
|
10
21
|
--ab-color-primary: #262d2f;
|
|
@@ -12,16 +23,25 @@
|
|
|
12
23
|
--ab-color-primarydark: #1c2021;
|
|
13
24
|
--ab-color-text-on-primary: #e2e2e2; /* F2F2F2 */
|
|
14
25
|
|
|
26
|
+
--ab-color-palette-1: #5c1a1a;
|
|
27
|
+
--ab-color-palette-2: #ffb4b4;
|
|
28
|
+
--ab-color-palette-3: #4a3b00;
|
|
29
|
+
--ab-color-palette-4: #ffd966;
|
|
30
|
+
--ab-color-palette-5: #1b4332;
|
|
31
|
+
--ab-color-palette-6: #95d5b2;
|
|
32
|
+
--ab-color-palette-7: #1a365d;
|
|
33
|
+
--ab-color-palette-8: #90cdf4;
|
|
34
|
+
--ab-color-palette-9: #2d3748;
|
|
35
|
+
--ab-color-palette-10: #e2e8f0;
|
|
36
|
+
--ab-color-palette-11: #44337a;
|
|
37
|
+
--ab-color-palette-12: #d6bcfa;
|
|
38
|
+
|
|
15
39
|
--ab-color-shadow: rgb(255 255 255 / 0.45);
|
|
16
40
|
--ab-cmp-modal-backdrop__background: rgba(255, 255, 255, 0.2);
|
|
17
41
|
|
|
18
42
|
--ab-dashboard__border: #555;
|
|
19
43
|
--ab-cmp-dropdownbutton-list-separator__border: 1px solid #555;
|
|
20
44
|
|
|
21
|
-
|
|
22
|
-
--ab-color-filtered-columns: var(--ab-color-text-on-primary);
|
|
23
|
-
--ab-color-filtered-columns-background: var(--ab-color-defaultbackground);
|
|
24
|
-
|
|
25
45
|
--ab-cmp-checkbox__border-color: var(--ab-color-text-on-primary);
|
|
26
46
|
--ab-cmp-checkbox--checked__border-color: var(--ab-color-accent);
|
|
27
47
|
}
|
|
@@ -41,9 +61,9 @@ as our dark theme is anyways applied on the document element.
|
|
|
41
61
|
|
|
42
62
|
*/
|
|
43
63
|
.ab--theme-dark {
|
|
44
|
-
--ab-color-
|
|
45
|
-
--ab-cmp-input__color: var(--ab-color-
|
|
46
|
-
--ab-cmp-input__background: var(--ab-color-
|
|
64
|
+
--ab-color-input-foreground: var(--ab-color-text-on-primary);
|
|
65
|
+
--ab-cmp-input__color: var(--ab-color-input-foreground);
|
|
66
|
+
--ab-cmp-input__background: var(--ab-color-input-background);
|
|
47
67
|
--ab-cmp-input--disabled__background: var(--ab-color-primarylight);
|
|
48
68
|
--ab-cmp-field-wrap__background: var(--ab-color-defaultbackground);
|
|
49
69
|
}
|
|
Binary file
|