Merge branch 'master' into BUDI-8428/row-action-crud
This commit is contained in:
commit
9a7470a943
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||||
"version": "2.29.19",
|
"version": "2.29.20",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Select, Label, Checkbox, Input, Body } from "@budibase/bbui"
|
import { Select, Label, Checkbox, Body } from "@budibase/bbui"
|
||||||
import { tables, viewsV2 } from "stores/builder"
|
import { tables, viewsV2 } from "stores/builder"
|
||||||
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
|
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
|
||||||
|
|
||||||
|
@ -46,19 +46,35 @@
|
||||||
|
|
||||||
{#if parameters.confirm}
|
{#if parameters.confirm}
|
||||||
<Label small>Title</Label>
|
<Label small>Title</Label>
|
||||||
<Input placeholder="Delete Row" bind:value={parameters.customTitleText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Prompt User"
|
||||||
|
value={parameters.customTitleText}
|
||||||
|
on:change={e => (parameters.customTitleText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
|
|
||||||
<Label small>Text</Label>
|
<Label small>Text</Label>
|
||||||
<Input
|
<DrawerBindableInput
|
||||||
placeholder="Are you sure you want to delete?"
|
placeholder="Are you sure you want to continue?"
|
||||||
bind:value={parameters.confirmText}
|
value={parameters.confirmText}
|
||||||
|
on:change={e => (parameters.confirmText = e.detail)}
|
||||||
|
{bindings}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Label small>Confirm Text</Label>
|
<Label small>Confirm Text</Label>
|
||||||
<Input placeholder="Confirm" bind:value={parameters.confirmButtonText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Confirm"
|
||||||
|
value={parameters.confirmButtonText}
|
||||||
|
on:change={e => (parameters.confirmButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
<Label small>Cancel Text</Label>
|
<Label small>Cancel Text</Label>
|
||||||
<Input placeholder="Cancel" bind:value={parameters.cancelButtonText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Cancel"
|
||||||
|
value={parameters.cancelButtonText}
|
||||||
|
on:change={e => (parameters.cancelButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { Select, Label, Body, Checkbox, Input } from "@budibase/bbui"
|
import { Select, Label, Body, Checkbox } from "@budibase/bbui"
|
||||||
import {
|
import {
|
||||||
selectedScreen,
|
selectedScreen,
|
||||||
componentStore,
|
componentStore,
|
||||||
tables,
|
tables,
|
||||||
viewsV2,
|
viewsV2,
|
||||||
} from "stores/builder"
|
} from "stores/builder"
|
||||||
|
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
|
||||||
import { getSchemaForDatasourcePlus } from "dataBinding"
|
import { getSchemaForDatasourcePlus } from "dataBinding"
|
||||||
import SaveFields from "./SaveFields.svelte"
|
import SaveFields from "./SaveFields.svelte"
|
||||||
import { getDatasourceLikeProviders } from "components/design/settings/controls/ButtonActionEditor/actions/utils"
|
import { getDatasourceLikeProviders } from "components/design/settings/controls/ButtonActionEditor/actions/utils"
|
||||||
|
@ -73,22 +74,35 @@
|
||||||
|
|
||||||
{#if parameters.confirm}
|
{#if parameters.confirm}
|
||||||
<Label small>Title</Label>
|
<Label small>Title</Label>
|
||||||
<Input
|
<DrawerBindableInput
|
||||||
placeholder="Duplicate Row"
|
placeholder="Prompt User"
|
||||||
bind:value={parameters.customTitleText}
|
value={parameters.customTitleText}
|
||||||
|
on:change={e => (parameters.customTitleText = e.detail)}
|
||||||
|
{bindings}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Label small>Text</Label>
|
<Label small>Text</Label>
|
||||||
<Input
|
<DrawerBindableInput
|
||||||
placeholder="Are you sure you want to duplicate this row?"
|
placeholder="Are you sure you want to continue?"
|
||||||
bind:value={parameters.confirmText}
|
value={parameters.confirmText}
|
||||||
|
on:change={e => (parameters.confirmText = e.detail)}
|
||||||
|
{bindings}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Label small>Confirm Text</Label>
|
<Label small>Confirm Text</Label>
|
||||||
<Input placeholder="Confirm" bind:value={parameters.confirmButtonText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Confirm"
|
||||||
|
value={parameters.confirmButtonText}
|
||||||
|
on:change={e => (parameters.confirmButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
<Label small>Cancel Text</Label>
|
<Label small>Cancel Text</Label>
|
||||||
<Input placeholder="Cancel" bind:value={parameters.cancelButtonText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Cancel"
|
||||||
|
value={parameters.cancelButtonText}
|
||||||
|
on:change={e => (parameters.cancelButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { Select, Layout, Input, Checkbox } from "@budibase/bbui"
|
import { Select, Layout, Checkbox } from "@budibase/bbui"
|
||||||
|
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
|
||||||
import { datasources, integrations, queries } from "stores/builder"
|
import { datasources, integrations, queries } from "stores/builder"
|
||||||
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
|
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
|
||||||
import IntegrationQueryEditor from "components/integration/index.svelte"
|
import IntegrationQueryEditor from "components/integration/index.svelte"
|
||||||
|
@ -58,37 +59,46 @@
|
||||||
text="Do not display default notification"
|
text="Do not display default notification"
|
||||||
bind:value={parameters.notificationOverride}
|
bind:value={parameters.notificationOverride}
|
||||||
/>
|
/>
|
||||||
<br />
|
|
||||||
{#if parameters.queryId}
|
{#if parameters.queryId}
|
||||||
<Checkbox text="Require confirmation" bind:value={parameters.confirm} />
|
<Checkbox text="Require confirmation" bind:value={parameters.confirm} />
|
||||||
|
|
||||||
{#if parameters.confirm}
|
{#if parameters.confirm}
|
||||||
<Input
|
<div class="params">
|
||||||
label="Title"
|
<DrawerBindableInput
|
||||||
placeholder="Execute Query"
|
label="Title"
|
||||||
bind:value={parameters.customTitleText}
|
placeholder="Prompt User"
|
||||||
/>
|
value={parameters.customTitleText}
|
||||||
|
on:change={e => (parameters.customTitleText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
|
<DrawerBindableInput
|
||||||
|
label="Message"
|
||||||
|
placeholder="Are you sure you want to continue?"
|
||||||
|
value={parameters.confirmText}
|
||||||
|
on:change={e => (parameters.confirmText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
|
|
||||||
<Input
|
<DrawerBindableInput
|
||||||
label="Text"
|
label="Confirm Text"
|
||||||
placeholder="Are you sure you want to execute this query?"
|
placeholder="Confirm"
|
||||||
bind:value={parameters.confirmText}
|
value={parameters.confirmButtonText}
|
||||||
/>
|
on:change={e => (parameters.confirmButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
|
|
||||||
<Input
|
<DrawerBindableInput
|
||||||
label="Confirm Text"
|
label="Cancel Text"
|
||||||
placeholder="Confirm"
|
placeholder="Cancel"
|
||||||
bind:value={parameters.confirmButtonText}
|
value={parameters.cancelButtonText}
|
||||||
/>
|
on:change={e => (parameters.cancelButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
<Input
|
/>
|
||||||
label="Cancel Text"
|
</div>
|
||||||
placeholder="Cancel"
|
|
||||||
bind:value={parameters.cancelButtonText}
|
|
||||||
/>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if query?.parameters?.length > 0}
|
{#if query?.parameters?.length > 0}
|
||||||
|
<br />
|
||||||
<div class="params">
|
<div class="params">
|
||||||
<BindingBuilder
|
<BindingBuilder
|
||||||
customParams={parameters.queryParams}
|
customParams={parameters.queryParams}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { Select, Label, Body, Checkbox, Input } from "@budibase/bbui"
|
import { Select, Label, Body, Checkbox } from "@budibase/bbui"
|
||||||
import {
|
import {
|
||||||
selectedScreen,
|
selectedScreen,
|
||||||
componentStore,
|
componentStore,
|
||||||
tables,
|
tables,
|
||||||
viewsV2,
|
viewsV2,
|
||||||
} from "stores/builder"
|
} from "stores/builder"
|
||||||
|
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
|
||||||
import { getSchemaForDatasourcePlus } from "dataBinding"
|
import { getSchemaForDatasourcePlus } from "dataBinding"
|
||||||
import SaveFields from "./SaveFields.svelte"
|
import SaveFields from "./SaveFields.svelte"
|
||||||
import { getDatasourceLikeProviders } from "components/design/settings/controls/ButtonActionEditor/actions/utils"
|
import { getDatasourceLikeProviders } from "components/design/settings/controls/ButtonActionEditor/actions/utils"
|
||||||
|
@ -73,19 +74,35 @@
|
||||||
|
|
||||||
{#if parameters.confirm}
|
{#if parameters.confirm}
|
||||||
<Label small>Title</Label>
|
<Label small>Title</Label>
|
||||||
<Input placeholder="Save Row" bind:value={parameters.customTitleText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Prompt User"
|
||||||
|
value={parameters.customTitleText}
|
||||||
|
on:change={e => (parameters.customTitleText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
|
|
||||||
<Label small>Text</Label>
|
<Label small>Text</Label>
|
||||||
<Input
|
<DrawerBindableInput
|
||||||
placeholder="Are you sure you want to save this row?"
|
placeholder="Are you sure you want to continue?"
|
||||||
bind:value={parameters.confirmText}
|
value={parameters.confirmText}
|
||||||
|
on:change={e => (parameters.confirmText = e.detail)}
|
||||||
|
{bindings}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Label small>Confirm Text</Label>
|
<Label small>Confirm Text</Label>
|
||||||
<Input placeholder="Confirm" bind:value={parameters.confirmButtonText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Confirm"
|
||||||
|
value={parameters.confirmButtonText}
|
||||||
|
on:change={e => (parameters.confirmButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
<Label small>Cancel Text</Label>
|
<Label small>Cancel Text</Label>
|
||||||
<Input placeholder="Cancel" bind:value={parameters.cancelButtonText} />
|
<DrawerBindableInput
|
||||||
|
placeholder="Cancel"
|
||||||
|
value={parameters.cancelButtonText}
|
||||||
|
on:change={e => (parameters.cancelButtonText = e.detail)}
|
||||||
|
{bindings}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
<PropertyControl
|
<PropertyControl
|
||||||
label="Text align"
|
label="Text align"
|
||||||
control={BarButtonList}
|
control={BarButtonList}
|
||||||
onChange={align => nav.syncAppNavigation({ textAlign: align })}
|
onChange={align => update("textAlign", align)}
|
||||||
value={$nav.textAlign}
|
value={$nav.textAlign}
|
||||||
props={{
|
props={{
|
||||||
options: alignmentOptions,
|
options: alignmentOptions,
|
||||||
|
|
|
@ -4,7 +4,12 @@ import {
|
||||||
getDatasource,
|
getDatasource,
|
||||||
knexClient,
|
knexClient,
|
||||||
} from "../../../integrations/tests/utils"
|
} from "../../../integrations/tests/utils"
|
||||||
import { db as dbCore, utils } from "@budibase/backend-core"
|
import {
|
||||||
|
db as dbCore,
|
||||||
|
MAX_VALID_DATE,
|
||||||
|
MIN_VALID_DATE,
|
||||||
|
utils,
|
||||||
|
} from "@budibase/backend-core"
|
||||||
|
|
||||||
import * as setup from "./utilities"
|
import * as setup from "./utilities"
|
||||||
import {
|
import {
|
||||||
|
@ -1098,21 +1103,37 @@ describe.each([
|
||||||
}).toFindNothing()
|
}).toFindNothing()
|
||||||
})
|
})
|
||||||
|
|
||||||
// We never implemented half-open ranges in Lucene.
|
it("greater than equal to", async () => {
|
||||||
!isLucene &&
|
await expectQuery({
|
||||||
it("can search using just a low value", async () => {
|
range: {
|
||||||
await expectQuery({
|
age: { low: 10, high: Number.MAX_SAFE_INTEGER },
|
||||||
range: { age: { low: 5 } },
|
},
|
||||||
}).toContainExactly([{ age: 10 }])
|
}).toContainExactly([{ age: 10 }])
|
||||||
})
|
})
|
||||||
|
|
||||||
// We never implemented half-open ranges in Lucene.
|
it("greater than", async () => {
|
||||||
!isLucene &&
|
await expectQuery({
|
||||||
it("can search using just a high value", async () => {
|
range: {
|
||||||
await expectQuery({
|
age: { low: 5, high: Number.MAX_SAFE_INTEGER },
|
||||||
range: { age: { high: 5 } },
|
},
|
||||||
}).toContainExactly([{ age: 1 }])
|
}).toContainExactly([{ age: 10 }])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("less than equal to", async () => {
|
||||||
|
await expectQuery({
|
||||||
|
range: {
|
||||||
|
age: { high: 1, low: Number.MIN_SAFE_INTEGER },
|
||||||
|
},
|
||||||
|
}).toContainExactly([{ age: 1 }])
|
||||||
|
})
|
||||||
|
|
||||||
|
it("less than", async () => {
|
||||||
|
await expectQuery({
|
||||||
|
range: {
|
||||||
|
age: { high: 5, low: Number.MIN_SAFE_INTEGER },
|
||||||
|
},
|
||||||
|
}).toContainExactly([{ age: 1 }])
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("sort", () => {
|
describe("sort", () => {
|
||||||
|
@ -1232,21 +1253,29 @@ describe.each([
|
||||||
}).toFindNothing()
|
}).toFindNothing()
|
||||||
})
|
})
|
||||||
|
|
||||||
// We never implemented half-open ranges in Lucene.
|
it("greater than equal to", async () => {
|
||||||
!isLucene &&
|
await expectQuery({
|
||||||
it("can search using just a low value", async () => {
|
range: { dob: { low: JAN_10TH, high: MAX_VALID_DATE.toISOString() } },
|
||||||
await expectQuery({
|
}).toContainExactly([{ dob: JAN_10TH }])
|
||||||
range: { dob: { low: JAN_5TH } },
|
})
|
||||||
}).toContainExactly([{ dob: JAN_10TH }])
|
|
||||||
})
|
|
||||||
|
|
||||||
// We never implemented half-open ranges in Lucene.
|
it("greater than", async () => {
|
||||||
!isLucene &&
|
await expectQuery({
|
||||||
it("can search using just a high value", async () => {
|
range: { dob: { low: JAN_5TH, high: MAX_VALID_DATE.toISOString() } },
|
||||||
await expectQuery({
|
}).toContainExactly([{ dob: JAN_10TH }])
|
||||||
range: { dob: { high: JAN_5TH } },
|
})
|
||||||
}).toContainExactly([{ dob: JAN_1ST }])
|
|
||||||
})
|
it("less than equal to", async () => {
|
||||||
|
await expectQuery({
|
||||||
|
range: { dob: { high: JAN_1ST, low: MIN_VALID_DATE.toISOString() } },
|
||||||
|
}).toContainExactly([{ dob: JAN_1ST }])
|
||||||
|
})
|
||||||
|
|
||||||
|
it("less than", async () => {
|
||||||
|
await expectQuery({
|
||||||
|
range: { dob: { high: JAN_5TH, low: MIN_VALID_DATE.toISOString() } },
|
||||||
|
}).toContainExactly([{ dob: JAN_1ST }])
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("sort", () => {
|
describe("sort", () => {
|
||||||
|
|
|
@ -127,9 +127,14 @@ function mapTable(table: Table): SQLiteTables {
|
||||||
// nothing exists, need to iterate though existing tables
|
// nothing exists, need to iterate though existing tables
|
||||||
async function buildBaseDefinition(): Promise<PreSaveSQLiteDefinition> {
|
async function buildBaseDefinition(): Promise<PreSaveSQLiteDefinition> {
|
||||||
const tables = await tablesSdk.getAllInternalTables()
|
const tables = await tablesSdk.getAllInternalTables()
|
||||||
const defaultTables = DEFAULT_TABLES
|
for (const defaultTable of DEFAULT_TABLES) {
|
||||||
|
// the default table doesn't exist in Couch, use the in-memory representation
|
||||||
|
if (!tables.find(table => table._id === defaultTable._id)) {
|
||||||
|
tables.push(defaultTable)
|
||||||
|
}
|
||||||
|
}
|
||||||
const definition = sql.designDoc.base("tableId")
|
const definition = sql.designDoc.base("tableId")
|
||||||
for (let table of tables.concat(defaultTables)) {
|
for (let table of tables) {
|
||||||
definition.sql.tables = {
|
definition.sql.tables = {
|
||||||
...definition.sql.tables,
|
...definition.sql.tables,
|
||||||
...mapTable(table),
|
...mapTable(table),
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
const nodemailer = require("nodemailer")
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
port: 587,
|
||||||
|
host: "smtp.ethereal.email",
|
||||||
|
secure: false,
|
||||||
|
auth: {
|
||||||
|
user: "seamus99@ethereal.email",
|
||||||
|
pass: "5ghVteZAqj6jkKJF9R",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const transporter = nodemailer.createTransport(options)
|
||||||
|
transporter.verify(function (error) {
|
||||||
|
if (error) {
|
||||||
|
console.log(error)
|
||||||
|
} else {
|
||||||
|
console.log("Ethereal server is ready to take our messages")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const message = {
|
||||||
|
from: "from@example.com",
|
||||||
|
to: "to@example.com",
|
||||||
|
subject: "Did this email arrive?",
|
||||||
|
html: "Hello World!",
|
||||||
|
}
|
||||||
|
|
||||||
|
transporter.sendMail(message).then(response => {
|
||||||
|
console.log("Test email URL: " + nodemailer.getTestMessageUrl(response))
|
||||||
|
})
|
Loading…
Reference in New Issue