@wise/dynamic-flow-client 3.15.2-experimental-9ab778d → 3.15.2-experimental-1d9c70f
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/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +1 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +1 -1
- package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +1 -1
- package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +1 -1
- package/build/legacy/layout/decision/DynamicDecision.js +1 -1
- package/build/legacy/layout/instructions/DynamicInstructions.js +1 -1
- package/build/legacy/layout/list/DynamicStatusList.js +1 -1
- package/build/legacy/layout/review/DynamicReview.js +1 -1
- package/build/main.js +22 -14
- package/build/main.min.js +1 -1
- package/build/main.mjs +22 -14
- package/build/types/index.d.ts +2 -1
- package/build/types/legacy/layout/search/useSearch.d.ts +1 -1
- package/package.json +2 -2
package/build/main.mjs
CHANGED
|
@@ -11266,7 +11266,7 @@ var DecisionRenderer_default = DecisionRenderer;
|
|
|
11266
11266
|
function DecisionRendererComponent({ margin, options, title }) {
|
|
11267
11267
|
const { isLoading } = useLoadingContext();
|
|
11268
11268
|
return /* @__PURE__ */ jsxs5("div", { className: getMargin(margin), children: [
|
|
11269
|
-
title && /* @__PURE__ */ jsx22(Header, { as: "h2", title }),
|
|
11269
|
+
title && /* @__PURE__ */ jsx22(Header, { as: "h2", title, className: "m-b-2" }),
|
|
11270
11270
|
/* @__PURE__ */ jsx22(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: title2, onClick }) => /* @__PURE__ */ jsx22(
|
|
11271
11271
|
NavigationOption,
|
|
11272
11272
|
{
|
|
@@ -11310,7 +11310,8 @@ var FormSectionRenderer = {
|
|
|
11310
11310
|
Header2,
|
|
11311
11311
|
{
|
|
11312
11312
|
as: "h2",
|
|
11313
|
-
title
|
|
11313
|
+
title,
|
|
11314
|
+
className: "m-b-2"
|
|
11314
11315
|
}
|
|
11315
11316
|
),
|
|
11316
11317
|
description && /* @__PURE__ */ jsx25("p", { children: description }),
|
|
@@ -11447,7 +11448,7 @@ var InstructionsRenderer = {
|
|
|
11447
11448
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
11448
11449
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
11449
11450
|
return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
|
|
11450
|
-
title ? /* @__PURE__ */ jsx28(Header3, { title }) : null,
|
|
11451
|
+
title ? /* @__PURE__ */ jsx28(Header3, { title, className: "m-b-2" }) : null,
|
|
11451
11452
|
/* @__PURE__ */ jsx28(InstructionsList, { dos, donts })
|
|
11452
11453
|
] });
|
|
11453
11454
|
}
|
|
@@ -11937,7 +11938,7 @@ function Repeatable(props) {
|
|
|
11937
11938
|
setOpenModalType(null);
|
|
11938
11939
|
};
|
|
11939
11940
|
return /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
11940
|
-
title && /* @__PURE__ */ jsx39(Header4, { title }),
|
|
11941
|
+
title && /* @__PURE__ */ jsx39(Header4, { title, className: "m-b-2" }),
|
|
11941
11942
|
description && /* @__PURE__ */ jsx39("p", { children: description }),
|
|
11942
11943
|
/* @__PURE__ */ jsxs11(
|
|
11943
11944
|
"div",
|
|
@@ -12420,7 +12421,7 @@ import { jsx as jsx50, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
|
12420
12421
|
var StatusListRenderer = {
|
|
12421
12422
|
canRenderType: "status-list",
|
|
12422
12423
|
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs18("div", { className: getMargin(margin), children: [
|
|
12423
|
-
title ? /* @__PURE__ */ jsx50(Header5, { title }) : null,
|
|
12424
|
+
title ? /* @__PURE__ */ jsx50(Header5, { title, className: "m-b-2" }) : null,
|
|
12424
12425
|
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx50(
|
|
12425
12426
|
Summary,
|
|
12426
12427
|
{
|
|
@@ -12648,7 +12649,7 @@ var ReviewRenderer = {
|
|
|
12648
12649
|
}
|
|
12649
12650
|
} : void 0;
|
|
12650
12651
|
return /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
|
|
12651
|
-
(title || callToAction) && /* @__PURE__ */ jsx54(Header6, { title: title != null ? title : "", action }),
|
|
12652
|
+
(title || callToAction) && /* @__PURE__ */ jsx54(Header6, { title: title != null ? title : "", action, className: "m-b-2" }),
|
|
12652
12653
|
/* @__PURE__ */ jsx54("div", { className: margin, children: /* @__PURE__ */ jsx54(
|
|
12653
12654
|
DefinitionList,
|
|
12654
12655
|
{
|
|
@@ -14570,7 +14571,7 @@ function DynamicDecision({ component, onAction }) {
|
|
|
14570
14571
|
const { loading } = useDynamicFlow();
|
|
14571
14572
|
const { margin, options, title } = component;
|
|
14572
14573
|
return /* @__PURE__ */ jsxs24("div", { className: getMargin2(margin), children: [
|
|
14573
|
-
title && /* @__PURE__ */ jsx74(Header7, { as: "h2", title }),
|
|
14574
|
+
title && /* @__PURE__ */ jsx74(Header7, { as: "h2", title, className: "m-b-2" }),
|
|
14574
14575
|
/* @__PURE__ */ jsx74(NavigationOptionsList3, { children: options.map((option) => /* @__PURE__ */ jsx74(
|
|
14575
14576
|
NavigationOption4,
|
|
14576
14577
|
{
|
|
@@ -14660,7 +14661,7 @@ function AllOfSchema(props) {
|
|
|
14660
14661
|
};
|
|
14661
14662
|
const [models, setModels] = useState12(splitModel(props.model, props.schema.allOf));
|
|
14662
14663
|
return /* @__PURE__ */ jsxs26(Fragment12, { children: [
|
|
14663
|
-
props.schema.title && /* @__PURE__ */ jsx77(Header8, { title: props.schema.title }),
|
|
14664
|
+
props.schema.title && /* @__PURE__ */ jsx77(Header8, { title: props.schema.title, className: "m-b-2" }),
|
|
14664
14665
|
props.schema.description && /* @__PURE__ */ jsx77("p", { children: props.schema.description }),
|
|
14665
14666
|
/* @__PURE__ */ jsx77("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
|
|
14666
14667
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -15543,7 +15544,7 @@ function RepeatableSchema({
|
|
|
15543
15544
|
"has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
|
|
15544
15545
|
};
|
|
15545
15546
|
return /* @__PURE__ */ jsxs30("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
|
|
15546
|
-
schema.title && /* @__PURE__ */ jsx84(Header9, { title: schema.title }),
|
|
15547
|
+
schema.title && /* @__PURE__ */ jsx84(Header9, { title: schema.title, className: "m-b-2" }),
|
|
15547
15548
|
itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ jsx84(
|
|
15548
15549
|
ItemSummaryOption2,
|
|
15549
15550
|
{
|
|
@@ -15700,7 +15701,7 @@ function ObjectSchema(props) {
|
|
|
15700
15701
|
return /* @__PURE__ */ jsxs31(Fragment13, { children: [
|
|
15701
15702
|
props.schema.alert && /* @__PURE__ */ jsx87(DynamicAlert_default, { component: props.schema.alert }),
|
|
15702
15703
|
/* @__PURE__ */ jsxs31("fieldset", { children: [
|
|
15703
|
-
props.schema.title && !props.hideTitle && /* @__PURE__ */ jsx87(Header10, { title: props.schema.title, as: "legend" }),
|
|
15704
|
+
props.schema.title && !props.hideTitle && /* @__PURE__ */ jsx87(Header10, { title: props.schema.title, as: "legend", className: "m-b-2" }),
|
|
15704
15705
|
props.schema.description && !props.hideTitle && /* @__PURE__ */ jsxs31("p", { children: [
|
|
15705
15706
|
" ",
|
|
15706
15707
|
props.schema.description,
|
|
@@ -16684,7 +16685,7 @@ function getTitleAndHelp(schema, forId) {
|
|
|
16684
16685
|
schema.title,
|
|
16685
16686
|
" ",
|
|
16686
16687
|
helpElement
|
|
16687
|
-
] }) : /* @__PURE__ */ jsx91(Header11, { title: (_a = schema.title) != null ? _a : "" }) });
|
|
16688
|
+
] }) : /* @__PURE__ */ jsx91(Header11, { title: (_a = schema.title) != null ? _a : "", className: "m-b-2" }) });
|
|
16688
16689
|
return schema.title ? titleElement : helpElement;
|
|
16689
16690
|
}
|
|
16690
16691
|
function getValidations(props, schemaIndex) {
|
|
@@ -17397,7 +17398,7 @@ var DynamicInstructions = ({ component }) => {
|
|
|
17397
17398
|
const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
|
|
17398
17399
|
const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
|
|
17399
17400
|
return /* @__PURE__ */ jsxs37("div", { className: getMargin2(component.margin || "md"), children: [
|
|
17400
|
-
component.title ? /* @__PURE__ */ jsx106(Header12, { title: component.title }) : null,
|
|
17401
|
+
component.title ? /* @__PURE__ */ jsx106(Header12, { title: component.title, className: "m-b-2" }) : null,
|
|
17401
17402
|
/* @__PURE__ */ jsx106(InstructionsList2, { dos, donts })
|
|
17402
17403
|
] });
|
|
17403
17404
|
};
|
|
@@ -17512,7 +17513,7 @@ import { Header as Header13, Summary as Summary2 } from "@transferwise/component
|
|
|
17512
17513
|
import { jsx as jsx108, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
17513
17514
|
var DynamicStatusList = ({ component }) => {
|
|
17514
17515
|
return /* @__PURE__ */ jsxs38("div", { className: getMargin2(component.margin || "md"), children: [
|
|
17515
|
-
component.title ? /* @__PURE__ */ jsx108(Header13, { title: component.title }) : null,
|
|
17516
|
+
component.title ? /* @__PURE__ */ jsx108(Header13, { title: component.title, className: "m-b-2" }) : null,
|
|
17516
17517
|
component.items.map(mapListItemToSummary)
|
|
17517
17518
|
] });
|
|
17518
17519
|
};
|
|
@@ -17681,7 +17682,14 @@ function DynamicReview(props) {
|
|
|
17681
17682
|
const callToAction = review.callToAction ? getReviewAction2(review.callToAction.title, review.callToAction.action) : null;
|
|
17682
17683
|
const legacyCallToAction = !callToAction && review.action ? getReviewAction2(review.action.title || "", review.action) : null;
|
|
17683
17684
|
return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
|
|
17684
|
-
review.title && /* @__PURE__ */ jsx111(
|
|
17685
|
+
review.title && /* @__PURE__ */ jsx111(
|
|
17686
|
+
Header14,
|
|
17687
|
+
{
|
|
17688
|
+
title: review.title,
|
|
17689
|
+
action: callToAction || legacyCallToAction || void 0,
|
|
17690
|
+
className: "m-b-2"
|
|
17691
|
+
}
|
|
17692
|
+
),
|
|
17685
17693
|
/* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
|
|
17686
17694
|
] });
|
|
17687
17695
|
}
|
package/build/types/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export { default as JsonSchemaForm } from './legacy/jsonSchemaForm';
|
|
|
14
14
|
export { DynamicLayout as Layout } from './legacy/layout';
|
|
15
15
|
export { isValidSchema } from './legacy/common/validators';
|
|
16
16
|
export * from './legacy/dynamicFlow/DynamicFlow';
|
|
17
|
-
export type { Renderers
|
|
17
|
+
export type { Renderers } from '@wise/dynamic-flow-renderers';
|
|
18
|
+
export type { Renderer, AlertRendererProps, BooleanInputRendererProps, BoxRendererProps, ButtonRendererProps, ColumnsRendererProps, DateInputRendererProps, DecisionRendererProps, DividerRendererProps, FormRendererProps, FormSectionRendererProps, HeadingRendererProps, HiddenRendererProps, ImageRendererProps, InstructionsRendererProps, IntegerInputRendererProps, LoadingIndicatorRendererProps, MarkdownRendererProps, ModalRendererProps, MultiSelectInputRendererProps, MultiUploadInputRendererProps, NumberInputRendererProps, ParagraphRendererProps, RepeatableRendererProps, ReviewRendererProps, SearchRendererProps, SelectInputRendererProps, StatusListRendererProps, StepRendererProps, TextInputRendererProps, UploadInputRendererProps, } from '@wise/dynamic-flow-renderers';
|
|
@@ -10,7 +10,7 @@ export type SearchState = {
|
|
|
10
10
|
status: 'error';
|
|
11
11
|
};
|
|
12
12
|
export declare const useSearch: (defaultSearchConfig: SearchConfig) => {
|
|
13
|
-
status: "error" | "
|
|
13
|
+
status: "error" | "idle" | "success" | "loading";
|
|
14
14
|
results: SearchResult[];
|
|
15
15
|
search: (query: string, { url, method, param }?: SearchConfig) => Promise<void>;
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "3.15.2-experimental-
|
|
3
|
+
"version": "3.15.2-experimental-1d9c70f",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"nanoid": "5.0.7",
|
|
105
105
|
"react-webcam": "^7.2.0",
|
|
106
106
|
"screenfull": "^5.2.0",
|
|
107
|
-
"@wise/dynamic-flow-types": "2.
|
|
107
|
+
"@wise/dynamic-flow-types": "2.16.0"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"dev": "pnpm build:visual-tests && storybook dev -p 3003",
|