@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,125 +1,96 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- exports.__esModule = true;
29
- var jsx_runtime_1 = require("react/jsx-runtime");
30
- var components_1 = require("@transferwise/components");
31
- var react_1 = require("react");
32
- var constants_1 = require("../common/constants");
33
- var utils_1 = require("../common/utils");
34
- var validators_1 = require("../common/validators");
35
- var utils_2 = require("./utils");
36
- var FormControl = /** @class */ (function (_super) {
37
- __extends(FormControl, _super);
38
- function FormControl(props) {
39
- var _this = _super.call(this, props) || this;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const components_1 = require("@transferwise/components");
5
+ const react_1 = require("react");
6
+ const constants_1 = require("../common/constants");
7
+ const utils_1 = require("../common/utils");
8
+ const validators_1 = require("../common/validators");
9
+ const utils_2 = require("./utils");
10
+ class FormControl extends react_1.PureComponent {
11
+ constructor(props) {
12
+ super(props);
40
13
  /**
41
14
  * autocomplete hides our form help so we need to disable it when help text
42
15
  * is present. Chrome ignores autocomplete=off, the only way to disable it is
43
16
  * to provide an 'invalid' value, for which 'disabled' serves.
44
17
  */
45
- _this.getAutocompleteStatus = function () { return (_this.props.autoComplete ? 'on' : 'disabled'); };
46
- _this.handleOnChange = function (value) {
47
- _this.props.onChange(value);
18
+ this.getAutocompleteStatus = () => (this.props.autoComplete ? 'on' : 'disabled');
19
+ this.handleOnChange = (value) => {
20
+ this.props.onChange(value);
48
21
  };
49
- _this.handleInputOnChange = function (event) {
50
- _this.props.onChange(event.target.value);
22
+ this.handleInputOnChange = (event) => {
23
+ this.props.onChange(event.target.value);
51
24
  };
52
- _this.handleOnFocus = function () {
25
+ this.handleOnFocus = () => {
53
26
  var _a, _b;
54
- (_b = (_a = _this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a);
27
+ (_b = (_a = this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a);
55
28
  };
56
- _this.handleOnBlur = function () {
29
+ this.handleOnBlur = () => {
57
30
  var _a, _b;
58
- (_b = (_a = _this.props).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a);
31
+ (_b = (_a = this.props).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a);
59
32
  };
60
- _this.getSelectedOption = function (options) {
61
- if (_this.state.selectedOption !== null && typeof _this.state.selectedOption !== 'undefined') {
62
- return options.find(function (option) { var _a; return ((_a = _this.state.selectedOption) === null || _a === void 0 ? void 0 : _a.value) === option.value; });
33
+ this.getSelectedOption = (options) => {
34
+ if (this.state.selectedOption !== null && typeof this.state.selectedOption !== 'undefined') {
35
+ return options.find((option) => { var _a; return ((_a = this.state.selectedOption) === null || _a === void 0 ? void 0 : _a.value) === option.value; });
63
36
  }
64
- if (_this.props.value !== null && typeof _this.props.value !== 'undefined') {
65
- return options.find(function (option) { return _this.props.value === option.value; });
37
+ if (this.props.value !== null && typeof this.props.value !== 'undefined') {
38
+ return options.find((option) => this.props.value === option.value);
66
39
  }
67
40
  return undefined;
68
41
  };
69
- _this.mapOption = function (option) {
70
- return __assign(__assign({}, option), { value: (0, validators_1.isNumber)(option.value) || (0, validators_1.isString)(option.value) ? option.value : undefined, disabled: option.disabled || _this.props.disabled, readOnly: _this.props.readOnly });
42
+ this.mapOption = (option) => {
43
+ return Object.assign(Object.assign({}, option), { value: (0, validators_1.isNumber)(option.value) || (0, validators_1.isString)(option.value) ? option.value : undefined, disabled: option.disabled || this.props.disabled, readOnly: this.props.readOnly });
71
44
  };
72
- _this.state = {
45
+ this.state = {
73
46
  selectedOption: props.selectedOption,
74
47
  touched: false,
75
- prevValue: props.value
48
+ prevValue: props.value,
76
49
  };
77
- return _this;
78
50
  }
79
- FormControl.getDerivedStateFromProps = function (nextProps, previousState) {
51
+ static getDerivedStateFromProps(nextProps, previousState) {
80
52
  if (previousState.prevValue !== nextProps.value) {
81
53
  return { prevValue: nextProps.value, value: nextProps.value };
82
54
  }
83
55
  return null;
84
- };
85
- FormControl.prototype.render = function () {
86
- var _this = this;
56
+ }
57
+ render() {
87
58
  var _a;
88
- var _b = this.props, name = _b.name, placeholder = _b.placeholder, step = _b.step, countryCode = _b.countryCode, type = _b.type, options = _b.options, disabled = _b.disabled, readOnly = _b.readOnly, required = _b.required, minLength = _b.minLength, maxLength = _b.maxLength, min = _b.min, max = _b.max, searchPlaceholder = _b.searchPlaceholder, searchValue = _b.searchValue, onSearchChange = _b.onSearchChange, size = _b.size, uploadProps = _b.uploadProps, label = _b.label, monthFormat = _b.monthFormat,
59
+ const { name, placeholder, step, countryCode, type, options, disabled, readOnly, required, minLength, maxLength, min, max, searchPlaceholder, searchValue, onSearchChange, size, uploadProps, label, monthFormat,
89
60
  // FIXME pass id to all components that accept it
90
- id = _b.id, minDate = _b.minDate, maxDate = _b.maxDate, value = _b.value, mode = _b.mode;
61
+ id, minDate, maxDate, value, mode, } = this.props;
91
62
  switch (type) {
92
63
  case constants_1.FormControlType.RADIO:
93
64
  return ((0, jsx_runtime_1.jsx)(components_1.RadioGroup, { radios: options.map(this.mapOption), name: name, selectedValue: (0, utils_2.getSafeStringOrNumberValue)(value, { coerceValue: true }), onChange: this.handleOnChange }));
94
65
  case constants_1.FormControlType.CHECKBOX:
95
66
  return ((0, jsx_runtime_1.jsx)(components_1.Checkbox, { checked: (0, utils_2.getSafeBooleanValue)(value, { coerceValue: true }), disabled: disabled, label: label, required: required, readOnly: readOnly, onChange: this.handleOnChange, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus }));
96
67
  case constants_1.FormControlType.SELECT: {
97
- var search = options.length >= 20;
98
- return ((0, jsx_runtime_1.jsx)(components_1.Select, { id: id, selected: this.getSelectedOption(options), options: options, search: search, required: required, disabled: disabled, placeholder: placeholder, searchPlaceholder: searchPlaceholder, searchValue: searchValue, onChange: function (option) {
68
+ const search = options.length >= 20;
69
+ return ((0, jsx_runtime_1.jsx)(components_1.Select, { id: id, selected: this.getSelectedOption(options), options: options, search: search, required: required, disabled: disabled, placeholder: placeholder, searchPlaceholder: searchPlaceholder, searchValue: searchValue, onChange: (option) => {
99
70
  var _a;
100
- _this.setState({ selectedOption: option !== null && option !== void 0 ? option : undefined });
101
- _this.props.onChange((_a = option === null || option === void 0 ? void 0 : option.value) !== null && _a !== void 0 ? _a : null);
71
+ this.setState({ selectedOption: option !== null && option !== void 0 ? option : undefined });
72
+ this.props.onChange((_a = option === null || option === void 0 ? void 0 : option.value) !== null && _a !== void 0 ? _a : null);
102
73
  }, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, onSearchChange: search ? onSearchChange : undefined }));
103
74
  }
104
75
  case constants_1.FormControlType.TAB:
105
- return ((0, jsx_runtime_1.jsx)(components_1.Tabs, { selected: (((_a = this.getSelectedOption(options)) === null || _a === void 0 ? void 0 : _a.value) || 0), tabs: options.map(function (option) { return ({
76
+ return ((0, jsx_runtime_1.jsx)(components_1.Tabs, { selected: (((_a = this.getSelectedOption(options)) === null || _a === void 0 ? void 0 : _a.value) || 0), tabs: options.map((option) => ({
106
77
  title: option.label,
107
78
  content: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}),
108
- disabled: option.disabled || false
109
- }); }), name: id, onTabSelect: function (index) {
110
- var hasSelectedOption = !!_this.state.selectedOption;
111
- _this.setState({
112
- selectedOption: options.find(function (option) { return option.value === index; })
79
+ disabled: option.disabled || false,
80
+ })), name: id, onTabSelect: (index) => {
81
+ const hasSelectedOption = !!this.state.selectedOption;
82
+ this.setState({
83
+ selectedOption: options.find((option) => option.value === index),
113
84
  });
114
- _this.props.onChange(index, hasSelectedOption ? 'user' : 'init');
85
+ this.props.onChange(index, hasSelectedOption ? 'user' : 'init');
115
86
  } }));
116
87
  case constants_1.FormControlType.NUMBER:
117
- return ((0, jsx_runtime_1.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: disabled, id: id, max: max, min: min, placeholder: placeholder, readOnly: readOnly, required: required, step: step, type: "number", value: (0, utils_2.getSafeStringOrNumberValue)(value, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: function (event) {
88
+ return ((0, jsx_runtime_1.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: disabled, id: id, max: max, min: min, placeholder: placeholder, readOnly: readOnly, required: required, step: step, type: "number", value: (0, utils_2.getSafeStringOrNumberValue)(value, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: (event) => {
118
89
  // Input type number target value is a string and needs to be a number
119
- _this.props.onChange(parseFloat(event.target.value));
90
+ this.props.onChange(parseFloat(event.target.value));
120
91
  // FIXME: maybe this parsing should be done outside of this component in SchemaFormControl,
121
92
  // where we know what schema we're working with?
122
- }, onFocus: this.handleOnFocus, onWheel: function (event) {
93
+ }, onFocus: this.handleOnFocus, onWheel: (event) => {
123
94
  if (event.target instanceof HTMLElement) {
124
95
  // To prevent values being changed when input is focussed and user scrolls
125
96
  event.target.blur();
@@ -137,107 +108,106 @@ var FormControl = /** @class */ (function (_super) {
137
108
  // DateLookup handles null values perfectly well, it's just typed incorrectly
138
109
  , {
139
110
  // DateLookup handles null values perfectly well, it's just typed incorrectly
140
- value: (0, utils_2.getSafeDateStringValue)(value), min: minDate, max: maxDate, placeholder: placeholder, monthFormat: monthFormat, disabled: disabled, onChange: function (date) {
111
+ value: (0, utils_2.getSafeDateStringValue)(value), min: minDate, max: maxDate, placeholder: placeholder, monthFormat: monthFormat, disabled: disabled, onChange: (date) => {
141
112
  // FIXME We need types for DateLookup
142
- _this.handleOnChange((0, utils_1.dateToDateString)(date));
113
+ this.handleOnChange((0, utils_1.dateToDateString)(date));
143
114
  }, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus }));
144
115
  }
145
116
  case constants_1.FormControlType.TEL:
146
117
  return ((0, jsx_runtime_1.jsx)(components_1.PhoneNumberInput, { disabled: disabled, countryCode: countryCode, placeholder: placeholder, required: required, searchPlaceholder: searchPlaceholder, size: size, initialValue: (0, utils_2.getSafeStringValue)(value), onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus }));
147
118
  case constants_1.FormControlType.TEXTAREA: {
148
- var textareaProps = {
119
+ const textareaProps = {
149
120
  className: 'form-control tw-form-control',
150
- id: id,
151
- name: name,
152
- placeholder: placeholder,
121
+ id,
122
+ name,
123
+ placeholder,
153
124
  value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }),
154
- readOnly: readOnly,
155
- required: required,
156
- minLength: minLength,
157
- maxLength: maxLength,
125
+ readOnly,
126
+ required,
127
+ minLength,
128
+ maxLength,
158
129
  onFocus: this.handleOnFocus,
159
130
  onBlur: this.handleOnBlur,
160
- disabled: disabled,
161
- autoComplete: this.getAutocompleteStatus()
131
+ disabled,
132
+ autoComplete: this.getAutocompleteStatus(),
162
133
  };
163
134
  if (this.props.displayPattern) {
164
- return ((0, jsx_runtime_1.jsx)(components_1.TextareaWithDisplayFormat, __assign({ displayPattern: this.props.displayPattern }, textareaProps, { onChange: this.handleOnChange })));
135
+ return ((0, jsx_runtime_1.jsx)(components_1.TextareaWithDisplayFormat, Object.assign({ displayPattern: this.props.displayPattern }, textareaProps, { onChange: this.handleOnChange })));
165
136
  }
166
- return (0, jsx_runtime_1.jsx)("textarea", __assign({}, textareaProps, { onChange: this.handleInputOnChange }));
137
+ return (0, jsx_runtime_1.jsx)("textarea", Object.assign({}, textareaProps, { onChange: this.handleInputOnChange }));
167
138
  }
168
139
  case constants_1.FormControlType.FILE:
169
140
  case constants_1.FormControlType.UPLOAD: {
170
141
  return (
171
142
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
172
143
  // @ts-expect-error - TODO: Remove this once Upload is migrated to TypeScript
173
- (0, jsx_runtime_1.jsx)(components_1.Upload, __assign({}, uploadProps, { usAccept: uploadProps.usAccept || '*', usDisabled: uploadProps.usDisabled || disabled, onSuccess: function (base64url) {
174
- _this.handleOnChange(base64url);
175
- }, onFailure: function () {
176
- _this.handleOnChange(null);
177
- }, onCancel: function () {
178
- _this.handleOnChange(null);
144
+ (0, jsx_runtime_1.jsx)(components_1.Upload, Object.assign({}, uploadProps, { usAccept: uploadProps.usAccept || '*', usDisabled: uploadProps.usDisabled || disabled, onSuccess: (base64url) => {
145
+ this.handleOnChange(base64url);
146
+ }, onFailure: () => {
147
+ this.handleOnChange(null);
148
+ }, onCancel: () => {
149
+ this.handleOnChange(null);
179
150
  } })));
180
151
  }
181
152
  case constants_1.FormControlType.TEXT:
182
153
  default: {
183
- var inputProps = {
154
+ const inputProps = {
184
155
  type: 'text',
185
156
  className: 'form-control',
186
- id: id,
187
- name: name,
188
- placeholder: placeholder,
157
+ id,
158
+ name,
159
+ placeholder,
189
160
  value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }),
190
- readOnly: readOnly,
191
- required: required,
192
- minLength: minLength,
193
- maxLength: maxLength,
161
+ readOnly,
162
+ required,
163
+ minLength,
164
+ maxLength,
194
165
  onFocus: this.handleOnFocus,
195
166
  onBlur: this.handleOnBlur,
196
- disabled: disabled,
197
- autoComplete: this.getAutocompleteStatus()
167
+ disabled,
168
+ autoComplete: this.getAutocompleteStatus(),
198
169
  };
199
170
  if (this.props.displayPattern) {
200
- return ((0, jsx_runtime_1.jsx)(components_1.InputWithDisplayFormat, __assign({ displayPattern: this.props.displayPattern }, inputProps, { onChange: this.handleOnChange })));
171
+ return ((0, jsx_runtime_1.jsx)(components_1.InputWithDisplayFormat, Object.assign({ displayPattern: this.props.displayPattern }, inputProps, { onChange: this.handleOnChange })));
201
172
  }
202
- return (0, jsx_runtime_1.jsx)("input", __assign({}, inputProps, { onChange: this.handleInputOnChange }));
173
+ return (0, jsx_runtime_1.jsx)("input", Object.assign({}, inputProps, { onChange: this.handleInputOnChange }));
203
174
  }
204
175
  }
205
- };
206
- FormControl.Type = constants_1.FormControlType;
207
- FormControl.Size = constants_1.Size;
208
- FormControl.MonthFormat = constants_1.MonthFormat;
209
- FormControl.DateMode = constants_1.DateMode;
210
- FormControl.defaultProps = {
211
- autoComplete: true,
212
- countryCode: null,
213
- disabled: false,
214
- displayPattern: null,
215
- id: null,
216
- label: '',
217
- max: null,
218
- maxDate: null,
219
- maxLength: null,
220
- min: null,
221
- minDate: null,
222
- minLength: null,
223
- mode: FormControl.DateMode.DAY_MONTH_YEAR,
224
- monthFormat: FormControl.MonthFormat.LONG,
225
- onBlur: null,
226
- onFocus: null,
227
- onSearchChange: null,
228
- options: [],
229
- placeholder: null,
230
- readOnly: false,
231
- required: false,
232
- searchPlaceholder: null,
233
- searchValue: '',
234
- selectedOption: null,
235
- size: FormControl.Size.MEDIUM,
236
- step: 1,
237
- type: FormControl.Type.TEXT,
238
- uploadProps: {},
239
- value: null
240
- };
241
- return FormControl;
242
- }(react_1.PureComponent));
243
- exports["default"] = FormControl;
176
+ }
177
+ }
178
+ exports.default = FormControl;
179
+ FormControl.Type = constants_1.FormControlType;
180
+ FormControl.Size = constants_1.Size;
181
+ FormControl.MonthFormat = constants_1.MonthFormat;
182
+ FormControl.DateMode = constants_1.DateMode;
183
+ FormControl.defaultProps = {
184
+ autoComplete: true,
185
+ countryCode: null,
186
+ disabled: false,
187
+ displayPattern: null,
188
+ id: null,
189
+ label: '',
190
+ max: null,
191
+ maxDate: null,
192
+ maxLength: null,
193
+ min: null,
194
+ minDate: null,
195
+ minLength: null,
196
+ mode: FormControl.DateMode.DAY_MONTH_YEAR,
197
+ monthFormat: FormControl.MonthFormat.LONG,
198
+ onBlur: null,
199
+ onFocus: null,
200
+ onSearchChange: null,
201
+ options: [],
202
+ placeholder: null,
203
+ readOnly: false,
204
+ required: false,
205
+ searchPlaceholder: null,
206
+ searchValue: '',
207
+ selectedOption: null,
208
+ size: FormControl.Size.MEDIUM,
209
+ step: 1,
210
+ type: FormControl.Type.TEXT,
211
+ uploadProps: {},
212
+ value: null,
213
+ };
@@ -1,16 +1,8 @@
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;
14
- exports["default"] = void 0;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
15
7
  var FormControl_1 = require("./FormControl");
16
- __createBinding(exports, FormControl_1, "default");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(FormControl_1).default; } });
@@ -13,5 +13,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./value-utils"), exports);
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSafeDateStringValue = exports.getSafeDateOrStringValue = exports.getSafeBooleanValue = exports.getSafeStringOrNumberValue = exports.getSafeStringValue = void 0;
4
4
  /* eslint-disable no-console */
5
- var utils_1 = require("../../common/utils");
6
- var validators_1 = require("../../common/validators");
7
- var getSafeStringValue = function (value, options) {
8
- if (options === void 0) { options = {}; }
9
- var _a = options.coerceValue, coerceValue = _a === void 0 ? false : _a;
5
+ const utils_1 = require("../../common/utils");
6
+ const validators_1 = require("../../common/validators");
7
+ const getSafeStringValue = (value, options = {}) => {
8
+ const { coerceValue = false } = options;
10
9
  if ((0, validators_1.isNull)(value)) {
11
10
  return undefined;
12
11
  }
@@ -28,16 +27,15 @@ var getSafeStringValue = function (value, options) {
28
27
  return value;
29
28
  };
30
29
  exports.getSafeStringValue = getSafeStringValue;
31
- var getSafeStringOrNumberValue = function (value, options) {
32
- if (options === void 0) { options = {}; }
33
- var _a = options.coerceValue, coerceValue = _a === void 0 ? false : _a;
30
+ const getSafeStringOrNumberValue = (value, options = {}) => {
31
+ const { coerceValue = false } = options;
34
32
  if ((0, validators_1.isNull)(value)) {
35
33
  return undefined;
36
34
  }
37
35
  if ((0, validators_1.isNumber)(value)) {
38
36
  return value;
39
37
  }
40
- var logProps = { received: typeof value, expected: 'string or number' };
38
+ const logProps = { received: typeof value, expected: 'string or number' };
41
39
  if ((0, validators_1.isObject)(value)) {
42
40
  logInvalidTypeFallbackWarning(logProps);
43
41
  return undefined;
@@ -56,9 +54,8 @@ var getSafeStringOrNumberValue = function (value, options) {
56
54
  return value;
57
55
  };
58
56
  exports.getSafeStringOrNumberValue = getSafeStringOrNumberValue;
59
- var getSafeBooleanValue = function (value, options) {
60
- if (options === void 0) { options = {}; }
61
- var _a = options.coerceValue, coerceValue = _a === void 0 ? false : _a;
57
+ const getSafeBooleanValue = (value, options = {}) => {
58
+ const { coerceValue = false } = options;
62
59
  if ((0, validators_1.isNull)(value)) {
63
60
  return false;
64
61
  }
@@ -76,7 +73,7 @@ var getSafeBooleanValue = function (value, options) {
76
73
  return value;
77
74
  };
78
75
  exports.getSafeBooleanValue = getSafeBooleanValue;
79
- var getSafeDateOrStringValue = function (value) {
76
+ const getSafeDateOrStringValue = (value) => {
80
77
  if ((0, validators_1.isNull)(value)) {
81
78
  return undefined;
82
79
  }
@@ -87,7 +84,7 @@ var getSafeDateOrStringValue = function (value) {
87
84
  return value;
88
85
  };
89
86
  exports.getSafeDateOrStringValue = getSafeDateOrStringValue;
90
- var getSafeDateStringValue = function (value) {
87
+ const getSafeDateStringValue = (value) => {
91
88
  if ((0, validators_1.isNull)(value)) {
92
89
  return null;
93
90
  }
@@ -95,22 +92,20 @@ var getSafeDateStringValue = function (value) {
95
92
  logInvalidTypeFallbackWarning({
96
93
  received: typeof value,
97
94
  expected: 'string',
98
- fallback: 'null'
95
+ fallback: 'null',
99
96
  });
100
97
  return null;
101
98
  }
102
- var date = (0, utils_1.dateStringToDate)(value);
99
+ const date = (0, utils_1.dateStringToDate)(value);
103
100
  if (date === null) {
104
101
  console.warn('Incorrectly formatted date string. Falling back to null.');
105
102
  }
106
103
  return date;
107
104
  };
108
105
  exports.getSafeDateStringValue = getSafeDateStringValue;
109
- var logInvalidTypeCoercedWarning = function (_a) {
110
- var received = _a.received, expected = _a.expected;
111
- console.warn("Value with type ".concat(received, " passed to control that only accepts type ").concat(expected, ". Type will be coerced, but this behaviour will change in the future, so please fix your code."));
106
+ const logInvalidTypeCoercedWarning = ({ received, expected, }) => {
107
+ console.warn(`Value with type ${received} passed to control that only accepts type ${expected}. Type will be coerced, but this behaviour will change in the future, so please fix your code.`);
112
108
  };
113
- var logInvalidTypeFallbackWarning = function (_a) {
114
- var received = _a.received, expected = _a.expected, _b = _a.fallback, fallback = _b === void 0 ? 'undefined' : _b;
115
- console.warn("Value with type ".concat(received, " passed to control that only accepts type ").concat(expected, ". Falling back to ").concat(fallback));
109
+ const logInvalidTypeFallbackWarning = ({ received, expected, fallback = 'undefined', }) => {
110
+ console.warn(`Value with type ${received} passed to control that only accepts type ${expected}. Falling back to ${fallback}`);
116
111
  };
@@ -2,35 +2,35 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- exports.__esModule = true;
6
- var de_json_1 = __importDefault(require("./de.json"));
7
- var en_json_1 = __importDefault(require("./en.json"));
8
- var es_json_1 = __importDefault(require("./es.json"));
9
- var fr_json_1 = __importDefault(require("./fr.json"));
10
- var hu_json_1 = __importDefault(require("./hu.json"));
11
- var id_json_1 = __importDefault(require("./id.json"));
12
- var it_json_1 = __importDefault(require("./it.json"));
13
- var ja_json_1 = __importDefault(require("./ja.json"));
14
- var pl_json_1 = __importDefault(require("./pl.json"));
15
- var pt_json_1 = __importDefault(require("./pt.json"));
16
- var ro_json_1 = __importDefault(require("./ro.json"));
17
- var ru_json_1 = __importDefault(require("./ru.json"));
18
- var tr_json_1 = __importDefault(require("./tr.json"));
19
- var zh_json_1 = __importDefault(require("./zh.json"));
20
- var translations = {
21
- en: en_json_1["default"],
22
- de: de_json_1["default"],
23
- es: es_json_1["default"],
24
- fr: fr_json_1["default"],
25
- hu: hu_json_1["default"],
26
- id: id_json_1["default"],
27
- it: it_json_1["default"],
28
- ja: ja_json_1["default"],
29
- pl: pl_json_1["default"],
30
- pt: pt_json_1["default"],
31
- ro: ro_json_1["default"],
32
- ru: ru_json_1["default"],
33
- tr: tr_json_1["default"],
34
- zh: zh_json_1["default"]
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const de_json_1 = __importDefault(require("./de.json"));
7
+ const en_json_1 = __importDefault(require("./en.json"));
8
+ const es_json_1 = __importDefault(require("./es.json"));
9
+ const fr_json_1 = __importDefault(require("./fr.json"));
10
+ const hu_json_1 = __importDefault(require("./hu.json"));
11
+ const id_json_1 = __importDefault(require("./id.json"));
12
+ const it_json_1 = __importDefault(require("./it.json"));
13
+ const ja_json_1 = __importDefault(require("./ja.json"));
14
+ const pl_json_1 = __importDefault(require("./pl.json"));
15
+ const pt_json_1 = __importDefault(require("./pt.json"));
16
+ const ro_json_1 = __importDefault(require("./ro.json"));
17
+ const ru_json_1 = __importDefault(require("./ru.json"));
18
+ const tr_json_1 = __importDefault(require("./tr.json"));
19
+ const zh_json_1 = __importDefault(require("./zh.json"));
20
+ const translations = {
21
+ en: en_json_1.default,
22
+ de: de_json_1.default,
23
+ es: es_json_1.default,
24
+ fr: fr_json_1.default,
25
+ hu: hu_json_1.default,
26
+ id: id_json_1.default,
27
+ it: it_json_1.default,
28
+ ja: ja_json_1.default,
29
+ pl: pl_json_1.default,
30
+ pt: pt_json_1.default,
31
+ ro: ro_json_1.default,
32
+ ru: ru_json_1.default,
33
+ tr: tr_json_1.default,
34
+ zh: zh_json_1.default,
35
35
  };
36
- exports["default"] = translations;
36
+ exports.default = translations;
package/build/index.js CHANGED
@@ -13,23 +13,26 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
- exports.__esModule = true;
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
17
20
  exports.translations = exports.fixtures = exports.isValidSchema = exports.Layout = exports.JsonSchemaForm = exports.makeFetcher = exports.DynamicFlow = exports.inlineReferences = exports.convertStepToLayout = void 0;
18
21
  var utils_1 = require("./step/layoutStep/utils");
19
- __createBinding(exports, utils_1, "convertStepToLayout");
20
- __createBinding(exports, utils_1, "inlineReferences");
22
+ Object.defineProperty(exports, "convertStepToLayout", { enumerable: true, get: function () { return utils_1.convertStepToLayout; } });
23
+ Object.defineProperty(exports, "inlineReferences", { enumerable: true, get: function () { return utils_1.inlineReferences; } });
21
24
  var dynamicFlow_1 = require("./dynamicFlow");
22
- __createBinding(exports, dynamicFlow_1, "default", "DynamicFlow");
25
+ Object.defineProperty(exports, "DynamicFlow", { enumerable: true, get: function () { return __importDefault(dynamicFlow_1).default; } });
23
26
  var makeFetcher_1 = require("./common/makeFetcher");
24
- __createBinding(exports, makeFetcher_1, "makeFetcher");
27
+ Object.defineProperty(exports, "makeFetcher", { enumerable: true, get: function () { return makeFetcher_1.makeFetcher; } });
25
28
  var jsonSchemaForm_1 = require("./jsonSchemaForm");
26
- __createBinding(exports, jsonSchemaForm_1, "default", "JsonSchemaForm");
29
+ Object.defineProperty(exports, "JsonSchemaForm", { enumerable: true, get: function () { return __importDefault(jsonSchemaForm_1).default; } });
27
30
  var layout_1 = require("./layout");
28
- __createBinding(exports, layout_1, "DynamicLayout", "Layout");
31
+ Object.defineProperty(exports, "Layout", { enumerable: true, get: function () { return layout_1.DynamicLayout; } });
29
32
  var validators_1 = require("./common/validators");
30
- __createBinding(exports, validators_1, "isValidSchema");
33
+ Object.defineProperty(exports, "isValidSchema", { enumerable: true, get: function () { return validators_1.isValidSchema; } });
31
34
  var fixtures_1 = require("./fixtures");
32
- __createBinding(exports, fixtures_1, "fixtures");
35
+ Object.defineProperty(exports, "fixtures", { enumerable: true, get: function () { return fixtures_1.fixtures; } });
33
36
  var i18n_1 = require("./i18n");
34
- __createBinding(exports, i18n_1, "default", "translations");
37
+ Object.defineProperty(exports, "translations", { enumerable: true, get: function () { return __importDefault(i18n_1).default; } });
35
38
  __exportStar(require("./dynamicFlow/DynamicFlow"), exports);