@qwickapps/react-framework 1.4.1 → 1.4.3
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 +8 -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
|
@@ -8,6 +8,7 @@ import { Box, Link, Typography } from '@mui/material';
|
|
|
8
8
|
import { JsonDataProvider } from '@qwickapps/schema';
|
|
9
9
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
10
10
|
import { Button, Code, FormBlock, QwickApp, QwickAppsLogo, SelectInputField, TextInputField } from '../components';
|
|
11
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
// Sample form block data for different use cases
|
|
@@ -831,4 +832,57 @@ export const RealWorldExample: Story = {
|
|
|
831
832
|
},
|
|
832
833
|
},
|
|
833
834
|
},
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* SerializationDemo - FormBlock serialization using template
|
|
839
|
+
*/
|
|
840
|
+
export const SerializationDemo: Story = {
|
|
841
|
+
render: makeSerializationStory(() => (
|
|
842
|
+
<FormBlock
|
|
843
|
+
title="User Registration"
|
|
844
|
+
description="Create your account and personalize your experience"
|
|
845
|
+
status="info"
|
|
846
|
+
message="Please fill out all required fields to complete registration"
|
|
847
|
+
maxWidth="md"
|
|
848
|
+
background="gradient"
|
|
849
|
+
>
|
|
850
|
+
<TextInputField
|
|
851
|
+
label="Full Name"
|
|
852
|
+
value="John Doe"
|
|
853
|
+
placeholder="Enter your full name"
|
|
854
|
+
required={true}
|
|
855
|
+
/>
|
|
856
|
+
|
|
857
|
+
<TextInputField
|
|
858
|
+
label="Email Address"
|
|
859
|
+
value="user@example.com"
|
|
860
|
+
type="email"
|
|
861
|
+
placeholder="your@email.com"
|
|
862
|
+
required={true}
|
|
863
|
+
helperText="We'll use this to send you important updates"
|
|
864
|
+
/>
|
|
865
|
+
|
|
866
|
+
<SelectInputField
|
|
867
|
+
label="Country"
|
|
868
|
+
value="us"
|
|
869
|
+
placeholder="Select your country"
|
|
870
|
+
options={[
|
|
871
|
+
{ value: 'us', label: 'United States' },
|
|
872
|
+
{ value: 'ca', label: 'Canada' },
|
|
873
|
+
{ value: 'uk', label: 'United Kingdom' }
|
|
874
|
+
]}
|
|
875
|
+
required={true}
|
|
876
|
+
/>
|
|
877
|
+
|
|
878
|
+
<Button label="Create Account" variant="primary" />
|
|
879
|
+
</FormBlock>
|
|
880
|
+
)),
|
|
881
|
+
parameters: {
|
|
882
|
+
docs: {
|
|
883
|
+
description: {
|
|
884
|
+
story: 'Shows FormBlock serialization with nested form components using the standardized makeSerializationStory template. Demonstrates react-children strategy for form container components.',
|
|
885
|
+
},
|
|
886
|
+
},
|
|
887
|
+
},
|
|
834
888
|
};
|
|
@@ -18,6 +18,7 @@ import React, { useState } from 'react';
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
19
|
import { Box, Typography, Paper, Button, Alert } from '@mui/material';
|
|
20
20
|
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
21
|
+
import { Code } from '../components/blocks';
|
|
21
22
|
|
|
22
23
|
// Import form components
|
|
23
24
|
import { TextInputField } from '../components/input/TextInputField';
|
|
@@ -132,19 +133,13 @@ const SerializationDemo: React.FC<{
|
|
|
132
133
|
<Typography variant="subtitle2" color="text.secondary" gutterBottom>
|
|
133
134
|
Serialized JSON:
|
|
134
135
|
</Typography>
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}}
|
|
143
|
-
>
|
|
144
|
-
<pre style={{ margin: 0, fontSize: '0.8rem' }}>
|
|
145
|
-
{JSON.stringify(JSON.parse(serializedData), null, 2)}
|
|
146
|
-
</pre>
|
|
147
|
-
</Paper>
|
|
136
|
+
<Code
|
|
137
|
+
language="json"
|
|
138
|
+
content={JSON.stringify(JSON.parse(serializedData), null, 2)}
|
|
139
|
+
showCopy={true}
|
|
140
|
+
showLineNumbers={false}
|
|
141
|
+
sx={{ maxHeight: 200, overflow: 'auto' }}
|
|
142
|
+
/>
|
|
148
143
|
</Box>
|
|
149
144
|
)}
|
|
150
145
|
|
|
@@ -9,6 +9,7 @@ import { Button } from '../components/buttons/Button';
|
|
|
9
9
|
import { Code } from '../components/blocks/Code';
|
|
10
10
|
import { Image } from '../components/blocks/Image';
|
|
11
11
|
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
12
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
12
13
|
import React from 'react';
|
|
13
14
|
|
|
14
15
|
// Ensure components are registered for serialization
|
|
@@ -223,7 +224,6 @@ export const WithCodeBlock: Story = {
|
|
|
223
224
|
language="typescript"
|
|
224
225
|
title="GridCell Usage"
|
|
225
226
|
showCopy={true}
|
|
226
|
-
theme="dark"
|
|
227
227
|
>
|
|
228
228
|
{`import { GridCell } from '@qwickapps/react-framework';
|
|
229
229
|
|
|
@@ -246,68 +246,7 @@ function ResponsiveCard() {
|
|
|
246
246
|
),
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
// Serialization examples
|
|
250
|
-
export const SerializationDemo: Story = {
|
|
251
|
-
args: {
|
|
252
|
-
xs: 12,
|
|
253
|
-
md: 8,
|
|
254
|
-
lg: 6,
|
|
255
|
-
background: 'background.paper',
|
|
256
|
-
padding: 'large',
|
|
257
|
-
margin: 'medium',
|
|
258
|
-
},
|
|
259
|
-
render: (args) => {
|
|
260
|
-
const cellComponent = (
|
|
261
|
-
<GridCell {...args}>
|
|
262
|
-
<Text content="Serializable GridCell" variant="h4" />
|
|
263
|
-
<Text content="This entire cell and its contents can be serialized to JSON and perfectly reconstructed." variant="body1" />
|
|
264
|
-
<Button label="Interactive Element" variant="outlined" />
|
|
265
|
-
<Code language="json" title="Partial Serialized Structure" showCopy={false}>
|
|
266
|
-
{`{
|
|
267
|
-
"tag": "GridCell",
|
|
268
|
-
"version": "1.0.0",
|
|
269
|
-
"data": {
|
|
270
|
-
"xs": 12,
|
|
271
|
-
"md": 8,
|
|
272
|
-
"lg": 6,
|
|
273
|
-
"background": "background.paper",
|
|
274
|
-
"padding": "large",
|
|
275
|
-
"margin": "medium",
|
|
276
|
-
"children": "[nested components...]"
|
|
277
|
-
}
|
|
278
|
-
}`}
|
|
279
|
-
</Code>
|
|
280
|
-
</GridCell>
|
|
281
|
-
);
|
|
282
249
|
|
|
283
|
-
return (
|
|
284
|
-
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(12, 1fr)', gap: '16px' }}>
|
|
285
|
-
<div style={{ gridColumn: '1 / -1', marginBottom: '16px' }}>
|
|
286
|
-
<h3>Original Component:</h3>
|
|
287
|
-
</div>
|
|
288
|
-
{cellComponent}
|
|
289
|
-
|
|
290
|
-
<div style={{ gridColumn: '1 / -1', marginTop: '24px' }}>
|
|
291
|
-
<h3>Round-trip Serialization Test:</h3>
|
|
292
|
-
</div>
|
|
293
|
-
{ComponentTransformer.deserialize(ComponentTransformer.serialize(cellComponent))}
|
|
294
|
-
|
|
295
|
-
<div style={{ gridColumn: '1 / -1', marginTop: '24px' }}>
|
|
296
|
-
<div style={{
|
|
297
|
-
padding: '16px',
|
|
298
|
-
backgroundColor: '#e7f3ff',
|
|
299
|
-
borderRadius: '8px',
|
|
300
|
-
fontSize: '14px'
|
|
301
|
-
}}>
|
|
302
|
-
<strong>✓ Serialization Test Passed</strong>
|
|
303
|
-
<br />
|
|
304
|
-
Both cells above should be identical, demonstrating that the component can be perfectly serialized and deserialized.
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
</div>
|
|
308
|
-
);
|
|
309
|
-
},
|
|
310
|
-
};
|
|
311
250
|
|
|
312
251
|
export const NestedSerializableComponents: Story = {
|
|
313
252
|
args: {
|
|
@@ -407,11 +346,31 @@ export const ThemeIntegration: Story = {
|
|
|
407
346
|
},
|
|
408
347
|
render: (args) => (
|
|
409
348
|
<GridCell {...args}>
|
|
410
|
-
<Text content="Theme-Aware Cell" variant="h4" color="
|
|
411
|
-
<Text content="This cell uses theme colors for background and automatically adjusts text color for contrast." variant="body1" color="
|
|
349
|
+
<Text content="Theme-Aware Cell" variant="h4" color="textPrimary" />
|
|
350
|
+
<Text content="This cell uses theme colors for background and automatically adjusts text color for contrast." variant="body1" color="textSecondary" />
|
|
412
351
|
<div style={{ marginTop: '16px' }}>
|
|
413
352
|
<Button label="Themed Button" variant="contained" />
|
|
414
353
|
</div>
|
|
415
354
|
</GridCell>
|
|
416
355
|
),
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* SerializationDemo - GridCell serialization using template
|
|
360
|
+
*/
|
|
361
|
+
export const SerializationDemo: Story = {
|
|
362
|
+
render: makeSerializationStory(() => (
|
|
363
|
+
<GridCell xs={12} sm={6} md={4} padding="large" background="#e3f2fd">
|
|
364
|
+
<Text content="Serializable GridCell" variant="h6" />
|
|
365
|
+
<Text content="This grid cell contains nested serializable components." variant="body1" />
|
|
366
|
+
<Button label="Action Button" variant="primary" />
|
|
367
|
+
</GridCell>
|
|
368
|
+
)),
|
|
369
|
+
parameters: {
|
|
370
|
+
docs: {
|
|
371
|
+
description: {
|
|
372
|
+
story: 'Shows GridCell serialization with nested components using the standardized makeSerializationStory template. Demonstrates react-children strategy for layout components.',
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
},
|
|
417
376
|
};
|
|
@@ -9,6 +9,7 @@ import { Text } from '../components/blocks/Text';
|
|
|
9
9
|
import { Button } from '../components/buttons/Button';
|
|
10
10
|
import { Code } from '../components/blocks/Code';
|
|
11
11
|
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
12
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
12
13
|
import React from 'react';
|
|
13
14
|
|
|
14
15
|
// Ensure components are registered for serialization
|
|
@@ -167,24 +168,18 @@ export const ComplexResponsive: Story = {
|
|
|
167
168
|
),
|
|
168
169
|
};
|
|
169
170
|
|
|
170
|
-
// Serialization examples
|
|
171
|
+
// Serialization examples - using standardized template
|
|
171
172
|
export const SerializationDemo: Story = {
|
|
172
|
-
|
|
173
|
-
columns
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
<Text content="This entire grid layout can be serialized to JSON and recreated exactly." variant="body1" />
|
|
183
|
-
<Button label="Interactive Button" variant="outlined" />
|
|
184
|
-
</GridCell>
|
|
185
|
-
<GridCell span={4} background="grey.100" padding="medium">
|
|
186
|
-
<Text content="Code Example" variant="h5" />
|
|
187
|
-
<Code language="typescript" showCopy={true}>
|
|
173
|
+
render: makeSerializationStory(() => (
|
|
174
|
+
<GridLayout columns={2} spacing="large" height="400px">
|
|
175
|
+
<GridCell span={8} background="background.paper" padding="large">
|
|
176
|
+
<Text content="Serializable Content" variant="h3" />
|
|
177
|
+
<Text content="This entire grid layout can be serialized to JSON and recreated exactly." variant="body1" />
|
|
178
|
+
<Button label="Interactive Button" variant="outlined" />
|
|
179
|
+
</GridCell>
|
|
180
|
+
<GridCell span={4} background="grey.100" padding="medium">
|
|
181
|
+
<Text content="Code Example" variant="h5" />
|
|
182
|
+
<Code language="typescript" showCopy={true}>
|
|
188
183
|
{`// Serialize the grid
|
|
189
184
|
const serialized = ComponentTransformer
|
|
190
185
|
.serialize(gridComponent);
|
|
@@ -192,36 +187,16 @@ const serialized = ComponentTransformer
|
|
|
192
187
|
// Deserialize back to React
|
|
193
188
|
const restored = ComponentTransformer
|
|
194
189
|
.deserialize(serialized);`}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
{gridComponent}
|
|
206
|
-
<div style={{ marginTop: '24px', marginBottom: '16px' }}>
|
|
207
|
-
<h3>Serialized JSON (first 200 characters):</h3>
|
|
208
|
-
<pre style={{
|
|
209
|
-
backgroundColor: '#f5f5f5',
|
|
210
|
-
padding: '12px',
|
|
211
|
-
borderRadius: '4px',
|
|
212
|
-
fontSize: '12px',
|
|
213
|
-
overflow: 'hidden',
|
|
214
|
-
maxHeight: '120px'
|
|
215
|
-
}}>
|
|
216
|
-
{ComponentTransformer.serialize(gridComponent).substring(0, 200)}...
|
|
217
|
-
</pre>
|
|
218
|
-
</div>
|
|
219
|
-
<div style={{ marginBottom: '16px' }}>
|
|
220
|
-
<h3>Deserialized Component:</h3>
|
|
221
|
-
</div>
|
|
222
|
-
{ComponentTransformer.deserialize(ComponentTransformer.serialize(gridComponent))}
|
|
223
|
-
</div>
|
|
224
|
-
);
|
|
190
|
+
</Code>
|
|
191
|
+
</GridCell>
|
|
192
|
+
</GridLayout>
|
|
193
|
+
)),
|
|
194
|
+
parameters: {
|
|
195
|
+
docs: {
|
|
196
|
+
description: {
|
|
197
|
+
story: 'Demonstrates GridLayout serialization with nested components using the standardized serialization template.',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
225
200
|
},
|
|
226
201
|
};
|
|
227
202
|
|
|
@@ -12,6 +12,7 @@ import { Code } from '../components/blocks';
|
|
|
12
12
|
import HeroBlock from '../components/blocks/HeroBlock';
|
|
13
13
|
import { DataProvider } from '../contexts/DataContext';
|
|
14
14
|
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
15
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
15
16
|
import React from 'react';
|
|
16
17
|
|
|
17
18
|
// Sample CMS data for data binding stories
|
|
@@ -928,4 +929,31 @@ export const SerializationNestedActions: Story = {
|
|
|
928
929
|
},
|
|
929
930
|
},
|
|
930
931
|
},
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* SerializationDemo - Modern HeroBlock serialization using template
|
|
936
|
+
*/
|
|
937
|
+
export const SerializationDemo: Story = {
|
|
938
|
+
render: makeSerializationStory(() => (
|
|
939
|
+
<HeroBlock
|
|
940
|
+
title="Serializable HeroBlock"
|
|
941
|
+
subtitle="Modern factory-based component with standardized serialization"
|
|
942
|
+
backgroundGradient="linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
943
|
+
textAlign="center"
|
|
944
|
+
blockHeight="medium"
|
|
945
|
+
overlayOpacity={0.6}
|
|
946
|
+
actions={[
|
|
947
|
+
{ label: 'Primary Action', variant: 'primary', buttonSize: 'large' },
|
|
948
|
+
{ label: 'Secondary Action', variant: 'outlined', buttonSize: 'medium' }
|
|
949
|
+
]}
|
|
950
|
+
/>
|
|
951
|
+
)),
|
|
952
|
+
parameters: {
|
|
953
|
+
docs: {
|
|
954
|
+
description: {
|
|
955
|
+
story: 'Shows modern HeroBlock serialization using the standardized makeSerializationStory template. Demonstrates react-children strategy for container components.',
|
|
956
|
+
},
|
|
957
|
+
},
|
|
958
|
+
},
|
|
931
959
|
};
|
|
@@ -10,6 +10,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
10
10
|
import { Code } from '../components/blocks';
|
|
11
11
|
import HtmlInputField from '../components/input/HtmlInputField';
|
|
12
12
|
import QwickApp from '../components/QwickApp';
|
|
13
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
13
14
|
|
|
14
15
|
// Sample HTML input field data for different use cases
|
|
15
16
|
const sampleCmsData = {
|
|
@@ -555,4 +556,25 @@ export const EditorFeatureShowcase: Story = {
|
|
|
555
556
|
},
|
|
556
557
|
},
|
|
557
558
|
},
|
|
558
|
-
};
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
// Serialization Demo
|
|
562
|
+
export const SerializationDemo: Story = {
|
|
563
|
+
render: makeSerializationStory(() => (
|
|
564
|
+
<HtmlInputField
|
|
565
|
+
label="Serializable HTML Field"
|
|
566
|
+
placeholder="Enter HTML content..."
|
|
567
|
+
required={false}
|
|
568
|
+
rows={4}
|
|
569
|
+
value="<b>Bold text</b> and <i>italic text</i> with <code>code</code>"
|
|
570
|
+
helpText="This field supports HTML formatting and demonstrates serialization"
|
|
571
|
+
/>
|
|
572
|
+
)),
|
|
573
|
+
parameters: {
|
|
574
|
+
docs: {
|
|
575
|
+
description: {
|
|
576
|
+
story: 'Demonstrates HtmlInputField serialization with HTML content and formatting preserved.',
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
};
|