@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,97 @@
|
|
|
1
|
+
var step = {
|
|
2
|
+
key: 'PAY_ID',
|
|
3
|
+
type: 'form',
|
|
4
|
+
title: 'Pay Using PayID',
|
|
5
|
+
actions: [
|
|
6
|
+
{
|
|
7
|
+
title: 'I have paid',
|
|
8
|
+
type: 'primary',
|
|
9
|
+
exit: true,
|
|
10
|
+
result: {
|
|
11
|
+
paid: 'POTENTIALLY_PAID'
|
|
12
|
+
},
|
|
13
|
+
$id: '#payNow'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: "I'll transfer my money later",
|
|
17
|
+
type: 'secondary',
|
|
18
|
+
exit: true,
|
|
19
|
+
result: {
|
|
20
|
+
paid: 'NOT_PAID'
|
|
21
|
+
},
|
|
22
|
+
$id: '#payLater'
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
schemas: [
|
|
26
|
+
{
|
|
27
|
+
title: 'Pay Using PayID',
|
|
28
|
+
type: 'string',
|
|
29
|
+
hidden: true,
|
|
30
|
+
"default": 'PayId'
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
layout: [
|
|
34
|
+
{
|
|
35
|
+
type: 'info',
|
|
36
|
+
markdown: 'Go to your online banking and transfer **50.25 AUD** to our account using the email below.'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
components: [
|
|
40
|
+
{
|
|
41
|
+
context: 'neutral',
|
|
42
|
+
markdown: "We've updated our PayID email and no longer require you to enter any reference numbers. Use this PayID going forward.",
|
|
43
|
+
type: 'alert'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'review',
|
|
47
|
+
title: 'Our Bank Details',
|
|
48
|
+
fields: [
|
|
49
|
+
{
|
|
50
|
+
label: 'Email',
|
|
51
|
+
value: 'rahul@wise.com'
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
left: [
|
|
57
|
+
{
|
|
58
|
+
type: 'review',
|
|
59
|
+
fields: [
|
|
60
|
+
{
|
|
61
|
+
label: 'Account Name',
|
|
62
|
+
value: 'Wise Australia Pty Ltd'
|
|
63
|
+
},
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
right: [
|
|
68
|
+
{
|
|
69
|
+
type: 'review',
|
|
70
|
+
fields: [
|
|
71
|
+
{
|
|
72
|
+
label: 'Amount',
|
|
73
|
+
value: '50.25 AUD'
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
type: 'columns'
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
type: 'box'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'button',
|
|
85
|
+
action: {
|
|
86
|
+
$ref: '#payNow'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: 'button',
|
|
91
|
+
action: {
|
|
92
|
+
$ref: '#payLater'
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
]
|
|
96
|
+
};
|
|
97
|
+
export default step;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
var layout = [
|
|
2
|
+
{
|
|
3
|
+
type: 'box',
|
|
4
|
+
width: 'md',
|
|
5
|
+
components: [
|
|
6
|
+
{
|
|
7
|
+
type: 'heading',
|
|
8
|
+
align: 'center',
|
|
9
|
+
margin: 'lg',
|
|
10
|
+
text: 'Review your transfer details'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: 'box',
|
|
14
|
+
border: true,
|
|
15
|
+
components: [
|
|
16
|
+
{
|
|
17
|
+
type: 'review',
|
|
18
|
+
title: 'Transfer details',
|
|
19
|
+
orientation: 'horizontal',
|
|
20
|
+
action: {
|
|
21
|
+
title: 'Edit',
|
|
22
|
+
url: '/edit-transfer',
|
|
23
|
+
method: 'GET'
|
|
24
|
+
},
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
label: 'You send approximately',
|
|
28
|
+
value: '88.86 GBP'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: 'You send from',
|
|
32
|
+
value: 'GBP balance'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Estimate total fees (included)',
|
|
36
|
+
value: '0.86 GBP'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "Estimate amount we'll convert",
|
|
40
|
+
value: '88 GBP'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Live rate',
|
|
44
|
+
value: '1.1363'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Test gets exactly',
|
|
48
|
+
value: '100 EUR'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: 'Should arrive',
|
|
52
|
+
value: 'in seconds'
|
|
53
|
+
},
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'divider'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'review',
|
|
61
|
+
title: 'Recipient details',
|
|
62
|
+
orientation: 'horizontal',
|
|
63
|
+
action: {
|
|
64
|
+
title: 'Edit',
|
|
65
|
+
url: '/recipient',
|
|
66
|
+
method: 'GET'
|
|
67
|
+
},
|
|
68
|
+
fields: [
|
|
69
|
+
{
|
|
70
|
+
label: 'Name',
|
|
71
|
+
value: 'Test Name'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: 'Email',
|
|
75
|
+
value: 'test@example.com'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: 'Sort code',
|
|
79
|
+
value: '12-34-56'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: 'Account number',
|
|
83
|
+
value: '12345678'
|
|
84
|
+
},
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: 'box',
|
|
91
|
+
border: true,
|
|
92
|
+
components: [
|
|
93
|
+
{
|
|
94
|
+
type: 'form',
|
|
95
|
+
schema: {
|
|
96
|
+
title: 'Schedule',
|
|
97
|
+
type: 'object',
|
|
98
|
+
displayOrder: ['date', 'frequency'],
|
|
99
|
+
properties: {
|
|
100
|
+
date: {
|
|
101
|
+
title: 'Date',
|
|
102
|
+
type: 'string',
|
|
103
|
+
format: 'date'
|
|
104
|
+
},
|
|
105
|
+
frequency: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
title: 'Frequency',
|
|
108
|
+
control: 'select',
|
|
109
|
+
placeholder: 'How often?',
|
|
110
|
+
oneOf: [
|
|
111
|
+
{
|
|
112
|
+
title: 'Daily',
|
|
113
|
+
"const": 'day'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: 'Weekly',
|
|
117
|
+
"const": 'week'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: 'Monthly',
|
|
121
|
+
"const": 'month'
|
|
122
|
+
},
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'alert',
|
|
130
|
+
markdown: "We'll deduct the required amount **from your GBP balance** at the **real exchange rate** on the **28th of each month**, so that Rayna always gets exactly **100 EUR**. First **monthly** transfer will be made on **April 28, 2020 (BST)**"
|
|
131
|
+
},
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'form',
|
|
136
|
+
schema: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
displayOrder: ['reference'],
|
|
139
|
+
properties: {
|
|
140
|
+
reference: {
|
|
141
|
+
type: 'string',
|
|
142
|
+
title: 'Reference',
|
|
143
|
+
placeholder: 'Type a reference'
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'button',
|
|
150
|
+
action: {
|
|
151
|
+
title: 'Create transfer',
|
|
152
|
+
method: 'POST',
|
|
153
|
+
url: '/final',
|
|
154
|
+
type: 'primary'
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
];
|
|
160
|
+
export default layout;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var layout = [
|
|
2
|
+
{
|
|
3
|
+
type: 'box',
|
|
4
|
+
width: 'xs',
|
|
5
|
+
components: [
|
|
6
|
+
{
|
|
7
|
+
type: 'image',
|
|
8
|
+
url: 'https://transferwise.com/staticrab/homepage/_next/static/images/how_to_2-06281f8ea9caa50445f075d460434bcf.svg',
|
|
9
|
+
text: 'An illustration'
|
|
10
|
+
},
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
type: 'box',
|
|
15
|
+
width: 'lg',
|
|
16
|
+
components: [
|
|
17
|
+
{
|
|
18
|
+
type: 'heading',
|
|
19
|
+
align: 'center',
|
|
20
|
+
text: "You've scheduled a monthly payment of 100 EUR to Rayna Kenter"
|
|
21
|
+
},
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'box',
|
|
26
|
+
width: 'md',
|
|
27
|
+
components: [
|
|
28
|
+
{
|
|
29
|
+
type: 'info',
|
|
30
|
+
align: 'center',
|
|
31
|
+
markdown: 'Your first payment has been sent **now**',
|
|
32
|
+
margin: 'xs'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'paragraph',
|
|
36
|
+
align: 'center',
|
|
37
|
+
text: 'Your next payment will be made on July 29th, 2020 (BST)'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'columns',
|
|
41
|
+
left: [
|
|
42
|
+
{
|
|
43
|
+
type: 'button',
|
|
44
|
+
action: {
|
|
45
|
+
title: 'Check transfer details',
|
|
46
|
+
url: '/check',
|
|
47
|
+
method: 'GET'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
right: [
|
|
52
|
+
{
|
|
53
|
+
type: 'button',
|
|
54
|
+
action: {
|
|
55
|
+
title: 'Invite & earn',
|
|
56
|
+
url: '/check',
|
|
57
|
+
method: 'GET',
|
|
58
|
+
type: 'primary'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
export default layout;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Action, ListLayout } from '../../dynamic-flow-types';
|
|
3
|
+
type Props = {
|
|
4
|
+
component: ListLayout;
|
|
5
|
+
onAction: (action: Action) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const DynamicList: ({ component }: Props) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
14
|
+
import { Summary } from '@transferwise/components';
|
|
15
|
+
import DynamicIcon from '../icon';
|
|
16
|
+
import { getMarginBottom } from '../utils';
|
|
17
|
+
export var DynamicList = function (_a) {
|
|
18
|
+
var component = _a.component;
|
|
19
|
+
return (_jsxs("div", __assign({ className: getMarginBottom(component.margin || 'md') }, { children: [component.title ? _jsxs("h4", __assign({ className: "m-b-2" }, { children: [" ", component.title, " "] })) : null, component.items.map(mapItemToSummary)] })));
|
|
20
|
+
};
|
|
21
|
+
function mapItemToSummary(_a) {
|
|
22
|
+
var title = _a.title, description = _a.description, icon = _a.icon, status = _a.status;
|
|
23
|
+
var props = __assign(__assign({ key: "".concat(title, "/").concat(description || ''), title: title, description: description }, ((icon === null || icon === void 0 ? void 0 : icon.name) ? { icon: _jsx(DynamicIcon, { type: icon.name }) } : {})), (status ? { status: statusMap[status] } : {}));
|
|
24
|
+
return _jsx(Summary, __assign({}, props));
|
|
25
|
+
}
|
|
26
|
+
var statusMap = {
|
|
27
|
+
positive: 'done',
|
|
28
|
+
warning: 'pending',
|
|
29
|
+
neutral: 'notDone'
|
|
30
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Loader } from '@transferwise/components';
|
|
3
|
+
import { getMarginBottom } from '../utils';
|
|
4
|
+
export var DynamicLoadingIndicator = function (_a) {
|
|
5
|
+
var component = _a.component;
|
|
6
|
+
var margin = component.margin, _b = component.size, size = _b === void 0 ? 'md' : _b;
|
|
7
|
+
return (_jsx(Loader, { size: size, classNames: {
|
|
8
|
+
'tw-loader': "tw-loader m-x-auto ".concat(getMarginBottom(margin))
|
|
9
|
+
} }));
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { DynamicLoadingIndicator } from '.';
|
|
4
|
+
describe('Given a component for dynamically rendering a loading indicator', function () {
|
|
5
|
+
describe('when initialised without any properties', function () {
|
|
6
|
+
it('renders a loading indicator of the default "md" size', function () {
|
|
7
|
+
var baseElement = render(_jsx(DynamicLoadingIndicator, { component: { type: 'loading-indicator' } })).baseElement;
|
|
8
|
+
expect(baseElement).toMatchInlineSnapshot("\n<body>\n <div>\n <div\n class=\"tw-loader m-x-auto tw-loader--md\"\n >\n <div\n class=\"tw-loader__stripe\"\n />\n <div\n class=\"tw-loader__stripe\"\n />\n <div\n class=\"tw-loader__stripe\"\n />\n <div\n class=\"tw-loader__stripe\"\n />\n <div\n class=\"tw-loader__stripe\"\n />\n </div>\n </div>\n</body>\n");
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Button } from '@transferwise/components';
|
|
14
|
+
import { useIntl } from 'react-intl';
|
|
15
|
+
import { getTextAlignmentAndMargin } from '../utils';
|
|
16
|
+
import messages from './DynamicParagraph.messages';
|
|
17
|
+
import { useSnackBarIfAvailable } from './useSnackBarIfAvailable';
|
|
18
|
+
export var DynamicParagraph = function (_a) {
|
|
19
|
+
var component = _a.component;
|
|
20
|
+
return component.control === 'copyable' ? (_jsx(CopyableDynamicParagraph, { component: component })) : (_jsx(BasicDynamicParagraph, { component: component }));
|
|
21
|
+
};
|
|
22
|
+
var BasicDynamicParagraph = function (_a) {
|
|
23
|
+
var component = _a.component;
|
|
24
|
+
return (_jsxs("p", __assign({ className: getTextAlignmentAndMargin(component) }, { children: [" ", component.text, " "] })));
|
|
25
|
+
};
|
|
26
|
+
var CopyableDynamicParagraph = function (_a) {
|
|
27
|
+
var component = _a.component;
|
|
28
|
+
var formatMessage = useIntl().formatMessage;
|
|
29
|
+
var createSnackbar = useSnackBarIfAvailable();
|
|
30
|
+
var text = component.text;
|
|
31
|
+
var copy = function () {
|
|
32
|
+
var _a;
|
|
33
|
+
(_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(text).then(function () { return createSnackbar({ text: formatMessage(messages.copied) }); })["catch"](noop);
|
|
34
|
+
};
|
|
35
|
+
var classNames = getTextAlignmentAndMargin({ align: component.align, margin: 'sm' }) + ' form-control';
|
|
36
|
+
return (_jsxs("div", __assign({ className: getTextAlignmentAndMargin(component) }, { children: [_jsx("input", { type: "text", className: classNames, value: text, readOnly: true,
|
|
37
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
38
|
+
style: { textOverflow: 'ellipsis' } }), _jsx(Button, __assign({ block: true, onClick: copy }, { children: formatMessage(messages.copy) }))] })));
|
|
39
|
+
};
|
|
40
|
+
function noop() {
|
|
41
|
+
//
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export default defineMessages({
|
|
3
|
+
copy: {
|
|
4
|
+
id: 'dynamicFlows.DynamicParagraph.copy',
|
|
5
|
+
defaultMessage: 'Copy',
|
|
6
|
+
description: 'Copy to clipboard button label.'
|
|
7
|
+
},
|
|
8
|
+
copied: {
|
|
9
|
+
id: 'dynamicFlows.DynamicParagraph.copied',
|
|
10
|
+
defaultMessage: 'Copied to clipboard',
|
|
11
|
+
description: 'Appears in a snackbar when the copy operation succeeds.'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DynamicParagraph } from './DynamicParagraph';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DynamicParagraph } from './DynamicParagraph';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SnackbarContext } from '@transferwise/components';
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
export function useSnackBarIfAvailable() {
|
|
4
|
+
var context = useContext(SnackbarContext);
|
|
5
|
+
return context ? context.createSnackbar : noop;
|
|
6
|
+
}
|
|
7
|
+
function noop() {
|
|
8
|
+
//
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ReviewLayout } from '../../dynamic-flow-types';
|
|
3
|
+
import { OnAction } from '../../schema';
|
|
4
|
+
type Props = {
|
|
5
|
+
component: ReviewLayout;
|
|
6
|
+
onAction: OnAction;
|
|
7
|
+
};
|
|
8
|
+
declare const DynamicReview: (props: Props) => JSX.Element;
|
|
9
|
+
export default DynamicReview;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { DefinitionList } from '@transferwise/components';
|
|
14
|
+
import { getMarginBottom } from '../utils';
|
|
15
|
+
var mapFieldsToDefinitions = function (_a, index) {
|
|
16
|
+
var label = _a.label, value = _a.value;
|
|
17
|
+
return { key: String(index), title: label, value: value };
|
|
18
|
+
};
|
|
19
|
+
var getReviewLayout = function (orientation) {
|
|
20
|
+
return orientation === 'horizontal' ? 'HORIZONTAL_RIGHT_ALIGNED' : 'VERTICAL_ONE_COLUMN';
|
|
21
|
+
};
|
|
22
|
+
var DynamicReview = function (props) {
|
|
23
|
+
var review = props.component;
|
|
24
|
+
var margin = getMarginBottom(review.margin || 'xs');
|
|
25
|
+
var getReviewAction = function (action) {
|
|
26
|
+
return (_jsx("a", __assign({ href: action.url, className: "pull-right", role: "button", onClick: function (event) {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
props.onAction(action);
|
|
29
|
+
} }, { children: action.title })));
|
|
30
|
+
};
|
|
31
|
+
return (_jsxs(_Fragment, { children: [review.title && (_jsxs("h6", __assign({ className: "m-b-2" }, { children: [review.title, review.action && getReviewAction(review.action)] }))), _jsx("div", __assign({ className: margin }, { children: _jsx(DefinitionList, { layout: getReviewLayout(review.orientation), definitions: review.fields.map(mapFieldsToDefinitions) }) }))] }));
|
|
32
|
+
};
|
|
33
|
+
export default DynamicReview;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Align, Size } from '../dynamic-flow-types';
|
|
2
|
+
declare const getMarginBottom: (size: Size | undefined) => "" | "m-b-0" | "m-b-1" | "m-b-2" | "m-b-3" | "m-b-5";
|
|
3
|
+
declare const getTextAlignmentAndMargin: (component: {
|
|
4
|
+
align?: Align;
|
|
5
|
+
margin?: Size;
|
|
6
|
+
}) => string;
|
|
7
|
+
export { getMarginBottom, getTextAlignmentAndMargin };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var getMarginBottom = function (size) {
|
|
2
|
+
switch (size) {
|
|
3
|
+
case 'xs':
|
|
4
|
+
return 'm-b-0';
|
|
5
|
+
case 'sm':
|
|
6
|
+
return 'm-b-1';
|
|
7
|
+
case 'md':
|
|
8
|
+
return 'm-b-2';
|
|
9
|
+
case 'lg':
|
|
10
|
+
return 'm-b-3';
|
|
11
|
+
case 'xl':
|
|
12
|
+
return 'm-b-5';
|
|
13
|
+
default:
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var getTextAlignment = function (align) {
|
|
18
|
+
switch (align) {
|
|
19
|
+
case 'right':
|
|
20
|
+
return 'text-xs-right';
|
|
21
|
+
case 'center':
|
|
22
|
+
return 'text-xs-center';
|
|
23
|
+
case 'left':
|
|
24
|
+
default:
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var getTextAlignmentAndMargin = function (component) {
|
|
29
|
+
return "".concat(getTextAlignment(component.align), " ").concat(getMarginBottom(component.margin));
|
|
30
|
+
};
|
|
31
|
+
export { getMarginBottom, getTextAlignmentAndMargin };
|