@wise/dynamic-flow-client 3.31.2 → 3.32.0
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/build/main.js
CHANGED
|
@@ -1635,7 +1635,14 @@ var hiddenComponentToProps = () => ({
|
|
|
1635
1635
|
});
|
|
1636
1636
|
|
|
1637
1637
|
// src/revamp/renderers/mappers/imageComponentToProps.ts
|
|
1638
|
-
var imageComponentToProps = (component) =>
|
|
1638
|
+
var imageComponentToProps = (component) => {
|
|
1639
|
+
var _a;
|
|
1640
|
+
return __spreadProps(__spreadValues({}, pick(component, "type", "control", "margin", "size")), {
|
|
1641
|
+
accessibilityDescription: component.content.accessibilityDescription,
|
|
1642
|
+
url: (_a = component.content.url) != null ? _a : "",
|
|
1643
|
+
uri: component.content.uri
|
|
1644
|
+
});
|
|
1645
|
+
};
|
|
1639
1646
|
|
|
1640
1647
|
// src/revamp/renderers/mappers/instructionsComponentToProps.ts
|
|
1641
1648
|
var instructionsComponentToProps = (component) => pick(component, "type", "control", "items", "margin", "title");
|
|
@@ -10131,13 +10138,12 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
|
|
|
10131
10138
|
});
|
|
10132
10139
|
|
|
10133
10140
|
// src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
|
|
10134
|
-
var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
|
|
10141
|
+
var imageLayoutToComponent = (uid, { accessibilityDescription, content, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
|
|
10135
10142
|
uid,
|
|
10136
|
-
accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text,
|
|
10143
|
+
content: content != null ? content : { accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text, url },
|
|
10137
10144
|
control,
|
|
10138
10145
|
margin,
|
|
10139
|
-
size: size2
|
|
10140
|
-
url
|
|
10146
|
+
size: size2
|
|
10141
10147
|
});
|
|
10142
10148
|
|
|
10143
10149
|
// src/revamp/domain/components/MarkdownComponent.ts
|
|
@@ -12138,12 +12144,20 @@ function ImageRendererComponent({
|
|
|
12138
12144
|
accessibilityDescription,
|
|
12139
12145
|
margin,
|
|
12140
12146
|
size: size2,
|
|
12141
|
-
url
|
|
12147
|
+
url,
|
|
12148
|
+
uri
|
|
12142
12149
|
}) {
|
|
12143
12150
|
const [imageSource, setImageSource] = (0, import_react9.useState)("");
|
|
12144
12151
|
const httpClient = useRendererHttpClient();
|
|
12145
12152
|
(0, import_react9.useEffect)(() => {
|
|
12146
|
-
|
|
12153
|
+
if (!uri) {
|
|
12154
|
+
void getImageSource(httpClient, url).then(setImageSource);
|
|
12155
|
+
return;
|
|
12156
|
+
}
|
|
12157
|
+
if (!uri.startsWith("urn:")) {
|
|
12158
|
+
void getImageSource(httpClient, uri).then(setImageSource);
|
|
12159
|
+
return;
|
|
12160
|
+
}
|
|
12147
12161
|
}, [url, httpClient]);
|
|
12148
12162
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12149
12163
|
import_components12.Image,
|