@@ -31,6 +31,7 @@ export type TEditorPopoverResolvedData = {
3131 left : number ;
3232 results ?: TDELink | TDELink [ ] ;
3333 resolvedAs : TEditorPopoverResolvedAs ;
34+ resolver ?: 'resolver-api' | 'search-api' ;
3435 error ?: any ;
3536} ;
3637type TDeltaError = Error & {
@@ -48,6 +49,7 @@ type TReturnedResolvedData = Omit<
4849export const LINE_HEIGHT = 15 ;
4950export const INDENT_UNIT = 4 ;
5051export const CODEMIRROR_HOVER_CLASS = 'CodeMirror-hover-tooltip' ;
52+ export const CODEMIRROR_COPY_URL_CLASS = 'CodeMirror-url-copy' ;
5153export const CODEMIRROR_LINK_CLASS = 'fusion-resource-link' ;
5254const NEAR_BY = [ 0 , 0 , 0 , 5 , 0 , - 5 , 5 , 0 , - 5 , 0 ] ;
5355const isDownloadableLink = ( resource : Resource ) => {
@@ -104,6 +106,7 @@ export function getTokenAndPosAt(e: MouseEvent, current: CodeMirror.Editor) {
104106 if ( token && url === text ) {
105107 return {
106108 url,
109+ pos,
107110 coords : {
108111 left : editorRect . left ,
109112 top : coords . top + LINE_HEIGHT ,
@@ -187,6 +190,7 @@ export async function editorLinkResolutionHandler({
187190 // next-action: open resource editor
188191 return {
189192 resolvedAs : 'resource' ,
193+ resolver : 'resolver-api' ,
190194 results : {
191195 isDownloadable,
192196 _self : details . _self ,
@@ -217,6 +221,7 @@ export async function editorLinkResolutionHandler({
217221 const entity = getOrgAndProjectFromResourceObject ( result ) ;
218222 return {
219223 resolvedAs : 'resource' ,
224+ resolver : 'search-api' ,
220225 results : {
221226 isDownloadable,
222227 _self : result . _self ,
@@ -233,6 +238,7 @@ export async function editorLinkResolutionHandler({
233238 // next-action: open resources list in the popover
234239 return {
235240 resolvedAs : 'resources' ,
241+ resolver : 'search-api' ,
236242 results : details . _results . map ( ( item : Resource ) => {
237243 const isDownloadable = isDownloadableLink ( item ) ;
238244 const entity = getOrgAndProjectFromResourceObject ( item ) ;
0 commit comments