@qwickapps/react-framework 1.4.8 → 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 +36 -3
- 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 +4929 -2942
- package/dist/index.js +4426 -2410
- 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 +28 -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 +14 -17
- package/src/components/Logo.tsx +44 -33
- package/src/components/Markdown.tsx +9 -9
- package/src/components/ProductLogo.tsx +118 -0
- package/src/components/QwickApp.css +46 -1063
- package/src/components/QwickApp.tsx +1 -1
- package/src/components/QwickAppsLogo.tsx +1 -1
- package/src/components/ResponsiveMenu.tsx +13 -2
- package/src/components/SafeSpan.tsx +8 -9
- package/src/components/Scaffold.css +14 -0
- package/src/components/Scaffold.tsx +71 -27
- 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 +251 -36
- 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 +15 -10
- package/src/components/blocks/FeatureCard.tsx +16 -11
- package/src/components/blocks/FeatureGrid.tsx +13 -8
- package/src/components/blocks/Footer.tsx +44 -35
- package/src/components/blocks/HeroBlock.tsx +12 -13
- package/src/components/blocks/Image.tsx +16 -8
- package/src/components/blocks/PageBannerHeader.tsx +16 -12
- package/src/components/blocks/ProductCard.tsx +32 -25
- package/src/components/blocks/Section.tsx +21 -13
- package/src/components/blocks/Text.tsx +33 -15
- package/src/components/buttons/Button.tsx +110 -30
- 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/menu/MenuItem.tsx +2 -2
- 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 +3 -2
- 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/ButtonSchema.ts +33 -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 +7 -7
- package/src/schemas/transformers/ComponentTransformer.ts +39 -28
- package/src/schemas/transformers/ReactNodeTransformer.ts +18 -17
- 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/Article.stories.tsx +1 -1
- package/src/stories/CardListGrid.stories.tsx +1 -1
- package/src/stories/ChoiceInputField.stories.tsx +2 -2
- 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 -41
- 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 -19
- 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
|
@@ -16,10 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import React from 'react';
|
|
19
|
-
import { Grid
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { QWICKAPP_COMPONENT } from '../../hooks/useBaseProps';
|
|
19
|
+
import { Grid } from '@mui/material';
|
|
20
|
+
import { resolveSpacing } from '../../utils/spacing';
|
|
21
|
+
import { resolveDimension } from '../../utils/dimensions';
|
|
23
22
|
import { createSerializableView, SerializableComponent } from '../shared/createSerializableView';
|
|
24
23
|
import { ViewProps } from '../shared/viewProps';
|
|
25
24
|
|
|
@@ -66,9 +65,9 @@ function GridLayoutView({
|
|
|
66
65
|
maxWidth,
|
|
67
66
|
gridProps,
|
|
68
67
|
...props
|
|
69
|
-
}: GridLayoutProps & { gridProps?:
|
|
68
|
+
}: GridLayoutProps & { gridProps?: unknown }) {
|
|
70
69
|
|
|
71
|
-
const resolvedSpacing = resolveSpacing(spacing
|
|
70
|
+
const resolvedSpacing = resolveSpacing(spacing);
|
|
72
71
|
|
|
73
72
|
// Process children to handle grid props
|
|
74
73
|
const processChildren = () => {
|
|
@@ -80,73 +79,71 @@ function GridLayoutView({
|
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
// Extract grid props from data attributes or props
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
// Check if it's a QwickApp component
|
|
86
|
-
const isQwickApp = (child.type as any)?.[QWICKAPP_COMPONENT];
|
|
87
|
-
|
|
82
|
+
let childGridProps: Record<string, unknown> = {};
|
|
83
|
+
|
|
88
84
|
// Extract grid props from both data attributes (QwickApp) and direct props (regular)
|
|
89
|
-
const
|
|
90
|
-
const span =
|
|
91
|
-
const xs =
|
|
92
|
-
const sm =
|
|
93
|
-
const md =
|
|
94
|
-
const lg =
|
|
95
|
-
const xl =
|
|
96
|
-
|
|
85
|
+
const childProps = child.props as Record<string, unknown>;
|
|
86
|
+
const span = childProps['data-grid-span'] || childProps.span;
|
|
87
|
+
const xs = childProps['data-grid-xs'] || childProps.xs;
|
|
88
|
+
const sm = childProps['data-grid-sm'] || childProps.sm;
|
|
89
|
+
const md = childProps['data-grid-md'] || childProps.md;
|
|
90
|
+
const lg = childProps['data-grid-lg'] || childProps.lg;
|
|
91
|
+
const xl = childProps['data-grid-xl'] || childProps.xl;
|
|
92
|
+
|
|
97
93
|
if (span || xs || sm || md || lg || xl) {
|
|
98
94
|
// Use span if available, otherwise use breakpoint values
|
|
99
95
|
if (span) {
|
|
100
|
-
|
|
96
|
+
childGridProps = {
|
|
101
97
|
size: span,
|
|
102
98
|
};
|
|
103
99
|
} else {
|
|
104
100
|
// Build responsive size object for MUI v6
|
|
105
|
-
const sizeConfig:
|
|
101
|
+
const sizeConfig: Record<string, unknown> = {};
|
|
106
102
|
if (xs) sizeConfig.xs = xs;
|
|
107
103
|
if (sm) sizeConfig.sm = sm;
|
|
108
104
|
if (md) sizeConfig.md = md;
|
|
109
105
|
if (lg) sizeConfig.lg = lg;
|
|
110
106
|
if (xl) sizeConfig.xl = xl;
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
|
|
108
|
+
childGridProps = {
|
|
113
109
|
size: sizeConfig,
|
|
114
110
|
};
|
|
115
111
|
}
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
// If columns prop is set and no grid props, auto-distribute responsively
|
|
119
|
-
if (columns && Object.keys(
|
|
115
|
+
if (columns && Object.keys(childGridProps).length === 0) {
|
|
120
116
|
// Make responsive: single column on mobile, fewer columns on tablet, full columns on desktop
|
|
121
|
-
|
|
117
|
+
childGridProps = {
|
|
122
118
|
size: {
|
|
123
119
|
xs: 12, // Single column on mobile
|
|
124
120
|
sm: columns >= 3 ? 6 : 12 / Math.min(columns, 2), // 2 columns max on small screens
|
|
125
|
-
md: 12 / Math.min(columns, 3), // 3 columns max on medium screens
|
|
121
|
+
md: 12 / Math.min(columns, 3), // 3 columns max on medium screens
|
|
126
122
|
lg: 12 / columns, // Full columns on large screens
|
|
127
123
|
},
|
|
128
124
|
};
|
|
129
125
|
}
|
|
130
126
|
|
|
131
127
|
// If has grid props, wrap in Grid
|
|
132
|
-
if (Object.keys(
|
|
128
|
+
if (Object.keys(childGridProps).length > 0) {
|
|
133
129
|
// Clean grid data attributes from child to avoid duplication
|
|
134
|
-
const cleanedProps = { ...child.props };
|
|
130
|
+
const cleanedProps = { ...(child.props as Record<string, unknown>) };
|
|
135
131
|
delete cleanedProps['data-grid-span'];
|
|
136
132
|
delete cleanedProps['data-grid-xs'];
|
|
137
133
|
delete cleanedProps['data-grid-sm'];
|
|
138
134
|
delete cleanedProps['data-grid-md'];
|
|
139
135
|
delete cleanedProps['data-grid-lg'];
|
|
140
136
|
delete cleanedProps['data-grid-xl'];
|
|
141
|
-
|
|
137
|
+
|
|
142
138
|
return (
|
|
143
|
-
<Grid key={child.key || index} {...
|
|
139
|
+
<Grid key={child.key || index} {...childGridProps}>
|
|
144
140
|
{React.cloneElement(child, cleanedProps)}
|
|
145
141
|
</Grid>
|
|
146
142
|
);
|
|
147
143
|
}
|
|
148
144
|
|
|
149
|
-
|
|
145
|
+
// Return child wrapped in Fragment with key
|
|
146
|
+
return <React.Fragment key={child.key || index}>{child}</React.Fragment>;
|
|
150
147
|
});
|
|
151
148
|
};
|
|
152
149
|
|
|
@@ -155,7 +152,7 @@ function GridLayoutView({
|
|
|
155
152
|
container
|
|
156
153
|
spacing={resolvedSpacing}
|
|
157
154
|
{...props}
|
|
158
|
-
{...(gridProps
|
|
155
|
+
{...(gridProps ? { 'data-grid': JSON.stringify(gridProps) } : {})}
|
|
159
156
|
sx={{
|
|
160
157
|
width: '100%', // Ensure full width by default in MUI v6
|
|
161
158
|
height: resolveDimension(height, 'height'),
|
|
@@ -13,8 +13,8 @@ export interface MenuItem {
|
|
|
13
13
|
id: string;
|
|
14
14
|
/** Display label for the menu item */
|
|
15
15
|
label: string;
|
|
16
|
-
/** Icon
|
|
17
|
-
icon?: React.ReactNode;
|
|
16
|
+
/** Icon name (string) or icon component (React.ReactNode) to display */
|
|
17
|
+
icon?: string | React.ReactNode;
|
|
18
18
|
/** Click handler for the menu item */
|
|
19
19
|
onClick?: () => void;
|
|
20
20
|
/** External link URL (if this is a link) */
|
|
@@ -223,7 +223,7 @@ export const PageView: React.FC<PageViewProps> = ({
|
|
|
223
223
|
if (!isPrintMode) return;
|
|
224
224
|
const styleId = 'qwickapps-print-page-setup';
|
|
225
225
|
const cfg = printConfig;
|
|
226
|
-
const size = (cfg as
|
|
226
|
+
const size = (cfg as unknown as { pageSize?: string }).pageSize || 'auto';
|
|
227
227
|
const bg = cfg.printBackground || 'transparent';
|
|
228
228
|
const bgFirst = cfg.printBackgroundFirstPage || bg;
|
|
229
229
|
|
|
@@ -366,7 +366,7 @@ export const PageView: React.FC<PageViewProps> = ({
|
|
|
366
366
|
/* -------------------------------------------------------------------------- */
|
|
367
367
|
/* Page Class */
|
|
368
368
|
/* -------------------------------------------------------------------------- */
|
|
369
|
-
export class Page<P extends PageProps = PageProps, S =
|
|
369
|
+
export class Page<P extends PageProps = PageProps, S = Record<string, never>> extends React.Component<P, S> {
|
|
370
370
|
protected getPageProps(): Partial<PageProps> { return {}; }
|
|
371
371
|
protected renderView(): React.ReactNode { return this.props.children; }
|
|
372
372
|
protected renderPrintView(): React.ReactNode { return this.renderView(); }
|
|
@@ -57,12 +57,11 @@ interface CreateSerializableViewConfig<P extends ViewProps> {
|
|
|
57
57
|
/**
|
|
58
58
|
* Serializable component interface with all required static properties
|
|
59
59
|
*/
|
|
60
|
-
export interface SerializableComponent<P extends ViewProps> {
|
|
61
|
-
(props: P): ReactElement;
|
|
60
|
+
export interface SerializableComponent<P extends ViewProps> extends React.FC<P> {
|
|
62
61
|
tagName: string;
|
|
63
62
|
version: string;
|
|
64
|
-
fromJson: (data:
|
|
65
|
-
toJson: (props: P) =>
|
|
63
|
+
fromJson: (data: unknown) => ReactElement;
|
|
64
|
+
toJson: (props: P) => unknown;
|
|
66
65
|
displayName?: string;
|
|
67
66
|
[QWICKAPP_COMPONENT]: symbol;
|
|
68
67
|
}
|
|
@@ -80,7 +79,7 @@ export function createSerializableView<P extends ViewProps>(
|
|
|
80
79
|
|
|
81
80
|
// Create the main component function
|
|
82
81
|
function SerializableViewComponent(props: P): ReactElement {
|
|
83
|
-
const { dataSource, bindingOptions, children, ...schemaProps } = props as
|
|
82
|
+
const { dataSource, bindingOptions, children, ...schemaProps } = props as P & { dataSource?: string; bindingOptions?: Record<string, unknown>; children?: ReactNode };
|
|
84
83
|
|
|
85
84
|
// Step 1: Handle content-prop strategy (map JSX children → content)
|
|
86
85
|
let propsForProcessing = schemaProps;
|
|
@@ -162,14 +161,15 @@ export function createSerializableView<P extends ViewProps>(
|
|
|
162
161
|
component[QWICKAPP_COMPONENT] = QWICKAPP_COMPONENT;
|
|
163
162
|
|
|
164
163
|
// Serialization methods
|
|
165
|
-
component.fromJson = function fromJson(data:
|
|
166
|
-
const { tagName
|
|
167
|
-
|
|
164
|
+
component.fromJson = function fromJson(data: unknown): ReactElement {
|
|
165
|
+
const typedData = data as { tagName?: string; version?: string; data?: unknown };
|
|
166
|
+
const { tagName: dataTagName, version: dataVersion, data: componentData } = typedData;
|
|
167
|
+
|
|
168
168
|
// Validate deserialization data
|
|
169
169
|
if (dataTagName !== tagName) {
|
|
170
170
|
throw new Error(`Tag name mismatch: expected ${tagName}, got ${dataTagName}`);
|
|
171
171
|
}
|
|
172
|
-
|
|
172
|
+
|
|
173
173
|
if (dataVersion !== version) {
|
|
174
174
|
console.warn(`Version mismatch for ${tagName}: expected ${version}, got ${dataVersion}`);
|
|
175
175
|
}
|
|
@@ -177,30 +177,31 @@ export function createSerializableView<P extends ViewProps>(
|
|
|
177
177
|
// Handle deserialization based on children strategy
|
|
178
178
|
if (childrenStrategy.mode === 'content-prop') {
|
|
179
179
|
const propName = childrenStrategy.propName || 'content';
|
|
180
|
-
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
181
|
+
const { children, ...rest } = componentData || {};
|
|
181
182
|
const contentData = { ...rest, [propName]: componentData?.[propName] || '' };
|
|
182
183
|
return React.createElement(component as ComponentType<P>, contentData as P);
|
|
183
184
|
} else {
|
|
184
185
|
// For react-children strategy, recursively deserialize children
|
|
185
|
-
const deserializedData = { ...componentData };
|
|
186
|
-
if (componentData.children !== undefined) {
|
|
187
|
-
//
|
|
188
|
-
|
|
189
|
-
deserializedData.children = ComponentTransformer.deserialize(componentData.children);
|
|
186
|
+
const deserializedData = { ...(componentData as Record<string, unknown>) };
|
|
187
|
+
if ((componentData as Record<string, unknown>).children !== undefined) {
|
|
188
|
+
// Recursively deserialize children using ComponentTransformer
|
|
189
|
+
deserializedData.children = ComponentTransformer.deserialize((componentData as Record<string, unknown>).children);
|
|
190
190
|
}
|
|
191
191
|
return React.createElement(component as ComponentType<P>, deserializedData as P);
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
component.toJson = function toJson(props: P):
|
|
195
|
+
component.toJson = function toJson(props: P): unknown {
|
|
196
196
|
// Handle serialization based on children strategy
|
|
197
197
|
if (childrenStrategy.mode === 'content-prop') {
|
|
198
198
|
const propName = childrenStrategy.propName || 'content';
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
|
|
199
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
200
|
+
const { children, ...rest } = props || {};
|
|
201
|
+
const contentValue = (props as Record<string, unknown>)?.[propName] ?? toText((props as Record<string, unknown>)?.children as ReactNode);
|
|
202
|
+
|
|
202
203
|
// Clean props for content-prop serialization
|
|
203
|
-
const cleanProps:
|
|
204
|
+
const cleanProps: Record<string, unknown> = {};
|
|
204
205
|
for (const [key, value] of Object.entries(rest)) {
|
|
205
206
|
if (typeof value === 'function' && key.startsWith('on')) {
|
|
206
207
|
cleanProps[key] = value.toString();
|
|
@@ -216,7 +217,7 @@ export function createSerializableView<P extends ViewProps>(
|
|
|
216
217
|
};
|
|
217
218
|
} else {
|
|
218
219
|
// Handle react-children strategy (existing logic)
|
|
219
|
-
const cleanProps:
|
|
220
|
+
const cleanProps: unknown = {};
|
|
220
221
|
|
|
221
222
|
for (const [key, value] of Object.entries(props)) {
|
|
222
223
|
if (typeof value === 'function' && key.startsWith('on')) {
|
|
@@ -257,7 +258,7 @@ export type SerializableViewComponent<P extends ViewProps> = SerializableCompone
|
|
|
257
258
|
/**
|
|
258
259
|
* Type guard to check if a component is serializable
|
|
259
260
|
*/
|
|
260
|
-
export function isSerializableComponent(component:
|
|
261
|
+
export function isSerializableComponent(component: unknown): component is SerializableComponent<unknown> {
|
|
261
262
|
return component &&
|
|
262
263
|
typeof component === 'function' &&
|
|
263
264
|
typeof component.tagName === 'string' &&
|
|
@@ -270,7 +271,7 @@ export function isSerializableComponent(component: any): component is Serializab
|
|
|
270
271
|
/**
|
|
271
272
|
* Extract component metadata for registration
|
|
272
273
|
*/
|
|
273
|
-
export function getComponentMetadata(component: SerializableComponent<
|
|
274
|
+
export function getComponentMetadata(component: SerializableComponent<unknown>) {
|
|
274
275
|
return {
|
|
275
276
|
tagName: component.tagName,
|
|
276
277
|
version: component.version,
|
|
@@ -29,17 +29,17 @@ export interface ViewProps extends SchemaProps<ViewSchema>, WithDataBinding {
|
|
|
29
29
|
/**
|
|
30
30
|
* Type for string event handlers in schema
|
|
31
31
|
*/
|
|
32
|
-
type EventHandlerValue = string | React.MouseEventHandler<
|
|
32
|
+
type EventHandlerValue = string | React.MouseEventHandler<unknown> | React.FocusEventHandler<unknown> | undefined;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Runtime event handler conversion map
|
|
36
36
|
*/
|
|
37
37
|
interface EventHandlers {
|
|
38
|
-
onClick?: React.MouseEventHandler<
|
|
39
|
-
onMouseEnter?: React.MouseEventHandler<
|
|
40
|
-
onMouseLeave?: React.MouseEventHandler<
|
|
41
|
-
onFocus?: React.FocusEventHandler<
|
|
42
|
-
onBlur?: React.FocusEventHandler<
|
|
38
|
+
onClick?: React.MouseEventHandler<unknown>;
|
|
39
|
+
onMouseEnter?: React.MouseEventHandler<unknown>;
|
|
40
|
+
onMouseLeave?: React.MouseEventHandler<unknown>;
|
|
41
|
+
onFocus?: React.FocusEventHandler<unknown>;
|
|
42
|
+
onBlur?: React.FocusEventHandler<unknown>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -49,21 +49,21 @@ interface EventHandlers {
|
|
|
49
49
|
*/
|
|
50
50
|
function parseEventHandlers(eventHandlers: Record<string, EventHandlerValue>): EventHandlers {
|
|
51
51
|
const result: EventHandlers = {};
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
for (const [key, value] of Object.entries(eventHandlers)) {
|
|
54
54
|
if (typeof value === 'string' && value.trim()) {
|
|
55
55
|
try {
|
|
56
56
|
// Convert string to function - safe eval for event handlers
|
|
57
57
|
// This creates a function that executes the string as code
|
|
58
58
|
const func = new Function('event', value);
|
|
59
|
-
result[key as keyof EventHandlers] = func as
|
|
59
|
+
result[key as keyof EventHandlers] = func as React.MouseEventHandler<unknown> | React.FocusEventHandler<unknown>;
|
|
60
60
|
} catch (error) {
|
|
61
61
|
console.warn(`Invalid event handler string for ${key}:`, value, error);
|
|
62
62
|
// Keep as undefined for invalid handlers
|
|
63
63
|
}
|
|
64
64
|
} else if (typeof value === 'function') {
|
|
65
65
|
// Already a function, use as-is
|
|
66
|
-
result[key as keyof EventHandlers] = value as
|
|
66
|
+
result[key as keyof EventHandlers] = value as React.MouseEventHandler<unknown> | React.FocusEventHandler<unknown>;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -187,7 +187,7 @@ export function normalizeViewProps<T extends ViewProps>(props: T): T & BaseCompo
|
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
// Canonicalize background prop (backgroundColor → background)
|
|
190
|
-
const canonicalBackground = (restProps as
|
|
190
|
+
const canonicalBackground = (restProps as { background?: string }).background ?? backgroundColor;
|
|
191
191
|
|
|
192
192
|
// Return normalized props with proper typing
|
|
193
193
|
const normalized = {
|
|
@@ -201,7 +201,7 @@ export function normalizeViewProps<T extends ViewProps>(props: T): T & BaseCompo
|
|
|
201
201
|
} as T & BaseComponentProps;
|
|
202
202
|
|
|
203
203
|
// Remove backgroundColor to avoid duplication
|
|
204
|
-
delete (normalized as
|
|
204
|
+
delete (normalized as T & BaseComponentProps & { backgroundColor?: string }).backgroundColor;
|
|
205
205
|
|
|
206
206
|
return normalized;
|
|
207
207
|
}
|
package/src/config/AppConfig.ts
CHANGED
|
@@ -73,7 +73,7 @@ export class AppConfig implements IAppConfig {
|
|
|
73
73
|
/**
|
|
74
74
|
* Generate PWA manifest
|
|
75
75
|
*/
|
|
76
|
-
get pwaManifest(): Record<string,
|
|
76
|
+
get pwaManifest(): Record<string, unknown> {
|
|
77
77
|
return {
|
|
78
78
|
name: this.app.name,
|
|
79
79
|
short_name: this.app.shortName,
|
|
@@ -102,7 +102,7 @@ export class AppConfig implements IAppConfig {
|
|
|
102
102
|
/**
|
|
103
103
|
* Convert to plain object (for serialization)
|
|
104
104
|
*/
|
|
105
|
-
toJSON(): Record<string,
|
|
105
|
+
toJSON(): Record<string, unknown> {
|
|
106
106
|
return {
|
|
107
107
|
app: this.app,
|
|
108
108
|
build: this.build,
|
|
@@ -79,11 +79,11 @@ describe('AppConfig', () => {
|
|
|
79
79
|
|
|
80
80
|
// Attempt to modify should fail
|
|
81
81
|
expect(() => {
|
|
82
|
-
(config.app as
|
|
82
|
+
(config.app as { name: string }).name = 'Modified Name';
|
|
83
83
|
}).toThrow();
|
|
84
84
|
|
|
85
85
|
expect(() => {
|
|
86
|
-
(config.build as
|
|
86
|
+
(config.build as { port: number }).port = 4000;
|
|
87
87
|
}).toThrow();
|
|
88
88
|
});
|
|
89
89
|
});
|
|
@@ -319,7 +319,7 @@ describe('AppConfig', () => {
|
|
|
319
319
|
});
|
|
320
320
|
|
|
321
321
|
expect(() => {
|
|
322
|
-
(newConfig.app as
|
|
322
|
+
(newConfig.app as { name: string }).name = 'Another Name';
|
|
323
323
|
}).toThrow();
|
|
324
324
|
});
|
|
325
325
|
});
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as fs from 'fs';
|
|
10
|
-
import * as path from 'path';
|
|
11
10
|
import { AppConfigBuilder } from '../AppConfigBuilder';
|
|
12
11
|
import { AppConfig } from '../AppConfig';
|
|
13
12
|
|
|
@@ -164,7 +163,7 @@ describe('AppConfigBuilder', () => {
|
|
|
164
163
|
AppConfigBuilder.create()
|
|
165
164
|
.withName('Test App')
|
|
166
165
|
.withId('test-app')
|
|
167
|
-
.withPort(3000.5 as
|
|
166
|
+
.withPort(3000.5 as unknown as number)
|
|
168
167
|
.build();
|
|
169
168
|
}).toThrow('Port must be a valid integer between 1 and 65535');
|
|
170
169
|
});
|
|
@@ -206,9 +205,9 @@ describe('AppConfigBuilder', () => {
|
|
|
206
205
|
});
|
|
207
206
|
|
|
208
207
|
it('should skip validation when skipValidation option is true', () => {
|
|
209
|
-
|
|
208
|
+
jest.spyOn(console, 'warn').mockImplementation();
|
|
210
209
|
|
|
211
|
-
|
|
210
|
+
AppConfigBuilder.create()
|
|
212
211
|
.withOptions({ skipValidation: true })
|
|
213
212
|
.withName('Test App')
|
|
214
213
|
.withId('test-app')
|
|
@@ -241,9 +240,9 @@ describe('AppConfigBuilder', () => {
|
|
|
241
240
|
});
|
|
242
241
|
|
|
243
242
|
it('should accept named colors', () => {
|
|
244
|
-
|
|
243
|
+
jest.spyOn(console, 'warn').mockImplementation();
|
|
245
244
|
|
|
246
|
-
|
|
245
|
+
AppConfigBuilder.create()
|
|
247
246
|
.withName('Test App')
|
|
248
247
|
.withId('test-app')
|
|
249
248
|
.withThemeColor('red')
|
|
@@ -258,7 +257,7 @@ describe('AppConfigBuilder', () => {
|
|
|
258
257
|
it('should warn for potentially invalid colors', () => {
|
|
259
258
|
const consoleWarn = jest.spyOn(console, 'warn').mockImplementation();
|
|
260
259
|
|
|
261
|
-
|
|
260
|
+
AppConfigBuilder.create()
|
|
262
261
|
.withName('Test App')
|
|
263
262
|
.withId('test-app')
|
|
264
263
|
.withThemeColor('invalid-color')
|
|
@@ -330,7 +329,7 @@ describe('AppConfigBuilder', () => {
|
|
|
330
329
|
throw new Error('File not found');
|
|
331
330
|
});
|
|
332
331
|
|
|
333
|
-
|
|
332
|
+
AppConfigBuilder.create()
|
|
334
333
|
.withConfig('./missing.json')
|
|
335
334
|
.withName('Test App')
|
|
336
335
|
.withId('test-app')
|
|
@@ -403,7 +402,7 @@ describe('AppConfigBuilder', () => {
|
|
|
403
402
|
AppConfigBuilder.create()
|
|
404
403
|
.withPort(0)
|
|
405
404
|
.build();
|
|
406
|
-
} catch (error:
|
|
405
|
+
} catch (error: unknown) {
|
|
407
406
|
const message = error.message;
|
|
408
407
|
expect(message).toContain('App name is required');
|
|
409
408
|
expect(message).toContain('App ID is required');
|
|
@@ -421,11 +420,11 @@ describe('AppConfigBuilder', () => {
|
|
|
421
420
|
|
|
422
421
|
// Attempt to modify the configuration should not work
|
|
423
422
|
expect(() => {
|
|
424
|
-
(config.app as
|
|
423
|
+
(config.app as { name: string }).name = 'Modified Name';
|
|
425
424
|
}).toThrow();
|
|
426
425
|
|
|
427
426
|
expect(() => {
|
|
428
|
-
(config as
|
|
427
|
+
(config as { app: unknown }).app = { name: 'New App' };
|
|
429
428
|
}).toThrow();
|
|
430
429
|
});
|
|
431
430
|
});
|