lido-player 0.0.2-alpha-55-dev → 0.0.2-alpha-56-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/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_22.cjs.entry.js +138 -22
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-4b44610b.js → utils-a61cfc6b.js} +18 -10
- package/dist/collection/components/home/lido-home.js +35 -6
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +8 -6
- package/dist/collection/components/shape/lido-shape.css +90 -0
- package/dist/collection/components/shape/lido-shape.js +41 -6
- package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
- package/dist/collection/components/text/lido-text.js +26 -1
- package/dist/collection/components/trace/lido-trace.js +57 -4
- package/dist/collection/components/wrap/lido-wrap.js +1 -1
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
- package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +2 -2
- package/dist/collection/stories/Templates/blender/blender.stories.js +3 -3
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +6 -4
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +38 -32
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +2 -2
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +68 -60
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +6 -5
- package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +991 -0
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -8
- package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +144 -0
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +8 -4
- package/dist/collection/utils/constants.js +2 -0
- package/dist/collection/utils/utils.js +5 -1
- package/dist/collection/utils/utilsHandlers/clickHandler.js +1 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -1
- package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +4 -5
- 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.js +1 -1
- 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 +22 -22
- 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-36c2e21a.js → p-0712a27e.js} +17 -11
- package/dist/components/{p-2c518dbe.js → p-0a41b2f8.js} +1 -1
- package/dist/components/{p-ca8aea4b.js → p-17f84b2f.js} +1 -1
- package/dist/components/{p-590ce2c9.js → p-21852d55.js} +1 -1
- package/dist/components/{p-de2193c5.js → p-2829c82c.js} +1 -1
- package/dist/components/{p-bc5202db.js → p-330caab8.js} +2 -2
- package/dist/components/{p-9acf0fcc.js → p-480f708a.js} +1 -1
- package/dist/components/{p-3fc01453.js → p-4d332eab.js} +1 -1
- package/dist/components/{p-2e023f67.js → p-4e041807.js} +2 -2
- package/dist/components/{p-0be6b5d5.js → p-7ab0a273.js} +26 -2
- package/dist/components/{p-67a24ad4.js → p-882b291d.js} +2 -2
- package/dist/components/{p-43d79c61.js → p-9104d427.js} +1 -1
- package/dist/components/{p-b847f269.js → p-b9875116.js} +57 -4
- package/dist/components/{p-73b2bd74.js → p-c4739621.js} +3 -3
- package/dist/components/p-cca36777.js +128 -0
- package/dist/components/{p-5078599e.js → p-d1b5079b.js} +1 -1
- package/dist/components/{p-b0dbee97.js → p-e1ba0c44.js} +38 -26
- package/dist/components/{p-72d6a594.js → p-eab0ebb7.js} +1 -1
- package/dist/components/{p-b095de27.js → p-f2b53e8e.js} +2 -2
- package/dist/components/{p-c296051d.js → p-f3bc4577.js} +1 -1
- package/dist/components/{p-c69ef266.js → p-ff801ba1.js} +1 -1
- package/dist/components/{p-e534ea52.js → p-ffc40642.js} +7 -5
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +138 -22
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-ae1eb036.js → utils-7ed76799.js} +17 -11
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-a632e2ce.js → p-17d93181.js} +2 -2
- package/dist/lido-player/p-fa9dfdf8.entry.js +1 -0
- package/dist/types/components/home/lido-home.d.ts +3 -0
- package/dist/types/components/shape/lido-shape.d.ts +8 -2
- package/dist/types/components/text/lido-text.d.ts +1 -0
- package/dist/types/components/trace/lido-trace.d.ts +2 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/types/stories/Templates/fillAnswer/fill-answer.stories.d.ts +1 -1
- package/dist/types/stories/Templates/quizMaths/quizMaths.stories.d.ts +16 -0
- package/dist/types/stories/Templates/tenBox/tenBox.stories.d.ts +4 -0
- package/dist/types/utils/constants.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components/p-f8c00485.js +0 -100
- package/dist/lido-player/p-f1b879f6.entry.js +0 -1
|
@@ -40,7 +40,6 @@ function getContainerXml(args) {
|
|
|
40
40
|
const options = args.options;
|
|
41
41
|
const objective = answer;
|
|
42
42
|
const isAllowOnlyCorrect = (_a = args.isAllowOnlyCorrect) !== null && _a !== void 0 ? _a : true;
|
|
43
|
-
let tabCounter = 2;
|
|
44
43
|
const numberMap = {
|
|
45
44
|
1: "one",
|
|
46
45
|
2: "two",
|
|
@@ -61,6 +60,7 @@ function getContainerXml(args) {
|
|
|
61
60
|
</lido-image>
|
|
62
61
|
`;
|
|
63
62
|
}).join('\n');
|
|
63
|
+
let tabCounter = 8;
|
|
64
64
|
const dragCells = options
|
|
65
65
|
.map((digit, i) => {
|
|
66
66
|
return `
|
|
@@ -86,16 +86,16 @@ function getContainerXml(args) {
|
|
|
86
86
|
|
|
87
87
|
<!-- question row-->
|
|
88
88
|
<lido-cell layout="row" id="question-row" aria-hidden="true" visible="true" height="landscape.15%,portrait.15%" width="landscape.65%, portrait.90%" bg-Color="transparent" margin="landscape.185px 0px 30px 0px,portrait.25px 0px -120px 0px" onEntry="this.z-index='1'; this.justify-content='center';" gap="landscape.90px,portrait.40px">
|
|
89
|
-
<lido-text id="
|
|
89
|
+
<lido-text id="num-${number1}" tab-index="2" height="215px" width="120px" visible="true" value="${number1}" string="${number1}" font-family="'Baloo Bhai 2'" font-color="black" font-size="150px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='800'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='0';" border-image="">
|
|
90
90
|
</lido-text>
|
|
91
|
-
<lido-text id="operator-${sign}" tab-index="
|
|
91
|
+
<lido-text id="operator-${sign}" tab-index="3" height="295px" width="120px" visible="true" value="${sign}" string="${sign}" font-family="'Baloo Bhai 2'" font-color="black" font-size="195px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='800'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='0';" border-image="">
|
|
92
92
|
</lido-text>
|
|
93
|
-
<lido-text id="
|
|
93
|
+
<lido-text id="num-${number2}" tab-index="4" height="215px" width="120px" visible="true" value="${number2}" string="${number2}" font-family="'Baloo Bhai 2'" font-color="black" font-size="150px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='800'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='0';" border-image="">
|
|
94
94
|
</lido-text>
|
|
95
|
-
<lido-text id="equal" tab-index="
|
|
95
|
+
<lido-text id="equal" tab-index="5" height="215px" width="120px" visible="true" value="=" string="=" font-family="'Baloo Bhai 2'" font-color="black" font-size="150px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='800'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='0';" border-image="">
|
|
96
96
|
</lido-text>
|
|
97
|
-
<lido-image
|
|
98
|
-
<lido-text height="
|
|
97
|
+
<lido-image is-slice="true" height="225px" width="175px" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/sequence-box/card-slot_empty.png" onEntry="this.opacity='0';" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='1000';" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='1000';">
|
|
98
|
+
<lido-text id="number-${answer}" height="225px" width="175px" visible="true" tab-index="6" value="${answer}" string="?" font-family="'Baloo Bhai 2'" font-color="black" font-size="150px" type="drop" bg-color="transparent" onEntry="this.font-weight='800'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='1';">
|
|
99
99
|
</lido-text>
|
|
100
100
|
</lido-image>
|
|
101
101
|
</lido-cell>
|
|
@@ -107,7 +107,7 @@ function getContainerXml(args) {
|
|
|
107
107
|
</lido-cell>
|
|
108
108
|
|
|
109
109
|
<!-- speaking element-->
|
|
110
|
-
<lido-text id="speak-text" tab-index="
|
|
110
|
+
<lido-text id="speak-text" tab-index="20" height="100%" width="100%" visible="false" string="solve the problem by counting the teddys above and drag the correct answer" font-family="'Baloo Bhai 2'" font-color="red" font-size="75px" bg-color="transparent" onInCorrect="" onEntry="this.opacity='0'; this.speak='true';" border-image="">
|
|
111
111
|
</lido-text>
|
|
112
112
|
</lido-container>
|
|
113
113
|
</main>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/TenBox',
|
|
4
|
+
argTypes: {
|
|
5
|
+
num1: { control: 'number' },
|
|
6
|
+
num2: { control: 'number' },
|
|
7
|
+
num3: { control: 'number' },
|
|
8
|
+
operator: { control: 'select', options: ['+', '-'] },
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const TenBoxTemplate = {
|
|
13
|
+
args: {
|
|
14
|
+
num1: 13,
|
|
15
|
+
num2: 15,
|
|
16
|
+
// num3: 2,
|
|
17
|
+
operator: '+',
|
|
18
|
+
},
|
|
19
|
+
render: (args) => {
|
|
20
|
+
const xml = getContainerXml(args);
|
|
21
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const answerNumbers = (num1, num2, operator, num3) => {
|
|
25
|
+
let answer = 0;
|
|
26
|
+
if (operator === '+') {
|
|
27
|
+
answer = num1 + num2;
|
|
28
|
+
if (num3 !== undefined) {
|
|
29
|
+
answer += num3;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else if (operator === '-') {
|
|
33
|
+
answer = num1 - num2;
|
|
34
|
+
if (num3 !== undefined) {
|
|
35
|
+
answer -= num3;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return answer;
|
|
39
|
+
};
|
|
40
|
+
const renderDropBoxes = (numOfDrops) => {
|
|
41
|
+
const digits = numOfDrops.toString().split('');
|
|
42
|
+
return digits.map((digit, index) => {
|
|
43
|
+
return `<lido-text visible="true" id="drop${index}" string="?" tab-index="${index}" font-size="150px" font-color="#facf50" bg-color="#000000a5" type="drop" height="165px" width="115px" border-radius="15px" value="${digit}" onEntry="this.fontWeight='bold';"></lido-text>`;
|
|
44
|
+
}).join('');
|
|
45
|
+
};
|
|
46
|
+
const renderDragCells = () => {
|
|
47
|
+
let html = "";
|
|
48
|
+
for (let i = 0; i < 10; i++) {
|
|
49
|
+
html += `
|
|
50
|
+
<lido-text
|
|
51
|
+
visible="true"
|
|
52
|
+
id="drag${i}"
|
|
53
|
+
type="drag"
|
|
54
|
+
string="${i}"
|
|
55
|
+
value="${i}"
|
|
56
|
+
font-size="150px"
|
|
57
|
+
font-color="#3d1d0c"
|
|
58
|
+
height="165px"
|
|
59
|
+
width="115px"
|
|
60
|
+
bg-color="#f5f098"
|
|
61
|
+
border-radius="15px"
|
|
62
|
+
onEntry="this.fontWeight='bold';">
|
|
63
|
+
</lido-text>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
return html;
|
|
67
|
+
};
|
|
68
|
+
const getContainerXml = (args) => {
|
|
69
|
+
const answer = answerNumbers(args.num1, args.num2, args.operator, args.num3);
|
|
70
|
+
return `
|
|
71
|
+
<main>
|
|
72
|
+
<lido-container visible="true" objective="${answer.toString().split("").join(",")}" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/tenbox.png" is-continue-on-correct="true" onCorrect="this.sleep='1500';" drop-action="infinite-drop" id="lido-container" >
|
|
73
|
+
<lido-cell visible="true" layout="col" height="100%" width="100%" bg-color="transparent">
|
|
74
|
+
<lido-cell visible="true" layout="landscape.row, portrait.col" height="53%" width="auto" gap="20px" bg-color="transparent">
|
|
75
|
+
<lido-cell visible="true" layout="col" height="100%" width="500px" bg-color="transparent">
|
|
76
|
+
${!args.num3 && args.num1 >= 10 ? `
|
|
77
|
+
<lido-cell visible="true" height="50%" width="100%" layout="row">
|
|
78
|
+
<lido-text id="tenBox" visible="false" font-size="150px" bg-color="#fbd061" width="100%" height="70%" onEntry="this.border='4px solid #c86d29';" border-radius="20px">
|
|
79
|
+
<lido-image visible="true" is-slice="true" width="35%" height="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/sunflower.png">
|
|
80
|
+
<lido-text visible="true" string="10" font-size="145px" bg-color="transparent" onEntry="this.fontWeight='700';"></lido-text>
|
|
81
|
+
</lido-image>
|
|
82
|
+
</lido-text>
|
|
83
|
+
<lido-math-matrix visible="true" height="100%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" onEntry="this.sleep='1000'; this.display='none'; tenBox.display='flex';" defualt-fill="10" clickable="false" matrix-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png"></lido-math-matrix>
|
|
84
|
+
</lido-cell>
|
|
85
|
+
` : ``}
|
|
86
|
+
|
|
87
|
+
${!args.num3 && args.num1 === 20 ? `
|
|
88
|
+
<lido-cell visible="true" height="50%" width="100%" layout="row">
|
|
89
|
+
<lido-text id="tenBox1" visible="false" font-size="150px" bg-color="#fbd061" width="100%" height="70%" onEntry="this.border='4px solid #c86d29';" border-radius="20px">
|
|
90
|
+
<lido-image visible="true" is-slice="true" width="35%" height="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/sunflower.png">
|
|
91
|
+
<lido-text visible="true" string="10" font-size="145px" bg-color="transparent" onEntry="this.fontWeight='700';"></lido-text>
|
|
92
|
+
</lido-image>
|
|
93
|
+
</lido-text>
|
|
94
|
+
<lido-math-matrix visible="true" height="100%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" onEntry="this.sleep='1000'; this.display='none'; tenBox1.display='flex';" defualt-fill="10" clickable="false" matrix-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png"></lido-math-matrix>
|
|
95
|
+
</lido-cell>
|
|
96
|
+
` : `<lido-math-matrix visible="${args.num1 !== 10 ? true : false}" height="50%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" defualt-fill="${args.num1 > 10 ? args.num1 - 10 : args.num1}" clickable="false" matrix-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png"></lido-math-matrix>`}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
</lido-cell>
|
|
102
|
+
|
|
103
|
+
<lido-cell visible="true" layout="col" height="100%" width="500px" bg-color="transparent">
|
|
104
|
+
${!args.num3 && args.num2 >= 10 ? `
|
|
105
|
+
<lido-cell visible="true" height="50%" width="100%" layout="row">
|
|
106
|
+
<lido-text id="tenBox2" visible="false" font-size="150px" bg-color="#fbd061" width="100%" height="70%" onEntry="this.border='4px solid #c86d29';" border-radius="20px">
|
|
107
|
+
<lido-image visible="true" is-slice="true" width="35%" height="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/sunflower.png">
|
|
108
|
+
<lido-text visible="true" string="10" font-size="145px" bg-color="transparent" onEntry="this.fontWeight='700';"></lido-text>
|
|
109
|
+
</lido-image>
|
|
110
|
+
</lido-text>
|
|
111
|
+
<lido-math-matrix visible="true" height="100%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" onEntry="this.sleep='1000'; this.display='none'; tenBox2.display='flex';" defualt-fill="10" clickable="false" matrix-image="${args.operator === "+" ? `https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png` : 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/apple%20outline.png'}"></lido-math-matrix>
|
|
112
|
+
</lido-cell>
|
|
113
|
+
` : ``}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
${!args.num3 && args.num2 === 20 ? `
|
|
117
|
+
<lido-cell visible="true" height="50%" width="100%" layout="row">
|
|
118
|
+
<lido-text id="tenBox3" visible="false" font-size="150px" bg-color="#fbd061" width="100%" height="70%" onEntry="this.border='4px solid #c86d29';" border-radius="20px">
|
|
119
|
+
<lido-image visible="true" is-slice="true" width="35%" height="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/sunflower.png">
|
|
120
|
+
<lido-text visible="true" string="10" font-size="145px" bg-color="transparent" onEntry="this.fontWeight='700';"></lido-text>
|
|
121
|
+
</lido-image>
|
|
122
|
+
</lido-text>
|
|
123
|
+
<lido-math-matrix visible="true" height="100%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" onEntry="this.sleep='1000'; this.display='none'; tenBox3.display='flex';" defualt-fill="10" clickable="false" matrix-image="${args.operator === "+" ? `https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png` : 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/apple%20outline.png'}"></lido-math-matrix>
|
|
124
|
+
</lido-cell>
|
|
125
|
+
` : `<lido-math-matrix visible="${args.num2 !== 10 ? true : false}" height="50%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" defualt-fill="${args.num2 > 10 ? args.num2 - 10 : args.num2}" clickable="false" matrix-image="${args.operator === "+" ? `https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png` : 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Tenbox/apple%20outline.png'}"></lido-math-matrix>`}
|
|
126
|
+
</lido-cell>
|
|
127
|
+
${args.num3 ? `
|
|
128
|
+
<lido-cell visible="true" layout="col" height="100%" width="500px" bg-color="transparent">
|
|
129
|
+
<lido-math-matrix visible="true" height="50%" width="100%" rows="5" cols="2" border="2px solid orange" border-radius="7px" active-bg-color="white" deactive-bg-color="white" defualt-fill="${args.num3}" clickable="false" matrix-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/FoodJar/apple.png"></lido-math-matrix>
|
|
130
|
+
</lido-cell>` : ``}
|
|
131
|
+
</lido-cell>
|
|
132
|
+
<lido-cell visible="true" layout="row" height="20%" width="auto" gap="20px" bg-color="transparent">
|
|
133
|
+
<lido-text visible="true" string="${args.num1}${args.operator}${args.num2}${args.num3 ? args.operator + args.num3 : ""} = " font-size="150px" font-color="white" onEntry="this.fontWeight='bold';" onTouch="this.fontSize='20px'; this.visibility='hidden';"></lido-text>
|
|
134
|
+
${renderDropBoxes(answer)}
|
|
135
|
+
</lido-cell>
|
|
136
|
+
<lido-cell visible="true" layout="landscape.row, portrait.flex" height="landscpae.20%, portrait.30%" gap="landscape.0, portrait.80px" width="100%" bg-color="transparent">
|
|
137
|
+
|
|
138
|
+
${renderDragCells()}
|
|
139
|
+
|
|
140
|
+
</lido-cell>
|
|
141
|
+
</lido-cell>
|
|
142
|
+
</lido-container>
|
|
143
|
+
</main>`;
|
|
144
|
+
};
|
|
@@ -48,7 +48,7 @@ function getContainerXml(args) {
|
|
|
48
48
|
console.error('Trace image is missing');
|
|
49
49
|
return '';
|
|
50
50
|
}
|
|
51
|
-
let tabCounter =
|
|
51
|
+
let tabCounter = 7;
|
|
52
52
|
// Make a list [1,2,3,...,stars]
|
|
53
53
|
const starList = Array.from({ length: stars }, (_, i) => i + 1);
|
|
54
54
|
const starCells = starList
|
|
@@ -61,7 +61,7 @@ function getContainerXml(args) {
|
|
|
61
61
|
.join('');
|
|
62
62
|
return `
|
|
63
63
|
<main>
|
|
64
|
-
<lido-container id="lido-container" objective="writeNumber" tab-index="1" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/background-images/Write%20number.
|
|
64
|
+
<lido-container id="lido-container" objective="writeNumber" tab-index="1" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/background-images/Write%20number.svg" height="100%" width="100%" bg-color="transparent" visible="true" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onEntry="this.justifyContent='space-around';" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" is-continue-on-correct="true" is-allow-only-correct="${isAllowOnlyCorrect}">
|
|
65
65
|
|
|
66
66
|
<!-- Chimple Avatar -->
|
|
67
67
|
<lido-cell layout="pos" id="pos1" disable-edit="true" height="landscape.600px, portrait.700px" width="landscape.393px, portrait.485px" x="landscape.1279px, portrait.230px" y="landscape.375px, portrait.1035px" ariaHidden="true" z="1" bg-color="transparent" visible="true" onEntry="this.flex-shrink='0';">
|
|
@@ -71,9 +71,13 @@ function getContainerXml(args) {
|
|
|
71
71
|
</lido-image>
|
|
72
72
|
</lido-cell>
|
|
73
73
|
|
|
74
|
+
|
|
75
|
+
<lido-text id="invisible-text" tab-index="2" audio="" width="297px" height="80px" display="flex" onEntry="this.speak='true';" font-size="12px" z="1" font-color="black" value="trace the number as shown by pointing the figure and count the rockets." string="trace the number as shown by pointing the figure and count the rockets." visible="false" bg-color="transparent">
|
|
76
|
+
</lido-text>
|
|
77
|
+
|
|
74
78
|
<!-- text-element -->
|
|
75
79
|
<lido-cell layout="pos" id="pos2" disable-edit="true" height="landscape.80px, portrait.80px" width="landscape.297px, portrait.297px" x="landscape.645px, portrait.300px" y="landscape.90px, portrait.105px" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="this.font-weight='600';">
|
|
76
|
-
<lido-text id="txt1" tab-index="
|
|
80
|
+
<lido-text id="txt1" tab-index="3" span-type="${spanType}" audio="" width="297px" height="80px" display="flex" onEntry="this.text-align='center'; this.justify-content='center'; this.flex-shrink='0';" font="'Baloo Bhai 2'" font-size="96px" z="1" font-color="black" font-weight="600" color=" #000000" string="${text}" visible="true" y="landscape., portrait." bg-color="transparent">
|
|
77
81
|
</lido-text>
|
|
78
82
|
</lido-cell>
|
|
79
83
|
|
|
@@ -85,7 +89,7 @@ function getContainerXml(args) {
|
|
|
85
89
|
|
|
86
90
|
<!-- trace cell -->
|
|
87
91
|
<lido-cell layout="pos" id="pos3" visible="true" width="landscape.740px, portrait.740px" height="landscape.477px, portrait.477px" bg-color="transparent" onEntry="this.border-radius='6px'; this.flex-shrink='0';" x="landscape.430px, portrait.75px" y="landscape.205px, portrait.275px">
|
|
88
|
-
<lido-trace id="image2" tab-index="
|
|
92
|
+
<lido-trace id="image2" tab-index="4" value="10" audio="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Audios/1.wav; https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Audios/2.wav" visible="true" highlightTextId="txt1" svgSource="${traceImage1}; ${traceImage2}" onCorrect="star-row.highlightStarsAndDisapper='true'; lido-avatar.avatarAnimate='Success'; this.sleep='2000';" mode="${traceMode}" z="1" x="" y="" width="740px" height="477px" alt-text="{backgroundImage}">
|
|
89
93
|
</lido-trace>
|
|
90
94
|
</lido-cell>
|
|
91
95
|
|
|
@@ -17,6 +17,8 @@ export const DropToAttr = 'drop-to';
|
|
|
17
17
|
export const DropTimeAttr = 'drop-time';
|
|
18
18
|
export const LidoContainer = 'lido-container';
|
|
19
19
|
export const LangChangeEvent = 'languageChanged';
|
|
20
|
+
export const LIDO_COMMON_AUDIO_PATH = '__LIDO_COMMON_AUDIO_PATH__';
|
|
21
|
+
export const LIDO_COMMON_AUDIO_READY_EVENT = 'lidoCommonAudioPathReady';
|
|
20
22
|
export var TraceMode;
|
|
21
23
|
(function (TraceMode) {
|
|
22
24
|
TraceMode["NoFlow"] = "noFlow";
|
|
@@ -723,6 +723,7 @@ export const validateObjectiveStatus = async () => {
|
|
|
723
723
|
if (attach === 'true') {
|
|
724
724
|
appendingDragElementsInDrop();
|
|
725
725
|
}
|
|
726
|
+
storingEachActivityScore(true);
|
|
726
727
|
await executeActions(onCorrect, container);
|
|
727
728
|
}
|
|
728
729
|
if (container.getAttribute('dropAttr') === 'EnableAnimation') {
|
|
@@ -738,12 +739,12 @@ export const validateObjectiveStatus = async () => {
|
|
|
738
739
|
else {
|
|
739
740
|
const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
|
|
740
741
|
if (!isContinueOnCorrect) {
|
|
741
|
-
triggerNextContainer();
|
|
742
742
|
await calculateScore();
|
|
743
743
|
triggerNextContainer();
|
|
744
744
|
}
|
|
745
745
|
else {
|
|
746
746
|
const onInCorrect = container.getAttribute('onInCorrect');
|
|
747
|
+
storingEachActivityScore(false);
|
|
747
748
|
await executeActions(onInCorrect, container);
|
|
748
749
|
}
|
|
749
750
|
}
|
|
@@ -766,6 +767,9 @@ export function convertUrlToRelative(url) {
|
|
|
766
767
|
if ((url === null || url === void 0 ? void 0 : url.startsWith('http')) || (url === null || url === void 0 ? void 0 : url.startsWith('blob')) || (url === null || url === void 0 ? void 0 : url.startsWith('data'))) {
|
|
767
768
|
return url;
|
|
768
769
|
}
|
|
770
|
+
if (url.startsWith('/Lido-CommonAudios/')) {
|
|
771
|
+
return url;
|
|
772
|
+
}
|
|
769
773
|
if (baseUrl) {
|
|
770
774
|
const newUrl = url.startsWith('/') ? url.slice(1) : url;
|
|
771
775
|
if (newUrl.startsWith(baseUrl.replace(/^\/+|\/+$/g, '')))
|
|
@@ -9,7 +9,7 @@ export function onTouchListenerForOnTouch(element) {
|
|
|
9
9
|
return;
|
|
10
10
|
const container = document.getElementById('lido-container');
|
|
11
11
|
// const container = element.closest('lido-container') as HTMLElement;
|
|
12
|
-
if (container && container.getAttribute('
|
|
12
|
+
if (container && container.getAttribute('disable-speak') === 'true') {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
// if (element.closest('[disableSpeak="true"]')) {
|
|
@@ -281,9 +281,12 @@ export function enableDraggingWithScaling(element) {
|
|
|
281
281
|
otherElement.style.border = ''; // Reset border
|
|
282
282
|
otherElement.style.backgroundColor = 'transparent'; // Reset background color
|
|
283
283
|
}
|
|
284
|
-
if (otherElement.tagName.toLowerCase() === 'lido-image') {
|
|
284
|
+
else if (otherElement.tagName.toLowerCase() === 'lido-image') {
|
|
285
285
|
otherElement.style.opacity = '0';
|
|
286
286
|
}
|
|
287
|
+
else {
|
|
288
|
+
otherElement.style.opacity = '1';
|
|
289
|
+
}
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
292
|
else {
|
|
@@ -14,7 +14,7 @@ export function updateBalanceOnDrop(dragElement, dropElement) {
|
|
|
14
14
|
}
|
|
15
15
|
function calculateValue(elements, operation) {
|
|
16
16
|
if (elements.length === 0)
|
|
17
|
-
return
|
|
17
|
+
return null;
|
|
18
18
|
if (operation === "count") {
|
|
19
19
|
return elements.length;
|
|
20
20
|
}
|
|
@@ -46,18 +46,17 @@ function calculateValue(elements, operation) {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
export function balanceResult(container, objectiveString) {
|
|
49
|
-
var _a, _b, _c, _d, _e, _f;
|
|
50
49
|
const additionalCheck = container.getAttribute('equationCheck');
|
|
51
50
|
if (!additionalCheck)
|
|
52
51
|
return false;
|
|
53
52
|
const balanceEl = document.querySelector('lido-balance');
|
|
54
53
|
if (!balanceEl)
|
|
55
54
|
return false;
|
|
56
|
-
const leftVal =
|
|
57
|
-
const rightVal =
|
|
55
|
+
const leftVal = balanceEl.leftVal;
|
|
56
|
+
const rightVal = balanceEl.rightVal;
|
|
58
57
|
const hasLeft = !isNaN(leftVal);
|
|
59
58
|
const hasRight = !isNaN(rightVal);
|
|
60
|
-
if (
|
|
59
|
+
if (leftVal == null || rightVal == null) {
|
|
61
60
|
return false;
|
|
62
61
|
}
|
|
63
62
|
const symbol = leftVal > rightVal ? '>' : leftVal < rightVal ? '<' : '=';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-
|
|
1
|
+
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-0712a27e.js';
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-0712a27e.js';
|
|
2
2
|
import { i as instance } from './p-73e3f0f4.js';
|
|
3
|
-
import { d as defineCustomElement$m } from './p-
|
|
4
|
-
import { d as defineCustomElement$l } from './p-
|
|
5
|
-
import { d as defineCustomElement$k } from './p-
|
|
6
|
-
import { d as defineCustomElement$j } from './p-
|
|
7
|
-
import { d as defineCustomElement$i } from './p-
|
|
8
|
-
import { d as defineCustomElement$h } from './p-
|
|
9
|
-
import { d as defineCustomElement$g } from './p-
|
|
10
|
-
import { d as defineCustomElement$f } from './p-
|
|
11
|
-
import { d as defineCustomElement$e } from './p-
|
|
12
|
-
import { d as defineCustomElement$d } from './p-
|
|
13
|
-
import { d as defineCustomElement$c } from './p-
|
|
14
|
-
import { d as defineCustomElement$b } from './p-
|
|
15
|
-
import { d as defineCustomElement$a } from './p-
|
|
16
|
-
import { d as defineCustomElement$9 } from './p-
|
|
17
|
-
import { d as defineCustomElement$8 } from './p-
|
|
18
|
-
import { d as defineCustomElement$7 } from './p-
|
|
19
|
-
import { d as defineCustomElement$6 } from './p-
|
|
20
|
-
import { d as defineCustomElement$5 } from './p-
|
|
21
|
-
import { d as defineCustomElement$4 } from './p-
|
|
22
|
-
import { d as defineCustomElement$3 } from './p-
|
|
23
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$m } from './p-0a41b2f8.js';
|
|
4
|
+
import { d as defineCustomElement$l } from './p-21852d55.js';
|
|
5
|
+
import { d as defineCustomElement$k } from './p-c4739621.js';
|
|
6
|
+
import { d as defineCustomElement$j } from './p-882b291d.js';
|
|
7
|
+
import { d as defineCustomElement$i } from './p-f3bc4577.js';
|
|
8
|
+
import { d as defineCustomElement$h } from './p-eab0ebb7.js';
|
|
9
|
+
import { d as defineCustomElement$g } from './p-d1b5079b.js';
|
|
10
|
+
import { d as defineCustomElement$f } from './p-480f708a.js';
|
|
11
|
+
import { d as defineCustomElement$e } from './p-17f84b2f.js';
|
|
12
|
+
import { d as defineCustomElement$d } from './p-e1ba0c44.js';
|
|
13
|
+
import { d as defineCustomElement$c } from './p-ff801ba1.js';
|
|
14
|
+
import { d as defineCustomElement$b } from './p-330caab8.js';
|
|
15
|
+
import { d as defineCustomElement$a } from './p-ffc40642.js';
|
|
16
|
+
import { d as defineCustomElement$9 } from './p-4d332eab.js';
|
|
17
|
+
import { d as defineCustomElement$8 } from './p-9104d427.js';
|
|
18
|
+
import { d as defineCustomElement$7 } from './p-2829c82c.js';
|
|
19
|
+
import { d as defineCustomElement$6 } from './p-cca36777.js';
|
|
20
|
+
import { d as defineCustomElement$5 } from './p-f2b53e8e.js';
|
|
21
|
+
import { d as defineCustomElement$4 } from './p-7ab0a273.js';
|
|
22
|
+
import { d as defineCustomElement$3 } from './p-b9875116.js';
|
|
23
|
+
import { d as defineCustomElement$2 } from './p-4e041807.js';
|
|
24
24
|
|
|
25
25
|
const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
26
26
|
constructor() {
|