@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.
- package/build/common/constants/DateMode.js +2 -2
- package/build/common/constants/FormControlType.js +2 -2
- package/build/common/constants/MonthFormat.js +2 -2
- package/build/common/constants/SchemaType.js +2 -2
- package/build/common/constants/Size.js +2 -2
- package/build/common/constants/index.js +1 -1
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +15 -27
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +11 -9
- package/build/common/contexts/eventsContext/EventsContext.js +11 -28
- package/build/common/contexts/fetcherContexts/FetcherContexts.js +14 -27
- package/build/common/contexts/index.js +1 -1
- package/build/common/contexts/logContext/LogContext.js +12 -30
- package/build/common/hooks/index.js +1 -1
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +3 -3
- package/build/common/hooks/useExternal/useExternal.js +8 -8
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +20 -31
- package/build/common/hooks/usePersistAsync/usePersistAsync.js +60 -139
- package/build/common/hooks/usePolling/usePolling.js +20 -21
- package/build/common/hooks/usePrevious/usePrevious.js +5 -5
- package/build/common/hooks/useStepPolling/useStepPolling.js +15 -14
- package/build/common/makeFetcher/index.js +1 -1
- package/build/common/makeFetcher/makeFetcher.js +10 -24
- package/build/common/messages.js +5 -5
- package/build/common/utils/api-utils.js +3 -4
- package/build/common/utils/date-utils.js +11 -11
- package/build/common/utils/debounce.js +11 -15
- package/build/common/utils/file-utils.js +12 -25
- package/build/common/utils/id-utils.js +4 -5
- package/build/common/utils/index.js +1 -1
- package/build/common/utils/is-equal.js +8 -8
- package/build/common/utils/schema-utils.js +6 -6
- package/build/common/utils/step-utils.js +14 -14
- package/build/common/validators/index.js +7 -7
- package/build/common/validators/models/model-validators.js +8 -8
- package/build/common/validators/models/models.utils.js +29 -42
- package/build/common/validators/schemas/schema-validators.js +11 -13
- package/build/common/validators/types/type-validators.js +9 -13
- package/build/common/validators/validationFailures/validation-failures.js +14 -14
- package/build/common/validators/validationFailures/validation-failures.utils.js +5 -7
- package/build/common/validators/values/value-validators.js +4 -6
- package/build/dynamicFlow/DynamicFlow.js +185 -307
- package/build/dynamicFlow/DynamicFlowStep.js +12 -23
- package/build/dynamicFlow/DynamicFlowTypes.js +1 -1
- package/build/dynamicFlow/index.js +6 -14
- package/build/dynamicFlow/stories/DynamicFlow.story.js +20 -20
- package/build/dynamicFlow/stories/EditableDynamicFlow.js +20 -33
- package/build/dynamicFlow/stories/fixtureFetcher.js +46 -104
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +22 -40
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +6 -6
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +10 -11
- package/build/dynamicFlow/utils/index.js +5 -2
- package/build/dynamicFlow/utils/responseParsers/response-parsers.js +53 -118
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +9 -9
- package/build/dynamicFlow/utils/useDynamicFlowState.js +51 -74
- package/build/dynamicFlow/utils/useLoader.js +9 -20
- package/build/fixtures/components/alert.js +8 -8
- package/build/fixtures/components/box.js +7 -7
- package/build/fixtures/components/button.js +25 -36
- package/build/fixtures/components/columns.js +10 -10
- package/build/fixtures/components/copyable.js +6 -6
- package/build/fixtures/components/decision.js +15 -15
- package/build/fixtures/components/heading.js +7 -7
- package/build/fixtures/components/image.js +10 -10
- package/build/fixtures/components/index.js +17 -25
- package/build/fixtures/components/info.js +22 -6
- package/build/fixtures/components/list.js +8 -8
- package/build/fixtures/components/loading-indicator.js +5 -5
- package/build/fixtures/components/paragraph.js +9 -9
- package/build/fixtures/components/review.js +11 -11
- package/build/fixtures/examples/camera-capture.js +29 -29
- package/build/fixtures/examples/index.js +9 -17
- package/build/fixtures/examples/recipient-update.js +69 -69
- package/build/fixtures/examples/recipient.js +63 -63
- package/build/fixtures/examples/single-file-upload.js +21 -21
- package/build/fixtures/examples/step-validation-errors.js +21 -21
- package/build/fixtures/features/action-response.js +8 -8
- package/build/fixtures/features/external.js +8 -8
- package/build/fixtures/features/index.js +9 -17
- package/build/fixtures/features/persist-async.js +11 -11
- package/build/fixtures/features/polling.js +9 -9
- package/build/fixtures/features/validation-async.js +10 -10
- package/build/fixtures/index.js +11 -22
- package/build/fixtures/jsonSchemaForm/allOf.js +30 -30
- package/build/fixtures/jsonSchemaForm/audRecipient.js +271 -271
- package/build/fixtures/jsonSchemaForm/currency.js +12 -12
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +11 -11
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +11 -11
- package/build/fixtures/jsonSchemaForm/oneOf.js +27 -27
- package/build/fixtures/jsonSchemaForm/oneOfTabs.js +16 -16
- package/build/fixtures/jsonSchemaForm/promotedOneOf.js +17 -17
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +30 -30
- package/build/fixtures/jsonSchemaForm/simple.js +16 -16
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +19 -19
- package/build/fixtures/jsonSchemaForm/validationAsync.js +8 -8
- package/build/fixtures/layouts/all.js +37 -37
- package/build/fixtures/layouts/final-step-layout.js +9 -9
- package/build/fixtures/layouts/index.js +10 -18
- package/build/fixtures/layouts/list.js +10 -10
- package/build/fixtures/layouts/pay-in.js +23 -23
- package/build/fixtures/layouts/review.js +38 -38
- package/build/fixtures/layouts/success.js +15 -15
- package/build/fixtures/responses/action-response-final.js +8 -8
- package/build/fixtures/responses/action.js +3 -3
- package/build/fixtures/responses/exit.js +3 -3
- package/build/fixtures/responses/index.js +8 -16
- package/build/fixtures/responses/recipient-update-final.js +8 -8
- package/build/fixtures/schemas/basic-form.js +11 -11
- package/build/fixtures/schemas/index.js +8 -16
- package/build/fixtures/schemas/number-and-integer.js +11 -11
- package/build/fixtures/schemas/one-of.js +43 -46
- package/build/fixtures/schemas/string-formats.js +15 -15
- package/build/fixtures/utils/image-util.js +8 -8
- package/build/formControl/FormControl.js +118 -148
- package/build/formControl/index.js +6 -14
- package/build/formControl/utils/index.js +1 -1
- package/build/formControl/utils/value-utils.js +18 -23
- package/build/i18n/index.js +31 -31
- package/build/index.js +13 -10
- package/build/jsonSchemaForm/JsonSchemaForm.js +12 -24
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +24 -37
- package/build/jsonSchemaForm/allOfSchema/index.js +6 -14
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +9 -20
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +9 -20
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +6 -14
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +56 -115
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +7 -7
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +6 -14
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +1 -1
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +19 -71
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +10 -11
- package/build/jsonSchemaForm/arrayTypeSchema/index.js +6 -14
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +45 -62
- package/build/jsonSchemaForm/basicTypeSchema/index.js +6 -14
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +39 -50
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +18 -18
- package/build/jsonSchemaForm/controlFeedback/index.js +6 -14
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js +52 -61
- package/build/jsonSchemaForm/genericSchema/index.js +6 -14
- package/build/jsonSchemaForm/help/Help.js +9 -9
- package/build/jsonSchemaForm/help/Help.messages.js +5 -5
- package/build/jsonSchemaForm/help/index.js +6 -14
- package/build/jsonSchemaForm/index.js +6 -14
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +28 -49
- package/build/jsonSchemaForm/objectSchema/index.js +6 -14
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +54 -74
- package/build/jsonSchemaForm/oneOfSchema/index.js +6 -14
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +3 -3
- package/build/jsonSchemaForm/oneOfSchema/utils/index.js +1 -1
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +19 -20
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +11 -22
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +5 -5
- package/build/jsonSchemaForm/persistAsyncSchema/index.js +6 -14
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +73 -127
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +6 -14
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +45 -110
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +17 -17
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +6 -14
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +28 -47
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js +6 -14
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +4 -4
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +13 -24
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +11 -22
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +12 -23
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +24 -26
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +6 -6
- package/build/jsonSchemaForm/readOnlySchema/index.js +6 -14
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +26 -39
- package/build/jsonSchemaForm/schemaFormControl/index.js +6 -14
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +5 -5
- package/build/jsonSchemaForm/schemaFormControl/utils/index.js +1 -1
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +30 -47
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +57 -119
- package/build/jsonSchemaForm/validationAsyncSchema/index.js +6 -14
- package/build/layout/DynamicLayout.js +10 -21
- package/build/layout/alert/DynamicAlert.js +9 -9
- package/build/layout/box/DynamicBox.js +12 -23
- package/build/layout/button/DynamicButton.js +16 -27
- package/build/layout/columns/DynamicColumns.js +13 -24
- package/build/layout/decision/DynamicDecision.js +16 -27
- package/build/layout/divider/DynamicDivider.js +7 -8
- package/build/layout/external/DynamicExternal.js +16 -28
- package/build/layout/external/DynamicExternal.messages.js +5 -5
- package/build/layout/form/DynamicForm.js +10 -21
- package/build/layout/heading/DynamicHeading.js +12 -23
- package/build/layout/icon/DynamicIcon.js +9 -10
- package/build/layout/image/DynamicImage.js +43 -93
- package/build/layout/index.js +21 -29
- package/build/layout/info/DynamicInfo.js +7 -19
- package/build/layout/list/DynamicList.js +14 -26
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +8 -9
- package/build/layout/paragraph/DynamicParagraph.js +19 -37
- package/build/layout/paragraph/DynamicParagraph.messages.js +6 -6
- package/build/layout/paragraph/useSnackBarIfAvailable.js +4 -4
- package/build/layout/review/DynamicReview.js +14 -26
- package/build/layout/utils.js +4 -6
- package/build/step/cameraStep/CameraStep.js +42 -88
- package/build/step/cameraStep/cameraCapture/CameraCapture.js +48 -105
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +7 -7
- package/build/step/cameraStep/cameraCapture/components/index.js +10 -28
- package/build/step/cameraStep/cameraCapture/hooks/index.js +17 -72
- package/build/step/cameraStep/cameraCapture/index.js +6 -14
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +33 -45
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +8 -19
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +6 -6
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +9 -21
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +7 -7
- package/build/step/cameraStep/cameraCapture/screens/index.js +6 -14
- package/build/step/cameraStep/cameraCapture/tracking/index.js +17 -99
- package/build/step/cameraStep/cameraCapture/utils/index.js +33 -96
- package/build/step/cameraStep/index.js +6 -14
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +20 -21
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +8 -8
- package/build/step/externalConfirmationStep/index.js +6 -14
- package/build/step/index.js +7 -15
- package/build/step/layoutStep/LayoutStep.js +19 -19
- package/build/step/layoutStep/index.js +6 -14
- package/build/step/layoutStep/utils/index.js +3 -14
- package/build/step/layoutStep/utils/inline-reference-utils.js +29 -46
- package/build/step/layoutStep/utils/layout-utils.js +34 -53
- package/build/types/common/FormControl.js +1 -1
- package/build/types/index.js +13 -13
- package/build/types/specification/Action.js +1 -1
- package/build/types/specification/FileUploadSchema.js +1 -1
- package/build/types/specification/LayoutComponent.js +1 -1
- package/build/types/specification/Model.js +9 -17
- package/build/types/specification/PersistAsync.js +1 -1
- package/build/types/specification/Polling.js +1 -1
- package/build/types/specification/Promotion.js +1 -1
- package/build/types/specification/Schema.js +8 -8
- package/build/types/specification/Step.js +3 -5
- package/build/types/specification/ValidationAsync.js +1 -1
- package/build/types/specification/core.js +1 -1
- package/package.json +1 -1
|
@@ -1,125 +1,96 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
18
|
+
this.getAutocompleteStatus = () => (this.props.autoComplete ? 'on' : 'disabled');
|
|
19
|
+
this.handleOnChange = (value) => {
|
|
20
|
+
this.props.onChange(value);
|
|
48
21
|
};
|
|
49
|
-
|
|
50
|
-
|
|
22
|
+
this.handleInputOnChange = (event) => {
|
|
23
|
+
this.props.onChange(event.target.value);
|
|
51
24
|
};
|
|
52
|
-
|
|
25
|
+
this.handleOnFocus = () => {
|
|
53
26
|
var _a, _b;
|
|
54
|
-
(_b = (_a =
|
|
27
|
+
(_b = (_a = this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
55
28
|
};
|
|
56
|
-
|
|
29
|
+
this.handleOnBlur = () => {
|
|
57
30
|
var _a, _b;
|
|
58
|
-
(_b = (_a =
|
|
31
|
+
(_b = (_a = this.props).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
59
32
|
};
|
|
60
|
-
|
|
61
|
-
if (
|
|
62
|
-
return options.find(
|
|
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 (
|
|
65
|
-
return options.find(
|
|
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
|
-
|
|
70
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
86
|
-
var _this = this;
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
87
58
|
var _a;
|
|
88
|
-
|
|
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
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
101
|
-
|
|
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(
|
|
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
|
-
})
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
selectedOption: options.find(
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
119
|
+
const textareaProps = {
|
|
149
120
|
className: 'form-control tw-form-control',
|
|
150
|
-
id
|
|
151
|
-
name
|
|
152
|
-
placeholder
|
|
121
|
+
id,
|
|
122
|
+
name,
|
|
123
|
+
placeholder,
|
|
153
124
|
value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }),
|
|
154
|
-
readOnly
|
|
155
|
-
required
|
|
156
|
-
minLength
|
|
157
|
-
maxLength
|
|
125
|
+
readOnly,
|
|
126
|
+
required,
|
|
127
|
+
minLength,
|
|
128
|
+
maxLength,
|
|
158
129
|
onFocus: this.handleOnFocus,
|
|
159
130
|
onBlur: this.handleOnBlur,
|
|
160
|
-
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,
|
|
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",
|
|
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,
|
|
174
|
-
|
|
175
|
-
}, onFailure:
|
|
176
|
-
|
|
177
|
-
}, onCancel:
|
|
178
|
-
|
|
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
|
-
|
|
154
|
+
const inputProps = {
|
|
184
155
|
type: 'text',
|
|
185
156
|
className: 'form-control',
|
|
186
|
-
id
|
|
187
|
-
name
|
|
188
|
-
placeholder
|
|
157
|
+
id,
|
|
158
|
+
name,
|
|
159
|
+
placeholder,
|
|
189
160
|
value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }),
|
|
190
|
-
readOnly
|
|
191
|
-
required
|
|
192
|
-
minLength
|
|
193
|
-
maxLength
|
|
161
|
+
readOnly,
|
|
162
|
+
required,
|
|
163
|
+
minLength,
|
|
164
|
+
maxLength,
|
|
194
165
|
onFocus: this.handleOnFocus,
|
|
195
166
|
onBlur: this.handleOnBlur,
|
|
196
|
-
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,
|
|
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",
|
|
173
|
+
return (0, jsx_runtime_1.jsx)("input", Object.assign({}, inputProps, { onChange: this.handleInputOnChange }));
|
|
203
174
|
}
|
|
204
175
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
}
|
|
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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./value-utils"), exports);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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
|
-
|
|
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
|
-
|
|
60
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
110
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
};
|
package/build/i18n/index.js
CHANGED
|
@@ -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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
en: en_json_1
|
|
22
|
-
de: de_json_1
|
|
23
|
-
es: es_json_1
|
|
24
|
-
fr: fr_json_1
|
|
25
|
-
hu: hu_json_1
|
|
26
|
-
id: id_json_1
|
|
27
|
-
it: it_json_1
|
|
28
|
-
ja: ja_json_1
|
|
29
|
-
pl: pl_json_1
|
|
30
|
-
pt: pt_json_1
|
|
31
|
-
ro: ro_json_1
|
|
32
|
-
ru: ru_json_1
|
|
33
|
-
tr: tr_json_1
|
|
34
|
-
zh: zh_json_1
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
+
Object.defineProperty(exports, "DynamicFlow", { enumerable: true, get: function () { return __importDefault(dynamicFlow_1).default; } });
|
|
23
26
|
var makeFetcher_1 = require("./common/makeFetcher");
|
|
24
|
-
|
|
27
|
+
Object.defineProperty(exports, "makeFetcher", { enumerable: true, get: function () { return makeFetcher_1.makeFetcher; } });
|
|
25
28
|
var jsonSchemaForm_1 = require("./jsonSchemaForm");
|
|
26
|
-
|
|
29
|
+
Object.defineProperty(exports, "JsonSchemaForm", { enumerable: true, get: function () { return __importDefault(jsonSchemaForm_1).default; } });
|
|
27
30
|
var layout_1 = require("./layout");
|
|
28
|
-
|
|
31
|
+
Object.defineProperty(exports, "Layout", { enumerable: true, get: function () { return layout_1.DynamicLayout; } });
|
|
29
32
|
var validators_1 = require("./common/validators");
|
|
30
|
-
|
|
33
|
+
Object.defineProperty(exports, "isValidSchema", { enumerable: true, get: function () { return validators_1.isValidSchema; } });
|
|
31
34
|
var fixtures_1 = require("./fixtures");
|
|
32
|
-
|
|
35
|
+
Object.defineProperty(exports, "fixtures", { enumerable: true, get: function () { return fixtures_1.fixtures; } });
|
|
33
36
|
var i18n_1 = require("./i18n");
|
|
34
|
-
|
|
37
|
+
Object.defineProperty(exports, "translations", { enumerable: true, get: function () { return __importDefault(i18n_1).default; } });
|
|
35
38
|
__exportStar(require("./dynamicFlow/DynamicFlow"), exports);
|