@evergis/react 4.0.55 → 4.0.56
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/styled.d.ts +6 -1
- package/dist/components/Dashboard/elements/registry.d.ts +0 -1
- package/dist/components/Dashboard/headers/FeatureCardDefaultHeader/styled.d.ts +1 -1
- package/dist/components/Dashboard/headers/FeatureCardGradientHeader/styled.d.ts +4 -0
- package/dist/components/Dashboard/headers/components/HeaderLayerIcon.d.ts +2 -0
- package/dist/components/Dashboard/headers/components/styled.d.ts +1 -0
- package/dist/components/Dashboard/headers/index.d.ts +0 -1
- package/dist/components/Dashboard/types.d.ts +2 -2
- package/dist/components/Dashboard/utils/getThemeByName.d.ts +2 -0
- package/dist/components/Dashboard/utils/index.d.ts +1 -0
- package/dist/index.js +89 -111
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +90 -112
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/Dashboard/elements/ElementLayerName/index.d.ts +0 -3
- package/dist/components/Dashboard/headers/FeatureCardIconHeader/index.d.ts +0 -3
- package/dist/components/Dashboard/headers/FeatureCardIconHeader/styled.d.ts +0 -7
- /package/dist/components/Dashboard/headers/{FeatureCardDefaultHeader/components → components}/HeaderTitle.d.ts +0 -0
package/dist/react.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
|
-
import { IconButton, Flex, transition, Chip, Icon, Description, FlexSpan, IconToggle, Popup, Menu, DraggableTree, shadows, Divider, LegendToggler, Tooltip as Tooltip$1, DropdownField, MultiSelectContainer, IconButtonButton, FlatButton, DraggableTreeContainer, Dialog, DialogTitle, ThemeProvider, darkTheme, DialogContent, CircularProgress, Switch, AutoComplete, Input, Slider, Dropdown, Checkbox, DatePicker, getLocale, IconToggleButton, LinearProgress, ActionsGroup, DialogActions, RaisedButton, Preview, H2,
|
|
2
|
+
import { IconButton, Flex, transition, Chip, Icon, Description, FlexSpan, IconToggle, Popup, Menu, DraggableTree, shadows, Divider, LegendToggler, Tooltip as Tooltip$1, DropdownField, MultiSelectContainer, IconButtonButton, FlatButton, DraggableTreeContainer, Dialog, DialogTitle, ThemeProvider, darkTheme, DialogContent, CircularProgress, Switch, AutoComplete, Input, Slider, Dropdown, Checkbox, DatePicker, getLocale, IconToggleButton, LinearProgress, ActionsGroup, DialogActions, RaisedButton, Preview, H2, Blank, Popover, UploaderItemArea, UploaderTitleWrapper, Uploader, NumberRangeSlider, useAsyncAutocomplete, RangeNumberInput, defaultTheme, dateFormat } from '@evergis/uilib-gl';
|
|
3
3
|
import { useState, useMemo, useCallback, createContext, memo, useRef, useEffect, useContext, Fragment } from 'react';
|
|
4
4
|
import styled, { createGlobalStyle, css, useTheme } from 'styled-components';
|
|
5
5
|
import { lineChartClassNames, BarChart as BarChart$1, barChartClassNames, LineChart, PieChart } from '@evergis/charts';
|
|
@@ -3404,7 +3404,6 @@ var HeaderTemplate;
|
|
|
3404
3404
|
HeaderTemplate["Default"] = "Default";
|
|
3405
3405
|
HeaderTemplate["Slideshow"] = "Slideshow";
|
|
3406
3406
|
HeaderTemplate["Gradient"] = "Gradient";
|
|
3407
|
-
HeaderTemplate["Icon"] = "Icon";
|
|
3408
3407
|
})(HeaderTemplate || (HeaderTemplate = {}));
|
|
3409
3408
|
var WidgetType;
|
|
3410
3409
|
(function (WidgetType) {
|
|
@@ -6032,8 +6031,7 @@ const SvgContainer$1 = styled.div `
|
|
|
6032
6031
|
}
|
|
6033
6032
|
}
|
|
6034
6033
|
`;
|
|
6035
|
-
const TwoColumnContainerWrapper = styled(
|
|
6036
|
-
width: 100%;
|
|
6034
|
+
const TwoColumnContainerWrapper = styled(Container) `
|
|
6037
6035
|
flex-direction: row;
|
|
6038
6036
|
flex-wrap: nowrap;
|
|
6039
6037
|
align-items: center;
|
|
@@ -6107,7 +6105,6 @@ const useRenderContainer = ({ elementConfig, type, renderElement, renderBody, })
|
|
|
6107
6105
|
if (OverrideContainer) {
|
|
6108
6106
|
const itemConfig = {
|
|
6109
6107
|
...elementConfig,
|
|
6110
|
-
style: { ...BASE_CONTAINER_STYLE, ...elementConfig.style },
|
|
6111
6108
|
children: (elementConfig?.children ?? []).map(child => ({
|
|
6112
6109
|
...child,
|
|
6113
6110
|
attributeName: attribute,
|
|
@@ -6136,7 +6133,7 @@ const OneColumnContainer = memo(({ type, elementConfig, renderElement }) => {
|
|
|
6136
6133
|
});
|
|
6137
6134
|
|
|
6138
6135
|
const TwoColumnContainer = memo(({ elementConfig, type, renderElement }) => {
|
|
6139
|
-
const renderBody = useCallback(({ id, value, style, hasIcon, hasUnits, render }
|
|
6136
|
+
const renderBody = useCallback(({ id, value, style, hasIcon, hasUnits, render }) => (jsxs(TwoColumnContainerWrapper, { id: id, style: style, children: [jsxs(ContainerAlias, { children: [hasIcon && (jsx(ContainerAliasIcon, { children: render({ id: "icon" }) })), render({ id: "alias" }), render({ id: "tooltip" }), render({ id: "modal" })] }), jsxs(ContainerValue, { big: true, children: [value, hasUnits && (jsx(ContainerUnits, { children: render({ id: "units" }) }))] })] })), []);
|
|
6140
6137
|
const { renderContainer, attributesToRender } = useRenderContainer({
|
|
6141
6138
|
type,
|
|
6142
6139
|
elementConfig,
|
|
@@ -8449,10 +8446,10 @@ const AttachmentContainer = memo(({ type, elementConfig, renderElement }) => {
|
|
|
8449
8446
|
const handleClosePreview = useCallback(() => setPreviewIndex(null), []);
|
|
8450
8447
|
const handleShowMore = useCallback(() => setShowMore(true), [setShowMore]);
|
|
8451
8448
|
const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
|
|
8452
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8449
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsx(Container, { id: id, style: { ...BASE_CONTAINER_STYLE, ...style }, children: jsxs(Flex, { column: true, children: [jsx(AttachmentsHeader, { alias: renderElement?.({ id: "alias" }), count: items.length, viewMode: viewMode, onChangeViewMode: setViewMode }), jsx(AttachmentsContent, { children: viewMode === "grid" ? (jsx(AttachmentsGrid, { items: visibleItems, isEdit: false, onPreview: handlePreview })) : (jsx(AttachmentsList, { items: visibleItems, isEdit: false, onPreview: handlePreview })) }), hasMore && !showMore && (jsx(ShowMoreButton, { hiddenCount: hiddenCount, onClick: handleShowMore })), previewIndex !== null && (jsx(Preview, { images: orderedPreviewImages, isOpen: previewIndex !== null, onClose: handleClosePreview, errorTitleText: t("attachments.resourceUnavailable", {
|
|
8450
|
+
ns: "common",
|
|
8451
|
+
defaultValue: "Ресурс недоступен",
|
|
8452
|
+
}) }))] }) }))] }));
|
|
8456
8453
|
});
|
|
8457
8454
|
|
|
8458
8455
|
const ContainerDivider = styled(Divider) `
|
|
@@ -8673,17 +8670,17 @@ const HeaderFrontView = styled(Flex) `
|
|
|
8673
8670
|
width: 100%;
|
|
8674
8671
|
font: ${({ theme: { fonts } }) => fonts.subtitle};
|
|
8675
8672
|
`;
|
|
8676
|
-
const HeaderContainer = styled(
|
|
8673
|
+
const HeaderContainer = styled(Flex) `
|
|
8677
8674
|
display: flex;
|
|
8678
8675
|
flex-grow: 1;
|
|
8679
8676
|
flex-wrap: nowrap;
|
|
8680
|
-
width: calc(100% -
|
|
8677
|
+
width: calc(100% - 3rem);
|
|
8681
8678
|
`;
|
|
8682
8679
|
const FeatureTitleContainer = styled.div `
|
|
8683
8680
|
display: -webkit-box;
|
|
8684
8681
|
max-width: 100%;
|
|
8685
8682
|
width: 100%;
|
|
8686
|
-
margin: 0.5rem
|
|
8683
|
+
margin-top: 0.5rem;
|
|
8687
8684
|
-webkit-line-clamp: 2;
|
|
8688
8685
|
-webkit-box-orient: vertical;
|
|
8689
8686
|
overflow: hidden;
|
|
@@ -8739,6 +8736,10 @@ const Header = styled(Flex) `
|
|
|
8739
8736
|
${({ $isRow }) => $isRow && RowHeaderMixin};
|
|
8740
8737
|
`;
|
|
8741
8738
|
const DefaultHeaderWrapper = styled.div `
|
|
8739
|
+
padding: 1rem 0 0 1rem;
|
|
8740
|
+
margin: -1rem 0 0 -1rem;
|
|
8741
|
+
background: url(${img$4}) 50% -2rem no-repeat;
|
|
8742
|
+
|
|
8742
8743
|
${Header} {
|
|
8743
8744
|
padding: 0 1.5rem 1.5rem 0;
|
|
8744
8745
|
}
|
|
@@ -8765,7 +8766,7 @@ const HeaderTitle = ({ noFeature }) => {
|
|
|
8765
8766
|
stringFormat: layerDefinitionAttribute.stringFormat,
|
|
8766
8767
|
})) ||
|
|
8767
8768
|
feature?.id);
|
|
8768
|
-
}, [attributes,
|
|
8769
|
+
}, [configuration, attributes, t, feature?.id]);
|
|
8769
8770
|
return (jsxs(HeaderTitleContainer, { children: [noFeature ? (jsx(FeatureTitleContainer, { children: t("noObjectFound", { ns: "dashboard", defaultValue: "Объектов не найдено" }) })) : (jsx(FeatureTitleContainer, { clickable: true, children: jsx(Tooltip$1, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard", defaultValue: "Приблизить к объекту" }), delay: [600, 0], children: ref => (jsx(FlexSpan, { ref: ref, onClick: () => zoomToFeatures([feature]), children: resultTitle })) }) })), jsx(LayerDescription, { title: resultDescription, children: resultDescription })] }));
|
|
8770
8771
|
};
|
|
8771
8772
|
|
|
@@ -8824,81 +8825,14 @@ const LayerIcon = ({ layerInfo, error }) => {
|
|
|
8824
8825
|
};
|
|
8825
8826
|
|
|
8826
8827
|
const FeatureCardDefaultHeader = ({ noFeature }) => {
|
|
8827
|
-
const { layerInfo } = useWidgetContext(WidgetType.FeatureCard);
|
|
8828
|
-
return (jsx(DefaultHeaderWrapper, { children: jsx(Header, { "$isRow": true, children: jsxs(HeaderFrontView, { isDefault: true, children: [jsxs(HeaderContainer, { children: [!!layerInfo?.name && jsx(LayerIcon, { layerInfo: layerInfo }), jsx(HeaderTitle, { noFeature: noFeature })] }), jsx(FeatureCardButtons, {})] }) }) }));
|
|
8829
|
-
};
|
|
8830
|
-
|
|
8831
|
-
const HeaderFontColorMixin$1 = css `
|
|
8832
|
-
${HeaderTitleContainer}, ${LayerDescription} {
|
|
8833
|
-
color: ${({ $fontColor }) => $fontColor};
|
|
8834
|
-
}
|
|
8835
|
-
`;
|
|
8836
|
-
const HeaderWrapperMixin$1 = css `
|
|
8837
|
-
${Header} {
|
|
8838
|
-
min-height: 5.25rem;
|
|
8839
|
-
}
|
|
8840
|
-
|
|
8841
|
-
${HeaderContainer} {
|
|
8842
|
-
max-width: 100%;
|
|
8843
|
-
width: 100%;
|
|
8844
|
-
}
|
|
8845
|
-
|
|
8846
|
-
${FeatureControls} {
|
|
8847
|
-
max-width: calc(100% - 2rem);
|
|
8848
|
-
width: calc(100% - 2rem);
|
|
8849
|
-
margin-top: -0.5rem;
|
|
8850
|
-
padding-top: 1rem;
|
|
8851
|
-
border-radius: ${({ theme: { borderRadius } }) => borderRadius.medium};
|
|
8852
|
-
}
|
|
8853
|
-
|
|
8854
|
-
${({ $fontColor }) => !!$fontColor && HeaderFontColorMixin$1};
|
|
8855
|
-
`;
|
|
8856
|
-
const GradientHeaderWrapper = styled.div `
|
|
8857
|
-
${Header} {
|
|
8858
|
-
background: ${({ $bgColor }) => $bgColor || "radial-gradient(129.21% 133.22% at 51.94% 0%, #e8fffe 9.48%, #5fcaff 100%)"};
|
|
8859
|
-
}
|
|
8860
|
-
|
|
8861
|
-
${HeaderContainer} {
|
|
8862
|
-
align-items: center;
|
|
8863
|
-
}
|
|
8864
|
-
|
|
8865
|
-
${HeaderTitleContainer} {
|
|
8866
|
-
margin-left: 0;
|
|
8867
|
-
text-align: center;
|
|
8868
|
-
}
|
|
8869
|
-
|
|
8870
|
-
${FeatureTitleContainer} {
|
|
8871
|
-
text-align: center;
|
|
8872
|
-
}
|
|
8873
|
-
|
|
8874
|
-
${LayerDescription} {
|
|
8875
|
-
text-align: center;
|
|
8876
|
-
}
|
|
8877
|
-
|
|
8878
|
-
${HeaderWrapperMixin$1};
|
|
8879
|
-
`;
|
|
8880
|
-
|
|
8881
|
-
const FeatureCardGradientHeader = ({ isRow }) => {
|
|
8882
8828
|
const { layerInfo } = useWidgetContext(WidgetType.FeatureCard);
|
|
8883
8829
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
8884
8830
|
const { header } = config || {};
|
|
8885
8831
|
const { options } = header || {};
|
|
8886
|
-
const {
|
|
8887
|
-
|
|
8888
|
-
return (jsx(GradientHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, children: jsx(ThemeProvider, { theme: defaultTheme, children: jsx(Header, { "$isRow": isRow, children: jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { children: [jsx(LayerIcon, { layerInfo: layerInfo }), jsx(FeatureCardTitle, { title: renderElement({
|
|
8889
|
-
id: "title",
|
|
8890
|
-
wrap: false,
|
|
8891
|
-
}), description: renderElement({
|
|
8892
|
-
id: "description",
|
|
8893
|
-
wrap: false,
|
|
8894
|
-
}) })] }), jsx(FeatureCardButtons, {})] }) }) }) }));
|
|
8832
|
+
const { themeName } = options || {};
|
|
8833
|
+
return (jsx(DefaultHeaderWrapper, { children: jsx(ThemeProvider, { theme: getThemeByName(themeName), children: jsx(Header, { "$isRow": true, children: jsxs(HeaderFrontView, { isDefault: true, children: [jsxs(HeaderContainer, { children: [!!layerInfo?.name && jsx(LayerIcon, { layerInfo: layerInfo }), jsx(HeaderTitle, { noFeature: noFeature })] }), jsx(FeatureCardButtons, {})] }) }) }) }));
|
|
8895
8834
|
};
|
|
8896
8835
|
|
|
8897
|
-
const LayerIconClickable = styled.div `
|
|
8898
|
-
display: flex;
|
|
8899
|
-
align-items: center;
|
|
8900
|
-
cursor: pointer;
|
|
8901
|
-
`;
|
|
8902
8836
|
const HeaderFontColorMixin = css `
|
|
8903
8837
|
${HeaderTitleContainer}, ${HeaderTitleContainer} *, ${LayerDescription} {
|
|
8904
8838
|
color: ${({ $fontColor }) => $fontColor};
|
|
@@ -8928,13 +8862,18 @@ const HeaderIcon = styled(Flex) `
|
|
|
8928
8862
|
position: absolute;
|
|
8929
8863
|
top: 0;
|
|
8930
8864
|
right: 0;
|
|
8931
|
-
justify-content: flex-end;
|
|
8932
8865
|
align-items: center;
|
|
8933
|
-
|
|
8866
|
+
justify-content: center;
|
|
8867
|
+
width: 7.625rem;
|
|
8934
8868
|
height: 100%;
|
|
8935
8869
|
|
|
8936
|
-
span[kind]
|
|
8937
|
-
|
|
8870
|
+
span[kind] {
|
|
8871
|
+
width: 4rem;
|
|
8872
|
+
|
|
8873
|
+
:after {
|
|
8874
|
+
font-size: 4rem;
|
|
8875
|
+
color: rgba(255, 255, 255, 0.36);
|
|
8876
|
+
}
|
|
8938
8877
|
}
|
|
8939
8878
|
|
|
8940
8879
|
span[kind]:after,
|
|
@@ -8960,34 +8899,77 @@ const BigIconHeaderMixin = css `
|
|
|
8960
8899
|
}
|
|
8961
8900
|
}
|
|
8962
8901
|
`;
|
|
8963
|
-
const
|
|
8902
|
+
const WithPaddingHeaderMixin = css `
|
|
8964
8903
|
${Header} {
|
|
8965
|
-
width: calc(100%
|
|
8966
|
-
margin: -
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8904
|
+
width: calc(100% - 1rem);
|
|
8905
|
+
margin: -0.5rem -0.5rem 0.5rem -0.5rem;
|
|
8906
|
+
}
|
|
8907
|
+
`;
|
|
8908
|
+
const BottomBlurHeaderMixin = css `
|
|
8909
|
+
${Header} {
|
|
8910
|
+
margin-bottom: 0;
|
|
8911
|
+
|
|
8912
|
+
&::after {
|
|
8913
|
+
content: "";
|
|
8914
|
+
position: absolute;
|
|
8915
|
+
left: 0;
|
|
8916
|
+
right: 0;
|
|
8917
|
+
bottom: 0;
|
|
8918
|
+
height: 1.5rem;
|
|
8919
|
+
z-index: 11;
|
|
8920
|
+
pointer-events: none;
|
|
8921
|
+
background: ${({ theme: { palette } }) => palette.background};
|
|
8922
|
+
mask-image: linear-gradient(to top, #000 0%, transparent 100%);
|
|
8923
|
+
-webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
|
|
8924
|
+
border-radius: 0 0 0.5rem 0.5rem;
|
|
8925
|
+
}
|
|
8926
|
+
}
|
|
8927
|
+
|
|
8928
|
+
${HeaderFrontView} {
|
|
8929
|
+
z-index: 12;
|
|
8930
|
+
}
|
|
8931
|
+
`;
|
|
8932
|
+
const GradientHeaderWrapper = styled.div `
|
|
8933
|
+
${Header} {
|
|
8934
|
+
margin: -1rem -1rem 1rem -1rem;
|
|
8935
|
+
padding: 1rem 1.5rem;
|
|
8936
|
+
border-radius: 0.5rem;
|
|
8970
8937
|
background: ${({ $bgColor }) => $bgColor || "linear-gradient(96.55deg, #FFFCD3 0%, #B4DC47 100%)"};
|
|
8938
|
+
overflow: hidden;
|
|
8971
8939
|
}
|
|
8972
8940
|
|
|
8973
8941
|
${HeaderWrapperMixin};
|
|
8974
8942
|
|
|
8975
8943
|
${({ $bigIcon }) => $bigIcon && BigIconHeaderMixin};
|
|
8944
|
+
|
|
8945
|
+
${({ $withPadding }) => $withPadding && WithPaddingHeaderMixin};
|
|
8946
|
+
|
|
8947
|
+
${({ $bottomBlur }) => $bottomBlur && BottomBlurHeaderMixin};
|
|
8976
8948
|
`;
|
|
8977
8949
|
|
|
8978
|
-
const
|
|
8950
|
+
const LayerIconClickable = styled.div `
|
|
8951
|
+
display: flex;
|
|
8952
|
+
align-items: center;
|
|
8953
|
+
cursor: pointer;
|
|
8954
|
+
`;
|
|
8955
|
+
|
|
8956
|
+
const HeaderLayerIcon = () => {
|
|
8979
8957
|
const { t } = useGlobalContext();
|
|
8980
8958
|
const { layerInfo, feature } = useWidgetContext(WidgetType.FeatureCard);
|
|
8981
|
-
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
8982
8959
|
const zoomToFeatures = useZoomToFeatures();
|
|
8983
8960
|
const getMaxZoomTo = useMaxZoomTo();
|
|
8984
8961
|
const [optionsMaxZoomTo, layerMaxZoomTo] = useMemo(() => getMaxZoomTo(layerInfo?.name), [layerInfo?.name, getMaxZoomTo]);
|
|
8962
|
+
const handleIconClick = useCallback(() => zoomToFeatures([feature], { maxZoom: layerMaxZoomTo ?? optionsMaxZoomTo }), [zoomToFeatures, feature, layerMaxZoomTo, optionsMaxZoomTo]);
|
|
8963
|
+
return (jsx(Tooltip$1, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard", defaultValue: "Приблизить к объекту" }), delay: [600, 0], children: ref => (jsx(LayerIconClickable, { ref: ref, onClick: handleIconClick, children: jsx(LayerIcon, { layerInfo: layerInfo }) })) }));
|
|
8964
|
+
};
|
|
8965
|
+
|
|
8966
|
+
const FeatureCardGradientHeader = ({ isRow }) => {
|
|
8967
|
+
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
8985
8968
|
const { header } = config || {};
|
|
8986
8969
|
const { options } = header || {};
|
|
8987
|
-
const { fontColor, bgColor, bigIcon } = options || {};
|
|
8970
|
+
const { fontColor, bgColor, bigIcon, withPadding, bottomBlur, themeName } = options || {};
|
|
8988
8971
|
const renderElement = useHeaderRender(header);
|
|
8989
|
-
|
|
8990
|
-
return (jsx(IconHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, "$bigIcon": bigIcon, children: jsx(ThemeProvider, { theme: defaultTheme, children: jsxs(Header, { "$isRow": isRow, children: [jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { children: [jsx(Tooltip$1, { arrow: true, placement: "top", content: t("zoomToFeature", { ns: "dashboard", defaultValue: "Приблизить к объекту" }), delay: [600, 0], children: ref => (jsx(LayerIconClickable, { ref: ref, onClick: handleIconClick, children: jsx(LayerIcon, { layerInfo: layerInfo }) })) }), jsx(FeatureCardTitle, { title: renderElement({
|
|
8972
|
+
return (jsx(GradientHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, "$bigIcon": bigIcon, "$withPadding": withPadding, "$bottomBlur": bottomBlur, children: jsx(ThemeProvider, { theme: getThemeByName(themeName), children: jsxs(Header, { "$isRow": isRow, children: [jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { column: true, children: [jsx(HeaderLayerIcon, {}), jsx(FeatureCardTitle, { title: renderElement({
|
|
8991
8973
|
id: "title",
|
|
8992
8974
|
wrap: false,
|
|
8993
8975
|
}), description: renderElement({
|
|
@@ -9858,13 +9840,12 @@ const HeaderSlideshow = styled.div `
|
|
|
9858
9840
|
`;
|
|
9859
9841
|
|
|
9860
9842
|
const FeatureCardSlideshowHeader = ({ isRow }) => {
|
|
9861
|
-
const { layerInfo } = useWidgetContext(WidgetType.FeatureCard);
|
|
9862
9843
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
9863
9844
|
const { header } = config || {};
|
|
9864
9845
|
const { options } = header || {};
|
|
9865
|
-
const { height, withPadding } = options || {};
|
|
9846
|
+
const { height, withPadding, themeName } = options || {};
|
|
9866
9847
|
const renderElement = useHeaderRender(header);
|
|
9867
|
-
return (jsx(SlideshowHeaderWrapper, { big: true, withPadding: withPadding, children: jsx(ThemeProvider, { theme:
|
|
9848
|
+
return (jsx(SlideshowHeaderWrapper, { big: true, withPadding: withPadding, children: jsx(ThemeProvider, { theme: getThemeByName(themeName), children: jsxs(Header, { "$isRow": isRow, children: [jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { column: true, children: [jsx(HeaderLayerIcon, {}), jsx(FeatureCardTitle, { title: renderElement({
|
|
9868
9849
|
id: "title",
|
|
9869
9850
|
wrap: false,
|
|
9870
9851
|
}), description: renderElement({
|
|
@@ -10200,13 +10181,6 @@ const ElementModal = memo(({ type = WidgetType.Dashboard, elementConfig }) => {
|
|
|
10200
10181
|
return (jsxs(Fragment$1, { children: [jsx(ModalIcon, { kind: icon || "new_window", onClick: handleOpen, children: title }), jsxs(Dialog, { maxWidth: maxWidth, minWidth: minWidth, minHeight: minHeight, isOpen: isOpen, modal: true, onCloseRequest: handleClose, style: { paddingBottom: "2rem" }, children: [jsx(DialogTitle, { children: jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [!!title && jsx("span", { children: title }), jsx(IconButton, { kind: "close", onClick: handleClose })] }) }), jsx(DialogContent, { children: isLoading ? (jsx(DashboardLoading, {})) : (jsx(Container, { isColumn: true, noBorders: true, children: jsx(ContainerChildren, { type: type, items: modalContent, isMain: true, renderElement: renderElement }) })) })] })] }));
|
|
10201
10182
|
});
|
|
10202
10183
|
|
|
10203
|
-
const ElementLayerName = memo(({ type }) => {
|
|
10204
|
-
const { layerInfo } = useWidgetContext(type);
|
|
10205
|
-
if (!layerInfo?.name)
|
|
10206
|
-
return null;
|
|
10207
|
-
return jsx("span", { children: layerInfo.name });
|
|
10208
|
-
});
|
|
10209
|
-
|
|
10210
10184
|
const elementComponents = {
|
|
10211
10185
|
control: ElementControl,
|
|
10212
10186
|
image: ElementImage,
|
|
@@ -10223,7 +10197,6 @@ const elementComponents = {
|
|
|
10223
10197
|
markdown: ElementMarkdown,
|
|
10224
10198
|
uploader: ElementUploader,
|
|
10225
10199
|
modal: ElementModal,
|
|
10226
|
-
layerName: ElementLayerName,
|
|
10227
10200
|
};
|
|
10228
10201
|
|
|
10229
10202
|
const getElementValue = ({ getDefaultContainer, ...props }) => {
|
|
@@ -10257,6 +10230,9 @@ const getElementValue = ({ getDefaultContainer, ...props }) => {
|
|
|
10257
10230
|
null
|
|
10258
10231
|
: null;
|
|
10259
10232
|
}
|
|
10233
|
+
if (type === "layerName") {
|
|
10234
|
+
return layerInfo?.name || "";
|
|
10235
|
+
}
|
|
10260
10236
|
const ElementComponent = type ? elementComponents[type] : null;
|
|
10261
10237
|
return ElementComponent ? (jsx(ElementComponent, { ...props })) : (getDefaultContainer?.());
|
|
10262
10238
|
};
|
|
@@ -10313,8 +10289,6 @@ const getFeatureCardHeader = (templateName) => {
|
|
|
10313
10289
|
return FeatureCardSlideshowHeader;
|
|
10314
10290
|
case HeaderTemplate.Gradient:
|
|
10315
10291
|
return FeatureCardGradientHeader;
|
|
10316
|
-
case HeaderTemplate.Icon:
|
|
10317
|
-
return FeatureCardIconHeader;
|
|
10318
10292
|
case HeaderTemplate.Default:
|
|
10319
10293
|
default:
|
|
10320
10294
|
return FeatureCardDefaultHeader;
|
|
@@ -11284,6 +11258,10 @@ const getTemplateNameFromAttribute = (attribute) => {
|
|
|
11284
11258
|
}
|
|
11285
11259
|
};
|
|
11286
11260
|
|
|
11261
|
+
const getThemeByName = (themeName) => {
|
|
11262
|
+
return themeName === ThemeName.Dark ? darkTheme : defaultTheme;
|
|
11263
|
+
};
|
|
11264
|
+
|
|
11287
11265
|
const getDisplayTemplateNameFromAttribute = (attribute) => {
|
|
11288
11266
|
if (attribute?.subType === StringSubType.Attachments) {
|
|
11289
11267
|
return ContainerTemplate.Attachment;
|
|
@@ -13378,5 +13356,5 @@ const Map$1 = ({ zIndex, lowerSiblings, upperSiblings, onError, children, ...res
|
|
|
13378
13356
|
}, children: children }), upperSiblings] }));
|
|
13379
13357
|
};
|
|
13380
13358
|
|
|
13381
|
-
export { AddFeatureButton, AddFeatureContainer, AlertIconContainer, AttachmentContainer, AttributeGalleryContainer, AttributeLabel, BASE_CONTAINER_STYLE, BaseMapTheme, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, Container, 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_DROPDOWN_WIDTH, DEFAULT_FILL_EXTRUSION_PAINT, DEFAULT_FILL_PAINT, DEFAULT_FILTER_PADDING, 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, ElementControl, 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,
|
|
13359
|
+
export { AddFeatureButton, AddFeatureContainer, AlertIconContainer, AttachmentContainer, AttributeGalleryContainer, AttributeLabel, BASE_CONTAINER_STYLE, BaseMapTheme, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, Container, 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_DROPDOWN_WIDTH, DEFAULT_FILL_EXTRUSION_PAINT, DEFAULT_FILL_PAINT, DEFAULT_FILTER_PADDING, 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, ElementControl, 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, 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, LayerIconContainer, LayerListContainer, LayerTree, LayersContainer, LayersListWrapper, LinearProgressContainer, LogTerminal, LogoContainer, MAX_CHART_WIDTH, Map$1 as Map, MapContext, MapProvider, NO_CONTENT_VALUE, NUMERIC_ATTRIBUTE_TYPES, NoLiveSnapshotContainer, OneColumnContainer, POLL_SUBTASK_INTERVAL_MS, POLL_SUBTASK_TIMEOUT_MS, PROVIDER_PREFIX, PageNavigator, PageTitle, PageTitleContainer, PagesContainer, Pagination, PresentationHeader, PresentationHeaderButtons, PresentationHeaderTools, PresentationPanelContainer, PresentationPanelWrapper, PresentationWrapper, ProgressContainer, ProviderPrefix, RoundedBackgroundContainer, SERVER_NOTIFICATION_EVENT, STACK_BAR_TOTAL_HEIGHT, ScalingFactor, ServerNotificationsContext, ServerNotificationsProvider, SlideshowContainer, SmallPreviewContainer$1 as SmallPreviewContainer, SmallPreviewControl, SmallPreviewCounter, SmallPreviewImages, SmallPreviewLeft, SmallPreviewRight, StackBar, SvgImage, TIME_ZONE_FORMAT, TabsContainer, TextTrim, ThemeName, TitleContainer, TopContainer, TopContainerButtons, TwoColumnContainer, UploadContainer, WidgetType, addDataSource, addDataSources, adjustColor, applyFiltersToCondition, applyQueryFilters, applyVarsToCondition, checkEqualOrIncludes, checkIsLoading, 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, getDisplayTemplateNameFromAttribute, getElementValue, getFeatureAttributes, getFeatureCardHeader, getFilterComponent, getFilterSelectedItems, getFilterValue, getFormattedAttributes, getGradientColors, getLayerInfo, getLayerInfoFromDataSources, getPagesFromConfig, getPagesFromProjectInfo, getProxyService, getRelatedAttribute, getRenderElement, getResourceUrl, getRootElementId, getSelectedFilterValue, getSlideshowImages, getSvgUrl, getTemplateNameFromAttribute, getThemeByName, getTotalFromAttributes, getTotalFromRelatedFeatures, hexToRgba, isEmptyElementValue, isEmptyValue, isHiddenEmptyValue, isLayerService, isNotValidSelectedTab, isNumeric, isObject, isProxyService, isVisibleContainer, metersPerPixel, numberOptions, parseClientStyle, parseIconNames, parseIconNamesFromClientStyle, pieChartTooltipFromAttributes, pieChartTooltipFromRelatedFeatures, pointOptions, removeDataSource, rgbToHex, roundTotalSum, sliceShownOtherItems, timeOptions, tooltipNameFromAttributes, tooltipValueFromAttributes, tooltipValueFromRelatedFeatures, transparentizeColor, treeNodesToProjectItems, updateDataSource, useAppHeight, useAutoCompleteControl, useChartChange, useChartData, useContainerAttributes, useCurrentPageLayers, useCustomFeatureSelect, useDashboardHeader, useDataSources, useDebouncedCallback, useDiffPage, useExpandableContainers, useExportPdf, useFetchImageWithAuth, useFetchWithAuth, useGetConfigLayer, useGlobalContext, useHeaderRender, useHideIfEmptyDataSource, useIconsFromLayers, useLayerHiddenAttributes, useLayerParams, useMapContext, useMapDraw, useMapImages, useMaxZoomTo, useProjectDashboardInit, usePythonSandbox, usePythonTask, useRedrawLayer, useRelatedDataSourceAttributes, useRenderElement, useServerNotificationsContext, useShownOtherItems, useToggle, useUpdateDataSource, useVisibleProjectItems, useWidgetConfig, useWidgetContext, useWidgetFilters, useWidgetPage, useWindowResize, useZoomToFeatures, useZoomToPoint };
|
|
13382
13360
|
//# sourceMappingURL=react.esm.js.map
|