@pie-element/ebsr 10.6.6-next.2 → 10.6.6-next.8
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/module/configure.js +1 -1
- package/module/element.js +11 -5
- package/module/manifest.json +1 -1
- package/module/print.js +11 -5
- package/package.json +3 -3
package/module/configure.js
CHANGED
|
@@ -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
|
+
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
|
+
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
|
-
|
|
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/manifest.json
CHANGED
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
|
+
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
|
-
|
|
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.6-next.
|
|
3
|
+
"version": "10.6.6-next.8+1f070f97b",
|
|
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.6-next.
|
|
10
|
+
"@pie-element/multiple-choice": "^9.18.6-next.8+1f070f97b",
|
|
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": "
|
|
19
|
+
"gitHead": "1f070f97b2fe4bb3c7fd82270be5bad00677a94a",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|