Merge branch 'master' into global-bindings

This commit is contained in:
deanhannigan 2024-01-15 15:28:00 +00:00 committed by GitHub
commit 50abdf2e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 829 additions and 60 deletions

@ -1 +1 @@
Subproject commit b23fb3b17961fb04badd9487913a683fcf26dbe6
Subproject commit 319c8499e7c3d33fbb96cf4d73a922690709686c

View File

@ -23,7 +23,7 @@
stepAction("addStep")
}}
>
Add Step
Add step
</ActionButton>
</div>
{:else}

View File

@ -6085,15 +6085,44 @@
"key": "steps",
"nested": true,
"labelHidden": true,
"resetOn": [
"dataSource",
"actionType"
],
"defaultValue": [
{}
]
"resetOn": ["dataSource", "actionType"],
"defaultValue": [{}]
}
]
},
{
"tag": "style",
"type": "select",
"label": "Size",
"key": "size",
"options": [
{
"label": "Medium",
"value": "spectrum--medium"
},
{
"label": "Large",
"value": "spectrum--large"
}
],
"defaultValue": "spectrum--medium"
},
{
"tag": "style",
"type": "select",
"label": "Button position",
"key": "buttonPosition",
"options": [
{
"label": "Bottom",
"value": "bottom"
},
{
"label": "Top",
"value": "top"
}
],
"defaultValue": "bottom"
}
],
"actions": [

View File

@ -12,6 +12,8 @@
export let noRowsMessage
export let steps
export let dataSource
export let buttonPosition = "bottom"
export let size
const { fetchDatasourceSchema } = getContext("sdk")
const component = getContext("component")
@ -129,6 +131,7 @@
type="form"
context="form"
props={{
size,
dataSource,
actionType: actionType === "Create" ? "Create" : "Update",
readonly: actionType === "View",
@ -156,8 +159,33 @@
size: "shrink",
}}
>
<BlockComponent type="container" order={0}>
<BlockComponent
type="container"
props={{
direction: "column",
gap: "S",
}}
order={0}
>
<BlockComponent
type="container"
props={{
direction: "row",
hAlign: "stretch",
vAlign: "center",
gap: "M",
wrap: true,
}}
order={0}
>
<BlockComponent type="heading" props={{ text: step.title }} />
{#if buttonPosition === "top"}
<BlockComponent
type="buttongroup"
props={{ buttons: step.buttons }}
/>
{/if}
</BlockComponent>
</BlockComponent>
<BlockComponent type="text" props={{ text: step.desc }} order={1} />
@ -179,16 +207,13 @@
{/each}
</div>
</BlockComponent>
{#if buttonPosition === "bottom"}
<BlockComponent
type="buttongroup"
props={{ buttons: step.buttons }}
styles={{
normal: {
"margin-top": "16px",
},
}}
order={3}
/>
{/if}
</BlockComponent>
</BlockComponent>
{/each}

793
yarn.lock

File diff suppressed because it is too large Load Diff