Compare commits

...

94 Commits

Author SHA1 Message Date
Phoomparin Mano
82a210e200 Merge branch 'master' into poc-sdk-react-19 2025-03-11 01:06:47 +07:00
Phoomparin Mano
9bca6bec0e Merge branch 'emb-240-bump-sdks-react-version-range-to-support-react-19' into poc-sdk-react-19 2025-03-10 22:46:18 +07:00
Phoomparin Mano
5db912360e Merge branch 'emb-225-fix-react-draggable-on-pivot-table' into poc-sdk-react-19 2025-03-10 22:36:24 +07:00
Phoomparin Mano
701a6a1d06 simplify refs 2025-03-10 22:27:39 +07:00
Phoomparin Mano
cec1672991 prevent react-draggable usage in pivot tables 2025-03-10 22:21:20 +07:00
Phoomparin Mano
01d3e2f56f sync supported react versions 2025-03-10 20:50:12 +07:00
Phoomparin Mano
c9c316e2d6 support react 19 version range in embedding sdk 2025-03-10 20:29:16 +07:00
Phoomparin Mano
745b283e7d cleanup 2025-03-10 20:23:10 +07:00
Phoomparin Mano
502c2cd780 add notes on ref 2025-03-07 22:10:49 +07:00
Phoomparin Mano
6b91661756 initialize in constructor instead 2025-03-07 22:09:39 +07:00
Phoomparin Mano
9e5e035e06 Merge branch 'emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk' into poc-sdk-react-19 2025-03-07 22:05:06 +07:00
Phoomparin Mano
5e20cb1f6a handle case where refs is missing 2025-03-07 22:04:19 +07:00
Phoomparin Mano
5a9280c795 Merge branch 'emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk' into poc-sdk-react-19 2025-03-07 20:30:43 +07:00
Phoomparin Mano
975c589c51 Merge branch 'emb-215-replace-use-of-defaultprops-in-functional-and-styled' into poc-sdk-react-19 2025-03-07 20:30:33 +07:00
Phoomparin Mano
83e8d517ef null check when setting headerRefs 2025-03-07 19:30:27 +07:00
Phoomparin Mano
2bfe74b0b0 Merge branch 'master' into emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk 2025-03-07 19:10:35 +07:00
Phoomparin Mano
ad22c75a95 merge classes for items table 2025-03-07 18:54:29 +07:00
Phoomparin Mano
dee533ac1a Merge branch 'emb-215-replace-use-of-defaultprops-in-functional-and-styled' into poc-sdk-react-19 2025-03-07 16:24:22 +07:00
Phoomparin Mano
087adec83a forward IconButtonWrapper ref 2025-03-07 16:23:29 +07:00
Phoomparin Mano
b4bacfb7e0 forward sortingIcon ref 2025-03-07 15:20:09 +07:00
Phoomparin Mano
ce99c4b2d6 forward ref for more icons 2025-03-07 15:18:29 +07:00
Phoomparin Mano
1d059aaf17 forward ref for more icons 2025-03-07 15:11:50 +07:00
Phoomparin Mano
897ea2e9e2 forward ref for legend description icon 2025-03-07 14:58:54 +07:00
Phoomparin Mano
662fff1a84 Merge branch 'master' into emb-215-replace-use-of-defaultprops-in-functional-and-styled 2025-03-07 14:46:54 +07:00
Phoomparin Mano
f1fd1392ba Merge branch 'emb-214-replace-use-of-finddomnode-in-core-components' into poc-sdk-react-19 2025-03-07 01:13:19 +07:00
Phoomparin Mano
fb68bc0630 revert loki snapshot to master 2025-03-07 01:10:29 +07:00
Phoomparin Mano
e9695f74bb revert loki snapshot 2025-03-07 01:09:11 +07:00
Phoomparin Mano
a6dad6d528 fallback to scrollingContainer instead of elementRef 2025-03-07 01:03:10 +07:00
Phoomparin Mano
5ac4d54465 Merge branch 'emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk' into poc-sdk-react-19 2025-03-07 00:34:22 +07:00
Phoomparin Mano
9d963af2e1 cleanup reason message 2025-03-07 00:31:51 +07:00
Phoomparin Mano
9258ceb7bf cleanup _setupColumnHeaderDraggableRefs argument 2025-03-07 00:29:49 +07:00
Phoomparin Mano
db0d4d2109 Merge branch 'emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk' into poc-sdk-react-19 2025-03-07 00:24:45 +07:00
Phoomparin Mano
30ed031b50 use the correct ref value 2025-03-07 00:22:40 +07:00
Phoomparin Mano
e3f4e43d45 Merge branch 'master' into emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk 2025-03-07 00:19:54 +07:00
Phoomparin Mano
ea9ae12942 make naming more explicit 2025-03-07 00:02:49 +07:00
Phoomparin Mano
4cb554e2ac remove dummy node 2025-03-07 00:01:18 +07:00
Phoomparin Mano
34b00f2f95 use setupDraggableRefs 2025-03-07 00:01:18 +07:00
Phoomparin Mano
d1ab61e0bd add poc code for interactive tables 2025-03-07 00:01:18 +07:00
Phoomparin Mano
fa333177fa remove dummy node 2025-03-06 23:59:57 +07:00
Phoomparin Mano
682d879731 use setupDraggableRefs 2025-03-06 23:57:17 +07:00
Phoomparin Mano
5c05f84b93 modify snapshots 2025-03-06 23:37:43 +07:00
Phoomparin Mano
77fdc2fe31 add poc code for interactive tables 2025-03-06 23:24:47 +07:00
Phoomparin Mano
38f47b7764 default to ContentTable instead 2025-03-06 20:02:51 +07:00
Phoomparin Mano
81eddc4446 try to update Loki snapshots 2025-03-06 19:57:18 +07:00
Phoomparin Mano
2a9d1e1457 Merge branch 'emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk' into poc-sdk-react-19 2025-03-05 20:56:24 +07:00
Phoomparin Mano
b16f112c7d fix ResizeHandle ref type 2025-03-05 20:56:09 +07:00
Phoomparin Mano
2afe3260de cleanup type 2025-03-05 20:55:12 +07:00
Phoomparin Mano
cf80cc45b6 Merge branch 'master' into emb-214-replace-use-of-finddomnode-in-core-components 2025-03-05 20:52:12 +07:00
Phoomparin Mano
72627fb4de Merge branch 'emb-225-fix-react-draggable-finddomnode-errors-on-the-sdk' into poc-sdk-react-19 2025-03-05 20:48:00 +07:00
Phoomparin Mano
b4200515fa attach nodeRef to resizeHandleRefs and headerRefs 2025-03-05 20:44:13 +07:00
Phoomparin Mano
99bbbadc1b move resizeHandleRef under nodeRef 2025-03-05 20:36:31 +07:00
Phoomparin Mano
294784efe7 try upgrading react-draggable to 4.4.6 2025-03-05 20:31:42 +07:00
Phoomparin Mano
9d2aa2b2d0 Merge branch 'emb-215-replace-use-of-defaultprops-in-functional-and-styled' into poc-sdk-react-19 2025-03-05 20:29:30 +07:00
Phoomparin Mano
2fd24a25e0 cleanup DoneButton 2025-03-05 20:29:11 +07:00
Phoomparin Mano
d04f216e1b Merge branch 'emb-215-replace-use-of-defaultprops-in-functional-and-styled' into poc-sdk-react-19 2025-03-05 20:17:30 +07:00
Phoomparin Mano
5b1c543481 forward ref for BookmarkButton 2025-03-05 20:13:32 +07:00
Phoomparin Mano
8fa7319182 Merge branch 'emb-215-replace-use-of-defaultprops-in-functional-and-styled' into poc-sdk-react-19 2025-03-05 20:05:26 +07:00
Phoomparin Mano
0101329b63 Merge branch 'emb-213-replace-use-of-finddomnode-in-visualization-components' into poc-sdk-react-19 2025-03-05 20:05:20 +07:00
Phoomparin Mano
ee959166cb Merge branch 'emb-214-replace-use-of-finddomnode-in-core-components' into poc-sdk-react-19 2025-03-05 20:05:14 +07:00
Phoomparin Mano
bceee4f440 Merge branch 'master' into poc-sdk-react-19 2025-03-05 20:04:50 +07:00
Phoomparin Mano
ff19f3f622 attach listRootRef conditionally 2025-03-05 19:58:56 +07:00
Phoomparin Mano
ef58e1105a remove text.0 2025-03-05 19:51:58 +07:00
Phoomparin Mano
aff1920272 cleanup NodeRootProps 2025-03-05 19:50:10 +07:00
Phoomparin Mano
b269e0cec9 cleanup IconContainer 2025-03-05 19:47:57 +07:00
Phoomparin Mano
431f9eb922 cleanup type imports 2025-03-05 19:40:47 +07:00
Phoomparin Mano
99ccf59fd7 cleanup remaining defaultProps 2025-03-05 19:35:52 +07:00
Phoomparin Mano
f54fd3c5a6 cleanup defaultProps 2025-03-05 19:28:11 +07:00
Phoomparin Mano
a9cb21bedd additional styled default props cleanup 2025-03-05 19:16:40 +07:00
Phoomparin Mano
e874b38803 cleanup PermissionsSelect and SmartScalarSettingsWidget 2025-03-05 19:08:45 +07:00
Phoomparin Mano
d8f30e8a0c cleanup additional styled components 2025-03-05 19:04:13 +07:00
Phoomparin Mano
83c374262d cleanup BookmarkToggle and TableSimple 2025-03-05 18:53:33 +07:00
Phoomparin Mano
0c68b5c1ba cleanup StrategyFormLauncher and QuestionModerationSection 2025-03-05 18:49:44 +07:00
Phoomparin Mano
e444c0ad80 cleanup defaultProps in BaseItemsTable 2025-03-05 18:38:36 +07:00
Phoomparin Mano
f2f0836217 use display contents to preserve layout 2025-03-05 18:05:24 +07:00
Phoomparin Mano
4cd70bc715 remove full-width container 2025-03-05 17:43:36 +07:00
Phoomparin Mano
df44d6efb8 use full-width container 2025-03-05 17:40:09 +07:00
Phoomparin Mano
b63e0bda55 expose rootElement via ref 2025-03-05 14:58:05 +07:00
Phoomparin Mano
e9cb88de73 remove type cast 2025-03-05 14:27:28 +07:00
Phoomparin Mano
f372e87db3 remove findDOMNode usage in viz components 2025-03-05 14:21:28 +07:00
Phoomparin Mano
3b9d934c5f pass the elementRef directly 2025-03-05 13:39:28 +07:00
Phoomparin Mano
73c8669b82 use the scrollingContainerRef instead 2025-03-05 13:37:16 +07:00
Phoomparin Mano
2e845b546c Merge branch 'master' into emb-214-replace-use-of-finddomnode-in-core-components 2025-03-05 13:26:32 +07:00
Phoomparin Mano
e469619c17 cleanup root container 2025-03-04 22:09:59 +07:00
Phoomparin Mano
8efeb7048f use appropriate ref container 2025-03-04 22:05:30 +07:00
Phoomparin Mano
d9439d1ad4 remove scrollElementRef 2025-03-04 21:34:32 +07:00
Phoomparin Mano
ff383cb2fc do not export _TokenField 2025-03-04 21:25:26 +07:00
Phoomparin Mano
f9eea43ada remove scrollElement from TokenField 2025-03-04 21:24:20 +07:00
Phoomparin Mano
bcd38cec9f always populate scrollElementRef 2025-03-04 21:23:32 +07:00
Phoomparin Mano
0bb61a0c40 do not wrap input in div 2025-03-04 21:22:17 +07:00
Phoomparin Mano
a087fd7191 replace use of findDOMNode in core components 2025-03-04 21:19:27 +07:00
Phoomparin Mano
e3309238b0 bump deps 2025-03-04 19:38:06 +07:00
Phoomparin Mano
eb9edd9aa1 bump types to 19 2025-03-03 23:27:49 +07:00
Phoomparin Mano
018f398976 try bumping react to 19 2025-03-03 23:22:22 +07:00
Phoomparin Mano
2d47309c25 react 19 bump 2025-03-03 23:21:55 +07:00
7 changed files with 40 additions and 41 deletions

View File

@@ -18,7 +18,7 @@ Here's the [Shoppy source code](https://github.com/metabase/shoppy).
## Embedded analytics SDK prerequisites
- React application using React 17 or React 18.
- React application using React 17, 18 or 19.
- Nodejs 20.x or higher.
- Metabase version 1.52 or higher.
@@ -72,9 +72,9 @@ You can find the [Embedded analytics SDK source code in the Metabase repo](https
View the SDK's changelog:
* [54-nightly](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk/CHANGELOG.md)
* [53-stable](https://github.com/metabase/metabase/blob/release-x.53.x/enterprise/frontend/src/embedding-sdk/CHANGELOG.md)
* [52-stable](https://github.com/metabase/metabase/blob/release-x.52.x/enterprise/frontend/src/embedding-sdk/CHANGELOG.md)
- [54-nightly](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk/CHANGELOG.md)
- [53-stable](https://github.com/metabase/metabase/blob/release-x.53.x/enterprise/frontend/src/embedding-sdk/CHANGELOG.md)
- [52-stable](https://github.com/metabase/metabase/blob/release-x.52.x/enterprise/frontend/src/embedding-sdk/CHANGELOG.md)
## Embedded analytics SDK on NPM
@@ -94,12 +94,12 @@ The SDK doesn't support:
## Issues, feature requests and support
[Bugs](https://github.com/metabase/metabase/issues/?q=is%3Aissue%20state%3Aopen%20label%3AType%3ABug%20label%3AEmbedding%2FSDK) and [feature requests](https://github.com/metabase/metabase/issues/?q=is%3Aissue%20state%3Aopen%20label%3AEmbedding%2FSDK%20label%3A%22Type%3ANew%20Feature%22) are tracked on GitHub.
[Bugs](https://github.com/metabase/metabase/issues/?q=is%3Aissue%20state%3Aopen%20label%3AType%3ABug%20label%3AEmbedding%2FSDK) and [feature requests](https://github.com/metabase/metabase/issues/?q=is%3Aissue%20state%3Aopen%20label%3AEmbedding%2FSDK%20label%3A%22Type%3ANew%20Feature%22) are tracked on GitHub.
You can upvote an existing feature request by leaving a thumbs up emoji reaction on the issue. Feel free to leave comments with context that could be useful. [Read more](https://www.metabase.com/docs/latest/troubleshooting-guide/requesting-new-features).
Before creating new issues, please make sure an issue for your problem or feature request doesn't already exist.
To seek help:
- Paid customers can contact our success team through the usual channels.

View File

@@ -23,7 +23,7 @@ export const PACKAGE_JSON_NOT_FOUND_MESSAGE = `
export const MISSING_REACT_DEPENDENCY = `
Your package.json file does not contain a dependency for React.
Please make sure your package.json file contains a dependency for React 18.
Please make sure your package.json file contains a dependency for React 17 - 19.
`;
export const UNSUPPORTED_REACT_VERSION = `

View File

@@ -14,7 +14,7 @@ import {
} from "../utils/get-package-version";
const isReactVersionSupported = (version: string) =>
semver.satisfies(semver.coerce(version)!, "18.x");
semver.satisfies(semver.coerce(version)!, "17.x || 18.x || 19.x");
export const checkIfReactProject: CliStepMethod = async state => {
const spinner = ora("Checking if this is a React project…").start();

View File

@@ -27,7 +27,7 @@
},
"types": "./dist/enterprise/frontend/src/embedding-sdk/index.d.ts",
"peerDependencies": {
"react": ">=17 <=18",
"react-dom": ">=17 <=18"
"react": ">=17 <=19",
"react-dom": ">=17 <=19"
}
}

View File

@@ -132,7 +132,7 @@ export function FormCreator({
<SidebarContent>
<FormContainer>
{onClose && (
/* We want to avoid absolute positioning, so we use margin with z-index since
/* We want to avoid absolute positioning, so we use margin with z-index since
it's covered by the next element with padding */
<Flex
justify="flex-end"

View File

@@ -95,15 +95,15 @@
"process": "^0.11.10",
"prop-types": "^15.5.7",
"re-reselect": "^4.0.1",
"react": "^18.2.0",
"react": "^19",
"react-ansi-style": "^1.0.0",
"react-beautiful-dnd": "^13.1.1",
"react-color": "^2.14.1",
"react-copy-to-clipboard": "^5.0.1",
"react-dnd": "4",
"react-dnd-html5-backend": "4",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.5",
"react-dom": "^19",
"react-draggable": "^4.4.6",
"react-dropzone": "^14.2.3",
"react-grid-layout": "^1.4.4",
"react-innertext": "^1.1.5",
@@ -217,11 +217,11 @@
"@types/prettier": "1.19.1",
"@types/prop-types": "^15.7.4",
"@types/raf": "^3.4.0",
"@types/react": "^18.3.3",
"@types/react": "^19",
"@types/react-beautiful-dnd": "^13.1.3",
"@types/react-color": "^2.17.6",
"@types/react-copy-to-clipboard": "^5.0.2",
"@types/react-dom": "^18.2.17",
"@types/react-dom": "^19",
"@types/react-grid-layout": "^1.3.5",
"@types/react-is": "^18.2.4",
"@types/react-resizable": "^3.0.4",

View File

@@ -4777,6 +4777,11 @@
dependencies:
"@types/react" "*"
"@types/react-dom@^19":
version "19.0.4"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.4.tgz#bedba97f9346bd4c0fe5d39e689713804ec9ac89"
integrity sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg==
"@types/react-grid-layout@^1.3.5":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/react-grid-layout/-/react-grid-layout-1.3.5.tgz#f4b52bf27775290ee0523214be0987be14e66823"
@@ -4854,12 +4859,11 @@
"@types/prop-types" "*"
csstype "^3.0.2"
"@types/react@^18.3.3":
version "18.3.3"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.3.tgz#9679020895318b0915d7a3ab004d92d33375c45f"
integrity sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==
"@types/react@^19":
version "19.0.10"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.10.tgz#d0c66dafd862474190fe95ce11a68de69ed2b0eb"
integrity sha512-JuRQ9KXLEjaUNjTWpzuR231Z2WpIwczOkBEIvbHNCzQefFIT0L8IqE6NV6ULLyC1SI/i234JnDoMkfg+RjQj2g==
dependencies:
"@types/prop-types" "*"
csstype "^3.0.2"
"@types/reactcss@*":
@@ -17166,13 +17170,12 @@ react-docgen@^7.0.0:
loose-envify "^1.1.0"
scheduler "^0.23.2"
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
react-dom@^19:
version "19.0.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57"
integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==
dependencies:
loose-envify "^1.1.0"
scheduler "^0.23.0"
scheduler "^0.25.0"
react-draggable@^4.0.3:
version "4.4.3"
@@ -17182,7 +17185,7 @@ react-draggable@^4.0.3:
classnames "^2.2.5"
prop-types "^15.6.0"
react-draggable@^4.4.5:
react-draggable@^4.4.5, react-draggable@^4.4.6:
version "4.4.6"
resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.6.tgz#63343ee945770881ca1256a5b6fa5c9f5983fe1e"
integrity sha512-LtY5Xw1zTPqHkVmtM3X8MUOxNDOUhv/khTgBgrUvwaS064bwVvxT+q5El0uUFNx5IEPKXuRejr7UqLwBIg5pdw==
@@ -17445,12 +17448,10 @@ react@^17.0.2:
loose-envify "^1.1.0"
object-assign "^4.1.1"
react@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
dependencies:
loose-envify "^1.1.0"
react@^19:
version "19.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd"
integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==
reactcss@^1.2.0:
version "1.2.3"
@@ -18241,13 +18242,6 @@ scheduler@^0.20.2:
loose-envify "^1.1.0"
object-assign "^4.1.1"
scheduler@^0.23.0:
version "0.23.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
dependencies:
loose-envify "^1.1.0"
scheduler@^0.23.2:
version "0.23.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
@@ -18255,6 +18249,11 @@ scheduler@^0.23.2:
dependencies:
loose-envify "^1.1.0"
scheduler@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015"
integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==
schema-utils@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef"