@evergis/react 3.1.84 → 3.1.85

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.
@@ -128,7 +128,6 @@ export interface ConfigOptions {
128
128
  tabId?: string;
129
129
  column?: boolean;
130
130
  relatedDataSource?: string;
131
- controlName?: string;
132
131
  filterName?: string;
133
132
  searchFilterName?: string;
134
133
  colorAttribute?: string;
package/dist/index.js CHANGED
@@ -7778,7 +7778,7 @@ const ElementControl = ({ elementConfig }) => {
7778
7778
  const { dataSources, controls, changeControls } = useWidgetContext(exports.WidgetType.FeatureCard);
7779
7779
  const [value, setValue] = React.useState();
7780
7780
  const { options, attributeName } = elementConfig || {};
7781
- const { relatedDataSource, controlName, label, width, placeholder = t("selectValue", { ns: "dashboard", defaultValue: "Выберите значение" }) } = options || {};
7781
+ const { relatedDataSource, label, width, placeholder = t("selectValue", { ns: "dashboard", defaultValue: "Выберите значение" }) } = options || {};
7782
7782
  const dataSource = React.useMemo(() => getDataSource(relatedDataSource, dataSources), [relatedDataSource, dataSources]);
7783
7783
  const items = React.useMemo(() => {
7784
7784
  if (!dataSource?.features?.length || !attributeName) {
@@ -7791,13 +7791,13 @@ const ElementControl = ({ elementConfig }) => {
7791
7791
  }, [dataSource?.features, attributeName]);
7792
7792
  const handleChange = React.useCallback(([option]) => {
7793
7793
  setValue(option?.value);
7794
- if (controlName && changeControls) {
7794
+ if (attributeName && changeControls) {
7795
7795
  changeControls({
7796
- [controlName]: option?.value,
7796
+ [attributeName]: option?.value,
7797
7797
  });
7798
7798
  }
7799
- }, [changeControls, controlName]);
7800
- return (jsxRuntime.jsx(uilibGl.Dropdown, { zIndex: 1000, width: `${width ?? DEFAULT_DROPDOWN_WIDTH}px`, label: label, options: items, value: controls?.[controlName] ?? value, placeholder: placeholder, onChange: handleChange }));
7799
+ }, [changeControls, attributeName]);
7800
+ return (jsxRuntime.jsx(uilibGl.Dropdown, { zIndex: 1000, width: `${width ?? DEFAULT_DROPDOWN_WIDTH}px`, label: label, options: items, value: controls?.[attributeName] ?? value, placeholder: placeholder, onChange: handleChange }));
7801
7801
  };
7802
7802
 
7803
7803
  const StyledIconFontSizeMixin = styled.css `
package/dist/react.esm.js CHANGED
@@ -7776,7 +7776,7 @@ const ElementControl = ({ elementConfig }) => {
7776
7776
  const { dataSources, controls, changeControls } = useWidgetContext(WidgetType.FeatureCard);
7777
7777
  const [value, setValue] = useState();
7778
7778
  const { options, attributeName } = elementConfig || {};
7779
- const { relatedDataSource, controlName, label, width, placeholder = t("selectValue", { ns: "dashboard", defaultValue: "Выберите значение" }) } = options || {};
7779
+ const { relatedDataSource, label, width, placeholder = t("selectValue", { ns: "dashboard", defaultValue: "Выберите значение" }) } = options || {};
7780
7780
  const dataSource = useMemo(() => getDataSource(relatedDataSource, dataSources), [relatedDataSource, dataSources]);
7781
7781
  const items = useMemo(() => {
7782
7782
  if (!dataSource?.features?.length || !attributeName) {
@@ -7789,13 +7789,13 @@ const ElementControl = ({ elementConfig }) => {
7789
7789
  }, [dataSource?.features, attributeName]);
7790
7790
  const handleChange = useCallback(([option]) => {
7791
7791
  setValue(option?.value);
7792
- if (controlName && changeControls) {
7792
+ if (attributeName && changeControls) {
7793
7793
  changeControls({
7794
- [controlName]: option?.value,
7794
+ [attributeName]: option?.value,
7795
7795
  });
7796
7796
  }
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 }));
7797
+ }, [changeControls, attributeName]);
7798
+ return (jsx(Dropdown, { zIndex: 1000, width: `${width ?? DEFAULT_DROPDOWN_WIDTH}px`, label: label, options: items, value: controls?.[attributeName] ?? value, placeholder: placeholder, onChange: handleChange }));
7799
7799
  };
7800
7800
 
7801
7801
  const StyledIconFontSizeMixin = css `
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.1.84",
2
+ "version": "3.1.85",
3
3
  "name": "@evergis/react",
4
4
  "author": "Everpoint",
5
5
  "license": "MIT",
@@ -83,5 +83,5 @@
83
83
  "swiper": "^8.3.2",
84
84
  "wkt": "^0.1.1"
85
85
  },
86
- "gitHead": "9afe6e47895cc13a1b7aa12ab22283919f8a2c38"
86
+ "gitHead": "fa8e49621199da7b5d1ff9818e048cc675a9fbae"
87
87
  }