diff --git a/application/Espo/Modules/Crm/Resources/metadata/app/jsLibs.json b/application/Espo/Modules/Crm/Resources/metadata/app/jsLibs.json index 53764e9e5e..0131d8c88a 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/app/jsLibs.json +++ b/application/Espo/Modules/Crm/Resources/metadata/app/jsLibs.json @@ -1,9 +1,10 @@ { - "full-calendar": { + "fullcalendar": { "path": "client/modules/crm/lib/fullcalendar.js", "devPath": "client/modules/crm/lib/original/fullcalendar.js", "exportsTo": "$.fn", "exportsAs": "fullCalendar", + "amdId": "fullcalendar", "sourceMap": true }, "vis": { diff --git a/application/Espo/Resources/metadata/app/jsLibs.json b/application/Espo/Resources/metadata/app/jsLibs.json index a76f522c29..c6c35a6e3d 100644 --- a/application/Espo/Resources/metadata/app/jsLibs.json +++ b/application/Espo/Resources/metadata/app/jsLibs.json @@ -36,7 +36,7 @@ "exposeAs": "DOMPurify", "amdId": "dompurify" }, - "base64": { + "js-base64": { "exportsTo": "window", "exportsAs": "Base64", "amdId": "js-base64" @@ -58,16 +58,18 @@ "exportsTo": "window", "exportsAs": "EspoFunnel" }, - "Summernote": { + "summernote": { "path": "client/lib/summernote.js", "devPath": "client/lib/original/summernote.js", "exportsTo": "$.fn", "exportsAs": "summernote", + "amdId": "summernote", "sourceMap": true }, - "Textcomplete": { + "jquery-textcomplete": { "exportsTo": "$.fn", - "exportsAs": "textcomplete" + "exportsAs": "textcomplete", + "amdId": "jquery-textcomplete" }, "autocomplete": { "exportsTo": "$.fn", @@ -81,11 +83,12 @@ "exportsTo": "$.fn", "exportsAs": "datepicker" }, - "Selectize": { + "selectize": { "path": "client/lib/selectize.js", "devPath": "client/lib/original/selectize.js", "exportsTo": "window", - "exportsAs": "Selectize" + "exportsAs": "Selectize", + "amdId": "selectize" }, "autonumeric": { "amdId": "autonumeric" @@ -96,39 +99,42 @@ "sourceMap": true, "amdId": "cronstrue" }, - "Cropper": { + "cropper": { "path": "client/lib/cropper.js", "exportsTo": "$.fn", "exportsAs": "cropper", + "amdId": "cropper", "sourceMap": true }, "gridstack": { "exportsTo": "window", "exportsAs": "GridStack" }, - "Colorpicker": { + "bootstrap-colorpicker": { "path": "client/lib/bootstrap-colorpicker.js", "exportsTo": "$.fn", - "exportsAs": "colorpicker" + "exportsAs": "colorpicker", + "amdId": "bootstrap-colorpicker" }, - "exif": { + "exif-js": { "path": "client/lib/exif.js", "devPath": "client/lib/original/exif.js", "amdId": "exif-js", "sourceMap": true }, - "JsBarcode": { + "jsbarcode": { "path": "client/lib/JsBarcode.all.js", "devPath": "client/lib/original/JsBarcode.all.js", "exportsTo": "window", "exportsAs": "JsBarcode", + "amdId": "jsbarcode", "sourceMap": true }, - "qrcode": { + "qrcodejs": { "path": "client/lib/qrcode.js", "exportsTo": "window", "exportsAs": "QRCode", - "exportVariable": "QRCode" + "amdId": "qrcodejs" }, "ace": { "path": "client/lib/ace.js", diff --git a/client/modules/crm/src/views/calendar/calendar.js b/client/modules/crm/src/views/calendar/calendar.js index 4894867f1b..2028feb51f 100644 --- a/client/modules/crm/src/views/calendar/calendar.js +++ b/client/modules/crm/src/views/calendar/calendar.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], function (Dep, FullCalendar) { +define('crm:views/calendar/calendar', ['view', 'lib!fullcalendar'], function (Dep, FullCalendar) { return Dep.extend({ diff --git a/client/src/ui/multi-select.js b/client/src/ui/multi-select.js index d5284067c7..27642c9959 100644 --- a/client/src/ui/multi-select.js +++ b/client/src/ui/multi-select.js @@ -28,7 +28,7 @@ /** @module module:ui/multi-select */ -import Selectize from "lib!Selectize"; +import Selectize from 'lib!selectize'; /** * @typedef module:ui/multi-select~Options diff --git a/client/src/ui/select.js b/client/src/ui/select.js index 6d15dc0fcd..462aec18ef 100644 --- a/client/src/ui/select.js +++ b/client/src/ui/select.js @@ -28,7 +28,7 @@ /** @module module:ui/select */ -import Selectize from "lib!Selectize"; +import Selectize from 'lib!selectize'; /** * @typedef module:ui/select~Options diff --git a/client/src/views/fields/barcode.js b/client/src/views/fields/barcode.js index 9fc10bd664..9b9f9414eb 100644 --- a/client/src/views/fields/barcode.js +++ b/client/src/views/fields/barcode.js @@ -68,13 +68,13 @@ class BarcodeFieldView extends VarcharFieldView { this.isSvg = true; this.wait( - Espo.loader.requirePromise('lib!JsBarcode') + Espo.loader.requirePromise('lib!jsbarcode') .then(lib => JsBarcode = lib) ); } else { this.wait( - Espo.loader.requirePromise('lib!qrcode') + Espo.loader.requirePromise('lib!qrcodejs') .then(lib => QRCode = lib) ); } diff --git a/client/src/views/fields/wysiwyg.js b/client/src/views/fields/wysiwyg.js index c997d925e8..ecf361d4fc 100644 --- a/client/src/views/fields/wysiwyg.js +++ b/client/src/views/fields/wysiwyg.js @@ -69,7 +69,7 @@ class WysiwygFieldView extends TextFieldView { super.setup(); this.wait( - Espo.loader.requirePromise('lib!Summernote') + Espo.loader.requirePromise('lib!summernote') .then(() => { if (!$.summernote.options || 'espoImage' in $.summernote.options) { return; diff --git a/client/src/views/modals/image-crop.js b/client/src/views/modals/image-crop.js index 4b1ac7c23f..1bdc55c369 100644 --- a/client/src/views/modals/image-crop.js +++ b/client/src/views/modals/image-crop.js @@ -56,7 +56,7 @@ define('views/modals/image-crop', ['views/modal'], function (Dep) { }, ]; - this.wait(Espo.loader.requirePromise('lib!Cropper')); + this.wait(Espo.loader.requirePromise('lib!cropper')); this.on('remove', () => { if (this.$img.length) { diff --git a/client/src/views/modals/image-preview.js b/client/src/views/modals/image-preview.js index 1cbda249a4..23d17d89a2 100644 --- a/client/src/views/modals/image-preview.js +++ b/client/src/views/modals/image-preview.js @@ -83,7 +83,7 @@ define('views/modals/image-preview', ['views/modal'], function (Dep) { $(window).off('resize.image-review'); }); - this.wait(Espo.loader.requirePromise('lib!exif')); + this.wait(Espo.loader.requirePromise('lib!exif-js')); }, getImageUrl: function () { diff --git a/client/src/views/note/fields/post.js b/client/src/views/note/fields/post.js index 1e9434d505..8b0d7b218d 100644 --- a/client/src/views/note/fields/post.js +++ b/client/src/views/note/fields/post.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/note/fields/post', ['views/fields/text', 'lib!Textcomplete'], function (Dep, Textcomplete) { +define('views/note/fields/post', ['views/fields/text', 'lib!jquery-textcomplete'], function (Dep, Textcomplete) { return Dep.extend({ diff --git a/client/src/views/stream/panel.js b/client/src/views/stream/panel.js index a79e534b12..71ebcebc35 100644 --- a/client/src/views/stream/panel.js +++ b/client/src/views/stream/panel.js @@ -26,7 +26,8 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/stream/panel', ['views/record/panels/relationship', 'lib!Textcomplete'], function (Dep, Textcomplete) { +define('views/stream/panel', ['views/record/panels/relationship', 'lib!jquery-textcomplete'], +function (Dep, Textcomplete) { return Dep.extend({ diff --git a/client/src/views/user-security/modals/totp.js b/client/src/views/user-security/modals/totp.js index 19e308dd02..22f825dab6 100644 --- a/client/src/views/user-security/modals/totp.js +++ b/client/src/views/user-security/modals/totp.js @@ -115,7 +115,7 @@ define('views/user-security/modals/totp', ['views/modal', 'model'], function (De ], }); - Espo.loader.requirePromise('lib!qrcode').then(lib => { + Espo.loader.requirePromise('lib!qrcodejs').then(lib => { QRCode = lib; }) }, diff --git a/frontend/bundle-config.json b/frontend/bundle-config.json index 93209ff3ac..47e8059718 100644 --- a/frontend/bundle-config.json +++ b/frontend/bundle-config.json @@ -91,10 +91,10 @@ "modules/crm/src/**/*.js" ], "dependentOn": [ - "lib!full-calendar" + "lib!fullcalendar" ], "requires": [ - "lib!full-calendar" + "lib!fullcalendar" ], "lookupPatterns": [ "modules/crm/src/**/*.js" diff --git a/frontend/libs.json b/frontend/libs.json index 2cd6bc33f0..58dc8ee764 100644 --- a/frontend/libs.json +++ b/frontend/libs.json @@ -62,7 +62,7 @@ { "src": "node_modules/jquery-textcomplete/dist/jquery.textcomplete.js", "bundle": true, - "key": "Textcomplete" + "key": "jquery-textcomplete" }, { "src": "node_modules/bootstrap/dist/js/bootstrap.js", @@ -108,7 +108,7 @@ { "src": "node_modules/selectize/dist/js/standalone/selectize.js", "bundle": true, - "key": "Selectize", + "key": "selectize", "suppressAmd": true }, { @@ -118,7 +118,7 @@ }, { "src": "node_modules/summernote/dist/summernote.js", - "key": "Summernote", + "key": "summernote", "minify": true }, { @@ -133,11 +133,11 @@ }, { "src": "node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js", - "key": "Colorpicker" + "key": "bootstrap-colorpicker" }, { "src": "node_modules/cropper/dist/cropper.js", - "key": "Cropper", + "key": "cropper", "minify": true }, { @@ -148,16 +148,16 @@ { "src": "node_modules/exif-js/exif.js", "minify": true, - "key": "exif" + "key": "exif-js" }, { "src": "node_modules/jsbarcode/dist/JsBarcode.all.js", "minify": true, - "key": "JsBarcode" + "key": "jsbarcode" }, { "src": "node_modules/qrcodejs/qrcode.js", - "key": "qrcode" + "key": "qrcodejs" }, { "name": "ace-builds", @@ -185,7 +185,7 @@ "src": "node_modules/fullcalendar/dist/fullcalendar.js", "dest": "client/modules/crm/lib/fullcalendar.js", "minify": true, - "key": "full-calendar" + "key": "fullcalendar" }, { "src": "node_modules/vis/dist/vis.js", diff --git a/frontend/test/init.js b/frontend/test/init.js index 3062514fff..9a132ef2b6 100644 --- a/frontend/test/init.js +++ b/frontend/test/init.js @@ -68,7 +68,7 @@ scriptEl.textContent = JSON.stringify({ "exposeAs": "DOMPurify", "amdId": "dompurify" }, - "base64": { + "js-base64": { "exportsTo": "window", "exportsAs": "Base64", "amdId": "js-base64" @@ -81,10 +81,9 @@ scriptEl.textContent = JSON.stringify({ }, aliasMap: { "jquery": "lib!jquery", - "bullbone": "lib!bullbone", "underscore": "lib!underscore", "cronstrue": "lib!cronstrue", - "exif-js": "lib!exif", + "exif-js": "lib!exif-js", "moment": "lib!moment", "js-base64": "lib!base64", "bullbone": "lib!bullbone",