invenio-previewer 3.7.0__py2.py3-none-any.whl → 4.0.0__py2.py3-none-any.whl

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.
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # This file is part of Invenio.
4
4
  # Copyright (C) 2016-2025 CERN.
5
- # Copyright (C) 2024-2025 Graz University of Technology.
5
+ # Copyright (C) 2024-2026 Graz University of Technology.
6
6
  # Copyright (C) 2025 KTH Royal Institute of Technology.
7
7
  #
8
8
  # Invenio is free software; you can redistribute it and/or modify it
@@ -352,6 +352,6 @@ Now define the priority for all previewers by adding the newly created
352
352
  from .ext import InvenioPreviewer
353
353
  from .proxies import current_previewer
354
354
 
355
- __version__ = "3.7.0"
355
+ __version__ = "4.0.0"
356
356
 
357
357
  __all__ = ("__version__", "current_previewer", "InvenioPreviewer")
@@ -17,32 +17,6 @@
17
17
 
18
18
  "use strict";
19
19
 
20
- function getPageFromHash() {
21
- let hash = window.location.hash || "";
22
- // check if the parent window has a hash
23
- if (window.parent && window.parent !== window) {
24
- hash = window.parent.location.hash || "";
25
- }
26
- const match = hash.match(/page=(\d+)/);
27
- if (match) {
28
- return parseInt(match[1], 10);
29
- }
30
- return null;
31
- }
32
-
33
- function applyPageFromHash(pdfViewer, pageNumberField) {
34
- if (!pdfViewer.pagesCount) return;
35
- const pageFromHash = getPageFromHash();
36
- if (
37
- pageFromHash &&
38
- pageFromHash >= 1 &&
39
- pageFromHash <= pdfViewer.pagesCount
40
- ) {
41
- pdfViewer.currentPageNumber = pageFromHash;
42
- pageNumberField.value = pageFromHash;
43
- }
44
- }
45
-
46
20
  document.addEventListener("DOMContentLoaded", () => {
47
21
  const { pdfjsLib, pdfjsViewer } = window;
48
22
 
@@ -188,23 +162,8 @@ document.addEventListener("DOMContentLoaded", () => {
188
162
 
189
163
  // Display the number of pages
190
164
  pageNumberLabel.textContent = `of ${pdfViewer.pagesCount}`;
191
- applyPageFromHash(pdfViewer, pageNumberField);
192
165
  });
193
166
 
194
- window.addEventListener("hashchange", function () {
195
- applyPageFromHash(pdfViewer, pageNumberField);
196
- });
197
- // Listen to hash changes in the parent window
198
- try {
199
- if (window.parent && window.parent !== window) {
200
- window.parent.addEventListener("hashchange", function () {
201
- applyPageFromHash(pdfViewer, pageNumberField);
202
- });
203
- }
204
- } catch (error) {
205
- // Ignore.
206
- }
207
-
208
167
  // Loading document
209
168
  const loadingTask = pdfjsLib.getDocument({
210
169
  url: PDF_URL,
@@ -11,7 +11,6 @@
11
11
 
12
12
  """Invenio Previewer Utilities."""
13
13
 
14
-
15
14
  import charset_normalizer
16
15
  from flask import current_app
17
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-previewer
3
- Version: 3.7.0
3
+ Version: 4.0.0
4
4
  Summary: Invenio module for previewing files.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-previewer
6
6
  Author: CERN
@@ -15,29 +15,29 @@ License-File: AUTHORS.rst
15
15
  Requires-Dist: charset_normalizer>=3.3.2
16
16
  Requires-Dist: invenio-assets<5.0.0,>=4.0.0
17
17
  Requires-Dist: invenio-base<3.0.0,>=2.3.2
18
- Requires-Dist: invenio-formatter<4.0.0,>=3.0.0
18
+ Requires-Dist: invenio-formatter<5.0.0,>=4.0.0
19
19
  Requires-Dist: invenio-i18n<4.0.0,>=3.0.0
20
- Requires-Dist: invenio-pidstore<3.0.0,>=2.0.0
21
- Requires-Dist: invenio-records-ui<3.0.0,>=2.0.0
20
+ Requires-Dist: invenio-pidstore<4.0.0,>=3.0.0
21
+ Requires-Dist: invenio-records-ui<4.0.0,>=3.0.0
22
22
  Requires-Dist: mistune>=0.8.1
23
23
  Requires-Dist: nbconvert<8,>=7
24
24
  Requires-Dist: nbformat<6.0,>=5.1
25
25
  Requires-Dist: lxml-html-clean>=0.1.1
26
26
  Provides-Extra: tests
27
- Requires-Dist: pytest-black-ng>=0.4.0; extra == "tests"
28
- Requires-Dist: pytest-invenio<4.0.0,>=3.0.0; extra == "tests"
29
- Requires-Dist: invenio-app<3.0.0,>=2.0.0; extra == "tests"
27
+ Requires-Dist: pytest-black>=0.6.0; extra == "tests"
28
+ Requires-Dist: pytest-invenio<5.0.0,>=4.0.0; extra == "tests"
29
+ Requires-Dist: invenio-app<4.0.0,>=3.0.0; extra == "tests"
30
30
  Requires-Dist: invenio-config>=1.0.3; extra == "tests"
31
- Requires-Dist: invenio-db[postgresql,versioning]<3.0.0,>=2.0.0; extra == "tests"
32
- Requires-Dist: invenio-files-rest<4.0.0,>=3.0.0; extra == "tests"
33
- Requires-Dist: invenio-records-files>=1.2.1; extra == "tests"
31
+ Requires-Dist: invenio-db[postgresql,versioning]<3.0.0,>=2.2.0; extra == "tests"
32
+ Requires-Dist: invenio-files-rest<5.0.0,>=4.0.0; extra == "tests"
33
+ Requires-Dist: invenio-records-files<3.0.0,>=2.0.0; extra == "tests"
34
34
  Requires-Dist: invenio-theme<5.0.0,>=4.0.0; extra == "tests"
35
35
  Requires-Dist: mock>=1.3.0; extra == "tests"
36
36
  Requires-Dist: sphinx>=4.5; extra == "tests"
37
37
  Provides-Extra: docs
38
38
  Provides-Extra: files
39
- Requires-Dist: invenio-files-rest>=1.3.2; extra == "files"
40
- Requires-Dist: invenio-records-files>=1.2.1; extra == "files"
39
+ Requires-Dist: invenio-files-rest<5.0.0,>=4.0.0; extra == "files"
40
+ Requires-Dist: invenio-records-files<3.0.0,>=2.0.0; extra == "files"
41
41
  Dynamic: license-file
42
42
 
43
43
  ..
@@ -86,7 +86,7 @@ available at: https://github.com/webrecorder/replayweb.page
86
86
  ..
87
87
  This file is part of Invenio.
88
88
  Copyright (C) 2016-2025 CERN.
89
- Copyright (C) 2024-2025 Graz University of Technology.
89
+ Copyright (C) 2024-2026 Graz University of Technology.
90
90
  Copyright (C) 2025 KTH Royal Institute of Technology.
91
91
 
92
92
  Invenio is free software; you can redistribute it and/or modify it
@@ -96,9 +96,10 @@ available at: https://github.com/webrecorder/replayweb.page
96
96
  Changes
97
97
  =======
98
98
 
99
- Version v3.7.0 (released 2026-02-06)
99
+ Version v4.0.0 (released 2026-02-03)
100
100
 
101
- - feat(pdfjs): open pdf at page from URL parameter
101
+ - chore(black): update formatting to >= 26.0
102
+ - chore(setup): bump dependencies
102
103
 
103
104
  Version v3.6.0 (released 2026-01-15)
104
105
 
@@ -1,9 +1,9 @@
1
- invenio_previewer/__init__.py,sha256=xOTSekmXisBppknGLTngQJ34Bzrou2ZvBNrUATkaWFA,12292
1
+ invenio_previewer/__init__.py,sha256=7gsp5UCdPU9CmnzpPVhbY8EL3KfqZG5DQD0elvpO2F4,12292
2
2
  invenio_previewer/api.py,sha256=ntblD3P-nAlVmL6gTx4tJHJmoJp4tOFwoVz8gMh6T5U,1708
3
3
  invenio_previewer/config.py,sha256=7QCbs8zJhVGyaBFo0UPW-w9HX_nPxsEqdltv-eTQt1Q,2627
4
4
  invenio_previewer/ext.py,sha256=lWGOZXP78qv2PaA0lnrWkEGZ6C0kz9Mx1ioxcpnKfho,4559
5
5
  invenio_previewer/proxies.py,sha256=vzcZDzP4MlKJAXJu2u6Las0o4fxSJ2qOmtREszPkmxM,479
6
- invenio_previewer/utils.py,sha256=dj1ZAgRLs05Xiali7BHaNJR1oSm_98YbZVuH8gQ_tDw,1970
6
+ invenio_previewer/utils.py,sha256=3trETRUw1-Ba1lR3Y-o4umocFezmh8fDc7J1tROLrbE,1969
7
7
  invenio_previewer/views.py,sha256=iBgV0UKeOosVkU60CMSnAbN4cTmjTXUQClGl9HWGWJk,2483
8
8
  invenio_previewer/webpack.py,sha256=NNlowng7-6--IzAWSRLCYRfVYOpI-00iiiehaHVuRFs,5572
9
9
  invenio_previewer/assets/bootstrap3/css/invenio_previewer/prismjs/simple.css,sha256=_8CrMr-DmI6-WBFyCZ1g4nMKp__PSVy_avNOyF8PCGs,383
@@ -52,7 +52,7 @@ invenio_previewer/static/images/pdfjs/next.svg,sha256=s8cVHIiKmueVrJclJ-guEFe_76
52
52
  invenio_previewer/static/images/pdfjs/plus.svg,sha256=jHVi4RtaGnJAeMHeTZ6fsysRx568VzbFFvraL9PmCyY,1490
53
53
  invenio_previewer/static/images/pdfjs/previous.svg,sha256=zC_FFUD9qeGmieo3UwaekoU3L8aTgxp2WTHLOT3HvDE,577
54
54
  invenio_previewer/static/js/fullscreen.js,sha256=1FIvn_zJSgCkrzy8NZTQ3jNUrnaCUfzZOyaFCFzY_vc,1845
55
- invenio_previewer/static/js/open_pdf.js,sha256=LVRHKMMAQQoL-AIjTFDMgpcVYmjEPeS5p5UhsSgtPug,7605
55
+ invenio_previewer/static/js/open_pdf.js,sha256=vWsL_piMYX2mhToKamHiVO7lv-s-L1NfhrNDLwD1Ej4,6497
56
56
  invenio_previewer/templates/invenio_previewer/abstract_previewer.html,sha256=oeiYsCclUn_uu_NXa42IifG63ilhOYxPXWXOa1J-C-A,563
57
57
  invenio_previewer/templates/invenio_previewer/base.html,sha256=SnDtG7ru1USS6ihU9By_VN-Lv1SW5Wu_Z1rAdUFGTL8,803
58
58
  invenio_previewer/templates/invenio_previewer/bottom.html,sha256=TcHhwCwyhMJKISw1FG7kzhJxw5qlyQdTfkvJncGhu7k,2190
@@ -147,10 +147,10 @@ invenio_previewer/translations/zh_CN/LC_MESSAGES/messages.mo,sha256=CJDnxT2p-q-o
147
147
  invenio_previewer/translations/zh_CN/LC_MESSAGES/messages.po,sha256=YKEqdgACVuwj7DroAVz4b60ZeiDx3nLfB5RzXHpTF74,16227
148
148
  invenio_previewer/translations/zh_TW/LC_MESSAGES/messages.mo,sha256=kv7SShoJRphr1HFxMl7cpcYO30SgHoAGcLIgyd6yHK4,807
149
149
  invenio_previewer/translations/zh_TW/LC_MESSAGES/messages.po,sha256=S8o0foNsG4pLH8VwXu8Fq51ngLQIBkhpJ1Nfa3CEZbU,15485
150
- invenio_previewer-3.7.0.dist-info/licenses/AUTHORS.rst,sha256=wcFhv9iJlZPq0MkvNHDVBEn5iXZGsVfC32yjS2jW9CQ,486
151
- invenio_previewer-3.7.0.dist-info/licenses/LICENSE,sha256=p3bBZtg1gwhzibgFe4OuiiUStzewJS5TD6MC5Vu1uSM,1067
152
- invenio_previewer-3.7.0.dist-info/METADATA,sha256=ZKQSow-u7eGJianapqpzuasUaxEyFz0XVcm-5KS-Bgw,9812
153
- invenio_previewer-3.7.0.dist-info/WHEEL,sha256=Mk1ST5gDzEO5il5kYREiBnzzM469m5sI8ESPl7TRhJY,110
154
- invenio_previewer-3.7.0.dist-info/entry_points.txt,sha256=gYe4eWC5Pul52jSjV_sdeIffYCm6KzwHhNkUsxrm7vc,916
155
- invenio_previewer-3.7.0.dist-info/top_level.txt,sha256=BwA4Jo3Wv0rLjDkEuCEIR2W-lz1EXRc7h9jzDwaMK3o,18
156
- invenio_previewer-3.7.0.dist-info/RECORD,,
150
+ invenio_previewer-4.0.0.dist-info/licenses/AUTHORS.rst,sha256=wcFhv9iJlZPq0MkvNHDVBEn5iXZGsVfC32yjS2jW9CQ,486
151
+ invenio_previewer-4.0.0.dist-info/licenses/LICENSE,sha256=p3bBZtg1gwhzibgFe4OuiiUStzewJS5TD6MC5Vu1uSM,1067
152
+ invenio_previewer-4.0.0.dist-info/METADATA,sha256=_9pAp8b25MnlxRe_ZxienXFN7bMFqI5111-VtKkbeR0,9858
153
+ invenio_previewer-4.0.0.dist-info/WHEEL,sha256=Mk1ST5gDzEO5il5kYREiBnzzM469m5sI8ESPl7TRhJY,110
154
+ invenio_previewer-4.0.0.dist-info/entry_points.txt,sha256=gYe4eWC5Pul52jSjV_sdeIffYCm6KzwHhNkUsxrm7vc,916
155
+ invenio_previewer-4.0.0.dist-info/top_level.txt,sha256=BwA4Jo3Wv0rLjDkEuCEIR2W-lz1EXRc7h9jzDwaMK3o,18
156
+ invenio_previewer-4.0.0.dist-info/RECORD,,