@wise/dynamic-flow-client 3.34.0 → 3.34.2
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.mjs
CHANGED
|
@@ -8724,6 +8724,19 @@ var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
|
8724
8724
|
required = false
|
|
8725
8725
|
} = schemaMapperProps;
|
|
8726
8726
|
const initialModel = (_a = model != null ? model : schema.default) != null ? _a : null;
|
|
8727
|
+
if (schema.oneOf.length === 1 && isFormSectionSchema(schema.oneOf[0])) {
|
|
8728
|
+
return mapSchemaToComponent(
|
|
8729
|
+
{
|
|
8730
|
+
uid,
|
|
8731
|
+
schema: supressSchemaTitleAndDescription(schema.oneOf[0]),
|
|
8732
|
+
model: initialModel,
|
|
8733
|
+
localValue,
|
|
8734
|
+
validationErrors: initialError,
|
|
8735
|
+
required
|
|
8736
|
+
},
|
|
8737
|
+
mapperProps
|
|
8738
|
+
);
|
|
8739
|
+
}
|
|
8727
8740
|
const options = schema.oneOf.map((childSchema, index) => {
|
|
8728
8741
|
const { title = "", description, image, icon, keywords = [] } = childSchema;
|
|
8729
8742
|
return {
|
|
@@ -14034,7 +14047,7 @@ import { jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
|
14034
14047
|
var ListRenderer = {
|
|
14035
14048
|
canRenderType: "list",
|
|
14036
14049
|
render: ({ callToAction, margin, items, title }) => /* @__PURE__ */ jsxs23("div", { className: getMargin(margin), children: [
|
|
14037
|
-
title && /* @__PURE__ */ jsx58(Header7, { as: "h2", title, action: getListAction(callToAction) }),
|
|
14050
|
+
(title || callToAction) && /* @__PURE__ */ jsx58(Header7, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
14038
14051
|
items.map((props) => /* @__PURE__ */ jsx58(DesignSystemListItem, __spreadValues({}, props), props.title))
|
|
14039
14052
|
] })
|
|
14040
14053
|
};
|
package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import type { OneOfSchema } from '@wise/dynamic-flow-types/build/next';
|
|
|
2
2
|
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
3
|
export declare const oneOfSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
4
|
schema: OneOfSchema;
|
|
5
|
-
}, mapperProps: MapperProps) => import("../../../
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../types").DomainComponent;
|