@wise/dynamic-flow-client-internal 4.24.0-experimental-5426015 → 4.24.0-experimental-d21baa5
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 +11 -7
- package/build/main.mjs +11 -7
- package/build/types/dynamicFlow/extensions/createRendererWithExtensions.d.ts +9 -0
- package/build/types/index.d.ts +1 -1
- package/package.json +5 -5
- package/build/types/dynamicFlow/factories/createReviewRenderer.d.ts +0 -2
- package/build/types/dynamicFlow/factories/index.d.ts +0 -1
package/build/main.js
CHANGED
|
@@ -63,7 +63,7 @@ __export(index_exports, {
|
|
|
63
63
|
DynamicFlowRevamp: () => DynamicFlowRevamp,
|
|
64
64
|
DynamicForm: () => DynamicForm,
|
|
65
65
|
JsonSchemaForm: () => import_dynamic_flow_client4.JsonSchemaForm,
|
|
66
|
-
|
|
66
|
+
createRendererWithExtensions: () => createRendererWithExtensions,
|
|
67
67
|
findRendererPropsByType: () => import_dynamic_flow_client4.findRendererPropsByType,
|
|
68
68
|
isValidSchema: () => import_dynamic_flow_client4.isValidSchema,
|
|
69
69
|
makeCustomFetch: () => import_dynamic_flow_client3.makeHttpClient,
|
|
@@ -2080,7 +2080,7 @@ var ReviewRenderer = {
|
|
|
2080
2080
|
)
|
|
2081
2081
|
})
|
|
2082
2082
|
},
|
|
2083
|
-
render
|
|
2083
|
+
render({ callToAction, control, fields, margin, title, trackEvent }) {
|
|
2084
2084
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2085
2085
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: getMargin(margin), children: [
|
|
2086
2086
|
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components33.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
@@ -2089,7 +2089,7 @@ var ReviewRenderer = {
|
|
|
2089
2089
|
{
|
|
2090
2090
|
layout: orientation,
|
|
2091
2091
|
definitions: fields.map(
|
|
2092
|
-
(field) =>
|
|
2092
|
+
(field) => this.extensions.field(__spreadProps(__spreadValues({}, field), {
|
|
2093
2093
|
orientation,
|
|
2094
2094
|
trackEvent
|
|
2095
2095
|
}))
|
|
@@ -3161,10 +3161,14 @@ var getWiseRenderers = () => [
|
|
|
3161
3161
|
StepRenderer
|
|
3162
3162
|
];
|
|
3163
3163
|
|
|
3164
|
-
// src/dynamicFlow/
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3164
|
+
// src/dynamicFlow/extensions/createRendererWithExtensions.ts
|
|
3165
|
+
var RENDERER_REGISTRY = {
|
|
3166
|
+
review: ReviewRenderer_default
|
|
3167
|
+
};
|
|
3168
|
+
function createRendererWithExtensions(type, extensions) {
|
|
3169
|
+
const baseRenderer = RENDERER_REGISTRY[type];
|
|
3170
|
+
return __spreadProps(__spreadValues({}, baseRenderer), {
|
|
3171
|
+
extensions: __spreadValues(__spreadValues({}, baseRenderer.extensions), extensions)
|
|
3168
3172
|
});
|
|
3169
3173
|
}
|
|
3170
3174
|
|
package/build/main.mjs
CHANGED
|
@@ -2044,7 +2044,7 @@ var ReviewRenderer = {
|
|
|
2044
2044
|
)
|
|
2045
2045
|
})
|
|
2046
2046
|
},
|
|
2047
|
-
render
|
|
2047
|
+
render({ callToAction, control, fields, margin, title, trackEvent }) {
|
|
2048
2048
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2049
2049
|
return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
|
|
2050
2050
|
(title || callToAction) && /* @__PURE__ */ jsx50(Header7, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
@@ -2053,7 +2053,7 @@ var ReviewRenderer = {
|
|
|
2053
2053
|
{
|
|
2054
2054
|
layout: orientation,
|
|
2055
2055
|
definitions: fields.map(
|
|
2056
|
-
(field) =>
|
|
2056
|
+
(field) => this.extensions.field(__spreadProps(__spreadValues({}, field), {
|
|
2057
2057
|
orientation,
|
|
2058
2058
|
trackEvent
|
|
2059
2059
|
}))
|
|
@@ -3131,10 +3131,14 @@ var getWiseRenderers = () => [
|
|
|
3131
3131
|
StepRenderer
|
|
3132
3132
|
];
|
|
3133
3133
|
|
|
3134
|
-
// src/dynamicFlow/
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3134
|
+
// src/dynamicFlow/extensions/createRendererWithExtensions.ts
|
|
3135
|
+
var RENDERER_REGISTRY = {
|
|
3136
|
+
review: ReviewRenderer_default
|
|
3137
|
+
};
|
|
3138
|
+
function createRendererWithExtensions(type, extensions) {
|
|
3139
|
+
const baseRenderer = RENDERER_REGISTRY[type];
|
|
3140
|
+
return __spreadProps(__spreadValues({}, baseRenderer), {
|
|
3141
|
+
extensions: __spreadValues(__spreadValues({}, baseRenderer.extensions), extensions)
|
|
3138
3142
|
});
|
|
3139
3143
|
}
|
|
3140
3144
|
|
|
@@ -4145,7 +4149,7 @@ export {
|
|
|
4145
4149
|
DynamicFlowRevamp,
|
|
4146
4150
|
DynamicForm,
|
|
4147
4151
|
JsonSchemaForm,
|
|
4148
|
-
|
|
4152
|
+
createRendererWithExtensions,
|
|
4149
4153
|
findRendererPropsByType,
|
|
4150
4154
|
isValidSchema,
|
|
4151
4155
|
makeHttpClient as makeCustomFetch,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Renderer, ReviewRendererProps, ReviewRendererExtensions } from '@wise/dynamic-flow-types/build/renderers';
|
|
2
|
+
declare const RENDERER_REGISTRY: {
|
|
3
|
+
review: Renderer<ReviewRendererProps, ReviewRendererExtensions>;
|
|
4
|
+
};
|
|
5
|
+
type RendererTypeMap = {
|
|
6
|
+
review: Renderer<ReviewRendererProps, ReviewRendererExtensions>;
|
|
7
|
+
};
|
|
8
|
+
export declare function createRendererWithExtensions<T extends keyof typeof RENDERER_REGISTRY>(type: T, extensions: Partial<RendererTypeMap[T]['extensions']>): RendererTypeMap[T];
|
|
9
|
+
export {};
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { makeHttpClient as makeCustomFetch } from '@wise/dynamic-flow-client';
|
|
2
2
|
export type { DynamicFlowProps, DynamicFormController, InitialAction, Step, } from '@wise/dynamic-flow-client';
|
|
3
3
|
export type { AlertRendererProps, BoxRendererProps, ButtonRendererProps, CheckboxInputRendererProps, ColumnsRendererProps, DateInputRendererProps, DecisionRendererProps, DividerRendererProps, FormRendererProps, FormSectionRendererProps, HeadingRendererProps, HiddenRendererProps, ImageRendererProps, InstructionsRendererProps, IntegerInputRendererProps, LoadingIndicatorRendererProps, MarkdownRendererProps, ModalLayoutRendererProps, ModalRendererProps, MultiSelectInputRendererProps, MultiUploadInputRendererProps, NumberInputRendererProps, ParagraphRendererProps, Renderer, Renderers, RepeatableRendererProps, ReviewRendererProps, ReviewRendererExtensions, ReviewRendererFieldExtensionProps, SearchRendererProps, SelectInputRendererProps, StatusListRendererProps, StepRendererProps, TextInputRendererProps, UploadInputRendererProps, } from '@wise/dynamic-flow-types/build/renderers';
|
|
4
|
-
export
|
|
4
|
+
export { createRendererWithExtensions } from './dynamicFlow/extensions/createRendererWithExtensions';
|
|
5
5
|
export { findRendererPropsByType, isValidSchema, JsonSchemaForm } from '@wise/dynamic-flow-client';
|
|
6
6
|
export { default as translations } from './i18n';
|
|
7
7
|
export type { DynamicFlowLegacyProps, DynamicFlowRevampProps } from './dynamicFlow/DynamicFlow';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client-internal",
|
|
3
|
-
"version": "4.24.0-experimental-
|
|
3
|
+
"version": "4.24.0-experimental-d21baa5",
|
|
4
4
|
"description": "Dynamic Flow web client for Wise",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
75
75
|
"tsx": "4.20.4",
|
|
76
76
|
"typescript": "5.9.2",
|
|
77
|
-
"@wise/dynamic-flow-types": "3.12.0-experimental-5426015",
|
|
78
77
|
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
79
|
-
"@wise/dynamic-flow-renderers": "0.0.0"
|
|
78
|
+
"@wise/dynamic-flow-renderers": "0.0.0",
|
|
79
|
+
"@wise/dynamic-flow-types": "3.12.0-experimental-d21baa5"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@transferwise/components": "^46.92.0",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"classnames": "2.5.1",
|
|
94
|
-
"@wise/dynamic-flow-client": "4.14.1-experimental-
|
|
95
|
-
"@wise/dynamic-flow-types": "3.12.0-experimental-
|
|
94
|
+
"@wise/dynamic-flow-client": "4.14.1-experimental-d21baa5",
|
|
95
|
+
"@wise/dynamic-flow-types": "3.12.0-experimental-d21baa5"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"dev": "pnpm build:visual-tests && storybook dev -p 3005",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createReviewRenderer } from './createReviewRenderer';
|