@carto/kepler.gl 0.0.15 → 0.0.16-alpha.0
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.
- package/dist/components/common/icons/index.js +9 -1
- package/dist/components/common/icons/swap-horizontal.js +68 -0
- package/dist/components/side-panel/layer-panel/color-palette.js +12 -6
- package/dist/components/side-panel/layer-panel/color-range-selector.js +51 -17
- package/dist/components/side-panel/layer-panel/custom-palette.js +22 -8
- package/dist/components/side-panel/layer-panel/layer-config-group.js +19 -10
- package/dist/components/side-panel/layer-panel/layer-configurator.js +4 -4
- package/dist/components/side-panel/layer-panel/text-label-panel.js +18 -10
- package/dist/constants/default-settings.js +2 -2
- package/dist/localization/en.js +6 -1
- package/package.json +1 -1
- package/src/components/common/icons/index.js +1 -0
- package/src/components/common/icons/swap-horizontal.js +43 -0
- package/src/components/side-panel/layer-panel/color-palette.js +10 -3
- package/src/components/side-panel/layer-panel/color-range-selector.js +68 -28
- package/src/components/side-panel/layer-panel/custom-palette.js +23 -17
- package/src/components/side-panel/layer-panel/layer-config-group.js +16 -7
- package/src/components/side-panel/layer-panel/layer-configurator.js +20 -12
- package/src/components/side-panel/layer-panel/text-label-panel.js +15 -6
- package/src/localization/en.js +5 -0
- package/umd/keplergl.min.js +26 -26
|
@@ -50,8 +50,17 @@ function TextLabelPanelFactory(RangeSlider, LayerConfigGroup, FieldSelector) {
|
|
|
50
50
|
updateLayerTextLabel: PropTypes.func.isRequired
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
static defaultProps = {
|
|
54
|
+
AddButton: props => (
|
|
55
|
+
<Button {...props} link>
|
|
56
|
+
<Add height="12px" />
|
|
57
|
+
<FormattedMessage id="panel.text.addMoreLabel" />
|
|
58
|
+
</Button>
|
|
59
|
+
)
|
|
60
|
+
};
|
|
61
|
+
|
|
53
62
|
render() {
|
|
54
|
-
const {updateLayerTextLabel, textLabel, fields} = this.props;
|
|
63
|
+
const {updateLayerTextLabel, textLabel, fields, AddButton} = this.props;
|
|
55
64
|
const currentFields = textLabel.map(tl => tl.field && tl.field.name).filter(d => d);
|
|
56
65
|
return (
|
|
57
66
|
<LayerConfigGroup label={'panel.text.label'} collapsible>
|
|
@@ -65,7 +74,10 @@ function TextLabelPanelFactory(RangeSlider, LayerConfigGroup, FieldSelector) {
|
|
|
65
74
|
</ConfigGroupCollapsibleHeader>
|
|
66
75
|
<ConfigGroupCollapsibleContent>
|
|
67
76
|
{textLabel.map((tl, idx) => (
|
|
68
|
-
<div
|
|
77
|
+
<div
|
|
78
|
+
key={tl.field ? tl.field.name : `null-${idx}`}
|
|
79
|
+
className="side-panel-section-group"
|
|
80
|
+
>
|
|
69
81
|
<PanelLabel>
|
|
70
82
|
<FormattedMessage id={'panel.text.labelWithId'} values={{labelId: idx + 1}} />
|
|
71
83
|
</PanelLabel>
|
|
@@ -129,10 +141,7 @@ function TextLabelPanelFactory(RangeSlider, LayerConfigGroup, FieldSelector) {
|
|
|
129
141
|
</div>
|
|
130
142
|
))}
|
|
131
143
|
<SidePanelSection>
|
|
132
|
-
<
|
|
133
|
-
<Add height="12px" />
|
|
134
|
-
<FormattedMessage id="panel.text.addMoreLabel" />
|
|
135
|
-
</Button>
|
|
144
|
+
<AddButton onClick={val => updateLayerTextLabel(textLabel.length)} />
|
|
136
145
|
</SidePanelSection>
|
|
137
146
|
</ConfigGroupCollapsibleContent>
|
|
138
147
|
</LayerConfigGroup>
|
package/src/localization/en.js
CHANGED