Sprint 8: add widget manifest and data source engine

This commit is contained in:
sdarbinyan
2026-07-05 02:08:15 +04:00
parent 91d9444875
commit c3d1153f0e
20 changed files with 867 additions and 375 deletions

View File

@@ -221,7 +221,7 @@
"key": "home",
"title": "Home",
"route": {
"path": "/platform",
"path": "/",
"exact": true
},
"layout": "default-public",
@@ -232,6 +232,17 @@
"id": "section-hero",
"type": "hero",
"order": 1,
"layout": {
"strategy": "hero",
"columns": 1,
"gap": "1.5rem",
"align": "stretch"
},
"visibility": {
"desktop": true,
"tablet": true,
"mobile": true
},
"visible": true,
"widgets": [
{
@@ -246,6 +257,67 @@
}
}
]
},
{
"id": "section-categories",
"type": "categories",
"order": 2,
"layout": {
"strategy": "grid",
"columns": 1,
"gap": "1.5rem",
"align": "stretch"
},
"visibility": {
"desktop": true,
"tablet": true,
"mobile": true
},
"visible": true,
"widgets": [
{
"id": "widget-categories-root",
"type": "categories",
"version": "1.0.0",
"visible": true,
"props": {
"title": "Categories",
"source": "root",
"emptyMessage": "No categories available"
}
}
]
},
{
"id": "section-featured-products",
"type": "product-collection",
"order": 3,
"layout": {
"strategy": "carousel",
"columns": 1,
"gap": "1rem",
"align": "stretch"
},
"visibility": {
"desktop": true,
"tablet": true,
"mobile": true
},
"visible": true,
"widgets": [
{
"id": "widget-featured-products",
"type": "product-collection",
"version": "1.0.0",
"visible": true,
"props": {
"title": "Featured Products",
"source": "featured",
"count": 8,
"actionLabel": "Select"
}
}
]
}
]
}

View File

@@ -41,9 +41,39 @@
]
},
{
"id": "section-featured-products",
"type": "content-grid",
"id": "section-categories",
"type": "categories",
"order": 2,
"layout": {
"strategy": "grid",
"columns": 1,
"gap": "1.5rem",
"align": "stretch"
},
"visibility": {
"desktop": true,
"tablet": true,
"mobile": true
},
"visible": true,
"widgets": [
{
"id": "widget-categories-root",
"type": "categories",
"version": "1.0.0",
"visible": true,
"props": {
"title": "Categories",
"source": "root",
"emptyMessage": "No categories available"
}
}
]
},
{
"id": "section-featured-products",
"type": "product-collection",
"order": 3,
"layout": {
"strategy": "carousel",
"columns": 1,
@@ -58,13 +88,15 @@
"visible": true,
"widgets": [
{
"id": "widget-featured-carousel",
"type": "product-carousel",
"id": "widget-featured-products",
"type": "product-collection",
"version": "1.0.0",
"visible": true,
"props": {
"title": "Featured Products",
"source": "products.featured"
"source": "featured",
"count": 8,
"actionLabel": "Select"
}
}
]

View File

@@ -4,19 +4,180 @@
"type": "hero",
"version": "1.0.0",
"componentKey": "hero",
"supportedLayouts": ["hero", "split"],
"supportedDataSources": ["future"],
"settingsSchema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"subtitle": { "type": "string" },
"ctaLabel": { "type": "string" }
}
},
"defaultSettings": {
"title": "Welcome to Marketplace Platform",
"subtitle": "Configuration-driven multi-tenant commerce",
"ctaLabel": "Start Shopping"
},
"enabled": true
},
{
"type": "categories",
"version": "1.0.0",
"componentKey": "categories",
"supportedLayouts": ["grid"],
"supportedDataSources": ["root", "parent", "manual", "future"],
"settingsSchema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"source": { "type": "string" },
"parentId": { "type": "number" },
"emptyMessage": { "type": "string" }
}
},
"defaultSettings": {
"title": "Categories",
"source": "root",
"emptyMessage": "No categories available"
},
"enabled": true
},
{
"type": "product-collection",
"version": "1.0.0",
"componentKey": "product-collection",
"supportedLayouts": ["carousel", "grid"],
"supportedDataSources": ["featured", "latest", "category", "manual", "related", "future"],
"settingsSchema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"source": { "type": "string" },
"count": { "type": "number" },
"categoryId": { "type": "number" },
"productId": { "type": "number" },
"actionLabel": { "type": "string" },
"emptyMessage": { "type": "string" }
}
},
"defaultSettings": {
"title": "Featured Products",
"source": "featured",
"count": 8,
"actionLabel": "Select"
},
"enabled": true
},
{
"type": "product-carousel",
"version": "1.0.0",
"componentKey": "product-collection",
"supportedLayouts": ["carousel", "grid"],
"supportedDataSources": ["featured", "latest", "category", "manual", "related", "future"],
"settingsSchema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"source": { "type": "string" },
"count": { "type": "number" }
}
},
"defaultSettings": {
"title": "Featured Products",
"source": "featured",
"count": 8
},
"enabled": true
},
{
"type": "footer",
"version": "1.0.0",
"componentKey": "footer-navigation",
"supportedLayouts": ["stack"],
"supportedDataSources": ["manual", "future"],
"settingsSchema": {
"type": "object",
"properties": {
"links": { "type": "array" },
"title": { "type": "string" }
}
},
"defaultSettings": {
"links": []
},
"enabled": true
},
{
"type": "footer-navigation",
"version": "1.0.0",
"componentKey": "footer-navigation",
"supportedLayouts": ["stack"],
"supportedDataSources": ["manual", "future"],
"settingsSchema": {
"type": "object",
"properties": {
"links": { "type": "array" }
}
},
"defaultSettings": {
"links": []
},
"enabled": true
},
{
"type": "product-carousel",
"type": "banner",
"version": "1.0.0",
"componentKey": "product-carousel",
"enabled": true
"componentKey": "banner",
"supportedLayouts": ["hero", "split", "stack"],
"supportedDataSources": ["future"],
"settingsSchema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"subtitle": { "type": "string" },
"imageUrl": { "type": "string" },
"ctaLabel": { "type": "string" },
"ctaHref": { "type": "string" }
}
},
"defaultSettings": {},
"enabled": false
},
{
"type": "html",
"version": "1.0.0",
"componentKey": "html",
"supportedLayouts": ["stack"],
"supportedDataSources": ["future"],
"settingsSchema": {
"type": "object",
"properties": {
"html": { "type": "string" }
}
},
"defaultSettings": {
"html": ""
},
"enabled": false
},
{
"type": "partners",
"version": "1.0.0",
"componentKey": "partners",
"supportedLayouts": ["stack", "grid"],
"supportedDataSources": ["future"],
"settingsSchema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"logos": { "type": "array" }
}
},
"defaultSettings": {
"logos": []
},
"enabled": false
}
]
}