lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-52-dev
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/LICENSE +21 -21
- package/dist/cjs/{index-6a69c33a.js → index-baff5c15.js} +48 -14
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{lido-avatar_21.cjs.entry.js → lido-avatar_22.cjs.entry.js} +3043 -162
- package/dist/cjs/lido-player.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-079a5e7d.js → utils-ce99b0d0.js} +294 -108
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/avatar/lido-avatar.css +4 -4
- package/dist/collection/components/avatar/lido-avatar.js +1 -1
- package/dist/collection/components/calculator/lido-calculator.css +87 -87
- package/dist/collection/components/calculator/lido-calculator.js +14 -8
- package/dist/collection/components/canvas/lido-canvas.css +35 -0
- package/dist/collection/components/canvas/lido-canvas.js +220 -0
- package/dist/collection/components/cell/lido-cell.css +100 -100
- package/dist/collection/components/cell/lido-cell.js +12 -12
- package/dist/collection/components/column/lido-col.css +19 -19
- package/dist/collection/components/column/lido-col.js +6 -6
- package/dist/collection/components/container/lido-container.css +10 -10
- package/dist/collection/components/container/lido-container.js +70 -8
- package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
- package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
- package/dist/collection/components/float/lido-float.css +30 -30
- package/dist/collection/components/float/lido-float.js +2 -2
- package/dist/collection/components/home/lido-home.css +278 -278
- package/dist/collection/components/home/lido-home.js +92 -12
- package/dist/collection/components/image/lido-image.css +17 -17
- package/dist/collection/components/image/lido-image.js +6 -6
- package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
- package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
- package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +69 -15
- package/dist/collection/components/position/lido-pos.css +16 -16
- package/dist/collection/components/position/lido-pos.js +2 -2
- package/dist/collection/components/random/lido-random.css +8 -8
- package/dist/collection/components/random/lido-random.js +2 -2
- package/dist/collection/components/root/lido-root.js +42 -6
- package/dist/collection/components/row/lido-row.css +10 -10
- package/dist/collection/components/row/lido-row.js +6 -6
- package/dist/collection/components/scale/lido-balance.css +145 -114
- package/dist/collection/components/scale/lido-balance.js +17 -17
- package/dist/collection/components/shape/lido-shape.css +96 -96
- package/dist/collection/components/shape/lido-shape.js +5 -5
- package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
- package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
- package/dist/collection/components/text/lido-text.css +53 -53
- package/dist/collection/components/text/lido-text.js +6 -5
- package/dist/collection/components/trace/lido-trace.css +97 -97
- package/dist/collection/components/trace/lido-trace.js +2 -2
- package/dist/collection/components/wrap/lido-wrap.css +18 -18
- package/dist/collection/components/wrap/lido-wrap.js +6 -6
- package/dist/collection/css/animation.css +194 -194
- package/dist/collection/css/index.css +277 -277
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +60 -60
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +55 -48
- package/dist/collection/stories/Templates/Tag/tagGame.stories.js +29 -29
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +42 -42
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +37 -31
- package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
- package/dist/collection/stories/Templates/blender/blender.stories.js +100 -0
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +52 -0
- package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
- package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
- package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +39 -38
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +37 -35
- package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
- package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
- package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +25 -23
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +41 -39
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +98 -97
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +92 -91
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
- package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
- package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
- package/dist/collection/stories/Templates/total/total.stories.js +27 -27
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
- package/dist/collection/stories/components/flash-card.stories.js +48 -48
- package/dist/collection/stories/components/keyboard.stories.js +10 -10
- package/dist/collection/stories/components/slider.stories.js +4 -4
- package/dist/collection/stories/components/trace.stories.js +5 -5
- package/dist/collection/utils/audioPlayer.js +43 -6
- package/dist/collection/utils/constants.js +1 -0
- package/dist/collection/utils/i18n.js +36 -0
- package/dist/collection/utils/utils.js +170 -36
- package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +27 -15
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
- package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
- package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
- package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.d.ts +11 -0
- package/dist/components/lido-canvas.js +6 -0
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.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-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +49 -25
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.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/lido-wrap.js +1 -1
- package/dist/components/{p-9be56729.js → p-00777872.js} +46 -2
- package/dist/components/{p-3f406017.js → p-06171259.js} +2 -2
- package/dist/components/{p-08d0deab.js → p-09f1e2d2.js} +15 -9
- package/dist/components/{p-e4e42677.js → p-0c2aebfb.js} +2 -2
- package/dist/components/p-0fbeb3a1.js +2700 -0
- package/dist/components/{p-cbac3cbc.js → p-11bf64aa.js} +2 -2
- package/dist/components/{p-44808985.js → p-26df0769.js} +7 -7
- package/dist/components/{p-1fbdb431.js → p-2d53e1a5.js} +2 -2
- package/dist/components/{p-afbc196f.js → p-39a2e638.js} +3 -2
- package/dist/components/{p-e36ddcc1.js → p-3ce3744c.js} +14 -11
- package/dist/components/{p-7f7e5672.js → p-3f4d4c0a.js} +2 -2
- package/dist/components/{p-d37ab4dc.js → p-52e77394.js} +2 -2
- package/dist/components/{p-bed94c37.js → p-58c67252.js} +331 -118
- package/dist/components/p-5b5f59a8.js +129 -0
- package/dist/components/{p-52844fa4.js → p-68112f8c.js} +2 -2
- package/dist/components/{p-15971ede.js → p-8a34b98b.js} +1 -1
- package/dist/components/{p-904711c8.js → p-8f2ed62f.js} +2 -2
- package/dist/components/{p-74849cdd.js → p-9d34d59d.js} +4 -4
- package/dist/components/{p-73e31a86.js → p-a2f96840.js} +8 -8
- package/dist/components/{p-90465904.js → p-a516a324.js} +2 -2
- package/dist/components/{p-322acda6.js → p-b2125fc9.js} +67 -31
- package/dist/components/{p-835b973d.js → p-c4abfd0f.js} +2 -2
- package/dist/components/{p-29bdd953.js → p-cb56a853.js} +2 -2
- package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
- package/dist/esm/index.js +2 -2
- package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
- package/dist/esm/lido-player.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-5df09162.js → utils-107b15a7.js} +294 -108
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-606ea279.entry.js +1 -0
- package/dist/lido-player/p-9a9d5339.js +2 -0
- package/dist/lido-player/{p-7556e652.js → p-d1251482.js} +2 -2
- package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
- package/dist/types/components/container/lido-container.d.ts +6 -0
- package/dist/types/components/home/lido-home.d.ts +8 -0
- package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -1
- package/dist/types/components/root/lido-root.d.ts +5 -0
- package/dist/types/components.d.ts +71 -6
- package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
- package/dist/types/stories/Templates/blender/blender.stories.d.ts +4 -0
- package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
- package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
- package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
- package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
- package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
- package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
- package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
- package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
- package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
- package/dist/types/types/json.d.ts +4 -0
- package/dist/types/utils/audioPlayer.d.ts +2 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/i18n.d.ts +5 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +71 -69
- package/readme.md +113 -113
- package/dist/lido-player/p-137c99ce.js +0 -2
- package/dist/lido-player/p-eb956325.entry.js +0 -1
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-
|
|
2
|
-
import {
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
17
|
-
import { d as defineCustomElement$
|
|
18
|
-
import { d as defineCustomElement$
|
|
19
|
-
import { d as defineCustomElement$
|
|
20
|
-
import { d as defineCustomElement$
|
|
21
|
-
import { d as defineCustomElement$
|
|
1
|
+
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-58c67252.js';
|
|
2
|
+
import { i as instance } from './p-0fbeb3a1.js';
|
|
3
|
+
import { d as defineCustomElement$m } from './p-11bf64aa.js';
|
|
4
|
+
import { d as defineCustomElement$l } from './p-26df0769.js';
|
|
5
|
+
import { d as defineCustomElement$k } from './p-3ce3744c.js';
|
|
6
|
+
import { d as defineCustomElement$j } from './p-5b5f59a8.js';
|
|
7
|
+
import { d as defineCustomElement$i } from './p-cb56a853.js';
|
|
8
|
+
import { d as defineCustomElement$h } from './p-68112f8c.js';
|
|
9
|
+
import { d as defineCustomElement$g } from './p-00777872.js';
|
|
10
|
+
import { d as defineCustomElement$f } from './p-0c2aebfb.js';
|
|
11
|
+
import { d as defineCustomElement$e } from './p-2d53e1a5.js';
|
|
12
|
+
import { d as defineCustomElement$d } from './p-b2125fc9.js';
|
|
13
|
+
import { d as defineCustomElement$c } from './p-8a34b98b.js';
|
|
14
|
+
import { d as defineCustomElement$b } from './p-9d34d59d.js';
|
|
15
|
+
import { d as defineCustomElement$a } from './p-09f1e2d2.js';
|
|
16
|
+
import { d as defineCustomElement$9 } from './p-52e77394.js';
|
|
17
|
+
import { d as defineCustomElement$8 } from './p-06171259.js';
|
|
18
|
+
import { d as defineCustomElement$7 } from './p-3f4d4c0a.js';
|
|
19
|
+
import { d as defineCustomElement$6 } from './p-8f2ed62f.js';
|
|
20
|
+
import { d as defineCustomElement$5 } from './p-a2f96840.js';
|
|
21
|
+
import { d as defineCustomElement$4 } from './p-39a2e638.js';
|
|
22
|
+
import { d as defineCustomElement$3 } from './p-a516a324.js';
|
|
23
|
+
import { d as defineCustomElement$2 } from './p-c4abfd0f.js';
|
|
22
24
|
|
|
23
25
|
const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
24
26
|
constructor() {
|
|
25
27
|
super();
|
|
26
28
|
this.__registerHost();
|
|
29
|
+
this.locale = '';
|
|
27
30
|
this.xmlPath = '';
|
|
28
31
|
this.initialIndex = 0;
|
|
29
32
|
this.margin = '';
|
|
@@ -39,6 +42,16 @@ const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
|
39
42
|
* Lifecycle method that runs before the component is loaded.
|
|
40
43
|
* It fetches the XML data from the specified path or URL and sets it to the component's state.
|
|
41
44
|
*/
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
this.setLanguage(this.locale);
|
|
47
|
+
}
|
|
48
|
+
onLangChange(newLang) {
|
|
49
|
+
this.setLanguage(newLang);
|
|
50
|
+
}
|
|
51
|
+
setLanguage(lang) {
|
|
52
|
+
const effectiveLang = lang || instance.language;
|
|
53
|
+
instance.changeLanguage(effectiveLang);
|
|
54
|
+
}
|
|
42
55
|
async componentWillLoad() {
|
|
43
56
|
var _a, _b;
|
|
44
57
|
// Validate the xmlPath prop
|
|
@@ -78,10 +91,14 @@ const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
|
78
91
|
return h("div", null, "Error loading XML data. Please check the path or URL.");
|
|
79
92
|
}
|
|
80
93
|
// Once the XML data is loaded, pass it to the `lido-home` component
|
|
81
|
-
return h("lido-home", { initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData, baseUrl: this.baseUrl, exitButtonUrl: this.exitButtonUrl, prevButtonUrl: this.prevButtonUrl, nextButtonUrl: this.nextButtonUrl, speakerButtonUrl: this.speakerButtonUrl });
|
|
94
|
+
return h("lido-home", { showNav: true, activeContainerIndexes: [], initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData, baseUrl: this.baseUrl, exitButtonUrl: this.exitButtonUrl, prevButtonUrl: this.prevButtonUrl, nextButtonUrl: this.nextButtonUrl, speakerButtonUrl: this.speakerButtonUrl });
|
|
82
95
|
}
|
|
83
96
|
static get assetsDirs() { return ["assets"]; }
|
|
97
|
+
static get watchers() { return {
|
|
98
|
+
"locale": ["onLangChange"]
|
|
99
|
+
}; }
|
|
84
100
|
}, [0, "lido-root", {
|
|
101
|
+
"locale": [1],
|
|
85
102
|
"xmlPath": [1, "xml-path"],
|
|
86
103
|
"initialIndex": [2, "initial-index"],
|
|
87
104
|
"margin": [1],
|
|
@@ -92,12 +109,14 @@ const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
|
92
109
|
"nextButtonUrl": [1, "next-button-url"],
|
|
93
110
|
"speakerButtonUrl": [1, "speaker-button-url"],
|
|
94
111
|
"xmlData": [32]
|
|
112
|
+
}, undefined, {
|
|
113
|
+
"locale": ["onLangChange"]
|
|
95
114
|
}]);
|
|
96
115
|
function defineCustomElement$1() {
|
|
97
116
|
if (typeof customElements === "undefined") {
|
|
98
117
|
return;
|
|
99
118
|
}
|
|
100
|
-
const components = ["lido-root", "lido-avatar", "lido-balance", "lido-calculator", "lido-cell", "lido-col", "lido-container", "lido-flash-card", "lido-float", "lido-home", "lido-image", "lido-keyboard", "lido-math-matrix", "lido-pos", "lido-random", "lido-row", "lido-shape", "lido-slide-fill", "lido-text", "lido-trace", "lido-wrap"];
|
|
119
|
+
const components = ["lido-root", "lido-avatar", "lido-balance", "lido-calculator", "lido-canvas", "lido-cell", "lido-col", "lido-container", "lido-flash-card", "lido-float", "lido-home", "lido-image", "lido-keyboard", "lido-math-matrix", "lido-pos", "lido-random", "lido-row", "lido-shape", "lido-slide-fill", "lido-text", "lido-trace", "lido-wrap"];
|
|
101
120
|
components.forEach(tagName => { switch (tagName) {
|
|
102
121
|
case "lido-root":
|
|
103
122
|
if (!customElements.get(tagName)) {
|
|
@@ -106,15 +125,20 @@ function defineCustomElement$1() {
|
|
|
106
125
|
break;
|
|
107
126
|
case "lido-avatar":
|
|
108
127
|
if (!customElements.get(tagName)) {
|
|
109
|
-
defineCustomElement$
|
|
128
|
+
defineCustomElement$m();
|
|
110
129
|
}
|
|
111
130
|
break;
|
|
112
131
|
case "lido-balance":
|
|
113
132
|
if (!customElements.get(tagName)) {
|
|
114
|
-
defineCustomElement$
|
|
133
|
+
defineCustomElement$l();
|
|
115
134
|
}
|
|
116
135
|
break;
|
|
117
136
|
case "lido-calculator":
|
|
137
|
+
if (!customElements.get(tagName)) {
|
|
138
|
+
defineCustomElement$k();
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case "lido-canvas":
|
|
118
142
|
if (!customElements.get(tagName)) {
|
|
119
143
|
defineCustomElement$j();
|
|
120
144
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, t as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, t as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-58c67252.js';
|
|
2
|
+
import { i as instance } from './p-0fbeb3a1.js';
|
|
2
3
|
|
|
3
4
|
const lidoContainerCss = ".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, transparent);display:flex;flex-direction:column;justify-content:center;align-items:center}";
|
|
4
5
|
const LidoContainerStyle0 = lidoContainerCss;
|
|
@@ -7,6 +8,7 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
7
8
|
constructor() {
|
|
8
9
|
super();
|
|
9
10
|
this.__registerHost();
|
|
11
|
+
this.locale = '';
|
|
10
12
|
this.showDropBorder = true;
|
|
11
13
|
this.appendToDropOnCompletion = false;
|
|
12
14
|
this.id = '';
|
|
@@ -45,6 +47,31 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
45
47
|
this.delayVisible = '';
|
|
46
48
|
this.disableSpeak = false;
|
|
47
49
|
}
|
|
50
|
+
languageChanged(newLang) {
|
|
51
|
+
const langToApply = newLang || this.resolveLanguage();
|
|
52
|
+
this.updateChildTextLanguage(langToApply);
|
|
53
|
+
}
|
|
54
|
+
componentWillLoad() {
|
|
55
|
+
const langToApply = this.resolveLanguage();
|
|
56
|
+
this.updateChildTextLanguage(langToApply);
|
|
57
|
+
}
|
|
58
|
+
resolveLanguage() {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const rootEl = this.el.closest('lido-root');
|
|
61
|
+
const rootLang = (rootEl === null || rootEl === void 0 ? void 0 : rootEl.locale) || '';
|
|
62
|
+
if (rootLang === null || rootLang === void 0 ? void 0 : rootLang.trim())
|
|
63
|
+
return rootLang;
|
|
64
|
+
const homeEl = this.el.closest('lido-home');
|
|
65
|
+
const homeLang = (homeEl === null || homeEl === void 0 ? void 0 : homeEl.locale) || '';
|
|
66
|
+
if (homeLang === null || homeLang === void 0 ? void 0 : homeLang.trim())
|
|
67
|
+
return homeLang;
|
|
68
|
+
if ((_a = this.locale) === null || _a === void 0 ? void 0 : _a.trim())
|
|
69
|
+
return this.locale;
|
|
70
|
+
const xmlLang = this.el.getAttribute('locale');
|
|
71
|
+
if (xmlLang === null || xmlLang === void 0 ? void 0 : xmlLang.trim())
|
|
72
|
+
return xmlLang;
|
|
73
|
+
return (_b = this.el.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
74
|
+
}
|
|
48
75
|
convertToPixels(height, parentElement = document.body) {
|
|
49
76
|
if (!height)
|
|
50
77
|
return 0; // Handle empty or invalid input
|
|
@@ -86,6 +113,15 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
86
113
|
this.el.style.width = '1600px';
|
|
87
114
|
}
|
|
88
115
|
}
|
|
116
|
+
updateChildTextLanguage(lang) {
|
|
117
|
+
const appliedLang = lang || instance.language || 'en';
|
|
118
|
+
instance.changeLanguage(appliedLang);
|
|
119
|
+
const texts = this.el.querySelectorAll('lido-text');
|
|
120
|
+
texts.forEach((textEl) => {
|
|
121
|
+
textEl.locale = appliedLang;
|
|
122
|
+
textEl.dispatchEvent(new CustomEvent('languageChanged', { bubbles: true }));
|
|
123
|
+
});
|
|
124
|
+
}
|
|
89
125
|
/**
|
|
90
126
|
* Lifecycle hook that runs after the component is loaded.
|
|
91
127
|
* - It scales the container.
|
|
@@ -107,6 +143,8 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
107
143
|
styleElement.innerHTML = this.customStyle;
|
|
108
144
|
document.head.appendChild(styleElement);
|
|
109
145
|
}
|
|
146
|
+
const langToApply = this.resolveLanguage();
|
|
147
|
+
this.updateChildTextLanguage(langToApply);
|
|
110
148
|
}
|
|
111
149
|
disconnectedCallback() {
|
|
112
150
|
window.removeEventListener('resize', () => this.scaleContainer(this.el));
|
|
@@ -126,11 +164,15 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
126
164
|
userSelect: 'none', // Prevent any field selection
|
|
127
165
|
};
|
|
128
166
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
129
|
-
return (h(Host, { key: '
|
|
167
|
+
return (h(Host, { key: '5d7f2f02c5a231a18897942ea0d2f3a200efa502', id: "lido-container", locale: this.locale, "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 }, h("slot", { key: 'b82aff47d621fc4f9d6abe5b7add974853f69219' })));
|
|
130
168
|
}
|
|
131
169
|
get el() { return this; }
|
|
170
|
+
static get watchers() { return {
|
|
171
|
+
"locale": ["languageChanged"]
|
|
172
|
+
}; }
|
|
132
173
|
static get style() { return LidoContainerStyle0; }
|
|
133
174
|
}, [4, "lido-container", {
|
|
175
|
+
"locale": [1],
|
|
134
176
|
"showDropBorder": [4, "show-drop-border"],
|
|
135
177
|
"appendToDropOnCompletion": [4, "append-to-drop-on-completion"],
|
|
136
178
|
"id": [1],
|
|
@@ -168,6 +210,8 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
168
210
|
"showNextButton": [1, "show-next-button"],
|
|
169
211
|
"delayVisible": [1, "delay-visible"],
|
|
170
212
|
"disableSpeak": [4, "disable-speak"]
|
|
213
|
+
}, undefined, {
|
|
214
|
+
"locale": ["languageChanged"]
|
|
171
215
|
}]);
|
|
172
216
|
function defineCustomElement() {
|
|
173
217
|
if (typeof customElements === "undefined") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, r as attachSpeakIcon, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, r as attachSpeakIcon, h, j as Host } from './p-58c67252.js';
|
|
2
2
|
|
|
3
3
|
const lidoRandomCss = ".lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}";
|
|
4
4
|
const LidoRandomStyle0 = lidoRandomCss;
|
|
@@ -76,7 +76,7 @@ const LidoRandom = /*@__PURE__*/ proxyCustomElement(class LidoRandom extends H {
|
|
|
76
76
|
backgroundColor: this.bgColor,
|
|
77
77
|
margin: this.margin,
|
|
78
78
|
};
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: 'cc8bb9d31ff6c36201d266f5579288c92c05bf82', class: "lido-random", type: this.type, "tab-index": this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, minDrops: this.minDrops, maxDrops: this.maxDrops, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'd91a2403fa78320cbae40456dc0c86b44493bb5a' })));
|
|
80
80
|
}
|
|
81
81
|
get el() { return this; }
|
|
82
82
|
static get style() { return LidoRandomStyle0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, e as convertUrlToRelative, k as parseProp, T as validateObjectiveStatus, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, e as convertUrlToRelative, k as parseProp, T as validateObjectiveStatus, h, j as Host } from './p-58c67252.js';
|
|
2
2
|
|
|
3
3
|
const lidoMathMatrixCss = ".math-matrix{width:100%;height:100%;display:flex;justify-content:center}.slot{width:100%;height:100%;text-align:center;align-content:center;font-size:42px;font-weight:800;font-family:'Baloo Bhai 2';box-sizing:content-box}.slot:hover{opacity:0.7}.slot-parent{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.slot-active{background-color:var(--active-bg-color);background-image:var(--bg-image);background-size:contain;background-position:center;background-repeat:no-repeat}.slot-inactive{background-color:var(--deactive-bg-color);background-size:cover;background-position:center;background-repeat:no-repeat}.topIndex,.leftIndex,.bottomIndex{height:100%;width:100%;text-align:center;align-content:center;font-size:30px;font-weight:600;font-family:'Baloo Bhai 2'}";
|
|
4
4
|
const LidoMathMatrixStyle0 = lidoMathMatrixCss;
|
|
@@ -35,6 +35,9 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
|
|
|
35
35
|
this.fontColor = undefined;
|
|
36
36
|
this.previousFilledSlot = -1;
|
|
37
37
|
this.previousFilledSlotElement = null;
|
|
38
|
+
this.onCorrect = undefined;
|
|
39
|
+
this.onInCorrect = undefined;
|
|
40
|
+
this.onEntry = undefined;
|
|
38
41
|
this.style = {};
|
|
39
42
|
}
|
|
40
43
|
updateValue(index) {
|
|
@@ -187,14 +190,14 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
|
|
|
187
190
|
render() {
|
|
188
191
|
let slotNumber = 1;
|
|
189
192
|
const slotData = this.getSlotData();
|
|
190
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: '8232965fc3fb0b298233d21d7f50412508dc2256', class: "math-matrix", style: {
|
|
191
194
|
height: this.style.height,
|
|
192
195
|
width: this.style.width,
|
|
193
196
|
z: this.style.z,
|
|
194
197
|
display: this.style.display,
|
|
195
198
|
top: this.style.top,
|
|
196
199
|
left: this.style.left,
|
|
197
|
-
}, type: this.type, value: this.value, "tab-index": this.tabIndex, rows: this.style.rows, cols: this.style.cols, text: this.text }, Array.from({ length: parseInt(this.style.rows) + 1 }, (_, rowIndex) => (h("div", { class: "slot-parent", key: `row-${rowIndex}` }, h("div", { style: rowIndex === 0 && { visibility: 'hidden' }, class: "topIndex" }, rowIndex), Array.from({ length: parseInt(this.style.cols) }, (_, colIndex) => {
|
|
200
|
+
}, type: this.type, value: this.value, "tab-index": this.tabIndex, rows: this.style.rows, cols: this.style.cols, text: this.text, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, Array.from({ length: parseInt(this.style.rows) + 1 }, (_, rowIndex) => (h("div", { class: "slot-parent", key: `row-${rowIndex}` }, h("div", { style: rowIndex === 0 && { visibility: 'hidden' }, class: "topIndex" }, rowIndex), Array.from({ length: parseInt(this.style.cols) }, (_, colIndex) => {
|
|
198
201
|
var _a, _b;
|
|
199
202
|
return rowIndex === 0 ? (h("div", { class: "leftIndex" }, ++colIndex)) : (h("div", { class: `slot slot-${slotNumber} ${this.defualtFill >= slotNumber ? 'slot-active' : 'slot-inactive'}`, onClick: (ev) => this.handleClickSlot(ev.currentTarget), key: `slot-${rowIndex}-${colIndex}`, style: {
|
|
200
203
|
borderRadius: this.style.borderRadius,
|
|
@@ -208,18 +211,18 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
|
|
|
208
211
|
}, [0, "lido-math-matrix", {
|
|
209
212
|
"rows": [1],
|
|
210
213
|
"cols": [1],
|
|
211
|
-
"defualtFill": [
|
|
214
|
+
"defualtFill": [1538, "defualt-fill"],
|
|
212
215
|
"leftIndex": [4, "left-index"],
|
|
213
216
|
"topIndex": [4, "top-index"],
|
|
214
217
|
"bottomIndex": [4, "bottom-index"],
|
|
215
218
|
"clickable": [4],
|
|
216
219
|
"activeOnlyVisible": [4, "active-only-visible"],
|
|
217
220
|
"matrixImage": [1, "matrix-image"],
|
|
218
|
-
"activeBgColor": [
|
|
219
|
-
"deactiveBgColor": [
|
|
220
|
-
"border": [
|
|
221
|
-
"height": [
|
|
222
|
-
"width": [
|
|
221
|
+
"activeBgColor": [1537, "active-bg-color"],
|
|
222
|
+
"deactiveBgColor": [1537, "deactive-bg-color"],
|
|
223
|
+
"border": [1537],
|
|
224
|
+
"height": [1537],
|
|
225
|
+
"width": [1537],
|
|
223
226
|
"borderRadius": [1, "border-radius"],
|
|
224
227
|
"z": [1],
|
|
225
228
|
"margin": [1],
|
|
@@ -232,6 +235,9 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
|
|
|
232
235
|
"x": [1],
|
|
233
236
|
"y": [1],
|
|
234
237
|
"fontColor": [1, "font-color"],
|
|
238
|
+
"onCorrect": [1, "on-correct"],
|
|
239
|
+
"onInCorrect": [1, "on-in-correct"],
|
|
240
|
+
"onEntry": [1, "on-entry"],
|
|
235
241
|
"previousFilledSlot": [32],
|
|
236
242
|
"previousFilledSlotElement": [32],
|
|
237
243
|
"style": [32]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-58c67252.js';
|
|
2
2
|
|
|
3
3
|
const lidoFlashCardCss = ".card{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 0.6s ease;cursor:pointer}.card.flipped{transform:rotateY(180deg)}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;display:flex;align-items:center;justify-content:center}.card-back{transform:rotateY(180deg)}";
|
|
4
4
|
const LidoFlashCardStyle0 = lidoFlashCardCss;
|
|
@@ -76,7 +76,7 @@ const LidoFlash = /*@__PURE__*/ proxyCustomElement(class LidoFlash extends H {
|
|
|
76
76
|
}
|
|
77
77
|
/* ---------- Render ---------- */
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: 'b8f000d4e9d04d9954f81dc7e05b109dc16cb223', value: this.value, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, type: this.type, onClick: this.handleFlip, "disable-speak": this.disableSpeak }, h("div", { key: 'cea63b67d1b6a925ab0520eaa7c5166288bcd71e', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: '3517e09bb91ac4c6fb2c066539f2d4f51436938f', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: '5a14a4ab70898852046f1128c99e5a285c1c37f7', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
|
|
80
80
|
}
|
|
81
81
|
get el() { return this; }
|
|
82
82
|
static get watchers() { return {
|