removing bower: migrate jszip

Signed-off-by: Pamplemousse <git@xaviermaso.com>
This commit is contained in:
Pamplemousse 2023-01-07 13:23:21 +01:00
parent 32b7ea07ad
commit 87b34e6e47
6 changed files with 11 additions and 9 deletions

View file

@ -18,7 +18,6 @@
"tests"
],
"dependencies": {
"jszip": "3.7.1",
"dragula.js": "3.7.2",
"MathJax": "3.0.5"
},

13
package-lock.json generated
View file

@ -43,6 +43,7 @@
"jquery": "3.6.0",
"jshint": "^2.13.4",
"json.sortify": "~2.1.0",
"jszip": "3.7.1",
"less": "3.7.1",
"lesshint": "6.3.7",
"localforage": "^1.5.2",
@ -2793,9 +2794,9 @@
}
},
"node_modules/jszip": {
"version": "3.9.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.9.1.tgz",
"integrity": "sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw==",
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.7.1.tgz",
"integrity": "sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg==",
"dev": true,
"dependencies": {
"lie": "~3.3.0",
@ -7432,9 +7433,9 @@
}
},
"jszip": {
"version": "3.9.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.9.1.tgz",
"integrity": "sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw==",
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.7.1.tgz",
"integrity": "sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg==",
"dev": true,
"requires": {
"lie": "~3.3.0",

View file

@ -45,6 +45,7 @@
"jquery": "3.6.0",
"jshint": "^2.13.4",
"json.sortify": "~2.1.0",
"jszip": "3.7.1",
"html2canvas": "^1.4.0",
"less": "3.7.1",
"lesshint": "6.3.7",

View file

@ -34,6 +34,7 @@ Fse.mkdirpSync(componentsPath);
"croppie",
"sortablejs",
"saferphore",
"jszip",
].forEach(l => {
const source = Path.join("node_modules", l);
const destination = Path.join(componentsPath, l);

View file

@ -10,7 +10,7 @@ define([
'/customize/messages.js',
'/components/nthen/index.js',
'/components/saferphore/index.js',
'/bower_components/jszip/dist/jszip.min.js',
'/components/jszip/dist/jszip.min.js',
], function ($, FileCrypto, Hash, Util, UI, h, Feedback,
Cache, Messages, nThen, Saferphore, JsZip) {
var saveAs = window.saveAs;

View file

@ -2623,7 +2623,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
name: 'dlmedias',
icon: 'fa-download',
}, function () {
require(['/bower_components/jszip/dist/jszip.min.js'], function (JsZip) {
require(['/components/jszip/dist/jszip.min.js'], function (JsZip) {
var zip = new JsZip();
Object.keys(mediasData || {}).forEach(function (url) {
var obj = mediasData[url];