@veridid/workflow-ui 0.0.0-stage → 0.1.0
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 +202 -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 +107 -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/WorkflowIcon.js +50 -0
- package/build/module/icons/WorkflowIcon.js.map +1 -0
- package/build/module/imageUriCache.js +25 -0
- package/build/module/imageUriCache.js.map +1 -0
- package/build/module/index.js +49 -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/WorkflowIcon.d.ts +27 -0
- package/build/typescript/icons/WorkflowIcon.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 +47 -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 +101 -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/WorkflowIcon.tsx +43 -0
- package/src/imageUriCache.ts +27 -0
- package/src/index.ts +96 -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,75 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* English text for every string the workflow controls show. Keys match the
|
|
4
|
+
* wallet's i18n keys (`Workflow.*`, `Global.*`), so the wallet can pass its own
|
|
5
|
+
* translate function straight through; new keys use the `WorkflowUi.*` prefix.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_WORKFLOW_STRINGS: {
|
|
8
|
+
readonly 'Global.Decline': "Decline";
|
|
9
|
+
readonly 'Workflow.CredentialOffer': "Credential offer";
|
|
10
|
+
readonly 'Workflow.ProofRequest': "Proof request";
|
|
11
|
+
readonly 'Workflow.AcceptCredential': "Accept credential";
|
|
12
|
+
readonly 'Workflow.PresentProof': "Present proof";
|
|
13
|
+
readonly 'Workflow.WaitingForOffer': "Waiting for the credential offer…";
|
|
14
|
+
readonly 'Workflow.ReceivingCredential': "Receiving credential…";
|
|
15
|
+
readonly 'Workflow.CredentialReceived': "Credential received";
|
|
16
|
+
readonly 'Workflow.OfferDeclined': "Offer declined";
|
|
17
|
+
readonly 'Workflow.OfferFailed': "Something went wrong receiving the credential";
|
|
18
|
+
readonly 'Workflow.WaitingForProofRequest': "Waiting for the proof request…";
|
|
19
|
+
readonly 'Workflow.PresentingProof': "Presenting proof…";
|
|
20
|
+
readonly 'Workflow.ProofPresented': "Proof presented";
|
|
21
|
+
readonly 'Workflow.ProofDeclined': "Proof request declined";
|
|
22
|
+
readonly 'Workflow.ProofFailed': "Something went wrong presenting the proof";
|
|
23
|
+
readonly 'WorkflowUi.Select': "Select...";
|
|
24
|
+
readonly 'WorkflowUi.SelectDate': "Select date...";
|
|
25
|
+
readonly 'WorkflowUi.Submit': "Submit";
|
|
26
|
+
readonly 'WorkflowUi.Done': "Done";
|
|
27
|
+
readonly 'WorkflowUi.Error': "Error";
|
|
28
|
+
readonly 'WorkflowUi.InvalidLink': "Invalid link";
|
|
29
|
+
readonly 'WorkflowUi.InvalidLinkMessage': "Only http(s) links are supported.";
|
|
30
|
+
readonly 'WorkflowUi.LinkFailed': "Unable to open link";
|
|
31
|
+
readonly 'WorkflowUi.TakePhoto': "Take a photo";
|
|
32
|
+
readonly 'WorkflowUi.Retake': "Retake";
|
|
33
|
+
readonly 'WorkflowUi.PhotoFailed': "Failed to take photo. Please try again.";
|
|
34
|
+
readonly 'WorkflowUi.ScanCode': "Scan QR code";
|
|
35
|
+
readonly 'WorkflowUi.ShareLocation': "Share location";
|
|
36
|
+
readonly 'WorkflowUi.LocationUnavailable': "Location unavailable";
|
|
37
|
+
readonly 'WorkflowUi.LocationUnavailableMessage': "Could not get your current GPS position. Turn on Location / GPS and try again.";
|
|
38
|
+
readonly 'WorkflowUi.MyLocation': "My location coordinates:";
|
|
39
|
+
readonly 'WorkflowUi.Share': "Share";
|
|
40
|
+
readonly 'WorkflowUi.ShareFailed': "Failed to share content";
|
|
41
|
+
readonly 'WorkflowUi.ReportTitle': "DigiCred Wallet Report";
|
|
42
|
+
readonly 'WorkflowUi.Responses': "Responses:";
|
|
43
|
+
readonly 'WorkflowUi.NoData': "No data entered yet.";
|
|
44
|
+
readonly 'WorkflowUi.AddToCalendar': "Add to Calendar";
|
|
45
|
+
readonly 'WorkflowUi.InvalidDate': "Invalid date";
|
|
46
|
+
readonly 'WorkflowUi.InvalidDateMessage': "This event is missing a valid start or end time.";
|
|
47
|
+
readonly 'WorkflowUi.CalendarAdded': "Event added to your calendar!";
|
|
48
|
+
readonly 'WorkflowUi.CalendarFailed': "Failed to add event to calendar.";
|
|
49
|
+
readonly 'WorkflowUi.Event': "Event";
|
|
50
|
+
readonly 'WorkflowUi.Location': "Location";
|
|
51
|
+
readonly 'WorkflowUi.OpenInMaps': "Tap to open in Maps";
|
|
52
|
+
readonly 'WorkflowUi.VideoFailed': "Failed to load video";
|
|
53
|
+
readonly 'WorkflowUi.Simulated': "Simulated on the web";
|
|
54
|
+
readonly 'WorkflowUi.OpenBadge': "Open badge";
|
|
55
|
+
readonly 'WorkflowUi.OpenBadgeDescription': "Preview of the badge signed onto this artifact. Tap {{label}} to accept and store it.";
|
|
56
|
+
readonly 'WorkflowUi.AddToWallet': "Add to Wallet";
|
|
57
|
+
};
|
|
58
|
+
export type WorkflowStringKey = keyof typeof DEFAULT_WORKFLOW_STRINGS;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the text for `key`. `defaultValue` is the English text; `params`
|
|
61
|
+
* fill `{{name}}` placeholders. Same shape as i18next's `t(key, { defaultValue, ...params })`.
|
|
62
|
+
*/
|
|
63
|
+
export type WorkflowTranslate = (key: string, defaultValue: string, params?: Record<string, string | number>) => string;
|
|
64
|
+
export type WorkflowI18nProviderProps = {
|
|
65
|
+
translate: WorkflowTranslate;
|
|
66
|
+
children?: ReactNode;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Supplies translations for the workflow controls. Without it they show
|
|
70
|
+
* English. Wallet: `translate={(key, defaultValue, params) => t(key, { defaultValue, ...params })}`.
|
|
71
|
+
*/
|
|
72
|
+
export declare function WorkflowI18nProvider({ translate, children }: WorkflowI18nProviderProps): import("react").JSX.Element;
|
|
73
|
+
/** `t('Global.Decline')` returns the translated text, falling back to English. */
|
|
74
|
+
export declare function useWorkflowT(): (key: WorkflowStringKey, params?: Record<string, string | number>) => string;
|
|
75
|
+
//# sourceMappingURL=WorkflowI18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowI18n.d.ts","sourceRoot":"","sources":["../../../src/i18n/WorkflowI18n.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA2B,MAAM,OAAO,CAAA;AAE9E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD3B,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,wBAAwB,CAAA;AAErE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAA;AAWvH,MAAM,MAAM,yBAAyB,GAAG;IAAE,SAAS,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAE9F;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,yBAAyB,+BAEtF;AAED,kFAAkF;AAClF,wBAAgB,YAAY,IAAI,CAAC,GAAG,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAU3G"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, TextStyle } from 'react-native';
|
|
3
|
+
/** Icon families the controls use (names are the vector-icons names). */
|
|
4
|
+
export type WorkflowIconSet = 'material' | 'material-community';
|
|
5
|
+
export type WorkflowIconProps = {
|
|
6
|
+
name: string;
|
|
7
|
+
/** Default `material`. */
|
|
8
|
+
set?: WorkflowIconSet;
|
|
9
|
+
size: number;
|
|
10
|
+
color: string;
|
|
11
|
+
style?: StyleProp<TextStyle>;
|
|
12
|
+
};
|
|
13
|
+
/** Draws one icon. Return `null` to fall back to the built-in vector icons. */
|
|
14
|
+
export type WorkflowIconRenderer = (props: WorkflowIconProps) => ReactNode | null;
|
|
15
|
+
export type WorkflowIconProviderProps = {
|
|
16
|
+
renderIcon: WorkflowIconRenderer;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Replaces the icons every control draws (e.g. the designer can use its own
|
|
21
|
+
* icon set instead of loading the vector-icon fonts). Without it, controls use
|
|
22
|
+
* `react-native-vector-icons`, like the wallet.
|
|
23
|
+
*/
|
|
24
|
+
export declare function WorkflowIconProvider({ renderIcon, children }: WorkflowIconProviderProps): import("react").JSX.Element;
|
|
25
|
+
/** The one place controls draw icons. */
|
|
26
|
+
export declare function WorkflowIcon(props: WorkflowIconProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=WorkflowIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/WorkflowIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxD,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,oBAAoB,CAAA;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,0BAA0B;IAC1B,GAAG,CAAC,EAAE,eAAe,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,+EAA+E;AAC/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,GAAG,IAAI,CAAA;AAIjF,MAAM,MAAM,yBAAyB,GAAG;IAAE,UAAU,EAAE,oBAAoB,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAElG;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,yBAAyB,+BAEvF;AAED,yCAAyC;AACzC,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAQpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageUriCache.d.ts","sourceRoot":"","sources":["../../src/imageUriCache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAW9D;AAED,iBAAiB;AACjB,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @veridid/workflow-ui
|
|
3
|
+
*
|
|
4
|
+
* React Native components for workflow display hints. Written once with React
|
|
5
|
+
* Native primitives:
|
|
6
|
+
* - the DigiCred wallet renders them natively (Metro)
|
|
7
|
+
* - the CrMS designer renders them through react-native-web (Vite)
|
|
8
|
+
*
|
|
9
|
+
* The wallet is the reference renderer. Device-only controls (camera, barcode,
|
|
10
|
+
* location, …) get a `.web.tsx` placeholder and talk to the device through an
|
|
11
|
+
* adapter, never through a native module imported directly.
|
|
12
|
+
*/
|
|
13
|
+
export { CONTRACT_VERSION } from '@veridid/workflow-core';
|
|
14
|
+
export type { CalendarEvent, Coordinates, CredentialCardRequest, ExchangeAttribute, ExchangeKind, ExchangeRecord, ExchangeStatus, ShareRequest, SimulatedWalletOptions, VideoPlayerProps, WalletAdapter, WalletAdapterProviderProps, } from './adapter/WalletAdapter.js';
|
|
15
|
+
export { createSimulatedWalletAdapter, SIMULATED_LOCATION, SIMULATED_PHOTO_URI, useWalletAdapter, WalletAdapterProvider, } from './adapter/WalletAdapter.js';
|
|
16
|
+
export { default as WorkflowButtonLabel } from './components/WorkflowButtonLabel.js';
|
|
17
|
+
export type { WorkflowTextProps } from './components/WorkflowText.js';
|
|
18
|
+
export { default as WorkflowText, WORKFLOW_TEXT_BASE_SIZES } from './components/WorkflowText.js';
|
|
19
|
+
export { isFormFieldChild } from './content/FormContent.js';
|
|
20
|
+
export type { WorkflowI18nProviderProps, WorkflowStringKey, WorkflowTranslate } from './i18n/WorkflowI18n.js';
|
|
21
|
+
export { DEFAULT_WORKFLOW_STRINGS, useWorkflowT, WorkflowI18nProvider } from './i18n/WorkflowI18n.js';
|
|
22
|
+
export type { WorkflowIconProps, WorkflowIconProviderProps, WorkflowIconRenderer, WorkflowIconSet, } from './icons/WorkflowIcon.js';
|
|
23
|
+
export { WorkflowIcon, WorkflowIconProvider } from './icons/WorkflowIcon.js';
|
|
24
|
+
export { clearImageUriCache, prefetchImageUri } from './imageUriCache.js';
|
|
25
|
+
export type { WorkflowModalHostProps, WorkflowModalProps } from './modal/WorkflowModal.js';
|
|
26
|
+
export { useModalPosition, WorkflowModal, WorkflowModalHost } from './modal/WorkflowModal.js';
|
|
27
|
+
export { platformName } from './platform/platformName';
|
|
28
|
+
export { clearControlSnapshots } from './protocol/controlSnapshotStore.js';
|
|
29
|
+
export type { ContentProps, ContentRenderer } from './registries/ContentRegistry.js';
|
|
30
|
+
export { ContentRegistry } from './registries/ContentRegistry.js';
|
|
31
|
+
export type { FormFieldProps, FormFieldRenderer } from './registries/FormFieldRegistry.js';
|
|
32
|
+
export { FormFieldRegistry } from './registries/FormFieldRegistry.js';
|
|
33
|
+
export type { WorkflowNode, WorkflowNodePath } from './render/nodes.js';
|
|
34
|
+
export { deriveNode, resolveNode } from './render/nodes.js';
|
|
35
|
+
export type { RenderTreeProps } from './render/RenderTree.js';
|
|
36
|
+
export { RenderTree } from './render/RenderTree.js';
|
|
37
|
+
export type { WorkflowNodeInfo, WorkflowRenderOptions, WorkflowRenderProviderProps, } from './render/WorkflowRenderContext.js';
|
|
38
|
+
export { WorkflowRenderProvider } from './render/WorkflowRenderContext.js';
|
|
39
|
+
export type { ResponsiveContext, ResponsiveProviderProps, ScreenSize } from './responsive/index.js';
|
|
40
|
+
export { ResponsiveProvider, ResponsiveRule, useDigiCredStyles, useResponsive } from './responsive/index.js';
|
|
41
|
+
export * from './style/resolveDisplayHintStyle.js';
|
|
42
|
+
export type { WorkflowCardColors, WorkflowColors, WorkflowTheme, WorkflowThemeOverrides, WorkflowThemeProviderProps, } from './theme/WorkflowTheme.js';
|
|
43
|
+
export { DEFAULT_WORKFLOW_THEME, mergeWorkflowTheme, useWorkflowTheme, WorkflowThemeProvider, } from './theme/WorkflowTheme.js';
|
|
44
|
+
export { useRegisterTitleGroupScale, useWorkflowTitleScale, WorkflowFontScaleProvider, } from './WorkflowFontScaleContext.js';
|
|
45
|
+
import './form-fields/index.js';
|
|
46
|
+
import './content/index.js';
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,YAAY,EACV,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,0BAA0B,GAC3B,MAAM,4BAAyB,CAAA;AAChC,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,4BAAyB,CAAA;AAChC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qCAAkC,CAAA;AAEjF,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA2B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,wBAAwB,EAAE,MAAM,8BAA2B,CAAA;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAAuB,CAAA;AACxD,YAAY,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAqB,CAAA;AAC1G,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAqB,CAAA;AAClG,YAAY,EACV,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,GAChB,MAAM,yBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAsB,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAiB,CAAA;AACtE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,0BAAuB,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAA;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAiC,CAAA;AAEvE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iCAA8B,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iCAA8B,CAAA;AAC9D,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mCAAgC,CAAA;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAgC,CAAA;AAElE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAgB,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAgB,CAAA;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAqB,CAAA;AAChD,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,mCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAgC,CAAA;AAEvE,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,uBAAc,CAAA;AAC1F,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAc,CAAA;AACnG,cAAc,oCAAiC,CAAA;AAC/C,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,0BAAuB,CAAA;AAC9B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,0BAAuB,CAAA;AAC9B,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,+BAA4B,CAAA;AAGnC,OAAO,wBAAe,CAAA;AACtB,OAAO,oBAAW,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ModalProps, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
type Origin = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export type WorkflowModalHostProps = {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Optional. Popups (dropdown list, date sheet) of the controls inside open
|
|
13
|
+
* over this view instead of over the whole window. The designer wraps its
|
|
14
|
+
* phone frame in it, so a dropdown stays inside the phone and the rest of
|
|
15
|
+
* the designer remains usable. Put it outside any ScrollView.
|
|
16
|
+
*/
|
|
17
|
+
export declare function WorkflowModalHost({ children, style }: WorkflowModalHostProps): import("react").JSX.Element;
|
|
18
|
+
export type WorkflowModalProps = Pick<ModalProps, 'visible' | 'transparent' | 'animationType' | 'onRequestClose'> & {
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* React Native's `Modal`, or a layer in the nearest {@link WorkflowModalHost}
|
|
23
|
+
* when there is one. Same props as the subset of `Modal` the controls use.
|
|
24
|
+
*/
|
|
25
|
+
export declare function WorkflowModal({ visible, transparent, animationType, onRequestClose, children }: WorkflowModalProps): import("react").JSX.Element | null;
|
|
26
|
+
/**
|
|
27
|
+
* Converts a window position (from `measureInWindow`) into the coordinate
|
|
28
|
+
* space popups are drawn in: the host's when there is one, the window's
|
|
29
|
+
* otherwise.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useModalPosition(): (window: Origin, callback: (local: Origin) => void) => void;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=WorkflowModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowModal.d.ts","sourceRoot":"","sources":["../../../src/modal/WorkflowModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;AACd,OAAO,EAAS,KAAK,UAAU,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAEvG,KAAK,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAWtC,MAAM,MAAM,sBAAsB,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,CAAA;AAE3F;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,sBAAsB,+BAoC5E;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC,GAAG;IAClH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,kBAAkB,sCAmBlH;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAS9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native implementation (wallet). The web build ships `platformName.web.ts`
|
|
3
|
+
* next to this file; Metro picks this one, Vite (with `.web.*` extensions
|
|
4
|
+
* first) picks the web one. Device-only controls use the same pattern so web
|
|
5
|
+
* placeholders never import native modules.
|
|
6
|
+
*/
|
|
7
|
+
export declare const platformName: 'native' | 'web';
|
|
8
|
+
//# sourceMappingURL=platformName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platformName.d.ts","sourceRoot":"","sources":["../../../src/platform/platformName.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,GAAG,KAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platformName.web.d.ts","sourceRoot":"","sources":["../../../src/platform/platformName.web.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,YAAY,EAAE,QAAQ,GAAG,KAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ControlSnapshot {
|
|
2
|
+
phase: string;
|
|
3
|
+
recordId: string | null;
|
|
4
|
+
armedAt: number | null;
|
|
5
|
+
handledIds: string[];
|
|
6
|
+
outcomeSent: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const getControlSnapshot: (key?: string) => ControlSnapshot | undefined;
|
|
9
|
+
export declare const saveControlSnapshot: (key: string | undefined, snapshot: ControlSnapshot) => void;
|
|
10
|
+
/** Forget every saved phase (tests, or a host resetting a preview). */
|
|
11
|
+
export declare const clearControlSnapshots: () => void;
|
|
12
|
+
//# sourceMappingURL=controlSnapshotStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controlSnapshotStore.d.ts","sourceRoot":"","sources":["../../../src/protocol/controlSnapshotStore.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;CACrB;AAID,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,eAAe,GAAG,SAAmD,CAAA;AAEvH,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,GAAG,SAAS,EAAE,UAAU,eAAe,KAAG,IAExF,CAAA;AAED,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,QAAO,IAAyB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ExchangeKind, ExchangeRecord, WalletAdapter } from '../adapter/WalletAdapter.js';
|
|
2
|
+
import type { ContentProps } from '../registries/ContentRegistry.js';
|
|
3
|
+
/**
|
|
4
|
+
* - `ready`: the action buttons show (credential offer / proof request card).
|
|
5
|
+
* - `awaiting`: the user consented; waiting for the offer or request to arrive.
|
|
6
|
+
* - `working`: accepting the offer / presenting the proof.
|
|
7
|
+
* - `done`, `declined`, `error`: final.
|
|
8
|
+
*/
|
|
9
|
+
export type ExchangePhase = 'ready' | 'awaiting' | 'working' | 'done' | 'declined' | 'error';
|
|
10
|
+
type Options = Pick<ContentProps, 'item' | 'onAction' | 'onOutcome' | 'connectionId' | 'persistKey' | 'autoFireCheck'> & {
|
|
11
|
+
kind: ExchangeKind;
|
|
12
|
+
adapter: WalletAdapter;
|
|
13
|
+
/** Default for `item.event` (`accept` for offers, `present` for proofs). */
|
|
14
|
+
defaultEvent: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The shared lifecycle of the credential-offer and proof-presentation
|
|
18
|
+
* controls, moved from the wallet with credo replaced by the adapter.
|
|
19
|
+
*
|
|
20
|
+
* The watcher is armed from mount because the CrMS coordinator usually sends
|
|
21
|
+
* the offer / request as soon as the state is entered (before any tap).
|
|
22
|
+
* Pressing the primary button consents: an arrived record is accepted
|
|
23
|
+
* directly; otherwise the control waits for it and, for event-driven
|
|
24
|
+
* templates only, fires the workflow event to request it. Firing the event
|
|
25
|
+
* when the coordinator also auto-fires would duplicate the exchange, which
|
|
26
|
+
* this control must never do. Outcomes (`accepted`, `error`, decline) go back
|
|
27
|
+
* through `onOutcome` when the host provides it.
|
|
28
|
+
*
|
|
29
|
+
* The phase is kept in the snapshot store under `persistKey`, so leaving and
|
|
30
|
+
* re-entering the screen cannot bring the buttons back.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useProtocolExchange({ kind, adapter, item, onAction, onOutcome, connectionId, persistKey, autoFireCheck, defaultEvent, }: Options): {
|
|
33
|
+
phase: ExchangePhase;
|
|
34
|
+
recordId: string | null;
|
|
35
|
+
record: ExchangeRecord | undefined;
|
|
36
|
+
consent: () => void;
|
|
37
|
+
decline: () => void;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=useProtocolExchange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProtocolExchange.d.ts","sourceRoot":"","sources":["../../../src/protocol/useProtocolExchange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,6BAA0B,CAAA;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAA+B,CAAA;AAGjE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAA;AAO5F,KAAK,OAAO,GAAG,IAAI,CACjB,YAAY,EACZ,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,YAAY,GAAG,eAAe,CACpF,GAAG;IACF,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,aAAa,CAAA;IACtB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,YAAY,GACb,EAAE,OAAO;;;;;;EA2GT"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ContentProps {
|
|
3
|
+
item: {
|
|
4
|
+
type: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
actionID?: string;
|
|
9
|
+
fields?: any[];
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
onAction: (actionId: string, data?: any) => void | Promise<unknown>;
|
|
13
|
+
onOutcome?: (event: string, data?: any) => void;
|
|
14
|
+
persistKey?: string;
|
|
15
|
+
autoFireCheck?: (event: string) => boolean;
|
|
16
|
+
styles: Record<string, any>;
|
|
17
|
+
colors: {
|
|
18
|
+
primary: string;
|
|
19
|
+
text: string;
|
|
20
|
+
background: string;
|
|
21
|
+
border: string;
|
|
22
|
+
buttonText?: string;
|
|
23
|
+
workflowButton?: string;
|
|
24
|
+
workflowButtonText?: string;
|
|
25
|
+
};
|
|
26
|
+
formData?: Record<string, any>;
|
|
27
|
+
onFieldChange?: (name: string, value: any) => void;
|
|
28
|
+
FormFieldRegistry?: any;
|
|
29
|
+
content?: any[];
|
|
30
|
+
buttonVariant?: 'workflow' | 'primary';
|
|
31
|
+
mediaFrame?: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
mode?: 'cover' | 'contain';
|
|
35
|
+
};
|
|
36
|
+
fillContainer?: boolean;
|
|
37
|
+
groupFontScale?: number;
|
|
38
|
+
connectionId?: string;
|
|
39
|
+
context?: Record<string, unknown>;
|
|
40
|
+
artifacts?: Record<string, unknown>;
|
|
41
|
+
catalog?: Record<string, any>;
|
|
42
|
+
/** Merged into chip selection while a filter tap is in flight (browse_programs). */
|
|
43
|
+
optimisticContext?: Record<string, unknown>;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export type ContentRenderer = React.FC<ContentProps>;
|
|
47
|
+
declare class ContentRegistryClass {
|
|
48
|
+
private renderers;
|
|
49
|
+
register(type: string, renderer: ContentRenderer): void;
|
|
50
|
+
get(type: string): ContentRenderer | undefined;
|
|
51
|
+
has(type: string): boolean;
|
|
52
|
+
render(type: string, props: ContentProps): React.ReactNode;
|
|
53
|
+
getTypes(): string[];
|
|
54
|
+
}
|
|
55
|
+
export declare const ContentRegistry: ContentRegistryClass;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=ContentRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentRegistry.d.ts","sourceRoot":"","sources":["../../../src/registries/ContentRegistry.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAA;IAMD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAKnE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;IAK/C,UAAU,CAAC,EAAE,MAAM,CAAA;IAInB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAC5B,CAAA;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAClD,iBAAiB,CAAC,EAAE,GAAG,CAAA;IACvB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAA;IACf,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACtC,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAC3B,CAAA;IACD,aAAa,CAAC,EAAE,OAAO,CAAA;IAKvB,cAAc,CAAC,EAAE,MAAM,CAAA;IAIvB,YAAY,CAAC,EAAE,MAAM,CAAA;IAIrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAK3C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,CAAA;AAEpD,cAAM,oBAAoB;IACxB,OAAO,CAAC,SAAS,CAAqC;IAEtD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe;IAIhD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAI9C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,SAAS;IA2B1D,QAAQ,IAAI,MAAM,EAAE;CAGrB;AAED,eAAO,MAAM,eAAe,sBAA6B,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormFieldProps {
|
|
3
|
+
field: {
|
|
4
|
+
type: string;
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
options?: string[];
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
value: any;
|
|
15
|
+
onChange: (value: any) => void;
|
|
16
|
+
styles: Record<string, any>;
|
|
17
|
+
colors: {
|
|
18
|
+
primary: string;
|
|
19
|
+
text: string;
|
|
20
|
+
background: string;
|
|
21
|
+
border: string;
|
|
22
|
+
buttonText?: string;
|
|
23
|
+
};
|
|
24
|
+
groupFontScale?: number;
|
|
25
|
+
}
|
|
26
|
+
export type FormFieldRenderer = React.FC<FormFieldProps>;
|
|
27
|
+
declare class FormFieldRegistryClass {
|
|
28
|
+
private renderers;
|
|
29
|
+
register(type: string, renderer: FormFieldRenderer): void;
|
|
30
|
+
get(type: string): FormFieldRenderer | undefined;
|
|
31
|
+
has(type: string): boolean;
|
|
32
|
+
render(type: string, props: FormFieldProps): React.ReactNode;
|
|
33
|
+
getTypes(): string[];
|
|
34
|
+
}
|
|
35
|
+
export declare const FormFieldRegistry: FormFieldRegistryClass;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=FormFieldRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldRegistry.d.ts","sourceRoot":"","sources":["../../../src/registries/FormFieldRegistry.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;QAClB,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAA;IACD,KAAK,EAAE,GAAG,CAAA;IACV,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;IAGD,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAGD,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,CAAA;AAGxD,cAAM,sBAAsB;IAC1B,OAAO,CAAC,SAAS,CAAuC;IAExD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB;IAIlD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIhD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,KAAK,CAAC,SAAS;IA0B5D,QAAQ,IAAI,MAAM,EAAE;CAGrB;AAED,eAAO,MAAM,iBAAiB,wBAA+B,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type WorkflowTheme } from '../theme/WorkflowTheme.js';
|
|
3
|
+
import { type WorkflowNode } from './nodes.js';
|
|
4
|
+
export type NodeBoundaryProps = {
|
|
5
|
+
node: WorkflowNode;
|
|
6
|
+
kind: 'content' | 'field';
|
|
7
|
+
/** The control's form values (`ContentProps.formData`); fields read them from context. */
|
|
8
|
+
formData?: Record<string, unknown>;
|
|
9
|
+
/** The screen-busy flag passed to the control. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
render: (item: WorkflowNode, disabled: boolean | undefined, theme: WorkflowTheme) => ReactNode;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Sits around every control the registries render, so each node gets the same
|
|
15
|
+
* treatment wherever it appears (top level, inside a card, a row, a form…):
|
|
16
|
+
*
|
|
17
|
+
* - `disabled: true` on the item disables the control. The engine sets it from
|
|
18
|
+
* `enabledWhen`; before, only chips read it.
|
|
19
|
+
* - Under a `WorkflowRenderProvider` with an `env`: `showWhen`, `enabledWhen`
|
|
20
|
+
* and `{{ }}` are evaluated with workflow-core, with form values as `input`.
|
|
21
|
+
* - Under a `RenderTree` with `renderNodeWrapper`: the designer's wrapper.
|
|
22
|
+
* - `colors` and `styles` default to the `WorkflowThemeProvider` theme.
|
|
23
|
+
*/
|
|
24
|
+
export declare function NodeBoundary({ node, kind, formData, disabled, render }: NodeBoundaryProps): import("react").JSX.Element | null;
|
|
25
|
+
//# sourceMappingURL=NodeBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeBoundary.d.ts","sourceRoot":"","sources":["../../../src/render/NodeBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,2BAAwB,CAAA;AAC7E,OAAO,EAA0D,KAAK,YAAY,EAAE,MAAM,YAAS,CAAA;AAGnG,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,YAAY,CAAA;IAClB,IAAI,EAAE,SAAS,GAAG,OAAO,CAAA;IACzB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,KAAK,EAAE,aAAa,KAAK,SAAS,CAAA;CAC/F,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,sCAyCzF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ContentProps } from '../registries/ContentRegistry.js';
|
|
2
|
+
import { type WorkflowNodePath } from './nodes.js';
|
|
3
|
+
export type RenderTreeProps = Omit<ContentProps, 'item' | 'colors' | 'styles'> & {
|
|
4
|
+
/** Default: the `WorkflowThemeProvider` theme. */
|
|
5
|
+
colors?: ContentProps['colors'];
|
|
6
|
+
/** Host styles; merged over the theme's. */
|
|
7
|
+
styles?: ContentProps['styles'];
|
|
8
|
+
/** Display-hint items for one screen (e.g. the result of `resolveView`). */
|
|
9
|
+
items: readonly unknown[] | undefined;
|
|
10
|
+
/** Prefix for every node path, when this tree is part of a larger document. */
|
|
11
|
+
basePath?: WorkflowNodePath;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Renders a list of display-hint items through the content registry, giving
|
|
15
|
+
* every node (including nested children) a path for `renderNodeWrapper`.
|
|
16
|
+
* Adds no layout of its own: each item renders as a sibling in the host's
|
|
17
|
+
* container.
|
|
18
|
+
*
|
|
19
|
+
* Items whose type has no component render nothing, or `renderUnknown` from
|
|
20
|
+
* the `WorkflowRenderProvider` (the designer shows a placeholder).
|
|
21
|
+
*/
|
|
22
|
+
export declare function RenderTree({ items, basePath, ...shared }: RenderTreeProps): import("react").JSX.Element | null;
|
|
23
|
+
//# sourceMappingURL=RenderTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderTree.d.ts","sourceRoot":"","sources":["../../../src/render/RenderTree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,kCAA+B,CAAA;AAElF,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,YAAS,CAAA;AAGrE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG;IAC/E,kDAAkD;IAClD,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC/B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC/B,4EAA4E;IAC5E,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAA;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,eAAe,sCAoCzE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { UiEnv } from '@veridid/workflow-core';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { NodePathMap, WorkflowNode, WorkflowNodePath } from './nodes.js';
|
|
4
|
+
/** What a `renderNodeWrapper` gets to know about the node it wraps. */
|
|
5
|
+
export type WorkflowNodeInfo = {
|
|
6
|
+
type: string;
|
|
7
|
+
/** `content` for registry components, `field` for inputs inside a form. */
|
|
8
|
+
kind: 'content' | 'field';
|
|
9
|
+
/** Position in the items given to `RenderTree`. */
|
|
10
|
+
path: WorkflowNodePath;
|
|
11
|
+
/** The node as rendered (`{{ }}` resolved, `disabled` from `enabledWhen`). */
|
|
12
|
+
item: WorkflowNode;
|
|
13
|
+
/** The node as written in the items, before resolution. */
|
|
14
|
+
source: WorkflowNode;
|
|
15
|
+
/** `showWhen` failed; only seen with `keepHidden`. */
|
|
16
|
+
hidden: boolean;
|
|
17
|
+
/** The control renders disabled (`enabledWhen`, `disabled: true`, or the screen is busy). */
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type WorkflowRenderOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* Data for `showWhen`, `enabledWhen` and `{{ }}`, the same env the engine
|
|
23
|
+
* uses (`context`, `artifacts`, `participants`, `viewer`). When set, every
|
|
24
|
+
* node is checked as it renders, and form values are added under `input`
|
|
25
|
+
* so conditions update as the user types. Leave it out when items come
|
|
26
|
+
* already resolved (the engine's status messages) and need no re-check.
|
|
27
|
+
*/
|
|
28
|
+
env?: UiEnv;
|
|
29
|
+
/**
|
|
30
|
+
* Wraps every node that has a path (anything inside `RenderTree`, not the
|
|
31
|
+
* pieces a component makes for itself). The designer uses it for selection
|
|
32
|
+
* outlines and drag handles, so editing tools never live in the shared
|
|
33
|
+
* components.
|
|
34
|
+
*/
|
|
35
|
+
renderNodeWrapper?: (element: ReactNode, info: WorkflowNodeInfo) => ReactNode;
|
|
36
|
+
/** Renders a top-level item whose type has no component (default: nothing). */
|
|
37
|
+
renderUnknown?: (item: WorkflowNode) => ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Render nodes whose `showWhen` fails instead of dropping them; the wrapper
|
|
40
|
+
* sees `hidden: true` and can dim them. For the designer.
|
|
41
|
+
*/
|
|
42
|
+
keepHidden?: boolean;
|
|
43
|
+
};
|
|
44
|
+
export declare const RenderOptionsContext: import("react").Context<WorkflowRenderOptions | null>;
|
|
45
|
+
export declare const PathMapContext: import("react").Context<NodePathMap | null>;
|
|
46
|
+
/** Form values of the nearest enclosing control, for fields inside a form. */
|
|
47
|
+
export declare const LiveInputContext: import("react").Context<Record<string, unknown> | undefined>;
|
|
48
|
+
export type WorkflowRenderProviderProps = WorkflowRenderOptions & {
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Optional. Turns on client-side expression checks and the designer hooks for
|
|
53
|
+
* every workflow component below it. Without it, components render exactly the
|
|
54
|
+
* items they are given.
|
|
55
|
+
*/
|
|
56
|
+
export declare function WorkflowRenderProvider({ env, renderNodeWrapper, renderUnknown, keepHidden, children, }: WorkflowRenderProviderProps): import("react").JSX.Element;
|
|
57
|
+
//# sourceMappingURL=WorkflowRenderContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowRenderContext.d.ts","sourceRoot":"","sources":["../../../src/render/WorkflowRenderContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAiB,KAAK,SAAS,EAAW,MAAM,OAAO,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAA;AAE1E,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,2EAA2E;IAC3E,IAAI,EAAE,SAAS,GAAG,OAAO,CAAA;IACzB,mDAAmD;IACnD,IAAI,EAAE,gBAAgB,CAAA;IACtB,8EAA8E;IAC9E,IAAI,EAAE,YAAY,CAAA;IAClB,2DAA2D;IAC3D,MAAM,EAAE,YAAY,CAAA;IACpB,sDAAsD;IACtD,MAAM,EAAE,OAAO,CAAA;IACf,6FAA6F;IAC7F,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,KAAK,CAAA;IACX;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,KAAK,SAAS,CAAA;IAC7E,+EAA+E;IAC/E,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,SAAS,CAAA;IACjD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,oBAAoB,uDAAoD,CAAA;AACrF,eAAO,MAAM,cAAc,6CAA0C,CAAA;AACrE,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,8DAAgE,CAAA;AAE7F,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAE1F;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,GAAG,EACH,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,QAAQ,GACT,EAAE,2BAA2B,+BAM7B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type UiEnv } from '@veridid/workflow-core';
|
|
2
|
+
/** A display-hint item as rendered: `{ type, ...props }`. */
|
|
3
|
+
export type WorkflowNode = {
|
|
4
|
+
type: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Where a node sits in the items given to `RenderTree`, e.g. `[2, 'children', 0]`
|
|
9
|
+
* is the first child of the third top-level item.
|
|
10
|
+
*/
|
|
11
|
+
export type WorkflowNodePath = ReadonlyArray<string | number>;
|
|
12
|
+
export type NodePathMap = WeakMap<object, WorkflowNodePath>;
|
|
13
|
+
/** A node is an object with a string `type`. */
|
|
14
|
+
export declare const isNode: (value: unknown) => value is WorkflowNode;
|
|
15
|
+
/**
|
|
16
|
+
* Copies `node` with `overrides` and remembers where the copy came from, so a
|
|
17
|
+
* container that adjusts a child before rendering it keeps that child's path
|
|
18
|
+
* (selection in the designer still works).
|
|
19
|
+
*/
|
|
20
|
+
export declare function deriveNode<T extends object>(node: T, overrides: Partial<T> | Record<string, unknown>): T;
|
|
21
|
+
/** The original node a (possibly derived) node was made from. */
|
|
22
|
+
export declare const sourceNode: <T extends object>(node: T) => T;
|
|
23
|
+
/**
|
|
24
|
+
* Records the path of every node in `items` (top-level items, and any node in
|
|
25
|
+
* an array property such as `children`, `items`, `content` or `fields`).
|
|
26
|
+
* `row_template` is skipped: it is a template, not something on screen.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildPathMap(items: readonly unknown[] | undefined, base?: WorkflowNodePath): NodePathMap;
|
|
29
|
+
export declare const lookupPath: (map: NodePathMap | null, node: object) => WorkflowNodePath | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Resolves `{{ }}` in a node's own props. Nested nodes (children) are left as
|
|
32
|
+
* they are, same object, because each one is resolved when it renders.
|
|
33
|
+
* Returns `node` itself when there is nothing to resolve.
|
|
34
|
+
*/
|
|
35
|
+
export declare function interpolateOwnProps(node: WorkflowNode, env: UiEnv): WorkflowNode;
|
|
36
|
+
export type ResolvedNode = {
|
|
37
|
+
/** The node with `{{ }}` resolved and, when it has `enabledWhen`, `disabled` set. */
|
|
38
|
+
item: WorkflowNode;
|
|
39
|
+
/** `showWhen` failed. */
|
|
40
|
+
hidden: boolean;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The client-side half of `filterAndBindUi` for one node: `showWhen`,
|
|
44
|
+
* `enabledWhen` and `{{ }}`. Same rules as the engine, so a node evaluated here
|
|
45
|
+
* with the engine's env gives the same answer; with live form values under
|
|
46
|
+
* `env.input` it updates as the user types.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveNode(node: WorkflowNode, env: UiEnv): ResolvedNode;
|
|
49
|
+
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/render/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkE,KAAK,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEnH,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAEnE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;AAE7D,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAE3D,gDAAgD;AAChD,eAAO,MAAM,MAAM,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,YACkE,CAAA;AAMnH;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAIxG;AAED,iEAAiE;AACjE,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,KAAG,CAAqD,CAAA;AAE5G;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,EAAE,IAAI,GAAE,gBAAqB,GAAG,WAAW,CAe5G;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,WAAW,GAAG,IAAI,EAAE,MAAM,MAAM,KAAG,gBAAgB,GAAG,SACtB,CAAA;AAShE;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,GAAG,YAAY,CAQhF;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,qFAAqF;IACrF,IAAI,EAAE,YAAY,CAAA;IAClB,yBAAyB;IACzB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,GAAG,YAAY,CAQxE"}
|