From 6eb82071b7eab0a21ac621c099cd7ab766490627 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 18 Jun 2021 14:03:55 +0100 Subject: [PATCH] Allow sections to be nested inside containers --- .../AppPreview/ComponentSelectionList.svelte | 3 +- packages/standard-components/manifest.json | 69 +++++++++---------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte b/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte index 0d4f4ffe9c..d8881a8d96 100644 --- a/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte +++ b/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte @@ -9,8 +9,7 @@ const currentComponent = store.actions.components.getDefinition( selectedComponent?._component ) - - return currentComponent?.illegalChildren?.includes(name) + return currentComponent?.illegalChildren?.includes(name.toLowerCase()) } const enrichStructure = (structure, definitions) => { diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json index fbf3fdf908..a2b2a2b99a 100644 --- a/packages/standard-components/manifest.json +++ b/packages/standard-components/manifest.json @@ -62,7 +62,6 @@ "icon": "Sandbox", "hasChildren": true, "styleable": true, - "illegalChildren": ["section"], "showSettingsBar": true, "settings": [ { @@ -181,7 +180,7 @@ "icon": "ColumnTwoB", "hasChildren": true, "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "showEmptyState": false, "settings": [ { @@ -202,7 +201,7 @@ "name": "Button", "description": "A basic html button that is ready for styling", "icon": "Button", - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "styleable": true, "settings": [ { @@ -227,7 +226,7 @@ "description": "A configurable data list that attaches to your backend tables.", "icon": "ViewList", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "hasChildren": true, "settings": [ { @@ -256,7 +255,7 @@ "icon": "TaskList", "description": "A basic card component that can contain content and actions.", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -286,7 +285,7 @@ "description": "A basic card component that can contain content and actions.", "icon": "ViewColumn", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -347,7 +346,7 @@ "description": "A component for displaying paragraph text.", "icon": "TextParagraph", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -361,7 +360,7 @@ "icon": "TextBold", "description": "A component for displaying heading text", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -382,7 +381,7 @@ "description": "A basic component for displaying images", "icon": "Image", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -396,7 +395,7 @@ "description": "A background image", "icon": "Images", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -454,7 +453,7 @@ "description": "A basic component for displaying icons", "icon": "Bell", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "icon", @@ -502,7 +501,7 @@ "description": "A component for handling the navigation within your app.", "icon": "BreadcrumbNavigation", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "hasChildren": true, "settings": [ { @@ -523,7 +522,7 @@ "description": "A basic link component for internal and external links", "icon": "Link", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -553,7 +552,7 @@ "description": "A basic card component that can contain content and actions.", "icon": "ViewRow", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -626,7 +625,7 @@ "description": "A card component for displaying numbers.", "icon": "Card", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -653,7 +652,7 @@ "icon": "Code", "description": "Embed content from 3rd party sources", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -667,7 +666,7 @@ "description": "Bar chart", "icon": "GraphBarVertical", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -768,7 +767,7 @@ "description": "Line chart", "icon": "GraphTrend", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -870,7 +869,7 @@ "description": "Line chart", "icon": "GraphAreaStacked", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -984,7 +983,7 @@ "description": "Pie chart", "icon": "GraphPie", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -1062,7 +1061,7 @@ "description": "Donut chart", "icon": "GraphDonut", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -1140,7 +1139,7 @@ "description": "Candlestick chart", "icon": "GraphBarVerticalStacked", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "text", @@ -1223,7 +1222,7 @@ "icon": "Form", "styleable": true, "hasChildren": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "actions": [ "ValidateForm" ], @@ -1295,7 +1294,7 @@ "name": "Field Group", "icon": "Group", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "hasChildren": true, "settings": [ { @@ -1324,7 +1323,7 @@ "name": "Text Field", "icon": "Text", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/string", @@ -1353,7 +1352,7 @@ "name": "Number Field", "icon": "123", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/number", @@ -1382,7 +1381,7 @@ "name": "Password Field", "icon": "LockClosed", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/string", @@ -1411,7 +1410,7 @@ "name": "Options Picker", "icon": "ViewList", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/options", @@ -1441,7 +1440,7 @@ "name": "Checkbox", "icon": "Checkmark", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/boolean", @@ -1470,7 +1469,7 @@ "name": "Rich Text", "icon": "TextParagraph", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/longform", @@ -1500,7 +1499,7 @@ "name": "Date Picker", "icon": "DateInput", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/datetime", @@ -1535,7 +1534,7 @@ "name": "Attachment", "icon": "Attach", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/attachment", @@ -1559,7 +1558,7 @@ "name": "Relationship Picker", "icon": "TaskList", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "settings": [ { "type": "field/link", @@ -1589,7 +1588,7 @@ "info": "Pagination is only available for data stored in internal tables.", "icon": "Data", "styleable": false, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "hasChildren": true, "settings": [ { @@ -1653,7 +1652,7 @@ "name": "Table", "icon": "Table", "styleable": true, - "illegalChildren": ["Section"], + "illegalChildren": ["section"], "hasChildren": true, "showEmptyState": false, "settings": [