@wise/dynamic-flow-client 3.2.0 → 3.2.2-custom-e64cb8de5166ee01f8e91273b3cf3e79f050cd72
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/errorBoundary/ErrorBoundary.js +44 -0
- package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
- package/build/common/httpClientContext/HttpClientContext.js +35 -0
- package/build/common/httpClientContext/index.js +1 -0
- package/build/common/makeHttpClient/index.js +1 -0
- package/build/common/makeHttpClient/makeHttpClient.js +34 -0
- package/build/common/makeHttpClient/makeHttpClient.spec.js +141 -0
- package/build/common/messages/generic-error.messages.js +18 -0
- package/build/common/messages/help.messages.js +8 -0
- package/build/common/messages/multi-file-upload.messages.js +18 -0
- package/build/common/messages/paragraph.messages.js +13 -0
- package/build/common/messages/repeatable.messages.js +23 -0
- package/build/common/messages/validation.array.messages.js +13 -0
- package/build/common/messages/validation.messages.js +53 -0
- package/build/common/utils/api-utils.js +4 -0
- package/build/i18n/index.js +36 -0
- package/build/index.js +10 -0
- package/build/legacy/common/constants/DateMode.js +4 -0
- package/build/legacy/common/constants/FeatureName.js +4 -0
- package/build/legacy/common/constants/FormControlType.js +21 -0
- package/build/legacy/common/constants/MonthFormat.js +4 -0
- package/build/legacy/common/constants/Size.js +7 -0
- package/build/legacy/common/constants/index.js +4 -0
- package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +36 -0
- package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +13 -0
- package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
- package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +58 -0
- package/build/legacy/common/contexts/featureContext/FeatureContext.js +22 -0
- package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +41 -0
- package/build/legacy/common/contexts/index.js +3 -0
- package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
- package/build/legacy/common/contexts/logContext/LogContext.spec.js +54 -0
- package/build/legacy/common/hooks/index.js +7 -0
- package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
- package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
- package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
- package/build/legacy/common/hooks/useExternal/useExternal.spec.js +226 -0
- package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +70 -0
- package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
- package/build/legacy/common/hooks/usePolling/usePolling.js +51 -0
- package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +43 -0
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
- package/build/legacy/common/messages.js +8 -0
- package/build/legacy/common/utils/api-utils.js +6 -0
- package/build/legacy/common/utils/date-utils.js +22 -0
- package/build/legacy/common/utils/debounce.js +38 -0
- package/build/legacy/common/utils/debounce.spec.js +72 -0
- package/build/legacy/common/utils/file-utils.js +45 -0
- package/build/legacy/common/utils/file-utils.spec.js +69 -0
- package/build/legacy/common/utils/id-utils.js +5 -0
- package/build/legacy/common/utils/id-utils.spec.js +12 -0
- package/build/legacy/common/utils/index.js +11 -0
- package/build/legacy/common/utils/is-equal.js +21 -0
- package/build/legacy/common/utils/is-equal.spec.js +88 -0
- package/build/legacy/common/utils/misc-utils.js +4 -0
- package/build/legacy/common/utils/mobile-utils.js +23 -0
- package/build/legacy/common/utils/mobile-utils.spec.js +71 -0
- package/build/legacy/common/utils/model-utils.js +33 -0
- package/build/legacy/common/utils/schema-utils.js +97 -0
- package/build/legacy/common/utils/step-utils.js +32 -0
- package/build/legacy/common/validators/index.js +5 -0
- package/build/legacy/common/validators/models/model-utils.js +119 -0
- package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
- package/build/legacy/common/validators/models/model-validators.js +62 -0
- package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
- package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
- package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
- package/build/legacy/common/validators/types/type-validators.js +14 -0
- package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
- package/build/legacy/common/validators/values/value-validators.js +6 -0
- package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
- package/build/legacy/dynamic-flow-types.js +1 -0
- package/build/legacy/dynamicFlow/BackButton.js +22 -0
- package/build/legacy/dynamicFlow/DynamicFlow.js +346 -0
- package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
- package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
- package/build/legacy/dynamicFlow/index.js +1 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +25 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +32 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +114 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
- package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
- package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
- package/build/legacy/dynamicFlow/stories/visual-tests/VisualTests.story.js +43 -0
- package/build/legacy/dynamicFlow/tests/Actions.spec.js +185 -0
- package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
- package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
- package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
- package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
- package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
- package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
- package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
- package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
- package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
- package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
- package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +273 -0
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +567 -0
- package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
- package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
- package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
- package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
- package/build/legacy/dynamicFlow/utils/index.js +5 -0
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
- package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +26 -0
- package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
- package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
- package/build/legacy/formControl/FormControl.js +268 -0
- package/build/legacy/formControl/Select.spec.js +104 -0
- package/build/legacy/formControl/index.js +1 -0
- package/build/legacy/formControl/utils/getAutocompleteString.js +73 -0
- package/build/legacy/formControl/utils/getAutocompleteString.spec.js +20 -0
- package/build/legacy/formControl/utils/index.js +2 -0
- package/build/legacy/formControl/utils/value-utils.js +108 -0
- package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +563 -0
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
- package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
- package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +30 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +111 -0
- package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +86 -0
- package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
- package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/help/Help.js +20 -0
- package/build/legacy/jsonSchemaForm/help/index.js +1 -0
- package/build/legacy/jsonSchemaForm/index.js +1 -0
- package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
- package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
- package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +27 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +133 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +231 -0
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
- package/build/legacy/layout/DynamicLayout.js +68 -0
- package/build/legacy/layout/alert/DynamicAlert.js +29 -0
- package/build/legacy/layout/box/DynamicBox.js +41 -0
- package/build/legacy/layout/button/DynamicButton.js +27 -0
- package/build/legacy/layout/button/DynamicButton.spec.js +152 -0
- package/build/legacy/layout/button/utils.js +45 -0
- package/build/legacy/layout/button/utils.spec.js +50 -0
- package/build/legacy/layout/columns/DynamicColumns.js +38 -0
- package/build/legacy/layout/decision/DynamicDecision.js +21 -0
- package/build/legacy/layout/divider/DynamicDivider.js +9 -0
- package/build/legacy/layout/external/DynamicExternal.js +32 -0
- package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
- package/build/legacy/layout/form/DynamicForm.js +22 -0
- package/build/legacy/layout/heading/DynamicHeading.js +51 -0
- package/build/legacy/layout/icon/DynamicIcon.js +17 -0
- package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
- package/build/legacy/layout/icon/FlagIcon.js +198 -0
- package/build/legacy/layout/icon/NamedIcon.js +19 -0
- package/build/legacy/layout/image/DynamicImage.js +111 -0
- package/build/legacy/layout/index.js +20 -0
- package/build/legacy/layout/instructions/DynamicInstructions.js +30 -0
- package/build/legacy/layout/list/DynamicStatusList.js +37 -0
- package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
- package/build/legacy/layout/markdown/DynamicMarkdown.js +23 -0
- package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
- package/build/legacy/layout/modal/DynamicModal.js +26 -0
- package/build/legacy/layout/paragraph/DynamicParagraph.js +46 -0
- package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
- package/build/legacy/layout/review/DynamicReview.js +58 -0
- package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
- package/build/legacy/layout/search/DynamicSearch.js +58 -0
- package/build/legacy/layout/search/SearchInput.js +17 -0
- package/build/legacy/layout/search/SearchResults.js +31 -0
- package/build/legacy/layout/search/useSearch.js +137 -0
- package/build/legacy/layout/utils/getNavigationOptionMedia.js +28 -0
- package/build/legacy/layout/utils/index.js +32 -0
- package/build/legacy/step/cameraStep/CameraStep.js +124 -0
- package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.js +161 -0
- package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.js +58 -0
- package/build/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.js +28 -0
- package/build/legacy/step/cameraStep/cameraCapture/components/index.js +3 -0
- package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +19 -0
- package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
- package/build/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.js +60 -0
- package/build/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.js +80 -0
- package/build/legacy/step/cameraStep/cameraCapture/index.js +1 -0
- package/build/legacy/step/cameraStep/cameraCapture/overlay/Overlay.js +77 -0
- package/build/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +18 -0
- package/build/legacy/step/cameraStep/cameraCapture/screens/index.js +1 -0
- package/build/legacy/step/cameraStep/cameraCapture/tracking/index.js +109 -0
- package/build/legacy/step/cameraStep/cameraCapture/types/index.js +7 -0
- package/build/legacy/step/cameraStep/cameraCapture/utils/index.js +107 -0
- package/build/legacy/step/cameraStep/index.js +1 -0
- package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
- package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +23 -0
- package/build/legacy/step/externalConfirmationStep/index.js +1 -0
- package/build/legacy/step/index.js +3 -0
- package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
- package/build/legacy/step/layoutStep/index.js +1 -0
- package/build/legacy/step/layoutStep/utils/index.js +2 -0
- package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
- package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
- package/build/legacy/test-utils/DynamicFlowProviders.js +19 -0
- package/build/legacy/test-utils/index.js +4 -0
- package/build/legacy/test-utils/legacy-utils.js +69 -0
- package/build/legacy/test-utils/log-utils.js +9 -0
- package/build/main.js +1 -432
- package/build/main.min.js +1 -1
- package/build/main.mjs +3 -441
- package/build/revamp/DynamicFlowCore.js +259 -0
- package/build/revamp/DynamicFlowWise.js +69 -0
- package/build/revamp/domain/components/AlertComponent.js +50 -0
- package/build/revamp/domain/components/AllOfComponent.js +72 -0
- package/build/revamp/domain/components/BooleanInputComponent.js +108 -0
- package/build/revamp/domain/components/BoxComponent.js +65 -0
- package/build/revamp/domain/components/ButtonComponent.js +50 -0
- package/build/revamp/domain/components/ColumnsComponent.js +74 -0
- package/build/revamp/domain/components/ConstComponent.js +50 -0
- package/build/revamp/domain/components/ContainerComponent.js +65 -0
- package/build/revamp/domain/components/DateInputComponent.js +127 -0
- package/build/revamp/domain/components/DecisionComponent.js +50 -0
- package/build/revamp/domain/components/DividerComponent.js +50 -0
- package/build/revamp/domain/components/FormComponent.js +65 -0
- package/build/revamp/domain/components/HeadingComponent.js +50 -0
- package/build/revamp/domain/components/ImageComponent.js +50 -0
- package/build/revamp/domain/components/InstructionsComponent.js +50 -0
- package/build/revamp/domain/components/IntegerInputComponent.js +125 -0
- package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
- package/build/revamp/domain/components/MarkdownComponent.js +50 -0
- package/build/revamp/domain/components/ModalComponent.js +65 -0
- package/build/revamp/domain/components/MultiUploadInputComponent.js +190 -0
- package/build/revamp/domain/components/NumberInputComponent.js +125 -0
- package/build/revamp/domain/components/ObjectComponent.js +104 -0
- package/build/revamp/domain/components/ParagraphComponent.js +50 -0
- package/build/revamp/domain/components/ReviewComponent.js +50 -0
- package/build/revamp/domain/components/SelectInputComponent.js +138 -0
- package/build/revamp/domain/components/StatusListComponent.js +50 -0
- package/build/revamp/domain/components/StepDomainComponent.js +72 -0
- package/build/revamp/domain/components/TextInputComponent.js +125 -0
- package/build/revamp/domain/components/UploadInputComponent.js +151 -0
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +148 -0
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +145 -0
- package/build/revamp/domain/components/searchComponent/SearchComponent.js +108 -0
- package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
- package/build/revamp/domain/components/utils/component-utils.js +18 -0
- package/build/revamp/domain/components/utils/debounce.js +38 -0
- package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
- package/build/revamp/domain/components/utils/file-utils.js +46 -0
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +38 -0
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +108 -0
- package/build/revamp/domain/features/events/getAnalyticsEventDispatcher.js +25 -0
- package/build/revamp/domain/features/events/getLogggingEventDispatcher.js +11 -0
- package/build/revamp/domain/features/events/index.js +2 -0
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +133 -0
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +199 -0
- package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
- package/build/revamp/domain/features/refresh/getPerformRefresh.js +53 -0
- package/build/revamp/domain/features/search/getPerformSearchFunction.js +104 -0
- package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
- package/build/revamp/domain/features/summary/summary-utils.js +39 -0
- package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
- package/build/revamp/domain/features/utils/http-utils.js +34 -0
- package/build/revamp/domain/features/utils/response-utils.js +9 -0
- package/build/revamp/domain/features/validation/spec-utils.js +16 -0
- package/build/revamp/domain/features/validation/validation-functions.js +12 -0
- package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
- package/build/revamp/domain/features/validation/value-checks.js +111 -0
- package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +94 -0
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +177 -0
- package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
- package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
- package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +64 -0
- package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
- package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +36 -0
- package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
- package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +26 -0
- package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
- package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
- package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
- package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
- package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
- package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
- package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
- package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
- package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
- package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
- package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
- package/build/revamp/domain/mappers/mapStepToComponent.js +57 -0
- package/build/revamp/domain/mappers/mapStepToComponent.spec.js +177 -0
- package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +35 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +63 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +65 -0
- package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
- package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
- package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
- package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
- package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +41 -0
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +32 -0
- package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
- package/build/revamp/domain/mappers/schema/types.js +1 -0
- package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
- package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
- package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
- package/build/revamp/domain/mappers/types.js +1 -0
- package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
- package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
- package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
- package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
- package/build/revamp/domain/types.js +1 -0
- package/build/revamp/flow/executeRefresh.js +97 -0
- package/build/revamp/flow/executeSubmission.js +152 -0
- package/build/revamp/flow/getResponseType.js +76 -0
- package/build/revamp/flow/response-utils.js +88 -0
- package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
- package/build/revamp/renderers/LoadingContext.js +7 -0
- package/build/revamp/renderers/StepRenderer.js +23 -0
- package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
- package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
- package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/componentToRendererProps.js +105 -0
- package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
- package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
- package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
- package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
- package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/searchComponentToProps.js +49 -0
- package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
- package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
- package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
- package/build/revamp/renderers/stepComponentToProps.js +8 -0
- package/build/revamp/renderers/types.js +1 -0
- package/build/revamp/step/Step.js +162 -0
- package/build/revamp/step/utils/getRenderFunction.js +55 -0
- package/build/revamp/step/utils/getSchemaErrorMessageFunction.js +90 -0
- package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
- package/build/revamp/test-utils/component-utils.js +19 -0
- package/build/revamp/test-utils/step-utils.js +6 -0
- package/build/revamp/types.js +1 -0
- package/build/revamp/utils/component-utils.js +86 -0
- package/build/revamp/utils/component-utils.spec.js +385 -0
- package/build/revamp/utils/findComponent.js +29 -0
- package/build/revamp/utils/findComponent.spec.js +92 -0
- package/build/revamp/utils/type-utils.js +56 -0
- package/build/revamp/utils/type-validators.js +16 -0
- package/build/revamp/utils/type-validators.spec.js +163 -0
- package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
- package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
- package/build/revamp/wise/renderers/BoxRenderer.js +30 -0
- package/build/revamp/wise/renderers/ButtonRenderer.js +64 -0
- package/build/revamp/wise/renderers/ColumnsRenderer.js +25 -0
- package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
- package/build/revamp/wise/renderers/DecisionRenderer.js +29 -0
- package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
- package/build/revamp/wise/renderers/FormRenderer.js +21 -0
- package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
- package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
- package/build/revamp/wise/renderers/ImageRenderer.js +111 -0
- package/build/revamp/wise/renderers/InstructionsRenderer.js +34 -0
- package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
- package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
- package/build/revamp/wise/renderers/MarkdownRenderer.js +22 -0
- package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
- package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +74 -0
- package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
- package/build/revamp/wise/renderers/ParagraphRenderer.js +44 -0
- package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
- package/build/revamp/wise/renderers/ReviewRenderer.js +46 -0
- package/build/revamp/wise/renderers/SearchRenderer.js +63 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +27 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +25 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +30 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +27 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +33 -0
- package/build/revamp/wise/renderers/StatusListRenderer.js +32 -0
- package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
- package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
- package/build/revamp/wise/renderers/components/FieldInput.js +20 -0
- package/build/revamp/wise/renderers/components/Help.js +21 -0
- package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
- package/build/revamp/wise/renderers/components/UploadFieldInput.js +25 -0
- package/build/revamp/wise/renderers/components/VariableDateInput.js +30 -0
- package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
- package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
- package/build/revamp/wise/renderers/components/icon/FlagIcon.js +198 -0
- package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
- package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +31 -0
- package/build/revamp/wise/renderers/getWiseRenderers.js +57 -0
- package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
- package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
- package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
- package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
- package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
- package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
- package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
- package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
- package/build/test-utils/NeptuneProviders.js +23 -0
- package/build/test-utils/fetch-utils.js +104 -0
- package/build/test-utils/index.js +2 -0
- package/build/test-utils/rtl-utils.js +20 -0
- package/package.json +1 -1
package/build/main.mjs
CHANGED
|
@@ -21,13 +21,6 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
25
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
26
|
-
}) : x)(function(x) {
|
|
27
|
-
if (typeof require !== "undefined")
|
|
28
|
-
return require.apply(this, arguments);
|
|
29
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
30
|
-
});
|
|
31
24
|
var __restKey = (key) => typeof key === "symbol" ? key : key + "";
|
|
32
25
|
var __objRest = (source, exclude) => {
|
|
33
26
|
var target = {};
|
|
@@ -44,7 +37,7 @@ var __objRest = (source, exclude) => {
|
|
|
44
37
|
var __esm = (fn, res) => function __init() {
|
|
45
38
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
46
39
|
};
|
|
47
|
-
var __commonJS = (cb, mod) => function
|
|
40
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
48
41
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
49
42
|
};
|
|
50
43
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -271,437 +264,6 @@ var init_index_d9418379_esm = __esm({
|
|
|
271
264
|
}
|
|
272
265
|
});
|
|
273
266
|
|
|
274
|
-
// ../../node_modules/.pnpm/react-webcam@7.2.0_react-dom@18.2.0_react@18.2.0/node_modules/react-webcam/dist/react-webcam.js
|
|
275
|
-
var require_react_webcam = __commonJS({
|
|
276
|
-
"../../node_modules/.pnpm/react-webcam@7.2.0_react-dom@18.2.0_react@18.2.0/node_modules/react-webcam/dist/react-webcam.js"(exports, module) {
|
|
277
|
-
"use strict";
|
|
278
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
279
|
-
if (typeof exports === "object" && typeof module === "object")
|
|
280
|
-
module.exports = factory(__require("react"));
|
|
281
|
-
else if (typeof define === "function" && define.amd)
|
|
282
|
-
define(["react"], factory);
|
|
283
|
-
else if (typeof exports === "object")
|
|
284
|
-
exports["Webcam"] = factory(__require("react"));
|
|
285
|
-
else
|
|
286
|
-
root["Webcam"] = factory(root["React"]);
|
|
287
|
-
})(exports, function(__WEBPACK_EXTERNAL_MODULE_react__) {
|
|
288
|
-
return (
|
|
289
|
-
/******/
|
|
290
|
-
function(modules) {
|
|
291
|
-
var installedModules = {};
|
|
292
|
-
function __webpack_require__(moduleId) {
|
|
293
|
-
if (installedModules[moduleId]) {
|
|
294
|
-
return installedModules[moduleId].exports;
|
|
295
|
-
}
|
|
296
|
-
var module2 = installedModules[moduleId] = {
|
|
297
|
-
/******/
|
|
298
|
-
i: moduleId,
|
|
299
|
-
/******/
|
|
300
|
-
l: false,
|
|
301
|
-
/******/
|
|
302
|
-
exports: {}
|
|
303
|
-
/******/
|
|
304
|
-
};
|
|
305
|
-
modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
|
|
306
|
-
module2.l = true;
|
|
307
|
-
return module2.exports;
|
|
308
|
-
}
|
|
309
|
-
__webpack_require__.m = modules;
|
|
310
|
-
__webpack_require__.c = installedModules;
|
|
311
|
-
__webpack_require__.d = function(exports2, name, getter) {
|
|
312
|
-
if (!__webpack_require__.o(exports2, name)) {
|
|
313
|
-
Object.defineProperty(exports2, name, { enumerable: true, get: getter });
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
__webpack_require__.r = function(exports2) {
|
|
317
|
-
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
318
|
-
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
319
|
-
}
|
|
320
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
321
|
-
};
|
|
322
|
-
__webpack_require__.t = function(value, mode) {
|
|
323
|
-
if (mode & 1)
|
|
324
|
-
value = __webpack_require__(value);
|
|
325
|
-
if (mode & 8)
|
|
326
|
-
return value;
|
|
327
|
-
if (mode & 4 && typeof value === "object" && value && value.__esModule)
|
|
328
|
-
return value;
|
|
329
|
-
var ns = /* @__PURE__ */ Object.create(null);
|
|
330
|
-
__webpack_require__.r(ns);
|
|
331
|
-
Object.defineProperty(ns, "default", { enumerable: true, value });
|
|
332
|
-
if (mode & 2 && typeof value != "string")
|
|
333
|
-
for (var key in value)
|
|
334
|
-
__webpack_require__.d(ns, key, function(key2) {
|
|
335
|
-
return value[key2];
|
|
336
|
-
}.bind(null, key));
|
|
337
|
-
return ns;
|
|
338
|
-
};
|
|
339
|
-
__webpack_require__.n = function(module2) {
|
|
340
|
-
var getter = module2 && module2.__esModule ? (
|
|
341
|
-
/******/
|
|
342
|
-
function getDefault() {
|
|
343
|
-
return module2["default"];
|
|
344
|
-
}
|
|
345
|
-
) : (
|
|
346
|
-
/******/
|
|
347
|
-
function getModuleExports() {
|
|
348
|
-
return module2;
|
|
349
|
-
}
|
|
350
|
-
);
|
|
351
|
-
__webpack_require__.d(getter, "a", getter);
|
|
352
|
-
return getter;
|
|
353
|
-
};
|
|
354
|
-
__webpack_require__.o = function(object, property) {
|
|
355
|
-
return Object.prototype.hasOwnProperty.call(object, property);
|
|
356
|
-
};
|
|
357
|
-
__webpack_require__.p = "";
|
|
358
|
-
return __webpack_require__(__webpack_require__.s = "./src/react-webcam.tsx");
|
|
359
|
-
}({
|
|
360
|
-
/***/
|
|
361
|
-
"./src/react-webcam.tsx": (
|
|
362
|
-
/*!******************************!*\
|
|
363
|
-
!*** ./src/react-webcam.tsx ***!
|
|
364
|
-
\******************************/
|
|
365
|
-
/*! exports provided: default */
|
|
366
|
-
/***/
|
|
367
|
-
function(module2, __webpack_exports__, __webpack_require__) {
|
|
368
|
-
"use strict";
|
|
369
|
-
__webpack_require__.r(__webpack_exports__);
|
|
370
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
371
|
-
/*! react */
|
|
372
|
-
"react"
|
|
373
|
-
);
|
|
374
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /* @__PURE__ */ __webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
375
|
-
var __extends = /* @__PURE__ */ function() {
|
|
376
|
-
var extendStatics = function(d, b) {
|
|
377
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
378
|
-
d2.__proto__ = b2;
|
|
379
|
-
} || function(d2, b2) {
|
|
380
|
-
for (var p in b2)
|
|
381
|
-
if (b2.hasOwnProperty(p))
|
|
382
|
-
d2[p] = b2[p];
|
|
383
|
-
};
|
|
384
|
-
return extendStatics(d, b);
|
|
385
|
-
};
|
|
386
|
-
return function(d, b) {
|
|
387
|
-
extendStatics(d, b);
|
|
388
|
-
function __() {
|
|
389
|
-
this.constructor = d;
|
|
390
|
-
}
|
|
391
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
392
|
-
};
|
|
393
|
-
}();
|
|
394
|
-
var __assign = function() {
|
|
395
|
-
__assign = Object.assign || function(t) {
|
|
396
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
397
|
-
s = arguments[i];
|
|
398
|
-
for (var p in s)
|
|
399
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
400
|
-
t[p] = s[p];
|
|
401
|
-
}
|
|
402
|
-
return t;
|
|
403
|
-
};
|
|
404
|
-
return __assign.apply(this, arguments);
|
|
405
|
-
};
|
|
406
|
-
var __rest = function(s, e) {
|
|
407
|
-
var t = {};
|
|
408
|
-
for (var p in s)
|
|
409
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
410
|
-
t[p] = s[p];
|
|
411
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
412
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
413
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
414
|
-
t[p[i]] = s[p[i]];
|
|
415
|
-
}
|
|
416
|
-
return t;
|
|
417
|
-
};
|
|
418
|
-
(function polyfillGetUserMedia() {
|
|
419
|
-
if (typeof window === "undefined") {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
if (navigator.mediaDevices === void 0) {
|
|
423
|
-
navigator.mediaDevices = {};
|
|
424
|
-
}
|
|
425
|
-
if (navigator.mediaDevices.getUserMedia === void 0) {
|
|
426
|
-
navigator.mediaDevices.getUserMedia = function(constraints) {
|
|
427
|
-
var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
|
428
|
-
if (!getUserMedia) {
|
|
429
|
-
return Promise.reject(new Error("getUserMedia is not implemented in this browser"));
|
|
430
|
-
}
|
|
431
|
-
return new Promise(function(resolve, reject) {
|
|
432
|
-
getUserMedia.call(navigator, constraints, resolve, reject);
|
|
433
|
-
});
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
})();
|
|
437
|
-
function hasGetUserMedia() {
|
|
438
|
-
return !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia);
|
|
439
|
-
}
|
|
440
|
-
var Webcam2 = (
|
|
441
|
-
/** @class */
|
|
442
|
-
function(_super) {
|
|
443
|
-
__extends(Webcam3, _super);
|
|
444
|
-
function Webcam3(props) {
|
|
445
|
-
var _this = _super.call(this, props) || this;
|
|
446
|
-
_this.canvas = null;
|
|
447
|
-
_this.ctx = null;
|
|
448
|
-
_this.requestUserMediaId = 0;
|
|
449
|
-
_this.unmounted = false;
|
|
450
|
-
_this.state = {
|
|
451
|
-
hasUserMedia: false
|
|
452
|
-
};
|
|
453
|
-
return _this;
|
|
454
|
-
}
|
|
455
|
-
Webcam3.prototype.componentDidMount = function() {
|
|
456
|
-
var _a = this, state = _a.state, props = _a.props;
|
|
457
|
-
this.unmounted = false;
|
|
458
|
-
if (!hasGetUserMedia()) {
|
|
459
|
-
props.onUserMediaError("getUserMedia not supported");
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
if (!state.hasUserMedia) {
|
|
463
|
-
this.requestUserMedia();
|
|
464
|
-
}
|
|
465
|
-
if (props.children && typeof props.children != "function") {
|
|
466
|
-
console.warn("children must be a function");
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
Webcam3.prototype.componentDidUpdate = function(nextProps) {
|
|
470
|
-
var props = this.props;
|
|
471
|
-
if (!hasGetUserMedia()) {
|
|
472
|
-
props.onUserMediaError("getUserMedia not supported");
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
var audioConstraintsChanged = JSON.stringify(nextProps.audioConstraints) !== JSON.stringify(props.audioConstraints);
|
|
476
|
-
var videoConstraintsChanged = JSON.stringify(nextProps.videoConstraints) !== JSON.stringify(props.videoConstraints);
|
|
477
|
-
var minScreenshotWidthChanged = nextProps.minScreenshotWidth !== props.minScreenshotWidth;
|
|
478
|
-
var minScreenshotHeightChanged = nextProps.minScreenshotHeight !== props.minScreenshotHeight;
|
|
479
|
-
if (videoConstraintsChanged || minScreenshotWidthChanged || minScreenshotHeightChanged) {
|
|
480
|
-
this.canvas = null;
|
|
481
|
-
this.ctx = null;
|
|
482
|
-
}
|
|
483
|
-
if (audioConstraintsChanged || videoConstraintsChanged) {
|
|
484
|
-
this.stopAndCleanup();
|
|
485
|
-
this.requestUserMedia();
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
Webcam3.prototype.componentWillUnmount = function() {
|
|
489
|
-
this.unmounted = true;
|
|
490
|
-
this.stopAndCleanup();
|
|
491
|
-
};
|
|
492
|
-
Webcam3.stopMediaStream = function(stream) {
|
|
493
|
-
if (stream) {
|
|
494
|
-
if (stream.getVideoTracks && stream.getAudioTracks) {
|
|
495
|
-
stream.getVideoTracks().map(function(track) {
|
|
496
|
-
stream.removeTrack(track);
|
|
497
|
-
track.stop();
|
|
498
|
-
});
|
|
499
|
-
stream.getAudioTracks().map(function(track) {
|
|
500
|
-
stream.removeTrack(track);
|
|
501
|
-
track.stop();
|
|
502
|
-
});
|
|
503
|
-
} else {
|
|
504
|
-
stream.stop();
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
Webcam3.prototype.stopAndCleanup = function() {
|
|
509
|
-
var state = this.state;
|
|
510
|
-
if (state.hasUserMedia) {
|
|
511
|
-
Webcam3.stopMediaStream(this.stream);
|
|
512
|
-
if (state.src) {
|
|
513
|
-
window.URL.revokeObjectURL(state.src);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
};
|
|
517
|
-
Webcam3.prototype.getScreenshot = function(screenshotDimensions) {
|
|
518
|
-
var _a = this, state = _a.state, props = _a.props;
|
|
519
|
-
if (!state.hasUserMedia)
|
|
520
|
-
return null;
|
|
521
|
-
var canvas = this.getCanvas(screenshotDimensions);
|
|
522
|
-
return canvas && canvas.toDataURL(props.screenshotFormat, props.screenshotQuality);
|
|
523
|
-
};
|
|
524
|
-
Webcam3.prototype.getCanvas = function(screenshotDimensions) {
|
|
525
|
-
var _a = this, state = _a.state, props = _a.props;
|
|
526
|
-
if (!this.video) {
|
|
527
|
-
return null;
|
|
528
|
-
}
|
|
529
|
-
if (!state.hasUserMedia || !this.video.videoHeight)
|
|
530
|
-
return null;
|
|
531
|
-
if (!this.ctx) {
|
|
532
|
-
var canvasWidth = this.video.videoWidth;
|
|
533
|
-
var canvasHeight = this.video.videoHeight;
|
|
534
|
-
if (!this.props.forceScreenshotSourceSize) {
|
|
535
|
-
var aspectRatio = canvasWidth / canvasHeight;
|
|
536
|
-
canvasWidth = props.minScreenshotWidth || this.video.clientWidth;
|
|
537
|
-
canvasHeight = canvasWidth / aspectRatio;
|
|
538
|
-
if (props.minScreenshotHeight && canvasHeight < props.minScreenshotHeight) {
|
|
539
|
-
canvasHeight = props.minScreenshotHeight;
|
|
540
|
-
canvasWidth = canvasHeight * aspectRatio;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
this.canvas = document.createElement("canvas");
|
|
544
|
-
this.canvas.width = (screenshotDimensions === null || screenshotDimensions === void 0 ? void 0 : screenshotDimensions.width) || canvasWidth;
|
|
545
|
-
this.canvas.height = (screenshotDimensions === null || screenshotDimensions === void 0 ? void 0 : screenshotDimensions.height) || canvasHeight;
|
|
546
|
-
this.ctx = this.canvas.getContext("2d");
|
|
547
|
-
}
|
|
548
|
-
var _b = this, ctx = _b.ctx, canvas = _b.canvas;
|
|
549
|
-
if (ctx && canvas) {
|
|
550
|
-
canvas.width = (screenshotDimensions === null || screenshotDimensions === void 0 ? void 0 : screenshotDimensions.width) || canvas.width;
|
|
551
|
-
canvas.height = (screenshotDimensions === null || screenshotDimensions === void 0 ? void 0 : screenshotDimensions.height) || canvas.height;
|
|
552
|
-
if (props.mirrored) {
|
|
553
|
-
ctx.translate(canvas.width, 0);
|
|
554
|
-
ctx.scale(-1, 1);
|
|
555
|
-
}
|
|
556
|
-
ctx.imageSmoothingEnabled = props.imageSmoothing;
|
|
557
|
-
ctx.drawImage(this.video, 0, 0, (screenshotDimensions === null || screenshotDimensions === void 0 ? void 0 : screenshotDimensions.width) || canvas.width, (screenshotDimensions === null || screenshotDimensions === void 0 ? void 0 : screenshotDimensions.height) || canvas.height);
|
|
558
|
-
if (props.mirrored) {
|
|
559
|
-
ctx.scale(-1, 1);
|
|
560
|
-
ctx.translate(-canvas.width, 0);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
return canvas;
|
|
564
|
-
};
|
|
565
|
-
Webcam3.prototype.requestUserMedia = function() {
|
|
566
|
-
var _this = this;
|
|
567
|
-
var props = this.props;
|
|
568
|
-
var sourceSelected = function(audioConstraints, videoConstraints) {
|
|
569
|
-
var constraints = {
|
|
570
|
-
video: typeof videoConstraints !== "undefined" ? videoConstraints : true
|
|
571
|
-
};
|
|
572
|
-
if (props.audio) {
|
|
573
|
-
constraints.audio = typeof audioConstraints !== "undefined" ? audioConstraints : true;
|
|
574
|
-
}
|
|
575
|
-
_this.requestUserMediaId++;
|
|
576
|
-
var myRequestUserMediaId = _this.requestUserMediaId;
|
|
577
|
-
navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
|
|
578
|
-
if (_this.unmounted || myRequestUserMediaId !== _this.requestUserMediaId) {
|
|
579
|
-
Webcam3.stopMediaStream(stream);
|
|
580
|
-
} else {
|
|
581
|
-
_this.handleUserMedia(null, stream);
|
|
582
|
-
}
|
|
583
|
-
}).catch(function(e) {
|
|
584
|
-
_this.handleUserMedia(e);
|
|
585
|
-
});
|
|
586
|
-
};
|
|
587
|
-
if ("mediaDevices" in navigator) {
|
|
588
|
-
sourceSelected(props.audioConstraints, props.videoConstraints);
|
|
589
|
-
} else {
|
|
590
|
-
var optionalSource_1 = function(id) {
|
|
591
|
-
return { optional: [{ sourceId: id }] };
|
|
592
|
-
};
|
|
593
|
-
var constraintToSourceId_1 = function(constraint) {
|
|
594
|
-
var deviceId = constraint.deviceId;
|
|
595
|
-
if (typeof deviceId === "string") {
|
|
596
|
-
return deviceId;
|
|
597
|
-
}
|
|
598
|
-
if (Array.isArray(deviceId) && deviceId.length > 0) {
|
|
599
|
-
return deviceId[0];
|
|
600
|
-
}
|
|
601
|
-
if (typeof deviceId === "object" && deviceId.ideal) {
|
|
602
|
-
return deviceId.ideal;
|
|
603
|
-
}
|
|
604
|
-
return null;
|
|
605
|
-
};
|
|
606
|
-
MediaStreamTrack.getSources(function(sources) {
|
|
607
|
-
var audioSource = null;
|
|
608
|
-
var videoSource = null;
|
|
609
|
-
sources.forEach(function(source) {
|
|
610
|
-
if (source.kind === "audio") {
|
|
611
|
-
audioSource = source.id;
|
|
612
|
-
} else if (source.kind === "video") {
|
|
613
|
-
videoSource = source.id;
|
|
614
|
-
}
|
|
615
|
-
});
|
|
616
|
-
var audioSourceId = constraintToSourceId_1(props.audioConstraints);
|
|
617
|
-
if (audioSourceId) {
|
|
618
|
-
audioSource = audioSourceId;
|
|
619
|
-
}
|
|
620
|
-
var videoSourceId = constraintToSourceId_1(props.videoConstraints);
|
|
621
|
-
if (videoSourceId) {
|
|
622
|
-
videoSource = videoSourceId;
|
|
623
|
-
}
|
|
624
|
-
sourceSelected(optionalSource_1(audioSource), optionalSource_1(videoSource));
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
};
|
|
628
|
-
Webcam3.prototype.handleUserMedia = function(err, stream) {
|
|
629
|
-
var props = this.props;
|
|
630
|
-
if (err || !stream) {
|
|
631
|
-
this.setState({ hasUserMedia: false });
|
|
632
|
-
props.onUserMediaError(err);
|
|
633
|
-
return;
|
|
634
|
-
}
|
|
635
|
-
this.stream = stream;
|
|
636
|
-
try {
|
|
637
|
-
if (this.video) {
|
|
638
|
-
this.video.srcObject = stream;
|
|
639
|
-
}
|
|
640
|
-
this.setState({ hasUserMedia: true });
|
|
641
|
-
} catch (error) {
|
|
642
|
-
this.setState({
|
|
643
|
-
hasUserMedia: true,
|
|
644
|
-
src: window.URL.createObjectURL(stream)
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
props.onUserMedia(stream);
|
|
648
|
-
};
|
|
649
|
-
Webcam3.prototype.render = function() {
|
|
650
|
-
var _this = this;
|
|
651
|
-
var _a = this, state = _a.state, props = _a.props;
|
|
652
|
-
var audio = props.audio, forceScreenshotSourceSize = props.forceScreenshotSourceSize, disablePictureInPicture = props.disablePictureInPicture, onUserMedia = props.onUserMedia, onUserMediaError = props.onUserMediaError, screenshotFormat = props.screenshotFormat, screenshotQuality = props.screenshotQuality, minScreenshotWidth = props.minScreenshotWidth, minScreenshotHeight = props.minScreenshotHeight, audioConstraints = props.audioConstraints, videoConstraints = props.videoConstraints, imageSmoothing = props.imageSmoothing, mirrored = props.mirrored, _b = props.style, style = _b === void 0 ? {} : _b, children = props.children, rest = __rest(props, ["audio", "forceScreenshotSourceSize", "disablePictureInPicture", "onUserMedia", "onUserMediaError", "screenshotFormat", "screenshotQuality", "minScreenshotWidth", "minScreenshotHeight", "audioConstraints", "videoConstraints", "imageSmoothing", "mirrored", "style", "children"]);
|
|
653
|
-
var videoStyle = mirrored ? __assign(__assign({}, style), { transform: (style.transform || "") + " scaleX(-1)" }) : style;
|
|
654
|
-
var childrenProps = {
|
|
655
|
-
getScreenshot: this.getScreenshot.bind(this)
|
|
656
|
-
};
|
|
657
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
658
|
-
react__WEBPACK_IMPORTED_MODULE_0__["Fragment"],
|
|
659
|
-
null,
|
|
660
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", __assign({ autoPlay: true, disablePictureInPicture, src: state.src, muted: !audio, playsInline: true, ref: function(ref) {
|
|
661
|
-
_this.video = ref;
|
|
662
|
-
}, style: videoStyle }, rest)),
|
|
663
|
-
children && children(childrenProps)
|
|
664
|
-
);
|
|
665
|
-
};
|
|
666
|
-
Webcam3.defaultProps = {
|
|
667
|
-
audio: false,
|
|
668
|
-
disablePictureInPicture: false,
|
|
669
|
-
forceScreenshotSourceSize: false,
|
|
670
|
-
imageSmoothing: true,
|
|
671
|
-
mirrored: false,
|
|
672
|
-
onUserMedia: function() {
|
|
673
|
-
return void 0;
|
|
674
|
-
},
|
|
675
|
-
onUserMediaError: function() {
|
|
676
|
-
return void 0;
|
|
677
|
-
},
|
|
678
|
-
screenshotFormat: "image/webp",
|
|
679
|
-
screenshotQuality: 0.92
|
|
680
|
-
};
|
|
681
|
-
return Webcam3;
|
|
682
|
-
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"])
|
|
683
|
-
);
|
|
684
|
-
__webpack_exports__["default"] = Webcam2;
|
|
685
|
-
}
|
|
686
|
-
),
|
|
687
|
-
/***/
|
|
688
|
-
"react": (
|
|
689
|
-
/*!**************************************************************************************!*\
|
|
690
|
-
!*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
|
|
691
|
-
\**************************************************************************************/
|
|
692
|
-
/*! no static exports found */
|
|
693
|
-
/***/
|
|
694
|
-
function(module2, exports2) {
|
|
695
|
-
module2.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
696
|
-
}
|
|
697
|
-
)
|
|
698
|
-
/******/
|
|
699
|
-
})["default"]
|
|
700
|
-
);
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
|
|
705
267
|
// ../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js
|
|
706
268
|
var require_screenfull = __commonJS({
|
|
707
269
|
"../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js"(exports, module) {
|
|
@@ -6427,9 +5989,9 @@ var LayoutStep_default = LayoutStep;
|
|
|
6427
5989
|
import { useEffect as useEffect19, useState as useState22 } from "react";
|
|
6428
5990
|
|
|
6429
5991
|
// src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
|
|
6430
|
-
var import_react_webcam = __toESM(require_react_webcam());
|
|
6431
5992
|
import { useCallback as useCallback8, useEffect as useEffect18, useMemo as useMemo14, useRef as useRef6, useState as useState21 } from "react";
|
|
6432
5993
|
import { useIntl as useIntl14 } from "react-intl";
|
|
5994
|
+
import Webcam from "react-webcam";
|
|
6433
5995
|
|
|
6434
5996
|
// src/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.ts
|
|
6435
5997
|
import { defineMessages as defineMessages11 } from "react-intl";
|
|
@@ -6924,7 +6486,7 @@ function CameraCapture({
|
|
|
6924
6486
|
}, [mode, exitFullScreen]);
|
|
6925
6487
|
const captureScreen = /* @__PURE__ */ jsxs27("div", { className: "camera-capture", children: [
|
|
6926
6488
|
videoConstraints && /* @__PURE__ */ jsx63(
|
|
6927
|
-
|
|
6489
|
+
Webcam,
|
|
6928
6490
|
{
|
|
6929
6491
|
ref: webcamReference,
|
|
6930
6492
|
audio: false,
|