aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-05-14 12:03:40 -0400
committerbobzel <zzzman@gmail.com>2023-05-14 12:03:40 -0400
commit42afc0250de658fc3e924864bfae5afb4edec335 (patch)
treed61bbc43d95cb6e1d6fa5c997102d505adc09af5 /src/client/views/search
parent0849fbd97c61688d51e5fea6cf8edc47989df5de (diff)
major overhaul of field naming conventions.
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/SearchBox.tsx44
1 files changed, 22 insertions, 22 deletions
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<SearchBoxProps>() {
@observable _linkedDocsIn: Map<Doc, Set<Doc>> = new Map<Doc, Set<Doc>>();
@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<SearchBoxProps>() {
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<SearchBoxProps>() {
.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<SearchBoxProps>() {
'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<SearchBoxProps>() {
const linkedDocSet = new Set<Doc>();
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);