@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 schema = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schema = {
4
4
  title: 'Object schema',
5
5
  type: 'object',
6
6
  properties: {
@@ -11,15 +11,15 @@ var schema = {
11
11
  validationAsync: {
12
12
  method: 'POST',
13
13
  url: '/v1/iban/validate',
14
- param: 'iban'
15
- }
14
+ param: 'iban',
15
+ },
16
16
  },
17
17
  number: {
18
18
  type: 'number',
19
- title: 'Number'
20
- }
19
+ title: 'Number',
20
+ },
21
21
  },
22
22
  required: ['iban'],
23
- displayOrder: ['iban', 'number']
23
+ displayOrder: ['iban', 'number'],
24
24
  };
25
- exports["default"] = schema;
25
+ exports.default = schema;
@@ -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: 'md',
@@ -10,20 +10,20 @@ var layout = [
10
10
  text: 'This is a large heading',
11
11
  size: 'lg',
12
12
  align: 'center',
13
- margin: 'md'
13
+ margin: 'md',
14
14
  },
15
15
  {
16
16
  type: 'paragraph',
17
17
  text: 'This is a paragraph of text. This is a paragraph of text. This is a paragraph of text.',
18
18
  align: 'center',
19
- margin: 'xl'
19
+ margin: 'xl',
20
20
  },
21
21
  {
22
22
  type: 'loading-indicator',
23
23
  size: 'lg',
24
- margin: 'md'
24
+ margin: 'md',
25
25
  },
26
- ]
26
+ ],
27
27
  },
28
28
  {
29
29
  type: 'columns',
@@ -37,11 +37,11 @@ var layout = [
37
37
  type: 'heading',
38
38
  text: 'Small heading',
39
39
  size: 'sm',
40
- margin: 'md'
40
+ margin: 'md',
41
41
  },
42
42
  {
43
43
  type: 'divider',
44
- margin: 'xl'
44
+ margin: 'xl',
45
45
  },
46
46
  {
47
47
  type: 'review',
@@ -52,26 +52,26 @@ var layout = [
52
52
  $id: 'edit-profile',
53
53
  title: 'Edit',
54
54
  url: '/edit',
55
- method: 'GET'
55
+ method: 'GET',
56
56
  },
57
57
  fields: [
58
58
  {
59
59
  label: 'First name',
60
- value: 'John'
60
+ value: 'John',
61
61
  },
62
62
  {
63
63
  label: 'Last name',
64
- value: 'Smith'
64
+ value: 'Smith',
65
65
  },
66
- ]
66
+ ],
67
67
  },
68
68
  {
69
69
  type: 'image',
70
70
  text: 'An image of cascading stylesheet computer code',
71
71
  url: 'https://bootstrap.transferwise.com/assets/img/css2-bg.jpg',
72
- margin: 'xs'
72
+ margin: 'xs',
73
73
  },
74
- ]
74
+ ],
75
75
  },
76
76
  ],
77
77
  right: [
@@ -86,7 +86,7 @@ var layout = [
86
86
  // },
87
87
  alert: {
88
88
  markdown: 'Make sure you get this correct, or your transfer could be held up!',
89
- context: 'neutral'
89
+ context: 'neutral',
90
90
  },
91
91
  displayOrder: ['firstname', 'lastname'],
92
92
  properties: {
@@ -95,30 +95,30 @@ var layout = [
95
95
  title: 'First name',
96
96
  alert: {
97
97
  markdown: 'Please use **only** latin characters.',
98
- context: 'warning'
99
- }
98
+ context: 'warning',
99
+ },
100
100
  },
101
101
  lastname: {
102
102
  type: 'string',
103
103
  title: 'Last name',
104
104
  minLength: 3,
105
105
  help: {
106
- markdown: 'help!'
107
- }
108
- }
109
- }
110
- }
106
+ markdown: 'help!',
107
+ },
108
+ },
109
+ },
110
+ },
111
111
  },
112
112
  {
113
113
  type: 'alert',
114
114
  markdown: 'This is an alert - we can use **bold** to provide emphasis.',
115
- context: 'warning'
115
+ context: 'warning',
116
116
  },
117
117
  {
118
118
  type: 'info',
119
- markdown: '### This heading comes from markdown \n\r We can use markdown to add [links](https://transferwise.com) and _other_ **formatting** \n\r. It will also let us add simple lists: \n - one\n - two\n - #### three'
119
+ markdown: '### This heading comes from markdown \n\r We can use markdown to add [links](https://transferwise.com) and _other_ **formatting** \n\r. It will also let us add simple lists: \n - one\n - two\n - #### three',
120
120
  },
121
- ]
121
+ ],
122
122
  },
123
123
  {
124
124
  type: 'box',
@@ -131,8 +131,8 @@ var layout = [
131
131
  url: '',
132
132
  method: 'GET',
133
133
  data: {},
134
- type: 'primary'
135
- }
134
+ type: 'primary',
135
+ },
136
136
  },
137
137
  {
138
138
  type: 'button',
@@ -141,10 +141,10 @@ var layout = [
141
141
  url: '',
142
142
  method: 'GET',
143
143
  data: {},
144
- disabled: true
145
- }
144
+ disabled: true,
145
+ },
146
146
  },
147
- ]
147
+ ],
148
148
  },
149
149
  {
150
150
  type: 'decision',
@@ -157,9 +157,9 @@ var layout = [
157
157
  url: '/option1',
158
158
  method: 'POST',
159
159
  data: {
160
- a: 1
161
- }
162
- }
160
+ a: 1,
161
+ },
162
+ },
163
163
  },
164
164
  {
165
165
  title: 'More information about this option',
@@ -169,10 +169,10 @@ var layout = [
169
169
  url: '/option2',
170
170
  method: 'GET',
171
171
  data: {},
172
- disabled: true
173
- }
172
+ disabled: true,
173
+ },
174
174
  },
175
- ]
175
+ ],
176
176
  },
177
177
  ];
178
- exports["default"] = layout;
178
+ exports.default = layout;
@@ -1,24 +1,24 @@
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: 'image',
6
6
  url: 'https://via.placeholder.com/1024',
7
7
  text: 'Image alt text',
8
8
  margin: 'lg',
9
- size: 'sm'
9
+ size: 'sm',
10
10
  },
11
11
  {
12
12
  type: 'heading',
13
13
  text: 'Image size sm',
14
14
  size: 'lg',
15
15
  margin: 'lg',
16
- align: 'center'
16
+ align: 'center',
17
17
  },
18
18
  {
19
19
  type: 'paragraph',
20
20
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ante felis. Nullam auctor posuere justo ac posuere. Nullam efficitur enim ut turpis venenatis vestibulum.',
21
- align: 'center'
21
+ align: 'center',
22
22
  },
23
23
  {
24
24
  type: 'box',
@@ -32,10 +32,10 @@ var layout = [
32
32
  exit: true,
33
33
  data: { someKey: 'some value' },
34
34
  url: '/success',
35
- method: 'GET'
36
- }
35
+ method: 'GET',
36
+ },
37
37
  },
38
- ]
38
+ ],
39
39
  },
40
40
  ];
41
- exports["default"] = layout;
41
+ exports.default = layout;
@@ -1,26 +1,18 @@
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.successLayout = exports.reviewLayout = exports.payInLayout = exports.listLayout = exports.finalStepLayout = exports.allLayoutComponents = void 0;
15
7
  var all_1 = require("./all");
16
- __createBinding(exports, all_1, "default", "allLayoutComponents");
8
+ Object.defineProperty(exports, "allLayoutComponents", { enumerable: true, get: function () { return __importDefault(all_1).default; } });
17
9
  var final_step_layout_1 = require("./final-step-layout");
18
- __createBinding(exports, final_step_layout_1, "default", "finalStepLayout");
10
+ Object.defineProperty(exports, "finalStepLayout", { enumerable: true, get: function () { return __importDefault(final_step_layout_1).default; } });
19
11
  var list_1 = require("./list");
20
- __createBinding(exports, list_1, "default", "listLayout");
12
+ Object.defineProperty(exports, "listLayout", { enumerable: true, get: function () { return __importDefault(list_1).default; } });
21
13
  var pay_in_1 = require("./pay-in");
22
- __createBinding(exports, pay_in_1, "default", "payInLayout");
14
+ Object.defineProperty(exports, "payInLayout", { enumerable: true, get: function () { return __importDefault(pay_in_1).default; } });
23
15
  var review_1 = require("./review");
24
- __createBinding(exports, review_1, "default", "reviewLayout");
16
+ Object.defineProperty(exports, "reviewLayout", { enumerable: true, get: function () { return __importDefault(review_1).default; } });
25
17
  var success_1 = require("./success");
26
- __createBinding(exports, success_1, "default", "successLayout");
18
+ Object.defineProperty(exports, "successLayout", { enumerable: true, get: function () { return __importDefault(success_1).default; } });
@@ -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: 'list',
6
6
  title: 'This is a List',
@@ -9,27 +9,27 @@ var layout = [
9
9
  title: 'Item 1',
10
10
  description: 'The first item is positive',
11
11
  icon: {
12
- name: 'bank'
12
+ name: 'bank',
13
13
  },
14
- status: 'positive'
14
+ status: 'positive',
15
15
  },
16
16
  {
17
17
  title: 'Item 2',
18
18
  description: 'The second item is neutral',
19
19
  icon: {
20
- name: 'emoji'
20
+ name: 'emoji',
21
21
  },
22
- status: 'neutral'
22
+ status: 'neutral',
23
23
  },
24
24
  {
25
25
  title: 'Item 3',
26
26
  description: 'The third item is warning',
27
27
  icon: {
28
- name: 'gift-box'
28
+ name: 'gift-box',
29
29
  },
30
- status: 'warning'
30
+ status: 'warning',
31
31
  },
32
- ]
32
+ ],
33
33
  },
34
34
  ];
35
- exports["default"] = layout;
35
+ exports.default = layout;
@@ -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: 'PAY_ID',
5
5
  type: 'form',
6
6
  title: 'Pay Using PayID',
@@ -10,18 +10,18 @@ var step = {
10
10
  type: 'primary',
11
11
  exit: true,
12
12
  result: {
13
- paid: 'POTENTIALLY_PAID'
13
+ paid: 'POTENTIALLY_PAID',
14
14
  },
15
- $id: '#payNow'
15
+ $id: '#payNow',
16
16
  },
17
17
  {
18
18
  title: "I'll transfer my money later",
19
19
  type: 'secondary',
20
20
  exit: true,
21
21
  result: {
22
- paid: 'NOT_PAID'
22
+ paid: 'NOT_PAID',
23
23
  },
24
- $id: '#payLater'
24
+ $id: '#payLater',
25
25
  },
26
26
  ],
27
27
  schemas: [
@@ -29,20 +29,20 @@ var step = {
29
29
  title: 'Pay Using PayID',
30
30
  type: 'string',
31
31
  hidden: true,
32
- "default": 'PayId'
32
+ default: 'PayId',
33
33
  },
34
34
  ],
35
35
  layout: [
36
36
  {
37
37
  type: 'info',
38
- markdown: 'Go to your online banking and transfer **50.25 AUD** to our account using the email below.'
38
+ markdown: 'Go to your online banking and transfer **50.25 AUD** to our account using the email below.',
39
39
  },
40
40
  {
41
41
  components: [
42
42
  {
43
43
  context: 'neutral',
44
44
  markdown: "We've updated our PayID email and no longer require you to enter any reference numbers. Use this PayID going forward.",
45
- type: 'alert'
45
+ type: 'alert',
46
46
  },
47
47
  {
48
48
  type: 'review',
@@ -50,9 +50,9 @@ var step = {
50
50
  fields: [
51
51
  {
52
52
  label: 'Email',
53
- value: 'rahul@wise.com'
53
+ value: 'rahul@wise.com',
54
54
  },
55
- ]
55
+ ],
56
56
  },
57
57
  {
58
58
  left: [
@@ -61,9 +61,9 @@ var step = {
61
61
  fields: [
62
62
  {
63
63
  label: 'Account Name',
64
- value: 'Wise Australia Pty Ltd'
64
+ value: 'Wise Australia Pty Ltd',
65
65
  },
66
- ]
66
+ ],
67
67
  },
68
68
  ],
69
69
  right: [
@@ -72,28 +72,28 @@ var step = {
72
72
  fields: [
73
73
  {
74
74
  label: 'Amount',
75
- value: '50.25 AUD'
75
+ value: '50.25 AUD',
76
76
  },
77
- ]
77
+ ],
78
78
  },
79
79
  ],
80
- type: 'columns'
80
+ type: 'columns',
81
81
  },
82
82
  ],
83
- type: 'box'
83
+ type: 'box',
84
84
  },
85
85
  {
86
86
  type: 'button',
87
87
  action: {
88
- $ref: '#payNow'
89
- }
88
+ $ref: '#payNow',
89
+ },
90
90
  },
91
91
  {
92
92
  type: 'button',
93
93
  action: {
94
- $ref: '#payLater'
95
- }
94
+ $ref: '#payLater',
95
+ },
96
96
  },
97
- ]
97
+ ],
98
98
  };
99
- exports["default"] = step;
99
+ exports.default = step;
@@ -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: 'md',
@@ -9,7 +9,7 @@ var layout = [
9
9
  type: 'heading',
10
10
  align: 'center',
11
11
  margin: 'lg',
12
- text: 'Review your transfer details'
12
+ text: 'Review your transfer details',
13
13
  },
14
14
  {
15
15
  type: 'box',
@@ -22,41 +22,41 @@ var layout = [
22
22
  action: {
23
23
  title: 'Edit',
24
24
  url: '/edit-transfer',
25
- method: 'GET'
25
+ method: 'GET',
26
26
  },
27
27
  fields: [
28
28
  {
29
29
  label: 'You send approximately',
30
- value: '88.86 GBP'
30
+ value: '88.86 GBP',
31
31
  },
32
32
  {
33
33
  label: 'You send from',
34
- value: 'GBP balance'
34
+ value: 'GBP balance',
35
35
  },
36
36
  {
37
37
  label: 'Estimate total fees (included)',
38
- value: '0.86 GBP'
38
+ value: '0.86 GBP',
39
39
  },
40
40
  {
41
41
  label: "Estimate amount we'll convert",
42
- value: '88 GBP'
42
+ value: '88 GBP',
43
43
  },
44
44
  {
45
45
  label: 'Live rate',
46
- value: '1.1363'
46
+ value: '1.1363',
47
47
  },
48
48
  {
49
49
  label: 'Test gets exactly',
50
- value: '100 EUR'
50
+ value: '100 EUR',
51
51
  },
52
52
  {
53
53
  label: 'Should arrive',
54
- value: 'in seconds'
54
+ value: 'in seconds',
55
55
  },
56
- ]
56
+ ],
57
57
  },
58
58
  {
59
- type: 'divider'
59
+ type: 'divider',
60
60
  },
61
61
  {
62
62
  type: 'review',
@@ -65,28 +65,28 @@ var layout = [
65
65
  action: {
66
66
  title: 'Edit',
67
67
  url: '/recipient',
68
- method: 'GET'
68
+ method: 'GET',
69
69
  },
70
70
  fields: [
71
71
  {
72
72
  label: 'Name',
73
- value: 'Test Name'
73
+ value: 'Test Name',
74
74
  },
75
75
  {
76
76
  label: 'Email',
77
- value: 'test@example.com'
77
+ value: 'test@example.com',
78
78
  },
79
79
  {
80
80
  label: 'Sort code',
81
- value: '12-34-56'
81
+ value: '12-34-56',
82
82
  },
83
83
  {
84
84
  label: 'Account number',
85
- value: '12345678'
85
+ value: '12345678',
86
86
  },
87
- ]
87
+ ],
88
88
  },
89
- ]
89
+ ],
90
90
  },
91
91
  {
92
92
  type: 'box',
@@ -102,7 +102,7 @@ var layout = [
102
102
  date: {
103
103
  title: 'Date',
104
104
  type: 'string',
105
- format: 'date'
105
+ format: 'date',
106
106
  },
107
107
  frequency: {
108
108
  type: 'string',
@@ -112,26 +112,26 @@ var layout = [
112
112
  oneOf: [
113
113
  {
114
114
  title: 'Daily',
115
- "const": 'day'
115
+ const: 'day',
116
116
  },
117
117
  {
118
118
  title: 'Weekly',
119
- "const": 'week'
119
+ const: 'week',
120
120
  },
121
121
  {
122
122
  title: 'Monthly',
123
- "const": 'month'
123
+ const: 'month',
124
124
  },
125
- ]
126
- }
127
- }
128
- }
125
+ ],
126
+ },
127
+ },
128
+ },
129
129
  },
130
130
  {
131
131
  type: 'alert',
132
- markdown: "We'll deduct the required amount **from your GBP balance** at the **real exchange rate** on the **28th of each month**, so that Rayna always gets exactly **100 EUR**. First **monthly** transfer will be made on **April 28, 2020 (BST)**"
132
+ markdown: "We'll deduct the required amount **from your GBP balance** at the **real exchange rate** on the **28th of each month**, so that Rayna always gets exactly **100 EUR**. First **monthly** transfer will be made on **April 28, 2020 (BST)**",
133
133
  },
134
- ]
134
+ ],
135
135
  },
136
136
  {
137
137
  type: 'form',
@@ -142,10 +142,10 @@ var layout = [
142
142
  reference: {
143
143
  type: 'string',
144
144
  title: 'Reference',
145
- placeholder: 'Type a reference'
146
- }
147
- }
148
- }
145
+ placeholder: 'Type a reference',
146
+ },
147
+ },
148
+ },
149
149
  },
150
150
  {
151
151
  type: 'button',
@@ -153,10 +153,10 @@ var layout = [
153
153
  title: 'Create transfer',
154
154
  method: 'POST',
155
155
  url: '/final',
156
- type: 'primary'
157
- }
156
+ type: 'primary',
157
+ },
158
158
  },
159
- ]
159
+ ],
160
160
  },
161
161
  ];
162
- exports["default"] = layout;
162
+ exports.default = layout;