@evergis/react 3.1.18 → 3.1.19

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,4 +1,4 @@
1
- export declare const StyledSvg: import('styled-components').StyledComponent<"div", any, {
1
+ export declare const StyledSvg: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
2
2
  $width?: number;
3
3
  $height?: number;
4
4
  $fontColor?: string;
@@ -1,5 +1,6 @@
1
+ import { i18n } from 'i18next';
1
2
  export declare const useGlobalContext: () => {
2
- t: import('i18next').TFunction<["translation", ...string[]], undefined>;
3
+ t: i18n["t"];
3
4
  language: string;
4
5
  themeName: string;
5
6
  api: import('@evergis/api').Api;
package/dist/index.js CHANGED
@@ -3946,13 +3946,18 @@ const useWidgetContext = (type = exports.WidgetType.Dashboard) => {
3946
3946
 
3947
3947
  const useGlobalContext = () => {
3948
3948
  const { t, language, themeName, api, ewktGeometry } = React.useContext(GlobalContext) || {};
3949
+ const translate = React.useCallback((value, options) => {
3950
+ if (t)
3951
+ return t(value, options);
3952
+ return options?.defaultValue ?? value;
3953
+ }, [t]);
3949
3954
  return React.useMemo(() => ({
3950
- t,
3955
+ t: translate,
3951
3956
  language,
3952
3957
  themeName,
3953
3958
  api,
3954
3959
  ewktGeometry,
3955
- }), [language, t, api, ewktGeometry, themeName]);
3960
+ }), [language, translate, api, ewktGeometry, themeName]);
3956
3961
  };
3957
3962
 
3958
3963
  const HEIGHT_OFFSET = 20;
@@ -5670,7 +5675,7 @@ const DataSourceProgressContainer = React.memo(({ config, elementConfig, type, i
5670
5675
  return jsxRuntime.jsx(DataSourceError, { name: elementConfig.templateName });
5671
5676
  }
5672
5677
  const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
5673
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), !isVisible ? null : dataSource ? (jsxRuntime.jsxs(DataSourceProgressContainerWrapper, { children: [sliceItems(dataSource?.features)?.map((feature, index) => (jsxRuntime.jsx(DataSourceInnerContainer, { type: type, index: index, feature: feature, config: config, elementConfig: elementConfig, maxValue: currentMaxValue, innerComponent: innerComponent }, index))), checkIsSliced(dataSource?.features) && (jsxRuntime.jsx(ContainerToggler, { toggled: showMore, onClick: onShowMore, children: showMore ? t("hide", { ns: "dashboard" }) : t("showAll", { ns: "dashboard" }) })), showTotal && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(uilibGl.Divider, {}), jsxRuntime.jsxs(ProgressTotal, { children: [jsxRuntime.jsx(ProgressTotalTitle, { children: t("total", { ns: "dashboard" }) }), jsxRuntime.jsxs(ProgressValue, { children: [totalValue, jsxRuntime.jsx(ProgressUnits, { children: totalUnits })] })] })] }))] })) : (jsxRuntime.jsx(ContainerLoading, {})), jsxRuntime.jsx(HiddenTitleItems, { elementConfig: elementConfig, config: config, type: type })] }));
5678
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), !isVisible ? null : dataSource ? (jsxRuntime.jsxs(DataSourceProgressContainerWrapper, { children: [sliceItems(dataSource?.features)?.map((feature, index) => (jsxRuntime.jsx(DataSourceInnerContainer, { type: type, index: index, feature: feature, config: config, elementConfig: elementConfig, maxValue: currentMaxValue, innerComponent: innerComponent }, index))), checkIsSliced(dataSource?.features) && (jsxRuntime.jsx(ContainerToggler, { toggled: showMore, onClick: onShowMore, children: showMore ? t("hide", { ns: "dashboard", defaultValue: "Свернуть" }) : t("showAll", { ns: "dashboard", defaultValue: "Показать все" }) })), showTotal && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(uilibGl.Divider, {}), jsxRuntime.jsxs(ProgressTotal, { children: [jsxRuntime.jsx(ProgressTotalTitle, { children: t("total", { ns: "dashboard", defaultValue: "Итого" }) }), jsxRuntime.jsxs(ProgressValue, { children: [totalValue, jsxRuntime.jsx(ProgressUnits, { children: totalUnits })] })] })] }))] })) : (jsxRuntime.jsx(ContainerLoading, {})), jsxRuntime.jsx(HiddenTitleItems, { elementConfig: elementConfig, config: config, type: type })] }));
5674
5679
  });
5675
5680
 
5676
5681
  const ProgressContainer = React.memo(({ type, elementConfig, feature, maxValue, index, renderElement }) => {
@@ -5705,7 +5710,7 @@ const ProgressContainer = React.memo(({ type, elementConfig, feature, maxValue,
5705
5710
  id: "icon",
5706
5711
  wrap: false
5707
5712
  }), [renderElement]);
5708
- const renderTooltip = React.useMemo(() => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ProgressTooltipAlias, { children: renderTooltipAlias }), jsxRuntime.jsxs(ProgressTooltipValueContainer, { children: [jsxRuntime.jsx(ProgressTooltipValue, { children: renderTooltipValue }), jsxRuntime.jsx(ProgressTooltipValueOf, { children: t("of", { ns: "dashboard" }) }), jsxRuntime.jsx("div", { children: formatAttributeValue({ t, type: valueType, value: currentMaxValue, stringFormat }) })] })] })), [currentMaxValue, renderTooltipAlias, renderTooltipValue, stringFormat, t, valueType]);
5713
+ const renderTooltip = React.useMemo(() => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ProgressTooltipAlias, { children: renderTooltipAlias }), jsxRuntime.jsxs(ProgressTooltipValueContainer, { children: [jsxRuntime.jsx(ProgressTooltipValue, { children: renderTooltipValue }), jsxRuntime.jsx(ProgressTooltipValueOf, { children: t("of", { ns: "dashboard", defaultValue: "из" }) }), jsxRuntime.jsx("div", { children: formatAttributeValue({ t, type: valueType, value: currentMaxValue, stringFormat }) })] })] })), [currentMaxValue, renderTooltipAlias, renderTooltipValue, stringFormat, t, valueType]);
5709
5714
  const color = React.useMemo(() => colorAttribute
5710
5715
  ? attributes?.find(({ name }) => name === colorAttribute)?.value
5711
5716
  : colors?.[index] || bgColor, [attributes, bgColor, colorAttribute, colors, index]);
@@ -6759,7 +6764,7 @@ const HeaderTitle = ({ noFeature }) => {
6759
6764
  })) ||
6760
6765
  feature?.id);
6761
6766
  }, [attributes, feature, layerDefinition]);
6762
- return (jsxRuntime.jsxs(HeaderTitleContainer, { children: [noFeature ? (jsxRuntime.jsx(FeatureTitleContainer, { children: t("noObjectFound", { ns: "dashboard" }) })) : (jsxRuntime.jsx(FeatureTitleContainer, { clickable: true, children: jsxRuntime.jsx(uilibGl.Tooltip, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard" }), delay: [600, 0], children: ref => (jsxRuntime.jsx(uilibGl.FlexSpan, { ref: ref, onClick: () => zoomToFeatures([feature]), children: resultTitle })) }) })), jsxRuntime.jsx(LayerDescription, { title: resultDescription, children: resultDescription })] }));
6767
+ return (jsxRuntime.jsxs(HeaderTitleContainer, { children: [noFeature ? (jsxRuntime.jsx(FeatureTitleContainer, { children: t("noObjectFound", { ns: "dashboard", defaultValue: "Объектов не найдено" }) })) : (jsxRuntime.jsx(FeatureTitleContainer, { clickable: true, children: jsxRuntime.jsx(uilibGl.Tooltip, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard", defaultValue: "Приблизить к объекту" }), delay: [600, 0], children: ref => (jsxRuntime.jsx(uilibGl.FlexSpan, { ref: ref, onClick: () => zoomToFeatures([feature]), children: resultTitle })) }) })), jsxRuntime.jsx(LayerDescription, { title: resultDescription, children: resultDescription })] }));
6763
6768
  };
6764
6769
 
6765
6770
  const LayerIconContainer = styled.div `
@@ -7169,7 +7174,7 @@ const SmallPreview = ({ images, totalCount, currentIndex, isLoading, setCurrentI
7169
7174
  onNextPage();
7170
7175
  }
7171
7176
  }, [currentIndex, images, isNextDisabled, onNextPage, setCurrentIndex]);
7172
- return (jsxRuntime.jsxs(SmallPreviewContainer$1, { currentIndex: currentIndex + 1, prevIndex: prevIndex + 1, children: [isLoading && jsxRuntime.jsx(uilibGl.LinearProgress, {}), images.length > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SmallPreviewLeft, { "$isDisabled": isPrevDisabled, onClick: prev }), jsxRuntime.jsx(SmallPreviewRight, { "$isDisabled": isNextDisabled, onClick: next }), jsxRuntime.jsx(SmallPreviewCounter, { children: jsxRuntime.jsxs("div", { children: [currentIndex + 1, " ", t("of", { ns: "dashboard" }), " ", total] }) })] })), jsxRuntime.jsx(SmallPreviewImages, { onClick: onClick, children: images.map(image => (jsxRuntime.jsx("img", { src: image.src, alt: "" }, image.src))) })] }));
7177
+ return (jsxRuntime.jsxs(SmallPreviewContainer$1, { currentIndex: currentIndex + 1, prevIndex: prevIndex + 1, children: [isLoading && jsxRuntime.jsx(uilibGl.LinearProgress, {}), images.length > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SmallPreviewLeft, { "$isDisabled": isPrevDisabled, onClick: prev }), jsxRuntime.jsx(SmallPreviewRight, { "$isDisabled": isNextDisabled, onClick: next }), jsxRuntime.jsx(SmallPreviewCounter, { children: jsxRuntime.jsxs("div", { children: [currentIndex + 1, " ", t("of", { ns: "dashboard", defaultValue: "из" }), " ", total] }) })] })), jsxRuntime.jsx(SmallPreviewImages, { onClick: onClick, children: images.map(image => (jsxRuntime.jsx("img", { src: image.src, alt: "" }, image.src))) })] }));
7173
7178
  };
7174
7179
 
7175
7180
  const DEFAULT_ARCHIVED_PERIOD = "#24h";
@@ -7438,7 +7443,7 @@ const LocalLink = React.memo(({ link }) => {
7438
7443
  navigator.clipboard.writeText(link);
7439
7444
  toggleOpen();
7440
7445
  }, [link, toggleOpen]);
7441
- return (jsxRuntime.jsx(uilibGl.Popover, { open: isOpen, zIndex: 10, onRequestClose: toggleOpen, anchorOrigin: "bottom-right", targetOrigin: "top-right", anchor: jsxRuntime.jsx(LocalLinkButton, { onClick: toggleOpen }), children: jsxRuntime.jsxs(LocalLinkBlank, { children: [jsxRuntime.jsx("a", { href: link, target: "_blank", rel: "noreferrer", children: link }), jsxRuntime.jsx(LocalLinkCopy, { children: jsxRuntime.jsx(uilibGl.IconButton, { kind: "copy", onClick: onCopy, children: t("copy", { ns: "dashboard" }) }) })] }) }));
7446
+ return (jsxRuntime.jsx(uilibGl.Popover, { open: isOpen, zIndex: 10, onRequestClose: toggleOpen, anchorOrigin: "bottom-right", targetOrigin: "top-right", anchor: jsxRuntime.jsx(LocalLinkButton, { onClick: toggleOpen }), children: jsxRuntime.jsxs(LocalLinkBlank, { children: [jsxRuntime.jsx("a", { href: link, target: "_blank", rel: "noreferrer", children: link }), jsxRuntime.jsx(LocalLinkCopy, { children: jsxRuntime.jsx(uilibGl.IconButton, { kind: "copy", onClick: onCopy, children: t("copy", { ns: "dashboard", defaultValue: "Копировать" }) }) })] }) }));
7442
7447
  });
7443
7448
 
7444
7449
  const ElementLink = React.memo(({ type, elementConfig }) => {
@@ -7633,7 +7638,7 @@ const getDataFromAttributes = (t, config, attributes) => {
7633
7638
  return [
7634
7639
  ...data?.slice(0, config.options?.otherItems),
7635
7640
  {
7636
- name: t("other", { ns: "dashboard" }),
7641
+ name: t("other", { ns: "dashboard", defaultValue: "Другое" }),
7637
7642
  color: FEATURE_CARD_OTHER_COLOR,
7638
7643
  value: Number(otherValue)
7639
7644
  }
@@ -7696,7 +7701,7 @@ const getDataFromRelatedFeatures = ({ t, config, filters, relatedConfig, dataSou
7696
7701
  }, []);
7697
7702
  if (isOtherSliced) {
7698
7703
  result.push({
7699
- name: t("other", { ns: "dashboard" }),
7704
+ name: t("other", { ns: "dashboard", defaultValue: "Другое" }),
7700
7705
  color: FEATURE_CARD_OTHER_COLOR,
7701
7706
  value: Number(otherValue)
7702
7707
  });
@@ -7845,7 +7850,7 @@ const RangeNumberFilter = ({ type, filter }) => {
7845
7850
  const configFilter = getConfigFilter(filterName, configFilters);
7846
7851
  if (!configFilter)
7847
7852
  return null;
7848
- return (jsxRuntime.jsx(uilibGl.NumberRangeSlider, { value: value, min: minValue, max: maxValue, step: step || 1, sliderWidth: width ? `${width}px` : "17rem", label: label || t("interval", { ns: "dashboard" }), hasReset: true, onChange: setValue }));
7853
+ return (jsxRuntime.jsx(uilibGl.NumberRangeSlider, { value: value, min: minValue, max: maxValue, step: step || 1, sliderWidth: width ? `${width}px` : "17rem", label: label || t("interval", { ns: "dashboard", defaultValue: "Интервал" }), hasReset: true, onChange: setValue }));
7849
7854
  };
7850
7855
 
7851
7856
  const TextFilter = ({ type, filter, config }) => {
@@ -8025,7 +8030,7 @@ const CheckboxFilter = ({ type, filter, elementConfig }) => {
8025
8030
  });
8026
8031
  changeFilters({ [filterName]: { value } });
8027
8032
  } }, optionIndex));
8028
- }), showMoreBtn && (jsxRuntime.jsx(uilibGl.LegendToggler, { onClick: onShowMore, toggled: showMore, children: showMore ? t("hide", { ns: "dashboard" }) : t("showAll", { ns: "dashboard" }) }))] }));
8033
+ }), showMoreBtn && (jsxRuntime.jsx(uilibGl.LegendToggler, { onClick: onShowMore, toggled: showMore, children: showMore ? t("hide", { ns: "dashboard", defaultValue: "Свернуть" }) : t("showAll", { ns: "dashboard", defaultValue: "Показать все" }) }))] }));
8029
8034
  };
8030
8035
 
8031
8036
  const ChartLoading = ({ column }) => (jsxRuntime.jsx(uilibGl.Flex, { position: "absolute", width: "100%", height: "inherit", children: jsxRuntime.jsx(uilibGl.Flex, { justifyContent: "center", alignContent: "center", alignItems: "center", width: "100%", height: "inherit", marginRight: column || column === undefined ? 0 : "-2rem", children: jsxRuntime.jsx(uilibGl.CircularProgress, { diameter: 1.5, mono: true }) }) }));
@@ -8317,7 +8322,7 @@ const RangeDateFilter = ({ type, filter }) => {
8317
8322
  }, [value]); // eslint-disable-line
8318
8323
  if (!configFilter)
8319
8324
  return null;
8320
- return (jsxRuntime.jsx(uilibGl.RangeNumberInput, { label: label || t("interval", { ns: "dashboard" }), selectedOption: { range: true }, minDate: getDate(minDate), maxDate: getDate(maxDate), value: [getDate(value[0]), getDate(value[1])], zIndex: 100, prefix: jsxRuntime.jsx(uilibGl.Icon, { kind: "date", disabled: true }), suffix: !isEmpty && !isDefault && jsxRuntime.jsx(StyledIconButton, { kind: "error", onClick: reset }), withTime: withTime, isDate: true, onChange: onChange }));
8325
+ return (jsxRuntime.jsx(uilibGl.RangeNumberInput, { label: label || t("interval", { ns: "dashboard", defaultValue: "Интервал" }), selectedOption: { range: true }, minDate: getDate(minDate), maxDate: getDate(maxDate), value: [getDate(value[0]), getDate(value[1])], zIndex: 100, prefix: jsxRuntime.jsx(uilibGl.Icon, { kind: "date", disabled: true }), suffix: !isEmpty && !isDefault && jsxRuntime.jsx(StyledIconButton, { kind: "error", onClick: reset }), withTime: withTime, isDate: true, onChange: onChange }));
8321
8326
  };
8322
8327
 
8323
8328
  const getFilterComponent = (filterType) => {
@@ -8386,8 +8391,8 @@ const getFormattedAttributes = (t, data, attributes, config) => {
8386
8391
  ...attributes,
8387
8392
  {
8388
8393
  ...otherAttribute,
8389
- name: t("other", { ns: "dashboard" }),
8390
- alias: t("other", { ns: "dashboard" })
8394
+ name: t("other", { ns: "dashboard", defaultValue: "Другое" }),
8395
+ alias: t("other", { ns: "dashboard", defaultValue: "Другое" })
8391
8396
  }
8392
8397
  ]
8393
8398
  : attributes;
@@ -8632,7 +8637,7 @@ const useWidgetPage = (type = exports.WidgetType.Dashboard) => {
8632
8637
  const pages = getPagesFromProjectInfo(newProjectInfo);
8633
8638
  if (!pages)
8634
8639
  return;
8635
- pages.push(createConfigPage({ pages, defaultTitle: t("page", { ns: "dashboard" }) }));
8640
+ pages.push(createConfigPage({ pages, defaultTitle: t("page", { ns: "dashboard", defaultValue: "Страница" }) }));
8636
8641
  updateProject(newProjectInfo);
8637
8642
  changePage(pages.length);
8638
8643
  }, [changePage, projectInfo, t, updateProject]);
@@ -9290,7 +9295,7 @@ const ChartLegend = ({ data, chartElement, type, twoColumns, loading }) => {
9290
9295
  const showMoreBtn = !!shownItems && data.length > shownItems;
9291
9296
  if (!loading && !data?.length && !!hideEmpty)
9292
9297
  return null;
9293
- return (jsxRuntime.jsxs(uilibGl.Flex, { flexDirection: "column", opacity: loading ? FILTERED_VALUE_OPACITY / 100 : 1, children: [jsxRuntime.jsx(ChartLegendContainer, { twoColumns: twoColumns, children: sliceItems(data)?.map(({ name, color }, index) => (jsxRuntime.jsxs(ChartLegendItem, { hasAnyFilter: hasAnyFilter, isFiltered: isFiltered(name), onClick: axes?.[0]?.filterName ? () => onFilter(name) : undefined, children: [jsxRuntime.jsx(ChartLegendColor, { color: color }), jsxRuntime.jsx(ChartLegendName, { "$fontColor": fontColor, children: name })] }, index))) }), showMoreBtn && (jsxRuntime.jsx(uilibGl.LegendToggler, { onClick: onShowMore, toggled: showMore, children: t("other", { ns: "dashboard" }) }))] }));
9298
+ return (jsxRuntime.jsxs(uilibGl.Flex, { flexDirection: "column", opacity: loading ? FILTERED_VALUE_OPACITY / 100 : 1, children: [jsxRuntime.jsx(ChartLegendContainer, { twoColumns: twoColumns, children: sliceItems(data)?.map(({ name, color }, index) => (jsxRuntime.jsxs(ChartLegendItem, { hasAnyFilter: hasAnyFilter, isFiltered: isFiltered(name), onClick: axes?.[0]?.filterName ? () => onFilter(name) : undefined, children: [jsxRuntime.jsx(ChartLegendColor, { color: color }), jsxRuntime.jsx(ChartLegendName, { "$fontColor": fontColor, children: name })] }, index))) }), showMoreBtn && (jsxRuntime.jsx(uilibGl.LegendToggler, { onClick: onShowMore, toggled: showMore, children: t("other", { ns: "dashboard", defaultValue: "Другое" }) }))] }));
9294
9299
  };
9295
9300
 
9296
9301
  const ContainerChildren = React.memo(({ items, isColumn, isMain, renderElement }) => {
@@ -9339,7 +9344,7 @@ const DashboardHeader = React.memo(() => {
9339
9344
 
9340
9345
  const DataSourceError = ({ name }) => {
9341
9346
  const { t } = useGlobalContext();
9342
- return (jsxRuntime.jsxs(DataSourceErrorContainer, { children: [jsxRuntime.jsx(uilibGl.Icon, { kind: "alert" }), jsxRuntime.jsxs("div", { children: [t("block", { ns: "dashboard" }), " \"", name, "\" ", t("isNotLoaded", { ns: "dashboard" })] })] }));
9347
+ return (jsxRuntime.jsxs(DataSourceErrorContainer, { children: [jsxRuntime.jsx(uilibGl.Icon, { kind: "alert" }), jsxRuntime.jsxs("div", { children: [t("block", { ns: "dashboard", defaultValue: "Блок" }), " \"", name, "\" ", t("isNotLoaded", { ns: "dashboard", defaultValue: "не загружен" })] })] }));
9343
9348
  };
9344
9349
 
9345
9350
  const ExpandableTitle = React.memo(({ elementConfig, type, renderElement }) => {
@@ -9394,7 +9399,7 @@ const FeatureCardTitle = ({ title, description }) => {
9394
9399
  })) ||
9395
9400
  feature?.id);
9396
9401
  }, [attributes, feature?.id, layerDefinition, title, titleAttribute]);
9397
- return (jsxRuntime.jsxs(HeaderTitleContainer, { children: [jsxRuntime.jsx(FeatureTitleContainer, { clickable: true, children: jsxRuntime.jsx(uilibGl.Tooltip, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard" }), delay: [600, 0], children: ref => (jsxRuntime.jsx(uilibGl.FlexSpan, { ref: ref, onClick: () => zoomToFeatures([feature]), children: resultTitle })) }) }), jsxRuntime.jsx(LayerDescription, { title: resultDescription, children: resultDescription })] }));
9402
+ return (jsxRuntime.jsxs(HeaderTitleContainer, { children: [jsxRuntime.jsx(FeatureTitleContainer, { clickable: true, children: jsxRuntime.jsx(uilibGl.Tooltip, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard", defaultValue: "Приблизить к объекту" }), delay: [600, 0], children: ref => (jsxRuntime.jsx(uilibGl.FlexSpan, { ref: ref, onClick: () => zoomToFeatures([feature]), children: resultTitle })) }) }), jsxRuntime.jsx(LayerDescription, { title: resultDescription, children: resultDescription })] }));
9398
9403
  };
9399
9404
 
9400
9405
  const HiddenFilters = styled(uilibGl.Flex) `
@@ -9524,7 +9529,8 @@ const StyledSvgColorMixin = styled.css `
9524
9529
  }
9525
9530
  }
9526
9531
  `;
9527
- const StyledSvg = styled.div `
9532
+ const StyledSvg = styled(uilibGl.Flex) `
9533
+ align-items: center;
9528
9534
  ${({ $width }) => !!$width && StyledSvgWidthMixin};
9529
9535
  ${({ $height }) => !!$height && StyledSvgHeightMixin};
9530
9536
  ${({ $fontColor }) => !!$fontColor && StyledSvgColorMixin};
@@ -9548,8 +9554,6 @@ const SvgImage = React.memo(({ url, width, height, fontColor }) => {
9548
9554
  React.useEffect(() => () => {
9549
9555
  setSvg(null);
9550
9556
  }, []);
9551
- // Todo remove the test info
9552
- console.info("svg", svg);
9553
9557
  const regexp = /<\/svg>\s*$/im;
9554
9558
  if (!regexp.test(svg))
9555
9559
  return null;
@@ -9569,7 +9573,7 @@ const TextTrim = React.memo(({ maxLength, expandable, lineBreak, children }) =>
9569
9573
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: formatValue(text) });
9570
9574
  const substring = `${text.substring(0, maxLength)}...`;
9571
9575
  if (expandable) {
9572
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [formatValue(expanded ? text : substring), jsxRuntime.jsx(uilibGl.LegendToggler, { toggled: expanded, onClick: toggleExpanded, children: expanded ? t("hide", { ns: "dashboard" }) : t("more", { ns: "dashboard" }) })] }));
9576
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [formatValue(expanded ? text : substring), jsxRuntime.jsx(uilibGl.LegendToggler, { toggled: expanded, onClick: toggleExpanded, children: expanded ? t("hide", { ns: "dashboard", defaultValue: "Свернуть" }) : t("more", { ns: "dashboard", defaultValue: "Подробнее" }) })] }));
9573
9577
  }
9574
9578
  return (jsxRuntime.jsx(uilibGl.Tooltip, { placement: "top", arrow: true, content: text, children: ref => jsxRuntime.jsx("div", { ref: ref, children: formatValue(substring) }) }));
9575
9579
  });