@evergis/react 3.1.72 → 3.1.74
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/index.js +22 -15
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +22 -15
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/react.esm.js
CHANGED
|
@@ -5685,15 +5685,16 @@ const OneColumnContainer = memo(({ elementConfig, renderElement }) => {
|
|
|
5685
5685
|
const TwoColumnContainer = memo(({ config, elementConfig, type, renderElement }) => {
|
|
5686
5686
|
const { selectedTabId, layerInfo, attributes } = useWidgetContext(type);
|
|
5687
5687
|
const { attributes: renderAttributes } = elementConfig?.options || {};
|
|
5688
|
-
const renderContainer = useCallback((
|
|
5689
|
-
const { id, options, style, children } =
|
|
5688
|
+
const renderContainer = useCallback((attribute) => {
|
|
5689
|
+
const { id, options, style, children } = elementConfig || {};
|
|
5690
5690
|
const { hideEmpty, innerTemplateStyle } = options || {};
|
|
5691
5691
|
const hasUnits = children?.some(({ id }) => id === "units");
|
|
5692
5692
|
const iconIndex = children?.findIndex(({ id }) => id === "icon");
|
|
5693
5693
|
const icon = children?.[iconIndex];
|
|
5694
5694
|
const hasIcon = !!icon;
|
|
5695
|
-
const elementChildren =
|
|
5695
|
+
const elementChildren = elementConfig?.children?.map(child => ({
|
|
5696
5696
|
...child,
|
|
5697
|
+
type: "attributeValue",
|
|
5697
5698
|
attributeName: attribute,
|
|
5698
5699
|
options: { noUnits: hasUnits, ...child.options },
|
|
5699
5700
|
}));
|
|
@@ -5712,7 +5713,7 @@ const TwoColumnContainer = memo(({ config, elementConfig, type, renderElement })
|
|
|
5712
5713
|
? getRenderElement({
|
|
5713
5714
|
config,
|
|
5714
5715
|
elementConfig: {
|
|
5715
|
-
...
|
|
5716
|
+
...elementConfig,
|
|
5716
5717
|
children: elementChildren,
|
|
5717
5718
|
},
|
|
5718
5719
|
selectedTabId,
|
|
@@ -5725,8 +5726,8 @@ const TwoColumnContainer = memo(({ config, elementConfig, type, renderElement })
|
|
|
5725
5726
|
if (!value && hideEmpty)
|
|
5726
5727
|
return null;
|
|
5727
5728
|
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));
|
|
5728
|
-
}, [attributes, config, getRenderElement, layerInfo, renderElement, selectedTabId, type]);
|
|
5729
|
-
return renderAttributes?.length ? (jsx(Fragment$1, { children: renderAttributes.map(attribute => renderContainer(
|
|
5729
|
+
}, [attributes, config, getRenderElement, layerInfo, renderElement, selectedTabId, type, elementConfig]);
|
|
5730
|
+
return renderAttributes?.length ? (jsx(Fragment$1, { children: renderAttributes.map(attribute => renderContainer(attribute)) })) : (renderContainer());
|
|
5730
5731
|
});
|
|
5731
5732
|
|
|
5732
5733
|
const InnerContainerWrapper = styled.div `
|
|
@@ -7203,7 +7204,7 @@ const PageTitle = styled(H2) `
|
|
|
7203
7204
|
const DashboardDefaultHeader = memo(() => {
|
|
7204
7205
|
const { components: { ProjectCatalogMenu, ProjectPanelMenu, ProjectPagesMenu }, } = useWidgetContext();
|
|
7205
7206
|
const { pageId, image, icon, tooltip, themeName } = useDashboardHeader();
|
|
7206
|
-
return (jsxs(DefaultHeaderContainer, { image: image, isDark: themeName === ThemeName.Dark, children: [!pageId && jsx(LinearProgress, {}), jsxs(Flex, { column: true, gap: "1rem", children: [jsx(FlexSpan, { children: jsxs(TopContainer, { children: [jsx(LogoContainer, { children: icon }), jsxs(TopContainerButtons, { children: [jsx(ProjectCatalogMenu, {}), jsx(ProjectPanelMenu, {})] })] }) }), jsx(FlexSpan, { children: jsx(Flex, { column: true, gap: "0.25rem", children: jsx(FlexSpan, { children: jsxs(Flex, { alignItems: "center", children: [jsx(FlexSpan, { flexGrow: 1, children: jsx(Tooltip$1, { arrow: true, content: tooltip, children: ref => (jsx(PageTitle, { ref: ref, children: jsx(ProjectPagesMenu, {}) })) }) }), jsx(FlexSpan, { children: jsx(Pagination, {}) })] }) }) }) })] })] }));
|
|
7207
|
+
return (jsxs(DefaultHeaderContainer, { image: getResourceUrl(image), isDark: themeName === ThemeName.Dark, children: [!pageId && jsx(LinearProgress, {}), jsxs(Flex, { column: true, gap: "1rem", children: [jsx(FlexSpan, { children: jsxs(TopContainer, { children: [jsx(LogoContainer, { children: icon }), jsxs(TopContainerButtons, { children: [jsx(ProjectCatalogMenu, {}), jsx(ProjectPanelMenu, {})] })] }) }), jsx(FlexSpan, { children: jsx(Flex, { column: true, gap: "0.25rem", children: jsx(FlexSpan, { children: jsxs(Flex, { alignItems: "center", children: [jsx(FlexSpan, { flexGrow: 1, children: jsx(Tooltip$1, { arrow: true, content: tooltip, children: ref => (jsx(PageTitle, { ref: ref, children: jsx(ProjectPagesMenu, {}) })) }) }), jsx(FlexSpan, { children: jsx(Pagination, {}) })] }) }) }) })] })] }));
|
|
7207
7208
|
});
|
|
7208
7209
|
|
|
7209
7210
|
const HeaderFrontView = styled(Flex) `
|
|
@@ -7415,9 +7416,11 @@ const GradientHeaderWrapper = styled.div `
|
|
|
7415
7416
|
const FeatureCardGradientHeader = ({ isRow }) => {
|
|
7416
7417
|
const { layerInfo } = useWidgetContext(WidgetType.FeatureCard);
|
|
7417
7418
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
7418
|
-
const { header
|
|
7419
|
+
const { header } = config || {};
|
|
7420
|
+
const { options } = header || {};
|
|
7421
|
+
const { fontColor, bgColor } = options || {};
|
|
7419
7422
|
const renderElement = useHeaderRender(header);
|
|
7420
|
-
return (jsx(GradientHeaderWrapper, { "$fontColor":
|
|
7423
|
+
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({
|
|
7421
7424
|
id: "title",
|
|
7422
7425
|
wrap: false,
|
|
7423
7426
|
}), description: renderElement({
|
|
@@ -7505,9 +7508,11 @@ const IconHeaderWrapper = styled.div `
|
|
|
7505
7508
|
const FeatureCardIconHeader = ({ isRow }) => {
|
|
7506
7509
|
const { layerInfo } = useWidgetContext(WidgetType.FeatureCard);
|
|
7507
7510
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
7508
|
-
const { header
|
|
7511
|
+
const { header } = config || {};
|
|
7512
|
+
const { options } = header || {};
|
|
7513
|
+
const { fontColor, bgColor, bigIcon } = options || {};
|
|
7509
7514
|
const renderElement = useHeaderRender(header);
|
|
7510
|
-
return (jsx(IconHeaderWrapper, { "$fontColor":
|
|
7515
|
+
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(LayerIcon, { layerInfo: layerInfo }), jsx(FeatureCardTitle, { title: renderElement({
|
|
7511
7516
|
id: "title",
|
|
7512
7517
|
wrap: false,
|
|
7513
7518
|
}), description: renderElement({
|
|
@@ -8310,9 +8315,11 @@ const HeaderSlideshow = styled.div `
|
|
|
8310
8315
|
const FeatureCardSlideshowHeader = ({ isRow }) => {
|
|
8311
8316
|
const { layerInfo } = useWidgetContext(WidgetType.FeatureCard);
|
|
8312
8317
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
8313
|
-
const { header
|
|
8318
|
+
const { header } = config || {};
|
|
8319
|
+
const { options } = header || {};
|
|
8320
|
+
const { height, withPadding } = options || {};
|
|
8314
8321
|
const renderElement = useHeaderRender(header);
|
|
8315
|
-
return (jsx(SlideshowHeaderWrapper, { big: true, withPadding:
|
|
8322
|
+
return (jsx(SlideshowHeaderWrapper, { big: true, withPadding: withPadding, children: jsx(ThemeProvider, { theme: darkTheme, children: jsxs(Header, { "$isRow": isRow, children: [jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { children: [jsx(LayerIcon, { layerInfo: layerInfo }), jsx(FeatureCardTitle, { title: renderElement({
|
|
8316
8323
|
id: "title",
|
|
8317
8324
|
wrap: false,
|
|
8318
8325
|
}), description: renderElement({
|
|
@@ -8321,7 +8328,7 @@ const FeatureCardSlideshowHeader = ({ isRow }) => {
|
|
|
8321
8328
|
}) })] }), jsx(FeatureCardButtons, {})] }), jsx(ImageContainerBg, { children: renderElement({
|
|
8322
8329
|
id: "bgImage",
|
|
8323
8330
|
wrap: false,
|
|
8324
|
-
}) }), jsx(HeaderSlideshow, { height:
|
|
8331
|
+
}) }), jsx(HeaderSlideshow, { height: height, children: renderElement({
|
|
8325
8332
|
id: "slideshow",
|
|
8326
8333
|
wrap: false,
|
|
8327
8334
|
}) })] }) }) }));
|
|
@@ -10613,7 +10620,7 @@ const ContainerChildren = memo(({ type, items, isColumn, isMain, renderElement }
|
|
|
10613
10620
|
});
|
|
10614
10621
|
if (checkIfEmptyDataSource(item.options?.hideIfEmptyDataSource))
|
|
10615
10622
|
return null;
|
|
10616
|
-
return isMain ? (jsx(ContainerWrapper, { "
|
|
10623
|
+
return isMain ? (jsx(ContainerWrapper, { "$noMargin": item.options?.noMargin, children: jsx(DashboardWrapper, { children: render }) }, index)) : (jsx(Fragment, { children: render }, index));
|
|
10617
10624
|
}) }));
|
|
10618
10625
|
});
|
|
10619
10626
|
|