@wise/dynamic-flow-client-internal 3.11.2-experimental-7d4fc19 → 3.11.2-experimental-revert-2-1b1276e
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.
|
@@ -52,8 +52,7 @@ import { DynamicFlow as DynamicFlowCoreLegacy, DynamicFlowRevamp as DynamicFlowC
|
|
|
52
52
|
import { mergeRequestInit } from './utils/mergeRequestInit';
|
|
53
53
|
export function DynamicFlowLegacy(props) {
|
|
54
54
|
var _a = props.customFetch, customFetch = _a === void 0 ? globalThis.fetch : _a;
|
|
55
|
-
var
|
|
56
|
-
var coreProps = __assign(__assign({}, props), { httpClient: httpClient });
|
|
55
|
+
var coreProps = __assign(__assign({}, props), { httpClient: customFetch });
|
|
57
56
|
return _jsx(DynamicFlowCoreLegacy, __assign({}, coreProps));
|
|
58
57
|
}
|
|
59
58
|
export function DynamicFlowRevamp(props) {
|
|
@@ -77,6 +77,10 @@ describe.each([
|
|
|
77
77
|
requestInit = customFetch.mock.calls[0][1];
|
|
78
78
|
credentials = requestInit === null || requestInit === void 0 ? void 0 : requestInit.credentials;
|
|
79
79
|
expect(credentials).toBe('include');
|
|
80
|
+
expect(requestInit === null || requestInit === void 0 ? void 0 : requestInit.headers).toMatchObject({
|
|
81
|
+
// 'content-type': 'application/json',
|
|
82
|
+
// 'accept-language': 'en-GB',
|
|
83
|
+
});
|
|
80
84
|
return [2 /*return*/];
|
|
81
85
|
}
|
|
82
86
|
});
|
package/build/main.js
CHANGED
|
@@ -68,8 +68,7 @@ var mergeHeaders = (...headersInits) => headersInits.reduce(
|
|
|
68
68
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
69
69
|
function DynamicFlowLegacy(props) {
|
|
70
70
|
const { customFetch = globalThis.fetch } = props;
|
|
71
|
-
const
|
|
72
|
-
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient });
|
|
71
|
+
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
73
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dynamic_flow_client.DynamicFlow, __spreadValues({}, coreProps));
|
|
74
73
|
}
|
|
75
74
|
function DynamicFlowRevamp(props) {
|
package/build/main.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty,d=Object.defineProperties,v=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertyNames,
|
|
1
|
+
"use strict";var s=Object.defineProperty,d=Object.defineProperties,v=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var w=(t,e,o)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,a=(t,e)=>{for(var o in e||(e={}))D.call(e,o)&&w(t,o,e[o]);if(F)for(var o of F(e))x.call(e,o)&&w(t,o,e[o]);return t},r=(t,e)=>d(t,I(e));var L=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},b=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of W(e))!D.call(t,c)&&c!==o&&s(t,c,{get:()=>e[c],enumerable:!(n=v(e,c))||n.enumerable});return t};var S=t=>b(s({},"__esModule",{value:!0}),t);var H={};L(H,{DynamicFlow:()=>y,DynamicFlowLegacy:()=>y,DynamicFlowRevamp:()=>f,DynamicFragment:()=>P,JsonSchemaForm:()=>m.JsonSchemaForm,isValidSchema:()=>m.isValidSchema,makeCustomFetch:()=>A,translations:()=>m.translations});module.exports=S(H);var R=require("@wise/dynamic-flow-client"),m=require("@wise/dynamic-flow-client");var l=require("react"),g=require("react-intl"),i=require("@wise/dynamic-flow-client");var h=(t,e)=>r(a(a({},t),e),{headers:q(t==null?void 0:t.headers,e==null?void 0:e.headers)}),q=(...t)=>t.reduce((e,o)=>a(a({},e),Object.fromEntries(new Headers(o).entries())),{});var p=require("react/jsx-runtime");function y(t){let{customFetch:e=globalThis.fetch}=t,o=r(a({},t),{httpClient:e});return(0,p.jsx)(i.DynamicFlow,a({},o))}function f(t){let{customFetch:e=globalThis.fetch}=t,o=u(e),n=r(a({},t),{httpClient:o});return(0,p.jsx)(i.DynamicFlowRevamp,a({},n))}var P=(0,l.forwardRef)(function(e,o){let{customFetch:n=globalThis.fetch}=e,c=u(n),C=r(a({},e),{httpClient:c});return(0,p.jsx)(i.DynamicFragmentWise,r(a({},C),{ref:o}))}),u=t=>{let{locale:e}=(0,g.useIntl)();return(0,l.useCallback)(async(o,n)=>t(o,h(n,{credentials:"include",headers:{"accept-language":e}})),[t,e])};var A=R.makeHttpClient;
|
package/build/main.mjs
CHANGED
|
@@ -44,8 +44,7 @@ var mergeHeaders = (...headersInits) => headersInits.reduce(
|
|
|
44
44
|
import { jsx } from "react/jsx-runtime";
|
|
45
45
|
function DynamicFlowLegacy(props) {
|
|
46
46
|
const { customFetch = globalThis.fetch } = props;
|
|
47
|
-
const
|
|
48
|
-
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient });
|
|
47
|
+
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
49
48
|
return /* @__PURE__ */ jsx(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
50
49
|
}
|
|
51
50
|
function DynamicFlowRevamp(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client-internal",
|
|
3
|
-
"version": "3.11.2-experimental-
|
|
3
|
+
"version": "3.11.2-experimental-revert-2-1b1276e",
|
|
4
4
|
"description": "Dynamic Flow web client for Wise",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"react-intl": "^6"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@wise/dynamic-flow-client": "3.11.2-experimental-
|
|
83
|
+
"@wise/dynamic-flow-client": "3.11.2-experimental-revert-2-1b1276e"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"dev": "storybook dev -p 3005",
|