@@ -709,6 +709,7 @@ class PDFThumbnailViewer {
709709 this . #toggleMenuEntries( false ) ;
710710 this . #updateStatus( "select" ) ;
711711
712+ this . #reportTelemetry( { action : "move" } ) ;
712713 this . eventBus . dispatch ( "pagesedited" , {
713714 source : this ,
714715 pagesMapper,
@@ -825,7 +826,18 @@ class PDFThumbnailViewer {
825826 }
826827 }
827828
829+ #reportTelemetry( data ) {
830+ this . eventBus . dispatch ( "reporttelemetry" , {
831+ source : this ,
832+ details : {
833+ type : "pageOrganization" ,
834+ data,
835+ } ,
836+ } ) ;
837+ }
838+
828839 #saveExtractedPages( ) {
840+ this . #reportTelemetry( { action : "exportSelected" } ) ;
829841 this . eventBus . dispatch ( "saveextractedpages" , {
830842 source : this ,
831843 data : this . #pagesMapper. extractPages ( this . #selectedPages) ,
@@ -840,6 +852,7 @@ class PDFThumbnailViewer {
840852 // that clicking the "Done" button later only cancels the copy and does
841853 // not accidentally restore a previous paste or delete.
842854 this . #savedThumbnails = null ;
855+ this . #reportTelemetry( { action : "copy" } ) ;
843856 }
844857 this . #updateStatus( this . #isCut ? "cut" : "copy" ) ;
845858 const pageNumbersToCopy = ( this . #copiedPageNumbers = Uint32Array . from (
@@ -869,12 +882,14 @@ class PDFThumbnailViewer {
869882 return ;
870883 }
871884
885+ this . #reportTelemetry( { action : "cut" } ) ;
872886 this . #isCut = true ;
873887 this . #copyPages( false ) ;
874888 this . #deletePages( /* type = */ "cut" ) ;
875889 }
876890
877891 #pastePages( index ) {
892+ this . #reportTelemetry( { action : "paste" } ) ;
878893 const pagesMapper = this . #pagesMapper;
879894 const currentPageNumber = this . #copiedPageNumbers. includes (
880895 this . _currentPageNumber
@@ -907,6 +922,7 @@ class PDFThumbnailViewer {
907922
908923 const selectedPages = this . #selectedPages;
909924 if ( type === "delete" ) {
925+ this . #reportTelemetry( { action : "delete" } ) ;
910926 this . #updateStatus( "delete" ) ;
911927 }
912928 const pagesMapper = this . #pagesMapper;
0 commit comments