Skip to content

Commit

Permalink
Update builder templates (#231)
Browse files Browse the repository at this point in the history
* fix: hide invisible blocks

* fix: change sections settings

* feat: add object to descriptors for pagebuilder

* feat: builder templates changes
  • Loading branch information
basilkot authored Jul 7, 2022
1 parent 433ddba commit 5b19ff1
Show file tree
Hide file tree
Showing 12 changed files with 505 additions and 87 deletions.
4 changes: 4 additions & 0 deletions client-app/builder-preview/BuilderPreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export default {
options.router.push("/demo-page");

window.addEventListener("message", (event: MessageEvent) => {
if (event.origin !== document.location.origin) {
// note: it can be cause of some problems. investigate it.
return;
}
if (event.data.source === "builder") {
console.log("received message from template builder", event);
if (event.data.type === "changed") {
Expand Down
7 changes: 7 additions & 0 deletions config/schemas/blocks/text.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
"settings": [
{
"id": "header",
"label": "Header",
"type": "string"
},
{
"id": "name",
"label": "Block name",
"type": "string"
},
{
"id": "text",
"label": "Content",
"type": "text"
}
]
Expand Down
31 changes: 31 additions & 0 deletions config/schemas/objects/button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"settings": [
{
"id": "caption",
"type": "string",
"label": "Caption"
},
{
"id": "action",
"type": "select",
"label": "onClick action",
"default": "popup",
"options": [
{
"label": "Show popup",
"value": "popup"
},
{
"label": "Go to link",
"value": "url"
}
]
},
{
"id": "url",
"type": "string",
"label": "Enter link",
"visibility": "!!this.item && this.item.action === 'url'"
}
]
}
Loading

0 comments on commit 5b19ff1

Please sign in to comment.