@progress/kendo-pdfviewer-common 0.4.0-dev.202501061033 → 0.4.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/es/annotations/annotation-editor-layer-builder.js +2 -6
  2. package/dist/es/annotations/annotation-editor-layer.js +7 -9
  3. package/dist/es/annotations/annotation-editor-ui-manager.js +39 -40
  4. package/dist/es/annotations/annotation-layer-builder.js +5 -9
  5. package/dist/es/annotations/annotation-layer.js +49 -49
  6. package/dist/es/annotations/draw-layer-builder.js +1 -1
  7. package/dist/es/annotations/editors/annotation-editor.js +17 -21
  8. package/dist/es/annotations/editors/free-text-editor.js +20 -21
  9. package/dist/es/annotations/editors/highlight-editor.js +25 -25
  10. package/dist/es/annotations/editors/outliner.js +6 -6
  11. package/dist/es/annotations/helpers/annotation-storage.js +3 -4
  12. package/dist/es/annotations/helpers/command-manager.js +1 -1
  13. package/dist/es/annotations/helpers/image-manager.js +2 -1
  14. package/dist/es/annotations/helpers/text-accessibility-manager.js +1 -0
  15. package/dist/es/annotations/shared/event_utils.js +3 -3
  16. package/dist/es/annotations/shared/scripting_utils.js +2 -2
  17. package/dist/es/annotations/shared/ui_utils.js +6 -5
  18. package/dist/es/annotations.js +1 -2
  19. package/dist/es/common/core.js +5 -2
  20. package/dist/es/enums/PdfViewerInteractionMode.js +0 -1
  21. package/dist/es/links/link-service.js +12 -12
  22. package/dist/es/scroller.js +3 -5
  23. package/dist/es/search.js +0 -1
  24. package/dist/es/text/text-layer-builder.js +8 -8
  25. package/dist/es/utils.js +1 -1
  26. package/dist/es/widget/page.js +22 -21
  27. package/dist/es/widget/pdfviewer.js +25 -25
  28. package/dist/es2015/annotations/annotation-editor-layer-builder.js +2 -6
  29. package/dist/es2015/annotations/annotation-editor-layer.js +7 -9
  30. package/dist/es2015/annotations/annotation-editor-ui-manager.js +39 -40
  31. package/dist/es2015/annotations/annotation-layer-builder.js +5 -9
  32. package/dist/es2015/annotations/annotation-layer.js +49 -49
  33. package/dist/es2015/annotations/draw-layer-builder.js +1 -1
  34. package/dist/es2015/annotations/editors/annotation-editor.js +17 -21
  35. package/dist/es2015/annotations/editors/free-text-editor.js +20 -21
  36. package/dist/es2015/annotations/editors/highlight-editor.js +25 -25
  37. package/dist/es2015/annotations/editors/outliner.js +6 -6
  38. package/dist/es2015/annotations/helpers/annotation-storage.js +3 -4
  39. package/dist/es2015/annotations/helpers/command-manager.js +1 -1
  40. package/dist/es2015/annotations/helpers/image-manager.js +2 -1
  41. package/dist/es2015/annotations/helpers/text-accessibility-manager.js +1 -0
  42. package/dist/es2015/annotations/shared/event_utils.js +3 -3
  43. package/dist/es2015/annotations/shared/scripting_utils.js +2 -2
  44. package/dist/es2015/annotations/shared/ui_utils.js +6 -5
  45. package/dist/es2015/annotations.js +1 -2
  46. package/dist/es2015/common/core.js +5 -2
  47. package/dist/es2015/enums/PdfViewerInteractionMode.js +0 -1
  48. package/dist/es2015/links/link-service.js +12 -12
  49. package/dist/es2015/scroller.js +3 -5
  50. package/dist/es2015/search.js +0 -1
  51. package/dist/es2015/text/text-layer-builder.js +8 -8
  52. package/dist/es2015/utils.js +1 -1
  53. package/dist/es2015/widget/page.js +22 -21
  54. package/dist/es2015/widget/pdfviewer.js +25 -25
  55. package/dist/npm/annotations/annotation-editor-layer-builder.js +2 -6
  56. package/dist/npm/annotations/annotation-editor-layer.js +7 -9
  57. package/dist/npm/annotations/annotation-editor-ui-manager.d.ts +1 -1
  58. package/dist/npm/annotations/annotation-editor-ui-manager.js +39 -40
  59. package/dist/npm/annotations/annotation-layer-builder.d.ts +1 -1
  60. package/dist/npm/annotations/annotation-layer-builder.js +5 -9
  61. package/dist/npm/annotations/annotation-layer.d.ts +1 -1
  62. package/dist/npm/annotations/annotation-layer.js +49 -49
  63. package/dist/npm/annotations/draw-layer-builder.js +1 -1
  64. package/dist/npm/annotations/editors/annotation-editor.d.ts +4 -4
  65. package/dist/npm/annotations/editors/annotation-editor.js +17 -21
  66. package/dist/npm/annotations/editors/free-text-editor.js +19 -20
  67. package/dist/npm/annotations/editors/highlight-editor.d.ts +2 -2
  68. package/dist/npm/annotations/editors/highlight-editor.js +25 -25
  69. package/dist/npm/annotations/editors/outliner.js +6 -6
  70. package/dist/npm/annotations/helpers/annotation-storage.js +3 -4
  71. package/dist/npm/annotations/helpers/command-manager.d.ts +1 -1
  72. package/dist/npm/annotations/helpers/command-manager.js +1 -1
  73. package/dist/npm/annotations/helpers/image-manager.js +2 -1
  74. package/dist/npm/annotations/helpers/text-accessibility-manager.js +1 -0
  75. package/dist/npm/annotations/helpers/tools.js +1 -2
  76. package/dist/npm/annotations/shared/display_utils.js +3 -4
  77. package/dist/npm/annotations/shared/event_utils.d.ts +1 -1
  78. package/dist/npm/annotations/shared/event_utils.js +2 -2
  79. package/dist/npm/annotations/shared/scripting_utils.js +2 -2
  80. package/dist/npm/annotations/shared/ui_utils.d.ts +1 -1
  81. package/dist/npm/annotations/shared/ui_utils.js +9 -8
  82. package/dist/npm/annotations/shared/utils.js +5 -5
  83. package/dist/npm/annotations.js +1 -2
  84. package/dist/npm/common/core.d.ts +3 -3
  85. package/dist/npm/common/core.js +5 -2
  86. package/dist/npm/enums/PdfViewerInteractionMode.js +0 -1
  87. package/dist/npm/links/link-service.d.ts +2 -2
  88. package/dist/npm/links/link-service.js +11 -11
  89. package/dist/npm/scroller.js +3 -5
  90. package/dist/npm/search.js +0 -1
  91. package/dist/npm/text/text-layer-builder.d.ts +1 -1
  92. package/dist/npm/text/text-layer-builder.js +8 -8
  93. package/dist/npm/utils.js +1 -1
  94. package/dist/npm/widget/page.d.ts +1 -1
  95. package/dist/npm/widget/page.js +20 -19
  96. package/dist/npm/widget/pdfviewer.d.ts +3 -6
  97. package/dist/npm/widget/pdfviewer.js +23 -23
  98. package/package.json +43 -44
@@ -15,14 +15,10 @@
15
15
  var _AnnotationEditorLayerBuilder_annotationLayer, _AnnotationEditorLayerBuilder_drawLayer, _AnnotationEditorLayerBuilder_onAppend, _AnnotationEditorLayerBuilder_textLayer, _AnnotationEditorLayerBuilder_uiManager;
16
16
  import { __awaiter, __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
17
17
  /** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
18
- // eslint-disable-next-line max-len
19
18
  /** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
20
- // eslint-disable-next-line max-len
21
19
  /** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
22
- // eslint-disable-next-line max-len
23
20
  /** @typedef {import("./text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
24
21
  /** @typedef {import("./interfaces").IL10n} IL10n */
25
- // eslint-disable-next-line max-len
26
22
  /** @typedef {import("../src/display/annotation_layer.js").AnnotationLayer} AnnotationLayer */
27
23
  import { AnnotationEditorLayer } from "./annotation-editor-layer";
28
24
  // import { GenericL10n } from "web-null_l10n";
@@ -103,13 +99,13 @@ class AnnotationEditorLayerBuilder {
103
99
  viewport: clonedViewport,
104
100
  annotationLayer: __classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_annotationLayer, "f"),
105
101
  textLayer: __classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_textLayer, "f"),
106
- drawLayer: __classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_drawLayer, "f"),
102
+ drawLayer: __classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_drawLayer, "f")
107
103
  });
108
104
  const parameters = {
109
105
  viewport: clonedViewport,
110
106
  div,
111
107
  annotations: null,
112
- intent,
108
+ intent
113
109
  };
114
110
  this.annotationEditorLayer.render(parameters);
115
111
  this.show();
@@ -14,13 +14,10 @@
14
14
  */
15
15
  var _AnnotationEditorLayer_instances, _a, _AnnotationEditorLayer_accessibilityManager, _AnnotationEditorLayer_allowClick, _AnnotationEditorLayer_annotationLayer, _AnnotationEditorLayer_clickAC, _AnnotationEditorLayer_editorFocusTimeoutId, _AnnotationEditorLayer_editors, _AnnotationEditorLayer_hadPointerDown, _AnnotationEditorLayer_isCleaningUp, _AnnotationEditorLayer_isDisabling, _AnnotationEditorLayer_textLayer, _AnnotationEditorLayer_textSelectionAC, _AnnotationEditorLayer_uiManager, _AnnotationEditorLayer_editorTypes, _AnnotationEditorLayer_textLayerPointerDown, _AnnotationEditorLayer_currentEditorType_get, _AnnotationEditorLayer_createNewEditor, _AnnotationEditorLayer_getCenterPoint, _AnnotationEditorLayer_cleanup;
16
16
  import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
17
- // eslint-disable-next-line max-len
18
17
  /** @typedef {import("./tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
19
18
  /** @typedef {import("../display_utils.js").PageViewport} PageViewport */
20
- // eslint-disable-next-line max-len
21
19
  /** @typedef {import("../../../web/text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
22
20
  /** @typedef {import("../../../web/interfaces").IL10n} IL10n */
23
- // eslint-disable-next-line max-len
24
21
  /** @typedef {import("../annotation_layer.js").AnnotationLayer} AnnotationLayer */
25
22
  /** @typedef {import("../draw_layer.js").DrawLayer} DrawLayer */
26
23
  import { FreeTextEditor } from "./editors/free-text-editor";
@@ -71,9 +68,8 @@ class AnnotationEditorLayer {
71
68
  __classPrivateFieldSet(this, _AnnotationEditorLayer_textLayer, textLayer, "f");
72
69
  this.drawLayer = drawLayer;
73
70
  __classPrivateFieldGet(this, _AnnotationEditorLayer_uiManager, "f").addLayer(this);
74
- if (!__classPrivateFieldGet(this, _AnnotationEditorLayer_annotationLayer, "f") || !__classPrivateFieldGet(this, _AnnotationEditorLayer_textLayer, "f")) {
75
- return;
76
- }
71
+ // if (!this.#annotationLayer || !this.#textLayer) {
72
+ // }
77
73
  }
78
74
  // todo: ported from AnnotationEditorLayerBuilder
79
75
  hide() {
@@ -330,10 +326,10 @@ class AnnotationEditorLayer {
330
326
  __classPrivateFieldSet(this, _AnnotationEditorLayer_clickAC, new AbortController(), "f");
331
327
  const signal = __classPrivateFieldGet(this, _AnnotationEditorLayer_uiManager, "f").combinedSignal(__classPrivateFieldGet(this, _AnnotationEditorLayer_clickAC, "f"));
332
328
  this.div.addEventListener("pointerdown", this.pointerdown.bind(this), {
333
- signal,
329
+ signal
334
330
  });
335
331
  this.div.addEventListener("pointerup", this.pointerup.bind(this), {
336
- signal,
332
+ signal
337
333
  });
338
334
  }
339
335
  disableClick() {
@@ -720,7 +716,9 @@ _a = AnnotationEditorLayer, _AnnotationEditorLayer_accessibilityManager = new We
720
716
  // Do nothing on right click.
721
717
  return;
722
718
  }
723
- __classPrivateFieldGet(this, _AnnotationEditorLayer_uiManager, "f").showAllEditors("highlight", true);
719
+ __classPrivateFieldGet(this, _AnnotationEditorLayer_uiManager, "f").showAllEditors("highlight", true
720
+ // /* updateButton = */ true
721
+ );
724
722
  // if (this.#uiManager.getMode() === AnnotationEditorType.HIGHLIGHT) {
725
723
  if (__classPrivateFieldGet(this, _AnnotationEditorLayer_uiManager, "f").getMode() === AnnotationEditorType.NONE) {
726
724
  // todo: do not continue with free highlight
@@ -154,7 +154,7 @@ export class AnnotationEditorUIManager {
154
154
  // altTextManager,
155
155
  eventBus, pdfDocument,
156
156
  // pageColors,
157
- highlightColors = "",
157
+ highlightColors = ""
158
158
  // enableHighlightFloatingButton,
159
159
  // enableUpdatedAddImage,
160
160
  // enableNewAltTextWhenAddingImage,
@@ -214,7 +214,7 @@ export class AnnotationEditorUIManager {
214
214
  hasSomethingToUndo: false,
215
215
  hasSomethingToRedo: false,
216
216
  hasSelectedEditor: false,
217
- hasSelectedText: false,
217
+ hasSelectedText: false
218
218
  });
219
219
  _AnnotationEditorUIManager_translation.set(this, [0, 0]);
220
220
  _AnnotationEditorUIManager_translationTimeoutId.set(this, null);
@@ -228,19 +228,19 @@ export class AnnotationEditorUIManager {
228
228
  // this.#altTextManager = altTextManager;
229
229
  this._eventBus = eventBus;
230
230
  this._eventBus._on("editingaction", this.onEditingAction.bind(this), {
231
- signal,
231
+ signal
232
232
  });
233
233
  this._eventBus._on("pagechanging", this.onPageChanging.bind(this), {
234
- signal,
234
+ signal
235
235
  });
236
236
  this._eventBus._on("scalechanging", this.onScaleChanging.bind(this), {
237
- signal,
237
+ signal
238
238
  });
239
239
  this._eventBus._on("rotationchanging", this.onRotationChanging.bind(this), {
240
- signal,
240
+ signal
241
241
  });
242
242
  this._eventBus._on("setpreference", this.onSetPreference.bind(this), {
243
- signal,
243
+ signal
244
244
  });
245
245
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_addSelectionListener).call(this);
246
246
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_addDragAndDropListeners).call(this);
@@ -255,7 +255,7 @@ export class AnnotationEditorUIManager {
255
255
  // this.#mlManager = mlManager || null;
256
256
  this.viewParameters = {
257
257
  realScale: PixelsPerInch.PDF_TO_CSS_UNITS,
258
- rotation: 0,
258
+ rotation: 0
259
259
  };
260
260
  // this.isShiftKeyDown = false;
261
261
  // if ( typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
@@ -303,7 +303,6 @@ export class AnnotationEditorUIManager {
303
303
  return anchorElement.closest(".textLayer") || anchorElement.closest(".k-text-layer");
304
304
  }
305
305
  combinedSignal(abortSignal) {
306
- // eslint-disable-next-line
307
306
  if (AbortSignal && AbortSignal["any"]) {
308
307
  return AbortSignal.any([this._signal, abortSignal.signal]);
309
308
  }
@@ -370,14 +369,14 @@ export class AnnotationEditorUIManager {
370
369
  });
371
370
  this._eventBus.dispatch("showannotationeditorui", {
372
371
  source: this,
373
- mode,
372
+ mode
374
373
  });
375
374
  }
376
375
  setPreference(name, value) {
377
376
  this._eventBus.dispatch("setpreference", {
378
377
  source: this,
379
378
  name,
380
- value,
379
+ value
381
380
  });
382
381
  }
383
382
  // onSetPreference({ name, value }) {
@@ -398,7 +397,7 @@ export class AnnotationEditorUIManager {
398
397
  }
399
398
  findParent(x, y) {
400
399
  for (const layer of __classPrivateFieldGet(this, _AnnotationEditorUIManager_allLayers, "f").values()) {
401
- const { x: layerX, y: layerY, width, height, } = layer.div.getBoundingClientRect();
400
+ const { x: layerX, y: layerY, width, height } = layer.div.getBoundingClientRect();
402
401
  if (x >= layerX &&
403
402
  x <= layerX + width &&
404
403
  y >= layerY &&
@@ -454,7 +453,7 @@ export class AnnotationEditorUIManager {
454
453
  anchorOffset,
455
454
  focusNode,
456
455
  focusOffset,
457
- text,
456
+ text
458
457
  });
459
458
  if (isNoneMode) {
460
459
  // this.showAllEditors("highlight", true, /* updateButton = */ true);
@@ -483,7 +482,7 @@ export class AnnotationEditorUIManager {
483
482
  }
484
483
  hideEditorToolBar() {
485
484
  this._eventBus.dispatch("kendoAnnotationEditorToolBarHide", {
486
- source: this,
485
+ source: this
487
486
  });
488
487
  }
489
488
  /**
@@ -716,14 +715,14 @@ export class AnnotationEditorUIManager {
716
715
  isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this),
717
716
  hasSomethingToUndo: __classPrivateFieldGet(this, _AnnotationEditorUIManager_commandManager, "f").hasSomethingToUndo(),
718
717
  hasSomethingToRedo: __classPrivateFieldGet(this, _AnnotationEditorUIManager_commandManager, "f").hasSomethingToRedo(),
719
- hasSelectedEditor: false,
718
+ hasSelectedEditor: false
720
719
  });
721
720
  }
722
721
  else {
723
722
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_removeFocusManager).call(this);
724
723
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_removeCopyPasteListeners).call(this);
725
724
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
726
- isEditing: false,
725
+ isEditing: false
727
726
  });
728
727
  this.disableUserSelect(false);
729
728
  }
@@ -829,7 +828,7 @@ export class AnnotationEditorUIManager {
829
828
  }
830
829
  this._eventBus.dispatch("switchannotationeditormode", {
831
830
  source: this,
832
- mode,
831
+ mode
833
832
  });
834
833
  }
835
834
  /**
@@ -882,7 +881,7 @@ export class AnnotationEditorUIManager {
882
881
  const state = (_b = (_a = __classPrivateFieldGet(this, _AnnotationEditorUIManager_showAllStates, "f")) === null || _a === void 0 ? void 0 : _a.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL)) !== null && _b !== void 0 ? _b : true;
883
882
  if (state !== visible) {
884
883
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateUI).call(this, [
885
- [AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL, visible],
884
+ [AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL, visible]
886
885
  ]);
887
886
  }
888
887
  }
@@ -1011,7 +1010,7 @@ export class AnnotationEditorUIManager {
1011
1010
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_selectedEditors, "f").delete(editor);
1012
1011
  editor.unselect();
1013
1012
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1014
- hasSelectedEditor: this.hasSelection,
1013
+ hasSelectedEditor: this.hasSelection
1015
1014
  });
1016
1015
  return;
1017
1016
  }
@@ -1019,7 +1018,7 @@ export class AnnotationEditorUIManager {
1019
1018
  editor.select();
1020
1019
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateUI).call(this, editor.propertiesToUpdate);
1021
1020
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1022
- hasSelectedEditor: true,
1021
+ hasSelectedEditor: true
1023
1022
  });
1024
1023
  }
1025
1024
  /**
@@ -1037,7 +1036,7 @@ export class AnnotationEditorUIManager {
1037
1036
  editor.select();
1038
1037
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateUI).call(this, editor.propertiesToUpdate);
1039
1038
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1040
- hasSelectedEditor: true,
1039
+ hasSelectedEditor: true
1041
1040
  });
1042
1041
  }
1043
1042
  /**
@@ -1058,7 +1057,7 @@ export class AnnotationEditorUIManager {
1058
1057
  editor.unselect();
1059
1058
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_selectedEditors, "f").delete(editor);
1060
1059
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1061
- hasSelectedEditor: this.hasSelection,
1060
+ hasSelectedEditor: this.hasSelection
1062
1061
  });
1063
1062
  }
1064
1063
  get hasSelection() {
@@ -1076,7 +1075,7 @@ export class AnnotationEditorUIManager {
1076
1075
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1077
1076
  hasSomethingToUndo: __classPrivateFieldGet(this, _AnnotationEditorUIManager_commandManager, "f").hasSomethingToUndo(),
1078
1077
  hasSomethingToRedo: true,
1079
- isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this),
1078
+ isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this)
1080
1079
  });
1081
1080
  }
1082
1081
  /**
@@ -1087,7 +1086,7 @@ export class AnnotationEditorUIManager {
1087
1086
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1088
1087
  hasSomethingToUndo: true,
1089
1088
  hasSomethingToRedo: __classPrivateFieldGet(this, _AnnotationEditorUIManager_commandManager, "f").hasSomethingToRedo(),
1090
- isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this),
1089
+ isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this)
1091
1090
  });
1092
1091
  }
1093
1092
  /**
@@ -1099,7 +1098,7 @@ export class AnnotationEditorUIManager {
1099
1098
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1100
1099
  hasSomethingToUndo: true,
1101
1100
  hasSomethingToRedo: false,
1102
- isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this),
1101
+ isEmpty: __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_isEmpty).call(this)
1103
1102
  });
1104
1103
  }
1105
1104
  /**
@@ -1161,7 +1160,7 @@ export class AnnotationEditorUIManager {
1161
1160
  }
1162
1161
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_selectedEditors, "f").clear();
1163
1162
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1164
- hasSelectedEditor: false,
1163
+ hasSelectedEditor: false
1165
1164
  });
1166
1165
  }
1167
1166
  translateSelectedEditors(x, y, noCommit = false) {
@@ -1199,7 +1198,7 @@ export class AnnotationEditorUIManager {
1199
1198
  }
1200
1199
  }
1201
1200
  },
1202
- mustExec: false,
1201
+ mustExec: false
1203
1202
  });
1204
1203
  }, TIME_TO_WAIT), "f");
1205
1204
  for (const editor of editors) {
@@ -1225,7 +1224,7 @@ export class AnnotationEditorUIManager {
1225
1224
  savedPageIndex: editor.pageIndex,
1226
1225
  newX: 0,
1227
1226
  newY: 0,
1228
- newPageIndex: -1,
1227
+ newPageIndex: -1
1229
1228
  });
1230
1229
  }
1231
1230
  }
@@ -1279,7 +1278,7 @@ export class AnnotationEditorUIManager {
1279
1278
  move(editor, savedX, savedY, savedPageIndex);
1280
1279
  }
1281
1280
  },
1282
- mustExec: true,
1281
+ mustExec: true
1283
1282
  });
1284
1283
  return true;
1285
1284
  }
@@ -1363,7 +1362,7 @@ export class AnnotationEditorUIManager {
1363
1362
  return null;
1364
1363
  }
1365
1364
  }
1366
- const { x: layerX, y: layerY, width: parentWidth, height: parentHeight, } = textLayer.getBoundingClientRect();
1365
+ const { x: layerX, y: layerY, width: parentWidth, height: parentHeight } = textLayer.getBoundingClientRect();
1367
1366
  // We must rotate the boxes because we want to have them in the non-rotated
1368
1367
  // page coordinates.
1369
1368
  let rotator;
@@ -1373,7 +1372,7 @@ export class AnnotationEditorUIManager {
1373
1372
  x: (y - layerY) / parentHeight,
1374
1373
  y: 1 - (x + w - layerX) / parentWidth,
1375
1374
  width: h / parentHeight,
1376
- height: w / parentWidth,
1375
+ height: w / parentWidth
1377
1376
  });
1378
1377
  break;
1379
1378
  case "180":
@@ -1381,7 +1380,7 @@ export class AnnotationEditorUIManager {
1381
1380
  x: 1 - (x + w - layerX) / parentWidth,
1382
1381
  y: 1 - (y + h - layerY) / parentHeight,
1383
1382
  width: w / parentWidth,
1384
- height: h / parentHeight,
1383
+ height: h / parentHeight
1385
1384
  });
1386
1385
  break;
1387
1386
  case "270":
@@ -1389,7 +1388,7 @@ export class AnnotationEditorUIManager {
1389
1388
  x: 1 - (y + h - layerY) / parentHeight,
1390
1389
  y: (x - layerX) / parentWidth,
1391
1390
  width: h / parentHeight,
1392
- height: w / parentWidth,
1391
+ height: w / parentWidth
1393
1392
  });
1394
1393
  break;
1395
1394
  default:
@@ -1397,7 +1396,7 @@ export class AnnotationEditorUIManager {
1397
1396
  x: (x - layerX) / parentWidth,
1398
1397
  y: (y - layerY) / parentHeight,
1399
1398
  width: w / parentWidth,
1400
- height: h / parentHeight,
1399
+ height: h / parentHeight
1401
1400
  });
1402
1401
  break;
1403
1402
  }
@@ -1480,7 +1479,7 @@ _AnnotationEditorUIManager_abortController = new WeakMap(), _AnnotationEditorUIM
1480
1479
  // this.#highlightToolbar?.hide();
1481
1480
  __classPrivateFieldSet(this, _AnnotationEditorUIManager_selectedTextNode, null, "f");
1482
1481
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1483
- hasSelectedText: false,
1482
+ hasSelectedText: false
1484
1483
  });
1485
1484
  }
1486
1485
  return;
@@ -1497,7 +1496,7 @@ _AnnotationEditorUIManager_abortController = new WeakMap(), _AnnotationEditorUIM
1497
1496
  (_a = __classPrivateFieldGet(this, _AnnotationEditorUIManager_highlightToolbar, "f")) === null || _a === void 0 ? void 0 : _a.hide();
1498
1497
  __classPrivateFieldSet(this, _AnnotationEditorUIManager_selectedTextNode, null, "f");
1499
1498
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1500
- hasSelectedText: false,
1499
+ hasSelectedText: false
1501
1500
  });
1502
1501
  }
1503
1502
  return;
@@ -1505,7 +1504,7 @@ _AnnotationEditorUIManager_abortController = new WeakMap(), _AnnotationEditorUIM
1505
1504
  (_b = __classPrivateFieldGet(this, _AnnotationEditorUIManager_highlightToolbar, "f")) === null || _b === void 0 ? void 0 : _b.hide();
1506
1505
  __classPrivateFieldSet(this, _AnnotationEditorUIManager_selectedTextNode, anchorNode, "f");
1507
1506
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateStates).call(this, {
1508
- hasSelectedText: true,
1507
+ hasSelectedText: true
1509
1508
  });
1510
1509
  if (__classPrivateFieldGet(this, _AnnotationEditorUIManager_mode, "f") !== AnnotationEditorType.HIGHLIGHT && __classPrivateFieldGet(this, _AnnotationEditorUIManager_mode, "f") !== AnnotationEditorType.NONE) {
1511
1510
  return;
@@ -1596,7 +1595,7 @@ _AnnotationEditorUIManager_abortController = new WeakMap(), _AnnotationEditorUIM
1596
1595
  if (hasChanged) {
1597
1596
  this._eventBus.dispatch("annotationeditorstateschanged", {
1598
1597
  source: this,
1599
- details: Object.assign(__classPrivateFieldGet(this, _AnnotationEditorUIManager_previousStates, "f"), details),
1598
+ details: Object.assign(__classPrivateFieldGet(this, _AnnotationEditorUIManager_previousStates, "f"), details)
1600
1599
  });
1601
1600
  // We could listen on our own event but it sounds like a bit weird and
1602
1601
  // it's a way to simpler to handle that stuff here instead of having to
@@ -1604,14 +1603,14 @@ _AnnotationEditorUIManager_abortController = new WeakMap(), _AnnotationEditorUIM
1604
1603
  if (__classPrivateFieldGet(this, _AnnotationEditorUIManager_mode, "f") === AnnotationEditorType.HIGHLIGHT &&
1605
1604
  details.hasSelectedEditor === false) {
1606
1605
  __classPrivateFieldGet(this, _AnnotationEditorUIManager_instances, "m", _AnnotationEditorUIManager_dispatchUpdateUI).call(this, [
1607
- [AnnotationEditorParamsType.HIGHLIGHT_FREE, true],
1606
+ [AnnotationEditorParamsType.HIGHLIGHT_FREE, true]
1608
1607
  ]);
1609
1608
  }
1610
1609
  }
1611
1610
  }, _AnnotationEditorUIManager_dispatchUpdateUI = function _AnnotationEditorUIManager_dispatchUpdateUI(details) {
1612
1611
  this._eventBus.dispatch("annotationeditorparamschanged", {
1613
1612
  source: this,
1614
- details,
1613
+ details
1615
1614
  });
1616
1615
  }, _AnnotationEditorUIManager_enableAll = function _AnnotationEditorUIManager_enableAll() {
1617
1616
  if (!__classPrivateFieldGet(this, _AnnotationEditorUIManager_isEnabled, "f")) {
@@ -15,15 +15,11 @@
15
15
  var _AnnotationLayerBuilder_instances, _AnnotationLayerBuilder_onAppend, _AnnotationLayerBuilder_eventAbortController, _AnnotationLayerBuilder_updatePresentationModeState;
16
16
  import { __awaiter, __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
17
17
  /** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
18
- // eslint-disable-next-line max-len
19
18
  /** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
20
- // eslint-disable-next-line max-len
21
19
  /** @typedef {import("../src/display/annotation_storage").AnnotationStorage} AnnotationStorage */
22
20
  /** @typedef {import("./interfaces").IDownloadManager} IDownloadManager */
23
21
  /** @typedef {import("./interfaces").IPDFLinkService} IPDFLinkService */
24
- // eslint-disable-next-line max-len
25
22
  /** @typedef {import("./text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
26
- // eslint-disable-next-line max-len
27
23
  /** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
28
24
  import { convertToHtml } from "../common/core";
29
25
  import { AnnotationLayer } from "./annotation-layer";
@@ -59,7 +55,7 @@ class AnnotationLayerBuilder {
59
55
  // enableScripting = false,
60
56
  // hasJSActionsPromise = null,
61
57
  // fieldObjectsPromise = null,
62
- annotationCanvasMap = null, accessibilityManager = null, annotationEditorUIManager = null, onAppend = null, }) {
58
+ annotationCanvasMap = null, accessibilityManager = null, annotationEditorUIManager = null, onAppend = null }) {
63
59
  _AnnotationLayerBuilder_instances.add(this);
64
60
  // todo: props ported from pdf.js
65
61
  this.annotationLayer = null;
@@ -109,13 +105,13 @@ class AnnotationLayerBuilder {
109
105
  // If an annotationLayer already exists, refresh its children's
110
106
  // transformation matrices.
111
107
  this.annotationLayer.update({
112
- viewport: viewport.clone({ dontFlip: true }),
108
+ viewport: viewport.clone({ dontFlip: true })
113
109
  });
114
110
  return;
115
111
  }
116
112
  // const [annotations, hasJSActions, fieldObjects] = await Promise.all([
117
113
  const [annotations] = yield Promise.all([
118
- this.pdfPage.getAnnotations({ intent }),
114
+ this.pdfPage.getAnnotations({ intent })
119
115
  // this._hasJSActionsPromise,
120
116
  // this._fieldObjectsPromise,
121
117
  ]);
@@ -151,13 +147,13 @@ class AnnotationLayerBuilder {
151
147
  annotationCanvasMap: this._annotationCanvasMap,
152
148
  annotationEditorUIManager: this._annotationEditorUIManager,
153
149
  page: this.pdfPage,
154
- viewport: viewport.clone({ dontFlip: true }),
150
+ viewport: viewport.clone({ dontFlip: true })
155
151
  });
156
152
  yield this.annotationLayer.render({
157
153
  annotations,
158
154
  // imageResourcesPath: this.imageResourcesPath,
159
155
  // renderForms: this.renderForms,
160
- linkService: this.linkService,
156
+ linkService: this.linkService
161
157
  // downloadManager: this.downloadManager,
162
158
  // annotationStorage: this.annotationStorage,
163
159
  // enableScripting: this.enableScripting,