@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 step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  key: 'Examples/Single File Upload',
5
5
  type: 'form',
6
6
  title: 'Single File Upload Example',
@@ -25,15 +25,15 @@ var step = {
25
25
  description: 'JPEG or PNG less than 10MB',
26
26
  $id: 'cb22a588-c404-43fd-b3fa-754afb3729f4',
27
27
  title: 'Upload file',
28
- type: 'blob'
28
+ type: 'blob',
29
29
  },
30
- method: 'POST'
30
+ method: 'POST',
31
31
  },
32
32
  title: 'Single File Upload',
33
- type: 'integer'
34
- }
33
+ type: 'integer',
34
+ },
35
35
  },
36
- required: ['frontSide']
36
+ required: ['frontSide'],
37
37
  },
38
38
  {
39
39
  $id: '#schema-2',
@@ -54,33 +54,33 @@ var step = {
54
54
  description: 'JPEG or PNG less than 10MB',
55
55
  $id: 'cb22a588-c404-43fd-b3fa-754afb3729f4',
56
56
  title: 'Upload file',
57
- type: 'blob'
57
+ type: 'blob',
58
58
  },
59
- method: 'POST'
59
+ method: 'POST',
60
60
  },
61
61
  title: 'Single File Upload',
62
- type: 'integer'
63
- }
62
+ type: 'integer',
63
+ },
64
64
  },
65
- required: ['backSide']
65
+ required: ['backSide'],
66
66
  },
67
67
  ],
68
68
  layout: [
69
69
  {
70
70
  type: 'paragraph',
71
- text: 'The upload component below uses /single-file-upload-url'
71
+ text: 'The upload component below uses /single-file-upload-url',
72
72
  },
73
73
  {
74
74
  type: 'form',
75
- schema: { $ref: '#schema-1' }
75
+ schema: { $ref: '#schema-1' },
76
76
  },
77
77
  {
78
78
  type: 'paragraph',
79
- text: 'The upload component below uses /single-file-upload-url-fail'
79
+ text: 'The upload component below uses /single-file-upload-url-fail',
80
80
  },
81
81
  {
82
82
  type: 'form',
83
- schema: { $ref: '#schema-2' }
83
+ schema: { $ref: '#schema-2' },
84
84
  },
85
85
  {
86
86
  type: 'button',
@@ -89,12 +89,12 @@ var step = {
89
89
  type: 'primary',
90
90
  method: 'POST',
91
91
  disabled: false,
92
- title: 'Next'
93
- }
92
+ title: 'Next',
93
+ },
94
94
  },
95
95
  ],
96
96
  model: {
97
- frontSide: 0
98
- }
97
+ frontSide: 0,
98
+ },
99
99
  };
100
- exports["default"] = step;
100
+ exports.default = step;
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var step = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const step = {
4
4
  key: 'Examples/Step Validation Errors',
5
5
  title: 'Step with validation errors',
6
6
  type: 'form',
7
7
  errors: {
8
8
  validation: {
9
9
  'bridekeeper-questions': {
10
- 'favourite-colour': 'Auuuuuuuugh'
11
- }
12
- }
10
+ 'favourite-colour': 'Auuuuuuuugh',
11
+ },
12
+ },
13
13
  },
14
14
  actions: [],
15
15
  layout: [
16
16
  {
17
17
  type: 'form',
18
- schema: { $ref: '#the-schema' }
18
+ schema: { $ref: '#the-schema' },
19
19
  },
20
20
  ],
21
21
  schemas: [
@@ -31,12 +31,12 @@ var step = {
31
31
  name: {
32
32
  title: 'What is your name?',
33
33
  type: 'string',
34
- placeholder: 'Sir Lancelot of Camelot'
34
+ placeholder: 'Sir Lancelot of Camelot',
35
35
  },
36
36
  quest: {
37
37
  title: 'What is your quest?',
38
38
  type: 'string',
39
- placeholder: 'to seek the Holy Grail'
39
+ placeholder: 'to seek the Holy Grail',
40
40
  },
41
41
  'favourite-colour': {
42
42
  title: 'What is your favourite colour?',
@@ -46,32 +46,32 @@ var step = {
46
46
  title: 'Blue',
47
47
  analyticsId: 'colour-select-blue',
48
48
  image: {
49
- url: 'https://placeholder.pics/svg/128/0099ff/FFFFFF'
49
+ url: 'https://placeholder.pics/svg/128/0099ff/FFFFFF',
50
50
  },
51
- "const": 1
51
+ const: 1,
52
52
  },
53
53
  {
54
54
  title: 'Yellow',
55
55
  analyticsId: 'colour-select-yellow',
56
56
  image: {
57
- url: 'https://placeholder.pics/svg/128/ffcc00/FFFFFF'
57
+ url: 'https://placeholder.pics/svg/128/ffcc00/FFFFFF',
58
58
  },
59
- "const": 2
59
+ const: 2,
60
60
  },
61
61
  {
62
62
  title: 'Red',
63
63
  analyticsId: 'colour-select-red',
64
64
  image: {
65
- url: 'https://placeholder.pics/svg/128/ff6600/FFFFFF'
65
+ url: 'https://placeholder.pics/svg/128/ff6600/FFFFFF',
66
66
  },
67
- "const": 2
67
+ const: 2,
68
68
  },
69
- ]
70
- }
71
- }
72
- }
73
- }
69
+ ],
70
+ },
71
+ },
72
+ },
73
+ },
74
74
  },
75
- ]
75
+ ],
76
76
  };
77
- exports["default"] = step;
77
+ 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: 'Features/Action Response',
5
5
  title: 'Action Response',
6
6
  description: '',
@@ -11,21 +11,21 @@ var step = {
11
11
  {
12
12
  type: 'paragraph',
13
13
  text: "The button below will trigger an action that fetches '/responses/action'.",
14
- align: 'center'
14
+ align: 'center',
15
15
  },
16
16
  {
17
17
  type: 'paragraph',
18
18
  text: 'That should return an action response that will load a final step.',
19
- align: 'center'
19
+ align: 'center',
20
20
  },
21
21
  {
22
22
  type: 'button',
23
23
  action: {
24
24
  url: '/responses/action',
25
25
  title: 'Submit',
26
- type: 'primary'
27
- }
26
+ type: 'primary',
27
+ },
28
28
  },
29
- ]
29
+ ],
30
30
  };
31
- exports["default"] = step;
31
+ 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
  type: 'form',
5
5
  key: 'Features/External',
6
6
  title: 'External Feature',
@@ -11,23 +11,23 @@ var step = {
11
11
  interval: 2,
12
12
  maxAttempts: 5,
13
13
  onError: {
14
- action: { url: '/failure' }
15
- }
14
+ action: { url: '/failure' },
15
+ },
16
16
  },
17
17
  layout: [
18
18
  {
19
19
  type: 'paragraph',
20
20
  align: 'center',
21
- text: 'Please, follow their instructions. Keep this window open.'
21
+ text: 'Please, follow their instructions. Keep this window open.',
22
22
  },
23
23
  { type: 'loading-indicator', margin: 'xl' },
24
24
  {
25
25
  type: 'info',
26
26
  align: 'center',
27
- markdown: "If it didn't work, you can [reopen](http://google.com/) the tab"
27
+ markdown: `If it didn't work, you can [reopen](http://google.com/) the tab`,
28
28
  },
29
29
  ],
30
30
  actions: [],
31
- schemas: []
31
+ schemas: [],
32
32
  };
33
- exports["default"] = step;
33
+ exports.default = step;
@@ -1,24 +1,16 @@
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.validationAsync = exports.polling = exports.persistAsync = exports.external = exports.actionResponse = void 0;
15
7
  var action_response_1 = require("./action-response");
16
- __createBinding(exports, action_response_1, "default", "actionResponse");
8
+ Object.defineProperty(exports, "actionResponse", { enumerable: true, get: function () { return __importDefault(action_response_1).default; } });
17
9
  var external_1 = require("./external");
18
- __createBinding(exports, external_1, "default", "external");
10
+ Object.defineProperty(exports, "external", { enumerable: true, get: function () { return __importDefault(external_1).default; } });
19
11
  var persist_async_1 = require("./persist-async");
20
- __createBinding(exports, persist_async_1, "default", "persistAsync");
12
+ Object.defineProperty(exports, "persistAsync", { enumerable: true, get: function () { return __importDefault(persist_async_1).default; } });
21
13
  var polling_1 = require("./polling");
22
- __createBinding(exports, polling_1, "default", "polling");
14
+ Object.defineProperty(exports, "polling", { enumerable: true, get: function () { return __importDefault(polling_1).default; } });
23
15
  var validation_async_1 = require("./validation-async");
24
- __createBinding(exports, validation_async_1, "default", "validationAsync");
16
+ Object.defineProperty(exports, "validationAsync", { enumerable: true, get: function () { return __importDefault(validation_async_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
  type: 'form',
5
5
  key: 'Features/Persist Async',
6
6
  title: 'Persist Async Feature',
@@ -21,11 +21,11 @@ var step = {
21
21
  idProperty: 'nameToken',
22
22
  schema: {
23
23
  title: 'Enter your name',
24
- type: 'string'
25
- }
26
- }
27
- }
28
- }
24
+ type: 'string',
25
+ },
26
+ },
27
+ },
28
+ },
29
29
  },
30
30
  ],
31
31
  actions: [
@@ -33,14 +33,14 @@ var step = {
33
33
  title: 'Submit Persist Async',
34
34
  url: '/persist-async-submit',
35
35
  method: 'POST',
36
- type: 'primary'
36
+ type: 'primary',
37
37
  },
38
38
  ],
39
39
  layout: [
40
40
  {
41
41
  type: 'form',
42
- schema: { $ref: 'the-schema' }
42
+ schema: { $ref: 'the-schema' },
43
43
  },
44
- ]
44
+ ],
45
45
  };
46
- exports["default"] = step;
46
+ 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
  type: 'form',
5
5
  key: 'Features/Polling',
6
6
  title: 'Polling Feature',
@@ -10,14 +10,14 @@ var step = {
10
10
  interval: 2,
11
11
  maxAttempts: 5,
12
12
  onError: {
13
- action: { url: '/failure' }
14
- }
13
+ action: { url: '/failure' },
14
+ },
15
15
  },
16
16
  layout: [
17
17
  {
18
18
  type: 'paragraph',
19
19
  align: 'center',
20
- text: 'We are waiting for something to happen.'
20
+ text: 'We are waiting for something to happen.',
21
21
  },
22
22
  { type: 'loading-indicator', margin: 'xl' },
23
23
  {
@@ -25,11 +25,11 @@ var step = {
25
25
  action: {
26
26
  title: 'Back',
27
27
  type: 'link',
28
- url: '/back'
29
- }
28
+ url: '/back',
29
+ },
30
30
  },
31
31
  ],
32
32
  actions: [],
33
- schemas: []
33
+ schemas: [],
34
34
  };
35
- exports["default"] = step;
35
+ 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
  type: 'form',
5
5
  key: 'Features/Validation Async',
6
6
  title: 'Validation Async Feature',
@@ -18,23 +18,23 @@ var step = {
18
18
  validationAsync: {
19
19
  method: 'POST',
20
20
  url: '/validate',
21
- param: 'myParameter'
22
- }
23
- }
24
- }
21
+ param: 'myParameter',
22
+ },
23
+ },
24
+ },
25
25
  },
26
26
  ],
27
27
  layout: [
28
28
  {
29
29
  type: 'form',
30
30
  schema: {
31
- $ref: '#the-schema'
32
- }
31
+ $ref: '#the-schema',
32
+ },
33
33
  },
34
34
  ],
35
35
  actions: [],
36
36
  model: {
37
37
  // name: 'Colin Robinson',
38
- }
38
+ },
39
39
  };
40
- exports["default"] = step;
40
+ exports.default = step;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -33,17 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
22
  __setModuleDefault(result, mod);
34
23
  return result;
35
24
  };
36
- exports.__esModule = true;
25
+ Object.defineProperty(exports, "__esModule", { value: true });
37
26
  exports.fixtures = void 0;
38
- var components = __importStar(require("./components"));
39
- var examples = __importStar(require("./examples"));
40
- var features = __importStar(require("./features"));
41
- var layouts = __importStar(require("./layouts"));
42
- var responses = __importStar(require("./responses"));
43
- var schemas = __importStar(require("./schemas"));
44
- var image_util_1 = require("./utils/image-util");
27
+ const components = __importStar(require("./components"));
28
+ const examples = __importStar(require("./examples"));
29
+ const features = __importStar(require("./features"));
30
+ const layouts = __importStar(require("./layouts"));
31
+ const responses = __importStar(require("./responses"));
32
+ const schemas = __importStar(require("./schemas"));
33
+ const image_util_1 = require("./utils/image-util");
45
34
  exports.fixtures = {
46
- steps: __assign(__assign(__assign(__assign(__assign({}, components), examples), features), schemas), { 'image-xs': (0, image_util_1.getImageStep)('xs'), 'image-sm': (0, image_util_1.getImageStep)('sm'), 'image-md': (0, image_util_1.getImageStep)('md'), 'image-lg': (0, image_util_1.getImageStep)('lg'), 'image-xl': (0, image_util_1.getImageStep)('xl') }),
47
- layouts: __assign({}, layouts),
48
- responses: responses
35
+ steps: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, components), examples), features), schemas), { 'image-xs': (0, image_util_1.getImageStep)('xs'), 'image-sm': (0, image_util_1.getImageStep)('sm'), 'image-md': (0, image_util_1.getImageStep)('md'), 'image-lg': (0, image_util_1.getImageStep)('lg'), 'image-xl': (0, image_util_1.getImageStep)('xl') }),
36
+ layouts: Object.assign({}, layouts),
37
+ responses,
49
38
  };
@@ -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
  allOf: [
5
5
  {
6
6
  title: 'Number schemas',
@@ -12,15 +12,15 @@ var schema = {
12
12
  title: 'Number input',
13
13
  minimum: 2,
14
14
  maximum: 200,
15
- "default": 1,
15
+ default: 1,
16
16
  help: { markdown: '2 or more' },
17
17
  validationMessages: {
18
18
  min: 'Too low buddy!',
19
- max: 'Crazy high!'
20
- }
21
- }
19
+ max: 'Crazy high!',
20
+ },
21
+ },
22
22
  },
23
- required: ['number']
23
+ required: ['number'],
24
24
  },
25
25
  {
26
26
  title: 'String schemas',
@@ -33,10 +33,10 @@ var schema = {
33
33
  minLength: 2,
34
34
  maxLength: 8,
35
35
  pattern: '^[a-z]+$',
36
- "default": 'abc',
36
+ default: 'abc',
37
37
  help: {
38
- markdown: 'Keep it secret, Keep it safe'
39
- }
38
+ markdown: 'Keep it secret, Keep it safe',
39
+ },
40
40
  },
41
41
  date: {
42
42
  type: 'string',
@@ -46,23 +46,23 @@ var schema = {
46
46
  maximum: '2010-01-01',
47
47
  validationMessages: {
48
48
  min: 'Must be after Feb 2000',
49
- max: 'Must be before Jan 2010'
50
- }
49
+ max: 'Must be before Jan 2010',
50
+ },
51
51
  },
52
52
  phone: {
53
53
  type: 'string',
54
54
  format: 'phone',
55
55
  title: 'Phone input',
56
56
  minLength: 10,
57
- maxLength: 12
57
+ maxLength: 12,
58
58
  },
59
59
  file: {
60
60
  type: 'string',
61
61
  format: 'base64url',
62
- title: 'File input'
63
- }
62
+ title: 'File input',
63
+ },
64
64
  },
65
- required: ['string']
65
+ required: ['string'],
66
66
  },
67
67
  {
68
68
  title: 'Boolean schemas',
@@ -72,9 +72,9 @@ var schema = {
72
72
  boolean: {
73
73
  type: 'boolean',
74
74
  title: 'Boolean input',
75
- width: 'md'
76
- }
77
- }
75
+ width: 'md',
76
+ },
77
+ },
78
78
  },
79
79
  {
80
80
  title: 'OneOf Const schema',
@@ -87,17 +87,17 @@ var schema = {
87
87
  oneOf: [
88
88
  {
89
89
  title: 'One',
90
- "const": 'one'
90
+ const: 'one',
91
91
  },
92
92
  {
93
93
  title: 'Two',
94
- "const": 'two'
94
+ const: 'two',
95
95
  },
96
96
  {
97
97
  title: 'Three',
98
- "const": 'three'
98
+ const: 'three',
99
99
  },
100
- ]
100
+ ],
101
101
  },
102
102
  radio: {
103
103
  title: 'Radio',
@@ -105,17 +105,17 @@ var schema = {
105
105
  oneOf: [
106
106
  {
107
107
  title: 'One',
108
- "const": 'one'
108
+ const: 'one',
109
109
  },
110
110
  {
111
111
  title: 'Two',
112
- "const": 'two'
112
+ const: 'two',
113
113
  },
114
- ]
115
- }
114
+ ],
115
+ },
116
116
  },
117
- required: ['select', 'radio']
117
+ required: ['select', 'radio'],
118
118
  },
119
- ]
119
+ ],
120
120
  };
121
- exports["default"] = schema;
121
+ exports.default = schema;