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" "tests"
], ],
"dependencies": { "dependencies": {
"jszip": "3.7.1",
"dragula.js": "3.7.2", "dragula.js": "3.7.2",
"MathJax": "3.0.5" "MathJax": "3.0.5"
}, },

13
package-lock.json generated
View file

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

View file

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

View file

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

View file

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

View file

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