lido-player 0.0.2-alpha-79 → 0.0.2-alpha-80
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/dist/cjs/{decode-deq4aiWl.js → decode-BoJO3btM.js} +1 -1
- package/dist/cjs/{index-DCqhhVJB.js → index-CgaE1GjD.js} +92 -10
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_22.cjs.entry.js +30 -18
- package/dist/collection/components/calculator/lido-calculator.js +2 -1
- package/dist/collection/components/container/lido-container.js +11 -1
- package/dist/collection/components/keyboard/lido-keyboard.js +7 -5
- package/dist/collection/utils/customEvents.js +1 -1
- package/dist/collection/utils/utils.js +6 -0
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -0
- package/dist/collection/utils/utilsHandlers/floatHandler.js +80 -10
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-root.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/{p-BoNAwWsD.js → p-BP8urjEF.js} +1 -1
- package/dist/components/p-B_riwB43.js +1 -0
- package/dist/components/{p-DbC47BiF.js → p-BdmwURgL.js} +1 -1
- package/dist/components/p-BlUc8I1X.js +1 -0
- package/dist/components/{p-6DsBZAwT.js → p-CFm5fhyW.js} +1 -1
- package/dist/components/{p-CRHXBDd9.js → p-CtAIatJL.js} +1 -1
- package/dist/components/{p-VKK_CdF_.js → p-D03VKJGo.js} +1 -1
- package/dist/components/{p-DGZVyMvW.js → p-DABXleaM.js} +1 -1
- package/dist/components/{p-DimQN2SE.js → p-DBU82Fut.js} +1 -1
- package/dist/components/{p-C75ihiHN.js → p-DfzpwbRE.js} +1 -1
- package/dist/components/{p-DJmFOzKq.js → p-DhMA5bRq.js} +1 -1
- package/dist/components/{p-CumdMqv4.js → p-DoQSBz_M.js} +1 -1
- package/dist/components/p-XuYuvQ2t.js +1 -0
- package/dist/esm/{decode-DWaAeRuK.js → decode-DV1UnYqp.js} +1 -1
- package/dist/esm/{index-DlDAkUXz.js → index-p0FP9pjT.js} +92 -11
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +30 -18
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-ZysqB6UH.js → p-DPc00RI5.js} +1 -1
- package/dist/lido-player/{p-CINWIpuJ.js → p-DShqXa4A.js} +1 -1
- package/dist/lido-player/p-dc5b0534.entry.js +1 -0
- package/dist/types/utils/constants.d.ts +7 -0
- package/dist/types/utils/utilsHandlers/floatHandler.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-Bs7wJ4Lj.js +0 -1
- package/dist/components/p-Bv06SP2E.js +0 -1
- package/dist/components/p-UCKWWpdi.js +0 -1
- package/dist/lido-player/p-c60c12cd.entry.js +0 -1
|
@@ -117,7 +117,7 @@ function dispatchActivityEndEvent(totalIndex, currentIndex, score, rightMoves, w
|
|
|
117
117
|
dispatchCustomEvent(ActivityEndKey, { currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity });
|
|
118
118
|
}
|
|
119
119
|
function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson) {
|
|
120
|
-
dispatchCustomEvent(LessonEndKey, { totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson });
|
|
120
|
+
dispatchCustomEvent(LessonEndKey, { totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson });
|
|
121
121
|
}
|
|
122
122
|
function dispatchNextContainerEvent() {
|
|
123
123
|
dispatchCustomEvent(NextContainerKey, {});
|
|
@@ -343,6 +343,8 @@ function enableDraggingWithScaling(element) {
|
|
|
343
343
|
handlingElementFlexibleWidth(element, 'drag');
|
|
344
344
|
const onStart = (event) => {
|
|
345
345
|
var _a, _b;
|
|
346
|
+
if (container && container.getAttribute("game-completed") === "true")
|
|
347
|
+
return;
|
|
346
348
|
console.log("moving start");
|
|
347
349
|
if (isDraggingDisabled) {
|
|
348
350
|
isDragging = false;
|
|
@@ -605,6 +607,8 @@ function enableDraggingWithScaling(element) {
|
|
|
605
607
|
element.addEventListener('click', ev => {
|
|
606
608
|
if (isClicked) {
|
|
607
609
|
console.log("clicked drag elkement");
|
|
610
|
+
if (container && container.getAttribute("game-completed") === "true")
|
|
611
|
+
return;
|
|
608
612
|
onClickDropOrDragElement(element, 'drag');
|
|
609
613
|
}
|
|
610
614
|
});
|
|
@@ -71467,8 +71471,11 @@ async function handleElementClick(element) {
|
|
|
71467
71471
|
if (fillValue === 100 && !fillCompleted) {
|
|
71468
71472
|
fillCompleted = true;
|
|
71469
71473
|
container.style.pointerEvents = 'none';
|
|
71470
|
-
|
|
71471
|
-
|
|
71474
|
+
if (!container.getAttribute('game-completed') || container.getAttribute('game-completed') === 'false' || container.getAttribute('game-completed') === null || container.getAttribute('game-completed') === undefined || container.getAttribute('game-completed') === '') {
|
|
71475
|
+
container.setAttribute('game-completed', 'true');
|
|
71476
|
+
triggerNextContainer();
|
|
71477
|
+
calculateScore();
|
|
71478
|
+
}
|
|
71472
71479
|
}
|
|
71473
71480
|
else {
|
|
71474
71481
|
fillCompleted = false;
|
|
@@ -71479,40 +71486,107 @@ async function handleElementClick(element) {
|
|
|
71479
71486
|
await executeActions(onInCorrect, container);
|
|
71480
71487
|
}
|
|
71481
71488
|
}
|
|
71489
|
+
let floatDelay = 0;
|
|
71490
|
+
const laneNextStartAtMs = [];
|
|
71491
|
+
const BUBBLE_VERTICAL_GAP = 12;
|
|
71492
|
+
const BUBBLE_TIME_GAP_SECONDS = 0.5;
|
|
71493
|
+
function getEarliestLaneIndex(laneCount) {
|
|
71494
|
+
let laneIndex = 0;
|
|
71495
|
+
let earliestTime = Number.POSITIVE_INFINITY;
|
|
71496
|
+
// Find the lane that becomes available the earliest.
|
|
71497
|
+
for (let i = 0; i < laneCount; i++) {
|
|
71498
|
+
const laneTime = laneNextStartAtMs[i] || 0;
|
|
71499
|
+
if (laneTime < earliestTime) {
|
|
71500
|
+
earliestTime = laneTime;
|
|
71501
|
+
laneIndex = i;
|
|
71502
|
+
}
|
|
71503
|
+
}
|
|
71504
|
+
return laneIndex;
|
|
71505
|
+
}
|
|
71506
|
+
function resetFloatState() {
|
|
71507
|
+
// Reset all module-level float state so a fresh screen starts from initial behavior.
|
|
71508
|
+
fillCompleted = false;
|
|
71509
|
+
floatDelay = 0;
|
|
71510
|
+
laneNextStartAtMs.length = 0;
|
|
71511
|
+
}
|
|
71482
71512
|
function handleFloatElementPosition(element) {
|
|
71513
|
+
// Step 1: Resolve the main game container.
|
|
71483
71514
|
const container = document.getElementById(LidoContainer);
|
|
71484
71515
|
if (!container) {
|
|
71485
71516
|
console.error(`No container found with id: lido-container`);
|
|
71486
71517
|
return;
|
|
71487
71518
|
}
|
|
71519
|
+
// Step 2: Stop speaking highlight before repositioning.
|
|
71488
71520
|
stopHighlightForSpeakingElement(element);
|
|
71521
|
+
// Step 3: Resolve the float area that owns moving elements.
|
|
71489
71522
|
const floatContainer = container.querySelector('.lido-float');
|
|
71490
71523
|
if (!floatContainer)
|
|
71491
71524
|
return;
|
|
71525
|
+
// Step 4: Read movement direction from the container.
|
|
71492
71526
|
const direction = floatContainer.getAttribute('float-direction') || 'bottomToTop';
|
|
71527
|
+
// Step 5: Generate a random delay used by the vertical float mode.
|
|
71493
71528
|
const delay = Math.random() * 5;
|
|
71494
71529
|
// const isFirstEntry = element.getAttribute('data-entry') !== 'true';
|
|
71495
71530
|
// if (isFirstEntry) {
|
|
71496
71531
|
// element.setAttribute('data-entry', 'true');
|
|
71497
71532
|
// entryValue += 10;
|
|
71498
71533
|
// }
|
|
71534
|
+
// Step 6: Ensure element is absolutely positioned for animation.
|
|
71499
71535
|
element.style.position = 'absolute';
|
|
71500
71536
|
if (direction === 'leftToRight') {
|
|
71537
|
+
// Step 7: Prepare horizontal floating setup.
|
|
71501
71538
|
const containerHeight = floatContainer.offsetHeight;
|
|
71502
71539
|
// Add class for bubble elements to identify them later for input matching and scoring
|
|
71503
71540
|
element.classList.add("bubble-element");
|
|
71504
|
-
element.style.left =
|
|
71505
|
-
element.style.right = `${window.innerWidth +
|
|
71506
|
-
//
|
|
71507
|
-
|
|
71508
|
-
|
|
71541
|
+
element.style.left = `unset`;
|
|
71542
|
+
element.style.right = `${(1600 - window.innerWidth) + window.innerWidth + element.offsetWidth}px`;
|
|
71543
|
+
// Step 8: Split available height into lanes with a vertical gap.
|
|
71544
|
+
const laneHeight = Math.max(1, element.clientHeight + BUBBLE_VERTICAL_GAP);
|
|
71545
|
+
const laneCount = Math.max(1, Math.floor(containerHeight / laneHeight));
|
|
71546
|
+
// Keep lane timer array length in sync with current lane count.
|
|
71547
|
+
if (laneNextStartAtMs.length > laneCount) {
|
|
71548
|
+
laneNextStartAtMs.length = laneCount;
|
|
71549
|
+
}
|
|
71550
|
+
// Step 9: Find all lanes that are currently free.
|
|
71551
|
+
const now = performance.now();
|
|
71552
|
+
const availableLaneIndexes = [];
|
|
71553
|
+
for (let i = 0; i < laneCount; i++) {
|
|
71554
|
+
const laneReadyAt = laneNextStartAtMs[i] || 0;
|
|
71555
|
+
if (laneReadyAt <= now) {
|
|
71556
|
+
availableLaneIndexes.push(i);
|
|
71557
|
+
}
|
|
71558
|
+
}
|
|
71559
|
+
// Step 10: Choose a random free lane, else fallback to earliest available lane.
|
|
71560
|
+
let laneIndex = 0;
|
|
71561
|
+
if (availableLaneIndexes.length > 0) {
|
|
71562
|
+
const randomAvailableIndex = Math.floor(Math.random() * availableLaneIndexes.length);
|
|
71563
|
+
laneIndex = availableLaneIndexes[randomAvailableIndex];
|
|
71564
|
+
}
|
|
71565
|
+
else {
|
|
71566
|
+
laneIndex = getEarliestLaneIndex(laneCount);
|
|
71567
|
+
}
|
|
71568
|
+
// Step 11: Convert lane index to top position.
|
|
71569
|
+
const resolvedLaneIndex = laneIndex !== null && laneIndex !== void 0 ? laneIndex : 0;
|
|
71570
|
+
const maxTop = Math.max(0, containerHeight - element.clientHeight);
|
|
71571
|
+
const laneStep = laneCount > 1 ? maxTop / (laneCount - 1) : 0;
|
|
71572
|
+
element.style.top = `${Math.round(resolvedLaneIndex * laneStep)}px`;
|
|
71573
|
+
// Step 12: Set animation start position and compute spacing delay.
|
|
71509
71574
|
element.style.setProperty('--el-left', element.style.right);
|
|
71510
|
-
element.
|
|
71575
|
+
const timePerElement = element.offsetWidth / (container.offsetWidth / 60);
|
|
71576
|
+
const laneReadyAt = laneNextStartAtMs[resolvedLaneIndex] || 0;
|
|
71577
|
+
const laneDelaySeconds = Math.max(0, (laneReadyAt - now) / 1000);
|
|
71578
|
+
const appliedDelay = Math.max(floatDelay, laneDelaySeconds);
|
|
71579
|
+
// Step 13: Start horizontal animation and reserve lane time to avoid overlap.
|
|
71580
|
+
element.style.animation = `float-lr 40s linear ${appliedDelay}s`;
|
|
71581
|
+
laneNextStartAtMs[resolvedLaneIndex] = now + (appliedDelay + timePerElement + BUBBLE_TIME_GAP_SECONDS) * 1000;
|
|
71582
|
+
// Step 14: Reset legacy delay after applying once.
|
|
71583
|
+
floatDelay = 0;
|
|
71511
71584
|
}
|
|
71512
71585
|
else {
|
|
71586
|
+
// Step 7 (vertical mode): pick a random x-position in container.
|
|
71513
71587
|
const containerWidth = floatContainer.offsetWidth;
|
|
71514
|
-
// element.style.left = isFirstEntry ? `${entryValue}%` : `${Math.floor(Math.random() * (containerWidth - element.clientWidth))}px`;
|
|
71515
71588
|
element.style.left = `${Math.floor(Math.random() * (containerWidth - element.clientWidth))}px`;
|
|
71589
|
+
// Step 8 (vertical mode): place below viewport and animate upward.
|
|
71516
71590
|
const startTop = document.body.offsetHeight + element.offsetHeight * (1 / calculateScale());
|
|
71517
71591
|
element.style.top = `${startTop}px`;
|
|
71518
71592
|
const duration = 5 + Math.random() * 5;
|
|
@@ -71520,6 +71594,7 @@ function handleFloatElementPosition(element) {
|
|
|
71520
71594
|
element.style.animation = `float-up ${duration}s linear ${delay}s`;
|
|
71521
71595
|
element.id = 'removeShadow';
|
|
71522
71596
|
}
|
|
71597
|
+
// Step 15: Requeue the same element once current animation finishes.
|
|
71523
71598
|
element.addEventListener('animationend', () => {
|
|
71524
71599
|
element.style.animation = 'none';
|
|
71525
71600
|
handleFloatElementPosition(element);
|
|
@@ -72593,6 +72668,12 @@ async function onActivityComplete(dragElement, dropElement) {
|
|
|
72593
72668
|
await executeActions(onCorrect, dropElement, dragElement);
|
|
72594
72669
|
}
|
|
72595
72670
|
}
|
|
72671
|
+
else {
|
|
72672
|
+
const onInCorrect = dropElement.getAttribute('onInCorrect');
|
|
72673
|
+
if (onInCorrect) {
|
|
72674
|
+
await executeActions(onInCorrect, dropElement, dragElement);
|
|
72675
|
+
}
|
|
72676
|
+
}
|
|
72596
72677
|
}
|
|
72597
72678
|
let dragScore = buildDragSelectedMapFromDOM();
|
|
72598
72679
|
const sortedValues = getSortedValuesArrayFromMap(dragScore);
|
|
@@ -73472,6 +73553,7 @@ exports.matchStringPattern = matchStringPattern;
|
|
|
73472
73553
|
exports.nextUrl = nextUrl;
|
|
73473
73554
|
exports.parseProp = parseProp;
|
|
73474
73555
|
exports.prevUrl = prevUrl;
|
|
73556
|
+
exports.resetFloatState = resetFloatState;
|
|
73475
73557
|
exports.setCancelBtnPopup = setCancelBtnPopup;
|
|
73476
73558
|
exports.setVisibilityWithDelay = setVisibilityWithDelay;
|
|
73477
73559
|
exports.speakIcon = speakIcon;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-7Dh-uOww.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-CgaE1GjD.js');
|
|
5
5
|
|
|
6
6
|
var rive$1 = {exports: {}};
|
|
7
7
|
|
|
@@ -747,7 +747,7 @@ function requireRive () {
|
|
|
747
747
|
return Wa(c, a, b);
|
|
748
748
|
}));
|
|
749
749
|
}
|
|
750
|
-
var Za, $a, db = {
|
|
750
|
+
var Za, $a, db = {491234:(a, b, c, d, e) => {
|
|
751
751
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
752
752
|
return 0;
|
|
753
753
|
}
|
|
@@ -810,11 +810,11 @@ function requireRive () {
|
|
|
810
810
|
}
|
|
811
811
|
window.h.za += 1;
|
|
812
812
|
return 1;
|
|
813
|
-
},
|
|
813
|
+
}, 493412:() => {
|
|
814
814
|
"undefined" !== typeof window.h && (window.h.Sa.map(function(a) {
|
|
815
815
|
document.removeEventListener(a, window.h.unlock, true);
|
|
816
816
|
}), --window.h.za, 0 === window.h.za && delete window.h);
|
|
817
|
-
},
|
|
817
|
+
}, 493716:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 493820:() => {
|
|
818
818
|
try {
|
|
819
819
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
820
820
|
a.close();
|
|
@@ -822,7 +822,7 @@ function requireRive () {
|
|
|
822
822
|
} catch (c) {
|
|
823
823
|
return 0;
|
|
824
824
|
}
|
|
825
|
-
},
|
|
825
|
+
}, 493991:(a, b, c, d, e, f) => {
|
|
826
826
|
if ("undefined" === typeof window.h) {
|
|
827
827
|
return -1;
|
|
828
828
|
}
|
|
@@ -868,7 +868,7 @@ function requireRive () {
|
|
|
868
868
|
a == window.h.J.xa && g.Z.connect(g.L.destination);
|
|
869
869
|
g.pb = f;
|
|
870
870
|
return window.h.sc(g);
|
|
871
|
-
},
|
|
871
|
+
}, 496868:a => window.h.qa(a).L.sampleRate, 496941:a => {
|
|
872
872
|
a = window.h.qa(a);
|
|
873
873
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
874
874
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
@@ -876,13 +876,13 @@ function requireRive () {
|
|
|
876
876
|
a.L.close();
|
|
877
877
|
a.L = void 0;
|
|
878
878
|
a.pb = void 0;
|
|
879
|
-
},
|
|
879
|
+
}, 497341:a => {
|
|
880
880
|
window.h.Ab(a);
|
|
881
|
-
},
|
|
881
|
+
}, 497391:a => {
|
|
882
882
|
a = window.h.qa(a);
|
|
883
883
|
a.L.resume();
|
|
884
884
|
a.state = window.h.ga.wb;
|
|
885
|
-
},
|
|
885
|
+
}, 497530:a => {
|
|
886
886
|
a = window.h.qa(a);
|
|
887
887
|
a.L.suspend();
|
|
888
888
|
a.state = window.h.ga.stopped;
|
|
@@ -3390,7 +3390,7 @@ function requireRive () {
|
|
|
3390
3390
|
/* 2 */
|
|
3391
3391
|
/***/ ((module) => {
|
|
3392
3392
|
|
|
3393
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.35.
|
|
3393
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.35.1","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3394
3394
|
|
|
3395
3395
|
/***/ }),
|
|
3396
3396
|
/* 3 */
|
|
@@ -8648,13 +8648,14 @@ const LidoCalculator = class {
|
|
|
8648
8648
|
else {
|
|
8649
8649
|
await index$1.executeActions(onInCorrect, container);
|
|
8650
8650
|
}
|
|
8651
|
+
index$1.calculateScore();
|
|
8651
8652
|
index$1.triggerNextContainer();
|
|
8652
8653
|
}
|
|
8653
8654
|
okbtn.style.pointerEvents = 'auto'; // Re-enable OK button after processing
|
|
8654
8655
|
}
|
|
8655
8656
|
render() {
|
|
8656
8657
|
const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
|
|
8657
|
-
return (index.h(index.Host, { key: '
|
|
8658
|
+
return (index.h(index.Host, { key: 'd56a56430ec3f306c30690fe344bda299572f318', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, index.h("lido-cell", { key: 'c21c852b8adc4189c94de004e6fc75a105c32b0d', visible: "true", height: "94px", width: "60px" }, index.h("lido-text", { key: 'fad33b9b6f7e49c25f1718ab2ce99b4099b79b0c', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, index.h("img", { key: '808789d669b3193897492aad4e262e6a9434844c', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), index.h("div", { key: '77228682dfdb471786fb61127d5cadae82863bd1', class: "lido-calculator-displayParent" }, index.h("div", { key: '7ffba1a00290ee9a876dd5e75f02a20e2e55826e', class: "lido-calculator-display" }, this.displayValue)), index.h("div", { key: '5e47ed161e4bdaf8f71380b02ed42ead77ba565a', class: "lido-calculator-buttons" }, numbers.map((num, i) => (index.h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
|
|
8658
8659
|
'lido-calculator-btn-special': num === '←' || num === 'OK',
|
|
8659
8660
|
'lido-calculator-btn-default': num !== '←' && num !== 'OK'
|
|
8660
8661
|
}, onClick: () => this.handleClick(num) }))))));
|
|
@@ -12134,6 +12135,7 @@ const LidoContainer = class {
|
|
|
12134
12135
|
"balancing": "balancing" /* templateAudio.balancing */,
|
|
12135
12136
|
"balloonPop": "balloonPop" /* templateAudio.balloonPop */,
|
|
12136
12137
|
"blender": "blender" /* templateAudio.blender */,
|
|
12138
|
+
"bubbleType": "bubbleType" /* templateAudio.bubbleType */,
|
|
12137
12139
|
"calculator": "calculator" /* templateAudio.calculator */,
|
|
12138
12140
|
"categorize": "categorize" /* templateAudio.categorize */,
|
|
12139
12141
|
"checkerBlocks": "checkerBlocks" /* templateAudio.checkerBlocks */,
|
|
@@ -12152,6 +12154,7 @@ const LidoContainer = class {
|
|
|
12152
12154
|
"letterPairing": "letterPairing" /* templateAudio.letterPairing */,
|
|
12153
12155
|
"makeSentence": "makeSentence" /* templateAudio.makeSentence */,
|
|
12154
12156
|
"matchingCard": "matchingCard" /* templateAudio.matchingCard */,
|
|
12157
|
+
"multiplyBeeds": "multiplyBeeds" /* templateAudio.multiplyBeeds */,
|
|
12155
12158
|
"nimbleTable": "nimbleTable" /* templateAudio.nimbleTable */,
|
|
12156
12159
|
"numberBoardOneTwo": "numberBoardOneTwo" /* templateAudio.numberBoardOneTwo */,
|
|
12157
12160
|
"numberPair": "numberPair" /* templateAudio.numberPair */,
|
|
@@ -12163,6 +12166,10 @@ const LidoContainer = class {
|
|
|
12163
12166
|
"pictureWordMatch2": "pictureWordMatch2" /* templateAudio.pictureWordMatch2 */,
|
|
12164
12167
|
"puzzleGame": "puzzleGame" /* templateAudio.puzzleGame */,
|
|
12165
12168
|
"questionBoard": "questionBoard" /* templateAudio.questionBoard */,
|
|
12169
|
+
"quizLiteracySentenceSentence": "quizLiteracySentenceSentence" /* templateAudio.quizLiteracySentenceSentence */,
|
|
12170
|
+
"quizLiteracySoundOnlyImage": "quizLiteracySoundOnlyImage" /* templateAudio.quizLiteracySoundOnlyImage */,
|
|
12171
|
+
"quizLiteracySoundOnlySentence": "quizLiteracySoundOnlySentence" /* templateAudio.quizLiteracySoundOnlySentence */,
|
|
12172
|
+
"quizLiteracySoundOnlyWord": "quizLiteracySoundonlyWord" /* templateAudio.quizLiteracySoundOnlyWord */,
|
|
12166
12173
|
"quizLiteracyAndShapes1": "quizLiteracyAndShapes1" /* templateAudio.quizLiteracyAndShapes1 */,
|
|
12167
12174
|
"quizLiteracyImageWithText": "quizLiteracyImageWithText" /* templateAudio.quizLiteracyImageWithText */,
|
|
12168
12175
|
"quizliteracyImageWord": "quizliteracyImageWord" /* templateAudio.quizliteracyImageWord */,
|
|
@@ -12187,6 +12194,7 @@ const LidoContainer = class {
|
|
|
12187
12194
|
"sumTogether": "sumTogether" /* templateAudio.sumTogether */,
|
|
12188
12195
|
"tag": "tag" /* templateAudio.tag */,
|
|
12189
12196
|
"total": "total" /* templateAudio.total */,
|
|
12197
|
+
"writeCard": "writeCard" /* templateAudio.writeCard */,
|
|
12190
12198
|
"writeLetter": "writeLetter" /* templateAudio.writeLetter */,
|
|
12191
12199
|
"writeNumber": "writeNumber" /* templateAudio.writeNumber */,
|
|
12192
12200
|
"writeSet": "writeSet" /* templateAudio.writeSet */,
|
|
@@ -12339,6 +12347,7 @@ const LidoContainer = class {
|
|
|
12339
12347
|
setTimeout(() => {
|
|
12340
12348
|
index$1.highlightElement();
|
|
12341
12349
|
}, 100);
|
|
12350
|
+
index$1.resetFloatState();
|
|
12342
12351
|
index$1.Timer.getI().start();
|
|
12343
12352
|
}
|
|
12344
12353
|
disconnectedCallback() {
|
|
@@ -12346,6 +12355,7 @@ const LidoContainer = class {
|
|
|
12346
12355
|
window.removeEventListener('load', () => this.scaleContainer(this.el));
|
|
12347
12356
|
document.body.style.backgroundColor = '';
|
|
12348
12357
|
document.body.style.backgroundImage = '';
|
|
12358
|
+
index$1.resetFloatState();
|
|
12349
12359
|
index$1.Timer.getI().stop();
|
|
12350
12360
|
}
|
|
12351
12361
|
render() {
|
|
@@ -12360,7 +12370,7 @@ const LidoContainer = class {
|
|
|
12360
12370
|
userSelect: 'none', // Prevent any field selection
|
|
12361
12371
|
};
|
|
12362
12372
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
12363
|
-
return (index.h(index.Host, { key: '
|
|
12373
|
+
return (index.h(index.Host, { key: '251a6c4300e30a424f5bcf6099ee0f1252267de6', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, index.h("lido-text", { key: '0ae4e3e6cc9d82969e396f0af924630565fa548b', visible: "false", id: this.templateId, audio: "", string: this.instructName }), index.h("slot", { key: 'e93ea96beb6733bf8d8f0e7c2ff11a7f2cda09a8' })));
|
|
12364
12374
|
}
|
|
12365
12375
|
get el() { return index.getElement(this); }
|
|
12366
12376
|
static get watchers() { return {
|
|
@@ -12884,7 +12894,7 @@ const LidoHome = class {
|
|
|
12884
12894
|
}
|
|
12885
12895
|
// Pure-JS fallback (no wasm asset required)
|
|
12886
12896
|
try {
|
|
12887
|
-
const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-
|
|
12897
|
+
const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-BoJO3btM.js'); }).then(function (n) { return n.decode; });
|
|
12888
12898
|
const brotliDecompressBuffer = brotliDecodeModule.BrotliDecompressBuffer ||
|
|
12889
12899
|
((_a = brotliDecodeModule.default) === null || _a === void 0 ? void 0 : _a.BrotliDecompressBuffer);
|
|
12890
12900
|
if (typeof brotliDecompressBuffer !== 'function') {
|
|
@@ -16401,9 +16411,11 @@ const LidoKeyboard = class {
|
|
|
16401
16411
|
return element;
|
|
16402
16412
|
});
|
|
16403
16413
|
const bodyRect = document.body.getBoundingClientRect();
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16414
|
+
if (matchedBubble) {
|
|
16415
|
+
const elemRect = matchedBubble.getBoundingClientRect();
|
|
16416
|
+
// Ciheck if the matched bubble is overlapping with the target area (you can define the target area as needed, here we use the entire viewport)
|
|
16417
|
+
isOverlapping = matchedBubble && elemRect.left < bodyRect.right && elemRect.right > bodyRect.left && elemRect.top < bodyRect.bottom && elemRect.bottom > bodyRect.top;
|
|
16418
|
+
}
|
|
16407
16419
|
if (matchedBubble && isOverlapping) {
|
|
16408
16420
|
// If full word completed
|
|
16409
16421
|
if (this.inputString.toLowerCase() === matchedBubble.getAttribute('value').toLowerCase()) {
|
|
@@ -16486,10 +16498,10 @@ const LidoKeyboard = class {
|
|
|
16486
16498
|
const keysArray = this.keys.split(',').map(k => k.trim());
|
|
16487
16499
|
const container = document.getElementById(index$1.LidoContainer);
|
|
16488
16500
|
const showCheck = container.getAttribute('show-check') === 'true';
|
|
16489
|
-
return (index.h(index.Host, { key: '
|
|
16501
|
+
return (index.h(index.Host, { key: '643b539177765041a7e4876af27a8e0c55d03d2c', class: "lido-keyboard", style: { width: this.style.width, height: this.style.height, position: 'relative', margin: this.style.margin, zIndex: this.z } }, this.keyboardInput && (index.h("div", { key: 'e97e5e1a3da2c4507d9a5aec81eabd8fb6ad6062', class: "input-area" }, index.h("input", { key: 'facb33b4135c62429b1738aa6d6a8e096a1823c0', type: "text", value: this.inputString, class: "input-area", readonly: true }), index.h("lido-text", { key: '227b199cf1fe5928c975143b268f2dcb6334ad30', visible: showCheck ? 'true' : 'false', string: "<<", "bg-color": "black", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "100px", height: "70px", type: "click", onClick: () => {
|
|
16490
16502
|
this.inputString = this.inputString.slice(0, -1);
|
|
16491
16503
|
this.inputValidation(event);
|
|
16492
|
-
} }), index.h("lido-text", { key: '
|
|
16504
|
+
} }), index.h("lido-text", { key: '460428fd44dcc1f3faa40d5c0caa19edfc341289', visible: showCheck ? 'true' : 'false', id: "lido-checkButton", string: "Enter", "bg-color": "green", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "150px", height: "70px", type: "click" }))), this.letterLength && (index.h("lido-text", { key: '58f45bc2581856fe4a624e5cccef9bffdb56af24', visible: "true", string: `${this.numberOfClick}/${this.letterLength}`, "font-size": "60px", "font-color": "white", onEntry: "this.position='absolute'; this.right='0'; this.fontWeight='800';", x: "unset" })), index.h("div", { key: '4a894c0cb918fda4db76e3b61840fe6e73579794', class: "keyboard-wrapper", style: {
|
|
16493
16505
|
display: 'flex',
|
|
16494
16506
|
flexWrap: 'wrap',
|
|
16495
16507
|
justifyContent: 'center',
|
|
@@ -138,13 +138,14 @@ export class LidoCalculator {
|
|
|
138
138
|
else {
|
|
139
139
|
await executeActions(onInCorrect, container);
|
|
140
140
|
}
|
|
141
|
+
calculateScore();
|
|
141
142
|
triggerNextContainer();
|
|
142
143
|
}
|
|
143
144
|
okbtn.style.pointerEvents = 'auto'; // Re-enable OK button after processing
|
|
144
145
|
}
|
|
145
146
|
render() {
|
|
146
147
|
const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
|
|
147
|
-
return (h(Host, { key: '
|
|
148
|
+
return (h(Host, { key: 'd56a56430ec3f306c30690fe344bda299572f318', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, h("lido-cell", { key: 'c21c852b8adc4189c94de004e6fc75a105c32b0d', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: 'fad33b9b6f7e49c25f1718ab2ce99b4099b79b0c', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: '808789d669b3193897492aad4e262e6a9434844c', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: '77228682dfdb471786fb61127d5cadae82863bd1', class: "lido-calculator-displayParent" }, h("div", { key: '7ffba1a00290ee9a876dd5e75f02a20e2e55826e', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: '5e47ed161e4bdaf8f71380b02ed42ead77ba565a', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
|
|
148
149
|
'lido-calculator-btn-special': num === '←' || num === 'OK',
|
|
149
150
|
'lido-calculator-btn-default': num !== '←' && num !== 'OK'
|
|
150
151
|
}, onClick: () => this.handleClick(num) }))))));
|
|
@@ -4,6 +4,7 @@ import i18next from "../../utils/i18n";
|
|
|
4
4
|
import { highlightElement } from "../../utils/utilsHandlers/highlightHandler";
|
|
5
5
|
import { TemplateID } from "../../utils/constants";
|
|
6
6
|
import { Timer } from "../../utils/utilsHandlers/timer";
|
|
7
|
+
import { resetFloatState } from "../../utils/utilsHandlers/floatHandler";
|
|
7
8
|
/**
|
|
8
9
|
* @component LidoContainer
|
|
9
10
|
*
|
|
@@ -188,6 +189,7 @@ export class LidoContainer {
|
|
|
188
189
|
"balancing": "balancing" /* templateAudio.balancing */,
|
|
189
190
|
"balloonPop": "balloonPop" /* templateAudio.balloonPop */,
|
|
190
191
|
"blender": "blender" /* templateAudio.blender */,
|
|
192
|
+
"bubbleType": "bubbleType" /* templateAudio.bubbleType */,
|
|
191
193
|
"calculator": "calculator" /* templateAudio.calculator */,
|
|
192
194
|
"categorize": "categorize" /* templateAudio.categorize */,
|
|
193
195
|
"checkerBlocks": "checkerBlocks" /* templateAudio.checkerBlocks */,
|
|
@@ -206,6 +208,7 @@ export class LidoContainer {
|
|
|
206
208
|
"letterPairing": "letterPairing" /* templateAudio.letterPairing */,
|
|
207
209
|
"makeSentence": "makeSentence" /* templateAudio.makeSentence */,
|
|
208
210
|
"matchingCard": "matchingCard" /* templateAudio.matchingCard */,
|
|
211
|
+
"multiplyBeeds": "multiplyBeeds" /* templateAudio.multiplyBeeds */,
|
|
209
212
|
"nimbleTable": "nimbleTable" /* templateAudio.nimbleTable */,
|
|
210
213
|
"numberBoardOneTwo": "numberBoardOneTwo" /* templateAudio.numberBoardOneTwo */,
|
|
211
214
|
"numberPair": "numberPair" /* templateAudio.numberPair */,
|
|
@@ -217,6 +220,10 @@ export class LidoContainer {
|
|
|
217
220
|
"pictureWordMatch2": "pictureWordMatch2" /* templateAudio.pictureWordMatch2 */,
|
|
218
221
|
"puzzleGame": "puzzleGame" /* templateAudio.puzzleGame */,
|
|
219
222
|
"questionBoard": "questionBoard" /* templateAudio.questionBoard */,
|
|
223
|
+
"quizLiteracySentenceSentence": "quizLiteracySentenceSentence" /* templateAudio.quizLiteracySentenceSentence */,
|
|
224
|
+
"quizLiteracySoundOnlyImage": "quizLiteracySoundOnlyImage" /* templateAudio.quizLiteracySoundOnlyImage */,
|
|
225
|
+
"quizLiteracySoundOnlySentence": "quizLiteracySoundOnlySentence" /* templateAudio.quizLiteracySoundOnlySentence */,
|
|
226
|
+
"quizLiteracySoundOnlyWord": "quizLiteracySoundonlyWord" /* templateAudio.quizLiteracySoundOnlyWord */,
|
|
220
227
|
"quizLiteracyAndShapes1": "quizLiteracyAndShapes1" /* templateAudio.quizLiteracyAndShapes1 */,
|
|
221
228
|
"quizLiteracyImageWithText": "quizLiteracyImageWithText" /* templateAudio.quizLiteracyImageWithText */,
|
|
222
229
|
"quizliteracyImageWord": "quizliteracyImageWord" /* templateAudio.quizliteracyImageWord */,
|
|
@@ -241,6 +248,7 @@ export class LidoContainer {
|
|
|
241
248
|
"sumTogether": "sumTogether" /* templateAudio.sumTogether */,
|
|
242
249
|
"tag": "tag" /* templateAudio.tag */,
|
|
243
250
|
"total": "total" /* templateAudio.total */,
|
|
251
|
+
"writeCard": "writeCard" /* templateAudio.writeCard */,
|
|
244
252
|
"writeLetter": "writeLetter" /* templateAudio.writeLetter */,
|
|
245
253
|
"writeNumber": "writeNumber" /* templateAudio.writeNumber */,
|
|
246
254
|
"writeSet": "writeSet" /* templateAudio.writeSet */,
|
|
@@ -393,6 +401,7 @@ export class LidoContainer {
|
|
|
393
401
|
setTimeout(() => {
|
|
394
402
|
highlightElement();
|
|
395
403
|
}, 100);
|
|
404
|
+
resetFloatState();
|
|
396
405
|
Timer.getI().start();
|
|
397
406
|
}
|
|
398
407
|
disconnectedCallback() {
|
|
@@ -400,6 +409,7 @@ export class LidoContainer {
|
|
|
400
409
|
window.removeEventListener('load', () => this.scaleContainer(this.el));
|
|
401
410
|
document.body.style.backgroundColor = '';
|
|
402
411
|
document.body.style.backgroundImage = '';
|
|
412
|
+
resetFloatState();
|
|
403
413
|
Timer.getI().stop();
|
|
404
414
|
}
|
|
405
415
|
render() {
|
|
@@ -414,7 +424,7 @@ export class LidoContainer {
|
|
|
414
424
|
userSelect: 'none', // Prevent any field selection
|
|
415
425
|
};
|
|
416
426
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
417
|
-
return (h(Host, { key: '
|
|
427
|
+
return (h(Host, { key: '251a6c4300e30a424f5bcf6099ee0f1252267de6', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, h("lido-text", { key: '0ae4e3e6cc9d82969e396f0af924630565fa548b', visible: "false", id: this.templateId, audio: "", string: this.instructName }), h("slot", { key: 'e93ea96beb6733bf8d8f0e7c2ff11a7f2cda09a8' })));
|
|
418
428
|
}
|
|
419
429
|
static get is() { return "lido-container"; }
|
|
420
430
|
static get originalStyleUrls() {
|
|
@@ -52,9 +52,11 @@ export class LidoKeyboard {
|
|
|
52
52
|
return element;
|
|
53
53
|
});
|
|
54
54
|
const bodyRect = document.body.getBoundingClientRect();
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
if (matchedBubble) {
|
|
56
|
+
const elemRect = matchedBubble.getBoundingClientRect();
|
|
57
|
+
// Ciheck if the matched bubble is overlapping with the target area (you can define the target area as needed, here we use the entire viewport)
|
|
58
|
+
isOverlapping = matchedBubble && elemRect.left < bodyRect.right && elemRect.right > bodyRect.left && elemRect.top < bodyRect.bottom && elemRect.bottom > bodyRect.top;
|
|
59
|
+
}
|
|
58
60
|
if (matchedBubble && isOverlapping) {
|
|
59
61
|
// If full word completed
|
|
60
62
|
if (this.inputString.toLowerCase() === matchedBubble.getAttribute('value').toLowerCase()) {
|
|
@@ -137,10 +139,10 @@ export class LidoKeyboard {
|
|
|
137
139
|
const keysArray = this.keys.split(',').map(k => k.trim());
|
|
138
140
|
const container = document.getElementById(LidoContainer);
|
|
139
141
|
const showCheck = container.getAttribute('show-check') === 'true';
|
|
140
|
-
return (h(Host, { key: '
|
|
142
|
+
return (h(Host, { key: '643b539177765041a7e4876af27a8e0c55d03d2c', class: "lido-keyboard", style: { width: this.style.width, height: this.style.height, position: 'relative', margin: this.style.margin, zIndex: this.z } }, this.keyboardInput && (h("div", { key: 'e97e5e1a3da2c4507d9a5aec81eabd8fb6ad6062', class: "input-area" }, h("input", { key: 'facb33b4135c62429b1738aa6d6a8e096a1823c0', type: "text", value: this.inputString, class: "input-area", readonly: true }), h("lido-text", { key: '227b199cf1fe5928c975143b268f2dcb6334ad30', visible: showCheck ? 'true' : 'false', string: "<<", "bg-color": "black", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "100px", height: "70px", type: "click", onClick: () => {
|
|
141
143
|
this.inputString = this.inputString.slice(0, -1);
|
|
142
144
|
this.inputValidation(event);
|
|
143
|
-
} }), h("lido-text", { key: '
|
|
145
|
+
} }), h("lido-text", { key: '460428fd44dcc1f3faa40d5c0caa19edfc341289', visible: showCheck ? 'true' : 'false', id: "lido-checkButton", string: "Enter", "bg-color": "green", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "150px", height: "70px", type: "click" }))), this.letterLength && (h("lido-text", { key: '58f45bc2581856fe4a624e5cccef9bffdb56af24', visible: "true", string: `${this.numberOfClick}/${this.letterLength}`, "font-size": "60px", "font-color": "white", onEntry: "this.position='absolute'; this.right='0'; this.fontWeight='800';", x: "unset" })), h("div", { key: '4a894c0cb918fda4db76e3b61840fe6e73579794', class: "keyboard-wrapper", style: {
|
|
144
146
|
display: 'flex',
|
|
145
147
|
flexWrap: 'wrap',
|
|
146
148
|
justifyContent: 'center',
|
|
@@ -8,7 +8,7 @@ export function dispatchActivityEndEvent(totalIndex, currentIndex, score, rightM
|
|
|
8
8
|
dispatchCustomEvent(ActivityEndKey, { currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity });
|
|
9
9
|
}
|
|
10
10
|
export function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson) {
|
|
11
|
-
dispatchCustomEvent(LessonEndKey, { totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson });
|
|
11
|
+
dispatchCustomEvent(LessonEndKey, { totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson });
|
|
12
12
|
}
|
|
13
13
|
export function dispatchNextContainerEvent() {
|
|
14
14
|
dispatchCustomEvent(NextContainerKey, {});
|
|
@@ -600,6 +600,12 @@ export async function onActivityComplete(dragElement, dropElement) {
|
|
|
600
600
|
await executeActions(onCorrect, dropElement, dragElement);
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
+
else {
|
|
604
|
+
const onInCorrect = dropElement.getAttribute('onInCorrect');
|
|
605
|
+
if (onInCorrect) {
|
|
606
|
+
await executeActions(onInCorrect, dropElement, dragElement);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
603
609
|
}
|
|
604
610
|
let dragScore = buildDragSelectedMapFromDOM();
|
|
605
611
|
const sortedValues = getSortedValuesArrayFromMap(dragScore);
|
|
@@ -72,6 +72,8 @@ export function enableDraggingWithScaling(element) {
|
|
|
72
72
|
let horizontalDistance;
|
|
73
73
|
const onStart = (event) => {
|
|
74
74
|
var _a, _b;
|
|
75
|
+
if (container && container.getAttribute("game-completed") === "true")
|
|
76
|
+
return;
|
|
75
77
|
console.log("moving start");
|
|
76
78
|
if (isDraggingDisabled) {
|
|
77
79
|
isDragging = false;
|
|
@@ -338,6 +340,8 @@ export function enableDraggingWithScaling(element) {
|
|
|
338
340
|
element.addEventListener('click', ev => {
|
|
339
341
|
if (isClicked) {
|
|
340
342
|
console.log("clicked drag elkement");
|
|
343
|
+
if (container && container.getAttribute("game-completed") === "true")
|
|
344
|
+
return;
|
|
341
345
|
onClickDropOrDragElement(element, 'drag');
|
|
342
346
|
}
|
|
343
347
|
});
|