diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 690a37b311..85ae1924d0 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -364,7 +364,7 @@ value.customType !== "cron" && value.customType !== "triggerSchema" && value.customType !== "automationFields" && - value.type !== "signature" && + value.type !== "signature_single" && value.type !== "attachment" && value.type !== "attachment_single" ) @@ -457,7 +457,7 @@ value={inputData[key]} options={Object.keys(table?.schema || {})} /> - {:else if value.type === "attachment" || value.type === "signature"} + {:else if value.type === "attachment" || value.type === "signature_single"}
diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte index fd7f5de459..b5a54138ca 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte @@ -27,7 +27,7 @@ let attachmentTypes = [ FieldType.ATTACHMENTS, FieldType.ATTACHMENT_SINGLE, - FieldType.SIGNATURE, + FieldType.SIGNATURE_SINGLE, ] $: { diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte index 9b2f07b6aa..087d0b94fc 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte @@ -21,6 +21,12 @@ return clone }) + let attachmentTypes = [ + FieldType.ATTACHMENTS, + FieldType.ATTACHMENT_SINGLE, + FieldType.SIGNATURE_SINGLE, + ] + function schemaHasOptions(schema) { return !!schema.constraints?.inclusion?.length } @@ -30,7 +36,7 @@ if ( (schema.type === FieldType.ATTACHMENT_SINGLE || - schema.type === FieldType.SIGNATURE) && + schema.type === FieldType.SIGNATURE_SINGLE) && Object.keys(keyValueObj).length === 0 ) { return [] @@ -101,7 +107,7 @@ on:change={e => onChange(e, field)} useLabel={false} /> -{:else if schema.type === FieldType.ATTACHMENTS || schema.type === FieldType.ATTACHMENT_SINGLE || schema.type === FieldType.SIGNATURE} +{:else if attachmentTypes.includes(schema.type)}
@@ -109,7 +115,7 @@ { detail: schema.type === FieldType.ATTACHMENT_SINGLE || - schema.type === FieldType.SIGNATURE + schema.type === FieldType.SIGNATURE_SINGLE ? e.detail.length > 0 ? { url: e.detail[0].name, diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte index 3f880710e2..1a6bb86113 100644 --- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte +++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte @@ -111,7 +111,7 @@ }} maximum={1} /> -{:else if type === "signature"} +{:else if type === "signature_single"}
diff --git a/packages/builder/src/components/backend/DataTable/formula.js b/packages/builder/src/components/backend/DataTable/formula.js index ef35d258a4..a179a7c6e1 100644 --- a/packages/builder/src/components/backend/DataTable/formula.js +++ b/packages/builder/src/components/backend/DataTable/formula.js @@ -9,7 +9,7 @@ const MAX_DEPTH = 1 const TYPES_TO_SKIP = [ FieldType.FORMULA, FieldType.LONGFORM, - FieldType.SIGNATURE, + FieldType.SIGNATURE_SINGLE, FieldType.ATTACHMENTS, //https://github.com/Budibase/budibase/issues/3030 FieldType.INTERNAL, diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 68cc03a99b..e88c28a9d9 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -412,7 +412,7 @@ FIELDS.FORMULA, FIELDS.JSON, FIELDS.BARCODEQR, - FIELDS.SIGNATURE, + FIELDS.SIGNATURE_SINGLE, FIELDS.BIGINT, FIELDS.AUTO, ] diff --git a/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte b/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte index 01dabaebae..de56fa8ce5 100644 --- a/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte +++ b/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte @@ -56,7 +56,7 @@ }, { label: "Signature", - value: FieldType.SIGNATURE, + value: FieldType.SIGNATURE_SINGLE, }, { label: "Attachment list", diff --git a/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte b/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte index 4a0664363c..3a787a70cb 100644 --- a/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte +++ b/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte @@ -31,7 +31,7 @@ let attachmentTypes = [ FieldType.ATTACHMENT_SINGLE, FieldType.ATTACHMENTS, - FieldType.SIGNATURE, + FieldType.SIGNATURE_SINGLE, ] $: readableValue = runtimeToReadableBinding(bindings, value) @@ -111,7 +111,7 @@ boolean: isValidBoolean, attachment: false, attachment_single: false, - signature: false, + signature_single: false, } const isValid = value => { @@ -133,7 +133,7 @@ "bigint", "barcodeqr", "attachment", - "signature", + "signature_single", "attachment_single", ].includes(type) ) { diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 7ccc7a6463..e174a2e6f7 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -76,7 +76,7 @@ const componentMap = { "field/array": FormFieldSelect, "field/json": FormFieldSelect, "field/barcodeqr": FormFieldSelect, - "field/signature": FormFieldSelect, + "field/signature_single": FormFieldSelect, "field/bb_reference": FormFieldSelect, // Some validation types are the same as others, so not all types are // explicitly listed here. e.g. options uses string validation @@ -87,7 +87,7 @@ const componentMap = { "validation/datetime": ValidationEditor, "validation/attachment": ValidationEditor, "validation/attachment_single": ValidationEditor, - "validation/signature": ValidationEditor, + "validation/signature_single": ValidationEditor, "validation/link": ValidationEditor, "validation/bb_reference": ValidationEditor, } diff --git a/packages/builder/src/components/design/settings/controls/FieldConfiguration/utils.js b/packages/builder/src/components/design/settings/controls/FieldConfiguration/utils.js index 6c85b40f2b..26aa5930a4 100644 --- a/packages/builder/src/components/design/settings/controls/FieldConfiguration/utils.js +++ b/packages/builder/src/components/design/settings/controls/FieldConfiguration/utils.js @@ -41,7 +41,7 @@ export const FieldTypeToComponentMap = { [FieldType.BOOLEAN]: "booleanfield", [FieldType.LONGFORM]: "longformfield", [FieldType.DATETIME]: "datetimefield", - [FieldType.SIGNATURE]: "signaturefield", + [FieldType.SIGNATURE_SINGLE]: "signaturesinglefield", [FieldType.ATTACHMENTS]: "attachmentfield", [FieldType.ATTACHMENT_SINGLE]: "attachmentsinglefield", [FieldType.LINK]: "relationshipfield", diff --git a/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationDrawer.svelte b/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationDrawer.svelte index eb1f7988fc..f70c0910e0 100644 --- a/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationDrawer.svelte @@ -109,7 +109,7 @@ Constraints.MaxUploadSize, ], ["attachment_single"]: [Constraints.Required, Constraints.MaxUploadSize], - ["signature"]: [Constraints.Required], + ["signature_single"]: [Constraints.Required], ["link"]: [ Constraints.Required, Constraints.Contains, diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index 6c4781aca1..78e90d6298 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -127,9 +127,9 @@ export const FIELDS = { presence: false, }, }, - SIGNATURE: { + SIGNATURE_SINGLE: { name: "Signature", - type: FieldType.SIGNATURE, + type: FieldType.SIGNATURE_SINGLE, icon: "AnnotatePen", constraints: { presence: false, diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json index 6a5664204c..ba6f403d81 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json @@ -71,7 +71,7 @@ "multifieldselect", "s3upload", "codescanner", - "signaturefield", + "signaturesinglefield", "bbreferencesinglefield", "bbreferencefield" ] diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 392028aa33..9fb0783985 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -4107,7 +4107,7 @@ } ] }, - "signaturefield": { + "signaturesinglefield": { "name": "Signature", "icon": "AnnotatePen", "styles": ["size"], @@ -4117,7 +4117,7 @@ }, "settings": [ { - "type": "field/signature", + "type": "field/signature_single", "label": "Field", "key": "field", "required": true @@ -4150,7 +4150,7 @@ ] }, { - "type": "validation/signature", + "type": "validation/signature_single", "label": "Validation", "key": "validation" } diff --git a/packages/client/src/components/app/blocks/FormBlockComponent.svelte b/packages/client/src/components/app/blocks/FormBlockComponent.svelte index 3cbf9680f5..396dfcf808 100644 --- a/packages/client/src/components/app/blocks/FormBlockComponent.svelte +++ b/packages/client/src/components/app/blocks/FormBlockComponent.svelte @@ -15,7 +15,7 @@ [FieldType.BOOLEAN]: "booleanfield", [FieldType.LONGFORM]: "longformfield", [FieldType.DATETIME]: "datetimefield", - [FieldType.SIGNATURE]: "signaturefield", + [FieldType.SIGNATURE_SINGLE]: "signaturesinglefield", [FieldType.ATTACHMENTS]: "attachmentfield", [FieldType.ATTACHMENT_SINGLE]: "attachmentsinglefield", [FieldType.LINK]: "relationshipfield", diff --git a/packages/client/src/components/app/forms/SignatureField.svelte b/packages/client/src/components/app/forms/SignatureField.svelte index 39cda69cb8..bdae148368 100644 --- a/packages/client/src/components/app/forms/SignatureField.svelte +++ b/packages/client/src/components/app/forms/SignatureField.svelte @@ -80,7 +80,7 @@ {validation} {span} {helpText} - type="signature" + type="signature_single" bind:fieldState bind:fieldApi bind:fieldSchema diff --git a/packages/client/src/components/app/forms/index.js b/packages/client/src/components/app/forms/index.js index 4285034043..391b5fa19f 100644 --- a/packages/client/src/components/app/forms/index.js +++ b/packages/client/src/components/app/forms/index.js @@ -16,6 +16,6 @@ export { default as formstep } from "./FormStep.svelte" export { default as jsonfield } from "./JSONField.svelte" export { default as s3upload } from "./S3Upload.svelte" export { default as codescanner } from "./CodeScannerField.svelte" -export { default as signaturefield } from "./SignatureField.svelte" +export { default as signaturesinglefield } from "./SignatureField.svelte" export { default as bbreferencefield } from "./BBReferenceField.svelte" export { default as bbreferencesinglefield } from "./BBReferenceSingleField.svelte" diff --git a/packages/client/src/components/app/forms/validation.js b/packages/client/src/components/app/forms/validation.js index 57471e68d3..46a5330cf3 100644 --- a/packages/client/src/components/app/forms/validation.js +++ b/packages/client/src/components/app/forms/validation.js @@ -201,7 +201,10 @@ const parseType = (value, type) => { } // Parse attachment/signature single, treating no key as null - if (type === FieldTypes.ATTACHMENT_SINGLE || type === FieldTypes.SIGNATURE) { + if ( + type === FieldTypes.ATTACHMENT_SINGLE || + type === FieldTypes.SIGNATURE_SINGLE + ) { if (!value?.key) { return null } diff --git a/packages/frontend-core/src/components/grid/cells/SignatureCell.svelte b/packages/frontend-core/src/components/grid/cells/SignatureCell.svelte index 3176f77f9f..06933d56bb 100644 --- a/packages/frontend-core/src/components/grid/cells/SignatureCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/SignatureCell.svelte @@ -11,7 +11,6 @@ export let readonly = false export let api export let invertX = false - export let invertY = false const { API, notifications, props } = getContext("grid") diff --git a/packages/frontend-core/src/components/grid/lib/renderers.js b/packages/frontend-core/src/components/grid/lib/renderers.js index d0a529c56f..2e22ee1871 100644 --- a/packages/frontend-core/src/components/grid/lib/renderers.js +++ b/packages/frontend-core/src/components/grid/lib/renderers.js @@ -21,7 +21,7 @@ const TypeComponentMap = { [FieldType.OPTIONS]: OptionsCell, [FieldType.DATETIME]: DateCell, [FieldType.BARCODEQR]: TextCell, - [FieldType.SIGNATURE]: SignatureCell, + [FieldType.SIGNATURE_SINGLE]: SignatureCell, [FieldType.LONGFORM]: LongFormCell, [FieldType.ARRAY]: MultiSelectCell, [FieldType.NUMBER]: NumberCell, diff --git a/packages/frontend-core/src/constants.js b/packages/frontend-core/src/constants.js index 20a8e12926..9178628360 100644 --- a/packages/frontend-core/src/constants.js +++ b/packages/frontend-core/src/constants.js @@ -121,7 +121,7 @@ export const TypeIconMap = { [FieldType.OPTIONS]: "Dropdown", [FieldType.DATETIME]: "Calendar", [FieldType.BARCODEQR]: "Camera", - [FieldType.SIGNATURE]: "AnnotatePen", + [FieldType.SIGNATURE_SINGLE]: "AnnotatePen", [FieldType.LONGFORM]: "TextAlignLeft", [FieldType.ARRAY]: "Duplicate", [FieldType.NUMBER]: "123", diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index feb6ff696a..934a838e6a 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -310,7 +310,7 @@ describe.each([ constraints: { type: "array", presence: false }, } const signature: FieldSchema = { - type: FieldType.SIGNATURE, + type: FieldType.SIGNATURE_SINGLE, name: "signature", constraints: { presence: false }, } @@ -982,7 +982,7 @@ describe.each([ await coreAttachmentEnrichment( { signature: { - type: FieldType.SIGNATURE, + type: FieldType.SIGNATURE_SINGLE, name: "signature", constraints: { presence: false }, }, diff --git a/packages/server/src/automations/automationUtils.ts b/packages/server/src/automations/automationUtils.ts index ecc38d779a..de6e1b3d88 100644 --- a/packages/server/src/automations/automationUtils.ts +++ b/packages/server/src/automations/automationUtils.ts @@ -114,7 +114,7 @@ export async function sendAutomationAttachmentsToStorage( if ( schema?.type === FieldType.ATTACHMENTS || schema?.type === FieldType.ATTACHMENT_SINGLE || - schema?.type === FieldType.SIGNATURE + schema?.type === FieldType.SIGNATURE_SINGLE ) { attachmentRows[prop] = value } diff --git a/packages/server/src/integrations/base/sqlTable.ts b/packages/server/src/integrations/base/sqlTable.ts index 7d5ff632b7..5e6ce75bbe 100644 --- a/packages/server/src/integrations/base/sqlTable.ts +++ b/packages/server/src/integrations/base/sqlTable.ts @@ -125,7 +125,7 @@ function generateSchema( break case FieldType.ATTACHMENTS: case FieldType.ATTACHMENT_SINGLE: - case FieldType.SIGNATURE: + case FieldType.SIGNATURE_SINGLE: case FieldType.AUTO: case FieldType.JSON: case FieldType.INTERNAL: diff --git a/packages/server/src/integrations/googlesheets.ts b/packages/server/src/integrations/googlesheets.ts index 1a70b8a199..2da0c2c201 100644 --- a/packages/server/src/integrations/googlesheets.ts +++ b/packages/server/src/integrations/googlesheets.ts @@ -72,7 +72,7 @@ const isTypeAllowed: Record = { [FieldType.JSON]: false, [FieldType.INTERNAL]: false, [FieldType.BIGINT]: false, - [FieldType.SIGNATURE]: false, + [FieldType.SIGNATURE_SINGLE]: false, } const ALLOWED_TYPES = Object.entries(isTypeAllowed) diff --git a/packages/server/src/integrations/utils/utils.ts b/packages/server/src/integrations/utils/utils.ts index aaa35e0c0f..a15cb246ef 100644 --- a/packages/server/src/integrations/utils/utils.ts +++ b/packages/server/src/integrations/utils/utils.ts @@ -381,7 +381,7 @@ function copyExistingPropsOver( case FieldType.ARRAY: case FieldType.ATTACHMENTS: case FieldType.ATTACHMENT_SINGLE: - case FieldType.SIGNATURE: + case FieldType.SIGNATURE_SINGLE: case FieldType.JSON: case FieldType.BB_REFERENCE: case FieldType.BB_REFERENCE_SINGLE: diff --git a/packages/server/src/sdk/app/backups/imports.ts b/packages/server/src/sdk/app/backups/imports.ts index 10bc581854..a16bfb418d 100644 --- a/packages/server/src/sdk/app/backups/imports.ts +++ b/packages/server/src/sdk/app/backups/imports.ts @@ -69,7 +69,7 @@ export async function updateAttachmentColumns(prodAppId: string, db: Database) { ) } else if ( (columnType === FieldType.ATTACHMENT_SINGLE || - columnType === FieldType.SIGNATURE) && + columnType === FieldType.SIGNATURE_SINGLE) && row[column] ) { row[column] = rewriteAttachmentUrl(prodAppId, row[column]) diff --git a/packages/server/src/sdk/app/rows/attachments.ts b/packages/server/src/sdk/app/rows/attachments.ts index de265b0127..0bcfcbe4b4 100644 --- a/packages/server/src/sdk/app/rows/attachments.ts +++ b/packages/server/src/sdk/app/rows/attachments.ts @@ -33,7 +33,7 @@ export async function getRowsWithAttachments(appId: string, table: Table) { if ( column.type === FieldType.ATTACHMENTS || column.type === FieldType.ATTACHMENT_SINGLE || - column.type === FieldType.SIGNATURE + column.type === FieldType.SIGNATURE_SINGLE ) { attachmentCols.push(key) } diff --git a/packages/server/src/sdk/app/tables/internal/sqs.ts b/packages/server/src/sdk/app/tables/internal/sqs.ts index dd514cc161..2b91c5cfa7 100644 --- a/packages/server/src/sdk/app/tables/internal/sqs.ts +++ b/packages/server/src/sdk/app/tables/internal/sqs.ts @@ -42,7 +42,7 @@ const FieldTypeMap: Record = { [FieldType.BARCODEQR]: SQLiteType.BLOB, [FieldType.ATTACHMENTS]: SQLiteType.BLOB, [FieldType.ATTACHMENT_SINGLE]: SQLiteType.BLOB, - [FieldType.SIGNATURE]: SQLiteType.BLOB, + [FieldType.SIGNATURE_SINGLE]: SQLiteType.BLOB, [FieldType.ARRAY]: SQLiteType.BLOB, [FieldType.LINK]: SQLiteType.BLOB, [FieldType.BIGINT]: SQLiteType.TEXT, diff --git a/packages/server/src/sdk/tests/attachments.spec.ts b/packages/server/src/sdk/tests/attachments.spec.ts index d8673b02e6..12c808d3a5 100644 --- a/packages/server/src/sdk/tests/attachments.spec.ts +++ b/packages/server/src/sdk/tests/attachments.spec.ts @@ -85,7 +85,7 @@ describe("should be able to re-write attachment URLs", () => { const { rows, db } = await coreBehaviour( { signature: { - type: FieldType.SIGNATURE, + type: FieldType.SIGNATURE_SINGLE, name: "signature", }, otherCol: { diff --git a/packages/server/src/utilities/rowProcessor/attachments.ts b/packages/server/src/utilities/rowProcessor/attachments.ts index 6d73a60bbb..4b0cc38cb1 100644 --- a/packages/server/src/utilities/rowProcessor/attachments.ts +++ b/packages/server/src/utilities/rowProcessor/attachments.ts @@ -32,7 +32,7 @@ export class AttachmentCleanup { if ( type !== FieldType.ATTACHMENTS && type !== FieldType.ATTACHMENT_SINGLE && - type !== FieldType.SIGNATURE + type !== FieldType.SIGNATURE_SINGLE ) { return [] } @@ -64,7 +64,7 @@ export class AttachmentCleanup { if ( schema.type !== FieldType.ATTACHMENTS && schema.type !== FieldType.ATTACHMENT_SINGLE && - schema.type !== FieldType.SIGNATURE + schema.type !== FieldType.SIGNATURE_SINGLE ) { continue } @@ -103,7 +103,7 @@ export class AttachmentCleanup { if ( schema.type !== FieldType.ATTACHMENTS && schema.type !== FieldType.ATTACHMENT_SINGLE && - schema.type !== FieldType.SIGNATURE + schema.type !== FieldType.SIGNATURE_SINGLE ) { continue } @@ -125,7 +125,7 @@ export class AttachmentCleanup { if ( schema.type !== FieldType.ATTACHMENTS && schema.type !== FieldType.ATTACHMENT_SINGLE && - schema.type !== FieldType.SIGNATURE + schema.type !== FieldType.SIGNATURE_SINGLE ) { continue } diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index 863d2e1814..73176af6d8 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -160,7 +160,7 @@ export async function inputProcessing( } } else if ( field.type === FieldType.ATTACHMENT_SINGLE || - field.type === FieldType.SIGNATURE + field.type === FieldType.SIGNATURE_SINGLE ) { const attachment = clonedRow[key] if (attachment?.url) { @@ -234,7 +234,7 @@ export async function outputProcessing( if ( column.type === FieldType.ATTACHMENTS || column.type === FieldType.ATTACHMENT_SINGLE || - column.type === FieldType.SIGNATURE + column.type === FieldType.SIGNATURE_SINGLE ) { for (let row of enriched) { if (row[property] == null) { diff --git a/packages/server/src/utilities/rowProcessor/tests/attachments.spec.ts b/packages/server/src/utilities/rowProcessor/tests/attachments.spec.ts index a8baba2625..a39fc23152 100644 --- a/packages/server/src/utilities/rowProcessor/tests/attachments.spec.ts +++ b/packages/server/src/utilities/rowProcessor/tests/attachments.spec.ts @@ -35,7 +35,11 @@ const mockedDeleteFiles = objectStore.deleteFiles as jest.MockedFunction< const rowGenerators: [ string, - FieldType.ATTACHMENT_SINGLE | FieldType.ATTACHMENTS | FieldType.SIGNATURE, + ( + | FieldType.ATTACHMENT_SINGLE + | FieldType.ATTACHMENTS + | FieldType.SIGNATURE_SINGLE + ), string, (fileKey?: string) => Row ][] = [ @@ -71,7 +75,7 @@ const rowGenerators: [ ], [ "row with a single signature column", - FieldType.SIGNATURE, + FieldType.SIGNATURE_SINGLE, "signature", function rowWithSignature(): Row { return { @@ -102,7 +106,7 @@ describe.each(rowGenerators)( }, signature: { name: "signature", - type: FieldType.SIGNATURE, + type: FieldType.SIGNATURE_SINGLE, constraints: {}, }, }, diff --git a/packages/server/src/utilities/schema.ts b/packages/server/src/utilities/schema.ts index b7f88f6d40..c3230d238c 100644 --- a/packages/server/src/utilities/schema.ts +++ b/packages/server/src/utilities/schema.ts @@ -152,7 +152,7 @@ export function parse(rows: Rows, schema: TableSchema): Rows { } else if ( (columnType === FieldType.ATTACHMENTS || columnType === FieldType.ATTACHMENT_SINGLE || - columnType === FieldType.SIGNATURE) && + columnType === FieldType.SIGNATURE_SINGLE) && typeof columnData === "string" ) { parsedRow[columnName] = parseCsvExport(columnData) diff --git a/packages/shared-core/src/table.ts b/packages/shared-core/src/table.ts index 56f7341910..7706b78037 100644 --- a/packages/shared-core/src/table.ts +++ b/packages/shared-core/src/table.ts @@ -15,7 +15,7 @@ const allowDisplayColumnByType: Record = { [FieldType.ARRAY]: false, [FieldType.ATTACHMENTS]: false, [FieldType.ATTACHMENT_SINGLE]: false, - [FieldType.SIGNATURE]: false, + [FieldType.SIGNATURE_SINGLE]: false, [FieldType.LINK]: false, [FieldType.JSON]: false, [FieldType.BB_REFERENCE]: false, @@ -34,11 +34,10 @@ const allowSortColumnByType: Record = { [FieldType.BIGINT]: true, [FieldType.BOOLEAN]: true, [FieldType.JSON]: true, - [FieldType.FORMULA]: false, [FieldType.ATTACHMENTS]: false, [FieldType.ATTACHMENT_SINGLE]: false, - [FieldType.SIGNATURE]: false, + [FieldType.SIGNATURE_SINGLE]: false, [FieldType.ARRAY]: false, [FieldType.LINK]: false, [FieldType.BB_REFERENCE]: false, diff --git a/packages/types/src/documents/app/row.ts b/packages/types/src/documents/app/row.ts index 27a2f6587b..27d7df09fd 100644 --- a/packages/types/src/documents/app/row.ts +++ b/packages/types/src/documents/app/row.ts @@ -97,7 +97,7 @@ export enum FieldType { * a JSON type, called Signature within Budibase. This type functions much the same as ATTACHMENTS but restricted * only to signatures. */ - SIGNATURE = "signature", + SIGNATURE_SINGLE = "signature_single", /** * a string type, this allows representing very large integers, but they are held/managed within Budibase as * strings. When stored in external databases Budibase will attempt to use a real big integer type and depend