@adaptabletools/adaptable-react-aggrid 23.0.0-canary.1 → 23.0.0-canary.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-react-aggrid",
3
- "version": "23.0.0-canary.1",
3
+ "version": "23.0.0-canary.10",
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,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "tslib": "^2.8.1",
10
10
  "react-redux": "9.2.0",
11
- "@adaptabletools/adaptable": "23.0.0-canary.1"
11
+ "@adaptabletools/adaptable": "23.0.0-canary.10"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "ag-grid-enterprise": ">=35.3.0",
@@ -25,6 +25,20 @@ const AdaptableReact = ({ adaptableOptions, gridOptions, onAdaptableReady, ...pr
25
25
  destroyAgGrid: false,
26
26
  });
27
27
  adaptableApiRef.current = null;
28
+ // We fully tore down a *ready* instance — i.e. a real unmount such as
29
+ // navigation or an HMR / Fast Refresh update (where the container is
30
+ // remounted but `id`, derived from `useId()`, stays the same). Clear the
31
+ // module-level guards so the instance is recreated when the container
32
+ // mounts again. Without this, `isInstanceStarted(id)` stays `true` and
33
+ // the destroyed instance is never replaced, leaving components holding a
34
+ // null api.
35
+ //
36
+ // In React StrictMode the transient unmount happens *before* the instance
37
+ // becomes ready, so `successInstances.get(id)` is not yet `true` and this
38
+ // branch is skipped — preserving the single in-flight init (no double
39
+ // initialization).
40
+ startedInstances.delete(id);
41
+ successInstances.delete(id);
28
42
  }
29
43
  }, [id]);
30
44
  const containerRef = useCallback((node) => {
package/themes/dark.css CHANGED
@@ -1,78 +1 @@
1
- @layer adaptable.theme {
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
-
13
- --ab-theme-loaded: dark;
14
-
15
- --ab-cmp-input--disabled__background: #232323; /* #b6b7b8 */
16
-
17
- --ab-color-defaultbackground: #3e444c;
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);
21
-
22
- --ab-color-primary: #262d2f;
23
- --ab-color-primary-foreground: var(--ab-color-text-on-primary);
24
- --ab-color-primarylight: #3d3e3f;
25
- --ab-color-primarydark: #1c2021;
26
- --ab-color-text-on-primary: #e2e2e2; /* F2F2F2 */
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
-
41
- --ab-color-shadow: rgb(255 255 255 / 0.45);
42
- --ab-cmp-modal-backdrop__background: rgba(255, 255, 255, 0.2);
43
-
44
- --ab-dashboard__border: #555;
45
- --ab-cmp-dropdownbutton-list-separator__border: 1px solid #555;
46
-
47
- --ab-cmp-checkbox__border-color: var(--ab-color-text-on-primary);
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;
55
- }
56
-
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 {
58
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="4 0 18 18" version="1.1"><path fill="%23f7f7f7" d="M7 10l5 5 5-5z" transform="translate(0, 2)"/><path fill="%23f7f7f7" d="M7 14l5-5 5 5z" transform="translate(0, -6)"/></svg>')
59
- no-repeat center center;
60
- }
61
-
62
- /*
63
- The following are only redefined here so that the DARK theme in Storybook
64
- can be previewed correctly as that relies on an element (not the document element)
65
- to have the class ab--theme-dark.
66
-
67
- For our production release those are not needed and could be removed
68
- as our dark theme is anyways applied on the document element.
69
-
70
- */
71
- .ab--theme-dark {
72
- --ab-color-input-foreground: var(--ab-color-text-on-primary);
73
- --ab-cmp-input__color: var(--ab-color-input-foreground);
74
- --ab-cmp-input__background: var(--ab-color-defaultbackground);
75
- --ab-cmp-input--disabled__background: var(--ab-color-primarylight);
76
- --ab-cmp-field-wrap__background: var(--ab-color-defaultbackground);
77
- }
78
- }
1
+ /* you no longer need to import this file, as both the light and dark themes are in the index.css file */
package/themes/light.css CHANGED
@@ -1,5 +1 @@
1
- @layer adaptable.theming {
2
- html.ab--theme-light {
3
- --ab-theme-loaded: light;
4
- }
5
- }
1
+ /* you no longer need to import this file, as both the light and dark themes are in the index.css file */