diff --git a/web/annotation_layer_builder.js b/web/annotation_layer_builder.js index c68051d36..8c5b66ef3 100644 --- a/web/annotation_layer_builder.js +++ b/web/annotation_layer_builder.js @@ -13,9 +13,9 @@ * limitations under the License. */ -import { AnnotationLayer } from 'pdfjs-web/pdfjs'; -import { mozL10n } from 'pdfjs-web/ui_utils'; -import { SimpleLinkService } from 'pdfjs-web/pdf_link_service'; +import { AnnotationLayer } from './pdfjs'; +import { mozL10n } from './ui_utils'; +import { SimpleLinkService } from './pdf_link_service'; /** * @typedef {Object} AnnotationLayerBuilderOptions diff --git a/web/app.js b/web/app.js index 237f9e8fe..6d4cf32af 100644 --- a/web/app.js +++ b/web/app.js @@ -18,34 +18,34 @@ import { animationStarted, DEFAULT_SCALE_VALUE, getPDFFileNameFromURL, localized, MAX_SCALE, MIN_SCALE, mozL10n, noContextMenuHandler, normalizeWheelEventDelta, parseQueryString, ProgressBar, RendererType, UNKNOWN_SCALE -} from 'pdfjs-web/ui_utils'; +} from './ui_utils'; import { build, createBlob, getDocument, getFilenameFromUrl, InvalidPDFException, MissingPDFException, OPS, PDFJS, shadow, UnexpectedResponseException, UNSUPPORTED_FEATURES, version, -} from 'pdfjs-web/pdfjs'; +} from './pdfjs'; import { PDFRenderingQueue, RenderingStates -} from 'pdfjs-web/pdf_rendering_queue'; -import { PDFSidebar, SidebarView } from 'pdfjs-web/pdf_sidebar'; -import { PDFViewer, PresentationModeState } from 'pdfjs-web/pdf_viewer'; -import { getGlobalEventBus } from 'pdfjs-web/dom_events'; -import { HandTool } from 'pdfjs-web/hand_tool'; -import { OverlayManager } from 'pdfjs-web/overlay_manager'; -import { PasswordPrompt } from 'pdfjs-web/password_prompt'; -import { PDFAttachmentViewer } from 'pdfjs-web/pdf_attachment_viewer'; -import { PDFDocumentProperties } from 'pdfjs-web/pdf_document_properties'; -import { PDFFindBar } from 'pdfjs-web/pdf_find_bar'; -import { PDFFindController } from 'pdfjs-web/pdf_find_controller'; -import { PDFHistory } from 'pdfjs-web/pdf_history'; -import { PDFLinkService } from 'pdfjs-web/pdf_link_service'; -import { PDFOutlineViewer } from 'pdfjs-web/pdf_outline_viewer'; -import { PDFPresentationMode } from 'pdfjs-web/pdf_presentation_mode'; -import { PDFThumbnailViewer } from 'pdfjs-web/pdf_thumbnail_viewer'; -import { Preferences } from 'pdfjs-web/preferences'; -import { SecondaryToolbar } from 'pdfjs-web/secondary_toolbar'; -import { Toolbar } from 'pdfjs-web/toolbar'; -import { ViewHistory } from 'pdfjs-web/view_history'; +} from './pdf_rendering_queue'; +import { PDFSidebar, SidebarView } from './pdf_sidebar'; +import { PDFViewer, PresentationModeState } from './pdf_viewer'; +import { getGlobalEventBus } from './dom_events'; +import { HandTool } from './hand_tool'; +import { OverlayManager } from './overlay_manager'; +import { PasswordPrompt } from './password_prompt'; +import { PDFAttachmentViewer } from './pdf_attachment_viewer'; +import { PDFDocumentProperties } from './pdf_document_properties'; +import { PDFFindBar } from './pdf_find_bar'; +import { PDFFindController } from './pdf_find_controller'; +import { PDFHistory } from './pdf_history'; +import { PDFLinkService } from './pdf_link_service'; +import { PDFOutlineViewer } from './pdf_outline_viewer'; +import { PDFPresentationMode } from './pdf_presentation_mode'; +import { PDFThumbnailViewer } from './pdf_thumbnail_viewer'; +import { Preferences } from './preferences'; +import { SecondaryToolbar } from './secondary_toolbar'; +import { Toolbar } from './toolbar'; +import { ViewHistory } from './view_history'; var DEFAULT_SCALE_DELTA = 1.1; var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; diff --git a/web/chromecom.js b/web/chromecom.js index d0e1a93d1..47d867c66 100644 --- a/web/chromecom.js +++ b/web/chromecom.js @@ -14,10 +14,10 @@ */ /* globals chrome */ -import { DefaultExternalServices, PDFViewerApplication } from 'pdfjs-web/app'; -import { OverlayManager } from 'pdfjs-web/overlay_manager'; -import { PDFJS } from 'pdfjs-web/pdfjs'; -import { Preferences } from 'pdfjs-web/preferences'; +import { DefaultExternalServices, PDFViewerApplication } from './app'; +import { OverlayManager } from './overlay_manager'; +import { PDFJS } from './pdfjs'; +import { Preferences } from './preferences'; if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('CHROME')) { throw new Error('Module "pdfjs-web/chromecom" shall not be used outside ' + diff --git a/web/dom_events.js b/web/dom_events.js index cf9be2732..373c08553 100644 --- a/web/dom_events.js +++ b/web/dom_events.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import { EventBus } from 'pdfjs-web/ui_utils'; +import { EventBus } from './ui_utils'; // Attaching to the application event bus to dispatch events to the DOM for // backwards viewer API compatibility. diff --git a/web/download_manager.js b/web/download_manager.js index dfcc95ad3..43831ea8f 100644 --- a/web/download_manager.js +++ b/web/download_manager.js @@ -15,8 +15,8 @@ import { createObjectURL, createValidAbsoluteUrl, PDFJS -} from 'pdfjs-web/pdfjs'; -import { DefaultExternalServices, PDFViewerApplication } from 'pdfjs-web/app'; +} from './pdfjs'; +import { DefaultExternalServices, PDFViewerApplication } from './app'; if (typeof PDFJSDev !== 'undefined' && !PDFJSDev.test('CHROME || GENERIC')) { throw new Error('Module "pdfjs-web/download_manager" shall not be used ' + diff --git a/web/firefox_print_service.js b/web/firefox_print_service.js index a8dd45b9e..1556c4ff8 100644 --- a/web/firefox_print_service.js +++ b/web/firefox_print_service.js @@ -13,9 +13,9 @@ * limitations under the License. */ -import { CSS_UNITS } from 'pdfjs-web/ui_utils'; -import { PDFPrintServiceFactory } from 'pdfjs-web/app'; -import { shadow } from 'pdfjs-web/pdfjs'; +import { CSS_UNITS } from './ui_utils'; +import { PDFPrintServiceFactory } from './app'; +import { shadow } from './pdfjs'; // Creates a placeholder with div and canvas with right size for the page. function composePage(pdfDocument, pageNumber, size, printContainer) { diff --git a/web/firefoxcom.js b/web/firefoxcom.js index 64e2085e5..015b946aa 100644 --- a/web/firefoxcom.js +++ b/web/firefoxcom.js @@ -15,9 +15,9 @@ import { createObjectURL, PDFDataRangeTransport, shadow -} from 'pdfjs-web/pdfjs'; -import { PDFViewerApplication } from 'pdfjs-web/app'; -import { Preferences } from 'pdfjs-web/preferences'; +} from './pdfjs'; +import { PDFViewerApplication } from './app'; +import { Preferences } from './preferences'; if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('FIREFOX || MOZCENTRAL')) { diff --git a/web/hand_tool.js b/web/hand_tool.js index eff267db9..eab54d7af 100644 --- a/web/hand_tool.js +++ b/web/hand_tool.js @@ -13,9 +13,9 @@ * limitations under the License. */ -import { GrabToPan } from 'pdfjs-web/grab_to_pan'; -import { localized } from 'pdfjs-web/ui_utils'; -import { Preferences } from 'pdfjs-web/preferences'; +import { GrabToPan } from './grab_to_pan'; +import { localized } from './ui_utils'; +import { Preferences } from './preferences'; /** * @typedef {Object} HandToolOptions diff --git a/web/password_prompt.js b/web/password_prompt.js index 710ddd370..af8cb6fbc 100644 --- a/web/password_prompt.js +++ b/web/password_prompt.js @@ -13,9 +13,9 @@ * limitations under the License. */ -import { mozL10n } from 'pdfjs-web/ui_utils'; -import { OverlayManager } from 'pdfjs-web/overlay_manager'; -import { PasswordResponses } from 'pdfjs-web/pdfjs'; +import { mozL10n } from './ui_utils'; +import { OverlayManager } from './overlay_manager'; +import { PasswordResponses } from './pdfjs'; /** * @typedef {Object} PasswordPromptOptions diff --git a/web/pdf_attachment_viewer.js b/web/pdf_attachment_viewer.js index 141c480bd..c8a3b034b 100644 --- a/web/pdf_attachment_viewer.js +++ b/web/pdf_attachment_viewer.js @@ -16,7 +16,7 @@ import { createObjectURL, createPromiseCapability, getFilenameFromUrl, PDFJS, removeNullCharacters -} from 'pdfjs-web/pdfjs'; +} from './pdfjs'; /** * @typedef {Object} PDFAttachmentViewerOptions diff --git a/web/pdf_document_properties.js b/web/pdf_document_properties.js index 1f9acdf2c..bc2da5d44 100644 --- a/web/pdf_document_properties.js +++ b/web/pdf_document_properties.js @@ -13,8 +13,8 @@ * limitations under the License. */ -import { getPDFFileNameFromURL, mozL10n } from 'pdfjs-web/ui_utils'; -import { OverlayManager } from 'pdfjs-web/overlay_manager'; +import { getPDFFileNameFromURL, mozL10n } from './ui_utils'; +import { OverlayManager } from './overlay_manager'; /** * @typedef {Object} PDFDocumentPropertiesOptions diff --git a/web/pdf_find_bar.js b/web/pdf_find_bar.js index 818714a24..35962b25c 100644 --- a/web/pdf_find_bar.js +++ b/web/pdf_find_bar.js @@ -13,8 +13,8 @@ * limitations under the License. */ -import { FindStates } from 'pdfjs-web/pdf_find_controller'; -import { mozL10n } from 'pdfjs-web/ui_utils'; +import { FindStates } from './pdf_find_controller'; +import { mozL10n } from './ui_utils'; /** * Creates a "search bar" given a set of DOM elements that act as controls diff --git a/web/pdf_find_controller.js b/web/pdf_find_controller.js index d5d49fcba..305f5229e 100644 --- a/web/pdf_find_controller.js +++ b/web/pdf_find_controller.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import { scrollIntoView } from 'pdfjs-web/ui_utils'; +import { scrollIntoView } from './ui_utils'; var FindStates = { FIND_FOUND: 0, diff --git a/web/pdf_history.js b/web/pdf_history.js index 5a4691cdb..f01288c2d 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -14,7 +14,7 @@ */ /* globals chrome */ -import { domEvents } from 'pdfjs-web/dom_events'; +import { domEvents } from './dom_events'; function PDFHistory(options) { this.linkService = options.linkService; diff --git a/web/pdf_link_service.js b/web/pdf_link_service.js index 446ed98ba..9f584dbaf 100644 --- a/web/pdf_link_service.js +++ b/web/pdf_link_service.js @@ -13,8 +13,8 @@ * limitations under the License. */ -import { domEvents } from 'pdfjs-web/dom_events'; -import { parseQueryString } from 'pdfjs-web/ui_utils'; +import { domEvents } from './dom_events'; +import { parseQueryString } from './ui_utils'; var PageNumberRegExp = /^\d+$/; function isPageNumber(str) { diff --git a/web/pdf_outline_viewer.js b/web/pdf_outline_viewer.js index ce8d2e909..5a2052b6a 100644 --- a/web/pdf_outline_viewer.js +++ b/web/pdf_outline_viewer.js @@ -15,7 +15,7 @@ import { addLinkAttributes, PDFJS, removeNullCharacters -} from 'pdfjs-web/pdfjs'; +} from './pdfjs'; var DEFAULT_TITLE = '\u2013'; diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 37c5c6f31..79429b22e 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -16,12 +16,12 @@ import { approximateFraction, CSS_UNITS, DEFAULT_SCALE, getOutputScale, RendererType, roundToDivide -} from 'pdfjs-web/ui_utils'; +} from './ui_utils'; import { CustomStyle, PDFJS, RenderingCancelledException, SVGGraphics -} from 'pdfjs-web/pdfjs'; -import { domEvents } from 'pdfjs-web/dom_events'; -import { RenderingStates } from 'pdfjs-web/pdf_rendering_queue'; +} from './pdfjs'; +import { domEvents } from './dom_events'; +import { RenderingStates } from './pdf_rendering_queue'; var TEXT_LAYER_RENDER_DELAY = 200; // ms diff --git a/web/pdf_presentation_mode.js b/web/pdf_presentation_mode.js index c55162ce9..c9f3d8066 100644 --- a/web/pdf_presentation_mode.js +++ b/web/pdf_presentation_mode.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import { normalizeWheelEventDelta } from 'pdfjs-web/ui_utils'; +import { normalizeWheelEventDelta } from './ui_utils'; var DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; // in ms var DELAY_BEFORE_HIDING_CONTROLS = 3000; // in ms diff --git a/web/pdf_print_service.js b/web/pdf_print_service.js index e759d789b..dbe0b2ca2 100644 --- a/web/pdf_print_service.js +++ b/web/pdf_print_service.js @@ -13,10 +13,10 @@ * limitations under the License. */ -import { CSS_UNITS, mozL10n } from 'pdfjs-web/ui_utils'; -import { OverlayManager } from 'pdfjs-web/overlay_manager'; -import { PDFJS } from 'pdfjs-web/pdfjs'; -import { PDFPrintServiceFactory } from 'pdfjs-web/app'; +import { CSS_UNITS, mozL10n } from './ui_utils'; +import { OverlayManager } from './overlay_manager'; +import { PDFJS } from './pdfjs'; +import { PDFPrintServiceFactory } from './app'; var activeService = null; diff --git a/web/pdf_sidebar.js b/web/pdf_sidebar.js index ee7f632c6..8ab427760 100644 --- a/web/pdf_sidebar.js +++ b/web/pdf_sidebar.js @@ -13,8 +13,8 @@ * limitations under the License. */ -import { mozL10n } from 'pdfjs-web/ui_utils'; -import { RenderingStates } from 'pdfjs-web/pdf_rendering_queue'; +import { mozL10n } from './ui_utils'; +import { RenderingStates } from './pdf_rendering_queue'; var UI_NOTIFICATION_CLASS = 'pdfSidebarNotification'; diff --git a/web/pdf_thumbnail_view.js b/web/pdf_thumbnail_view.js index cf814b989..a67e6abff 100644 --- a/web/pdf_thumbnail_view.js +++ b/web/pdf_thumbnail_view.js @@ -13,8 +13,8 @@ * limitations under the License. */ -import { getOutputScale, mozL10n } from 'pdfjs-web/ui_utils'; -import { RenderingStates } from 'pdfjs-web/pdf_rendering_queue'; +import { getOutputScale, mozL10n } from './ui_utils'; +import { RenderingStates } from './pdf_rendering_queue'; var THUMBNAIL_WIDTH = 98; // px var THUMBNAIL_CANVAS_BORDER_WIDTH = 1; // px diff --git a/web/pdf_thumbnail_viewer.js b/web/pdf_thumbnail_viewer.js index abd64a54a..67ac67006 100644 --- a/web/pdf_thumbnail_viewer.js +++ b/web/pdf_thumbnail_viewer.js @@ -15,8 +15,8 @@ import { getVisibleElements, scrollIntoView, watchScroll -} from 'pdfjs-web/ui_utils'; -import { PDFThumbnailView } from 'pdfjs-web/pdf_thumbnail_view'; +} from './ui_utils'; +import { PDFThumbnailView } from './pdf_thumbnail_view'; var THUMBNAIL_SCROLL_MARGIN = -19; diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js index 30925a9dc..d4f0d5753 100644 --- a/web/pdf_viewer.js +++ b/web/pdf_viewer.js @@ -17,16 +17,16 @@ import { CSS_UNITS, DEFAULT_SCALE, DEFAULT_SCALE_VALUE, getVisibleElements, MAX_AUTO_SCALE, RendererType, SCROLLBAR_PADDING, scrollIntoView, UNKNOWN_SCALE, VERTICAL_PADDING, watchScroll -} from 'pdfjs-web/ui_utils'; +} from './ui_utils'; import { PDFRenderingQueue, RenderingStates, -} from 'pdfjs-web/pdf_rendering_queue'; -import { AnnotationLayerBuilder } from 'pdfjs-web/annotation_layer_builder'; -import { domEvents } from 'pdfjs-web/dom_events'; -import { PDFJS } from 'pdfjs-web/pdfjs'; -import { PDFPageView } from 'pdfjs-web/pdf_page_view'; -import { SimpleLinkService } from 'pdfjs-web/pdf_link_service'; -import { TextLayerBuilder } from 'pdfjs-web/text_layer_builder'; +} from './pdf_rendering_queue'; +import { AnnotationLayerBuilder } from './annotation_layer_builder'; +import { domEvents } from './dom_events'; +import { PDFJS } from './pdfjs'; +import { PDFPageView } from './pdf_page_view'; +import { SimpleLinkService } from './pdf_link_service'; +import { TextLayerBuilder } from './text_layer_builder'; var PresentationModeState = { UNKNOWN: 0, diff --git a/web/secondary_toolbar.js b/web/secondary_toolbar.js index d9e2f1145..1ef7134a3 100644 --- a/web/secondary_toolbar.js +++ b/web/secondary_toolbar.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import { mozL10n, SCROLLBAR_PADDING } from 'pdfjs-web/ui_utils'; +import { mozL10n, SCROLLBAR_PADDING } from './ui_utils'; /** * @typedef {Object} SecondaryToolbarOptions diff --git a/web/text_layer_builder.js b/web/text_layer_builder.js index 2552b68e7..d353f07b0 100644 --- a/web/text_layer_builder.js +++ b/web/text_layer_builder.js @@ -13,8 +13,8 @@ * limitations under the License. */ -import { domEvents } from 'pdfjs-web/dom_events'; -import { renderTextLayer } from 'pdfjs-web/pdfjs'; +import { domEvents } from './dom_events'; +import { renderTextLayer } from './pdfjs'; var EXPAND_DIVS_TIMEOUT = 300; // ms diff --git a/web/toolbar.js b/web/toolbar.js index 696dd5855..058996df1 100644 --- a/web/toolbar.js +++ b/web/toolbar.js @@ -16,7 +16,7 @@ import { animationStarted, DEFAULT_SCALE, DEFAULT_SCALE_VALUE, localized, MAX_SCALE, MIN_SCALE, mozL10n, noContextMenuHandler -} from 'pdfjs-web/ui_utils'; +} from './ui_utils'; var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; var SCALE_SELECT_CONTAINER_PADDING = 8; diff --git a/web/ui_utils.js b/web/ui_utils.js index 8cd6960ff..46eb349d0 100644 --- a/web/ui_utils.js +++ b/web/ui_utils.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import { PDFJS } from 'pdfjs-web/pdfjs'; +import { PDFJS } from './pdfjs'; var CSS_UNITS = 96.0 / 72.0; var DEFAULT_SCALE_VALUE = 'auto';