From 09360cea55e8821dea39716b6513cf615ec51955 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 27 Oct 2022 08:08:35 +0100 Subject: [PATCH 01/54] Add initial version of side panel component --- .../new/_components/componentStructure.json | 3 +- packages/client/manifest.json | 8 + .../client/src/components/app/Layout.svelte | 210 +++++++++++------- .../src/components/app/SidePanel.svelte | 57 +++++ packages/client/src/components/app/index.js | 2 +- .../components/preview/IndicatorSet.svelte | 9 +- packages/client/src/sdk.js | 2 + packages/client/src/stores/index.js | 1 + packages/client/src/stores/sidePanel.js | 37 +++ packages/client/src/utils/styleable.js | 2 + 10 files changed, 241 insertions(+), 90 deletions(-) create mode 100644 packages/client/src/components/app/SidePanel.svelte create mode 100644 packages/client/src/stores/sidePanel.js diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/componentStructure.json b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/componentStructure.json index 381ceeac20..acc1fb2a63 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/componentStructure.json +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/componentStructure.json @@ -16,7 +16,8 @@ "children": [ "container", "section", - "grid" + "grid", + "sidepanel" ] }, { diff --git a/packages/client/manifest.json b/packages/client/manifest.json index d8a868b6f8..35d334d3fe 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -5225,5 +5225,13 @@ "suffix": "repeater" } ] + }, + "sidepanel": { + "name": "Side Panel", + "icon": "AdDisplay", + "hasChildren": true, + "illegalChildren": ["section"], + "showEmptyState": false, + "static": true } } \ No newline at end of file diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index a317da1f0f..d1e55df5b5 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -16,6 +16,7 @@ builderStore, currentRole, environmentStore, + sidePanelStore, } = sdk const component = getContext("component") const context = getContext("context") @@ -150,113 +151,130 @@ class:desktop={!mobile} class:mobile={!!mobile} > - {#if typeClass !== "none"} -