@adaptabletools/adaptable-react-aggrid 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-react-aggrid",
3
- "version": "22.1.1-canary.1",
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",
@@ -8,11 +8,11 @@
8
8
  "dependencies": {
9
9
  "tslib": "^2.8.1",
10
10
  "react-redux": "9.2.0",
11
- "@adaptabletools/adaptable": "22.1.1-canary.1"
11
+ "@adaptabletools/adaptable": "23.0.0-canary.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "ag-grid-enterprise": ">=35.2.0",
15
- "ag-grid-react": ">=35.2.0",
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 (React.createElement(AdaptableWizardView, { ...adaptableWizardViewProps, onInit: (adaptableOptions, gridOptions) => {
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 React.createElement(AdaptableReact, { ...preparedAdaptableProps });
20
+ return _jsx(AdaptableReact, { ...preparedAdaptableProps });
20
21
  }
21
- return React.createElement(React.Fragment, null);
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
- }) => React.JSX.Element;
42
- AgGridReact: (props: AgGridReactPropsWithoutGridOptionsAndModules) => React.JSX.Element;
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
- const id = `${props.adaptableOptions.adaptableId || 'adaptable'}-${useIdResult}`;
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 (React.createElement(AdaptableAgGridContext.Provider, { value: {
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
- React.createElement(ReduxProvider, { store: adaptableApi?.internalApi.getAdaptableInstance()?.adaptableStore
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, id } = useAdaptableAgGridContext();
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 (React.createElement(AdaptableReactComponent
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 (React.createElement(AgGridReact, { ref: agGridRef, ...agGridPassThroughProps, modules: modules, onGridReady: (event) => {
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 * as React from 'react';
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 (React.createElement("div", { style: props.style, ref: containerRef, id: adaptableContainerId, className: join(props.className, 'ab__react-wrapper') }, adaptableJSXElement));
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 * as React from 'react';
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(React.createElement(ReactComponent, { adaptableApi: adaptableApi }), containerDomNode);
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,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-inputcolor: var(--ab-color-text-on-primary);
45
- --ab-cmp-input__color: var(--ab-color-inputcolor);
46
- --ab-cmp-input__background: var(--ab-color-defaultbackground);
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
  }