@wise/dynamic-flow-client 5.0.0 → 5.0.1-exp-css-28d60ea

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.
Files changed (2) hide show
  1. package/README.md +8 -28
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -49,15 +49,15 @@ The `DynamicFlow` component must be wraped in a Neptune `Provider` to support lo
49
49
  import {
50
50
  Provider,
51
51
  SnackbarProvider,
52
- translations as componentTranslations,
52
+ translations as dsTranslations,
53
53
  } from '@transferwise/components';
54
54
  import { getLocalisedMessages } from '@transferwise/crab/client';
55
55
  import {
56
56
  DynamicFlow,
57
- translations as dynamicFlowsTranslations,
57
+ translations as dfTranslations,
58
58
  } from '@wise/dynamic-flow-client';
59
59
 
60
- const messages = getLocalisedMessages(locale, [componentTranslations, dynamicFlowsTranslations])
60
+ const messages = getLocalisedMessages(locale, [dsTranslations, dfTranslations])
61
61
 
62
62
  return (
63
63
  <Provider i18n={{ locale, messages }}>
@@ -78,17 +78,17 @@ You'll need to merge the '@transferwise/components' translations with the '@wise
78
78
  import {
79
79
  Provider,
80
80
  SnackbarProvider,
81
- translations as componentTranslations,
81
+ translations as dsTranslations,
82
82
  } from '@transferwise/components';
83
83
  import {
84
84
  DynamicFlow,
85
- translations as dynamicFlowsTranslations,
85
+ translations as dfTranslations,
86
86
  } from '@wise/dynamic-flow-client';
87
87
 
88
88
  // create your messages object
89
89
  const messages: Record<string, string> = {
90
- ...(componentTranslations[lang] || componentTranslations[lang.replace('-', '_')] || componentTranslations[lang.substring(0, 2)] || {}),
91
- ...(translations[lang] || translations[lang.replace('-', '_')] || translations[lang.substring(0, 2)] || {}),
90
+ ...(dsTranslations[lang] || dsTranslations[lang.replace('-', '_')] || dsTranslations[lang.substring(0, 2)] || {}),
91
+ ...(dfTranslations[lang] || dfTranslations[lang.replace('-', '_')] || dfTranslations[lang.substring(0, 2)] || {}),
92
92
  }
93
93
 
94
94
  return (
@@ -125,7 +125,7 @@ In some cases you may want to obtain the initial step yourself, and then pass it
125
125
 
126
126
  ```tsx
127
127
  <DynamicFlow
128
- initialStep={someInitialStepIfoundLayingAroundHere}
128
+ initialStep={myInitialStep}
129
129
  httpClient={...}
130
130
  onCompletion={...}
131
131
  onError={...}
@@ -211,26 +211,6 @@ onLog={(level, message, extra) => {
211
211
  }}
212
212
  ```
213
213
 
214
- ### Loader configuration
215
-
216
- By default, DF will display a loading animation (The `Loader` component from Neptune) when the first step is loading. It will not display it during refresh-on-change or while submitting forms.
217
-
218
- You can change the defaults by passing a `loaderConfig` prop:
219
-
220
- ```ts
221
- type LoaderConfig = {
222
- size?: `xs | sm | md | lg | xl`;
223
- initial?: boolean;
224
- submission?: boolean;
225
- };
226
- ```
227
-
228
- | property | type | notes | default |
229
- | ------------ | ------- | ------------------------------------------------------------------------------ | ------- |
230
- | `size` | string | The size of the Loader component. | `xl` |
231
- | `initial` | boolean | Whether or not to display the Loader component while loading the initial step. | true |
232
- | `submission` | boolean | Whether or not to display the Loader component during form submissions. | false |
233
-
234
214
  ## Contributing
235
215
 
236
216
  We love contributions! Check out `CONTRIBUTING.md` for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "5.0.0",
3
+ "version": "5.0.1-exp-css-28d60ea",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -16,7 +16,8 @@
16
16
  "import": "./build/main.mjs",
17
17
  "require": "./build/main.js"
18
18
  },
19
- "./build/main.css": "./build/main.css"
19
+ "./build/main.css": "./build/main.css",
20
+ "./main.css": "./build/main.css"
20
21
  },
21
22
  "sideEffects": [
22
23
  "*.css"