@evergis/react 4.0.20 → 4.0.21
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/index.js +10 -13
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +10 -13
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4250,8 +4250,8 @@ const useChartChange = ({ dataSources, chartId, width, height, relatedAttributes
|
|
|
4250
4250
|
const customize = React.useCallback(({ svg }) => {
|
|
4251
4251
|
svg.style("overflow", "visible");
|
|
4252
4252
|
svg
|
|
4253
|
-
.selectAll(`.${charts.lineChartClassNames.lineChartXScaleGlobal} line,
|
|
4254
|
-
.${charts.lineChartClassNames.lineChartYScaleGlobal} line,
|
|
4253
|
+
.selectAll(`.${charts.lineChartClassNames.lineChartXScaleGlobal} line,
|
|
4254
|
+
.${charts.lineChartClassNames.lineChartYScaleGlobal} line,
|
|
4255
4255
|
.domain`)
|
|
4256
4256
|
.each((_, index, nodes) => {
|
|
4257
4257
|
nodes[index].remove();
|
|
@@ -4322,11 +4322,11 @@ const useChartChange = ({ dataSources, chartId, width, height, relatedAttributes
|
|
|
4322
4322
|
.attr("fill", `url(#${gradientId})`)
|
|
4323
4323
|
.attr("stroke-width", "0")
|
|
4324
4324
|
.attr("fill-opacity", FILL_OPACITY);
|
|
4325
|
-
defs.push(`
|
|
4326
|
-
<linearGradient id="${gradientId}" x1="0" y1="0" x2="0" y2="1">
|
|
4327
|
-
<stop offset="0" stop-color="${color}" stop-opacity="1" />
|
|
4328
|
-
<stop offset="1" stop-color="${color}" stop-opacity="0" />
|
|
4329
|
-
</linearGradient>
|
|
4325
|
+
defs.push(`
|
|
4326
|
+
<linearGradient id="${gradientId}" x1="0" y1="0" x2="0" y2="1">
|
|
4327
|
+
<stop offset="0" stop-color="${color}" stop-opacity="1" />
|
|
4328
|
+
<stop offset="1" stop-color="${color}" stop-opacity="0" />
|
|
4329
|
+
</linearGradient>
|
|
4330
4330
|
`);
|
|
4331
4331
|
ref.current = {
|
|
4332
4332
|
path: newPath,
|
|
@@ -7536,7 +7536,8 @@ const useEditControl = (type, elementConfig) => {
|
|
|
7536
7536
|
attributes,
|
|
7537
7537
|
]);
|
|
7538
7538
|
const dataSource = React.useMemo(() => dataSources?.find(({ name }) => name === control.relatedDataSource), [control.relatedDataSource, dataSources]);
|
|
7539
|
-
const items = React.useMemo(() =>
|
|
7539
|
+
const items = React.useMemo(() => control?.variants?.map(v => String(v.text || v.value)) ||
|
|
7540
|
+
dataSource?.features.map(item => item.properties[control?.attributeName] || null) || [], [control?.variants, dataSource?.features, control?.attributeName]);
|
|
7540
7541
|
const onChange = React.useCallback((newValue) => {
|
|
7541
7542
|
changeControls({
|
|
7542
7543
|
[control?.targetAttributeName]: newValue,
|
|
@@ -8541,11 +8542,7 @@ const ElementControl = ({ elementConfig }) => {
|
|
|
8541
8542
|
const isDisabled = React.useMemo(() => {
|
|
8542
8543
|
const attr = layerInfo?.configuration?.attributesConfiguration?.attributes?.find(item => item.attributeName === control?.targetAttributeName);
|
|
8543
8544
|
return !attr?.isEditable;
|
|
8544
|
-
}, [
|
|
8545
|
-
control?.targetAttributeName,
|
|
8546
|
-
layerInfo?.configuration
|
|
8547
|
-
?.attributesConfiguration?.attributes,
|
|
8548
|
-
]);
|
|
8545
|
+
}, [control?.targetAttributeName, layerInfo?.configuration]);
|
|
8549
8546
|
const currentValue = controls?.[control?.targetAttributeName] ??
|
|
8550
8547
|
attribute?.value ??
|
|
8551
8548
|
defaultValue;
|