@concord-consortium/lara-interactive-api 1.9.3 → 1.9.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.
Files changed (2) hide show
  1. package/index.js +24 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5676,6 +5676,19 @@ __exportStar(__webpack_require__(/*! ./in-frame */ "./src/interactive-api-client
5676
5676
  __exportStar(__webpack_require__(/*! ./api */ "./src/interactive-api-client/api.ts"), exports);
5677
5677
  __exportStar(__webpack_require__(/*! ./hooks */ "./src/interactive-api-client/hooks.ts"), exports);
5678
5678
  __exportStar(__webpack_require__(/*! ./client */ "./src/interactive-api-client/client.ts"), exports);
5679
+ var packageJson = __webpack_require__(/*! ./package.json */ "./src/interactive-api-client/package.json");
5680
+ var version = packageJson.version;
5681
+ var warningMsg = function (loadedVersion, newVersion) { return "\nLARA Interactive API is loaded multiple times. This will lead to unexpected behavior and might break multiple features\nof the API (especially interactive state saving). Please ensure that the library is loaded only once by the main app\nand that all its dependencies specify \"lara-interactive-api\" as \"peerDependency\" in their package.json files.\n\nAlready imported version: v" + loadedVersion + ", trying to load: v" + newVersion + ".\n"; };
5682
+ if (window.__LARA_INTERACTIVE_API__) {
5683
+ var msg = warningMsg(window.__LARA_INTERACTIVE_API__.version, version);
5684
+ window.alert(msg);
5685
+ throw new Error(msg);
5686
+ }
5687
+ else {
5688
+ window.__LARA_INTERACTIVE_API__ = {
5689
+ version: packageJson.version
5690
+ };
5691
+ }
5679
5692
 
5680
5693
 
5681
5694
  /***/ }),
@@ -5801,6 +5814,17 @@ exports.ManagedState = ManagedState;
5801
5814
  Object.defineProperty(exports, "__esModule", { value: true });
5802
5815
 
5803
5816
 
5817
+ /***/ }),
5818
+
5819
+ /***/ "./src/interactive-api-client/package.json":
5820
+ /*!*************************************************!*\
5821
+ !*** ./src/interactive-api-client/package.json ***!
5822
+ \*************************************************/
5823
+ /*! exports provided: name, version, description, main, types, repository, author, license, bugs, homepage, dependencies, peerDependencies, default */
5824
+ /***/ (function(module) {
5825
+
5826
+ module.exports = JSON.parse("{\"name\":\"@concord-consortium/lara-interactive-api\",\"version\":\"1.9.4\",\"description\":\"LARA Interactive API client and types\",\"main\":\"./index.js\",\"types\":\"./index-bundle.d.ts\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/concord-consortium/lara.git\"},\"author\":\"Concord Consortium\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/concord-consortium/lara/issues\"},\"homepage\":\"https://github.com/concord-consortium/lara/tree/master/lara-typescript/src/interactive-api-client#readme\",\"dependencies\":{\"iframe-phone\":\"^1.3.1\"},\"peerDependencies\":{\"react\":\">=16.9.0\",\"react-dom\":\">=16.9.0\"}}");
5827
+
5804
5828
  /***/ }),
5805
5829
 
5806
5830
  /***/ "./src/interactive-api-client/types.ts":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concord-consortium/lara-interactive-api",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "description": "LARA Interactive API client and types",
5
5
  "main": "./index.js",
6
6
  "types": "./index-bundle.d.ts",