@qwickapps/react-framework 1.4.9 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +9 -9
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -1
- package/dist/components/AccessibilityProvider.d.ts +1 -1
- package/dist/components/AccessibilityProvider.d.ts.map +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/Html.d.ts +8 -8
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Logo.d.ts +2 -2
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +5 -5
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/ProductLogo.d.ts +60 -0
- package/dist/components/ProductLogo.d.ts.map +1 -0
- package/dist/components/QwickAppsLogo.d.ts +1 -1
- package/dist/components/QwickAppsLogo.d.ts.map +1 -1
- package/dist/components/ResponsiveMenu.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +4 -4
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/Scaffold.d.ts.map +1 -1
- package/dist/components/base/Container.d.ts +3 -2
- package/dist/components/base/Container.d.ts.map +1 -1
- package/dist/components/base/ModelView.d.ts +16 -16
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +1 -1
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +4 -18
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/CardListGrid.d.ts +3 -3
- package/dist/components/blocks/CardListGrid.d.ts.map +1 -1
- package/dist/components/blocks/Code.d.ts +5 -31
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/Content.d.ts +2 -17
- package/dist/components/blocks/Content.d.ts.map +1 -1
- package/dist/components/blocks/CoverImageHeader.d.ts +2 -12
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
- package/dist/components/blocks/FeatureCard.d.ts +0 -17
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
- package/dist/components/blocks/Footer.d.ts +2 -14
- package/dist/components/blocks/Footer.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +35 -26
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +23 -23
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/PageBannerHeader.d.ts +2 -13
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.d.ts +0 -9
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +16 -24
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +5 -20
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +19 -23
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/buttons/PaletteSwitcher.d.ts +2 -2
- package/dist/components/buttons/PaletteSwitcher.d.ts.map +1 -1
- package/dist/components/buttons/ThemeSwitcher.d.ts +2 -2
- package/dist/components/buttons/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/dialogs/Dialog.d.ts +35 -0
- package/dist/components/dialogs/Dialog.d.ts.map +1 -0
- package/dist/components/dialogs/index.d.ts +8 -0
- package/dist/components/dialogs/index.d.ts.map +1 -0
- package/dist/components/forms/Captcha.d.ts +55 -0
- package/dist/components/forms/Captcha.d.ts.map +1 -0
- package/dist/components/forms/FormBlock.d.ts +6 -6
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/forms/FormCheckbox.d.ts +27 -0
- package/dist/components/forms/FormCheckbox.d.ts.map +1 -0
- package/dist/components/forms/FormField.d.ts +43 -0
- package/dist/components/forms/FormField.d.ts.map +1 -0
- package/dist/components/forms/FormSelect.d.ts +35 -0
- package/dist/components/forms/FormSelect.d.ts.map +1 -0
- package/dist/components/forms/index.d.ts +8 -0
- package/dist/components/forms/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +10 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +13 -19
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +16 -17
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +14 -17
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/input/SwitchInputField.d.ts +11 -18
- package/dist/components/input/SwitchInputField.d.ts.map +1 -1
- package/dist/components/input/TextInputField.d.ts +16 -19
- package/dist/components/input/TextInputField.d.ts.map +1 -1
- package/dist/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -1
- package/dist/components/layout/GridCell.d.ts +18 -19
- package/dist/components/layout/GridCell.d.ts.map +1 -1
- package/dist/components/layout/GridLayout.d.ts +36 -25
- package/dist/components/layout/GridLayout.d.ts.map +1 -1
- package/dist/components/menu/MenuItem.d.ts +2 -2
- package/dist/components/menu/MenuItem.d.ts.map +1 -1
- package/dist/components/pages/FormPage.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +1 -1
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/shared/createSerializableView.d.ts +22 -10
- package/dist/components/shared/createSerializableView.d.ts.map +1 -1
- package/dist/components/shared/viewProps.d.ts +3 -3
- package/dist/components/shared/viewProps.d.ts.map +1 -1
- package/dist/config/AppConfig.d.ts +2 -2
- package/dist/config/AppConfig.d.ts.map +1 -1
- package/dist/config/types.d.ts +1 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/contexts/DataContext.d.ts +3 -3
- package/dist/contexts/DataContext.d.ts.map +1 -1
- package/dist/contexts/PaletteContext.d.ts.map +1 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/hooks/useDataBinding.d.ts +2 -2
- package/dist/hooks/useDataBinding.d.ts.map +1 -1
- package/dist/hooks/usePrintMode.d.ts +2 -2
- package/dist/hooks/usePrintMode.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +4143 -2318
- package/dist/index.js +4169 -2315
- package/dist/palettes/manifest.json +90 -0
- package/dist/palettes/palette-autumn.1.4.9.min.css +1 -0
- package/dist/palettes/palette-autumn.1.5.0.css +172 -0
- package/dist/palettes/palette-autumn.1.5.0.min.css +1 -0
- package/dist/palettes/palette-autumn.1.5.1.css +172 -0
- package/dist/palettes/palette-autumn.1.5.1.min.css +1 -0
- package/dist/palettes/palette-autumn.latest.css +172 -0
- package/dist/palettes/palette-autumn.latest.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.4.9.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.5.0.css +172 -0
- package/dist/palettes/palette-cosmic.1.5.0.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.5.1.css +172 -0
- package/dist/palettes/palette-cosmic.1.5.1.min.css +1 -0
- package/dist/palettes/palette-cosmic.latest.css +172 -0
- package/dist/palettes/palette-cosmic.latest.min.css +1 -0
- package/dist/palettes/palette-default.1.4.9.min.css +1 -0
- package/dist/palettes/palette-default.1.5.0.css +178 -0
- package/dist/palettes/palette-default.1.5.0.min.css +1 -0
- package/dist/palettes/palette-default.1.5.1.css +178 -0
- package/dist/palettes/palette-default.1.5.1.min.css +1 -0
- package/dist/palettes/palette-default.latest.css +178 -0
- package/dist/palettes/palette-default.latest.min.css +1 -0
- package/dist/palettes/palette-ocean.1.4.9.min.css +1 -0
- package/dist/palettes/palette-ocean.1.5.0.css +172 -0
- package/dist/palettes/palette-ocean.1.5.0.min.css +1 -0
- package/dist/palettes/palette-ocean.1.5.1.css +172 -0
- package/dist/palettes/palette-ocean.1.5.1.min.css +1 -0
- package/dist/palettes/palette-ocean.latest.css +172 -0
- package/dist/palettes/palette-ocean.latest.min.css +1 -0
- package/dist/palettes/palette-spring.1.4.9.min.css +1 -0
- package/dist/palettes/palette-spring.1.5.0.css +160 -0
- package/dist/palettes/palette-spring.1.5.0.min.css +1 -0
- package/dist/palettes/palette-spring.1.5.1.css +160 -0
- package/dist/palettes/palette-spring.1.5.1.min.css +1 -0
- package/dist/palettes/palette-spring.latest.css +160 -0
- package/dist/palettes/palette-spring.latest.min.css +1 -0
- package/dist/palettes/palette-winter.1.4.9.min.css +1 -0
- package/dist/palettes/palette-winter.1.5.0.css +172 -0
- package/dist/palettes/palette-winter.1.5.0.min.css +1 -0
- package/dist/palettes/palette-winter.1.5.1.css +172 -0
- package/dist/palettes/palette-winter.1.5.1.min.css +1 -0
- package/dist/palettes/palette-winter.latest.css +172 -0
- package/dist/palettes/palette-winter.latest.min.css +1 -0
- package/dist/schemas/ButtonSchema.d.ts +5 -2
- package/dist/schemas/ButtonSchema.d.ts.map +1 -1
- package/dist/schemas/CardListGridSchema.d.ts +4 -4
- package/dist/schemas/CardListGridSchema.d.ts.map +1 -1
- package/dist/schemas/ChoiceInputFieldSchema.d.ts +2 -2
- package/dist/schemas/ChoiceInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/CodeSchema.d.ts +1 -2
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/FormBlockSchema.d.ts +2 -2
- package/dist/schemas/FormBlockSchema.d.ts.map +1 -1
- package/dist/schemas/GridCellSchema.d.ts +2 -4
- package/dist/schemas/GridCellSchema.d.ts.map +1 -1
- package/dist/schemas/GridLayoutSchema.d.ts +3 -5
- package/dist/schemas/GridLayoutSchema.d.ts.map +1 -1
- package/dist/schemas/HeroBlockSchema.d.ts +2 -2
- package/dist/schemas/HeroBlockSchema.d.ts.map +1 -1
- package/dist/schemas/HtmlInputFieldSchema.d.ts +2 -2
- package/dist/schemas/HtmlInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/ImageSchema.d.ts +2 -2
- package/dist/schemas/ImageSchema.d.ts.map +1 -1
- package/dist/schemas/SectionSchema.d.ts +2 -4
- package/dist/schemas/SectionSchema.d.ts.map +1 -1
- package/dist/schemas/SelectInputFieldSchema.d.ts +2 -2
- package/dist/schemas/SelectInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/SwitchInputFieldSchema.d.ts +2 -2
- package/dist/schemas/SwitchInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/TextInputFieldSchema.d.ts +2 -2
- package/dist/schemas/TextInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/ViewSchema.d.ts +8 -7
- package/dist/schemas/ViewSchema.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +2 -2
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts +2 -2
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/registry.d.ts +0 -7
- package/dist/schemas/transformers/registry.d.ts.map +1 -1
- package/dist/schemas/types/Serializable.d.ts +3 -3
- package/dist/schemas/types/Serializable.d.ts.map +1 -1
- package/dist/stories/_templates/SerializationTemplate.d.ts.map +1 -0
- package/dist/types/CollapsibleLayout.d.ts +3 -3
- package/dist/types/CollapsibleLayout.d.ts.map +1 -1
- package/dist/types/ContentProxy.d.ts +4 -4
- package/dist/types/ContentProxy.d.ts.map +1 -1
- package/dist/types/DataTypes.d.ts +4 -4
- package/dist/types/DataTypes.d.ts.map +1 -1
- package/dist/types/TemplateProvider.d.ts +1 -1
- package/dist/types/TemplateProvider.d.ts.map +1 -1
- package/dist/types/TemplateResolver.d.ts +1 -1
- package/dist/types/TemplateResolver.d.ts.map +1 -1
- package/dist/utils/htmlTransform.d.ts +1 -1
- package/dist/utils/htmlTransform.d.ts.map +1 -1
- package/dist/utils/iconMap.d.ts +48 -0
- package/dist/utils/iconMap.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +11 -7
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/paletteLoader.d.ts +34 -0
- package/dist/utils/paletteLoader.d.ts.map +1 -0
- package/dist/utils/paletteManifest.d.ts +51 -0
- package/dist/utils/paletteManifest.d.ts.map +1 -0
- package/dist/utils/paletteUtils.d.ts.map +1 -1
- package/dist/utils/reactUtils.d.ts +12 -6
- package/dist/utils/reactUtils.d.ts.map +1 -1
- package/dist/utils/spacing.d.ts +2 -2
- package/dist/utils/spacing.d.ts.map +1 -1
- package/dist/utils/themePerformanceMonitor.d.ts.map +1 -1
- package/dist/utils/themeUtils.d.ts.map +1 -1
- package/package.json +20 -9
- package/scripts/build-palettes.cjs +120 -0
- package/src/__tests__/components/Article.test.tsx +1 -1
- package/src/__tests__/components/Breadcrumbs.test.tsx +2 -2
- package/src/__tests__/components/Button.test.tsx +3 -3
- package/src/__tests__/components/CardListGrid.test.tsx +5 -5
- package/src/__tests__/components/ChoiceInputField.test.tsx +2 -2
- package/src/__tests__/components/Code.test.tsx +2 -2
- package/src/__tests__/components/Content.integration.test.tsx +1 -1
- package/src/__tests__/components/Content.test.tsx +5 -5
- package/src/__tests__/components/CoverImageHeader.test.tsx +3 -3
- package/src/__tests__/components/FeatureCard.integration.test.tsx +1 -1
- package/src/__tests__/components/FeatureGrid.integration.test.tsx +1 -1
- package/src/__tests__/components/FeatureGrid.test.tsx +3 -3
- package/src/__tests__/components/Footer.test.tsx +3 -3
- package/src/__tests__/components/FormBlock.test.tsx +2 -2
- package/src/__tests__/components/HeroBlock.integration.test.tsx +1 -1
- package/src/__tests__/components/HeroBlock.test.tsx +4 -4
- package/src/__tests__/components/HtmlInputField.test.tsx +8 -8
- package/src/__tests__/components/PageBannerHeader.test.tsx +7 -7
- package/src/__tests__/components/PaletteSwitcher.test.tsx +3 -3
- package/src/__tests__/components/ProductCard.test.tsx +1 -1
- package/src/__tests__/components/Section.integration.test.tsx +1 -1
- package/src/__tests__/components/Section.test.tsx +1 -1
- package/src/__tests__/components/SelectInputField.test.tsx +2 -2
- package/src/__tests__/components/TextInputField.test.tsx +4 -4
- package/src/__tests__/components/ThemeSwitcher.test.tsx +3 -3
- package/src/__tests__/components/base/Container.test.tsx +22 -21
- package/src/__tests__/components/blocks/Code.performance.test.tsx +10 -10
- package/src/__tests__/components/blocks/Code.serialization.test.tsx +9 -9
- package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +2 -3
- package/src/__tests__/components/blocks/Image.serialization.test.tsx +8 -7
- package/src/__tests__/components/blocks/Section.serialization.test.tsx +8 -8
- package/src/__tests__/components/blocks/Text.performance.test.tsx +5 -5
- package/src/__tests__/components/blocks/Text.serialization.test.tsx +9 -9
- package/src/__tests__/components/buttons/Button.serialization.test.tsx +4 -4
- package/src/__tests__/components/input/FormComponents.serialization.test.tsx +9 -9
- package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +16 -18
- package/src/__tests__/components/input/TextInputField.serialization.test.tsx +9 -9
- package/src/__tests__/components/layout/CollapsibleLayout.test.tsx +5 -9
- package/src/__tests__/components/layout/GridCell.serialization.test.tsx +5 -5
- package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +5 -5
- package/src/__tests__/hooks/usePrintMode.test.ts +1 -0
- package/src/__tests__/schemas/builders.test.ts +2 -2
- package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +28 -28
- package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +5 -5
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +11 -11
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +10 -10
- package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +15 -15
- package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +19 -19
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +15 -15
- package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +19 -21
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +15 -15
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +3 -3
- package/src/__tests__/schemas/transformers/nested-serialization.test.tsx +1 -1
- package/src/__tests__/schemas/transformers/round-trip-component-serialization.test.tsx +10 -10
- package/src/__tests__/utils/optional-logging.test.ts +3 -3
- package/src/components/AccessibilityProvider.tsx +4 -2
- package/src/components/ErrorBoundary.tsx +1 -1
- package/src/components/Html.tsx +13 -16
- package/src/components/Logo.tsx +42 -29
- package/src/components/Markdown.tsx +9 -9
- package/src/components/ProductLogo.tsx +118 -0
- package/src/components/QwickApp.css +37 -1060
- package/src/components/QwickApp.tsx +1 -1
- package/src/components/QwickAppsLogo.tsx +1 -1
- package/src/components/ResponsiveMenu.tsx +1 -1
- package/src/components/SafeSpan.tsx +8 -8
- package/src/components/Scaffold.css +11 -1
- package/src/components/Scaffold.tsx +55 -25
- package/src/components/base/Container.tsx +2 -2
- package/src/components/base/ModelView.tsx +28 -27
- package/src/components/base/index.ts +1 -1
- package/src/components/blocks/Article.tsx +213 -69
- package/src/components/blocks/CardListGrid.tsx +18 -14
- package/src/components/blocks/Code.tsx +18 -13
- package/src/components/blocks/Content.tsx +15 -10
- package/src/components/blocks/CoverImageHeader.tsx +14 -9
- package/src/components/blocks/FeatureCard.tsx +16 -11
- package/src/components/blocks/FeatureGrid.tsx +13 -8
- package/src/components/blocks/Footer.tsx +25 -16
- package/src/components/blocks/HeroBlock.tsx +12 -13
- package/src/components/blocks/Image.tsx +16 -8
- package/src/components/blocks/PageBannerHeader.tsx +15 -11
- package/src/components/blocks/ProductCard.tsx +32 -25
- package/src/components/blocks/Section.tsx +21 -13
- package/src/components/blocks/Text.tsx +26 -11
- package/src/components/buttons/Button.tsx +22 -118
- package/src/components/buttons/PaletteSwitcher.tsx +11 -8
- package/src/components/buttons/ThemeSwitcher.tsx +20 -16
- package/src/components/dialogs/Dialog.tsx +126 -0
- package/src/components/dialogs/index.ts +15 -0
- package/src/components/forms/Captcha.tsx +291 -0
- package/src/components/forms/FormBlock.tsx +22 -15
- package/src/components/forms/FormCheckbox.tsx +116 -0
- package/src/components/forms/FormField.tsx +180 -0
- package/src/components/forms/FormSelect.tsx +140 -0
- package/src/components/forms/index.ts +13 -1
- package/src/components/index.ts +13 -2
- package/src/components/input/ChoiceInputField.tsx +1 -2
- package/src/components/input/HtmlInputField.tsx +2 -3
- package/src/components/input/SelectInputField.tsx +31 -5
- package/src/components/input/SwitchInputField.tsx +3 -4
- package/src/components/input/TextField.tsx +2 -2
- package/src/components/input/TextInputField.tsx +32 -6
- package/src/components/layout/CollapsibleLayout/CollapsibleLayout.tsx +13 -13
- package/src/components/layout/GridCell.tsx +10 -9
- package/src/components/layout/GridCellWrapper.tsx +1 -1
- package/src/components/layout/GridLayout.tsx +29 -32
- package/src/components/pages/FormPage.tsx +0 -1
- package/src/components/pages/Page.tsx +2 -2
- package/src/components/shared/createSerializableView.tsx +24 -23
- package/src/components/shared/viewProps.ts +11 -11
- package/src/config/AppConfig.ts +2 -2
- package/src/config/__tests__/AppConfig.test.ts +3 -3
- package/src/config/__tests__/AppConfigBuilder.test.ts +10 -11
- package/src/config/types.ts +1 -1
- package/src/contexts/DataContext.tsx +58 -52
- package/src/contexts/PaletteContext.tsx +22 -9
- package/src/contexts/PrintModeContext.tsx +4 -4
- package/src/contexts/ThemeContext.tsx +2 -1
- package/src/hooks/useBaseProps.ts +10 -10
- package/src/hooks/useDataBinding.ts +15 -18
- package/src/hooks/usePrintMode.ts +3 -3
- package/src/index.ts +2 -0
- package/src/palettes/manifest.json +72 -0
- package/src/palettes/manifest.schema.json +74 -0
- package/src/schemas/CardListGridSchema.ts +3 -3
- package/src/schemas/CodeSchema.ts +0 -1
- package/src/schemas/FeatureGridSchema.ts +1 -1
- package/src/schemas/FormBlockSchema.ts +1 -1
- package/src/schemas/GridCellSchema.ts +0 -1
- package/src/schemas/GridLayoutSchema.ts +0 -1
- package/src/schemas/SectionSchema.ts +0 -1
- package/src/schemas/ViewSchema.ts +6 -6
- package/src/schemas/transformers/ComponentTransformer.ts +37 -20
- package/src/schemas/transformers/ReactNodeTransformer.ts +18 -16
- package/src/schemas/transformers/registry.ts +28 -24
- package/src/schemas/types/Serializable.ts +3 -3
- package/src/setupTests.js +9 -0
- package/src/stories/AccessibilityProvider.stories.tsx +0 -1
- package/src/stories/CardListGrid.stories.tsx +1 -1
- package/src/stories/Code.stories.tsx +2 -3
- package/src/stories/CollapsibleLayout.stories.tsx +41 -37
- package/src/stories/Container.stories.tsx +1 -2
- package/src/stories/DataBinding.advanced.stories.tsx +15 -9
- package/src/stories/DataProvider.stories.tsx +33 -16
- package/src/stories/ErrorBoundary.stories.tsx +28 -26
- package/src/stories/FeatureGrid.stories.tsx +0 -1
- package/src/stories/FormBlock.stories.tsx +8 -8
- package/src/stories/FormComponents.stories.tsx +15 -11
- package/src/stories/GridCell.stories.tsx +5 -5
- package/src/stories/GridLayout.stories.tsx +5 -5
- package/src/stories/Image.stories.tsx +5 -7
- package/src/stories/Introduction.stories.tsx +0 -1
- package/src/stories/ModelView.stories.tsx +7 -7
- package/src/stories/SafeSpan.stories.tsx +7 -3
- package/src/stories/Section.stories.tsx +2 -2
- package/src/stories/Text.stories.tsx +1 -3
- package/src/stories/_templates/SerializationTemplate.tsx +0 -1
- package/src/templates/TemplateResolver.ts +2 -2
- package/src/types/CollapsibleLayout.ts +2 -2
- package/src/types/ContentProxy.ts +6 -6
- package/src/types/DataTypes.ts +4 -4
- package/src/types/TemplateProvider.ts +1 -1
- package/src/types/TemplateResolver.ts +1 -1
- package/src/utils/htmlTransform.tsx +17 -11
- package/src/utils/iconMap.tsx +244 -0
- package/src/utils/index.ts +4 -1
- package/src/utils/logger.ts +20 -14
- package/src/utils/paletteLoader.ts +218 -0
- package/src/utils/paletteManifest.ts +268 -0
- package/src/utils/paletteUtils.ts +19 -1
- package/src/utils/reactUtils.tsx +34 -33
- package/src/utils/spacing.ts +16 -17
- package/src/utils/themePerformanceMonitor.js +14 -6
- package/src/utils/themeUtils.ts +17 -2
- package/dist/components/base/ContainerView.d.ts +0 -65
- package/dist/components/base/ContainerView.d.ts.map +0 -1
- package/dist/components/blocks/Code-factory.d.ts +0 -22
- package/dist/components/blocks/Code-factory.d.ts.map +0 -1
- package/dist/components/blocks/Code-old.d.ts +0 -31
- package/dist/components/blocks/Code-old.d.ts.map +0 -1
- package/dist/qa/ConsoleWarningTest.d.ts +0 -5
- package/dist/qa/ConsoleWarningTest.d.ts.map +0 -1
- package/dist/qa/StorageKeyTest.d.ts +0 -6
- package/dist/qa/StorageKeyTest.d.ts.map +0 -1
- package/dist/qa/ThemeStorageKeyTest.d.ts +0 -6
- package/dist/qa/ThemeStorageKeyTest.d.ts.map +0 -1
- package/dist/schemas/ViewModelSchema.d.ts +0 -63
- package/dist/schemas/ViewModelSchema.d.ts.map +0 -1
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +0 -66
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +0 -1
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts +0 -66
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +0 -1
- package/dist/src/components/AccessibilityChecker.d.ts +0 -12
- package/dist/src/components/AccessibilityChecker.d.ts.map +0 -1
- package/dist/src/components/AccessibilityProvider.d.ts +0 -64
- package/dist/src/components/AccessibilityProvider.d.ts.map +0 -1
- package/dist/src/components/Breadcrumbs.d.ts +0 -39
- package/dist/src/components/Breadcrumbs.d.ts.map +0 -1
- package/dist/src/components/ErrorBoundary.d.ts +0 -46
- package/dist/src/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/src/components/Html.d.ts +0 -58
- package/dist/src/components/Html.d.ts.map +0 -1
- package/dist/src/components/Logo.d.ts +0 -56
- package/dist/src/components/Logo.d.ts.map +0 -1
- package/dist/src/components/Markdown.d.ts +0 -51
- package/dist/src/components/Markdown.d.ts.map +0 -1
- package/dist/src/components/QwickApp.d.ts +0 -69
- package/dist/src/components/QwickApp.d.ts.map +0 -1
- package/dist/src/components/QwickAppsLogo.d.ts +0 -25
- package/dist/src/components/QwickAppsLogo.d.ts.map +0 -1
- package/dist/src/components/QwickIcon.d.ts +0 -23
- package/dist/src/components/QwickIcon.d.ts.map +0 -1
- package/dist/src/components/ResponsiveMenu.d.ts +0 -38
- package/dist/src/components/ResponsiveMenu.d.ts.map +0 -1
- package/dist/src/components/SafeSpan.d.ts +0 -29
- package/dist/src/components/SafeSpan.d.ts.map +0 -1
- package/dist/src/components/Scaffold.d.ts +0 -57
- package/dist/src/components/Scaffold.d.ts.map +0 -1
- package/dist/src/components/base/Container.d.ts +0 -33
- package/dist/src/components/base/Container.d.ts.map +0 -1
- package/dist/src/components/base/ModelView.d.ts +0 -92
- package/dist/src/components/base/ModelView.d.ts.map +0 -1
- package/dist/src/components/base/index.d.ts +0 -12
- package/dist/src/components/base/index.d.ts.map +0 -1
- package/dist/src/components/blocks/Article.d.ts +0 -32
- package/dist/src/components/blocks/Article.d.ts.map +0 -1
- package/dist/src/components/blocks/CardListGrid.d.ts +0 -23
- package/dist/src/components/blocks/CardListGrid.d.ts.map +0 -1
- package/dist/src/components/blocks/Code.d.ts +0 -37
- package/dist/src/components/blocks/Code.d.ts.map +0 -1
- package/dist/src/components/blocks/Content.d.ts +0 -24
- package/dist/src/components/blocks/Content.d.ts.map +0 -1
- package/dist/src/components/blocks/CoverImageHeader.d.ts +0 -44
- package/dist/src/components/blocks/CoverImageHeader.d.ts.map +0 -1
- package/dist/src/components/blocks/FeatureCard.d.ts +0 -66
- package/dist/src/components/blocks/FeatureCard.d.ts.map +0 -1
- package/dist/src/components/blocks/FeatureGrid.d.ts +0 -48
- package/dist/src/components/blocks/FeatureGrid.d.ts.map +0 -1
- package/dist/src/components/blocks/Footer.d.ts +0 -56
- package/dist/src/components/blocks/Footer.d.ts.map +0 -1
- package/dist/src/components/blocks/HeroBlock.d.ts +0 -55
- package/dist/src/components/blocks/HeroBlock.d.ts.map +0 -1
- package/dist/src/components/blocks/Image.d.ts +0 -40
- package/dist/src/components/blocks/Image.d.ts.map +0 -1
- package/dist/src/components/blocks/PageBannerHeader.d.ts +0 -30
- package/dist/src/components/blocks/PageBannerHeader.d.ts.map +0 -1
- package/dist/src/components/blocks/ProductCard.d.ts +0 -57
- package/dist/src/components/blocks/ProductCard.d.ts.map +0 -1
- package/dist/src/components/blocks/Section.d.ts +0 -45
- package/dist/src/components/blocks/Section.d.ts.map +0 -1
- package/dist/src/components/blocks/Text.d.ts +0 -34
- package/dist/src/components/blocks/Text.d.ts.map +0 -1
- package/dist/src/components/blocks/index.d.ts +0 -41
- package/dist/src/components/blocks/index.d.ts.map +0 -1
- package/dist/src/components/buttons/Button.d.ts +0 -57
- package/dist/src/components/buttons/Button.d.ts.map +0 -1
- package/dist/src/components/buttons/PaletteSwitcher.d.ts +0 -24
- package/dist/src/components/buttons/PaletteSwitcher.d.ts.map +0 -1
- package/dist/src/components/buttons/ThemeSwitcher.d.ts +0 -24
- package/dist/src/components/buttons/ThemeSwitcher.d.ts.map +0 -1
- package/dist/src/components/buttons/index.d.ts +0 -11
- package/dist/src/components/buttons/index.d.ts.map +0 -1
- package/dist/src/components/forms/FormBlock.d.ts +0 -51
- package/dist/src/components/forms/FormBlock.d.ts.map +0 -1
- package/dist/src/components/forms/index.d.ts +0 -8
- package/dist/src/components/forms/index.d.ts.map +0 -1
- package/dist/src/components/index.d.ts +0 -41
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/input/ChoiceInputField.d.ts +0 -29
- package/dist/src/components/input/ChoiceInputField.d.ts.map +0 -1
- package/dist/src/components/input/HtmlInputField.d.ts +0 -33
- package/dist/src/components/input/HtmlInputField.d.ts.map +0 -1
- package/dist/src/components/input/SelectInputField.d.ts +0 -31
- package/dist/src/components/input/SelectInputField.d.ts.map +0 -1
- package/dist/src/components/input/SwitchInputField.d.ts +0 -27
- package/dist/src/components/input/SwitchInputField.d.ts.map +0 -1
- package/dist/src/components/input/TextField.d.ts +0 -18
- package/dist/src/components/input/TextField.d.ts.map +0 -1
- package/dist/src/components/input/TextInputField.d.ts +0 -34
- package/dist/src/components/input/TextInputField.d.ts.map +0 -1
- package/dist/src/components/input/index.d.ts +0 -19
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +0 -34
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +0 -1
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts +0 -9
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts.map +0 -1
- package/dist/src/components/layout/GridCell.d.ts +0 -32
- package/dist/src/components/layout/GridCell.d.ts.map +0 -1
- package/dist/src/components/layout/GridCellWrapper.d.ts +0 -46
- package/dist/src/components/layout/GridCellWrapper.d.ts.map +0 -1
- package/dist/src/components/layout/GridLayout.d.ts +0 -50
- package/dist/src/components/layout/GridLayout.d.ts.map +0 -1
- package/dist/src/components/layout/index.d.ts +0 -14
- package/dist/src/components/layout/index.d.ts.map +0 -1
- package/dist/src/components/menu/Menu.d.ts +0 -1
- package/dist/src/components/menu/Menu.d.ts.map +0 -1
- package/dist/src/components/menu/MenuItem.d.ts +0 -31
- package/dist/src/components/menu/MenuItem.d.ts.map +0 -1
- package/dist/src/components/menu/index.d.ts +0 -7
- package/dist/src/components/menu/index.d.ts.map +0 -1
- package/dist/src/components/pages/FormPage.d.ts +0 -66
- package/dist/src/components/pages/FormPage.d.ts.map +0 -1
- package/dist/src/components/pages/Page.d.ts +0 -68
- package/dist/src/components/pages/Page.d.ts.map +0 -1
- package/dist/src/components/pages/index.d.ts +0 -10
- package/dist/src/components/pages/index.d.ts.map +0 -1
- package/dist/src/components/shared/createSerializableView.d.ts +0 -81
- package/dist/src/components/shared/createSerializableView.d.ts.map +0 -1
- package/dist/src/components/shared/viewProps.d.ts +0 -37
- package/dist/src/components/shared/viewProps.d.ts.map +0 -1
- package/dist/src/config/AppConfig.d.ts +0 -49
- package/dist/src/config/AppConfig.d.ts.map +0 -1
- package/dist/src/config/AppConfigBuilder.d.ts +0 -75
- package/dist/src/config/AppConfigBuilder.d.ts.map +0 -1
- package/dist/src/config/index.d.ts +0 -13
- package/dist/src/config/index.d.ts.map +0 -1
- package/dist/src/config/types.d.ts +0 -130
- package/dist/src/config/types.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -15
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/contexts/DataContext.d.ts +0 -139
- package/dist/src/contexts/DataContext.d.ts.map +0 -1
- package/dist/src/contexts/DimensionsContext.d.ts +0 -42
- package/dist/src/contexts/DimensionsContext.d.ts.map +0 -1
- package/dist/src/contexts/PaletteContext.d.ts +0 -53
- package/dist/src/contexts/PaletteContext.d.ts.map +0 -1
- package/dist/src/contexts/PrintModeContext.d.ts +0 -27
- package/dist/src/contexts/PrintModeContext.d.ts.map +0 -1
- package/dist/src/contexts/QwickAppContext.d.ts +0 -71
- package/dist/src/contexts/QwickAppContext.d.ts.map +0 -1
- package/dist/src/contexts/ThemeContext.d.ts +0 -65
- package/dist/src/contexts/ThemeContext.d.ts.map +0 -1
- package/dist/src/contexts/index.d.ts +0 -11
- package/dist/src/contexts/index.d.ts.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -12
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/useBaseProps.d.ts +0 -101
- package/dist/src/hooks/useBaseProps.d.ts.map +0 -1
- package/dist/src/hooks/useDataBinding.d.ts +0 -22
- package/dist/src/hooks/useDataBinding.d.ts.map +0 -1
- package/dist/src/hooks/usePrintMode.d.ts +0 -39
- package/dist/src/hooks/usePrintMode.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/palettes/PaletteAutumn.d.ts +0 -10
- package/dist/src/palettes/PaletteAutumn.d.ts.map +0 -1
- package/dist/src/palettes/PaletteCosmic.d.ts +0 -10
- package/dist/src/palettes/PaletteCosmic.d.ts.map +0 -1
- package/dist/src/palettes/PaletteDefault.d.ts +0 -10
- package/dist/src/palettes/PaletteDefault.d.ts.map +0 -1
- package/dist/src/palettes/PaletteOcean.d.ts +0 -10
- package/dist/src/palettes/PaletteOcean.d.ts.map +0 -1
- package/dist/src/palettes/PaletteSpring.d.ts +0 -10
- package/dist/src/palettes/PaletteSpring.d.ts.map +0 -1
- package/dist/src/palettes/PaletteWinter.d.ts +0 -10
- package/dist/src/palettes/PaletteWinter.d.ts.map +0 -1
- package/dist/src/palettes/index.d.ts +0 -13
- package/dist/src/palettes/index.d.ts.map +0 -1
- package/dist/src/schemas/ActionSchema.d.ts +0 -21
- package/dist/src/schemas/ActionSchema.d.ts.map +0 -1
- package/dist/src/schemas/ArticleSchema.d.ts +0 -13
- package/dist/src/schemas/ArticleSchema.d.ts.map +0 -1
- package/dist/src/schemas/ButtonSchema.d.ts +0 -22
- package/dist/src/schemas/ButtonSchema.d.ts.map +0 -1
- package/dist/src/schemas/CardListGridSchema.d.ts +0 -17
- package/dist/src/schemas/CardListGridSchema.d.ts.map +0 -1
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/CodeSchema.d.ts +0 -18
- package/dist/src/schemas/CodeSchema.d.ts.map +0 -1
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts +0 -32
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts.map +0 -1
- package/dist/src/schemas/ContainerSchema.d.ts +0 -12
- package/dist/src/schemas/ContainerSchema.d.ts.map +0 -1
- package/dist/src/schemas/ContentSchema.d.ts +0 -21
- package/dist/src/schemas/ContentSchema.d.ts.map +0 -1
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts +0 -28
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureCardSchema.d.ts +0 -28
- package/dist/src/schemas/FeatureCardSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureGridSchema.d.ts +0 -17
- package/dist/src/schemas/FeatureGridSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureItemSchema.d.ts +0 -16
- package/dist/src/schemas/FeatureItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterItemSchema.d.ts +0 -15
- package/dist/src/schemas/FooterItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterSchema.d.ts +0 -20
- package/dist/src/schemas/FooterSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterSectionSchema.d.ts +0 -15
- package/dist/src/schemas/FooterSectionSchema.d.ts.map +0 -1
- package/dist/src/schemas/FormBlockSchema.d.ts +0 -19
- package/dist/src/schemas/FormBlockSchema.d.ts.map +0 -1
- package/dist/src/schemas/GridCellSchema.d.ts +0 -23
- package/dist/src/schemas/GridCellSchema.d.ts.map +0 -1
- package/dist/src/schemas/GridLayoutSchema.d.ts +0 -21
- package/dist/src/schemas/GridLayoutSchema.d.ts.map +0 -1
- package/dist/src/schemas/HeaderActionSchema.d.ts +0 -17
- package/dist/src/schemas/HeaderActionSchema.d.ts.map +0 -1
- package/dist/src/schemas/HeroBlockSchema.d.ts +0 -22
- package/dist/src/schemas/HeroBlockSchema.d.ts.map +0 -1
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/HtmlSchema.d.ts +0 -14
- package/dist/src/schemas/HtmlSchema.d.ts.map +0 -1
- package/dist/src/schemas/ImageSchema.d.ts +0 -32
- package/dist/src/schemas/ImageSchema.d.ts.map +0 -1
- package/dist/src/schemas/LogoSchema.d.ts +0 -35
- package/dist/src/schemas/LogoSchema.d.ts.map +0 -1
- package/dist/src/schemas/MarkdownSchema.d.ts +0 -14
- package/dist/src/schemas/MarkdownSchema.d.ts.map +0 -1
- package/dist/src/schemas/MetadataItemSchema.d.ts +0 -13
- package/dist/src/schemas/MetadataItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts +0 -28
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts.map +0 -1
- package/dist/src/schemas/PageTemplateSchema.d.ts +0 -31
- package/dist/src/schemas/PageTemplateSchema.d.ts.map +0 -1
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts +0 -16
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts.map +0 -1
- package/dist/src/schemas/PrintConfigSchema.d.ts +0 -31
- package/dist/src/schemas/PrintConfigSchema.d.ts.map +0 -1
- package/dist/src/schemas/ProductCardSchema.d.ts +0 -39
- package/dist/src/schemas/ProductCardSchema.d.ts.map +0 -1
- package/dist/src/schemas/SafeSpanSchema.d.ts +0 -13
- package/dist/src/schemas/SafeSpanSchema.d.ts.map +0 -1
- package/dist/src/schemas/SectionSchema.d.ts +0 -16
- package/dist/src/schemas/SectionSchema.d.ts.map +0 -1
- package/dist/src/schemas/SelectInputFieldSchema.d.ts +0 -27
- package/dist/src/schemas/SelectInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/TextInputFieldSchema.d.ts +0 -22
- package/dist/src/schemas/TextInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/TextSchema.d.ts +0 -37
- package/dist/src/schemas/TextSchema.d.ts.map +0 -1
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts +0 -19
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts.map +0 -1
- package/dist/src/schemas/ViewSchema.d.ts +0 -66
- package/dist/src/schemas/ViewSchema.d.ts.map +0 -1
- package/dist/src/schemas/index.d.ts +0 -47
- package/dist/src/schemas/index.d.ts.map +0 -1
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts +0 -128
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts.map +0 -1
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts +0 -53
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts.map +0 -1
- package/dist/src/schemas/transformers/registry.d.ts +0 -18
- package/dist/src/schemas/transformers/registry.d.ts.map +0 -1
- package/dist/src/schemas/types/Serializable.d.ts +0 -46
- package/dist/src/schemas/types/Serializable.d.ts.map +0 -1
- package/dist/src/stories/_templates/SerializationTemplate.d.ts.map +0 -1
- package/dist/src/templates/TemplateResolver.d.ts +0 -52
- package/dist/src/templates/TemplateResolver.d.ts.map +0 -1
- package/dist/src/templates/index.d.ts +0 -7
- package/dist/src/templates/index.d.ts.map +0 -1
- package/dist/src/types/CacheProvider.d.ts +0 -18
- package/dist/src/types/CacheProvider.d.ts.map +0 -1
- package/dist/src/types/CollapsibleLayout.d.ts +0 -142
- package/dist/src/types/CollapsibleLayout.d.ts.map +0 -1
- package/dist/src/types/ContentProxy.d.ts +0 -47
- package/dist/src/types/ContentProxy.d.ts.map +0 -1
- package/dist/src/types/DataTypes.d.ts +0 -185
- package/dist/src/types/DataTypes.d.ts.map +0 -1
- package/dist/src/types/TemplateProvider.d.ts +0 -10
- package/dist/src/types/TemplateProvider.d.ts.map +0 -1
- package/dist/src/types/TemplateResolver.d.ts +0 -23
- package/dist/src/types/TemplateResolver.d.ts.map +0 -1
- package/dist/src/types/index.d.ts +0 -82
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/utils/breakpoints.d.ts +0 -35
- package/dist/src/utils/breakpoints.d.ts.map +0 -1
- package/dist/src/utils/cssUtils.d.ts +0 -17
- package/dist/src/utils/cssUtils.d.ts.map +0 -1
- package/dist/src/utils/customPaletteManager.d.ts +0 -8
- package/dist/src/utils/customPaletteManager.d.ts.map +0 -1
- package/dist/src/utils/dimensions.d.ts +0 -34
- package/dist/src/utils/dimensions.d.ts.map +0 -1
- package/dist/src/utils/htmlTransform.d.ts +0 -44
- package/dist/src/utils/htmlTransform.d.ts.map +0 -1
- package/dist/src/utils/index.d.ts +0 -16
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/logger.d.ts +0 -26
- package/dist/src/utils/logger.d.ts.map +0 -1
- package/dist/src/utils/paletteUtils.d.ts +0 -38
- package/dist/src/utils/paletteUtils.d.ts.map +0 -1
- package/dist/src/utils/persistenceUtils.d.ts +0 -31
- package/dist/src/utils/persistenceUtils.d.ts.map +0 -1
- package/dist/src/utils/reactUtils.d.ts +0 -33
- package/dist/src/utils/reactUtils.d.ts.map +0 -1
- package/dist/src/utils/spacing.d.ts +0 -34
- package/dist/src/utils/spacing.d.ts.map +0 -1
- package/dist/src/utils/themePerformanceMonitor.d.ts +0 -32
- package/dist/src/utils/themePerformanceMonitor.d.ts.map +0 -1
- package/dist/src/utils/themeUtils.d.ts +0 -27
- package/dist/src/utils/themeUtils.d.ts.map +0 -1
- package/dist/tests/ConsoleWarningTest.d.ts +0 -5
- package/dist/tests/ConsoleWarningTest.d.ts.map +0 -1
- package/dist/tests/StorageKeyTest.d.ts +0 -6
- package/dist/tests/StorageKeyTest.d.ts.map +0 -1
- package/dist/tests/ThemeStorageKeyTest.d.ts +0 -6
- package/dist/tests/ThemeStorageKeyTest.d.ts.map +0 -1
- /package/dist/palettes/{PaletteAutumn.css → palette-autumn.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteCosmic.css → palette-cosmic.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteDefault.css → palette-default.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteOcean.css → palette-ocean.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteSpring.css → palette-spring.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteWinter.css → palette-winter.1.4.9.css} +0 -0
- /package/dist/{src/stories → stories}/_templates/SerializationTemplate.d.ts +0 -0
|
@@ -58,7 +58,7 @@ describe('Form Components Serialization', () => {
|
|
|
58
58
|
required: true
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
let serializedData:
|
|
61
|
+
let serializedData: Record<string, unknown>;
|
|
62
62
|
let deserializedElement: React.ReactElement;
|
|
63
63
|
|
|
64
64
|
// Test serialization
|
|
@@ -127,7 +127,7 @@ describe('Form Components Serialization', () => {
|
|
|
127
127
|
addButtonText: 'Add Question'
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
let serializedData:
|
|
130
|
+
let serializedData: Record<string, unknown>;
|
|
131
131
|
let deserializedElement: React.ReactElement;
|
|
132
132
|
|
|
133
133
|
// Test serialization
|
|
@@ -194,7 +194,7 @@ describe('Form Components Serialization', () => {
|
|
|
194
194
|
color: 'primary' as const
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
-
let serializedData:
|
|
197
|
+
let serializedData: Record<string, unknown>;
|
|
198
198
|
let deserializedElement: React.ReactElement;
|
|
199
199
|
|
|
200
200
|
// Test serialization
|
|
@@ -264,7 +264,7 @@ describe('Form Components Serialization', () => {
|
|
|
264
264
|
backgroundImage: 'https://example.com/bg.jpg'
|
|
265
265
|
};
|
|
266
266
|
|
|
267
|
-
let serializedData:
|
|
267
|
+
let serializedData: Record<string, unknown>;
|
|
268
268
|
let deserializedElement: React.ReactElement;
|
|
269
269
|
|
|
270
270
|
// Test serialization
|
|
@@ -350,7 +350,7 @@ describe('Form Components Serialization', () => {
|
|
|
350
350
|
<SwitchInputField key="switch2" label="Another Switch" checked={false} />
|
|
351
351
|
];
|
|
352
352
|
|
|
353
|
-
let serializedData:
|
|
353
|
+
let serializedData: string[];
|
|
354
354
|
let deserializedElements: React.ReactElement[];
|
|
355
355
|
|
|
356
356
|
// Bulk serialization
|
|
@@ -404,14 +404,14 @@ describe('Form Components Serialization', () => {
|
|
|
404
404
|
}
|
|
405
405
|
];
|
|
406
406
|
|
|
407
|
-
testComponents.forEach(({
|
|
407
|
+
testComponents.forEach(({ element, checkProps }) => {
|
|
408
408
|
let currentElement = element;
|
|
409
|
-
|
|
409
|
+
const originalProps: Record<string, unknown> = {};
|
|
410
410
|
|
|
411
411
|
// Capture original props from first serialization
|
|
412
412
|
const firstSerialized = ComponentTransformer.serialize(currentElement);
|
|
413
413
|
const firstSerialization = JSON.parse(firstSerialized);
|
|
414
|
-
originalProps
|
|
414
|
+
Object.assign(originalProps, firstSerialization.data);
|
|
415
415
|
|
|
416
416
|
// Perform 5 serialize-deserialize cycles
|
|
417
417
|
for (let cycle = 0; cycle < 5; cycle++) {
|
|
@@ -471,7 +471,7 @@ describe('Form Components Serialization', () => {
|
|
|
471
471
|
|
|
472
472
|
const element = <ChoiceInputField {...originalProps} />;
|
|
473
473
|
const serialized = ComponentTransformer.serialize(element);
|
|
474
|
-
|
|
474
|
+
JSON.parse(serialized);
|
|
475
475
|
const deserializedElement = ComponentTransformer.deserialize(serialized) as React.ReactElement;
|
|
476
476
|
const reserialized = ComponentTransformer.serialize(deserializedElement);
|
|
477
477
|
const reserializedData = JSON.parse(reserialized);
|
|
@@ -58,9 +58,8 @@ describe('SelectInputField Serialization', () => {
|
|
|
58
58
|
placeholder: 'Select a country'
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
let serializedData:
|
|
61
|
+
let serializedData: Record<string, unknown>;
|
|
62
62
|
let deserializedElement: React.ReactElement;
|
|
63
|
-
let reserializedData: any;
|
|
64
63
|
|
|
65
64
|
// Test serialization
|
|
66
65
|
const serializationTime = measurePerformance('Basic Serialization', () => {
|
|
@@ -112,11 +111,11 @@ describe('SelectInputField Serialization', () => {
|
|
|
112
111
|
|
|
113
112
|
const element = <SelectInputField {...originalProps} />;
|
|
114
113
|
const serialized = ComponentTransformer.serialize(element);
|
|
115
|
-
|
|
114
|
+
JSON.parse(serialized);
|
|
116
115
|
const deserializedElement = ComponentTransformer.deserialize(serialized) as React.ReactElement;
|
|
117
116
|
|
|
118
|
-
const { getByText
|
|
119
|
-
|
|
117
|
+
const { getByText } = render(deserializedElement);
|
|
118
|
+
|
|
120
119
|
expect(getByText('Priority Level')).toBeInTheDocument();
|
|
121
120
|
});
|
|
122
121
|
});
|
|
@@ -135,8 +134,8 @@ describe('SelectInputField Serialization', () => {
|
|
|
135
134
|
};
|
|
136
135
|
|
|
137
136
|
const element = <SelectInputField {...originalProps} />;
|
|
138
|
-
|
|
139
|
-
let serializedData:
|
|
137
|
+
|
|
138
|
+
let serializedData: Record<string, unknown>;
|
|
140
139
|
measurePerformance('Complex Options Serialization', () => {
|
|
141
140
|
const serialized = ComponentTransformer.serialize(element);
|
|
142
141
|
serializedData = JSON.parse(serialized);
|
|
@@ -196,19 +195,19 @@ describe('SelectInputField Serialization', () => {
|
|
|
196
195
|
};
|
|
197
196
|
|
|
198
197
|
const element = <SelectInputField {...originalProps} />;
|
|
199
|
-
|
|
200
|
-
let serializedData:
|
|
198
|
+
|
|
199
|
+
let serializedData: Record<string, unknown>;
|
|
201
200
|
measurePerformance('Validation Serialization', () => {
|
|
202
201
|
const serialized = ComponentTransformer.serialize(element);
|
|
203
202
|
serializedData = JSON.parse(serialized);
|
|
204
203
|
});
|
|
205
204
|
|
|
206
|
-
expect(serializedData.data.required).toBe(true);
|
|
207
|
-
expect(serializedData.data.error).toBe(originalProps.error);
|
|
208
|
-
expect(serializedData.data.helperText).toBe(originalProps.helperText);
|
|
205
|
+
expect((serializedData.data as Record<string, unknown>).required).toBe(true);
|
|
206
|
+
expect((serializedData.data as Record<string, unknown>).error).toBe(originalProps.error);
|
|
207
|
+
expect((serializedData.data as Record<string, unknown>).helperText).toBe(originalProps.helperText);
|
|
209
208
|
|
|
210
209
|
const deserializedElement = ComponentTransformer.deserialize(JSON.stringify(serializedData)) as React.ReactElement;
|
|
211
|
-
const {
|
|
210
|
+
const { getByText } = render(deserializedElement);
|
|
212
211
|
|
|
213
212
|
expect(getByText('Required Selection')).toBeInTheDocument();
|
|
214
213
|
expect(getByText('Please select an option')).toBeInTheDocument();
|
|
@@ -329,8 +328,7 @@ describe('SelectInputField Serialization', () => {
|
|
|
329
328
|
options: largeOptions
|
|
330
329
|
};
|
|
331
330
|
|
|
332
|
-
let serializedData:
|
|
333
|
-
let deserializedElement: React.ReactElement;
|
|
331
|
+
let serializedData: unknown;
|
|
334
332
|
|
|
335
333
|
// Test serialization performance with large dataset
|
|
336
334
|
const serializationTime = measurePerformance('Large Options Serialization (1000 items)', () => {
|
|
@@ -341,7 +339,7 @@ describe('SelectInputField Serialization', () => {
|
|
|
341
339
|
|
|
342
340
|
// Test deserialization performance
|
|
343
341
|
const deserializationTime = measurePerformance('Large Options Deserialization (1000 items)', () => {
|
|
344
|
-
|
|
342
|
+
ComponentTransformer.deserialize(JSON.stringify(serializedData)) as React.ReactElement;
|
|
345
343
|
});
|
|
346
344
|
|
|
347
345
|
expect(serializedData.data.options).toHaveLength(1000);
|
|
@@ -373,7 +371,7 @@ describe('SelectInputField Serialization', () => {
|
|
|
373
371
|
}));
|
|
374
372
|
|
|
375
373
|
let elements: React.ReactElement[];
|
|
376
|
-
let serializedData:
|
|
374
|
+
let serializedData: unknown[];
|
|
377
375
|
let deserializedElements: React.ReactElement[];
|
|
378
376
|
|
|
379
377
|
// Bulk serialization
|
|
@@ -419,7 +417,7 @@ describe('SelectInputField Serialization', () => {
|
|
|
419
417
|
};
|
|
420
418
|
|
|
421
419
|
let currentElement = <SelectInputField {...originalProps} />;
|
|
422
|
-
let lastSerializedData:
|
|
420
|
+
let lastSerializedData: unknown;
|
|
423
421
|
|
|
424
422
|
// Perform 10 serialize-deserialize cycles
|
|
425
423
|
for (let cycle = 0; cycle < 10; cycle++) {
|
|
@@ -32,7 +32,7 @@ describe('TextInputField Serialization', () => {
|
|
|
32
32
|
ComponentTransformer.clearRegistry();
|
|
33
33
|
|
|
34
34
|
// Register TextInputField component
|
|
35
|
-
ComponentTransformer.registerComponent(TextInputField as
|
|
35
|
+
ComponentTransformer.registerComponent(TextInputField as unknown as React.ComponentType);
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
afterEach(() => {
|
|
@@ -68,9 +68,9 @@ describe('TextInputField Serialization', () => {
|
|
|
68
68
|
type: 'text'
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
let serializedData:
|
|
71
|
+
let serializedData: string;
|
|
72
72
|
let deserializedElement: React.ReactElement;
|
|
73
|
-
let reserializedData:
|
|
73
|
+
let reserializedData: string;
|
|
74
74
|
|
|
75
75
|
// Test serialization
|
|
76
76
|
const serializationTime = measurePerformance('Basic Serialization', () => {
|
|
@@ -141,8 +141,8 @@ describe('TextInputField Serialization', () => {
|
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
const element = <TextInputField {...originalProps} />;
|
|
144
|
-
|
|
145
|
-
let serializedData:
|
|
144
|
+
|
|
145
|
+
let serializedData: Record<string, unknown>;
|
|
146
146
|
measurePerformance('Multiline Serialization', () => {
|
|
147
147
|
const serialized = ComponentTransformer.serialize(element);
|
|
148
148
|
serializedData = JSON.parse(serialized);
|
|
@@ -174,8 +174,8 @@ describe('TextInputField Serialization', () => {
|
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
const element = <TextInputField {...originalProps} />;
|
|
177
|
-
|
|
178
|
-
let serializedData:
|
|
177
|
+
|
|
178
|
+
let serializedData: Record<string, unknown>;
|
|
179
179
|
measurePerformance('Validation Serialization', () => {
|
|
180
180
|
const serialized = ComponentTransformer.serialize(element);
|
|
181
181
|
serializedData = JSON.parse(serialized);
|
|
@@ -298,7 +298,7 @@ describe('TextInputField Serialization', () => {
|
|
|
298
298
|
}));
|
|
299
299
|
|
|
300
300
|
let elements: React.ReactElement[];
|
|
301
|
-
let serializedData:
|
|
301
|
+
let serializedData: string[];
|
|
302
302
|
let deserializedElements: React.ReactElement[];
|
|
303
303
|
|
|
304
304
|
// Bulk serialization
|
|
@@ -339,7 +339,7 @@ describe('TextInputField Serialization', () => {
|
|
|
339
339
|
};
|
|
340
340
|
|
|
341
341
|
let currentElement = <TextInputField {...originalProps} />;
|
|
342
|
-
let lastSerializedData:
|
|
342
|
+
let lastSerializedData: Record<string, unknown>;
|
|
343
343
|
|
|
344
344
|
// Perform 10 serialize-deserialize cycles
|
|
345
345
|
for (let cycle = 0; cycle < 10; cycle++) {
|
|
@@ -16,14 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import React from 'react';
|
|
19
|
-
import { render, screen,
|
|
19
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
20
20
|
import userEvent from '@testing-library/user-event';
|
|
21
21
|
import '@testing-library/jest-dom';
|
|
22
22
|
import CollapsibleLayout, { CollapsibleLayoutView, useCollapsibleState } from '../../../components/layout/CollapsibleLayout';
|
|
23
23
|
import { DataProvider } from '../../../contexts/DataContext';
|
|
24
24
|
import { JsonDataProvider } from '@qwickapps/schema';
|
|
25
25
|
import { ThemeProvider, PaletteProvider } from '../../../contexts';
|
|
26
|
-
import { CollapsibleLayoutProps } from '../../../types/CollapsibleLayout';
|
|
27
26
|
|
|
28
27
|
// Test data for data binding
|
|
29
28
|
const sampleCmsData = {
|
|
@@ -130,7 +129,7 @@ const HookTestComponent: React.FC<{
|
|
|
130
129
|
onToggle?: (collapsed: boolean) => void;
|
|
131
130
|
persistState?: boolean;
|
|
132
131
|
storageKey?: string;
|
|
133
|
-
onStateChange?: (state:
|
|
132
|
+
onStateChange?: (state: { collapsed: boolean; toggle: () => void }) => void;
|
|
134
133
|
}> = ({ controlled, collapsed, defaultCollapsed, onToggle, persistState, storageKey, onStateChange }) => {
|
|
135
134
|
const state = useCollapsibleState(controlled, collapsed, defaultCollapsed, onToggle, persistState, storageKey);
|
|
136
135
|
|
|
@@ -452,7 +451,6 @@ describe('CollapsibleLayout', () => {
|
|
|
452
451
|
it('handles controlled mode correctly', async () => {
|
|
453
452
|
const user = userEvent.setup();
|
|
454
453
|
const onToggle = jest.fn();
|
|
455
|
-
let currentState: any;
|
|
456
454
|
|
|
457
455
|
render(
|
|
458
456
|
<HookTestComponent
|
|
@@ -566,11 +564,9 @@ describe('CollapsibleLayout', () => {
|
|
|
566
564
|
});
|
|
567
565
|
|
|
568
566
|
it('handles header trigger area correctly', async () => {
|
|
569
|
-
const user = userEvent.setup();
|
|
570
|
-
|
|
571
567
|
render(
|
|
572
568
|
<TestWrapper>
|
|
573
|
-
<CollapsibleLayout
|
|
569
|
+
<CollapsibleLayout
|
|
574
570
|
title="Header Trigger Test"
|
|
575
571
|
triggerArea="header"
|
|
576
572
|
>
|
|
@@ -1258,7 +1254,7 @@ describe('CollapsibleLayout', () => {
|
|
|
1258
1254
|
render(
|
|
1259
1255
|
<TestWrapper>
|
|
1260
1256
|
<CollapsibleLayout
|
|
1261
|
-
animationStyle={'invalid' as
|
|
1257
|
+
animationStyle={'invalid' as unknown}
|
|
1262
1258
|
>
|
|
1263
1259
|
<div>Content</div>
|
|
1264
1260
|
</CollapsibleLayout>
|
|
@@ -1287,7 +1283,7 @@ describe('CollapsibleLayout', () => {
|
|
|
1287
1283
|
|
|
1288
1284
|
it('preserves component marking for QwickApp framework', () => {
|
|
1289
1285
|
// The component should be marked as a QwickApp component
|
|
1290
|
-
const component = CollapsibleLayoutView as
|
|
1286
|
+
const component = CollapsibleLayoutView as unknown;
|
|
1291
1287
|
// Note: This test might need adjustment based on actual implementation
|
|
1292
1288
|
expect(typeof component).toBe('function');
|
|
1293
1289
|
});
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { render
|
|
11
|
+
import { render } from '@testing-library/react';
|
|
12
12
|
import '@testing-library/jest-dom';
|
|
13
13
|
import { ComponentTransformer } from '../../../schemas/transformers/ComponentTransformer';
|
|
14
14
|
import { GridCell } from '../../../components/layout/GridCell';
|
|
@@ -22,10 +22,10 @@ describe('GridCell Serialization', () => {
|
|
|
22
22
|
ComponentTransformer.clearRegistry();
|
|
23
23
|
|
|
24
24
|
// Register all necessary components
|
|
25
|
-
ComponentTransformer.registerComponent(GridCell as
|
|
26
|
-
ComponentTransformer.registerComponent(Text as
|
|
27
|
-
ComponentTransformer.registerComponent(Button as
|
|
28
|
-
ComponentTransformer.registerComponent(Code as
|
|
25
|
+
ComponentTransformer.registerComponent(GridCell as unknown as React.ComponentType);
|
|
26
|
+
ComponentTransformer.registerComponent(Text as unknown as React.ComponentType);
|
|
27
|
+
ComponentTransformer.registerComponent(Button as unknown as React.ComponentType);
|
|
28
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
afterEach(() => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { render
|
|
11
|
+
import { render } from '@testing-library/react';
|
|
12
12
|
import '@testing-library/jest-dom';
|
|
13
13
|
import { ComponentTransformer } from '../../../schemas/transformers/ComponentTransformer';
|
|
14
14
|
import { GridLayout } from '../../../components/layout/GridLayout';
|
|
@@ -22,10 +22,10 @@ describe('GridLayout Serialization', () => {
|
|
|
22
22
|
ComponentTransformer.clearRegistry();
|
|
23
23
|
|
|
24
24
|
// Register all necessary components
|
|
25
|
-
ComponentTransformer.registerComponent(GridLayout as
|
|
26
|
-
ComponentTransformer.registerComponent(GridCell as
|
|
27
|
-
ComponentTransformer.registerComponent(Text as
|
|
28
|
-
ComponentTransformer.registerComponent(Button as
|
|
25
|
+
ComponentTransformer.registerComponent(GridLayout as unknown as React.ComponentType);
|
|
26
|
+
ComponentTransformer.registerComponent(GridCell as unknown as React.ComponentType);
|
|
27
|
+
ComponentTransformer.registerComponent(Text as unknown as React.ComponentType);
|
|
28
|
+
ComponentTransformer.registerComponent(Button as unknown as React.ComponentType);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
afterEach(() => {
|
|
@@ -83,6 +83,7 @@ describe('PrintConfig Integration', () => {
|
|
|
83
83
|
|
|
84
84
|
it('should export PrintModeState interface from usePrintMode', () => {
|
|
85
85
|
// This test ensures the types are properly exported
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
86
87
|
const { usePrintMode } = require('../../hooks/usePrintMode');
|
|
87
88
|
expect(typeof usePrintMode).toBe('function');
|
|
88
89
|
});
|
|
@@ -152,7 +152,7 @@ describe.skip('ModelBuilder', () => {
|
|
|
152
152
|
});
|
|
153
153
|
|
|
154
154
|
test('throws error when building without name', () => {
|
|
155
|
-
const builder = new (ModelBuilder as
|
|
155
|
+
const builder = new (ModelBuilder as unknown as new (name?: string) => typeof ModelBuilder)(undefined);
|
|
156
156
|
expect(() => builder.build()).toThrow('Component must have a name');
|
|
157
157
|
});
|
|
158
158
|
});
|
|
@@ -249,7 +249,7 @@ describe.skip('SchemaBuilder', () => {
|
|
|
249
249
|
});
|
|
250
250
|
|
|
251
251
|
test('throws error when building without name', () => {
|
|
252
|
-
const builder = new (SchemaBuilder as
|
|
252
|
+
const builder = new (SchemaBuilder as unknown as new (name?: string) => typeof SchemaBuilder)(undefined);
|
|
253
253
|
expect(() => builder.build()).toThrow('Schema must have a name');
|
|
254
254
|
});
|
|
255
255
|
});
|
|
@@ -15,14 +15,14 @@ import { Serializable, SerializableConstructor } from '../../types/Serializable'
|
|
|
15
15
|
* Generic test pattern for validating component serialization
|
|
16
16
|
* This pattern should be used for all components implementing Serializable
|
|
17
17
|
*/
|
|
18
|
-
export function testComponentSerialization
|
|
18
|
+
export function testComponentSerialization(
|
|
19
19
|
componentName: string,
|
|
20
20
|
ComponentClass: SerializableConstructor,
|
|
21
21
|
testCases: {
|
|
22
22
|
name: string;
|
|
23
|
-
props:
|
|
24
|
-
expectedData?:
|
|
25
|
-
validate?: (element: ReactElement, originalProps:
|
|
23
|
+
props: Record<string, unknown>;
|
|
24
|
+
expectedData?: Record<string, unknown>;
|
|
25
|
+
validate?: (element: ReactElement, originalProps: Record<string, unknown>) => void;
|
|
26
26
|
shouldThrow?: boolean;
|
|
27
27
|
errorMessage?: string;
|
|
28
28
|
}[]
|
|
@@ -158,17 +158,17 @@ export function testComponentSerialization<T extends Serializable>(
|
|
|
158
158
|
|
|
159
159
|
// Example component implementations for testing patterns
|
|
160
160
|
class TestButton implements Serializable {
|
|
161
|
-
constructor(public props: {
|
|
162
|
-
label?: string;
|
|
161
|
+
constructor(public props: {
|
|
162
|
+
label?: string;
|
|
163
163
|
variant?: 'primary' | 'secondary' | 'danger';
|
|
164
164
|
disabled?: boolean;
|
|
165
165
|
onClick?: () => void;
|
|
166
|
-
children?:
|
|
166
|
+
children?: React.ReactNode;
|
|
167
167
|
className?: string;
|
|
168
168
|
'data-testid'?: string;
|
|
169
169
|
}) {}
|
|
170
170
|
|
|
171
|
-
static fromJson(jsonData:
|
|
171
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
172
172
|
return React.createElement('button', {
|
|
173
173
|
className: `btn ${jsonData.variant ? `btn-${jsonData.variant}` : 'btn-primary'} ${jsonData.className || ''}`.trim(),
|
|
174
174
|
disabled: jsonData.disabled,
|
|
@@ -177,7 +177,7 @@ class TestButton implements Serializable {
|
|
|
177
177
|
}, jsonData.label || jsonData.children || 'Button');
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
toJson():
|
|
180
|
+
toJson(): unknown {
|
|
181
181
|
return {
|
|
182
182
|
label: this.props.label,
|
|
183
183
|
variant: this.props.variant,
|
|
@@ -196,13 +196,13 @@ class TestCard implements Serializable {
|
|
|
196
196
|
content?: string;
|
|
197
197
|
image?: string;
|
|
198
198
|
imageAlt?: string;
|
|
199
|
-
actions?:
|
|
200
|
-
metadata?: Record<string,
|
|
199
|
+
actions?: unknown[];
|
|
200
|
+
metadata?: Record<string, unknown>;
|
|
201
201
|
className?: string;
|
|
202
202
|
elevation?: number;
|
|
203
203
|
}) {}
|
|
204
204
|
|
|
205
|
-
static fromJson(jsonData:
|
|
205
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
206
206
|
const actions = jsonData.actions ? ComponentTransformer.deserialize(jsonData.actions) : null;
|
|
207
207
|
|
|
208
208
|
return React.createElement('div', {
|
|
@@ -231,7 +231,7 @@ class TestCard implements Serializable {
|
|
|
231
231
|
].filter(Boolean));
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
toJson():
|
|
234
|
+
toJson(): unknown {
|
|
235
235
|
return {
|
|
236
236
|
title: this.props.title,
|
|
237
237
|
content: this.props.content,
|
|
@@ -249,14 +249,14 @@ class TestSection implements Serializable {
|
|
|
249
249
|
constructor(public props: {
|
|
250
250
|
title?: string;
|
|
251
251
|
subtitle?: string;
|
|
252
|
-
children?:
|
|
252
|
+
children?: unknown;
|
|
253
253
|
className?: string;
|
|
254
254
|
backgroundColor?: string;
|
|
255
255
|
padding?: string;
|
|
256
256
|
id?: string;
|
|
257
257
|
}) {}
|
|
258
258
|
|
|
259
|
-
static fromJson(jsonData:
|
|
259
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
260
260
|
const children = jsonData.children ? ComponentTransformer.deserialize(jsonData.children) : null;
|
|
261
261
|
|
|
262
262
|
return React.createElement('section', {
|
|
@@ -276,7 +276,7 @@ class TestSection implements Serializable {
|
|
|
276
276
|
].filter(Boolean));
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
toJson():
|
|
279
|
+
toJson(): unknown {
|
|
280
280
|
return {
|
|
281
281
|
title: this.props.title,
|
|
282
282
|
subtitle: this.props.subtitle,
|
|
@@ -300,7 +300,7 @@ class TestCode implements Serializable {
|
|
|
300
300
|
filename?: string;
|
|
301
301
|
}) {}
|
|
302
302
|
|
|
303
|
-
static fromJson(jsonData:
|
|
303
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
304
304
|
return React.createElement('div', {
|
|
305
305
|
className: `code-container theme-${jsonData.theme || 'light'}`,
|
|
306
306
|
'data-testid': 'test-code'
|
|
@@ -319,7 +319,7 @@ class TestCode implements Serializable {
|
|
|
319
319
|
].filter(Boolean));
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
toJson():
|
|
322
|
+
toJson(): unknown {
|
|
323
323
|
return {
|
|
324
324
|
code: this.props.code,
|
|
325
325
|
language: this.props.language,
|
|
@@ -343,14 +343,14 @@ describe('Component Serialization Pattern Tests', () => {
|
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
name: 'handle button with all props',
|
|
346
|
-
props: {
|
|
347
|
-
label: 'Full Button',
|
|
348
|
-
variant: 'danger',
|
|
349
|
-
disabled: true,
|
|
346
|
+
props: {
|
|
347
|
+
label: 'Full Button',
|
|
348
|
+
variant: 'danger',
|
|
349
|
+
disabled: true,
|
|
350
350
|
className: 'custom-btn',
|
|
351
351
|
'data-testid': 'full-button'
|
|
352
352
|
},
|
|
353
|
-
validate: (element
|
|
353
|
+
validate: (element) => {
|
|
354
354
|
expect(element.props.className).toContain('btn-danger');
|
|
355
355
|
expect(element.props.className).toContain('custom-btn');
|
|
356
356
|
expect(element.props.disabled).toBe(true);
|
|
@@ -391,7 +391,7 @@ describe('Component Serialization Pattern Tests', () => {
|
|
|
391
391
|
validate: (element) => {
|
|
392
392
|
expect(element.props['data-elevation']).toBe(2);
|
|
393
393
|
// Check for image in children
|
|
394
|
-
const imageChild = element.props.children.find((child:
|
|
394
|
+
const imageChild = element.props.children.find((child: unknown) => child?.type === 'img');
|
|
395
395
|
expect(imageChild).toBeTruthy();
|
|
396
396
|
expect(imageChild.props.src).toBe('https://example.com/image.jpg');
|
|
397
397
|
expect(imageChild.props.alt).toBe('Test image');
|
|
@@ -476,14 +476,14 @@ describe('Component Serialization Pattern Tests', () => {
|
|
|
476
476
|
validate: (element) => {
|
|
477
477
|
expect(element.props.className).toContain('theme-dark');
|
|
478
478
|
// Check for filename display
|
|
479
|
-
const filenameChild = element.props.children.find((child:
|
|
479
|
+
const filenameChild = element.props.children.find((child: unknown) =>
|
|
480
480
|
child?.props?.className === 'code-filename'
|
|
481
481
|
);
|
|
482
482
|
expect(filenameChild).toBeTruthy();
|
|
483
483
|
expect(filenameChild.props.children).toBe('example.js');
|
|
484
484
|
|
|
485
485
|
// Check code block attributes
|
|
486
|
-
const preChild = element.props.children.find((child:
|
|
486
|
+
const preChild = element.props.children.find((child: unknown) => child?.type === 'pre');
|
|
487
487
|
expect(preChild.props['data-line-numbers']).toBe(true);
|
|
488
488
|
expect(preChild.props['data-highlight-lines']).toBe('1,3');
|
|
489
489
|
expect(preChild.props.style.maxHeight).toBe('300px');
|
|
@@ -493,7 +493,7 @@ describe('Component Serialization Pattern Tests', () => {
|
|
|
493
493
|
name: 'handle empty code block',
|
|
494
494
|
props: { language: 'text' },
|
|
495
495
|
validate: (element) => {
|
|
496
|
-
const preChild = element.props.children.find((child:
|
|
496
|
+
const preChild = element.props.children.find((child: unknown) => child?.type === 'pre');
|
|
497
497
|
expect(preChild.props.className).toContain('language-text');
|
|
498
498
|
expect(preChild.props.children.props.children).toBe('');
|
|
499
499
|
}
|
|
@@ -511,7 +511,7 @@ describe('Component Serialization Pattern Tests', () => {
|
|
|
511
511
|
|
|
512
512
|
it('should handle components with circular references in data', () => {
|
|
513
513
|
const circularData = { name: 'circular' };
|
|
514
|
-
(circularData as
|
|
514
|
+
(circularData as unknown).self = circularData;
|
|
515
515
|
|
|
516
516
|
// This should not crash, though the circular reference may be lost
|
|
517
517
|
expect(() => {
|
|
@@ -15,7 +15,7 @@ import { Code } from '../../../../schemas/transformers/components/blocks/Code';
|
|
|
15
15
|
Object.defineProperty(global, 'DOMParser', {
|
|
16
16
|
writable: true,
|
|
17
17
|
value: class DOMParser {
|
|
18
|
-
parseFromString(htmlString: string
|
|
18
|
+
parseFromString(htmlString: string) {
|
|
19
19
|
// Simple mock that creates elements for our tests
|
|
20
20
|
const mockDoc = {
|
|
21
21
|
body: {
|
|
@@ -102,7 +102,7 @@ describe('ComponentTransformer HTML Patterns', () => {
|
|
|
102
102
|
const mockRegisterPatterns = jest.fn();
|
|
103
103
|
Code.registerPatternHandlers = mockRegisterPatterns;
|
|
104
104
|
|
|
105
|
-
ComponentTransformer.registerComponent(Code as
|
|
105
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
106
106
|
|
|
107
107
|
expect(mockRegisterPatterns).toHaveBeenCalledWith(ComponentTransformer);
|
|
108
108
|
|
|
@@ -225,7 +225,7 @@ describe('ComponentTransformer HTML Patterns', () => {
|
|
|
225
225
|
describe('Code Component Integration', () => {
|
|
226
226
|
test('should register Code component patterns', () => {
|
|
227
227
|
// Register Code component
|
|
228
|
-
ComponentTransformer.registerComponent(Code as
|
|
228
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
229
229
|
|
|
230
230
|
// Check that patterns were registered
|
|
231
231
|
expect(ComponentTransformer.hasPattern('pre code')).toBe(true);
|
|
@@ -233,7 +233,7 @@ describe('ComponentTransformer HTML Patterns', () => {
|
|
|
233
233
|
});
|
|
234
234
|
|
|
235
235
|
test('should transform pre+code elements', () => {
|
|
236
|
-
ComponentTransformer.registerComponent(Code as
|
|
236
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
237
237
|
|
|
238
238
|
// Create pre+code element
|
|
239
239
|
const pre = document.createElement('pre');
|
|
@@ -266,7 +266,7 @@ describe('ComponentTransformer HTML Patterns', () => {
|
|
|
266
266
|
});
|
|
267
267
|
|
|
268
268
|
test('should handle missing code child in pre element', () => {
|
|
269
|
-
ComponentTransformer.registerComponent(Code as
|
|
269
|
+
ComponentTransformer.registerComponent(Code as unknown);
|
|
270
270
|
|
|
271
271
|
const pre = document.createElement('pre');
|
|
272
272
|
pre.textContent = 'Just text, no code element';
|
|
@@ -23,14 +23,14 @@ class MockButton implements Serializable {
|
|
|
23
23
|
|
|
24
24
|
constructor(public props: { label?: string; variant?: string; onClick?: () => void }) {}
|
|
25
25
|
|
|
26
|
-
static fromJson(jsonData:
|
|
26
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
27
27
|
return React.createElement('button', {
|
|
28
|
-
className: `btn-${jsonData.variant || 'default'}`,
|
|
29
|
-
onClick: jsonData.onClick
|
|
30
|
-
}, jsonData.label || 'Button');
|
|
28
|
+
className: `btn-${(jsonData.variant as string) || 'default'}`,
|
|
29
|
+
onClick: jsonData.onClick as (() => void) | undefined
|
|
30
|
+
}, (jsonData.label as string) || 'Button');
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
toJson():
|
|
33
|
+
toJson(): Record<string, unknown> {
|
|
34
34
|
return {
|
|
35
35
|
label: this.props.label,
|
|
36
36
|
variant: this.props.variant,
|
|
@@ -42,10 +42,10 @@ class MockButton implements Serializable {
|
|
|
42
42
|
class MockCard implements Serializable {
|
|
43
43
|
static readonly tagName = 'Card';
|
|
44
44
|
static readonly version = '1.0.0';
|
|
45
|
-
|
|
46
|
-
constructor(public props: { title?: string; content?: string; children?: any }) {}
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
constructor(public props: { title?: string; content?: string; children?: React.ReactNode }) {}
|
|
47
|
+
|
|
48
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
49
49
|
return React.createElement('div', {
|
|
50
50
|
className: 'card'
|
|
51
51
|
}, [
|
|
@@ -54,7 +54,7 @@ class MockCard implements Serializable {
|
|
|
54
54
|
]);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
toJson():
|
|
57
|
+
toJson(): unknown {
|
|
58
58
|
return {
|
|
59
59
|
title: this.props.title,
|
|
60
60
|
content: this.props.content
|
|
@@ -367,7 +367,7 @@ describe('ComponentTransformer', () => {
|
|
|
367
367
|
const result = ComponentTransformer.deserialize(input);
|
|
368
368
|
expect(Array.isArray(result)).toBe(true);
|
|
369
369
|
|
|
370
|
-
const elements = result as
|
|
370
|
+
const elements = result as unknown[];
|
|
371
371
|
expect(elements[0]).toBe('plain text');
|
|
372
372
|
expect(React.isValidElement(elements[1])).toBe(true);
|
|
373
373
|
expect(elements[2]).toBe(42);
|
|
@@ -477,7 +477,7 @@ describe('ComponentTransformer', () => {
|
|
|
477
477
|
const result = ComponentTransformer.deserialize(mixedArray);
|
|
478
478
|
expect(Array.isArray(result)).toBe(true);
|
|
479
479
|
|
|
480
|
-
const elements = result as
|
|
480
|
+
const elements = result as unknown[];
|
|
481
481
|
expect(elements).toHaveLength(3);
|
|
482
482
|
expect(elements[0]).toBe('Text node');
|
|
483
483
|
expect(React.isValidElement(elements[1])).toBe(true);
|