Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Make nullable fields optional in entry schemas and some crdt optimizations

Hakan Shehu0ac450932fb6
diff --git a/apps/desktop/src/main/mutations/databases/database-create.ts b/apps/desktop/src/main/mutations/databases/database-create.ts
index e1ee297f..7ba5ef53 100644
--- a/apps/desktop/src/main/mutations/databases/database-create.ts
+++ b/apps/desktop/src/main/mutations/databases/database-create.ts
@@ -40,12 +40,7 @@ export class DatabaseCreateMutationHandler
id: viewId,
type: 'table',
name: 'Default',
- fields: {},
- filters: {},
- sorts: {},
- avatar: null,
index: generateNodeIndex(null, null),
- groupBy: null,
},
},
};
diff --git a/apps/desktop/src/main/mutations/databases/view-create.ts b/apps/desktop/src/main/mutations/databases/view-create.ts
index 388a90e5..94136047 100644
--- a/apps/desktop/src/main/mutations/databases/view-create.ts
+++ b/apps/desktop/src/main/mutations/databases/view-create.ts
@@ -33,10 +33,6 @@ export class ViewCreateMutationHandler
id: id,
type: input.viewType,
name: input.name,
- avatar: null,
- fields: {},
- filters: {},
- sorts: {},
groupBy: input.groupBy,
index: generateNodeIndex(maxIndex, null),
};
diff --git a/apps/desktop/src/main/mutations/folders/folder-create.ts b/apps/desktop/src/main/mutations/folders/folder-create.ts
index bcbecd76..38a37d6e 100644
--- a/apps/desktop/src/main/mutations/folders/folder-create.ts
+++ b/apps/desktop/src/main/mutations/folders/folder-create.ts
@@ -19,7 +19,6 @@ export class FolderCreateMutationHandler
parentId: input.parentId,
name: input.name,
avatar: input.avatar,
- collaborators: {},
};
await entryService.createEntry(input.userId, {
diff --git a/apps/desktop/src/main/mutations/pages/page-create.ts b/apps/desktop/src/main/mutations/pages/page-create.ts
index 724a5c91..a907cccc 100644
--- a/apps/desktop/src/main/mutations/pages/page-create.ts
+++ b/apps/desktop/src/main/mutations/pages/page-create.ts
@@ -19,7 +19,6 @@ export class PageCreateMutationHandler
parentId: input.parentId,
avatar: input.avatar,
name: input.name,
- content: {},
};
await entryService.createEntry(input.userId, {
diff --git a/apps/desktop/src/main/mutations/records/record-create.ts b/apps/desktop/src/main/mutations/records/record-create.ts
index a2af2c4e..8fa4b6b0 100644
--- a/apps/desktop/src/main/mutations/records/record-create.ts
+++ b/apps/desktop/src/main/mutations/records/record-create.ts
@@ -20,7 +20,6 @@ export class RecordCreateMutationHandler
databaseId: input.databaseId,
name: input.name ?? '',
fields: input.fields ?? {},
- content: {},
};
await entryService.createEntry(input.userId, {
diff --git a/apps/desktop/src/main/mutations/spaces/space-create.ts b/apps/desktop/src/main/mutations/spaces/space-create.ts
index a0886b8b..93fd6b56 100644
--- a/apps/desktop/src/main/mutations/spaces/space-create.ts
+++ b/apps/desktop/src/main/mutations/spaces/space-create.ts
@@ -49,7 +49,6 @@ export class SpaceCreateMutationHandler
[input.userId]: 'admin',
},
description: input.description,
- avatar: null,
};
await entryService.createEntry(input.userId, {
@@ -63,8 +62,6 @@ export class SpaceCreateMutationHandler
type: 'page',
name: 'Home',
parentId: spaceId,
- content: {},
- collaborators: {},
};
await entryService.createEntry(input.userId, {
diff --git a/apps/desktop/src/renderer/components/channels/channel-create-dialog.tsx b/apps/desktop/src/renderer/components/channels/channel-create-dialog.tsx
index c0dfc07b..ff915970 100644
--- a/apps/desktop/src/renderer/components/channels/channel-create-dialog.tsx
+++ b/apps/desktop/src/renderer/components/channels/channel-create-dialog.tsx
@@ -39,7 +39,6 @@ export const ChannelCreateDialog = ({
id={generateId(IdType.Channel)}
values={{
name: '',
- avatar: null,
}}
isPending={isPending}
submitText="Create"
diff --git a/apps/desktop/src/renderer/components/databases/database-create-dialog.tsx b/apps/desktop/src/renderer/components/databases/database-create-dialog.tsx
index 8a487e78..fa9afc3d 100644
--- a/apps/desktop/src/renderer/components/databases/database-create-dialog.tsx
+++ b/apps/desktop/src/renderer/components/databases/database-create-dialog.tsx
@@ -39,7 +39,6 @@ export const DatabaseCreateDialog = ({
id={generateId(IdType.Database)}
values={{
name: '',
- avatar: null,
}}
isPending={isPending}
submitText="Create"
diff --git a/apps/desktop/src/renderer/components/databases/view-icon.tsx b/apps/desktop/src/renderer/components/databases/view-icon.tsx
index 0678f16f..e541e23a 100644
--- a/apps/desktop/src/renderer/components/databases/view-icon.tsx
+++ b/apps/desktop/src/renderer/components/databases/view-icon.tsx
@@ -5,7 +5,7 @@ import { Avatar } from '@/renderer/components/avatars/avatar';
interface ViewIconProps {
id: string;
name: string;
- avatar: string | null;
+ avatar: string | null | undefined;
type: 'table' | 'board' | 'calendar';
className?: string;
}
diff --git a/apps/desktop/src/renderer/components/databases/view.tsx b/apps/desktop/src/renderer/components/databases/view.tsx
index a44ce0b9..a49dacf1 100644
--- a/apps/desktop/src/renderer/components/databases/view.tsx
+++ b/apps/desktop/src/renderer/components/databases/view.tsx
@@ -39,7 +39,7 @@ export const View = ({ view }: ViewProps) => {
const fields: ViewField[] = React.useMemo(() => {
return database.fields
.map((field) => {
- const viewField = view.fields[field.id];
+ const viewField = view.fields?.[field.id];
return {
field,
@@ -66,8 +66,8 @@ export const View = ({ view }: ViewProps) => {
avatar: view.avatar,
type: view.type,
fields,
- filters: Object.values(view.filters),
- sorts: Object.values(view.sorts),
+ filters: Object.values(view.filters ?? {}),
+ sorts: Object.values(view.sorts ?? {}),
groupBy: view.groupBy,
nameWidth: view.nameWidth ?? getDefaultNameWidth(),
isSearchBarOpened,
@@ -125,12 +125,13 @@ export const View = ({ view }: ViewProps) => {
return;
}
- const viewField = view.fields[id];
+ const viewField = view.fields?.[id];
if (viewField && viewField.display === display) {
return;
}
const viewCopy = { ...view };
+ viewCopy.fields = viewCopy.fields ?? {};
if (!viewCopy.fields[id]) {
viewCopy.fields[id] = {
id: id,
@@ -161,12 +162,13 @@ export const View = ({ view }: ViewProps) => {
return;
}
- const viewField = view.fields[id];
+ const viewField = view.fields?.[id];
if (viewField && viewField.width === width) {
return;
}
const viewCopy = { ...view };
+ viewCopy.fields = viewCopy.fields ?? {};
if (!viewCopy.fields[id]) {
viewCopy.fields[id] = {
id: id,
@@ -227,7 +229,7 @@ export const View = ({ view }: ViewProps) => {
const newIndex = generateViewFieldIndex(
database.fields,
- Object.values(view.fields),
+ Object.values(view.fields ?? {}),
id,
after
);
@@ -236,6 +238,7 @@ export const View = ({ view }: ViewProps) => {
}
const viewCopy = { ...view };
+ viewCopy.fields = viewCopy.fields ?? {};
if (!viewCopy.fields[id]) {
viewCopy.fields[id] = {
id: id,
@@ -268,7 +271,7 @@ export const View = ({ view }: ViewProps) => {
return;
}
- if (view.filters[fieldId]) {
+ if (view.filters?.[fieldId]) {
setOpenedFieldFilters((prev) => [...prev, fieldId]);
return;
}
@@ -284,10 +287,10 @@ export const View = ({ view }: ViewProps) => {
id: fieldId,
fieldId,
operator: operators[0]?.value ?? '',
- value: null,
};
const viewCopy = { ...view };
+ viewCopy.filters = viewCopy.filters ?? {};
viewCopy.filters[fieldId] = filter;
mutate({
@@ -315,11 +318,12 @@ export const View = ({ view }: ViewProps) => {
return;
}
- if (!view.filters[id]) {
+ if (!view.filters?.[id]) {
return;
}
const viewCopy = { ...view };
+ viewCopy.filters = viewCopy.filters ?? {};
viewCopy.filters[id] = filter;
mutate({
@@ -346,11 +350,12 @@ export const View = ({ view }: ViewProps) => {
return;
}
- if (!view.filters[id]) {
+ if (!view.filters?.[id]) {
return;
}
const viewCopy = { ...view };
+ viewCopy.filters = viewCopy.filters ?? {};
delete viewCopy.filters[id];
mutate({
@@ -377,7 +382,7 @@ export const View = ({ view }: ViewProps) => {
return;
}
- const existingSort = view.sorts[fieldId];
+ const existingSort = view.sorts?.[fieldId];
if (existingSort && existingSort.direction === direction) {
return;
}
@@ -394,6 +399,7 @@ export const View = ({ view }: ViewProps) => {
};
const viewCopy = { ...view };
+ viewCopy.sorts = viewCopy.sorts ?? {};
viewCopy.sorts[fieldId] = sort;
mutate({
@@ -421,11 +427,12 @@ export const View = ({ view }: ViewProps) => {
return;
}
- if (!view.sorts[id]) {
+ if (!view.sorts?.[id]) {
return;
}
const viewCopy = { ...view };
+ viewCopy.sorts = viewCopy.sorts ?? {};
viewCopy.sorts[id] = sort;
mutate({
@@ -453,11 +460,12 @@ export const View = ({ view }: ViewProps) => {
return;
}
- if (!view.sorts[id]) {
+ if (!view.sorts?.[id]) {
return;
}
const viewCopy = { ...view };
+ viewCopy.sorts = viewCopy.sorts ?? {};
delete viewCopy.sorts[id];
mutate({
@@ -498,7 +506,7 @@ export const View = ({ view }: ViewProps) => {
setOpenedFieldFilters((prev) => prev.filter((id) => id !== fieldId));
},
createRecord: (filters?: ViewFilterAttributes[]) => {
- const viewFilters = Object.values(view.filters) ?? [];
+ const viewFilters = Object.values(view.filters ?? {}) ?? [];
const extraFilters = filters ?? [];
const allFilters = [...viewFilters, ...extraFilters];
diff --git a/apps/desktop/src/renderer/components/folders/folder-create-dialog.tsx b/apps/desktop/src/renderer/components/folders/folder-create-dialog.tsx
index 91258d20..8665f157 100644
--- a/apps/desktop/src/renderer/components/folders/folder-create-dialog.tsx
+++ b/apps/desktop/src/renderer/components/folders/folder-create-dialog.tsx
@@ -39,7 +39,6 @@ export const FolderCreateDialog = ({
id={generateId(IdType.Folder)}
values={{
name: '',
- avatar: null,
}}
isPending={isPending}
submitText="Create"
diff --git a/apps/desktop/src/renderer/components/pages/page-create-dialog.tsx b/apps/desktop/src/renderer/components/pages/page-create-dialog.tsx
index 3bd5f2b3..09e753ea 100644
--- a/apps/desktop/src/renderer/components/pages/page-create-dialog.tsx
+++ b/apps/desktop/src/renderer/components/pages/page-create-dialog.tsx
@@ -39,7 +39,6 @@ export const PageCreateDialog = ({
id={generateId(IdType.Page)}
values={{
name: '',
- avatar: null,
}}
isPending={isPending}
submitText="Create"
diff --git a/apps/desktop/src/renderer/contexts/view.ts b/apps/desktop/src/renderer/contexts/view.ts
index c88e97eb..02939741 100644
--- a/apps/desktop/src/renderer/contexts/view.ts
+++ b/apps/desktop/src/renderer/contexts/view.ts
@@ -11,12 +11,12 @@ import { ViewField } from '@/shared/types/databases';
interface ViewContext {
id: string;
name: string;
- avatar: string | null;
+ avatar: string | null | undefined;
type: ViewType;
fields: ViewField[];
filters: ViewFilterAttributes[];
sorts: ViewSortAttributes[];
- groupBy: string | null;
+ groupBy: string | null | undefined;
nameWidth: number;
isSearchBarOpened: boolean;
isSortsOpened: boolean;
diff --git a/apps/desktop/src/shared/lib/editor.ts b/apps/desktop/src/shared/lib/editor.ts
index f88fa46b..f46ea61c 100644
--- a/apps/desktop/src/shared/lib/editor.ts
+++ b/apps/desktop/src/shared/lib/editor.ts
@@ -68,10 +68,10 @@ const mapAndPushContentToBlock = (
blocks.push({
id: id,
index: index ?? generateNodeIndex(null, null),
- attrs: attrs.length > 0 ? Object.fromEntries(attrs) : null,
+ attrs: attrs.length > 0 ? Object.fromEntries(attrs) : undefined,
parentId: parentId,
type: content.type,
- content: blockContent?.filter((leaf) => leaf !== null) ?? null,
+ content: blockContent?.filter((leaf) => leaf !== null),
});
if (!isLeafBlock && content.content) {
@@ -95,14 +95,13 @@ const mapContentsToBlockLeafs = (
nodeBlocks.push({
type: content.type,
- text: content.text ?? '',
- marks:
- content.marks?.map((mark) => {
- return {
- type: mark.type,
- attrs: mark.attrs ?? null,
- };
- }) ?? null,
+ text: content.text,
+ marks: content.marks?.map((mark) => {
+ return {
+ type: mark.type,
+ attrs: mark.attrs,
+ };
+ }),
});
}
return nodeBlocks;
@@ -138,16 +137,16 @@ const mapBlockToContent = (block: Block, blocks: Block[]): JSONContent => {
};
const mapBlockLeafsToContents = (
- leafs: BlockLeaf[] | null
+ leafs: BlockLeaf[] | null | undefined
): JSONContent[] | undefined => {
- if (leafs == null) {
+ if (leafs == null || leafs === undefined || leafs.length === 0) {
return undefined;
}
const contents: JSONContent[] = [];
for (const leaf of leafs) {
contents.push({
type: leaf.type,
- text: leaf.text,
+ text: leaf.text ?? undefined,
marks:
leaf.marks?.map((mark) => {
return {
diff --git a/apps/desktop/src/shared/mutations/databases/view-create.ts b/apps/desktop/src/shared/mutations/databases/view-create.ts
index 1bebe5dd..0a6f548d 100644
--- a/apps/desktop/src/shared/mutations/databases/view-create.ts
+++ b/apps/desktop/src/shared/mutations/databases/view-create.ts
@@ -4,7 +4,7 @@ export type ViewCreateMutationInput = {
databaseId: string;
viewType: 'table' | 'board' | 'calendar';
name: string;
- groupBy: string | null;
+ groupBy: string | null | undefined;
};
export type ViewCreateMutationOutput = {
diff --git a/apps/server/src/services/workspace-service.ts b/apps/server/src/services/workspace-service.ts
index efc3bad2..244f9799 100644
--- a/apps/server/src/services/workspace-service.ts
+++ b/apps/server/src/services/workspace-service.ts
@@ -87,7 +87,6 @@ class WorkspaceService {
type: 'page',
name: 'Notes',
parentId: spaceId,
- content: {},
},
userId: userId,
workspaceId: workspaceId,
diff --git a/packages/core/src/registry/block.ts b/packages/core/src/registry/block.ts
index fa047350..e362ec30 100644
--- a/packages/core/src/registry/block.ts
+++ b/packages/core/src/registry/block.ts
@@ -4,15 +4,16 @@ import { ZodText } from './zod';
export const blockLeafSchema = z.object({
type: z.string(),
- text: ZodText.create(),
+ text: ZodText.create().nullable().optional(),
marks: z
.array(
z.object({
type: z.string(),
- attrs: z.record(z.any()).nullable(),
+ attrs: z.record(z.any()).nullable().optional(),
})
)
- .nullable(),
+ .nullable()
+ .optional(),
});
export type BlockLeaf = z.infer<typeof blockLeafSchema>;
@@ -21,8 +22,8 @@ export const blockSchema = z.object({
id: z.string(),
type: z.string(),
parentId: z.string(),
- content: z.array(blockLeafSchema).nullable(),
- attrs: z.record(z.any()).nullable(),
+ content: z.array(blockLeafSchema).nullable().optional(),
+ attrs: z.record(z.any()).nullable().optional(),
index: z.string(),
});
diff --git a/packages/core/src/registry/database.ts b/packages/core/src/registry/database.ts
index 0b0b7779..9430ae1c 100644
--- a/packages/core/src/registry/database.ts
+++ b/packages/core/src/registry/database.ts
@@ -18,7 +18,8 @@ export const viewFieldFilterAttributesSchema = z.object({
operator: z.string(),
value: z
.union([z.string(), z.number(), z.boolean(), z.array(z.string())])
- .nullable(),
+ .nullable()
+ .optional(),
});
export type ViewFieldFilterAttributes = z.infer<
@@ -55,12 +56,15 @@ export const viewAttributesSchema = z.object({
id: z.string(),
type: z.enum(['table', 'board', 'calendar']),
name: z.string(),
- avatar: z.string().nullable(),
+ avatar: z.string().nullable().optional(),
index: z.string(),
- fields: z.record(z.string(), viewFieldAttributesSchema),
- filters: z.record(z.string(), viewFilterAttributesSchema),
- sorts: z.record(z.string(), viewSortAttributesSchema),
- groupBy: z.string().nullable(),
+ fields: z.record(z.string(), viewFieldAttributesSchema).optional().nullable(),
+ filters: z
+ .record(z.string(), viewFilterAttributesSchema)
+ .optional()
+ .nullable(),
+ sorts: z.record(z.string(), viewSortAttributesSchema).optional().nullable(),
+ groupBy: z.string().nullable().optional(),
nameWidth: z.number().nullable().optional(),
});
diff --git a/packages/core/src/registry/folder.ts b/packages/core/src/registry/folder.ts
index 7d49462a..5b4e2a7b 100644
--- a/packages/core/src/registry/folder.ts
+++ b/packages/core/src/registry/folder.ts
@@ -1,13 +1,10 @@
import { z } from 'zod';
-import { entryRoleEnum } from './core';
-
export const folderAttributesSchema = z.object({
type: z.literal('folder'),
name: z.string(),
avatar: z.string().nullable().optional(),
parentId: z.string(),
- collaborators: z.record(z.string(), entryRoleEnum).nullable().optional(),
});
export type FolderAttributes = z.infer<typeof folderAttributesSchema>;
diff --git a/packages/core/src/registry/page.ts b/packages/core/src/registry/page.ts
index 419b7396..af6706a3 100644
--- a/packages/core/src/registry/page.ts
+++ b/packages/core/src/registry/page.ts
@@ -7,7 +7,7 @@ export const pageAttributesSchema = z.object({
name: z.string(),
avatar: z.string().nullable().optional(),
parentId: z.string(),
- content: z.record(blockSchema),
+ content: z.record(blockSchema).optional().nullable(),
});
export type PageAttributes = z.infer<typeof pageAttributesSchema>;
diff --git a/packages/core/src/registry/record.ts b/packages/core/src/registry/record.ts
index 6f9295f2..eb43d01c 100644
--- a/packages/core/src/registry/record.ts
+++ b/packages/core/src/registry/record.ts
@@ -10,7 +10,7 @@ export const recordAttributesSchema = z.object({
name: z.string(),
avatar: z.string().nullable().optional(),
fields: z.record(z.string(), fieldValueSchema),
- content: z.record(blockSchema),
+ content: z.record(blockSchema).nullable().optional(),
});
export type RecordAttributes = z.infer<typeof recordAttributesSchema>;
diff --git a/packages/core/src/registry/space.ts b/packages/core/src/registry/space.ts
index 325e7764..b4aa8d8c 100644
--- a/packages/core/src/registry/space.ts
+++ b/packages/core/src/registry/space.ts
@@ -5,7 +5,7 @@ import { entryRoleEnum } from './core';
export const spaceAttributesSchema = z.object({
type: z.literal('space'),
name: z.string(),
- description: z.string().nullable(),
+ description: z.string().nullable().optional(),
avatar: z.string().nullable().optional(),
collaborators: z.record(z.string(), entryRoleEnum),
});
diff --git a/packages/crdt/src/index.ts b/packages/crdt/src/index.ts
index 90e98cef..40d324ee 100644
--- a/packages/crdt/src/index.ts
+++ b/packages/crdt/src/index.ts
@@ -107,10 +107,9 @@ export class YDoc {
yMap: Y.Map<any>
) {
for (const [key, value] of Object.entries(attributes)) {
- if (value === null) {
- const currentValue = yMap.get(key);
- if (currentValue !== null) {
- yMap.set(key, null);
+ if (value === null || value === undefined) {
+ if (yMap.has(key)) {
+ yMap.delete(key);
}
continue;
@@ -194,11 +193,14 @@ export class YDoc {
for (let i = 0; i < length; i++) {
const item = value[i];
- if (item === null) {
+ if (item === null || item === undefined) {
const currentItem = yArray.get(i);
- if (currentItem !== null) {
+ if (currentItem !== null && currentItem !== undefined) {
yArray.delete(i, 1);
- yArray.insert(i, [null]);
+
+ if (yArray.length > i) {
+ yArray.insert(i, [null]);
+ }
}
continue;
@@ -271,10 +273,9 @@ export class YDoc {
) {
const valueSchema = this.extractType(schemaField.valueSchema, record);
for (const [key, value] of Object.entries(record)) {
- if (value === null) {
- const currentValue = yMap.get(key);
- if (currentValue !== null) {
- yMap.set(key, null);
+ if (value === null || value === undefined) {
+ if (yMap.has(key)) {
+ yMap.delete(key);
}
continue;
diff --git a/scripts/src/seed/node-generator.ts b/scripts/src/seed/node-generator.ts
index a4adc26e..8d40aa80 100644
--- a/scripts/src/seed/node-generator.ts
+++ b/scripts/src/seed/node-generator.ts
@@ -400,13 +400,7 @@ export class NodeGenerator {
id: generateId(IdType.View),
type: 'table',
name: 'All Tasks',
- avatar: null,
- fields: {},
- filters: {},
index: generateNodeIndex(),
- nameWidth: null,
- groupBy: null,
- sorts: {},
};
const activeTasksFilter: ViewFilterAttributes = {
@@ -421,28 +415,18 @@ export class NodeGenerator {
id: generateId(IdType.View),
type: 'table',
name: 'Active Tasks',
- avatar: null,
- fields: {},
filters: {
[activeTasksFilter.id]: activeTasksFilter,
},
index: generateNodeIndex(),
- nameWidth: null,
- groupBy: null,
- sorts: {},
};
const kanbanView: ViewAttributes = {
id: generateId(IdType.View),
type: 'board',
name: 'Kanban',
- avatar: null,
- fields: {},
- filters: {},
index: generateNodeIndex(),
- nameWidth: null,
groupBy: statusField.id,
- sorts: {},
};
const databaseAttributes: EntryAttributes = {
@@ -655,13 +639,7 @@ export class NodeGenerator {
id: generateId(IdType.View),
type: 'table',
name: 'All Clients',
- avatar: null,
- fields: {},
- filters: {},
index: generateNodeIndex(),
- nameWidth: null,
- groupBy: null,
- sorts: {},
};
const activeTasksFilter: ViewFilterAttributes = {
@@ -676,28 +654,18 @@ export class NodeGenerator {
id: generateId(IdType.View),
type: 'table',
name: 'Active Clients',
- avatar: null,
- fields: {},
filters: {
[activeTasksFilter.id]: activeTasksFilter,
},
index: generateNodeIndex(),
- nameWidth: null,
- groupBy: null,
- sorts: {},
};
const kanbanView: ViewAttributes = {
id: generateId(IdType.View),
type: 'board',
name: 'Board',
- avatar: null,
- fields: {},
- filters: {},
index: generateNodeIndex(),
- nameWidth: null,
groupBy: statusField.id,
- sorts: {},
};
const databaseAttributes: EntryAttributes = {
@@ -824,26 +792,15 @@ export class NodeGenerator {
id: generateId(IdType.View),
type: 'calendar',
name: 'Calendar',
- avatar: null,
- fields: {},
- filters: {},
index: generateNodeIndex(),
- nameWidth: null,
groupBy: dateField.id,
- sorts: {},
};
const tableView: ViewAttributes = {
id: generateId(IdType.View),
type: 'table',
name: 'Table',
- avatar: null,
- fields: {},
- filters: {},
index: generateNodeIndex(calendarView.index),
- nameWidth: null,
- groupBy: null,
- sorts: {},
};
const databaseAttributes: EntryAttributes = {
@@ -910,7 +867,6 @@ export class NodeGenerator {
databaseId,
content: this.buildDocumentContent(recordId),
name: faker.lorem.sentence(),
- avatar: null,
fields: {},
};
@@ -998,10 +954,9 @@ export class NodeGenerator {
return {
type: 'paragraph',
parentId,
- content: [{ type: 'text', text: faker.lorem.sentence(), marks: null }],
+ content: [{ type: 'text', text: faker.lorem.sentence() }],
id: blockId,
index,
- attrs: null,
};
}