@wise/dynamic-flow-client 0.4.0 → 0.4.2

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 (233) hide show
  1. package/build/common/constants/DateMode.js +2 -2
  2. package/build/common/constants/FormControlType.js +2 -2
  3. package/build/common/constants/MonthFormat.js +2 -2
  4. package/build/common/constants/SchemaType.js +2 -2
  5. package/build/common/constants/Size.js +2 -2
  6. package/build/common/constants/index.js +1 -1
  7. package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +15 -27
  8. package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +11 -9
  9. package/build/common/contexts/eventsContext/EventsContext.js +11 -28
  10. package/build/common/contexts/fetcherContexts/FetcherContexts.js +14 -27
  11. package/build/common/contexts/index.js +1 -1
  12. package/build/common/contexts/logContext/LogContext.js +12 -30
  13. package/build/common/hooks/index.js +1 -1
  14. package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +3 -3
  15. package/build/common/hooks/useExternal/useExternal.js +8 -8
  16. package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +20 -31
  17. package/build/common/hooks/usePersistAsync/usePersistAsync.js +60 -139
  18. package/build/common/hooks/usePolling/usePolling.js +20 -21
  19. package/build/common/hooks/usePrevious/usePrevious.js +5 -5
  20. package/build/common/hooks/useStepPolling/useStepPolling.js +15 -14
  21. package/build/common/makeFetcher/index.js +1 -1
  22. package/build/common/makeFetcher/makeFetcher.js +10 -24
  23. package/build/common/messages.js +5 -5
  24. package/build/common/utils/api-utils.js +3 -4
  25. package/build/common/utils/date-utils.js +11 -11
  26. package/build/common/utils/debounce.js +11 -15
  27. package/build/common/utils/file-utils.js +12 -25
  28. package/build/common/utils/id-utils.js +4 -5
  29. package/build/common/utils/index.js +1 -1
  30. package/build/common/utils/is-equal.js +8 -8
  31. package/build/common/utils/schema-utils.js +6 -6
  32. package/build/common/utils/step-utils.js +14 -14
  33. package/build/common/validators/index.js +7 -7
  34. package/build/common/validators/models/model-validators.js +8 -8
  35. package/build/common/validators/models/models.utils.js +29 -42
  36. package/build/common/validators/schemas/schema-validators.js +11 -13
  37. package/build/common/validators/types/type-validators.js +9 -13
  38. package/build/common/validators/validationFailures/validation-failures.js +14 -14
  39. package/build/common/validators/validationFailures/validation-failures.utils.js +5 -7
  40. package/build/common/validators/values/value-validators.js +4 -6
  41. package/build/dynamicFlow/DynamicFlow.js +185 -307
  42. package/build/dynamicFlow/DynamicFlowStep.js +12 -23
  43. package/build/dynamicFlow/DynamicFlowTypes.js +1 -1
  44. package/build/dynamicFlow/index.js +6 -14
  45. package/build/dynamicFlow/stories/DynamicFlow.story.js +20 -20
  46. package/build/dynamicFlow/stories/EditableDynamicFlow.js +20 -33
  47. package/build/dynamicFlow/stories/fixtureFetcher.js +46 -104
  48. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +22 -40
  49. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +6 -6
  50. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +10 -11
  51. package/build/dynamicFlow/utils/index.js +5 -2
  52. package/build/dynamicFlow/utils/responseParsers/response-parsers.js +53 -118
  53. package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +9 -9
  54. package/build/dynamicFlow/utils/useDynamicFlowState.js +51 -74
  55. package/build/dynamicFlow/utils/useLoader.js +9 -20
  56. package/build/fixtures/components/alert.js +8 -8
  57. package/build/fixtures/components/box.js +7 -7
  58. package/build/fixtures/components/button.js +25 -36
  59. package/build/fixtures/components/columns.js +10 -10
  60. package/build/fixtures/components/copyable.js +6 -6
  61. package/build/fixtures/components/decision.js +15 -15
  62. package/build/fixtures/components/heading.js +7 -7
  63. package/build/fixtures/components/image.js +10 -10
  64. package/build/fixtures/components/index.js +17 -25
  65. package/build/fixtures/components/info.js +22 -6
  66. package/build/fixtures/components/list.js +8 -8
  67. package/build/fixtures/components/loading-indicator.js +5 -5
  68. package/build/fixtures/components/paragraph.js +9 -9
  69. package/build/fixtures/components/review.js +11 -11
  70. package/build/fixtures/examples/camera-capture.js +29 -29
  71. package/build/fixtures/examples/index.js +9 -17
  72. package/build/fixtures/examples/recipient-update.js +69 -69
  73. package/build/fixtures/examples/recipient.js +63 -63
  74. package/build/fixtures/examples/single-file-upload.js +21 -21
  75. package/build/fixtures/examples/step-validation-errors.js +21 -21
  76. package/build/fixtures/features/action-response.js +8 -8
  77. package/build/fixtures/features/external.js +8 -8
  78. package/build/fixtures/features/index.js +9 -17
  79. package/build/fixtures/features/persist-async.js +11 -11
  80. package/build/fixtures/features/polling.js +9 -9
  81. package/build/fixtures/features/validation-async.js +10 -10
  82. package/build/fixtures/index.js +11 -22
  83. package/build/fixtures/jsonSchemaForm/allOf.js +30 -30
  84. package/build/fixtures/jsonSchemaForm/audRecipient.js +271 -271
  85. package/build/fixtures/jsonSchemaForm/currency.js +12 -12
  86. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +11 -11
  87. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +11 -11
  88. package/build/fixtures/jsonSchemaForm/oneOf.js +27 -27
  89. package/build/fixtures/jsonSchemaForm/oneOfTabs.js +16 -16
  90. package/build/fixtures/jsonSchemaForm/promotedOneOf.js +17 -17
  91. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +30 -30
  92. package/build/fixtures/jsonSchemaForm/simple.js +16 -16
  93. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +19 -19
  94. package/build/fixtures/jsonSchemaForm/validationAsync.js +8 -8
  95. package/build/fixtures/layouts/all.js +37 -37
  96. package/build/fixtures/layouts/final-step-layout.js +9 -9
  97. package/build/fixtures/layouts/index.js +10 -18
  98. package/build/fixtures/layouts/list.js +10 -10
  99. package/build/fixtures/layouts/pay-in.js +23 -23
  100. package/build/fixtures/layouts/review.js +38 -38
  101. package/build/fixtures/layouts/success.js +15 -15
  102. package/build/fixtures/responses/action-response-final.js +8 -8
  103. package/build/fixtures/responses/action.js +3 -3
  104. package/build/fixtures/responses/exit.js +3 -3
  105. package/build/fixtures/responses/index.js +8 -16
  106. package/build/fixtures/responses/recipient-update-final.js +8 -8
  107. package/build/fixtures/schemas/basic-form.js +11 -11
  108. package/build/fixtures/schemas/index.js +8 -16
  109. package/build/fixtures/schemas/number-and-integer.js +11 -11
  110. package/build/fixtures/schemas/one-of.js +43 -46
  111. package/build/fixtures/schemas/string-formats.js +15 -15
  112. package/build/fixtures/utils/image-util.js +8 -8
  113. package/build/formControl/FormControl.js +118 -148
  114. package/build/formControl/index.js +6 -14
  115. package/build/formControl/utils/index.js +1 -1
  116. package/build/formControl/utils/value-utils.js +18 -23
  117. package/build/i18n/index.js +31 -31
  118. package/build/index.js +13 -10
  119. package/build/jsonSchemaForm/JsonSchemaForm.js +12 -24
  120. package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +24 -37
  121. package/build/jsonSchemaForm/allOfSchema/index.js +6 -14
  122. package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +9 -20
  123. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +9 -20
  124. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +6 -14
  125. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +56 -115
  126. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +7 -7
  127. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +6 -14
  128. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +1 -1
  129. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +19 -71
  130. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +10 -11
  131. package/build/jsonSchemaForm/arrayTypeSchema/index.js +6 -14
  132. package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +45 -62
  133. package/build/jsonSchemaForm/basicTypeSchema/index.js +6 -14
  134. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +39 -50
  135. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +18 -18
  136. package/build/jsonSchemaForm/controlFeedback/index.js +6 -14
  137. package/build/jsonSchemaForm/genericSchema/GenericSchema.js +52 -61
  138. package/build/jsonSchemaForm/genericSchema/index.js +6 -14
  139. package/build/jsonSchemaForm/help/Help.js +9 -9
  140. package/build/jsonSchemaForm/help/Help.messages.js +5 -5
  141. package/build/jsonSchemaForm/help/index.js +6 -14
  142. package/build/jsonSchemaForm/index.js +6 -14
  143. package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +28 -49
  144. package/build/jsonSchemaForm/objectSchema/index.js +6 -14
  145. package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +54 -74
  146. package/build/jsonSchemaForm/oneOfSchema/index.js +6 -14
  147. package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +3 -3
  148. package/build/jsonSchemaForm/oneOfSchema/utils/index.js +1 -1
  149. package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +19 -20
  150. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +11 -22
  151. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +5 -5
  152. package/build/jsonSchemaForm/persistAsyncSchema/index.js +6 -14
  153. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +73 -127
  154. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +6 -14
  155. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +45 -110
  156. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +17 -17
  157. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +6 -14
  158. package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +28 -47
  159. package/build/jsonSchemaForm/promotedOneOfSchema/index.js +6 -14
  160. package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +4 -4
  161. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +13 -24
  162. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +11 -22
  163. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +12 -23
  164. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +24 -26
  165. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +6 -6
  166. package/build/jsonSchemaForm/readOnlySchema/index.js +6 -14
  167. package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +26 -39
  168. package/build/jsonSchemaForm/schemaFormControl/index.js +6 -14
  169. package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +5 -5
  170. package/build/jsonSchemaForm/schemaFormControl/utils/index.js +1 -1
  171. package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +30 -47
  172. package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +57 -119
  173. package/build/jsonSchemaForm/validationAsyncSchema/index.js +6 -14
  174. package/build/layout/DynamicLayout.js +10 -21
  175. package/build/layout/alert/DynamicAlert.js +9 -9
  176. package/build/layout/box/DynamicBox.js +12 -23
  177. package/build/layout/button/DynamicButton.js +16 -27
  178. package/build/layout/columns/DynamicColumns.js +13 -24
  179. package/build/layout/decision/DynamicDecision.js +16 -27
  180. package/build/layout/divider/DynamicDivider.js +7 -8
  181. package/build/layout/external/DynamicExternal.js +16 -28
  182. package/build/layout/external/DynamicExternal.messages.js +5 -5
  183. package/build/layout/form/DynamicForm.js +10 -21
  184. package/build/layout/heading/DynamicHeading.js +12 -23
  185. package/build/layout/icon/DynamicIcon.js +9 -10
  186. package/build/layout/image/DynamicImage.js +43 -93
  187. package/build/layout/index.js +21 -29
  188. package/build/layout/info/DynamicInfo.js +7 -19
  189. package/build/layout/list/DynamicList.js +14 -26
  190. package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +8 -9
  191. package/build/layout/paragraph/DynamicParagraph.js +19 -37
  192. package/build/layout/paragraph/DynamicParagraph.messages.js +6 -6
  193. package/build/layout/paragraph/useSnackBarIfAvailable.js +4 -4
  194. package/build/layout/review/DynamicReview.js +14 -26
  195. package/build/layout/utils.js +4 -6
  196. package/build/step/cameraStep/CameraStep.js +42 -88
  197. package/build/step/cameraStep/cameraCapture/CameraCapture.js +48 -105
  198. package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +7 -7
  199. package/build/step/cameraStep/cameraCapture/components/index.js +10 -28
  200. package/build/step/cameraStep/cameraCapture/hooks/index.js +17 -72
  201. package/build/step/cameraStep/cameraCapture/index.js +6 -14
  202. package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +33 -45
  203. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +8 -19
  204. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +6 -6
  205. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +9 -21
  206. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +7 -7
  207. package/build/step/cameraStep/cameraCapture/screens/index.js +6 -14
  208. package/build/step/cameraStep/cameraCapture/tracking/index.js +17 -99
  209. package/build/step/cameraStep/cameraCapture/utils/index.js +33 -96
  210. package/build/step/cameraStep/index.js +6 -14
  211. package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +20 -21
  212. package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +8 -8
  213. package/build/step/externalConfirmationStep/index.js +6 -14
  214. package/build/step/index.js +7 -15
  215. package/build/step/layoutStep/LayoutStep.js +19 -19
  216. package/build/step/layoutStep/index.js +6 -14
  217. package/build/step/layoutStep/utils/index.js +3 -14
  218. package/build/step/layoutStep/utils/inline-reference-utils.js +29 -46
  219. package/build/step/layoutStep/utils/layout-utils.js +34 -53
  220. package/build/types/common/FormControl.js +1 -1
  221. package/build/types/index.js +13 -13
  222. package/build/types/specification/Action.js +1 -1
  223. package/build/types/specification/FileUploadSchema.js +1 -1
  224. package/build/types/specification/LayoutComponent.js +1 -1
  225. package/build/types/specification/Model.js +9 -17
  226. package/build/types/specification/PersistAsync.js +1 -1
  227. package/build/types/specification/Polling.js +1 -1
  228. package/build/types/specification/Promotion.js +1 -1
  229. package/build/types/specification/Schema.js +8 -8
  230. package/build/types/specification/Step.js +3 -5
  231. package/build/types/specification/ValidationAsync.js +1 -1
  232. package/build/types/specification/core.js +1 -1
  233. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var layout = [
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const layout = [
4
4
  {
5
5
  type: 'box',
6
6
  width: 'xs',
@@ -8,9 +8,9 @@ var layout = [
8
8
  {
9
9
  type: 'image',
10
10
  url: 'https://transferwise.com/staticrab/homepage/_next/static/images/how_to_2-06281f8ea9caa50445f075d460434bcf.svg',
11
- text: 'An illustration'
11
+ text: 'An illustration',
12
12
  },
13
- ]
13
+ ],
14
14
  },
15
15
  {
16
16
  type: 'box',
@@ -19,9 +19,9 @@ var layout = [
19
19
  {
20
20
  type: 'heading',
21
21
  align: 'center',
22
- text: "You've scheduled a monthly payment of 100 EUR to Rayna Kenter"
22
+ text: "You've scheduled a monthly payment of 100 EUR to Rayna Kenter",
23
23
  },
24
- ]
24
+ ],
25
25
  },
26
26
  {
27
27
  type: 'box',
@@ -31,12 +31,12 @@ var layout = [
31
31
  type: 'info',
32
32
  align: 'center',
33
33
  markdown: 'Your first payment has been sent **now**',
34
- margin: 'xs'
34
+ margin: 'xs',
35
35
  },
36
36
  {
37
37
  type: 'paragraph',
38
38
  align: 'center',
39
- text: 'Your next payment will be made on July 29th, 2020 (BST)'
39
+ text: 'Your next payment will be made on July 29th, 2020 (BST)',
40
40
  },
41
41
  {
42
42
  type: 'columns',
@@ -46,8 +46,8 @@ var layout = [
46
46
  action: {
47
47
  title: 'Check transfer details',
48
48
  url: '/check',
49
- method: 'GET'
50
- }
49
+ method: 'GET',
50
+ },
51
51
  },
52
52
  ],
53
53
  right: [
@@ -57,12 +57,12 @@ var layout = [
57
57
  title: 'Invite & earn',
58
58
  url: '/check',
59
59
  method: 'GET',
60
- type: 'primary'
61
- }
60
+ type: 'primary',
61
+ },
62
62
  },
63
- ]
63
+ ],
64
64
  },
65
- ]
65
+ ],
66
66
  },
67
67
  ];
68
- exports["default"] = layout;
68
+ exports.default = layout;
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  type: 'form',
5
5
  key: 'action-response-final',
6
6
  title: 'Action Response Final Step',
7
- description: "This step was loaded as a result of an Action Response.",
7
+ description: `This step was loaded as a result of an Action Response.`,
8
8
  actions: [],
9
9
  schemas: [],
10
10
  layout: [
11
11
  {
12
12
  type: 'alert',
13
13
  markdown: 'If you want to see this again, perhaps go back to "Action Response" story.',
14
- context: 'positive'
14
+ context: 'positive',
15
15
  },
16
16
  {
17
17
  type: 'button',
18
18
  action: {
19
19
  title: 'Start Over',
20
20
  type: 'primary',
21
- url: '/steps/actionResponse'
22
- }
21
+ url: '/steps/actionResponse',
22
+ },
23
23
  },
24
- ]
24
+ ],
25
25
  };
26
- exports["default"] = step;
26
+ exports.default = step;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var action = { action: { url: '/responses/success', method: 'POST' } };
4
- exports["default"] = action;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = { action: { url: '/responses/success', method: 'POST' } };
4
+ exports.default = action;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var exit = { id: '123456', name: 'Bob Loblaw', country: 'US' };
4
- exports["default"] = exit;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const exit = { id: '123456', name: 'Bob Loblaw', country: 'US' };
4
+ exports.default = exit;
@@ -1,22 +1,14 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- exports.__esModule = true;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
14
6
  exports.recipientUpdateFinal = exports.exit = exports.actionResponseFinal = exports.action = void 0;
15
7
  var action_1 = require("./action");
16
- __createBinding(exports, action_1, "default", "action");
8
+ Object.defineProperty(exports, "action", { enumerable: true, get: function () { return __importDefault(action_1).default; } });
17
9
  var action_response_final_1 = require("./action-response-final");
18
- __createBinding(exports, action_response_final_1, "default", "actionResponseFinal");
10
+ Object.defineProperty(exports, "actionResponseFinal", { enumerable: true, get: function () { return __importDefault(action_response_final_1).default; } });
19
11
  var exit_1 = require("./exit");
20
- __createBinding(exports, exit_1, "default", "exit");
12
+ Object.defineProperty(exports, "exit", { enumerable: true, get: function () { return __importDefault(exit_1).default; } });
21
13
  var recipient_update_final_1 = require("./recipient-update-final");
22
- __createBinding(exports, recipient_update_final_1, "default", "recipientUpdateFinal");
14
+ Object.defineProperty(exports, "recipientUpdateFinal", { enumerable: true, get: function () { return __importDefault(recipient_update_final_1).default; } });
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  type: 'form',
5
5
  key: 'recipient-update-final',
6
6
  title: 'Recipient Update Final Step',
7
- description: "The recipient has been updated.",
7
+ description: `The recipient has been updated.`,
8
8
  actions: [],
9
9
  schemas: [],
10
10
  layout: [
11
11
  {
12
12
  type: 'alert',
13
13
  markdown: 'Nothing to see here.',
14
- context: 'positive'
14
+ context: 'positive',
15
15
  },
16
16
  {
17
17
  type: 'button',
18
18
  action: {
19
19
  title: 'Start Over',
20
20
  type: 'primary',
21
- url: '/steps/recipientUpdate'
22
- }
21
+ url: '/steps/recipientUpdate',
22
+ },
23
23
  },
24
- ]
24
+ ],
25
25
  };
26
- exports["default"] = step;
26
+ exports.default = step;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  key: 'Schemas/Basic Form',
5
5
  title: 'Simple Form',
6
6
  description: 'A simple form with text fields and a checkbox.',
@@ -14,28 +14,28 @@ var step = {
14
14
  properties: {
15
15
  name: {
16
16
  title: 'Name (string schema)',
17
- type: 'string'
17
+ type: 'string',
18
18
  },
19
19
  pineapple: {
20
20
  title: 'Pineapple on pizza (boolean schema)',
21
- type: 'boolean'
22
- }
23
- }
21
+ type: 'boolean',
22
+ },
23
+ },
24
24
  },
25
25
  ],
26
26
  layout: [
27
27
  {
28
28
  type: 'form',
29
- schema: { $ref: '#the-schema' }
29
+ schema: { $ref: '#the-schema' },
30
30
  },
31
31
  {
32
32
  type: 'button',
33
33
  action: {
34
34
  url: '/submit',
35
35
  title: 'Submit',
36
- type: 'primary'
37
- }
36
+ type: 'primary',
37
+ },
38
38
  },
39
- ]
39
+ ],
40
40
  };
41
- exports["default"] = step;
41
+ exports.default = step;
@@ -1,22 +1,14 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- exports.__esModule = true;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
14
6
  exports.stringFormats = exports.oneOf = exports.numberAndInteger = exports.simpleForm = void 0;
15
7
  var basic_form_1 = require("./basic-form");
16
- __createBinding(exports, basic_form_1, "default", "simpleForm");
8
+ Object.defineProperty(exports, "simpleForm", { enumerable: true, get: function () { return __importDefault(basic_form_1).default; } });
17
9
  var number_and_integer_1 = require("./number-and-integer");
18
- __createBinding(exports, number_and_integer_1, "default", "numberAndInteger");
10
+ Object.defineProperty(exports, "numberAndInteger", { enumerable: true, get: function () { return __importDefault(number_and_integer_1).default; } });
19
11
  var one_of_1 = require("./one-of");
20
- __createBinding(exports, one_of_1, "default", "oneOf");
12
+ Object.defineProperty(exports, "oneOf", { enumerable: true, get: function () { return __importDefault(one_of_1).default; } });
21
13
  var string_formats_1 = require("./string-formats");
22
- __createBinding(exports, string_formats_1, "default", "stringFormats");
14
+ Object.defineProperty(exports, "stringFormats", { enumerable: true, get: function () { return __importDefault(string_formats_1).default; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  key: 'Schemas/Number And Integer',
5
5
  title: 'Number and Integer Schemas',
6
6
  description: 'Number and Integer Schemas.',
@@ -15,29 +15,29 @@ var step = {
15
15
  'some-number': {
16
16
  title: 'Number (number schema)',
17
17
  type: 'number',
18
- validationMessages: { type: 'This is not an number' }
18
+ validationMessages: { type: 'This is not an number' },
19
19
  },
20
20
  'some-integer': {
21
21
  title: 'Integer (integer schema, does not support decimals)',
22
22
  type: 'integer',
23
- validationMessages: { type: 'This is not an integer' }
24
- }
25
- }
23
+ validationMessages: { type: 'This is not an integer' },
24
+ },
25
+ },
26
26
  },
27
27
  ],
28
28
  layout: [
29
29
  {
30
30
  type: 'form',
31
- schema: { $ref: '#the-schema' }
31
+ schema: { $ref: '#the-schema' },
32
32
  },
33
33
  {
34
34
  type: 'button',
35
35
  action: {
36
36
  url: '/submit',
37
37
  title: 'Submit',
38
- type: 'primary'
39
- }
38
+ type: 'primary',
39
+ },
40
40
  },
41
- ]
41
+ ],
42
42
  };
43
- exports["default"] = step;
43
+ exports.default = step;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var currencies = [
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const currencies = [
4
4
  ['EUR', 'Euro'],
5
5
  ['GBP', 'British pound'],
6
6
  ['INR', 'Indian rupee'],
@@ -62,7 +62,7 @@ var currencies = [
62
62
  ['ZAR', 'South African rand'],
63
63
  ['ZMW', 'Zambian kwacha'],
64
64
  ];
65
- var step = {
65
+ const step = {
66
66
  key: 'Schemas/OneOf',
67
67
  title: 'OneOf Schemas',
68
68
  description: 'OneOf Schema using select, radio buttons and tabs.',
@@ -84,19 +84,19 @@ var step = {
84
84
  title: 'Personal',
85
85
  analyticsId: 'account-type-radio-personal',
86
86
  icon: {
87
- name: 'person'
87
+ name: 'person',
88
88
  },
89
- "const": 'PERSONAL'
89
+ const: 'PERSONAL',
90
90
  },
91
91
  {
92
92
  title: 'Business',
93
93
  analyticsId: 'account-type-radio-business',
94
94
  icon: {
95
- name: 'briefcase'
95
+ name: 'briefcase',
96
96
  },
97
- "const": 'BUSINESS'
97
+ const: 'BUSINESS',
98
98
  },
99
- ]
99
+ ],
100
100
  },
101
101
  'colour-select': {
102
102
  title: 'What is your favourite colour? (oneOf schema with more than two options default to control: "select")',
@@ -107,44 +107,41 @@ var step = {
107
107
  title: 'Blue',
108
108
  analyticsId: 'colour-select-blue',
109
109
  image: {
110
- url: 'https://placeholder.pics/svg/64/0099ff/FFFFFF'
110
+ url: 'https://placeholder.pics/svg/64/0099ff/FFFFFF',
111
111
  },
112
- "const": 1
112
+ const: 1,
113
113
  },
114
114
  {
115
115
  title: 'Yellow',
116
116
  analyticsId: 'colour-select-yellow',
117
117
  image: {
118
- url: 'https://placeholder.pics/svg/64/ffcc00/FFFFFF'
118
+ url: 'https://placeholder.pics/svg/64/ffcc00/FFFFFF',
119
119
  },
120
- "const": 2
120
+ const: 2,
121
121
  },
122
122
  {
123
123
  title: 'Red',
124
124
  analyticsId: 'colour-select-red',
125
125
  image: {
126
- url: 'https://placeholder.pics/svg/64/ff6600/FFFFFF'
126
+ url: 'https://placeholder.pics/svg/64/ff6600/FFFFFF',
127
127
  },
128
- "const": 3
128
+ const: 3,
129
129
  },
130
- ]
130
+ ],
131
131
  },
132
132
  currency: {
133
133
  title: 'Currency (oneof schema of const schemas with default value)',
134
134
  type: 'string',
135
135
  analyticsId: 'currency',
136
- oneOf: currencies.map(function (_a) {
137
- var code = _a[0], name = _a[1];
138
- return ({
139
- title: code,
140
- analyticsId: code,
141
- icon: { name: "flag-".concat(code.toLowerCase()) },
142
- description: name,
143
- "const": code
144
- });
145
- }),
136
+ oneOf: currencies.map(([code, name]) => ({
137
+ title: code,
138
+ analyticsId: code,
139
+ icon: { name: `flag-${code.toLowerCase()}` },
140
+ description: name,
141
+ const: code,
142
+ })),
146
143
  validationMessages: { required: 'Please enter currency.' },
147
- "default": 'EUR'
144
+ default: 'EUR',
148
145
  },
149
146
  'bank-details-tabs': {
150
147
  title: 'Bank Details (oneOf schema of object schemas and control: "tab")',
@@ -160,13 +157,13 @@ var step = {
160
157
  properties: {
161
158
  'account-number': {
162
159
  title: 'Account Number',
163
- type: 'string'
160
+ type: 'string',
164
161
  },
165
162
  'sort-code': {
166
163
  title: 'Sort Code',
167
- type: 'string'
168
- }
169
- }
164
+ type: 'string',
165
+ },
166
+ },
170
167
  },
171
168
  {
172
169
  type: 'object',
@@ -177,13 +174,13 @@ var step = {
177
174
  properties: {
178
175
  iban: {
179
176
  title: 'IBAN',
180
- type: 'string'
177
+ type: 'string',
181
178
  },
182
179
  bic: {
183
180
  title: 'BIC',
184
- type: 'string'
185
- }
186
- }
181
+ type: 'string',
182
+ },
183
+ },
187
184
  },
188
185
  {
189
186
  type: 'object',
@@ -194,32 +191,32 @@ var step = {
194
191
  properties: {
195
192
  'account-number': {
196
193
  title: 'Account Number',
197
- type: 'string'
194
+ type: 'string',
198
195
  },
199
196
  'routing-number': {
200
197
  title: 'Routing Number',
201
- type: 'string'
202
- }
203
- }
198
+ type: 'string',
199
+ },
200
+ },
204
201
  },
205
- ]
206
- }
207
- }
202
+ ],
203
+ },
204
+ },
208
205
  },
209
206
  ],
210
207
  layout: [
211
208
  {
212
209
  type: 'form',
213
- schema: { $ref: '#the-schema' }
210
+ schema: { $ref: '#the-schema' },
214
211
  },
215
212
  {
216
213
  type: 'button',
217
214
  action: {
218
215
  url: '/submit',
219
216
  title: 'Submit',
220
- type: 'primary'
221
- }
217
+ type: 'primary',
218
+ },
222
219
  },
223
- ]
220
+ ],
224
221
  };
225
- exports["default"] = step;
222
+ exports.default = step;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  key: 'Schemas/String Formats',
5
5
  title: 'String Schema Formats',
6
6
  description: 'String schemas with different formats (password, date, telephone).',
@@ -14,17 +14,17 @@ var step = {
14
14
  properties: {
15
15
  name: {
16
16
  title: 'Name (string schema no format)',
17
- type: 'string'
17
+ type: 'string',
18
18
  },
19
19
  password: {
20
20
  title: 'Password (string schema with format: "password")',
21
21
  type: 'string',
22
- format: 'password'
22
+ format: 'password',
23
23
  },
24
24
  dob: {
25
25
  title: 'Date of birth (string schema with format: "date")',
26
26
  type: 'string',
27
- format: 'date'
27
+ format: 'date',
28
28
  },
29
29
  'date-lookup': {
30
30
  title: 'Date Lookup (string schema with format: "date" and control: "date-lookup")',
@@ -33,32 +33,32 @@ var step = {
33
33
  control: 'date-lookup',
34
34
  minimum: '2023-01-01',
35
35
  maximum: '2023-12-31',
36
- placeholder: 'Select a date'
36
+ placeholder: 'Select a date',
37
37
  },
38
38
  telephone: {
39
39
  title: 'Phone number (string schema with format: "phone-number")',
40
40
  type: 'string',
41
- format: 'phone-number'
42
- }
43
- }
41
+ format: 'phone-number',
42
+ },
43
+ },
44
44
  },
45
45
  ],
46
46
  layout: [
47
47
  {
48
48
  type: 'form',
49
- schema: { $ref: '#the-schema' }
49
+ schema: { $ref: '#the-schema' },
50
50
  },
51
51
  {
52
52
  type: 'button',
53
53
  action: {
54
54
  url: '/submit',
55
55
  title: 'Submit',
56
- type: 'primary'
57
- }
56
+ type: 'primary',
57
+ },
58
58
  },
59
59
  ],
60
60
  model: {
61
- 'date-lookup': '2023-01-01'
62
- }
61
+ 'date-lookup': '2023-01-01',
62
+ },
63
63
  };
64
- exports["default"] = step;
64
+ exports.default = step;
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getImageStep = void 0;
4
- var getImageStep = function (size) {
4
+ const getImageStep = (size) => {
5
5
  return {
6
6
  type: 'form',
7
- key: "Components/Image-".concat(size),
8
- title: "Image Component - ".concat(size),
9
- description: "This is an image with size: \"".concat(size, "\""),
7
+ key: `Components/Image-${size}`,
8
+ title: `Image Component - ${size}`,
9
+ description: `This is an image with size: "${size}"`,
10
10
  actions: [],
11
11
  schemas: [],
12
12
  layout: [
13
13
  {
14
14
  type: 'image',
15
15
  url: 'http://placekitten.com/g/400/400',
16
- text: "This is an image with size: \"".concat(size, "\""),
17
- size: size
16
+ text: `This is an image with size: "${size}"`,
17
+ size,
18
18
  },
19
- ]
19
+ ],
20
20
  };
21
21
  };
22
22
  exports.getImageStep = getImageStep;