@veridid/workflow-ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +217 -2
- package/build/module/WorkflowFontScaleContext.js +67 -0
- package/build/module/WorkflowFontScaleContext.js.map +1 -0
- package/build/module/adapter/WalletAdapter.js +152 -0
- package/build/module/adapter/WalletAdapter.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.js +8 -0
- package/build/module/components/FallbackVideoPlayer.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.native.js +10 -0
- package/build/module/components/FallbackVideoPlayer.native.js.map +1 -0
- package/build/module/components/FallbackVideoPlayer.web.js +35 -0
- package/build/module/components/FallbackVideoPlayer.web.js.map +1 -0
- package/build/module/components/WorkflowButtonLabel.js +32 -0
- package/build/module/components/WorkflowButtonLabel.js.map +1 -0
- package/build/module/components/WorkflowCalendarIcon.js +73 -0
- package/build/module/components/WorkflowCalendarIcon.js.map +1 -0
- package/build/module/components/WorkflowText.js +92 -0
- package/build/module/components/WorkflowText.js.map +1 -0
- package/build/module/content/BadgeContent.js +73 -0
- package/build/module/content/BadgeContent.js.map +1 -0
- package/build/module/content/BarChartContent.js +97 -0
- package/build/module/content/BarChartContent.js.map +1 -0
- package/build/module/content/BarcodeContent.js +78 -0
- package/build/module/content/BarcodeContent.js.map +1 -0
- package/build/module/content/BasicTableContent.js +145 -0
- package/build/module/content/BasicTableContent.js.map +1 -0
- package/build/module/content/ButtonContent.js +130 -0
- package/build/module/content/ButtonContent.js.map +1 -0
- package/build/module/content/CalendarContent.js +173 -0
- package/build/module/content/CalendarContent.js.map +1 -0
- package/build/module/content/CardContent.js +114 -0
- package/build/module/content/CardContent.js.map +1 -0
- package/build/module/content/CarouselContent.js +173 -0
- package/build/module/content/CarouselContent.js.map +1 -0
- package/build/module/content/ChipContent.js +214 -0
- package/build/module/content/ChipContent.js.map +1 -0
- package/build/module/content/ChipRowContent.js +127 -0
- package/build/module/content/ChipRowContent.js.map +1 -0
- package/build/module/content/CredentialOfferContent.js +312 -0
- package/build/module/content/CredentialOfferContent.js.map +1 -0
- package/build/module/content/DialContent.js +101 -0
- package/build/module/content/DialContent.js.map +1 -0
- package/build/module/content/DividerContent.js +26 -0
- package/build/module/content/DividerContent.js.map +1 -0
- package/build/module/content/DonutChartContent.js +118 -0
- package/build/module/content/DonutChartContent.js.map +1 -0
- package/build/module/content/FormContent.js +141 -0
- package/build/module/content/FormContent.js.map +1 -0
- package/build/module/content/FormFieldBridge.js +157 -0
- package/build/module/content/FormFieldBridge.js.map +1 -0
- package/build/module/content/GaugeContent.js +77 -0
- package/build/module/content/GaugeContent.js.map +1 -0
- package/build/module/content/GridLayoutContent.js +227 -0
- package/build/module/content/GridLayoutContent.js.map +1 -0
- package/build/module/content/ImageContent.js +190 -0
- package/build/module/content/ImageContent.js.map +1 -0
- package/build/module/content/ListContent.js +121 -0
- package/build/module/content/ListContent.js.map +1 -0
- package/build/module/content/LocationContent.js +148 -0
- package/build/module/content/LocationContent.js.map +1 -0
- package/build/module/content/MapContent.js +213 -0
- package/build/module/content/MapContent.js.map +1 -0
- package/build/module/content/MultipleChoiceContent.js +91 -0
- package/build/module/content/MultipleChoiceContent.js.map +1 -0
- package/build/module/content/OpenBadgePreviewContent.js +141 -0
- package/build/module/content/OpenBadgePreviewContent.js.map +1 -0
- package/build/module/content/PhotoContent.js +154 -0
- package/build/module/content/PhotoContent.js.map +1 -0
- package/build/module/content/PieChartContent.js +129 -0
- package/build/module/content/PieChartContent.js.map +1 -0
- package/build/module/content/ProofPresentationContent.js +154 -0
- package/build/module/content/ProofPresentationContent.js.map +1 -0
- package/build/module/content/RadioButtonContent.js +136 -0
- package/build/module/content/RadioButtonContent.js.map +1 -0
- package/build/module/content/RowContent.js +539 -0
- package/build/module/content/RowContent.js.map +1 -0
- package/build/module/content/SectionContent.js +123 -0
- package/build/module/content/SectionContent.js.map +1 -0
- package/build/module/content/ShareEntryContent.js +111 -0
- package/build/module/content/ShareEntryContent.js.map +1 -0
- package/build/module/content/SimulatedHint.js +33 -0
- package/build/module/content/SimulatedHint.js.map +1 -0
- package/build/module/content/SliderContent.js +46 -0
- package/build/module/content/SliderContent.js.map +1 -0
- package/build/module/content/SpacerContent.js +21 -0
- package/build/module/content/SpacerContent.js.map +1 -0
- package/build/module/content/SpinnerContent.js +33 -0
- package/build/module/content/SpinnerContent.js.map +1 -0
- package/build/module/content/SubmitButtonContent.js +281 -0
- package/build/module/content/SubmitButtonContent.js.map +1 -0
- package/build/module/content/TextContent.js +127 -0
- package/build/module/content/TextContent.js.map +1 -0
- package/build/module/content/TileContent.js +237 -0
- package/build/module/content/TileContent.js.map +1 -0
- package/build/module/content/TimelineContent.js +120 -0
- package/build/module/content/TimelineContent.js.map +1 -0
- package/build/module/content/TitleContent.js +55 -0
- package/build/module/content/TitleContent.js.map +1 -0
- package/build/module/content/VideoContent.js +142 -0
- package/build/module/content/VideoContent.js.map +1 -0
- package/build/module/content/WebLinkContent.js +95 -0
- package/build/module/content/WebLinkContent.js.map +1 -0
- package/build/module/content/index.js +48 -0
- package/build/module/content/index.js.map +1 -0
- package/build/module/form-fields/CheckboxField.js +47 -0
- package/build/module/form-fields/CheckboxField.js.map +1 -0
- package/build/module/form-fields/DateField.js +8 -0
- package/build/module/form-fields/DateField.js.map +1 -0
- package/build/module/form-fields/DateField.native.js +141 -0
- package/build/module/form-fields/DateField.native.js.map +1 -0
- package/build/module/form-fields/DateField.web.js +45 -0
- package/build/module/form-fields/DateField.web.js.map +1 -0
- package/build/module/form-fields/DropdownField.js +172 -0
- package/build/module/form-fields/DropdownField.js.map +1 -0
- package/build/module/form-fields/MCQField.js +100 -0
- package/build/module/form-fields/MCQField.js.map +1 -0
- package/build/module/form-fields/RadioField.js +56 -0
- package/build/module/form-fields/RadioField.js.map +1 -0
- package/build/module/form-fields/SliderField.js +8 -0
- package/build/module/form-fields/SliderField.js.map +1 -0
- package/build/module/form-fields/SliderField.native.js +77 -0
- package/build/module/form-fields/SliderField.native.js.map +1 -0
- package/build/module/form-fields/SliderField.web.js +82 -0
- package/build/module/form-fields/SliderField.web.js.map +1 -0
- package/build/module/form-fields/SubmitButtonField.js +42 -0
- package/build/module/form-fields/SubmitButtonField.js.map +1 -0
- package/build/module/form-fields/TextField.js +56 -0
- package/build/module/form-fields/TextField.js.map +1 -0
- package/build/module/form-fields/index.js +15 -0
- package/build/module/form-fields/index.js.map +1 -0
- package/build/module/i18n/WorkflowI18n.js +94 -0
- package/build/module/i18n/WorkflowI18n.js.map +1 -0
- package/build/module/icons/VectorIcon.js +23 -0
- package/build/module/icons/VectorIcon.js.map +1 -0
- package/build/module/icons/VectorIcon.web.js +62 -0
- package/build/module/icons/VectorIcon.web.js.map +1 -0
- package/build/module/icons/WorkflowIcon.js +36 -0
- package/build/module/icons/WorkflowIcon.js.map +1 -0
- package/build/module/icons/types.js +4 -0
- package/build/module/icons/types.js.map +1 -0
- package/build/module/imageUriCache.js +25 -0
- package/build/module/imageUriCache.js.map +1 -0
- package/build/module/index.js +50 -0
- package/build/module/index.js.map +1 -0
- package/build/module/modal/WorkflowModal.js +115 -0
- package/build/module/modal/WorkflowModal.js.map +1 -0
- package/build/module/package.json +1 -0
- package/build/module/platform/platformName.js +10 -0
- package/build/module/platform/platformName.js.map +1 -0
- package/build/module/platform/platformName.web.js +5 -0
- package/build/module/platform/platformName.web.js.map +1 -0
- package/build/module/protocol/controlSnapshotStore.js +19 -0
- package/build/module/protocol/controlSnapshotStore.js.map +1 -0
- package/build/module/protocol/useProtocolExchange.js +168 -0
- package/build/module/protocol/useProtocolExchange.js.map +1 -0
- package/build/module/registries/ContentRegistry.js +53 -0
- package/build/module/registries/ContentRegistry.js.map +1 -0
- package/build/module/registries/FormFieldRegistry.js +56 -0
- package/build/module/registries/FormFieldRegistry.js.map +1 -0
- package/build/module/render/NodeBoundary.js +73 -0
- package/build/module/render/NodeBoundary.js.map +1 -0
- package/build/module/render/RenderTree.js +52 -0
- package/build/module/render/RenderTree.js.map +1 -0
- package/build/module/render/WorkflowRenderContext.js +34 -0
- package/build/module/render/WorkflowRenderContext.js.map +1 -0
- package/build/module/render/nodes.js +103 -0
- package/build/module/render/nodes.js.map +1 -0
- package/build/module/responsive/ResponsiveProvider.js +63 -0
- package/build/module/responsive/ResponsiveProvider.js.map +1 -0
- package/build/module/responsive/index.js +4 -0
- package/build/module/responsive/index.js.map +1 -0
- package/build/module/responsive/responsive.js +56 -0
- package/build/module/responsive/responsive.js.map +1 -0
- package/build/module/style/resolveDisplayHintStyle.js +145 -0
- package/build/module/style/resolveDisplayHintStyle.js.map +1 -0
- package/build/module/theme/WorkflowTheme.js +200 -0
- package/build/module/theme/WorkflowTheme.js.map +1 -0
- package/build/module/utils/testable.js +12 -0
- package/build/module/utils/testable.js.map +1 -0
- package/build/typescript/WorkflowFontScaleContext.d.ts +7 -0
- package/build/typescript/WorkflowFontScaleContext.d.ts.map +1 -0
- package/build/typescript/adapter/WalletAdapter.d.ts +145 -0
- package/build/typescript/adapter/WalletAdapter.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.d.ts +6 -0
- package/build/typescript/components/FallbackVideoPlayer.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.native.d.ts +7 -0
- package/build/typescript/components/FallbackVideoPlayer.native.d.ts.map +1 -0
- package/build/typescript/components/FallbackVideoPlayer.web.d.ts +9 -0
- package/build/typescript/components/FallbackVideoPlayer.web.d.ts.map +1 -0
- package/build/typescript/components/WorkflowButtonLabel.d.ts +11 -0
- package/build/typescript/components/WorkflowButtonLabel.d.ts.map +1 -0
- package/build/typescript/components/WorkflowCalendarIcon.d.ts +11 -0
- package/build/typescript/components/WorkflowCalendarIcon.d.ts.map +1 -0
- package/build/typescript/components/WorkflowText.d.ts +13 -0
- package/build/typescript/components/WorkflowText.d.ts.map +1 -0
- package/build/typescript/content/BadgeContent.d.ts +5 -0
- package/build/typescript/content/BadgeContent.d.ts.map +1 -0
- package/build/typescript/content/BarChartContent.d.ts +5 -0
- package/build/typescript/content/BarChartContent.d.ts.map +1 -0
- package/build/typescript/content/BarcodeContent.d.ts +11 -0
- package/build/typescript/content/BarcodeContent.d.ts.map +1 -0
- package/build/typescript/content/BasicTableContent.d.ts +5 -0
- package/build/typescript/content/BasicTableContent.d.ts.map +1 -0
- package/build/typescript/content/ButtonContent.d.ts +5 -0
- package/build/typescript/content/ButtonContent.d.ts.map +1 -0
- package/build/typescript/content/CalendarContent.d.ts +19 -0
- package/build/typescript/content/CalendarContent.d.ts.map +1 -0
- package/build/typescript/content/CardContent.d.ts +5 -0
- package/build/typescript/content/CardContent.d.ts.map +1 -0
- package/build/typescript/content/CarouselContent.d.ts +5 -0
- package/build/typescript/content/CarouselContent.d.ts.map +1 -0
- package/build/typescript/content/ChipContent.d.ts +5 -0
- package/build/typescript/content/ChipContent.d.ts.map +1 -0
- package/build/typescript/content/ChipRowContent.d.ts +8 -0
- package/build/typescript/content/ChipRowContent.d.ts.map +1 -0
- package/build/typescript/content/CredentialOfferContent.d.ts +98 -0
- package/build/typescript/content/CredentialOfferContent.d.ts.map +1 -0
- package/build/typescript/content/DialContent.d.ts +5 -0
- package/build/typescript/content/DialContent.d.ts.map +1 -0
- package/build/typescript/content/DividerContent.d.ts +5 -0
- package/build/typescript/content/DividerContent.d.ts.map +1 -0
- package/build/typescript/content/DonutChartContent.d.ts +5 -0
- package/build/typescript/content/DonutChartContent.d.ts.map +1 -0
- package/build/typescript/content/FormContent.d.ts +19 -0
- package/build/typescript/content/FormContent.d.ts.map +1 -0
- package/build/typescript/content/FormFieldBridge.d.ts +2 -0
- package/build/typescript/content/FormFieldBridge.d.ts.map +1 -0
- package/build/typescript/content/GaugeContent.d.ts +5 -0
- package/build/typescript/content/GaugeContent.d.ts.map +1 -0
- package/build/typescript/content/GridLayoutContent.d.ts +5 -0
- package/build/typescript/content/GridLayoutContent.d.ts.map +1 -0
- package/build/typescript/content/ImageContent.d.ts +5 -0
- package/build/typescript/content/ImageContent.d.ts.map +1 -0
- package/build/typescript/content/ListContent.d.ts +5 -0
- package/build/typescript/content/ListContent.d.ts.map +1 -0
- package/build/typescript/content/LocationContent.d.ts +32 -0
- package/build/typescript/content/LocationContent.d.ts.map +1 -0
- package/build/typescript/content/MapContent.d.ts +11 -0
- package/build/typescript/content/MapContent.d.ts.map +1 -0
- package/build/typescript/content/MultipleChoiceContent.d.ts +5 -0
- package/build/typescript/content/MultipleChoiceContent.d.ts.map +1 -0
- package/build/typescript/content/OpenBadgePreviewContent.d.ts +14 -0
- package/build/typescript/content/OpenBadgePreviewContent.d.ts.map +1 -0
- package/build/typescript/content/PhotoContent.d.ts +57 -0
- package/build/typescript/content/PhotoContent.d.ts.map +1 -0
- package/build/typescript/content/PieChartContent.d.ts +5 -0
- package/build/typescript/content/PieChartContent.d.ts.map +1 -0
- package/build/typescript/content/ProofPresentationContent.d.ts +14 -0
- package/build/typescript/content/ProofPresentationContent.d.ts.map +1 -0
- package/build/typescript/content/RadioButtonContent.d.ts +5 -0
- package/build/typescript/content/RadioButtonContent.d.ts.map +1 -0
- package/build/typescript/content/RowContent.d.ts +5 -0
- package/build/typescript/content/RowContent.d.ts.map +1 -0
- package/build/typescript/content/SectionContent.d.ts +5 -0
- package/build/typescript/content/SectionContent.d.ts.map +1 -0
- package/build/typescript/content/ShareEntryContent.d.ts +15 -0
- package/build/typescript/content/ShareEntryContent.d.ts.map +1 -0
- package/build/typescript/content/SimulatedHint.d.ts +9 -0
- package/build/typescript/content/SimulatedHint.d.ts.map +1 -0
- package/build/typescript/content/SliderContent.d.ts +10 -0
- package/build/typescript/content/SliderContent.d.ts.map +1 -0
- package/build/typescript/content/SpacerContent.d.ts +5 -0
- package/build/typescript/content/SpacerContent.d.ts.map +1 -0
- package/build/typescript/content/SpinnerContent.d.ts +5 -0
- package/build/typescript/content/SpinnerContent.d.ts.map +1 -0
- package/build/typescript/content/SubmitButtonContent.d.ts +9 -0
- package/build/typescript/content/SubmitButtonContent.d.ts.map +1 -0
- package/build/typescript/content/TextContent.d.ts +5 -0
- package/build/typescript/content/TextContent.d.ts.map +1 -0
- package/build/typescript/content/TileContent.d.ts +5 -0
- package/build/typescript/content/TileContent.d.ts.map +1 -0
- package/build/typescript/content/TimelineContent.d.ts +5 -0
- package/build/typescript/content/TimelineContent.d.ts.map +1 -0
- package/build/typescript/content/TitleContent.d.ts +5 -0
- package/build/typescript/content/TitleContent.d.ts.map +1 -0
- package/build/typescript/content/VideoContent.d.ts +10 -0
- package/build/typescript/content/VideoContent.d.ts.map +1 -0
- package/build/typescript/content/WebLinkContent.d.ts +5 -0
- package/build/typescript/content/WebLinkContent.d.ts.map +1 -0
- package/build/typescript/content/index.d.ts +46 -0
- package/build/typescript/content/index.d.ts.map +1 -0
- package/build/typescript/form-fields/CheckboxField.d.ts +5 -0
- package/build/typescript/form-fields/CheckboxField.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.d.ts +6 -0
- package/build/typescript/form-fields/DateField.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.native.d.ts +5 -0
- package/build/typescript/form-fields/DateField.native.d.ts.map +1 -0
- package/build/typescript/form-fields/DateField.web.d.ts +9 -0
- package/build/typescript/form-fields/DateField.web.d.ts.map +1 -0
- package/build/typescript/form-fields/DropdownField.d.ts +5 -0
- package/build/typescript/form-fields/DropdownField.d.ts.map +1 -0
- package/build/typescript/form-fields/MCQField.d.ts +5 -0
- package/build/typescript/form-fields/MCQField.d.ts.map +1 -0
- package/build/typescript/form-fields/RadioField.d.ts +5 -0
- package/build/typescript/form-fields/RadioField.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.d.ts +6 -0
- package/build/typescript/form-fields/SliderField.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.native.d.ts +5 -0
- package/build/typescript/form-fields/SliderField.native.d.ts.map +1 -0
- package/build/typescript/form-fields/SliderField.web.d.ts +11 -0
- package/build/typescript/form-fields/SliderField.web.d.ts.map +1 -0
- package/build/typescript/form-fields/SubmitButtonField.d.ts +5 -0
- package/build/typescript/form-fields/SubmitButtonField.d.ts.map +1 -0
- package/build/typescript/form-fields/TextField.d.ts +5 -0
- package/build/typescript/form-fields/TextField.d.ts.map +1 -0
- package/build/typescript/form-fields/index.d.ts +13 -0
- package/build/typescript/form-fields/index.d.ts.map +1 -0
- package/build/typescript/i18n/WorkflowI18n.d.ts +75 -0
- package/build/typescript/i18n/WorkflowI18n.d.ts.map +1 -0
- package/build/typescript/icons/VectorIcon.d.ts +4 -0
- package/build/typescript/icons/VectorIcon.d.ts.map +1 -0
- package/build/typescript/icons/VectorIcon.web.d.ts +16 -0
- package/build/typescript/icons/VectorIcon.web.d.ts.map +1 -0
- package/build/typescript/icons/WorkflowIcon.d.ts +19 -0
- package/build/typescript/icons/WorkflowIcon.d.ts.map +1 -0
- package/build/typescript/icons/types.d.ts +12 -0
- package/build/typescript/icons/types.d.ts.map +1 -0
- package/build/typescript/imageUriCache.d.ts +7 -0
- package/build/typescript/imageUriCache.d.ts.map +1 -0
- package/build/typescript/index.d.ts +48 -0
- package/build/typescript/index.d.ts.map +1 -0
- package/build/typescript/modal/WorkflowModal.d.ts +33 -0
- package/build/typescript/modal/WorkflowModal.d.ts.map +1 -0
- package/build/typescript/package.json +1 -0
- package/build/typescript/platform/platformName.d.ts +8 -0
- package/build/typescript/platform/platformName.d.ts.map +1 -0
- package/build/typescript/platform/platformName.web.d.ts +3 -0
- package/build/typescript/platform/platformName.web.d.ts.map +1 -0
- package/build/typescript/protocol/controlSnapshotStore.d.ts +12 -0
- package/build/typescript/protocol/controlSnapshotStore.d.ts.map +1 -0
- package/build/typescript/protocol/useProtocolExchange.d.ts +40 -0
- package/build/typescript/protocol/useProtocolExchange.d.ts.map +1 -0
- package/build/typescript/registries/ContentRegistry.d.ts +57 -0
- package/build/typescript/registries/ContentRegistry.d.ts.map +1 -0
- package/build/typescript/registries/FormFieldRegistry.d.ts +37 -0
- package/build/typescript/registries/FormFieldRegistry.d.ts.map +1 -0
- package/build/typescript/render/NodeBoundary.d.ts +25 -0
- package/build/typescript/render/NodeBoundary.d.ts.map +1 -0
- package/build/typescript/render/RenderTree.d.ts +23 -0
- package/build/typescript/render/RenderTree.d.ts.map +1 -0
- package/build/typescript/render/WorkflowRenderContext.d.ts +57 -0
- package/build/typescript/render/WorkflowRenderContext.d.ts.map +1 -0
- package/build/typescript/render/nodes.d.ts +49 -0
- package/build/typescript/render/nodes.d.ts.map +1 -0
- package/build/typescript/responsive/ResponsiveProvider.d.ts +39 -0
- package/build/typescript/responsive/ResponsiveProvider.d.ts.map +1 -0
- package/build/typescript/responsive/index.d.ts +3 -0
- package/build/typescript/responsive/index.d.ts.map +1 -0
- package/build/typescript/responsive/responsive.d.ts +24 -0
- package/build/typescript/responsive/responsive.d.ts.map +1 -0
- package/build/typescript/style/resolveDisplayHintStyle.d.ts +23 -0
- package/build/typescript/style/resolveDisplayHintStyle.d.ts.map +1 -0
- package/build/typescript/theme/WorkflowTheme.d.ts +177 -0
- package/build/typescript/theme/WorkflowTheme.d.ts.map +1 -0
- package/build/typescript/utils/testable.d.ts +8 -0
- package/build/typescript/utils/testable.d.ts.map +1 -0
- package/package.json +104 -3
- package/src/WorkflowFontScaleContext.tsx +74 -0
- package/src/adapter/WalletAdapter.tsx +225 -0
- package/src/components/FallbackVideoPlayer.native.tsx +9 -0
- package/src/components/FallbackVideoPlayer.tsx +5 -0
- package/src/components/FallbackVideoPlayer.web.tsx +24 -0
- package/src/components/WorkflowButtonLabel.tsx +41 -0
- package/src/components/WorkflowCalendarIcon.tsx +52 -0
- package/src/components/WorkflowText.tsx +121 -0
- package/src/content/BadgeContent.tsx +57 -0
- package/src/content/BarChartContent.tsx +76 -0
- package/src/content/BarcodeContent.tsx +59 -0
- package/src/content/BasicTableContent.tsx +139 -0
- package/src/content/ButtonContent.tsx +124 -0
- package/src/content/CalendarContent.tsx +178 -0
- package/src/content/CardContent.tsx +137 -0
- package/src/content/CarouselContent.tsx +197 -0
- package/src/content/ChipContent.tsx +209 -0
- package/src/content/ChipRowContent.tsx +133 -0
- package/src/content/CredentialOfferContent.tsx +229 -0
- package/src/content/DialContent.tsx +96 -0
- package/src/content/DividerContent.tsx +33 -0
- package/src/content/DonutChartContent.tsx +110 -0
- package/src/content/FormContent.tsx +158 -0
- package/src/content/FormFieldBridge.tsx +144 -0
- package/src/content/GaugeContent.tsx +66 -0
- package/src/content/GridLayoutContent.tsx +285 -0
- package/src/content/ImageContent.tsx +222 -0
- package/src/content/ListContent.tsx +98 -0
- package/src/content/LocationContent.tsx +135 -0
- package/src/content/MapContent.tsx +232 -0
- package/src/content/MultipleChoiceContent.tsx +74 -0
- package/src/content/OpenBadgePreviewContent.tsx +93 -0
- package/src/content/PhotoContent.tsx +110 -0
- package/src/content/PieChartContent.tsx +121 -0
- package/src/content/ProofPresentationContent.tsx +127 -0
- package/src/content/RadioButtonContent.tsx +129 -0
- package/src/content/RowContent.tsx +627 -0
- package/src/content/SectionContent.tsx +133 -0
- package/src/content/ShareEntryContent.tsx +109 -0
- package/src/content/SimulatedHint.tsx +20 -0
- package/src/content/SliderContent.tsx +56 -0
- package/src/content/SpacerContent.tsx +15 -0
- package/src/content/SpinnerContent.tsx +24 -0
- package/src/content/SubmitButtonContent.tsx +256 -0
- package/src/content/TextContent.tsx +140 -0
- package/src/content/TileContent.tsx +216 -0
- package/src/content/TimelineContent.tsx +91 -0
- package/src/content/TitleContent.tsx +49 -0
- package/src/content/VideoContent.tsx +131 -0
- package/src/content/WebLinkContent.tsx +87 -0
- package/src/content/index.ts +45 -0
- package/src/form-fields/CheckboxField.tsx +29 -0
- package/src/form-fields/DateField.native.tsx +123 -0
- package/src/form-fields/DateField.tsx +5 -0
- package/src/form-fields/DateField.web.tsx +32 -0
- package/src/form-fields/DropdownField.tsx +137 -0
- package/src/form-fields/MCQField.tsx +68 -0
- package/src/form-fields/RadioField.tsx +53 -0
- package/src/form-fields/SliderField.native.tsx +53 -0
- package/src/form-fields/SliderField.tsx +5 -0
- package/src/form-fields/SliderField.web.tsx +58 -0
- package/src/form-fields/SubmitButtonField.tsx +33 -0
- package/src/form-fields/TextField.tsx +49 -0
- package/src/form-fields/index.ts +12 -0
- package/src/i18n/WorkflowI18n.tsx +100 -0
- package/src/icons/VectorIcon.tsx +10 -0
- package/src/icons/VectorIcon.web.tsx +55 -0
- package/src/icons/WorkflowIcon.tsx +30 -0
- package/src/icons/types.ts +13 -0
- package/src/imageUriCache.ts +27 -0
- package/src/index.ts +97 -0
- package/src/modal/WorkflowModal.tsx +119 -0
- package/src/platform/platformName.ts +7 -0
- package/src/platform/platformName.web.ts +2 -0
- package/src/protocol/controlSnapshotStore.ts +25 -0
- package/src/protocol/useProtocolExchange.ts +185 -0
- package/src/registries/ContentRegistry.tsx +130 -0
- package/src/registries/FormFieldRegistry.tsx +83 -0
- package/src/render/NodeBoundary.tsx +69 -0
- package/src/render/RenderTree.tsx +63 -0
- package/src/render/WorkflowRenderContext.tsx +71 -0
- package/src/render/nodes.ts +104 -0
- package/src/responsive/ResponsiveProvider.tsx +103 -0
- package/src/responsive/index.ts +7 -0
- package/src/responsive/responsive.ts +67 -0
- package/src/style/resolveDisplayHintStyle.ts +153 -0
- package/src/theme/WorkflowTheme.tsx +162 -0
- package/src/utils/testable.ts +10 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { ContentRegistry } from "../registries/ContentRegistry.js";
|
|
6
|
+
import { FormFieldRegistry as GlobalFormFieldRegistry } from "../registries/FormFieldRegistry.js";
|
|
7
|
+
import { deriveNode } from "../render/nodes.js";
|
|
8
|
+
import { LiveInputContext } from "../render/WorkflowRenderContext.js";
|
|
9
|
+
import { useWorkflowTheme } from "../theme/WorkflowTheme.js";
|
|
10
|
+
|
|
11
|
+
// Field styles come from the theme and win over the host's own `styles`
|
|
12
|
+
// (inputs inside a form look the same on every screen).
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const FIELD_STYLE_KEYS = ['input', 'dateButton', 'dropdown', 'checkboxRow', 'checkbox', 'checkboxLabel', 'radioRow', 'radioOuter', 'radioInner', 'radioLabel'];
|
|
15
|
+
/**
|
|
16
|
+
* Whether a form child is an input (rendered by the form-field registry) or a
|
|
17
|
+
* display item such as a paragraph, title or divider (rendered by the content
|
|
18
|
+
* registry). `text` is both: with a `name` / `form-id` it is the legacy text
|
|
19
|
+
* input (action-menu `fields`), without one it is a paragraph.
|
|
20
|
+
*/
|
|
21
|
+
export function isFormFieldChild(field, registry) {
|
|
22
|
+
if (!field || typeof field.type !== 'string' || !registry.has(field.type)) return false;
|
|
23
|
+
if (field.type === 'text') return Boolean(field.name || field['form-id']);
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
const FormContent = ({
|
|
27
|
+
item,
|
|
28
|
+
styles,
|
|
29
|
+
colors,
|
|
30
|
+
formData = {},
|
|
31
|
+
onFieldChange,
|
|
32
|
+
onAction,
|
|
33
|
+
FormFieldRegistry
|
|
34
|
+
}) => {
|
|
35
|
+
const registry = FormFieldRegistry || GlobalFormFieldRegistry;
|
|
36
|
+
const theme = useWorkflowTheme();
|
|
37
|
+
const children = Array.isArray(item.fields) ? item.fields : Array.isArray(item.children) ? item.children : [];
|
|
38
|
+
// Only inputs carry form values; display children are rendered but never submitted.
|
|
39
|
+
const fields = children.filter(field => isFormFieldChild(field, registry));
|
|
40
|
+
const initialValues = {};
|
|
41
|
+
fields.forEach((field, index) => {
|
|
42
|
+
const name = field.name || field['form-id'] || `field_${index}`;
|
|
43
|
+
initialValues[name] = formData[name] ?? field.defaultValue ?? '';
|
|
44
|
+
});
|
|
45
|
+
const [localValues, setLocalValues] = useState(initialValues);
|
|
46
|
+
const onFieldChangeRef = useRef(onFieldChange);
|
|
47
|
+
onFieldChangeRef.current = onFieldChange;
|
|
48
|
+
const fieldsKey = fields.map((field, index) => field.name || field['form-id'] || `field_${index}`).join('|');
|
|
49
|
+
|
|
50
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: re-run only when the set of fields changes (fieldsKey), not on every formData update
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
fields.forEach((field, index) => {
|
|
53
|
+
const name = field.name || field['form-id'] || `field_${index}`;
|
|
54
|
+
const def = field.defaultValue;
|
|
55
|
+
if (formData[name] == null && def != null && def !== '') {
|
|
56
|
+
onFieldChangeRef.current?.(name, def);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}, [fieldsKey]);
|
|
60
|
+
|
|
61
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: fields is derived from props each render; fieldsKey is its stable identity
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
setLocalValues(prev => {
|
|
64
|
+
const next = {
|
|
65
|
+
...prev
|
|
66
|
+
};
|
|
67
|
+
let changed = false;
|
|
68
|
+
fields.forEach((field, index) => {
|
|
69
|
+
const name = field.name || field['form-id'] || `field_${index}`;
|
|
70
|
+
if (formData[name] !== undefined && next[name] !== formData[name]) {
|
|
71
|
+
next[name] = formData[name];
|
|
72
|
+
changed = true;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return changed ? next : prev;
|
|
76
|
+
});
|
|
77
|
+
}, [formData, fieldsKey]);
|
|
78
|
+
if (children.length === 0) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const mergedStyles = {
|
|
82
|
+
...styles
|
|
83
|
+
};
|
|
84
|
+
for (const key of FIELD_STYLE_KEYS) mergedStyles[key] = theme.styles[key];
|
|
85
|
+
return (
|
|
86
|
+
/*#__PURE__*/
|
|
87
|
+
// Fields read the form's own values for `showWhen` / `{{ input.x }}` (see render/NodeBoundary).
|
|
88
|
+
_jsx(LiveInputContext.Provider, {
|
|
89
|
+
value: localValues,
|
|
90
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
91
|
+
style: {
|
|
92
|
+
borderWidth: 1,
|
|
93
|
+
borderColor: colors.border,
|
|
94
|
+
borderRadius: 8,
|
|
95
|
+
padding: 12,
|
|
96
|
+
gap: 4
|
|
97
|
+
},
|
|
98
|
+
children: children.map((child, childIndex) => {
|
|
99
|
+
if (!isFormFieldChild(child, registry)) {
|
|
100
|
+
return /*#__PURE__*/_jsx(View, {
|
|
101
|
+
children: ContentRegistry.render(child?.type, {
|
|
102
|
+
item: child,
|
|
103
|
+
onAction,
|
|
104
|
+
styles,
|
|
105
|
+
colors,
|
|
106
|
+
formData: localValues,
|
|
107
|
+
onFieldChange
|
|
108
|
+
})
|
|
109
|
+
}, `display-${childIndex}`);
|
|
110
|
+
}
|
|
111
|
+
const field = child;
|
|
112
|
+
const index = fields.indexOf(child);
|
|
113
|
+
const name = field.name || field['form-id'] || `field_${index}`;
|
|
114
|
+
const fieldValue = localValues[name];
|
|
115
|
+
const handleChange = value => {
|
|
116
|
+
setLocalValues(prev => ({
|
|
117
|
+
...prev,
|
|
118
|
+
[name]: value
|
|
119
|
+
}));
|
|
120
|
+
if (onFieldChange) onFieldChange(name, value);
|
|
121
|
+
};
|
|
122
|
+
const normalizedField = deriveNode(field, {
|
|
123
|
+
name
|
|
124
|
+
});
|
|
125
|
+
return /*#__PURE__*/_jsx(View, {
|
|
126
|
+
children: registry.render(field.type, {
|
|
127
|
+
field: normalizedField,
|
|
128
|
+
value: fieldValue,
|
|
129
|
+
onChange: handleChange,
|
|
130
|
+
styles: mergedStyles,
|
|
131
|
+
colors
|
|
132
|
+
})
|
|
133
|
+
}, `${name}-${index}`);
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
ContentRegistry.register('form', FormContent);
|
|
140
|
+
export default FormContent;
|
|
141
|
+
//# sourceMappingURL=FormContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","View","ContentRegistry","FormFieldRegistry","GlobalFormFieldRegistry","deriveNode","LiveInputContext","useWorkflowTheme","jsx","_jsx","FIELD_STYLE_KEYS","isFormFieldChild","field","registry","type","has","Boolean","name","FormContent","item","styles","colors","formData","onFieldChange","onAction","theme","children","Array","isArray","fields","filter","initialValues","forEach","index","defaultValue","localValues","setLocalValues","onFieldChangeRef","current","fieldsKey","map","join","def","prev","next","changed","undefined","length","mergedStyles","key","Provider","value","style","borderWidth","borderColor","border","borderRadius","padding","gap","child","childIndex","render","indexOf","fieldValue","handleChange","normalizedField","onChange","register"],"sourceRoot":"../../../src","sources":["content/FormContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,QAAQ,cAAc;AACnC,SAA4BC,eAAe,QAAQ,kCAA+B;AAClF,SAASC,iBAAiB,IAAIC,uBAAuB,QAAQ,oCAAiC;AAC9F,SAASC,UAAU,QAAQ,oBAAiB;AAC5C,SAASC,gBAAgB,QAAQ,oCAAiC;AAClE,SAASC,gBAAgB,QAAQ,2BAAwB;;AAEzD;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,gBAAgB,GAAG,CACvB,OAAO,EACP,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,CACJ;AAQV;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,KAAU,EAAEC,QAAwC,EAAW;EAC9F,IAAI,CAACD,KAAK,IAAI,OAAOA,KAAK,CAACE,IAAI,KAAK,QAAQ,IAAI,CAACD,QAAQ,CAACE,GAAG,CAACH,KAAK,CAACE,IAAI,CAAC,EAAE,OAAO,KAAK;EACvF,IAAIF,KAAK,CAACE,IAAI,KAAK,MAAM,EAAE,OAAOE,OAAO,CAACJ,KAAK,CAACK,IAAI,IAAIL,KAAK,CAAC,SAAS,CAAC,CAAC;EACzE,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;UAEpC,MAAM+C,YAAY,GAAIb,KAAU,IAAK;YACnCf,cAAc,CAAEO,IAAI,KAAM;cAAE,GAAGA,IAAI;cAAE,CAAC1B,IAAI,GAAGkC;YAAM,CAAC,CAAC,CAAC;YACtD,IAAI5B,aAAa,EAAEA,aAAa,CAACN,IAAI,EAAEkC,KAAK,CAAC;UAC/C,CAAC;UAED,MAAMc,eAAe,GAAG5D,UAAU,CAACO,KAAK,EAAE;YAAEK;UAAK,CAAC,CAAC;UAEnD,oBACER,IAAA,CAACR,IAAI;YAAAyB,QAAA,EACFb,QAAQ,CAACgD,MAAM,CAACjD,KAAK,CAACE,IAAI,EAAE;cAC3BF,KAAK,EAAEqD,eAAe;cACtBd,KAAK,EAAEY,UAAU;cACjBG,QAAQ,EAAEF,YAAY;cACtB5C,MAAM,EAAE4B,YAAY;cACpB3B;YACF,CAAC;UAAC,GAPO,GAAGJ,IAAI,IAAIgB,KAAK,EAQrB,CAAC;QAEX,CAAC;MAAC,CACE;IAAC,CACkB;EAAC;AAEhC,CAAC;AAED/B,eAAe,CAACiE,QAAQ,CAAC,MAAM,EAAEjD,WAAW,CAAC;AAE7C,eAAeA,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { ContentRegistry } from "../registries/ContentRegistry.js";
|
|
6
|
+
import { FormFieldRegistry } from "../registries/FormFieldRegistry.js";
|
|
7
|
+
const bridgeStyles = StyleSheet.create({
|
|
8
|
+
input: {
|
|
9
|
+
borderWidth: 1,
|
|
10
|
+
borderRadius: 8,
|
|
11
|
+
paddingHorizontal: 12,
|
|
12
|
+
paddingVertical: 10,
|
|
13
|
+
fontSize: 15,
|
|
14
|
+
marginTop: 4
|
|
15
|
+
},
|
|
16
|
+
checkboxRow: {
|
|
17
|
+
flexDirection: 'row',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
paddingVertical: 8
|
|
20
|
+
},
|
|
21
|
+
checkbox: {
|
|
22
|
+
width: 22,
|
|
23
|
+
height: 22,
|
|
24
|
+
borderRadius: 4,
|
|
25
|
+
borderWidth: 2,
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
marginRight: 10
|
|
29
|
+
},
|
|
30
|
+
checkboxLabel: {
|
|
31
|
+
fontSize: 15,
|
|
32
|
+
flex: 1
|
|
33
|
+
},
|
|
34
|
+
radioRow: {
|
|
35
|
+
flexDirection: 'row',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
paddingVertical: 8
|
|
38
|
+
},
|
|
39
|
+
radioOuter: {
|
|
40
|
+
width: 22,
|
|
41
|
+
height: 22,
|
|
42
|
+
borderRadius: 11,
|
|
43
|
+
borderWidth: 2,
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
marginRight: 10
|
|
47
|
+
},
|
|
48
|
+
radioInner: {
|
|
49
|
+
width: 10,
|
|
50
|
+
height: 10,
|
|
51
|
+
borderRadius: 5,
|
|
52
|
+
backgroundColor: '#FFFFFF'
|
|
53
|
+
},
|
|
54
|
+
radioLabel: {
|
|
55
|
+
fontSize: 15,
|
|
56
|
+
flex: 1
|
|
57
|
+
},
|
|
58
|
+
dropdown: {
|
|
59
|
+
borderWidth: 1,
|
|
60
|
+
borderRadius: 8,
|
|
61
|
+
paddingHorizontal: 12,
|
|
62
|
+
paddingVertical: 12,
|
|
63
|
+
marginTop: 4,
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
alignItems: 'center'
|
|
66
|
+
},
|
|
67
|
+
dateButton: {
|
|
68
|
+
borderWidth: 1,
|
|
69
|
+
borderRadius: 8,
|
|
70
|
+
paddingHorizontal: 12,
|
|
71
|
+
paddingVertical: 12,
|
|
72
|
+
marginTop: 4
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const defaultFieldBuilder = item => ({
|
|
76
|
+
label: item.label ?? item.text ?? '',
|
|
77
|
+
options: Array.isArray(item.options) ? item.options : undefined,
|
|
78
|
+
min: item.min != null ? Number(item.min) : undefined,
|
|
79
|
+
max: item.max != null ? Number(item.max) : undefined,
|
|
80
|
+
placeholder: item.placeholder,
|
|
81
|
+
required: item.required
|
|
82
|
+
});
|
|
83
|
+
const BRIDGE_MAPPINGS = [{
|
|
84
|
+
contentType: 'text-input',
|
|
85
|
+
formFieldType: 'text-input'
|
|
86
|
+
}, {
|
|
87
|
+
contentType: 'text-area',
|
|
88
|
+
formFieldType: 'text-area'
|
|
89
|
+
}, {
|
|
90
|
+
contentType: 'text-field',
|
|
91
|
+
formFieldType: 'text-field'
|
|
92
|
+
}, {
|
|
93
|
+
contentType: 'check-box',
|
|
94
|
+
formFieldType: 'check-box'
|
|
95
|
+
}, {
|
|
96
|
+
contentType: 'drop-down',
|
|
97
|
+
formFieldType: 'drop-down'
|
|
98
|
+
}, {
|
|
99
|
+
contentType: 'date',
|
|
100
|
+
formFieldType: 'date'
|
|
101
|
+
},
|
|
102
|
+
// Contract aliases (HINT_ALIASES). The wallet rendered nothing for these at top level.
|
|
103
|
+
{
|
|
104
|
+
contentType: 'textarea',
|
|
105
|
+
formFieldType: 'textarea'
|
|
106
|
+
}, {
|
|
107
|
+
contentType: 'checkbox',
|
|
108
|
+
formFieldType: 'checkbox'
|
|
109
|
+
}, {
|
|
110
|
+
contentType: 'dropdown',
|
|
111
|
+
formFieldType: 'dropdown'
|
|
112
|
+
}];
|
|
113
|
+
const createBridgeComponent = (formFieldType, buildField) => {
|
|
114
|
+
const BridgeComponent = ({
|
|
115
|
+
item,
|
|
116
|
+
styles,
|
|
117
|
+
colors,
|
|
118
|
+
formData,
|
|
119
|
+
onFieldChange
|
|
120
|
+
}) => {
|
|
121
|
+
const fieldName = (item['form-id'] ?? item.name ?? item.id ?? item.type) || formFieldType;
|
|
122
|
+
const [localValue, setLocalValue] = useState(formData?.[fieldName] ?? item.defaultValue ?? '');
|
|
123
|
+
const mergedStyles = {
|
|
124
|
+
...styles,
|
|
125
|
+
...bridgeStyles
|
|
126
|
+
};
|
|
127
|
+
const builtField = buildField(item);
|
|
128
|
+
const field = {
|
|
129
|
+
type: item.type,
|
|
130
|
+
name: fieldName,
|
|
131
|
+
...builtField
|
|
132
|
+
};
|
|
133
|
+
const handleChange = val => {
|
|
134
|
+
setLocalValue(val);
|
|
135
|
+
onFieldChange?.(fieldName, val);
|
|
136
|
+
};
|
|
137
|
+
return FormFieldRegistry.render(formFieldType, {
|
|
138
|
+
field,
|
|
139
|
+
value: localValue,
|
|
140
|
+
onChange: handleChange,
|
|
141
|
+
styles: mergedStyles,
|
|
142
|
+
colors
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
BridgeComponent.displayName = `FormFieldBridge_${formFieldType}`;
|
|
146
|
+
return BridgeComponent;
|
|
147
|
+
};
|
|
148
|
+
BRIDGE_MAPPINGS.forEach(({
|
|
149
|
+
contentType,
|
|
150
|
+
formFieldType,
|
|
151
|
+
buildField
|
|
152
|
+
}) => {
|
|
153
|
+
if (!ContentRegistry.has(contentType)) {
|
|
154
|
+
ContentRegistry.register(contentType, createBridgeComponent(formFieldType, buildField ?? defaultFieldBuilder));
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
//# sourceMappingURL=FormFieldBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","StyleSheet","ContentRegistry","FormFieldRegistry","bridgeStyles","create","input","borderWidth","borderRadius","paddingHorizontal","paddingVertical","fontSize","marginTop","checkboxRow","flexDirection","alignItems","checkbox","width","height","justifyContent","marginRight","checkboxLabel","flex","radioRow","radioOuter","radioInner","backgroundColor","radioLabel","dropdown","dateButton","defaultFieldBuilder","item","label","text","options","Array","isArray","undefined","min","Number","max","placeholder","required","BRIDGE_MAPPINGS","contentType","formFieldType","createBridgeComponent","buildField","BridgeComponent","styles","colors","formData","onFieldChange","fieldName","name","id","type","localValue","setLocalValue","defaultValue","mergedStyles","builtField","field","handleChange","val","render","value","onChange","displayName","forEach","has","register"],"sourceRoot":"../../../src","sources":["content/FormFieldBridge.tsx"],"mappings":";;AAAA,SAAgBA,QAAQ,QAAQ,OAAO;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAA4BC,eAAe,QAAQ,kCAA+B;AAClF,SAASC,iBAAiB,QAAQ,oCAAiC;AAEnE,MAAMC,YAAY,GAAGH,UAAU,CAACI,MAAM,CAAC;EACrCC,KAAK,EAAE;IACLC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,CAAC;IACfC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE;EACb,CAAC;EACDC,WAAW,EAAE;IACXC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBL,eAAe,EAAE;EACnB,CAAC;EACDM,QAAQ,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVV,YAAY,EAAE,CAAC;IACfD,WAAW,EAAE,CAAC;IACdQ,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE,QAAQ;IACxBC,WAAW,EAAE;EACf,CAAC;EACDC,aAAa,EAAE;IACbV,QAAQ,EAAE,EAAE;IACZW,IAAI,EAAE;EACR,CAAC;EACDC,QAAQ,EAAE;IACRT,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBL,eAAe,EAAE;EACnB,CAAC;EACDc,UAAU,EAAE;IACVP,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVV,YAAY,EAAE,EAAE;IAChBD,WAAW,EAAE,CAAC;IACdQ,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE,QAAQ;IACxBC,WAAW,EAAE;EACf,CAAC;EACDK,UAAU,EAAE;IACVR,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVV,YAAY,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,CAAC8D,MAAM,CAACpB,aAAa,EAAE;MAC7CiB,KAAK;MACLI,KAAK,EAAET,UAAU;MACjBU,QAAQ,EAAEJ,YAAY;MACtBd,MAAM,EAAEW,YAAY;MACpBV;IACF,CAAC,CAAC;EACJ,CAAC;EAEDF,eAAe,CAACoB,WAAW,GAAG,mBAAmBvB,aAAa,EAAE;EAChE,OAAOG,eAAe;AACxB,CAAC;AAEDL,eAAe,CAAC0B,OAAO,CAAC,CAAC;EAAEzB,WAAW;EAAEC,aAAa;EAAEE;AAAW,CAAC,KAAK;EACtE,IAAI,CAAC7C,eAAe,CAACoE,GAAG,CAAC1B,WAAW,CAAC,EAAE;IACrC1C,eAAe,CAACqE,QAAQ,CAAC3B,WAAW,EAAEE,qBAAqB,CAACD,aAAa,EAAEE,UAAU,IAAIjB,mBAAmB,CAAC,CAAC;EAChH;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
import Svg, { 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 GaugeContent = ({
|
|
10
|
+
item,
|
|
11
|
+
styles,
|
|
12
|
+
colors
|
|
13
|
+
}) => {
|
|
14
|
+
const value = parseFloat(item.value || '0');
|
|
15
|
+
const min = parseFloat(item.min || '0');
|
|
16
|
+
const max = parseFloat(item.max || '100');
|
|
17
|
+
|
|
18
|
+
// Calculate percentage
|
|
19
|
+
const percentage = (value - min) / (max - min) * 100;
|
|
20
|
+
const clampedPercentage = Math.max(0, Math.min(100, percentage));
|
|
21
|
+
const size = 200;
|
|
22
|
+
const radius = (size - 20) / 2;
|
|
23
|
+
const strokeWidth = 20;
|
|
24
|
+
const circumference = Math.PI * radius; // Half circle
|
|
25
|
+
|
|
26
|
+
// Calculate dash offset
|
|
27
|
+
const dashOffset = circumference - clampedPercentage / 100 * circumference;
|
|
28
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
29
|
+
style: [styles.fieldContainer, resolveItemSurfaceStyle(item)],
|
|
30
|
+
children: [item.title && /*#__PURE__*/_jsx(Text, {
|
|
31
|
+
style: [styles.formLabel, {
|
|
32
|
+
color: colors.text,
|
|
33
|
+
marginBottom: 12,
|
|
34
|
+
textAlign: 'center'
|
|
35
|
+
}],
|
|
36
|
+
children: item.title
|
|
37
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
38
|
+
style: {
|
|
39
|
+
alignItems: 'center'
|
|
40
|
+
},
|
|
41
|
+
children: [/*#__PURE__*/_jsxs(Svg, {
|
|
42
|
+
width: size,
|
|
43
|
+
height: size / 2 + 20,
|
|
44
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
45
|
+
d: `M 10,${size / 2} A ${radius},${radius} 0 0,1 ${size - 10},${size / 2}`,
|
|
46
|
+
fill: "none",
|
|
47
|
+
stroke: `${colors.primary}30`,
|
|
48
|
+
strokeWidth: strokeWidth,
|
|
49
|
+
strokeLinecap: "round"
|
|
50
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
51
|
+
d: `M 10,${size / 2} A ${radius},${radius} 0 0,1 ${size - 10},${size / 2}`,
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: colors.primary,
|
|
54
|
+
strokeWidth: strokeWidth,
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeDasharray: `${circumference} ${circumference}`,
|
|
57
|
+
strokeDashoffset: dashOffset
|
|
58
|
+
})]
|
|
59
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
60
|
+
style: [styles.title, {
|
|
61
|
+
color: colors.text,
|
|
62
|
+
marginTop: 8
|
|
63
|
+
}],
|
|
64
|
+
children: value
|
|
65
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
66
|
+
style: [styles.description, {
|
|
67
|
+
color: colors.text,
|
|
68
|
+
fontSize: 12
|
|
69
|
+
}],
|
|
70
|
+
children: [min, " - ", max]
|
|
71
|
+
})]
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
ContentRegistry.register('gauge', GaugeContent);
|
|
76
|
+
export default GaugeContent;
|
|
77
|
+
//# sourceMappingURL=GaugeContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","View","Svg","Path","ContentRegistry","resolveItemSurfaceStyle","jsx","_jsx","jsxs","_jsxs","GaugeContent","item","styles","colors","value","parseFloat","min","max","percentage","clampedPercentage","Math","size","radius","strokeWidth","circumference","PI","dashOffset","style","fieldContainer","children","title","formLabel","color","text","marginBottom","textAlign","alignItems","width","height","d","fill","stroke","primary","strokeLinecap","strokeDasharray","strokeDashoffset","marginTop","description","fontSize","register"],"sourceRoot":"../../../src","sources":["content/GaugeContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAA4BC,eAAe,QAAQ,kCAA+B;AAClF,SAASC,uBAAuB,QAAQ,qCAAkC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1E,MAAMC,YAAoC,GAAGA,CAAC;EAAEC,IAAI;EAAEC,MAAM;EAAEC;AAAO,CAAC,KAAK;EACzE,MAAMC,KAAK,GAAGC,UAAU,CAACJ,IAAI,CAACG,KAAK,IAAI,GAAG,CAAC;EAC3C,MAAME,GAAG,GAAGD,UAAU,CAACJ,IAAI,CAACK,GAAG,IAAI,GAAG,CAAC;EACvC,MAAMC,GAAG,GAAGF,UAAU,CAACJ,IAAI,CAACM,GAAG,IAAI,KAAK,CAAC;;EAEz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+
import { ScrollView, View } from 'react-native';
|
|
5
|
+
import { ContentRegistry } from "../registries/ContentRegistry.js";
|
|
6
|
+
import { useResponsive } from "../responsive/index.js";
|
|
7
|
+
import { resolveItemBackgroundColor, resolveSurfacePadding } from "../style/resolveDisplayHintStyle.js";
|
|
8
|
+
import { coerceToChipRowItem } from "./ChipRowContent.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const MEDIA_TYPES = new Set(['image', 'video', 'photo']);
|
|
11
|
+
const parseCol = value => {
|
|
12
|
+
const n = Number(value);
|
|
13
|
+
if (!Number.isFinite(n) || n <= 0) return 12;
|
|
14
|
+
return Math.max(1, Math.min(12, Math.floor(n)));
|
|
15
|
+
};
|
|
16
|
+
const GridLayoutContent = ({
|
|
17
|
+
item,
|
|
18
|
+
onAction,
|
|
19
|
+
styles,
|
|
20
|
+
colors,
|
|
21
|
+
formData,
|
|
22
|
+
onFieldChange,
|
|
23
|
+
buttonVariant,
|
|
24
|
+
disabled
|
|
25
|
+
}) => {
|
|
26
|
+
const {
|
|
27
|
+
s,
|
|
28
|
+
isSmall,
|
|
29
|
+
isTablet
|
|
30
|
+
} = useResponsive();
|
|
31
|
+
const rawItems = item.items ?? item.children ?? item.content ?? [];
|
|
32
|
+
const gap = s(typeof item.gap === 'number' ? item.gap : 10);
|
|
33
|
+
const padding = resolveSurfacePadding(item.padding);
|
|
34
|
+
const pad = padding != null ? s(padding) : 0;
|
|
35
|
+
const backgroundColor = resolveItemBackgroundColor(item);
|
|
36
|
+
const explicitColumns = Number(item.columns ?? item.cols ?? 0);
|
|
37
|
+
const orientation = String(item.orientation ?? item.direction ?? item.layout ?? 'horizontal').toLowerCase();
|
|
38
|
+
const isVertical = orientation === 'vertical' || orientation === 'column';
|
|
39
|
+
const forceScroll = String(item.scroll ?? '').toLowerCase() === 'true' || item.scroll === true || String(item.wrap ?? '').toLowerCase() === 'false' || item.wrap === false;
|
|
40
|
+
const isWrap = !forceScroll && (orientation === 'wrap' || String(item.wrap ?? '').toLowerCase() === 'true' || item.wrap === true);
|
|
41
|
+
const useWrap = isWrap && !isVertical;
|
|
42
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
43
|
+
const [firstCellHeight, setFirstCellHeight] = useState(0);
|
|
44
|
+
const onLayout = useCallback(event => {
|
|
45
|
+
const next = Math.floor(event.nativeEvent.layout.width);
|
|
46
|
+
if (next > 0) {
|
|
47
|
+
setContainerWidth(prev => Math.abs(prev - next) > 1 ? next : prev);
|
|
48
|
+
}
|
|
49
|
+
}, []);
|
|
50
|
+
const onFirstCellLayout = useCallback(event => {
|
|
51
|
+
const next = Math.ceil(event.nativeEvent.layout.height);
|
|
52
|
+
if (next > 0) {
|
|
53
|
+
setFirstCellHeight(prev => Math.abs(prev - next) > 1 ? next : prev);
|
|
54
|
+
}
|
|
55
|
+
}, []);
|
|
56
|
+
const scrollChildWidth = useMemo(() => {
|
|
57
|
+
const ratio = isTablet ? 0.36 : isSmall ? 0.58 : 0.48;
|
|
58
|
+
const minW = s(isSmall ? 132 : 148);
|
|
59
|
+
if (containerWidth <= 0) return minW;
|
|
60
|
+
return Math.max(minW, Math.floor(containerWidth * ratio));
|
|
61
|
+
}, [containerWidth, isTablet, isSmall, s]);
|
|
62
|
+
const wrapColCount = useMemo(() => {
|
|
63
|
+
if (isVertical) return 1;
|
|
64
|
+
if (explicitColumns > 0) return Math.max(1, Math.min(4, Math.floor(explicitColumns)));
|
|
65
|
+
if (rawItems.length === 0) return 1;
|
|
66
|
+
const spans = rawItems.map(child => parseCol(child.col));
|
|
67
|
+
const minSpan = Math.min(...spans);
|
|
68
|
+
if (minSpan >= 12) return 1;
|
|
69
|
+
return Math.max(1, Math.floor(12 / minSpan));
|
|
70
|
+
}, [isVertical, explicitColumns, rawItems]);
|
|
71
|
+
const wrapCellWidth = useMemo(() => {
|
|
72
|
+
if (containerWidth <= 0) return undefined;
|
|
73
|
+
const inner = Math.max(containerWidth - pad * 2 - gap * (wrapColCount - 1), 1);
|
|
74
|
+
return Math.floor(inner / wrapColCount);
|
|
75
|
+
}, [containerWidth, pad, gap, wrapColCount]);
|
|
76
|
+
if (rawItems.length === 0) return null;
|
|
77
|
+
const chipRowItem = coerceToChipRowItem({
|
|
78
|
+
...item,
|
|
79
|
+
type: item.type || 'grid',
|
|
80
|
+
children: rawItems,
|
|
81
|
+
items: rawItems,
|
|
82
|
+
scroll: true,
|
|
83
|
+
wrap: false
|
|
84
|
+
});
|
|
85
|
+
if (chipRowItem && ContentRegistry.has('chip-row')) {
|
|
86
|
+
return /*#__PURE__*/_jsx(View, {
|
|
87
|
+
style: {
|
|
88
|
+
width: '100%',
|
|
89
|
+
maxWidth: '100%',
|
|
90
|
+
backgroundColor,
|
|
91
|
+
padding: pad || undefined
|
|
92
|
+
},
|
|
93
|
+
children: ContentRegistry.render('chip-row', {
|
|
94
|
+
item: chipRowItem,
|
|
95
|
+
onAction,
|
|
96
|
+
styles,
|
|
97
|
+
colors,
|
|
98
|
+
formData,
|
|
99
|
+
onFieldChange,
|
|
100
|
+
buttonVariant,
|
|
101
|
+
disabled
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const renderCell = (child, index, width, fill, center = false, onCellLayout, minHeight) => {
|
|
106
|
+
if (!ContentRegistry.has(child.type)) return null;
|
|
107
|
+
return /*#__PURE__*/_jsx(View, {
|
|
108
|
+
onLayout: onCellLayout,
|
|
109
|
+
style: {
|
|
110
|
+
width: width,
|
|
111
|
+
maxWidth: width,
|
|
112
|
+
minWidth: 0,
|
|
113
|
+
minHeight: minHeight && minHeight > 0 ? minHeight : undefined,
|
|
114
|
+
flexGrow: 0,
|
|
115
|
+
flexShrink: 0,
|
|
116
|
+
alignSelf: center ? 'center' : 'stretch'
|
|
117
|
+
},
|
|
118
|
+
children: ContentRegistry.render(child.type, {
|
|
119
|
+
item: child,
|
|
120
|
+
onAction,
|
|
121
|
+
styles,
|
|
122
|
+
colors,
|
|
123
|
+
formData,
|
|
124
|
+
onFieldChange,
|
|
125
|
+
buttonVariant,
|
|
126
|
+
fillContainer: fill,
|
|
127
|
+
disabled
|
|
128
|
+
})
|
|
129
|
+
}, `grid-cell-${index}`);
|
|
130
|
+
};
|
|
131
|
+
if (isVertical) {
|
|
132
|
+
const centerKids = String(item.align ?? '').toLowerCase() === 'center';
|
|
133
|
+
const peek = s(44);
|
|
134
|
+
const measuredMaxHeight = firstCellHeight > 0 ? firstCellHeight + gap + peek : undefined;
|
|
135
|
+
const maxHeight = measuredMaxHeight ?? s(420);
|
|
136
|
+
const cellWidth = centerKids ? '82%' : '100%';
|
|
137
|
+
const cells = rawItems.map((child, index) => renderCell(child, index, cellWidth, true, centerKids, index === 0 ? onFirstCellLayout : undefined, firstCellHeight > 0 ? firstCellHeight : undefined));
|
|
138
|
+
if (maxHeight != null) {
|
|
139
|
+
return /*#__PURE__*/_jsx(View, {
|
|
140
|
+
onLayout: onLayout,
|
|
141
|
+
style: {
|
|
142
|
+
width: '100%',
|
|
143
|
+
maxWidth: '100%',
|
|
144
|
+
maxHeight,
|
|
145
|
+
padding: pad > 0 ? pad : undefined,
|
|
146
|
+
backgroundColor,
|
|
147
|
+
overflow: 'hidden'
|
|
148
|
+
},
|
|
149
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
150
|
+
style: {
|
|
151
|
+
maxHeight,
|
|
152
|
+
width: '100%'
|
|
153
|
+
},
|
|
154
|
+
contentContainerStyle: {
|
|
155
|
+
flexDirection: 'column',
|
|
156
|
+
alignItems: centerKids ? 'center' : 'stretch',
|
|
157
|
+
gap,
|
|
158
|
+
paddingVertical: s(2)
|
|
159
|
+
},
|
|
160
|
+
showsVerticalScrollIndicator: false,
|
|
161
|
+
nestedScrollEnabled: true,
|
|
162
|
+
children: cells
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return /*#__PURE__*/_jsx(View, {
|
|
167
|
+
onLayout: onLayout,
|
|
168
|
+
style: {
|
|
169
|
+
width: '100%',
|
|
170
|
+
maxWidth: '100%',
|
|
171
|
+
flexDirection: 'column',
|
|
172
|
+
alignItems: centerKids ? 'center' : 'stretch',
|
|
173
|
+
gap,
|
|
174
|
+
padding: pad > 0 ? pad : undefined,
|
|
175
|
+
backgroundColor
|
|
176
|
+
},
|
|
177
|
+
children: cells
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
if (useWrap) {
|
|
181
|
+
return /*#__PURE__*/_jsx(View, {
|
|
182
|
+
onLayout: onLayout,
|
|
183
|
+
style: {
|
|
184
|
+
width: '100%',
|
|
185
|
+
maxWidth: '100%',
|
|
186
|
+
flexDirection: 'row',
|
|
187
|
+
flexWrap: 'wrap',
|
|
188
|
+
alignItems: 'stretch',
|
|
189
|
+
gap,
|
|
190
|
+
padding: pad > 0 ? pad : undefined,
|
|
191
|
+
backgroundColor
|
|
192
|
+
},
|
|
193
|
+
children: rawItems.map((child, index) => {
|
|
194
|
+
const span = parseCol(child.col);
|
|
195
|
+
const units = Math.max(1, Math.min(wrapColCount, Math.round(span / 12 * wrapColCount)));
|
|
196
|
+
const width = wrapCellWidth != null ? wrapCellWidth * units + gap * (units - 1) : `${Math.floor(100 / wrapColCount * units)}%`;
|
|
197
|
+
return renderCell(child, index, width, MEDIA_TYPES.has(child.type));
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return /*#__PURE__*/_jsx(View, {
|
|
202
|
+
onLayout: onLayout,
|
|
203
|
+
style: {
|
|
204
|
+
width: '100%',
|
|
205
|
+
maxWidth: '100%',
|
|
206
|
+
padding: pad > 0 ? pad : undefined,
|
|
207
|
+
backgroundColor
|
|
208
|
+
},
|
|
209
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
210
|
+
horizontal: true,
|
|
211
|
+
showsHorizontalScrollIndicator: false,
|
|
212
|
+
decelerationRate: "fast",
|
|
213
|
+
contentContainerStyle: {
|
|
214
|
+
flexDirection: 'row',
|
|
215
|
+
alignItems: 'stretch',
|
|
216
|
+
gap,
|
|
217
|
+
paddingVertical: s(2)
|
|
218
|
+
},
|
|
219
|
+
children: rawItems.map((child, index) => renderCell(child, index, scrollChildWidth, true, false, index === 0 ? onFirstCellLayout : undefined, firstCellHeight > 0 ? firstCellHeight : undefined))
|
|
220
|
+
})
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
ContentRegistry.register('grid-layout', GridLayoutContent);
|
|
224
|
+
ContentRegistry.register('grid_layout', GridLayoutContent);
|
|
225
|
+
ContentRegistry.register('grid', GridLayoutContent);
|
|
226
|
+
export default GridLayoutContent;
|
|
227
|
+
//# sourceMappingURL=GridLayoutContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useState","ScrollView","View","ContentRegistry","useResponsive","resolveItemBackgroundColor","resolveSurfacePadding","coerceToChipRowItem","jsx","_jsx","MEDIA_TYPES","Set","parseCol","value","n","Number","isFinite","Math","max","min","floor","GridLayoutContent","item","onAction","styles","colors","formData","onFieldChange","buttonVariant","disabled","s","isSmall","isTablet","rawItems","items","children","content","gap","padding","pad","backgroundColor","explicitColumns","columns","cols","orientation","String","direction","layout","toLowerCase","isVertical","forceScroll","scroll","wrap","isWrap","useWrap","containerWidth","setContainerWidth","firstCellHeight","setFirstCellHeight","onLayout","event","next","nativeEvent","width","prev","abs","onFirstCellLayout","ceil","height","scrollChildWidth","ratio","minW","wrapColCount","length","spans","map","child","col","minSpan","wrapCellWidth","undefined","inner","chipRowItem","type","has","style","maxWidth","render","renderCell","index","fill","center","onCellLayout","minHeight","minWidth","flexGrow","flexShrink","alignSelf","fillContainer","centerKids","align","peek","measuredMaxHeight","maxHeight","cellWidth","cells","overflow","contentContainerStyle","flexDirection","alignItems","paddingVertical","showsVerticalScrollIndicator","nestedScrollEnabled","flexWrap","span","units","round","horizontal","showsHorizontalScrollIndicator","decelerationRate","register"],"sourceRoot":"../../../src","sources":["content/GridLayoutContent.tsx"],"mappings":";;AA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