@qwickapps/react-framework 1.4.1 → 1.4.2
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/QUICK_START_GUIDE.md +82 -0
- package/README.md +221 -21
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +1 -2
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +1 -2
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/base/Container.d.ts +32 -0
- package/dist/components/base/Container.d.ts.map +1 -0
- package/dist/components/base/ContainerView.d.ts +65 -0
- package/dist/components/base/ContainerView.d.ts.map +1 -0
- package/dist/components/base/ModelView.d.ts +37 -46
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +3 -2
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +1 -2
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/Code-factory.d.ts +22 -0
- package/dist/components/blocks/Code-factory.d.ts.map +1 -0
- package/dist/components/blocks/Code-old.d.ts +31 -0
- package/dist/components/blocks/Code-old.d.ts.map +1 -0
- package/dist/components/blocks/Code.d.ts +30 -18
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +1 -2
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +1 -2
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +1 -2
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +35 -27
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +1 -2
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +1 -2
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +1 -2
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +1 -2
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +29 -47
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/pages/index.d.ts +2 -3
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/shared/createSerializableView.d.ts +68 -0
- package/dist/components/shared/createSerializableView.d.ts.map +1 -0
- package/dist/components/shared/viewProps.d.ts +37 -0
- package/dist/components/shared/viewProps.d.ts.map +1 -0
- package/dist/index.esm.js +21782 -22580
- package/dist/index.js +21782 -22579
- package/dist/qa/ConsoleWarningTest.d.ts +5 -0
- package/dist/qa/ConsoleWarningTest.d.ts.map +1 -0
- package/dist/qa/StorageKeyTest.d.ts +6 -0
- package/dist/qa/StorageKeyTest.d.ts.map +1 -0
- package/dist/qa/ThemeStorageKeyTest.d.ts +6 -0
- package/dist/qa/ThemeStorageKeyTest.d.ts.map +1 -0
- package/dist/schemas/CodeSchema.d.ts +2 -2
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/ContainerSchema.d.ts +12 -0
- package/dist/schemas/ContainerSchema.d.ts.map +1 -0
- package/dist/schemas/PageTemplateSchema.d.ts +3 -3
- package/dist/schemas/PageTemplateSchema.d.ts.map +1 -1
- package/dist/schemas/ViewModelSchema.d.ts +46 -6
- package/dist/schemas/ViewModelSchema.d.ts.map +1 -1
- package/dist/schemas/ViewSchema.d.ts +65 -0
- package/dist/schemas/ViewSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +27 -15
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/registry.d.ts +3 -0
- package/dist/schemas/transformers/registry.d.ts.map +1 -1
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
- package/dist/src/components/AccessibilityChecker.d.ts +12 -0
- package/dist/src/components/AccessibilityChecker.d.ts.map +1 -0
- package/dist/src/components/AccessibilityProvider.d.ts +64 -0
- package/dist/src/components/AccessibilityProvider.d.ts.map +1 -0
- package/dist/src/components/Breadcrumbs.d.ts +39 -0
- package/dist/src/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/src/components/ErrorBoundary.d.ts +46 -0
- package/dist/src/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/Html.d.ts +58 -0
- package/dist/src/components/Html.d.ts.map +1 -0
- package/dist/src/components/Logo.d.ts +56 -0
- package/dist/src/components/Logo.d.ts.map +1 -0
- package/dist/src/components/Markdown.d.ts +51 -0
- package/dist/src/components/Markdown.d.ts.map +1 -0
- package/dist/src/components/QwickApp.d.ts +69 -0
- package/dist/src/components/QwickApp.d.ts.map +1 -0
- package/dist/src/components/QwickAppsLogo.d.ts +25 -0
- package/dist/src/components/QwickAppsLogo.d.ts.map +1 -0
- package/dist/src/components/QwickIcon.d.ts +23 -0
- package/dist/src/components/QwickIcon.d.ts.map +1 -0
- package/dist/src/components/ResponsiveMenu.d.ts +38 -0
- package/dist/src/components/ResponsiveMenu.d.ts.map +1 -0
- package/dist/src/components/SafeSpan.d.ts +29 -0
- package/dist/src/components/SafeSpan.d.ts.map +1 -0
- package/dist/src/components/Scaffold.d.ts +57 -0
- package/dist/src/components/Scaffold.d.ts.map +1 -0
- package/dist/src/components/base/Container.d.ts +33 -0
- package/dist/src/components/base/Container.d.ts.map +1 -0
- package/dist/src/components/base/ModelView.d.ts +92 -0
- package/dist/src/components/base/ModelView.d.ts.map +1 -0
- package/dist/src/components/base/index.d.ts +12 -0
- package/dist/src/components/base/index.d.ts.map +1 -0
- package/dist/src/components/blocks/Article.d.ts +32 -0
- package/dist/src/components/blocks/Article.d.ts.map +1 -0
- package/dist/src/components/blocks/CardListGrid.d.ts +23 -0
- package/dist/src/components/blocks/CardListGrid.d.ts.map +1 -0
- package/dist/src/components/blocks/Code.d.ts +37 -0
- package/dist/src/components/blocks/Code.d.ts.map +1 -0
- package/dist/src/components/blocks/Content.d.ts +24 -0
- package/dist/src/components/blocks/Content.d.ts.map +1 -0
- package/dist/src/components/blocks/CoverImageHeader.d.ts +44 -0
- package/dist/src/components/blocks/CoverImageHeader.d.ts.map +1 -0
- package/dist/src/components/blocks/FeatureCard.d.ts +66 -0
- package/dist/src/components/blocks/FeatureCard.d.ts.map +1 -0
- package/dist/src/components/blocks/FeatureGrid.d.ts +48 -0
- package/dist/src/components/blocks/FeatureGrid.d.ts.map +1 -0
- package/dist/src/components/blocks/Footer.d.ts +56 -0
- package/dist/src/components/blocks/Footer.d.ts.map +1 -0
- package/dist/src/components/blocks/HeroBlock.d.ts +55 -0
- package/dist/src/components/blocks/HeroBlock.d.ts.map +1 -0
- package/dist/src/components/blocks/Image.d.ts +40 -0
- package/dist/src/components/blocks/Image.d.ts.map +1 -0
- package/dist/src/components/blocks/PageBannerHeader.d.ts +30 -0
- package/dist/src/components/blocks/PageBannerHeader.d.ts.map +1 -0
- package/dist/src/components/blocks/ProductCard.d.ts +57 -0
- package/dist/src/components/blocks/ProductCard.d.ts.map +1 -0
- package/dist/src/components/blocks/Section.d.ts +45 -0
- package/dist/src/components/blocks/Section.d.ts.map +1 -0
- package/dist/src/components/blocks/Text.d.ts +34 -0
- package/dist/src/components/blocks/Text.d.ts.map +1 -0
- package/dist/src/components/blocks/index.d.ts +41 -0
- package/dist/src/components/blocks/index.d.ts.map +1 -0
- package/dist/src/components/buttons/Button.d.ts +41 -0
- package/dist/src/components/buttons/Button.d.ts.map +1 -0
- package/dist/src/components/buttons/PaletteSwitcher.d.ts +24 -0
- package/dist/src/components/buttons/PaletteSwitcher.d.ts.map +1 -0
- package/dist/src/components/buttons/ThemeSwitcher.d.ts +24 -0
- package/dist/src/components/buttons/ThemeSwitcher.d.ts.map +1 -0
- package/dist/src/components/buttons/index.d.ts +11 -0
- package/dist/src/components/buttons/index.d.ts.map +1 -0
- package/dist/src/components/forms/FormBlock.d.ts +51 -0
- package/dist/src/components/forms/FormBlock.d.ts.map +1 -0
- package/dist/src/components/forms/index.d.ts +8 -0
- package/dist/src/components/forms/index.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +41 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/input/ChoiceInputField.d.ts +29 -0
- package/dist/src/components/input/ChoiceInputField.d.ts.map +1 -0
- package/dist/src/components/input/HtmlInputField.d.ts +33 -0
- package/dist/src/components/input/HtmlInputField.d.ts.map +1 -0
- package/dist/src/components/input/SelectInputField.d.ts +31 -0
- package/dist/src/components/input/SelectInputField.d.ts.map +1 -0
- package/dist/src/components/input/SwitchInputField.d.ts +27 -0
- package/dist/src/components/input/SwitchInputField.d.ts.map +1 -0
- package/dist/src/components/input/TextField.d.ts +18 -0
- package/dist/src/components/input/TextField.d.ts.map +1 -0
- package/dist/src/components/input/TextInputField.d.ts +34 -0
- package/dist/src/components/input/TextInputField.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +19 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +34 -0
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -0
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts +9 -0
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts.map +1 -0
- package/dist/src/components/layout/GridCell.d.ts +32 -0
- package/dist/src/components/layout/GridCell.d.ts.map +1 -0
- package/dist/src/components/layout/GridCellWrapper.d.ts +46 -0
- package/dist/src/components/layout/GridCellWrapper.d.ts.map +1 -0
- package/dist/src/components/layout/GridLayout.d.ts +50 -0
- package/dist/src/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/src/components/layout/index.d.ts +14 -0
- package/dist/src/components/layout/index.d.ts.map +1 -0
- package/dist/src/components/menu/Menu.d.ts +1 -0
- package/dist/src/components/menu/Menu.d.ts.map +1 -0
- package/dist/src/components/menu/MenuItem.d.ts +31 -0
- package/dist/src/components/menu/MenuItem.d.ts.map +1 -0
- package/dist/src/components/menu/index.d.ts +7 -0
- package/dist/src/components/menu/index.d.ts.map +1 -0
- package/dist/src/components/pages/FormPage.d.ts +66 -0
- package/dist/src/components/pages/FormPage.d.ts.map +1 -0
- package/dist/src/components/pages/Page.d.ts +68 -0
- package/dist/src/components/pages/Page.d.ts.map +1 -0
- package/dist/src/components/pages/index.d.ts +10 -0
- package/dist/src/components/pages/index.d.ts.map +1 -0
- package/dist/src/components/shared/createSerializableView.d.ts +81 -0
- package/dist/src/components/shared/createSerializableView.d.ts.map +1 -0
- package/dist/src/components/shared/viewProps.d.ts +37 -0
- package/dist/src/components/shared/viewProps.d.ts.map +1 -0
- package/dist/src/config/AppConfig.d.ts +49 -0
- package/dist/src/config/AppConfig.d.ts.map +1 -0
- package/dist/src/config/AppConfigBuilder.d.ts +75 -0
- package/dist/src/config/AppConfigBuilder.d.ts.map +1 -0
- package/dist/src/config/index.d.ts +13 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/types.d.ts +130 -0
- package/dist/src/config/types.d.ts.map +1 -0
- package/dist/src/config.d.ts +15 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/contexts/DataContext.d.ts +139 -0
- package/dist/src/contexts/DataContext.d.ts.map +1 -0
- package/dist/src/contexts/DimensionsContext.d.ts +42 -0
- package/dist/src/contexts/DimensionsContext.d.ts.map +1 -0
- package/dist/src/contexts/PaletteContext.d.ts +53 -0
- package/dist/src/contexts/PaletteContext.d.ts.map +1 -0
- package/dist/src/contexts/PrintModeContext.d.ts +27 -0
- package/dist/src/contexts/PrintModeContext.d.ts.map +1 -0
- package/dist/src/contexts/QwickAppContext.d.ts +71 -0
- package/dist/src/contexts/QwickAppContext.d.ts.map +1 -0
- package/dist/src/contexts/ThemeContext.d.ts +65 -0
- package/dist/src/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/src/contexts/index.d.ts +11 -0
- package/dist/src/contexts/index.d.ts.map +1 -0
- package/dist/src/hooks/index.d.ts +12 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/hooks/useBaseProps.d.ts +101 -0
- package/dist/src/hooks/useBaseProps.d.ts.map +1 -0
- package/dist/src/hooks/useDataBinding.d.ts +22 -0
- package/dist/src/hooks/useDataBinding.d.ts.map +1 -0
- package/dist/src/hooks/usePrintMode.d.ts +39 -0
- package/dist/src/hooks/usePrintMode.d.ts.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/palettes/PaletteAutumn.d.ts +10 -0
- package/dist/src/palettes/PaletteAutumn.d.ts.map +1 -0
- package/dist/src/palettes/PaletteCosmic.d.ts +10 -0
- package/dist/src/palettes/PaletteCosmic.d.ts.map +1 -0
- package/dist/src/palettes/PaletteDefault.d.ts +10 -0
- package/dist/src/palettes/PaletteDefault.d.ts.map +1 -0
- package/dist/src/palettes/PaletteOcean.d.ts +10 -0
- package/dist/src/palettes/PaletteOcean.d.ts.map +1 -0
- package/dist/src/palettes/PaletteSpring.d.ts +10 -0
- package/dist/src/palettes/PaletteSpring.d.ts.map +1 -0
- package/dist/src/palettes/PaletteWinter.d.ts +10 -0
- package/dist/src/palettes/PaletteWinter.d.ts.map +1 -0
- package/dist/src/palettes/index.d.ts +13 -0
- package/dist/src/palettes/index.d.ts.map +1 -0
- package/dist/src/schemas/ActionSchema.d.ts +21 -0
- package/dist/src/schemas/ActionSchema.d.ts.map +1 -0
- package/dist/src/schemas/ArticleSchema.d.ts +13 -0
- package/dist/src/schemas/ArticleSchema.d.ts.map +1 -0
- package/dist/src/schemas/ButtonSchema.d.ts +19 -0
- package/dist/src/schemas/ButtonSchema.d.ts.map +1 -0
- package/dist/src/schemas/CardListGridSchema.d.ts +17 -0
- package/dist/src/schemas/CardListGridSchema.d.ts.map +1 -0
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/CodeSchema.d.ts +18 -0
- package/dist/src/schemas/CodeSchema.d.ts.map +1 -0
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts +32 -0
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts.map +1 -0
- package/dist/src/schemas/ContainerSchema.d.ts +12 -0
- package/dist/src/schemas/ContainerSchema.d.ts.map +1 -0
- package/dist/src/schemas/ContentSchema.d.ts +21 -0
- package/dist/src/schemas/ContentSchema.d.ts.map +1 -0
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts +28 -0
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureCardSchema.d.ts +28 -0
- package/dist/src/schemas/FeatureCardSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureGridSchema.d.ts +17 -0
- package/dist/src/schemas/FeatureGridSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureItemSchema.d.ts +16 -0
- package/dist/src/schemas/FeatureItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterItemSchema.d.ts +15 -0
- package/dist/src/schemas/FooterItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterSchema.d.ts +20 -0
- package/dist/src/schemas/FooterSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterSectionSchema.d.ts +15 -0
- package/dist/src/schemas/FooterSectionSchema.d.ts.map +1 -0
- package/dist/src/schemas/FormBlockSchema.d.ts +19 -0
- package/dist/src/schemas/FormBlockSchema.d.ts.map +1 -0
- package/dist/src/schemas/GridCellSchema.d.ts +23 -0
- package/dist/src/schemas/GridCellSchema.d.ts.map +1 -0
- package/dist/src/schemas/GridLayoutSchema.d.ts +21 -0
- package/dist/src/schemas/GridLayoutSchema.d.ts.map +1 -0
- package/dist/src/schemas/HeaderActionSchema.d.ts +17 -0
- package/dist/src/schemas/HeaderActionSchema.d.ts.map +1 -0
- package/dist/src/schemas/HeroBlockSchema.d.ts +22 -0
- package/dist/src/schemas/HeroBlockSchema.d.ts.map +1 -0
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/HtmlSchema.d.ts +14 -0
- package/dist/src/schemas/HtmlSchema.d.ts.map +1 -0
- package/dist/src/schemas/ImageSchema.d.ts +32 -0
- package/dist/src/schemas/ImageSchema.d.ts.map +1 -0
- package/dist/src/schemas/LogoSchema.d.ts +35 -0
- package/dist/src/schemas/LogoSchema.d.ts.map +1 -0
- package/dist/src/schemas/MarkdownSchema.d.ts +14 -0
- package/dist/src/schemas/MarkdownSchema.d.ts.map +1 -0
- package/dist/src/schemas/MetadataItemSchema.d.ts +13 -0
- package/dist/src/schemas/MetadataItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts +28 -0
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts.map +1 -0
- package/dist/src/schemas/PageTemplateSchema.d.ts +31 -0
- package/dist/src/schemas/PageTemplateSchema.d.ts.map +1 -0
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts +16 -0
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts.map +1 -0
- package/dist/src/schemas/PrintConfigSchema.d.ts +31 -0
- package/dist/src/schemas/PrintConfigSchema.d.ts.map +1 -0
- package/dist/src/schemas/ProductCardSchema.d.ts +39 -0
- package/dist/src/schemas/ProductCardSchema.d.ts.map +1 -0
- package/dist/src/schemas/SafeSpanSchema.d.ts +13 -0
- package/dist/src/schemas/SafeSpanSchema.d.ts.map +1 -0
- package/dist/src/schemas/SectionSchema.d.ts +16 -0
- package/dist/src/schemas/SectionSchema.d.ts.map +1 -0
- package/dist/src/schemas/SelectInputFieldSchema.d.ts +27 -0
- package/dist/src/schemas/SelectInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/TextInputFieldSchema.d.ts +22 -0
- package/dist/src/schemas/TextInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/TextSchema.d.ts +37 -0
- package/dist/src/schemas/TextSchema.d.ts.map +1 -0
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts +19 -0
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts.map +1 -0
- package/dist/src/schemas/ViewSchema.d.ts +66 -0
- package/dist/src/schemas/ViewSchema.d.ts.map +1 -0
- package/dist/src/schemas/index.d.ts +47 -0
- package/dist/src/schemas/index.d.ts.map +1 -0
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts +128 -0
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
- package/dist/src/schemas/transformers/registry.d.ts +18 -0
- package/dist/src/schemas/transformers/registry.d.ts.map +1 -0
- package/dist/src/schemas/types/Serializable.d.ts +46 -0
- package/dist/src/schemas/types/Serializable.d.ts.map +1 -0
- package/dist/src/stories/_templates/SerializationTemplate.d.ts +44 -0
- package/dist/src/stories/_templates/SerializationTemplate.d.ts.map +1 -0
- package/dist/src/templates/TemplateResolver.d.ts +52 -0
- package/dist/src/templates/TemplateResolver.d.ts.map +1 -0
- package/dist/src/templates/index.d.ts +7 -0
- package/dist/src/templates/index.d.ts.map +1 -0
- package/dist/src/types/CacheProvider.d.ts +18 -0
- package/dist/src/types/CacheProvider.d.ts.map +1 -0
- package/dist/src/types/CollapsibleLayout.d.ts +142 -0
- package/dist/src/types/CollapsibleLayout.d.ts.map +1 -0
- package/dist/src/types/ContentProxy.d.ts +47 -0
- package/dist/src/types/ContentProxy.d.ts.map +1 -0
- package/dist/src/types/DataTypes.d.ts +185 -0
- package/dist/src/types/DataTypes.d.ts.map +1 -0
- package/dist/src/types/TemplateProvider.d.ts +10 -0
- package/dist/src/types/TemplateProvider.d.ts.map +1 -0
- package/dist/src/types/TemplateResolver.d.ts +23 -0
- package/dist/src/types/TemplateResolver.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +82 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/utils/breakpoints.d.ts +35 -0
- package/dist/src/utils/breakpoints.d.ts.map +1 -0
- package/dist/src/utils/cssUtils.d.ts +17 -0
- package/dist/src/utils/cssUtils.d.ts.map +1 -0
- package/dist/src/utils/customPaletteManager.d.ts +8 -0
- package/dist/src/utils/customPaletteManager.d.ts.map +1 -0
- package/dist/src/utils/dimensions.d.ts +34 -0
- package/dist/src/utils/dimensions.d.ts.map +1 -0
- package/dist/src/utils/htmlTransform.d.ts +44 -0
- package/dist/src/utils/htmlTransform.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +16 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/logger.d.ts +26 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/paletteUtils.d.ts +38 -0
- package/dist/src/utils/paletteUtils.d.ts.map +1 -0
- package/dist/src/utils/persistenceUtils.d.ts +31 -0
- package/dist/src/utils/persistenceUtils.d.ts.map +1 -0
- package/dist/src/utils/reactUtils.d.ts +33 -0
- package/dist/src/utils/reactUtils.d.ts.map +1 -0
- package/dist/src/utils/spacing.d.ts +34 -0
- package/dist/src/utils/spacing.d.ts.map +1 -0
- package/dist/src/utils/themePerformanceMonitor.d.ts +32 -0
- package/dist/src/utils/themePerformanceMonitor.d.ts.map +1 -0
- package/dist/src/utils/themeUtils.d.ts +27 -0
- package/dist/src/utils/themeUtils.d.ts.map +1 -0
- package/dist/utils/cssUtils.d.ts +17 -0
- package/dist/utils/cssUtils.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +5 -2
- package/scripts/bundle-css.cjs +27 -0
- package/scripts/create-project.sh +28 -0
- package/scripts/create-qwickapps-project.js +284 -0
- package/src/__tests__/components/base/Container.test.tsx +966 -0
- package/src/__tests__/schemas/PageTemplateSchema.test.ts +1 -1
- package/src/__tests__/schemas/ViewSchema.test.ts +805 -0
- package/src/__tests__/schemas/builders.test.ts +2 -2
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +19 -19
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +13 -13
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +39 -39
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +14 -14
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +8 -8
- package/src/__tests__/schemas/transformers/nested-serialization.test.tsx +181 -0
- package/src/__tests__/schemas/transformers/round-trip-component-serialization.test.tsx +458 -0
- package/src/__tests__/test_image_accessibility.test.tsx +226 -0
- package/src/__tests__/utils/optional-logging.test.ts +3 -3
- package/src/components/Html.tsx +24 -15
- package/src/components/Logo.tsx +2 -2
- package/src/components/Markdown.tsx +2 -7
- package/src/components/SafeSpan.tsx +2 -7
- package/src/components/base/Container.tsx +61 -0
- package/src/components/base/ModelView.tsx +225 -91
- package/src/components/base/index.ts +3 -2
- package/src/components/blocks/Article.tsx +2 -7
- package/src/components/blocks/CardListGrid.tsx +2 -2
- package/src/components/blocks/Code.tsx +91 -179
- package/src/components/blocks/Content.tsx +2 -2
- package/src/components/blocks/CoverImageHeader.tsx +2 -2
- package/src/components/blocks/HeroBlock.tsx +54 -146
- package/src/components/blocks/Image.tsx +82 -196
- package/src/components/blocks/PageBannerHeader.tsx +2 -2
- package/src/components/blocks/Section.tsx +79 -181
- package/src/components/blocks/Text.tsx +100 -198
- package/src/components/buttons/Button.tsx +85 -183
- package/src/components/buttons/PaletteSwitcher.tsx +2 -2
- package/src/components/buttons/ThemeSwitcher.tsx +2 -2
- package/src/components/forms/FormBlock.tsx +2 -2
- package/src/components/index.ts +5 -0
- package/src/components/input/ChoiceInputField.tsx +76 -160
- package/src/components/input/HtmlInputField.tsx +141 -264
- package/src/components/input/SelectInputField.tsx +48 -153
- package/src/components/input/SwitchInputField.tsx +41 -139
- package/src/components/input/TextInputField.tsx +39 -116
- package/src/components/layout/GridCell.tsx +36 -122
- package/src/components/layout/GridLayout.tsx +55 -127
- package/src/components/pages/Page.tsx +268 -276
- package/src/components/pages/index.ts +2 -3
- package/src/components/shared/createSerializableView.tsx +280 -0
- package/src/components/shared/viewProps.ts +207 -0
- package/src/config/__tests__/AppConfigBuilder.test.ts +2 -2
- package/src/contexts/DataContext.tsx +1 -1
- package/src/schemas/ButtonSchema.ts +3 -2
- package/src/schemas/CardListGridSchema.ts +3 -2
- package/src/schemas/ChoiceInputFieldSchema.ts +3 -2
- package/src/schemas/CodeSchema.ts +8 -6
- package/src/schemas/ContainerSchema.ts +25 -0
- package/src/schemas/FeatureCardSchema.ts +1 -1
- package/src/schemas/FormBlockSchema.ts +3 -2
- package/src/schemas/GridCellSchema.ts +4 -10
- package/src/schemas/GridLayoutSchema.ts +8 -14
- package/src/schemas/HeroBlockSchema.ts +3 -2
- package/src/schemas/HtmlInputFieldSchema.ts +3 -2
- package/src/schemas/ImageSchema.ts +3 -2
- package/src/schemas/PageTemplateSchema.ts +5 -5
- package/src/schemas/SectionSchema.ts +4 -12
- package/src/schemas/SelectInputFieldSchema.ts +3 -2
- package/src/schemas/SwitchInputFieldSchema.ts +2 -2
- package/src/schemas/TextInputFieldSchema.ts +3 -2
- package/src/schemas/ViewSchema.ts +570 -0
- package/src/schemas/index.ts +1 -1
- package/src/schemas/transformers/ComponentTransformer.ts +185 -163
- package/src/schemas/transformers/ReactNodeTransformer.ts +31 -28
- package/src/schemas/transformers/registry.ts +17 -10
- package/src/stories/Button.stories.tsx +24 -0
- package/src/stories/ChoiceInputField.stories.tsx +28 -1
- package/src/stories/Code.stories.tsx +61 -1
- package/src/stories/Container.stories.tsx +954 -0
- package/src/stories/FormBlock.stories.tsx +54 -0
- package/src/stories/FormComponents.stories.tsx +8 -13
- package/src/stories/GridCell.stories.tsx +23 -64
- package/src/stories/GridLayout.stories.tsx +22 -47
- package/src/stories/HeroBlock.stories.tsx +28 -0
- package/src/stories/HtmlInputField.stories.tsx +23 -1
- package/src/stories/Image.stories.tsx +45 -233
- package/src/stories/Markdown.stories.tsx +1 -1
- package/src/stories/Section.stories.tsx +38 -4
- package/src/stories/SelectInputField.stories.tsx +26 -1
- package/src/stories/Text.stories.tsx +22 -54
- package/src/stories/TextInputField.stories.tsx +24 -1
- package/src/stories/_templates/SerializationTemplate.tsx +165 -0
- package/src/templates/TemplateResolver.ts +2 -2
- package/src/types/CollapsibleLayout.ts +2 -2
- package/src/utils/cssUtils.ts +49 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/logger.ts +13 -13
- package/src/__tests__/components/base/ModelView.test.tsx +0 -220
- package/src/__tests__/schemas/ViewModelSchema.test.ts +0 -80
- package/src/components/blocks/Code.md +0 -529
- package/src/schemas/README.md +0 -661
- package/src/schemas/ViewModelSchema.ts +0 -115
- package/src/tests/ConsoleWarningTest.tsx +0 -30
- package/src/tests/StorageKeyTest.tsx +0 -110
- package/src/tests/ThemeStorageKeyTest.tsx +0 -114
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
Paper,
|
|
28
28
|
} from '@mui/material';
|
|
29
29
|
import React, { useState } from 'react';
|
|
30
|
-
import type { WithDataBinding,
|
|
30
|
+
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
31
31
|
import { QWICKAPP_COMPONENT, useBaseProps } from '../../hooks';
|
|
32
32
|
import { useDataBinding } from '../../hooks';
|
|
33
33
|
import { usePalette } from '../../contexts';
|
|
34
34
|
import type { PaletteConfig } from '../../contexts';
|
|
35
35
|
import PaletteSwitcherModel from '../../schemas/PaletteSwitcherSchema';
|
|
36
36
|
|
|
37
|
-
type PaletteSwitcherViewProps =
|
|
37
|
+
type PaletteSwitcherViewProps = SchemaProps<PaletteSwitcherModel>;
|
|
38
38
|
|
|
39
39
|
export interface PaletteSwitcherProps extends PaletteSwitcherViewProps, WithDataBinding {}
|
|
40
40
|
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
LightMode as LightModeIcon,
|
|
27
27
|
SettingsSystemDaydream as SystemIcon
|
|
28
28
|
} from '@mui/icons-material';
|
|
29
|
-
import type { WithDataBinding,
|
|
29
|
+
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
30
30
|
import { useState } from 'react';
|
|
31
31
|
import { useTheme } from '../../contexts/ThemeContext';
|
|
32
32
|
import { QWICKAPP_COMPONENT, useBaseProps } from '../../hooks';
|
|
@@ -34,7 +34,7 @@ import { useDataBinding } from '../../hooks';
|
|
|
34
34
|
import ThemeSwitcherModel from '../../schemas/ThemeSwitcherSchema';
|
|
35
35
|
import type { ThemeMode } from '../../utils/themeUtils';
|
|
36
36
|
|
|
37
|
-
type ThemeSwitcherViewProps =
|
|
37
|
+
type ThemeSwitcherViewProps = SchemaProps<ThemeSwitcherModel>;
|
|
38
38
|
|
|
39
39
|
export interface ThemeSwitcherProps extends ThemeSwitcherViewProps, WithDataBinding {}
|
|
40
40
|
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Typography,
|
|
24
24
|
useTheme,
|
|
25
25
|
} from '@mui/material';
|
|
26
|
-
import type {
|
|
26
|
+
import type { SchemaProps, WithDataBinding } from '@qwickapps/schema';
|
|
27
27
|
import { useQwickApp } from '../../contexts/QwickAppContext';
|
|
28
28
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../../hooks';
|
|
29
29
|
import FormBlockModel from '../../schemas/FormBlockSchema';
|
|
@@ -31,7 +31,7 @@ import CoverImageHeader from '../blocks/CoverImageHeader';
|
|
|
31
31
|
import Logo from '../Logo';
|
|
32
32
|
import { ModelView } from '../base/ModelView';
|
|
33
33
|
|
|
34
|
-
type FormBlockViewProps =
|
|
34
|
+
type FormBlockViewProps = SchemaProps<FormBlockModel> & {
|
|
35
35
|
/**
|
|
36
36
|
* Custom header content - when provided, overrides the default header
|
|
37
37
|
* For full customization control
|
package/src/components/index.ts
CHANGED
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
* - Layout components
|
|
9
9
|
* - Blocks (Hero, Content, FeatureGrid, Section, etc.)
|
|
10
10
|
* - Pages and scaffolding
|
|
11
|
+
* - Schema-driven component registration (Phase 0)
|
|
11
12
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
12
13
|
*/
|
|
14
|
+
|
|
15
|
+
// Import registry to ensure all serializable components are registered
|
|
16
|
+
// This must happen when the framework is imported to enable serialization
|
|
17
|
+
import '../schemas/transformers/registry';
|
|
13
18
|
export * from './base';
|
|
14
19
|
export * from './blocks';
|
|
15
20
|
export * from './buttons';
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* - Complete dynamic option input management
|
|
6
6
|
* - Rich text editing for each option (via HtmlInputField)
|
|
7
7
|
* - Data binding support for dynamic content
|
|
8
|
-
* - Full serialization support via
|
|
8
|
+
* - Full serialization support via factory pattern
|
|
9
9
|
* - Consistent Material-UI styling
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import React
|
|
14
|
+
import React from 'react';
|
|
15
15
|
import {
|
|
16
16
|
Alert,
|
|
17
17
|
Box,
|
|
@@ -20,22 +20,25 @@ import {
|
|
|
20
20
|
Typography
|
|
21
21
|
} from '@mui/material';
|
|
22
22
|
import { Add as AddIcon } from '@mui/icons-material';
|
|
23
|
-
import type { WithDataBinding, ModelProps } from '@qwickapps/schema';
|
|
24
|
-
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../../hooks';
|
|
25
23
|
import HtmlInputField from './HtmlInputField';
|
|
26
24
|
import ChoiceInputFieldModel from '../../schemas/ChoiceInputFieldSchema';
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
import { createSerializableView, SerializableComponent } from '../shared/createSerializableView';
|
|
26
|
+
import { ViewProps } from '../shared/viewProps';
|
|
27
|
+
|
|
28
|
+
export interface ChoiceInputFieldProps extends Omit<ViewProps, 'onFocus'> {
|
|
29
|
+
// Component-specific props from ChoiceInputFieldModel
|
|
30
|
+
label?: string;
|
|
31
|
+
options?: string[];
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
optionLabelPrefix?: string;
|
|
35
|
+
rows?: number;
|
|
36
|
+
maxOptions?: number;
|
|
37
|
+
// Additional props for enhanced functionality
|
|
31
38
|
onOptionChange?: (optionIndex: number, value: string) => void;
|
|
32
|
-
/** Handler for adding new options */
|
|
33
39
|
onAddOption?: () => void;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export interface ChoiceInputFieldProps extends ChoiceInputFieldViewProps, WithDataBinding {}
|
|
40
|
+
onChoiceFieldFocus?: (optionIndex?: number) => void;
|
|
41
|
+
}
|
|
39
42
|
|
|
40
43
|
// View component - handles the actual rendering
|
|
41
44
|
function ChoiceInputFieldView({
|
|
@@ -43,176 +46,89 @@ function ChoiceInputFieldView({
|
|
|
43
46
|
options = [],
|
|
44
47
|
onOptionChange,
|
|
45
48
|
onAddOption,
|
|
46
|
-
|
|
49
|
+
onChoiceFieldFocus,
|
|
47
50
|
disabled = false,
|
|
48
51
|
placeholder = 'Enter option text. HTML formatting supported.',
|
|
49
52
|
optionLabelPrefix = 'Option',
|
|
50
53
|
rows = 2,
|
|
51
|
-
|
|
54
|
+
maxOptions = 10,
|
|
52
55
|
...restProps
|
|
53
|
-
}:
|
|
54
|
-
const { styleProps, htmlProps } = useBaseProps(restProps);
|
|
56
|
+
}: ChoiceInputFieldProps) {
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
>
|
|
70
|
-
<Typography variant="body2" color="text.secondary">
|
|
71
|
-
No options provided
|
|
72
|
-
</Typography>
|
|
73
|
-
</Paper>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
58
|
+
const handleOptionChange = (optionIndex: number) => (value: string) => {
|
|
59
|
+
onOptionChange?.(optionIndex, value);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const handleOptionFocus = (optionIndex: number) => () => {
|
|
63
|
+
onChoiceFieldFocus?.(optionIndex);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const handleAddOption = () => {
|
|
67
|
+
if (options.length < maxOptions) {
|
|
68
|
+
onAddOption?.();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
76
71
|
|
|
77
72
|
return (
|
|
78
|
-
<Box
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{label && (
|
|
89
|
-
<Typography variant="subtitle2" gutterBottom>
|
|
90
|
-
{label}
|
|
91
|
-
</Typography>
|
|
73
|
+
<Box {...restProps}>
|
|
74
|
+
<Typography variant="h6" gutterBottom>
|
|
75
|
+
{label}
|
|
76
|
+
</Typography>
|
|
77
|
+
|
|
78
|
+
{/* Display warning if no options */}
|
|
79
|
+
{options.length === 0 && (
|
|
80
|
+
<Alert severity="info" sx={{ mb: 2 }}>
|
|
81
|
+
No options added yet. Click "Add Option" to get started.
|
|
82
|
+
</Alert>
|
|
92
83
|
)}
|
|
93
|
-
|
|
94
|
-
{
|
|
95
|
-
|
|
84
|
+
|
|
85
|
+
{/* Render options */}
|
|
86
|
+
{options.map((optionValue, index) => (
|
|
87
|
+
<Box key={index} sx={{ mb: 2 }}>
|
|
96
88
|
<HtmlInputField
|
|
97
|
-
label={`${optionLabelPrefix} ${
|
|
98
|
-
value={
|
|
99
|
-
onChange={
|
|
100
|
-
onFocus={
|
|
89
|
+
label={`${optionLabelPrefix} ${index + 1}`}
|
|
90
|
+
value={optionValue}
|
|
91
|
+
onChange={handleOptionChange(index)}
|
|
92
|
+
onFocus={handleOptionFocus(index)}
|
|
93
|
+
placeholder={placeholder}
|
|
101
94
|
rows={rows}
|
|
102
95
|
disabled={disabled}
|
|
103
|
-
|
|
96
|
+
showPreview={true}
|
|
97
|
+
showHelp={false}
|
|
104
98
|
/>
|
|
105
99
|
</Box>
|
|
106
100
|
))}
|
|
107
|
-
|
|
108
|
-
{
|
|
101
|
+
|
|
102
|
+
{/* Add Option Button */}
|
|
103
|
+
{options.length < maxOptions && (
|
|
109
104
|
<Button
|
|
105
|
+
variant="outlined"
|
|
110
106
|
startIcon={<AddIcon />}
|
|
111
|
-
onClick={
|
|
112
|
-
size="small"
|
|
107
|
+
onClick={handleAddOption}
|
|
113
108
|
disabled={disabled}
|
|
114
|
-
|
|
115
|
-
sx={{ mt: 1, alignSelf: 'flex-start' }}
|
|
109
|
+
sx={{ mt: 1 }}
|
|
116
110
|
>
|
|
117
|
-
|
|
111
|
+
Add Option
|
|
118
112
|
</Button>
|
|
119
113
|
)}
|
|
120
|
-
</Box>
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
114
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
static readonly version = '1.0.0';
|
|
129
|
-
|
|
130
|
-
// Deserialization: JSON data → React element
|
|
131
|
-
static fromJson(jsonData: any): ReactElement {
|
|
132
|
-
return <ChoiceInputField {...jsonData} />;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Component-specific serialization properties
|
|
136
|
-
protected getComponentSpecificProps(): any {
|
|
137
|
-
return {
|
|
138
|
-
label: this.props.label,
|
|
139
|
-
options: this.props.options,
|
|
140
|
-
disabled: this.props.disabled,
|
|
141
|
-
placeholder: this.props.placeholder,
|
|
142
|
-
optionLabelPrefix: this.props.optionLabelPrefix,
|
|
143
|
-
rows: this.props.rows,
|
|
144
|
-
addButtonText: this.props.addButtonText,
|
|
145
|
-
// Event handlers don't serialize
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// ChoiceInputField component renders traditional props view
|
|
150
|
-
protected renderView(): React.ReactElement {
|
|
151
|
-
const { dataSource, bindingOptions, ...restProps } = this.props;
|
|
152
|
-
return <ChoiceInputFieldView {...restProps} />;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// ChoiceInputField component renders data-bound view
|
|
156
|
-
protected renderWithDataBinding(): React.ReactElement {
|
|
157
|
-
return <ChoiceInputFieldWithDataBinding {...this.props} />;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Helper component to handle data binding with hooks (since we can't use hooks in class components)
|
|
162
|
-
function ChoiceInputFieldWithDataBinding(props: ChoiceInputFieldProps) {
|
|
163
|
-
const { dataSource, bindingOptions, ...restProps } = props;
|
|
164
|
-
|
|
165
|
-
// Use data binding
|
|
166
|
-
const { dataSource: _source, loading, error, cached, ...choiceInputFieldProps } = useDataBinding<ChoiceInputFieldModel>(
|
|
167
|
-
dataSource!,
|
|
168
|
-
restProps as Partial<ChoiceInputFieldModel>,
|
|
169
|
-
ChoiceInputFieldModel.getSchema(),
|
|
170
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
// Show loading state
|
|
174
|
-
if (loading) {
|
|
175
|
-
return (
|
|
176
|
-
<Paper
|
|
177
|
-
variant="outlined"
|
|
178
|
-
sx={{
|
|
179
|
-
p: 3,
|
|
180
|
-
textAlign: 'center'
|
|
181
|
-
}}
|
|
182
|
-
>
|
|
183
|
-
<Typography variant="body2">Loading Choice Input Field...</Typography>
|
|
184
|
-
<Typography variant="caption" color="text.secondary">
|
|
185
|
-
Loading options from data source...
|
|
115
|
+
{/* Max options reached message */}
|
|
116
|
+
{options.length >= maxOptions && (
|
|
117
|
+
<Typography variant="caption" color="text.secondary" sx={{ display: 'block', mt: 1 }}>
|
|
118
|
+
Maximum number of options ({maxOptions}) reached.
|
|
186
119
|
</Typography>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
if (error) {
|
|
192
|
-
console.error('Error loading choice input field:', error);
|
|
193
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
194
|
-
return (
|
|
195
|
-
<Paper
|
|
196
|
-
variant="outlined"
|
|
197
|
-
sx={{
|
|
198
|
-
p: 3,
|
|
199
|
-
textAlign: 'center',
|
|
200
|
-
borderColor: 'error.main'
|
|
201
|
-
}}
|
|
202
|
-
>
|
|
203
|
-
<Typography variant="body2" color="error">
|
|
204
|
-
Error loading choice input field: {error.message}
|
|
205
|
-
</Typography>
|
|
206
|
-
</Paper>
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
return <ChoiceInputFieldView {...choiceInputFieldProps} />;
|
|
120
|
+
)}
|
|
121
|
+
</Box>
|
|
122
|
+
);
|
|
213
123
|
}
|
|
214
124
|
|
|
215
|
-
//
|
|
216
|
-
|
|
125
|
+
// Create the serializable ChoiceInputField component using the factory
|
|
126
|
+
export const ChoiceInputField: SerializableComponent<ChoiceInputFieldProps> = createSerializableView<ChoiceInputFieldProps>({
|
|
127
|
+
tagName: 'ChoiceInputField',
|
|
128
|
+
version: '1.0.0',
|
|
129
|
+
role: 'view',
|
|
130
|
+
View: ChoiceInputFieldView,
|
|
131
|
+
// ChoiceInputField component uses default react-children strategy
|
|
132
|
+
});
|
|
217
133
|
|
|
218
134
|
export default ChoiceInputField;
|