aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/DocumentTypes.ts3
-rw-r--r--src/client/documents/Documents.ts11
2 files changed, 13 insertions, 1 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts
index 9dfadf778..c9b42f2b9 100644
--- a/src/client/documents/DocumentTypes.ts
+++ b/src/client/documents/DocumentTypes.ts
@@ -39,6 +39,7 @@ export enum DocumentType {
SEARCHITEM = 'searchitem',
COMPARISON = 'comparison',
GROUP = 'group',
+ SCHEMAROW = 'schemarow',
LINKDB = 'linkdb', // database of links ??? why do we have this
SCRIPTDB = 'scriptdb', // database of scripts
@@ -63,5 +64,5 @@ export enum CollectionViewType {
Grid = 'grid',
Pile = 'pileup',
StackedTimeline = 'stacked timeline',
- NoteTaking = "notetaking"
+ NoteTaking = 'notetaking',
}
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index e579bfd8a..99c04b673 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -27,6 +27,7 @@ import { ScriptingGlobals } from '../util/ScriptingGlobals';
import { undoBatch, UndoManager } from '../util/UndoManager';
import { CollectionDockingView } from '../views/collections/CollectionDockingView';
import { DimUnit } from '../views/collections/collectionMulticolumn/CollectionMulticolumnView';
+import { SchemaRowBox } from '../views/collections/collectionSchema/SchemaRowBox';
import { CollectionView } from '../views/collections/CollectionView';
import { ContextMenu } from '../views/ContextMenu';
import { ContextMenuProps } from '../views/ContextMenuItem';
@@ -648,6 +649,12 @@ export namespace Docs {
options: { _fitWidth: true, nativeDimModifiable: true, links: '@links(self)' },
},
],
+ [
+ DocumentType.SCHEMAROW,
+ {
+ layout: { view: SchemaRowBox, dataField: defaultDataKey },
+ },
+ ],
]);
const suffix = 'Proto';
@@ -1101,6 +1108,10 @@ export namespace Docs {
return InstanceFromProto(Prototypes.get(DocumentType.PRESELEMENT), undefined, { ...(options || {}) });
}
+ export function SchemaRowDocument(options?: DocumentOptions) {
+ return InstanceFromProto(Prototypes.get(DocumentType.SCHEMAROW), undefined, { ...(options || {}) });
+ }
+
export function DataVizDocument(url: string, options?: DocumentOptions) {
return InstanceFromProto(Prototypes.get(DocumentType.DATAVIZ), new CsvField(url), { title: 'Data Viz', ...options });
}