@qwickapps/react-framework 1.3.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/LICENSE +44 -0
- package/README.md +794 -0
- package/dist/components/AccessibilityChecker.d.ts +12 -0
- package/dist/components/AccessibilityChecker.d.ts.map +1 -0
- package/dist/components/Html.d.ts +48 -0
- package/dist/components/Html.d.ts.map +1 -0
- package/dist/components/Logo.d.ts +79 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/Markdown.d.ts +47 -0
- package/dist/components/Markdown.d.ts.map +1 -0
- package/dist/components/QwickApp.d.ts +56 -0
- package/dist/components/QwickApp.d.ts.map +1 -0
- package/dist/components/QwickAppsLogo.d.ts +25 -0
- package/dist/components/QwickAppsLogo.d.ts.map +1 -0
- package/dist/components/ResponsiveMenu.d.ts +38 -0
- package/dist/components/ResponsiveMenu.d.ts.map +1 -0
- package/dist/components/SafeSpan.d.ts +23 -0
- package/dist/components/SafeSpan.d.ts.map +1 -0
- package/dist/components/Scaffold.d.ts +57 -0
- package/dist/components/Scaffold.d.ts.map +1 -0
- package/dist/components/blocks/Article.d.ts +23 -0
- package/dist/components/blocks/Article.d.ts.map +1 -0
- package/dist/components/blocks/CardListGrid.d.ts +23 -0
- package/dist/components/blocks/CardListGrid.d.ts.map +1 -0
- package/dist/components/blocks/Code.d.ts +21 -0
- package/dist/components/blocks/Code.d.ts.map +1 -0
- package/dist/components/blocks/Content.d.ts +24 -0
- package/dist/components/blocks/Content.d.ts.map +1 -0
- package/dist/components/blocks/CoverImageHeader.d.ts +44 -0
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -0
- package/dist/components/blocks/FeatureCard.d.ts +66 -0
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -0
- package/dist/components/blocks/FeatureGrid.d.ts +48 -0
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -0
- package/dist/components/blocks/Footer.d.ts +56 -0
- package/dist/components/blocks/Footer.d.ts.map +1 -0
- package/dist/components/blocks/HeroBlock.d.ts +33 -0
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -0
- package/dist/components/blocks/PageBannerHeader.d.ts +30 -0
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -0
- package/dist/components/blocks/ProductCard.d.ts +57 -0
- package/dist/components/blocks/ProductCard.d.ts.map +1 -0
- package/dist/components/blocks/Section.d.ts +40 -0
- package/dist/components/blocks/Section.d.ts.map +1 -0
- package/dist/components/blocks/index.d.ts +37 -0
- package/dist/components/blocks/index.d.ts.map +1 -0
- package/dist/components/buttons/Button.d.ts +38 -0
- package/dist/components/buttons/Button.d.ts.map +1 -0
- package/dist/components/buttons/PaletteSwitcher.d.ts +24 -0
- package/dist/components/buttons/PaletteSwitcher.d.ts.map +1 -0
- package/dist/components/buttons/ThemeSwitcher.d.ts +24 -0
- package/dist/components/buttons/ThemeSwitcher.d.ts.map +1 -0
- package/dist/components/buttons/index.d.ts +11 -0
- package/dist/components/buttons/index.d.ts.map +1 -0
- package/dist/components/forms/FormBlock.d.ts +45 -0
- package/dist/components/forms/FormBlock.d.ts.map +1 -0
- package/dist/components/forms/index.d.ts +8 -0
- package/dist/components/forms/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/ChoiceInputField.d.ts +30 -0
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -0
- package/dist/components/input/HtmlInputField.d.ts +29 -0
- package/dist/components/input/HtmlInputField.d.ts.map +1 -0
- package/dist/components/input/SelectInputField.d.ts +29 -0
- package/dist/components/input/SelectInputField.d.ts.map +1 -0
- package/dist/components/input/TextField.d.ts +18 -0
- package/dist/components/input/TextField.d.ts.map +1 -0
- package/dist/components/input/TextInputField.d.ts +32 -0
- package/dist/components/input/TextInputField.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +17 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/layout/GridCell.d.ts +16 -0
- package/dist/components/layout/GridCell.d.ts.map +1 -0
- package/dist/components/layout/GridCellWrapper.d.ts +46 -0
- package/dist/components/layout/GridCellWrapper.d.ts.map +1 -0
- package/dist/components/layout/GridLayout.d.ts +38 -0
- package/dist/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +12 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/menu/Menu.d.ts +1 -0
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/MenuItem.d.ts +31 -0
- package/dist/components/menu/MenuItem.d.ts.map +1 -0
- package/dist/components/menu/index.d.ts +7 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/pages/FormPage.d.ts +66 -0
- package/dist/components/pages/FormPage.d.ts.map +1 -0
- package/dist/components/pages/Page.d.ts +124 -0
- package/dist/components/pages/Page.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +11 -0
- package/dist/components/pages/index.d.ts.map +1 -0
- package/dist/contexts/DataContext.d.ts +139 -0
- package/dist/contexts/DataContext.d.ts.map +1 -0
- package/dist/contexts/DimensionsContext.d.ts +42 -0
- package/dist/contexts/DimensionsContext.d.ts.map +1 -0
- package/dist/contexts/PaletteContext.d.ts +53 -0
- package/dist/contexts/PaletteContext.d.ts.map +1 -0
- package/dist/contexts/QwickAppContext.d.ts +71 -0
- package/dist/contexts/QwickAppContext.d.ts.map +1 -0
- package/dist/contexts/ThemeContext.d.ts +65 -0
- package/dist/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/contexts/index.d.ts +9 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useBaseProps.d.ts +101 -0
- package/dist/hooks/useBaseProps.d.ts.map +1 -0
- package/dist/hooks/useDataBinding.d.ts +22 -0
- package/dist/hooks/useDataBinding.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.css +1 -0
- package/dist/index.esm.js +24143 -0
- package/dist/index.js +24245 -0
- package/dist/palettes/PaletteAutumn.d.ts +10 -0
- package/dist/palettes/PaletteAutumn.d.ts.map +1 -0
- package/dist/palettes/PaletteCosmic.d.ts +10 -0
- package/dist/palettes/PaletteCosmic.d.ts.map +1 -0
- package/dist/palettes/PaletteDefault.d.ts +10 -0
- package/dist/palettes/PaletteDefault.d.ts.map +1 -0
- package/dist/palettes/PaletteOcean.d.ts +10 -0
- package/dist/palettes/PaletteOcean.d.ts.map +1 -0
- package/dist/palettes/PaletteSpring.d.ts +10 -0
- package/dist/palettes/PaletteSpring.d.ts.map +1 -0
- package/dist/palettes/PaletteWinter.d.ts +10 -0
- package/dist/palettes/PaletteWinter.d.ts.map +1 -0
- package/dist/palettes/index.d.ts +13 -0
- package/dist/palettes/index.d.ts.map +1 -0
- package/dist/schemas/ActionSchema.d.ts +21 -0
- package/dist/schemas/ActionSchema.d.ts.map +1 -0
- package/dist/schemas/ArticleSchema.d.ts +13 -0
- package/dist/schemas/ArticleSchema.d.ts.map +1 -0
- package/dist/schemas/Builders.d.ts +7 -0
- package/dist/schemas/Builders.d.ts.map +1 -0
- package/dist/schemas/ButtonSchema.d.ts +19 -0
- package/dist/schemas/ButtonSchema.d.ts.map +1 -0
- package/dist/schemas/CardListGridSchema.d.ts +17 -0
- package/dist/schemas/CardListGridSchema.d.ts.map +1 -0
- package/dist/schemas/ChoiceInputFieldSchema.d.ts +18 -0
- package/dist/schemas/ChoiceInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/CodeSchema.d.ts +18 -0
- package/dist/schemas/CodeSchema.d.ts.map +1 -0
- package/dist/schemas/ContentSchema.d.ts +20 -0
- package/dist/schemas/ContentSchema.d.ts.map +1 -0
- package/dist/schemas/CoverImageHeaderSchema.d.ts +28 -0
- package/dist/schemas/CoverImageHeaderSchema.d.ts.map +1 -0
- package/dist/schemas/FeatureCardSchema.d.ts +28 -0
- package/dist/schemas/FeatureCardSchema.d.ts.map +1 -0
- package/dist/schemas/FeatureGridSchema.d.ts +17 -0
- package/dist/schemas/FeatureGridSchema.d.ts.map +1 -0
- package/dist/schemas/FeatureItemSchema.d.ts +16 -0
- package/dist/schemas/FeatureItemSchema.d.ts.map +1 -0
- package/dist/schemas/FooterItemSchema.d.ts +15 -0
- package/dist/schemas/FooterItemSchema.d.ts.map +1 -0
- package/dist/schemas/FooterSchema.d.ts +20 -0
- package/dist/schemas/FooterSchema.d.ts.map +1 -0
- package/dist/schemas/FooterSectionSchema.d.ts +15 -0
- package/dist/schemas/FooterSectionSchema.d.ts.map +1 -0
- package/dist/schemas/FormBlockSchema.d.ts +19 -0
- package/dist/schemas/FormBlockSchema.d.ts.map +1 -0
- package/dist/schemas/HeaderActionSchema.d.ts +17 -0
- package/dist/schemas/HeaderActionSchema.d.ts.map +1 -0
- package/dist/schemas/HeroBlockSchema.d.ts +22 -0
- package/dist/schemas/HeroBlockSchema.d.ts.map +1 -0
- package/dist/schemas/HtmlInputFieldSchema.d.ts +18 -0
- package/dist/schemas/HtmlInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/MetadataItemSchema.d.ts +13 -0
- package/dist/schemas/MetadataItemSchema.d.ts.map +1 -0
- package/dist/schemas/PageBannerHeaderSchema.d.ts +28 -0
- package/dist/schemas/PageBannerHeaderSchema.d.ts.map +1 -0
- package/dist/schemas/PaletteSwitcherSchema.d.ts +16 -0
- package/dist/schemas/PaletteSwitcherSchema.d.ts.map +1 -0
- package/dist/schemas/ProductCardSchema.d.ts +39 -0
- package/dist/schemas/ProductCardSchema.d.ts.map +1 -0
- package/dist/schemas/SafeSpanSchema.d.ts +13 -0
- package/dist/schemas/SafeSpanSchema.d.ts.map +1 -0
- package/dist/schemas/SectionSchema.d.ts +17 -0
- package/dist/schemas/SectionSchema.d.ts.map +1 -0
- package/dist/schemas/SelectInputFieldSchema.d.ts +27 -0
- package/dist/schemas/SelectInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/TextInputFieldSchema.d.ts +22 -0
- package/dist/schemas/TextInputFieldSchema.d.ts.map +1 -0
- package/dist/schemas/ThemeSwitcherSchema.d.ts +19 -0
- package/dist/schemas/ThemeSwitcherSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +33 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/types.d.ts +7 -0
- package/dist/schemas/types.d.ts.map +1 -0
- package/dist/templates/TemplateResolver.d.ts +52 -0
- package/dist/templates/TemplateResolver.d.ts.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/tests/ConsoleWarningTest.d.ts +5 -0
- package/dist/tests/ConsoleWarningTest.d.ts.map +1 -0
- package/dist/tests/StorageKeyTest.d.ts +6 -0
- package/dist/tests/StorageKeyTest.d.ts.map +1 -0
- package/dist/tests/ThemeStorageKeyTest.d.ts +6 -0
- package/dist/tests/ThemeStorageKeyTest.d.ts.map +1 -0
- package/dist/types/CacheProvider.d.ts +18 -0
- package/dist/types/CacheProvider.d.ts.map +1 -0
- package/dist/types/ContentProxy.d.ts +47 -0
- package/dist/types/ContentProxy.d.ts.map +1 -0
- package/dist/types/DataBinding.d.ts +7 -0
- package/dist/types/DataBinding.d.ts.map +1 -0
- package/dist/types/DataProvider.d.ts +7 -0
- package/dist/types/DataProvider.d.ts.map +1 -0
- package/dist/types/DataTypes.d.ts +185 -0
- package/dist/types/DataTypes.d.ts.map +1 -0
- package/dist/types/TemplateProvider.d.ts +10 -0
- package/dist/types/TemplateProvider.d.ts.map +1 -0
- package/dist/types/TemplateResolver.d.ts +23 -0
- package/dist/types/TemplateResolver.d.ts.map +1 -0
- package/dist/types/index.d.ts +81 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/breakpoints.d.ts +35 -0
- package/dist/utils/breakpoints.d.ts.map +1 -0
- package/dist/utils/customPaletteManager.d.ts +8 -0
- package/dist/utils/customPaletteManager.d.ts.map +1 -0
- package/dist/utils/dimensions.d.ts +34 -0
- package/dist/utils/dimensions.d.ts.map +1 -0
- package/dist/utils/htmlTransform.d.ts +44 -0
- package/dist/utils/htmlTransform.d.ts.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/paletteUtils.d.ts +38 -0
- package/dist/utils/paletteUtils.d.ts.map +1 -0
- package/dist/utils/persistenceUtils.d.ts +31 -0
- package/dist/utils/persistenceUtils.d.ts.map +1 -0
- package/dist/utils/reactUtils.d.ts +24 -0
- package/dist/utils/reactUtils.d.ts.map +1 -0
- package/dist/utils/spacing.d.ts +34 -0
- package/dist/utils/spacing.d.ts.map +1 -0
- package/dist/utils/themePerformanceMonitor.d.ts +32 -0
- package/dist/utils/themePerformanceMonitor.d.ts.map +1 -0
- package/dist/utils/themeUtils.d.ts +27 -0
- package/dist/utils/themeUtils.d.ts.map +1 -0
- package/package.json +141 -0
- package/src/__tests__/components/Logo.test.js +172 -0
- package/src/__tests__/contexts/DataContext.test.js +505 -0
- package/src/__tests__/contexts/PaletteContext.test.js +115 -0
- package/src/__tests__/contexts/ThemeContext.test.js +123 -0
- package/src/__tests__/utils/paletteUtils.test.js +142 -0
- package/src/__tests__/utils/themeUtils.test.js +142 -0
- package/src/components/AccessibilityChecker.tsx +264 -0
- package/src/components/Html.tsx +191 -0
- package/src/components/Logo.css +217 -0
- package/src/components/Logo.tsx +370 -0
- package/src/components/Markdown.tsx +191 -0
- package/src/components/QwickApp.css +257 -0
- package/src/components/QwickApp.tsx +157 -0
- package/src/components/QwickAppsLogo.tsx +77 -0
- package/src/components/ResponsiveMenu.css +416 -0
- package/src/components/ResponsiveMenu.tsx +310 -0
- package/src/components/SafeSpan.tsx +128 -0
- package/src/components/Scaffold.css +541 -0
- package/src/components/Scaffold.tsx +463 -0
- package/src/components/__tests__/Article.test.tsx +419 -0
- package/src/components/__tests__/Button.test.tsx +702 -0
- package/src/components/__tests__/CardListGrid.test.tsx +478 -0
- package/src/components/__tests__/ChoiceInputField.test.tsx +864 -0
- package/src/components/__tests__/Code.test.tsx +595 -0
- package/src/components/__tests__/Content.integration.test.tsx +193 -0
- package/src/components/__tests__/Content.test.tsx +504 -0
- package/src/components/__tests__/CoverImageHeader.test.tsx +456 -0
- package/src/components/__tests__/FeatureCard.integration.test.tsx +384 -0
- package/src/components/__tests__/FeatureGrid.integration.test.tsx +364 -0
- package/src/components/__tests__/FeatureGrid.test.tsx +494 -0
- package/src/components/__tests__/Footer.test.tsx +544 -0
- package/src/components/__tests__/FormBlock.test.tsx +857 -0
- package/src/components/__tests__/HeroBlock.integration.test.tsx +272 -0
- package/src/components/__tests__/HeroBlock.test.tsx +463 -0
- package/src/components/__tests__/Html.test.tsx +174 -0
- package/src/components/__tests__/HtmlInputField.test.tsx +856 -0
- package/src/components/__tests__/Markdown.test.tsx +233 -0
- package/src/components/__tests__/PageBannerHeader.test.tsx +614 -0
- package/src/components/__tests__/PaletteSwitcher.test.tsx +864 -0
- package/src/components/__tests__/ProductCard.test.tsx +377 -0
- package/src/components/__tests__/SafeSpan.integration.test.tsx +123 -0
- package/src/components/__tests__/SafeSpan.simple.test.tsx +65 -0
- package/src/components/__tests__/SafeSpan.test.tsx +388 -0
- package/src/components/__tests__/Section.integration.test.tsx +288 -0
- package/src/components/__tests__/Section.test.tsx +494 -0
- package/src/components/__tests__/SelectInputField.test.tsx +886 -0
- package/src/components/__tests__/TextInputField.test.tsx +749 -0
- package/src/components/__tests__/ThemeSwitcher.test.tsx +777 -0
- package/src/components/blocks/Article.tsx +194 -0
- package/src/components/blocks/CardListGrid.tsx +132 -0
- package/src/components/blocks/Code.tsx +313 -0
- package/src/components/blocks/Content.tsx +265 -0
- package/src/components/blocks/CoverImageHeader.css +17 -0
- package/src/components/blocks/CoverImageHeader.tsx +435 -0
- package/src/components/blocks/FeatureCard.tsx +321 -0
- package/src/components/blocks/FeatureGrid.tsx +147 -0
- package/src/components/blocks/Footer.tsx +343 -0
- package/src/components/blocks/HeroBlock.tsx +280 -0
- package/src/components/blocks/PageBannerHeader.tsx +471 -0
- package/src/components/blocks/ProductCard.tsx +472 -0
- package/src/components/blocks/Section.tsx +209 -0
- package/src/components/blocks/index.ts +37 -0
- package/src/components/buttons/Button.tsx +233 -0
- package/src/components/buttons/PaletteSwitcher.tsx +268 -0
- package/src/components/buttons/ThemeSwitcher.tsx +283 -0
- package/src/components/buttons/index.ts +11 -0
- package/src/components/forms/FormBlock.tsx +291 -0
- package/src/components/forms/index.ts +7 -0
- package/src/components/index.ts +37 -0
- package/src/components/input/ChoiceInputField.tsx +188 -0
- package/src/components/input/HtmlInputField.tsx +326 -0
- package/src/components/input/SelectInputField.tsx +197 -0
- package/src/components/input/TextField.tsx +47 -0
- package/src/components/input/TextInputField.tsx +144 -0
- package/src/components/input/index.ts +17 -0
- package/src/components/layout/GridCell.tsx +46 -0
- package/src/components/layout/GridCellWrapper.tsx +87 -0
- package/src/components/layout/GridLayout.tsx +169 -0
- package/src/components/layout/index.ts +13 -0
- package/src/components/menu/Menu.tsx +0 -0
- package/src/components/menu/MenuItem.tsx +32 -0
- package/src/components/menu/index.ts +6 -0
- package/src/components/pages/FormPage.tsx +108 -0
- package/src/components/pages/Page.css +460 -0
- package/src/components/pages/Page.tsx +345 -0
- package/src/components/pages/index.ts +11 -0
- package/src/contexts/DataContext.tsx +355 -0
- package/src/contexts/DimensionsContext.tsx +154 -0
- package/src/contexts/PaletteContext.tsx +217 -0
- package/src/contexts/QwickAppContext.tsx +95 -0
- package/src/contexts/ThemeContext.tsx +376 -0
- package/src/contexts/index.ts +9 -0
- package/src/hooks/__tests__/useDataBinding.test.tsx.disabled +229 -0
- package/src/hooks/index.ts +11 -0
- package/src/hooks/useBaseProps.ts +267 -0
- package/src/hooks/useDataBinding.ts +77 -0
- package/src/index.ts +23 -0
- package/src/palettes/PaletteAutumn.css +172 -0
- package/src/palettes/PaletteAutumn.ts +16 -0
- package/src/palettes/PaletteCosmic.css +172 -0
- package/src/palettes/PaletteCosmic.ts +16 -0
- package/src/palettes/PaletteDefault.css +178 -0
- package/src/palettes/PaletteDefault.ts +17 -0
- package/src/palettes/PaletteOcean.css +172 -0
- package/src/palettes/PaletteOcean.ts +16 -0
- package/src/palettes/PaletteSpring.css +160 -0
- package/src/palettes/PaletteSpring.ts +16 -0
- package/src/palettes/PaletteWinter.css +172 -0
- package/src/palettes/PaletteWinter.ts +16 -0
- package/src/palettes/index.css +12 -0
- package/src/palettes/index.ts +29 -0
- package/src/schemas/ActionSchema.ts +140 -0
- package/src/schemas/ArticleSchema.ts +35 -0
- package/src/schemas/ButtonSchema.ts +99 -0
- package/src/schemas/CardListGridSchema.ts +102 -0
- package/src/schemas/ChoiceInputFieldSchema.ts +89 -0
- package/src/schemas/CodeSchema.ts +88 -0
- package/src/schemas/ContentSchema.ts +128 -0
- package/src/schemas/CoverImageHeaderSchema.ts +208 -0
- package/src/schemas/FeatureCardSchema.ts +161 -0
- package/src/schemas/FeatureGridSchema.ts +87 -0
- package/src/schemas/FeatureItemSchema.ts +68 -0
- package/src/schemas/FooterItemSchema.ts +57 -0
- package/src/schemas/FooterSchema.ts +116 -0
- package/src/schemas/FooterSectionSchema.ts +50 -0
- package/src/schemas/FormBlockSchema.ts +102 -0
- package/src/schemas/HeaderActionSchema.ts +83 -0
- package/src/schemas/HeroBlockSchema.ts +149 -0
- package/src/schemas/HtmlInputFieldSchema.ts +88 -0
- package/src/schemas/MetadataItemSchema.ts +35 -0
- package/src/schemas/PageBannerHeaderSchema.ts +206 -0
- package/src/schemas/PaletteSwitcherSchema.ts +66 -0
- package/src/schemas/ProductCardSchema.ts +264 -0
- package/src/schemas/SafeSpanSchema.ts +36 -0
- package/src/schemas/SectionSchema.ts +106 -0
- package/src/schemas/SelectInputFieldSchema.ts +137 -0
- package/src/schemas/TextInputFieldSchema.ts +129 -0
- package/src/schemas/ThemeSwitcherSchema.ts +97 -0
- package/src/schemas/__tests__/builders.test.ts +313 -0
- package/src/schemas/index.ts +34 -0
- package/src/setupTests.js +60 -0
- package/src/stories/Article.stories.tsx +549 -0
- package/src/stories/Button.stories.tsx +498 -0
- package/src/stories/CardListGrid.stories.tsx +539 -0
- package/src/stories/ChoiceInputField.stories.tsx +591 -0
- package/src/stories/Code.stories.tsx +711 -0
- package/src/stories/Content.stories.tsx +463 -0
- package/src/stories/CoverImageHeader.stories.tsx +794 -0
- package/src/stories/DataBinding.advanced.stories.tsx +548 -0
- package/src/stories/DataBinding.stories.tsx +452 -0
- package/src/stories/DataProvider.stories.tsx +1361 -0
- package/src/stories/FeatureCard.stories.tsx +642 -0
- package/src/stories/FeatureGrid.stories.tsx +669 -0
- package/src/stories/Footer.stories.tsx +724 -0
- package/src/stories/FormBlock.stories.tsx +834 -0
- package/src/stories/HeroBlock.stories.tsx +442 -0
- package/src/stories/Html.stories.tsx +264 -0
- package/src/stories/HtmlInputField.stories.tsx +558 -0
- package/src/stories/Introduction.stories.tsx +721 -0
- package/src/stories/LayoutBlocks.stories.tsx +382 -0
- package/src/stories/LayoutSystem.stories.tsx +253 -0
- package/src/stories/Logo.stories.tsx +400 -0
- package/src/stories/Markdown.stories.tsx +349 -0
- package/src/stories/Page.stories.tsx +762 -0
- package/src/stories/PageBannerHeader.stories.tsx +949 -0
- package/src/stories/PaletteSwitcher.stories.tsx +156 -0
- package/src/stories/ProductCard.stories.tsx +504 -0
- package/src/stories/QwickApp.stories.tsx +461 -0
- package/src/stories/ResponsiveMenu.stories.tsx +299 -0
- package/src/stories/SafeSpan.stories.tsx +612 -0
- package/src/stories/Section.stories.tsx +613 -0
- package/src/stories/SelectInputField.stories.tsx +605 -0
- package/src/stories/TextInputField.stories.tsx +526 -0
- package/src/stories/ThemeSwitcher.stories.tsx +170 -0
- package/src/stories/form/FormComponents.stories.tsx +588 -0
- package/src/templates/TemplateResolver.ts +156 -0
- package/src/templates/index.ts +6 -0
- package/src/tests/ConsoleWarningTest.tsx +30 -0
- package/src/tests/StorageKeyTest.tsx +110 -0
- package/src/tests/ThemeStorageKeyTest.tsx +114 -0
- package/src/types/CacheProvider.ts +14 -0
- package/src/types/ContentProxy.ts +99 -0
- package/src/types/DataTypes.ts +196 -0
- package/src/types/TemplateProvider.ts +9 -0
- package/src/types/TemplateResolver.ts +26 -0
- package/src/types/index.ts +99 -0
- package/src/utils/__tests__/createDataDrivenComponent.test.tsx.disabled +193 -0
- package/src/utils/__tests__/htmlTransform.test.tsx +255 -0
- package/src/utils/breakpoints.ts +87 -0
- package/src/utils/customPaletteManager.js +214 -0
- package/src/utils/dimensions.ts +147 -0
- package/src/utils/htmlTransform.tsx +323 -0
- package/src/utils/index.ts +16 -0
- package/src/utils/logger.ts +28 -0
- package/src/utils/paletteUtils.ts +78 -0
- package/src/utils/persistenceUtils.ts +107 -0
- package/src/utils/reactUtils.tsx +37 -0
- package/src/utils/spacing.ts +155 -0
- package/src/utils/themePerformanceMonitor.js +113 -0
- package/src/utils/themeUtils.ts +67 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeatureCard Schema - Schema definition for FeatureCard component
|
|
3
|
+
*
|
|
4
|
+
* Defines the data structure and form editors for the FeatureCard component
|
|
5
|
+
* using the declarative Model pattern with decorators.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { IsOptional, IsString, IsArray, IsIn, IsNumber, Min, Max, ValidateNested, IsNotEmpty } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import 'reflect-metadata';
|
|
13
|
+
import { Editor, Field, Schema, Model, FieldType, DataType } from '@qwickapps/schema';
|
|
14
|
+
import { FeatureItemModel } from './FeatureItemSchema';
|
|
15
|
+
|
|
16
|
+
@Schema('FeatureCardAction', '1.0.0')
|
|
17
|
+
export class FeatureCardActionModel extends Model {
|
|
18
|
+
@Field()
|
|
19
|
+
@Editor({
|
|
20
|
+
field_type: FieldType.TEXT,
|
|
21
|
+
label: 'Action ID',
|
|
22
|
+
description: 'Unique identifier for the action',
|
|
23
|
+
placeholder: 'action-1'
|
|
24
|
+
})
|
|
25
|
+
@IsString()
|
|
26
|
+
@IsNotEmpty()
|
|
27
|
+
id?: string;
|
|
28
|
+
|
|
29
|
+
@Field()
|
|
30
|
+
@Editor({
|
|
31
|
+
field_type: FieldType.TEXT,
|
|
32
|
+
label: 'Label',
|
|
33
|
+
description: 'Action button label',
|
|
34
|
+
placeholder: 'Button text...'
|
|
35
|
+
})
|
|
36
|
+
@IsString()
|
|
37
|
+
label?: string;
|
|
38
|
+
|
|
39
|
+
@Field()
|
|
40
|
+
@Editor({
|
|
41
|
+
field_type: FieldType.SELECT,
|
|
42
|
+
label: 'Style',
|
|
43
|
+
description: 'Button style variant',
|
|
44
|
+
validation: {
|
|
45
|
+
options: [
|
|
46
|
+
{ label: 'Contained', value: 'contained' },
|
|
47
|
+
{ label: 'Outlined', value: 'outlined' },
|
|
48
|
+
{ label: 'Text', value: 'text' }
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
@IsOptional()
|
|
53
|
+
@IsIn(['contained', 'outlined', 'text'])
|
|
54
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
55
|
+
|
|
56
|
+
@Field()
|
|
57
|
+
@Editor({
|
|
58
|
+
field_type: FieldType.SELECT,
|
|
59
|
+
label: 'Color',
|
|
60
|
+
description: 'Button color theme',
|
|
61
|
+
validation: {
|
|
62
|
+
options: [
|
|
63
|
+
{ label: 'Primary', value: 'primary' },
|
|
64
|
+
{ label: 'Secondary', value: 'secondary' },
|
|
65
|
+
{ label: 'Error', value: 'error' }
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
@IsOptional()
|
|
70
|
+
@IsIn(['primary', 'secondary', 'error'])
|
|
71
|
+
color?: 'primary' | 'secondary' | 'error';
|
|
72
|
+
|
|
73
|
+
@Field({ defaultValue: false })
|
|
74
|
+
@Editor({
|
|
75
|
+
field_type: FieldType.BOOLEAN,
|
|
76
|
+
label: 'Disabled',
|
|
77
|
+
description: 'Disabled state'
|
|
78
|
+
})
|
|
79
|
+
@IsOptional()
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@Schema('FeatureCard', '2.0.0')
|
|
84
|
+
export class FeatureCardModel extends Model {
|
|
85
|
+
@Field({ type: DataType.OBJECT })
|
|
86
|
+
@Editor({
|
|
87
|
+
field_type: FieldType.FORM,
|
|
88
|
+
label: 'Feature Data',
|
|
89
|
+
description: 'Single feature item to display'
|
|
90
|
+
})
|
|
91
|
+
@IsOptional()
|
|
92
|
+
@ValidateNested()
|
|
93
|
+
@Type(() => FeatureItemModel)
|
|
94
|
+
feature?: FeatureItemModel;
|
|
95
|
+
|
|
96
|
+
@Field({ type: DataType.ARRAY })
|
|
97
|
+
@Editor({
|
|
98
|
+
field_type: FieldType.REPEATER,
|
|
99
|
+
label: 'Features List',
|
|
100
|
+
description: 'List of feature strings for list variant'
|
|
101
|
+
})
|
|
102
|
+
@IsOptional()
|
|
103
|
+
@IsArray()
|
|
104
|
+
@IsString({ each: true })
|
|
105
|
+
features?: string[];
|
|
106
|
+
|
|
107
|
+
@Field({ defaultValue: 'standard' })
|
|
108
|
+
@Editor({
|
|
109
|
+
field_type: FieldType.SELECT,
|
|
110
|
+
label: 'Card Type',
|
|
111
|
+
description: 'Display variant for the feature card',
|
|
112
|
+
validation: {
|
|
113
|
+
options: [
|
|
114
|
+
{ label: 'Standard', value: 'standard' },
|
|
115
|
+
{ label: 'List', value: 'list' }
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
@IsOptional()
|
|
120
|
+
@IsIn(['standard', 'list'])
|
|
121
|
+
variant?: 'standard' | 'list';
|
|
122
|
+
|
|
123
|
+
@Field({ type: DataType.ARRAY })
|
|
124
|
+
@Editor({
|
|
125
|
+
field_type: FieldType.REPEATER,
|
|
126
|
+
label: 'Actions',
|
|
127
|
+
description: 'Custom action buttons'
|
|
128
|
+
})
|
|
129
|
+
@IsOptional()
|
|
130
|
+
@IsArray()
|
|
131
|
+
@ValidateNested({ each: true })
|
|
132
|
+
@Type(() => FeatureCardActionModel)
|
|
133
|
+
actions?: FeatureCardActionModel[];
|
|
134
|
+
|
|
135
|
+
@Field()
|
|
136
|
+
@Editor({
|
|
137
|
+
field_type: FieldType.TEXT,
|
|
138
|
+
label: 'Title',
|
|
139
|
+
description: 'Title for list variant',
|
|
140
|
+
placeholder: 'Enter card title...'
|
|
141
|
+
})
|
|
142
|
+
@IsOptional()
|
|
143
|
+
@IsString()
|
|
144
|
+
title?: string;
|
|
145
|
+
|
|
146
|
+
@Field()
|
|
147
|
+
@Editor({
|
|
148
|
+
field_type: FieldType.NUMBER,
|
|
149
|
+
label: 'Elevation',
|
|
150
|
+
description: 'Card elevation (0-24)',
|
|
151
|
+
validation: { min: 0, max: 24 }
|
|
152
|
+
})
|
|
153
|
+
@IsOptional()
|
|
154
|
+
@IsNumber()
|
|
155
|
+
@Min(0)
|
|
156
|
+
@Max(24)
|
|
157
|
+
elevation?: number;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
export default FeatureCardModel;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeatureGrid Schema - Defines data structure and validation for FeatureGrid component
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IsArray, IsOptional, IsNumber, IsIn, IsBoolean, IsString, ValidateNested, Min, Max } from 'class-validator';
|
|
8
|
+
import { Type } from 'class-transformer';
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
11
|
+
import { FeatureItemModel } from './FeatureItemSchema';
|
|
12
|
+
|
|
13
|
+
@Schema('FeatureGrid', '1.0.0')
|
|
14
|
+
export class FeatureGridModel extends Model {
|
|
15
|
+
@Field()
|
|
16
|
+
@Editor({
|
|
17
|
+
field_type: FieldType.REPEATER,
|
|
18
|
+
label: 'Features',
|
|
19
|
+
description: 'Array of feature items'
|
|
20
|
+
})
|
|
21
|
+
@IsArray()
|
|
22
|
+
@ValidateNested({ each: true })
|
|
23
|
+
@Type(() => FeatureItemModel)
|
|
24
|
+
features?: FeatureItemModel[];
|
|
25
|
+
|
|
26
|
+
@Field()
|
|
27
|
+
@Editor({
|
|
28
|
+
field_type: FieldType.SELECT,
|
|
29
|
+
label: 'Columns',
|
|
30
|
+
description: 'Number of columns in the grid',
|
|
31
|
+
validation: {
|
|
32
|
+
options: [
|
|
33
|
+
{ label: '1 Column', value: 1 },
|
|
34
|
+
{ label: '2 Columns', value: 2 },
|
|
35
|
+
{ label: '3 Columns', value: 3 },
|
|
36
|
+
{ label: '4 Columns', value: 4 },
|
|
37
|
+
{ label: '5 Columns', value: 5 },
|
|
38
|
+
{ label: '6 Columns', value: 6 }
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
@IsOptional()
|
|
43
|
+
@IsNumber()
|
|
44
|
+
@IsIn([1, 2, 3, 4, 5, 6])
|
|
45
|
+
columns?: number;
|
|
46
|
+
|
|
47
|
+
@Field()
|
|
48
|
+
@Editor({
|
|
49
|
+
field_type: FieldType.SELECT,
|
|
50
|
+
label: 'Gap',
|
|
51
|
+
description: 'Grid gap size',
|
|
52
|
+
validation: {
|
|
53
|
+
options: [
|
|
54
|
+
{ label: 'Small', value: 'small' },
|
|
55
|
+
{ label: 'Medium', value: 'medium' },
|
|
56
|
+
{ label: 'Large', value: 'large' }
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
@IsOptional()
|
|
61
|
+
@IsIn(['small', 'medium', 'large'])
|
|
62
|
+
gap?: 'small' | 'medium' | 'large';
|
|
63
|
+
|
|
64
|
+
@Field({ defaultValue: false })
|
|
65
|
+
@Editor({
|
|
66
|
+
field_type: FieldType.BOOLEAN,
|
|
67
|
+
label: 'Equal Height',
|
|
68
|
+
description: 'Whether all grid items should have equal height'
|
|
69
|
+
})
|
|
70
|
+
@IsOptional()
|
|
71
|
+
@IsBoolean()
|
|
72
|
+
equalHeight?: boolean;
|
|
73
|
+
|
|
74
|
+
@Field()
|
|
75
|
+
@Editor({
|
|
76
|
+
field_type: FieldType.TEXT,
|
|
77
|
+
label: 'CSS Class',
|
|
78
|
+
description: 'Additional CSS class name',
|
|
79
|
+
placeholder: 'custom-class'
|
|
80
|
+
})
|
|
81
|
+
@IsOptional()
|
|
82
|
+
@IsString()
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
export default FeatureGridModel;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeatureItem Schema - Defines data structure for individual feature items
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IsString, IsOptional, IsNotEmpty } from 'class-validator';
|
|
8
|
+
import 'reflect-metadata';
|
|
9
|
+
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
10
|
+
|
|
11
|
+
@Schema('FeatureItem', '1.0.0')
|
|
12
|
+
export class FeatureItemModel extends Model {
|
|
13
|
+
@Field()
|
|
14
|
+
@Editor({
|
|
15
|
+
field_type: FieldType.TEXT,
|
|
16
|
+
label: 'ID',
|
|
17
|
+
description: 'Unique identifier for the feature item',
|
|
18
|
+
placeholder: 'feature-id'
|
|
19
|
+
})
|
|
20
|
+
@IsString()
|
|
21
|
+
@IsNotEmpty()
|
|
22
|
+
id?: string;
|
|
23
|
+
|
|
24
|
+
@Field()
|
|
25
|
+
@Editor({
|
|
26
|
+
field_type: FieldType.TEXT,
|
|
27
|
+
label: 'Icon',
|
|
28
|
+
description: 'Feature icon (emoji or icon name)',
|
|
29
|
+
placeholder: '🚀 or icon-name'
|
|
30
|
+
})
|
|
31
|
+
@IsOptional()
|
|
32
|
+
@IsString()
|
|
33
|
+
icon?: string;
|
|
34
|
+
|
|
35
|
+
@Field()
|
|
36
|
+
@Editor({
|
|
37
|
+
field_type: FieldType.TEXT,
|
|
38
|
+
label: 'Title',
|
|
39
|
+
description: 'Feature title',
|
|
40
|
+
placeholder: 'Feature title...'
|
|
41
|
+
})
|
|
42
|
+
@IsString()
|
|
43
|
+
title?: string;
|
|
44
|
+
|
|
45
|
+
@Field()
|
|
46
|
+
@Editor({
|
|
47
|
+
field_type: FieldType.TEXT,
|
|
48
|
+
label: 'Description',
|
|
49
|
+
description: 'Feature description',
|
|
50
|
+
placeholder: 'Feature description...'
|
|
51
|
+
})
|
|
52
|
+
@IsString()
|
|
53
|
+
description?: string;
|
|
54
|
+
|
|
55
|
+
@Field()
|
|
56
|
+
@Editor({
|
|
57
|
+
field_type: FieldType.TEXT,
|
|
58
|
+
label: 'Action',
|
|
59
|
+
description: 'Optional action/link text or content',
|
|
60
|
+
placeholder: 'Learn more'
|
|
61
|
+
})
|
|
62
|
+
@IsOptional()
|
|
63
|
+
@IsString()
|
|
64
|
+
action?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
export default FeatureItemModel;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FooterItem Schema - Defines data structure for footer navigation items
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IsString, IsOptional, IsBoolean, IsNotEmpty } from 'class-validator';
|
|
8
|
+
import 'reflect-metadata';
|
|
9
|
+
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
10
|
+
|
|
11
|
+
@Schema('FooterItem', '1.0.0')
|
|
12
|
+
export class FooterItemModel extends Model {
|
|
13
|
+
@Field()
|
|
14
|
+
@Editor({
|
|
15
|
+
field_type: FieldType.TEXT,
|
|
16
|
+
label: 'ID',
|
|
17
|
+
description: 'Unique identifier for the footer item',
|
|
18
|
+
placeholder: 'footer-item-id'
|
|
19
|
+
})
|
|
20
|
+
@IsString()
|
|
21
|
+
@IsNotEmpty()
|
|
22
|
+
id?: string;
|
|
23
|
+
|
|
24
|
+
@Field()
|
|
25
|
+
@Editor({
|
|
26
|
+
field_type: FieldType.TEXT,
|
|
27
|
+
label: 'Label',
|
|
28
|
+
description: 'Display text for the footer item',
|
|
29
|
+
placeholder: 'Navigation label'
|
|
30
|
+
})
|
|
31
|
+
@IsString()
|
|
32
|
+
label?: string;
|
|
33
|
+
|
|
34
|
+
@Field()
|
|
35
|
+
@Editor({
|
|
36
|
+
field_type: FieldType.URL,
|
|
37
|
+
label: 'URL',
|
|
38
|
+
description: 'Optional URL for links',
|
|
39
|
+
placeholder: 'https://example.com'
|
|
40
|
+
})
|
|
41
|
+
@IsOptional()
|
|
42
|
+
@IsString()
|
|
43
|
+
href?: string;
|
|
44
|
+
|
|
45
|
+
@Field({ defaultValue: false })
|
|
46
|
+
@Editor({
|
|
47
|
+
field_type: FieldType.BOOLEAN,
|
|
48
|
+
label: 'External Link',
|
|
49
|
+
description: 'Whether to open links in new tab'
|
|
50
|
+
})
|
|
51
|
+
@IsOptional()
|
|
52
|
+
@IsBoolean()
|
|
53
|
+
external?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
export default FooterItemModel;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Footer Schema - Defines data structure and validation for Footer component
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IsString, IsOptional, IsArray, IsIn, IsBoolean, ValidateNested } from 'class-validator';
|
|
8
|
+
import { Type } from 'class-transformer';
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
11
|
+
import { FooterSectionModel } from './FooterSectionSchema';
|
|
12
|
+
|
|
13
|
+
@Schema('Footer', '1.0.0')
|
|
14
|
+
export class FooterModel extends Model {
|
|
15
|
+
@Field()
|
|
16
|
+
@Editor({
|
|
17
|
+
field_type: FieldType.REPEATER,
|
|
18
|
+
label: 'Sections',
|
|
19
|
+
description: 'Footer sections with navigation items'
|
|
20
|
+
})
|
|
21
|
+
@IsOptional()
|
|
22
|
+
@IsArray()
|
|
23
|
+
@ValidateNested({ each: true })
|
|
24
|
+
@Type(() => FooterSectionModel)
|
|
25
|
+
sections?: FooterSectionModel[];
|
|
26
|
+
|
|
27
|
+
@Field()
|
|
28
|
+
@Editor({
|
|
29
|
+
field_type: FieldType.TEXT,
|
|
30
|
+
label: 'Logo',
|
|
31
|
+
description: 'Optional logo or branding element (HTML or text)',
|
|
32
|
+
placeholder: 'Company Logo or HTML'
|
|
33
|
+
})
|
|
34
|
+
@IsOptional()
|
|
35
|
+
@IsString()
|
|
36
|
+
logo?: string;
|
|
37
|
+
|
|
38
|
+
@Field()
|
|
39
|
+
@Editor({
|
|
40
|
+
field_type: FieldType.TEXT,
|
|
41
|
+
label: 'Copyright',
|
|
42
|
+
description: 'Copyright text',
|
|
43
|
+
placeholder: '© 2025 Company Name'
|
|
44
|
+
})
|
|
45
|
+
@IsOptional()
|
|
46
|
+
@IsString()
|
|
47
|
+
copyright?: string;
|
|
48
|
+
|
|
49
|
+
@Field()
|
|
50
|
+
@Editor({
|
|
51
|
+
field_type: FieldType.TEXT,
|
|
52
|
+
label: 'Legal Text',
|
|
53
|
+
description: 'Additional legal or info text',
|
|
54
|
+
placeholder: 'All rights reserved.'
|
|
55
|
+
})
|
|
56
|
+
@IsOptional()
|
|
57
|
+
@IsString()
|
|
58
|
+
legalText?: string;
|
|
59
|
+
|
|
60
|
+
@Field()
|
|
61
|
+
@Editor({
|
|
62
|
+
field_type: FieldType.SELECT,
|
|
63
|
+
label: 'Orientation',
|
|
64
|
+
description: 'Layout orientation',
|
|
65
|
+
validation: {
|
|
66
|
+
options: [
|
|
67
|
+
{ label: 'Vertical', value: 'vertical' },
|
|
68
|
+
{ label: 'Horizontal', value: 'horizontal' }
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
@IsOptional()
|
|
73
|
+
@IsIn(['vertical', 'horizontal'])
|
|
74
|
+
orientation?: 'vertical' | 'horizontal';
|
|
75
|
+
|
|
76
|
+
@Field()
|
|
77
|
+
@Editor({
|
|
78
|
+
field_type: FieldType.SELECT,
|
|
79
|
+
label: 'Variant',
|
|
80
|
+
description: 'Background variant',
|
|
81
|
+
validation: {
|
|
82
|
+
options: [
|
|
83
|
+
{ label: 'Default', value: 'default' },
|
|
84
|
+
{ label: 'Contained', value: 'contained' },
|
|
85
|
+
{ label: 'Outlined', value: 'outlined' }
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
@IsOptional()
|
|
90
|
+
@IsIn(['default', 'contained', 'outlined'])
|
|
91
|
+
variant?: 'default' | 'contained' | 'outlined';
|
|
92
|
+
|
|
93
|
+
@Field({ defaultValue: false })
|
|
94
|
+
@Editor({
|
|
95
|
+
field_type: FieldType.BOOLEAN,
|
|
96
|
+
label: 'Show Divider',
|
|
97
|
+
description: 'Whether to show divider above footer'
|
|
98
|
+
})
|
|
99
|
+
@IsOptional()
|
|
100
|
+
@IsBoolean()
|
|
101
|
+
showDivider?: boolean;
|
|
102
|
+
|
|
103
|
+
@Field()
|
|
104
|
+
@Editor({
|
|
105
|
+
field_type: FieldType.TEXT,
|
|
106
|
+
label: 'CSS Class',
|
|
107
|
+
description: 'Additional CSS class name',
|
|
108
|
+
placeholder: 'custom-footer-class'
|
|
109
|
+
})
|
|
110
|
+
@IsOptional()
|
|
111
|
+
@IsString()
|
|
112
|
+
className?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
export default FooterModel;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FooterSection Schema - Defines data structure for footer sections
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IsString, IsOptional, IsArray, ValidateNested, IsNotEmpty } from 'class-validator';
|
|
8
|
+
import { Type } from 'class-transformer';
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
11
|
+
import { FooterItemModel } from './FooterItemSchema';
|
|
12
|
+
|
|
13
|
+
@Schema('FooterSection', '1.0.0')
|
|
14
|
+
export class FooterSectionModel extends Model {
|
|
15
|
+
@Field()
|
|
16
|
+
@Editor({
|
|
17
|
+
field_type: FieldType.TEXT,
|
|
18
|
+
label: 'ID',
|
|
19
|
+
description: 'Unique identifier for the footer section',
|
|
20
|
+
placeholder: 'footer-section-id'
|
|
21
|
+
})
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsNotEmpty()
|
|
24
|
+
id?: string;
|
|
25
|
+
|
|
26
|
+
@Field()
|
|
27
|
+
@Editor({
|
|
28
|
+
field_type: FieldType.TEXT,
|
|
29
|
+
label: 'Title',
|
|
30
|
+
description: 'Section title/heading',
|
|
31
|
+
placeholder: 'Section title'
|
|
32
|
+
})
|
|
33
|
+
@IsOptional()
|
|
34
|
+
@IsString()
|
|
35
|
+
title?: string;
|
|
36
|
+
|
|
37
|
+
@Field()
|
|
38
|
+
@Editor({
|
|
39
|
+
field_type: FieldType.REPEATER,
|
|
40
|
+
label: 'Items',
|
|
41
|
+
description: 'Array of items in this section'
|
|
42
|
+
})
|
|
43
|
+
@IsArray()
|
|
44
|
+
@ValidateNested({ each: true })
|
|
45
|
+
@Type(() => FooterItemModel)
|
|
46
|
+
items?: FooterItemModel[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export default FooterSectionModel;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for FormBlock component - Reusable form layout container
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IsBoolean, IsIn, IsOptional, IsString } from 'class-validator';
|
|
8
|
+
import 'reflect-metadata';
|
|
9
|
+
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
10
|
+
|
|
11
|
+
@Schema('FormBlock', '1.0.0')
|
|
12
|
+
export class FormBlockModel extends Model {
|
|
13
|
+
@Field()
|
|
14
|
+
@Editor({
|
|
15
|
+
field_type: FieldType.TEXT,
|
|
16
|
+
label: 'Title',
|
|
17
|
+
description: 'Title for the default header (ignored if custom header is provided)',
|
|
18
|
+
placeholder: 'Enter form title...'
|
|
19
|
+
})
|
|
20
|
+
@IsOptional()
|
|
21
|
+
@IsString()
|
|
22
|
+
title?: string;
|
|
23
|
+
|
|
24
|
+
@Field()
|
|
25
|
+
@Editor({
|
|
26
|
+
field_type: FieldType.TEXTAREA,
|
|
27
|
+
label: 'Description',
|
|
28
|
+
description: 'Description/subtitle for the default header (ignored if custom header is provided)',
|
|
29
|
+
placeholder: 'Enter form description...'
|
|
30
|
+
})
|
|
31
|
+
@IsOptional()
|
|
32
|
+
@IsString()
|
|
33
|
+
description?: string;
|
|
34
|
+
|
|
35
|
+
@Field()
|
|
36
|
+
@Editor({
|
|
37
|
+
field_type: FieldType.TEXT,
|
|
38
|
+
label: 'Cover Image URL',
|
|
39
|
+
description: 'Cover image URL for the default header (ignored if custom header is provided)',
|
|
40
|
+
placeholder: 'https://example.com/image.jpg'
|
|
41
|
+
})
|
|
42
|
+
@IsOptional()
|
|
43
|
+
@IsString()
|
|
44
|
+
coverImage?: string | React.ReactNode;
|
|
45
|
+
|
|
46
|
+
@Field()
|
|
47
|
+
@Editor({
|
|
48
|
+
field_type: FieldType.TEXT,
|
|
49
|
+
label: 'Status Type',
|
|
50
|
+
description: 'Status type for message display (info, success, warning, error)',
|
|
51
|
+
placeholder: 'info'
|
|
52
|
+
})
|
|
53
|
+
@IsOptional()
|
|
54
|
+
@IsIn(['info', 'success', 'warning', 'error'])
|
|
55
|
+
status?: 'info' | 'success' | 'warning' | 'error';
|
|
56
|
+
|
|
57
|
+
@Field()
|
|
58
|
+
@Editor({
|
|
59
|
+
field_type: FieldType.TEXTAREA,
|
|
60
|
+
label: 'Status Message',
|
|
61
|
+
description: 'Status message to display',
|
|
62
|
+
placeholder: 'Enter status message...'
|
|
63
|
+
})
|
|
64
|
+
@IsOptional()
|
|
65
|
+
@IsString()
|
|
66
|
+
message?: string;
|
|
67
|
+
|
|
68
|
+
@Field({ defaultValue: 'sm' })
|
|
69
|
+
@Editor({
|
|
70
|
+
field_type: FieldType.TEXT,
|
|
71
|
+
label: 'Maximum Width',
|
|
72
|
+
description: 'Maximum width of the form container (xs, sm, md)',
|
|
73
|
+
placeholder: 'sm'
|
|
74
|
+
})
|
|
75
|
+
@IsOptional()
|
|
76
|
+
@IsIn(['xs', 'sm', 'md'])
|
|
77
|
+
maxWidth?: 'xs' | 'sm' | 'md';
|
|
78
|
+
|
|
79
|
+
@Field({ defaultValue: 'default' })
|
|
80
|
+
@Editor({
|
|
81
|
+
field_type: FieldType.TEXT,
|
|
82
|
+
label: 'Background Style',
|
|
83
|
+
description: 'Background style variant (default, gradient, image)',
|
|
84
|
+
placeholder: 'default'
|
|
85
|
+
})
|
|
86
|
+
@IsOptional()
|
|
87
|
+
@IsIn(['default', 'gradient', 'image'])
|
|
88
|
+
background?: string;
|
|
89
|
+
|
|
90
|
+
@Field()
|
|
91
|
+
@Editor({
|
|
92
|
+
field_type: FieldType.TEXT,
|
|
93
|
+
label: 'Background Image URL',
|
|
94
|
+
description: 'Background image URL (when background="image")',
|
|
95
|
+
placeholder: 'https://example.com/background.jpg'
|
|
96
|
+
})
|
|
97
|
+
@IsOptional()
|
|
98
|
+
@IsString()
|
|
99
|
+
backgroundImage?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default FormBlockModel;
|