@edx/frontend-platform 8.3.5 → 8.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edx/frontend-platform",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.7",
|
|
4
4
|
"description": "Foundational application framework for Open edX micro-frontend applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@formatjs/intl-pluralrules": "4.3.3",
|
|
59
59
|
"@formatjs/intl-relativetimeformat": "10.0.1",
|
|
60
60
|
"axios": "1.9.0",
|
|
61
|
-
"axios-cache-interceptor": "1.
|
|
61
|
+
"axios-cache-interceptor": "1.8.0",
|
|
62
62
|
"form-urlencoded": "4.1.4",
|
|
63
63
|
"glob": "7.2.3",
|
|
64
64
|
"history": "4.10.1",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getConfig } from '../../../config';
|
|
2
1
|
import { basename } from '../../../initialize';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -18,7 +17,7 @@ export var removeExistingLinks = function removeExistingLinks(existingLinks) {
|
|
|
18
17
|
*/
|
|
19
18
|
export var fallbackThemeUrl = function fallbackThemeUrl(url) {
|
|
20
19
|
var _window$location;
|
|
21
|
-
var baseUrl =
|
|
20
|
+
var baseUrl = (_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.origin;
|
|
22
21
|
|
|
23
22
|
// validates if the baseurl has the protocol to be interpreted correctly by the browser,
|
|
24
23
|
// if is not present add '//' to use Protocol-relative URL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["
|
|
1
|
+
{"version":3,"file":"utils.js","names":["basename","removeExistingLinks","existingLinks","forEach","link","remove","fallbackThemeUrl","url","_window$location","baseUrl","window","location","origin","protocol","test","concat","isEmptyObject","obj","Object","keys","length"],"sources":["../../../../src/react/hooks/paragon/utils.js"],"sourcesContent":["import { basename } from '../../../initialize';\n\n/**\n * Iterates through each given `<link>` element and removes it from the DOM.\n * @param {HTMLLinkElement[]} existingLinks\n */\nexport const removeExistingLinks = (existingLinks) => {\n existingLinks.forEach((link) => {\n link.remove();\n });\n};\n\n/**\n* Creates the fallback URL for the given theme file.\n* @param {string} url The theme file path.\n* @returns {string} The default theme url.\n*/\nexport const fallbackThemeUrl = (url) => {\n const baseUrl = window.location?.origin;\n\n // validates if the baseurl has the protocol to be interpreted correctly by the browser,\n // if is not present add '//' to use Protocol-relative URL\n const protocol = /^(https?:)?\\/\\//.test(baseUrl) ? '' : '//';\n\n return `${protocol}${baseUrl}${basename}${url}`;\n};\n\nexport const isEmptyObject = (obj) => !obj || Object.keys(obj).length === 0;\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,qBAAqB;;AAE9C;AACA;AACA;AACA;AACA,OAAO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,aAAa,EAAK;EACpDA,aAAa,CAACC,OAAO,CAAC,UAACC,IAAI,EAAK;IAC9BA,IAAI,CAACC,MAAM,CAAC,CAAC;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,GAAG,EAAK;EAAA,IAAAC,gBAAA;EACvC,IAAMC,OAAO,IAAAD,gBAAA,GAAGE,MAAM,CAACC,QAAQ,cAAAH,gBAAA,uBAAfA,gBAAA,CAAiBI,MAAM;;EAEvC;EACA;EACA,IAAMC,QAAQ,GAAG,iBAAiB,CAACC,IAAI,CAACL,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI;EAE5D,UAAAM,MAAA,CAAUF,QAAQ,EAAAE,MAAA,CAAGN,OAAO,EAAAM,MAAA,CAAGf,QAAQ,EAAAe,MAAA,CAAGR,GAAG;AAC/C,CAAC;AAED,OAAO,IAAMS,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,GAAG;EAAA,OAAK,CAACA,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,KAAK,CAAC;AAAA","ignoreList":[]}
|