diff --git a/bower.json b/bower.json index 57b1c6eb4..a2ef44618 100644 --- a/bower.json +++ b/bower.json @@ -18,7 +18,6 @@ "tests" ], "dependencies": { - "file-saver": "1.3.1", "alertifyjs": "1.0.11", "scrypt-async": "1.2.0", "require-css": "0.1.10", diff --git a/package-lock.json b/package-lock.json index 6f160b478..5e6afff8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "ckeditor": "^4.12.1", "codemirror": "^5.19.0", "components-font-awesome": "^4.6.3", + "file-saver": "1.3.1", "hyper-json": "~1.4.0", "jquery": "3.6.0", "jshint": "^2.13.4", @@ -1858,6 +1859,12 @@ "dev": true, "optional": true }, + "node_modules/file-saver": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.1.tgz", + "integrity": "sha512-RRTE4zhfibKpfVS233QDawwPhQIaEyxm6Zp6AcLoAy/qIx8MlEgNyQuGoTryZb+toizwSMeB/GhIzw/eWXTePw==", + "dev": true + }, "node_modules/fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -6519,6 +6526,12 @@ "dev": true, "optional": true }, + "file-saver": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.1.tgz", + "integrity": "sha512-RRTE4zhfibKpfVS233QDawwPhQIaEyxm6Zp6AcLoAy/qIx8MlEgNyQuGoTryZb+toizwSMeB/GhIzw/eWXTePw==", + "dev": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", diff --git a/package.json b/package.json index 9cf946f07..8c7738343 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "ckeditor": "^4.12.1", "codemirror": "^5.19.0", "components-font-awesome": "^4.6.3", + "file-saver": "1.3.1", "hyper-json": "~1.4.0", "jquery": "3.6.0", "jshint": "^2.13.4", diff --git a/scripts/copy-components.js b/scripts/copy-components.js index ab6e957e6..1620935c1 100644 --- a/scripts/copy-components.js +++ b/scripts/copy-components.js @@ -21,6 +21,7 @@ Fse.mkdirpSync(componentsPath); "chainpad-crypto", "chainpad-listmap", "chainpad-netflux", + "file-saver", ].forEach(l => { const source = Path.join("node_modules", l); const destination = Path.join(componentsPath, l); diff --git a/www/calendar/inner.js b/www/calendar/inner.js index 70c17f46a..e0081791c 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -25,7 +25,7 @@ define([ '/common/inner/properties.js', '/common/jscolor.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/lib/calendar/tui-calendar.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', diff --git a/www/common/inner/common-mediatag.js b/www/common/inner/common-mediatag.js index 1adee8791..0bbcaf5a0 100644 --- a/www/common/inner/common-mediatag.js +++ b/www/common/inner/common-mediatag.js @@ -10,7 +10,7 @@ define([ '/components/tweetnacl/nacl-fast.min.js', '/bower_components/croppie/croppie.min.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/croppie/croppie.css', ], function ($, Util, Hash, UI, h, MediaTag, Messages, AppConfig) { var MT = {}; diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 9e669de11..78f24ed76 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -22,7 +22,7 @@ define([ '/common/outer/worker-channel.js', '/common/outer/x2t.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'less!/components/components-font-awesome/css/font-awesome.min.css', diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 80dd7c9c5..0526cbff9 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -18,7 +18,7 @@ define([ '/components/chainpad/chainpad.dist.js', '/common/test.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', ], function ( diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index b4e64db01..811cbf414 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -14,7 +14,7 @@ define([ '/bower_components/nthen/index.js', '/common/media-tag.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', '/components/tweetnacl/nacl-fast.min.js', ], function ($, ApiConfig, FileCrypto, MakeBackup, Thumb, UI, UIElements, Util, Hash, h, Messages, Pages, nThen, MT) { var Nacl = window.nacl; diff --git a/www/convert/inner.js b/www/convert/inner.js index a75357ea1..011e3dcef 100644 --- a/www/convert/inner.js +++ b/www/convert/inner.js @@ -11,7 +11,7 @@ define([ '/common/common-util.js', '/common/outer/worker-channel.js', '/common/outer/x2t.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', 'less!/convert/app-convert.less', diff --git a/www/file/inner.js b/www/file/inner.js index b24e6a07a..d120e9c25 100644 --- a/www/file/inner.js +++ b/www/file/inner.js @@ -9,7 +9,7 @@ define([ '/common/media-tag.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', diff --git a/www/form/inner.js b/www/form/inner.js index 6ebc6b294..a76f836e9 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -36,7 +36,7 @@ define([ 'cm/mode/gfm/gfm', 'css!cm/lib/codemirror.css', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/components/codemirror/lib/codemirror.css', 'css!/components/codemirror/addon/dialog/dialog.css', diff --git a/www/pad/inner.js b/www/pad/inner.js index 1f29f9299..8db04c797 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -46,7 +46,7 @@ define([ //'/common/test.js', '/lib/diff-dom/diffDOM.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/customize/src/print.css', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', diff --git a/www/poll/inner.js b/www/poll/inner.js index 0da67b9d8..d694a955c 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -25,7 +25,7 @@ define([ 'cm/mode/markdown/markdown', 'css!cm/lib/codemirror.css', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', diff --git a/www/settings/inner.js b/www/settings/inner.js index 3d7135766..00f505f46 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -17,7 +17,7 @@ define([ '/common/common-constants.js', '/common/jscolor.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', 'less!/settings/app-settings.less', diff --git a/www/teams/inner.js b/www/teams/inner.js index 10df7d6c6..ccd48dbd2 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -21,7 +21,7 @@ define([ '/common/make-backup.js', '/customize/messages.js', - '/bower_components/file-saver/FileSaver.min.js', + '/components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', 'less!/teams/app-team.less',