@edx/frontend-platform 5.5.3 → 5.5.4

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": "5.5.3",
3
+ "version": "5.5.4",
4
4
  "description": "Foundational application framework for Open edX micro-frontend applications.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/utils.js CHANGED
@@ -149,10 +149,12 @@ export function convertKeyNames(object, nameMap) {
149
149
  * @returns {Object}
150
150
  */
151
151
  export function parseURL(url) {
152
- var _document;
153
- var parser = (_document = document) === null || _document === void 0 ? void 0 : _document.createElement('a');
154
- parser.href = url;
155
- return parser;
152
+ if (typeof document !== 'undefined') {
153
+ var parser = document.createElement('a');
154
+ parser.href = url;
155
+ return parser;
156
+ }
157
+ return {};
156
158
  }
157
159
 
158
160
  /**
@@ -163,7 +165,8 @@ export function parseURL(url) {
163
165
  * @returns {string}
164
166
  */
165
167
  export function getPath(url) {
166
- return parseURL(url).pathname;
168
+ var _parseURL;
169
+ return typeof document !== 'undefined' ? (_parseURL = parseURL(url)) === null || _parseURL === void 0 ? void 0 : _parseURL.pathname : '';
167
170
  }
168
171
 
169
172
  /**
package/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["camelCase","snakeCase","modifyObjectKeys","object","modify","undefined","_typeof","Array","isArray","map","value","result","Object","entries","forEach","_ref","_ref2","_slicedToArray","key","camelCaseObject","snakeCaseObject","convertKeyNames","nameMap","transformer","parseURL","url","_document","parser","document","createElement","href","getPath","pathname","getQueryParameters","search","arguments","length","global","location","keyValueFragments","slice","indexOf","split","filter","hash","reduce","params","keyValueFragment","assign","_defineProperty","decodeURIComponent","ensureDefinedConfig","requester","keys","console","warn","concat"],"sources":["../src/utils.js"],"sourcesContent":["/**\n * #### Import members from **@edx/frontend-platform**\n *\n * @module Utilities\n */\nimport camelCase from 'lodash.camelcase';\nimport snakeCase from 'lodash.snakecase';\n\n/**\n * This is the underlying function used by camelCaseObject, snakeCaseObject, and convertKeyNames\n * above.\n *\n * Given an object (or array) and a modification function, will perform the function on each key it\n * encounters on the object and its tree of children.\n *\n * The modification function must take a string as an argument and returns a string.\n *\n * Example:\n *\n * ```\n * (key) => {\n * if (key === 'edX') {\n * return 'Open edX';\n * }\n * return key;\n * }\n * ```\n *\n * This function will turn any key that matches 'edX' into 'Open edX'. All other keys will be\n * passed through unmodified.\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Object} object\n * @param {function} modify\n * @returns {Object}\n */\nexport function modifyObjectKeys(object, modify) {\n // If the passed in object is not an Object, return it.\n if (\n object === undefined\n || object === null\n || (typeof object !== 'object' && !Array.isArray(object))\n ) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map(value => modifyObjectKeys(value, modify));\n }\n\n // Otherwise, process all its keys.\n const result = {};\n Object.entries(object).forEach(([key, value]) => {\n result[modify(key)] = modifyObjectKeys(value, modify);\n });\n return result;\n}\n\n/**\n * Performs a deep conversion to camelCase on all keys in the provided object and its tree of\n * children. Uses [lodash.camelcase](https://lodash.com/docs/4.17.15#camelCase) on each key. This\n * is commonly used to convert snake_case keys in models from a backend server into camelCase keys\n * for use in the JavaScript client.\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Array|Object} object\n * @returns {Array|Object}\n */\nexport function camelCaseObject(object) {\n return modifyObjectKeys(object, camelCase);\n}\n\n/**\n * Performs a deep conversion to snake_case on all keys in the provided object and its tree of\n * children. Uses [lodash.snakecase](https://lodash.com/docs/4.17.15#snakeCase) on each key. This\n * is commonly used to convert camelCase keys from the JavaScript app into snake_case keys expected\n * by backend servers.\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Array|Object} object\n * @returns {Array|Object}\n */\nexport function snakeCaseObject(object) {\n return modifyObjectKeys(object, snakeCase);\n}\n\n/**\n * Given a map of key-value pairs, performs a deep conversion key names in the specified object\n * _from_ the key _to_ the value. This is useful for updating names in an API request to the names\n * used throughout a client application if they happen to differ. It can also be used in the\n * reverse - formatting names from the client application to names expected by an API.\n *\n * ```\n * import { convertKeyNames } from '@edx/frontend-base';\n *\n * // This object can be of any shape or depth with subobjects/arrays.\n * const myObject = {\n * myKey: 'my value',\n * }\n *\n * const result = convertKeyNames(myObject, { myKey: 'their_key' });\n *\n * console.log(result) // { their_key: 'my value' }\n * ```\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Array|Object} object\n * @param {Object} nameMap\n * @returns {Array|Object}\n */\nexport function convertKeyNames(object, nameMap) {\n const transformer = key => (nameMap[key] === undefined ? key : nameMap[key]);\n\n return modifyObjectKeys(object, transformer);\n}\n\n/**\n * Given a string URL return an element that has been parsed via href.\n * This element has the possibility to return different part of the URL.\n parser.protocol; // => \"http:\"\n parser.hostname; // => \"example.com\"\n parser.port; // => \"3000\"\n parser.pathname; // => \"/pathname/\"\n parser.search; // => \"?search=test\"\n parser.hash; // => \"#hash\"\n parser.host; // => \"example.com:3000\"\n * https://gist.github.com/jlong/2428561\n *\n * @param {string}\n * @returns {Object}\n */\nexport function parseURL(url) {\n const parser = document?.createElement('a');\n parser.href = url;\n return parser;\n}\n\n/**\n * Given a string URL return the path of the URL\n *\n *\n * @param {string}\n * @returns {string}\n */\nexport function getPath(url) {\n return parseURL(url).pathname;\n}\n\n/**\n * *Deprecated*: A method which converts the supplied query string into an object of\n * key-value pairs and returns it. Defaults to the current query string - should perform like\n * [window.searchParams](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams)\n *\n * @deprecated\n * @param {string} [search=global.location.search]\n * @returns {Object}\n */\nexport function getQueryParameters(search = global.location.search) {\n const keyValueFragments = search\n .slice(search.indexOf('?') + 1)\n .split('&')\n .filter(hash => hash !== '');\n\n return keyValueFragments.reduce((params, keyValueFragment) => {\n const split = keyValueFragment.indexOf('=');\n const key = keyValueFragment.slice(0, split);\n const value = keyValueFragment.slice(split + 1);\n return Object.assign(params, { [key]: decodeURIComponent(value) });\n }, {});\n}\n\n/**\n * This function helps catch a certain class of misconfiguration in which configuration variables\n * are not properly defined and/or supplied to a consumer that requires them. Any key that exists\n * is still set to \"undefined\" indicates a misconfiguration further up in the application, and\n * should be flagged as an error, and is logged to 'warn'.\n *\n * Keys that are intended to be falsy should be defined using null, 0, false, etc.\n *\n * @param {Object} object\n * @param {string} requester A human-readable identifier for the code which called this function.\n * Used when throwing errors to aid in debugging.\n */\nexport function ensureDefinedConfig(object, requester) {\n Object.keys(object).forEach((key) => {\n if (object[key] === undefined) {\n // eslint-disable-next-line no-console\n console.warn(`Module configuration error: ${key} is required by ${requester}.`);\n }\n });\n}\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,kBAAkB;AACxC,OAAOC,SAAS,MAAM,kBAAkB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,MAAM,EAAEC,MAAM,EAAE;EAC/C;EACA,IACED,MAAM,KAAKE,SAAS,IACjBF,MAAM,KAAK,IAAI,IACdG,OAAA,CAAOH,MAAM,MAAK,QAAQ,IAAI,CAACI,KAAK,CAACC,OAAO,CAACL,MAAM,CAAE,EACzD;IACA,OAAOA,MAAM;EACf;EAEA,IAAII,KAAK,CAACC,OAAO,CAACL,MAAM,CAAC,EAAE;IACzB,OAAOA,MAAM,CAACM,GAAG,CAAC,UAAAC,KAAK;MAAA,OAAIR,gBAAgB,CAACQ,KAAK,EAAEN,MAAM,CAAC;IAAA,EAAC;EAC7D;;EAEA;EACA,IAAMO,MAAM,GAAG,CAAC,CAAC;EACjBC,MAAM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SAASyC,mBAAmBA,CAAChD,MAAM,EAAEiD,SAAS,EAAE;EACrDxC,MAAM,CAACyC,IAAI,CAAClD,MAAM,CAAC,CAACW,OAAO,CAAC,UAACI,GAAG,EAAK;IACnC,IAAIf,MAAM,CAACe,GAAG,CAAC,KAAKb,SAAS,EAAE;MAC7B;MACAiD,OAAO,CAACC,IAAI,gCAAAC,MAAA,CAAgCtC,GAAG,sBAAAsC,MAAA,CAAmBJ,SAAS,MAAG,CAAC;IACjF;EACF,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"utils.js","names":["camelCase","snakeCase","modifyObjectKeys","object","modify","undefined","_typeof","Array","isArray","map","value","result","Object","entries","forEach","_ref","_ref2","_slicedToArray","key","camelCaseObject","snakeCaseObject","convertKeyNames","nameMap","transformer","parseURL","url","document","parser","createElement","href","getPath","_parseURL","pathname","getQueryParameters","search","arguments","length","global","location","keyValueFragments","slice","indexOf","split","filter","hash","reduce","params","keyValueFragment","assign","_defineProperty","decodeURIComponent","ensureDefinedConfig","requester","keys","console","warn","concat"],"sources":["../src/utils.js"],"sourcesContent":["/**\n * #### Import members from **@edx/frontend-platform**\n *\n * @module Utilities\n */\nimport camelCase from 'lodash.camelcase';\nimport snakeCase from 'lodash.snakecase';\n\n/**\n * This is the underlying function used by camelCaseObject, snakeCaseObject, and convertKeyNames\n * above.\n *\n * Given an object (or array) and a modification function, will perform the function on each key it\n * encounters on the object and its tree of children.\n *\n * The modification function must take a string as an argument and returns a string.\n *\n * Example:\n *\n * ```\n * (key) => {\n * if (key === 'edX') {\n * return 'Open edX';\n * }\n * return key;\n * }\n * ```\n *\n * This function will turn any key that matches 'edX' into 'Open edX'. All other keys will be\n * passed through unmodified.\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Object} object\n * @param {function} modify\n * @returns {Object}\n */\nexport function modifyObjectKeys(object, modify) {\n // If the passed in object is not an Object, return it.\n if (\n object === undefined\n || object === null\n || (typeof object !== 'object' && !Array.isArray(object))\n ) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map(value => modifyObjectKeys(value, modify));\n }\n\n // Otherwise, process all its keys.\n const result = {};\n Object.entries(object).forEach(([key, value]) => {\n result[modify(key)] = modifyObjectKeys(value, modify);\n });\n return result;\n}\n\n/**\n * Performs a deep conversion to camelCase on all keys in the provided object and its tree of\n * children. Uses [lodash.camelcase](https://lodash.com/docs/4.17.15#camelCase) on each key. This\n * is commonly used to convert snake_case keys in models from a backend server into camelCase keys\n * for use in the JavaScript client.\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Array|Object} object\n * @returns {Array|Object}\n */\nexport function camelCaseObject(object) {\n return modifyObjectKeys(object, camelCase);\n}\n\n/**\n * Performs a deep conversion to snake_case on all keys in the provided object and its tree of\n * children. Uses [lodash.snakecase](https://lodash.com/docs/4.17.15#snakeCase) on each key. This\n * is commonly used to convert camelCase keys from the JavaScript app into snake_case keys expected\n * by backend servers.\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Array|Object} object\n * @returns {Array|Object}\n */\nexport function snakeCaseObject(object) {\n return modifyObjectKeys(object, snakeCase);\n}\n\n/**\n * Given a map of key-value pairs, performs a deep conversion key names in the specified object\n * _from_ the key _to_ the value. This is useful for updating names in an API request to the names\n * used throughout a client application if they happen to differ. It can also be used in the\n * reverse - formatting names from the client application to names expected by an API.\n *\n * ```\n * import { convertKeyNames } from '@edx/frontend-base';\n *\n * // This object can be of any shape or depth with subobjects/arrays.\n * const myObject = {\n * myKey: 'my value',\n * }\n *\n * const result = convertKeyNames(myObject, { myKey: 'their_key' });\n *\n * console.log(result) // { their_key: 'my value' }\n * ```\n *\n * Can accept arrays as well as objects, and will perform its conversion on any objects it finds in\n * the array.\n *\n * @param {Array|Object} object\n * @param {Object} nameMap\n * @returns {Array|Object}\n */\nexport function convertKeyNames(object, nameMap) {\n const transformer = key => (nameMap[key] === undefined ? key : nameMap[key]);\n\n return modifyObjectKeys(object, transformer);\n}\n\n/**\n * Given a string URL return an element that has been parsed via href.\n * This element has the possibility to return different part of the URL.\n parser.protocol; // => \"http:\"\n parser.hostname; // => \"example.com\"\n parser.port; // => \"3000\"\n parser.pathname; // => \"/pathname/\"\n parser.search; // => \"?search=test\"\n parser.hash; // => \"#hash\"\n parser.host; // => \"example.com:3000\"\n * https://gist.github.com/jlong/2428561\n *\n * @param {string}\n * @returns {Object}\n */\nexport function parseURL(url) {\n if (typeof document !== 'undefined') {\n const parser = document.createElement('a');\n parser.href = url;\n return parser;\n }\n\n return {};\n}\n\n/**\n * Given a string URL return the path of the URL\n *\n *\n * @param {string}\n * @returns {string}\n */\nexport function getPath(url) {\n return typeof document !== 'undefined' ? parseURL(url)?.pathname : '';\n}\n\n/**\n * *Deprecated*: A method which converts the supplied query string into an object of\n * key-value pairs and returns it. Defaults to the current query string - should perform like\n * [window.searchParams](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams)\n *\n * @deprecated\n * @param {string} [search=global.location.search]\n * @returns {Object}\n */\nexport function getQueryParameters(search = global.location.search) {\n const keyValueFragments = search\n .slice(search.indexOf('?') + 1)\n .split('&')\n .filter(hash => hash !== '');\n\n return keyValueFragments.reduce((params, keyValueFragment) => {\n const split = keyValueFragment.indexOf('=');\n const key = keyValueFragment.slice(0, split);\n const value = keyValueFragment.slice(split + 1);\n return Object.assign(params, { [key]: decodeURIComponent(value) });\n }, {});\n}\n\n/**\n * This function helps catch a certain class of misconfiguration in which configuration variables\n * are not properly defined and/or supplied to a consumer that requires them. Any key that exists\n * is still set to \"undefined\" indicates a misconfiguration further up in the application, and\n * should be flagged as an error, and is logged to 'warn'.\n *\n * Keys that are intended to be falsy should be defined using null, 0, false, etc.\n *\n * @param {Object} object\n * @param {string} requester A human-readable identifier for the code which called this function.\n * Used when throwing errors to aid in debugging.\n */\nexport function ensureDefinedConfig(object, requester) {\n Object.keys(object).forEach((key) => {\n if (object[key] === undefined) {\n // eslint-disable-next-line no-console\n console.warn(`Module configuration error: ${key} is required by ${requester}.`);\n }\n });\n}\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,kBAAkB;AACxC,OAAOC,SAAS,MAAM,kBAAkB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,MAAM,EAAEC,MAAM,EAAE;EAC/C;EACA,IACED,MAAM,KAAKE,SAAS,IACjBF,MAAM,KAAK,IAAI,IACdG,OAAA,CAAOH,MAAM,MAAK,QAAQ,IAAI,CAACI,KAAK,CAACC,OAAO,CAACL,MAAM,CAAE,EACzD;IACA,OAAOA,MAAM;EACf;EAEA,IAAII,KAAK,CAACC,OAAO,CAACL,MAAM,CAAC,EAAE;IACzB,OAAOA,MAAM,CAACM,GAAG,CAAC,UAAAC,KAAK;MAAA,OAAIR,gBAAgB,CAACQ,KAAK,EAAEN,MAAM,CAAC;IAAA,EAAC;EAC7D;;EAEA;EACA,IAAMO,MAAM,GAAG,CAAC,CAAC;EACjBC,MAAM,CAACC,OAAO,CAACV,MAAM,CAAC,CAACW,OAAO,CAAC,UAAAC,IAAA,EAAkB;IAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAF,IAAA;MAAhBG,GAAG,GAAAF,KAAA;MAAEN,KAAK,GAAAM,KAAA;IACzCL,MAAM,CAACP,MAAM,CAACc,GAAG,CAAC,CAAC,GAAGhB,gBAAgB,CAACQ,KAAK,EAAEN,MAAM,CAAC;EACvD,CAAC,CAAC;EACF,OAAOO,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,eAAeA,CAAChB,MAAM,EAAE;EACtC,OAAOD,gBAAgB,CAACC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