@evergis/react 4.0.12 → 4.0.14
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,3 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
|
+
import { ClientFeatureAttribute, ContainerProps } from '../../types';
|
|
4
|
+
interface ElementSvgProps extends ContainerProps {
|
|
5
|
+
layerInfo?: QueryLayerServiceInfoDc;
|
|
6
|
+
attributes?: ClientFeatureAttribute[];
|
|
7
|
+
}
|
|
8
|
+
export declare const ElementSvg: FC<ElementSvgProps>;
|
|
9
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -7162,6 +7162,7 @@ const RoundedBackgroundContainerWrapper = styled(uilibGl.Flex) `
|
|
|
7162
7162
|
|
|
7163
7163
|
* {
|
|
7164
7164
|
color: ${$color};
|
|
7165
|
+
fill: ${$color};
|
|
7165
7166
|
}
|
|
7166
7167
|
`};
|
|
7167
7168
|
|
|
@@ -8842,8 +8843,10 @@ const ElementSlideshow = ({ elementConfig, type, renderElement }) => {
|
|
|
8842
8843
|
isOpen: isOpenGallery, onClose: toggleGallery }))] }))] }));
|
|
8843
8844
|
};
|
|
8844
8845
|
|
|
8845
|
-
const ElementSvg = React.memo(({ type, elementConfig }) => {
|
|
8846
|
-
const
|
|
8846
|
+
const ElementSvg = React.memo(({ type, elementConfig, ...rest }) => {
|
|
8847
|
+
const ctx = useWidgetContext(type);
|
|
8848
|
+
const layerInfo = rest.layerInfo || ctx.layerInfo;
|
|
8849
|
+
const attributes = rest.attributes || ctx.attributes;
|
|
8847
8850
|
const { options } = elementConfig || {};
|
|
8848
8851
|
const { width, height, fontColor } = options || {};
|
|
8849
8852
|
return (jsxRuntime.jsx(SvgImage, { url: getSvgUrl({ elementConfig, layerInfo, attributes }), width: width, height: height, fontColor: fontColor }));
|