@wise/dynamic-flow-client 5.9.2 → 5.11.0

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 (47) hide show
  1. package/build/controller/FlowController.js +6 -1
  2. package/build/controller/executeRefresh.js +8 -2
  3. package/build/controller/executeRequest.js +3 -0
  4. package/build/controller/executeSubmission.js +1 -0
  5. package/build/controller/getResponseType.js +3 -3
  6. package/build/domain/components/step/ExternalConfirmationComponent.js +5 -9
  7. package/build/domain/mappers/mapStepToComponent.js +1 -1
  8. package/build/domain/mappers/schema/blobSchemaToComponent.js +2 -2
  9. package/build/domain/mappers/schema/tests/test-utils.js +1 -1
  10. package/build/i18n/fr.json +1 -1
  11. package/build/main.css +4 -0
  12. package/build/main.js +35 -21
  13. package/build/main.mjs +35 -21
  14. package/build/renderers/mappers/externalComponentToProps.js +1 -1
  15. package/build/stories/spec/behavior/Copy.story.js +14 -2
  16. package/build/stories/spec/behavior/Link.story.js +40 -0
  17. package/build/stories/spec/behavior/Modal.story.js +4 -1
  18. package/build/stories/spec/layouts/Upsell.story.js +1 -1
  19. package/build/stories/spec/step/ScrollToBottom.story.js +103 -0
  20. package/build/test-utils/DynamicFlowWise.js +1 -1
  21. package/build/test-utils/DynamicFlowWiseModal.js +1 -1
  22. package/build/test-utils/openLinkInNewTab.js +15 -0
  23. package/build/tests/NoOp.test.js +194 -0
  24. package/build/tests/ScrollToBottom.test.js +122 -0
  25. package/build/tests/SingleFileUpload.test.js +81 -1
  26. package/build/tests/Submission.test.js +163 -18
  27. package/build/tests/Upsell.test.js +34 -6
  28. package/build/types/controller/FlowController.d.ts +0 -1
  29. package/build/types/controller/FlowController.d.ts.map +1 -1
  30. package/build/types/controller/executeRefresh.d.ts +1 -1
  31. package/build/types/controller/executeRefresh.d.ts.map +1 -1
  32. package/build/types/controller/executeRequest.d.ts +2 -0
  33. package/build/types/controller/executeRequest.d.ts.map +1 -1
  34. package/build/types/controller/executeSubmission.d.ts.map +1 -1
  35. package/build/types/controller/getResponseType.d.ts +2 -2
  36. package/build/types/controller/getResponseType.d.ts.map +1 -1
  37. package/build/types/domain/components/step/ExternalConfirmationComponent.d.ts +2 -3
  38. package/build/types/domain/components/step/ExternalConfirmationComponent.d.ts.map +1 -1
  39. package/build/types/domain/mappers/mapStepToComponent.d.ts.map +1 -1
  40. package/build/types/domain/mappers/schema/types.d.ts +1 -0
  41. package/build/types/domain/mappers/schema/types.d.ts.map +1 -1
  42. package/build/types/renderers/mappers/externalComponentToProps.d.ts.map +1 -1
  43. package/build/types/test-utils/openLinkInNewTab.d.ts.map +1 -0
  44. package/package.json +5 -5
  45. package/build/types/utils/openLinkInNewTab.d.ts.map +0 -1
  46. package/build/utils/openLinkInNewTab.js +0 -10
  47. /package/build/types/{utils → test-utils}/openLinkInNewTab.d.ts +0 -0
@@ -3,11 +3,11 @@ import { act, screen, waitFor } from '@testing-library/react';
3
3
  import { userEvent } from '@testing-library/user-event';
4
4
  import { Button } from '@transferwise/components';
5
5
  import { useState } from 'react';
6
+ import { vi } from 'vitest';
6
7
  import { renderWithProviders, respondWith } from '../test-utils';
7
- import { abortableDelay, respondWithDelay } from '../test-utils/fetch-utils';
8
8
  import DynamicFlowWise from '../test-utils/DynamicFlowWise';
9
+ import { abortableDelay, respondWithDelay } from '../test-utils/fetch-utils';
9
10
  import { createEmptyStep } from '../test-utils/step-utils';
10
- import { vi } from 'vitest';
11
11
  const user = userEvent.setup({ advanceTimers: vi.advanceTimersByTime });
12
12
  const emptyStep = createEmptyStep();
13
13
  const getDefaultProps = () => ({
@@ -16,6 +16,7 @@ const getDefaultProps = () => ({
16
16
  onError: vi.fn(),
17
17
  onEvent: vi.fn(),
18
18
  onLog: vi.fn(),
19
+ onLink: vi.fn(),
19
20
  });
20
21
  const getStep = (model, schema) => {
21
22
  var _a;
@@ -158,9 +159,7 @@ describe('Data submission', () => {
158
159
  });
159
160
  expect(screen.getByText('Please select a currency.')).toBeInTheDocument();
160
161
  });
161
- it('should set loading state on action buttons that were clicked (and set disabled on other buttons) while submitting, and then re-enable them', async () => {
162
- const model = { name: 'Name', number: '12345' };
163
- const step = getStep(model, schema);
162
+ describe('loading state', () => {
164
163
  const httpClient = vi.fn().mockImplementation(async (input, init) => {
165
164
  var _a;
166
165
  return abortableDelay(1, (_a = init === null || init === void 0 ? void 0 : init.signal) !== null && _a !== void 0 ? _a : null).then(async () => respondWith({
@@ -172,16 +171,164 @@ describe('Data submission', () => {
172
171
  schemas: [],
173
172
  }));
174
173
  });
175
- const props = getDefaultProps();
176
- renderWithProviders(_jsx(DynamicFlowWise, Object.assign({ httpClient: httpClient, initialStep: step }, props)));
177
- const submitButton = screen.getByRole('button', { name: 'Submit' });
178
- const otherButton = screen.getByRole('button', { name: 'Other' });
179
- await user.click(submitButton);
180
- expect(submitButton).toHaveAttribute('aria-busy', 'true');
181
- expect(otherButton).toBeDisabled();
182
- await waitFor(() => {
183
- const submitButton2 = screen.getByRole('button', { name: 'Finish' });
184
- expect(submitButton2).toBeEnabled();
174
+ it('should set loading state on action buttons that were clicked (and set disabled on other buttons) while submitting, and then re-enable them', async () => {
175
+ const model = { name: 'Name', number: '12345' };
176
+ const step = getStep(model, schema);
177
+ const props = getDefaultProps();
178
+ renderWithProviders(_jsx(DynamicFlowWise, Object.assign({ httpClient: httpClient, initialStep: step }, props)));
179
+ const submitButton = screen.getByRole('button', { name: 'Submit' });
180
+ const otherButton = screen.getByRole('button', { name: 'Other' });
181
+ await user.click(submitButton);
182
+ expect(submitButton).toHaveAttribute('aria-busy', 'true');
183
+ expect(otherButton).toBeDisabled();
184
+ expect(otherButton).not.toHaveAttribute('aria-busy');
185
+ await waitFor(() => {
186
+ expect(screen.getByText('Next step')).toBeInTheDocument();
187
+ });
188
+ });
189
+ describe('when attempting submission with one button, but validation fails, then submissting with another button', () => {
190
+ it('should only set the loading state of the button that was last pressed', async () => {
191
+ const step = {
192
+ id: 'step-id',
193
+ title: 'Submission test',
194
+ layout: [
195
+ { type: 'box', components: [{ type: 'form', schemaId: '#schema' }] },
196
+ {
197
+ type: 'button',
198
+ title: 'Submit',
199
+ action: { id: 'submit', url: '/submit', method: 'POST' },
200
+ },
201
+ {
202
+ type: 'button',
203
+ title: 'Submit without validation',
204
+ action: {
205
+ id: 'submit-without-validation',
206
+ url: '/submit',
207
+ method: 'POST',
208
+ skipValidation: true,
209
+ },
210
+ },
211
+ ],
212
+ refreshUrl: '/refresh',
213
+ schemas: [
214
+ {
215
+ $id: '#schema',
216
+ title: 'Name',
217
+ type: 'string',
218
+ validationMessages: { required: 'Please enter your name!' },
219
+ },
220
+ ],
221
+ };
222
+ const props = getDefaultProps();
223
+ renderWithProviders(_jsx(DynamicFlowWise, Object.assign({ httpClient: httpClient, initialStep: step }, props)));
224
+ const submitButton = screen.getByRole('button', { name: 'Submit' });
225
+ const submitWithoutValidationButton = screen.getByRole('button', {
226
+ name: 'Submit without validation',
227
+ });
228
+ await user.click(submitButton);
229
+ expect(screen.getByText('Please enter your name!')).toBeInTheDocument();
230
+ await user.click(submitWithoutValidationButton);
231
+ // expect(screen.queryByText('Please enter your name!')).not.toBeInTheDocument();
232
+ expect(submitWithoutValidationButton).toHaveAttribute('aria-busy', 'true');
233
+ expect(submitButton).toBeDisabled();
234
+ expect(submitButton).not.toHaveAttribute('aria-busy');
235
+ });
236
+ });
237
+ describe('link buttons', () => {
238
+ it('should NOT set loading state on link buttons that have been previously clicked', async () => {
239
+ var _a;
240
+ const model = { name: 'Name', number: '12345' };
241
+ const step = {
242
+ id: 'step-id',
243
+ title: 'Submission test',
244
+ layout: [
245
+ { type: 'box', components: [{ type: 'form', schemaId: (_a = schema.$id) !== null && _a !== void 0 ? _a : '' }] },
246
+ {
247
+ type: 'button',
248
+ title: 'Submit',
249
+ behavior: {
250
+ type: 'action',
251
+ action: { id: 'action-id', url: '/submit', method: 'POST' },
252
+ },
253
+ },
254
+ {
255
+ type: 'button',
256
+ title: 'Link',
257
+ behavior: { type: 'link', url: 'https://www.google.com' },
258
+ },
259
+ ],
260
+ schemas: [schema],
261
+ model,
262
+ };
263
+ const props = getDefaultProps();
264
+ renderWithProviders(_jsx(DynamicFlowWise, Object.assign({ httpClient: httpClient, initialStep: step }, props)));
265
+ const submitButton = screen.getByRole('button', { name: 'Submit' });
266
+ const linkButton = screen.getByRole('button', { name: 'Link' });
267
+ await user.click(linkButton);
268
+ expect(props.onLink).toHaveBeenCalled();
269
+ await user.click(submitButton);
270
+ expect(submitButton).toHaveAttribute('aria-busy', 'true');
271
+ expect(linkButton).toBeDisabled();
272
+ expect(linkButton).not.toHaveAttribute('aria-busy');
273
+ await waitFor(() => {
274
+ expect(screen.getByText('Next step')).toBeInTheDocument();
275
+ });
276
+ });
277
+ });
278
+ describe('buttons that trigger modals', () => {
279
+ it('should NOT set loading state on buttons that trigger modals that have been previously clicked', async () => {
280
+ var _a;
281
+ const model = { name: 'Name', number: '12345' };
282
+ const step = {
283
+ id: 'step-id',
284
+ title: 'Submission test',
285
+ layout: [
286
+ { type: 'box', components: [{ type: 'form', schemaId: (_a = schema.$id) !== null && _a !== void 0 ? _a : '' }] },
287
+ {
288
+ type: 'button',
289
+ title: 'Submit',
290
+ behavior: {
291
+ type: 'action',
292
+ action: { id: 'action-id', url: '/submit', method: 'POST' },
293
+ },
294
+ },
295
+ {
296
+ type: 'button',
297
+ title: 'Open Modal',
298
+ behavior: {
299
+ type: 'modal',
300
+ title: 'Open Modal',
301
+ content: [
302
+ {
303
+ type: 'paragraph',
304
+ text: 'This is a modal opened by the submit button.',
305
+ },
306
+ ],
307
+ },
308
+ },
309
+ ],
310
+ schemas: [schema],
311
+ model,
312
+ };
313
+ renderWithProviders(_jsx(DynamicFlowWise, Object.assign({ httpClient: httpClient, initialStep: step }, getDefaultProps())));
314
+ const submitButton = screen.getByRole('button', { name: 'Submit' });
315
+ const modalButton = screen.getByRole('button', { name: 'Open Modal' });
316
+ await user.click(modalButton);
317
+ await waitFor(() => {
318
+ expect(screen.getByText('This is a modal opened by the submit button.')).toBeInTheDocument();
319
+ });
320
+ await user.keyboard('{Escape}');
321
+ await waitFor(() => {
322
+ expect(screen.queryByText('This is a modal opened by the submit button.')).not.toBeInTheDocument();
323
+ });
324
+ await user.click(submitButton);
325
+ expect(submitButton).toHaveAttribute('aria-busy', 'true');
326
+ expect(modalButton).toBeDisabled();
327
+ expect(modalButton).not.toHaveAttribute('aria-busy');
328
+ await waitFor(() => {
329
+ expect(screen.getByText('Next step')).toBeInTheDocument();
330
+ });
331
+ });
185
332
  });
186
333
  });
187
334
  describe('with unreferenced schemas', () => {
@@ -345,9 +492,7 @@ describe('Data submission', () => {
345
492
  const initialStep = {
346
493
  id: 'step-id',
347
494
  title: 'Footer submission test',
348
- layout: [
349
- { type: 'box', components: [{ type: 'form', schemaId: '#schema' }] },
350
- ],
495
+ layout: [{ type: 'box', components: [{ type: 'form', schemaId: '#schema' }] }],
351
496
  footer: [
352
497
  { type: 'form', schemaId: '#footer-schema' },
353
498
  {
@@ -43,12 +43,11 @@ describe('Upsell component', () => {
43
43
  expect(getCloseButton()).not.toBeInTheDocument();
44
44
  });
45
45
  describe('when the call to action is clicked', () => {
46
- it('triggers the specified behavior', async () => {
47
- const onLink = vi.fn();
48
- renderWithProviders(_jsx(DynamicFlowWise, Object.assign({}, props, { onLink: onLink })));
49
- const upgradeButton = screen.getByText('Upgrade now');
50
- await user.click(upgradeButton);
51
- expect(onLink).toHaveBeenCalledWith('/upgrade');
46
+ it('triggers the specified behavior (or for a link, has the correct attributes)', () => {
47
+ renderWithProviders(_jsx(DynamicFlowWise, Object.assign({}, props)));
48
+ const link = screen.getByRole('link', { name: /upgrade now/i });
49
+ expect(link).toHaveAttribute('href', '/upgrade');
50
+ expect(link).toHaveAttribute('target', '_blank');
52
51
  });
53
52
  });
54
53
  });
@@ -123,4 +122,33 @@ describe('Upsell component', () => {
123
122
  });
124
123
  });
125
124
  });
125
+ describe('when the upsell has a link behavior', () => {
126
+ it('does not trigger twice (the renderer handles the href, so the onLink is not called)', async () => {
127
+ const onLink = vi.fn();
128
+ const props = getProps({
129
+ id: 'step-1',
130
+ title: 'Step 1',
131
+ schemas: [],
132
+ layout: [
133
+ {
134
+ type: 'upsell',
135
+ text: 'Try our premium features!',
136
+ callToAction: {
137
+ title: 'Upgrade now',
138
+ behavior: {
139
+ type: 'link',
140
+ url: '/upgrade',
141
+ },
142
+ },
143
+ },
144
+ ],
145
+ });
146
+ renderWithProviders(_jsx(DynamicFlowWise, Object.assign({}, props, { onLink: onLink })));
147
+ const link = screen.getByRole('link');
148
+ expect(link).toHaveAttribute('href', '/upgrade');
149
+ expect(link).toHaveAttribute('target', '_blank');
150
+ await user.click(link);
151
+ expect(onLink).not.toHaveBeenCalled();
152
+ });
153
+ });
126
154
  });
@@ -10,7 +10,6 @@ export type FlowControllerProps = Omit<DynamicFlowCoreProps, 'renderers' | 'feat
10
10
  onChange: () => void;
11
11
  onValueChange: OnValueChange;
12
12
  scrollToTop: ScrollToTop;
13
- onLink: (url: string) => boolean;
14
13
  };
15
14
  export declare const createFlowController: (props: FlowControllerProps) => {
16
15
  rootComponent: import("../domain/components/RootDomainComponent").RootDomainComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"FlowController.d.ts","sourceRoot":"","sources":["../../../src/controller/FlowController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA6B,MAAM,0CAA0C,CAAC;AAMjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAKL,aAAa,EACb,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAShD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvF,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CAClC,CAAC;AAIF,eAAO,MAAM,oBAAoB,GAAI,OAAO,mBAAmB;;;;CA4b9D,CAAC"}
1
+ {"version":3,"file":"FlowController.d.ts","sourceRoot":"","sources":["../../../src/controller/FlowController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA6B,MAAM,0CAA0C,CAAC;AAMjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAKL,aAAa,EACb,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAShD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvF,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAIF,eAAO,MAAM,oBAAoB,GAAI,OAAO,mBAAmB;;;;CAic9D,CAAC"}
@@ -5,7 +5,7 @@ type Command = {
5
5
  step: Step;
6
6
  etag: string | null;
7
7
  } | {
8
- type: 'noop';
8
+ type: 'no-op';
9
9
  } | {
10
10
  type: 'error';
11
11
  body: ErrorResponseBody;
@@ -1 +1 @@
1
- {"version":3,"file":"executeRefresh.d.ts","sourceRoot":"","sources":["../../../src/controller/executeRefresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iB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AAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,eAAO,MAAM,cAAc,GAAU,OAAO;IAC1C,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,EAAE,OAAO,KAAK,CAAC;IACzB,UAAU,EAAE,wBAAwB,CAAC;IACrC,QAAQ,EAAE,sBAAsB,CAAC;CAClC,KAAG,OAAO,CAAC,OAAO,CA4DlB,CAAC"}
@@ -28,6 +28,8 @@ export type Command = {
28
28
  } | {
29
29
  type: 'behavior';
30
30
  behavior: Behavior;
31
+ } | {
32
+ type: 'no-op';
31
33
  };
32
34
  export declare const executeRequest: (props: {
33
35
  exit?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"executeRequest.d.ts","sourceRoot":"","sources":["../../../src/controller/executeRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAU7F,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAIzE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,KAAK,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACzD;IACE,IAAI,EAAE,OAAO,C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,KAAG,OAAO,CAAC,OAAO,CA2ElB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,EAAE,OAAO,KAAK,KAAG,OAKrE,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { JsonElement } from '@wise/dynamic-flow-types/spec';
2
- declare const responseTypes: readonly ["step", "action", "exit", "modal", "subflow"];
2
+ declare const responseTypes: readonly ["step", "action", "exit", "modal", "subflow", "no-op"];
3
3
  export type ResponseType = (typeof responseTypes)[number];
4
4
  /**
5
- * Returns either 'step', 'action', or 'exit' based on the response headers and body.
5
+ * Returns either 'step', 'action', 'exit', 'modal', 'subflow', or 'no-op' based on the response headers and body.
6
6
  * This function takes a response body parameter because, for legacy reasons, we still need to consider the body
7
7
  * to determine the response type, in cases where the response headers are not set.
8
8
  * Ideally it should just be a matter of checking the "X-Df-Response-Type" response header.
@@ -1 +1 @@
1
- {"version":3,"file":"getResponseType.d.ts","sourceRoot":"","sources":["../../../src/controller/getResponseType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG5D,QAAA,MAAM,aAAa,yDAA0D,CAAC;AAC9E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,EAAE,MAAM,WAAW,KAAG,YAYrE,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,KAAG,YAAY,GAAG,SAY3E,CAAC"}
1
+ {"version":3,"file":"getResponseType.d.ts","sourceRoot":"","sources":["../../../src/controller/getResponseType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG5D,QAAA,MAAM,aAAa,kEAAmE,CAAC;AACvF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,EAAE,MAAM,WAAW,KAAG,YAYrE,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,KAAG,YAAY,GAAG,SAY3E,CAAC"}
@@ -5,9 +5,8 @@ export type ExternalConfirmationComponent = BaseComponent & {
5
5
  uid: string;
6
6
  status: 'initial' | 'success' | 'failure' | 'dismissed';
7
7
  url: string;
8
- onSuccess: () => void;
9
- onFailure: () => void;
8
+ open: () => void;
10
9
  onCancel: () => void;
11
10
  };
12
- export declare const createExternalConfirmation: (uid: string, url: string, onComponentUpdate: OnComponentUpdate) => ExternalConfirmationComponent;
11
+ export declare const createExternalConfirmation: (uid: string, url: string, onLink: (url: string) => boolean, onComponentUpdate: OnComponentUpdate) => ExternalConfirmationComponent;
13
12
  //# sourceMappingURL=ExternalConfirmationComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalConfirmationComponent.d.ts","sourceRoot":"","sources":["../../../../../src/domain/components/step/ExternalConfirmationComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG/D,MAAM,MAAM,6BAA6B,GAAG,aAAa,GAAG;IAC1D,IAAI,EAAE,uBAAuB,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,KAAK,MAAM,EACX,KAAK,MAAM,EACX,mBAAmB,iBAAiB,KACnC,6BA2BF,CAAC"}
1
+ {"version":3,"file":"ExternalConfirmationComponent.d.ts","sourceRoot":"","sources":["../../../../../src/domain/components/step/ExternalConfirmationComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG/D,MAAM,MAAM,6BAA6B,GAAG,aAAa,GAAG;IAC1D,IAAI,EAAE,uBAAuB,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,KAAK,MAAM,EACX,KAAK,MAAM,EACX,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,EAChC,mBAAmB,iBAAiB,KACnC,6BAuBF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mapStepToComponent.d.ts","sourceRoot":"","sources":["../../../../src/domain/mappers/mapStepToComponent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAY,YAAY,EAAc,MAAM,EAAE,MAAM,UAAU,CAAC;AAI3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,4BAA4B,CAAC,GAAG;IAC7F,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAC7C,gBAAgB,EAAE,YAAY,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,wFAQhC,eAAe,yEAgHjB,CAAC"}
1
+ {"version":3,"file":"mapStepToComponent.d.ts","sourceRoot":"","sources":["../../../../src/domain/mappers/mapStepToComponent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAY,YAAY,EAAc,MAAM,EAAE,MAAM,UAAU,CAAC;AAI3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,4BAA4B,CAAC,GAAG;IAC7F,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAC7C,gBAAgB,EAAE,YAAY,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,wFAQhC,eAAe,yEAqHjB,CAAC"}
@@ -11,6 +11,7 @@ export type MapperProps = {
11
11
  httpClient: HttpClient;
12
12
  features: FeatureFlags;
13
13
  onBehavior: OnBehavior;
14
+ onLink: (url: string) => boolean;
14
15
  onValueChange: OnValueChange;
15
16
  onComponentUpdate: OnComponentUpdate;
16
17
  trackEvent: AnalyticsEventDispatcher;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/domain/mappers/schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEp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AAC,EAAE,kBAAkB,CAAC;IAExC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"externalComponentToProps.d.ts","sourceRoot":"","sources":["../../../../src/renderers/mappers/externalComponentToProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,eAAO,MAAM,wBAAwB,GACnC,WAAW,6BAA6B,EACxC,qBAAqB,mBAAmB,KACvC,iCAWF,CAAC"}
1
+ {"version":3,"file":"externalComponentToProps.d.ts","sourceRoot":"","sources":["../../../../src/renderers/mappers/externalComponentToProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,eAAO,MAAM,wBAAwB,GACnC,WAAW,6BAA6B,EACxC,qBAAqB,mBAAmB,KACvC,iCAUF,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openLinkInNewTab.d.ts","sourceRoot":"","sources":["../../../src/test-utils/openLinkInNewTab.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,OAa9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "5.9.2",
3
+ "version": "5.11.0",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -44,7 +44,7 @@
44
44
  "@transferwise/components": "^46.129.0",
45
45
  "@transferwise/formatting": "^2.13.5",
46
46
  "@transferwise/icons": "4.1.0",
47
- "@transferwise/navigation-ui": "4.42.1",
47
+ "@transferwise/navigation-ui": "4.42.3",
48
48
  "@transferwise/neptune-css": "14.26.3",
49
49
  "@types/node": "22.19.13",
50
50
  "@types/react": "18.3.28",
@@ -87,7 +87,7 @@
87
87
  "react-intl": "^6 || ^7"
88
88
  },
89
89
  "dependencies": {
90
- "@wise/dynamic-flow-types": "4.9.0"
90
+ "@wise/dynamic-flow-types": "4.11.0"
91
91
  },
92
92
  "scripts": {
93
93
  "dev": "EXCLUDE_VISUAL_TESTS=true pnpm storybook dev -p 3003",
@@ -99,8 +99,8 @@
99
99
  "build:messages-source": "formatjs extract 'src/**/{*.messages,messages}.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
100
100
  "build:compiled-messages": "mkdir -p build/i18n && cp src/i18n/*.json build/i18n",
101
101
  "build:visual-tests": "tsx ./scripts/build-visual-tests.mjs",
102
- "test": "npm-run-all test:once",
103
- "test:once": "vitest run",
102
+ "test": "vitest run --no-isolate",
103
+ "test:ci": "vitest run --no-file-parallelism",
104
104
  "test:coverage": "vitest run --coverage",
105
105
  "test:watch": "vitest",
106
106
  "types": "pnpm tsc",
@@ -1 +0,0 @@
1
- {"version":3,"file":"openLinkInNewTab.d.ts","sourceRoot":"","sources":["../../../src/utils/openLinkInNewTab.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,OAO9C,CAAC"}
@@ -1,10 +0,0 @@
1
- export const openLinkInNewTab = (url) => {
2
- var _a;
3
- try {
4
- const w = (_a = window === null || window === void 0 ? void 0 : window.open) === null || _a === void 0 ? void 0 : _a.call(window, url, '_blank');
5
- return Boolean(w);
6
- }
7
- catch (_b) {
8
- return false;
9
- }
10
- };