sea-chart 1.1.5 → 1.1.6

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.
@@ -1,28 +1,11 @@
1
1
  import _CollapsibleSettingLayout from "dtable-ui-component/lib/CollapsibleSettingLayout";
2
2
  import _DTableSelect from "dtable-ui-component/lib/DTableSelect";
3
3
  import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
4
- import React, { useCallback } from 'react';
4
+ import React, { useCallback, useMemo } from 'react';
5
5
  import { FormGroup, Label } from 'reactstrap';
6
6
  import intl from '../../../intl';
7
7
  import { FontSizeSettings } from '../../widgets/font-settings';
8
8
  import { FUNNEL_LABEL_FORMAT, FUNNEL_LABEL_POSITIONS, SETTING_DEFAULT_FONT_SIZE } from '../../../constants';
9
- const labelPositionOptions = [{
10
- value: FUNNEL_LABEL_POSITIONS.INSIDE,
11
- label: /*#__PURE__*/React.createElement("span", null, intl.get('Inside'))
12
- }, {
13
- value: FUNNEL_LABEL_POSITIONS.OUTSIDE,
14
- label: /*#__PURE__*/React.createElement("span", null, intl.get('Outside'))
15
- }];
16
- const labelFormatOptions = [{
17
- value: FUNNEL_LABEL_FORMAT.NUMBER,
18
- label: /*#__PURE__*/React.createElement("span", null, intl.get('Number'))
19
- }, {
20
- value: FUNNEL_LABEL_FORMAT.PERCENTAGE,
21
- label: /*#__PURE__*/React.createElement("span", null, intl.get('Percentage'))
22
- }, {
23
- value: FUNNEL_LABEL_FORMAT.NUMBER_AND_PERCENTAGE,
24
- label: /*#__PURE__*/React.createElement("span", null, intl.get('Number_and_percentage'))
25
- }];
26
9
  export default function FunnelLabelSetting(_ref) {
27
10
  let {
28
11
  onChange,
@@ -32,6 +15,23 @@ export default function FunnelLabelSetting(_ref) {
32
15
  funnelShowOverallRate,
33
16
  funnelShowLabels
34
17
  } = _ref;
18
+ const labelPositionOptions = useMemo(() => [{
19
+ value: FUNNEL_LABEL_POSITIONS.INSIDE,
20
+ label: /*#__PURE__*/React.createElement("span", null, intl.get('Inside'))
21
+ }, {
22
+ value: FUNNEL_LABEL_POSITIONS.OUTSIDE,
23
+ label: /*#__PURE__*/React.createElement("span", null, intl.get('Outside'))
24
+ }], []);
25
+ const labelFormatOptions = useMemo(() => [{
26
+ value: FUNNEL_LABEL_FORMAT.NUMBER,
27
+ label: /*#__PURE__*/React.createElement("span", null, intl.get('Number'))
28
+ }, {
29
+ value: FUNNEL_LABEL_FORMAT.PERCENTAGE,
30
+ label: /*#__PURE__*/React.createElement("span", null, intl.get('Percentage'))
31
+ }, {
32
+ value: FUNNEL_LABEL_FORMAT.NUMBER_AND_PERCENTAGE,
33
+ label: /*#__PURE__*/React.createElement("span", null, intl.get('Number_and_percentage'))
34
+ }], []);
35
35
  const handleChange = useCallback(function handleChange(value, key) {
36
36
  onChange && onChange({
37
37
  [key]: value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",