@wise/dynamic-flow-client 0.1.1 → 0.1.3
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/api/utils.d.ts +4 -0
- package/build/common/api/utils.js +13 -0
- package/build/common/contexts/dynamicFlowContext/dynamicFlowContext.d.ts +11 -0
- package/build/common/contexts/dynamicFlowContext/dynamicFlowContext.js +36 -0
- package/build/common/contexts/dynamicFlowContext/usePendingPromiseCounter.d.ts +4 -0
- package/build/common/contexts/dynamicFlowContext/usePendingPromiseCounter.js +13 -0
- package/build/common/contexts/fetcherContext/fetcherContext.d.ts +18 -0
- package/build/common/contexts/fetcherContext/fetcherContext.js +35 -0
- package/build/common/contexts/fetcherContext/index.d.ts +2 -0
- package/build/common/contexts/fetcherContext/index.js +2 -0
- package/build/common/contexts/fetcherContext/makeFetcher.d.ts +2 -0
- package/build/common/contexts/fetcherContext/makeFetcher.js +33 -0
- package/build/common/general/index.d.ts +2 -0
- package/build/common/general/index.js +22 -0
- package/build/common/hooks/useDebouncedFunction.d.ts +2 -0
- package/build/common/hooks/useDebouncedFunction.js +9 -0
- package/build/common/hooks/useDebouncedFunction.test.d.ts +1 -0
- package/build/common/hooks/useDebouncedFunction.test.js +59 -0
- package/build/common/hooks/usePersistAsync.d.ts +7 -0
- package/build/common/hooks/usePersistAsync.js +170 -0
- package/build/common/hooks/usePolling.d.ts +11 -0
- package/build/common/hooks/usePolling.js +48 -0
- package/build/common/hooks/usePrevious.d.ts +2 -0
- package/build/common/hooks/usePrevious.js +9 -0
- package/build/common/index.d.ts +4 -0
- package/build/common/index.js +4 -0
- package/build/common/logging/index.d.ts +22 -0
- package/build/common/logging/index.js +39 -0
- package/build/common/logging/spec.d.ts +1 -0
- package/build/common/logging/spec.js +45 -0
- package/build/common/messages.d.ts +8 -0
- package/build/common/messages.js +8 -0
- package/build/common/propsValues/dateMode.d.ts +4 -0
- package/build/common/propsValues/dateMode.js +4 -0
- package/build/common/propsValues/formControlType.d.ts +17 -0
- package/build/common/propsValues/formControlType.js +17 -0
- package/build/common/propsValues/monthFormat.d.ts +4 -0
- package/build/common/propsValues/monthFormat.js +4 -0
- package/build/common/propsValues/size.d.ts +7 -0
- package/build/common/propsValues/size.js +7 -0
- package/build/common/requirements.d.ts +10 -0
- package/build/common/requirements.js +50 -0
- package/build/common/schemaTypes/schemaTypes.d.ts +23 -0
- package/build/common/schemaTypes/schemaTypes.js +53 -0
- package/build/common/schemaTypes/shouldDebounceSchema.d.ts +2 -0
- package/build/common/schemaTypes/shouldDebounceSchema.js +6 -0
- package/build/common/stepTypes/stepTypes.d.ts +7 -0
- package/build/common/stepTypes/stepTypes.js +42 -0
- package/build/common/tracking/index.d.ts +15 -0
- package/build/common/tracking/index.js +33 -0
- package/build/common/tracking/spec.d.ts +1 -0
- package/build/common/tracking/spec.js +49 -0
- package/build/common/utils/file-utils.d.ts +4 -0
- package/build/common/utils/file-utils.js +45 -0
- package/build/common/utils/generate-random-id.d.ts +1 -0
- package/build/common/utils/generate-random-id.js +5 -0
- package/build/common/utils/generate-random-id.test.d.ts +1 -0
- package/build/common/utils/generate-random-id.test.js +12 -0
- package/build/common/validation/rule-validators/index.d.ts +10 -0
- package/build/common/validation/rule-validators/index.js +40 -0
- package/build/common/validation/rule-validators/spec.d.ts +1 -0
- package/build/common/validation/rule-validators/spec.js +145 -0
- package/build/common/validation/schema-validators/index.d.ts +9 -0
- package/build/common/validation/schema-validators/index.js +98 -0
- package/build/common/validation/schema-validators/spec.d.ts +1 -0
- package/build/common/validation/schema-validators/spec.js +137 -0
- package/build/common/validation/valid-model/index.d.ts +5 -0
- package/build/common/validation/valid-model/index.js +64 -0
- package/build/common/validation/valid-model/spec.d.ts +1 -0
- package/build/common/validation/valid-model/spec.js +605 -0
- package/build/common/validation/valid-model/utils.d.ts +11 -0
- package/build/common/validation/valid-model/utils.js +118 -0
- package/build/common/validation/validation-failures/index.d.ts +23 -0
- package/build/common/validation/validation-failures/index.js +140 -0
- package/build/common/validation/validation-failures/spec.d.ts +1 -0
- package/build/common/validation/validation-failures/spec.js +185 -0
- package/build/dynamic-flow-types/Action.d.ts +19 -0
- package/build/dynamic-flow-types/Action.js +1 -0
- package/build/dynamic-flow-types/FileUploadSchema.d.ts +23 -0
- package/build/dynamic-flow-types/FileUploadSchema.js +3 -0
- package/build/dynamic-flow-types/LayoutComponent.d.ts +129 -0
- package/build/dynamic-flow-types/LayoutComponent.js +1 -0
- package/build/dynamic-flow-types/Model.d.ts +12 -0
- package/build/dynamic-flow-types/Model.js +28 -0
- package/build/dynamic-flow-types/PersistAsync.d.ts +8 -0
- package/build/dynamic-flow-types/PersistAsync.js +1 -0
- package/build/dynamic-flow-types/Polling.d.ts +12 -0
- package/build/dynamic-flow-types/Polling.js +1 -0
- package/build/dynamic-flow-types/Promotion.d.ts +20 -0
- package/build/dynamic-flow-types/Promotion.js +1 -0
- package/build/dynamic-flow-types/Schema.d.ts +184 -0
- package/build/dynamic-flow-types/Schema.js +49 -0
- package/build/dynamic-flow-types/Step.d.ts +127 -0
- package/build/dynamic-flow-types/Step.js +4 -0
- package/build/dynamic-flow-types/ValidationAsync.d.ts +6 -0
- package/build/dynamic-flow-types/ValidationAsync.js +1 -0
- package/build/dynamic-flow-types/core.d.ts +29 -0
- package/build/dynamic-flow-types/core.js +1 -0
- package/build/dynamic-flow-types/index.d.ts +14 -0
- package/build/dynamic-flow-types/index.js +12 -0
- package/build/field/Field.d.ts +69 -0
- package/build/field/Field.js +311 -0
- package/build/field/index.d.ts +2 -0
- package/build/field/index.js +2 -0
- package/build/flow/DynamicFlow.d.ts +4 -0
- package/build/flow/DynamicFlow.js +368 -0
- package/build/flow/DynamicFlowStep.d.ts +9 -0
- package/build/flow/DynamicFlowStep.js +32 -0
- package/build/flow/errorBoundary/ErrorBoundary.d.ts +20 -0
- package/build/flow/errorBoundary/ErrorBoundary.js +45 -0
- package/build/flow/errorBoundary/ErrorBoundary.messages.d.ts +13 -0
- package/build/flow/errorBoundary/ErrorBoundary.messages.js +13 -0
- package/build/flow/errorBoundary/ErrorBoundaryAlert.d.ts +6 -0
- package/build/flow/errorBoundary/ErrorBoundaryAlert.js +12 -0
- package/build/flow/errorBoundary/index.d.ts +1 -0
- package/build/flow/errorBoundary/index.js +1 -0
- package/build/flow/fixtures/components/alert.d.ts +3 -0
- package/build/flow/fixtures/components/alert.js +31 -0
- package/build/flow/fixtures/components/box.d.ts +3 -0
- package/build/flow/fixtures/components/box.js +20 -0
- package/build/flow/fixtures/components/button.d.ts +3 -0
- package/build/flow/fixtures/components/button.js +65 -0
- package/build/flow/fixtures/components/columns.d.ts +3 -0
- package/build/flow/fixtures/components/columns.js +36 -0
- package/build/flow/fixtures/components/copyable.d.ts +3 -0
- package/build/flow/fixtures/components/copyable.js +22 -0
- package/build/flow/fixtures/components/decision.d.ts +3 -0
- package/build/flow/fixtures/components/decision.js +54 -0
- package/build/flow/fixtures/components/heading.d.ts +3 -0
- package/build/flow/fixtures/components/heading.js +14 -0
- package/build/flow/fixtures/components/image.d.ts +3 -0
- package/build/flow/fixtures/components/image.js +22 -0
- package/build/flow/fixtures/components/info.d.ts +3 -0
- package/build/flow/fixtures/components/info.js +17 -0
- package/build/flow/fixtures/components/list.d.ts +3 -0
- package/build/flow/fixtures/components/list.js +34 -0
- package/build/flow/fixtures/components/loading-indicator.d.ts +3 -0
- package/build/flow/fixtures/components/loading-indicator.js +16 -0
- package/build/flow/fixtures/components/paragraph.d.ts +3 -0
- package/build/flow/fixtures/components/paragraph.js +28 -0
- package/build/flow/fixtures/components/review.d.ts +3 -0
- package/build/flow/fixtures/components/review.js +60 -0
- package/build/flow/fixtures/examples/camera-capture.d.ts +3 -0
- package/build/flow/fixtures/examples/camera-capture.js +121 -0
- package/build/flow/fixtures/examples/recipient-update.d.ts +3 -0
- package/build/flow/fixtures/examples/recipient-update.js +250 -0
- package/build/flow/fixtures/examples/recipient.d.ts +3 -0
- package/build/flow/fixtures/examples/recipient.js +313 -0
- package/build/flow/fixtures/examples/single-file-upload.d.ts +3 -0
- package/build/flow/fixtures/examples/single-file-upload.js +96 -0
- package/build/flow/fixtures/examples/step-validation-errors.d.ts +3 -0
- package/build/flow/fixtures/examples/step-validation-errors.js +75 -0
- package/build/flow/fixtures/features/action-response.d.ts +3 -0
- package/build/flow/fixtures/features/action-response.js +29 -0
- package/build/flow/fixtures/features/external.d.ts +3 -0
- package/build/flow/fixtures/features/external.js +31 -0
- package/build/flow/fixtures/features/persist-async.d.ts +3 -0
- package/build/flow/fixtures/features/persist-async.js +44 -0
- package/build/flow/fixtures/features/polling.d.ts +3 -0
- package/build/flow/fixtures/features/polling.js +33 -0
- package/build/flow/fixtures/index.d.ts +42 -0
- package/build/flow/fixtures/index.js +66 -0
- package/build/flow/fixtures/responses/action-response-final.d.ts +3 -0
- package/build/flow/fixtures/responses/action-response-final.js +24 -0
- package/build/flow/fixtures/responses/action.d.ts +5 -0
- package/build/flow/fixtures/responses/action.js +2 -0
- package/build/flow/fixtures/responses/exit.d.ts +6 -0
- package/build/flow/fixtures/responses/exit.js +2 -0
- package/build/flow/fixtures/responses/recipient-update-final.d.ts +3 -0
- package/build/flow/fixtures/responses/recipient-update-final.js +24 -0
- package/build/flow/fixtures/schemas/basic-form.d.ts +3 -0
- package/build/flow/fixtures/schemas/basic-form.js +39 -0
- package/build/flow/fixtures/schemas/number-and-integer.d.ts +3 -0
- package/build/flow/fixtures/schemas/number-and-integer.js +41 -0
- package/build/flow/fixtures/schemas/one-of.d.ts +3 -0
- package/build/flow/fixtures/schemas/one-of.js +223 -0
- package/build/flow/fixtures/schemas/string-formats.d.ts +3 -0
- package/build/flow/fixtures/schemas/string-formats.js +58 -0
- package/build/flow/index.d.ts +1 -0
- package/build/flow/index.js +1 -0
- package/build/flow/response-parsers/index.d.ts +17 -0
- package/build/flow/response-parsers/index.js +112 -0
- package/build/flow/response-parsers/spec.d.ts +1 -0
- package/build/flow/response-parsers/spec.js +263 -0
- package/build/flow/stories/EditableDynamicFlow.d.ts +5 -0
- package/build/flow/stories/EditableDynamicFlow.js +61 -0
- package/build/flow/types.d.ts +77 -0
- package/build/flow/types.js +3 -0
- package/build/flow/useDebouncedRefresh/index.d.ts +1 -0
- package/build/flow/useDebouncedRefresh/index.js +1 -0
- package/build/flow/useDebouncedRefresh/useDebouncedRefresh.d.ts +5 -0
- package/build/flow/useDebouncedRefresh/useDebouncedRefresh.js +24 -0
- package/build/flow/useDynamicFlowState.d.ts +18 -0
- package/build/flow/useDynamicFlowState.js +111 -0
- package/build/flow/useLoader.d.ts +9 -0
- package/build/flow/useLoader.js +22 -0
- package/build/formControl/FormControl.d.ts +86 -0
- package/build/formControl/FormControl.js +241 -0
- package/build/formControl/index.d.ts +1 -0
- package/build/formControl/index.js +1 -0
- package/build/formControl/types.d.ts +57 -0
- package/build/formControl/types.js +1 -0
- package/build/formControl/value-utils.d.ts +9 -0
- package/build/formControl/value-utils.js +108 -0
- package/build/i18n/cs.json +8 -0
- package/build/i18n/de.json +34 -0
- package/build/i18n/en.json +38 -0
- package/build/i18n/es.json +34 -0
- package/build/i18n/fr.json +34 -0
- package/build/i18n/hu.json +34 -0
- package/build/i18n/id.json +34 -0
- package/build/i18n/index.d.ts +2 -0
- package/build/i18n/index.js +31 -0
- package/build/i18n/it.json +34 -0
- package/build/i18n/ja.json +34 -0
- package/build/i18n/pl.json +11 -0
- package/build/i18n/pt.json +34 -0
- package/build/i18n/ro.json +34 -0
- package/build/i18n/ru.json +34 -0
- package/build/i18n/th.json +34 -0
- package/build/i18n/tr.json +11 -0
- package/build/i18n/uk.json +8 -0
- package/build/i18n/zh-CN.json +34 -0
- package/build/i18n/zh.json +34 -0
- package/build/index.d.ts +12 -0
- package/build/index.js +11 -0
- package/build/jsonSchemaForm/JsonSchemaForm.d.ts +66 -0
- package/build/jsonSchemaForm/JsonSchemaForm.js +31 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +14 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +54 -0
- package/build/jsonSchemaForm/allOfSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/allOfSchema/index.js +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.d.ts +15 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +16 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +26 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +18 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +24 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +18 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/useFormattedDefaultErrorMessages.d.ts +9 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/useFormattedDefaultErrorMessages.js +14 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils.d.ts +6 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils.js +85 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.d.ts +22 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +105 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.js +1 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.d.ts +31 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +79 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.d.ts +53 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +53 -0
- package/build/jsonSchemaForm/controlFeedback/index.d.ts +1 -0
- package/build/jsonSchemaForm/controlFeedback/index.js +1 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.d.ts +19 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js +122 -0
- package/build/jsonSchemaForm/genericSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/genericSchema/index.js +1 -0
- package/build/jsonSchemaForm/help/Help.d.ts +8 -0
- package/build/jsonSchemaForm/help/Help.js +9 -0
- package/build/jsonSchemaForm/help/Help.messages.d.ts +8 -0
- package/build/jsonSchemaForm/help/Help.messages.js +8 -0
- package/build/jsonSchemaForm/help/index.d.ts +1 -0
- package/build/jsonSchemaForm/help/index.js +1 -0
- package/build/jsonSchemaForm/index.d.ts +1 -0
- package/build/jsonSchemaForm/index.js +1 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +16 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +78 -0
- package/build/jsonSchemaForm/objectSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/objectSchema/index.js +1 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +15 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +153 -0
- package/build/jsonSchemaForm/oneOfSchema/getActiveSchemaIndex.d.ts +3 -0
- package/build/jsonSchemaForm/oneOfSchema/getActiveSchemaIndex.js +40 -0
- package/build/jsonSchemaForm/oneOfSchema/getBestMatchingSchemaIndexForValue.d.ts +2 -0
- package/build/jsonSchemaForm/oneOfSchema/getBestMatchingSchemaIndexForValue.js +27 -0
- package/build/jsonSchemaForm/oneOfSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/oneOfSchema/index.js +1 -0
- package/build/jsonSchemaForm/oneOfSchema/isConstSchema.d.ts +3 -0
- package/build/jsonSchemaForm/oneOfSchema/isConstSchema.js +7 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +16 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +8 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +8 -0
- package/build/jsonSchemaForm/persistAsyncSchema/basic/PersistAsyncBasicSchema.d.ts +21 -0
- package/build/jsonSchemaForm/persistAsyncSchema/basic/PersistAsyncBasicSchema.js +168 -0
- package/build/jsonSchemaForm/persistAsyncSchema/basic/index.d.ts +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/basic/index.js +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/blob/PersistAsyncBlobSchema.d.ts +20 -0
- package/build/jsonSchemaForm/persistAsyncSchema/blob/PersistAsyncBlobSchema.js +127 -0
- package/build/jsonSchemaForm/persistAsyncSchema/blob/UploadInputAdapter.d.ts +17 -0
- package/build/jsonSchemaForm/persistAsyncSchema/blob/UploadInputAdapter.js +32 -0
- package/build/jsonSchemaForm/persistAsyncSchema/blob/index.d.ts +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/blob/index.js +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.d.ts +9 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchemaModelMatcher.d.ts +2 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchemaModelMatcher.js +8 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/control/PromotedOneOfCheckboxControl.d.ts +7 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/control/PromotedOneOfCheckboxControl.js +27 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/control/PromotedOneOfControl.d.ts +23 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/control/PromotedOneOfControl.js +31 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/control/PromotedOneOfRadioControl.d.ts +9 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/control/PromotedOneOfRadioControl.js +32 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +8 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +55 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.d.ts +16 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
- package/build/jsonSchemaForm/readOnlySchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/readOnlySchema/index.js +1 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +25 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +106 -0
- package/build/jsonSchemaForm/schemaFormControl/availableCurrencyFlags.d.ts +3 -0
- package/build/jsonSchemaForm/schemaFormControl/availableCurrencyFlags.js +73 -0
- package/build/jsonSchemaForm/schemaFormControl/index.d.ts +1 -0
- package/build/jsonSchemaForm/schemaFormControl/index.js +1 -0
- package/build/jsonSchemaForm/schemaFormControl/optionMapper.d.ts +40 -0
- package/build/jsonSchemaForm/schemaFormControl/optionMapper.js +89 -0
- package/build/jsonSchemaForm/schemas/allOf.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/allOf.json.js +119 -0
- package/build/jsonSchemaForm/schemas/audRecipient.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/audRecipient.json.js +1104 -0
- package/build/jsonSchemaForm/schemas/base64Url_MultipleFileUpload.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/base64Url_MultipleFileUpload.json.js +37 -0
- package/build/jsonSchemaForm/schemas/blob_MultipleFileUpload.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/blob_MultipleFileUpload.json.js +36 -0
- package/build/jsonSchemaForm/schemas/currency.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/currency.json.js +48 -0
- package/build/jsonSchemaForm/schemas/oneOf.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/oneOf.json.js +119 -0
- package/build/jsonSchemaForm/schemas/oneOfTabs.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/oneOfTabs.json.js +53 -0
- package/build/jsonSchemaForm/schemas/promotedOneOf.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/promotedOneOf.json.js +56 -0
- package/build/jsonSchemaForm/schemas/promotedOneOfCheckbox.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/promotedOneOfCheckbox.json.js +102 -0
- package/build/jsonSchemaForm/schemas/simple.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/simple.json.js +48 -0
- package/build/jsonSchemaForm/schemas/uploadPersistAsync.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/uploadPersistAsync.json.js +71 -0
- package/build/jsonSchemaForm/schemas/validationAsync.json.d.ts +3 -0
- package/build/jsonSchemaForm/schemas/validationAsync.json.js +23 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +17 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +149 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
- package/build/layout/DynamicLayout.d.ts +17 -0
- package/build/layout/DynamicLayout.js +75 -0
- package/build/layout/alert/index.d.ts +6 -0
- package/build/layout/alert/index.js +29 -0
- package/build/layout/box/index.d.ts +8 -0
- package/build/layout/box/index.js +41 -0
- package/build/layout/button/index.d.ts +8 -0
- package/build/layout/button/index.js +58 -0
- package/build/layout/columns/index.d.ts +8 -0
- package/build/layout/columns/index.js +38 -0
- package/build/layout/decision/index.d.ts +9 -0
- package/build/layout/decision/index.js +38 -0
- package/build/layout/divider/index.d.ts +7 -0
- package/build/layout/divider/index.js +9 -0
- package/build/layout/external/DynamicExternal.d.ts +8 -0
- package/build/layout/external/DynamicExternal.js +30 -0
- package/build/layout/external/DynamicExternal.messages.d.ts +8 -0
- package/build/layout/external/DynamicExternal.messages.js +8 -0
- package/build/layout/external/index.d.ts +1 -0
- package/build/layout/external/index.js +1 -0
- package/build/layout/external/useExternalStepPolling.d.ts +11 -0
- package/build/layout/external/useExternalStepPolling.js +68 -0
- package/build/layout/form/index.d.ts +8 -0
- package/build/layout/form/index.js +22 -0
- package/build/layout/heading/index.d.ts +6 -0
- package/build/layout/heading/index.js +31 -0
- package/build/layout/icon/index.d.ts +7 -0
- package/build/layout/icon/index.js +22 -0
- package/build/layout/image/index.d.ts +6 -0
- package/build/layout/image/index.js +126 -0
- package/build/layout/index.d.ts +1 -0
- package/build/layout/index.js +1 -0
- package/build/layout/info/index.d.ts +7 -0
- package/build/layout/info/index.js +19 -0
- package/build/layout/layouts/all.json.d.ts +3 -0
- package/build/layout/layouts/all.json.js +176 -0
- package/build/layout/layouts/final-step-layout.json.d.ts +3 -0
- package/build/layout/layouts/final-step-layout.json.js +39 -0
- package/build/layout/layouts/finalStep.json.d.ts +3 -0
- package/build/layout/layouts/finalStep.json.js +24 -0
- package/build/layout/layouts/list.json.d.ts +3 -0
- package/build/layout/layouts/list.json.js +33 -0
- package/build/layout/layouts/pay-in.json.d.ts +3 -0
- package/build/layout/layouts/pay-in.json.js +97 -0
- package/build/layout/layouts/review.json.d.ts +3 -0
- package/build/layout/layouts/review.json.js +160 -0
- package/build/layout/layouts/success.json.d.ts +3 -0
- package/build/layout/layouts/success.json.js +66 -0
- package/build/layout/list/index.d.ts +8 -0
- package/build/layout/list/index.js +30 -0
- package/build/layout/loading-indicator/index.d.ts +7 -0
- package/build/layout/loading-indicator/index.js +10 -0
- package/build/layout/loading-indicator/spec.d.ts +1 -0
- package/build/layout/loading-indicator/spec.js +11 -0
- package/build/layout/paragraph/DynamicParagraph.d.ts +7 -0
- package/build/layout/paragraph/DynamicParagraph.js +42 -0
- package/build/layout/paragraph/DynamicParagraph.messages.d.ts +13 -0
- package/build/layout/paragraph/DynamicParagraph.messages.js +13 -0
- package/build/layout/paragraph/index.d.ts +1 -0
- package/build/layout/paragraph/index.js +1 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.d.ts +10 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.js +9 -0
- package/build/layout/review/index.d.ts +9 -0
- package/build/layout/review/index.js +33 -0
- package/build/layout/utils.d.ts +7 -0
- package/build/layout/utils.js +31 -0
- package/build/main.css +143 -0
- package/build/schema.d.ts +1 -0
- package/build/schema.js +1 -0
- package/build/step/cameraStep/CameraStep.d.ts +8 -0
- package/build/step/cameraStep/CameraStep.js +125 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.d.ts +16 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.js +122 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.d.ts +18 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +18 -0
- package/build/step/cameraStep/cameraCapture/components/index.d.ts +8 -0
- package/build/step/cameraStep/cameraCapture/components/index.js +28 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.d.ts +4 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.js +80 -0
- package/build/step/cameraStep/cameraCapture/index.d.ts +1 -0
- package/build/step/cameraStep/cameraCapture/index.js +1 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.d.ts +11 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +78 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +3 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +19 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +13 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +13 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +6 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +21 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +18 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +18 -0
- package/build/step/cameraStep/cameraCapture/screens/index.d.ts +2 -0
- package/build/step/cameraStep/cameraCapture/screens/index.js +2 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.d.ts +7 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.js +101 -0
- package/build/step/cameraStep/cameraCapture/utils/index.d.ts +8 -0
- package/build/step/cameraStep/cameraCapture/utils/index.js +103 -0
- package/build/step/cameraStep/index.d.ts +1 -0
- package/build/step/cameraStep/index.js +1 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.d.ts +7 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +23 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +23 -0
- package/build/step/externalConfirmationStep/index.d.ts +1 -0
- package/build/step/externalConfirmationStep/index.js +1 -0
- package/build/step/features/external/useExternal.d.ts +4 -0
- package/build/step/features/external/useExternal.js +15 -0
- package/build/step/features/index.d.ts +2 -0
- package/build/step/features/index.js +2 -0
- package/build/step/features/polling/useStepPolling.d.ts +2 -0
- package/build/step/features/polling/useStepPolling.js +44 -0
- package/build/step/index.d.ts +3 -0
- package/build/step/index.js +3 -0
- package/build/step/layoutStep/LayoutStep.d.ts +11 -0
- package/build/step/layoutStep/LayoutStep.js +34 -0
- package/build/step/layoutStep/index.d.ts +1 -0
- package/build/step/layoutStep/index.js +1 -0
- package/build/step/layoutStep/layoutService/convertStepToLayout.d.ts +8 -0
- package/build/step/layoutStep/layoutService/convertStepToLayout.js +217 -0
- package/build/step/layoutStep/layoutService/index.d.ts +2 -0
- package/build/step/layoutStep/layoutService/index.js +2 -0
- package/build/step/layoutStep/layoutService/inlineReferences.d.ts +7 -0
- package/build/step/layoutStep/layoutService/inlineReferences.js +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
+
import { InlineAlert, InstructionsList } from '@transferwise/components';
|
|
29
|
+
import classNames from 'classnames';
|
|
30
|
+
import PropTypes from 'prop-types';
|
|
31
|
+
import { Component } from 'react';
|
|
32
|
+
import { FormControlType } from '../common';
|
|
33
|
+
import { getControlType_Legacy } from '../common/requirements';
|
|
34
|
+
import { getValidationFailures } from '../common/validation/validation-failures';
|
|
35
|
+
import FormControl from '../formControl';
|
|
36
|
+
export var FieldTypes = {
|
|
37
|
+
STRING: 'string',
|
|
38
|
+
NUMBER: 'number',
|
|
39
|
+
INTEGER: 'integer',
|
|
40
|
+
BOOLEAN: 'boolean',
|
|
41
|
+
BLOB: 'blob'
|
|
42
|
+
};
|
|
43
|
+
export var FieldFormats = {
|
|
44
|
+
DATE: 'date',
|
|
45
|
+
PHONE: 'phone',
|
|
46
|
+
BASE_64_URL: 'base64url',
|
|
47
|
+
PASSWORD: 'password',
|
|
48
|
+
EMAIL: 'email',
|
|
49
|
+
URI: 'uri'
|
|
50
|
+
};
|
|
51
|
+
var DefaultValidationMessages = {
|
|
52
|
+
REQUIRED: 'Required',
|
|
53
|
+
PATTERN: 'Incorrect format',
|
|
54
|
+
MINLENGTH: 'The value is too short',
|
|
55
|
+
MAXLENGTH: 'The value is too long',
|
|
56
|
+
MIN: 'The value is too low',
|
|
57
|
+
MAX: 'The value is too high'
|
|
58
|
+
};
|
|
59
|
+
var Field = /** @class */ (function (_super) {
|
|
60
|
+
__extends(Field, _super);
|
|
61
|
+
function Field(props) {
|
|
62
|
+
var _this = _super.call(this, props) || this;
|
|
63
|
+
_this.objectSizeOf = function (object) { return (object ? Object.keys(object).length : 0); };
|
|
64
|
+
_this.state = {
|
|
65
|
+
focused: false,
|
|
66
|
+
changed: false,
|
|
67
|
+
error: props.errorMessage
|
|
68
|
+
};
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
Field.prototype.UNSAFE_componentWillReceiveProps = function (nextProps) {
|
|
72
|
+
if (nextProps.errorMessage !== this.props.errorMessage) {
|
|
73
|
+
this.setState({ error: nextProps.errorMessage });
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
Field.prototype.onFocus = function (value) {
|
|
77
|
+
var onFocus = this.props.onFocus;
|
|
78
|
+
if (onFocus) {
|
|
79
|
+
onFocus(value);
|
|
80
|
+
}
|
|
81
|
+
this.setState({ focused: true });
|
|
82
|
+
};
|
|
83
|
+
Field.prototype.onBlur = function (value) {
|
|
84
|
+
var onBlur = this.props.onBlur;
|
|
85
|
+
if (onBlur) {
|
|
86
|
+
onBlur(value);
|
|
87
|
+
}
|
|
88
|
+
this.setState({ focused: false });
|
|
89
|
+
};
|
|
90
|
+
Field.prototype.onChange = function (value) {
|
|
91
|
+
this.props.onChange(value);
|
|
92
|
+
this.setState({ changed: true, focused: true });
|
|
93
|
+
};
|
|
94
|
+
Field.prototype.validateValue = function (newValue) {
|
|
95
|
+
var field = this.props.field;
|
|
96
|
+
var validationFailuresKeys = getValidationFailures(newValue, field);
|
|
97
|
+
return validationFailuresKeys.reduce(function (acc, failure) {
|
|
98
|
+
var _a;
|
|
99
|
+
var messageKey = failure.toLowerCase();
|
|
100
|
+
var message = (field.validationMessages && field.validationMessages[messageKey]) ||
|
|
101
|
+
DefaultValidationMessages[messageKey.toUpperCase()];
|
|
102
|
+
return message
|
|
103
|
+
? __assign(__assign({}, acc), (_a = {}, _a[messageKey] = message, _a)) : acc;
|
|
104
|
+
}, {});
|
|
105
|
+
};
|
|
106
|
+
Field.prototype.updateAlert = function (control) {
|
|
107
|
+
var _a = this.props, value = _a.value, field = _a.field, errorMessage = _a.errorMessage, warningMessage = _a.warningMessage;
|
|
108
|
+
var _b = this.state, focused = _b.focused, changed = _b.changed, error = _b.error;
|
|
109
|
+
var validationFailures = changed && !focused ? this.validateValue(value) : {};
|
|
110
|
+
if (this.objectSizeOf(validationFailures) > 0) {
|
|
111
|
+
return {
|
|
112
|
+
type: 'error',
|
|
113
|
+
content: Object.keys(validationFailures).map(function (key) { return (_jsx("div", { children: validationFailures[key] }, key)); })
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (error && errorMessage) {
|
|
117
|
+
return {
|
|
118
|
+
type: 'error',
|
|
119
|
+
content: _jsx(_Fragment, { children: errorMessage })
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (warningMessage) {
|
|
123
|
+
return {
|
|
124
|
+
type: 'warning',
|
|
125
|
+
content: _jsx(_Fragment, { children: warningMessage })
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (focused && field.help && field.help.message) {
|
|
129
|
+
return {
|
|
130
|
+
type: 'info',
|
|
131
|
+
content: _jsx(_Fragment, { children: field.help.message })
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
if (focused && field.help && field.help.list && field.help.list.length > 0) {
|
|
135
|
+
return {
|
|
136
|
+
type: 'info',
|
|
137
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
138
|
+
content: field.help.list.map(function (item, index) { return _jsx("div", { children: item }, index); })
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
if (focused &&
|
|
142
|
+
field.help &&
|
|
143
|
+
field.help["do"] &&
|
|
144
|
+
field.help["do"].length > 0 &&
|
|
145
|
+
field.help.dont &&
|
|
146
|
+
field.help.dont.length > 0) {
|
|
147
|
+
return {
|
|
148
|
+
type: 'info',
|
|
149
|
+
content: (_jsx("div", __assign({ className: "m-b-1" }, { children: _jsx(InstructionsList, { dos: field.help["do"], donts: field.help.dont }) })))
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
if (focused && control !== FormControlType.FILE && field.help && field.help.image) {
|
|
153
|
+
return {
|
|
154
|
+
type: 'info',
|
|
155
|
+
content: _jsx("img", { className: "thumbnail m-y-2", src: "".concat(field.help.image), alt: field.label })
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
type: null,
|
|
160
|
+
content: null
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
Field.prototype.render = function () {
|
|
164
|
+
var _this = this;
|
|
165
|
+
var _a = this.props, name = _a.name, field = _a.field, value = _a.value, label = _a.label;
|
|
166
|
+
var control = field.control || getControlType_Legacy(field);
|
|
167
|
+
var alert = this.updateAlert(control);
|
|
168
|
+
var showAlert = !!alert.content;
|
|
169
|
+
var showLabel = control !== FormControlType.FILE &&
|
|
170
|
+
control !== FormControlType.UPLOAD &&
|
|
171
|
+
control !== FormControlType.CHECKBOX;
|
|
172
|
+
return (_jsxs("div", __assign({ className: classNames('form-group', "tw-field-".concat(name), {
|
|
173
|
+
'has-info': alert.type === 'info' && showAlert,
|
|
174
|
+
'has-error': alert.type === 'error' && showAlert,
|
|
175
|
+
'has-warning': alert.type === 'warning' && showAlert,
|
|
176
|
+
hidden: field.hidden
|
|
177
|
+
}) }, { children: [showLabel && (_jsx("label", __assign({ htmlFor: field === null || field === void 0 ? void 0 : field.id, className: "control-label" }, { children: label }))), _jsx(FormControl, __assign({}, field, { type: control, name: name, value: value, onChange: function (event) { return _this.onChange(event); }, onFocus: function (event) { return _this.onFocus(event); }, onBlur: function (event) { return _this.onBlur(event); } })), showAlert && _jsx(InlineAlert, __assign({ type: alert.type }, { children: alert.content }))] })));
|
|
178
|
+
};
|
|
179
|
+
return Field;
|
|
180
|
+
}(Component));
|
|
181
|
+
export default Field;
|
|
182
|
+
Field.propTypes = {
|
|
183
|
+
name: PropTypes.string.isRequired,
|
|
184
|
+
value: PropTypes.oneOfType([
|
|
185
|
+
PropTypes.string,
|
|
186
|
+
PropTypes.number,
|
|
187
|
+
PropTypes.bool,
|
|
188
|
+
PropTypes.object,
|
|
189
|
+
PropTypes.shape({
|
|
190
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
191
|
+
value: PropTypes.any.isRequired,
|
|
192
|
+
label: PropTypes.node,
|
|
193
|
+
icon: PropTypes.string,
|
|
194
|
+
currency: PropTypes.string,
|
|
195
|
+
note: PropTypes.node,
|
|
196
|
+
secondary: PropTypes.node
|
|
197
|
+
}),
|
|
198
|
+
]),
|
|
199
|
+
field: PropTypes.shape({
|
|
200
|
+
type: PropTypes.oneOf(['string', 'number', 'integer', 'boolean', 'blob']).isRequired,
|
|
201
|
+
label: PropTypes.string,
|
|
202
|
+
id: PropTypes.string,
|
|
203
|
+
required: PropTypes.bool,
|
|
204
|
+
disabled: PropTypes.bool,
|
|
205
|
+
hidden: PropTypes.bool,
|
|
206
|
+
readOnly: PropTypes.bool,
|
|
207
|
+
autoComplete: PropTypes.bool,
|
|
208
|
+
placeholder: PropTypes.string,
|
|
209
|
+
searchPlaceholder: PropTypes.string,
|
|
210
|
+
control: PropTypes.oneOf([
|
|
211
|
+
'radio',
|
|
212
|
+
'checkbox',
|
|
213
|
+
'select',
|
|
214
|
+
'file',
|
|
215
|
+
'date',
|
|
216
|
+
'date-time',
|
|
217
|
+
'date-lookup',
|
|
218
|
+
'tel',
|
|
219
|
+
'number',
|
|
220
|
+
'hidden',
|
|
221
|
+
'password',
|
|
222
|
+
'text',
|
|
223
|
+
'textarea',
|
|
224
|
+
'upload',
|
|
225
|
+
'tab',
|
|
226
|
+
]),
|
|
227
|
+
format: PropTypes.oneOf(['date', 'phone', 'base64url', 'password', 'email', 'uri']),
|
|
228
|
+
displayPattern: PropTypes.string,
|
|
229
|
+
help: PropTypes.shape({
|
|
230
|
+
message: PropTypes.string,
|
|
231
|
+
image: PropTypes.string,
|
|
232
|
+
list: PropTypes.arrayOf(PropTypes.string),
|
|
233
|
+
"do": PropTypes.arrayOf(PropTypes.string),
|
|
234
|
+
dont: PropTypes.arrayOf(PropTypes.string)
|
|
235
|
+
}),
|
|
236
|
+
pattern: PropTypes.string,
|
|
237
|
+
minLength: PropTypes.number,
|
|
238
|
+
maxLength: PropTypes.number,
|
|
239
|
+
minDate: PropTypes.instanceOf(Date),
|
|
240
|
+
maxDate: PropTypes.instanceOf(Date),
|
|
241
|
+
min: PropTypes.number,
|
|
242
|
+
max: PropTypes.number,
|
|
243
|
+
uploadProps: PropTypes.shape({
|
|
244
|
+
animationDelay: PropTypes.number,
|
|
245
|
+
csButtonText: PropTypes.string,
|
|
246
|
+
csFailureText: PropTypes.string,
|
|
247
|
+
csSuccessText: PropTypes.string,
|
|
248
|
+
csTooLargeMessage: PropTypes.string,
|
|
249
|
+
csWrongTypeMessage: PropTypes.string,
|
|
250
|
+
httpOptions: PropTypes.shape({}),
|
|
251
|
+
maxSize: PropTypes.number,
|
|
252
|
+
onCancel: PropTypes.func,
|
|
253
|
+
onFailure: PropTypes.func,
|
|
254
|
+
onStart: PropTypes.func,
|
|
255
|
+
onSuccess: PropTypes.func,
|
|
256
|
+
psButtonText: PropTypes.string,
|
|
257
|
+
psProcessingText: PropTypes.string,
|
|
258
|
+
size: PropTypes.string,
|
|
259
|
+
usAccept: PropTypes.oneOf(['*', 'image/*', 'application/*']),
|
|
260
|
+
usButtonText: PropTypes.string,
|
|
261
|
+
usDisabled: PropTypes.bool,
|
|
262
|
+
usDropMessage: PropTypes.string,
|
|
263
|
+
usHelpImage: PropTypes.string,
|
|
264
|
+
usLabel: PropTypes.string,
|
|
265
|
+
usPlaceholder: PropTypes.string
|
|
266
|
+
}),
|
|
267
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
268
|
+
id: PropTypes.string,
|
|
269
|
+
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).isRequired,
|
|
270
|
+
value: PropTypes.oneOfType([
|
|
271
|
+
PropTypes.number,
|
|
272
|
+
PropTypes.string,
|
|
273
|
+
PropTypes.bool,
|
|
274
|
+
PropTypes.object,
|
|
275
|
+
PropTypes.instanceOf(Date),
|
|
276
|
+
]).isRequired,
|
|
277
|
+
header: PropTypes.node,
|
|
278
|
+
icon: PropTypes.string,
|
|
279
|
+
currency: PropTypes.string,
|
|
280
|
+
note: PropTypes.node,
|
|
281
|
+
secondary: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
282
|
+
separator: PropTypes.bool,
|
|
283
|
+
disabled: PropTypes.bool
|
|
284
|
+
})),
|
|
285
|
+
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
|
|
286
|
+
validationMessages: PropTypes.shape({
|
|
287
|
+
required: PropTypes.string,
|
|
288
|
+
pattern: PropTypes.string,
|
|
289
|
+
minlength: PropTypes.string,
|
|
290
|
+
maxlength: PropTypes.string,
|
|
291
|
+
min: PropTypes.string,
|
|
292
|
+
max: PropTypes.string
|
|
293
|
+
})
|
|
294
|
+
}).isRequired,
|
|
295
|
+
countryCode: PropTypes.string,
|
|
296
|
+
onChange: PropTypes.func.isRequired,
|
|
297
|
+
onFocus: PropTypes.func,
|
|
298
|
+
onBlur: PropTypes.func,
|
|
299
|
+
errorMessage: PropTypes.string,
|
|
300
|
+
warningMessage: PropTypes.string,
|
|
301
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
302
|
+
};
|
|
303
|
+
Field.defaultProps = {
|
|
304
|
+
countryCode: null,
|
|
305
|
+
value: null,
|
|
306
|
+
errorMessage: null,
|
|
307
|
+
warningMessage: null,
|
|
308
|
+
onFocus: null,
|
|
309
|
+
onBlur: null,
|
|
310
|
+
label: null
|
|
311
|
+
};
|