@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,90 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructUploadError = exports.constructUploadResponse = exports.createPayload = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../common/utils");
|
|
5
|
+
const validators_1 = require("../../../../../common/validators");
|
|
6
|
+
async function createPayload(userUploadedFile, isBlobSchema) {
|
|
7
|
+
if (isBlobSchema) {
|
|
8
|
+
return userUploadedFile;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
if (userUploadedFile instanceof Blob) {
|
|
12
|
+
return (0, utils_1.toBase64)(userUploadedFile);
|
|
8
13
|
}
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
14
|
+
throw new Error('Error creating payload for MultipleFileUploadSchema. Uploaded file is not an instance of Blob.');
|
|
47
15
|
}
|
|
48
|
-
};
|
|
49
|
-
exports.__esModule = true;
|
|
50
|
-
exports.constructUploadError = exports.constructUploadResponse = exports.createPayload = void 0;
|
|
51
|
-
var utils_1 = require("../../../../../common/utils");
|
|
52
|
-
var validators_1 = require("../../../../../common/validators");
|
|
53
|
-
function createPayload(userUploadedFile, isBlobSchema) {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
-
return __generator(this, function (_a) {
|
|
56
|
-
if (isBlobSchema) {
|
|
57
|
-
return [2 /*return*/, userUploadedFile];
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
if (userUploadedFile instanceof Blob) {
|
|
61
|
-
return [2 /*return*/, (0, utils_1.toBase64)(userUploadedFile)];
|
|
62
|
-
}
|
|
63
|
-
throw new Error('Error creating payload for MultipleFileUploadSchema. Uploaded file is not an instance of Blob.');
|
|
64
|
-
}
|
|
65
|
-
return [2 /*return*/];
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
16
|
}
|
|
69
17
|
exports.createPayload = createPayload;
|
|
70
18
|
function constructUploadResponse(response) {
|
|
71
|
-
|
|
72
|
-
return
|
|
19
|
+
const id = response.data;
|
|
20
|
+
return Object.assign({ id }, response);
|
|
73
21
|
}
|
|
74
22
|
exports.constructUploadResponse = constructUploadResponse;
|
|
75
23
|
function constructUploadError(response) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
24
|
+
const isError = response instanceof Error;
|
|
25
|
+
const hasValidData = (0, validators_1.isObject)(response) && 'data' in response;
|
|
26
|
+
const isInvalidResponseData = !hasValidData && !isError;
|
|
79
27
|
if (isInvalidResponseData) {
|
|
80
28
|
return (0, validators_1.isString)(response) ? response : undefined;
|
|
81
29
|
}
|
|
82
30
|
if (isError) {
|
|
83
|
-
|
|
31
|
+
const error = response;
|
|
84
32
|
return { id: (0, utils_1.generateRandomId)(), message: error.message };
|
|
85
33
|
}
|
|
86
34
|
else {
|
|
87
|
-
return
|
|
35
|
+
return Object.assign({ message: (0, validators_1.isString)(response.message) ? response.message : '' }, response);
|
|
88
36
|
}
|
|
89
37
|
}
|
|
90
38
|
exports.constructUploadError = constructUploadError;
|
|
@@ -2,20 +2,19 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useFormattedDefaultErrorMessages = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function useFormattedDefaultErrorMessages(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var maxFileSizeError = MultipleFileUploadSchema_messages_1["default"].maxFileSizeError, maxItemsError = MultipleFileUploadSchema_messages_1["default"].maxItemsError, minItemsError = MultipleFileUploadSchema_messages_1["default"].minItemsError;
|
|
7
|
+
const react_intl_1 = require("react-intl");
|
|
8
|
+
const messages_1 = __importDefault(require("../../../../../common/messages"));
|
|
9
|
+
const MultipleFileUploadSchema_messages_1 = __importDefault(require("../MultipleFileUploadSchema.messages"));
|
|
10
|
+
function useFormattedDefaultErrorMessages({ maxItems, minItems, }) {
|
|
11
|
+
const { formatMessage } = (0, react_intl_1.useIntl)();
|
|
12
|
+
const { maxFileSizeError, maxItemsError, minItemsError } = MultipleFileUploadSchema_messages_1.default;
|
|
14
13
|
return {
|
|
15
14
|
maxFileSizeErrorMessage: formatMessage(maxFileSizeError),
|
|
16
|
-
maxItemsErrorMessage: formatMessage(maxItemsError, { maxItems
|
|
17
|
-
minItemsErrorMessage: formatMessage(minItemsError, { minItems
|
|
18
|
-
requiredMessage: formatMessage(messages_1
|
|
15
|
+
maxItemsErrorMessage: formatMessage(maxItemsError, { maxItems }),
|
|
16
|
+
minItemsErrorMessage: formatMessage(minItemsError, { minItems }),
|
|
17
|
+
requiredMessage: formatMessage(messages_1.default.required),
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
20
|
exports.useFormattedDefaultErrorMessages = useFormattedDefaultErrorMessages;
|
|
@@ -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 ArraySchema_1 = require("./ArraySchema");
|
|
16
|
-
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ArraySchema_1).default; } });
|
|
@@ -1,48 +1,33 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
|
-
exports
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../../common/utils");
|
|
10
|
+
const validators_1 = require("../../common/validators");
|
|
11
|
+
const layout_1 = require("../../layout");
|
|
12
|
+
const controlFeedback_1 = __importDefault(require("../controlFeedback"));
|
|
13
|
+
const help_1 = __importDefault(require("../help"));
|
|
14
|
+
const schemaFormControl_1 = __importDefault(require("../schemaFormControl"));
|
|
15
|
+
const isNullish = (value) => (0, validators_1.isNull)(value) || (0, validators_1.isUndefined)(value);
|
|
16
|
+
const getDefaultValue = (schema) => {
|
|
17
|
+
return schema.type === 'boolean' && isNullish(schema.default) ? false : schema.default;
|
|
28
18
|
};
|
|
29
|
-
|
|
30
|
-
return schema.type === 'boolean' && isNullish(schema["default"]) ? false : schema["default"];
|
|
31
|
-
};
|
|
32
|
-
var BasicTypeSchema = function (props) {
|
|
19
|
+
const BasicTypeSchema = (props) => {
|
|
33
20
|
var _a, _b, _c;
|
|
34
|
-
|
|
21
|
+
const onChange = (newModel) => {
|
|
35
22
|
setChanged(true);
|
|
36
23
|
setModelAndBroadcast(sanitiseModel(newModel), 'user');
|
|
37
24
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}; // TODO: LOW avoid type assertion
|
|
41
|
-
var setModelAndBroadcast = function (newModel, type) {
|
|
25
|
+
const getValidationKeys = (newModel) => (0, validators_1.getValidationFailures)(newModel, props.schema, props.required); // TODO: LOW avoid type assertion
|
|
26
|
+
const setModelAndBroadcast = (newModel, type) => {
|
|
42
27
|
setModel(newModel);
|
|
43
|
-
|
|
28
|
+
const validationKeys = getValidationKeys(newModel);
|
|
44
29
|
setValidations(validationKeys);
|
|
45
|
-
|
|
30
|
+
const broadcastModel = newModel;
|
|
46
31
|
setLastModel(broadcastModel);
|
|
47
32
|
if (broadcastModel !== lastModel) {
|
|
48
33
|
props.onChange({
|
|
@@ -50,59 +35,57 @@ var BasicTypeSchema = function (props) {
|
|
|
50
35
|
triggerSchema: props.schema,
|
|
51
36
|
triggerModel: broadcastModel,
|
|
52
37
|
lastTriggerModel: lastModel,
|
|
53
|
-
type
|
|
38
|
+
type,
|
|
54
39
|
});
|
|
55
40
|
}
|
|
56
41
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var onFocus = function () { return setFocused(true); };
|
|
61
|
-
var onBlur = function () {
|
|
42
|
+
const sanitiseModel = (newModel) => (0, validators_1.getValidBasicModelOrNull)(newModel, props.schema);
|
|
43
|
+
const onFocus = () => setFocused(true);
|
|
44
|
+
const onBlur = () => {
|
|
62
45
|
setFocused(false);
|
|
63
46
|
setBlurred(true);
|
|
64
47
|
if (props.onBlur) {
|
|
65
48
|
props.onBlur();
|
|
66
49
|
}
|
|
67
50
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
51
|
+
const [model, setModel] = (0, react_1.useState)((_a = props.model) !== null && _a !== void 0 ? _a : null);
|
|
52
|
+
const [lastModel, setLastModel] = (0, react_1.useState)((_b = props.model) !== null && _b !== void 0 ? _b : null);
|
|
53
|
+
const [changed, setChanged] = (0, react_1.useState)(false);
|
|
54
|
+
const [focused, setFocused] = (0, react_1.useState)(false);
|
|
55
|
+
const [blurred, setBlurred] = (0, react_1.useState)(false);
|
|
56
|
+
const [validations, setValidations] = (0, react_1.useState)([]);
|
|
57
|
+
const id = (0, react_1.useMemo)(() => props.schema.$id || (0, utils_1.generateRandomId)(), [props.schema.$id]);
|
|
58
|
+
const onSchemaChange = () => {
|
|
59
|
+
const defaultValue = getDefaultValue(props.schema);
|
|
77
60
|
// if no model, change to the default, only run this when the schema changes
|
|
78
61
|
if (isNullish(model) && !isNullish(defaultValue)) {
|
|
79
62
|
setModelAndBroadcast(defaultValue, 'init');
|
|
80
63
|
}
|
|
81
|
-
if (props.schema
|
|
82
|
-
setModelAndBroadcast(props.schema
|
|
64
|
+
if (props.schema.const) {
|
|
65
|
+
setModelAndBroadcast(props.schema.const, 'init');
|
|
83
66
|
}
|
|
84
67
|
};
|
|
85
|
-
|
|
68
|
+
const refreshValidations = () => {
|
|
86
69
|
setValidations(getValidationKeys(model));
|
|
87
70
|
};
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
const isConst = props.schema.const;
|
|
72
|
+
const isHidden = props.schema.hidden || isConst;
|
|
90
73
|
(0, react_1.useEffect)(refreshValidations, [props.model, props.submitted]);
|
|
91
74
|
(0, react_1.useEffect)(onSchemaChange, [props.schema]);
|
|
92
|
-
(0, react_1.useEffect)(
|
|
93
|
-
|
|
75
|
+
(0, react_1.useEffect)(() => { var _a; return setModel((_a = props.model) !== null && _a !== void 0 ? _a : null); }, [props.model]);
|
|
76
|
+
const formGroupClasses = {
|
|
94
77
|
'form-group': true,
|
|
95
78
|
'has-error': ((props.submitted || !changed) && !!props.errors) ||
|
|
96
79
|
((props.submitted || (changed && blurred)) && !!validations.length),
|
|
97
|
-
'has-info': (focused && !!props.schema.description) || !!props.infoMessage
|
|
80
|
+
'has-info': (focused && !!props.schema.description) || !!props.infoMessage,
|
|
98
81
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.schema.alert && (0, jsx_runtime_1.jsx)(layout_1.DynamicAlert, { component: props.schema.alert }), (0, jsx_runtime_1.jsxs)("div",
|
|
82
|
+
const showLabel = props.schema.format !== 'file' && props.schema.type !== 'boolean';
|
|
83
|
+
const schemaHelp = props.schema.help;
|
|
84
|
+
return !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.schema.alert && (0, jsx_runtime_1.jsx)(layout_1.DynamicAlert, { component: props.schema.alert }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(formGroupClasses) }, { children: [showLabel && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "d-inline-block" }, { children: [(0, jsx_runtime_1.jsx)("label", Object.assign({ className: "control-label d-inline", htmlFor: id }, { children: props.schema.title })), !!schemaHelp && (0, jsx_runtime_1.jsx)(help_1.default, { help: schemaHelp })] }))), !showLabel && !!schemaHelp && (0, jsx_runtime_1.jsx)(help_1.default, { help: schemaHelp }), (0, jsx_runtime_1.jsx)(schemaFormControl_1.default, { id: id, schema: props.schema, value: model, disabled: !!props.disabled, onChange: onChange, onFocus: onFocus, onBlur: onBlur }), (0, jsx_runtime_1.jsx)(controlFeedback_1.default, { changed: changed, focused: focused, blurred: blurred, submitted: props.submitted, errors: (_c = props.errors) !== null && _c !== void 0 ? _c : null, schema: props.schema, validations: validations, infoMessage: props.infoMessage })] }))] })) : null;
|
|
102
85
|
};
|
|
103
86
|
BasicTypeSchema.defaultProps = {
|
|
104
87
|
required: false,
|
|
105
88
|
disabled: false,
|
|
106
|
-
onBlur: null
|
|
89
|
+
onBlur: null,
|
|
107
90
|
};
|
|
108
|
-
exports
|
|
91
|
+
exports.default = BasicTypeSchema;
|
|
@@ -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 BasicTypeSchema_1 = require("./BasicTypeSchema");
|
|
16
|
-
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(BasicTypeSchema_1).default; } });
|
|
@@ -1,84 +1,73 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
|
-
exports
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const components_1 = require("@transferwise/components");
|
|
8
|
+
const formatting_1 = require("@transferwise/formatting");
|
|
9
|
+
const react_intl_1 = require("react-intl");
|
|
10
|
+
const ControlFeedback_messages_1 = __importDefault(require("./ControlFeedback.messages"));
|
|
11
|
+
const ControlFeedback = (props) => {
|
|
23
12
|
var _a;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
const defaultValidationMessages = useDefaultValidationMessages(props.schema);
|
|
14
|
+
const validationMessages = Object.assign(Object.assign(Object.assign({}, defaultValidationMessages), props.validationMessages), props.schema.validationMessages);
|
|
15
|
+
const isErrorVisible = (props.submitted || !props.changed) && !!props.errors;
|
|
16
|
+
const isValidationVisible = !isErrorVisible &&
|
|
28
17
|
(props.submitted || (props.changed && props.blurred)) &&
|
|
29
18
|
!!((_a = props.validations) === null || _a === void 0 ? void 0 : _a.length);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [isErrorVisible ? (0, jsx_runtime_1.jsx)(components_1.InlineAlert,
|
|
19
|
+
const isDescriptionVisible = props.focused && props.schema.description && !isValidationVisible;
|
|
20
|
+
const hasInfoMessage = !!props.infoMessage;
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [isErrorVisible ? (0, jsx_runtime_1.jsx)(components_1.InlineAlert, Object.assign({ type: "error" }, { children: props.errors })) : null, isValidationVisible ? ((0, jsx_runtime_1.jsx)(components_1.InlineAlert, Object.assign({ type: "error" }, { children: props.validations.map((validation) => ((0, jsx_runtime_1.jsx)("div", { children: validationMessages[validation] }, validation))) }))) : null, (isDescriptionVisible || hasInfoMessage) && ((0, jsx_runtime_1.jsxs)(components_1.InlineAlert, Object.assign({ type: "info" }, { children: [isDescriptionVisible && (0, jsx_runtime_1.jsx)("div", { children: props.schema.description }), hasInfoMessage && (0, jsx_runtime_1.jsx)("div", { children: props.infoMessage })] })))] }));
|
|
33
22
|
};
|
|
34
23
|
ControlFeedback.defaultProps = {
|
|
35
24
|
errors: '',
|
|
36
25
|
validations: [],
|
|
37
26
|
validationMessages: {},
|
|
38
|
-
validationAsyncSuccessMessage: null
|
|
27
|
+
validationAsyncSuccessMessage: null,
|
|
39
28
|
};
|
|
40
29
|
// TODO: avoid typre assertions in this function
|
|
41
30
|
function useDefaultValidationMessages(schema) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
type: formatMessage(ControlFeedback_messages_1
|
|
45
|
-
minimum: formatMessage(ControlFeedback_messages_1
|
|
46
|
-
minimum: schema.minimum
|
|
31
|
+
const { formatMessage, locale } = (0, react_intl_1.useIntl)();
|
|
32
|
+
const formattedMessages = {
|
|
33
|
+
type: formatMessage(ControlFeedback_messages_1.default.type),
|
|
34
|
+
minimum: formatMessage(ControlFeedback_messages_1.default.minimum, {
|
|
35
|
+
minimum: schema.minimum,
|
|
47
36
|
}),
|
|
48
|
-
maximum: formatMessage(ControlFeedback_messages_1
|
|
49
|
-
maximum: schema.maximum
|
|
37
|
+
maximum: formatMessage(ControlFeedback_messages_1.default.maximum, {
|
|
38
|
+
maximum: schema.maximum,
|
|
50
39
|
}),
|
|
51
|
-
minLength: formatMessage(ControlFeedback_messages_1
|
|
52
|
-
minLength: schema.minLength
|
|
40
|
+
minLength: formatMessage(ControlFeedback_messages_1.default.minLength, {
|
|
41
|
+
minLength: schema.minLength,
|
|
53
42
|
}),
|
|
54
|
-
maxLength: formatMessage(ControlFeedback_messages_1
|
|
55
|
-
maxLength: schema.maxLength
|
|
43
|
+
maxLength: formatMessage(ControlFeedback_messages_1.default.maxLength, {
|
|
44
|
+
maxLength: schema.maxLength,
|
|
56
45
|
}),
|
|
57
|
-
pattern: formatMessage(ControlFeedback_messages_1
|
|
58
|
-
required: formatMessage(ControlFeedback_messages_1
|
|
46
|
+
pattern: formatMessage(ControlFeedback_messages_1.default.pattern),
|
|
47
|
+
required: formatMessage(ControlFeedback_messages_1.default.required),
|
|
59
48
|
};
|
|
60
49
|
if (schema.format === 'date') {
|
|
61
|
-
|
|
62
|
-
pattern: formatMessage(ControlFeedback_messages_1
|
|
50
|
+
const dateOverrides = {
|
|
51
|
+
pattern: formatMessage(ControlFeedback_messages_1.default.patternDate),
|
|
63
52
|
minimum: schema.minimum
|
|
64
|
-
? formatMessage(ControlFeedback_messages_1
|
|
53
|
+
? formatMessage(ControlFeedback_messages_1.default.minimumDate, {
|
|
65
54
|
minimum: (0, formatting_1.formatDate)(new Date(schema.minimum), locale, {
|
|
66
55
|
timeZone: 'UTC',
|
|
67
|
-
dateStyle: 'long'
|
|
68
|
-
})
|
|
56
|
+
dateStyle: 'long',
|
|
57
|
+
}),
|
|
69
58
|
})
|
|
70
59
|
: undefined,
|
|
71
60
|
maximum: schema.maximum
|
|
72
|
-
? formatMessage(ControlFeedback_messages_1
|
|
61
|
+
? formatMessage(ControlFeedback_messages_1.default.maximumDate, {
|
|
73
62
|
maximum: (0, formatting_1.formatDate)(new Date(schema.maximum), locale, {
|
|
74
63
|
timeZone: 'UTC',
|
|
75
|
-
dateStyle: 'long'
|
|
76
|
-
})
|
|
64
|
+
dateStyle: 'long',
|
|
65
|
+
}),
|
|
77
66
|
})
|
|
78
|
-
: undefined
|
|
67
|
+
: undefined,
|
|
79
68
|
};
|
|
80
|
-
return
|
|
69
|
+
return Object.assign(Object.assign({}, formattedMessages), dateOverrides);
|
|
81
70
|
}
|
|
82
71
|
return formattedMessages;
|
|
83
72
|
}
|
|
84
|
-
exports
|
|
73
|
+
exports.default = ControlFeedback;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
3
|
-
|
|
4
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_intl_1 = require("react-intl");
|
|
4
|
+
exports.default = (0, react_intl_1.defineMessages)({
|
|
5
5
|
type: {
|
|
6
6
|
id: 'dynamicFlows.ControlFeedback.type',
|
|
7
7
|
defaultMessage: 'Incorrect type',
|
|
8
|
-
description: ''
|
|
8
|
+
description: '',
|
|
9
9
|
},
|
|
10
10
|
minimum: {
|
|
11
11
|
id: 'dynamicFlows.ControlFeedback.minimum',
|
|
12
|
-
defaultMessage:
|
|
13
|
-
description: ''
|
|
12
|
+
defaultMessage: `Please enter a number that's {minimum} or more.`,
|
|
13
|
+
description: '',
|
|
14
14
|
},
|
|
15
15
|
maximum: {
|
|
16
16
|
id: 'dynamicFlows.ControlFeedback.maximum',
|
|
17
|
-
defaultMessage:
|
|
18
|
-
description: ''
|
|
17
|
+
defaultMessage: `Please enter a number that's {maximum} or less.`,
|
|
18
|
+
description: '',
|
|
19
19
|
},
|
|
20
20
|
minLength: {
|
|
21
21
|
id: 'dynamicFlows.ControlFeedback.minLength',
|
|
22
22
|
defaultMessage: 'Please enter at least {minLength} characters.',
|
|
23
|
-
description: ''
|
|
23
|
+
description: '',
|
|
24
24
|
},
|
|
25
25
|
maxLength: {
|
|
26
26
|
id: 'dynamicFlows.ControlFeedback.maxLength',
|
|
27
27
|
defaultMessage: 'Please enter {maxLength} or fewer characters.',
|
|
28
|
-
description: ''
|
|
28
|
+
description: '',
|
|
29
29
|
},
|
|
30
30
|
minimumDate: {
|
|
31
31
|
id: 'dynamicFlows.ControlFeedback.minimumDate',
|
|
32
|
-
defaultMessage:
|
|
33
|
-
description: ''
|
|
32
|
+
defaultMessage: `Please enter a date that's on or after {minimum}.`,
|
|
33
|
+
description: '',
|
|
34
34
|
},
|
|
35
35
|
maximumDate: {
|
|
36
36
|
id: 'dynamicFlows.ControlFeedback.maximumDate',
|
|
37
|
-
defaultMessage:
|
|
38
|
-
description: ''
|
|
37
|
+
defaultMessage: `Please enter a date that's on or before {maximum}.`,
|
|
38
|
+
description: '',
|
|
39
39
|
},
|
|
40
40
|
pattern: {
|
|
41
41
|
id: 'dynamicFlows.ControlFeedback.pattern',
|
|
42
42
|
defaultMessage: 'Please enter this in the correct format.',
|
|
43
|
-
description: ''
|
|
43
|
+
description: '',
|
|
44
44
|
},
|
|
45
45
|
patternDate: {
|
|
46
46
|
id: 'dynamicFlows.ControlFeedback.patternDate',
|
|
47
47
|
defaultMessage: 'Please enter a date in the corrrect format.',
|
|
48
|
-
description: ''
|
|
48
|
+
description: '',
|
|
49
49
|
},
|
|
50
50
|
required: {
|
|
51
51
|
id: 'dynamicFlows.ControlFeedback.required',
|
|
52
52
|
defaultMessage: 'Please fill out this field.',
|
|
53
|
-
description: ''
|
|
54
|
-
}
|
|
53
|
+
description: '',
|
|
54
|
+
},
|
|
55
55
|
});
|
|
@@ -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 ControlFeedback_1 = require("./ControlFeedback");
|
|
16
|
-
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ControlFeedback_1).default; } });
|