@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
|
@@ -256,7 +256,7 @@ describe.skip('SchemaBuilder', () => {
|
|
|
256
256
|
|
|
257
257
|
describe.skip('Integration Tests', () => {
|
|
258
258
|
test('creates complex FeatureCard-like schema', () => {
|
|
259
|
-
const schema = createSchema('FeatureCard', '
|
|
259
|
+
const schema = createSchema('FeatureCard', '1.0.0')
|
|
260
260
|
.model('Feature', builder => {
|
|
261
261
|
builder.field('id').textEditor('Feature ID').required();
|
|
262
262
|
builder.field('title').textEditor('Title', 'Feature title').required();
|
|
@@ -283,7 +283,7 @@ describe.skip('Integration Tests', () => {
|
|
|
283
283
|
|
|
284
284
|
// Verify schema structure
|
|
285
285
|
expect(schema.name).toBe('FeatureCard');
|
|
286
|
-
expect(schema.version).toBe('
|
|
286
|
+
expect(schema.version).toBe('1.0.0');
|
|
287
287
|
expect(Object.keys(schema.models || {})).toEqual(['Feature', 'Action']);
|
|
288
288
|
expect(schema.fields).toHaveLength(5);
|
|
289
289
|
|
|
@@ -184,7 +184,7 @@ describe('ComponentTransformer', () => {
|
|
|
184
184
|
|
|
185
185
|
it('should deserialize registered component from object', () => {
|
|
186
186
|
const componentData = {
|
|
187
|
-
|
|
187
|
+
tagName: 'Button',
|
|
188
188
|
version: '1.0.0',
|
|
189
189
|
data: {
|
|
190
190
|
label: 'Click Me',
|
|
@@ -203,7 +203,7 @@ describe('ComponentTransformer', () => {
|
|
|
203
203
|
|
|
204
204
|
it('should deserialize registered component from JSON string', () => {
|
|
205
205
|
const componentData = {
|
|
206
|
-
|
|
206
|
+
tagName: 'Card',
|
|
207
207
|
version: '1.0.0',
|
|
208
208
|
data: {
|
|
209
209
|
title: 'Test Card',
|
|
@@ -224,12 +224,12 @@ describe('ComponentTransformer', () => {
|
|
|
224
224
|
it('should handle array of components', () => {
|
|
225
225
|
const input = [
|
|
226
226
|
{
|
|
227
|
-
|
|
227
|
+
tagName: 'Button',
|
|
228
228
|
version: '1.0.0',
|
|
229
229
|
data: { label: 'First Button' }
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
|
-
|
|
232
|
+
tagName: 'Button',
|
|
233
233
|
version: '1.0.0',
|
|
234
234
|
data: { label: 'Second Button' }
|
|
235
235
|
}
|
|
@@ -254,7 +254,7 @@ describe('ComponentTransformer', () => {
|
|
|
254
254
|
|
|
255
255
|
it('should throw error for unknown component', () => {
|
|
256
256
|
const componentData = {
|
|
257
|
-
|
|
257
|
+
tagName: 'UnknownComponent',
|
|
258
258
|
version: '1.0.0',
|
|
259
259
|
data: {}
|
|
260
260
|
};
|
|
@@ -267,7 +267,7 @@ describe('ComponentTransformer', () => {
|
|
|
267
267
|
|
|
268
268
|
it('should handle malformed component data gracefully', () => {
|
|
269
269
|
const malformedData = {
|
|
270
|
-
|
|
270
|
+
tagName: 'Button',
|
|
271
271
|
// Missing version and data
|
|
272
272
|
};
|
|
273
273
|
|
|
@@ -287,7 +287,7 @@ describe('ComponentTransformer', () => {
|
|
|
287
287
|
|
|
288
288
|
it('should handle string input correctly', () => {
|
|
289
289
|
const componentData = {
|
|
290
|
-
|
|
290
|
+
tagName: 'Button',
|
|
291
291
|
version: '1.0.0',
|
|
292
292
|
data: { label: 'String Input Test' }
|
|
293
293
|
};
|
|
@@ -302,7 +302,7 @@ describe('ComponentTransformer', () => {
|
|
|
302
302
|
|
|
303
303
|
it('should handle object input correctly', () => {
|
|
304
304
|
const componentData = {
|
|
305
|
-
|
|
305
|
+
tagName: 'Button',
|
|
306
306
|
version: '1.0.0',
|
|
307
307
|
data: { label: 'Object Input Test' }
|
|
308
308
|
};
|
|
@@ -317,12 +317,12 @@ describe('ComponentTransformer', () => {
|
|
|
317
317
|
it('should handle array input correctly', () => {
|
|
318
318
|
const componentsData = [
|
|
319
319
|
{
|
|
320
|
-
|
|
320
|
+
tagName: 'Button',
|
|
321
321
|
version: '1.0.0',
|
|
322
322
|
data: { label: 'Array Item 1' }
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
|
-
|
|
325
|
+
tagName: 'Button',
|
|
326
326
|
version: '1.0.0',
|
|
327
327
|
data: { label: 'Array Item 2' }
|
|
328
328
|
}
|
|
@@ -356,7 +356,7 @@ describe('ComponentTransformer', () => {
|
|
|
356
356
|
const input = [
|
|
357
357
|
'plain text',
|
|
358
358
|
{
|
|
359
|
-
|
|
359
|
+
tagName: 'Button',
|
|
360
360
|
version: '1.0.0',
|
|
361
361
|
data: { label: 'Embedded Button' }
|
|
362
362
|
},
|
|
@@ -382,12 +382,12 @@ describe('ComponentTransformer', () => {
|
|
|
382
382
|
|
|
383
383
|
it('should produce correct serialized structure format', () => {
|
|
384
384
|
// This test verifies the data structure requirement:
|
|
385
|
-
// {
|
|
385
|
+
// { tagName: "ComponentName", version: "1.0.0", data: {...} }
|
|
386
386
|
|
|
387
387
|
// Since we can't easily test serialization of actual React elements
|
|
388
388
|
// without a more complex setup, we'll test the deserialization format
|
|
389
389
|
const expectedStructure = {
|
|
390
|
-
|
|
390
|
+
tagName: 'Button',
|
|
391
391
|
version: '1.0.0',
|
|
392
392
|
data: {
|
|
393
393
|
label: 'Test Button',
|
|
@@ -401,7 +401,7 @@ describe('ComponentTransformer', () => {
|
|
|
401
401
|
|
|
402
402
|
it('should handle version information correctly', () => {
|
|
403
403
|
const componentWithVersion = {
|
|
404
|
-
|
|
404
|
+
tagName: 'Button',
|
|
405
405
|
version: '2.1.0',
|
|
406
406
|
data: { label: 'Version Test' }
|
|
407
407
|
};
|
|
@@ -431,7 +431,7 @@ describe('ComponentTransformer', () => {
|
|
|
431
431
|
ComponentTransformer.registerComponent(AlternativeMockComponentClass);
|
|
432
432
|
|
|
433
433
|
const componentData = {
|
|
434
|
-
|
|
434
|
+
tagName: 'AlternativeComponent',
|
|
435
435
|
version: '2.1.0',
|
|
436
436
|
data: { label: 'Version Test', type: 'primary' }
|
|
437
437
|
};
|
|
@@ -459,12 +459,12 @@ describe('ComponentTransformer', () => {
|
|
|
459
459
|
const mixedArray = [
|
|
460
460
|
'Text node',
|
|
461
461
|
{
|
|
462
|
-
|
|
462
|
+
tagName: 'MockComponent',
|
|
463
463
|
version: '1.0.0',
|
|
464
464
|
data: { title: 'Registered Component' }
|
|
465
465
|
},
|
|
466
466
|
{
|
|
467
|
-
|
|
467
|
+
tagName: '__react_node__',
|
|
468
468
|
version: '1.0.0',
|
|
469
469
|
data: {
|
|
470
470
|
type: 'react-element',
|
|
@@ -486,7 +486,7 @@ describe('ComponentTransformer', () => {
|
|
|
486
486
|
|
|
487
487
|
it('should gracefully handle unknown registered components with fallback', () => {
|
|
488
488
|
const unknownComponent = {
|
|
489
|
-
|
|
489
|
+
tagName: 'NonExistentComponent',
|
|
490
490
|
version: '1.0.0',
|
|
491
491
|
data: { some: 'data' }
|
|
492
492
|
};
|
|
@@ -500,7 +500,7 @@ describe('ComponentTransformer', () => {
|
|
|
500
500
|
ComponentTransformer.registerComponent(MockSerializableComponentClass);
|
|
501
501
|
|
|
502
502
|
const componentData = {
|
|
503
|
-
|
|
503
|
+
tagName: 'MockComponent',
|
|
504
504
|
version: '1.0.0',
|
|
505
505
|
data: {
|
|
506
506
|
title: 'Test Title',
|
|
@@ -115,7 +115,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
115
115
|
describe('JSON Parsing and Serialization', () => {
|
|
116
116
|
it('should handle JSON parsing consistently across environments', () => {
|
|
117
117
|
const testData = {
|
|
118
|
-
|
|
118
|
+
tagName: 'CrossBrowserTest',
|
|
119
119
|
version: '1.0.0',
|
|
120
120
|
data: {
|
|
121
121
|
text: 'Hello World',
|
|
@@ -150,7 +150,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
150
150
|
|
|
151
151
|
edgeCases.forEach(({ name, value }) => {
|
|
152
152
|
const testData = {
|
|
153
|
-
|
|
153
|
+
tagName: 'CrossBrowserTest',
|
|
154
154
|
version: '1.0.0',
|
|
155
155
|
data: { [name.replace(/\s+/g, '_')]: value }
|
|
156
156
|
};
|
|
@@ -179,7 +179,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
179
179
|
|
|
180
180
|
numberTests.forEach(({ name, value }) => {
|
|
181
181
|
const testData = {
|
|
182
|
-
|
|
182
|
+
tagName: 'CrossBrowserTest',
|
|
183
183
|
version: '1.0.0',
|
|
184
184
|
data: { number: value }
|
|
185
185
|
};
|
|
@@ -220,7 +220,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
220
220
|
|
|
221
221
|
unicodeTests.forEach(({ name, text }) => {
|
|
222
222
|
const testData = {
|
|
223
|
-
|
|
223
|
+
tagName: 'CrossBrowserTest',
|
|
224
224
|
version: '1.0.0',
|
|
225
225
|
data: { unicode: text }
|
|
226
226
|
};
|
|
@@ -250,7 +250,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
250
250
|
|
|
251
251
|
specialCharTests.forEach(({ name, text }) => {
|
|
252
252
|
const testData = {
|
|
253
|
-
|
|
253
|
+
tagName: 'CrossBrowserTest',
|
|
254
254
|
version: '1.0.0',
|
|
255
255
|
data: { specialChars: text }
|
|
256
256
|
};
|
|
@@ -283,7 +283,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
283
283
|
|
|
284
284
|
dateTests.forEach(({ name, date }) => {
|
|
285
285
|
const testData = {
|
|
286
|
-
|
|
286
|
+
tagName: 'CrossBrowserTest',
|
|
287
287
|
version: '1.0.0',
|
|
288
288
|
data: { date }
|
|
289
289
|
};
|
|
@@ -345,7 +345,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
345
345
|
|
|
346
346
|
nestedTests.forEach(({ name, data }) => {
|
|
347
347
|
const testData = {
|
|
348
|
-
|
|
348
|
+
tagName: 'CrossBrowserTest',
|
|
349
349
|
version: '1.0.0',
|
|
350
350
|
data
|
|
351
351
|
};
|
|
@@ -364,7 +364,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
364
364
|
|
|
365
365
|
it('should handle object property order consistently', () => {
|
|
366
366
|
const testData = {
|
|
367
|
-
|
|
367
|
+
tagName: 'CrossBrowserTest',
|
|
368
368
|
version: '1.0.0',
|
|
369
369
|
data: {
|
|
370
370
|
z_property: 'last',
|
|
@@ -416,7 +416,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
416
416
|
|
|
417
417
|
it('should handle component errors consistently', () => {
|
|
418
418
|
const invalidComponent = {
|
|
419
|
-
|
|
419
|
+
tagName: 'NonExistentComponent',
|
|
420
420
|
version: '1.0.0',
|
|
421
421
|
data: {}
|
|
422
422
|
};
|
|
@@ -434,7 +434,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
434
434
|
describe('Performance Consistency', () => {
|
|
435
435
|
it('should maintain consistent performance across browsers', () => {
|
|
436
436
|
const largeTestData = {
|
|
437
|
-
|
|
437
|
+
tagName: 'CrossBrowserTest',
|
|
438
438
|
version: '1.0.0',
|
|
439
439
|
data: {
|
|
440
440
|
array: Array.from({ length: 1000 }, (_, i) => ({
|
|
@@ -479,7 +479,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
479
479
|
describe('Memory Usage Consistency', () => {
|
|
480
480
|
it('should handle memory usage consistently', () => {
|
|
481
481
|
const memoryTestData = Array.from({ length: 100 }, (_, i) => ({
|
|
482
|
-
|
|
482
|
+
tagName: 'CrossBrowserTest',
|
|
483
483
|
version: '1.0.0',
|
|
484
484
|
data: {
|
|
485
485
|
text: `Memory test item ${i}`,
|
|
@@ -526,7 +526,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
526
526
|
|
|
527
527
|
boundaryTests.forEach(({ name, value }) => {
|
|
528
528
|
const testData = {
|
|
529
|
-
|
|
529
|
+
tagName: 'CrossBrowserTest',
|
|
530
530
|
version: '1.0.0',
|
|
531
531
|
data: { number: value }
|
|
532
532
|
};
|
|
@@ -563,7 +563,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
563
563
|
lengthTests.forEach(({ name, length }) => {
|
|
564
564
|
const longString = 'x'.repeat(length);
|
|
565
565
|
const testData = {
|
|
566
|
-
|
|
566
|
+
tagName: 'CrossBrowserTest',
|
|
567
567
|
version: '1.0.0',
|
|
568
568
|
data: { text: longString }
|
|
569
569
|
};
|
|
@@ -68,7 +68,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
68
68
|
describe('Unknown Component Errors', () => {
|
|
69
69
|
it('should throw descriptive error for unregistered component', () => {
|
|
70
70
|
const unknownComponent = {
|
|
71
|
-
|
|
71
|
+
tagName: 'UnknownWidget',
|
|
72
72
|
version: '1.0.0',
|
|
73
73
|
data: { prop: 'value' }
|
|
74
74
|
};
|
|
@@ -80,7 +80,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
80
80
|
|
|
81
81
|
it('should throw error for component with special characters in tag name', () => {
|
|
82
82
|
const invalidTagComponent = {
|
|
83
|
-
|
|
83
|
+
tagName: 'Invalid<>Tag',
|
|
84
84
|
version: '1.0.0',
|
|
85
85
|
data: {}
|
|
86
86
|
};
|
|
@@ -92,7 +92,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
92
92
|
|
|
93
93
|
it('should throw error for component with numeric tag name', () => {
|
|
94
94
|
const numericTagComponent = {
|
|
95
|
-
|
|
95
|
+
tagName: '123Component',
|
|
96
96
|
version: '1.0.0',
|
|
97
97
|
data: {}
|
|
98
98
|
};
|
|
@@ -104,7 +104,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
104
104
|
|
|
105
105
|
it('should throw error for empty tag name', () => {
|
|
106
106
|
const emptyTagComponent = {
|
|
107
|
-
|
|
107
|
+
tagName: '',
|
|
108
108
|
version: '1.0.0',
|
|
109
109
|
data: {}
|
|
110
110
|
};
|
|
@@ -119,12 +119,12 @@ describe('Component Serialization Error Handling', () => {
|
|
|
119
119
|
|
|
120
120
|
const mixedComponents = [
|
|
121
121
|
{
|
|
122
|
-
|
|
122
|
+
tagName: 'ErrorTestButton',
|
|
123
123
|
version: '1.0.0',
|
|
124
124
|
data: { label: 'Valid Button' }
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
|
|
127
|
+
tagName: 'UnknownComponent',
|
|
128
128
|
version: '1.0.0',
|
|
129
129
|
data: {}
|
|
130
130
|
}
|
|
@@ -143,7 +143,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
143
143
|
|
|
144
144
|
it('should throw error when data property is missing', () => {
|
|
145
145
|
const missingDataComponent = {
|
|
146
|
-
|
|
146
|
+
tagName: 'ErrorTestButton',
|
|
147
147
|
version: '1.0.0'
|
|
148
148
|
// Missing data property
|
|
149
149
|
};
|
|
@@ -155,7 +155,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
155
155
|
|
|
156
156
|
it('should handle undefined data property', () => {
|
|
157
157
|
const undefinedDataComponent = {
|
|
158
|
-
|
|
158
|
+
tagName: 'ErrorTestButton',
|
|
159
159
|
version: '1.0.0',
|
|
160
160
|
data: undefined
|
|
161
161
|
};
|
|
@@ -167,7 +167,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
167
167
|
|
|
168
168
|
it('should handle null data property gracefully', () => {
|
|
169
169
|
const nullDataComponent = {
|
|
170
|
-
|
|
170
|
+
tagName: 'ErrorTestButton',
|
|
171
171
|
version: '1.0.0',
|
|
172
172
|
data: null
|
|
173
173
|
};
|
|
@@ -195,7 +195,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
195
195
|
|
|
196
196
|
it('should handle missing version property', () => {
|
|
197
197
|
const missingVersionComponent = {
|
|
198
|
-
|
|
198
|
+
tagName: 'ErrorTestButton',
|
|
199
199
|
data: { label: 'Test' }
|
|
200
200
|
// Missing version property
|
|
201
201
|
};
|
|
@@ -208,10 +208,10 @@ describe('Component Serialization Error Handling', () => {
|
|
|
208
208
|
|
|
209
209
|
it('should handle invalid version format', () => {
|
|
210
210
|
const invalidVersions = [
|
|
211
|
-
{
|
|
212
|
-
{
|
|
213
|
-
{
|
|
214
|
-
{
|
|
211
|
+
{ tagName: 'ErrorTestButton', version: 123, data: {} },
|
|
212
|
+
{ tagName: 'ErrorTestButton', version: null, data: {} },
|
|
213
|
+
{ tagName: 'ErrorTestButton', version: {}, data: {} },
|
|
214
|
+
{ tagName: 'ErrorTestButton', version: 'invalid.version.format.too.long', data: {} }
|
|
215
215
|
];
|
|
216
216
|
|
|
217
217
|
invalidVersions.forEach((component, index) => {
|
|
@@ -244,7 +244,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
244
244
|
|
|
245
245
|
it('should handle very large JSON input', () => {
|
|
246
246
|
const largeObject = {
|
|
247
|
-
|
|
247
|
+
tagName: 'ErrorTestButton',
|
|
248
248
|
version: '1.0.0',
|
|
249
249
|
data: {
|
|
250
250
|
largeText: 'x'.repeat(10000000) // 10MB string
|
|
@@ -258,7 +258,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
258
258
|
});
|
|
259
259
|
|
|
260
260
|
it('should handle deeply nested JSON structures', () => {
|
|
261
|
-
let deepObject: any = {
|
|
261
|
+
let deepObject: any = { tagName: 'ErrorTestButton', version: '1.0.0', data: {} };
|
|
262
262
|
|
|
263
263
|
// Create 1000 levels of nesting
|
|
264
264
|
for (let i = 0; i < 1000; i++) {
|
|
@@ -273,7 +273,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
273
273
|
|
|
274
274
|
it('should handle JSON with circular references (after JSON.stringify)', () => {
|
|
275
275
|
// Since JSON.stringify removes circular references, we test the behavior
|
|
276
|
-
const obj: any = {
|
|
276
|
+
const obj: any = { tagName: 'ErrorTestButton', version: '1.0.0', data: {} };
|
|
277
277
|
obj.circular = obj;
|
|
278
278
|
|
|
279
279
|
expect(() => {
|
|
@@ -288,7 +288,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
288
288
|
ComponentTransformer.registerComponent(ErrorTestButton as SerializableConstructor);
|
|
289
289
|
|
|
290
290
|
const componentThatWillThrow = {
|
|
291
|
-
|
|
291
|
+
tagName: 'ErrorTestButton',
|
|
292
292
|
version: '1.0.0',
|
|
293
293
|
data: { throwOnFromJson: true }
|
|
294
294
|
};
|
|
@@ -302,7 +302,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
302
302
|
ComponentTransformer.registerComponent(MalformedFromJsonComponent as SerializableConstructor);
|
|
303
303
|
|
|
304
304
|
const malformedComponent = {
|
|
305
|
-
|
|
305
|
+
tagName: 'MalformedFromJsonComponent',
|
|
306
306
|
version: '1.0.0',
|
|
307
307
|
data: {}
|
|
308
308
|
};
|
|
@@ -322,7 +322,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
322
322
|
}).not.toThrow(); // Registration succeeds, but usage will fail
|
|
323
323
|
|
|
324
324
|
const invalidComponent = {
|
|
325
|
-
|
|
325
|
+
tagName: 'InvalidClass',
|
|
326
326
|
version: '1.0.0',
|
|
327
327
|
data: {}
|
|
328
328
|
};
|
|
@@ -376,13 +376,13 @@ describe('Component Serialization Error Handling', () => {
|
|
|
376
376
|
const mixedArray = [
|
|
377
377
|
'string',
|
|
378
378
|
{
|
|
379
|
-
|
|
379
|
+
tagName: 'ErrorTestButton',
|
|
380
380
|
version: '1.0.0',
|
|
381
381
|
data: { label: 'Valid' }
|
|
382
382
|
},
|
|
383
383
|
42,
|
|
384
384
|
{
|
|
385
|
-
|
|
385
|
+
tagName: 'UnknownComponent',
|
|
386
386
|
version: '1.0.0',
|
|
387
387
|
data: {}
|
|
388
388
|
},
|
|
@@ -396,10 +396,10 @@ describe('Component Serialization Error Handling', () => {
|
|
|
396
396
|
|
|
397
397
|
it('should handle object with component-like structure but missing required fields', () => {
|
|
398
398
|
const fakeComponentData = [
|
|
399
|
-
{
|
|
399
|
+
{ tagName: 'ErrorTestButton' }, // Missing version and data
|
|
400
400
|
{ version: '1.0.0', data: {} }, // Missing tag
|
|
401
|
-
{
|
|
402
|
-
{
|
|
401
|
+
{ tagName: null, version: '1.0.0', data: {} }, // Null tag
|
|
402
|
+
{ tagName: 123, version: '1.0.0', data: {} }, // Non-string tag
|
|
403
403
|
];
|
|
404
404
|
|
|
405
405
|
fakeComponentData.forEach((fake, index) => {
|
|
@@ -418,17 +418,17 @@ describe('Component Serialization Error Handling', () => {
|
|
|
418
418
|
|
|
419
419
|
it('should propagate errors from deeply nested components', () => {
|
|
420
420
|
const deeplyNested = {
|
|
421
|
-
|
|
421
|
+
tagName: 'ErrorTestButton',
|
|
422
422
|
version: '1.0.0',
|
|
423
423
|
data: {
|
|
424
424
|
children: [
|
|
425
425
|
{
|
|
426
|
-
|
|
426
|
+
tagName: 'ErrorTestButton',
|
|
427
427
|
version: '1.0.0',
|
|
428
428
|
data: {
|
|
429
429
|
children: [
|
|
430
430
|
{
|
|
431
|
-
|
|
431
|
+
tagName: 'UnknownDeepComponent',
|
|
432
432
|
version: '1.0.0',
|
|
433
433
|
data: {}
|
|
434
434
|
}
|
|
@@ -447,17 +447,17 @@ describe('Component Serialization Error Handling', () => {
|
|
|
447
447
|
it('should handle partial failures in component arrays gracefully', () => {
|
|
448
448
|
const componentsWithError = [
|
|
449
449
|
{
|
|
450
|
-
|
|
450
|
+
tagName: 'ErrorTestButton',
|
|
451
451
|
version: '1.0.0',
|
|
452
452
|
data: { label: 'Button 1' }
|
|
453
453
|
},
|
|
454
454
|
{
|
|
455
|
-
|
|
455
|
+
tagName: 'ErrorTestButton',
|
|
456
456
|
version: '1.0.0',
|
|
457
457
|
data: { label: 'Button 2' }
|
|
458
458
|
},
|
|
459
459
|
{
|
|
460
|
-
|
|
460
|
+
tagName: 'UnknownComponent',
|
|
461
461
|
version: '1.0.0',
|
|
462
462
|
data: {}
|
|
463
463
|
}
|
|
@@ -473,11 +473,11 @@ describe('Component Serialization Error Handling', () => {
|
|
|
473
473
|
it('should provide helpful error messages for common mistakes', () => {
|
|
474
474
|
const commonMistakes = [
|
|
475
475
|
{
|
|
476
|
-
data: {
|
|
476
|
+
data: { tagName: 'Button', version: '1.0.0', data: {} },
|
|
477
477
|
expectedError: /Unknown component: Button/
|
|
478
478
|
},
|
|
479
479
|
{
|
|
480
|
-
data: {
|
|
480
|
+
data: { tagName: 'ErrorTestButton', version: '1.0.0' },
|
|
481
481
|
expectedError: /missing 'data' property/
|
|
482
482
|
},
|
|
483
483
|
{
|
|
@@ -514,7 +514,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
514
514
|
contextualErrors.forEach(({ component, expectedInError }) => {
|
|
515
515
|
expect(() => {
|
|
516
516
|
ComponentTransformer.deserialize({
|
|
517
|
-
|
|
517
|
+
tagName: component,
|
|
518
518
|
version: '1.0.0',
|
|
519
519
|
data: {}
|
|
520
520
|
});
|
|
@@ -534,7 +534,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
534
534
|
|
|
535
535
|
expect(() => {
|
|
536
536
|
ComponentTransformer.deserialize({
|
|
537
|
-
|
|
537
|
+
tagName: 'ErrorTestButton',
|
|
538
538
|
version: '1.0.0',
|
|
539
539
|
data: { label: 'Test' }
|
|
540
540
|
});
|
|
@@ -544,7 +544,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
544
544
|
ComponentTransformer.registerComponent(ErrorTestButton as SerializableConstructor);
|
|
545
545
|
expect(() => {
|
|
546
546
|
const result = ComponentTransformer.deserialize({
|
|
547
|
-
|
|
547
|
+
tagName: 'ErrorTestButton',
|
|
548
548
|
version: '1.0.0',
|
|
549
549
|
data: { label: 'Recovery Test' }
|
|
550
550
|
});
|
|
@@ -560,7 +560,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
560
560
|
// Cause an error
|
|
561
561
|
expect(() => {
|
|
562
562
|
ComponentTransformer.deserialize({
|
|
563
|
-
|
|
563
|
+
tagName: 'UnknownComponent',
|
|
564
564
|
version: '1.0.0',
|
|
565
565
|
data: {}
|
|
566
566
|
});
|
|
@@ -575,7 +575,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
575
575
|
it('should handle memory pressure during error conditions', () => {
|
|
576
576
|
// Create memory pressure with large failing operations
|
|
577
577
|
const largeFailingOperations = Array.from({ length: 100 }, (_, i) => ({
|
|
578
|
-
|
|
578
|
+
tagName: `UnknownComponent${i}`,
|
|
579
579
|
version: '1.0.0',
|
|
580
580
|
data: {
|
|
581
581
|
largeData: 'x'.repeat(1000)
|
|
@@ -591,7 +591,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
591
591
|
// System should still be responsive
|
|
592
592
|
expect(() => {
|
|
593
593
|
const result = ComponentTransformer.deserialize({
|
|
594
|
-
|
|
594
|
+
tagName: 'ErrorTestButton',
|
|
595
595
|
version: '1.0.0',
|
|
596
596
|
data: { label: 'After Memory Pressure' }
|
|
597
597
|
});
|