88// Annotation type configuration
99export interface AnnotationConfig {
1010 label : string ;
11+ labelKey : string ;
1112 icon : string ;
1213 iconProps : ( annotation : PdfAnnotationObject ) => {
1314 primaryColor ?: string ;
@@ -20,13 +21,15 @@ export interface AnnotationConfig {
2021export const annotationConfigs : Record < SidebarSubtype , AnnotationConfig > = {
2122 [ PdfAnnotationSubtype . HIGHLIGHT ] : {
2223 label : 'Highlight' ,
24+ labelKey : 'annotation.highlight' ,
2325 icon : 'highlight' ,
2426 iconProps : ( annotation : any ) => ( {
2527 primaryColor : annotation . color || '#ffff00' ,
2628 } ) ,
2729 } ,
2830 [ PdfAnnotationSubtype . CIRCLE ] : {
2931 label : 'Circle' ,
32+ labelKey : 'annotation.circle' ,
3033 icon : 'circle' ,
3134 iconProps : ( annotation : any ) => ( {
3235 primaryColor : annotation . strokeColor || '#000000' ,
@@ -35,6 +38,7 @@ export const annotationConfigs: Record<SidebarSubtype, AnnotationConfig> = {
3538 } ,
3639 [ PdfAnnotationSubtype . SQUARE ] : {
3740 label : 'Square' ,
41+ labelKey : 'annotation.square' ,
3842 icon : 'square' ,
3943 iconProps : ( annotation : any ) => ( {
4044 primaryColor : annotation . strokeColor || '#000000' ,
@@ -43,48 +47,55 @@ export const annotationConfigs: Record<SidebarSubtype, AnnotationConfig> = {
4347 } ,
4448 [ PdfAnnotationSubtype . LINE ] : {
4549 label : 'Line' ,
50+ labelKey : 'annotation.line' ,
4651 icon : 'line' ,
4752 iconProps : ( annotation : any ) => ( {
4853 primaryColor : annotation . strokeColor || '#000000' ,
4954 } ) ,
5055 } ,
5156 [ PdfAnnotationSubtype . UNDERLINE ] : {
5257 label : 'Underline' ,
58+ labelKey : 'annotation.underline' ,
5359 icon : 'underline' ,
5460 iconProps : ( annotation : any ) => ( {
5561 primaryColor : annotation . color || '#000000' ,
5662 } ) ,
5763 } ,
5864 [ PdfAnnotationSubtype . SQUIGGLY ] : {
5965 label : 'Squiggly' ,
66+ labelKey : 'annotation.squiggly' ,
6067 icon : 'squiggly' ,
6168 iconProps : ( annotation : any ) => ( {
6269 primaryColor : annotation . color || '#000000' ,
6370 } ) ,
6471 } ,
6572 [ PdfAnnotationSubtype . STRIKEOUT ] : {
6673 label : 'Strikethrough' ,
74+ labelKey : 'annotation.strikeout' ,
6775 icon : 'strikethrough' ,
6876 iconProps : ( annotation : any ) => ( {
6977 primaryColor : annotation . color || '#000000' ,
7078 } ) ,
7179 } ,
7280 [ PdfAnnotationSubtype . INK ] : {
7381 label : 'Ink' ,
82+ labelKey : 'annotation.ink' ,
7483 icon : 'pencilMarker' ,
7584 iconProps : ( annotation : any ) => ( {
7685 primaryColor : annotation . color || '#000000' ,
7786 } ) ,
7887 } ,
7988 [ PdfAnnotationSubtype . FREETEXT ] : {
8089 label : 'Text' ,
90+ labelKey : 'annotation.freeText' ,
8191 icon : 'text' ,
8292 iconProps : ( annotation : any ) => ( {
8393 primaryColor : annotation . fontColor || '#000000' ,
8494 } ) ,
8595 } ,
8696 [ PdfAnnotationSubtype . POLYGON ] : {
8797 label : 'Polygon' ,
98+ labelKey : 'annotation.polygon' ,
8899 icon : 'polygon' ,
89100 iconProps : ( annotation : any ) => ( {
90101 primaryColor : annotation . strokeColor || '#000000' ,
@@ -93,13 +104,15 @@ export const annotationConfigs: Record<SidebarSubtype, AnnotationConfig> = {
93104 } ,
94105 [ PdfAnnotationSubtype . POLYLINE ] : {
95106 label : 'Polyline' ,
107+ labelKey : 'annotation.polyline' ,
96108 icon : 'zigzag' ,
97109 iconProps : ( annotation : any ) => ( {
98110 primaryColor : annotation . strokeColor || '#000000' ,
99111 } ) ,
100112 } ,
101113 [ PdfAnnotationSubtype . STAMP ] : {
102114 label : 'Stamp' ,
115+ labelKey : 'annotation.stamp' ,
103116 icon : 'deviceFloppy' ,
104117 iconProps : ( ) => ( {
105118 primaryColor : '#dc2626' ,
0 commit comments