Skip to content

Commit

Permalink
chore: removes react-bootstrap (apache#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored and zhaoyongjie committed Nov 17, 2021
1 parent c8f9992 commit ad7e829
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
"lint-staged": "^10.0.3",
"prettier": "^2.2.1",
"react": "^16.13.1",
"react-bootstrap": "^0.33.1",
"react-dom": "^16.13.1",
"react-loadable": "^5.5.0",
"react-test-renderer": "^16.13.1",
Expand All @@ -136,9 +135,6 @@
"webpack-sources": "^1.4.3",
"yargs": "^15.4.1"
},
"resolutions": {
"@types/react-bootstrap/@types/react": "^16.14.2"
},
"engines": {
"node": "14.x",
"npm": "^7.5.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
},
"peerDependencies": {
"@types/react": "*",
"@types/react-bootstrap": "*",
"antd": "^4.9.4",
"react": "^16.13.1",
"react-bootstrap": "^0.33.1",
"react-icons": "^4.2.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,34 @@
* under the License.
*/
import React from 'react';
import { Tooltip, OverlayTrigger } from 'react-bootstrap';
import { kebabCase } from 'lodash';
import { t, supersetTheme } from '@superset-ui/core';

const tooltipStyle: React.CSSProperties = { wordWrap: 'break-word' };
import { t, useTheme, styled } from '@superset-ui/core';
import Tooltip from './Tooltip';

interface CertifiedIconWithTooltipProps {
certifiedBy?: string | null;
details?: string | null;
metricName: string;
}

const StyledDiv = styled.div`
margin-bottom: ${({ theme }) => theme.gridUnit * 2}px;
`;

function CertifiedIconWithTooltip({
certifiedBy,
details,
metricName,
}: CertifiedIconWithTooltipProps) {
const theme = useTheme();
return (
<OverlayTrigger
placement="top"
overlay={
<Tooltip id={`${kebabCase(metricName)}-tooltip`} style={tooltipStyle}>
{certifiedBy && <div>{t('Certified by %s', certifiedBy)}</div>}
<Tooltip
id={`${kebabCase(metricName)}-tooltip`}
title={
<div>
{certifiedBy && <StyledDiv>{t('Certified by %s', certifiedBy)}</StyledDiv>}
<div>{details}</div>
</Tooltip>
</div>
}
>
{/* TODO: move Icons to superset-ui to remove duplicated icon code here */}
Expand All @@ -54,12 +57,12 @@ function CertifiedIconWithTooltip({
>
<g>
<path
fill={supersetTheme.colors.primary.base}
fill={theme.colors.primary.base}
d="M23,12l-2.44-2.79l0.34-3.69l-3.61-0.82L15.4,1.5L12,2.96L8.6,1.5L6.71,4.69L3.1,5.5L3.44,9.2L1,12l2.44,2.79l-0.34,3.7 l3.61,0.82L8.6,22.5l3.4-1.47l3.4,1.46l1.89-3.19l3.61-0.82l-0.34-3.69L23,12z M9.38,16.01L7,13.61c-0.39-0.39-0.39-1.02,0-1.41 l0.07-0.07c0.39-0.39,1.03-0.39,1.42,0l1.61,1.62l5.15-5.16c0.39-0.39,1.03-0.39,1.42,0l0.07,0.07c0.39,0.39,0.39,1.02,0,1.41 l-5.92,5.94C10.41,16.4,9.78,16.4,9.38,16.01z"
/>
</g>
</svg>
</OverlayTrigger>
</Tooltip>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@
},
"peerDependencies": {
"@types/react": "*",
"@types/react-bootstrap": "*",
"@types/react-loadable": "*",
"react": "^16.13.1",
"react-bootstrap": "^0.33.1",
"react-loadable": "^5.5.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"@superset-ui/plugin-chart-echarts": "0.17.47",
"@superset-ui/plugin-chart-table": "0.17.46",
"@superset-ui/plugin-chart-word-cloud": "0.17.46",
"@types/react-bootstrap": "^0.32.22",
"@types/react-loadable": "^5.5.3",
"@types/react-resizable": "^1.7.2",
"@types/storybook__react": "5.2.1",
Expand All @@ -76,7 +75,6 @@
"jquery": "^3.4.1",
"memoize-one": "^5.1.1",
"react": "^16.13.1",
"react-bootstrap": "^0.33.1",
"react-icons": "^4.2.0",
"react-loadable": "^5.5.0",
"react-resizable": "^1.10.1",
Expand Down
99 changes: 4 additions & 95 deletions superset-frontend/temporary_superset_ui/superset-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@
pirates "^4.0.0"
source-map-support "^0.5.16"

"@babel/runtime-corejs2@^7.0.0", "@babel/runtime-corejs2@^7.1.5":
"@babel/runtime-corejs2@^7.1.5":
version "7.13.10"
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.13.10.tgz#31ba66b951cbd44569d7e70cb58a7b3da866951a"
integrity sha512-rZw5P1ZewO6XZTDxtXuAuAFUqfNXyM8HO/9WiaDd34Anka0uFTpo0RvBLeV775AEE/zKw3LQB+poZw/O9lrZBg==
Expand Down Expand Up @@ -4881,13 +4881,6 @@
dependencies:
"@types/react" "*"

"@types/react-bootstrap@^0.32.22":
version "0.32.25"
resolved "https://registry.yarnpkg.com/@types/react-bootstrap/-/react-bootstrap-0.32.25.tgz#fdea798f9a2623a161ed61939898078ae841df1e"
integrity sha512-VTa6viz5L+uPblEiF2pZz/n425cC49hrjLTsiLySxf7fw+UkchkjpskrsOHRvC6cCgCAG9futRWvOOjD1IBQqQ==
dependencies:
"@types/react" "*"

"@types/react-color@^3.0.1":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/react-color/-/react-color-3.0.4.tgz#c63daf012ad067ac0127bdd86725f079d02082bd"
Expand Down Expand Up @@ -4939,7 +4932,7 @@
dependencies:
"@types/react" "*"

"@types/react@*", "@types/react@>=16.9.11":
"@types/react@*":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.3.tgz#ba6e215368501ac3826951eef2904574c262cc79"
integrity sha512-wYOUxIgs2HZZ0ACNiIayItyluADNbONl7kt8lkLjVK8IitMH5QMyAh75Fwhmo37r1m7L2JaFj03sIfxBVDvRAg==
Expand Down Expand Up @@ -9812,13 +9805,6 @@ dom-converter@^0.2:
dependencies:
utila "~0.4"

dom-helpers@^3.2.0, dom-helpers@^3.2.1, dom-helpers@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8"
integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==
dependencies:
"@babel/runtime" "^7.1.2"

dom-helpers@^5.0.1:
version "5.2.0"
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.0.tgz#57fd054c5f8f34c52a3eeffdb7e7e93cd357d95b"
Expand Down Expand Up @@ -15049,11 +15035,6 @@ kdbush@^3.0.0:
resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-3.0.0.tgz#f8484794d47004cc2d85ed3a79353dbe0abc2bf0"
integrity sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==

keycode@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
integrity sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=

killable@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
Expand Down Expand Up @@ -18169,14 +18150,6 @@ prop-types-exact@^1.2.0:
object.assign "^4.1.0"
reflect.ownkeys "^0.2.0"

prop-types-extra@^1.0.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/prop-types-extra/-/prop-types-extra-1.1.1.tgz#58c3b74cbfbb95d304625975aa2f0848329a010b"
integrity sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==
dependencies:
react-is "^16.3.2"
warning "^4.0.0"

[email protected]:
version "15.5.10"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154"
Expand Down Expand Up @@ -18853,24 +18826,6 @@ react-addons-create-fragment@^15.6.2:
loose-envify "^1.3.1"
object-assign "^4.1.0"

react-bootstrap@^0.33.1:
version "0.33.1"
resolved "https://registry.yarnpkg.com/react-bootstrap/-/react-bootstrap-0.33.1.tgz#e072592aa143b9792526281272eca754bc9a4940"
integrity sha512-qWTRravSds87P8WC82tETy2yIso8qDqlIm0czsrduCaYAFtHuyLu0XDbUlfLXeRzqgwm5sRk2wRaTNoiVkk/YQ==
dependencies:
"@babel/runtime-corejs2" "^7.0.0"
classnames "^2.2.5"
dom-helpers "^3.2.0"
invariant "^2.2.4"
keycode "^2.2.0"
prop-types "^15.6.1"
prop-types-extra "^1.0.1"
react-overlays "^0.9.0"
react-prop-types "^0.4.0"
react-transition-group "^2.0.0"
uncontrollable "^7.0.2"
warning "^3.0.0"

react-clientside-effect@^1.2.2:
version "1.2.5"
resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.5.tgz#e2c4dc3c9ee109f642fac4f5b6e9bf5bcd2219a3"
Expand Down Expand Up @@ -19081,7 +19036,7 @@ react-inspector@^4.0.0:
is-dom "^1.0.9"
prop-types "^15.6.1"

react-is@^16.12.0, react-is@^16.13.1, react-is@^16.3.2, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.3, react-is@^16.8.6:
react-is@^16.12.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.3, react-is@^16.8.6:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
Expand Down Expand Up @@ -19140,18 +19095,6 @@ react-move@^2.1.0:
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react-overlays@^0.9.0:
version "0.9.3"
resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-0.9.3.tgz#5bac8c1e9e7e057a125181dee2d784864dd62902"
integrity sha512-u2T7nOLnK+Hrntho4p0Nxh+BsJl0bl4Xuwj/Y0a56xywLMetgAfyjnDVrudLXsNcKGaspoC+t3C1V80W9QQTdQ==
dependencies:
classnames "^2.2.5"
dom-helpers "^3.2.1"
prop-types "^15.5.10"
prop-types-extra "^1.0.1"
react-transition-group "^2.2.1"
warning "^3.0.0"

react-popper-tooltip@^2.8.3:
version "2.11.1"
resolved "https://registry.yarnpkg.com/react-popper-tooltip/-/react-popper-tooltip-2.11.1.tgz#3c4bdfd8bc10d1c2b9a162e859bab8958f5b2644"
Expand Down Expand Up @@ -19190,13 +19133,6 @@ react-popper@^2.2.4:
react-fast-compare "^3.0.1"
warning "^4.0.2"

react-prop-types@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/react-prop-types/-/react-prop-types-0.4.0.tgz#f99b0bfb4006929c9af2051e7c1414a5c75b93d0"
integrity sha1-+ZsL+0AGkpya8gUefBQUpcdbk9A=
dependencies:
warning "^3.0.0"

react-refresh@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"
Expand Down Expand Up @@ -19321,16 +19257,6 @@ react-textarea-autosize@^8.1.1:
use-composed-ref "^1.0.0"
use-latest "^1.0.0"

react-transition-group@^2.0.0, react-transition-group@^2.2.1:
version "2.9.0"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d"
integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==
dependencies:
dom-helpers "^3.4.0"
loose-envify "^1.4.0"
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react-transition-group@^4.3.0:
version "4.4.1"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9"
Expand Down Expand Up @@ -22201,16 +22127,6 @@ unbox-primitive@^1.0.0:
has-symbols "^1.0.0"
which-boxed-primitive "^1.0.1"

uncontrollable@^7.0.2:
version "7.2.1"
resolved "https://registry.yarnpkg.com/uncontrollable/-/uncontrollable-7.2.1.tgz#1fa70ba0c57a14d5f78905d533cf63916dc75738"
integrity sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==
dependencies:
"@babel/runtime" "^7.6.3"
"@types/react" ">=16.9.11"
invariant "^2.2.4"
react-lifecycles-compat "^3.0.4"

unfetch@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be"
Expand Down Expand Up @@ -22730,14 +22646,7 @@ walker@^1.0.7, walker@~1.0.5:
dependencies:
makeerror "1.0.x"

warning@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c"
integrity sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=
dependencies:
loose-envify "^1.0.0"

warning@^4.0.0, warning@^4.0.1, warning@^4.0.2, warning@^4.0.3:
warning@^4.0.1, warning@^4.0.2, warning@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
Expand Down

0 comments on commit ad7e829

Please sign in to comment.