@pie-element/ebsr 10.5.4-next.0 → 10.5.4-next.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.
@@ -10,7 +10,7 @@
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-element/multiple-choice": "^9.15.3",
12
12
  "@pie-framework/pie-configure-events": "^1.2.0",
13
- "@pie-lib/pie-toolbox": "2.14.3",
13
+ "@pie-lib/pie-toolbox": "2.14.4",
14
14
  "lodash": "^4.17.15",
15
15
  "prop-types": "^15.6.2",
16
16
  "react": "^16.8.1",
@@ -7,7 +7,7 @@
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-lib/pie-toolbox": "2.14.3",
10
+ "@pie-lib/pie-toolbox": "2.14.4",
11
11
  "lodash": "^4.17.15"
12
12
  },
13
13
  "author": "",
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.8.3/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.8.4/module/index.js";
2
2
  import MultipleChoiceConfigure from '@pie-element/multiple-choice/configure/lib';
3
- import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@6.0.3/module/index.js";
3
+ import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@6.0.4/module/index.js";
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
5
  function getDefaultExportFromCjs(x) {
6
6
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.8.3/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@6.0.3/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.8.4/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@6.0.4/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -13151,6 +13151,7 @@ class MultipleChoice extends HTMLElement {
13151
13151
  this.audioComplete = false;
13152
13152
  this._boundHandleKeyDown = this.handleKeyDown.bind(this);
13153
13153
  this._keyboardEventsEnabled = false;
13154
+ this._audioInitialized = false;
13154
13155
  this._rerender = debounce(() => {
13155
13156
  if (this._model && this._session) {
13156
13157
  var element = React.createElement(Root, {
@@ -13197,6 +13198,7 @@ class MultipleChoice extends HTMLElement {
13197
13198
  set model(s) {
13198
13199
  this._model = s;
13199
13200
  this._rerender();
13201
+ this._audioInitialized = false;
13200
13202
  this._dispatchModelSet();
13201
13203
  }
13202
13204
  get session() {
@@ -13240,6 +13242,7 @@ class MultipleChoice extends HTMLElement {
13240
13242
  const observer = new MutationObserver((mutationsList, observer) => {
13241
13243
  mutationsList.forEach(mutation => {
13242
13244
  if (mutation.type === 'childList') {
13245
+ if (this._audioInitialized) return;
13243
13246
  const audio = this.querySelector('audio');
13244
13247
  const isInsidePrompt = audio && audio.closest('#preview-prompt');
13245
13248
  if (!this._model) return;
@@ -13287,6 +13290,7 @@ class MultipleChoice extends HTMLElement {
13287
13290
  this._handlePlaying = handlePlaying;
13288
13291
  this._handleEnded = handleEnded;
13289
13292
  this._enableAudio = enableAudio;
13293
+ this._audioInitialized = true;
13290
13294
  observer.disconnect();
13291
13295
  }
13292
13296
  });
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "3.8.3"
7
+ "version": "3.8.4"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "6.0.3"
11
+ "version": "6.0.4"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.8.3/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@6.0.3/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.8.4/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@6.0.4/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -13151,6 +13151,7 @@ class MultipleChoice extends HTMLElement {
13151
13151
  this.audioComplete = false;
13152
13152
  this._boundHandleKeyDown = this.handleKeyDown.bind(this);
13153
13153
  this._keyboardEventsEnabled = false;
13154
+ this._audioInitialized = false;
13154
13155
  this._rerender = debounce(() => {
13155
13156
  if (this._model && this._session) {
13156
13157
  var element = React.createElement(Root, {
@@ -13197,6 +13198,7 @@ class MultipleChoice extends HTMLElement {
13197
13198
  set model(s) {
13198
13199
  this._model = s;
13199
13200
  this._rerender();
13201
+ this._audioInitialized = false;
13200
13202
  this._dispatchModelSet();
13201
13203
  }
13202
13204
  get session() {
@@ -13240,6 +13242,7 @@ class MultipleChoice extends HTMLElement {
13240
13242
  const observer = new MutationObserver((mutationsList, observer) => {
13241
13243
  mutationsList.forEach(mutation => {
13242
13244
  if (mutation.type === 'childList') {
13245
+ if (this._audioInitialized) return;
13243
13246
  const audio = this.querySelector('audio');
13244
13247
  const isInsidePrompt = audio && audio.closest('#preview-prompt');
13245
13248
  if (!this._model) return;
@@ -13287,6 +13290,7 @@ class MultipleChoice extends HTMLElement {
13287
13290
  this._handlePlaying = handlePlaying;
13288
13291
  this._handleEnded = handleEnded;
13289
13292
  this._enableAudio = enableAudio;
13293
+ this._audioInitialized = true;
13290
13294
  observer.disconnect();
13291
13295
  }
13292
13296
  });
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@pie-element/ebsr",
3
- "version": "10.5.4-next.0+dc4431069",
3
+ "version": "10.5.4-next.4+8b13a17da",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-element/multiple-choice": "^9.15.4-next.0+dc4431069",
10
+ "@pie-element/multiple-choice": "^9.15.4-next.4+8b13a17da",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/pie-toolbox": "2.14.3",
12
+ "@pie-lib/pie-toolbox": "2.14.4",
13
13
  "classnames": "^2.2.5",
14
14
  "debug": "^4.1.1",
15
15
  "lodash": "^4.17.11"
16
16
  },
17
17
  "author": "pie framework developers",
18
18
  "license": "ISC",
19
- "gitHead": "dc4431069883e3447267ee1b5a8eaa848e8280d4",
19
+ "gitHead": "8b13a17da218966aa15a0b1db4d5873a44231db6",
20
20
  "scripts": {
21
21
  "postpublish": "../../scripts/postpublish"
22
22
  },