diff --git a/src/OrchardCore.Modules/OrchardCore.Resources/ResourceManagementOptionsConfiguration.cs b/src/OrchardCore.Modules/OrchardCore.Resources/ResourceManagementOptionsConfiguration.cs index 24ec5628c32..8cdffee53e8 100644 --- a/src/OrchardCore.Modules/OrchardCore.Resources/ResourceManagementOptionsConfiguration.cs +++ b/src/OrchardCore.Modules/OrchardCore.Resources/ResourceManagementOptionsConfiguration.cs @@ -483,9 +483,9 @@ ResourceManifest BuildManifest() manifest .DefineScript("js-cookie") .SetUrl("~/OrchardCore.Resources/Scripts/js.cookie.min.js", "~/OrchardCore.Resources/Scripts/js.cookie.js") - .SetCdn("https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js", "https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.js") - .SetCdnIntegrity("sha384-ETDm/j6COkRSUfVFsGNM5WYE4WjyRgfDhy4Pf4Fsc8eNw/eYEMqYZWuxTzMX6FBa", "sha384-wAGdUDEOVO9JhMpvNh7mkYd0rL2EM0bLb1+VY5R+jDfVBxYFJNfzkinHfbRfxT2s") - .SetVersion("3.0.1"); + .SetCdn("https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js", "https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.js") + .SetCdnIntegrity("sha384-/vxhYfM1LENRhdpZ8dwEsQn/X4VhpbEZSiU4m/FwR+PVpzar4fkEOw8FP9Y+OfQN", "sha384-b1TD0tFP+Ao4jmFaQw9RQxezUooFrLdlqfDfoh1SKv5L3jG7dD44QiwD+UzckH8W") + .SetVersion("3.0.5"); manifest .DefineScript("monaco-loader") diff --git a/src/OrchardCore.Modules/OrchardCore.Resources/package-lock.json b/src/OrchardCore.Modules/OrchardCore.Resources/package-lock.json index a7fdc0b5a23..e7084d5682e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Resources/package-lock.json +++ b/src/OrchardCore.Modules/OrchardCore.Resources/package-lock.json @@ -16,7 +16,7 @@ "jquery": "3.7.1", "jquery-resizable-dom": "0.35.0", "jquery.easing": "1.4.1", - "js-cookie": "3.0.1", + "js-cookie": "3.0.5", "monaco-editor": "^0.35.0", "nouislider": "15.7.0", "sortablejs": "^1.14.0", @@ -347,11 +347,11 @@ "integrity": "sha1-R5gsWDa9dY/UhJSSPEoQHvbpPjs=" }, "node_modules/js-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", - "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/json-stable-stringify": { @@ -893,9 +893,9 @@ "integrity": "sha1-R5gsWDa9dY/UhJSSPEoQHvbpPjs=" }, "js-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", - "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==" + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==" }, "json-stable-stringify": { "version": "1.0.1", diff --git a/src/OrchardCore.Modules/OrchardCore.Resources/package.json b/src/OrchardCore.Modules/OrchardCore.Resources/package.json index 854bf6a1b30..e2067e52379 100644 --- a/src/OrchardCore.Modules/OrchardCore.Resources/package.json +++ b/src/OrchardCore.Modules/OrchardCore.Resources/package.json @@ -11,7 +11,7 @@ "jquery": "3.7.1", "jquery-resizable-dom": "0.35.0", "jquery.easing": "1.4.1", - "js-cookie": "3.0.1", + "js-cookie": "3.0.5", "monaco-editor": "^0.35.0", "sortablejs": "^1.14.0", "trumbowyg": "2.27.3", diff --git a/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.js b/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.js index 4d8bb3753e9..36fe97b60eb 100644 --- a/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.js +++ b/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.js @@ -4,10 +4,10 @@ */ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -/*! js-cookie v3.0.1 | MIT */ +/*! js-cookie v3.0.5 | MIT */ ; (function (global, factory) { - (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, function () { + (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, function () { var current = global.Cookies; var exports = global.Cookies = factory(); exports.noConflict = function () { @@ -47,7 +47,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == /* eslint-disable no-var */ function init(converter, defaultAttributes) { - function set(key, value, attributes) { + function set(name, value, attributes) { if (typeof document === 'undefined') { return; } @@ -58,7 +58,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == if (attributes.expires) { attributes.expires = attributes.expires.toUTCString(); } - key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape); + name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape); var stringifiedAttributes = ''; for (var attributeName in attributes) { if (!attributes[attributeName]) { @@ -78,10 +78,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == // ... stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; } - return document.cookie = key + '=' + converter.write(value, key) + stringifiedAttributes; + return document.cookie = name + '=' + converter.write(value, name) + stringifiedAttributes; } - function get(key) { - if (typeof document === 'undefined' || arguments.length && !key) { + function get(name) { + if (typeof document === 'undefined' || arguments.length && !name) { return; } @@ -93,20 +93,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == var parts = cookies[i].split('='); var value = parts.slice(1).join('='); try { - var foundKey = decodeURIComponent(parts[0]); - jar[foundKey] = converter.read(value, foundKey); - if (key === foundKey) { + var found = decodeURIComponent(parts[0]); + jar[found] = converter.read(value, found); + if (name === found) { break; } } catch (e) {} } - return key ? jar[key] : jar; + return name ? jar[name] : jar; } return Object.create({ set: set, get: get, - remove: function remove(key, attributes) { - set(key, '', assign({}, attributes, { + remove: function remove(name, attributes) { + set(name, '', assign({}, attributes, { expires: -1 })); }, diff --git a/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.min.js b/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.min.js index b5e07710c75..c5dcda76725 100644 --- a/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.min.js +++ b/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Scripts/js.cookie.min.js @@ -1,2 +1,2 @@ function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e) -/*! js-cookie v3.0.1 | MIT */}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var o=e.Cookies,n=e.Cookies=t();n.noConflict=function(){return e.Cookies=o,n}}())}(this,(function(){"use strict";function e(e){for(var t=1;t