@@ -132,7 +132,13 @@ class Views extends TableView {
132
132
if ( text === undefined ) {
133
133
text = '' ;
134
134
} else if ( text && typeof text === 'object' ) {
135
- text = text . __type === 'Date' && text . iso ? text . iso : JSON . stringify ( text ) ;
135
+ if ( text . __type === 'Date' && text . iso ) {
136
+ text = text . iso ;
137
+ } else if ( text . __type === 'Link' && text . text ) {
138
+ text = text . text ;
139
+ } else {
140
+ text = JSON . stringify ( text ) ;
141
+ }
136
142
}
137
143
text = String ( text ) ;
138
144
if ( typeof document !== 'undefined' ) {
@@ -166,6 +172,8 @@ class Views extends TableView {
166
172
type = 'File' ;
167
173
} else if ( val . __type === 'GeoPoint' ) {
168
174
type = 'GeoPoint' ;
175
+ } else if ( val . __type === 'Link' ) {
176
+ type = 'Link' ;
169
177
} else {
170
178
type = 'Object' ;
171
179
}
@@ -285,6 +293,8 @@ class Views extends TableView {
285
293
type = 'File' ;
286
294
} else if ( value . __type === 'GeoPoint' ) {
287
295
type = 'GeoPoint' ;
296
+ } else if ( value . __type === 'Link' ) {
297
+ type = 'Link' ;
288
298
} else {
289
299
type = 'Object' ;
290
300
}
@@ -306,6 +316,15 @@ class Views extends TableView {
306
316
content = JSON . stringify ( value ) ;
307
317
} else if ( type === 'Date' ) {
308
318
content = value && value . iso ? value . iso : String ( value ) ;
319
+ } else if ( type === 'Link' ) {
320
+ const url = value . isRelativeUrl
321
+ ? `apps/${ this . context . slug } /${ value . url } `
322
+ : value . url ;
323
+ content = (
324
+ < a href = { url } target = "_blank" rel = "noreferrer" >
325
+ { value . text }
326
+ </ a >
327
+ ) ;
309
328
} else if ( value === undefined ) {
310
329
content = '' ;
311
330
} else {
0 commit comments