@qwickapps/react-framework 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/QUICK_START_GUIDE.md +82 -0
- package/README.md +221 -21
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +1 -2
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +1 -2
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/base/Container.d.ts +32 -0
- package/dist/components/base/Container.d.ts.map +1 -0
- package/dist/components/base/ContainerView.d.ts +65 -0
- package/dist/components/base/ContainerView.d.ts.map +1 -0
- package/dist/components/base/ModelView.d.ts +37 -46
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +3 -2
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +1 -2
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/Code-factory.d.ts +22 -0
- package/dist/components/blocks/Code-factory.d.ts.map +1 -0
- package/dist/components/blocks/Code-old.d.ts +31 -0
- package/dist/components/blocks/Code-old.d.ts.map +1 -0
- package/dist/components/blocks/Code.d.ts +30 -18
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +1 -2
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +1 -2
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +1 -2
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +35 -27
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +1 -2
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +1 -2
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +1 -2
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +1 -2
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +29 -47
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/pages/index.d.ts +2 -3
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/shared/createSerializableView.d.ts +68 -0
- package/dist/components/shared/createSerializableView.d.ts.map +1 -0
- package/dist/components/shared/viewProps.d.ts +37 -0
- package/dist/components/shared/viewProps.d.ts.map +1 -0
- package/dist/index.esm.js +21782 -22580
- package/dist/index.js +21782 -22579
- package/dist/qa/ConsoleWarningTest.d.ts +5 -0
- package/dist/qa/ConsoleWarningTest.d.ts.map +1 -0
- package/dist/qa/StorageKeyTest.d.ts +6 -0
- package/dist/qa/StorageKeyTest.d.ts.map +1 -0
- package/dist/qa/ThemeStorageKeyTest.d.ts +6 -0
- package/dist/qa/ThemeStorageKeyTest.d.ts.map +1 -0
- package/dist/schemas/CodeSchema.d.ts +2 -2
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/ContainerSchema.d.ts +12 -0
- package/dist/schemas/ContainerSchema.d.ts.map +1 -0
- package/dist/schemas/PageTemplateSchema.d.ts +3 -3
- package/dist/schemas/PageTemplateSchema.d.ts.map +1 -1
- package/dist/schemas/ViewModelSchema.d.ts +46 -6
- package/dist/schemas/ViewModelSchema.d.ts.map +1 -1
- package/dist/schemas/ViewSchema.d.ts +65 -0
- package/dist/schemas/ViewSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +27 -15
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/registry.d.ts +3 -0
- package/dist/schemas/transformers/registry.d.ts.map +1 -1
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
- package/dist/src/components/AccessibilityChecker.d.ts +12 -0
- package/dist/src/components/AccessibilityChecker.d.ts.map +1 -0
- package/dist/src/components/AccessibilityProvider.d.ts +64 -0
- package/dist/src/components/AccessibilityProvider.d.ts.map +1 -0
- package/dist/src/components/Breadcrumbs.d.ts +39 -0
- package/dist/src/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/src/components/ErrorBoundary.d.ts +46 -0
- package/dist/src/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/Html.d.ts +58 -0
- package/dist/src/components/Html.d.ts.map +1 -0
- package/dist/src/components/Logo.d.ts +56 -0
- package/dist/src/components/Logo.d.ts.map +1 -0
- package/dist/src/components/Markdown.d.ts +51 -0
- package/dist/src/components/Markdown.d.ts.map +1 -0
- package/dist/src/components/QwickApp.d.ts +69 -0
- package/dist/src/components/QwickApp.d.ts.map +1 -0
- package/dist/src/components/QwickAppsLogo.d.ts +25 -0
- package/dist/src/components/QwickAppsLogo.d.ts.map +1 -0
- package/dist/src/components/QwickIcon.d.ts +23 -0
- package/dist/src/components/QwickIcon.d.ts.map +1 -0
- package/dist/src/components/ResponsiveMenu.d.ts +38 -0
- package/dist/src/components/ResponsiveMenu.d.ts.map +1 -0
- package/dist/src/components/SafeSpan.d.ts +29 -0
- package/dist/src/components/SafeSpan.d.ts.map +1 -0
- package/dist/src/components/Scaffold.d.ts +57 -0
- package/dist/src/components/Scaffold.d.ts.map +1 -0
- package/dist/src/components/base/Container.d.ts +33 -0
- package/dist/src/components/base/Container.d.ts.map +1 -0
- package/dist/src/components/base/ModelView.d.ts +92 -0
- package/dist/src/components/base/ModelView.d.ts.map +1 -0
- package/dist/src/components/base/index.d.ts +12 -0
- package/dist/src/components/base/index.d.ts.map +1 -0
- package/dist/src/components/blocks/Article.d.ts +32 -0
- package/dist/src/components/blocks/Article.d.ts.map +1 -0
- package/dist/src/components/blocks/CardListGrid.d.ts +23 -0
- package/dist/src/components/blocks/CardListGrid.d.ts.map +1 -0
- package/dist/src/components/blocks/Code.d.ts +37 -0
- package/dist/src/components/blocks/Code.d.ts.map +1 -0
- package/dist/src/components/blocks/Content.d.ts +24 -0
- package/dist/src/components/blocks/Content.d.ts.map +1 -0
- package/dist/src/components/blocks/CoverImageHeader.d.ts +44 -0
- package/dist/src/components/blocks/CoverImageHeader.d.ts.map +1 -0
- package/dist/src/components/blocks/FeatureCard.d.ts +66 -0
- package/dist/src/components/blocks/FeatureCard.d.ts.map +1 -0
- package/dist/src/components/blocks/FeatureGrid.d.ts +48 -0
- package/dist/src/components/blocks/FeatureGrid.d.ts.map +1 -0
- package/dist/src/components/blocks/Footer.d.ts +56 -0
- package/dist/src/components/blocks/Footer.d.ts.map +1 -0
- package/dist/src/components/blocks/HeroBlock.d.ts +55 -0
- package/dist/src/components/blocks/HeroBlock.d.ts.map +1 -0
- package/dist/src/components/blocks/Image.d.ts +40 -0
- package/dist/src/components/blocks/Image.d.ts.map +1 -0
- package/dist/src/components/blocks/PageBannerHeader.d.ts +30 -0
- package/dist/src/components/blocks/PageBannerHeader.d.ts.map +1 -0
- package/dist/src/components/blocks/ProductCard.d.ts +57 -0
- package/dist/src/components/blocks/ProductCard.d.ts.map +1 -0
- package/dist/src/components/blocks/Section.d.ts +45 -0
- package/dist/src/components/blocks/Section.d.ts.map +1 -0
- package/dist/src/components/blocks/Text.d.ts +34 -0
- package/dist/src/components/blocks/Text.d.ts.map +1 -0
- package/dist/src/components/blocks/index.d.ts +41 -0
- package/dist/src/components/blocks/index.d.ts.map +1 -0
- package/dist/src/components/buttons/Button.d.ts +41 -0
- package/dist/src/components/buttons/Button.d.ts.map +1 -0
- package/dist/src/components/buttons/PaletteSwitcher.d.ts +24 -0
- package/dist/src/components/buttons/PaletteSwitcher.d.ts.map +1 -0
- package/dist/src/components/buttons/ThemeSwitcher.d.ts +24 -0
- package/dist/src/components/buttons/ThemeSwitcher.d.ts.map +1 -0
- package/dist/src/components/buttons/index.d.ts +11 -0
- package/dist/src/components/buttons/index.d.ts.map +1 -0
- package/dist/src/components/forms/FormBlock.d.ts +51 -0
- package/dist/src/components/forms/FormBlock.d.ts.map +1 -0
- package/dist/src/components/forms/index.d.ts +8 -0
- package/dist/src/components/forms/index.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +41 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/input/ChoiceInputField.d.ts +29 -0
- package/dist/src/components/input/ChoiceInputField.d.ts.map +1 -0
- package/dist/src/components/input/HtmlInputField.d.ts +33 -0
- package/dist/src/components/input/HtmlInputField.d.ts.map +1 -0
- package/dist/src/components/input/SelectInputField.d.ts +31 -0
- package/dist/src/components/input/SelectInputField.d.ts.map +1 -0
- package/dist/src/components/input/SwitchInputField.d.ts +27 -0
- package/dist/src/components/input/SwitchInputField.d.ts.map +1 -0
- package/dist/src/components/input/TextField.d.ts +18 -0
- package/dist/src/components/input/TextField.d.ts.map +1 -0
- package/dist/src/components/input/TextInputField.d.ts +34 -0
- package/dist/src/components/input/TextInputField.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +19 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +34 -0
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -0
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts +9 -0
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts.map +1 -0
- package/dist/src/components/layout/GridCell.d.ts +32 -0
- package/dist/src/components/layout/GridCell.d.ts.map +1 -0
- package/dist/src/components/layout/GridCellWrapper.d.ts +46 -0
- package/dist/src/components/layout/GridCellWrapper.d.ts.map +1 -0
- package/dist/src/components/layout/GridLayout.d.ts +50 -0
- package/dist/src/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/src/components/layout/index.d.ts +14 -0
- package/dist/src/components/layout/index.d.ts.map +1 -0
- package/dist/src/components/menu/Menu.d.ts +1 -0
- package/dist/src/components/menu/Menu.d.ts.map +1 -0
- package/dist/src/components/menu/MenuItem.d.ts +31 -0
- package/dist/src/components/menu/MenuItem.d.ts.map +1 -0
- package/dist/src/components/menu/index.d.ts +7 -0
- package/dist/src/components/menu/index.d.ts.map +1 -0
- package/dist/src/components/pages/FormPage.d.ts +66 -0
- package/dist/src/components/pages/FormPage.d.ts.map +1 -0
- package/dist/src/components/pages/Page.d.ts +68 -0
- package/dist/src/components/pages/Page.d.ts.map +1 -0
- package/dist/src/components/pages/index.d.ts +10 -0
- package/dist/src/components/pages/index.d.ts.map +1 -0
- package/dist/src/components/shared/createSerializableView.d.ts +81 -0
- package/dist/src/components/shared/createSerializableView.d.ts.map +1 -0
- package/dist/src/components/shared/viewProps.d.ts +37 -0
- package/dist/src/components/shared/viewProps.d.ts.map +1 -0
- package/dist/src/config/AppConfig.d.ts +49 -0
- package/dist/src/config/AppConfig.d.ts.map +1 -0
- package/dist/src/config/AppConfigBuilder.d.ts +75 -0
- package/dist/src/config/AppConfigBuilder.d.ts.map +1 -0
- package/dist/src/config/index.d.ts +13 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/types.d.ts +130 -0
- package/dist/src/config/types.d.ts.map +1 -0
- package/dist/src/config.d.ts +15 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/contexts/DataContext.d.ts +139 -0
- package/dist/src/contexts/DataContext.d.ts.map +1 -0
- package/dist/src/contexts/DimensionsContext.d.ts +42 -0
- package/dist/src/contexts/DimensionsContext.d.ts.map +1 -0
- package/dist/src/contexts/PaletteContext.d.ts +53 -0
- package/dist/src/contexts/PaletteContext.d.ts.map +1 -0
- package/dist/src/contexts/PrintModeContext.d.ts +27 -0
- package/dist/src/contexts/PrintModeContext.d.ts.map +1 -0
- package/dist/src/contexts/QwickAppContext.d.ts +71 -0
- package/dist/src/contexts/QwickAppContext.d.ts.map +1 -0
- package/dist/src/contexts/ThemeContext.d.ts +65 -0
- package/dist/src/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/src/contexts/index.d.ts +11 -0
- package/dist/src/contexts/index.d.ts.map +1 -0
- package/dist/src/hooks/index.d.ts +12 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/hooks/useBaseProps.d.ts +101 -0
- package/dist/src/hooks/useBaseProps.d.ts.map +1 -0
- package/dist/src/hooks/useDataBinding.d.ts +22 -0
- package/dist/src/hooks/useDataBinding.d.ts.map +1 -0
- package/dist/src/hooks/usePrintMode.d.ts +39 -0
- package/dist/src/hooks/usePrintMode.d.ts.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/palettes/PaletteAutumn.d.ts +10 -0
- package/dist/src/palettes/PaletteAutumn.d.ts.map +1 -0
- package/dist/src/palettes/PaletteCosmic.d.ts +10 -0
- package/dist/src/palettes/PaletteCosmic.d.ts.map +1 -0
- package/dist/src/palettes/PaletteDefault.d.ts +10 -0
- package/dist/src/palettes/PaletteDefault.d.ts.map +1 -0
- package/dist/src/palettes/PaletteOcean.d.ts +10 -0
- package/dist/src/palettes/PaletteOcean.d.ts.map +1 -0
- package/dist/src/palettes/PaletteSpring.d.ts +10 -0
- package/dist/src/palettes/PaletteSpring.d.ts.map +1 -0
- package/dist/src/palettes/PaletteWinter.d.ts +10 -0
- package/dist/src/palettes/PaletteWinter.d.ts.map +1 -0
- package/dist/src/palettes/index.d.ts +13 -0
- package/dist/src/palettes/index.d.ts.map +1 -0
- package/dist/src/schemas/ActionSchema.d.ts +21 -0
- package/dist/src/schemas/ActionSchema.d.ts.map +1 -0
- package/dist/src/schemas/ArticleSchema.d.ts +13 -0
- package/dist/src/schemas/ArticleSchema.d.ts.map +1 -0
- package/dist/src/schemas/ButtonSchema.d.ts +19 -0
- package/dist/src/schemas/ButtonSchema.d.ts.map +1 -0
- package/dist/src/schemas/CardListGridSchema.d.ts +17 -0
- package/dist/src/schemas/CardListGridSchema.d.ts.map +1 -0
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/CodeSchema.d.ts +18 -0
- package/dist/src/schemas/CodeSchema.d.ts.map +1 -0
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts +32 -0
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts.map +1 -0
- package/dist/src/schemas/ContainerSchema.d.ts +12 -0
- package/dist/src/schemas/ContainerSchema.d.ts.map +1 -0
- package/dist/src/schemas/ContentSchema.d.ts +21 -0
- package/dist/src/schemas/ContentSchema.d.ts.map +1 -0
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts +28 -0
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureCardSchema.d.ts +28 -0
- package/dist/src/schemas/FeatureCardSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureGridSchema.d.ts +17 -0
- package/dist/src/schemas/FeatureGridSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureItemSchema.d.ts +16 -0
- package/dist/src/schemas/FeatureItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterItemSchema.d.ts +15 -0
- package/dist/src/schemas/FooterItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterSchema.d.ts +20 -0
- package/dist/src/schemas/FooterSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterSectionSchema.d.ts +15 -0
- package/dist/src/schemas/FooterSectionSchema.d.ts.map +1 -0
- package/dist/src/schemas/FormBlockSchema.d.ts +19 -0
- package/dist/src/schemas/FormBlockSchema.d.ts.map +1 -0
- package/dist/src/schemas/GridCellSchema.d.ts +23 -0
- package/dist/src/schemas/GridCellSchema.d.ts.map +1 -0
- package/dist/src/schemas/GridLayoutSchema.d.ts +21 -0
- package/dist/src/schemas/GridLayoutSchema.d.ts.map +1 -0
- package/dist/src/schemas/HeaderActionSchema.d.ts +17 -0
- package/dist/src/schemas/HeaderActionSchema.d.ts.map +1 -0
- package/dist/src/schemas/HeroBlockSchema.d.ts +22 -0
- package/dist/src/schemas/HeroBlockSchema.d.ts.map +1 -0
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/HtmlSchema.d.ts +14 -0
- package/dist/src/schemas/HtmlSchema.d.ts.map +1 -0
- package/dist/src/schemas/ImageSchema.d.ts +32 -0
- package/dist/src/schemas/ImageSchema.d.ts.map +1 -0
- package/dist/src/schemas/LogoSchema.d.ts +35 -0
- package/dist/src/schemas/LogoSchema.d.ts.map +1 -0
- package/dist/src/schemas/MarkdownSchema.d.ts +14 -0
- package/dist/src/schemas/MarkdownSchema.d.ts.map +1 -0
- package/dist/src/schemas/MetadataItemSchema.d.ts +13 -0
- package/dist/src/schemas/MetadataItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts +28 -0
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts.map +1 -0
- package/dist/src/schemas/PageTemplateSchema.d.ts +31 -0
- package/dist/src/schemas/PageTemplateSchema.d.ts.map +1 -0
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts +16 -0
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts.map +1 -0
- package/dist/src/schemas/PrintConfigSchema.d.ts +31 -0
- package/dist/src/schemas/PrintConfigSchema.d.ts.map +1 -0
- package/dist/src/schemas/ProductCardSchema.d.ts +39 -0
- package/dist/src/schemas/ProductCardSchema.d.ts.map +1 -0
- package/dist/src/schemas/SafeSpanSchema.d.ts +13 -0
- package/dist/src/schemas/SafeSpanSchema.d.ts.map +1 -0
- package/dist/src/schemas/SectionSchema.d.ts +16 -0
- package/dist/src/schemas/SectionSchema.d.ts.map +1 -0
- package/dist/src/schemas/SelectInputFieldSchema.d.ts +27 -0
- package/dist/src/schemas/SelectInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/TextInputFieldSchema.d.ts +22 -0
- package/dist/src/schemas/TextInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/TextSchema.d.ts +37 -0
- package/dist/src/schemas/TextSchema.d.ts.map +1 -0
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts +19 -0
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts.map +1 -0
- package/dist/src/schemas/ViewSchema.d.ts +66 -0
- package/dist/src/schemas/ViewSchema.d.ts.map +1 -0
- package/dist/src/schemas/index.d.ts +47 -0
- package/dist/src/schemas/index.d.ts.map +1 -0
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts +128 -0
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
- package/dist/src/schemas/transformers/registry.d.ts +18 -0
- package/dist/src/schemas/transformers/registry.d.ts.map +1 -0
- package/dist/src/schemas/types/Serializable.d.ts +46 -0
- package/dist/src/schemas/types/Serializable.d.ts.map +1 -0
- package/dist/src/stories/_templates/SerializationTemplate.d.ts +44 -0
- package/dist/src/stories/_templates/SerializationTemplate.d.ts.map +1 -0
- package/dist/src/templates/TemplateResolver.d.ts +52 -0
- package/dist/src/templates/TemplateResolver.d.ts.map +1 -0
- package/dist/src/templates/index.d.ts +7 -0
- package/dist/src/templates/index.d.ts.map +1 -0
- package/dist/src/types/CacheProvider.d.ts +18 -0
- package/dist/src/types/CacheProvider.d.ts.map +1 -0
- package/dist/src/types/CollapsibleLayout.d.ts +142 -0
- package/dist/src/types/CollapsibleLayout.d.ts.map +1 -0
- package/dist/src/types/ContentProxy.d.ts +47 -0
- package/dist/src/types/ContentProxy.d.ts.map +1 -0
- package/dist/src/types/DataTypes.d.ts +185 -0
- package/dist/src/types/DataTypes.d.ts.map +1 -0
- package/dist/src/types/TemplateProvider.d.ts +10 -0
- package/dist/src/types/TemplateProvider.d.ts.map +1 -0
- package/dist/src/types/TemplateResolver.d.ts +23 -0
- package/dist/src/types/TemplateResolver.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +82 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/utils/breakpoints.d.ts +35 -0
- package/dist/src/utils/breakpoints.d.ts.map +1 -0
- package/dist/src/utils/cssUtils.d.ts +17 -0
- package/dist/src/utils/cssUtils.d.ts.map +1 -0
- package/dist/src/utils/customPaletteManager.d.ts +8 -0
- package/dist/src/utils/customPaletteManager.d.ts.map +1 -0
- package/dist/src/utils/dimensions.d.ts +34 -0
- package/dist/src/utils/dimensions.d.ts.map +1 -0
- package/dist/src/utils/htmlTransform.d.ts +44 -0
- package/dist/src/utils/htmlTransform.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +16 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/logger.d.ts +26 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/paletteUtils.d.ts +38 -0
- package/dist/src/utils/paletteUtils.d.ts.map +1 -0
- package/dist/src/utils/persistenceUtils.d.ts +31 -0
- package/dist/src/utils/persistenceUtils.d.ts.map +1 -0
- package/dist/src/utils/reactUtils.d.ts +33 -0
- package/dist/src/utils/reactUtils.d.ts.map +1 -0
- package/dist/src/utils/spacing.d.ts +34 -0
- package/dist/src/utils/spacing.d.ts.map +1 -0
- package/dist/src/utils/themePerformanceMonitor.d.ts +32 -0
- package/dist/src/utils/themePerformanceMonitor.d.ts.map +1 -0
- package/dist/src/utils/themeUtils.d.ts +27 -0
- package/dist/src/utils/themeUtils.d.ts.map +1 -0
- package/dist/utils/cssUtils.d.ts +17 -0
- package/dist/utils/cssUtils.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +8 -2
- package/scripts/bundle-css.cjs +27 -0
- package/scripts/create-project.sh +28 -0
- package/scripts/create-qwickapps-project.js +284 -0
- package/src/__tests__/components/base/Container.test.tsx +966 -0
- package/src/__tests__/schemas/PageTemplateSchema.test.ts +1 -1
- package/src/__tests__/schemas/ViewSchema.test.ts +805 -0
- package/src/__tests__/schemas/builders.test.ts +2 -2
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +19 -19
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +13 -13
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +39 -39
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +14 -14
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +8 -8
- package/src/__tests__/schemas/transformers/nested-serialization.test.tsx +181 -0
- package/src/__tests__/schemas/transformers/round-trip-component-serialization.test.tsx +458 -0
- package/src/__tests__/test_image_accessibility.test.tsx +226 -0
- package/src/__tests__/utils/optional-logging.test.ts +3 -3
- package/src/components/Html.tsx +24 -15
- package/src/components/Logo.tsx +2 -2
- package/src/components/Markdown.tsx +2 -7
- package/src/components/SafeSpan.tsx +2 -7
- package/src/components/base/Container.tsx +61 -0
- package/src/components/base/ModelView.tsx +225 -91
- package/src/components/base/index.ts +3 -2
- package/src/components/blocks/Article.tsx +2 -7
- package/src/components/blocks/CardListGrid.tsx +2 -2
- package/src/components/blocks/Code.tsx +91 -179
- package/src/components/blocks/Content.tsx +2 -2
- package/src/components/blocks/CoverImageHeader.tsx +2 -2
- package/src/components/blocks/HeroBlock.tsx +54 -146
- package/src/components/blocks/Image.tsx +82 -196
- package/src/components/blocks/PageBannerHeader.tsx +2 -2
- package/src/components/blocks/Section.tsx +79 -181
- package/src/components/blocks/Text.tsx +100 -198
- package/src/components/buttons/Button.tsx +85 -183
- package/src/components/buttons/PaletteSwitcher.tsx +2 -2
- package/src/components/buttons/ThemeSwitcher.tsx +2 -2
- package/src/components/forms/FormBlock.tsx +2 -2
- package/src/components/index.ts +5 -0
- package/src/components/input/ChoiceInputField.tsx +76 -160
- package/src/components/input/HtmlInputField.tsx +141 -264
- package/src/components/input/SelectInputField.tsx +48 -153
- package/src/components/input/SwitchInputField.tsx +41 -139
- package/src/components/input/TextInputField.tsx +39 -116
- package/src/components/layout/GridCell.tsx +36 -122
- package/src/components/layout/GridLayout.tsx +55 -127
- package/src/components/pages/Page.tsx +268 -276
- package/src/components/pages/index.ts +2 -3
- package/src/components/shared/createSerializableView.tsx +280 -0
- package/src/components/shared/viewProps.ts +207 -0
- package/src/config/__tests__/AppConfigBuilder.test.ts +2 -2
- package/src/contexts/DataContext.tsx +1 -1
- package/src/schemas/ButtonSchema.ts +3 -2
- package/src/schemas/CardListGridSchema.ts +3 -2
- package/src/schemas/ChoiceInputFieldSchema.ts +3 -2
- package/src/schemas/CodeSchema.ts +8 -6
- package/src/schemas/ContainerSchema.ts +25 -0
- package/src/schemas/FeatureCardSchema.ts +1 -1
- package/src/schemas/FormBlockSchema.ts +3 -2
- package/src/schemas/GridCellSchema.ts +4 -10
- package/src/schemas/GridLayoutSchema.ts +8 -14
- package/src/schemas/HeroBlockSchema.ts +3 -2
- package/src/schemas/HtmlInputFieldSchema.ts +3 -2
- package/src/schemas/ImageSchema.ts +3 -2
- package/src/schemas/PageTemplateSchema.ts +5 -5
- package/src/schemas/SectionSchema.ts +4 -12
- package/src/schemas/SelectInputFieldSchema.ts +3 -2
- package/src/schemas/SwitchInputFieldSchema.ts +2 -2
- package/src/schemas/TextInputFieldSchema.ts +3 -2
- package/src/schemas/ViewSchema.ts +570 -0
- package/src/schemas/index.ts +1 -1
- package/src/schemas/transformers/ComponentTransformer.ts +185 -163
- package/src/schemas/transformers/ReactNodeTransformer.ts +31 -28
- package/src/schemas/transformers/registry.ts +17 -10
- package/src/stories/Button.stories.tsx +24 -0
- package/src/stories/ChoiceInputField.stories.tsx +28 -1
- package/src/stories/Code.stories.tsx +61 -1
- package/src/stories/Container.stories.tsx +954 -0
- package/src/stories/FormBlock.stories.tsx +54 -0
- package/src/stories/FormComponents.stories.tsx +8 -13
- package/src/stories/GridCell.stories.tsx +23 -64
- package/src/stories/GridLayout.stories.tsx +22 -47
- package/src/stories/HeroBlock.stories.tsx +28 -0
- package/src/stories/HtmlInputField.stories.tsx +23 -1
- package/src/stories/Image.stories.tsx +45 -233
- package/src/stories/Markdown.stories.tsx +1 -1
- package/src/stories/Section.stories.tsx +38 -4
- package/src/stories/SelectInputField.stories.tsx +26 -1
- package/src/stories/Text.stories.tsx +22 -54
- package/src/stories/TextInputField.stories.tsx +24 -1
- package/src/stories/_templates/SerializationTemplate.tsx +165 -0
- package/src/templates/TemplateResolver.ts +2 -2
- package/src/types/CollapsibleLayout.ts +2 -2
- package/src/utils/cssUtils.ts +49 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/logger.ts +13 -13
- package/src/__tests__/components/base/ModelView.test.tsx +0 -220
- package/src/__tests__/schemas/ViewModelSchema.test.ts +0 -80
- package/src/components/blocks/Code.md +0 -529
- package/src/schemas/README.md +0 -661
- package/src/schemas/ViewModelSchema.ts +0 -115
- package/src/tests/ConsoleWarningTest.tsx +0 -30
- package/src/tests/StorageKeyTest.tsx +0 -110
- package/src/tests/ThemeStorageKeyTest.tsx +0 -114
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Html Component - Transforms HTML strings into Framework components
|
|
3
|
+
*
|
|
4
|
+
* Accepts HTML string as children and transforms HTML elements to Framework
|
|
5
|
+
* components using configurable rules. Default transform rules include:
|
|
6
|
+
* - <header> → Remove (for articles) or transform to PageBannerHeader
|
|
7
|
+
* - <pre><code> → Code component with language detection
|
|
8
|
+
* - <section class="blog-section"> → Section component
|
|
9
|
+
* - <button> → Button component
|
|
10
|
+
* - Fall back to SafeSpan for other elements
|
|
11
|
+
*
|
|
12
|
+
* Features:
|
|
13
|
+
* - Sanitization enabled by default (lenient - allow Framework components)
|
|
14
|
+
* - Configurable transformation rules
|
|
15
|
+
* - TypeScript support with proper props interface
|
|
16
|
+
* - Error handling and fallback to SafeSpan
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* - Basic: <Html>{htmlString}</Html>
|
|
20
|
+
* - Custom rules: <Html transformConfig={customConfig}>{htmlString}</Html>
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
23
|
+
*/
|
|
24
|
+
import React, { ReactElement } from 'react';
|
|
25
|
+
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
26
|
+
import HtmlModel from '../schemas/HtmlSchema';
|
|
27
|
+
import { ModelView } from './base/ModelView';
|
|
28
|
+
export interface TransformConfig {
|
|
29
|
+
rules?: any[];
|
|
30
|
+
sanitize?: boolean;
|
|
31
|
+
sanitizeOptions?: any;
|
|
32
|
+
fallbackComponent?: (element: Element, key: string) => React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
type HtmlViewProps = SchemaProps<HtmlModel> & {
|
|
35
|
+
/** Custom transformation configuration (legacy - now handled by ComponentTransformer) */
|
|
36
|
+
transformConfig?: TransformConfig;
|
|
37
|
+
/** Whether to sanitize HTML (legacy - now handled internally) */
|
|
38
|
+
sanitize?: boolean;
|
|
39
|
+
/** Custom sanitization options (legacy - now handled internally) */
|
|
40
|
+
sanitizeOptions?: any;
|
|
41
|
+
/** Container element type (React.ElementType for internal use, string in model for serialization) */
|
|
42
|
+
component?: React.ElementType;
|
|
43
|
+
};
|
|
44
|
+
export interface HtmlProps extends HtmlViewProps, WithDataBinding {
|
|
45
|
+
}
|
|
46
|
+
export declare class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
47
|
+
static readonly tagName = "Html";
|
|
48
|
+
static readonly version = "1.0.0";
|
|
49
|
+
static fromJson(jsonData: any): ReactElement;
|
|
50
|
+
protected getComponentSpecificProps(): any;
|
|
51
|
+
protected renderView(): React.ReactElement;
|
|
52
|
+
protected renderWithDataBinding(): React.ReactElement;
|
|
53
|
+
static registerPatternHandlers(registry: any): void;
|
|
54
|
+
private static transformHtmlDiv;
|
|
55
|
+
private static transformDataHtml;
|
|
56
|
+
}
|
|
57
|
+
export default Html;
|
|
58
|
+
//# sourceMappingURL=Html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Html.d.ts","sourceRoot":"","sources":["../../../src/components/Html.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACxE;AAED,KAAK,aAAa,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG;IAC5C,yFAAyF;IACzF,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,qGAAqG;IACrG,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,aAAa,EAAE,eAAe;CAAI;AAkIrE,qBAAa,IAAK,SAAQ,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAEvD,MAAM,CAAC,QAAQ,CAAC,OAAO,UAAU;IACjC,MAAM,CAAC,QAAQ,CAAC,OAAO,WAAW;IAGlC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,GAAG,YAAY;IAc5C,SAAS,CAAC,yBAAyB,IAAI,GAAG;IAS1C,SAAS,CAAC,UAAU,IAAI,KAAK,CAAC,YAAY;IAM1C,SAAS,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY;IAKrD,MAAM,CAAC,uBAAuB,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAanD,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAe/B,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAcjC;AAsCD,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic Logo Component - Generic theme-aware logo with image support
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Automatic text width calculation with dynamic SVG sizing
|
|
6
|
+
* - Semantic badge positioning (top-left, top-right, center, etc.)
|
|
7
|
+
* - Customizable badge position via custom coordinates or relative offset
|
|
8
|
+
* - Multiple badge shapes: circle, star, square, heart
|
|
9
|
+
* - Theme-aware styling with multiple variants
|
|
10
|
+
* - Accessibility support with proper ARIA labels
|
|
11
|
+
* - Customizable styling via CSS classes for each text part
|
|
12
|
+
* - Text formatting with escape sequences
|
|
13
|
+
* - Image support with flexible positioning
|
|
14
|
+
*
|
|
15
|
+
* Text Formatting (TWO PARTS MAXIMUM):
|
|
16
|
+
* - Use \n for line breaks (second part appears on new line)
|
|
17
|
+
* - Use \s for explicit spaces (useful for custom spacing)
|
|
18
|
+
* - Default: Two-word logos appear as one word in two colors (no space)
|
|
19
|
+
* - Limitation: Only TWO parts supported - multiple \n will not create more than two lines
|
|
20
|
+
* - Examples: "QwickApps" (one word, one color), "Qwick Apps" (two parts, two colors), "Qwick\sApps" (two parts with space), "Qwick\nApps" (two parts on two lines)
|
|
21
|
+
*
|
|
22
|
+
* Badge Positioning:
|
|
23
|
+
* - Semantic: Use 'top-left', 'top-right', 'center', etc. (automatically adapts to logo size)
|
|
24
|
+
* - Default: 'top-right' - positions at top-right of text
|
|
25
|
+
* - Offset: Use badgeOffset to fine-tune any position (automatically scales with size)
|
|
26
|
+
* - None: Use 'none' to hide the badge
|
|
27
|
+
* - Flexible: Combine any semantic position with custom offsets for precise control
|
|
28
|
+
*
|
|
29
|
+
* Text Styling:
|
|
30
|
+
* - Use firstPartClass and secondPartClass for custom CSS styling
|
|
31
|
+
* - Default classes: 'logo-first-part' and 'logo-second-part'
|
|
32
|
+
* - Font family and weight can be set via props for basic customization
|
|
33
|
+
* - Advanced styling (colors, effects, transforms) via CSS classes
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
36
|
+
*/
|
|
37
|
+
import React from 'react';
|
|
38
|
+
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
39
|
+
import LogoModel from '../schemas/LogoSchema';
|
|
40
|
+
import { LogoVariant, LogoSize, LogoBadgeShape, PositionType, BadgeOffset } from '../schemas/LogoSchema';
|
|
41
|
+
import './Logo.css';
|
|
42
|
+
type LogoViewProps = SchemaProps<LogoModel> & {
|
|
43
|
+
/** Click handler for the logo */
|
|
44
|
+
onClick?: (event: React.MouseEvent<SVGSVGElement | HTMLDivElement>) => void;
|
|
45
|
+
/** Additional inline styles */
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
/** Additional CSS class names */
|
|
48
|
+
className?: string;
|
|
49
|
+
};
|
|
50
|
+
interface LogoProps extends LogoViewProps, WithDataBinding {
|
|
51
|
+
}
|
|
52
|
+
declare function Logo(props: LogoProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export type { LogoVariant, LogoSize, LogoBadgeShape, PositionType, BadgeOffset };
|
|
54
|
+
export type { LogoProps, LogoViewProps };
|
|
55
|
+
export default Logo;
|
|
56
|
+
//# sourceMappingURL=Logo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/Logo.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,YAAY,CAAC;AAEpB,KAAK,aAAa,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG;IAC5C,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,GAAG,cAAc,CAAC,KAAK,IAAI,CAAC;IAC5E,+BAA+B;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,UAAU,SAAU,SAAQ,aAAa,EAAE,eAAe;CAAG;AAgX7D,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,2CAqC7B;AAMD,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACjF,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AAEzC,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Markdown Component - Transforms Markdown strings into Framework components
|
|
3
|
+
*
|
|
4
|
+
* Accepts Markdown string as children and converts it through a
|
|
5
|
+
* Markdown → HTML → React components pipeline using the Html component
|
|
6
|
+
* with Markdown-optimized transformation rules.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Full Markdown syntax support via marked library
|
|
10
|
+
* - Transform rules optimized for Markdown content
|
|
11
|
+
* - Code block syntax highlighting
|
|
12
|
+
* - Preserves inline code elements (no transformation)
|
|
13
|
+
* - TypeScript support with proper props interface
|
|
14
|
+
* - Error handling and fallback to Html component
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* - Basic: <Markdown>{markdownString}</Markdown>
|
|
18
|
+
* - Custom config: <Markdown htmlTransformConfig={customConfig}>{markdownString}</Markdown>
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
21
|
+
*/
|
|
22
|
+
import { marked } from 'marked';
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
25
|
+
import MarkdownModel from '../schemas/MarkdownSchema';
|
|
26
|
+
import { ModelView } from './base/ModelView';
|
|
27
|
+
import { TransformConfig } from '../utils/htmlTransform';
|
|
28
|
+
type MarkdownViewProps = SchemaProps<MarkdownModel> & {
|
|
29
|
+
/** Custom transformation configuration for HTML conversion */
|
|
30
|
+
htmlTransformConfig?: TransformConfig;
|
|
31
|
+
/** Custom sanitization options */
|
|
32
|
+
sanitizeOptions?: any;
|
|
33
|
+
/** Container element type */
|
|
34
|
+
component?: React.ElementType;
|
|
35
|
+
/** Marked options for Markdown parsing */
|
|
36
|
+
markedOptions?: marked.MarkedOptions;
|
|
37
|
+
};
|
|
38
|
+
export interface MarkdownProps extends MarkdownViewProps, WithDataBinding {
|
|
39
|
+
}
|
|
40
|
+
export declare class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
41
|
+
static readonly tagName = "Markdown";
|
|
42
|
+
static readonly version = "1.0.0";
|
|
43
|
+
protected getComponentSpecificProps(): any;
|
|
44
|
+
protected renderView(): React.ReactElement;
|
|
45
|
+
protected renderWithDataBinding(): React.ReactElement;
|
|
46
|
+
static registerPatternHandlers(registry: any): void;
|
|
47
|
+
private static transformMarkdownDiv;
|
|
48
|
+
private static transformDataMarkdown;
|
|
49
|
+
}
|
|
50
|
+
export default Markdown;
|
|
51
|
+
//# sourceMappingURL=Markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,eAAe,EAAwB,MAAM,wBAAwB,CAAC;AAE/E,KAAK,iBAAiB,GAAG,WAAW,CAAC,aAAa,CAAC,GAAG;IACpD,8DAA8D;IAC9D,mBAAmB,CAAC,EAAE,eAAe,CAAC;IACtC,kCAAkC;IAClC,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAC9B,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC;CACtC,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,eAAe;CAAG;AAgJ5E,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAEnE,MAAM,CAAC,QAAQ,CAAC,OAAO,cAAc;IACrC,MAAM,CAAC,QAAQ,CAAC,OAAO,WAAW;IAGlC,SAAS,CAAC,yBAAyB,IAAI,GAAG;IAS1C,SAAS,CAAC,UAAU,IAAI,KAAK,CAAC,YAAY;IAM1C,SAAS,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY;IAKrD,MAAM,CAAC,uBAAuB,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAanD,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAenC,OAAO,CAAC,MAAM,CAAC,qBAAqB;CAcrC;AAsCD,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QwickApp - Main application wrapper with routing support
|
|
3
|
+
*
|
|
4
|
+
* This component eliminates the need to manually set up provider hierarchy.
|
|
5
|
+
* Provides theme system, app context, optional scaffolding, and routing.
|
|
6
|
+
*
|
|
7
|
+
* Example usage with config:
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import { BrowserRouter } from 'react-router-dom';
|
|
10
|
+
* import { QwickApp, AuthProvider, JsonDataProvider, AppConfigBuilder } from '@qwickapps/react-framework';
|
|
11
|
+
*
|
|
12
|
+
* function App() {
|
|
13
|
+
* const config = AppConfigBuilder.create()
|
|
14
|
+
* .withName("My App")
|
|
15
|
+
* .withId("my.app")
|
|
16
|
+
* .build();
|
|
17
|
+
*
|
|
18
|
+
* const dataSource = {
|
|
19
|
+
* dataProvider: new JsonDataProvider({ data: { company: [...] } }),
|
|
20
|
+
* cacheProvider: true, // Use default MemoryCacheProvider
|
|
21
|
+
* enableLogging: false
|
|
22
|
+
* };
|
|
23
|
+
*
|
|
24
|
+
* return (
|
|
25
|
+
* <QwickApp config={config} dataSource={dataSource}>
|
|
26
|
+
* <AuthProvider router={<BrowserRouter />} user={user}>
|
|
27
|
+
* <Route path="/" component={HomePage} />
|
|
28
|
+
* <Route path="/admin" component={AdminPage} requiresRole="admin" />
|
|
29
|
+
* </AuthProvider>
|
|
30
|
+
* </QwickApp>
|
|
31
|
+
* );
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
36
|
+
*/
|
|
37
|
+
import React from 'react';
|
|
38
|
+
import { type ThemeMode } from '../contexts';
|
|
39
|
+
import { type QwickAppContextValue, type QwickAppProps } from '../contexts/QwickAppContext';
|
|
40
|
+
import { type TemplateResolverConfig } from '../types';
|
|
41
|
+
import { AppConfig } from '../config';
|
|
42
|
+
import './QwickApp.css';
|
|
43
|
+
interface QwickAppComponentProps extends QwickAppProps {
|
|
44
|
+
/** Child components to render when no routing is used */
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
/** CSS class name to apply to the root element */
|
|
47
|
+
className?: string;
|
|
48
|
+
/** Inline styles to apply to the root element */
|
|
49
|
+
style?: React.CSSProperties;
|
|
50
|
+
/** Additional content to show in footer */
|
|
51
|
+
footerContent?: React.ReactNode;
|
|
52
|
+
/** Theme mode preference (light/dark/auto) */
|
|
53
|
+
defaultTheme?: ThemeMode;
|
|
54
|
+
/** Optional router component to wrap the app (e.g., <BrowserRouter />, <HashRouter />) */
|
|
55
|
+
router?: React.ReactElement;
|
|
56
|
+
/** Data source configuration for content management and template resolution */
|
|
57
|
+
dataSource?: TemplateResolverConfig;
|
|
58
|
+
/**
|
|
59
|
+
* AppConfig instance - when provided, overrides individual props
|
|
60
|
+
* @example
|
|
61
|
+
* const config = AppConfigBuilder.create().withName("My App").build();
|
|
62
|
+
* <QwickApp config={config}>...</QwickApp>
|
|
63
|
+
*/
|
|
64
|
+
config?: AppConfig;
|
|
65
|
+
}
|
|
66
|
+
export declare const QwickApp: React.FC<QwickAppComponentProps>;
|
|
67
|
+
export declare const useQwickApp: () => QwickAppContextValue;
|
|
68
|
+
export default QwickApp;
|
|
69
|
+
//# sourceMappingURL=QwickApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwickApp.d.ts","sourceRoot":"","sources":["../../../src/components/QwickApp.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAmB,KAAK,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,gBAAgB,CAAC;AAQxB,UAAU,sBAAuB,SAAQ,aAAa;IACpD,yDAAyD;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,2CAA2C;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,8CAA8C;IAC9C,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,0FAA0F;IAC1F,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CAEpB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+GrD,CAAC;AAEF,eAAO,MAAM,WAAW,QAAO,oBAM9B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QwickAppsLogo - Official QwickApps brand logo
|
|
3
|
+
*
|
|
4
|
+
* Features the official QwickApps logo SVG with proper brand colors
|
|
5
|
+
* and consistent sizing. This component should be used instead of the
|
|
6
|
+
* generic Logo component when displaying the QwickApps brand.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { WithBaseProps } from '../hooks/useBaseProps';
|
|
12
|
+
export type QwickAppsLogoSize = 'small' | 'medium' | 'large';
|
|
13
|
+
export interface QwickAppsLogoProps extends WithBaseProps, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height' | 'className' | 'style' | 'onClick' | 'onBlur' | 'onFocus' | 'onMouseEnter' | 'onMouseLeave' | 'role'> {
|
|
14
|
+
/** Size variant of the logo */
|
|
15
|
+
size?: QwickAppsLogoSize;
|
|
16
|
+
/** Click handler for the logo */
|
|
17
|
+
onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;
|
|
18
|
+
/** Additional inline styles */
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
/** Additional CSS class names */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const QwickAppsLogo: React.FC<QwickAppsLogoProps>;
|
|
24
|
+
export default QwickAppsLogo;
|
|
25
|
+
//# sourceMappingURL=QwickAppsLogo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwickAppsLogo.d.ts","sourceRoot":"","sources":["../../../src/components/QwickAppsLogo.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAgB,MAAM,uBAAuB,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,GAAG,cAAc,GAAG,MAAM,CAAC;IACtN,+BAA+B;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC3D,+BAA+B;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgD/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QwickIcon - Official QwickApps brand icon
|
|
3
|
+
*
|
|
4
|
+
* A reusable SVG icon component for the QwickApps brand that can be used
|
|
5
|
+
* across all QwickApps applications. Features customizable size and
|
|
6
|
+
* optional background for different use cases.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export interface QwickIconProps {
|
|
12
|
+
/** Size of the icon in pixels */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Whether to show the background rectangle */
|
|
15
|
+
showBackground?: boolean;
|
|
16
|
+
/** Additional CSS class names */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Additional inline styles */
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
declare const QwickIcon: React.FC<QwickIconProps>;
|
|
22
|
+
export default QwickIcon;
|
|
23
|
+
//# sourceMappingURL=QwickIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwickIcon.d.ts","sourceRoot":"","sources":["../../../src/components/QwickIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAiCvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResponsiveMenu - Adaptive navigation component
|
|
3
|
+
*
|
|
4
|
+
* Automatically renders different navigation styles based on screen size:
|
|
5
|
+
* - Mobile (< 768px): Bottom navigation bar
|
|
6
|
+
* - Tablet (768px - 1024px): Expandable nav rail (sidebar)
|
|
7
|
+
* - Desktop (> 1024px): Top navigation with drawer
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Theme-aware styling
|
|
11
|
+
* - Customizable menu items with icons
|
|
12
|
+
* - Automatic logo display using QwickApp context
|
|
13
|
+
* - Keyboard navigation support
|
|
14
|
+
* - ARIA accessibility
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { WithBaseProps } from '../hooks/useBaseProps';
|
|
20
|
+
import './ResponsiveMenu.css';
|
|
21
|
+
import type { MenuItem } from './menu/MenuItem';
|
|
22
|
+
export interface ResponsiveMenuProps extends WithBaseProps {
|
|
23
|
+
/** Array of menu items to display */
|
|
24
|
+
items: MenuItem[];
|
|
25
|
+
/** Custom logo component override (uses QwickApp context by default) */
|
|
26
|
+
logo?: React.ReactNode;
|
|
27
|
+
/** Whether to show the logo (default: true) */
|
|
28
|
+
showLogo?: boolean;
|
|
29
|
+
/** Position of the logo in desktop mode ('left' | 'center' | 'right') */
|
|
30
|
+
logoPosition?: 'left' | 'center' | 'right';
|
|
31
|
+
/** Custom brand text (uses QwickApp appName by default) */
|
|
32
|
+
brandText?: string;
|
|
33
|
+
/** Callback when menu state changes (open/closed) */
|
|
34
|
+
onMenuToggle?: (isOpen: boolean) => void;
|
|
35
|
+
}
|
|
36
|
+
declare const ResponsiveMenu: React.FC<ResponsiveMenuProps>;
|
|
37
|
+
export default ResponsiveMenu;
|
|
38
|
+
//# sourceMappingURL=ResponsiveMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ResponsiveMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,aAAa,EAAoC,MAAM,uBAAuB,CAAC;AAGxF,OAAO,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,qCAAqC;IACrC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,wEAAwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAID,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqQjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SafeSpan Component - Safely renders HTML content with sanitization
|
|
3
|
+
*
|
|
4
|
+
* Enhanced with data binding support through dataSource prop.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* - Traditional: <SafeSpan html="<p>Hello</p>" placeholder="Loading..." />
|
|
8
|
+
* - Data-driven: <SafeSpan dataSource="company.description" />
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
14
|
+
import SafeSpanModel from '../schemas/SafeSpanSchema';
|
|
15
|
+
import { ModelView } from './base/ModelView';
|
|
16
|
+
type SafeSpanViewProps = SchemaProps<SafeSpanModel>;
|
|
17
|
+
export interface SafeSpanProps extends SafeSpanViewProps, WithDataBinding {
|
|
18
|
+
}
|
|
19
|
+
export declare class SafeSpan extends ModelView<SafeSpanProps, SafeSpanModel> {
|
|
20
|
+
static readonly tagName = "SafeSpan";
|
|
21
|
+
static readonly version = "1.0.0";
|
|
22
|
+
protected getComponentSpecificProps(): any;
|
|
23
|
+
protected renderView(): React.ReactElement;
|
|
24
|
+
protected renderWithDataBinding(): React.ReactElement;
|
|
25
|
+
static registerPatternHandlers(registry: any): void;
|
|
26
|
+
private static transformSafeSpan;
|
|
27
|
+
}
|
|
28
|
+
export default SafeSpan;
|
|
29
|
+
//# sourceMappingURL=SafeSpan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SafeSpan.d.ts","sourceRoot":"","sources":["../../../src/components/SafeSpan.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGjE,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,KAAK,iBAAiB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;AACpD,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,eAAe;CAAG;AA6E5E,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAEnE,MAAM,CAAC,QAAQ,CAAC,OAAO,cAAc;IACrC,MAAM,CAAC,QAAQ,CAAC,OAAO,WAAW;IAGlC,SAAS,CAAC,yBAAyB,IAAI,GAAG;IAQ1C,SAAS,CAAC,UAAU,IAAI,KAAK,CAAC,YAAY;IAM1C,SAAS,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY;IAKrD,MAAM,CAAC,uBAAuB,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAanD,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAWjC;AA+BD,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffold - Complete application scaffolding system
|
|
3
|
+
*
|
|
4
|
+
* Provides proper Material UI compliant layout scaffolding with:
|
|
5
|
+
* - AppBar with responsive behavior
|
|
6
|
+
* - Navigation rail/drawer with proper item limits
|
|
7
|
+
* - Bottom navigation with 3-5 items
|
|
8
|
+
* - Content area with proper spacing to avoid overlap
|
|
9
|
+
* - Responsive breakpoints following Material Design
|
|
10
|
+
*
|
|
11
|
+
* Material UI Navigation Guidelines:
|
|
12
|
+
* - Bottom Navigation: 3-5 destinations (excess in drawer)
|
|
13
|
+
* - Navigation Rail: 3-7 destinations (excess in drawer)
|
|
14
|
+
* - Navigation Drawer: All items, organized by priority
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import './Scaffold.css';
|
|
20
|
+
import type { MenuItem } from './menu/MenuItem';
|
|
21
|
+
export interface AppBarProps {
|
|
22
|
+
/** Title to display in the app bar */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Actions to display on the right side */
|
|
25
|
+
actions?: React.ReactNode;
|
|
26
|
+
/** Whether to show the menu button (for drawer toggle) */
|
|
27
|
+
showMenuButton?: boolean;
|
|
28
|
+
/** Custom logo override */
|
|
29
|
+
logo?: React.ReactNode;
|
|
30
|
+
/** Logo position when in app bar */
|
|
31
|
+
logoPosition?: 'left' | 'center';
|
|
32
|
+
}
|
|
33
|
+
export interface ScaffoldProps {
|
|
34
|
+
/** Child components (page content) */
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
/** Primary navigation items */
|
|
37
|
+
navigationItems: MenuItem[];
|
|
38
|
+
/** App bar configuration */
|
|
39
|
+
appBar?: AppBarProps;
|
|
40
|
+
/** Additional CSS class */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Whether to show app bar (default: true) */
|
|
43
|
+
showAppBar?: boolean;
|
|
44
|
+
/** Custom app bar height (default: 64px) */
|
|
45
|
+
appBarHeight?: number;
|
|
46
|
+
/** Application name for display purposes */
|
|
47
|
+
appName?: string;
|
|
48
|
+
/** Whether to show theme switcher in app bar (default: false) */
|
|
49
|
+
showThemeSwitcher?: boolean;
|
|
50
|
+
/** Whether to show palette switcher in app bar (default: false) */
|
|
51
|
+
showPaletteSwitcher?: boolean;
|
|
52
|
+
/** Callback when logo is clicked */
|
|
53
|
+
onLogoClick?: () => void;
|
|
54
|
+
}
|
|
55
|
+
declare const Scaffold: React.FC<ScaffoldProps>;
|
|
56
|
+
export default Scaffold;
|
|
57
|
+
//# sourceMappingURL=Scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scaffold.d.ts","sourceRoot":"","sources":["../../../src/components/Scaffold.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+BAA+B;IAC/B,eAAe,EAAE,QAAQ,EAAE,CAAC;IAC5B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAWD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0XrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Container - Factory-based implementation using createSerializableView
|
|
3
|
+
*
|
|
4
|
+
* Migrated from class-based ModelView to factory pattern for better
|
|
5
|
+
* schema-driven architecture while preserving all functionality.
|
|
6
|
+
*
|
|
7
|
+
* Key Features:
|
|
8
|
+
* - Factory-based component using createSerializableView
|
|
9
|
+
* - Uses ViewProps for normalized props handling
|
|
10
|
+
* - Integrates with existing useBaseProps utility
|
|
11
|
+
* - Processes all grid, dimension, spacing, and styling props
|
|
12
|
+
* - Supports children rendering and data binding
|
|
13
|
+
* - Full serialization support
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
16
|
+
*/
|
|
17
|
+
import { SchemaProps } from '@qwickapps/schema';
|
|
18
|
+
import { ContainerSchema } from '../../schemas/ContainerSchema';
|
|
19
|
+
import { SerializableComponent } from '../shared/createSerializableView';
|
|
20
|
+
import { ViewProps } from '../shared/viewProps';
|
|
21
|
+
/**
|
|
22
|
+
* Props interface for Container component - extends ViewProps
|
|
23
|
+
*/
|
|
24
|
+
export type ContainerProps = ViewProps & SchemaProps<typeof ContainerSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* Create Container component using the factory pattern
|
|
27
|
+
*/
|
|
28
|
+
export declare const Container: SerializableComponent<ContainerProps>;
|
|
29
|
+
/**
|
|
30
|
+
* Export the component as default
|
|
31
|
+
*/
|
|
32
|
+
export default Container;
|
|
33
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/components/base/Container.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAA0B,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAqB7E;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,qBAAqB,CAAC,cAAc,CAK1D,CAAC;AAEH;;GAEG;AACH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModelView - Abstract Base Class implementing ViewSchema
|
|
3
|
+
*
|
|
4
|
+
* This abstract base class processes ViewSchema props and provides them
|
|
5
|
+
* to subclasses through processed props. All concrete components should
|
|
6
|
+
* extend this class to get consistent ViewSchema prop handling.
|
|
7
|
+
*
|
|
8
|
+
* Key Features:
|
|
9
|
+
* - Processes all ViewSchema properties (grid, spacing, styling, etc.)
|
|
10
|
+
* - Provides processed props to subclasses via getProcessedProps()
|
|
11
|
+
* - Maintains abstract pattern for component-specific rendering
|
|
12
|
+
* - Handles serialization and data binding
|
|
13
|
+
*/
|
|
14
|
+
import { Serializable } from "@/schemas";
|
|
15
|
+
import { SchemaProps, WithDataBinding } from "@qwickapps/schema";
|
|
16
|
+
import React, { ReactElement, ReactNode } from "react";
|
|
17
|
+
import ViewSchema from '../../schemas/ViewSchema';
|
|
18
|
+
/**
|
|
19
|
+
* Processed props that subclasses receive
|
|
20
|
+
*/
|
|
21
|
+
export interface ProcessedProps {
|
|
22
|
+
gridProps: any;
|
|
23
|
+
styleProps: any;
|
|
24
|
+
htmlProps: any;
|
|
25
|
+
restProps: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Abstract base class implementing ViewSchema
|
|
29
|
+
* All concrete components should extend this class
|
|
30
|
+
*/
|
|
31
|
+
export declare abstract class ModelView<TProps = any, TModel = any> extends React.Component<TProps & SchemaProps<ViewSchema> & WithDataBinding> implements Serializable {
|
|
32
|
+
static readonly tagName: string;
|
|
33
|
+
static readonly version: string;
|
|
34
|
+
/**
|
|
35
|
+
* Common fromJson implementation
|
|
36
|
+
*/
|
|
37
|
+
static fromJson(jsonData: any): ReactElement;
|
|
38
|
+
/**
|
|
39
|
+
* Common toJson implementation with hooks for customization
|
|
40
|
+
*/
|
|
41
|
+
toJson(): any;
|
|
42
|
+
/**
|
|
43
|
+
* Get processed props for subclasses to use
|
|
44
|
+
* This converts ViewSchema props and processes them through useBaseProps
|
|
45
|
+
*/
|
|
46
|
+
protected getProcessedProps(): ProcessedProps;
|
|
47
|
+
/**
|
|
48
|
+
* Common base props that all components serialize
|
|
49
|
+
*/
|
|
50
|
+
protected getBaseSerializableProps(): any;
|
|
51
|
+
/**
|
|
52
|
+
* Hook for subclasses to add component-specific serialization
|
|
53
|
+
*/
|
|
54
|
+
protected abstract getComponentSpecificProps(): any;
|
|
55
|
+
/**
|
|
56
|
+
* Common children serialization logic
|
|
57
|
+
*/
|
|
58
|
+
protected serializeChildren(children: ReactNode): any;
|
|
59
|
+
/**
|
|
60
|
+
* Helper to determine if children contain other serializable components
|
|
61
|
+
*/
|
|
62
|
+
protected hasNestedComponents(children: ReactNode): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Common render pattern
|
|
65
|
+
*/
|
|
66
|
+
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
67
|
+
/**
|
|
68
|
+
* Hook for subclasses to implement traditional props rendering
|
|
69
|
+
*/
|
|
70
|
+
protected abstract renderView(): React.ReactElement;
|
|
71
|
+
/**
|
|
72
|
+
* Hook for subclasses to implement data binding rendering
|
|
73
|
+
*/
|
|
74
|
+
protected abstract renderWithDataBinding(): React.ReactElement;
|
|
75
|
+
/**
|
|
76
|
+
* Register HTML pattern handlers for this component
|
|
77
|
+
*/
|
|
78
|
+
static registerPatternHandlers(_registry: any): void;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Helper function for creating ModelView component classes with ViewSchema support
|
|
82
|
+
* Updated to work with the new ViewSchema processing system
|
|
83
|
+
*/
|
|
84
|
+
export declare function createModelViewClass<TProps, TModel>(config: {
|
|
85
|
+
tagName: string;
|
|
86
|
+
version: string;
|
|
87
|
+
getComponentSpecificProps: (props: TProps, processedProps: ProcessedProps) => any;
|
|
88
|
+
hasNestedComponents?: (children: ReactNode) => boolean;
|
|
89
|
+
renderView: (props: TProps, processedProps: ProcessedProps) => React.ReactElement;
|
|
90
|
+
renderWithDataBinding: (props: TProps & WithDataBinding, processedProps: ProcessedProps) => React.ReactElement;
|
|
91
|
+
}): any;
|
|
92
|
+
//# sourceMappingURL=ModelView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelView.d.ts","sourceRoot":"","sources":["../../../../src/components/base/ModelView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AA8ElD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,GAAG,CAAC;IACf,UAAU,EAAE,GAAG,CAAC;IAChB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;;GAGG;AACH,8BAAsB,SAAS,CAAC,MAAM,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,CACxD,SAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,GAAG,eAAe,CAC1E,YAAW,YAAY;IAGvB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAM;IACrC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAM;IAErC;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,GAAG,YAAY;IAY5C;;OAEG;IACH,MAAM,IAAI,GAAG;IAab;;;OAGG;IACH,SAAS,CAAC,iBAAiB,IAAI,cAAc;IAmE7C;;OAEG;IACH,SAAS,CAAC,wBAAwB,IAAI,GAAG;IAWzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,yBAAyB,IAAI,GAAG;IAEnD;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,QAAQ,EAAE,SAAS,GAAG,GAAG;IAYrD;;OAEG;IACH,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO;IAI3D;;OAEG;IACH,MAAM;IAUN;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,KAAK,CAAC,YAAY;IAEnD;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY;IAE9D;;OAEG;IACH,MAAM,CAAC,uBAAuB,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;CAGrD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EACjD,MAAM,EAAE;IACN,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,KAAK,GAAG,CAAC;IAClF,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,OAAO,CAAC;IACvD,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,KAAK,KAAK,CAAC,YAAY,CAAC;IAClF,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,cAAc,EAAE,cAAc,KAAK,KAAK,CAAC,YAAY,CAAC;CAChH,GACA,GAAG,CA2BL"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Components and Abstractions
|
|
3
|
+
*
|
|
4
|
+
* Provides common base classes and utilities for creating
|
|
5
|
+
* serializable QwickApps components.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
export { ModelView, createModelViewClass } from './ModelView';
|
|
10
|
+
export { default as Container, } from './Container';
|
|
11
|
+
export type { ContainerProps } from './Container';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,GAAG,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Article - Transforms HTML content to use framework components with data binding support
|
|
3
|
+
*
|
|
4
|
+
* Automatically transforms:
|
|
5
|
+
* - <pre><code> blocks to Code components with syntax highlighting
|
|
6
|
+
* - Complex <code> elements to Code components
|
|
7
|
+
* - <section class="blog-section"> to Section components
|
|
8
|
+
* - Other framework-compatible elements
|
|
9
|
+
* - Preserves all other HTML structure and attributes
|
|
10
|
+
*
|
|
11
|
+
* Supports both traditional props and data binding through dataSource.
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
14
|
+
*/
|
|
15
|
+
import { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import ArticleModel from '../../schemas/ArticleSchema';
|
|
18
|
+
import { ModelView } from '../base/ModelView';
|
|
19
|
+
type ArticleViewProps = SchemaProps<ArticleModel>;
|
|
20
|
+
export interface ArticleProps extends ArticleViewProps, WithDataBinding {
|
|
21
|
+
}
|
|
22
|
+
export declare class Article extends ModelView<ArticleProps, ArticleModel> {
|
|
23
|
+
static readonly tagName = "Article";
|
|
24
|
+
static readonly version = "1.0.0";
|
|
25
|
+
protected getComponentSpecificProps(): any;
|
|
26
|
+
protected renderView(): React.ReactElement;
|
|
27
|
+
protected renderWithDataBinding(): React.ReactElement;
|
|
28
|
+
static registerPatternHandlers(registry: any): void;
|
|
29
|
+
private static transformArticle;
|
|
30
|
+
}
|
|
31
|
+
export default Article;
|
|
32
|
+
//# sourceMappingURL=Article.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Article.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Article.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAuB,MAAM,OAAO,CAAC;AAE5C,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,KAAK,gBAAgB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;AAElD,MAAM,WAAW,YAAa,SAAQ,gBAAgB,EAAE,eAAe;CACtE;AAgGD,qBAAa,OAAQ,SAAQ,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAEhE,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,OAAO,WAAW;IAGlC,SAAS,CAAC,yBAAyB,IAAI,GAAG;IAQ1C,SAAS,CAAC,UAAU,IAAI,KAAK,CAAC,YAAY;IAM1C,SAAS,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY;IAKrD,MAAM,CAAC,uBAAuB,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAQnD,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAWhC;AA6DD,eAAe,OAAO,CAAC"}
|