@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,368 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
49
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
50
|
+
import { useIntl } from 'react-intl';
|
|
51
|
+
import { DynamicFlowProvider } from '../common/contexts/dynamicFlowContext/dynamicFlowContext';
|
|
52
|
+
import { FetcherProvider, makeFetcher } from '../common/contexts/fetcherContext';
|
|
53
|
+
import { LogProvider, getLogger } from '../common/logging';
|
|
54
|
+
import { getTracker, TrackingContextProvider } from '../common/tracking';
|
|
55
|
+
import { isValidSchema } from '../common/validation/schema-validators';
|
|
56
|
+
import { isObjectModel } from '../dynamic-flow-types';
|
|
57
|
+
import { DynamicFlowStep } from './DynamicFlowStep';
|
|
58
|
+
import ErrorBoundary from './errorBoundary';
|
|
59
|
+
import { parseFetchResponse, parseExitResponse, parseErrorResponse } from './response-parsers';
|
|
60
|
+
import { useDebouncedRefresh } from './useDebouncedRefresh';
|
|
61
|
+
import { useDynamicFlowState } from './useDynamicFlowState';
|
|
62
|
+
import { useLoader } from './useLoader';
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
64
|
+
var noop = function () { };
|
|
65
|
+
/**
|
|
66
|
+
* ## DynamicFlow
|
|
67
|
+
*
|
|
68
|
+
* The dynamic flow component is responsible for the asynchronous actions occuring
|
|
69
|
+
* within a dynamic flow, managing transitions between steps as well as refreshing
|
|
70
|
+
* requirements. It doesn't control any view logic, but takes the step definition
|
|
71
|
+
* and reformats it to use a LayoutStep for presentation.
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
var DynamicFlowComponent = function (_a) {
|
|
75
|
+
var flowId = _a.id, baseUrl = _a.baseUrl, propsFetcher = _a.fetcher, flowUrl = _a.flowUrl, initialAction = _a.initialAction, initialStep = _a.initialStep, loaderConfig = _a.loaderConfig, _b = _a.displayStepTitle, displayStepTitle = _b === void 0 ? true : _b, onClose = _a.onClose, _c = _a.onStepChange, onStepChange = _c === void 0 ? noop : _c, onError = _a.onError, _d = _a.onTrackableEvent, onTrackableEvent = _d === void 0 ? noop : _d, _e = _a.onLog, onLog = _e === void 0 ? noop : _e;
|
|
76
|
+
var locale = useIntl().locale;
|
|
77
|
+
var _f = useDynamicFlowState(initialStep), formErrors = _f.formErrors, globalError = _f.globalError, step = _f.step, models = _f.models, etag = _f.etag, modelIsValid = _f.modelIsValid, setFormErrors = _f.setFormErrors, setGlobalError = _f.setGlobalError, setStepAndEtag = _f.setStepAndEtag, setSchemaModel = _f.setSchemaModel;
|
|
78
|
+
var _g = useState(false), submitted = _g[0], setSubmitted = _g[1];
|
|
79
|
+
var _h = useLoader(loaderConfig, initialStep ? 'idle' : 'initial'), loadingState = _h.loadingState, setLoadingState = _h.setLoadingState, loader = _h.loader;
|
|
80
|
+
var logWarning = getLogger('warning', onLog, flowId, step === null || step === void 0 ? void 0 : step.key);
|
|
81
|
+
var logError = getLogger('error', onLog, flowId, step === null || step === void 0 ? void 0 : step.key);
|
|
82
|
+
var logCritical = getLogger('critical', onLog, flowId, step === null || step === void 0 ? void 0 : step.key);
|
|
83
|
+
var analyticsMetadata = useMemo(function () { var _a; return (__assign({ flowId: flowId, stepId: step === null || step === void 0 ? void 0 : step.key }, ((_a = step === null || step === void 0 ? void 0 : step.analytics) !== null && _a !== void 0 ? _a : {}))); }, [flowId, step]);
|
|
84
|
+
var trackEvent = useMemo(function () { return getTracker(onTrackableEvent, analyticsMetadata); }, [onTrackableEvent, analyticsMetadata]);
|
|
85
|
+
var fetcher = useMemo(function () { return propsFetcher || makeFetcher(baseUrl); }, [propsFetcher, baseUrl]);
|
|
86
|
+
var triggerActionRequest = useCallback(function (_a) {
|
|
87
|
+
var action = _a.action, data = _a.data, etag = _a.etag;
|
|
88
|
+
var url = action.url, _b = action.method, method = _b === void 0 ? 'POST' : _b;
|
|
89
|
+
return fetcher(url !== null && url !== void 0 ? url : '', {
|
|
90
|
+
method: method,
|
|
91
|
+
headers: __assign({ 'accept-language': locale, 'Content-Type': 'application/json' }, (etag ? { 'If-None-Match': etag } : {})),
|
|
92
|
+
credentials: 'include',
|
|
93
|
+
body: method === 'GET' ? undefined : JSON.stringify(data)
|
|
94
|
+
});
|
|
95
|
+
}, [fetcher, locale]);
|
|
96
|
+
var fetchNextStep = function (action, data) {
|
|
97
|
+
if (data === void 0) { data = {}; }
|
|
98
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
99
|
+
var response, error_1;
|
|
100
|
+
return __generator(this, function (_a) {
|
|
101
|
+
switch (_a.label) {
|
|
102
|
+
case 0:
|
|
103
|
+
setLoadingState(loadingState === 'initial' ? 'initial' : 'submission');
|
|
104
|
+
_a.label = 1;
|
|
105
|
+
case 1:
|
|
106
|
+
_a.trys.push([1, 3, , 4]);
|
|
107
|
+
trackEvent('Dynamic Flow - Step Submitted', { actionId: action.$id });
|
|
108
|
+
return [4 /*yield*/, triggerActionRequest({ action: action, data: data })];
|
|
109
|
+
case 2:
|
|
110
|
+
response = _a.sent();
|
|
111
|
+
return [2 /*return*/, handleFetchResponse(response, 'submission')];
|
|
112
|
+
case 3:
|
|
113
|
+
error_1 = _a.sent();
|
|
114
|
+
handleFetchError(error_1, 'Error fetching next step');
|
|
115
|
+
return [3 /*break*/, 4];
|
|
116
|
+
case 4: return [2 /*return*/];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
var fetchRefreshStep = function (action, data, etag) { return __awaiter(void 0, void 0, void 0, function () {
|
|
122
|
+
var response, error_2;
|
|
123
|
+
return __generator(this, function (_a) {
|
|
124
|
+
switch (_a.label) {
|
|
125
|
+
case 0:
|
|
126
|
+
setLoadingState('refresh');
|
|
127
|
+
_a.label = 1;
|
|
128
|
+
case 1:
|
|
129
|
+
_a.trys.push([1, 4, , 5]);
|
|
130
|
+
trackEvent('Dynamic Flow - Step Refreshed', { status: 'pending' });
|
|
131
|
+
return [4 /*yield*/, triggerActionRequest({ action: action, data: data, etag: etag })];
|
|
132
|
+
case 2:
|
|
133
|
+
response = _a.sent();
|
|
134
|
+
return [4 /*yield*/, handleFetchResponse(response, 'refresh')];
|
|
135
|
+
case 3:
|
|
136
|
+
_a.sent();
|
|
137
|
+
setLoadingState('idle');
|
|
138
|
+
return [3 /*break*/, 5];
|
|
139
|
+
case 4:
|
|
140
|
+
error_2 = _a.sent();
|
|
141
|
+
handleFetchError(error_2, 'Error fetching refresh step');
|
|
142
|
+
return [3 /*break*/, 5];
|
|
143
|
+
case 5: return [2 /*return*/];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}); };
|
|
147
|
+
var fetchExitResult = function (action, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
148
|
+
var response, exitResult, error_3;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
_a.trys.push([0, 3, , 4]);
|
|
153
|
+
return [4 /*yield*/, triggerActionRequest({ action: action, data: data })];
|
|
154
|
+
case 1:
|
|
155
|
+
response = _a.sent();
|
|
156
|
+
return [4 /*yield*/, parseExitResponse(response)];
|
|
157
|
+
case 2:
|
|
158
|
+
exitResult = _a.sent();
|
|
159
|
+
onCloseWithTracking(__assign(__assign({}, exitResult), action.result));
|
|
160
|
+
return [3 /*break*/, 4];
|
|
161
|
+
case 3:
|
|
162
|
+
error_3 = _a.sent();
|
|
163
|
+
handleFetchError(error_3, 'Error fetching exit result');
|
|
164
|
+
return [3 /*break*/, 4];
|
|
165
|
+
case 4: return [2 /*return*/];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}); };
|
|
169
|
+
var debouncedFetchRefresh = useDebouncedRefresh(fetchRefreshStep);
|
|
170
|
+
var onCloseWithTracking = useCallback(function (result) {
|
|
171
|
+
trackEvent('Dynamic Flow - Flow Finished', { result: 'success' });
|
|
172
|
+
onClose(result);
|
|
173
|
+
}, [onClose, trackEvent]);
|
|
174
|
+
useEffect(function () {
|
|
175
|
+
trackEvent('Dynamic Flow - Flow Started', {});
|
|
176
|
+
}, []);
|
|
177
|
+
useEffect(function () {
|
|
178
|
+
if (!initialStep) {
|
|
179
|
+
var action = __assign({ $id: '#initial-step-request', method: 'GET', url: flowUrl }, initialAction);
|
|
180
|
+
void fetchNextStep(action, action.data);
|
|
181
|
+
}
|
|
182
|
+
}, [flowUrl, fetcher, locale, JSON.stringify(initialStep), JSON.stringify(initialAction)]);
|
|
183
|
+
var handleFetchResponse = function (response, fetchType) { return __awaiter(void 0, void 0, void 0, function () {
|
|
184
|
+
var parsedResponse, step_1, etag_1, error_4;
|
|
185
|
+
return __generator(this, function (_a) {
|
|
186
|
+
switch (_a.label) {
|
|
187
|
+
case 0:
|
|
188
|
+
if (!response.ok) return [3 /*break*/, 4];
|
|
189
|
+
_a.label = 1;
|
|
190
|
+
case 1:
|
|
191
|
+
_a.trys.push([1, 3, , 4]);
|
|
192
|
+
return [4 /*yield*/, parseFetchResponse(response)];
|
|
193
|
+
case 2:
|
|
194
|
+
parsedResponse = _a.sent();
|
|
195
|
+
switch (parsedResponse.type) {
|
|
196
|
+
case 'action':
|
|
197
|
+
void fetchNextStep(parsedResponse.action, parsedResponse.action.data);
|
|
198
|
+
return [2 /*return*/];
|
|
199
|
+
case 'exit':
|
|
200
|
+
return [2 /*return*/, onCloseWithTracking(parsedResponse.result)];
|
|
201
|
+
case 'step':
|
|
202
|
+
default: {
|
|
203
|
+
step_1 = parsedResponse.step, etag_1 = parsedResponse.etag;
|
|
204
|
+
return [2 /*return*/, fetchType === 'submission'
|
|
205
|
+
? updateStepAfterSubmission(step_1, etag_1)
|
|
206
|
+
: updateStepAfterRefresh(step_1, etag_1)];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return [3 /*break*/, 4];
|
|
210
|
+
case 3:
|
|
211
|
+
error_4 = _a.sent();
|
|
212
|
+
return [2 /*return*/, handleFetchError(error_4, 'Error parsing fetch response')];
|
|
213
|
+
case 4: return [2 /*return*/, handleErrorResponse(response, fetchType)];
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}); };
|
|
217
|
+
var updateStepAfterSubmission = function (newStep, etag) {
|
|
218
|
+
var previousStep = step;
|
|
219
|
+
setStepAndEtag(newStep, etag);
|
|
220
|
+
onStepChange(newStep, previousStep);
|
|
221
|
+
setSubmitted(false);
|
|
222
|
+
setLoadingState('idle');
|
|
223
|
+
trackEvent('Dynamic Flow - Step Started', __assign({ stepId: newStep.key }, newStep === null || newStep === void 0 ? void 0 : newStep.analytics));
|
|
224
|
+
};
|
|
225
|
+
var updateStepAfterRefresh = function (step, etag) {
|
|
226
|
+
setStepAndEtag(step, etag);
|
|
227
|
+
setLoadingState('idle');
|
|
228
|
+
trackEvent('Dynamic Flow - Step Refreshed', { status: 'success' });
|
|
229
|
+
};
|
|
230
|
+
var handleErrorResponse = function (response, fetchType) { return __awaiter(void 0, void 0, void 0, function () {
|
|
231
|
+
var errorBody, action, error_5;
|
|
232
|
+
return __generator(this, function (_a) {
|
|
233
|
+
switch (_a.label) {
|
|
234
|
+
case 0:
|
|
235
|
+
if (response.status === 304) {
|
|
236
|
+
setLoadingState('idle');
|
|
237
|
+
return [2 /*return*/];
|
|
238
|
+
}
|
|
239
|
+
_a.label = 1;
|
|
240
|
+
case 1:
|
|
241
|
+
_a.trys.push([1, 5, , 6]);
|
|
242
|
+
return [4 /*yield*/, parseErrorResponse(response)];
|
|
243
|
+
case 2:
|
|
244
|
+
errorBody = _a.sent();
|
|
245
|
+
if (!errorBody.refreshFormUrl) return [3 /*break*/, 4];
|
|
246
|
+
action = { url: errorBody === null || errorBody === void 0 ? void 0 : errorBody.refreshFormUrl, method: 'POST' };
|
|
247
|
+
return [4 /*yield*/, fetchRefreshStep(action, combineModels(models), etag)];
|
|
248
|
+
case 3:
|
|
249
|
+
_a.sent();
|
|
250
|
+
_a.label = 4;
|
|
251
|
+
case 4:
|
|
252
|
+
if (errorBody.validation) {
|
|
253
|
+
setFormErrors(errorBody.validation);
|
|
254
|
+
}
|
|
255
|
+
if (errorBody.error) {
|
|
256
|
+
setGlobalError(errorBody.error);
|
|
257
|
+
}
|
|
258
|
+
if (!errorBody.refreshFormUrl && !errorBody.validation && !errorBody.error) {
|
|
259
|
+
logError('Invalid response', 'Response body must contain at least one of the following properties: refreshFormUrl, validation, or error.');
|
|
260
|
+
throw errorBody;
|
|
261
|
+
}
|
|
262
|
+
return [3 /*break*/, 6];
|
|
263
|
+
case 5:
|
|
264
|
+
error_5 = _a.sent();
|
|
265
|
+
if (fetchType === 'refresh') {
|
|
266
|
+
trackEvent('Dynamic Flow - Step Refreshed', { status: 'failure' });
|
|
267
|
+
}
|
|
268
|
+
trackEvent('Dynamic Flow - Flow Finished', { status: 'failure' });
|
|
269
|
+
onError(error_5, response.status);
|
|
270
|
+
logError('Invalid response', 'Error response body must be an object.');
|
|
271
|
+
return [3 /*break*/, 6];
|
|
272
|
+
case 6:
|
|
273
|
+
setLoadingState('idle');
|
|
274
|
+
return [2 /*return*/];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}); };
|
|
278
|
+
var handleFetchError = function (error, message) {
|
|
279
|
+
logCritical('Error fetching', message);
|
|
280
|
+
onError(error);
|
|
281
|
+
setLoadingState('idle');
|
|
282
|
+
};
|
|
283
|
+
var onModelChange = function (onModelChangeProps) {
|
|
284
|
+
var model = onModelChangeProps.model, formSchema = onModelChangeProps.formSchema;
|
|
285
|
+
var _a = formSchema.$id, $id = _a === void 0 ? '' : _a;
|
|
286
|
+
setGlobalError(null);
|
|
287
|
+
if (!isObjectModel(model)) {
|
|
288
|
+
// TODO: MC-3224
|
|
289
|
+
logCritical('Invalid model on change', 'onModelChange was called but the model argument is not an object');
|
|
290
|
+
}
|
|
291
|
+
var objectModel = model;
|
|
292
|
+
setSchemaModel($id, objectModel, function (updatedModels) {
|
|
293
|
+
refreshOnChangeIfNeeded(onModelChangeProps, updatedModels);
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
var refreshOnChangeIfNeeded = function (props, updatedModels) {
|
|
297
|
+
var triggerSchema = props.triggerSchema;
|
|
298
|
+
if (shouldTriggerRefresh(props)) {
|
|
299
|
+
var url = triggerSchema.refreshFormUrl || (step === null || step === void 0 ? void 0 : step.refreshFormUrl);
|
|
300
|
+
var action = { url: url, method: 'POST' };
|
|
301
|
+
debouncedFetchRefresh(action, combineModels(updatedModels), etag, triggerSchema);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
var onAction = function (action) { return __awaiter(void 0, void 0, void 0, function () {
|
|
305
|
+
var data, method, exit, url, result, submissionData, extraLoggingProps;
|
|
306
|
+
return __generator(this, function (_a) {
|
|
307
|
+
switch (_a.label) {
|
|
308
|
+
case 0:
|
|
309
|
+
data = action.data, method = action.method, exit = action.exit, url = action.url, result = action.result;
|
|
310
|
+
submissionData = __assign(__assign({}, combineModels(models)), data);
|
|
311
|
+
extraLoggingProps = {
|
|
312
|
+
url: action.url,
|
|
313
|
+
method: action.method,
|
|
314
|
+
currency: submissionData.currency,
|
|
315
|
+
type: submissionData.type
|
|
316
|
+
};
|
|
317
|
+
if (loadingState !== 'idle' || action.disabled) {
|
|
318
|
+
logWarning('Action supressed', loadingState !== 'idle'
|
|
319
|
+
? "onAction was supressed because loadingState is ".concat(loadingState)
|
|
320
|
+
: "onAction was supressed because action is disabled", extraLoggingProps);
|
|
321
|
+
return [2 /*return*/];
|
|
322
|
+
}
|
|
323
|
+
if (!exit) return [3 /*break*/, 3];
|
|
324
|
+
if (!url) return [3 /*break*/, 2];
|
|
325
|
+
return [4 /*yield*/, fetchExitResult(action, submissionData)];
|
|
326
|
+
case 1:
|
|
327
|
+
_a.sent();
|
|
328
|
+
return [2 /*return*/];
|
|
329
|
+
case 2:
|
|
330
|
+
onCloseWithTracking(result);
|
|
331
|
+
return [2 /*return*/];
|
|
332
|
+
case 3:
|
|
333
|
+
if (isSubmissionMethod(method)) {
|
|
334
|
+
setFormErrors(null);
|
|
335
|
+
setSubmitted(true);
|
|
336
|
+
if (modelIsValid) {
|
|
337
|
+
void fetchNextStep(action, submissionData);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
trackEvent('Dynamic Flow - onAction supressed', __assign({ reason: 'invalid model' }, extraLoggingProps));
|
|
341
|
+
}
|
|
342
|
+
return [2 /*return*/];
|
|
343
|
+
}
|
|
344
|
+
void fetchNextStep(action);
|
|
345
|
+
return [2 /*return*/];
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}); };
|
|
349
|
+
return (_jsx(LogProvider, __assign({ flowId: flowId, stepId: step === null || step === void 0 ? void 0 : step.key, onLog: onLog }, { children: _jsx(TrackingContextProvider, __assign({ metadata: analyticsMetadata, onTrackableEvent: onTrackableEvent }, { children: _jsx(DynamicFlowProvider, __assign({ loading: loadingState !== 'idle' }, { children: _jsx(FetcherProvider, __assign({ fetcher: fetcher }, { children: loader !== null ? (loader) : (_jsx(DynamicFlowStep, { step: step, model: combineModels(models), submitted: submitted, globalError: globalError, formErrors: formErrors, stepLayoutOptions: { displayStepTitle: displayStepTitle }, onAction: function (action) {
|
|
350
|
+
void onAction(action);
|
|
351
|
+
}, onModelChange: onModelChange })) })) })) })) })));
|
|
352
|
+
};
|
|
353
|
+
var DynamicFlow = function (props) { return (_jsx(ErrorBoundary, __assign({ onError: props.onError }, { children: _jsx(DynamicFlowComponent, __assign({}, props)) }))); };
|
|
354
|
+
export default DynamicFlow;
|
|
355
|
+
var combineModels = function (formModels) {
|
|
356
|
+
return Object.values(formModels).reduce(function (previous, model) { return (__assign(__assign({}, previous), model)); }, {});
|
|
357
|
+
};
|
|
358
|
+
var isSubmissionMethod = function (method) {
|
|
359
|
+
if (method === void 0) { method = 'POST'; }
|
|
360
|
+
var submissionMethods = ['POST', 'PUT', 'PATCH'];
|
|
361
|
+
return submissionMethods.includes(method.toUpperCase());
|
|
362
|
+
};
|
|
363
|
+
var shouldTriggerRefresh = function (props) {
|
|
364
|
+
var type = props.type, triggerSchema = props.triggerSchema, triggerModel = props.triggerModel, _a = props.lastTriggerModel, lastTriggerModel = _a === void 0 ? null : _a;
|
|
365
|
+
var isValid = function () { return isValidSchema(triggerModel, triggerSchema); };
|
|
366
|
+
var wasValid = function () { return isValidSchema(lastTriggerModel, triggerSchema); };
|
|
367
|
+
return type !== 'init' && (triggerSchema === null || triggerSchema === void 0 ? void 0 : triggerSchema.refreshFormOnChange) && (isValid() || wasValid());
|
|
368
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GlobalError, Step } from '../dynamic-flow-types';
|
|
3
|
+
import { LayoutStepProps } from '../step/layoutStep/LayoutStep';
|
|
4
|
+
type DynamicFlowStepProps = Omit<LayoutStepProps, 'stepSpecification'> & {
|
|
5
|
+
step: Step | undefined;
|
|
6
|
+
globalError: GlobalError;
|
|
7
|
+
};
|
|
8
|
+
export declare const DynamicFlowStep: (props: DynamicFlowStepProps) => JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { getStepType } from '../common/stepTypes/stepTypes';
|
|
14
|
+
import DynamicAlert from '../layout/alert';
|
|
15
|
+
import { CameraStep, LayoutStep, ExternalConfirmationStep } from '../step';
|
|
16
|
+
import { useExternal } from '../step/features';
|
|
17
|
+
export var DynamicFlowStep = function (props) {
|
|
18
|
+
var _a;
|
|
19
|
+
var step = props.step, globalError = props.globalError;
|
|
20
|
+
var externalUrl = (_a = step === null || step === void 0 ? void 0 : step.external) === null || _a === void 0 ? void 0 : _a.url;
|
|
21
|
+
var _b = useExternal(externalUrl), requiresManualTrigger = _b.requiresManualTrigger, dismissConfirmation = _b.dismissConfirmation;
|
|
22
|
+
if (step === undefined) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
if (externalUrl && requiresManualTrigger) {
|
|
26
|
+
return _jsx(ExternalConfirmationStep, { url: externalUrl, onClose: dismissConfirmation });
|
|
27
|
+
}
|
|
28
|
+
if (getStepType(step) === 'camera') {
|
|
29
|
+
return _jsx(CameraStep, __assign({}, props, { step: step }));
|
|
30
|
+
}
|
|
31
|
+
return (_jsxs(_Fragment, { children: [globalError ? (_jsx(DynamicAlert, { component: { context: 'negative', markdown: globalError, margin: 'lg' } })) : null, _jsx(LayoutStep, __assign({}, props, { stepSpecification: step }))] }));
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
onError?: (error: Error) => void;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
type State = {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
isFatalError: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
11
|
+
constructor(props: Props);
|
|
12
|
+
static getDerivedStateFromError(): {
|
|
13
|
+
hasError: boolean;
|
|
14
|
+
isFatalError: boolean;
|
|
15
|
+
};
|
|
16
|
+
componentDidCatch(error: Error): void;
|
|
17
|
+
handleErrorReset: () => void;
|
|
18
|
+
render(): JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { Component } from 'react';
|
|
18
|
+
import { ErrorBoundaryAlert } from './ErrorBoundaryAlert';
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
20
|
+
var noop = function () { };
|
|
21
|
+
var ErrorBoundary = /** @class */ (function (_super) {
|
|
22
|
+
__extends(ErrorBoundary, _super);
|
|
23
|
+
function ErrorBoundary(props) {
|
|
24
|
+
var _this = _super.call(this, props) || this;
|
|
25
|
+
_this.handleErrorReset = function () {
|
|
26
|
+
_this.setState({ hasError: false, isFatalError: false });
|
|
27
|
+
};
|
|
28
|
+
_this.state = { hasError: false, isFatalError: false };
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
ErrorBoundary.getDerivedStateFromError = function () {
|
|
32
|
+
return { hasError: true, isFatalError: true };
|
|
33
|
+
};
|
|
34
|
+
ErrorBoundary.prototype.componentDidCatch = function (error) {
|
|
35
|
+
var _a = this.props.onError, onError = _a === void 0 ? noop : _a;
|
|
36
|
+
onError(error);
|
|
37
|
+
};
|
|
38
|
+
ErrorBoundary.prototype.render = function () {
|
|
39
|
+
var children = this.props.children;
|
|
40
|
+
var _a = this.state, hasError = _a.hasError, isFatalError = _a.isFatalError;
|
|
41
|
+
return (_jsxs(_Fragment, { children: [hasError && _jsx(ErrorBoundaryAlert, { onDismiss: this.handleErrorReset }), !isFatalError && children] }));
|
|
42
|
+
};
|
|
43
|
+
return ErrorBoundary;
|
|
44
|
+
}(Component));
|
|
45
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export default defineMessages({
|
|
3
|
+
errorAlert: {
|
|
4
|
+
id: 'dynamicFlows.ErrorBoundary.errorAlert',
|
|
5
|
+
defaultMessage: 'Oops. Something went wrong...',
|
|
6
|
+
description: 'Generic error message for when something has gone wrong'
|
|
7
|
+
},
|
|
8
|
+
retry: {
|
|
9
|
+
id: 'dynamicFlows.ErrorBoundary.retry',
|
|
10
|
+
defaultMessage: 'Retry',
|
|
11
|
+
description: 'Retry'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, Sentiment } from '@transferwise/components';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import messages from './ErrorBoundary.messages';
|
|
5
|
+
export var ErrorBoundaryAlert = function (_a) {
|
|
6
|
+
var onDismiss = _a.onDismiss;
|
|
7
|
+
var formatMessage = useIntl().formatMessage;
|
|
8
|
+
return (_jsx(Alert, { action: {
|
|
9
|
+
text: formatMessage(messages.retry),
|
|
10
|
+
href: window.location.href
|
|
11
|
+
}, message: formatMessage(messages.errorAlert), type: Sentiment.NEGATIVE, className: "m-b-3", onDismiss: onDismiss }));
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ErrorBoundary';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ErrorBoundary';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var step = {
|
|
2
|
+
type: 'form',
|
|
3
|
+
key: 'Components/Alert',
|
|
4
|
+
title: 'Alert Component',
|
|
5
|
+
description: 'Alerts can have different contexts.',
|
|
6
|
+
actions: [],
|
|
7
|
+
schemas: [],
|
|
8
|
+
layout: [
|
|
9
|
+
{
|
|
10
|
+
type: 'alert',
|
|
11
|
+
markdown: 'This is an alert with "neutral" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.',
|
|
12
|
+
context: 'neutral'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: 'alert',
|
|
16
|
+
markdown: 'This is an alert with "warning" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.',
|
|
17
|
+
context: 'warning'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: 'alert',
|
|
21
|
+
markdown: 'This is an alert with "positive" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.',
|
|
22
|
+
context: 'positive'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'alert',
|
|
26
|
+
markdown: 'This is an alert with "negative" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.',
|
|
27
|
+
context: 'negative'
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
export default step;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var step = {
|
|
2
|
+
type: 'form',
|
|
3
|
+
key: 'Components/Box',
|
|
4
|
+
title: 'Box Component',
|
|
5
|
+
description: 'Box is a container for other layour components. It can have a border!',
|
|
6
|
+
actions: [],
|
|
7
|
+
schemas: [],
|
|
8
|
+
layout: ['xs', 'sm', 'md', 'lg', 'xl'].map(function (size) { return ({
|
|
9
|
+
type: 'box',
|
|
10
|
+
width: size,
|
|
11
|
+
border: true,
|
|
12
|
+
components: [
|
|
13
|
+
{
|
|
14
|
+
type: 'paragraph',
|
|
15
|
+
text: "This paragraph is inside a box with border: \"true\" and width: \"".concat(size, "\".")
|
|
16
|
+
},
|
|
17
|
+
]
|
|
18
|
+
}); })
|
|
19
|
+
};
|
|
20
|
+
export default step;
|