Merge branch 'master' into BUDI-7221/date-only-type-in-mysql
This commit is contained in:
commit
5bda559aa3
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.27.1",
|
"version": "2.27.2",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|
|
@ -237,8 +237,13 @@
|
||||||
|
|
||||||
const onChangeJSValue = e => {
|
const onChangeJSValue = e => {
|
||||||
jsValue = encodeJSBinding(e.detail)
|
jsValue = encodeJSBinding(e.detail)
|
||||||
|
if (!e.detail?.trim()) {
|
||||||
|
// Don't bother saving empty values as JS
|
||||||
|
updateValue(null)
|
||||||
|
} else {
|
||||||
updateValue(jsValue)
|
updateValue(jsValue)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
// Set the initial mode appropriately
|
// Set the initial mode appropriately
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
readableToRuntimeBinding,
|
readableToRuntimeBinding,
|
||||||
runtimeToReadableBinding,
|
runtimeToReadableBinding,
|
||||||
} from "dataBinding"
|
} from "dataBinding"
|
||||||
|
|
||||||
import ClientBindingPanel from "components/common/bindings/ClientBindingPanel.svelte"
|
import ClientBindingPanel from "components/common/bindings/ClientBindingPanel.svelte"
|
||||||
import { createEventDispatcher, setContext } from "svelte"
|
import { createEventDispatcher, setContext } from "svelte"
|
||||||
import { isJSBinding } from "@budibase/string-templates"
|
import { isJSBinding } from "@budibase/string-templates"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { screenStore, componentStore } from "stores/builder"
|
import { screenStore, componentStore, navigationStore } from "stores/builder"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import {
|
import {
|
||||||
ActionMenu,
|
ActionMenu,
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
import ScreenDetailsModal from "components/design/ScreenDetailsModal.svelte"
|
import ScreenDetailsModal from "components/design/ScreenDetailsModal.svelte"
|
||||||
import sanitizeUrl from "helpers/sanitizeUrl"
|
import sanitizeUrl from "helpers/sanitizeUrl"
|
||||||
import { makeComponentUnique } from "helpers/components"
|
import { makeComponentUnique } from "helpers/components"
|
||||||
|
import { capitalise } from "helpers"
|
||||||
|
|
||||||
export let screenId
|
export let screenId
|
||||||
|
|
||||||
|
@ -48,6 +49,13 @@
|
||||||
try {
|
try {
|
||||||
// Create the screen
|
// Create the screen
|
||||||
await screenStore.save(duplicateScreen)
|
await screenStore.save(duplicateScreen)
|
||||||
|
|
||||||
|
// Add new screen to navigation
|
||||||
|
await navigationStore.saveLink(
|
||||||
|
duplicateScreen.routing.route,
|
||||||
|
capitalise(duplicateScreen.routing.route.split("/")[1]),
|
||||||
|
duplicateScreen.routing.roleId
|
||||||
|
)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notifications.error("Error duplicating screen")
|
notifications.error("Error duplicating screen")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher, getContext } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import active from "svelte-spa-router/active"
|
import active from "svelte-spa-router/active"
|
||||||
import { Icon } from "@budibase/bbui"
|
import { Icon } from "@budibase/bbui"
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@
|
||||||
export let navStateStore
|
export let navStateStore
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
const sdk = getContext("sdk")
|
|
||||||
const { linkable } = sdk
|
|
||||||
|
|
||||||
let renderKey
|
let renderKey
|
||||||
|
|
||||||
|
@ -46,10 +44,9 @@
|
||||||
styled
|
styled
|
||||||
-->
|
-->
|
||||||
<a
|
<a
|
||||||
href={url}
|
href="#{url}"
|
||||||
on:click={onClickLink}
|
on:click={onClickLink}
|
||||||
use:active={url}
|
use:active={url}
|
||||||
use:linkable
|
|
||||||
class:active={false}
|
class:active={false}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
|
@ -73,10 +70,9 @@
|
||||||
{#each subLinks || [] as subLink}
|
{#each subLinks || [] as subLink}
|
||||||
{#if subLink.internalLink}
|
{#if subLink.internalLink}
|
||||||
<a
|
<a
|
||||||
href={subLink.url}
|
href="#{subLink.url}"
|
||||||
on:click={onClickLink}
|
on:click={onClickLink}
|
||||||
use:active={subLink.url}
|
use:active={subLink.url}
|
||||||
use:linkable
|
|
||||||
>
|
>
|
||||||
{subLink.text}
|
{subLink.text}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -238,7 +238,13 @@ const triggerAutomationHandler = async action => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const navigationHandler = action => {
|
const navigationHandler = action => {
|
||||||
const { url, peek, externalNewTab } = action.parameters
|
let { url, peek, externalNewTab, type } = action.parameters
|
||||||
|
|
||||||
|
// Ensure in-app navigation starts with a slash
|
||||||
|
if (type === "screen" && url && !url.startsWith("/")) {
|
||||||
|
url = `/${url}`
|
||||||
|
}
|
||||||
|
|
||||||
routeStore.actions.navigate(url, peek, externalNewTab)
|
routeStore.actions.navigate(url, peek, externalNewTab)
|
||||||
closeSidePanelHandler()
|
closeSidePanelHandler()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue