@evergis/react 3.1.73 → 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 +21 -14
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +21 -14
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5687,15 +5687,16 @@ const OneColumnContainer = React.memo(({ elementConfig, renderElement }) => {
|
|
|
5687
5687
|
const TwoColumnContainer = React.memo(({ config, elementConfig, type, renderElement }) => {
|
|
5688
5688
|
const { selectedTabId, layerInfo, attributes } = useWidgetContext(type);
|
|
5689
5689
|
const { attributes: renderAttributes } = elementConfig?.options || {};
|
|
5690
|
-
const renderContainer = React.useCallback((
|
|
5691
|
-
const { id, options, style, children } =
|
|
5690
|
+
const renderContainer = React.useCallback((attribute) => {
|
|
5691
|
+
const { id, options, style, children } = elementConfig || {};
|
|
5692
5692
|
const { hideEmpty, innerTemplateStyle } = options || {};
|
|
5693
5693
|
const hasUnits = children?.some(({ id }) => id === "units");
|
|
5694
5694
|
const iconIndex = children?.findIndex(({ id }) => id === "icon");
|
|
5695
5695
|
const icon = children?.[iconIndex];
|
|
5696
5696
|
const hasIcon = !!icon;
|
|
5697
|
-
const elementChildren =
|
|
5697
|
+
const elementChildren = elementConfig?.children?.map(child => ({
|
|
5698
5698
|
...child,
|
|
5699
|
+
type: "attributeValue",
|
|
5699
5700
|
attributeName: attribute,
|
|
5700
5701
|
options: { noUnits: hasUnits, ...child.options },
|
|
5701
5702
|
}));
|
|
@@ -5714,7 +5715,7 @@ const TwoColumnContainer = React.memo(({ config, elementConfig, type, renderElem
|
|
|
5714
5715
|
? getRenderElement({
|
|
5715
5716
|
config,
|
|
5716
5717
|
elementConfig: {
|
|
5717
|
-
...
|
|
5718
|
+
...elementConfig,
|
|
5718
5719
|
children: elementChildren,
|
|
5719
5720
|
},
|
|
5720
5721
|
selectedTabId,
|
|
@@ -5727,8 +5728,8 @@ const TwoColumnContainer = React.memo(({ config, elementConfig, type, renderElem
|
|
|
5727
5728
|
if (!value && hideEmpty)
|
|
5728
5729
|
return null;
|
|
5729
5730
|
return (jsxRuntime.jsxs(TwoColumnContainerWrapper, { id: id, style: innerTemplateStyle || style, children: [jsxRuntime.jsxs(ContainerAlias, { children: [hasIcon && jsxRuntime.jsx(ContainerAliasIcon, { children: render({ id: "icon" }) }), render({ id: "alias" }), render({ id: "tooltip" })] }), jsxRuntime.jsxs(ContainerValue, { big: true, children: [value, hasUnits && jsxRuntime.jsx(ContainerUnits, { children: render({ id: "units" }) })] })] }, attribute));
|
|
5730
|
-
}, [attributes, config, getRenderElement, layerInfo, renderElement, selectedTabId, type]);
|
|
5731
|
-
return renderAttributes?.length ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderAttributes.map(attribute => renderContainer(
|
|
5731
|
+
}, [attributes, config, getRenderElement, layerInfo, renderElement, selectedTabId, type, elementConfig]);
|
|
5732
|
+
return renderAttributes?.length ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderAttributes.map(attribute => renderContainer(attribute)) })) : (renderContainer());
|
|
5732
5733
|
});
|
|
5733
5734
|
|
|
5734
5735
|
const InnerContainerWrapper = styled.div `
|
|
@@ -7417,9 +7418,11 @@ const GradientHeaderWrapper = styled.div `
|
|
|
7417
7418
|
const FeatureCardGradientHeader = ({ isRow }) => {
|
|
7418
7419
|
const { layerInfo } = useWidgetContext(exports.WidgetType.FeatureCard);
|
|
7419
7420
|
const { config } = useWidgetConfig(exports.WidgetType.FeatureCard);
|
|
7420
|
-
const { header
|
|
7421
|
+
const { header } = config || {};
|
|
7422
|
+
const { options } = header || {};
|
|
7423
|
+
const { fontColor, bgColor } = options || {};
|
|
7421
7424
|
const renderElement = useHeaderRender(header);
|
|
7422
|
-
return (jsxRuntime.jsx(GradientHeaderWrapper, { "$fontColor":
|
|
7425
|
+
return (jsxRuntime.jsx(GradientHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, children: jsxRuntime.jsx(uilibGl.ThemeProvider, { theme: uilibGl.defaultTheme, children: jsxRuntime.jsx(Header, { "$isRow": isRow, children: jsxRuntime.jsxs(HeaderFrontView, { children: [jsxRuntime.jsxs(HeaderContainer, { children: [jsxRuntime.jsx(LayerIcon, { layerInfo: layerInfo }), jsxRuntime.jsx(FeatureCardTitle, { title: renderElement({
|
|
7423
7426
|
id: "title",
|
|
7424
7427
|
wrap: false,
|
|
7425
7428
|
}), description: renderElement({
|
|
@@ -7507,9 +7510,11 @@ const IconHeaderWrapper = styled.div `
|
|
|
7507
7510
|
const FeatureCardIconHeader = ({ isRow }) => {
|
|
7508
7511
|
const { layerInfo } = useWidgetContext(exports.WidgetType.FeatureCard);
|
|
7509
7512
|
const { config } = useWidgetConfig(exports.WidgetType.FeatureCard);
|
|
7510
|
-
const { header
|
|
7513
|
+
const { header } = config || {};
|
|
7514
|
+
const { options } = header || {};
|
|
7515
|
+
const { fontColor, bgColor, bigIcon } = options || {};
|
|
7511
7516
|
const renderElement = useHeaderRender(header);
|
|
7512
|
-
return (jsxRuntime.jsx(IconHeaderWrapper, { "$fontColor":
|
|
7517
|
+
return (jsxRuntime.jsx(IconHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, "$bigIcon": bigIcon, children: jsxRuntime.jsx(uilibGl.ThemeProvider, { theme: uilibGl.defaultTheme, children: jsxRuntime.jsxs(Header, { "$isRow": isRow, children: [jsxRuntime.jsxs(HeaderFrontView, { children: [jsxRuntime.jsxs(HeaderContainer, { children: [jsxRuntime.jsx(LayerIcon, { layerInfo: layerInfo }), jsxRuntime.jsx(FeatureCardTitle, { title: renderElement({
|
|
7513
7518
|
id: "title",
|
|
7514
7519
|
wrap: false,
|
|
7515
7520
|
}), description: renderElement({
|
|
@@ -8312,9 +8317,11 @@ const HeaderSlideshow = styled.div `
|
|
|
8312
8317
|
const FeatureCardSlideshowHeader = ({ isRow }) => {
|
|
8313
8318
|
const { layerInfo } = useWidgetContext(exports.WidgetType.FeatureCard);
|
|
8314
8319
|
const { config } = useWidgetConfig(exports.WidgetType.FeatureCard);
|
|
8315
|
-
const { header
|
|
8320
|
+
const { header } = config || {};
|
|
8321
|
+
const { options } = header || {};
|
|
8322
|
+
const { height, withPadding } = options || {};
|
|
8316
8323
|
const renderElement = useHeaderRender(header);
|
|
8317
|
-
return (jsxRuntime.jsx(SlideshowHeaderWrapper, { big: true, withPadding:
|
|
8324
|
+
return (jsxRuntime.jsx(SlideshowHeaderWrapper, { big: true, withPadding: withPadding, children: jsxRuntime.jsx(uilibGl.ThemeProvider, { theme: uilibGl.darkTheme, children: jsxRuntime.jsxs(Header, { "$isRow": isRow, children: [jsxRuntime.jsxs(HeaderFrontView, { children: [jsxRuntime.jsxs(HeaderContainer, { children: [jsxRuntime.jsx(LayerIcon, { layerInfo: layerInfo }), jsxRuntime.jsx(FeatureCardTitle, { title: renderElement({
|
|
8318
8325
|
id: "title",
|
|
8319
8326
|
wrap: false,
|
|
8320
8327
|
}), description: renderElement({
|
|
@@ -8323,7 +8330,7 @@ const FeatureCardSlideshowHeader = ({ isRow }) => {
|
|
|
8323
8330
|
}) })] }), jsxRuntime.jsx(FeatureCardButtons, {})] }), jsxRuntime.jsx(ImageContainerBg, { children: renderElement({
|
|
8324
8331
|
id: "bgImage",
|
|
8325
8332
|
wrap: false,
|
|
8326
|
-
}) }), jsxRuntime.jsx(HeaderSlideshow, { height:
|
|
8333
|
+
}) }), jsxRuntime.jsx(HeaderSlideshow, { height: height, children: renderElement({
|
|
8327
8334
|
id: "slideshow",
|
|
8328
8335
|
wrap: false,
|
|
8329
8336
|
}) })] }) }) }));
|
|
@@ -10615,7 +10622,7 @@ const ContainerChildren = React.memo(({ type, items, isColumn, isMain, renderEle
|
|
|
10615
10622
|
});
|
|
10616
10623
|
if (checkIfEmptyDataSource(item.options?.hideIfEmptyDataSource))
|
|
10617
10624
|
return null;
|
|
10618
|
-
return isMain ? (jsxRuntime.jsx(ContainerWrapper, { "
|
|
10625
|
+
return isMain ? (jsxRuntime.jsx(ContainerWrapper, { "$noMargin": item.options?.noMargin, children: jsxRuntime.jsx(DashboardWrapper, { children: render }) }, index)) : (jsxRuntime.jsx(React.Fragment, { children: render }, index));
|
|
10619
10626
|
}) }));
|
|
10620
10627
|
});
|
|
10621
10628
|
|