This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 38c57f4 feat: partitionchart controls migration (#9768)
38c57f4 is described below
commit 38c57f45ac93ae43cfd29ac5de9edfdb062fd372
Author: Phillip Kelley-Dotson <[email protected]>
AuthorDate: Mon May 18 12:48:51 2020 -0700
feat: partitionchart controls migration (#9768)
* fix lint error
* fix: import lint error
* pull in latests code
* delete control from plugin registry
* fixing again...
* another fix with rebase...
* commit change
* update packages and fix test
* fix: add ignore to lint error
* fix mr
* fix lint
* fix imports
Co-authored-by: Phillip Kelley-Dotson <[email protected]>
---
superset-frontend/package-lock.json | 25 ++-
superset-frontend/package.json | 4 +-
.../javascripts/components/ColumnOption_spec.jsx | 2 +-
.../spec/javascripts/components/FormRow_spec.jsx | 2 +-
.../javascripts/components/MetricOption_spec.jsx | 2 +-
.../components/OptionDescription_spec.jsx | 48 -----
.../components/ControlPanelSection_spec.jsx | 4 +-
.../SqlLab/components/ExploreCtasResultsButton.jsx | 3 +-
.../src/SqlLab/components/ExploreResultsButton.jsx | 2 +-
.../src/SqlLab/components/TemplateParamsEditor.jsx | 2 +-
.../src/components/ActionMenuItem.jsx | 2 +-
superset-frontend/src/components/ColumnOption.jsx | 2 +-
superset-frontend/src/components/FormRow.jsx | 2 +-
.../src/components/InfoTooltipWithTrigger.jsx | 77 -------
.../src/components/ListView/LegacyFilters.tsx | 3 +
.../src/components/ListView/ListView.tsx | 1 +
superset-frontend/src/components/MetricOption.jsx | 2 +-
.../src/components/OptionDescription.jsx | 45 ----
.../src/components/PopoverSection.jsx | 2 +-
.../src/explore/components/AdhocFilterOption.jsx | 2 +-
.../src/explore/components/ControlHeader.jsx | 2 +-
.../src/explore/components/ControlPanelSection.jsx | 2 +-
.../src/explore/components/PropertiesModal.tsx | 3 +
.../components/controls/AnnotationLayerControl.jsx | 2 +-
.../components/controls/CollectionControl.jsx | 2 +-
.../components/controls/FilterBoxItemControl.jsx | 2 +-
.../controls/TimeSeriesColumnControl.jsx | 2 +-
.../src/explore/controlPanels/Partition.jsx | 233 ---------------------
superset-frontend/src/setup/setupPlugins.ts | 2 -
.../src/visualizations/TimeTable/TimeTable.jsx | 2 +-
.../SqlLab/components/ExploreCtasResultsButton.jsx | 2 +-
31 files changed, 50 insertions(+), 436 deletions(-)
diff --git a/superset-frontend/package-lock.json
b/superset-frontend/package-lock.json
index 61b06cd..ccd71fa 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -6575,9 +6575,14 @@
}
},
"@superset-ui/control-utils": {
- "version": "0.13.3",
- "resolved":
"https://registry.npmjs.org/@superset-ui/control-utils/-/control-utils-0.13.3.tgz",
- "integrity":
"sha512-I9eMrqZRB5PbSWygGoptxOdu9t8X8LU3+VTo7OjAEcn3EYAQHIRmuMudq1KDnrGt+rKCBOHaWm5JMbMIj2GodA=="
+ "version": "0.13.9",
+ "resolved":
"https://registry.npmjs.org/@superset-ui/control-utils/-/control-utils-0.13.9.tgz",
+ "integrity":
"sha512-R8BkUqd5WaDfFB7LiGfNBD3kfFsoqwRzIUDNvZxVzBJsmYTgF0pPVV9OB9pKZ/fImEqd/WqPb5PyB7FMtRj5Ug==",
+ "requires": {
+ "@types/react-bootstrap": "0.32.21",
+ "lodash": "^4.17.15",
+ "react-bootstrap": "^0.33.1"
+ }
},
"@superset-ui/core": {
"version": "0.13.5",
@@ -6820,9 +6825,9 @@
}
},
"@superset-ui/legacy-plugin-chart-partition": {
- "version": "0.13.5",
- "resolved":
"https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.13.5.tgz",
- "integrity":
"sha512-YsgbAqj/sQKEWUmI0XXy6rJvGsWSPwfekmtWpa55CF19A+TJEuCCHmIGDPupgZsIqgJBZArwYT3HNnn7a8TfxA==",
+ "version": "0.13.11",
+ "resolved":
"https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.13.11.tgz",
+ "integrity":
"sha512-z49rqBLWQ7GRf1MCz3QdYz+8HRmK8UJo1kHRKBnqah4NQB4jemgWnOznNHuPXxOCIct1ZejvUmaf5EAg/24dMQ==",
"requires": {
"d3": "^3.5.17",
"d3-hierarchy": "^1.1.8",
@@ -7511,6 +7516,14 @@
"csstype": "^2.2.0"
}
},
+ "@types/react-bootstrap": {
+ "version": "0.32.21",
+ "resolved":
"https://registry.npmjs.org/@types/react-bootstrap/-/react-bootstrap-0.32.21.tgz",
+ "integrity":
"sha512-AV/6cMUBbKArEQcjXEzpoHexHi6hJL0cH3Vcw9qI4Ob2g/XFRvyTAFdMlGlp8HZmOHXL35PdF0K75Z31Po87qg==",
+ "requires": {
+ "@types/react": "*"
+ }
+ },
"@types/react-dom": {
"version": "16.9.5",
"resolved":
"https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.5.tgz",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 4b3c2b5..b089bf8 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -63,7 +63,7 @@
"@superset-ui/chart-composition": "^0.13.5",
"@superset-ui/color": "^0.13.3",
"@superset-ui/connection": "^0.13.5",
- "@superset-ui/control-utils": "^0.13.3",
+ "@superset-ui/control-utils": "^0.13.9",
"@superset-ui/core": "^0.13.5",
"@superset-ui/dimension": "^0.13.3",
"@superset-ui/legacy-plugin-chart-calendar": "^0.13.6",
@@ -79,7 +79,7 @@
"@superset-ui/legacy-plugin-chart-markup": "^0.13.3",
"@superset-ui/legacy-plugin-chart-paired-t-test": "^0.13.5",
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.13.3",
- "@superset-ui/legacy-plugin-chart-partition": "^0.13.5",
+ "@superset-ui/legacy-plugin-chart-partition": "^0.13.11",
"@superset-ui/legacy-plugin-chart-pivot-table": "^0.13.10",
"@superset-ui/legacy-plugin-chart-rose": "^0.13.10",
"@superset-ui/legacy-plugin-chart-sankey": "^0.13.10",
diff --git
a/superset-frontend/spec/javascripts/components/ColumnOption_spec.jsx
b/superset-frontend/spec/javascripts/components/ColumnOption_spec.jsx
index 6e780b3..8375ba6 100644
--- a/superset-frontend/spec/javascripts/components/ColumnOption_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/ColumnOption_spec.jsx
@@ -19,9 +19,9 @@
import React from 'react';
import { shallow } from 'enzyme';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import ColumnOption from 'src/components/ColumnOption';
import ColumnTypeLabel from 'src/components/ColumnTypeLabel';
-import InfoTooltipWithTrigger from 'src/components/InfoTooltipWithTrigger';
describe('ColumnOption', () => {
const defaultProps = {
diff --git a/superset-frontend/spec/javascripts/components/FormRow_spec.jsx
b/superset-frontend/spec/javascripts/components/FormRow_spec.jsx
index cd53bd6..631658d 100644
--- a/superset-frontend/spec/javascripts/components/FormRow_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/FormRow_spec.jsx
@@ -19,9 +19,9 @@
import React from 'react';
import { shallow } from 'enzyme';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import { Col, Row } from 'react-bootstrap';
import TextControl from 'src/explore/components/controls/TextControl';
-import InfoTooltipWithTrigger from 'src/components/InfoTooltipWithTrigger';
import FormRow from 'src/components/FormRow';
const defaultProps = {
diff --git
a/superset-frontend/spec/javascripts/components/MetricOption_spec.jsx
b/superset-frontend/spec/javascripts/components/MetricOption_spec.jsx
index c78af99..1ab8314 100644
--- a/superset-frontend/spec/javascripts/components/MetricOption_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/MetricOption_spec.jsx
@@ -18,10 +18,10 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import MetricOption from 'src/components/MetricOption';
import ColumnTypeLabel from 'src/components/ColumnTypeLabel';
-import InfoTooltipWithTrigger from 'src/components/InfoTooltipWithTrigger';
describe('MetricOption', () => {
const defaultProps = {
diff --git
a/superset-frontend/spec/javascripts/components/OptionDescription_spec.jsx
b/superset-frontend/spec/javascripts/components/OptionDescription_spec.jsx
deleted file mode 100644
index 3b847d4..0000000
--- a/superset-frontend/spec/javascripts/components/OptionDescription_spec.jsx
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React from 'react';
-import { shallow } from 'enzyme';
-
-import InfoTooltipWithTrigger from 'src/components/InfoTooltipWithTrigger';
-import OptionDescription from 'src/components/OptionDescription';
-
-const defaultProps = {
- option: {
- label: 'Some option',
- description: 'Description for some option',
- },
-};
-
-describe('OptionDescription', () => {
- let wrapper;
- let props;
-
- beforeEach(() => {
- props = { option: { ...defaultProps.option } };
- wrapper = shallow(<OptionDescription {...props} />);
- });
-
- it('renders an InfoTooltipWithTrigger', () => {
- expect(wrapper.find(InfoTooltipWithTrigger)).toHaveLength(1);
- });
-
- it('renders a span with the label', () => {
- expect(wrapper.find('.option-label').text()).toBe('Some option');
- });
-});
diff --git
a/superset-frontend/spec/javascripts/explore/components/ControlPanelSection_spec.jsx
b/superset-frontend/spec/javascripts/explore/components/ControlPanelSection_spec.jsx
index e2839fd..4e30807 100644
---
a/superset-frontend/spec/javascripts/explore/components/ControlPanelSection_spec.jsx
+++
b/superset-frontend/spec/javascripts/explore/components/ControlPanelSection_spec.jsx
@@ -19,9 +19,7 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Panel } from 'react-bootstrap';
-
-import InfoTooltipWithTrigger from 'src/components/InfoTooltipWithTrigger';
-
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import ControlPanelSection from 'src/explore/components/ControlPanelSection';
const defaultProps = {
diff --git
a/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton.jsx
b/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton.jsx
index b90d351..7f72a85 100644
--- a/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton.jsx
+++ b/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton.jsx
@@ -22,10 +22,10 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Dialog from 'react-bootstrap-dialog';
import { t } from '@superset-ui/translation';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import { exportChart } from '../../explore/exploreUtils';
import * as actions from '../actions/sqlLab';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
import Button from '../../components/Button';
const propTypes = {
@@ -36,6 +36,7 @@ const propTypes = {
errorMessage: PropTypes.string,
templateParams: PropTypes.string,
};
+
const defaultProps = {
vizRequest: {},
};
diff --git a/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
b/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
index 2e87464..bf2fd55 100644
--- a/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
+++ b/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
@@ -24,11 +24,11 @@ import { connect } from 'react-redux';
import { Alert } from 'react-bootstrap';
import Dialog from 'react-bootstrap-dialog';
import { t } from '@superset-ui/translation';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import shortid from 'shortid';
import { exportChart } from '../../explore/exploreUtils';
import * as actions from '../actions/sqlLab';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
import Button from '../../components/Button';
const propTypes = {
diff --git a/superset-frontend/src/SqlLab/components/TemplateParamsEditor.jsx
b/superset-frontend/src/SqlLab/components/TemplateParamsEditor.jsx
index c907ce2..4141373 100644
--- a/superset-frontend/src/SqlLab/components/TemplateParamsEditor.jsx
+++ b/superset-frontend/src/SqlLab/components/TemplateParamsEditor.jsx
@@ -27,9 +27,9 @@ import 'brace/mode/markdown';
import 'brace/theme/textmate';
import { t } from '@superset-ui/translation';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import ModalTrigger from '../../components/ModalTrigger';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
import Button from '../../components/Button';
const propTypes = {
diff --git a/superset-frontend/src/components/ActionMenuItem.jsx
b/superset-frontend/src/components/ActionMenuItem.jsx
index dbb5d51..23eff70 100644
--- a/superset-frontend/src/components/ActionMenuItem.jsx
+++ b/superset-frontend/src/components/ActionMenuItem.jsx
@@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { MenuItem } from 'react-bootstrap';
-import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
export function MenuItemContent({ faIcon, text, tooltip, children }) {
return (
diff --git a/superset-frontend/src/components/ColumnOption.jsx
b/superset-frontend/src/components/ColumnOption.jsx
index 6196006..0fed0b2 100644
--- a/superset-frontend/src/components/ColumnOption.jsx
+++ b/superset-frontend/src/components/ColumnOption.jsx
@@ -19,8 +19,8 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import ColumnTypeLabel from './ColumnTypeLabel';
-import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
const propTypes = {
column: PropTypes.object.isRequired,
diff --git a/superset-frontend/src/components/FormRow.jsx
b/superset-frontend/src/components/FormRow.jsx
index 1581271..9e2f5f4 100644
--- a/superset-frontend/src/components/FormRow.jsx
+++ b/superset-frontend/src/components/FormRow.jsx
@@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Row, Col } from 'react-bootstrap';
-import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
const STYLE_ROW = { marginTop: '5px', minHeight: '30px' };
const STYLE_RALIGN = { textAlign: 'right' };
diff --git a/superset-frontend/src/components/InfoTooltipWithTrigger.jsx
b/superset-frontend/src/components/InfoTooltipWithTrigger.jsx
deleted file mode 100644
index 518137c..0000000
--- a/superset-frontend/src/components/InfoTooltipWithTrigger.jsx
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React from 'react';
-import PropTypes from 'prop-types';
-import { kebabCase } from 'lodash';
-import { Tooltip, OverlayTrigger } from 'react-bootstrap';
-
-const propTypes = {
- label: PropTypes.string.isRequired,
- tooltip: PropTypes.string,
- icon: PropTypes.string,
- className: PropTypes.string,
- onClick: PropTypes.func,
- placement: PropTypes.string,
- bsStyle: PropTypes.string,
-};
-const defaultProps = {
- icon: 'info-circle',
- className: 'text-muted',
- placement: 'right',
-};
-const tooltipStyle = { wordWrap: 'break-word' };
-
-export default function InfoTooltipWithTrigger({
- label,
- tooltip,
- icon,
- className,
- onClick,
- placement,
- bsStyle,
-}) {
- const iconClass = `fa fa-${icon} ${className} ${
- bsStyle ? `text-${bsStyle}` : ''
- }`;
- const iconEl = (
- <i
- className={iconClass}
- onClick={onClick}
- style={{ cursor: onClick ? 'pointer' : null }}
- />
- );
- if (!tooltip) {
- return iconEl;
- }
- return (
- <OverlayTrigger
- placement={placement}
- overlay={
- <Tooltip id={`${kebabCase(label)}-tooltip`} style={tooltipStyle}>
- {tooltip}
- </Tooltip>
- }
- >
- {iconEl}
- </OverlayTrigger>
- );
-}
-
-InfoTooltipWithTrigger.propTypes = propTypes;
-InfoTooltipWithTrigger.defaultProps = defaultProps;
diff --git a/superset-frontend/src/components/ListView/LegacyFilters.tsx
b/superset-frontend/src/components/ListView/LegacyFilters.tsx
index 6c493bc..1b0d40b 100644
--- a/superset-frontend/src/components/ListView/LegacyFilters.tsx
+++ b/superset-frontend/src/components/ListView/LegacyFilters.tsx
@@ -67,6 +67,7 @@ export const FilterMenu = ({
<MenuItem
key={ft.id}
eventKey={ft}
+ // @ts-ignore
onSelect={(fltr: typeof ft) =>
setInternalFilters([...internalFilters, fltr])
}
@@ -112,6 +113,7 @@ export const FilterInputs = ({
bsSize="small"
value={ft.operator}
placeholder={filter ? getDefaultFilterOperator(filter) : ''}
+ // @ts-ignore
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
updateInternalFilter(i, {
operator: e.currentTarget.value,
@@ -146,6 +148,7 @@ export const FilterInputs = ({
/>
)}
{filter.input !== 'select' && (
+ // @ts-ignore
<FormControl
type={filter.input ? filter.input : 'text'}
bsSize="small"
diff --git a/superset-frontend/src/components/ListView/ListView.tsx
b/superset-frontend/src/components/ListView/ListView.tsx
index 2999d78..34e65a2 100644
--- a/superset-frontend/src/components/ListView/ListView.tsx
+++ b/superset-frontend/src/components/ListView/ListView.tsx
@@ -206,6 +206,7 @@ const ListView: FunctionComponent<Props> = ({
}
>
{bulkActions.map(action => (
+ // @ts-ignore
<MenuItem
id={action.name}
key={action.key || action.name}
diff --git a/superset-frontend/src/components/MetricOption.jsx
b/superset-frontend/src/components/MetricOption.jsx
index 2aaed54..06be763 100644
--- a/superset-frontend/src/components/MetricOption.jsx
+++ b/superset-frontend/src/components/MetricOption.jsx
@@ -19,8 +19,8 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import ColumnTypeLabel from './ColumnTypeLabel';
-import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
const propTypes = {
metric: PropTypes.object.isRequired,
diff --git a/superset-frontend/src/components/OptionDescription.jsx
b/superset-frontend/src/components/OptionDescription.jsx
deleted file mode 100644
index d9b384d..0000000
--- a/superset-frontend/src/components/OptionDescription.jsx
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React from 'react';
-import PropTypes from 'prop-types';
-
-import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
-
-const propTypes = {
- option: PropTypes.object.isRequired,
-};
-
-// This component provides a general tooltip for options
-// in a SelectControl
-export default function OptionDescription({ option }) {
- return (
- <span>
- <span className="m-r-5 option-label">{option.label}</span>
- {option.description && (
- <InfoTooltipWithTrigger
- className="m-r-5 text-muted"
- icon="question-circle-o"
- tooltip={option.description}
- label={`descr-${option.label}`}
- />
- )}
- </span>
- );
-}
-OptionDescription.propTypes = propTypes;
diff --git a/superset-frontend/src/components/PopoverSection.jsx
b/superset-frontend/src/components/PopoverSection.jsx
index 955594e..dac05a9 100644
--- a/superset-frontend/src/components/PopoverSection.jsx
+++ b/superset-frontend/src/components/PopoverSection.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
const propTypes = {
title: PropTypes.string.isRequired,
diff --git a/superset-frontend/src/explore/components/AdhocFilterOption.jsx
b/superset-frontend/src/explore/components/AdhocFilterOption.jsx
index ea17315..0245920 100644
--- a/superset-frontend/src/explore/components/AdhocFilterOption.jsx
+++ b/superset-frontend/src/explore/components/AdhocFilterOption.jsx
@@ -20,12 +20,12 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Label, OverlayTrigger } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import AdhocFilterEditPopover from './AdhocFilterEditPopover';
import AdhocFilter from '../AdhocFilter';
import columnType from '../propTypes/columnType';
import adhocMetricType from '../propTypes/adhocMetricType';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
const propTypes = {
adhocFilter: PropTypes.instanceOf(AdhocFilter).isRequired,
diff --git a/superset-frontend/src/explore/components/ControlHeader.jsx
b/superset-frontend/src/explore/components/ControlHeader.jsx
index d0d0050..6a51306 100644
--- a/superset-frontend/src/explore/components/ControlHeader.jsx
+++ b/superset-frontend/src/explore/components/ControlHeader.jsx
@@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { t } from '@superset-ui/translation';
import { ControlLabel, OverlayTrigger, Tooltip } from 'react-bootstrap';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
const propTypes = {
name: PropTypes.string,
diff --git a/superset-frontend/src/explore/components/ControlPanelSection.jsx
b/superset-frontend/src/explore/components/ControlPanelSection.jsx
index 772fb6b..1f8ca53 100644
--- a/superset-frontend/src/explore/components/ControlPanelSection.jsx
+++ b/superset-frontend/src/explore/components/ControlPanelSection.jsx
@@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Panel } from 'react-bootstrap';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
const propTypes = {
label: PropTypes.string,
diff --git a/superset-frontend/src/explore/components/PropertiesModal.tsx
b/superset-frontend/src/explore/components/PropertiesModal.tsx
index 56ab36c..5418371 100644
--- a/superset-frontend/src/explore/components/PropertiesModal.tsx
+++ b/superset-frontend/src/explore/components/PropertiesModal.tsx
@@ -183,6 +183,7 @@ function PropertiesModal({ slice, onHide, onSave }:
InternalProps) {
type="text"
bsSize="sm"
value={name}
+ // @ts-ignore
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setName(event.target.value)
}
@@ -198,6 +199,7 @@ function PropertiesModal({ slice, onHide, onSave }:
InternalProps) {
componentClass="textarea"
bsSize="sm"
value={description}
+ // @ts-ignore
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setDescription(event.target.value)
}
@@ -221,6 +223,7 @@ function PropertiesModal({ slice, onHide, onSave }:
InternalProps) {
type="text"
bsSize="sm"
value={cacheTimeout}
+ // @ts-ignore
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setCacheTimeout(event.target.value.replace(/[^0-9]/, ''))
}
diff --git
a/superset-frontend/src/explore/components/controls/AnnotationLayerControl.jsx
b/superset-frontend/src/explore/components/controls/AnnotationLayerControl.jsx
index 7339c12..340a192 100644
---
a/superset-frontend/src/explore/components/controls/AnnotationLayerControl.jsx
+++
b/superset-frontend/src/explore/components/controls/AnnotationLayerControl.jsx
@@ -26,9 +26,9 @@ import {
} from 'react-bootstrap';
import { connect } from 'react-redux';
import { t } from '@superset-ui/translation';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import { getChartKey } from '../../exploreUtils';
import { runAnnotationQuery } from '../../../chart/chartAction';
-import InfoTooltipWithTrigger from
'../../../components/InfoTooltipWithTrigger';
import AnnotationLayer from './AnnotationLayer';
diff --git
a/superset-frontend/src/explore/components/controls/CollectionControl.jsx
b/superset-frontend/src/explore/components/controls/CollectionControl.jsx
index 1a74e2c..55c0ff2 100644
--- a/superset-frontend/src/explore/components/controls/CollectionControl.jsx
+++ b/superset-frontend/src/explore/components/controls/CollectionControl.jsx
@@ -27,7 +27,7 @@ import {
arrayMove,
} from 'react-sortable-hoc';
-import InfoTooltipWithTrigger from
'../../../components/InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import ControlHeader from '../ControlHeader';
import controlMap from './';
import './CollectionControl.less';
diff --git
a/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx
b/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx
index eec348e..2928dca 100644
--- a/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx
+++ b/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx
@@ -21,7 +21,7 @@ import PropTypes from 'prop-types';
import { OverlayTrigger, Popover } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
-import InfoTooltipWithTrigger from
'../../../components/InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import FormRow from '../../../components/FormRow';
import SelectControl from './SelectControl';
import CheckboxControl from './CheckboxControl';
diff --git
a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx
b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx
index c1e6724..fd1b79b 100644
---
a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx
+++
b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx
@@ -28,7 +28,7 @@ import {
import Select from 'react-select';
import { t } from '@superset-ui/translation';
-import InfoTooltipWithTrigger from
'../../../components/InfoTooltipWithTrigger';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import BoundsControl from './BoundsControl';
import CheckboxControl from './CheckboxControl';
diff --git a/superset-frontend/src/explore/controlPanels/Partition.jsx
b/superset-frontend/src/explore/controlPanels/Partition.jsx
deleted file mode 100644
index cb01bc7..0000000
--- a/superset-frontend/src/explore/controlPanels/Partition.jsx
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React from 'react';
-import { t } from '@superset-ui/translation';
-import { validateNonEmpty } from '@superset-ui/validator';
-import OptionDescription from '../../components/OptionDescription';
-import { NVD3TimeSeries } from './sections';
-import {
- D3_TIME_FORMAT_OPTIONS,
- D3_FORMAT_DOCS,
- D3_FORMAT_OPTIONS,
-} from '../controls';
-
-export default {
- controlPanelSections: [
- {
- label: t('Query'),
- expanded: true,
- controlSetRows: [
- ['metrics'],
- ['adhoc_filters'],
- ['groupby'],
- ['limit', 'timeseries_limit_metric'],
- [
- {
- name: 'order_desc',
- config: {
- type: 'CheckboxControl',
- label: t('Sort Descending'),
- default: true,
- description: t('Whether to sort descending or ascending'),
- },
- },
- {
- name: 'contribution',
- config: {
- type: 'CheckboxControl',
- label: t('Contribution'),
- default: false,
- description: t('Compute the contribution to the total'),
- },
- },
- ],
- ['row_limit', null],
- ],
- },
- {
- label: t('Time Series Options'),
- expanded: true,
- controlSetRows: [
- [
- {
- name: 'time_series_option',
- config: {
- type: 'SelectControl',
- label: t('Options'),
- validators: [validateNonEmpty],
- default: 'not_time',
- valueKey: 'value',
- options: [
- {
- label: t('Not Time Series'),
- value: 'not_time',
- description: t('Ignore time'),
- },
- {
- label: t('Time Series'),
- value: 'time_series',
- description: t('Standard time series'),
- },
- {
- label: t('Aggregate Mean'),
- value: 'agg_mean',
- description: t('Mean of values over specified period'),
- },
- {
- label: t('Aggregate Sum'),
- value: 'agg_sum',
- description: t('Sum of values over specified period'),
- },
- {
- label: t('Difference'),
- value: 'point_diff',
- description: t(
- 'Metric change in value from `since` to `until`',
- ),
- },
- {
- label: t('Percent Change'),
- value: 'point_percent',
- description: t(
- 'Metric percent change in value from `since` to `until`',
- ),
- },
- {
- label: t('Factor'),
- value: 'point_factor',
- description: t(
- 'Metric factor change from `since` to `until`',
- ),
- },
- {
- label: t('Advanced Analytics'),
- value: 'adv_anal',
- description: t('Use the Advanced Analytics options below'),
- },
- ],
- optionRenderer: op => <OptionDescription option={op} />,
- valueRenderer: op => <OptionDescription option={op} />,
- description: t('Settings for time series'),
- },
- },
- ],
- ],
- },
- {
- label: t('Chart Options'),
- expanded: true,
- controlSetRows: [
- ['color_scheme', 'label_colors'],
- [
- {
- name: 'number_format',
- config: {
- type: 'SelectControl',
- freeForm: true,
- label: t('Number format'),
- renderTrigger: true,
- default: 'SMART_NUMBER',
- choices: D3_FORMAT_OPTIONS,
- description: D3_FORMAT_DOCS,
- },
- },
- {
- name: 'date_time_format',
- config: {
- type: 'SelectControl',
- freeForm: true,
- label: t('Date Time Format'),
- renderTrigger: true,
- default: 'smart_date',
- choices: D3_TIME_FORMAT_OPTIONS,
- description: D3_FORMAT_DOCS,
- },
- },
- ],
- [
- {
- name: 'partition_limit',
- config: {
- type: 'TextControl',
- label: t('Partition Limit'),
- isInt: true,
- default: '5',
- description: t(
- 'The maximum number of subdivisions of each group; ' +
- 'lower values are pruned first',
- ),
- },
- },
- {
- name: 'partition_threshold',
- config: {
- type: 'TextControl',
- label: t('Partition Threshold'),
- isFloat: true,
- default: '0.05',
- description: t(
- 'Partitions whose height to parent height proportions are ' +
- 'below this value are pruned',
- ),
- },
- },
- ],
- [
- {
- name: 'log_scale',
- config: {
- type: 'CheckboxControl',
- label: t('Log Scale'),
- default: false,
- renderTrigger: true,
- description: t('Use a log scale'),
- },
- },
- {
- name: 'equal_date_size',
- config: {
- type: 'CheckboxControl',
- label: t('Equal Date Sizes'),
- default: true,
- renderTrigger: true,
- description: t(
- 'Check to force date partitions to have the same height',
- ),
- },
- },
- ],
- [
- {
- name: 'rich_tooltip',
- config: {
- type: 'CheckboxControl',
- label: t('Rich Tooltip'),
- renderTrigger: true,
- default: true,
- description: t(
- 'The rich tooltip shows a list of all series for that point in
time',
- ),
- },
- },
- ],
- ],
- },
- NVD3TimeSeries[1],
- ],
-};
diff --git a/superset-frontend/src/setup/setupPlugins.ts
b/superset-frontend/src/setup/setupPlugins.ts
index a94fc2e..b98e8c9 100644
--- a/superset-frontend/src/setup/setupPlugins.ts
+++ b/superset-frontend/src/setup/setupPlugins.ts
@@ -41,7 +41,6 @@ import Mapbox from '../explore/controlPanels/Mapbox';
import Markup from '../explore/controlPanels/Markup';
import PairedTtest from '../explore/controlPanels/PairedTtest';
import Para from '../explore/controlPanels/Para';
-import Partition from '../explore/controlPanels/Partition';
import Separator from '../explore/controlPanels/Separator';
import Table from '../explore/controlPanels/Table';
import TimeTable from '../explore/controlPanels/TimeTable';
@@ -63,7 +62,6 @@ export default function setupPlugins() {
.registerValue('markup', Markup)
.registerValue('paired_ttest', PairedTtest)
.registerValue('para', Para)
- .registerValue('partition', Partition)
.registerValue('separator', Separator)
.registerValue('table', Table)
.registerValue('time_table', TimeTable)
diff --git a/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx
b/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx
index a82e46a..866dc7a 100644
--- a/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx
+++ b/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx
@@ -24,9 +24,9 @@ import { Table, Thead, Th, Tr, Td } from 'reactable-arc';
import { formatNumber } from '@superset-ui/number-format';
import { formatTime } from '@superset-ui/time-format';
import moment from 'moment';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import MetricOption from '../../components/MetricOption';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
import FormattedNumber from './FormattedNumber';
import SparklineCell from './SparklineCell';
import './TimeTable.less';
diff --git a/superset/assets/src/SqlLab/components/ExploreCtasResultsButton.jsx
b/superset/assets/src/SqlLab/components/ExploreCtasResultsButton.jsx
index b90d351..254e723 100644
--- a/superset/assets/src/SqlLab/components/ExploreCtasResultsButton.jsx
+++ b/superset/assets/src/SqlLab/components/ExploreCtasResultsButton.jsx
@@ -22,10 +22,10 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Dialog from 'react-bootstrap-dialog';
import { t } from '@superset-ui/translation';
+import { InfoTooltipWithTrigger } from '@superset-ui/control-utils';
import { exportChart } from '../../explore/exploreUtils';
import * as actions from '../actions/sqlLab';
-import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
import Button from '../../components/Button';
const propTypes = {