Merge branch 'master' into isolated-vm
This commit is contained in:
commit
663e6d9bf8
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.15.0",
|
"version": "2.15.1",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1bc012871496ff55e376931b620075b565e34d09
|
Subproject commit 11469c40d73ea58f2aec80c12c1946289b67c6f2
|
|
@ -43,7 +43,7 @@
|
||||||
},
|
},
|
||||||
TRIGGER_AUTOMATION_RUN: {
|
TRIGGER_AUTOMATION_RUN: {
|
||||||
disabled: !triggerAutomationRunEnabled,
|
disabled: !triggerAutomationRunEnabled,
|
||||||
message: collectDisabledMessage(),
|
message: "Please upgrade to a paid plan",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab title="Output">
|
<Tab title="Output">
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
{#if filteredResults?.[idx]?.inputs}
|
{#if filteredResults?.[idx]?.outputs}
|
||||||
<JsonView
|
<JsonView
|
||||||
depth={2}
|
depth={2}
|
||||||
json={filteredResults?.[idx]?.outputs}
|
json={filteredResults?.[idx]?.outputs}
|
||||||
|
|
|
@ -172,22 +172,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!savingColumn && !originalName) {
|
|
||||||
let highestNumber = 0
|
|
||||||
Object.keys(table.schema).forEach(columnName => {
|
|
||||||
const columnNumber = extractColumnNumber(columnName)
|
|
||||||
if (columnNumber > highestNumber) {
|
|
||||||
highestNumber = columnNumber
|
|
||||||
}
|
|
||||||
return highestNumber
|
|
||||||
})
|
|
||||||
|
|
||||||
if (highestNumber >= 1) {
|
|
||||||
editableColumn.name = `Column 0${highestNumber + 1}`
|
|
||||||
} else {
|
|
||||||
editableColumn.name = "Column 01"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!savingColumn) {
|
if (!savingColumn) {
|
||||||
editableColumn.fieldId = makeFieldId(
|
editableColumn.fieldId = makeFieldId(
|
||||||
|
@ -389,11 +373,6 @@
|
||||||
deleteColName = ""
|
deleteColName = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractColumnNumber(columnName) {
|
|
||||||
const match = columnName.match(/Column (\d+)/)
|
|
||||||
return match ? parseInt(match[1]) : 0
|
|
||||||
}
|
|
||||||
|
|
||||||
function getAllowedTypes() {
|
function getAllowedTypes() {
|
||||||
if (
|
if (
|
||||||
originalName &&
|
originalName &&
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
export let table
|
export let table
|
||||||
|
|
||||||
let editorModal
|
let editorModal, editTableNameModal
|
||||||
let confirmDeleteDialog
|
let confirmDeleteDialog
|
||||||
let error = ""
|
let error = ""
|
||||||
|
|
||||||
|
@ -101,11 +101,13 @@
|
||||||
|
|
||||||
<Modal bind:this={editorModal} on:show={initForm}>
|
<Modal bind:this={editorModal} on:show={initForm}>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
bind:this={editTableNameModal}
|
||||||
title="Edit Table"
|
title="Edit Table"
|
||||||
confirmText="Save"
|
confirmText="Save"
|
||||||
onConfirm={save}
|
onConfirm={save}
|
||||||
disabled={updatedName === originalName || error}
|
disabled={updatedName === originalName || error}
|
||||||
>
|
>
|
||||||
|
<form on:submit|preventDefault={() => editTableNameModal.confirm()}>
|
||||||
<Input
|
<Input
|
||||||
label="Table Name"
|
label="Table Name"
|
||||||
thin
|
thin
|
||||||
|
@ -113,6 +115,7 @@
|
||||||
on:input={checkValid}
|
on:input={checkValid}
|
||||||
{error}
|
{error}
|
||||||
/>
|
/>
|
||||||
|
</form>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<BlockComponent
|
<BlockComponent
|
||||||
type="form"
|
type="form"
|
||||||
bind:id={formId}
|
bind:id={formId}
|
||||||
props={{ dataSource, disableValidation: true }}
|
props={{ dataSource, disableSchemaValidation: true }}
|
||||||
>
|
>
|
||||||
{#if title || enrichedSearchColumns?.length || showTitleButton}
|
{#if title || enrichedSearchColumns?.length || showTitleButton}
|
||||||
<BlockComponent
|
<BlockComponent
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
bind:id={formId}
|
bind:id={formId}
|
||||||
props={{
|
props={{
|
||||||
dataSource,
|
dataSource,
|
||||||
disableValidation: true,
|
disableSchemaValidation: true,
|
||||||
editAutoColumns: true,
|
editAutoColumns: true,
|
||||||
size,
|
size,
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
// Not exposed as a builder setting. Used internally to disable validation
|
// Not exposed as a builder setting. Used internally to disable validation
|
||||||
// for fields rendered in things like search blocks.
|
// for fields rendered in things like search blocks.
|
||||||
export let disableValidation = false
|
export let disableSchemaValidation = false
|
||||||
|
|
||||||
// Not exposed as a builder setting. Used internally to allow searching on
|
// Not exposed as a builder setting. Used internally to allow searching on
|
||||||
// auto columns.
|
// auto columns.
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
{schema}
|
{schema}
|
||||||
{table}
|
{table}
|
||||||
{initialValues}
|
{initialValues}
|
||||||
{disableValidation}
|
{disableSchemaValidation}
|
||||||
{editAutoColumns}
|
{editAutoColumns}
|
||||||
{currentStep}
|
{currentStep}
|
||||||
>
|
>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
export let size
|
export let size
|
||||||
export let schema
|
export let schema
|
||||||
export let table
|
export let table
|
||||||
export let disableValidation = false
|
export let disableSchemaValidation = false
|
||||||
export let editAutoColumns = false
|
export let editAutoColumns = false
|
||||||
|
|
||||||
// We export this store so that when we remount the inner form we can still
|
// We export this store so that when we remount the inner form we can still
|
||||||
|
@ -156,12 +156,11 @@
|
||||||
if (!field) {
|
if (!field) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create validation function based on field schema
|
// Create validation function based on field schema
|
||||||
const schemaConstraints = schema?.[field]?.constraints
|
const schemaConstraints = disableSchemaValidation
|
||||||
const validator = disableValidation
|
|
||||||
? null
|
? null
|
||||||
: createValidatorFromConstraints(
|
: schema?.[field]?.constraints
|
||||||
|
const validator = createValidatorFromConstraints(
|
||||||
schemaConstraints,
|
schemaConstraints,
|
||||||
validationRules,
|
validationRules,
|
||||||
field,
|
field,
|
||||||
|
@ -332,10 +331,10 @@
|
||||||
const { value, error } = fieldState
|
const { value, error } = fieldState
|
||||||
|
|
||||||
// Create new validator
|
// Create new validator
|
||||||
const schemaConstraints = schema?.[field]?.constraints
|
const schemaConstraints = disableSchemaValidation
|
||||||
const validator = disableValidation
|
|
||||||
? null
|
? null
|
||||||
: createValidatorFromConstraints(
|
: schema?.[field]?.constraints
|
||||||
|
const validator = createValidatorFromConstraints(
|
||||||
schemaConstraints,
|
schemaConstraints,
|
||||||
validationRules,
|
validationRules,
|
||||||
field,
|
field,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9d80daaa5b79da68730d6c5f497f629c47a78ef8
|
Subproject commit 31f11bcd3323d2105a83ebfdee8facc2900bb879
|
|
@ -112,7 +112,7 @@ module.exports.convertHBSBlock = (block, blockNumber) => {
|
||||||
const list = getHelperList()
|
const list = getHelperList()
|
||||||
for (let layer of layers) {
|
for (let layer of layers) {
|
||||||
const parts = splitBySpace(layer)
|
const parts = splitBySpace(layer)
|
||||||
if (value || parts.length > 1) {
|
if (value || parts.length > 1 || list[parts[0]]) {
|
||||||
// first of layer should always be the helper
|
// first of layer should always be the helper
|
||||||
const helper = parts.splice(0, 1)
|
const helper = parts.splice(0, 1)
|
||||||
if (list[helper]) {
|
if (list[helper]) {
|
||||||
|
|
|
@ -127,4 +127,12 @@ describe("Test that the string processing works correctly", () => {
|
||||||
"return `average: ${var1} add: ${var2}`;",
|
"return `average: ${var1} add: ${var2}`;",
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should handle uuids", () => {
|
||||||
|
const response = convertToJS("This is: {{ uuid }}")
|
||||||
|
checkLines(response, [
|
||||||
|
"const var1 = helpers.uuid();",
|
||||||
|
"return `This is: ${var1}`;",
|
||||||
|
])
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -6290,6 +6290,11 @@
|
||||||
js-yaml "^3.10.0"
|
js-yaml "^3.10.0"
|
||||||
tslib "^2.4.0"
|
tslib "^2.4.0"
|
||||||
|
|
||||||
|
"@zerodevx/svelte-json-view@^1.0.7":
|
||||||
|
version "1.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/@zerodevx/svelte-json-view/-/svelte-json-view-1.0.7.tgz#abf3efa71dedcb3e9d16bc9cc61d5ea98c8d00b1"
|
||||||
|
integrity sha512-yW0MV+9BCKOwzt3h86y3xDqYdI5st+Rxk+L5pa0Utq7nlPD+VvxyhL7R1gJoLxQvWwjyAvY/fyUCFTdwDyI14w==
|
||||||
|
|
||||||
"@zkochan/js-yaml@0.0.6":
|
"@zkochan/js-yaml@0.0.6":
|
||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826"
|
resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826"
|
||||||
|
|
Loading…
Reference in New Issue