@veridid/workflow-ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +217 -2
- package/build/module/WorkflowFontScaleContext.js +67 -0
- package/build/module/WorkflowFontScaleContext.js.map +1 -0
- package/build/module/adapter/WalletAdapter.js +152 -0
- package/build/module/adapter/WalletAdapter.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.js +8 -0
- package/build/module/components/FallbackVideoPlayer.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.native.js +10 -0
- package/build/module/components/FallbackVideoPlayer.native.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.web.js +35 -0
- package/build/module/components/FallbackVideoPlayer.web.js.map +1 -0
- package/build/module/components/WorkflowButtonLabel.js +32 -0
- package/build/module/components/WorkflowButtonLabel.js.map +1 -0
- package/build/module/components/WorkflowCalendarIcon.js +73 -0
- package/build/module/components/WorkflowCalendarIcon.js.map +1 -0
- package/build/module/components/WorkflowText.js +92 -0
- package/build/module/components/WorkflowText.js.map +1 -0
- package/build/module/content/BadgeContent.js +73 -0
- package/build/module/content/BadgeContent.js.map +1 -0
- package/build/module/content/BarChartContent.js +97 -0
- package/build/module/content/BarChartContent.js.map +1 -0
- package/build/module/content/BarcodeContent.js +78 -0
- package/build/module/content/BarcodeContent.js.map +1 -0
- package/build/module/content/BasicTableContent.js +145 -0
- package/build/module/content/BasicTableContent.js.map +1 -0
- package/build/module/content/ButtonContent.js +130 -0
- package/build/module/content/ButtonContent.js.map +1 -0
- package/build/module/content/CalendarContent.js +173 -0
- package/build/module/content/CalendarContent.js.map +1 -0
- package/build/module/content/CardContent.js +114 -0
- package/build/module/content/CardContent.js.map +1 -0
- package/build/module/content/CarouselContent.js +173 -0
- package/build/module/content/CarouselContent.js.map +1 -0
- package/build/module/content/ChipContent.js +214 -0
- package/build/module/content/ChipContent.js.map +1 -0
- package/build/module/content/ChipRowContent.js +127 -0
- package/build/module/content/ChipRowContent.js.map +1 -0
- package/build/module/content/CredentialOfferContent.js +312 -0
- package/build/module/content/CredentialOfferContent.js.map +1 -0
- package/build/module/content/DialContent.js +101 -0
- package/build/module/content/DialContent.js.map +1 -0
- package/build/module/content/DividerContent.js +26 -0
- package/build/module/content/DividerContent.js.map +1 -0
- package/build/module/content/DonutChartContent.js +118 -0
- package/build/module/content/DonutChartContent.js.map +1 -0
- package/build/module/content/FormContent.js +141 -0
- package/build/module/content/FormContent.js.map +1 -0
- package/build/module/content/FormFieldBridge.js +157 -0
- package/build/module/content/FormFieldBridge.js.map +1 -0
- package/build/module/content/GaugeContent.js +77 -0
- package/build/module/content/GaugeContent.js.map +1 -0
- package/build/module/content/GridLayoutContent.js +227 -0
- package/build/module/content/GridLayoutContent.js.map +1 -0
- package/build/module/content/ImageContent.js +190 -0
- package/build/module/content/ImageContent.js.map +1 -0
- package/build/module/content/ListContent.js +121 -0
- package/build/module/content/ListContent.js.map +1 -0
- package/build/module/content/LocationContent.js +148 -0
- package/build/module/content/LocationContent.js.map +1 -0
- package/build/module/content/MapContent.js +213 -0
- package/build/module/content/MapContent.js.map +1 -0
- package/build/module/content/MultipleChoiceContent.js +91 -0
- package/build/module/content/MultipleChoiceContent.js.map +1 -0
- package/build/module/content/OpenBadgePreviewContent.js +141 -0
- package/build/module/content/OpenBadgePreviewContent.js.map +1 -0
- package/build/module/content/PhotoContent.js +154 -0
- package/build/module/content/PhotoContent.js.map +1 -0
- package/build/module/content/PieChartContent.js +129 -0
- package/build/module/content/PieChartContent.js.map +1 -0
- package/build/module/content/ProofPresentationContent.js +154 -0
- package/build/module/content/ProofPresentationContent.js.map +1 -0
- package/build/module/content/RadioButtonContent.js +136 -0
- package/build/module/content/RadioButtonContent.js.map +1 -0
- package/build/module/content/RowContent.js +539 -0
- package/build/module/content/RowContent.js.map +1 -0
- package/build/module/content/SectionContent.js +123 -0
- package/build/module/content/SectionContent.js.map +1 -0
- package/build/module/content/ShareEntryContent.js +111 -0
- package/build/module/content/ShareEntryContent.js.map +1 -0
- package/build/module/content/SimulatedHint.js +33 -0
- package/build/module/content/SimulatedHint.js.map +1 -0
- package/build/module/content/SliderContent.js +46 -0
- package/build/module/content/SliderContent.js.map +1 -0
- package/build/module/content/SpacerContent.js +21 -0
- package/build/module/content/SpacerContent.js.map +1 -0
- package/build/module/content/SpinnerContent.js +33 -0
- package/build/module/content/SpinnerContent.js.map +1 -0
- package/build/module/content/SubmitButtonContent.js +281 -0
- package/build/module/content/SubmitButtonContent.js.map +1 -0
- package/build/module/content/TextContent.js +127 -0
- package/build/module/content/TextContent.js.map +1 -0
- package/build/module/content/TileContent.js +237 -0
- package/build/module/content/TileContent.js.map +1 -0
- package/build/module/content/TimelineContent.js +120 -0
- package/build/module/content/TimelineContent.js.map +1 -0
- package/build/module/content/TitleContent.js +55 -0
- package/build/module/content/TitleContent.js.map +1 -0
- package/build/module/content/VideoContent.js +142 -0
- package/build/module/content/VideoContent.js.map +1 -0
- package/build/module/content/WebLinkContent.js +95 -0
- package/build/module/content/WebLinkContent.js.map +1 -0
- package/build/module/content/index.js +48 -0
- package/build/module/content/index.js.map +1 -0
- package/build/module/form-fields/CheckboxField.js +47 -0
- package/build/module/form-fields/CheckboxField.js.map +1 -0
- package/build/module/form-fields/DateField.js +8 -0
- package/build/module/form-fields/DateField.js.map +1 -0
- package/build/module/form-fields/DateField.native.js +141 -0
- package/build/module/form-fields/DateField.native.js.map +1 -0
- package/build/module/form-fields/DateField.web.js +45 -0
- package/build/module/form-fields/DateField.web.js.map +1 -0
- package/build/module/form-fields/DropdownField.js +172 -0
- package/build/module/form-fields/DropdownField.js.map +1 -0
- package/build/module/form-fields/MCQField.js +100 -0
- package/build/module/form-fields/MCQField.js.map +1 -0
- package/build/module/form-fields/RadioField.js +56 -0
- package/build/module/form-fields/RadioField.js.map +1 -0
- package/build/module/form-fields/SliderField.js +8 -0
- package/build/module/form-fields/SliderField.js.map +1 -0
- package/build/module/form-fields/SliderField.native.js +77 -0
- package/build/module/form-fields/SliderField.native.js.map +1 -0
- package/build/module/form-fields/SliderField.web.js +82 -0
- package/build/module/form-fields/SliderField.web.js.map +1 -0
- package/build/module/form-fields/SubmitButtonField.js +42 -0
- package/build/module/form-fields/SubmitButtonField.js.map +1 -0
- package/build/module/form-fields/TextField.js +56 -0
- package/build/module/form-fields/TextField.js.map +1 -0
- package/build/module/form-fields/index.js +15 -0
- package/build/module/form-fields/index.js.map +1 -0
- package/build/module/i18n/WorkflowI18n.js +94 -0
- package/build/module/i18n/WorkflowI18n.js.map +1 -0
- package/build/module/icons/VectorIcon.js +23 -0
- package/build/module/icons/VectorIcon.js.map +1 -0
- package/build/module/icons/VectorIcon.web.js +62 -0
- package/build/module/icons/VectorIcon.web.js.map +1 -0
- package/build/module/icons/WorkflowIcon.js +36 -0
- package/build/module/icons/WorkflowIcon.js.map +1 -0
- package/build/module/icons/types.js +4 -0
- package/build/module/icons/types.js.map +1 -0
- package/build/module/imageUriCache.js +25 -0
- package/build/module/imageUriCache.js.map +1 -0
- package/build/module/index.js +50 -0
- package/build/module/index.js.map +1 -0
- package/build/module/modal/WorkflowModal.js +115 -0
- package/build/module/modal/WorkflowModal.js.map +1 -0
- package/build/module/package.json +1 -0
- package/build/module/platform/platformName.js +10 -0
- package/build/module/platform/platformName.js.map +1 -0
- package/build/module/platform/platformName.web.js +5 -0
- package/build/module/platform/platformName.web.js.map +1 -0
- package/build/module/protocol/controlSnapshotStore.js +19 -0
- package/build/module/protocol/controlSnapshotStore.js.map +1 -0
- package/build/module/protocol/useProtocolExchange.js +168 -0
- package/build/module/protocol/useProtocolExchange.js.map +1 -0
- package/build/module/registries/ContentRegistry.js +53 -0
- package/build/module/registries/ContentRegistry.js.map +1 -0
- package/build/module/registries/FormFieldRegistry.js +56 -0
- package/build/module/registries/FormFieldRegistry.js.map +1 -0
- package/build/module/render/NodeBoundary.js +73 -0
- package/build/module/render/NodeBoundary.js.map +1 -0
- package/build/module/render/RenderTree.js +52 -0
- package/build/module/render/RenderTree.js.map +1 -0
- package/build/module/render/WorkflowRenderContext.js +34 -0
- package/build/module/render/WorkflowRenderContext.js.map +1 -0
- package/build/module/render/nodes.js +103 -0
- package/build/module/render/nodes.js.map +1 -0
- package/build/module/responsive/ResponsiveProvider.js +63 -0
- package/build/module/responsive/ResponsiveProvider.js.map +1 -0
- package/build/module/responsive/index.js +4 -0
- package/build/module/responsive/index.js.map +1 -0
- package/build/module/responsive/responsive.js +56 -0
- package/build/module/responsive/responsive.js.map +1 -0
- package/build/module/style/resolveDisplayHintStyle.js +145 -0
- package/build/module/style/resolveDisplayHintStyle.js.map +1 -0
- package/build/module/theme/WorkflowTheme.js +200 -0
- package/build/module/theme/WorkflowTheme.js.map +1 -0
- package/build/module/utils/testable.js +12 -0
- package/build/module/utils/testable.js.map +1 -0
- package/build/typescript/WorkflowFontScaleContext.d.ts +7 -0
- package/build/typescript/WorkflowFontScaleContext.d.ts.map +1 -0
- package/build/typescript/adapter/WalletAdapter.d.ts +145 -0
- package/build/typescript/adapter/WalletAdapter.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.d.ts +6 -0
- package/build/typescript/components/FallbackVideoPlayer.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.native.d.ts +7 -0
- package/build/typescript/components/FallbackVideoPlayer.native.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.web.d.ts +9 -0
- package/build/typescript/components/FallbackVideoPlayer.web.d.ts.map +1 -0
- package/build/typescript/components/WorkflowButtonLabel.d.ts +11 -0
- package/build/typescript/components/WorkflowButtonLabel.d.ts.map +1 -0
- package/build/typescript/components/WorkflowCalendarIcon.d.ts +11 -0
- package/build/typescript/components/WorkflowCalendarIcon.d.ts.map +1 -0
- package/build/typescript/components/WorkflowText.d.ts +13 -0
- package/build/typescript/components/WorkflowText.d.ts.map +1 -0
- package/build/typescript/content/BadgeContent.d.ts +5 -0
- package/build/typescript/content/BadgeContent.d.ts.map +1 -0
- package/build/typescript/content/BarChartContent.d.ts +5 -0
- package/build/typescript/content/BarChartContent.d.ts.map +1 -0
- package/build/typescript/content/BarcodeContent.d.ts +11 -0
- package/build/typescript/content/BarcodeContent.d.ts.map +1 -0
- package/build/typescript/content/BasicTableContent.d.ts +5 -0
- package/build/typescript/content/BasicTableContent.d.ts.map +1 -0
- package/build/typescript/content/ButtonContent.d.ts +5 -0
- package/build/typescript/content/ButtonContent.d.ts.map +1 -0
- package/build/typescript/content/CalendarContent.d.ts +19 -0
- package/build/typescript/content/CalendarContent.d.ts.map +1 -0
- package/build/typescript/content/CardContent.d.ts +5 -0
- package/build/typescript/content/CardContent.d.ts.map +1 -0
- package/build/typescript/content/CarouselContent.d.ts +5 -0
- package/build/typescript/content/CarouselContent.d.ts.map +1 -0
- package/build/typescript/content/ChipContent.d.ts +5 -0
- package/build/typescript/content/ChipContent.d.ts.map +1 -0
- package/build/typescript/content/ChipRowContent.d.ts +8 -0
- package/build/typescript/content/ChipRowContent.d.ts.map +1 -0
- package/build/typescript/content/CredentialOfferContent.d.ts +98 -0
- package/build/typescript/content/CredentialOfferContent.d.ts.map +1 -0
- package/build/typescript/content/DialContent.d.ts +5 -0
- package/build/typescript/content/DialContent.d.ts.map +1 -0
- package/build/typescript/content/DividerContent.d.ts +5 -0
- package/build/typescript/content/DividerContent.d.ts.map +1 -0
- package/build/typescript/content/DonutChartContent.d.ts +5 -0
- package/build/typescript/content/DonutChartContent.d.ts.map +1 -0
- package/build/typescript/content/FormContent.d.ts +19 -0
- package/build/typescript/content/FormContent.d.ts.map +1 -0
- package/build/typescript/content/FormFieldBridge.d.ts +2 -0
- package/build/typescript/content/FormFieldBridge.d.ts.map +1 -0
- package/build/typescript/content/GaugeContent.d.ts +5 -0
- package/build/typescript/content/GaugeContent.d.ts.map +1 -0
- package/build/typescript/content/GridLayoutContent.d.ts +5 -0
- package/build/typescript/content/GridLayoutContent.d.ts.map +1 -0
- package/build/typescript/content/ImageContent.d.ts +5 -0
- package/build/typescript/content/ImageContent.d.ts.map +1 -0
- package/build/typescript/content/ListContent.d.ts +5 -0
- package/build/typescript/content/ListContent.d.ts.map +1 -0
- package/build/typescript/content/LocationContent.d.ts +32 -0
- package/build/typescript/content/LocationContent.d.ts.map +1 -0
- package/build/typescript/content/MapContent.d.ts +11 -0
- package/build/typescript/content/MapContent.d.ts.map +1 -0
- package/build/typescript/content/MultipleChoiceContent.d.ts +5 -0
- package/build/typescript/content/MultipleChoiceContent.d.ts.map +1 -0
- package/build/typescript/content/OpenBadgePreviewContent.d.ts +14 -0
- package/build/typescript/content/OpenBadgePreviewContent.d.ts.map +1 -0
- package/build/typescript/content/PhotoContent.d.ts +57 -0
- package/build/typescript/content/PhotoContent.d.ts.map +1 -0
- package/build/typescript/content/PieChartContent.d.ts +5 -0
- package/build/typescript/content/PieChartContent.d.ts.map +1 -0
- package/build/typescript/content/ProofPresentationContent.d.ts +14 -0
- package/build/typescript/content/ProofPresentationContent.d.ts.map +1 -0
- package/build/typescript/content/RadioButtonContent.d.ts +5 -0
- package/build/typescript/content/RadioButtonContent.d.ts.map +1 -0
- package/build/typescript/content/RowContent.d.ts +5 -0
- package/build/typescript/content/RowContent.d.ts.map +1 -0
- package/build/typescript/content/SectionContent.d.ts +5 -0
- package/build/typescript/content/SectionContent.d.ts.map +1 -0
- package/build/typescript/content/ShareEntryContent.d.ts +15 -0
- package/build/typescript/content/ShareEntryContent.d.ts.map +1 -0
- package/build/typescript/content/SimulatedHint.d.ts +9 -0
- package/build/typescript/content/SimulatedHint.d.ts.map +1 -0
- package/build/typescript/content/SliderContent.d.ts +10 -0
- package/build/typescript/content/SliderContent.d.ts.map +1 -0
- package/build/typescript/content/SpacerContent.d.ts +5 -0
- package/build/typescript/content/SpacerContent.d.ts.map +1 -0
- package/build/typescript/content/SpinnerContent.d.ts +5 -0
- package/build/typescript/content/SpinnerContent.d.ts.map +1 -0
- package/build/typescript/content/SubmitButtonContent.d.ts +9 -0
- package/build/typescript/content/SubmitButtonContent.d.ts.map +1 -0
- package/build/typescript/content/TextContent.d.ts +5 -0
- package/build/typescript/content/TextContent.d.ts.map +1 -0
- package/build/typescript/content/TileContent.d.ts +5 -0
- package/build/typescript/content/TileContent.d.ts.map +1 -0
- package/build/typescript/content/TimelineContent.d.ts +5 -0
- package/build/typescript/content/TimelineContent.d.ts.map +1 -0
- package/build/typescript/content/TitleContent.d.ts +5 -0
- package/build/typescript/content/TitleContent.d.ts.map +1 -0
- package/build/typescript/content/VideoContent.d.ts +10 -0
- package/build/typescript/content/VideoContent.d.ts.map +1 -0
- package/build/typescript/content/WebLinkContent.d.ts +5 -0
- package/build/typescript/content/WebLinkContent.d.ts.map +1 -0
- package/build/typescript/content/index.d.ts +46 -0
- package/build/typescript/content/index.d.ts.map +1 -0
- package/build/typescript/form-fields/CheckboxField.d.ts +5 -0
- package/build/typescript/form-fields/CheckboxField.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.d.ts +6 -0
- package/build/typescript/form-fields/DateField.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.native.d.ts +5 -0
- package/build/typescript/form-fields/DateField.native.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.web.d.ts +9 -0
- package/build/typescript/form-fields/DateField.web.d.ts.map +1 -0
- package/build/typescript/form-fields/DropdownField.d.ts +5 -0
- package/build/typescript/form-fields/DropdownField.d.ts.map +1 -0
- package/build/typescript/form-fields/MCQField.d.ts +5 -0
- package/build/typescript/form-fields/MCQField.d.ts.map +1 -0
- package/build/typescript/form-fields/RadioField.d.ts +5 -0
- package/build/typescript/form-fields/RadioField.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.d.ts +6 -0
- package/build/typescript/form-fields/SliderField.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.native.d.ts +5 -0
- package/build/typescript/form-fields/SliderField.native.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.web.d.ts +11 -0
- package/build/typescript/form-fields/SliderField.web.d.ts.map +1 -0
- package/build/typescript/form-fields/SubmitButtonField.d.ts +5 -0
- package/build/typescript/form-fields/SubmitButtonField.d.ts.map +1 -0
- package/build/typescript/form-fields/TextField.d.ts +5 -0
- package/build/typescript/form-fields/TextField.d.ts.map +1 -0
- package/build/typescript/form-fields/index.d.ts +13 -0
- package/build/typescript/form-fields/index.d.ts.map +1 -0
- package/build/typescript/i18n/WorkflowI18n.d.ts +75 -0
- package/build/typescript/i18n/WorkflowI18n.d.ts.map +1 -0
- package/build/typescript/icons/VectorIcon.d.ts +4 -0
- package/build/typescript/icons/VectorIcon.d.ts.map +1 -0
- package/build/typescript/icons/VectorIcon.web.d.ts +16 -0
- package/build/typescript/icons/VectorIcon.web.d.ts.map +1 -0
- package/build/typescript/icons/WorkflowIcon.d.ts +19 -0
- package/build/typescript/icons/WorkflowIcon.d.ts.map +1 -0
- package/build/typescript/icons/types.d.ts +12 -0
- package/build/typescript/icons/types.d.ts.map +1 -0
- package/build/typescript/imageUriCache.d.ts +7 -0
- package/build/typescript/imageUriCache.d.ts.map +1 -0
- package/build/typescript/index.d.ts +48 -0
- package/build/typescript/index.d.ts.map +1 -0
- package/build/typescript/modal/WorkflowModal.d.ts +33 -0
- package/build/typescript/modal/WorkflowModal.d.ts.map +1 -0
- package/build/typescript/package.json +1 -0
- package/build/typescript/platform/platformName.d.ts +8 -0
- package/build/typescript/platform/platformName.d.ts.map +1 -0
- package/build/typescript/platform/platformName.web.d.ts +3 -0
- package/build/typescript/platform/platformName.web.d.ts.map +1 -0
- package/build/typescript/protocol/controlSnapshotStore.d.ts +12 -0
- package/build/typescript/protocol/controlSnapshotStore.d.ts.map +1 -0
- package/build/typescript/protocol/useProtocolExchange.d.ts +40 -0
- package/build/typescript/protocol/useProtocolExchange.d.ts.map +1 -0
- package/build/typescript/registries/ContentRegistry.d.ts +57 -0
- package/build/typescript/registries/ContentRegistry.d.ts.map +1 -0
- package/build/typescript/registries/FormFieldRegistry.d.ts +37 -0
- package/build/typescript/registries/FormFieldRegistry.d.ts.map +1 -0
- package/build/typescript/render/NodeBoundary.d.ts +25 -0
- package/build/typescript/render/NodeBoundary.d.ts.map +1 -0
- package/build/typescript/render/RenderTree.d.ts +23 -0
- package/build/typescript/render/RenderTree.d.ts.map +1 -0
- package/build/typescript/render/WorkflowRenderContext.d.ts +57 -0
- package/build/typescript/render/WorkflowRenderContext.d.ts.map +1 -0
- package/build/typescript/render/nodes.d.ts +49 -0
- package/build/typescript/render/nodes.d.ts.map +1 -0
- package/build/typescript/responsive/ResponsiveProvider.d.ts +39 -0
- package/build/typescript/responsive/ResponsiveProvider.d.ts.map +1 -0
- package/build/typescript/responsive/index.d.ts +3 -0
- package/build/typescript/responsive/index.d.ts.map +1 -0
- package/build/typescript/responsive/responsive.d.ts +24 -0
- package/build/typescript/responsive/responsive.d.ts.map +1 -0
- package/build/typescript/style/resolveDisplayHintStyle.d.ts +23 -0
- package/build/typescript/style/resolveDisplayHintStyle.d.ts.map +1 -0
- package/build/typescript/theme/WorkflowTheme.d.ts +177 -0
- package/build/typescript/theme/WorkflowTheme.d.ts.map +1 -0
- package/build/typescript/utils/testable.d.ts +8 -0
- package/build/typescript/utils/testable.d.ts.map +1 -0
- package/package.json +104 -3
- package/src/WorkflowFontScaleContext.tsx +74 -0
- package/src/adapter/WalletAdapter.tsx +225 -0
- package/src/components/FallbackVideoPlayer.native.tsx +9 -0
- package/src/components/FallbackVideoPlayer.tsx +5 -0
- package/src/components/FallbackVideoPlayer.web.tsx +24 -0
- package/src/components/WorkflowButtonLabel.tsx +41 -0
- package/src/components/WorkflowCalendarIcon.tsx +52 -0
- package/src/components/WorkflowText.tsx +121 -0
- package/src/content/BadgeContent.tsx +57 -0
- package/src/content/BarChartContent.tsx +76 -0
- package/src/content/BarcodeContent.tsx +59 -0
- package/src/content/BasicTableContent.tsx +139 -0
- package/src/content/ButtonContent.tsx +124 -0
- package/src/content/CalendarContent.tsx +178 -0
- package/src/content/CardContent.tsx +137 -0
- package/src/content/CarouselContent.tsx +197 -0
- package/src/content/ChipContent.tsx +209 -0
- package/src/content/ChipRowContent.tsx +133 -0
- package/src/content/CredentialOfferContent.tsx +229 -0
- package/src/content/DialContent.tsx +96 -0
- package/src/content/DividerContent.tsx +33 -0
- package/src/content/DonutChartContent.tsx +110 -0
- package/src/content/FormContent.tsx +158 -0
- package/src/content/FormFieldBridge.tsx +144 -0
- package/src/content/GaugeContent.tsx +66 -0
- package/src/content/GridLayoutContent.tsx +285 -0
- package/src/content/ImageContent.tsx +222 -0
- package/src/content/ListContent.tsx +98 -0
- package/src/content/LocationContent.tsx +135 -0
- package/src/content/MapContent.tsx +232 -0
- package/src/content/MultipleChoiceContent.tsx +74 -0
- package/src/content/OpenBadgePreviewContent.tsx +93 -0
- package/src/content/PhotoContent.tsx +110 -0
- package/src/content/PieChartContent.tsx +121 -0
- package/src/content/ProofPresentationContent.tsx +127 -0
- package/src/content/RadioButtonContent.tsx +129 -0
- package/src/content/RowContent.tsx +627 -0
- package/src/content/SectionContent.tsx +133 -0
- package/src/content/ShareEntryContent.tsx +109 -0
- package/src/content/SimulatedHint.tsx +20 -0
- package/src/content/SliderContent.tsx +56 -0
- package/src/content/SpacerContent.tsx +15 -0
- package/src/content/SpinnerContent.tsx +24 -0
- package/src/content/SubmitButtonContent.tsx +256 -0
- package/src/content/TextContent.tsx +140 -0
- package/src/content/TileContent.tsx +216 -0
- package/src/content/TimelineContent.tsx +91 -0
- package/src/content/TitleContent.tsx +49 -0
- package/src/content/VideoContent.tsx +131 -0
- package/src/content/WebLinkContent.tsx +87 -0
- package/src/content/index.ts +45 -0
- package/src/form-fields/CheckboxField.tsx +29 -0
- package/src/form-fields/DateField.native.tsx +123 -0
- package/src/form-fields/DateField.tsx +5 -0
- package/src/form-fields/DateField.web.tsx +32 -0
- package/src/form-fields/DropdownField.tsx +137 -0
- package/src/form-fields/MCQField.tsx +68 -0
- package/src/form-fields/RadioField.tsx +53 -0
- package/src/form-fields/SliderField.native.tsx +53 -0
- package/src/form-fields/SliderField.tsx +5 -0
- package/src/form-fields/SliderField.web.tsx +58 -0
- package/src/form-fields/SubmitButtonField.tsx +33 -0
- package/src/form-fields/TextField.tsx +49 -0
- package/src/form-fields/index.ts +12 -0
- package/src/i18n/WorkflowI18n.tsx +100 -0
- package/src/icons/VectorIcon.tsx +10 -0
- package/src/icons/VectorIcon.web.tsx +55 -0
- package/src/icons/WorkflowIcon.tsx +30 -0
- package/src/icons/types.ts +13 -0
- package/src/imageUriCache.ts +27 -0
- package/src/index.ts +97 -0
- package/src/modal/WorkflowModal.tsx +119 -0
- package/src/platform/platformName.ts +7 -0
- package/src/platform/platformName.web.ts +2 -0
- package/src/protocol/controlSnapshotStore.ts +25 -0
- package/src/protocol/useProtocolExchange.ts +185 -0
- package/src/registries/ContentRegistry.tsx +130 -0
- package/src/registries/FormFieldRegistry.tsx +83 -0
- package/src/render/NodeBoundary.tsx +69 -0
- package/src/render/RenderTree.tsx +63 -0
- package/src/render/WorkflowRenderContext.tsx +71 -0
- package/src/render/nodes.ts +104 -0
- package/src/responsive/ResponsiveProvider.tsx +103 -0
- package/src/responsive/index.ts +7 -0
- package/src/responsive/responsive.ts +67 -0
- package/src/style/resolveDisplayHintStyle.ts +153 -0
- package/src/theme/WorkflowTheme.tsx +162 -0
- package/src/utils/testable.ts +10 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { FormFieldRegistry } from "../registries/FormFieldRegistry.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Web version of the slider: the browser's own range input. The community
|
|
9
|
+
* slider ships CommonJS that pulls a second copy of react-native-web into web
|
|
10
|
+
* bundles (~400 kB). Same behaviour as the native field: the label follows the
|
|
11
|
+
* thumb live, and the value is committed when the user lets go.
|
|
12
|
+
*/
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const SliderField = ({
|
|
15
|
+
field,
|
|
16
|
+
value,
|
|
17
|
+
onChange,
|
|
18
|
+
colors
|
|
19
|
+
}) => {
|
|
20
|
+
const min = field.min ?? 0;
|
|
21
|
+
const max = field.max ?? 100;
|
|
22
|
+
const toNum = v => {
|
|
23
|
+
const n = typeof v === 'string' ? Number.parseFloat(v) : v;
|
|
24
|
+
return Number.isFinite(n) ? n : min;
|
|
25
|
+
};
|
|
26
|
+
const [display, setDisplay] = React.useState(toNum(value));
|
|
27
|
+
|
|
28
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: sync the live label only when the committed value changes
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
setDisplay(toNum(value));
|
|
31
|
+
}, [value]);
|
|
32
|
+
const commit = () => onChange(Math.round(display).toString());
|
|
33
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
34
|
+
style: s.wrap,
|
|
35
|
+
children: [!!field.label && /*#__PURE__*/_jsx(Text, {
|
|
36
|
+
style: [s.label, {
|
|
37
|
+
color: colors.text
|
|
38
|
+
}],
|
|
39
|
+
children: field.label
|
|
40
|
+
}), /*#__PURE__*/React.createElement('input', {
|
|
41
|
+
type: 'range',
|
|
42
|
+
min,
|
|
43
|
+
max,
|
|
44
|
+
step: 1,
|
|
45
|
+
value: display,
|
|
46
|
+
'aria-label': field.label || 'Slider',
|
|
47
|
+
style: {
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: 40,
|
|
50
|
+
accentColor: colors.primary
|
|
51
|
+
},
|
|
52
|
+
onChange: event => setDisplay(Number(event.target.value)),
|
|
53
|
+
onPointerUp: commit,
|
|
54
|
+
onKeyUp: commit,
|
|
55
|
+
onBlur: commit
|
|
56
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
57
|
+
style: [s.value, {
|
|
58
|
+
color: colors.primary
|
|
59
|
+
}],
|
|
60
|
+
children: Math.round(display)
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const s = StyleSheet.create({
|
|
65
|
+
wrap: {
|
|
66
|
+
marginBottom: 8
|
|
67
|
+
},
|
|
68
|
+
label: {
|
|
69
|
+
fontSize: 14,
|
|
70
|
+
fontWeight: '600',
|
|
71
|
+
marginBottom: 4
|
|
72
|
+
},
|
|
73
|
+
value: {
|
|
74
|
+
fontSize: 16,
|
|
75
|
+
fontWeight: '700',
|
|
76
|
+
textAlign: 'center',
|
|
77
|
+
marginTop: 2
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
FormFieldRegistry.register('slider', SliderField);
|
|
81
|
+
export default SliderField;
|
|
82
|
+
//# sourceMappingURL=SliderField.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","FormFieldRegistry","jsx","_jsx","jsxs","_jsxs","SliderField","field","value","onChange","colors","min","max","toNum","v","n","Number","parseFloat","isFinite","display","setDisplay","useState","useEffect","commit","Math","round","toString","style","s","wrap","children","label","color","text","createElement","type","step","width","height","accentColor","primary","event","target","onPointerUp","onKeyUp","onBlur","create","marginBottom","fontSize","fontWeight","textAlign","marginTop","register"],"sourceRoot":"../../../src","sources":["form-fields/SliderField.web.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable no-console */
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { TouchableOpacity } from 'react-native';
|
|
7
|
+
import WorkflowButtonLabel from "../components/WorkflowButtonLabel.js";
|
|
8
|
+
import { useWorkflowT } from "../i18n/WorkflowI18n.js";
|
|
9
|
+
import { FormFieldRegistry } from "../registries/FormFieldRegistry.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
const SubmitButtonField = ({
|
|
12
|
+
field,
|
|
13
|
+
onChange,
|
|
14
|
+
styles,
|
|
15
|
+
colors,
|
|
16
|
+
groupFontScale = 1
|
|
17
|
+
}) => {
|
|
18
|
+
const t = useWorkflowT();
|
|
19
|
+
const handlePress = () => {
|
|
20
|
+
// Trigger onChange which will be caught by ActionMenuBubble
|
|
21
|
+
if (onChange) {
|
|
22
|
+
onChange('submit');
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
26
|
+
style: [styles.button, {
|
|
27
|
+
backgroundColor: colors.primary,
|
|
28
|
+
borderColor: colors.primary,
|
|
29
|
+
marginTop: 8
|
|
30
|
+
}],
|
|
31
|
+
onPress: handlePress,
|
|
32
|
+
activeOpacity: 0.8,
|
|
33
|
+
children: /*#__PURE__*/_jsx(WorkflowButtonLabel, {
|
|
34
|
+
style: styles.buttonText,
|
|
35
|
+
groupFontScale: groupFontScale,
|
|
36
|
+
children: field.label || t('WorkflowUi.Submit')
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
FormFieldRegistry.register('submit-button', SubmitButtonField);
|
|
41
|
+
export default SubmitButtonField;
|
|
42
|
+
//# sourceMappingURL=SubmitButtonField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","TouchableOpacity","WorkflowButtonLabel","useWorkflowT","FormFieldRegistry","jsx","_jsx","SubmitButtonField","field","onChange","styles","colors","groupFontScale","t","handlePress","style","button","backgroundColor","primary","borderColor","marginTop","onPress","activeOpacity","children","buttonText","label","register"],"sourceRoot":"../../../src","sources":["form-fields/SubmitButtonField.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,cAAc;AAC/C,OAAOC,mBAAmB,MAAM,sCAAmC;AACnE,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAA8BC,iBAAiB,QAAQ,oCAAiC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExF,MAAMC,iBAA2C,GAAGA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;EAAEC,MAAM;EAAEC,cAAc,GAAG;AAAE,CAAC,KAAK;EAC/G,MAAMC,CAAC,GAAGV,YAAY,CAAC,CAAC;EACxB,MAAMW,WAAW,GAAGA,CAAA,KAAM;IACxB;IACA,IAAIL,QAAQ,EAAE;MACZA,QAAQ,CAAC,QAAQ,CAAC;IACpB;EACF,CAAC;EAED,oBACEH,IAAA,CAACL,gBAAgB;IACfc,KAAK,EAAE,CAACL,MAAM,CAACM,MAAM,EAAE;MAAEC,eAAe,EAAEN,MAAM,CAACO,OAAO;MAAEC,WAAW,EAAER,MAAM,CAACO,OAAO;MAAEE,SAAS,EAAE;IAAE,CAAC,CAAE;IACvGC,OAAO,EAAEP,WAAY;IACrBQ,aAAa,EAAE,GAAI;IAAAC,QAAA,eAEnBjB,IAAA,CAACJ,mBAAmB;MAACa,KAAK,EAAEL,MAAM,CAACc,UAAW;MAACZ,cAAc,EAAEA,cAAe;MAAAW,QAAA,EAC3Ef,KAAK,CAACiB,KAAK,IAAIZ,CAAC,CAAC,mBAAmB;IAAC,CACnB;EAAC,CACN,CAAC;AAEvB,CAAC;AAEDT,iBAAiB,CAACsB,QAAQ,CAAC,eAAe,EAAEnB,iBAAiB,CAAC;AAE9D,eAAeA,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { TextInput, View } from 'react-native';
|
|
5
|
+
import WorkflowText from "../components/WorkflowText.js";
|
|
6
|
+
import { FormFieldRegistry } from "../registries/FormFieldRegistry.js";
|
|
7
|
+
import { testIdWithKey } from "../utils/testable.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const TextField = ({
|
|
10
|
+
field,
|
|
11
|
+
value,
|
|
12
|
+
onChange,
|
|
13
|
+
styles,
|
|
14
|
+
colors
|
|
15
|
+
}) => {
|
|
16
|
+
const isMultiline = field.type === 'text-area' || field.type === 'textarea';
|
|
17
|
+
const borderColor = colors.border || colors.primary || '#7EB8B8';
|
|
18
|
+
const backgroundColor = colors.background || 'rgba(255,255,255,0.08)';
|
|
19
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
20
|
+
style: styles.fieldContainer,
|
|
21
|
+
children: [/*#__PURE__*/_jsx(WorkflowText, {
|
|
22
|
+
variant: "label",
|
|
23
|
+
style: [styles.label, {
|
|
24
|
+
color: colors.text
|
|
25
|
+
}],
|
|
26
|
+
children: field.label
|
|
27
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
28
|
+
testID: testIdWithKey(`WorkflowTextInput-${field.name || 'field'}`),
|
|
29
|
+
accessibilityLabel: field.label || 'Text input',
|
|
30
|
+
style: [styles.input, {
|
|
31
|
+
borderWidth: 1.5,
|
|
32
|
+
borderColor,
|
|
33
|
+
color: colors.text,
|
|
34
|
+
backgroundColor
|
|
35
|
+
}, isMultiline ? {
|
|
36
|
+
minHeight: 80,
|
|
37
|
+
textAlignVertical: 'top'
|
|
38
|
+
} : null],
|
|
39
|
+
value: value || '',
|
|
40
|
+
onChangeText: onChange,
|
|
41
|
+
placeholder: field.placeholder,
|
|
42
|
+
placeholderTextColor: colors.border || '#9AA0A6',
|
|
43
|
+
multiline: isMultiline,
|
|
44
|
+
numberOfLines: isMultiline ? 3 : undefined,
|
|
45
|
+
editable: field.disabled !== true,
|
|
46
|
+
underlineColorAndroid: "transparent"
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
FormFieldRegistry.register('text', TextField);
|
|
51
|
+
FormFieldRegistry.register('text-field', TextField);
|
|
52
|
+
FormFieldRegistry.register('text-input', TextField);
|
|
53
|
+
FormFieldRegistry.register('textarea', TextField);
|
|
54
|
+
FormFieldRegistry.register('text-area', TextField);
|
|
55
|
+
export default TextField;
|
|
56
|
+
//# sourceMappingURL=TextField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","TextInput","View","WorkflowText","FormFieldRegistry","testIdWithKey","jsx","_jsx","jsxs","_jsxs","TextField","field","value","onChange","styles","colors","isMultiline","type","borderColor","border","primary","backgroundColor","background","style","fieldContainer","children","variant","label","color","text","testID","name","accessibilityLabel","input","borderWidth","minHeight","textAlignVertical","onChangeText","placeholder","placeholderTextColor","multiline","numberOfLines","undefined","editable","disabled","underlineColorAndroid","register"],"sourceRoot":"../../../src","sources":["form-fields/TextField.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,OAAOC,YAAY,MAAM,+BAA4B;AACrD,SAA8BC,iBAAiB,QAAQ,oCAAiC;AACxF,SAASC,aAAa,QAAQ,sBAAmB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjD,MAAMC,SAAmC,GAAGA,CAAC;EAAEC,KAAK;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;EAAEC;AAAO,CAAC,KAAK;EAC1F,MAAMC,WAAW,GAAGL,KAAK,CAACM,IAAI,KAAK,WAAW,IAAIN,KAAK,CAACM,IAAI,KAAK,UAAU;EAC3E,MAAMC,WAAW,GAAGH,MAAM,CAACI,MAAM,IAAIJ,MAAM,CAACK,OAAO,IAAI,SAAS;EAChE,MAAMC,eAAe,GAAGN,MAAM,CAACO,UAAU,IAAI,wBAAwB;EAErE,oBACEb,KAAA,CAACP,IAAI;IAACqB,KAAK,EAAET,MAAM,CAACU,cAAe;IAAAC,QAAA,gBACjClB,IAAA,CAACJ,YAAY;MAACuB,OAAO,EAAC,OAAO;MAACH,KAAK,EAAE,CAACT,MAAM,CAACa,KAAK,EAAE;QAAEC,KAAK,EAAEb,MAAM,CAACc;MAAK,CAAC,CAAE;MAAAJ,QAAA,EACzEd,KAAK,CAACgB;IAAK,CACA,CAAC,eACfpB,IAAA,CAACN,SAAS;MACR6B,MAAM,EAAEzB,aAAa,CAAC,qBAAqBM,KAAK,CAACoB,IAAI,IAAI,OAAO,EAAE,CAAE;MACpEC,kBAAkB,EAAErB,KAAK,CAACgB,KAAK,IAAI,YAAa;MAChDJ,KAAK,EAAE,CACLT,MAAM,CAACmB,KAAK,EACZ;QACEC,WAAW,EAAE,GAAG;QAChBhB,WAAW;QACXU,KAAK,EAAEb,MAAM,CAACc,IAAI;QAClBR;MACF,CAAC,EACDL,WAAW,GAAG;QAAEmB,SAAS,EAAE,EAAE;QAAEC,iBAAiB,EAAE;MAAM,CAAC,GAAG,IAAI,CAChE;MACFxB,KAAK,EAAEA,KAAK,IAAI,EAAG;MACnByB,YAAY,EAAExB,QAAS;MACvByB,WAAW,EAAE3B,KAAK,CAAC2B,WAAY;MAC/BC,oBAAoB,EAAExB,MAAM,CAACI,MAAM,IAAI,SAAU;MACjDqB,SAAS,EAAExB,WAAY;MACvByB,aAAa,EAAEzB,WAAW,GAAG,CAAC,GAAG0B,SAAU;MAC3CC,QAAQ,EAAEhC,KAAK,CAACiC,QAAQ,KAAK,IAAK;MAClCC,qBAAqB,EAAC;IAAa,CACpC,CAAC;EAAA,CACE,CAAC;AAEX,CAAC;AAEDzC,iBAAiB,CAAC0C,QAAQ,CAAC,MAAM,EAAEpC,SAAS,CAAC;AAC7CN,iBAAiB,CAAC0C,QAAQ,CAAC,YAAY,EAAEpC,SAAS,CAAC;AACnDN,iBAAiB,CAAC0C,QAAQ,CAAC,YAAY,EAAEpC,SAAS,CAAC;AACnDN,iBAAiB,CAAC0C,QAAQ,CAAC,UAAU,EAAEpC,SAAS,CAAC;AACjDN,iBAAiB,CAAC0C,QAAQ,CAAC,WAAW,EAAEpC,SAAS,CAAC;AAElD,eAAeA,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Registers the form-field renderers with FormFieldRegistry.
|
|
5
|
+
* Imported for its side effects by the package entry point.
|
|
6
|
+
*/
|
|
7
|
+
import "./TextField.js";
|
|
8
|
+
import "./CheckboxField.js";
|
|
9
|
+
import "./RadioField.js";
|
|
10
|
+
import "./MCQField.js";
|
|
11
|
+
import './DateField';
|
|
12
|
+
import './SliderField';
|
|
13
|
+
import "./DropdownField.js";
|
|
14
|
+
import "./SubmitButtonField.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["form-fields/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAO,gBAAa;AACpB,OAAO,oBAAiB;AACxB,OAAO,iBAAc;AACrB,OAAO,eAAY;AACnB,OAAO,aAAa;AACpB,OAAO,eAAe;AACtB,OAAO,oBAAiB;AACxB,OAAO,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useCallback, useContext } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* English text for every string the workflow controls show. Keys match the
|
|
7
|
+
* wallet's i18n keys (`Workflow.*`, `Global.*`), so the wallet can pass its own
|
|
8
|
+
* translate function straight through; new keys use the `WorkflowUi.*` prefix.
|
|
9
|
+
*/
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const DEFAULT_WORKFLOW_STRINGS = {
|
|
12
|
+
'Global.Decline': 'Decline',
|
|
13
|
+
'Workflow.CredentialOffer': 'Credential offer',
|
|
14
|
+
'Workflow.ProofRequest': 'Proof request',
|
|
15
|
+
'Workflow.AcceptCredential': 'Accept credential',
|
|
16
|
+
'Workflow.PresentProof': 'Present proof',
|
|
17
|
+
'Workflow.WaitingForOffer': 'Waiting for the credential offer…',
|
|
18
|
+
'Workflow.ReceivingCredential': 'Receiving credential…',
|
|
19
|
+
'Workflow.CredentialReceived': 'Credential received',
|
|
20
|
+
'Workflow.OfferDeclined': 'Offer declined',
|
|
21
|
+
'Workflow.OfferFailed': 'Something went wrong receiving the credential',
|
|
22
|
+
'Workflow.WaitingForProofRequest': 'Waiting for the proof request…',
|
|
23
|
+
'Workflow.PresentingProof': 'Presenting proof…',
|
|
24
|
+
'Workflow.ProofPresented': 'Proof presented',
|
|
25
|
+
'Workflow.ProofDeclined': 'Proof request declined',
|
|
26
|
+
'Workflow.ProofFailed': 'Something went wrong presenting the proof',
|
|
27
|
+
'WorkflowUi.Select': 'Select...',
|
|
28
|
+
'WorkflowUi.SelectDate': 'Select date...',
|
|
29
|
+
'WorkflowUi.Submit': 'Submit',
|
|
30
|
+
'WorkflowUi.Done': 'Done',
|
|
31
|
+
'WorkflowUi.Error': 'Error',
|
|
32
|
+
'WorkflowUi.InvalidLink': 'Invalid link',
|
|
33
|
+
'WorkflowUi.InvalidLinkMessage': 'Only http(s) links are supported.',
|
|
34
|
+
'WorkflowUi.LinkFailed': 'Unable to open link',
|
|
35
|
+
'WorkflowUi.TakePhoto': 'Take a photo',
|
|
36
|
+
'WorkflowUi.Retake': 'Retake',
|
|
37
|
+
'WorkflowUi.PhotoFailed': 'Failed to take photo. Please try again.',
|
|
38
|
+
'WorkflowUi.ScanCode': 'Scan QR code',
|
|
39
|
+
'WorkflowUi.ShareLocation': 'Share location',
|
|
40
|
+
'WorkflowUi.LocationUnavailable': 'Location unavailable',
|
|
41
|
+
'WorkflowUi.LocationUnavailableMessage': 'Could not get your current GPS position. Turn on Location / GPS and try again.',
|
|
42
|
+
'WorkflowUi.MyLocation': 'My location coordinates:',
|
|
43
|
+
'WorkflowUi.Share': 'Share',
|
|
44
|
+
'WorkflowUi.ShareFailed': 'Failed to share content',
|
|
45
|
+
'WorkflowUi.ReportTitle': 'DigiCred Wallet Report',
|
|
46
|
+
'WorkflowUi.Responses': 'Responses:',
|
|
47
|
+
'WorkflowUi.NoData': 'No data entered yet.',
|
|
48
|
+
'WorkflowUi.AddToCalendar': 'Add to Calendar',
|
|
49
|
+
'WorkflowUi.InvalidDate': 'Invalid date',
|
|
50
|
+
'WorkflowUi.InvalidDateMessage': 'This event is missing a valid start or end time.',
|
|
51
|
+
'WorkflowUi.CalendarAdded': 'Event added to your calendar!',
|
|
52
|
+
'WorkflowUi.CalendarFailed': 'Failed to add event to calendar.',
|
|
53
|
+
'WorkflowUi.Event': 'Event',
|
|
54
|
+
'WorkflowUi.Location': 'Location',
|
|
55
|
+
'WorkflowUi.OpenInMaps': 'Tap to open in Maps',
|
|
56
|
+
'WorkflowUi.VideoFailed': 'Failed to load video',
|
|
57
|
+
'WorkflowUi.Simulated': 'Simulated on the web',
|
|
58
|
+
'WorkflowUi.OpenBadge': 'Open badge',
|
|
59
|
+
'WorkflowUi.OpenBadgeDescription': 'Preview of the badge signed onto this artifact. Tap {{label}} to accept and store it.',
|
|
60
|
+
'WorkflowUi.AddToWallet': 'Add to Wallet'
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Returns the text for `key`. `defaultValue` is the English text; `params`
|
|
65
|
+
* fill `{{name}}` placeholders. Same shape as i18next's `t(key, { defaultValue, ...params })`.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
const fill = (text, params) => params ? text.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, name) => name in params ? String(params[name]) : match) : text;
|
|
69
|
+
const englishTranslate = (_key, defaultValue, params) => fill(defaultValue, params);
|
|
70
|
+
const WorkflowI18nContext = /*#__PURE__*/createContext(englishTranslate);
|
|
71
|
+
/**
|
|
72
|
+
* Supplies translations for the workflow controls. Without it they show
|
|
73
|
+
* English. Wallet: `translate={(key, defaultValue, params) => t(key, { defaultValue, ...params })}`.
|
|
74
|
+
*/
|
|
75
|
+
export function WorkflowI18nProvider({
|
|
76
|
+
translate,
|
|
77
|
+
children
|
|
78
|
+
}) {
|
|
79
|
+
return /*#__PURE__*/_jsx(WorkflowI18nContext.Provider, {
|
|
80
|
+
value: translate,
|
|
81
|
+
children: children
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** `t('Global.Decline')` returns the translated text, falling back to English. */
|
|
86
|
+
export function useWorkflowT() {
|
|
87
|
+
const translate = useContext(WorkflowI18nContext);
|
|
88
|
+
return useCallback((key, params) => {
|
|
89
|
+
const text = translate(key, DEFAULT_WORKFLOW_STRINGS[key], params);
|
|
90
|
+
// A translate function that does not know the key may return the key itself.
|
|
91
|
+
return text && text !== key ? fill(text, params) : fill(DEFAULT_WORKFLOW_STRINGS[key], params);
|
|
92
|
+
}, [translate]);
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=WorkflowI18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useCallback","useContext","jsx","_jsx","DEFAULT_WORKFLOW_STRINGS","fill","text","params","replace","match","name","String","englishTranslate","_key","defaultValue","WorkflowI18nContext","WorkflowI18nProvider","translate","children","Provider","value","useWorkflowT","key"],"sourceRoot":"../../../src","sources":["i18n/WorkflowI18n.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
4
|
+
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
/** Native: the vector-icon fonts the wallet already bundles. */
|
|
7
|
+
export function VectorIcon({
|
|
8
|
+
set = 'material',
|
|
9
|
+
name,
|
|
10
|
+
size,
|
|
11
|
+
color,
|
|
12
|
+
style
|
|
13
|
+
}) {
|
|
14
|
+
const Family = set === 'material-community' ? MaterialCommunityIcons : MaterialIcons;
|
|
15
|
+
// vector-icons' typings use the old @types/react-native StyleProp; same runtime shape.
|
|
16
|
+
return /*#__PURE__*/_jsx(Family, {
|
|
17
|
+
name: name,
|
|
18
|
+
size: size,
|
|
19
|
+
color: color,
|
|
20
|
+
style: style
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=VectorIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MaterialCommunityIcons","MaterialIcons","jsx","_jsx","VectorIcon","set","name","size","color","style","Family"],"sourceRoot":"../../../src","sources":["icons/VectorIcon.tsx"],"mappings":";;AAAA,OAAOA,sBAAsB,MAAM,kDAAkD;AACrF,OAAOC,aAAa,MAAM,yCAAyC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGnE;AACA,OAAO,SAASC,UAAUA,CAAC;EAAEC,GAAG,GAAG,UAAU;EAAEC,IAAI;EAAEC,IAAI;EAAEC,KAAK;EAAEC;AAAyB,CAAC,EAAE;EAC5F,MAAMC,MAAM,GAAGL,GAAG,KAAK,oBAAoB,GAAGL,sBAAsB,GAAGC,aAAa;EACpF;EACA,oBAAOE,IAAA,CAACO,MAAM;IAACJ,IAAI,EAAEA,IAAK;IAACC,IAAI,EAAEA,IAAK;IAACC,KAAK,EAAEA,KAAM;IAACC,KAAK,EAAEA;EAAe,CAAE,CAAC;AAChF","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text } from 'react-native';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
/**
|
|
6
|
+
* Web: `react-native-vector-icons` can't load in a browser (Flow source and a
|
|
7
|
+
* native TurboModule lookup at import time), so the glyphs the controls use are
|
|
8
|
+
* drawn as text in the same fonts. The host page loads the fonts once:
|
|
9
|
+
*
|
|
10
|
+
* @font-face { font-family: 'MaterialIcons'; src: url(react-native-vector-icons/Fonts/MaterialIcons.ttf); }
|
|
11
|
+
* @font-face { font-family: 'MaterialCommunityIcons'; src: url(react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf); }
|
|
12
|
+
*
|
|
13
|
+
* Or replace icons entirely with `WorkflowIconProvider`. Names not listed here
|
|
14
|
+
* draw nothing; add a codepoint when a control starts using a new icon
|
|
15
|
+
* (`icons.test.tsx` checks every name the controls use).
|
|
16
|
+
*/
|
|
17
|
+
export const WEB_GLYPHS = {
|
|
18
|
+
material: {
|
|
19
|
+
phone: 57549,
|
|
20
|
+
share: 59405,
|
|
21
|
+
check: 58826,
|
|
22
|
+
info: 59534,
|
|
23
|
+
warning: 57346,
|
|
24
|
+
error: 57344,
|
|
25
|
+
'check-circle': 59500,
|
|
26
|
+
cancel: 58825
|
|
27
|
+
},
|
|
28
|
+
'material-community': {
|
|
29
|
+
'qrcode-scan': 984115,
|
|
30
|
+
'image-off-outline': 987601,
|
|
31
|
+
'camera-retake-outline': 986650,
|
|
32
|
+
'camera-outline': 986461
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const FONT_FAMILY = {
|
|
36
|
+
material: 'MaterialIcons',
|
|
37
|
+
'material-community': 'MaterialCommunityIcons'
|
|
38
|
+
};
|
|
39
|
+
export function VectorIcon({
|
|
40
|
+
set = 'material',
|
|
41
|
+
name,
|
|
42
|
+
size,
|
|
43
|
+
color,
|
|
44
|
+
style
|
|
45
|
+
}) {
|
|
46
|
+
const codepoint = WEB_GLYPHS[set][name];
|
|
47
|
+
if (codepoint === undefined) return null;
|
|
48
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
49
|
+
selectable: false,
|
|
50
|
+
style: [{
|
|
51
|
+
fontSize: size,
|
|
52
|
+
color,
|
|
53
|
+
lineHeight: size
|
|
54
|
+
}, style, {
|
|
55
|
+
fontFamily: FONT_FAMILY[set],
|
|
56
|
+
fontWeight: 'normal',
|
|
57
|
+
fontStyle: 'normal'
|
|
58
|
+
}],
|
|
59
|
+
children: String.fromCodePoint(codepoint)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=VectorIcon.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","jsx","_jsx","WEB_GLYPHS","material","phone","share","check","info","warning","error","cancel","FONT_FAMILY","VectorIcon","set","name","size","color","style","codepoint","undefined","selectable","fontSize","lineHeight","fontFamily","fontWeight","fontStyle","children","String","fromCodePoint"],"sourceRoot":"../../../src","sources":["icons/VectorIcon.web.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAA2D,GAAG;EACzEC,QAAQ,EAAE;IACRC,KAAK,EAAE,KAAK;IACZC,KAAK,EAAE,KAAK;IACZC,KAAK,EAAE,KAAK;IACZC,IAAI,EAAE,KAAK;IACXC,OAAO,EAAE,KAAK;IACdC,KAAK,EAAE,KAAK;IACZ,cAAc,EAAE,KAAK;IACrBC,MAAM,EAAE;EACV,CAAC;EACD,oBAAoB,EAAE;IACpB,aAAa,EAAE,MAAM;IACrB,mBAAmB,EAAE,MAAM;IAC3B,uBAAuB,EAAE,MAAM;IAC/B,gBAAgB,EAAE;EACpB;AACF,CAAC;AAED,MAAMC,WAA4C,GAAG;EACnDR,QAAQ,EAAE,eAAe;EACzB,oBAAoB,EAAE;AACxB,CAAC;AAED,OAAO,SAASS,UAAUA,CAAC;EAAEC,GAAG,GAAG,UAAU;EAAEC,IAAI;EAAEC,IAAI;EAAEC,KAAK;EAAEC;AAAyB,CAAC,EAAE;EAC5F,MAAMC,SAAS,GAAGhB,UAAU,CAACW,GAAG,CAAC,CAACC,IAAI,CAAC;EACvC,IAAII,SAAS,KAAKC,SAAS,EAAE,OAAO,IAAI;EACxC,oBACElB,IAAA,CAACF,IAAI;IACHqB,UAAU,EAAE,KAAM;IAClBH,KAAK,EAAE,CACL;MAAEI,QAAQ,EAAEN,IAAI;MAAEC,KAAK;MAAEM,UAAU,EAAEP;IAAK,CAAC,EAC3CE,KAAK,EACL;MAAEM,UAAU,EAAEZ,WAAW,CAACE,GAAG,CAAC;MAAEW,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAE;IAAS,CAAC,CAC3E;IAAAC,QAAA,EAEDC,MAAM,CAACC,aAAa,CAACV,SAAS;EAAC,CAC5B,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
import { VectorIcon } from './VectorIcon';
|
|
5
|
+
|
|
6
|
+
/** Draws one icon. Return `null` to fall back to the built-in vector icons. */
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
const WorkflowIconContext = /*#__PURE__*/createContext(null);
|
|
9
|
+
/**
|
|
10
|
+
* Replaces the icons every control draws (e.g. the designer can use its own
|
|
11
|
+
* icon set). Without it, controls use `react-native-vector-icons` on native,
|
|
12
|
+
* like the wallet, and the same fonts drawn as text on the web (the page loads
|
|
13
|
+
* the fonts; see `VectorIcon.web.tsx`).
|
|
14
|
+
*/
|
|
15
|
+
export function WorkflowIconProvider({
|
|
16
|
+
renderIcon,
|
|
17
|
+
children
|
|
18
|
+
}) {
|
|
19
|
+
return /*#__PURE__*/_jsx(WorkflowIconContext.Provider, {
|
|
20
|
+
value: renderIcon,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The one place controls draw icons. */
|
|
26
|
+
export function WorkflowIcon(props) {
|
|
27
|
+
const renderIcon = useContext(WorkflowIconContext);
|
|
28
|
+
const custom = renderIcon?.(props);
|
|
29
|
+
if (custom != null) return /*#__PURE__*/_jsx(_Fragment, {
|
|
30
|
+
children: custom
|
|
31
|
+
});
|
|
32
|
+
return /*#__PURE__*/_jsx(VectorIcon, {
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=WorkflowIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","VectorIcon","jsx","_jsx","Fragment","_Fragment","WorkflowIconContext","WorkflowIconProvider","renderIcon","children","Provider","value","WorkflowIcon","props","custom"],"sourceRoot":"../../../src","sources":["icons/WorkflowIcon.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAkBC,UAAU,QAAQ,OAAO;AAEjE,SAASC,UAAU,QAAQ,cAAc;;AAIzC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAGA,MAAMC,mBAAmB,gBAAGP,aAAa,CAA8B,IAAI,CAAC;AAI5E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,oBAAoBA,CAAC;EAAEC,UAAU;EAAEC;AAAoC,CAAC,EAAE;EACxF,oBAAON,IAAA,CAACG,mBAAmB,CAACI,QAAQ;IAACC,KAAK,EAAEH,UAAW;IAAAC,QAAA,EAAEA;EAAQ,CAA+B,CAAC;AACnG;;AAEA;AACA,OAAO,SAASG,YAAYA,CAACC,KAAwB,EAAE;EACrD,MAAML,UAAU,GAAGR,UAAU,CAACM,mBAAmB,CAAC;EAClD,MAAMQ,MAAM,GAAGN,UAAU,GAAGK,KAAK,CAAC;EAClC,IAAIC,MAAM,IAAI,IAAI,EAAE,oBAAOX,IAAA,CAAAE,SAAA;IAAAI,QAAA,EAAGK;EAAM,CAAG,CAAC;EACxC,oBAAOX,IAAA,CAACF,UAAU;IAAA,GAAKY;EAAK,CAAG,CAAC;AAClC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["icons/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Deduped Image.prefetch for workflow tile/card URLs.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Image } from 'react-native';
|
|
8
|
+
const prefetched = new Set();
|
|
9
|
+
const inflight = new Set();
|
|
10
|
+
export function prefetchImageUri(uri) {
|
|
11
|
+
const trimmed = uri?.trim();
|
|
12
|
+
if (!trimmed || !trimmed.startsWith('http')) return;
|
|
13
|
+
if (prefetched.has(trimmed) || inflight.has(trimmed)) return;
|
|
14
|
+
inflight.add(trimmed);
|
|
15
|
+
void Image.prefetch(trimmed).then(() => {
|
|
16
|
+
prefetched.add(trimmed);
|
|
17
|
+
}).catch(() => {}).finally(() => inflight.delete(trimmed));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Test-only. */
|
|
21
|
+
export function clearImageUriCache() {
|
|
22
|
+
prefetched.clear();
|
|
23
|
+
inflight.clear();
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=imageUriCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Image","prefetched","Set","inflight","prefetchImageUri","uri","trimmed","trim","startsWith","has","add","prefetch","then","catch","finally","delete","clearImageUriCache","clear"],"sourceRoot":"../../src","sources":["imageUriCache.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,cAAc;AAEpC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAS,CAAC;AACpC,MAAMC,QAAQ,GAAG,IAAID,GAAG,CAAS,CAAC;AAElC,OAAO,SAASE,gBAAgBA,CAACC,GAAuB,EAAQ;EAC9D,MAAMC,OAAO,GAAGD,GAAG,EAAEE,IAAI,CAAC,CAAC;EAC3B,IAAI,CAACD,OAAO,IAAI,CAACA,OAAO,CAACE,UAAU,CAAC,MAAM,CAAC,EAAE;EAC7C,IAAIP,UAAU,CAACQ,GAAG,CAACH,OAAO,CAAC,IAAIH,QAAQ,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EACtDH,QAAQ,CAACO,GAAG,CAACJ,OAAO,CAAC;EACrB,KAAKN,KAAK,CAACW,QAAQ,CAACL,OAAO,CAAC,CACzBM,IAAI,CAAC,MAAM;IACVX,UAAU,CAACS,GAAG,CAACJ,OAAO,CAAC;EACzB,CAAC,CAAC,CACDO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACfC,OAAO,CAAC,MAAMX,QAAQ,CAACY,MAAM,CAACT,OAAO,CAAC,CAAC;AAC5C;;AAEA;AACA,OAAO,SAASU,kBAAkBA,CAAA,EAAS;EACzCf,UAAU,CAACgB,KAAK,CAAC,CAAC;EAClBd,QAAQ,CAACc,KAAK,CAAC,CAAC;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @veridid/workflow-ui
|
|
5
|
+
*
|
|
6
|
+
* React Native components for workflow display hints. Written once with React
|
|
7
|
+
* Native primitives:
|
|
8
|
+
* - the DigiCred wallet renders them natively (Metro)
|
|
9
|
+
* - the CrMS designer renders them through react-native-web (Vite)
|
|
10
|
+
*
|
|
11
|
+
* The wallet is the reference renderer. Device-only controls (camera, barcode,
|
|
12
|
+
* location, …) get a `.web.tsx` placeholder and talk to the device through an
|
|
13
|
+
* adapter, never through a native module imported directly.
|
|
14
|
+
*/
|
|
15
|
+
export { CONTRACT_VERSION } from '@veridid/workflow-core';
|
|
16
|
+
// App providers: theme, translations, icons, device and credential access, popups
|
|
17
|
+
|
|
18
|
+
export { createSimulatedWalletAdapter, SIMULATED_LOCATION, SIMULATED_PHOTO_URI, useWalletAdapter, WalletAdapterProvider } from "./adapter/WalletAdapter.js";
|
|
19
|
+
export { default as WorkflowButtonLabel } from "./components/WorkflowButtonLabel.js";
|
|
20
|
+
// Building blocks for host-rendered controls
|
|
21
|
+
|
|
22
|
+
export { default as WorkflowText, WORKFLOW_TEXT_BASE_SIZES } from "./components/WorkflowText.js";
|
|
23
|
+
export { coerceToChipRowItem } from "./content/ChipRowContent.js";
|
|
24
|
+
export { isFormFieldChild } from "./content/FormContent.js";
|
|
25
|
+
export { DEFAULT_WORKFLOW_STRINGS, useWorkflowT, WorkflowI18nProvider } from "./i18n/WorkflowI18n.js";
|
|
26
|
+
export { WorkflowIcon, WorkflowIconProvider } from "./icons/WorkflowIcon.js";
|
|
27
|
+
export { clearImageUriCache, prefetchImageUri } from "./imageUriCache.js";
|
|
28
|
+
export { useModalPosition, WorkflowModal, WorkflowModalHost } from "./modal/WorkflowModal.js";
|
|
29
|
+
export { platformName } from './platform/platformName';
|
|
30
|
+
export { clearControlSnapshots } from "./protocol/controlSnapshotStore.js";
|
|
31
|
+
// Registries: map a display-hint `type` to its renderer
|
|
32
|
+
|
|
33
|
+
export { ContentRegistry } from "./registries/ContentRegistry.js";
|
|
34
|
+
export { FormFieldRegistry } from "./registries/FormFieldRegistry.js";
|
|
35
|
+
// Rendering a screen: RenderTree + optional provider for expressions and designer hooks
|
|
36
|
+
|
|
37
|
+
export { deriveNode, resolveNode } from "./render/nodes.js";
|
|
38
|
+
export { RenderTree } from "./render/RenderTree.js";
|
|
39
|
+
export { WorkflowRenderProvider } from "./render/WorkflowRenderContext.js";
|
|
40
|
+
// Providers the host app wraps the workflow screen in
|
|
41
|
+
|
|
42
|
+
export { ResponsiveProvider, ResponsiveRule, useDigiCredStyles, useResponsive } from "./responsive/index.js";
|
|
43
|
+
export * from "./style/resolveDisplayHintStyle.js";
|
|
44
|
+
export { DEFAULT_WORKFLOW_THEME, mergeWorkflowTheme, useWorkflowTheme, WorkflowThemeProvider } from "./theme/WorkflowTheme.js";
|
|
45
|
+
export { useRegisterTitleGroupScale, useWorkflowTitleScale, WorkflowFontScaleProvider } from "./WorkflowFontScaleContext.js";
|
|
46
|
+
|
|
47
|
+
// Side effects: register the built-in form fields and content components.
|
|
48
|
+
import "./form-fields/index.js";
|
|
49
|
+
import "./content/index.js";
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CONTRACT_VERSION","createSimulatedWalletAdapter","SIMULATED_LOCATION","SIMULATED_PHOTO_URI","useWalletAdapter","WalletAdapterProvider","default","WorkflowButtonLabel","WorkflowText","WORKFLOW_TEXT_BASE_SIZES","coerceToChipRowItem","isFormFieldChild","DEFAULT_WORKFLOW_STRINGS","useWorkflowT","WorkflowI18nProvider","WorkflowIcon","WorkflowIconProvider","clearImageUriCache","prefetchImageUri","useModalPosition","WorkflowModal","WorkflowModalHost","platformName","clearControlSnapshots","ContentRegistry","FormFieldRegistry","deriveNode","resolveNode","RenderTree","WorkflowRenderProvider","ResponsiveProvider","ResponsiveRule","useDigiCredStyles","useResponsive","DEFAULT_WORKFLOW_THEME","mergeWorkflowTheme","useWorkflowTheme","WorkflowThemeProvider","useRegisterTitleGroupScale","useWorkflowTitleScale","WorkflowFontScaleProvider"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,wBAAwB;AACzD;;AAeA,SACEC,4BAA4B,EAC5BC,kBAAkB,EAClBC,mBAAmB,EACnBC,gBAAgB,EAChBC,qBAAqB,QAChB,4BAAyB;AAChC,SAASC,OAAO,IAAIC,mBAAmB,QAAQ,qCAAkC;AACjF;;AAEA,SAASD,OAAO,IAAIE,YAAY,EAAEC,wBAAwB,QAAQ,8BAA2B;AAC7F,SAASC,mBAAmB,QAAQ,6BAA0B;AAC9D,SAASC,gBAAgB,QAAQ,0BAAuB;AAExD,SAASC,wBAAwB,EAAEC,YAAY,EAAEC,oBAAoB,QAAQ,wBAAqB;AAOlG,SAASC,YAAY,EAAEC,oBAAoB,QAAQ,yBAAsB;AACzE,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,oBAAiB;AAEtE,SAASC,gBAAgB,EAAEC,aAAa,EAAEC,iBAAiB,QAAQ,0BAAuB;AAC1F,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,qBAAqB,QAAQ,oCAAiC;AACvE;;AAEA,SAASC,eAAe,QAAQ,iCAA8B;AAE9D,SAASC,iBAAiB,QAAQ,mCAAgC;AAClE;;AAEA,SAASC,UAAU,EAAEC,WAAW,QAAQ,mBAAgB;AAExD,SAASC,UAAU,QAAQ,wBAAqB;AAMhD,SAASC,sBAAsB,QAAQ,mCAAgC;AACvE;;AAEA,SAASC,kBAAkB,EAAEC,cAAc,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,uBAAc;AACnG,cAAc,oCAAiC;AAQ/C,SACEC,sBAAsB,EACtBC,kBAAkB,EAClBC,gBAAgB,EAChBC,qBAAqB,QAChB,0BAAuB;AAC9B,SACEC,0BAA0B,EAC1BC,qBAAqB,EACrBC,yBAAyB,QACpB,+BAA4B;;AAEnC;AACA,OAAO,wBAAe;AACtB,OAAO,oBAAW","ignoreList":[]}
|