@qwickapps/react-framework 1.4.9 → 1.5.0
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 +3980 -2194
- package/dist/index.js +4006 -2191
- 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.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.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.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.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.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.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.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 +18 -112
- 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 +221 -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
|
@@ -105,7 +105,7 @@ const sampleItems: FooterItem[] = [
|
|
|
105
105
|
];
|
|
106
106
|
|
|
107
107
|
// Wrapper component for tests that need providers
|
|
108
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
108
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
109
109
|
children,
|
|
110
110
|
dataProvider
|
|
111
111
|
}) => (
|
|
@@ -314,9 +314,9 @@ describe.skip('Footer', () => {
|
|
|
314
314
|
});
|
|
315
315
|
|
|
316
316
|
it('renders with custom CSS classes and styles', () => {
|
|
317
|
-
|
|
317
|
+
render(
|
|
318
318
|
<TestWrapper>
|
|
319
|
-
<Footer
|
|
319
|
+
<Footer
|
|
320
320
|
sections={sampleSections}
|
|
321
321
|
className="custom-footer"
|
|
322
322
|
sx={{ backgroundColor: 'red' }}
|
|
@@ -97,7 +97,7 @@ const MockFooter: React.FC = () => (
|
|
|
97
97
|
);
|
|
98
98
|
|
|
99
99
|
// Wrapper component for tests that need providers
|
|
100
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
100
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown; appName?: string }> = ({
|
|
101
101
|
children,
|
|
102
102
|
dataProvider,
|
|
103
103
|
appName = 'Test App'
|
|
@@ -652,7 +652,7 @@ describe('FormBlock', () => {
|
|
|
652
652
|
it.skip('preserves component marking for QwickApp framework', () => {
|
|
653
653
|
// The component should be marked as a QwickApp component
|
|
654
654
|
// This is important for framework identification - test skipped due to test environment limitations
|
|
655
|
-
const formBlockComponent = FormBlock as
|
|
655
|
+
const formBlockComponent = FormBlock as unknown as { QWICKAPP_COMPONENT?: boolean };
|
|
656
656
|
expect(formBlockComponent.QWICKAPP_COMPONENT).toBeTruthy();
|
|
657
657
|
});
|
|
658
658
|
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { render, waitFor
|
|
8
|
+
import { render, waitFor } from '@testing-library/react';
|
|
9
9
|
import HeroBlock from '../../blocks/HeroBlock';
|
|
10
10
|
import { DataProvider } from '../../../contexts/DataContext';
|
|
11
11
|
import { JsonDataProvider } from '@qwickapps/schema';
|
|
@@ -58,7 +58,7 @@ const sampleActions: ButtonProps[] = [
|
|
|
58
58
|
];
|
|
59
59
|
|
|
60
60
|
// Wrapper component for tests that need providers
|
|
61
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
61
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
62
62
|
children,
|
|
63
63
|
dataProvider
|
|
64
64
|
}) => (
|
|
@@ -242,9 +242,9 @@ describe('HeroBlock', () => {
|
|
|
242
242
|
});
|
|
243
243
|
|
|
244
244
|
it('renders with custom CSS classes and styles', () => {
|
|
245
|
-
|
|
245
|
+
render(
|
|
246
246
|
<TestWrapper>
|
|
247
|
-
<HeroBlock
|
|
247
|
+
<HeroBlock
|
|
248
248
|
title="Custom Hero"
|
|
249
249
|
className="custom-hero"
|
|
250
250
|
sx={{ backgroundColor: 'red' }}
|
|
@@ -680,7 +680,7 @@ describe('HeroBlock', () => {
|
|
|
680
680
|
|
|
681
681
|
expect(parsedData.data).toHaveProperty('title', 'Minimal Hero');
|
|
682
682
|
// undefined properties should be either excluded or set to undefined
|
|
683
|
-
expect(parsedData.data.subtitle === undefined || !
|
|
683
|
+
expect(parsedData.data.subtitle === undefined || !Object.prototype.hasOwnProperty.call(parsedData.data, 'subtitle')).toBe(true);
|
|
684
684
|
|
|
685
685
|
const deserializedComponent = ComponentTransformer.deserialize(serializedData);
|
|
686
686
|
expect(React.isValidElement(deserializedComponent)).toBe(true);
|
|
@@ -81,7 +81,7 @@ const sampleCmsData = {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
// Wrapper component for tests that need providers
|
|
84
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
84
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
85
85
|
children,
|
|
86
86
|
dataProvider
|
|
87
87
|
}) => (
|
|
@@ -316,7 +316,7 @@ describe.skip('HtmlInputField', () => {
|
|
|
316
316
|
selectionEnd: 5,
|
|
317
317
|
setSelectionRange: jest.fn(),
|
|
318
318
|
focus: jest.fn()
|
|
319
|
-
} as
|
|
319
|
+
} as unknown as HTMLTextAreaElement;
|
|
320
320
|
|
|
321
321
|
jest.spyOn(document, 'getElementById').mockReturnValue(mockTextarea);
|
|
322
322
|
|
|
@@ -345,7 +345,7 @@ describe.skip('HtmlInputField', () => {
|
|
|
345
345
|
selectionEnd: 5,
|
|
346
346
|
setSelectionRange: jest.fn(),
|
|
347
347
|
focus: jest.fn()
|
|
348
|
-
} as
|
|
348
|
+
} as unknown as HTMLTextAreaElement;
|
|
349
349
|
|
|
350
350
|
jest.spyOn(document, 'getElementById').mockReturnValue(mockTextarea);
|
|
351
351
|
|
|
@@ -475,8 +475,8 @@ describe.skip('HtmlInputField', () => {
|
|
|
475
475
|
selectionEnd: 4,
|
|
476
476
|
setSelectionRange: jest.fn(),
|
|
477
477
|
focus: jest.fn()
|
|
478
|
-
} as
|
|
479
|
-
|
|
478
|
+
} as unknown as HTMLTextAreaElement;
|
|
479
|
+
|
|
480
480
|
jest.spyOn(document, 'getElementById').mockReturnValue(mockTextarea);
|
|
481
481
|
|
|
482
482
|
const handleChange = jest.fn();
|
|
@@ -644,7 +644,7 @@ describe.skip('HtmlInputField', () => {
|
|
|
644
644
|
it.skip('preserves component marking for QwickApp framework', () => {
|
|
645
645
|
// The component should be marked as a QwickApp component
|
|
646
646
|
// This is important for framework identification - test skipped due to test environment limitations
|
|
647
|
-
const htmlInputFieldComponent = HtmlInputField as
|
|
647
|
+
const htmlInputFieldComponent = HtmlInputField as unknown as { QWICKAPP_COMPONENT?: boolean };
|
|
648
648
|
expect(htmlInputFieldComponent.QWICKAPP_COMPONENT).toBeTruthy();
|
|
649
649
|
});
|
|
650
650
|
});
|
|
@@ -707,8 +707,8 @@ describe.skip('HtmlInputField', () => {
|
|
|
707
707
|
selectionEnd: 4,
|
|
708
708
|
setSelectionRange: jest.fn(),
|
|
709
709
|
focus: jest.fn()
|
|
710
|
-
} as
|
|
711
|
-
|
|
710
|
+
} as unknown as HTMLTextAreaElement;
|
|
711
|
+
|
|
712
712
|
jest.spyOn(document, 'getElementById').mockReturnValue(mockTextarea);
|
|
713
713
|
|
|
714
714
|
const handleChange = jest.fn();
|
|
@@ -79,7 +79,7 @@ const mockActions = [
|
|
|
79
79
|
];
|
|
80
80
|
|
|
81
81
|
// Wrapper component for tests that need providers
|
|
82
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
82
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
83
83
|
children,
|
|
84
84
|
dataProvider
|
|
85
85
|
}) => (
|
|
@@ -247,9 +247,9 @@ describe('PageBannerHeader', () => {
|
|
|
247
247
|
});
|
|
248
248
|
|
|
249
249
|
it('renders with custom height', () => {
|
|
250
|
-
|
|
250
|
+
render(
|
|
251
251
|
<TestWrapper>
|
|
252
|
-
<PageBannerHeader
|
|
252
|
+
<PageBannerHeader
|
|
253
253
|
title="Custom Height"
|
|
254
254
|
coverImage="/test-cover.jpg"
|
|
255
255
|
height={400}
|
|
@@ -505,8 +505,8 @@ describe('PageBannerHeader', () => {
|
|
|
505
505
|
process.env.NODE_ENV = 'production';
|
|
506
506
|
|
|
507
507
|
const emptyDataProvider = new JsonDataProvider({ data: {} });
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
|
|
509
|
+
render(
|
|
510
510
|
<TestWrapper dataProvider={emptyDataProvider}>
|
|
511
511
|
<PageBannerHeader dataSource="pageBannerHeaders.nonexistentData" />
|
|
512
512
|
</TestWrapper>
|
|
@@ -588,9 +588,9 @@ describe('PageBannerHeader', () => {
|
|
|
588
588
|
});
|
|
589
589
|
|
|
590
590
|
it('handles custom CSS classes and styles', () => {
|
|
591
|
-
|
|
591
|
+
render(
|
|
592
592
|
<TestWrapper>
|
|
593
|
-
<PageBannerHeader
|
|
593
|
+
<PageBannerHeader
|
|
594
594
|
title="Custom Styled"
|
|
595
595
|
className="custom-header"
|
|
596
596
|
sx={{ border: '1px solid red' }}
|
|
@@ -102,7 +102,7 @@ jest.mock('../../contexts', () => ({
|
|
|
102
102
|
}));
|
|
103
103
|
|
|
104
104
|
// Wrapper component for tests that need providers
|
|
105
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
105
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
106
106
|
children,
|
|
107
107
|
dataProvider
|
|
108
108
|
}) => (
|
|
@@ -633,7 +633,7 @@ describe.skip('PaletteSwitcher', () => {
|
|
|
633
633
|
it.skip('preserves component marking for QwickApp framework', () => {
|
|
634
634
|
// The component should be marked as a QwickApp component
|
|
635
635
|
// This is important for framework identification - test skipped due to test environment limitations
|
|
636
|
-
const paletteSwitcherComponent = PaletteSwitcher as
|
|
636
|
+
const paletteSwitcherComponent = PaletteSwitcher as unknown as { QWICKAPP_COMPONENT?: boolean };
|
|
637
637
|
expect(paletteSwitcherComponent.QWICKAPP_COMPONENT).toBeTruthy();
|
|
638
638
|
});
|
|
639
639
|
});
|
|
@@ -828,7 +828,7 @@ describe.skip('PaletteSwitcher', () => {
|
|
|
828
828
|
it('handles invalid button sizes gracefully', () => {
|
|
829
829
|
render(
|
|
830
830
|
<TestWrapper>
|
|
831
|
-
<PaletteSwitcher buttonSize={'invalid' as
|
|
831
|
+
<PaletteSwitcher buttonSize={'invalid' as 'small' | 'medium' | 'large'} />
|
|
832
832
|
</TestWrapper>
|
|
833
833
|
);
|
|
834
834
|
|
|
@@ -75,7 +75,7 @@ Object.defineProperty(window, 'open', {
|
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
// Wrapper component for tests that need providers
|
|
78
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
78
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
79
79
|
children,
|
|
80
80
|
dataProvider
|
|
81
81
|
}) => (
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { render, waitFor
|
|
8
|
+
import { render, waitFor } from '@testing-library/react';
|
|
9
9
|
import Section from '../../components/blocks/Section';
|
|
10
10
|
import { DataProvider } from '../../contexts/DataContext';
|
|
11
11
|
import { JsonDataProvider } from '@qwickapps/schema';
|
|
@@ -51,7 +51,7 @@ const sampleCmsData = {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
// Wrapper component for tests that need providers
|
|
54
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
54
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
55
55
|
children,
|
|
56
56
|
dataProvider
|
|
57
57
|
}) => (
|
|
@@ -98,7 +98,7 @@ const sampleCmsData = {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
// Wrapper component for tests that need providers
|
|
101
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
101
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
102
102
|
children,
|
|
103
103
|
dataProvider
|
|
104
104
|
}) => (
|
|
@@ -673,7 +673,7 @@ describe.skip('SelectInputField', () => {
|
|
|
673
673
|
it.skip('preserves component marking for QwickApp framework', () => {
|
|
674
674
|
// The component should be marked as a QwickApp component
|
|
675
675
|
// This is important for framework identification - test skipped due to test environment limitations
|
|
676
|
-
const selectInputFieldComponent = SelectInputField as
|
|
676
|
+
const selectInputFieldComponent = SelectInputField as unknown as { QWICKAPP_COMPONENT?: boolean };
|
|
677
677
|
expect(selectInputFieldComponent.QWICKAPP_COMPONENT).toBeTruthy();
|
|
678
678
|
});
|
|
679
679
|
});
|
|
@@ -87,7 +87,7 @@ const sampleCmsData = {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
// Wrapper component for tests that need providers
|
|
90
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
90
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
91
91
|
children,
|
|
92
92
|
dataProvider
|
|
93
93
|
}) => (
|
|
@@ -592,7 +592,7 @@ describe('TextInputField', () => {
|
|
|
592
592
|
it.skip('preserves component marking for QwickApp framework', () => {
|
|
593
593
|
// The component should be marked as a QwickApp component
|
|
594
594
|
// This is important for framework identification - test skipped due to test environment limitations
|
|
595
|
-
const textInputFieldComponent = TextInputField as
|
|
595
|
+
const textInputFieldComponent = TextInputField as unknown as { QWICKAPP_COMPONENT?: boolean };
|
|
596
596
|
expect(textInputFieldComponent.QWICKAPP_COMPONENT).toBeTruthy();
|
|
597
597
|
});
|
|
598
598
|
});
|
|
@@ -674,7 +674,7 @@ describe('TextInputField', () => {
|
|
|
674
674
|
);
|
|
675
675
|
|
|
676
676
|
const field1 = screen.getByRole('textbox', { name: 'Field 1' });
|
|
677
|
-
|
|
677
|
+
screen.getByRole('textbox', { name: 'Field 2' });
|
|
678
678
|
|
|
679
679
|
field1.focus();
|
|
680
680
|
expect(document.activeElement).toBe(field1);
|
|
@@ -726,7 +726,7 @@ describe('TextInputField', () => {
|
|
|
726
726
|
it('handles invalid type gracefully', () => {
|
|
727
727
|
render(
|
|
728
728
|
<TestWrapper>
|
|
729
|
-
<TextInputField label="Invalid Type" type={'invalid-type' as
|
|
729
|
+
<TextInputField label="Invalid Type" type={'invalid-type' as 'text' | 'email' | 'password' | 'number' | 'tel' | 'url'} />
|
|
730
730
|
</TestWrapper>
|
|
731
731
|
);
|
|
732
732
|
|
|
@@ -89,7 +89,7 @@ const sampleCmsData = {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
// Wrapper component for tests that need providers
|
|
92
|
-
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?:
|
|
92
|
+
const TestWrapper: React.FC<{ children: React.ReactNode; dataProvider?: unknown }> = ({
|
|
93
93
|
children,
|
|
94
94
|
dataProvider
|
|
95
95
|
}) => (
|
|
@@ -625,7 +625,7 @@ describe('ThemeSwitcher', () => {
|
|
|
625
625
|
it.skip('preserves component marking for QwickApp framework', () => {
|
|
626
626
|
// The component should be marked as a QwickApp component
|
|
627
627
|
// This is important for framework identification - test skipped due to test environment limitations
|
|
628
|
-
const themeSwitcherComponent = ThemeSwitcher as
|
|
628
|
+
const themeSwitcherComponent = ThemeSwitcher as unknown as { QWICKAPP_COMPONENT?: boolean };
|
|
629
629
|
expect(themeSwitcherComponent.QWICKAPP_COMPONENT).toBeTruthy();
|
|
630
630
|
});
|
|
631
631
|
});
|
|
@@ -704,7 +704,7 @@ describe('ThemeSwitcher', () => {
|
|
|
704
704
|
it('handles invalid menu positions gracefully', () => {
|
|
705
705
|
render(
|
|
706
706
|
<TestWrapper>
|
|
707
|
-
<ThemeSwitcher menuPosition={'invalid' as
|
|
707
|
+
<ThemeSwitcher menuPosition={'invalid' as 'left' | 'right'} />
|
|
708
708
|
</TestWrapper>
|
|
709
709
|
);
|
|
710
710
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { render, screen
|
|
12
|
+
import { render, screen } from '@testing-library/react';
|
|
13
13
|
import '@testing-library/jest-dom';
|
|
14
14
|
import { ThemeProvider, PaletteProvider } from '../../../contexts';
|
|
15
15
|
import { Container, type ContainerProps } from '../../../components/base/Container';
|
|
@@ -355,7 +355,7 @@ describe('Container', () => {
|
|
|
355
355
|
const styleObj = { margin: '5px' };
|
|
356
356
|
render(
|
|
357
357
|
<TestWrapper>
|
|
358
|
-
<Container style={styleObj as
|
|
358
|
+
<Container style={styleObj as React.CSSProperties} />
|
|
359
359
|
</TestWrapper>
|
|
360
360
|
);
|
|
361
361
|
|
|
@@ -490,7 +490,7 @@ describe('Container', () => {
|
|
|
490
490
|
const clickHandler = jest.fn();
|
|
491
491
|
render(
|
|
492
492
|
<TestWrapper>
|
|
493
|
-
<Container onClick={clickHandler as
|
|
493
|
+
<Container onClick={clickHandler as React.MouseEventHandler} />
|
|
494
494
|
</TestWrapper>
|
|
495
495
|
);
|
|
496
496
|
|
|
@@ -782,7 +782,7 @@ describe('Container', () => {
|
|
|
782
782
|
<TestWrapper>
|
|
783
783
|
<Container
|
|
784
784
|
className={undefined}
|
|
785
|
-
id={null as
|
|
785
|
+
id={null as unknown as string}
|
|
786
786
|
span=""
|
|
787
787
|
/>
|
|
788
788
|
</TestWrapper>
|
|
@@ -870,19 +870,19 @@ describe('Container', () => {
|
|
|
870
870
|
});
|
|
871
871
|
|
|
872
872
|
describe('Serialization with Event Handlers', () => {
|
|
873
|
-
it('should serialize Container with onClick handler without circular reference error', () => {
|
|
873
|
+
it('should serialize Container with onClick handler without circular reference error', async () => {
|
|
874
874
|
// Import ComponentTransformer and registry for testing
|
|
875
|
-
const { ComponentTransformer } =
|
|
875
|
+
const { ComponentTransformer } = await import('../../../schemas/transformers/ComponentTransformer');
|
|
876
876
|
// Ensure components are registered
|
|
877
|
-
|
|
878
|
-
|
|
877
|
+
await import('../../../schemas/transformers/registry');
|
|
878
|
+
|
|
879
879
|
// Create a Container with onClick handler
|
|
880
880
|
const containerWithHandler = (
|
|
881
881
|
<Container
|
|
882
882
|
span={12}
|
|
883
883
|
padding="large"
|
|
884
884
|
background="linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
885
|
-
onClick={(
|
|
885
|
+
onClick={() => { console.log("Container clicked!"); }}
|
|
886
886
|
role="button"
|
|
887
887
|
aria-label="Clickable container"
|
|
888
888
|
>
|
|
@@ -908,18 +908,19 @@ describe('Container', () => {
|
|
|
908
908
|
}).not.toThrow();
|
|
909
909
|
});
|
|
910
910
|
|
|
911
|
-
it('should handle multiple event handlers in serialization', () => {
|
|
912
|
-
|
|
911
|
+
it('should handle multiple event handlers in serialization', async () => {
|
|
912
|
+
// Import ComponentTransformer and registry for testing
|
|
913
|
+
const { ComponentTransformer } = await import('../../../schemas/transformers/ComponentTransformer');
|
|
913
914
|
// Ensure components are registered
|
|
914
|
-
|
|
915
|
+
await import('../../../schemas/transformers/registry');
|
|
915
916
|
|
|
916
917
|
const containerWithMultipleHandlers = (
|
|
917
918
|
<Container
|
|
918
|
-
onClick={(
|
|
919
|
-
onMouseEnter={(
|
|
920
|
-
onMouseLeave={(
|
|
921
|
-
onFocus={(
|
|
922
|
-
onBlur={(
|
|
919
|
+
onClick={() => { console.log("clicked"); }}
|
|
920
|
+
onMouseEnter={() => { console.log("mouse enter"); }}
|
|
921
|
+
onMouseLeave={() => { console.log("mouse leave"); }}
|
|
922
|
+
onFocus={() => { console.log("focused"); }}
|
|
923
|
+
onBlur={() => { console.log("blurred"); }}
|
|
923
924
|
>
|
|
924
925
|
Multi-handler container
|
|
925
926
|
</Container>
|
|
@@ -939,16 +940,16 @@ describe('Container', () => {
|
|
|
939
940
|
}).not.toThrow();
|
|
940
941
|
});
|
|
941
942
|
|
|
942
|
-
it('should round-trip serialize and deserialize Container with event handlers', () => {
|
|
943
|
-
const { ComponentTransformer } =
|
|
943
|
+
it('should round-trip serialize and deserialize Container with event handlers', async () => {
|
|
944
|
+
const { ComponentTransformer } = await import('../../../schemas/transformers/ComponentTransformer');
|
|
944
945
|
// Ensure components are registered
|
|
945
|
-
|
|
946
|
+
await import('../../../schemas/transformers/registry');
|
|
946
947
|
|
|
947
948
|
const originalContainer = (
|
|
948
949
|
<Container
|
|
949
950
|
span={6}
|
|
950
951
|
padding="medium"
|
|
951
|
-
onClick={(
|
|
952
|
+
onClick={() => { console.log("original handler"); }}
|
|
952
953
|
>
|
|
953
954
|
Round-trip test
|
|
954
955
|
</Container>
|
|
@@ -194,7 +194,7 @@ interface QueryResult<T = any> {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
type EventHandler<T = any> = (event: T) => void | Promise<void>;
|
|
197
|
-
type QueryBuilder = (query: string, params?:
|
|
197
|
+
type QueryBuilder = (query: string, params?: unknown[]) => Promise<QueryResult>;
|
|
198
198
|
|
|
199
199
|
class EnterpriseDatabase {
|
|
200
200
|
private connections: Map<string, DatabaseConnection> = new Map();
|
|
@@ -218,7 +218,7 @@ class EnterpriseDatabase {
|
|
|
218
218
|
|
|
219
219
|
async query<T = any>(
|
|
220
220
|
sql: string,
|
|
221
|
-
params:
|
|
221
|
+
params: unknown[] = [],
|
|
222
222
|
options: QueryOptions = {}
|
|
223
223
|
): Promise<QueryResult<T>> {
|
|
224
224
|
const startTime = performance.now();
|
|
@@ -283,7 +283,7 @@ class EnterpriseDatabase {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
private generateQueryId(sql: string, params:
|
|
286
|
+
private generateQueryId(sql: string, params: unknown[]): string {
|
|
287
287
|
return btoa(sql + JSON.stringify(params)).replace(/[^a-zA-Z0-9]/g, '').substring(0, 32);
|
|
288
288
|
}
|
|
289
289
|
|
|
@@ -313,7 +313,7 @@ export { EnterpriseDatabase, type DatabaseConnection, type QueryOptions, type Qu
|
|
|
313
313
|
describe('Code Component Performance Tests', () => {
|
|
314
314
|
beforeEach(() => {
|
|
315
315
|
ComponentTransformer.clearRegistry();
|
|
316
|
-
ComponentTransformer.registerComponent(Code as
|
|
316
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
317
317
|
});
|
|
318
318
|
|
|
319
319
|
afterEach(() => {
|
|
@@ -558,7 +558,7 @@ describe('Code Component Performance Tests', () => {
|
|
|
558
558
|
|
|
559
559
|
describe('Memory Usage Validation', () => {
|
|
560
560
|
it('should not cause memory leaks during repeated operations', () => {
|
|
561
|
-
const initialMemory = (performance as
|
|
561
|
+
const initialMemory = (performance as unknown as { memory?: { usedJSHeapSize?: number } }).memory?.usedJSHeapSize || 0;
|
|
562
562
|
|
|
563
563
|
const codeElement = (
|
|
564
564
|
<Code language="javascript" title="memory-test.js">
|
|
@@ -569,15 +569,15 @@ describe('Code Component Performance Tests', () => {
|
|
|
569
569
|
// Perform many operations
|
|
570
570
|
for (let i = 0; i < 1000; i++) {
|
|
571
571
|
const serialized = ComponentTransformer.serialize(codeElement);
|
|
572
|
-
|
|
573
|
-
|
|
572
|
+
ComponentTransformer.deserialize(serialized);
|
|
573
|
+
|
|
574
574
|
// Force garbage collection hint (if available)
|
|
575
|
-
if (typeof global !== 'undefined' && (global as
|
|
576
|
-
if (i % 100 === 0) (global as
|
|
575
|
+
if (typeof global !== 'undefined' && (global as unknown as { gc?: () => void }).gc) {
|
|
576
|
+
if (i % 100 === 0) (global as unknown as { gc?: () => void }).gc?.();
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
const finalMemory = (performance as
|
|
580
|
+
const finalMemory = (performance as unknown as { memory?: { usedJSHeapSize?: number } }).memory?.usedJSHeapSize || 0;
|
|
581
581
|
|
|
582
582
|
if (initialMemory > 0 && finalMemory > 0) {
|
|
583
583
|
const memoryIncrease = finalMemory - initialMemory;
|
|
@@ -54,10 +54,10 @@ describe('Code Component Serialization', () => {
|
|
|
54
54
|
it('should register with correct tagName and version', () => {
|
|
55
55
|
expect(Code.tagName).toBe('Code');
|
|
56
56
|
expect(Code.version).toBe('1.0.0');
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
// Register the component
|
|
59
|
-
ComponentTransformer.registerComponent(Code as
|
|
60
|
-
|
|
59
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
60
|
+
|
|
61
61
|
// Verify it's registered
|
|
62
62
|
const registeredComponents = ComponentTransformer.getRegisteredComponents();
|
|
63
63
|
expect(registeredComponents).toContain('Code');
|
|
@@ -339,7 +339,7 @@ describe('Code Component Serialization', () => {
|
|
|
339
339
|
describe('ComponentTransformer Integration', () => {
|
|
340
340
|
beforeEach(() => {
|
|
341
341
|
// Register the Code component for these tests
|
|
342
|
-
ComponentTransformer.registerComponent(Code as
|
|
342
|
+
ComponentTransformer.registerComponent(Code as unknown as React.ComponentType);
|
|
343
343
|
});
|
|
344
344
|
|
|
345
345
|
it('should work with ComponentTransformer serialize/deserialize', () => {
|
|
@@ -381,13 +381,13 @@ describe('Code Component Serialization', () => {
|
|
|
381
381
|
const deserializedElement = ComponentTransformer.deserialize(serializedString);
|
|
382
382
|
|
|
383
383
|
// Render both to verify they work the same
|
|
384
|
-
|
|
384
|
+
render(
|
|
385
385
|
<TestWrapper>
|
|
386
386
|
{originalElement}
|
|
387
387
|
</TestWrapper>
|
|
388
388
|
);
|
|
389
389
|
|
|
390
|
-
|
|
390
|
+
render(
|
|
391
391
|
<TestWrapper>
|
|
392
392
|
{deserializedElement as React.ReactElement}
|
|
393
393
|
</TestWrapper>
|
|
@@ -467,9 +467,9 @@ describe('Code Component Serialization', () => {
|
|
|
467
467
|
|
|
468
468
|
it('should handle serialization of invalid props', () => {
|
|
469
469
|
const invalidProps = {
|
|
470
|
-
children: undefined as
|
|
471
|
-
language: null as
|
|
472
|
-
showCopy: 'invalid' as
|
|
470
|
+
children: undefined as unknown as string,
|
|
471
|
+
language: null as unknown as string,
|
|
472
|
+
showCopy: 'invalid' as unknown as boolean
|
|
473
473
|
};
|
|
474
474
|
|
|
475
475
|
const codeInstance = new Code(invalidProps);
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { render } from '@testing-library/react';
|
|
12
11
|
import '@testing-library/jest-dom';
|
|
13
12
|
import HeroBlock from '../../../components/blocks/HeroBlock';
|
|
14
13
|
import { ComponentTransformer } from '../../../schemas/transformers/ComponentTransformer';
|
|
@@ -400,8 +399,8 @@ describe('HeroBlock Serialization', () => {
|
|
|
400
399
|
// Verify nested structure (actions array)
|
|
401
400
|
expect(parsedData.data.actions).toBeInstanceOf(Array);
|
|
402
401
|
expect(parsedData.data.actions).toHaveLength(3);
|
|
403
|
-
|
|
404
|
-
parsedData.data.actions.forEach((action:
|
|
402
|
+
|
|
403
|
+
parsedData.data.actions.forEach((action: Record<string, unknown>, index: number) => {
|
|
405
404
|
expect(action).toHaveProperty('label');
|
|
406
405
|
expect(action).toHaveProperty('variant');
|
|
407
406
|
expect(action.label).toBe(`Action ${index + 1}`);
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { render, screen } from '@testing-library/react';
|
|
12
11
|
import '@testing-library/jest-dom';
|
|
13
12
|
import { ComponentTransformer } from '../../../schemas/transformers/ComponentTransformer';
|
|
14
13
|
import { Image } from '../../../components/blocks/Image';
|
|
@@ -17,9 +16,9 @@ describe('Image Serialization', () => {
|
|
|
17
16
|
beforeEach(() => {
|
|
18
17
|
// Clear component registry for clean tests
|
|
19
18
|
ComponentTransformer.clearRegistry();
|
|
20
|
-
|
|
19
|
+
|
|
21
20
|
// Register Image component
|
|
22
|
-
ComponentTransformer.registerComponent(Image as
|
|
21
|
+
ComponentTransformer.registerComponent(Image as unknown as React.ComponentType);
|
|
23
22
|
});
|
|
24
23
|
|
|
25
24
|
afterEach(() => {
|
|
@@ -121,9 +120,10 @@ describe('Image Serialization', () => {
|
|
|
121
120
|
|
|
122
121
|
describe('ModelView Integration', () => {
|
|
123
122
|
it('should have correct static properties', () => {
|
|
124
|
-
|
|
125
|
-
expect(
|
|
126
|
-
expect(
|
|
123
|
+
const ImageStatic = Image as unknown as { tagName: string; version: string; fromJson: (data: unknown) => React.ReactElement };
|
|
124
|
+
expect(ImageStatic.tagName).toBe('Image');
|
|
125
|
+
expect(ImageStatic.version).toBe('1.0.0');
|
|
126
|
+
expect(typeof ImageStatic.fromJson).toBe('function');
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
it('should create instance with toJson method', () => {
|
|
@@ -147,7 +147,8 @@ describe('Image Serialization', () => {
|
|
|
147
147
|
height: 200
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
const
|
|
150
|
+
const ImageStatic = Image as unknown as { fromJson: (data: Record<string, unknown>) => React.ReactElement };
|
|
151
|
+
const component = ImageStatic.fromJson(jsonData);
|
|
151
152
|
expect(React.isValidElement(component)).toBe(true);
|
|
152
153
|
});
|
|
153
154
|
});
|