|
|
|
@ -1,15 +1,10 @@ |
|
|
|
<script> |
|
|
|
import { goto } from "@sveltech/routify" |
|
|
|
import { store } from "builderStore" |
|
|
|
import { getComponentDefinition } from "builderStore/storeUtils" |
|
|
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte" |
|
|
|
import { last, cloneDeep } from "lodash/fp" |
|
|
|
import { |
|
|
|
selectComponent, |
|
|
|
getParent, |
|
|
|
walkProps, |
|
|
|
saveCurrentPreviewItem, |
|
|
|
regenerateCssForCurrentScreen, |
|
|
|
} from "builderStore/storeUtils" |
|
|
|
import { getParent, saveCurrentPreviewItem } from "builderStore/storeUtils" |
|
|
|
import { uuid } from "builderStore/uuid" |
|
|
|
import { DropdownMenu } from "@budibase/bbui" |
|
|
|
|
|
|
|
@ -29,6 +24,12 @@ |
|
|
|
dropdown.hide() |
|
|
|
} |
|
|
|
|
|
|
|
const selectComponent = component => { |
|
|
|
store.selectComponent(component) |
|
|
|
const path = store.getPathToComponent(component) |
|
|
|
$goto(`./:page/:screen/${path}`) |
|
|
|
} |
|
|
|
|
|
|
|
const moveUpComponent = () => { |
|
|
|
store.update(s => { |
|
|
|
const parent = getParent(s.currentPreviewItem.props, component) |
|
|
|
@ -78,10 +79,10 @@ |
|
|
|
|
|
|
|
if (parent) { |
|
|
|
parent._children = parent._children.filter(c => c !== component) |
|
|
|
selectComponent(parent) |
|
|
|
} |
|
|
|
|
|
|
|
saveCurrentPreviewItem(state) |
|
|
|
|
|
|
|
return state |
|
|
|
}) |
|
|
|
} |
|
|
|
|