mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Enable the import/no-cycle
ESLint plugin rule
Having cyclical imports is obviously not a good idea, and this ESLint plugin rule can help detect those; please see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
This commit is contained in:
parent
605d9f492f
commit
cf3a35e9da
22 changed files with 328 additions and 213 deletions
|
@ -13,18 +13,19 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
FORMS_VERSION,
|
||||
USERACTIVATION_CALLBACKID,
|
||||
VIEWER_TYPE,
|
||||
VIEWER_VARIATION,
|
||||
VIEWER_VERSION,
|
||||
} from "./app_utils.js";
|
||||
import { Color } from "./color.js";
|
||||
import { EventDispatcher } from "./event.js";
|
||||
import { FullScreen } from "./fullscreen.js";
|
||||
import { PDFObject } from "./pdf_object.js";
|
||||
import { Thermometer } from "./thermometer.js";
|
||||
|
||||
const VIEWER_TYPE = "PDF.js";
|
||||
const VIEWER_VARIATION = "Full";
|
||||
const VIEWER_VERSION = 21.00720099;
|
||||
const FORMS_VERSION = 21.00720099;
|
||||
const USERACTIVATION_CALLBACKID = 0;
|
||||
|
||||
class App extends PDFObject {
|
||||
constructor(data) {
|
||||
super(data);
|
||||
|
@ -654,4 +655,4 @@ class App extends PDFObject {
|
|||
}
|
||||
}
|
||||
|
||||
export { App, USERACTIVATION_CALLBACKID };
|
||||
export { App };
|
||||
|
|
31
src/scripting_api/app_utils.js
Normal file
31
src/scripting_api/app_utils.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* Copyright 2020 Mozilla Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const VIEWER_TYPE = "PDF.js";
|
||||
const VIEWER_VARIATION = "Full";
|
||||
const VIEWER_VERSION = 21.00720099;
|
||||
const FORMS_VERSION = 21.00720099;
|
||||
|
||||
const USERACTIVATION_CALLBACKID = 0;
|
||||
const USERACTIVATION_MAXTIME_VALIDITY = 5000;
|
||||
|
||||
export {
|
||||
FORMS_VERSION,
|
||||
USERACTIVATION_CALLBACKID,
|
||||
USERACTIVATION_MAXTIME_VALIDITY,
|
||||
VIEWER_TYPE,
|
||||
VIEWER_VARIATION,
|
||||
VIEWER_VERSION,
|
||||
};
|
|
@ -13,9 +13,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { USERACTIVATION_CALLBACKID } from "./app.js";
|
||||
|
||||
const USERACTIVATION_MAXTIME_VALIDITY = 5000;
|
||||
import {
|
||||
USERACTIVATION_CALLBACKID,
|
||||
USERACTIVATION_MAXTIME_VALIDITY,
|
||||
} from "./app_utils.js";
|
||||
|
||||
class Event {
|
||||
constructor(data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue