From bde60c4368182699ff0d841fb8640e91dfbb3329 Mon Sep 17 00:00:00 2001 From: Christopher Johnson Date: Tue, 9 Jul 2019 12:54:12 +0200 Subject: [PATCH 1/3] removes react-iframe-comm dependency / replaces with local updated implementation --- .../mirador/window_actions.test.js | 2 +- package.json | 1 - src/components/AccessTokenSender.js | 2 +- src/components/WindowAuthenticationControl.js | 2 +- src/lib/IFrameComm.js | 200 ++++++++++++++++++ src/lib/index.js | 1 + 6 files changed, 204 insertions(+), 4 deletions(-) create mode 100644 src/lib/IFrameComm.js create mode 100644 src/lib/index.js diff --git a/__tests__/integration/mirador/window_actions.test.js b/__tests__/integration/mirador/window_actions.test.js index 0f62f257a2..58df7a6e33 100644 --- a/__tests__/integration/mirador/window_actions.test.js +++ b/__tests__/integration/mirador/window_actions.test.js @@ -19,5 +19,5 @@ describe('Window actions', () => { )); // only default configed windows found await page.waitFor(1000); await expect(numWindows).toBe(2); - }); + }, 10000); }); diff --git a/package.json b/package.json index 2784a76738..1c3307cf27 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "react-copy-to-clipboard": "^5.0.1", "react-full-screen": "^0.2.4", "react-i18next": "^10.11.2", - "react-iframe-comm": "^1.2.2", "react-image": "^2.1.3", "react-mosaic-component": "^3.2.0", "react-placeholder": "^3.0.1", diff --git a/src/components/AccessTokenSender.js b/src/components/AccessTokenSender.js index dae3bccdb3..06f510d0ea 100644 --- a/src/components/AccessTokenSender.js +++ b/src/components/AccessTokenSender.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import IframeComm from 'react-iframe-comm'; +import { IframeComm } from '../lib/IFrameComm'; /** * Opens a new window for click diff --git a/src/components/WindowAuthenticationControl.js b/src/components/WindowAuthenticationControl.js index 87f70ab727..92786bbdc0 100644 --- a/src/components/WindowAuthenticationControl.js +++ b/src/components/WindowAuthenticationControl.js @@ -91,7 +91,7 @@ export class WindowAuthenticationControl extends Component {