Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(core): remove unsupported Base field types (#7415)

Univer56e752325938
diff --git a/packages/core/src/bases/__tests__/base-data-model.spec.ts b/packages/core/src/bases/__tests__/base-data-model.spec.ts
index 2b9e9b1b57..90cf36bf0f 100644
--- a/packages/core/src/bases/__tests__/base-data-model.spec.ts
+++ b/packages/core/src/bases/__tests__/base-data-model.spec.ts
@@ -21,9 +21,17 @@ import { BASE_RECORD_ID_FIELD_ID, createBaseRecordIdField } from '../record-iden
import { BaseFieldType } from '../typedef';
describe('BaseDataModel', () => {
- it('exposes RecordLink without the removed TwoWayLink field type', () => {
+ it('excludes field types without a public authoring contract', () => {
expect(Object.values(BaseFieldType)).toContain('recordLink');
- expect(Object.values(BaseFieldType)).not.toContain('twoWayLink');
+ expect(Object.values(BaseFieldType)).not.toEqual(expect.arrayContaining([
+ 'twoWayLink',
+ 'lookup',
+ 'summary',
+ 'location',
+ 'button',
+ 'flow',
+ 'barcode',
+ ]));
});
it('creates an empty default table without persistent records', () => {
diff --git a/packages/core/src/bases/typedef.ts b/packages/core/src/bases/typedef.ts
index e5b675c59a..3ef38b3623 100644
--- a/packages/core/src/bases/typedef.ts
+++ b/packages/core/src/bases/typedef.ts
@@ -104,14 +104,9 @@ export enum BaseFieldType {
Checkbox = 'checkbox',
Link = 'link',
Formula = 'formula',
- Lookup = 'lookup',
- Flow = 'flow',
- Button = 'button',
Numbering = 'numbering',
Phone = 'phone',
Email = 'email',
- Location = 'location',
- Barcode = 'barcode',
Progress = 'progress',
Currency = 'currency',
Rating = 'rating',
@@ -121,7 +116,6 @@ export enum BaseFieldType {
UpdatedBy = 'updatedBy',
CreatedAt = 'createdAt',
UpdatedAt = 'updatedAt',
- Summary = 'summary',
}
/** Semantic roles supported by Base RecordLink fields. */