Merge pull request #12665 from Snuffleupagus/update-packages
Update packages and translations
This commit is contained in:
commit
43550be484
10
external/builder/builder.js
vendored
10
external/builder/builder.js
vendored
@ -202,14 +202,14 @@ function preprocessCSS(mode, source, destination) {
|
||||
}
|
||||
|
||||
function expandImports(content, baseUrl) {
|
||||
return content.replace(/^\s*@import\s+url\(([^)]+)\);\s*$/gm, function (
|
||||
all,
|
||||
url
|
||||
) {
|
||||
return content.replace(
|
||||
/^\s*@import\s+url\(([^)]+)\);\s*$/gm,
|
||||
function (all, url) {
|
||||
var file = path.join(path.dirname(baseUrl), url);
|
||||
var imported = fs.readFileSync(file, "utf8").toString();
|
||||
return expandImports(imported, file);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function removePrefixed(content, hasPrefixedFilter) {
|
||||
|
25
gulpfile.js
25
gulpfile.js
@ -577,17 +577,17 @@ gulp.task("buildnumber", function (done) {
|
||||
console.log();
|
||||
console.log("### Getting extension build number");
|
||||
|
||||
exec("git log --format=oneline " + config.baseVersion + "..", function (
|
||||
err,
|
||||
stdout,
|
||||
stderr
|
||||
) {
|
||||
exec(
|
||||
"git log --format=oneline " + config.baseVersion + "..",
|
||||
function (err, stdout, stderr) {
|
||||
var buildNumber = 0;
|
||||
if (!err) {
|
||||
// Build number is the number of commits since base version
|
||||
buildNumber = stdout ? stdout.match(/\n/g).length : 0;
|
||||
} else {
|
||||
console.log("This is not a Git repository; using default build number.");
|
||||
console.log(
|
||||
"This is not a Git repository; using default build number."
|
||||
);
|
||||
}
|
||||
|
||||
console.log("Extension build number: " + buildNumber);
|
||||
@ -615,7 +615,8 @@ gulp.task("buildnumber", function (done) {
|
||||
.pipe(gulp.dest(BUILD_DIR))
|
||||
.on("end", done);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
gulp.task("default_preferences-pre", function () {
|
||||
@ -1619,9 +1620,10 @@ gulp.task("baseline", function (done) {
|
||||
return;
|
||||
}
|
||||
|
||||
exec("git checkout " + baselineCommit, { cwd: workingDirectory }, function (
|
||||
error2
|
||||
) {
|
||||
exec(
|
||||
"git checkout " + baselineCommit,
|
||||
{ cwd: workingDirectory },
|
||||
function (error2) {
|
||||
if (error2) {
|
||||
done(new Error("Baseline commit checkout failed."));
|
||||
return;
|
||||
@ -1629,7 +1631,8 @@ gulp.task("baseline", function (done) {
|
||||
|
||||
console.log('Baseline commit "' + baselineCommit + '" checked out.');
|
||||
done();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -243,7 +243,7 @@ annotation_date_string={{date}}, {{time}}
|
||||
text_annotation_type.alt=[{{type}} Σχόλιο]
|
||||
password_label=Εισαγωγή κωδικού για το άνοιγμα του PDF αρχείου.
|
||||
password_invalid=Μη έγκυρος κωδικός. Προσπαθείστε ξανά.
|
||||
password_ok=ΟΚ
|
||||
password_ok=OK
|
||||
password_cancel=Ακύρωση
|
||||
|
||||
printing_not_supported=Προειδοποίηση: Η εκτύπωση δεν υποστηρίζεται πλήρως από αυτόν τον περιηγητή.
|
||||
|
@ -143,11 +143,13 @@ document_outline.title=Erakutsi dokumentuaren eskema (klik bikoitza elementu guz
|
||||
document_outline_label=Dokumentuaren eskema
|
||||
attachments.title=Erakutsi eranskinak
|
||||
attachments_label=Eranskinak
|
||||
layers_label=Geruzak
|
||||
thumbs.title=Erakutsi koadro txikiak
|
||||
thumbs_label=Koadro txikiak
|
||||
findbar.title=Bilatu dokumentuan
|
||||
findbar_label=Bilatu
|
||||
|
||||
additional_layers=Geruza gehigarriak
|
||||
# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
|
||||
page_canvas={{page}}. orria
|
||||
# Thumbnails panel item (tooltip and alt text for images)
|
||||
|
@ -214,7 +214,7 @@ error_stack=Pila : {{stack}}
|
||||
error_file=Fichièr : {{file}}
|
||||
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
|
||||
error_line=Linha : {{line}}
|
||||
rendering_error=Una error s'es produita pendent l'afichatge de la pagina.
|
||||
rendering_error=Una error s'es producha pendent l'afichatge de la pagina.
|
||||
|
||||
# Predefined zoom values
|
||||
page_scale_width=Largor plena
|
||||
@ -227,7 +227,7 @@ page_scale_percent={{scale}}%
|
||||
|
||||
# Loading indicator messages
|
||||
loading_error_indicator=Error
|
||||
loading_error=Una error s'es produita pendent lo cargament del fichièr PDF.
|
||||
loading_error=Una error s'es producha pendent lo cargament del fichièr PDF.
|
||||
invalid_file_error=Fichièr PDF invalid o corromput.
|
||||
missing_file_error=Fichièr PDF mancant.
|
||||
unexpected_response_error=Responsa de servidor imprevista.
|
||||
|
@ -136,10 +136,10 @@ print_progress_close=Cancelar
|
||||
# Tooltips and alt text for side panel toolbar buttons
|
||||
# (the _label strings are alt text for the buttons, the .title strings are
|
||||
# tooltips)
|
||||
toggle_sidebar.title=Alternar painel
|
||||
toggle_sidebar.title=Exibir/ocultar painel
|
||||
toggle_sidebar_notification.title=Alternar o painel (documento contém marcadores e anexos)
|
||||
toggle_sidebar_notification2.title=Exibir/ocultar painel lateral (documento contém estrutura/anexos/camadas)
|
||||
toggle_sidebar_label=Alternar painel
|
||||
toggle_sidebar_label=Exibir/ocultar painel
|
||||
document_outline.title=Mostrar a estrutura do documento (dê um duplo-clique para expandir/recolher todos os itens)
|
||||
document_outline_label=Estrutura do documento
|
||||
attachments.title=Mostrar anexos
|
||||
|
1671
package-lock.json
generated
1671
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@ -2,26 +2,26 @@
|
||||
"name": "pdf.js",
|
||||
"version": "2.0.0",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.3",
|
||||
"@babel/core": "^7.12.9",
|
||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.12.1",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
|
||||
"@babel/plugin-transform-runtime": "^7.12.1",
|
||||
"@babel/preset-env": "^7.12.1",
|
||||
"@babel/preset-env": "^7.12.7",
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"acorn": "^8.0.4",
|
||||
"autoprefixer": "^10.0.2",
|
||||
"babel-loader": "^8.2.1",
|
||||
"autoprefixer": "^10.0.4",
|
||||
"babel-loader": "^8.2.2",
|
||||
"canvas": "^2.6.1",
|
||||
"core-js": "^3.7.0",
|
||||
"core-js": "^3.8.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"es-module-shims": "^0.6.0",
|
||||
"escodegen": "^2.0.0",
|
||||
"eslint": "^7.13.0",
|
||||
"eslint": "^7.14.0",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-plugin-fetch-options": "^0.0.5",
|
||||
"eslint-plugin-html": "^6.1.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-mozilla": "^2.8.0",
|
||||
"eslint-plugin-mozilla": "^2.9.1",
|
||||
"eslint-plugin-no-unsanitized": "^3.1.4",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-plugin-unicorn": "^22.0.0",
|
||||
@ -38,27 +38,27 @@
|
||||
"merge-stream": "^2.0.0",
|
||||
"mkdirp": "^1.0.4",
|
||||
"needle": "^2.5.2",
|
||||
"postcss": "^8.1.7",
|
||||
"postcss": "^8.1.10",
|
||||
"postcss-calc": "^7.0.5",
|
||||
"postcss-css-variables": "^0.17.0",
|
||||
"prettier": "^2.1.2",
|
||||
"prettier": "^2.2.1",
|
||||
"puppeteer": "^5.5.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"streamqueue": "^1.1.2",
|
||||
"stylelint": "^13.7.2",
|
||||
"stylelint": "^13.8.0",
|
||||
"stylelint-config-prettier": "^8.0.2",
|
||||
"stylelint-prettier": "^1.1.2",
|
||||
"systemjs": "^0.21.6",
|
||||
"systemjs-plugin-babel": "^0.0.25",
|
||||
"terser": "^5.3.8",
|
||||
"terser": "^5.5.1",
|
||||
"through2": "^4.0.2",
|
||||
"ttest": "^3.0.0",
|
||||
"typescript": "^4.0.5",
|
||||
"typescript": "^4.1.2",
|
||||
"typogr": "^0.6.8",
|
||||
"vinyl": "^2.2.1",
|
||||
"vinyl-fs": "^3.0.3",
|
||||
"web-streams-polyfill": "^3.0.1",
|
||||
"webpack": "^5.4.0",
|
||||
"webpack": "^5.9.0",
|
||||
"webpack-stream": "~6.1.1",
|
||||
"wintersmith": "^2.5.0",
|
||||
"yargs": "^11.1.1"
|
||||
|
@ -994,11 +994,13 @@ var CMapFactory = (function CMapFactoryClosure() {
|
||||
var cMap = new CMap(true);
|
||||
|
||||
if (compressionType === CMapCompressionType.BINARY) {
|
||||
return new BinaryCMapReader().process(cMapData, cMap, function (
|
||||
useCMap
|
||||
) {
|
||||
return new BinaryCMapReader().process(
|
||||
cMapData,
|
||||
cMap,
|
||||
function (useCMap) {
|
||||
return extendCMap(cMap, fetchBuiltInCMap, useCMap);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
if (compressionType === CMapCompressionType.NONE) {
|
||||
var lexer = new Lexer(new Stream(cMapData));
|
||||
|
@ -533,11 +533,9 @@ class WorkerMessageHandler {
|
||||
return pdfManager.ensureDoc("calculationOrderIds");
|
||||
});
|
||||
|
||||
handler.on("SaveDocument", function ({
|
||||
numPages,
|
||||
annotationStorage,
|
||||
filename,
|
||||
}) {
|
||||
handler.on(
|
||||
"SaveDocument",
|
||||
function ({ numPages, annotationStorage, filename }) {
|
||||
pdfManager.requestLoadedStream();
|
||||
const promises = [
|
||||
pdfManager.onLoadedStream(),
|
||||
@ -627,7 +625,8 @@ class WorkerMessageHandler {
|
||||
datasetsRef: xfaDatasets,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
handler.on("GetOperatorList", function wphSetupRenderPage(data, sink) {
|
||||
var pageIndex = data.pageIndex;
|
||||
|
@ -70,14 +70,9 @@ class Util extends PDFObject {
|
||||
const ZERO = 4;
|
||||
const HASH = 8;
|
||||
let i = 0;
|
||||
return args[0].replace(pattern, function (
|
||||
match,
|
||||
nDecSep,
|
||||
cFlags,
|
||||
nWidth,
|
||||
nPrecision,
|
||||
cConvChar
|
||||
) {
|
||||
return args[0].replace(
|
||||
pattern,
|
||||
function (match, nDecSep, cFlags, nWidth, nPrecision, cConvChar) {
|
||||
// cConvChar must be one of d, f, s, x
|
||||
if (
|
||||
cConvChar !== "d" &&
|
||||
@ -203,7 +198,8 @@ class Util extends PDFObject {
|
||||
}
|
||||
|
||||
return `${sign}${n}`;
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
iconStreamFromIcon() {
|
||||
@ -525,14 +521,14 @@ class Util extends PDFObject {
|
||||
const patterns = /(mmmm|mmm|mm|m|dddd|ddd|dd|d|yyyy|yy|HH|H|hh|h|MM|M|ss|s|tt|t)/g;
|
||||
const actions = [];
|
||||
|
||||
const re = escapedFormat.replace(patterns, function (
|
||||
match,
|
||||
patternElement
|
||||
) {
|
||||
const re = escapedFormat.replace(
|
||||
patterns,
|
||||
function (match, patternElement) {
|
||||
const { pattern, action } = handlers[patternElement];
|
||||
actions.push(action);
|
||||
return pattern;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
this._scandCache.set(cFormat, [new RegExp(re, "g"), actions]);
|
||||
}
|
||||
|
@ -121,9 +121,11 @@ describe("evaluator", function () {
|
||||
resources.XObject = xObject;
|
||||
|
||||
const stream = new StringStream("/Res1 DoQ");
|
||||
runOperatorListCheck(partialEvaluator, stream, resources, function (
|
||||
result
|
||||
) {
|
||||
runOperatorListCheck(
|
||||
partialEvaluator,
|
||||
stream,
|
||||
resources,
|
||||
function (result) {
|
||||
expect(result.fnArray.length).toEqual(3);
|
||||
expect(result.fnArray[0]).toEqual(OPS.dependency);
|
||||
expect(result.fnArray[1]).toEqual(OPS.paintImageXObject);
|
||||
@ -133,7 +135,8 @@ describe("evaluator", function () {
|
||||
expect(result.argsArray[1]).toEqual(["img_p0_1", 1, 1]);
|
||||
expect(result.argsArray[2]).toEqual(null);
|
||||
done();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it("should handle three glued operations", function (done) {
|
||||
@ -157,16 +160,19 @@ describe("evaluator", function () {
|
||||
const resources = new ResourcesMock();
|
||||
resources.Res1 = {};
|
||||
const stream = new StringStream("B*Bf*");
|
||||
runOperatorListCheck(partialEvaluator, stream, resources, function (
|
||||
result
|
||||
) {
|
||||
runOperatorListCheck(
|
||||
partialEvaluator,
|
||||
stream,
|
||||
resources,
|
||||
function (result) {
|
||||
expect(!!result.fnArray && !!result.argsArray).toEqual(true);
|
||||
expect(result.fnArray.length).toEqual(3);
|
||||
expect(result.fnArray[0]).toEqual(OPS.eoFillStroke);
|
||||
expect(result.fnArray[1]).toEqual(OPS.fillStroke);
|
||||
expect(result.fnArray[2]).toEqual(OPS.eoFill);
|
||||
done();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it("should handle glued operations and operands", function (done) {
|
||||
@ -253,9 +259,11 @@ describe("evaluator", function () {
|
||||
resources.ExtGState = extGState;
|
||||
|
||||
const stream = new StringStream("/F2 /GS2 gs 5.711 Tf");
|
||||
runOperatorListCheck(partialEvaluator, stream, resources, function (
|
||||
result
|
||||
) {
|
||||
runOperatorListCheck(
|
||||
partialEvaluator,
|
||||
stream,
|
||||
resources,
|
||||
function (result) {
|
||||
expect(result.fnArray.length).toEqual(3);
|
||||
expect(result.fnArray[0]).toEqual(OPS.setGState);
|
||||
expect(result.fnArray[1]).toEqual(OPS.dependency);
|
||||
@ -270,7 +278,8 @@ describe("evaluator", function () {
|
||||
expect(result.argsArray[1]).toEqual(["g_font_error"]);
|
||||
expect(result.argsArray[2]).toEqual(["g_font_error", 5.711]);
|
||||
done();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
it("should skip if too few arguments", function (done) {
|
||||
const stream = new StringStream("5 d0");
|
||||
@ -369,13 +378,16 @@ describe("evaluator", function () {
|
||||
resources.set("XObject", xobjs);
|
||||
|
||||
const stream = new StringStream("/Res1 Do");
|
||||
runOperatorListCheck(partialEvaluator, stream, resources, function (
|
||||
result
|
||||
) {
|
||||
runOperatorListCheck(
|
||||
partialEvaluator,
|
||||
stream,
|
||||
resources,
|
||||
function (result) {
|
||||
expect(result.argsArray).toEqual([]);
|
||||
expect(result.fnArray).toEqual([]);
|
||||
done();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -98,9 +98,9 @@ describe("pdf_find_controller", function () {
|
||||
return a + b;
|
||||
});
|
||||
|
||||
eventBus.on("updatefindmatchescount", function onUpdateFindMatchesCount(
|
||||
evt
|
||||
) {
|
||||
eventBus.on(
|
||||
"updatefindmatchescount",
|
||||
function onUpdateFindMatchesCount(evt) {
|
||||
if (pdfFindController.pageMatches.length !== totalPages) {
|
||||
return;
|
||||
}
|
||||
@ -120,7 +120,8 @@ describe("pdf_find_controller", function () {
|
||||
);
|
||||
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user