@evergis/react 3.1.84 → 3.1.86

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/react.esm.js CHANGED
@@ -5571,10 +5571,13 @@ const ChartLegendName = styled.div `
5571
5571
  const ContainerAlias = styled(Flex) `
5572
5572
  align-items: center;
5573
5573
  flex-wrap: nowrap;
5574
- margin-bottom: ${({ hasBottomMargin }) => (hasBottomMargin ? 0.25 : 0)}rem;
5575
5574
  font-size: 0.75rem;
5576
5575
  color: ${({ theme: { palette } }) => palette.textSecondary};
5577
5576
 
5577
+ &&& {
5578
+ margin-bottom: ${({ hasBottomMargin }) => (hasBottomMargin ? 0.25 : 0)}rem;
5579
+ }
5580
+
5578
5581
  span[kind] {
5579
5582
  margin-right: 0.5rem;
5580
5583
 
@@ -7776,7 +7779,7 @@ const ElementControl = ({ elementConfig }) => {
7776
7779
  const { dataSources, controls, changeControls } = useWidgetContext(WidgetType.FeatureCard);
7777
7780
  const [value, setValue] = useState();
7778
7781
  const { options, attributeName } = elementConfig || {};
7779
- const { relatedDataSource, controlName, label, width, placeholder = t("selectValue", { ns: "dashboard", defaultValue: "Выберите значение" }) } = options || {};
7782
+ const { relatedDataSource, label, width, placeholder = t("selectValue", { ns: "dashboard", defaultValue: "Выберите значение" }) } = options || {};
7780
7783
  const dataSource = useMemo(() => getDataSource(relatedDataSource, dataSources), [relatedDataSource, dataSources]);
7781
7784
  const items = useMemo(() => {
7782
7785
  if (!dataSource?.features?.length || !attributeName) {
@@ -7789,13 +7792,13 @@ const ElementControl = ({ elementConfig }) => {
7789
7792
  }, [dataSource?.features, attributeName]);
7790
7793
  const handleChange = useCallback(([option]) => {
7791
7794
  setValue(option?.value);
7792
- if (controlName && changeControls) {
7795
+ if (attributeName && changeControls) {
7793
7796
  changeControls({
7794
- [controlName]: option?.value,
7797
+ [attributeName]: option?.value,
7795
7798
  });
7796
7799
  }
7797
- }, [changeControls, controlName]);
7798
- return (jsx(Dropdown, { zIndex: 1000, width: `${width ?? DEFAULT_DROPDOWN_WIDTH}px`, label: label, options: items, value: controls?.[controlName] ?? value, placeholder: placeholder, onChange: handleChange }));
7800
+ }, [changeControls, attributeName]);
7801
+ return (jsx(Dropdown, { zIndex: 1000, width: `${width ?? DEFAULT_DROPDOWN_WIDTH}px`, label: label, options: items, value: controls?.[attributeName] ?? value, placeholder: placeholder, onChange: handleChange }));
7799
7802
  };
7800
7803
 
7801
7804
  const StyledIconFontSizeMixin = css `