@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,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
import Svg, { G, Path } from 'react-native-svg';
|
|
6
|
+
import { ContentRegistry } from "../registries/ContentRegistry.js";
|
|
7
|
+
import { resolveItemSurfaceStyle } from "../style/resolveDisplayHintStyle.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const parseCount = count => {
|
|
10
|
+
if (typeof count === 'number') return count;
|
|
11
|
+
return parseFloat(count) || 0;
|
|
12
|
+
};
|
|
13
|
+
const DEFAULT_SLICES = [{
|
|
14
|
+
label: 'Category A',
|
|
15
|
+
count: 40
|
|
16
|
+
}, {
|
|
17
|
+
label: 'Category B',
|
|
18
|
+
count: 30
|
|
19
|
+
}, {
|
|
20
|
+
label: 'Category C',
|
|
21
|
+
count: 20
|
|
22
|
+
}, {
|
|
23
|
+
label: 'Category D',
|
|
24
|
+
count: 10
|
|
25
|
+
}];
|
|
26
|
+
const PieChartContent = ({
|
|
27
|
+
item,
|
|
28
|
+
styles,
|
|
29
|
+
colors
|
|
30
|
+
}) => {
|
|
31
|
+
const rawSlices = item.slices || [];
|
|
32
|
+
const slices = rawSlices.length > 0 ? rawSlices : DEFAULT_SLICES;
|
|
33
|
+
const size = 200;
|
|
34
|
+
const radius = size / 2;
|
|
35
|
+
const centerX = size / 2;
|
|
36
|
+
const centerY = size / 2;
|
|
37
|
+
|
|
38
|
+
// Calculate total for percentages
|
|
39
|
+
const total = slices.reduce((sum, slice) => sum + parseCount(slice.count), 0);
|
|
40
|
+
|
|
41
|
+
// Predefined colors for slices
|
|
42
|
+
const sliceColors = ['#FF6384', '#36A2EB', '#FFCE56', '#4BC0C0', '#9966FF', '#FF9F40'];
|
|
43
|
+
|
|
44
|
+
// Helper function to convert angle to coordinates
|
|
45
|
+
const polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
|
|
46
|
+
const angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
|
|
47
|
+
return {
|
|
48
|
+
x: centerX + radius * Math.cos(angleInRadians),
|
|
49
|
+
y: centerY + radius * Math.sin(angleInRadians)
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Create pie slice path
|
|
54
|
+
const createPieSlice = (startAngle, endAngle) => {
|
|
55
|
+
const start = polarToCartesian(centerX, centerY, radius, endAngle);
|
|
56
|
+
const end = polarToCartesian(centerX, centerY, radius, startAngle);
|
|
57
|
+
const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
|
|
58
|
+
return [`M ${centerX} ${centerY}`, `L ${start.x} ${start.y}`, `A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`, 'Z'].join(' ');
|
|
59
|
+
};
|
|
60
|
+
let currentAngle = 0;
|
|
61
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
62
|
+
style: [styles.fieldContainer, resolveItemSurfaceStyle(item)],
|
|
63
|
+
children: [item.title && /*#__PURE__*/_jsx(Text, {
|
|
64
|
+
style: [styles.formLabel, {
|
|
65
|
+
color: colors.text,
|
|
66
|
+
marginBottom: 12,
|
|
67
|
+
textAlign: 'center'
|
|
68
|
+
}],
|
|
69
|
+
children: item.title
|
|
70
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
71
|
+
style: {
|
|
72
|
+
alignItems: 'center'
|
|
73
|
+
},
|
|
74
|
+
children: [/*#__PURE__*/_jsx(Svg, {
|
|
75
|
+
width: size,
|
|
76
|
+
height: size,
|
|
77
|
+
children: /*#__PURE__*/_jsx(G, {
|
|
78
|
+
children: slices.map((slice, index) => {
|
|
79
|
+
const count = parseCount(slice.count);
|
|
80
|
+
const percentage = count / total * 100;
|
|
81
|
+
const angle = percentage / 100 * 360;
|
|
82
|
+
const startAngle = currentAngle;
|
|
83
|
+
const endAngle = currentAngle + angle;
|
|
84
|
+
currentAngle += angle;
|
|
85
|
+
const path = createPieSlice(startAngle, endAngle);
|
|
86
|
+
return /*#__PURE__*/_jsx(Path, {
|
|
87
|
+
d: path,
|
|
88
|
+
fill: sliceColors[index % sliceColors.length]
|
|
89
|
+
}, index);
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
93
|
+
style: {
|
|
94
|
+
marginTop: 16,
|
|
95
|
+
width: '100%'
|
|
96
|
+
},
|
|
97
|
+
children: slices.map((slice, index) => {
|
|
98
|
+
const count = parseCount(slice.count);
|
|
99
|
+
const percentage = (count / total * 100).toFixed(1);
|
|
100
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
101
|
+
style: {
|
|
102
|
+
flexDirection: 'row',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
marginBottom: 8
|
|
105
|
+
},
|
|
106
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
107
|
+
style: {
|
|
108
|
+
width: 16,
|
|
109
|
+
height: 16,
|
|
110
|
+
backgroundColor: sliceColors[index % sliceColors.length],
|
|
111
|
+
borderRadius: 2,
|
|
112
|
+
marginRight: 8
|
|
113
|
+
}
|
|
114
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
115
|
+
style: [styles.description, {
|
|
116
|
+
color: colors.text,
|
|
117
|
+
fontSize: 13
|
|
118
|
+
}],
|
|
119
|
+
children: [slice.label, ": ", count, " (", percentage, "%)"]
|
|
120
|
+
})]
|
|
121
|
+
}, index);
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
124
|
+
})]
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
ContentRegistry.register('pie-chart', PieChartContent);
|
|
128
|
+
export default PieChartContent;
|
|
129
|
+
//# sourceMappingURL=PieChartContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","View","Svg","G","Path","ContentRegistry","resolveItemSurfaceStyle","jsx","_jsx","jsxs","_jsxs","parseCount","count","parseFloat","DEFAULT_SLICES","label","PieChartContent","item","styles","colors","rawSlices","slices","length","size","radius","centerX","centerY","total","reduce","sum","slice","sliceColors","polarToCartesian","angleInDegrees","angleInRadians","Math","PI","x","cos","y","sin","createPieSlice","startAngle","endAngle","start","end","largeArcFlag","join","currentAngle","style","fieldContainer","children","title","formLabel","color","text","marginBottom","textAlign","alignItems","width","height","map","index","percentage","angle","path","d","fill","marginTop","toFixed","flexDirection","backgroundColor","borderRadius","marginRight","description","fontSize","register"],"sourceRoot":"../../../src","sources":["content/PieChartContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,OAAOC,GAAG,IAAIC,CAAC,EAAEC,IAAI,QAAQ,kBAAkB;AAC/C,SAA4BC,eAAe,QAAQ,kCAA+B;AAClF,SAASC,uBAAuB,QAAQ,qCAAkC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAO1E,MAAMC,UAAU,GAAIC,KAAsB,IAAa;EACrD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAOC,UAAU,CAACD,KAAK,CAAC,IAAI,CAAC;AAC/B,CAAC;AAED,MAAME,cAA2B,GAAG,CAClC;EAAEC,KAAK,EAAE,YAAY;EAAEH,KAAK,EAAE;AAAG,CAAC,EAClC;EAAEG,KAAK,EAAE,YAAY;EAAEH,K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VW,eAAe,EAAExC,WAAW,CAAC+B,KAAK,GAAG/B,WAAW,CAACT,MAAM,CAAC;gBACxDkD,YAAY,EAAE,CAAC;gBACfC,WAAW,EAAE;cACf;YAAE,CACH,CAAC,eACF/D,KAAA,CAACV,IAAI;cAACiD,KAAK,EAAE,CAAC/B,MAAM,CAACwD,WAAW,EAAE;gBAAEpB,KAAK,EAAEnC,MAAM,CAACoC,IAAI;gBAAEoB,QAAQ,EAAE;cAAG,CAAC,CAAE;cAAAxB,QAAA,GACrErB,KAAK,CAACf,KAAK,EAAC,IAAE,EAACH,KAAK,EAAC,IAAE,EAACmD,UAAU,EAAC,IACtC;YAAA,CAAM,CAAC;UAAA,GAZED,KAaL,CAAC;QAEX,CAAC;MAAC,CACE,CAAC;IAAA,CACH,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAEDzD,eAAe,CAACuE,QAAQ,CAAC,WAAW,EAAE5D,eAAe,CAAC;AAEtD,eAAeA,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import { useWalletAdapter } from "../adapter/WalletAdapter.js";
|
|
6
|
+
import WorkflowButtonLabel from "../components/WorkflowButtonLabel.js";
|
|
7
|
+
import { useWorkflowT } from "../i18n/WorkflowI18n.js";
|
|
8
|
+
import { useProtocolExchange } from "../protocol/useProtocolExchange.js";
|
|
9
|
+
import { ContentRegistry } from "../registries/ContentRegistry.js";
|
|
10
|
+
import { useResponsive } from "../responsive/index.js";
|
|
11
|
+
import { resolveButtonFillStyle, resolveSurfaceBackground } from "../style/resolveDisplayHintStyle.js";
|
|
12
|
+
import { useWorkflowTheme } from "../theme/WorkflowTheme.js";
|
|
13
|
+
import { testIdWithKey } from "../utils/testable.js";
|
|
14
|
+
import { s, shortId } from "./CredentialOfferContent.js";
|
|
15
|
+
import { SimulatedHint } from "./SimulatedHint.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Proof request card (CrMS contract): present fires `item.event` (default
|
|
19
|
+
* `present`), decline fires `decline-event` (default `decline`), `label` is the
|
|
20
|
+
* present button text, `requested` lists the requested fields.
|
|
21
|
+
*
|
|
22
|
+
* Moved from the wallet with credo replaced by the WalletAdapter
|
|
23
|
+
* (`useExchanges('proof')`, `acceptExchange` presents with automatically
|
|
24
|
+
* selected credentials).
|
|
25
|
+
*/
|
|
26
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
const ProofPresentationContent = props => {
|
|
28
|
+
const {
|
|
29
|
+
item,
|
|
30
|
+
styles,
|
|
31
|
+
groupFontScale = 1
|
|
32
|
+
} = props;
|
|
33
|
+
const t = useWorkflowT();
|
|
34
|
+
const {
|
|
35
|
+
ms
|
|
36
|
+
} = useResponsive();
|
|
37
|
+
const {
|
|
38
|
+
card
|
|
39
|
+
} = useWorkflowTheme();
|
|
40
|
+
const adapter = useWalletAdapter();
|
|
41
|
+
const {
|
|
42
|
+
phase,
|
|
43
|
+
consent,
|
|
44
|
+
decline
|
|
45
|
+
} = useProtocolExchange({
|
|
46
|
+
...props,
|
|
47
|
+
kind: 'proof',
|
|
48
|
+
adapter,
|
|
49
|
+
defaultEvent: 'present'
|
|
50
|
+
});
|
|
51
|
+
const presentLabel = typeof item.label === 'string' && item.label.trim() || t('Workflow.PresentProof');
|
|
52
|
+
const presDefId = typeof item['pres-def-id'] === 'string' ? item['pres-def-id'] : '';
|
|
53
|
+
const requested = Array.isArray(item.requested) ? item.requested.map(String) : [];
|
|
54
|
+
const fill = resolveSurfaceBackground(item.bgColor);
|
|
55
|
+
const statusText = {
|
|
56
|
+
awaiting: t('Workflow.WaitingForProofRequest'),
|
|
57
|
+
working: t('Workflow.PresentingProof'),
|
|
58
|
+
done: t('Workflow.ProofPresented'),
|
|
59
|
+
declined: t('Workflow.ProofDeclined'),
|
|
60
|
+
error: t('Workflow.ProofFailed')
|
|
61
|
+
};
|
|
62
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
63
|
+
activeOpacity: 1,
|
|
64
|
+
testID: testIdWithKey('WorkflowProofPresentation'),
|
|
65
|
+
accessibilityLabel: t('Workflow.ProofRequest'),
|
|
66
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
67
|
+
style: [styles.fieldContainer, s.card, {
|
|
68
|
+
backgroundColor: card.surface,
|
|
69
|
+
borderColor: card.accent
|
|
70
|
+
}, fill !== 'transparent' ? {
|
|
71
|
+
backgroundColor: fill
|
|
72
|
+
} : null],
|
|
73
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
74
|
+
style: s.headerRow,
|
|
75
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
76
|
+
style: [s.kicker, {
|
|
77
|
+
color: card.accent
|
|
78
|
+
}],
|
|
79
|
+
children: t('Workflow.ProofRequest').toUpperCase()
|
|
80
|
+
}), presDefId ? /*#__PURE__*/_jsx(Text, {
|
|
81
|
+
style: [s.id, {
|
|
82
|
+
color: card.mutedId
|
|
83
|
+
}],
|
|
84
|
+
children: shortId(presDefId)
|
|
85
|
+
}) : null]
|
|
86
|
+
}), item.text ? /*#__PURE__*/_jsx(Text, {
|
|
87
|
+
style: [styles.description, {
|
|
88
|
+
color: card.text,
|
|
89
|
+
marginBottom: 4
|
|
90
|
+
}],
|
|
91
|
+
children: String(item.text)
|
|
92
|
+
}) : null, requested.length > 0 ? /*#__PURE__*/_jsx(View, {
|
|
93
|
+
style: s.attrList,
|
|
94
|
+
children: requested.map((field, i) => /*#__PURE__*/_jsxs(Text, {
|
|
95
|
+
style: [s.attrLine, {
|
|
96
|
+
color: card.text
|
|
97
|
+
}],
|
|
98
|
+
children: ["\u2022 ", field]
|
|
99
|
+
}, `${field}-${i}`))
|
|
100
|
+
}) : null, phase === 'ready' ? /*#__PURE__*/_jsxs(View, {
|
|
101
|
+
style: s.btnRow,
|
|
102
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
103
|
+
style: [s.primaryBtn, {
|
|
104
|
+
backgroundColor: card.accent
|
|
105
|
+
}, resolveButtonFillStyle(item)],
|
|
106
|
+
onPress: consent,
|
|
107
|
+
disabled: props.disabled,
|
|
108
|
+
activeOpacity: 0.85,
|
|
109
|
+
testID: testIdWithKey('WorkflowProofPresentationPresent'),
|
|
110
|
+
children: /*#__PURE__*/_jsx(WorkflowButtonLabel, {
|
|
111
|
+
style: [s.btnText, {
|
|
112
|
+
fontSize: ms(13),
|
|
113
|
+
color: card.buttonText
|
|
114
|
+
}],
|
|
115
|
+
groupFontScale: groupFontScale,
|
|
116
|
+
children: presentLabel
|
|
117
|
+
})
|
|
118
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
119
|
+
style: [s.secondaryBtn, {
|
|
120
|
+
borderColor: card.border
|
|
121
|
+
}],
|
|
122
|
+
onPress: decline,
|
|
123
|
+
disabled: props.disabled,
|
|
124
|
+
activeOpacity: 0.7,
|
|
125
|
+
testID: testIdWithKey('WorkflowProofPresentationDecline'),
|
|
126
|
+
children: /*#__PURE__*/_jsx(WorkflowButtonLabel, {
|
|
127
|
+
style: [s.btnText, {
|
|
128
|
+
fontSize: ms(13),
|
|
129
|
+
color: card.text
|
|
130
|
+
}],
|
|
131
|
+
groupFontScale: groupFontScale,
|
|
132
|
+
children: t('Global.Decline')
|
|
133
|
+
})
|
|
134
|
+
})]
|
|
135
|
+
}) : /*#__PURE__*/_jsxs(View, {
|
|
136
|
+
style: s.statusRow,
|
|
137
|
+
children: [phase === 'awaiting' || phase === 'working' ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
138
|
+
size: "small",
|
|
139
|
+
color: card.accent
|
|
140
|
+
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
141
|
+
style: [s.statusText, {
|
|
142
|
+
color: card.text
|
|
143
|
+
}],
|
|
144
|
+
children: statusText[phase]
|
|
145
|
+
})]
|
|
146
|
+
}), adapter.simulated ? /*#__PURE__*/_jsx(SimulatedHint, {
|
|
147
|
+
color: card.mutedId
|
|
148
|
+
}) : null]
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
ContentRegistry.register('proof-presentation', ProofPresentationContent);
|
|
153
|
+
export default ProofPresentationContent;
|
|
154
|
+
//# sourceMappingURL=ProofPresentationContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ActivityIndicator","Text","TouchableOpacity","View","useWalletAdapter","WorkflowButtonLabel","useWorkflowT","useProtocolExchange","ContentRegistry","useResponsive","resolveButtonFillStyle","resolveSurfaceBackground","useWorkflowTheme","testIdWithKey","s","shortId","SimulatedHint","jsx","_jsx","jsxs","_jsxs","ProofPresentationContent","props","item","styles","groupFontScale","t","ms","card","adapter","phase","consent","decline","kind","defaultEvent","presentLabel","label","trim","presDefId","requested","Array","isArray","map","String","fill","bgColor","statusText","awaiting","working","done","declined","error","activeOpacity","testID","accessibilityLabel","children","style","fieldContainer","backgroundColor","surface","borderColor","accent","headerRow","kicker","color","toUpperCase","id","mutedId","text","description","marginBottom","length","attrList","field","i","attrLine","btnRow","primaryBtn","onPress","disabled","btnText","fontSize","buttonText","secondaryBtn","border","statusRow","size","simulated","register"],"sourceRoot":"../../../src","sources":["content/ProofPresentationContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC9E,SAASC,gBAAgB,QAAQ,6BAA0B;AAC3D,OAAOC,mBAAmB,MAAM,sCAAmC;AACnE,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAASC,mBAAmB,QAAQ,oCAAiC;AACrE,SAA4BC,eAAe,QAAQ,kCAA+B;AAClF,SAASC,aAAa,QAAQ,wBAAe;AAC7C,SAASC,sBAAsB,EAAEC,wBAAwB,QAAQ,qCAAkC;AACnG,SA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,CAAE;UAAAb,QAAA,EAAET,UAAU,CAAChB,KAAK;QAAC,CAAO,CAAC;MAAA,CACzE,CACP,EACAD,OAAO,CAAC0D,SAAS,gBAAGrE,IAAA,CAACF,aAAa;QAACgD,KAAK,EAAEpC,IAAI,CAACuC;MAAQ,CAAE,CAAC,GAAG,IAAI;IAAA,CAC9D;EAAC,CACS,CAAC;AAEvB,CAAC;AAED3D,eAAe,CAACgF,QAAQ,CAAC,oBAAoB,EAAEnE,wBAAwB,CAAC;AAExE,eAAeA,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import { ContentRegistry } from "../registries/ContentRegistry.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const radioSubs = new Map();
|
|
8
|
+
const radioSelected = new Map();
|
|
9
|
+
const radioSubscribe = (formId, setter) => {
|
|
10
|
+
if (!radioSubs.has(formId)) radioSubs.set(formId, new Set());
|
|
11
|
+
radioSubs.get(formId)?.add(setter);
|
|
12
|
+
return () => {
|
|
13
|
+
radioSubs.get(formId)?.delete(setter);
|
|
14
|
+
if (radioSubs.get(formId)?.size === 0) {
|
|
15
|
+
radioSubs.delete(formId);
|
|
16
|
+
radioSelected.delete(formId);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const radioBroadcast = (formId, val) => {
|
|
21
|
+
radioSelected.set(formId, val);
|
|
22
|
+
radioSubs.get(formId)?.forEach(setter => {
|
|
23
|
+
setter(val);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const RadioButtonContent = ({
|
|
27
|
+
item,
|
|
28
|
+
styles,
|
|
29
|
+
colors,
|
|
30
|
+
formData,
|
|
31
|
+
onFieldChange
|
|
32
|
+
}) => {
|
|
33
|
+
const fieldName = item['form-id'] ?? 'radio';
|
|
34
|
+
const optionValue = String(item.value ?? item.label ?? '');
|
|
35
|
+
const optionLabel = String(item.label ?? item.value ?? '');
|
|
36
|
+
const groupLabel = Array.isArray(item.options) ? item.label ?? item.text ?? '' : '';
|
|
37
|
+
const options = Array.isArray(item.options) ? item.options.map(o => ({
|
|
38
|
+
label: o,
|
|
39
|
+
value: o
|
|
40
|
+
})) : optionValue ? [{
|
|
41
|
+
label: optionLabel,
|
|
42
|
+
value: optionValue
|
|
43
|
+
}] : [];
|
|
44
|
+
const resolveInitial = () => {
|
|
45
|
+
if (formData?.[fieldName] != null) return String(formData[fieldName]);
|
|
46
|
+
if (radioSelected.has(fieldName)) return radioSelected.get(fieldName) ?? '';
|
|
47
|
+
return '';
|
|
48
|
+
};
|
|
49
|
+
const [selected, setSelected] = useState(resolveInitial);
|
|
50
|
+
const committedRef = useRef(formData?.[fieldName] != null);
|
|
51
|
+
const defaultValue = options[0]?.value;
|
|
52
|
+
const onFieldChangeRef = useRef(onFieldChange);
|
|
53
|
+
onFieldChangeRef.current = onFieldChange;
|
|
54
|
+
|
|
55
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: subscribe once per field and default; formData is read only for the initial commit
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const unsub = radioSubscribe(fieldName, setSelected);
|
|
58
|
+
if (formData?.[fieldName] == null && defaultValue) {
|
|
59
|
+
radioBroadcast(fieldName, defaultValue);
|
|
60
|
+
onFieldChangeRef.current?.(fieldName, defaultValue);
|
|
61
|
+
committedRef.current = true;
|
|
62
|
+
}
|
|
63
|
+
return unsub;
|
|
64
|
+
}, [fieldName, defaultValue]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (formData?.[fieldName] == null) return;
|
|
67
|
+
const next = String(formData[fieldName]);
|
|
68
|
+
setSelected(next);
|
|
69
|
+
radioSelected.set(fieldName, next);
|
|
70
|
+
committedRef.current = true;
|
|
71
|
+
}, [fieldName, formData?.[fieldName]]);
|
|
72
|
+
const select = val => {
|
|
73
|
+
if (val === selected && committedRef.current && formData?.[fieldName] != null) return;
|
|
74
|
+
radioBroadcast(fieldName, val);
|
|
75
|
+
onFieldChange?.(fieldName, val);
|
|
76
|
+
committedRef.current = true;
|
|
77
|
+
};
|
|
78
|
+
if (options.length === 0) return null;
|
|
79
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
80
|
+
style: styles.fieldContainer,
|
|
81
|
+
children: [groupLabel ? /*#__PURE__*/_jsx(Text, {
|
|
82
|
+
style: [styles.label, {
|
|
83
|
+
color: colors.text,
|
|
84
|
+
marginBottom: 8
|
|
85
|
+
}],
|
|
86
|
+
children: groupLabel
|
|
87
|
+
}) : null, options.map((opt, i) => {
|
|
88
|
+
const isSelected = selected === opt.value;
|
|
89
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
90
|
+
onPress: () => select(opt.value),
|
|
91
|
+
activeOpacity: 0.7,
|
|
92
|
+
style: {
|
|
93
|
+
flexDirection: 'row',
|
|
94
|
+
alignItems: 'flex-start',
|
|
95
|
+
paddingVertical: 8,
|
|
96
|
+
minWidth: 0
|
|
97
|
+
},
|
|
98
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
99
|
+
style: {
|
|
100
|
+
width: 22,
|
|
101
|
+
height: 22,
|
|
102
|
+
borderRadius: 11,
|
|
103
|
+
borderWidth: 2,
|
|
104
|
+
borderColor: colors.primary,
|
|
105
|
+
alignItems: 'center',
|
|
106
|
+
justifyContent: 'center',
|
|
107
|
+
marginRight: 10,
|
|
108
|
+
backgroundColor: 'transparent',
|
|
109
|
+
marginTop: 2
|
|
110
|
+
},
|
|
111
|
+
children: isSelected ? /*#__PURE__*/_jsx(View, {
|
|
112
|
+
style: {
|
|
113
|
+
width: 10,
|
|
114
|
+
height: 10,
|
|
115
|
+
borderRadius: 5,
|
|
116
|
+
backgroundColor: colors.primary
|
|
117
|
+
}
|
|
118
|
+
}) : null
|
|
119
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
120
|
+
style: {
|
|
121
|
+
color: colors.text,
|
|
122
|
+
fontSize: 15,
|
|
123
|
+
flex: 1,
|
|
124
|
+
flexShrink: 1
|
|
125
|
+
},
|
|
126
|
+
children: opt.label
|
|
127
|
+
})]
|
|
128
|
+
}, i);
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
ContentRegistry.register('radio-button', RadioButtonContent);
|
|
133
|
+
// Contract alias (HINT_ALIASES); the wallet rendered nothing for it at top level.
|
|
134
|
+
ContentRegistry.register('radio', RadioButtonContent);
|
|
135
|
+
export default RadioButtonContent;
|
|
136
|
+
//# sourceMappingURL=RadioButtonContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","Text","TouchableOpacity","View","ContentRegistry","jsx","_jsx","jsxs","_jsxs","radioSubs","Map","radioSelected","radioSubscribe","formId","setter","has","set","Set","get","add","delete","size","radioBroadcast","val","forEach","RadioButtonContent","item","styles","colors","formData","onFieldChange","fieldName","optionValue","String","value","label","optionLabel","groupLabel","Array","isArray","options","text","map","o","resolveInitial","selected","setSelected","committedRef","defaultValue","onFieldChangeRef","current","unsub","next","select","length","style","fieldContainer","children","color","marginBottom","opt","i","isSelected","onPress","activeOpacity","flexDirection","alignItems","paddingVertical","minWidth","width","height","borderRadius","borderWidth","borderColor","primary","justifyContent","marginRight","backgroundColor","marginTop","fontSize","flex","flexShrink","register"],"sourceRoot":"../../../src","sources":["content/RadioButtonContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAA4BC,eAAe,QAAQ,kCAA+B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElF,MAAMC,SAAS,GAAG,IAAIC,GAA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