@evergis/react 3.1.46 → 3.1.47
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/Dashboard/containers/index.d.ts +0 -1
- package/dist/components/Dashboard/containers/registry.d.ts +0 -1
- package/dist/components/Dashboard/styled.d.ts +0 -1
- package/dist/index.js +34 -46
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +35 -45
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/Dashboard/containers/TwoColumnsInnerContainer/index.d.ts +0 -3
package/dist/react.esm.js
CHANGED
|
@@ -5130,9 +5130,6 @@ const LayerListContainer = styled(Flex) `
|
|
|
5130
5130
|
const ElementValueWrapper = styled.div `
|
|
5131
5131
|
transition: background-color ${transition.toggle};
|
|
5132
5132
|
`;
|
|
5133
|
-
const InnerContainerWrapper$1 = styled.div `
|
|
5134
|
-
width: 100%;
|
|
5135
|
-
`;
|
|
5136
5133
|
const ContainerWrapper = styled(Flex) `
|
|
5137
5134
|
position: relative;
|
|
5138
5135
|
min-height: 1rem;
|
|
@@ -5475,24 +5472,24 @@ const ContainersGroupContainer = memo(({ elementConfig, type, renderElement }) =
|
|
|
5475
5472
|
const { column, expandable, expanded } = options || {};
|
|
5476
5473
|
const isColumn = column === undefined || column;
|
|
5477
5474
|
const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
|
|
5478
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsx(Container, { style: style, isColumn: isColumn, children: jsx(ContainerChildren, { items: children, elementConfig: elementConfig, isColumn: isColumn, isMain: id?.startsWith(CONFIG_PAGE_ID), renderElement: renderElement }) }))] }));
|
|
5475
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsx(Container, { id: id, style: style, isColumn: isColumn, children: jsx(ContainerChildren, { items: children, elementConfig: elementConfig, isColumn: isColumn, isMain: id?.startsWith(CONFIG_PAGE_ID), renderElement: renderElement }) }))] }));
|
|
5479
5476
|
});
|
|
5480
5477
|
|
|
5481
5478
|
const OneColumnContainer = memo(({ elementConfig, renderElement }) => {
|
|
5482
|
-
const { options, style } = elementConfig || {};
|
|
5479
|
+
const { id, options, style } = elementConfig || {};
|
|
5483
5480
|
const { innerTemplateStyle, hideEmpty } = options || {};
|
|
5484
5481
|
const value = renderElement({ id: "value" });
|
|
5485
5482
|
const hasUnits = elementConfig?.children?.some(({ id }) => id === "units");
|
|
5486
5483
|
if (!value && hideEmpty)
|
|
5487
5484
|
return null;
|
|
5488
|
-
return (jsxs(Container, { style: innerTemplateStyle || style, children: [jsxs(ContainerAlias, { hasBottomMargin: true, children: [renderElement({ id: "alias" }), renderElement({ id: "tooltip" })] }), jsxs(ContainerValue, { children: [value, hasUnits && jsx(ContainerUnits, { children: renderElement({ id: "units" }) })] })] }));
|
|
5485
|
+
return (jsxs(Container, { id: id, style: innerTemplateStyle || style, children: [jsxs(ContainerAlias, { hasBottomMargin: true, children: [renderElement({ id: "alias" }), renderElement({ id: "tooltip" })] }), jsxs(ContainerValue, { children: [value, hasUnits && jsx(ContainerUnits, { children: renderElement({ id: "units" }) })] })] }));
|
|
5489
5486
|
});
|
|
5490
5487
|
|
|
5491
5488
|
const TwoColumnContainer = memo(({ config, elementConfig, type, renderElement }) => {
|
|
5492
5489
|
const { selectedTabId, layerInfo, attributes } = useWidgetContext(type);
|
|
5493
5490
|
const { attributes: renderAttributes } = elementConfig?.options || {};
|
|
5494
5491
|
const renderContainer = useCallback((element, attribute) => {
|
|
5495
|
-
const { options, style, children } = element || {};
|
|
5492
|
+
const { id, options, style, children } = element || {};
|
|
5496
5493
|
const { hideEmpty, innerTemplateStyle } = options || {};
|
|
5497
5494
|
const hasUnits = children?.some(({ id }) => id === "units");
|
|
5498
5495
|
const iconIndex = children?.findIndex(({ id }) => id === "icon");
|
|
@@ -5530,7 +5527,7 @@ const TwoColumnContainer = memo(({ config, elementConfig, type, renderElement })
|
|
|
5530
5527
|
const value = render({ id: "value" });
|
|
5531
5528
|
if (!value && hideEmpty)
|
|
5532
5529
|
return null;
|
|
5533
|
-
return (jsxs(TwoColumnContainerWrapper, { style: innerTemplateStyle || style, children: [jsxs(ContainerAlias, { children: [hasIcon && jsx(ContainerAliasIcon, { children: render({ id: "icon" }) }), render({ id: "alias" }), render({ id: "tooltip" })] }), jsxs(ContainerValue, { big: true, children: [value, hasUnits && jsx(ContainerUnits, { children: render({ id: "units" }) })] })] }, attribute));
|
|
5530
|
+
return (jsxs(TwoColumnContainerWrapper, { id: id, style: innerTemplateStyle || style, children: [jsxs(ContainerAlias, { children: [hasIcon && jsx(ContainerAliasIcon, { children: render({ id: "icon" }) }), render({ id: "alias" }), render({ id: "tooltip" })] }), jsxs(ContainerValue, { big: true, children: [value, hasUnits && jsx(ContainerUnits, { children: render({ id: "units" }) })] })] }, attribute));
|
|
5534
5531
|
}, [attributes, config, getRenderElement, layerInfo, renderElement, selectedTabId, type]);
|
|
5535
5532
|
return renderAttributes?.length ? (jsx(Fragment$1, { children: renderAttributes.map(attribute => renderContainer(elementConfig, attribute)) })) : (renderContainer(elementConfig));
|
|
5536
5533
|
});
|
|
@@ -5721,7 +5718,7 @@ const DataSourceProgressContainer = memo(({ config, elementConfig, type, innerCo
|
|
|
5721
5718
|
dataSources
|
|
5722
5719
|
});
|
|
5723
5720
|
const { attributes } = layerInfo?.configuration?.attributesConfiguration || {};
|
|
5724
|
-
const { id, options, children } = elementConfig || {};
|
|
5721
|
+
const { id, options, children, style } = elementConfig || {};
|
|
5725
5722
|
const { maxValue, showTotal, relatedDataSource, expandable, expanded } = options || {};
|
|
5726
5723
|
const valueElement = children?.find(item => item.id === "value");
|
|
5727
5724
|
const unitsElement = children?.find(item => item.id === "units");
|
|
@@ -5749,7 +5746,7 @@ const DataSourceProgressContainer = memo(({ config, elementConfig, type, innerCo
|
|
|
5749
5746
|
return jsx(DataSourceError, { name: elementConfig.templateName });
|
|
5750
5747
|
}
|
|
5751
5748
|
const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
|
|
5752
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), !isVisible ? null : dataSource ? (jsxs(DataSourceProgressContainerWrapper, { children: [sliceItems(dataSource?.features)?.map((feature, index) => (jsx(DataSourceInnerContainer, { type: type, index: index, feature: feature, config: config, elementConfig: elementConfig, maxValue: currentMaxValue, innerComponent: innerComponent }, index))), checkIsSliced(dataSource?.features) && (jsx(ContainerToggler, { toggled: showMore, onClick: onShowMore, children: showMore ? t("hide", { ns: "dashboard", defaultValue: "Свернуть" }) : t("showAll", { ns: "dashboard", defaultValue: "Показать все" }) })), showTotal && (jsxs(Fragment$1, { children: [jsx(Divider, {}), jsxs(ProgressTotal, { children: [jsx(ProgressTotalTitle, { children: t("total", { ns: "dashboard", defaultValue: "Итого" }) }), jsxs(ProgressValue, { children: [totalValue, jsx(ProgressUnits, { children: totalUnits })] })] })] }))] })) : (jsx(ContainerLoading, {})), jsx(HiddenTitleItems, { elementConfig: elementConfig, config: config, type: type })] }));
|
|
5749
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), !isVisible ? null : dataSource ? (jsxs(DataSourceProgressContainerWrapper, { id: id, style: style, children: [sliceItems(dataSource?.features)?.map((feature, index) => (jsx(DataSourceInnerContainer, { type: type, index: index, feature: feature, config: config, elementConfig: elementConfig, maxValue: currentMaxValue, innerComponent: innerComponent }, index))), checkIsSliced(dataSource?.features) && (jsx(ContainerToggler, { toggled: showMore, onClick: onShowMore, children: showMore ? t("hide", { ns: "dashboard", defaultValue: "Свернуть" }) : t("showAll", { ns: "dashboard", defaultValue: "Показать все" }) })), showTotal && (jsxs(Fragment$1, { children: [jsx(Divider, {}), jsxs(ProgressTotal, { children: [jsx(ProgressTotalTitle, { children: t("total", { ns: "dashboard", defaultValue: "Итого" }) }), jsxs(ProgressValue, { children: [totalValue, jsx(ProgressUnits, { children: totalUnits })] })] })] }))] })) : (jsx(ContainerLoading, {})), jsx(HiddenTitleItems, { elementConfig: elementConfig, config: config, type: type })] }));
|
|
5753
5750
|
});
|
|
5754
5751
|
|
|
5755
5752
|
const ProgressContainer = memo(({ type, elementConfig, feature, maxValue, index, renderElement }) => {
|
|
@@ -5761,7 +5758,7 @@ const ProgressContainer = memo(({ type, elementConfig, feature, maxValue, index,
|
|
|
5761
5758
|
dataSources,
|
|
5762
5759
|
feature
|
|
5763
5760
|
});
|
|
5764
|
-
const { children, options, style } = elementConfig || {};
|
|
5761
|
+
const { id, children, options, style } = elementConfig || {};
|
|
5765
5762
|
const { bgColor, innerTemplateStyle, maxValue: optionMaxValue, hideTitle, innerValue, colors, colorAttribute } = options;
|
|
5766
5763
|
const valueElement = children?.find(({ id }) => id === "value");
|
|
5767
5764
|
const unitsElement = children?.find(({ id }) => id === "units");
|
|
@@ -5788,7 +5785,7 @@ const ProgressContainer = memo(({ type, elementConfig, feature, maxValue, index,
|
|
|
5788
5785
|
const color = useMemo(() => colorAttribute
|
|
5789
5786
|
? attributes?.find(({ name }) => name === colorAttribute)?.value
|
|
5790
5787
|
: colors?.[index] || bgColor, [attributes, bgColor, colorAttribute, colors, index]);
|
|
5791
|
-
return (jsx(Tooltip$1, { content: renderTooltip, placement: "top", arrow: true, children: ref => (jsxs(ProgressContainerWrapper, { ref: ref, style: innerTemplateStyle || style, children: [renderIcon && jsx(ProgressIcon, { children: renderIcon }), jsxs(ProgressContent, { children: [!hideTitle && (jsxs(ProgressAlias, { children: [jsx("div", { children: renderAlias }), jsxs(ProgressValue, { children: [renderValue, unitsElement && jsx(ProgressUnits, { children: renderElement({ id: "units" }) })] })] })), jsxs(ProgressBarContainer, { innerValue: innerValue, children: [jsx(ProgressBarWrapper, { children: jsx(ProgressBar, { "$width": width, "$color": color }) }), !!(hideTitle || innerValue) && jsx(ProgressInnerValue, { children: renderValue })] })] })] })) }));
|
|
5788
|
+
return (jsx(Tooltip$1, { content: renderTooltip, placement: "top", arrow: true, children: ref => (jsxs(ProgressContainerWrapper, { ref: ref, id: id, style: innerTemplateStyle || style, children: [renderIcon && jsx(ProgressIcon, { children: renderIcon }), jsxs(ProgressContent, { children: [!hideTitle && (jsxs(ProgressAlias, { children: [jsx("div", { children: renderAlias }), jsxs(ProgressValue, { children: [renderValue, unitsElement && jsx(ProgressUnits, { children: renderElement({ id: "units" }) })] })] })), jsxs(ProgressBarContainer, { innerValue: innerValue, children: [jsx(ProgressBarWrapper, { children: jsx(ProgressBar, { "$width": width, "$color": color }) }), !!(hideTitle || innerValue) && jsx(ProgressInnerValue, { children: renderValue })] })] })] })) }));
|
|
5792
5789
|
});
|
|
5793
5790
|
|
|
5794
5791
|
const RANGE_MIN_VALUE = 0;
|
|
@@ -5982,7 +5979,7 @@ const FiltersContainer = memo(({ elementConfig, config, type, renderElement }) =
|
|
|
5982
5979
|
}, [config, type]);
|
|
5983
5980
|
const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
|
|
5984
5981
|
const selectedItems = useMemo(() => getFilterSelectedItems(filterItems, filters, configFilters), [configFilters, filters, filterItems]);
|
|
5985
|
-
return (jsxs(Fragment$1, { children: [jsx(Flex, { mb: !isVisible && selectedItems.length ? "2rem" : 0, children: jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }) }), isLoading && jsx(ContainerLoading, {}), !isLoading && isVisible && (jsx(FiltersContainerWrapper, { style: style, "$padding": padding, "$bgColor": bgColor, "$fontSize": fontSize, "$fontColor": fontColor, children: filterItems?.map(renderFilter) })), jsx(HiddenTitleItems, { elementConfig: elementConfig, config: config, type: type, filter: filterItems[0].options?.filterName })] }));
|
|
5982
|
+
return (jsxs(Fragment$1, { children: [jsx(Flex, { mb: !isVisible && selectedItems.length ? "2rem" : 0, children: jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }) }), isLoading && jsx(ContainerLoading, {}), !isLoading && isVisible && (jsx(FiltersContainerWrapper, { id: id, style: style, "$padding": padding, "$bgColor": bgColor, "$fontSize": fontSize, "$fontColor": fontColor, children: filterItems?.map(renderFilter) })), jsx(HiddenTitleItems, { elementConfig: elementConfig, config: config, type: type, filter: filterItems[0].options?.filterName })] }));
|
|
5986
5983
|
});
|
|
5987
5984
|
|
|
5988
5985
|
const DefaultAttributesContainer = memo(({ type, renderElement }) => {
|
|
@@ -5991,7 +5988,7 @@ const DefaultAttributesContainer = memo(({ type, renderElement }) => {
|
|
|
5991
5988
|
});
|
|
5992
5989
|
|
|
5993
5990
|
const ChartContainer = memo(({ elementConfig, isVisible, type, renderElement }) => {
|
|
5994
|
-
const { options, children } = elementConfig || {};
|
|
5991
|
+
const { id, style, options, children } = elementConfig || {};
|
|
5995
5992
|
const { twoColumns, hideEmpty } = options || {};
|
|
5996
5993
|
const aliasElement = children.find(({ id }) => id === "alias");
|
|
5997
5994
|
const chartElement = children.find(({ id }) => id === "chart");
|
|
@@ -6006,7 +6003,7 @@ const ChartContainer = memo(({ elementConfig, isVisible, type, renderElement })
|
|
|
6006
6003
|
const hasItems = !!data[0]?.items?.length;
|
|
6007
6004
|
if (!loading && !hasItems && hideEmpty)
|
|
6008
6005
|
return null;
|
|
6009
|
-
return (jsxs(
|
|
6006
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxs(Container, { id: id, style: style, isColumn: true, children: [aliasElement && jsx(ContainerAlias, { hasBottomMargin: true, children: renderElement({ id: "alias" }) }), jsx(ContainerValue, { column: !twoColumns, alignItems: "center", children: hasItems ? (jsxs(Fragment$1, { children: [jsx(ContainerChart, { children: renderElement({ id: "chart" }) }), jsx(ContainerLegend, { justifyContent: legendElement?.options?.center ? "center" : "flex-start", children: renderElement({ id: "legend" }) })] })) : (jsx(Fragment$1, { children: "\u2014" })) })] }))] }));
|
|
6010
6007
|
});
|
|
6011
6008
|
|
|
6012
6009
|
const PagesContainer = memo(({ type = WidgetType.Dashboard, noBorders }) => {
|
|
@@ -6042,10 +6039,6 @@ const PagesContainer = memo(({ type = WidgetType.Dashboard, noBorders }) => {
|
|
|
6042
6039
|
return (jsx(Container, { id: getRootElementId(type), style: { width }, isMain: true, isColumn: isColumn, noBorders: noBorders, children: jsx(ContainerChildren, { items: filteredChildren, isMain: true, renderElement: renderElement }) }));
|
|
6043
6040
|
});
|
|
6044
6041
|
|
|
6045
|
-
const TwoColumnsInnerContainer = memo(({ renderElement }) => {
|
|
6046
|
-
return (jsxs(Fragment$1, { children: [jsxs(TwoColumnContainerWrapper, { children: [jsxs(Container, { children: [jsx(ContainerAlias, { children: renderElement({ id: "firstAlias" }) }), jsx(ContainerValue, { big: true, children: renderElement({ id: "firstValue" }) })] }), jsxs(Container, { children: [jsx(ContainerAlias, { children: renderElement({ id: "secondAlias" }) }), jsx(ContainerValue, { big: true, children: renderElement({ id: "secondValue" }) })] })] }), renderElement({ id: "thirdContainer" })] }));
|
|
6047
|
-
});
|
|
6048
|
-
|
|
6049
6042
|
const ImageContainerBg$1 = styled.div `
|
|
6050
6043
|
position: absolute;
|
|
6051
6044
|
top: 0;
|
|
@@ -6107,8 +6100,8 @@ const ImageContainerWrapper = styled(Flex) `
|
|
|
6107
6100
|
`;
|
|
6108
6101
|
|
|
6109
6102
|
const ImageContainer = memo(({ elementConfig, renderElement }) => {
|
|
6110
|
-
const { style } = elementConfig || {};
|
|
6111
|
-
return (jsxs(ImageContainerWrapper, { style: style, children: [jsx(ImageContainerTitle, { children: renderElement({ id: "alias" }) }), jsx(ImageContainerText, { children: renderElement({ id: "text" }) }), renderElement({ id: "button" }), jsx(ImageContainerBg$1, { children: renderElement({ id: "image" }) })] }));
|
|
6103
|
+
const { id, style } = elementConfig || {};
|
|
6104
|
+
return (jsxs(ImageContainerWrapper, { id: id, style: style, children: [jsx(ImageContainerTitle, { children: renderElement({ id: "alias" }) }), jsx(ImageContainerText, { children: renderElement({ id: "text" }) }), renderElement({ id: "button" }), jsx(ImageContainerBg$1, { children: renderElement({ id: "image" }) })] }));
|
|
6112
6105
|
});
|
|
6113
6106
|
|
|
6114
6107
|
const IconContainerWrapper = styled(Flex) `
|
|
@@ -6160,7 +6153,8 @@ const IconContainerText = styled.div `
|
|
|
6160
6153
|
`;
|
|
6161
6154
|
|
|
6162
6155
|
const IconContainer = memo(({ elementConfig, renderElement }) => {
|
|
6163
|
-
|
|
6156
|
+
const { id, style } = elementConfig || {};
|
|
6157
|
+
return (jsxs(IconContainerWrapper, { id: id, style: style, children: [jsxs(IconContainerHeaderWrapper, { children: [jsxs(IconContainerHeader, { children: [renderElement({ id: "icon" }), jsx(IconContainerTitle, { children: renderElement({ id: "alias" }) })] }), renderElement({ id: "link" })] }), jsx(IconContainerText, { children: renderElement({ id: "text" }) })] }));
|
|
6164
6158
|
});
|
|
6165
6159
|
|
|
6166
6160
|
const DataSourceContainer = memo(({ config, elementConfig, type, innerComponent, renderElement }) => {
|
|
@@ -6175,7 +6169,7 @@ const DataSourceContainer = memo(({ config, elementConfig, type, innerComponent,
|
|
|
6175
6169
|
return jsx(DataSourceError, { name: elementConfig.templateName });
|
|
6176
6170
|
}
|
|
6177
6171
|
const isLoading = !dataSource?.features;
|
|
6178
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), !isVisible ? null : dataSource ? (jsx(Container, { isColumn: column, style: { height: isLoading ? "3rem" : "auto", ...style }, children: dataSource.features?.map((feature, index) => (jsx(DataSourceInnerContainer, { index: index, type: type, config: config, feature: feature, elementConfig: elementConfig, innerComponent: innerComponent }, index))) })) : (jsx(ContainerLoading, {}))] }));
|
|
6172
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), !isVisible ? null : dataSource ? (jsx(Container, { id: id, isColumn: column, style: { height: isLoading ? "3rem" : "auto", ...style }, children: dataSource.features?.map((feature, index) => (jsx(DataSourceInnerContainer, { index: index, type: type, config: config, feature: feature, elementConfig: elementConfig, innerComponent: innerComponent }, index))) })) : (jsx(ContainerLoading, {}))] }));
|
|
6179
6173
|
});
|
|
6180
6174
|
|
|
6181
6175
|
const SvgContainerColorMixin = css `
|
|
@@ -6216,10 +6210,6 @@ const ContainerIconTitle = styled(Flex) `
|
|
|
6216
6210
|
flex-grow: 0;
|
|
6217
6211
|
margin-right: 0.5rem;
|
|
6218
6212
|
}
|
|
6219
|
-
|
|
6220
|
-
> * {
|
|
6221
|
-
width: auto;
|
|
6222
|
-
}
|
|
6223
6213
|
|
|
6224
6214
|
svg,
|
|
6225
6215
|
img,
|
|
@@ -6289,7 +6279,7 @@ const TitleContainer = memo(({ containerId, templateName, layerNames, fontColor,
|
|
|
6289
6279
|
const { expandContainer, expandedContainers, setDashboardLayer } = useWidgetContext(type);
|
|
6290
6280
|
const [layersVisibility, toggleVisibility] = useToggle(true);
|
|
6291
6281
|
const { palette } = useTheme();
|
|
6292
|
-
const { style, options } = elementConfig || {};
|
|
6282
|
+
const { id, style, options } = elementConfig || {};
|
|
6293
6283
|
const { simple, downloadById } = options || {};
|
|
6294
6284
|
const isLayers = templateName === ContainerTemplate.Layers;
|
|
6295
6285
|
const { onExport } = useExportPdf(downloadById);
|
|
@@ -6307,7 +6297,7 @@ const TitleContainer = memo(({ containerId, templateName, layerNames, fontColor,
|
|
|
6307
6297
|
const renderVisibility = useMemo(() => isLayers && (jsx(FlexSpan, { mr: "-1rem", children: jsx(IconToggle, { kind: layersVisibility ? "password_show" : "password_hide", className: "feature-visible", isSelected: layersVisibility, onClick: onToggleVisibility }) })), [isLayers, layersVisibility, onToggleVisibility]);
|
|
6308
6298
|
const renderToggler = useMemo(() => !!containerId &&
|
|
6309
6299
|
expandable && (jsx("div", { children: jsx(LegendToggler, { color: palette.icon, toggled: expandedContainers?.[containerId] !== undefined ? expandedContainers[containerId] : expanded, onClick: onClick }) })), [containerId, expandable, expanded, expandedContainers, onClick, palette.icon]);
|
|
6310
|
-
return (jsx(Container, {
|
|
6300
|
+
return (jsx(Container, { id: id, style: style, isTitle: isVisible, children: jsxs(ContainerTitle, { simple: simple, children: [jsxs(ContainerIconTitle, { fontColor: fontColor, children: [renderElement({ id: "titleIcon", wrap: false }), renderElement({ id: "title" }), !!downloadById && (jsx(IconButton, { kind: "download", onClick: onExport })), isLayers && renderToggler] }), !isLayers && renderToggler, renderVisibility] }) }));
|
|
6311
6301
|
});
|
|
6312
6302
|
|
|
6313
6303
|
const ContainerDivider = styled(Divider) `
|
|
@@ -6316,7 +6306,8 @@ const ContainerDivider = styled(Divider) `
|
|
|
6316
6306
|
`;
|
|
6317
6307
|
|
|
6318
6308
|
const DividerContainer = memo(({ elementConfig, config }) => {
|
|
6319
|
-
|
|
6309
|
+
const { id, style } = elementConfig || {};
|
|
6310
|
+
return (jsx(Container, { id: id, style: style, children: jsx(ContainerDivider, { "$bgColor": config?.options?.bgColor }) }));
|
|
6320
6311
|
});
|
|
6321
6312
|
|
|
6322
6313
|
const SlideshowContainer = memo(({ config, elementConfig, type }) => {
|
|
@@ -6326,7 +6317,7 @@ const SlideshowContainer = memo(({ config, elementConfig, type }) => {
|
|
|
6326
6317
|
elementConfig,
|
|
6327
6318
|
dataSources,
|
|
6328
6319
|
});
|
|
6329
|
-
const { id, options } = elementConfig || {};
|
|
6320
|
+
const { id, style, options } = elementConfig || {};
|
|
6330
6321
|
const { expandable, expanded } = options || {};
|
|
6331
6322
|
const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
|
|
6332
6323
|
const render = useMemo(() => getRenderElement({
|
|
@@ -6351,7 +6342,7 @@ const SlideshowContainer = memo(({ config, elementConfig, type }) => {
|
|
|
6351
6342
|
pageIndex,
|
|
6352
6343
|
type,
|
|
6353
6344
|
]);
|
|
6354
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: render }), isVisible && (jsxs(Container, { style:
|
|
6345
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: render }), isVisible && (jsxs(Container, { style: style, children: [jsx(ContainerAlias, { hasBottomMargin: true, children: render({ id: "alias" }) }), jsx(ContainerValue, { children: render({
|
|
6355
6346
|
id: "slideshow",
|
|
6356
6347
|
wrap: false,
|
|
6357
6348
|
}) })] }))] }));
|
|
@@ -6362,7 +6353,7 @@ const CameraContainer = memo(({ elementConfig, type, renderElement }) => {
|
|
|
6362
6353
|
const { id, options, style } = elementConfig || {};
|
|
6363
6354
|
const { expandable, expanded } = options || {};
|
|
6364
6355
|
const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
|
|
6365
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxs(Container, { style: style, children: [jsx(ContainerAlias, { hasBottomMargin: true, children: renderElement({ id: "alias" }) }), jsx(ContainerValue, { children: renderElement({ id: "value", wrap: false }) })] }))] }));
|
|
6356
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxs(Container, { id: id, style: style, children: [jsx(ContainerAlias, { hasBottomMargin: true, children: renderElement({ id: "alias" }) }), jsx(ContainerValue, { children: renderElement({ id: "value", wrap: false }) })] }))] }));
|
|
6366
6357
|
});
|
|
6367
6358
|
|
|
6368
6359
|
const TabAnchor = styled.div `
|
|
@@ -6446,7 +6437,7 @@ const SwiperContainer = styled.div `
|
|
|
6446
6437
|
const TabsContainer = memo(({ elementConfig, type }) => {
|
|
6447
6438
|
const { palette } = useTheme();
|
|
6448
6439
|
const { selectedTabId, setSelectedTabId } = useWidgetContext(type);
|
|
6449
|
-
const { options, style, children: tabs } = elementConfig || {};
|
|
6440
|
+
const { id, options, style, children: tabs } = elementConfig || {};
|
|
6450
6441
|
const { radius, column, bgColor, noBg, onlyIcon, shownItems, maxLength = 12 } = options || {};
|
|
6451
6442
|
const renderIcon = useCallback((icon, active) => {
|
|
6452
6443
|
if (!icon)
|
|
@@ -6464,7 +6455,7 @@ const TabsContainer = memo(({ elementConfig, type }) => {
|
|
|
6464
6455
|
setSelectedTabId(tabs[0].id);
|
|
6465
6456
|
}
|
|
6466
6457
|
}, []);
|
|
6467
|
-
return (jsx(SwiperContainer, { style: style, children: jsx(Swiper, { spaceBetween: 0, slidesPerView: shownItems || 2, children: tabs.map(({ id, value, options: tabOptions }) => (jsxs(SwiperSlide, { children: [jsxs(TabContainer, { href: `#${id}`, active: selectedTabId === id, column: column, bgColor: bgColor, noBg: noBg, radius: radius, onlyIcon: onlyIcon, hasIcon: !!tabOptions?.icon, onClick: () => onClick(id), children: [renderIcon(tabOptions?.icon, selectedTabId === id), !onlyIcon && (jsx(TabValue, { children: jsx(TextTrim, { maxLength: maxLength, children: value }) }))] }), jsx(TabAnchor, { id: id })] }, id))) }) }));
|
|
6458
|
+
return (jsx(SwiperContainer, { id: id, style: style, children: jsx(Swiper, { spaceBetween: 0, slidesPerView: shownItems || 2, children: tabs.map(({ id, value, options: tabOptions }) => (jsxs(SwiperSlide, { children: [jsxs(TabContainer, { href: `#${id}`, active: selectedTabId === id, column: column, bgColor: bgColor, noBg: noBg, radius: radius, onlyIcon: onlyIcon, hasIcon: !!tabOptions?.icon, onClick: () => onClick(id), children: [renderIcon(tabOptions?.icon, selectedTabId === id), !onlyIcon && (jsx(TabValue, { children: jsx(TextTrim, { maxLength: maxLength, children: value }) }))] }), jsx(TabAnchor, { id: id })] }, id))) }) }));
|
|
6468
6459
|
});
|
|
6469
6460
|
|
|
6470
6461
|
const ContainerIconValue = styled(Flex) ``;
|
|
@@ -6570,7 +6561,7 @@ const RoundedBackgroundContainer = memo(({ type, elementConfig, feature, renderE
|
|
|
6570
6561
|
dataSources,
|
|
6571
6562
|
feature
|
|
6572
6563
|
});
|
|
6573
|
-
const { options, style, children } = elementConfig || {};
|
|
6564
|
+
const { id, options, style, children } = elementConfig || {};
|
|
6574
6565
|
const { maxLength, center, fontColor, innerTemplateStyle, inlineUnits, big, bigIcon, hideEmpty, colorAttribute } = options || {};
|
|
6575
6566
|
const iconElement = children?.find(({ id }) => id === "icon");
|
|
6576
6567
|
const aliasElement = children?.find(({ id }) => id === "alias");
|
|
@@ -6594,12 +6585,12 @@ const RoundedBackgroundContainer = memo(({ type, elementConfig, feature, renderE
|
|
|
6594
6585
|
const renderValue = useMemo(() => isNil(value) ? null : (jsxs(ContainerValue, { style: valueElement?.style, big: true, children: [value, !!unitsElement && (jsx(ContainerUnits, { style: unitsElement?.style, children: renderElement({ id: "units" }) }))] })), [valueElement?.style, value, unitsElement, renderElement]);
|
|
6595
6586
|
if (isNil(value) && hideEmpty)
|
|
6596
6587
|
return null;
|
|
6597
|
-
return (jsxs(RoundedBackgroundContainerWrapper, { style: innerTemplateStyle || style, "$center": center, "$color": color, "$inlineUnits": inlineUnits, "$big": big, "$bigIcon": bigIcon, children: [jsxs(ContainerIconValue, { children: [renderIcon, big ? renderAlias : renderValue] }), big ? renderValue : renderAlias] }));
|
|
6588
|
+
return (jsxs(RoundedBackgroundContainerWrapper, { id: id, style: innerTemplateStyle || style, "$center": center, "$color": color, "$inlineUnits": inlineUnits, "$big": big, "$bigIcon": bigIcon, children: [jsxs(ContainerIconValue, { children: [renderIcon, big ? renderAlias : renderValue] }), big ? renderValue : renderAlias] }));
|
|
6598
6589
|
});
|
|
6599
6590
|
|
|
6600
6591
|
const AddFeatureContainer = memo(({ elementConfig }) => {
|
|
6601
|
-
const { children, style } = elementConfig || {};
|
|
6602
|
-
return (jsx(Container, { style: style, children: children
|
|
6592
|
+
const { id, children, style } = elementConfig || {};
|
|
6593
|
+
return (jsx(Container, { id: id, style: style, children: children
|
|
6603
6594
|
.filter(({ type }) => type === "button")
|
|
6604
6595
|
.map(({ options }, index) => (jsx(AddFeatureButton, { icon: options?.icon, title: options?.title, layerName: options?.layerName, geometryType: options?.geometryType }, index))) }));
|
|
6605
6596
|
});
|
|
@@ -6633,15 +6624,15 @@ const LayersContainer = memo(({ type, elementConfig, renderElement }) => {
|
|
|
6633
6624
|
return currentPage.layers;
|
|
6634
6625
|
return currentPage.layers.filter(({ name }) => layerNames.includes(name));
|
|
6635
6626
|
}, [currentPage?.layers, layerNames]);
|
|
6636
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsx(LayersContainerWrapper, { style: style, children: jsx(LayerTree, { layers: layers, onlyMainTools: true }) }))] }));
|
|
6627
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsx(LayersContainerWrapper, { id: id, style: style, children: jsx(LayerTree, { layers: layers, onlyMainTools: true }) }))] }));
|
|
6637
6628
|
});
|
|
6638
6629
|
|
|
6639
6630
|
const ExportPdfContainer = memo(({ type, elementConfig }) => {
|
|
6640
6631
|
const { t } = useGlobalContext();
|
|
6641
6632
|
const { loading, onExport } = useExportPdf(getRootElementId(type));
|
|
6642
|
-
const { style, options } = elementConfig || {};
|
|
6633
|
+
const { id, style, options } = elementConfig || {};
|
|
6643
6634
|
const { icon, title } = options || {};
|
|
6644
|
-
return (jsx(Container, { children: jsx(IconButton, { kind: icon || "download", primary: true, disabled: loading,
|
|
6635
|
+
return (jsx(Container, { id: id, style: style, children: jsx(IconButton, { kind: icon || "download", primary: true, disabled: loading, onClick: onExport, children: title ?? t("downloadPdf", { ns: "dashboard", defaultValue: "Скачать PDF" }) }) }));
|
|
6645
6636
|
});
|
|
6646
6637
|
|
|
6647
6638
|
const containerComponents = {
|
|
@@ -6652,7 +6643,6 @@ const containerComponents = {
|
|
|
6652
6643
|
[ContainerTemplate.RoundedBackground]: RoundedBackgroundContainer,
|
|
6653
6644
|
[ContainerTemplate.OneColumn]: OneColumnContainer,
|
|
6654
6645
|
[ContainerTemplate.TwoColumn]: TwoColumnContainer,
|
|
6655
|
-
[ContainerTemplate.TwoColumnsInner]: TwoColumnsInnerContainer,
|
|
6656
6646
|
[ContainerTemplate.DataSource]: DataSourceContainer,
|
|
6657
6647
|
[ContainerTemplate.DataSourceProgress]: DataSourceProgressContainer,
|
|
6658
6648
|
[ContainerTemplate.Progress]: ProgressContainer,
|
|
@@ -10092,7 +10082,7 @@ const ContainerChildren = memo(({ items, isColumn, isMain, renderElement }) => {
|
|
|
10092
10082
|
index,
|
|
10093
10083
|
wrap: isColumn || isMain,
|
|
10094
10084
|
});
|
|
10095
|
-
return isMain ? (jsx(ContainerWrapper, { id: item.id, "data-templatename": item.templateName, children: jsx(DashboardWrapper, { children: render }) }, index)) : (jsx(
|
|
10085
|
+
return isMain ? (jsx(ContainerWrapper, { id: item.id, "data-templatename": item.templateName, children: jsx(DashboardWrapper, { children: render }) }, index)) : (jsx(Fragment, { children: render }, index));
|
|
10096
10086
|
}) }));
|
|
10097
10087
|
});
|
|
10098
10088
|
|
|
@@ -10581,5 +10571,5 @@ const Map$1 = ({ zIndex, lowerSiblings, upperSiblings, onError, children, ...res
|
|
|
10581
10571
|
}, children: children }), upperSiblings] }));
|
|
10582
10572
|
};
|
|
10583
10573
|
|
|
10584
|
-
export { AddFeatureButton, AddFeatureContainer, AttributeGalleryContainer, AttributeLabel, BaseMapTheme, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, ContainerChildren, ContainerLoading, ContainerTemplate, ContainerWrapper, ContainersGroupContainer, DEFAULT_ATTRIBUTE_NAME, DEFAULT_BARCHART_RADIUS, DEFAULT_BASE_MAP, DEFAULT_CHART_ANGLE, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CIRCLE_PAINT, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DATA_SOURCE_LIMIT, DEFAULT_FILL_EXTRUSION_PAINT, DEFAULT_FILL_PAINT, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LAT, DEFAULT_LINE_PAINT, DEFAULT_LNG, DEFAULT_PAGES_CONFIG, DEFAULT_PIECHART_RADIUS, DEFAULT_ZOOM, Dashboard, DashboardCheckbox, DashboardChip, DashboardContent, DashboardContext, DashboardDefaultHeader, DashboardHeader, DashboardLoading, DashboardPlaceholder, DashboardPlaceholderWrap, DashboardProvider, DashboardWrapper, DataSourceContainer, DataSourceError, DataSourceErrorContainer, DataSourceInnerContainer, DataSourceProgressContainer, DateFormat, DefaultAttributesContainer, DefaultHeaderContainer, DefaultHeaderWrapper, DividerContainer, EditGeometryType, ElementButton, ElementCamera, ElementChart, ElementChips, ElementIcon, ElementImage, ElementLegend, ElementLink, ElementMarkdown, ElementSlideshow, ElementSvg, ElementTooltip, ElementValueWrapper, ExpandableTitle, FEATURE_CARD_DEFAULT_COLORS, FEATURE_CARD_OTHER_COLOR, FILTERED_VALUE_OPACITY, FILTER_PREFIX, FeatureCardButtons, FeatureCardContext, FeatureCardDefaultHeader, FeatureCardGradientHeader, FeatureCardHeader, FeatureCardIconHeader, FeatureCardProvider, FeatureCardSlideshowHeader, FeatureCardTitle, FeatureControls, FeatureTitleContainer, FiltersContainer, GEOMETRY_ATTRIBUTE, GlobalContext, GlobalProvider, Header, HeaderContainer, HeaderFrontView, HeaderTemplate, HeaderTitleContainer, HiddenTitleItems, IconContainer, ImageContainer,
|
|
10574
|
+
export { AddFeatureButton, AddFeatureContainer, AttributeGalleryContainer, AttributeLabel, BaseMapTheme, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, ContainerChildren, ContainerLoading, ContainerTemplate, ContainerWrapper, ContainersGroupContainer, DEFAULT_ATTRIBUTE_NAME, DEFAULT_BARCHART_RADIUS, DEFAULT_BASE_MAP, DEFAULT_CHART_ANGLE, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CIRCLE_PAINT, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DATA_SOURCE_LIMIT, DEFAULT_FILL_EXTRUSION_PAINT, DEFAULT_FILL_PAINT, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LAT, DEFAULT_LINE_PAINT, DEFAULT_LNG, DEFAULT_PAGES_CONFIG, DEFAULT_PIECHART_RADIUS, DEFAULT_ZOOM, Dashboard, DashboardCheckbox, DashboardChip, DashboardContent, DashboardContext, DashboardDefaultHeader, DashboardHeader, DashboardLoading, DashboardPlaceholder, DashboardPlaceholderWrap, DashboardProvider, DashboardWrapper, DataSourceContainer, DataSourceError, DataSourceErrorContainer, DataSourceInnerContainer, DataSourceProgressContainer, DateFormat, DefaultAttributesContainer, DefaultHeaderContainer, DefaultHeaderWrapper, DividerContainer, EditGeometryType, ElementButton, ElementCamera, ElementChart, ElementChips, ElementIcon, ElementImage, ElementLegend, ElementLink, ElementMarkdown, ElementSlideshow, ElementSvg, ElementTooltip, ElementValueWrapper, ExpandableTitle, FEATURE_CARD_DEFAULT_COLORS, FEATURE_CARD_OTHER_COLOR, FILTERED_VALUE_OPACITY, FILTER_PREFIX, FeatureCardButtons, FeatureCardContext, FeatureCardDefaultHeader, FeatureCardGradientHeader, FeatureCardHeader, FeatureCardIconHeader, FeatureCardProvider, FeatureCardSlideshowHeader, FeatureCardTitle, FeatureControls, FeatureTitleContainer, FiltersContainer, GEOMETRY_ATTRIBUTE, GlobalContext, GlobalProvider, Header, HeaderContainer, HeaderFrontView, HeaderTemplate, HeaderTitleContainer, HiddenTitleItems, IconContainer, ImageContainer, LEFT_PANEL_HEADER_HEIGHT, Layer, LayerDescription, LayerGroup, LayerGroupList, LayerIcon, LayerListContainer, LayerTree, LayersContainer, LayersListWrapper, LinearProgressContainer, LogoContainer, MAX_CHART_WIDTH, Map$1 as Map, MapContext, MapProvider, NO_CONTENT_VALUE, NUMERIC_ATTRIBUTE_TYPES, NoLiveSnapshotContainer, OneColumnContainer, PageNavigator, PageTitle, PagesContainer, Pagination, PresentationHeader, PresentationHeaderButtons, PresentationHeaderTools, PresentationPanelContainer, PresentationPanelWrapper, PresentationWrapper, ProgressContainer, RoundedBackgroundContainer, ScalingFactor, ServerNotificationsContext, ServerNotificationsProvider, SlideshowContainer, SmallPreviewContainer$1 as SmallPreviewContainer, SmallPreviewControl, SmallPreviewCounter, SmallPreviewImages, SmallPreviewLeft, SmallPreviewRight, StackBar, SvgImage, TIME_ZONE_FORMAT, TabsContainer, TextTrim, ThemeName, TitleContainer, TmsType, TopContainer, TopContainerButtons, TwoColumnContainer, WidgetType, addDataSource, addDataSources, applyFiltersToCondition, applyQueryFilters, applyVarsToCondition, checkEqualOrIncludes, checkIsLoading, convertSpToTurfFeature, createConfigLayer, createConfigPage, createNewPageId, createTreeNode, dateOptions, debounce, decimalOpacityToHex, eqlParametersToPayload, findAttributeInExpression, formatArea, formatAttributeValue, formatChartRelatedValue, formatConditionValue, formatDataSourceCondition, formatDate$1 as formatDate, formatElementValue, formatLength, formatNumber, formatPolygonMeasure, getActualExtrusionHeight, getAttributeByName, getAttributeValue, getAttributesConfiguration, getChartAxes, getChartFilterName, getChartMarkers, getConfigFilter, getContainerComponent, getDashboardHeader, getDataFromAttributes, getDataFromRelatedFeatures, getDataSource, getDataSourceFilterValue, getDate, getDefaultConfig, getElementValue, getFeatureAttributes, getFeatureCardHeader, getFilterComponent, getFilterSelectedItems, getFilterValue, getFormattedAttributes, getGradientColors, getLayerDefinition, getLayerInfo, getLayerInfoFromDataSources, getPagesFromConfig, getPagesFromProjectInfo, getProxyService, getRelatedAttribute, getRenderElement, getResourceUrl, getRootElementId, getSelectedFilterValue, getSlideshowImages, getSvgUrl, getTotalFromAttributes, getTotalFromRelatedFeatures, hexToRgba, isCompositeLayerConfiguration, isEmptyElementValue, isEmptyValue, isHiddenEmptyValue, isLayerService, isNotValidSelectedTab, isNumeric, isObject, isProxyService, isVisibleContainer, numberOptions, parseClientStyle, pieChartTooltipFromAttributes, pieChartTooltipFromRelatedFeatures, pointOptions, removeDataSource, rgbToHex, roundTotalSum, sliceShownOtherItems, timeOptions, tooltipNameFromAttributes, tooltipValueFromAttributes, tooltipValueFromRelatedFeatures, transparentizeColor, treeNodesToProjectItems, useAppHeight, useChartChange, useChartData, useDashboardHeader, useDataSources, useDebouncedCallback, useDiffPage, useExpandableContainers, useExportPdf, useGetConfigLayer, useGlobalContext, useHeaderRender, useLayerParams, useMapContext, useMapDraw, useProjectDashboardInit, useRedrawLayer, useRelatedDataSourceAttributes, useRenderElement, useServerNotificationsContext, useShownOtherItems, useToggle, useUpdateDataSource, useWidgetConfig, useWidgetContext, useWidgetFilters, useWidgetPage, useWindowResize, useZoomToFeatures, useZoomToPoint };
|
|
10585
10575
|
//# sourceMappingURL=react.esm.js.map
|