@evergis/react 4.0.28 → 4.0.30
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/react.esm.js
CHANGED
|
@@ -4441,6 +4441,10 @@ const applyQueryFilters = ({ parameters: configParameters, filters: configFilter
|
|
|
4441
4441
|
return result;
|
|
4442
4442
|
}
|
|
4443
4443
|
if (typeof configParameters[key] === "string" && configParameters[key].includes("{") && attributes?.length) {
|
|
4444
|
+
const exactAttr = attributes.find(({ attributeName }) => configParameters[key] === `{${attributeName}}`);
|
|
4445
|
+
if (exactAttr) {
|
|
4446
|
+
return { ...result, [key]: exactAttr.value ?? "" };
|
|
4447
|
+
}
|
|
4444
4448
|
let interpolated = configParameters[key];
|
|
4445
4449
|
attributes.forEach(({ attributeName, value: attrValue }) => {
|
|
4446
4450
|
interpolated = interpolated.replace(new RegExp(`\\{${attributeName}\\}`, "g"), attrValue?.toString() ?? "");
|
|
@@ -9389,6 +9393,13 @@ const ElementModal = memo(({ type = WidgetType.Dashboard, elementConfig }) => {
|
|
|
9389
9393
|
return (jsxs(Fragment$1, { children: [jsx(ModalIcon, { kind: icon || "new_window", onClick: handleOpen }), jsxs(Dialog, { isOpen: isOpen, onCloseRequest: handleClose, modal: true, maxWidth: maxWidth, minWidth: minWidth, minHeight: minHeight, 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 }) })) })] })] }));
|
|
9390
9394
|
});
|
|
9391
9395
|
|
|
9396
|
+
const ElementLayerName = memo(({ type }) => {
|
|
9397
|
+
const { layerInfo } = useWidgetContext(type);
|
|
9398
|
+
if (!layerInfo?.name)
|
|
9399
|
+
return null;
|
|
9400
|
+
return jsx("span", { children: layerInfo.name });
|
|
9401
|
+
});
|
|
9402
|
+
|
|
9392
9403
|
const elementComponents = {
|
|
9393
9404
|
control: ElementControl,
|
|
9394
9405
|
image: ElementImage,
|
|
@@ -9405,6 +9416,7 @@ const elementComponents = {
|
|
|
9405
9416
|
markdown: ElementMarkdown,
|
|
9406
9417
|
uploader: ElementUploader,
|
|
9407
9418
|
modal: ElementModal,
|
|
9419
|
+
layerName: ElementLayerName,
|
|
9408
9420
|
};
|
|
9409
9421
|
|
|
9410
9422
|
const getElementValue = ({ getDefaultContainer, ...props }) => {
|
|
@@ -9466,7 +9478,7 @@ function getFeatureAttributes(feature = {}, layer, dataSource) {
|
|
|
9466
9478
|
const isIdAttribute = attributeName === idAttribute;
|
|
9467
9479
|
const additionalProps = isIdAttribute
|
|
9468
9480
|
? {
|
|
9469
|
-
value: idValue,
|
|
9481
|
+
value: currentAttributes?.[attributeName] ?? idValue,
|
|
9470
9482
|
readOnly: true,
|
|
9471
9483
|
}
|
|
9472
9484
|
: {
|