[reviewable] Integrate @superset-ui/{core,color,chart} modules (#6234)

* Add d3 micro packages

* Replace d3 imports with specific modules import

* Define d3 colors

* import specific d3 submodules instead of entire d3

* update function name

* move function location and fix small bug

* Move primary color to control

* remove colorscalefactory usage

* remove unused d3

* fix unit test

* fix color picker

* use @superset-ui/color

* update package version

* remove files that are extracted

* replace all references

* fix two files

* Revert some changes to split to another PR

* remove adaptor

* Address Christine's comment

* remove d3 v3 from calendar

* remove d3.scale.threshold

* Get rid of colorScalerFactory and revise hexToRGB

* fix color cleaning

* fix lint
This commit is contained in:
Krist Wongsuphasawat
2018-11-11 10:07:05 -08:00
committed by Chris Williams
parent 841d5e6338
commit a7b52da6ce
129 changed files with 227 additions and 4324 deletions

View File

@@ -3,12 +3,11 @@ import React from 'react';
import { shallow } from 'enzyme';
import { OverlayTrigger } from 'react-bootstrap';
import { SketchPicker } from 'react-color';
import { CategoricalScheme, getCategoricalSchemeRegistry } from '@superset-ui/color';
import ColorPickerControl from
'../../../../src/explore/components/controls/ColorPickerControl';
import ControlHeader from '../../../../src/explore/components/ControlHeader';
import getCategoricalSchemeRegistry from '../../../../src/modules/colors/CategoricalSchemeRegistrySingleton';
import CategoricalScheme from '../../../../src/modules/colors/CategoricalScheme';
const defaultProps = {
value: { },

View File

@@ -2,10 +2,10 @@
import React from 'react';
import { mount } from 'enzyme';
import { Creatable } from 'react-select';
import { getCategoricalSchemeRegistry } from '@superset-ui/color';
import ColorSchemeControl from
'../../../../src/explore/components/controls/ColorSchemeControl';
import getCategoricalSchemeRegistry from '../../../../src/modules/colors/CategoricalSchemeRegistrySingleton';
const defaultProps = {
options: getCategoricalSchemeRegistry().keys().map(s => ([s, s])),

View File

@@ -2,9 +2,8 @@ import React from 'react';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { Modal } from 'react-bootstrap';
import { getChartMetadataRegistry, ChartMetadata } from '@superset-ui/chart';
import VizTypeControl from '../../../../src/explore/components/controls/VizTypeControl';
import getChartMetadataRegistry from '../../../../src/visualizations/core/registries/ChartMetadataRegistrySingleton';
import ChartMetadata from '../../../../src/visualizations/core/models/ChartMetadata';
const defaultProps = {
name: 'viz_type',