From 42afc0250de658fc3e924864bfae5afb4edec335 Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 14 May 2023 12:03:40 -0400 Subject: major overhaul of field naming conventions. --- src/client/views/search/SearchBox.tsx | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/client/views/search') diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 32b661bb6..536ec7c75 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -47,7 +47,7 @@ export class SearchBox extends ViewBoxBaseComponent() { @observable _linkedDocsIn: Map> = new Map>(); @observable _selectedResult: Doc | undefined = undefined; @observable _deletedDocsStatus: boolean = false; - @observable _onlyAliases: boolean = true; + @observable _onlyEmbeddings: boolean = true; /** * This is the constructor for the SearchBox class. @@ -139,7 +139,7 @@ export class SearchBox extends ViewBoxBaseComponent() { visited.push(d); const fieldKey = Doc.LayoutFieldKey(d); const annos = !Field.toString(Doc.LayoutField(d) as Field).includes('CollectionView'); - const data = d[annos ? fieldKey + '-annotations' : fieldKey]; + const data = d[annos ? fieldKey + '_annotations' : fieldKey]; data && newarray.push(...DocListCast(data)); func(depth, d); }); @@ -166,7 +166,7 @@ export class SearchBox extends ViewBoxBaseComponent() { .map(async d => { const fieldKey = Doc.LayoutFieldKey(d); const annos = !Field.toString(Doc.LayoutField(d) as Field).includes('CollectionView'); - const data = d[annos ? fieldKey + '-annotations' : fieldKey]; + const data = d[annos ? fieldKey + '_annotations' : fieldKey]; const docs = await DocListCastAsync(data); docs && newarray.push(...docs); func(depth, d); @@ -217,34 +217,34 @@ export class SearchBox extends ViewBoxBaseComponent() { 'y', 'proto', 'width', - 'autoHeight', + 'layout_autoHeight', 'acl-Override', 'acl-Public', - 'context', + 'embedContainer', 'zIndex', 'height', - 'text-scrollHeight', - 'text-height', + 'text_scrollHeight', + 'text_height', 'cloneFieldFilter', - 'isPrototype', - 'text-annotations', - 'dragFactory-count', - 'text-noTemplate', - 'aliases', - 'system', - 'layoutKey', - 'baseProto', + 'isDataDoc', + 'text_annotations', + 'dragFactory_count', + 'text_noTemplate', + 'proto_embeddings', + 'isSystem', + 'layout_fieldKey', + 'isBaseProto', 'xMargin', 'yMargin', 'links', 'layout', 'layout_keyValue', - 'fitWidth', + 'layout_fitWidth', 'viewType', - 'title-custom', - 'panX', - 'panY', - 'viewScale', + 'title_custom', + 'freeform_panX', + 'freeform_panY', + 'freeform_scale', ]; query = query.toLowerCase(); @@ -300,8 +300,8 @@ export class SearchBox extends ViewBoxBaseComponent() { const linkedDocSet = new Set(); Doc.GetProto(doc)[DirectLinksSym].forEach(link => { - const d1 = link?.anchor1 as Doc; - const d2 = link?.anchor2 as Doc; + const d1 = link?.link_anchor_1 as Doc; + const d2 = link?.link_anchor_2 as Doc; if (doc === d1 && this._results.has(d2)) { linkedDocSet.add(d2); this._linkedDocsIn.get(d2)?.add(doc); -- cgit v1.2.3-70-g09d2