@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
|
@@ -554,67 +554,24 @@ export const ModelViewBasic: Story = {
|
|
|
554
554
|
},
|
|
555
555
|
};
|
|
556
556
|
|
|
557
|
+
// Import makeSerializationStory for standardized serialization demos
|
|
558
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
559
|
+
|
|
557
560
|
// Enhanced Serialization Examples - "WebView for React" functionality
|
|
558
561
|
export const SerializationBasic: Story = {
|
|
559
|
-
render: () =>
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
/>
|
|
573
|
-
);
|
|
574
|
-
|
|
575
|
-
// Serialize the component to JSON
|
|
576
|
-
const serialized = ComponentTransformer.serialize(originalImageComponent);
|
|
577
|
-
|
|
578
|
-
// Deserialize back to a React component
|
|
579
|
-
const deserializedComponent = ComponentTransformer.deserialize(serialized);
|
|
580
|
-
|
|
581
|
-
return (
|
|
582
|
-
<QwickApp appId="image-serialization-basic" appName='Basic Image Serialization'>
|
|
583
|
-
<Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
|
|
584
|
-
|
|
585
|
-
<Box>
|
|
586
|
-
<Typography variant="h6" gutterBottom>Original Image Component</Typography>
|
|
587
|
-
{originalImageComponent}
|
|
588
|
-
</Box>
|
|
589
|
-
|
|
590
|
-
<Divider />
|
|
591
|
-
|
|
592
|
-
<Box>
|
|
593
|
-
<Typography variant="h6" gutterBottom>Serialized JSON Data</Typography>
|
|
594
|
-
<Paper elevation={1} sx={{ p: 2, backgroundColor: 'grey.50' }}>
|
|
595
|
-
<Typography variant="body2" component="pre" sx={{ whiteSpace: 'pre-wrap', fontSize: '0.75rem' }}>
|
|
596
|
-
{JSON.stringify(JSON.parse(serialized), null, 2)}
|
|
597
|
-
</Typography>
|
|
598
|
-
</Paper>
|
|
599
|
-
</Box>
|
|
600
|
-
|
|
601
|
-
<Divider />
|
|
602
|
-
|
|
603
|
-
<Box>
|
|
604
|
-
<Typography variant="h6" gutterBottom>Deserialized Component (Recreated from JSON)</Typography>
|
|
605
|
-
{deserializedComponent}
|
|
606
|
-
</Box>
|
|
607
|
-
|
|
608
|
-
<Alert severity="success">
|
|
609
|
-
<Typography variant="body2">
|
|
610
|
-
<strong>Serialization Success!</strong> The Image component was successfully serialized to JSON and deserialized back to a functional React component with all properties preserved.
|
|
611
|
-
</Typography>
|
|
612
|
-
</Alert>
|
|
613
|
-
|
|
614
|
-
</Box>
|
|
615
|
-
</QwickApp>
|
|
616
|
-
);
|
|
617
|
-
},
|
|
562
|
+
render: makeSerializationStory(() => (
|
|
563
|
+
<Image
|
|
564
|
+
src={sampleImages.landscape}
|
|
565
|
+
alt="Serializable mountain landscape"
|
|
566
|
+
width={600}
|
|
567
|
+
height={400}
|
|
568
|
+
objectFit="cover"
|
|
569
|
+
objectPosition="center"
|
|
570
|
+
borderRadius="16px"
|
|
571
|
+
showLoading={true}
|
|
572
|
+
title="Beautiful mountain vista"
|
|
573
|
+
/>
|
|
574
|
+
)),
|
|
618
575
|
parameters: {
|
|
619
576
|
docs: {
|
|
620
577
|
description: {
|
|
@@ -625,101 +582,25 @@ export const SerializationBasic: Story = {
|
|
|
625
582
|
};
|
|
626
583
|
|
|
627
584
|
export const SerializationComplex: Story = {
|
|
628
|
-
render: () =>
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
/>
|
|
648
|
-
);
|
|
649
|
-
|
|
650
|
-
// Serialize with all the complex properties
|
|
651
|
-
const serialized = ComponentTransformer.serialize(complexImageComponent);
|
|
652
|
-
const deserializedComponent = ComponentTransformer.deserialize(serialized);
|
|
653
|
-
|
|
654
|
-
// Parse for display
|
|
655
|
-
const parsedData = JSON.parse(serialized);
|
|
656
|
-
|
|
657
|
-
return (
|
|
658
|
-
<QwickApp appId="image-serialization-complex" appName='Complex Image Serialization'>
|
|
659
|
-
<Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
|
|
660
|
-
|
|
661
|
-
<Box>
|
|
662
|
-
<Typography variant="h6" gutterBottom>Original Complex Image</Typography>
|
|
663
|
-
<Typography variant="body2" color="text.secondary" gutterBottom>
|
|
664
|
-
Includes responsive srcSet, fallback image, loading states, and custom styling
|
|
665
|
-
</Typography>
|
|
666
|
-
{complexImageComponent}
|
|
667
|
-
</Box>
|
|
668
|
-
|
|
669
|
-
<Divider />
|
|
670
|
-
|
|
671
|
-
<Box>
|
|
672
|
-
<Typography variant="h6" gutterBottom>Serialized Properties</Typography>
|
|
673
|
-
<Grid container spacing={2}>
|
|
674
|
-
<Grid item xs={12} md={6}>
|
|
675
|
-
<Paper elevation={1} sx={{ p: 2, height: '300px', overflow: 'auto' }}>
|
|
676
|
-
<Typography variant="subtitle2" gutterBottom>JSON Structure:</Typography>
|
|
677
|
-
<Typography variant="body2" component="pre" sx={{ whiteSpace: 'pre-wrap', fontSize: '0.7rem' }}>
|
|
678
|
-
{JSON.stringify(parsedData, null, 2)}
|
|
679
|
-
</Typography>
|
|
680
|
-
</Paper>
|
|
681
|
-
</Grid>
|
|
682
|
-
<Grid item xs={12} md={6}>
|
|
683
|
-
<Paper elevation={1} sx={{ p: 2 }}>
|
|
684
|
-
<Typography variant="subtitle2" gutterBottom>Key Properties:</Typography>
|
|
685
|
-
<Typography variant="body2" component="div">
|
|
686
|
-
• Component: <code>{parsedData.tag}</code><br />
|
|
687
|
-
• Version: <code>{parsedData.version}</code><br />
|
|
688
|
-
• Source: <code>{parsedData.data?.src ? 'Present' : 'Missing'}</code><br />
|
|
689
|
-
• Alt text: <code>{parsedData.data?.alt ? 'Present' : 'Missing'}</code><br />
|
|
690
|
-
• Dimensions: <code>{parsedData.data?.width}x{parsedData.data?.height}</code><br />
|
|
691
|
-
• Object fit: <code>{parsedData.data?.objectFit}</code><br />
|
|
692
|
-
• Border radius: <code>{parsedData.data?.borderRadius}</code><br />
|
|
693
|
-
• Loading behavior: <code>{parsedData.data?.loading}</code><br />
|
|
694
|
-
• Fallback: <code>{parsedData.data?.fallbackSrc ? 'Present' : 'None'}</code><br />
|
|
695
|
-
• Responsive: <code>{parsedData.data?.srcSet ? 'Yes' : 'No'}</code>
|
|
696
|
-
</Typography>
|
|
697
|
-
</Paper>
|
|
698
|
-
</Grid>
|
|
699
|
-
</Grid>
|
|
700
|
-
</Box>
|
|
701
|
-
|
|
702
|
-
<Divider />
|
|
703
|
-
|
|
704
|
-
<Box>
|
|
705
|
-
<Typography variant="h6" gutterBottom>Deserialized Component</Typography>
|
|
706
|
-
<Typography variant="body2" color="text.secondary" gutterBottom>
|
|
707
|
-
Recreated from JSON with all properties and functionality intact
|
|
708
|
-
</Typography>
|
|
709
|
-
{deserializedComponent}
|
|
710
|
-
</Box>
|
|
711
|
-
|
|
712
|
-
<Alert severity="info">
|
|
713
|
-
<Typography variant="body2">
|
|
714
|
-
<strong>Advanced Serialization Success!</strong> All Image properties including responsive configuration,
|
|
715
|
-
fallback handling, loading states, and styling were perfectly preserved through the serialization process.
|
|
716
|
-
</Typography>
|
|
717
|
-
</Alert>
|
|
718
|
-
|
|
719
|
-
</Box>
|
|
720
|
-
</QwickApp>
|
|
721
|
-
);
|
|
722
|
-
},
|
|
585
|
+
render: makeSerializationStory(() => (
|
|
586
|
+
<Image
|
|
587
|
+
src={sampleImages.technology}
|
|
588
|
+
alt="Complex responsive technology image"
|
|
589
|
+
width={800}
|
|
590
|
+
height={500}
|
|
591
|
+
objectFit="cover"
|
|
592
|
+
objectPosition="center"
|
|
593
|
+
loading="lazy"
|
|
594
|
+
borderRadius="20px"
|
|
595
|
+
showLoading={true}
|
|
596
|
+
showError={true}
|
|
597
|
+
fallbackSrc={sampleImages.fallback}
|
|
598
|
+
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
599
|
+
srcSet={`${sampleImages.technology}&w=400 400w, ${sampleImages.technology}&w=800 800w, ${sampleImages.technology}&w=1200 1200w`}
|
|
600
|
+
title="Advanced technology setup with multiple monitors"
|
|
601
|
+
draggable={false}
|
|
602
|
+
/>
|
|
603
|
+
)),
|
|
723
604
|
parameters: {
|
|
724
605
|
docs: {
|
|
725
606
|
description: {
|
|
@@ -730,85 +611,16 @@ export const SerializationComplex: Story = {
|
|
|
730
611
|
};
|
|
731
612
|
|
|
732
613
|
export const SerializationWithDataBinding: Story = {
|
|
733
|
-
render: () =>
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
/>
|
|
744
|
-
);
|
|
745
|
-
|
|
746
|
-
// Serialize the data-bound component
|
|
747
|
-
const serialized = ComponentTransformer.serialize(dataBoundImageComponent);
|
|
748
|
-
const deserializedComponent = ComponentTransformer.deserialize(serialized);
|
|
749
|
-
const parsedData = JSON.parse(serialized);
|
|
750
|
-
|
|
751
|
-
return (
|
|
752
|
-
<QwickApp appId="image-serialization-databound" appName='Data-Bound Image Serialization'>
|
|
753
|
-
<Box sx={{ '& > *:not(:last-child)': { mb: 4 } }}>
|
|
754
|
-
|
|
755
|
-
<Box>
|
|
756
|
-
<Typography variant="h6" gutterBottom>Original Data-Bound Image</Typography>
|
|
757
|
-
<Typography variant="body2" color="text.secondary" gutterBottom>
|
|
758
|
-
Image loaded from CMS data source with caching enabled
|
|
759
|
-
</Typography>
|
|
760
|
-
{dataBoundImageComponent}
|
|
761
|
-
</Box>
|
|
762
|
-
|
|
763
|
-
<Divider />
|
|
764
|
-
|
|
765
|
-
<Box>
|
|
766
|
-
<Typography variant="h6" gutterBottom>Serialized Data Binding</Typography>
|
|
767
|
-
<Grid container spacing={2}>
|
|
768
|
-
<Grid item xs={12} md={8}>
|
|
769
|
-
<Paper elevation={1} sx={{ p: 2 }}>
|
|
770
|
-
<Typography variant="subtitle2" gutterBottom>Serialized JSON:</Typography>
|
|
771
|
-
<Typography variant="body2" component="pre" sx={{ whiteSpace: 'pre-wrap', fontSize: '0.7rem', maxHeight: '200px', overflow: 'auto' }}>
|
|
772
|
-
{JSON.stringify(parsedData, null, 2)}
|
|
773
|
-
</Typography>
|
|
774
|
-
</Paper>
|
|
775
|
-
</Grid>
|
|
776
|
-
<Grid item xs={12} md={4}>
|
|
777
|
-
<Paper elevation={1} sx={{ p: 2 }}>
|
|
778
|
-
<Typography variant="subtitle2" gutterBottom>Data Binding Info:</Typography>
|
|
779
|
-
<Typography variant="body2" component="div">
|
|
780
|
-
• Data source: <code>{parsedData.data?.dataSource ? 'Preserved' : 'Missing'}</code><br />
|
|
781
|
-
• Binding options: <code>{parsedData.data?.bindingOptions ? 'Present' : 'None'}</code><br />
|
|
782
|
-
• Cache enabled: <code>{parsedData.data?.bindingOptions?.cache ? 'Yes' : 'No'}</code><br />
|
|
783
|
-
• Cache TTL: <code>{parsedData.data?.bindingOptions?.cacheTTL || 'Default'}</code><br />
|
|
784
|
-
• Strict mode: <code>{parsedData.data?.bindingOptions?.strict ? 'Yes' : 'No'}</code>
|
|
785
|
-
</Typography>
|
|
786
|
-
</Paper>
|
|
787
|
-
</Grid>
|
|
788
|
-
</Grid>
|
|
789
|
-
</Box>
|
|
790
|
-
|
|
791
|
-
<Divider />
|
|
792
|
-
|
|
793
|
-
<Box>
|
|
794
|
-
<Typography variant="h6" gutterBottom>Deserialized Data-Bound Component</Typography>
|
|
795
|
-
<Typography variant="body2" color="text.secondary" gutterBottom>
|
|
796
|
-
Recreated with full data binding functionality preserved
|
|
797
|
-
</Typography>
|
|
798
|
-
{deserializedComponent}
|
|
799
|
-
</Box>
|
|
800
|
-
|
|
801
|
-
<Alert severity="success">
|
|
802
|
-
<Typography variant="body2">
|
|
803
|
-
<strong>Data Binding Serialization Success!</strong> The Image component with CMS data binding,
|
|
804
|
-
caching configuration, and all binding options was successfully serialized and recreated.
|
|
805
|
-
</Typography>
|
|
806
|
-
</Alert>
|
|
807
|
-
|
|
808
|
-
</Box>
|
|
809
|
-
</QwickApp>
|
|
810
|
-
);
|
|
811
|
-
},
|
|
614
|
+
render: makeSerializationStory(() => (
|
|
615
|
+
<Image
|
|
616
|
+
dataSource={dataProvider.createDataSource('gallery.heroImage')}
|
|
617
|
+
bindingOptions={{
|
|
618
|
+
cache: true,
|
|
619
|
+
cacheTTL: 300000,
|
|
620
|
+
strict: false
|
|
621
|
+
}}
|
|
622
|
+
/>
|
|
623
|
+
)),
|
|
812
624
|
parameters: {
|
|
813
625
|
docs: {
|
|
814
626
|
description: {
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Alert, Box, Paper, Typography } from '@mui/material';
|
|
8
8
|
import { JsonDataProvider } from '@qwickapps/schema';
|
|
9
9
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
10
|
+
import React from 'react';
|
|
10
11
|
import QwickApp from '../components/QwickApp';
|
|
12
|
+
import { ModelView } from '../components/base/ModelView';
|
|
11
13
|
import { Code } from '../components/blocks';
|
|
12
14
|
import Section from '../components/blocks/Section';
|
|
13
|
-
import {
|
|
14
|
-
import { ModelView } from '../components/base/ModelView';
|
|
15
|
-
import React from 'react';
|
|
15
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
16
16
|
|
|
17
17
|
// Sample CMS data for data binding stories
|
|
18
18
|
const sampleCmsData = {
|
|
@@ -699,3 +699,37 @@ export const ModelViewBasic: Story = {
|
|
|
699
699
|
},
|
|
700
700
|
},
|
|
701
701
|
};
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* SerializationDemo - Demonstrates section component serialization
|
|
705
|
+
*/
|
|
706
|
+
export const SerializationDemo: StoryObj<typeof Section> = {
|
|
707
|
+
render: makeSerializationStory(() => (
|
|
708
|
+
<Section
|
|
709
|
+
background="primary.light"
|
|
710
|
+
padding="large"
|
|
711
|
+
contentMaxWidth="md"
|
|
712
|
+
component="section"
|
|
713
|
+
>
|
|
714
|
+
<Typography variant="h4" component="h2" gutterBottom>
|
|
715
|
+
Section Serialization Demo
|
|
716
|
+
</Typography>
|
|
717
|
+
<Typography variant="body1" paragraph>
|
|
718
|
+
This section demonstrates how container components serialize their children
|
|
719
|
+
while maintaining proper semantic HTML structure.
|
|
720
|
+
</Typography>
|
|
721
|
+
<Box sx={{ display: 'flex', gap: 2, justifyContent: 'center', mt: 2 }}>
|
|
722
|
+
<Typography variant="caption" color="text.secondary">
|
|
723
|
+
Content max width: md • Padding: large • Component: section
|
|
724
|
+
</Typography>
|
|
725
|
+
</Box>
|
|
726
|
+
</Section>
|
|
727
|
+
)),
|
|
728
|
+
parameters: {
|
|
729
|
+
docs: {
|
|
730
|
+
description: {
|
|
731
|
+
story: 'Shows how Section components are serialized with their nested children and semantic HTML structure preserved.',
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
};
|
|
@@ -10,6 +10,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
10
10
|
import { Code } from '../components/blocks';
|
|
11
11
|
import SelectInputField from '../components/input/SelectInputField';
|
|
12
12
|
import QwickApp from '../components/QwickApp';
|
|
13
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
13
14
|
|
|
14
15
|
// Sample select field data for different use cases
|
|
15
16
|
const sampleCmsData = {
|
|
@@ -602,4 +603,28 @@ export const OptionsShowcase: Story = {
|
|
|
602
603
|
},
|
|
603
604
|
},
|
|
604
605
|
},
|
|
605
|
-
};
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
// Serialization Demo
|
|
609
|
+
export const SerializationDemo: Story = {
|
|
610
|
+
render: makeSerializationStory(() => (
|
|
611
|
+
<SelectInputField
|
|
612
|
+
label="Serializable Select Field"
|
|
613
|
+
options={[
|
|
614
|
+
{ value: 'option1', label: 'First Option' },
|
|
615
|
+
{ value: 'option2', label: 'Second Option' },
|
|
616
|
+
{ value: 'option3', label: 'Third Option' }
|
|
617
|
+
]}
|
|
618
|
+
placeholder="Choose an option..."
|
|
619
|
+
required={true}
|
|
620
|
+
helpText="This select field demonstrates serialization"
|
|
621
|
+
/>
|
|
622
|
+
)),
|
|
623
|
+
parameters: {
|
|
624
|
+
docs: {
|
|
625
|
+
description: {
|
|
626
|
+
story: 'Demonstrates SelectInputField serialization with options and configuration preserved.',
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
};
|
|
@@ -10,6 +10,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
10
10
|
import { Text } from '../components/blocks';
|
|
11
11
|
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
12
12
|
import { ModelView } from '../components/base/ModelView';
|
|
13
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
13
14
|
import QwickApp from '../components/QwickApp';
|
|
14
15
|
import React from 'react';
|
|
15
16
|
|
|
@@ -419,61 +420,28 @@ export const DataBinding: Story = {
|
|
|
419
420
|
)
|
|
420
421
|
};
|
|
421
422
|
|
|
422
|
-
// Serialization example
|
|
423
|
-
export const SerializationExample: Story = {
|
|
424
|
-
render: () => {
|
|
425
|
-
// Create Text component instances
|
|
426
|
-
const originalText = new Text({
|
|
427
|
-
content: 'Serializable Typography Component',
|
|
428
|
-
variant: 'h3',
|
|
429
|
-
color: 'primary',
|
|
430
|
-
align: 'center',
|
|
431
|
-
fontWeight: 'bold',
|
|
432
|
-
gutterBottom: true,
|
|
433
|
-
customColor: '#1976d2',
|
|
434
|
-
fontSize: '2rem'
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
// Serialize to JSON
|
|
438
|
-
const serializedJson = ComponentTransformer.serialize(originalText.render());
|
|
439
|
-
|
|
440
|
-
// Deserialize back to component
|
|
441
|
-
const deserializedComponent = ComponentTransformer.deserialize(serializedJson);
|
|
442
|
-
|
|
443
|
-
return (
|
|
444
|
-
<Paper elevation={2} sx={{ p: 3 }}>
|
|
445
|
-
<Typography variant="h5" gutterBottom>
|
|
446
|
-
Text Component Serialization Demo
|
|
447
|
-
</Typography>
|
|
448
|
-
|
|
449
|
-
<Alert severity="success" sx={{ mb: 3 }}>
|
|
450
|
-
<Typography variant="body2">
|
|
451
|
-
This demonstrates full JSON serialization/deserialization of Text components.
|
|
452
|
-
The component below was serialized to JSON and then reconstructed.
|
|
453
|
-
</Typography>
|
|
454
|
-
</Alert>
|
|
455
|
-
|
|
456
|
-
<Box sx={{ mb: 3 }}>
|
|
457
|
-
<Typography variant="h6" gutterBottom>Original Component:</Typography>
|
|
458
|
-
{originalText.render()}
|
|
459
|
-
</Box>
|
|
460
|
-
|
|
461
|
-
<Box sx={{ mb: 3 }}>
|
|
462
|
-
<Typography variant="h6" gutterBottom>Serialized JSON:</Typography>
|
|
463
|
-
<Paper variant="outlined" sx={{ p: 2, bgcolor: 'grey.50' }}>
|
|
464
|
-
<pre style={{ margin: 0, fontSize: '12px', wordWrap: 'break-word', whiteSpace: 'pre-wrap' }}>
|
|
465
|
-
{JSON.stringify(JSON.parse(serializedJson), null, 2)}
|
|
466
|
-
</pre>
|
|
467
|
-
</Paper>
|
|
468
|
-
</Box>
|
|
469
423
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
424
|
+
// Serialization example - using the standardized template
|
|
425
|
+
export const SerializationExample: Story = {
|
|
426
|
+
render: makeSerializationStory(() => (
|
|
427
|
+
<Text
|
|
428
|
+
content="Serializable Typography Component"
|
|
429
|
+
variant="h3"
|
|
430
|
+
color="primary"
|
|
431
|
+
align="center"
|
|
432
|
+
fontWeight="bold"
|
|
433
|
+
gutterBottom={true}
|
|
434
|
+
customColor="#1976d2"
|
|
435
|
+
fontSize="2rem"
|
|
436
|
+
/>
|
|
437
|
+
)),
|
|
438
|
+
parameters: {
|
|
439
|
+
docs: {
|
|
440
|
+
description: {
|
|
441
|
+
story: 'Demonstrates Text component serialization and deserialization using ComponentTransformer.',
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
},
|
|
477
445
|
};
|
|
478
446
|
|
|
479
447
|
// Advanced layout example
|
|
@@ -10,6 +10,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
10
10
|
import { Code } from '../components/blocks';
|
|
11
11
|
import TextInputField from '../components/input/TextInputField';
|
|
12
12
|
import QwickApp from '../components/QwickApp';
|
|
13
|
+
import { makeSerializationStory } from './_templates/SerializationTemplate';
|
|
13
14
|
|
|
14
15
|
// Sample text input field data for different use cases
|
|
15
16
|
const sampleCmsData = {
|
|
@@ -523,4 +524,26 @@ export const FieldStatesShowcase: Story = {
|
|
|
523
524
|
},
|
|
524
525
|
},
|
|
525
526
|
},
|
|
526
|
-
};
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
// Serialization Demo
|
|
530
|
+
export const SerializationDemo: Story = {
|
|
531
|
+
render: makeSerializationStory(() => (
|
|
532
|
+
<TextInputField
|
|
533
|
+
label="Serializable Text Field"
|
|
534
|
+
placeholder="Enter your text here..."
|
|
535
|
+
required={true}
|
|
536
|
+
disabled={false}
|
|
537
|
+
rows={3}
|
|
538
|
+
maxLength={100}
|
|
539
|
+
helpText="This field demonstrates serialization capabilities"
|
|
540
|
+
/>
|
|
541
|
+
)),
|
|
542
|
+
parameters: {
|
|
543
|
+
docs: {
|
|
544
|
+
description: {
|
|
545
|
+
story: 'Demonstrates TextInputField serialization with all configuration options preserved.',
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
};
|