Merge remote-tracking branch 'origin/master' into feature/signature-field-and-component
This commit is contained in:
commit
d23df69553
|
@ -66,7 +66,8 @@ jobs:
|
||||||
# Run build all the projects
|
# Run build all the projects
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
yarn build
|
yarn build:oss
|
||||||
|
yarn build:account-portal
|
||||||
# Check the types of the projects built via esbuild
|
# Check the types of the projects built via esbuild
|
||||||
- name: Check types
|
- name: Check types
|
||||||
run: |
|
run: |
|
||||||
|
@ -231,27 +232,34 @@ jobs:
|
||||||
echo "pro_commit=$pro_commit"
|
echo "pro_commit=$pro_commit"
|
||||||
echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT"
|
echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT"
|
||||||
echo "base_commit=$base_commit"
|
echo "base_commit=$base_commit"
|
||||||
echo "base_commit=$base_commit" >> "$GITHUB_OUTPUT"
|
|
||||||
|
base_commit_excluding_merges=$(git log --no-merges -n 1 --format=format:%H $base_commit)
|
||||||
|
echo "base_commit_excluding_merges=$base_commit_excluding_merges"
|
||||||
|
echo "base_commit_excluding_merges=$base_commit_excluding_merges" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "Nothing to do - branch to branch merge."
|
echo "Nothing to do - branch to branch merge."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check submodule merged to base branch
|
- name: Check submodule merged and latest on base branch
|
||||||
if: ${{ steps.get_pro_commits.outputs.base_commit != '' }}
|
if: ${{ steps.get_pro_commits.outputs.base_commit_excluding_merges != '' }}
|
||||||
uses: actions/github-script@v7
|
run: |
|
||||||
with:
|
cd packages/pro
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
base_commit_excluding_merges='${{ steps.get_pro_commits.outputs.base_commit_excluding_merges }}'
|
||||||
script: |
|
pro_commit='${{ steps.get_pro_commits.outputs.pro_commit }}'
|
||||||
const submoduleCommit = '${{ steps.get_pro_commits.outputs.pro_commit }}';
|
|
||||||
const baseCommit = '${{ steps.get_pro_commits.outputs.base_commit }}';
|
|
||||||
|
|
||||||
if (submoduleCommit !== baseCommit) {
|
any_commit=$(git log --no-merges $base_commit_excluding_merges...$pro_commit)
|
||||||
console.error('Submodule commit does not match the latest commit on the "${{ steps.get_pro_commits.outputs.target_branch }}" branch.');
|
|
||||||
console.error('Refer to the pro repo to merge your changes: https://github.com/Budibase/budibase-pro/blob/master/docs/getting_started.md')
|
if [ -n "$any_commit" ]; then
|
||||||
process.exit(1);
|
echo $any_commit
|
||||||
} else {
|
|
||||||
console.log('All good, the submodule had been merged and setup correctly!')
|
echo "An error occurred: <error_message>"
|
||||||
}
|
echo 'Submodule commit does not match the latest commit on the "${{ steps.get_pro_commits.outputs.target_branch }}" branch.'
|
||||||
|
echo 'Refer to the pro repo to merge your changes: https://github.com/Budibase/budibase-pro/blob/master/docs/getting_started.md'
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo 'All good, the submodule had been merged and setup correctly!'
|
||||||
|
fi
|
||||||
|
|
||||||
check-accountportal-submodule:
|
check-accountportal-submodule:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -264,7 +272,15 @@ jobs:
|
||||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
|
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Check account portal commit
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
src:
|
||||||
|
- packages/account-portal/**
|
||||||
|
|
||||||
|
- if: steps.changes.outputs.src == 'true'
|
||||||
|
name: Check account portal commit
|
||||||
id: get_accountportal_commits
|
id: get_accountportal_commits
|
||||||
run: |
|
run: |
|
||||||
cd packages/account-portal
|
cd packages/account-portal
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
"get-past-client-version": "node scripts/getPastClientVersion.js",
|
"get-past-client-version": "node scripts/getPastClientVersion.js",
|
||||||
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev",
|
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev",
|
||||||
"build": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream",
|
"build": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream",
|
||||||
|
"build:oss": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream --ignore @budibase/account-portal --ignore @budibase/account-portal-server --ignore @budibase/account-portal-ui",
|
||||||
|
"build:account-portal": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream --scope @budibase/account-portal --scope @budibase/account-portal-server --scope @budibase/account-portal-ui",
|
||||||
"build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput",
|
"build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput",
|
||||||
"check:types": "lerna run check:types",
|
"check:types": "lerna run check:types",
|
||||||
"build:sdk": "lerna run --stream build:sdk",
|
"build:sdk": "lerna run --stream build:sdk",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit f5b467b6b1c55c48847545db41be7b1c035e167a
|
Subproject commit 60658a052d2642e5f4a8038e253f771a24f34907
|
|
@ -12,6 +12,13 @@ export default {
|
||||||
format: "esm",
|
format: "esm",
|
||||||
file: "dist/bbui.es.js",
|
file: "dist/bbui.es.js",
|
||||||
},
|
},
|
||||||
|
onwarn(warning, warn) {
|
||||||
|
// suppress eval warnings
|
||||||
|
if (warning.code === "EVAL") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
warn(warning)
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
resolve(),
|
resolve(),
|
||||||
commonjs(),
|
commonjs(),
|
||||||
|
|
|
@ -371,6 +371,7 @@
|
||||||
<style>
|
<style>
|
||||||
.binding-panel {
|
.binding-panel {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.binding-panel,
|
.binding-panel,
|
||||||
.tabs {
|
.tabs {
|
||||||
|
|
|
@ -249,7 +249,7 @@
|
||||||
<div class="component-container">
|
<div class="component-container">
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<div
|
<div
|
||||||
class={`loading ${$themeStore.theme}`}
|
class={`loading ${$themeStore.baseTheme} ${$themeStore.theme}`}
|
||||||
class:tablet={$previewStore.previewDevice === "tablet"}
|
class:tablet={$previewStore.previewDevice === "tablet"}
|
||||||
class:mobile={$previewStore.previewDevice === "mobile"}
|
class:mobile={$previewStore.previewDevice === "mobile"}
|
||||||
>
|
>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
import { sdk } from "@budibase/shared-core"
|
import { sdk } from "@budibase/shared-core"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import ErrorSVG from "./ErrorSVG.svelte"
|
import ErrorSVG from "./ErrorSVG.svelte"
|
||||||
import { ClientAppSkeleton } from "@budibase/frontend-core"
|
import { getBaseTheme, ClientAppSkeleton } from "@budibase/frontend-core"
|
||||||
|
|
||||||
$: app = $enrichedApps.find(app => app.appId === $params.appId)
|
$: app = $enrichedApps.find(app => app.appId === $params.appId)
|
||||||
$: iframeUrl = getIframeURL(app)
|
$: iframeUrl = getIframeURL(app)
|
||||||
|
@ -137,7 +137,9 @@
|
||||||
class:hide={!loading || !app?.features?.skeletonLoader}
|
class:hide={!loading || !app?.features?.skeletonLoader}
|
||||||
class="loading"
|
class="loading"
|
||||||
>
|
>
|
||||||
<div class={`loadingThemeWrapper ${app.theme}`}>
|
<div
|
||||||
|
class={`loadingThemeWrapper ${getBaseTheme(app.theme)} ${app.theme}`}
|
||||||
|
>
|
||||||
<ClientAppSkeleton
|
<ClientAppSkeleton
|
||||||
noAnimation
|
noAnimation
|
||||||
hideDevTools={app?.status === "published"}
|
hideDevTools={app?.status === "published"}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { writable, get } from "svelte/store"
|
import { writable, get } from "svelte/store"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
import { getBaseTheme } from "@budibase/frontend-core"
|
||||||
|
|
||||||
const INITIAL_THEMES_STATE = {
|
const INITIAL_THEMES_STATE = {
|
||||||
theme: "",
|
theme: "",
|
||||||
|
@ -12,11 +13,15 @@ export const themes = () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const syncAppTheme = app => {
|
const syncAppTheme = app => {
|
||||||
store.update(state => ({
|
store.update(state => {
|
||||||
|
const theme = app.theme || "spectrum--light"
|
||||||
|
return {
|
||||||
...state,
|
...state,
|
||||||
theme: app.theme || "spectrum--light",
|
theme,
|
||||||
|
baseTheme: getBaseTheme(theme),
|
||||||
customTheme: app.customTheme,
|
customTheme: app.customTheme,
|
||||||
}))
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const save = async (theme, appId) => {
|
const save = async (theme, appId) => {
|
||||||
|
|
|
@ -45,7 +45,8 @@ export default {
|
||||||
onwarn(warning, warn) {
|
onwarn(warning, warn) {
|
||||||
if (
|
if (
|
||||||
warning.code === "THIS_IS_UNDEFINED" ||
|
warning.code === "THIS_IS_UNDEFINED" ||
|
||||||
warning.code === "CIRCULAR_DEPENDENCY"
|
warning.code === "CIRCULAR_DEPENDENCY" ||
|
||||||
|
warning.code === "EVAL"
|
||||||
) {
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { derived } from "svelte/store"
|
import { derived } from "svelte/store"
|
||||||
import { appStore } from "./app"
|
import { appStore } from "./app"
|
||||||
import { builderStore } from "./builder"
|
import { builderStore } from "./builder"
|
||||||
import { Constants } from "@budibase/frontend-core"
|
import { getBaseTheme } from "@budibase/frontend-core"
|
||||||
|
|
||||||
// This is the good old acorn bug where having the word "g l o b a l" makes it
|
// This is the good old acorn bug where having the word "g l o b a l" makes it
|
||||||
// think that this is not ES6 compatible and starts throwing errors when using
|
// think that this is not ES6 compatible and starts throwing errors when using
|
||||||
|
@ -29,13 +29,6 @@ const createThemeStore = () => {
|
||||||
// Ensure theme is set
|
// Ensure theme is set
|
||||||
theme = theme || defaultTheme
|
theme = theme || defaultTheme
|
||||||
|
|
||||||
// Get base theme
|
|
||||||
let base =
|
|
||||||
Constants.Themes.find(x => `spectrum--${x.class}` === theme)?.base || ""
|
|
||||||
if (base) {
|
|
||||||
base = `spectrum--${base}`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete and nullish keys from the custom theme
|
// Delete and nullish keys from the custom theme
|
||||||
if (customTheme) {
|
if (customTheme) {
|
||||||
Object.entries(customTheme).forEach(([key, value]) => {
|
Object.entries(customTheme).forEach(([key, value]) => {
|
||||||
|
@ -59,7 +52,7 @@ const createThemeStore = () => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
theme,
|
theme,
|
||||||
baseTheme: base,
|
baseTheme: getBaseTheme(theme),
|
||||||
customTheme,
|
customTheme,
|
||||||
customThemeCss,
|
customThemeCss,
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,3 +7,4 @@ export * as RowUtils from "./rows"
|
||||||
export { memo, derivedMemo } from "./memo"
|
export { memo, derivedMemo } from "./memo"
|
||||||
export { createWebsocket } from "./websocket"
|
export { createWebsocket } from "./websocket"
|
||||||
export * from "./download"
|
export * from "./download"
|
||||||
|
export * from "./theme"
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Themes } from "../constants.js"
|
||||||
|
|
||||||
|
export const getBaseTheme = theme => {
|
||||||
|
if (!theme) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
let base = Themes.find(x => `spectrum--${x.class}` === theme)?.base || ""
|
||||||
|
if (base) {
|
||||||
|
base = `spectrum--${base}`
|
||||||
|
}
|
||||||
|
return base
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
Subproject commit f8e8f87bd52081e1303a5ae92c432ea5b38f3bb4
|
Subproject commit 6b62505be0c0b50a57b4f4980d86541ebdc86428
|
|
@ -17,6 +17,12 @@ const config = (format, outputFile) => ({
|
||||||
format,
|
format,
|
||||||
file: outputFile,
|
file: outputFile,
|
||||||
},
|
},
|
||||||
|
onwarn(warning, warn) {
|
||||||
|
if (warning.code === "EVAL") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
warn(warning)
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
typescript(),
|
typescript(),
|
||||||
resolve({
|
resolve({
|
||||||
|
|
Loading…
Reference in New Issue