@wise/dynamic-flow-client 0.4.0 → 0.4.1
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 +3 -2
- package/build/common/constants/DateMode.js.map +1 -0
- package/build/common/constants/FormControlType.js +3 -2
- package/build/common/constants/FormControlType.js.map +1 -0
- package/build/common/constants/MonthFormat.js +3 -2
- package/build/common/constants/MonthFormat.js.map +1 -0
- package/build/common/constants/SchemaType.js +3 -2
- package/build/common/constants/SchemaType.js.map +1 -0
- package/build/common/constants/Size.js +3 -2
- package/build/common/constants/Size.js.map +1 -0
- package/build/common/constants/index.js +2 -1
- package/build/common/constants/index.js.map +1 -0
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +16 -27
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js.map +1 -0
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +12 -9
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js.map +1 -0
- package/build/common/contexts/eventsContext/EventsContext.js +12 -28
- package/build/common/contexts/eventsContext/EventsContext.js.map +1 -0
- package/build/common/contexts/fetcherContexts/FetcherContexts.js +15 -27
- package/build/common/contexts/fetcherContexts/FetcherContexts.js.map +1 -0
- package/build/common/contexts/index.js +2 -1
- package/build/common/contexts/index.js.map +1 -0
- package/build/common/contexts/logContext/LogContext.js +13 -30
- package/build/common/contexts/logContext/LogContext.js.map +1 -0
- package/build/common/hooks/index.js +2 -1
- package/build/common/hooks/index.js.map +1 -0
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +4 -3
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js.map +1 -0
- package/build/common/hooks/useExternal/useExternal.js +9 -8
- package/build/common/hooks/useExternal/useExternal.js.map +1 -0
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +21 -31
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js.map +1 -0
- package/build/common/hooks/usePersistAsync/usePersistAsync.js +61 -139
- package/build/common/hooks/usePersistAsync/usePersistAsync.js.map +1 -0
- package/build/common/hooks/usePolling/usePolling.js +21 -21
- package/build/common/hooks/usePolling/usePolling.js.map +1 -0
- package/build/common/hooks/usePrevious/usePrevious.js +6 -5
- package/build/common/hooks/usePrevious/usePrevious.js.map +1 -0
- package/build/common/hooks/useStepPolling/useStepPolling.js +16 -14
- package/build/common/hooks/useStepPolling/useStepPolling.js.map +1 -0
- package/build/common/makeFetcher/index.js +2 -1
- package/build/common/makeFetcher/index.js.map +1 -0
- package/build/common/makeFetcher/makeFetcher.js +11 -24
- package/build/common/makeFetcher/makeFetcher.js.map +1 -0
- package/build/common/messages.js +6 -5
- package/build/common/messages.js.map +1 -0
- package/build/common/utils/api-utils.js +4 -4
- package/build/common/utils/api-utils.js.map +1 -0
- package/build/common/utils/date-utils.js +12 -11
- package/build/common/utils/date-utils.js.map +1 -0
- package/build/common/utils/debounce.js +12 -15
- package/build/common/utils/debounce.js.map +1 -0
- package/build/common/utils/file-utils.js +13 -25
- package/build/common/utils/file-utils.js.map +1 -0
- package/build/common/utils/id-utils.js +5 -5
- package/build/common/utils/id-utils.js.map +1 -0
- package/build/common/utils/index.js +2 -1
- package/build/common/utils/index.js.map +1 -0
- package/build/common/utils/is-equal.js +9 -8
- package/build/common/utils/is-equal.js.map +1 -0
- package/build/common/utils/schema-utils.js +7 -6
- package/build/common/utils/schema-utils.js.map +1 -0
- package/build/common/utils/step-utils.js +15 -14
- package/build/common/utils/step-utils.js.map +1 -0
- package/build/common/validators/index.js +8 -7
- package/build/common/validators/index.js.map +1 -0
- package/build/common/validators/models/model-validators.js +9 -8
- package/build/common/validators/models/model-validators.js.map +1 -0
- package/build/common/validators/models/models.utils.js +30 -42
- package/build/common/validators/models/models.utils.js.map +1 -0
- package/build/common/validators/schemas/schema-validators.js +12 -13
- package/build/common/validators/schemas/schema-validators.js.map +1 -0
- package/build/common/validators/types/type-validators.js +10 -13
- package/build/common/validators/types/type-validators.js.map +1 -0
- package/build/common/validators/validationFailures/validation-failures.js +15 -14
- package/build/common/validators/validationFailures/validation-failures.js.map +1 -0
- package/build/common/validators/validationFailures/validation-failures.utils.js +6 -7
- package/build/common/validators/validationFailures/validation-failures.utils.js.map +1 -0
- package/build/common/validators/values/value-validators.js +5 -6
- package/build/common/validators/values/value-validators.js.map +1 -0
- package/build/dynamicFlow/DynamicFlow.js +186 -307
- package/build/dynamicFlow/DynamicFlow.js.map +1 -0
- package/build/dynamicFlow/DynamicFlowStep.js +13 -23
- package/build/dynamicFlow/DynamicFlowStep.js.map +1 -0
- package/build/dynamicFlow/DynamicFlowTypes.js +2 -1
- package/build/dynamicFlow/DynamicFlowTypes.js.map +1 -0
- package/build/dynamicFlow/index.js +7 -14
- package/build/dynamicFlow/index.js.map +1 -0
- package/build/dynamicFlow/stories/DynamicFlow.story.js +21 -20
- package/build/dynamicFlow/stories/DynamicFlow.story.js.map +1 -0
- package/build/dynamicFlow/stories/EditableDynamicFlow.js +21 -33
- package/build/dynamicFlow/stories/EditableDynamicFlow.js.map +1 -0
- package/build/dynamicFlow/stories/fixtureFetcher.js +47 -104
- package/build/dynamicFlow/stories/fixtureFetcher.js.map +1 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +23 -40
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js.map +1 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +7 -6
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js.map +1 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +11 -11
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js.map +1 -0
- package/build/dynamicFlow/utils/index.js +6 -2
- package/build/dynamicFlow/utils/index.js.map +1 -0
- package/build/dynamicFlow/utils/responseParsers/response-parsers.js +54 -118
- package/build/dynamicFlow/utils/responseParsers/response-parsers.js.map +1 -0
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +10 -9
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js.map +1 -0
- package/build/dynamicFlow/utils/useDynamicFlowState.js +52 -74
- package/build/dynamicFlow/utils/useDynamicFlowState.js.map +1 -0
- package/build/dynamicFlow/utils/useLoader.js +10 -20
- package/build/dynamicFlow/utils/useLoader.js.map +1 -0
- package/build/fixtures/components/alert.js +9 -8
- package/build/fixtures/components/alert.js.map +1 -0
- package/build/fixtures/components/box.js +8 -7
- package/build/fixtures/components/box.js.map +1 -0
- package/build/fixtures/components/button.js +26 -36
- package/build/fixtures/components/button.js.map +1 -0
- package/build/fixtures/components/columns.js +11 -10
- package/build/fixtures/components/columns.js.map +1 -0
- package/build/fixtures/components/copyable.js +7 -6
- package/build/fixtures/components/copyable.js.map +1 -0
- package/build/fixtures/components/decision.js +16 -15
- package/build/fixtures/components/decision.js.map +1 -0
- package/build/fixtures/components/heading.js +8 -7
- package/build/fixtures/components/heading.js.map +1 -0
- package/build/fixtures/components/image.js +11 -10
- package/build/fixtures/components/image.js.map +1 -0
- package/build/fixtures/components/index.js +18 -25
- package/build/fixtures/components/index.js.map +1 -0
- package/build/fixtures/components/info.js +23 -6
- package/build/fixtures/components/info.js.map +1 -0
- package/build/fixtures/components/list.js +9 -8
- package/build/fixtures/components/list.js.map +1 -0
- package/build/fixtures/components/loading-indicator.js +6 -5
- package/build/fixtures/components/loading-indicator.js.map +1 -0
- package/build/fixtures/components/paragraph.js +10 -9
- package/build/fixtures/components/paragraph.js.map +1 -0
- package/build/fixtures/components/review.js +12 -11
- package/build/fixtures/components/review.js.map +1 -0
- package/build/fixtures/examples/camera-capture.js +30 -29
- package/build/fixtures/examples/camera-capture.js.map +1 -0
- package/build/fixtures/examples/index.js +10 -17
- package/build/fixtures/examples/index.js.map +1 -0
- package/build/fixtures/examples/recipient-update.js +70 -69
- package/build/fixtures/examples/recipient-update.js.map +1 -0
- package/build/fixtures/examples/recipient.js +64 -63
- package/build/fixtures/examples/recipient.js.map +1 -0
- package/build/fixtures/examples/single-file-upload.js +22 -21
- package/build/fixtures/examples/single-file-upload.js.map +1 -0
- package/build/fixtures/examples/step-validation-errors.js +22 -21
- package/build/fixtures/examples/step-validation-errors.js.map +1 -0
- package/build/fixtures/features/action-response.js +9 -8
- package/build/fixtures/features/action-response.js.map +1 -0
- package/build/fixtures/features/external.js +9 -8
- package/build/fixtures/features/external.js.map +1 -0
- package/build/fixtures/features/index.js +10 -17
- package/build/fixtures/features/index.js.map +1 -0
- package/build/fixtures/features/persist-async.js +12 -11
- package/build/fixtures/features/persist-async.js.map +1 -0
- package/build/fixtures/features/polling.js +10 -9
- package/build/fixtures/features/polling.js.map +1 -0
- package/build/fixtures/features/validation-async.js +11 -10
- package/build/fixtures/features/validation-async.js.map +1 -0
- package/build/fixtures/index.js +12 -22
- package/build/fixtures/index.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/allOf.js +31 -30
- package/build/fixtures/jsonSchemaForm/allOf.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/audRecipient.js +272 -271
- package/build/fixtures/jsonSchemaForm/audRecipient.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/currency.js +13 -12
- package/build/fixtures/jsonSchemaForm/currency.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +12 -11
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +12 -11
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/oneOf.js +28 -27
- package/build/fixtures/jsonSchemaForm/oneOf.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/oneOfTabs.js +17 -16
- package/build/fixtures/jsonSchemaForm/oneOfTabs.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOf.js +18 -17
- package/build/fixtures/jsonSchemaForm/promotedOneOf.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +31 -30
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/simple.js +17 -16
- package/build/fixtures/jsonSchemaForm/simple.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +20 -19
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/validationAsync.js +9 -8
- package/build/fixtures/jsonSchemaForm/validationAsync.js.map +1 -0
- package/build/fixtures/layouts/all.js +38 -37
- package/build/fixtures/layouts/all.js.map +1 -0
- package/build/fixtures/layouts/final-step-layout.js +10 -9
- package/build/fixtures/layouts/final-step-layout.js.map +1 -0
- package/build/fixtures/layouts/index.js +11 -18
- package/build/fixtures/layouts/index.js.map +1 -0
- package/build/fixtures/layouts/list.js +11 -10
- package/build/fixtures/layouts/list.js.map +1 -0
- package/build/fixtures/layouts/pay-in.js +24 -23
- package/build/fixtures/layouts/pay-in.js.map +1 -0
- package/build/fixtures/layouts/review.js +39 -38
- package/build/fixtures/layouts/review.js.map +1 -0
- package/build/fixtures/layouts/success.js +16 -15
- package/build/fixtures/layouts/success.js.map +1 -0
- package/build/fixtures/responses/action-response-final.js +9 -8
- package/build/fixtures/responses/action-response-final.js.map +1 -0
- package/build/fixtures/responses/action.js +4 -3
- package/build/fixtures/responses/action.js.map +1 -0
- package/build/fixtures/responses/exit.js +4 -3
- package/build/fixtures/responses/exit.js.map +1 -0
- package/build/fixtures/responses/index.js +9 -16
- package/build/fixtures/responses/index.js.map +1 -0
- package/build/fixtures/responses/recipient-update-final.js +9 -8
- package/build/fixtures/responses/recipient-update-final.js.map +1 -0
- package/build/fixtures/schemas/basic-form.js +12 -11
- package/build/fixtures/schemas/basic-form.js.map +1 -0
- package/build/fixtures/schemas/index.js +9 -16
- package/build/fixtures/schemas/index.js.map +1 -0
- package/build/fixtures/schemas/number-and-integer.js +12 -11
- package/build/fixtures/schemas/number-and-integer.js.map +1 -0
- package/build/fixtures/schemas/one-of.js +44 -46
- package/build/fixtures/schemas/one-of.js.map +1 -0
- package/build/fixtures/schemas/string-formats.js +16 -15
- package/build/fixtures/schemas/string-formats.js.map +1 -0
- package/build/fixtures/utils/image-util.js +9 -8
- package/build/fixtures/utils/image-util.js.map +1 -0
- package/build/formControl/FormControl.js +119 -148
- package/build/formControl/FormControl.js.map +1 -0
- package/build/formControl/index.js +7 -14
- package/build/formControl/index.js.map +1 -0
- package/build/formControl/utils/index.js +2 -1
- package/build/formControl/utils/index.js.map +1 -0
- package/build/formControl/utils/value-utils.js +19 -23
- package/build/formControl/utils/value-utils.js.map +1 -0
- package/build/i18n/index.js +32 -31
- package/build/i18n/index.js.map +1 -0
- package/build/index.js +14 -10
- package/build/index.js.map +1 -0
- package/build/jsonSchemaForm/JsonSchemaForm.js +13 -24
- package/build/jsonSchemaForm/JsonSchemaForm.js.map +1 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +25 -37
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js.map +1 -0
- package/build/jsonSchemaForm/allOfSchema/index.js +7 -14
- package/build/jsonSchemaForm/allOfSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +10 -20
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +10 -20
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +7 -14
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +57 -115
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +8 -7
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +7 -14
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -1
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +20 -71
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +11 -11
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.js +7 -14
- package/build/jsonSchemaForm/arrayTypeSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +46 -62
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js.map +1 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.js +7 -14
- package/build/jsonSchemaForm/basicTypeSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +40 -50
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js.map +1 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +19 -18
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js.map +1 -0
- package/build/jsonSchemaForm/controlFeedback/index.js +7 -14
- package/build/jsonSchemaForm/controlFeedback/index.js.map +1 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js +53 -61
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js.map +1 -0
- package/build/jsonSchemaForm/genericSchema/index.js +7 -14
- package/build/jsonSchemaForm/genericSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/help/Help.js +10 -9
- package/build/jsonSchemaForm/help/Help.js.map +1 -0
- package/build/jsonSchemaForm/help/Help.messages.js +6 -5
- package/build/jsonSchemaForm/help/Help.messages.js.map +1 -0
- package/build/jsonSchemaForm/help/index.js +7 -14
- package/build/jsonSchemaForm/help/index.js.map +1 -0
- package/build/jsonSchemaForm/index.js +7 -14
- package/build/jsonSchemaForm/index.js.map +1 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +29 -49
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js.map +1 -0
- package/build/jsonSchemaForm/objectSchema/index.js +7 -14
- package/build/jsonSchemaForm/objectSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +55 -74
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/index.js +7 -14
- package/build/jsonSchemaForm/oneOfSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +4 -3
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/index.js +2 -1
- package/build/jsonSchemaForm/oneOfSchema/utils/index.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +20 -20
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +12 -22
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +6 -5
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.js +7 -14
- package/build/jsonSchemaForm/persistAsyncSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +74 -127
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +7 -14
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +46 -110
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +18 -17
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +7 -14
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +29 -47
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js +7 -14
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +5 -4
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +14 -24
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +12 -22
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +13 -23
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js.map +1 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +25 -26
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js.map +1 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +7 -6
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js.map +1 -0
- package/build/jsonSchemaForm/readOnlySchema/index.js +7 -14
- package/build/jsonSchemaForm/readOnlySchema/index.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +27 -39
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/index.js +7 -14
- package/build/jsonSchemaForm/schemaFormControl/index.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +6 -5
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/index.js +2 -1
- package/build/jsonSchemaForm/schemaFormControl/utils/index.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +31 -47
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js.map +1 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +58 -119
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js.map +1 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.js +7 -14
- package/build/jsonSchemaForm/validationAsyncSchema/index.js.map +1 -0
- package/build/layout/DynamicLayout.js +11 -21
- package/build/layout/DynamicLayout.js.map +1 -0
- package/build/layout/alert/DynamicAlert.js +10 -9
- package/build/layout/alert/DynamicAlert.js.map +1 -0
- package/build/layout/box/DynamicBox.js +13 -23
- package/build/layout/box/DynamicBox.js.map +1 -0
- package/build/layout/button/DynamicButton.js +17 -27
- package/build/layout/button/DynamicButton.js.map +1 -0
- package/build/layout/columns/DynamicColumns.js +14 -24
- package/build/layout/columns/DynamicColumns.js.map +1 -0
- package/build/layout/decision/DynamicDecision.js +17 -27
- package/build/layout/decision/DynamicDecision.js.map +1 -0
- package/build/layout/divider/DynamicDivider.js +8 -8
- package/build/layout/divider/DynamicDivider.js.map +1 -0
- package/build/layout/external/DynamicExternal.js +17 -28
- package/build/layout/external/DynamicExternal.js.map +1 -0
- package/build/layout/external/DynamicExternal.messages.js +6 -5
- package/build/layout/external/DynamicExternal.messages.js.map +1 -0
- package/build/layout/form/DynamicForm.js +11 -21
- package/build/layout/form/DynamicForm.js.map +1 -0
- package/build/layout/heading/DynamicHeading.js +13 -23
- package/build/layout/heading/DynamicHeading.js.map +1 -0
- package/build/layout/icon/DynamicIcon.js +10 -10
- package/build/layout/icon/DynamicIcon.js.map +1 -0
- package/build/layout/image/DynamicImage.js +44 -93
- package/build/layout/image/DynamicImage.js.map +1 -0
- package/build/layout/index.js +22 -29
- package/build/layout/index.js.map +1 -0
- package/build/layout/info/DynamicInfo.js +8 -19
- package/build/layout/info/DynamicInfo.js.map +1 -0
- package/build/layout/list/DynamicList.js +15 -26
- package/build/layout/list/DynamicList.js.map +1 -0
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +9 -9
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.js.map +1 -0
- package/build/layout/paragraph/DynamicParagraph.js +20 -37
- package/build/layout/paragraph/DynamicParagraph.js.map +1 -0
- package/build/layout/paragraph/DynamicParagraph.messages.js +7 -6
- package/build/layout/paragraph/DynamicParagraph.messages.js.map +1 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.js +5 -4
- package/build/layout/paragraph/useSnackBarIfAvailable.js.map +1 -0
- package/build/layout/review/DynamicReview.js +15 -26
- package/build/layout/review/DynamicReview.js.map +1 -0
- package/build/layout/utils.js +5 -6
- package/build/layout/utils.js.map +1 -0
- package/build/step/cameraStep/CameraStep.js +43 -88
- package/build/step/cameraStep/CameraStep.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.js +49 -105
- package/build/step/cameraStep/cameraCapture/CameraCapture.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +8 -7
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/components/index.js +11 -28
- package/build/step/cameraStep/cameraCapture/components/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.js +18 -72
- package/build/step/cameraStep/cameraCapture/hooks/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/index.js +7 -14
- package/build/step/cameraStep/cameraCapture/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +34 -45
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +9 -19
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +7 -6
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +10 -21
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +8 -7
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/index.js +7 -14
- package/build/step/cameraStep/cameraCapture/screens/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.js +18 -99
- package/build/step/cameraStep/cameraCapture/tracking/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/utils/index.js +34 -96
- package/build/step/cameraStep/cameraCapture/utils/index.js.map +1 -0
- package/build/step/cameraStep/index.js +7 -14
- package/build/step/cameraStep/index.js.map +1 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +21 -21
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js.map +1 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +9 -8
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js.map +1 -0
- package/build/step/externalConfirmationStep/index.js +7 -14
- package/build/step/externalConfirmationStep/index.js.map +1 -0
- package/build/step/index.js +8 -15
- package/build/step/index.js.map +1 -0
- package/build/step/layoutStep/LayoutStep.js +20 -19
- package/build/step/layoutStep/LayoutStep.js.map +1 -0
- package/build/step/layoutStep/index.js +7 -14
- package/build/step/layoutStep/index.js.map +1 -0
- package/build/step/layoutStep/utils/index.js +4 -14
- package/build/step/layoutStep/utils/index.js.map +1 -0
- package/build/step/layoutStep/utils/inline-reference-utils.js +30 -46
- package/build/step/layoutStep/utils/inline-reference-utils.js.map +1 -0
- package/build/step/layoutStep/utils/layout-utils.js +35 -53
- package/build/step/layoutStep/utils/layout-utils.js.map +1 -0
- package/build/types/common/FormControl.js +2 -1
- package/build/types/common/FormControl.js.map +1 -0
- package/build/types/index.js +14 -13
- package/build/types/index.js.map +1 -0
- package/build/types/specification/Action.js +2 -1
- package/build/types/specification/Action.js.map +1 -0
- package/build/types/specification/FileUploadSchema.js +2 -1
- package/build/types/specification/FileUploadSchema.js.map +1 -0
- package/build/types/specification/LayoutComponent.js +2 -1
- package/build/types/specification/LayoutComponent.js.map +1 -0
- package/build/types/specification/Model.js +10 -17
- package/build/types/specification/Model.js.map +1 -0
- package/build/types/specification/PersistAsync.js +2 -1
- package/build/types/specification/PersistAsync.js.map +1 -0
- package/build/types/specification/Polling.js +2 -1
- package/build/types/specification/Polling.js.map +1 -0
- package/build/types/specification/Promotion.js +2 -1
- package/build/types/specification/Promotion.js.map +1 -0
- package/build/types/specification/Schema.js +9 -8
- package/build/types/specification/Schema.js.map +1 -0
- package/build/types/specification/Step.js +4 -5
- package/build/types/specification/Step.js.map +1 -0
- package/build/types/specification/ValidationAsync.js +2 -1
- package/build/types/specification/ValidationAsync.js.map +1 -0
- package/build/types/specification/core.js +2 -1
- package/build/types/specification/core.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isUndefined = exports.isNull = exports.isArray = exports.isObject = exports.isBoolean = exports.isInteger = exports.isNumber = exports.isString = void 0;
|
|
4
|
-
|
|
4
|
+
const isString = (value) => typeof value === 'string';
|
|
5
5
|
exports.isString = isString;
|
|
6
|
-
|
|
7
|
-
return typeof value === 'number' && !Number.isNaN(value);
|
|
8
|
-
};
|
|
6
|
+
const isNumber = (value) => typeof value === 'number' && !Number.isNaN(value);
|
|
9
7
|
exports.isNumber = isNumber;
|
|
10
|
-
|
|
8
|
+
const isInteger = (value) => {
|
|
11
9
|
return (0, exports.isNumber)(value) && Math.floor(value) === value;
|
|
12
10
|
};
|
|
13
11
|
exports.isInteger = isInteger;
|
|
14
|
-
|
|
12
|
+
const isBoolean = (value) => typeof value === 'boolean';
|
|
15
13
|
exports.isBoolean = isBoolean;
|
|
16
|
-
|
|
17
|
-
return !(0, exports.isNull)(value) && !(0, exports.isUndefined)(value) && (value === null || value === void 0 ? void 0 : value.constructor) === Object;
|
|
18
|
-
};
|
|
14
|
+
const isObject = (value) => !(0, exports.isNull)(value) && !(0, exports.isUndefined)(value) && (value === null || value === void 0 ? void 0 : value.constructor) === Object;
|
|
19
15
|
exports.isObject = isObject;
|
|
20
|
-
|
|
16
|
+
const isArray = (value) => Array.isArray(value);
|
|
21
17
|
exports.isArray = isArray;
|
|
22
|
-
|
|
18
|
+
const isNull = (value) => value === null;
|
|
23
19
|
exports.isNull = isNull;
|
|
24
|
-
|
|
20
|
+
const isUndefined = (value) => typeof value === 'undefined';
|
|
25
21
|
exports.isUndefined = isUndefined;
|
|
22
|
+
//# sourceMappingURL=type-validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-validators.js","sourceRoot":"","sources":["../../../../src/common/validators/types/type-validators.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;AAA1E,QAAA,QAAQ,YAAkE;AAEhF,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC1D,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AADvC,QAAA,QAAQ,YAC+B;AAE7C,MAAM,SAAS,GAAG,CAAC,KAAc,EAAmB,EAAE;IAC3D,OAAO,IAAA,gBAAQ,EAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AACxD,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEK,MAAM,SAAS,GAAG,CAAC,KAAc,EAAoB,EAAE,CAAC,OAAO,KAAK,KAAK,SAAS,CAAC;AAA7E,QAAA,SAAS,aAAoE;AAEnF,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CAC3E,CAAC,IAAA,cAAM,EAAC,KAAK,CAAC,IAAI,CAAC,IAAA,mBAAW,EAAC,KAAK,CAAC,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,MAAK,MAAM,CAAC;AAD5D,QAAA,QAAQ,YACoD;AAElE,MAAM,OAAO,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAAvE,QAAA,OAAO,WAAgE;AAE7E,MAAM,MAAM,GAAG,CAAC,KAAc,EAAiB,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;AAA3D,QAAA,MAAM,UAAqD;AAEjE,MAAM,WAAW,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,OAAO,KAAK,KAAK,WAAW,CAAC;AAAnF,QAAA,WAAW,eAAwE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBlobValidationFailures = exports.getObjectValidationFailures = exports.getArrayValidationFailures = exports.getConstValidationFailures = exports.getBooleanValidationFailures = exports.getIntegerValidationFailures = exports.getNumberValidationFailures = exports.getStringValidationFailures = exports.getValidationFailures = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const types_1 = require("../../../types");
|
|
5
|
+
const Schema_1 = require("../../../types/specification/Schema");
|
|
6
|
+
const type_validators_1 = require("../types/type-validators");
|
|
7
|
+
const validation_failures_utils_1 = require("./validation-failures.utils");
|
|
8
8
|
function getValidationFailures(value, schema, isRequired) {
|
|
9
|
-
if (schema
|
|
9
|
+
if (schema.const) {
|
|
10
10
|
return getConstValidationFailures(value, schema, isRequired);
|
|
11
11
|
}
|
|
12
12
|
if ((0, type_validators_1.isNull)(value)) {
|
|
@@ -38,7 +38,7 @@ function getStringValidationFailures(value, schema, isRequired) {
|
|
|
38
38
|
if (value === '' && isRequired) {
|
|
39
39
|
return ['required'];
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
const failures = [];
|
|
42
42
|
if (!(0, validation_failures_utils_1.isValidRequired)(value, isRequired)) {
|
|
43
43
|
failures.push('required');
|
|
44
44
|
}
|
|
@@ -64,7 +64,7 @@ function getNumberValidationFailures(value, schema, isRequired) {
|
|
|
64
64
|
if (!(0, type_validators_1.isNumber)(value) && !(0, type_validators_1.isNull)(value)) {
|
|
65
65
|
return ['type'];
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
const failures = [];
|
|
68
68
|
if (!(0, validation_failures_utils_1.isValidRequired)(value, isRequired)) {
|
|
69
69
|
failures.push('required');
|
|
70
70
|
}
|
|
@@ -88,7 +88,7 @@ function getBooleanValidationFailures(value, _schema, isRequired) {
|
|
|
88
88
|
if (!(0, type_validators_1.isBoolean)(value) && !(0, type_validators_1.isNull)(value)) {
|
|
89
89
|
return ['type'];
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
const failures = [];
|
|
92
92
|
if (!(0, validation_failures_utils_1.isValidRequired)(value, isRequired)) {
|
|
93
93
|
failures.push('required');
|
|
94
94
|
}
|
|
@@ -99,7 +99,7 @@ function getConstValidationFailures(value, schema, isRequired) {
|
|
|
99
99
|
if (!(0, validation_failures_utils_1.isValidRequired)(value, isRequired)) {
|
|
100
100
|
return ['required'];
|
|
101
101
|
}
|
|
102
|
-
if (value !== schema
|
|
102
|
+
if (value !== schema.const) {
|
|
103
103
|
return ['const'];
|
|
104
104
|
}
|
|
105
105
|
return [];
|
|
@@ -112,7 +112,7 @@ function getArrayValidationFailures(value, schema, isRequired) {
|
|
|
112
112
|
if (!(0, validation_failures_utils_1.isValidRequiredArray)(value, isRequired)) {
|
|
113
113
|
return ['required'];
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
const failures = [];
|
|
116
116
|
if (!(0, validation_failures_utils_1.isValidMinItems)(value, schema.minItems)) {
|
|
117
117
|
failures.push('minItems');
|
|
118
118
|
}
|
|
@@ -143,9 +143,10 @@ function getObjectValidationFailures(value, schema) {
|
|
|
143
143
|
if (!(0, type_validators_1.isArray)(schema.required)) {
|
|
144
144
|
return [];
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
.map(
|
|
148
|
-
.reduce(
|
|
146
|
+
const allPresent = schema.required
|
|
147
|
+
.map((property) => typeof value[property] !== 'undefined')
|
|
148
|
+
.reduce((propertyInModel, validSoFar) => propertyInModel && validSoFar, true);
|
|
149
149
|
return allPresent ? [] : ['required'];
|
|
150
150
|
}
|
|
151
151
|
exports.getObjectValidationFailures = getObjectValidationFailures;
|
|
152
|
+
//# sourceMappingURL=validation-failures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-failures.js","sourceRoot":"","sources":["../../../../src/common/validators/validationFailures/validation-failures.ts"],"names":[],"mappings":";;;AAAA,0CAUwB;AACxB,gEAAqE;AACrE,8DAOkC;AAElC,2EAUqC;AAErC,SAAS,qBAAqB,CAAC,KAAY,EAAE,MAAc,EAAE,UAAmB;IAC9E,IAAI,MAAM,CAAC,KAAK,EAAE;QAChB,OAAO,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;KAC9D;IAED,IAAI,IAAA,wBAAM,EAAC,KAAK,CAAC,EAAE;QACjB,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACvC;IAED,IAAI,IAAA,uBAAc,EAAC,MAAM,CAAC,EAAE;QAC1B,OAAO,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;KAC/D;IAED,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,QAAQ;YACX,OAAO,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAChE,KAAK,SAAS;YACZ,OAAO,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACjE,KAAK,SAAS;YACZ,OAAO,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACjE,KAAK,OAAO;YAC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,CAAC;AAClB,CAAC;AAuCC,gEAA0B;AArC5B,SAAS,yBAAyB,CAAC,KAAY,EAAE,OAAmB;IAClE,IAAI,IAAA,wBAAM,EAAC,KAAK,CAAC,EAAE;QACjB,OAAO,CAAC,MAAM,CAAC,CAAC;KACjB;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAkCC,8DAAyB;AAhC3B;;;;;;GAMG;AACH,SAAS,2BAA2B,CAAC,KAAY,EAAE,MAA+B;IAChF,IAAI,CAAC,IAAA,qBAAa,EAAC,KAAK,CAAC,EAAE;QACzB,OAAO,CAAC,MAAM,CAAC,CAAC;KACjB;IAED,IAAI,CAAC,IAAA,yBAAO,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QAC7B,OAAO,EAAE,CAAC;KACX;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ;SAC/B,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,WAAW,CAAC;SACzD,MAAM,CAAC,CAAC,eAAe,EAAE,UAAU,EAAE,EAAE,CAAC,eAAe,IAAI,UAAU,EAAE,IAAI,CAAC,CAAC;IAEhF,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;AACxC,CAAC;AAUC,kEAA2B"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isValidRequiredArray = exports.isValidMaxItems = exports.isValidMinItems = exports.isValidMinimum = exports.isValidMaximum = exports.isValidPattern = exports.isValidMaxLength = exports.isValidMinLength = exports.isValidRequired = void 0;
|
|
4
|
-
|
|
5
|
-
function isValidRequired(value, isRequired) {
|
|
6
|
-
if (isRequired === void 0) { isRequired = false; }
|
|
4
|
+
const validators_1 = require("../../validators");
|
|
5
|
+
function isValidRequired(value, isRequired = false) {
|
|
7
6
|
return !isRequired || !(0, validators_1.isUndefined)(value);
|
|
8
7
|
}
|
|
9
8
|
exports.isValidRequired = isValidRequired;
|
|
10
|
-
function isValidRequiredArray(value, isRequired) {
|
|
11
|
-
if (isRequired === void 0) { isRequired = false; }
|
|
9
|
+
function isValidRequiredArray(value, isRequired = false) {
|
|
12
10
|
return !isRequired || (0, validators_1.isArray)(value);
|
|
13
11
|
}
|
|
14
12
|
exports.isValidRequiredArray = isValidRequiredArray;
|
|
@@ -27,7 +25,7 @@ function isValidPattern(value, pattern) {
|
|
|
27
25
|
if (value === undefined || value === null) {
|
|
28
26
|
return false; // no value, but there's a pattern, therefore the value is NOT valid
|
|
29
27
|
}
|
|
30
|
-
|
|
28
|
+
const regex = new RegExp(pattern);
|
|
31
29
|
return !!regex.test(value);
|
|
32
30
|
}
|
|
33
31
|
exports.isValidPattern = isValidPattern;
|
|
@@ -49,3 +47,4 @@ function isValidMaxItems(value, maxItems) {
|
|
|
49
47
|
return !(0, validators_1.isNumber)(maxItems) || ((0, validators_1.isArray)(value) && value.length <= maxItems);
|
|
50
48
|
}
|
|
51
49
|
exports.isValidMaxItems = isValidMaxItems;
|
|
50
|
+
//# sourceMappingURL=validation-failures.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-failures.utils.js","sourceRoot":"","sources":["../../../../src/common/validators/validationFailures/validation-failures.utils.ts"],"names":[],"mappings":";;;AAAA,iDAA4E;AAE5E,SAAS,eAAe,CAAC,KAAc,EAAE,UAAU,GAAG,KAAK;IACzD,OAAO,CAAC,UAAU,IAAI,CAAC,IAAA,wBAAW,EAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAkDC,0CAAe;AAhDjB,SAAS,oBAAoB,CAAC,KAAc,EAAE,UAAU,GAAG,KAAK;IAC9D,OAAO,CAAC,UAAU,IAAI,IAAA,oBAAO,EAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAsDC,oDAAoB;AApDtB,SAAS,g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AC,IAAI,CAAC,IAAA,qBAAQ,EAAC,OAAO,CAAC,CAAC;QAC1C,CAAC,CAAC,IAAA,qBAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,qBAAQ,EAAC,KAAK,CAAC,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,CAC3D,CAAC;AACJ,CAAC;AAgBC,wCAAc;AAdhB,SAAS,eAAe,CAAC,KAAc,EAAE,QAA4B;IACnE,OAAO,CAAC,IAAA,qBAAQ,EAAC,QAAQ,CAAC,IAAI,CAAC,IAAA,oBAAO,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAaC,0CAAe;AAXjB,SAAS,eAAe,CAAC,KAAc,EAAE,QAA4B;IACnE,OAAO,CAAC,IAAA,qBAAQ,EAAC,QAAQ,CAAC,IAAI,CAAC,IAAA,oBAAO,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAUC,0CAAe"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isEmpty = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(((0, type_validators_1.isObject)(value) || (0, type_validators_1.isArray)(value)) && Object.keys(value).length === 0);
|
|
8
|
-
};
|
|
4
|
+
const type_validators_1 = require("../types/type-validators");
|
|
5
|
+
const isEmpty = (value) => ((0, type_validators_1.isString)(value) && value.length === 0) ||
|
|
6
|
+
(((0, type_validators_1.isObject)(value) || (0, type_validators_1.isArray)(value)) && Object.keys(value).length === 0);
|
|
9
7
|
exports.isEmpty = isEmpty;
|
|
8
|
+
//# sourceMappingURL=value-validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-validators.js","sourceRoot":"","sources":["../../../../src/common/validators/values/value-validators.ts"],"names":[],"mappings":";;;AAAA,8DAAuE;AAEvE,MAAM,OAAO,GAAG,CAAC,KAAc,EAAW,EAAE,CAC1C,CAAC,IAAA,0BAAQ,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACvC,CAAC,CAAC,IAAA,0BAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,yBAAO,EAAC,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;AAElE,0BAAO"}
|