formatting and lint update
This commit is contained in:
parent
3f77e0a0ba
commit
b603e27bc4
|
@ -19,7 +19,8 @@
|
||||||
onChange(_value)
|
onChange(_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
$: displayValues = value && suffix
|
$: displayValues =
|
||||||
|
value && suffix
|
||||||
? value.map(v => v.replace(new RegExp(`${suffix}$`), ""))
|
? value.map(v => v.replace(new RegExp(`${suffix}$`), ""))
|
||||||
: value || []
|
: value || []
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$: hasComponent = !!$store.currentPreviewItem
|
$: hasComponent = !!$store.currentPreviewItem
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
|
@ -102,18 +101,23 @@
|
||||||
: ""
|
: ""
|
||||||
|
|
||||||
const refreshContent = () => {
|
const refreshContent = () => {
|
||||||
iframe.contentWindow.postMessage(JSON.stringify({
|
iframe.contentWindow.postMessage(
|
||||||
|
JSON.stringify({
|
||||||
styles,
|
styles,
|
||||||
stylesheetLinks,
|
stylesheetLinks,
|
||||||
selectedComponentType,
|
selectedComponentType,
|
||||||
selectedComponentId,
|
selectedComponentId,
|
||||||
frontendDefinition,
|
frontendDefinition,
|
||||||
}))
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if(iframe) iframe.contentWindow.addEventListener("bb-ready", refreshContent, { once: true })
|
$: if (iframe)
|
||||||
|
iframe.contentWindow.addEventListener("bb-ready", refreshContent, {
|
||||||
|
once: true,
|
||||||
|
})
|
||||||
|
|
||||||
$: if(iframe && frontendDefinition) {
|
$: if (iframe && frontendDefinition) {
|
||||||
refreshContent()
|
refreshContent()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -41,23 +41,28 @@
|
||||||
let panelDefinition = {}
|
let panelDefinition = {}
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
if(componentPropDefinition.properties) {
|
if (componentPropDefinition.properties) {
|
||||||
if(selectedCategory.value === "design") {
|
if (selectedCategory.value === "design") {
|
||||||
panelDefinition = componentPropDefinition.properties["design"]
|
panelDefinition = componentPropDefinition.properties["design"]
|
||||||
}else{
|
} else {
|
||||||
let panelDef = componentPropDefinition.properties["settings"]
|
let panelDef = componentPropDefinition.properties["settings"]
|
||||||
if($store.currentFrontEndType === "page" && $store.currentView !== "component") {
|
if (
|
||||||
panelDefinition = [...page,...panelDef]
|
$store.currentFrontEndType === "page" &&
|
||||||
}else if($store.currentFrontEndType === "screen" && $store.currentView !== "component") {
|
$store.currentView !== "component"
|
||||||
|
) {
|
||||||
|
panelDefinition = [...page, ...panelDef]
|
||||||
|
} else if (
|
||||||
|
$store.currentFrontEndType === "screen" &&
|
||||||
|
$store.currentView !== "component"
|
||||||
|
) {
|
||||||
panelDefinition = [...screen, ...panelDef]
|
panelDefinition = [...screen, ...panelDef]
|
||||||
}else {
|
} else {
|
||||||
panelDefinition = panelDef
|
panelDefinition = panelDef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const onStyleChanged = store.setComponentStyle
|
const onStyleChanged = store.setComponentStyle
|
||||||
const onPropChanged = store.setComponentProp
|
const onPropChanged = store.setComponentProp
|
||||||
|
|
||||||
|
|
|
@ -403,10 +403,26 @@ export const effects = [
|
||||||
options: [
|
options: [
|
||||||
{ label: "None", value: "none" },
|
{ label: "None", value: "none" },
|
||||||
{ label: "Extra small", value: "0 1px 2px 0 rgba(0, 0, 0, 0.05)" },
|
{ label: "Extra small", value: "0 1px 2px 0 rgba(0, 0, 0, 0.05)" },
|
||||||
{ label: "Small", value: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)" },
|
{
|
||||||
{ label: "Medium", value: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)" },
|
label: "Small",
|
||||||
{ label: "Large", value: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)" },
|
value:
|
||||||
{ label: "Extra large", value: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)" },
|
"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Medium",
|
||||||
|
value:
|
||||||
|
"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Large",
|
||||||
|
value:
|
||||||
|
"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Extra large",
|
||||||
|
value:
|
||||||
|
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue