@pie-element/ebsr 10.6.5 → 10.6.6-next.10

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.
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.5.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.5.2/module/index.js";
2
2
  import MultipleChoiceConfigure from '@pie-element/multiple-choice/configure/lib';
3
3
  import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@8.5.1/module/index.js";
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.5.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.5.2/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@8.5.1/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) {
@@ -13232,10 +13232,16 @@ function _optionalChain$1(ops) {
13232
13232
  return value;
13233
13233
  }
13234
13234
  const log$1 = debug$1('pie-ui:multiple-choice');
13235
- const isComplete = (session, model, audioComplete) => {
13235
+ const isComplete = (session, model, audioComplete, elementContext) => {
13236
13236
  const {autoplayAudioEnabled, completeAudioEnabled} = model || ({});
13237
13237
  if (autoplayAudioEnabled && completeAudioEnabled && !audioComplete) {
13238
- return false;
13238
+ if (elementContext) {
13239
+ const audio = elementContext.querySelector('audio');
13240
+ const isInsidePrompt = audio && audio.closest('#preview-prompt');
13241
+ if (audio && isInsidePrompt) {
13242
+ return false;
13243
+ }
13244
+ }
13239
13245
  }
13240
13246
  if (!session || !session.value) {
13241
13247
  return false;
@@ -13285,10 +13291,10 @@ class MultipleChoice extends HTMLElement {
13285
13291
  trailing: true
13286
13292
  });
13287
13293
  this._dispatchResponseChanged = debounce(() => {
13288
- this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete)));
13294
+ this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete, this)));
13289
13295
  });
13290
13296
  this._dispatchModelSet = debounce(() => {
13291
- this.dispatchEvent(new ModelSetEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model), this._model !== undefined));
13297
+ this.dispatchEvent(new ModelSetEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete, this), this._model !== undefined));
13292
13298
  }, 50, {
13293
13299
  leading: false,
13294
13300
  trailing: true
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/ebsr@10.6.4</title>
5
+ <title>@pie-element/ebsr@10.6.5</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@pie-element/ebsr",
3
- "version": "10.6.4",
3
+ "version": "10.6.5",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "5.5.1"
7
+ "version": "5.5.2"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/ebsr@10.6.4</title>
5
+ <title>@pie-element/ebsr@10.6.5</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.5.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.5.2/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@8.5.1/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) {
@@ -13232,10 +13232,16 @@ function _optionalChain(ops) {
13232
13232
  return value;
13233
13233
  }
13234
13234
  const log$1 = debug$1('pie-ui:multiple-choice');
13235
- const isComplete = (session, model, audioComplete) => {
13235
+ const isComplete = (session, model, audioComplete, elementContext) => {
13236
13236
  const {autoplayAudioEnabled, completeAudioEnabled} = model || ({});
13237
13237
  if (autoplayAudioEnabled && completeAudioEnabled && !audioComplete) {
13238
- return false;
13238
+ if (elementContext) {
13239
+ const audio = elementContext.querySelector('audio');
13240
+ const isInsidePrompt = audio && audio.closest('#preview-prompt');
13241
+ if (audio && isInsidePrompt) {
13242
+ return false;
13243
+ }
13244
+ }
13239
13245
  }
13240
13246
  if (!session || !session.value) {
13241
13247
  return false;
@@ -13285,10 +13291,10 @@ class MultipleChoice extends HTMLElement {
13285
13291
  trailing: true
13286
13292
  });
13287
13293
  this._dispatchResponseChanged = debounce(() => {
13288
- this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete)));
13294
+ this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete, this)));
13289
13295
  });
13290
13296
  this._dispatchModelSet = debounce(() => {
13291
- this.dispatchEvent(new ModelSetEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model), this._model !== undefined));
13297
+ this.dispatchEvent(new ModelSetEvent_1(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete, this), this._model !== undefined));
13292
13298
  }, 50, {
13293
13299
  leading: false,
13294
13300
  trailing: true
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pie-element/ebsr",
3
- "version": "10.6.5",
3
+ "version": "10.6.6-next.10+45bdaf464",
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.18.5",
10
+ "@pie-element/multiple-choice": "^9.18.6-next.10+45bdaf464",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
12
  "@pie-lib/pie-toolbox": "2.23.2",
13
13
  "classnames": "^2.2.5",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "author": "pie framework developers",
18
18
  "license": "ISC",
19
- "gitHead": "88227b5f2ccc4d9a3675ecb4d4b27d63a90958f8",
19
+ "gitHead": "45bdaf464b8158778724414130f3fffd63da5390",
20
20
  "scripts": {
21
21
  "postpublish": "../../scripts/postpublish"
22
22
  },