sea-chart 0.0.77 → 0.0.78

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.
@@ -2,7 +2,7 @@ import React, { useCallback, useMemo, useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classnames from 'classnames';
4
4
  import intl from '../intl';
5
- import { settingsContext, DepartmentsContext } from '../utils/contexts';
5
+ import { settingsContext } from '../utils/contexts';
6
6
  import { eventStopPropagation } from '../utils';
7
7
  import { BaseUtils } from '../utils';
8
8
  import { CHART_SETTINGS_TYPE, CHART_SETTINGS } from '../constants';
@@ -18,8 +18,7 @@ const Settings = _ref => {
18
18
  hideTitleStyleSetting,
19
19
  tables,
20
20
  onChange,
21
- children,
22
- departments
21
+ children
23
22
  } = _ref;
24
23
  const [type, setType] = useState(CHART_SETTINGS_TYPE.DATA);
25
24
  const [labelColorConfigs, setLabelColorConfigs] = useState([]);
@@ -84,16 +83,12 @@ const Settings = _ref => {
84
83
  }, /*#__PURE__*/React.createElement("div", {
85
84
  id: "sea-chart-settings-content",
86
85
  className: "chart-settings-content"
87
- }, type === CHART_SETTINGS_TYPE.DATA && /*#__PURE__*/React.createElement(DepartmentsContext.Provider, {
88
- value: {
89
- departments
90
- }
91
- }, /*#__PURE__*/React.createElement(DataSettings, {
86
+ }, type === CHART_SETTINGS_TYPE.DATA && /*#__PURE__*/React.createElement(DataSettings, {
92
87
  dataSources: dataSources,
93
88
  chart: chart,
94
89
  tables: tables,
95
90
  onChange: modifyStatistic
96
- })), type === CHART_SETTINGS_TYPE.CHART_STYLE && /*#__PURE__*/React.createElement(StyleSettings, {
91
+ }), type === CHART_SETTINGS_TYPE.CHART_STYLE && /*#__PURE__*/React.createElement(StyleSettings, {
97
92
  chart: chart,
98
93
  labelColorConfigs: labelColorConfigs,
99
94
  onChange: modifyStyle
@@ -1,11 +1,10 @@
1
1
  import _DTableFiltersPopover from "dtable-ui-component/lib/DTableFiltersPopover";
2
- import React, { useCallback, useContext, useMemo, useState } from 'react';
2
+ import React, { useCallback, useMemo, useState } from 'react';
3
3
  import { Label, FormGroup } from 'reactstrap';
4
4
  import { getTableById } from 'dtable-utils';
5
5
  import { eventStopPropagation, generatorKey } from '../../../utils';
6
6
  import intl from '../../../intl';
7
7
  import context from '../../../context';
8
- import { DepartmentsContext } from '../../../utils/contexts';
9
8
  import './index.css';
10
9
  const DataFilter = _ref => {
11
10
  let {
@@ -14,9 +13,6 @@ const DataFilter = _ref => {
14
13
  onChange
15
14
  } = _ref;
16
15
  const [isFilterSetterShow, setIsFilterSetterShow] = useState(false);
17
- const {
18
- departments
19
- } = useContext(DepartmentsContext);
20
16
  const toggleFilterPopover = useCallback(event => {
21
17
  eventStopPropagation(event);
22
18
  setIsFilterSetterShow(!isFilterSetterShow);
@@ -82,7 +78,6 @@ const DataFilter = _ref => {
82
78
  filterConjunction: filterConjunction,
83
79
  columns: table.columns,
84
80
  collaborators: collaborators,
85
- departments: departments,
86
81
  hidePopover: toggleFilterPopover,
87
82
  update: updateFilters
88
83
  }))) : /*#__PURE__*/React.createElement("div", {
@@ -1,3 +1,2 @@
1
1
  import React from 'react';
2
- export const settingsContext = React.createContext('');
3
- export const DepartmentsContext = React.createContext([]);
2
+ export const settingsContext = React.createContext('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",