lido-player 0.0.2-alpha-53-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 +141 -23
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-3c1ce74e.js → utils-a61cfc6b.js} +41 -12
- package/dist/collection/components/calculator/lido-calculator.js +4 -2
- 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/customEvents.js +1 -0
- package/dist/collection/utils/utils.js +7 -1
- package/dist/collection/utils/utilsHandlers/animationHandler.js +21 -1
- package/dist/collection/utils/utilsHandlers/clickHandler.js +1 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -3
- 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-511377d2.js → p-0712a27e.js} +39 -13
- package/dist/components/{p-df1af62c.js → p-0a41b2f8.js} +1 -1
- package/dist/components/{p-d568d595.js → p-17f84b2f.js} +1 -1
- package/dist/components/{p-09b3b152.js → p-21852d55.js} +1 -1
- package/dist/components/{p-561908ec.js → p-2829c82c.js} +1 -1
- package/dist/components/{p-71ded596.js → p-330caab8.js} +2 -2
- package/dist/components/{p-8774f517.js → p-480f708a.js} +1 -1
- package/dist/components/{p-cca545f9.js → p-4d332eab.js} +1 -1
- package/dist/components/{p-92b9ae9e.js → p-4e041807.js} +2 -2
- package/dist/components/{p-b3e67e7f.js → p-7ab0a273.js} +26 -2
- package/dist/components/{p-567983a9.js → p-882b291d.js} +2 -2
- package/dist/components/{p-875c1411.js → p-9104d427.js} +1 -1
- package/dist/components/{p-3e8ae1c5.js → p-b9875116.js} +57 -4
- package/dist/components/{p-004adc43.js → p-c4739621.js} +6 -4
- package/dist/components/p-cca36777.js +128 -0
- package/dist/components/{p-9ea1a67d.js → p-d1b5079b.js} +1 -1
- package/dist/components/{p-057fb7b8.js → p-e1ba0c44.js} +38 -26
- package/dist/components/{p-3f0e4436.js → p-eab0ebb7.js} +1 -1
- package/dist/components/{p-90f7dd48.js → p-f2b53e8e.js} +2 -2
- package/dist/components/{p-d2fe2bb6.js → p-f3bc4577.js} +1 -1
- package/dist/components/{p-6beee44b.js → p-ff801ba1.js} +1 -1
- package/dist/components/{p-23549651.js → p-ffc40642.js} +7 -5
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +141 -23
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-eefe4a1c.js → utils-7ed76799.js} +39 -13
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-589fc3b8.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-0733b277.js +0 -100
- package/dist/lido-player/p-4d9ad047.entry.js +0 -1
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/quizMaths',
|
|
4
|
+
argTypes: {
|
|
5
|
+
questions: { control: 'object' },
|
|
6
|
+
answers: { control: 'object' },
|
|
7
|
+
images: { control: 'object' },
|
|
8
|
+
isAllowOnlyCorrect: { control: 'boolean' },
|
|
9
|
+
isContinueOnCorrect: { control: 'boolean' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const operationsWithObjects = {
|
|
14
|
+
args: {
|
|
15
|
+
questions: ['1', '+', '9', '+', '10', '=', '?'],
|
|
16
|
+
answers: ['20'],
|
|
17
|
+
images: [
|
|
18
|
+
'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/GroupSum/ball_fishtank.png',
|
|
19
|
+
'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/total/stone_04.png',
|
|
20
|
+
'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/total/stone_05.png',
|
|
21
|
+
],
|
|
22
|
+
isAllowOnlyCorrect: true,
|
|
23
|
+
isContinueOnCorrect: true,
|
|
24
|
+
},
|
|
25
|
+
render: args => {
|
|
26
|
+
const xml = getContainerXml(args);
|
|
27
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export const operationsWithoutObjects = {
|
|
31
|
+
args: {
|
|
32
|
+
questions: ['31', '+', '20', '=', '?'],
|
|
33
|
+
answers: ['51'],
|
|
34
|
+
isAllowOnlyCorrect: true,
|
|
35
|
+
isContinueOnCorrect: true,
|
|
36
|
+
},
|
|
37
|
+
render: args => {
|
|
38
|
+
const xml = getContainerXml(args);
|
|
39
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
function getContainerXml(args) {
|
|
43
|
+
const { questions = [], images = [], isAllowOnlyCorrect = true, isContinueOnCorrect = true } = args;
|
|
44
|
+
// Number of images = first & third question elements
|
|
45
|
+
const count1 = Number(questions[0]); // e.g., 11
|
|
46
|
+
const count2 = Number(questions[2]); // e.g., 9
|
|
47
|
+
const count3 = Number(questions[4]);
|
|
48
|
+
// Helper: repeat images dynamically
|
|
49
|
+
const repeatImages = (count, src) => Array.from({ length: count })
|
|
50
|
+
.map(() => `
|
|
51
|
+
<lido-image type="text" margin="" id=""
|
|
52
|
+
visible="true" src="${src}" height="80px" width="80px">
|
|
53
|
+
</lido-image>`)
|
|
54
|
+
.join('');
|
|
55
|
+
// FULL continuous image sequence
|
|
56
|
+
// FULL continuous image sequence with visibility condition
|
|
57
|
+
const FinalImageRows = images.length > 0
|
|
58
|
+
? `
|
|
59
|
+
${repeatImages(count1, images[0])}
|
|
60
|
+
${repeatImages(count2, images[1])}
|
|
61
|
+
${repeatImages(count3, images[2])}
|
|
62
|
+
`
|
|
63
|
+
: '';
|
|
64
|
+
// Generate question labels ("11 + 9 = ?")
|
|
65
|
+
const QuestionCells = questions
|
|
66
|
+
.map(question => {
|
|
67
|
+
return `
|
|
68
|
+
<lido-text id="" tab-index="2" width="114px" visible="true"
|
|
69
|
+
value="${question}" string="${question}"
|
|
70
|
+
font-family="'Baloo Bhai 2'" font-color="black"
|
|
71
|
+
font-size="landscape.130px, portrait.100px"
|
|
72
|
+
bg-color="transparent" onEntry="this.fontWeight='800';">
|
|
73
|
+
</lido-text>`;
|
|
74
|
+
})
|
|
75
|
+
.join('');
|
|
76
|
+
return `
|
|
77
|
+
<main>
|
|
78
|
+
<lido-container visible="true" id="lido-container" onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" is-allow-only-correct="${isAllowOnlyCorrect}" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" objective="${args.answers[0]}" is-continue-on-correct="${isContinueOnCorrect}" show-Check="true">
|
|
79
|
+
|
|
80
|
+
<!--Chimple Avatar -->
|
|
81
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.370px,portrait.332px" width="landscape.342px,portrait.320px" x="landscape.27%, portrait.-4%" y="landscape.34%, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true">
|
|
82
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
83
|
+
</lido-avatar>
|
|
84
|
+
</lido-cell>
|
|
85
|
+
|
|
86
|
+
<lido-cell layout="landscape.row,portrait.col" visible="true" width="90%" height="90%" bg-color="transparent">
|
|
87
|
+
|
|
88
|
+
<lido-cell layout="col" visible="true" margin="landscape.72px 0px 0px 32px,portrait.0px" height="700px" width="900px" bg-color="transparent">
|
|
89
|
+
|
|
90
|
+
<!-- WRAPPED IMAGE GRID -->
|
|
91
|
+
<lido-cell layout="col" visible="true"
|
|
92
|
+
margin="landscape.-150px 0px 0px 0px,portrait.0px"
|
|
93
|
+
height="200px" width="97%" bg-color="transparent"
|
|
94
|
+
onEntry="this.justifyContent='flex-start'; this.alignItems='center';">
|
|
95
|
+
|
|
96
|
+
<lido-cell layout="row" visible="true" margin="landscape.0px, portrait.58px -36px 0px 0px"
|
|
97
|
+
height="auto" width="100%" bg-color="transparent"
|
|
98
|
+
onEntry="
|
|
99
|
+
this.justifyContent='flex-start';
|
|
100
|
+
this.alignItems='flex-start';
|
|
101
|
+
this.flexWrap='wrap';"
|
|
102
|
+
gap="4px">
|
|
103
|
+
${FinalImageRows}
|
|
104
|
+
</lido-cell>
|
|
105
|
+
|
|
106
|
+
</lido-cell>
|
|
107
|
+
|
|
108
|
+
<!-- Question text row -->
|
|
109
|
+
<lido-cell layout="row" visible="true"
|
|
110
|
+
margin="landscape.107px 0px -82px 0px, portrait.0px"
|
|
111
|
+
height="126px" width="96%" bg-color="transparent"
|
|
112
|
+
onEntry="this.justifyContent='center';">
|
|
113
|
+
${QuestionCells}
|
|
114
|
+
</lido-cell>
|
|
115
|
+
|
|
116
|
+
</lido-cell>
|
|
117
|
+
|
|
118
|
+
<!-- Calculator -->
|
|
119
|
+
<lido-cell layout="col" visible="true"
|
|
120
|
+
margin="landscape.0px,portrait.0px -100px 0px 0px"
|
|
121
|
+
height="751px" width="500px" bg-color="transparent">
|
|
122
|
+
<lido-text visible="true" bg-color="#60DADA"
|
|
123
|
+
height="100px" width="456px" string="How many??"
|
|
124
|
+
onEntry="this.border='5px solid #029A9A';this.border-radius='10px';this.font-size='40px';this.font-weight='600';">
|
|
125
|
+
</lido-text>
|
|
126
|
+
|
|
127
|
+
<lido-calculator visible="true" height="650px"
|
|
128
|
+
y="26px" width="456px" onEntry="this.position='relative';">
|
|
129
|
+
</lido-calculator>
|
|
130
|
+
</lido-cell>
|
|
131
|
+
|
|
132
|
+
</lido-cell>
|
|
133
|
+
|
|
134
|
+
</lido-container>
|
|
135
|
+
</main>`;
|
|
136
|
+
}
|
|
137
|
+
export const biggerAndSmaller = {
|
|
138
|
+
args: {
|
|
139
|
+
questions: 'Which group is bigger?',
|
|
140
|
+
numbers: ['10', '5'],
|
|
141
|
+
answer1: ['10'],
|
|
142
|
+
images: [
|
|
143
|
+
'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/total/stone_01.png',
|
|
144
|
+
'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/total/stone_04.png',
|
|
145
|
+
],
|
|
146
|
+
isAllowOnlyCorrect: true,
|
|
147
|
+
isContinueOnCorrect: true,
|
|
148
|
+
},
|
|
149
|
+
render: args => {
|
|
150
|
+
const xml = getContainerXml1(args);
|
|
151
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
export const biggestAndSmallest = {
|
|
155
|
+
args: {
|
|
156
|
+
questions: 'Which is the biggest?',
|
|
157
|
+
numbers: ['40', '50'],
|
|
158
|
+
answer2: ['50'],
|
|
159
|
+
isAllowOnlyCorrect: true,
|
|
160
|
+
isContinueOnCorrect: true,
|
|
161
|
+
},
|
|
162
|
+
render: args => {
|
|
163
|
+
const xml = getContainerXml1(args);
|
|
164
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
function getContainerXml1(args) {
|
|
168
|
+
const QuestionCells = args.numbers
|
|
169
|
+
.map(number => {
|
|
170
|
+
return `
|
|
171
|
+
<lido-text id="text1" tab-index="2" width="300px" height="300px" visible="true" value="${number}" string="${number}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color="orange"
|
|
172
|
+
onEntry="this.fontWeight='800'; this.border-radius='15px'" type="click">
|
|
173
|
+
</lido-text> `;
|
|
174
|
+
})
|
|
175
|
+
.join('');
|
|
176
|
+
const [count1, count2] = args.numbers.map(n => Number(n));
|
|
177
|
+
// Helper: repeat images inside a lido-cell
|
|
178
|
+
const makeImageBlock = (count, src) => `
|
|
179
|
+
<lido-cell layout="row" visible="true"
|
|
180
|
+
margin="landscape.0px, portrait.64px 0px 0px 0px"
|
|
181
|
+
height="74%" width="landscape.40%,portrait.46%"
|
|
182
|
+
bg-color="orange"
|
|
183
|
+
onEntry="this.justifyContent='flex-start'; this.align-items='flex-start'; this.border-radius='15px'; this.padding='14px'"
|
|
184
|
+
type="click" value="${count}">
|
|
185
|
+
|
|
186
|
+
${Array.from({ length: count })
|
|
187
|
+
.map(() => `
|
|
188
|
+
<lido-image type="text" margin="" id=""
|
|
189
|
+
visible="true" src="${src}"
|
|
190
|
+
height="80px" width="80px">
|
|
191
|
+
</lido-image>`)
|
|
192
|
+
.join('')}
|
|
193
|
+
|
|
194
|
+
</lido-cell>
|
|
195
|
+
`;
|
|
196
|
+
// Make sure images exist and at least 2 sources are provided
|
|
197
|
+
const hasImages = Array.isArray(args.images) && args.images.length >= 2;
|
|
198
|
+
let ImageCells = '';
|
|
199
|
+
if (hasImages) {
|
|
200
|
+
// Images exist → build image cells safely
|
|
201
|
+
ImageCells = `
|
|
202
|
+
${makeImageBlock(count1, args.images[0])}
|
|
203
|
+
${makeImageBlock(count2, args.images[1])}
|
|
204
|
+
`;
|
|
205
|
+
}
|
|
206
|
+
return `
|
|
207
|
+
<main>
|
|
208
|
+
|
|
209
|
+
<lido-container visible="true" id="lido-container" onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" objective="${hasImages ? args.answer1 : args.answer2}" is-continue-on-correct="${args.isContinueOnCorrect}" is-allow-only-correct="${args.isAllowOnlyCorrect}" custom-style="#question{box-shadow: none !important;}">
|
|
210
|
+
|
|
211
|
+
<!-- Chimple Avatar -->
|
|
212
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.344px,portrait.402px" width="landscape.310px,portrait.398px" x="landscape.86%, portrait.28%" y="landscape.66%, portrait.72%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
213
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
214
|
+
</lido-avatar>
|
|
215
|
+
</lido-cell>
|
|
216
|
+
|
|
217
|
+
<lido-cell layout="landscape.col,portrait.col" visible="true" width="landscape.94%, portrait.100%" height="landscape.90%,portrait.50%" bg-color="transparent" onEntry="this.justifyContent='space-between';" margin="landscape.82px 0px 0px -138px,portrait.-230px 0px 0px 0px">
|
|
218
|
+
|
|
219
|
+
<lido-cell layout="row" visible="true" margin="landscape.0px, portrait.64px 0px 0px 0px" height="126px" width="landscape.96%,portrait.100%" bg-color="transparent" onEntry="this.justifyContent='center';">
|
|
220
|
+
<lido-text id="question" tab-index="2" visible="true" value="10" string="${args.questions}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.100px, portrait.84px" bg-color="transparent"
|
|
221
|
+
onEntry="this.fontWeight='800'; this.speak='true';">
|
|
222
|
+
</lido-text>
|
|
223
|
+
</lido-cell>
|
|
224
|
+
|
|
225
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px';" height="80%" width="landscape.100%,portrait.100%" bg-color="transparent">
|
|
226
|
+
|
|
227
|
+
${hasImages ? ImageCells : QuestionCells}
|
|
228
|
+
|
|
229
|
+
</lido-cell>
|
|
230
|
+
</lido-cell>
|
|
231
|
+
</lido-container>
|
|
232
|
+
|
|
233
|
+
</main>`;
|
|
234
|
+
}
|
|
235
|
+
export const Shapes = {
|
|
236
|
+
args: {
|
|
237
|
+
question1: 'Which is circle?',
|
|
238
|
+
answer: ['circle'],
|
|
239
|
+
options: ["cube", "rectangle", "circle", "cylinder"],
|
|
240
|
+
isAllowOnlyCorrect: true,
|
|
241
|
+
isContinueOnCorrect: true,
|
|
242
|
+
},
|
|
243
|
+
render: args => {
|
|
244
|
+
const xml = getContainerXml2(args);
|
|
245
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
export const how_many = {
|
|
249
|
+
args: {
|
|
250
|
+
question2: ['100', '9', '8', '7'],
|
|
251
|
+
answer: ['100'],
|
|
252
|
+
images: ['https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/total/stone_01.png'],
|
|
253
|
+
isAllowOnlyCorrect: true,
|
|
254
|
+
isContinueOnCorrect: true,
|
|
255
|
+
},
|
|
256
|
+
render: args => {
|
|
257
|
+
const xml = getContainerXml2(args);
|
|
258
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
export const number_identification = {
|
|
262
|
+
args: {
|
|
263
|
+
question2: ['10', '9', '8', '7'],
|
|
264
|
+
answer: ['10'],
|
|
265
|
+
isAllowOnlyCorrect: true,
|
|
266
|
+
isContinueOnCorrect: true,
|
|
267
|
+
},
|
|
268
|
+
render: args => {
|
|
269
|
+
const xml = getContainerXml2(args);
|
|
270
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
function getContainerXml2(args) {
|
|
274
|
+
var _a;
|
|
275
|
+
// FIXED: works for Shapes + Single Digit + Two Digit
|
|
276
|
+
const hasImages = Array.isArray(args.images) && args.images.length > 0;
|
|
277
|
+
// ---------------------- QUESTION CELLS ----------------------
|
|
278
|
+
const QuestionCellForShapes = `
|
|
279
|
+
<lido-text visible="true" margin="landscape.-242px 0px 0px 0px,portrait.-46px 0px 0px 0px" id="text11"
|
|
280
|
+
onEntry="this.border-radius='14px';" bg-color="" onTouch="this.speak='true';" string="${args.question1}" font-color="white"
|
|
281
|
+
font-size="1px">
|
|
282
|
+
<lido-image visible="true"
|
|
283
|
+
src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg"
|
|
284
|
+
width="96px">
|
|
285
|
+
</lido-image>
|
|
286
|
+
</lido-text>
|
|
287
|
+
<lido-text id="question" tab-index="2" visible="true"
|
|
288
|
+
value="${args.question1 || ''}"
|
|
289
|
+
string="${args.question1 || ''}"
|
|
290
|
+
font-family="'Baloo Bhai 2'"
|
|
291
|
+
font-color="black"
|
|
292
|
+
font-size="landscape.100px, portrait.84px"
|
|
293
|
+
bg-color="transparent"
|
|
294
|
+
onEntry="this.fontWeight='800';">
|
|
295
|
+
</lido-text>
|
|
296
|
+
`;
|
|
297
|
+
const QuestionCellForHowMany = `
|
|
298
|
+
<lido-text visible="true" margin="landscape.-242px 0px 0px 0px,portrait.-46px 0px 0px 0px" id="text11"
|
|
299
|
+
onEntry="this.border-radius='14px';" bg-color="" onTouch="this.speak='true';" string="${args.answer}" font-color="white"
|
|
300
|
+
font-size="1px">
|
|
301
|
+
<lido-image visible="true"
|
|
302
|
+
src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg"
|
|
303
|
+
width="96px">
|
|
304
|
+
</lido-image>
|
|
305
|
+
</lido-text>
|
|
306
|
+
<lido-cell visible="true" margin=""
|
|
307
|
+
onEntry="this.border-radius='14px';this.display='flex';this.speak='true';this.justifyContent='flex-start'; this.flexWrap='wrap';"
|
|
308
|
+
padding="0px 0px 0px 12px" height="auto" width="landscape.100%,portrait.100%" bg-color="white" string="${args.answer}"
|
|
309
|
+
font-size="1px" gap="2px">
|
|
310
|
+
${Array.from({ length: Number(((_a = args.answer) === null || _a === void 0 ? void 0 : _a[0]) || 0) })
|
|
311
|
+
.map(() => {
|
|
312
|
+
var _a;
|
|
313
|
+
return `
|
|
314
|
+
<lido-image type="text" visible="true" src="${(_a = args.images) === null || _a === void 0 ? void 0 : _a[0]}" width="landscape.67px,portrait.50px"></lido-image>
|
|
315
|
+
`;
|
|
316
|
+
})
|
|
317
|
+
.join('')}
|
|
318
|
+
|
|
319
|
+
</lido-cell>
|
|
320
|
+
`;
|
|
321
|
+
const QuestionCellForNumberIdentification = `
|
|
322
|
+
<lido-text visible="true" margin="landscape.0px,portrait.0px"
|
|
323
|
+
onEntry="this.border-radius='14px';"
|
|
324
|
+
height="177px"
|
|
325
|
+
width="landscape.236px,portrait.34%"
|
|
326
|
+
bg-color=""
|
|
327
|
+
onTouch="this.speak='true';"
|
|
328
|
+
string="${args.answer}"
|
|
329
|
+
font-color="white"
|
|
330
|
+
font-size="1px">
|
|
331
|
+
<lido-image visible="true"
|
|
332
|
+
src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg"
|
|
333
|
+
width="100%">
|
|
334
|
+
</lido-image>
|
|
335
|
+
</lido-text>
|
|
336
|
+
`;
|
|
337
|
+
// ---------------------- SHAPES OPTIONS ----------------------
|
|
338
|
+
const ImageCellsForShapes = args.options && args.options.length > 0
|
|
339
|
+
? `
|
|
340
|
+
<!-- Render Shape Options -->
|
|
341
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true"
|
|
342
|
+
margin="landscape.-46px 0px 0px -94px,portrait.0"
|
|
343
|
+
onEntry="this.border-radius='26px';"
|
|
344
|
+
height="landscape.390px,portrait.46%"
|
|
345
|
+
width="landscape.92%,portrait.100%"
|
|
346
|
+
bg-color="transparent">
|
|
347
|
+
|
|
348
|
+
<lido-cell layout="row" visible="true" onEntry="this.border-radius='26px';"
|
|
349
|
+
height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
350
|
+
|
|
351
|
+
<lido-shape class="shape" id="${args.options[0]}1" shapeType="lido-${args.options[0]}"
|
|
352
|
+
x="landscape.7%, portrait.10%" y="${args.options[0] === 'cube' ? 'landscape.58%, portrait.36%' : args.options[0] === 'cylinder' ? 'landscape.52%, portrait.36%' : args.options[0] === 'rectangle' ? 'landscape.61%, portrait.36%' : 'landscape.51%, portrait.36%'}"
|
|
353
|
+
width="${args.options[0] === 'cube'
|
|
354
|
+
? 'landscape.200px,portrait.200px'
|
|
355
|
+
: args.options[0] === 'rectangle'
|
|
356
|
+
? 'landscape.232px,portrait.312px'
|
|
357
|
+
: 'landscape.268px,portrait.300px'}"
|
|
358
|
+
|
|
359
|
+
height="${args.options[0] === 'cube'
|
|
360
|
+
? 'landscape.200px,portrait.200px'
|
|
361
|
+
: args.options[0] === 'rectangle'
|
|
362
|
+
? 'landscape.144px,portrait.224px'
|
|
363
|
+
: 'landscape.268px,portrait.300px'}"
|
|
364
|
+
bgColor="blue" value="${args.options[0]}" type="click" visible="true"></lido-shape>
|
|
365
|
+
|
|
366
|
+
<lido-shape class="shape" id="${args.options[1]}" shapeType="lido-${args.options[1]}"
|
|
367
|
+
x="landscape.30%,portrait.55%" y="${args.options[1] === 'cube' ? 'landscape.58%, portrait.36%' : args.options[1] === 'cylinder' ? 'landscape.52%, portrait.36%' : args.options[1] === 'rectangle' ? 'landscape.61%, portrait.36%' : 'landscape.51%, portrait.36%'}"
|
|
368
|
+
width="${args.options[1] === 'cube'
|
|
369
|
+
? 'landscape.200px,portrait.200px'
|
|
370
|
+
: args.options[1] === 'rectangle'
|
|
371
|
+
? 'landscape.232px,portrait.312px'
|
|
372
|
+
: 'landscape.268px,portrait.300px'}"
|
|
373
|
+
|
|
374
|
+
height="${args.options[1] === 'cube'
|
|
375
|
+
? 'landscape.200px,portrait.200px'
|
|
376
|
+
: args.options[1] === 'rectangle'
|
|
377
|
+
? 'landscape.144px,portrait.224px'
|
|
378
|
+
: 'landscape.268px,portrait.300px'}"
|
|
379
|
+
bgColor="blue" value="${args.options[1]}" type="click" visible="true"></lido-shape>
|
|
380
|
+
</lido-cell>
|
|
381
|
+
|
|
382
|
+
<lido-cell layout="row" visible="true" onEntry="this.border-radius='26px';"
|
|
383
|
+
height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
384
|
+
|
|
385
|
+
<lido-shape class="shape" id="${args.options[2]}" shapeType="lido-${args.options[2]}"
|
|
386
|
+
x="landscape.53%, portrait.8%" y="${args.options[2] === 'cube' ? 'landscape.58%, portrait.60%' : args.options[2] === 'cylinder' ? 'landscape.52%, portrait.60%' : args.options[2] === 'rectangle' ? 'landscape.61%, portrait.60%' : 'landscape.51%, portrait.60%'}"
|
|
387
|
+
width="${args.options[2] === 'cube'
|
|
388
|
+
? 'landscape.200px,portrait.300px'
|
|
389
|
+
: args.options[2] === 'rectangle'
|
|
390
|
+
? 'landscape.232px,portrait.312px'
|
|
391
|
+
: 'landscape.268px,portrait.300px'}"
|
|
392
|
+
|
|
393
|
+
height="${args.options[2] === 'cube'
|
|
394
|
+
? 'landscape.200px,portrait.300px'
|
|
395
|
+
: args.options[2] === 'rectangle'
|
|
396
|
+
? 'landscape.144px,portrait.224px'
|
|
397
|
+
: 'landscape.268px,portrait.300px'}"
|
|
398
|
+
bgColor="blue" value="${args.options[2]}" type="click" visible="true"></lido-shape>
|
|
399
|
+
|
|
400
|
+
<lido-shape class="shape" id="${args.options[3]}" shapeType="lido-${args.options[3]}"
|
|
401
|
+
x="landscape.75%,portrait.56%" y="${args.options[3] === 'cube' ? 'landscape.58%, portrait.60%' : args.options[3] === 'cylinder' ? 'landscape.52%, portrait.60%' : args.options[3] === 'rectangle' ? 'landscape.61%, portrait.60%' : 'landscape.51%, portrait.60%'}"
|
|
402
|
+
width="${args.options[3] === 'cube'
|
|
403
|
+
? 'landscape.200px,portrait.300px'
|
|
404
|
+
: args.options[3] === 'rectangle'
|
|
405
|
+
? 'landscape.232px,portrait.312px'
|
|
406
|
+
: 'landscape.268px,portrait.300px'}"
|
|
407
|
+
|
|
408
|
+
height="${args.options[3] === 'cube'
|
|
409
|
+
? 'landscape.100px,portrait.300px'
|
|
410
|
+
: args.options[3] === 'rectangle'
|
|
411
|
+
? 'landscape.144px,portrait.224px'
|
|
412
|
+
: 'landscape.268px,portrait.300px'}"
|
|
413
|
+
bgColor="blue" value="${args.options[3]}" type="click" visible="true"></lido-shape>
|
|
414
|
+
</lido-cell>
|
|
415
|
+
|
|
416
|
+
</lido-cell>
|
|
417
|
+
`
|
|
418
|
+
: '';
|
|
419
|
+
// ---------------------- OPTIONS FOR NUMBERS ----------------------
|
|
420
|
+
const OptionCellsForHowManySingleAndTwoDigit = (() => {
|
|
421
|
+
if (!Array.isArray(args.question2))
|
|
422
|
+
return '';
|
|
423
|
+
const q = args.question2;
|
|
424
|
+
const left = q.slice(0, 2);
|
|
425
|
+
const right = q.slice(2, 4);
|
|
426
|
+
const renderOption = v => `
|
|
427
|
+
<lido-cell layout="row" visible="true" margin=""
|
|
428
|
+
onEntry="this.border-radius='14px';"
|
|
429
|
+
height="228px"
|
|
430
|
+
width="266px"
|
|
431
|
+
bg-color="orange"
|
|
432
|
+
type="click"
|
|
433
|
+
value="${v}">
|
|
434
|
+
<lido-text visible="true" value="${v}" string="${v}"
|
|
435
|
+
font-family="'Baloo Bhai 2'"
|
|
436
|
+
font-color="black"
|
|
437
|
+
font-size="landscape.130px, portrait.100px"
|
|
438
|
+
bg-color="orange"
|
|
439
|
+
onEntry="this.fontWeight='800';">
|
|
440
|
+
</lido-text>
|
|
441
|
+
</lido-cell>
|
|
442
|
+
`;
|
|
443
|
+
return `
|
|
444
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px 90px 0px 0px,portrait.0px"
|
|
445
|
+
onEntry="this.border-radius='26px';"
|
|
446
|
+
height="landscape.390px,portrait.46%"
|
|
447
|
+
width="landscape.92%,portrait.100%"
|
|
448
|
+
bg-color="transparent">
|
|
449
|
+
|
|
450
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px';" height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
451
|
+
${left.map(renderOption).join('')}
|
|
452
|
+
</lido-cell>
|
|
453
|
+
|
|
454
|
+
<lido-cell layout="row" visible="true" margin=""
|
|
455
|
+
onEntry="this.border-radius='26px';"
|
|
456
|
+
height="landcape.100%,portrait.50%"
|
|
457
|
+
width="landscape.50%,portrait.100%"
|
|
458
|
+
bg-color="transparent">
|
|
459
|
+
${right.map(renderOption).join('')}
|
|
460
|
+
</lido-cell>
|
|
461
|
+
|
|
462
|
+
</lido-cell>
|
|
463
|
+
`;
|
|
464
|
+
})();
|
|
465
|
+
// ---------------------- FINAL RENDER LOGIC ----------------------
|
|
466
|
+
const SelectedQuestionCell = args.question1 ? QuestionCellForShapes : hasImages ? QuestionCellForHowMany : QuestionCellForNumberIdentification;
|
|
467
|
+
const SelectedOptions = OptionCellsForHowManySingleAndTwoDigit;
|
|
468
|
+
// ---------------------- FINAL XML ----------------------
|
|
469
|
+
return `
|
|
470
|
+
<main>
|
|
471
|
+
<lido-container visible="true" id="lido-container"
|
|
472
|
+
onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';"
|
|
473
|
+
bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" objective="${args.answer}" is-continue-on-correct="${args.isContinueOnCorrect}" is-allow-only-correct="${args.isAllowOnlyCorrect}" custom-style= "#text11, .shape {box-shadow: none !important;}">
|
|
474
|
+
|
|
475
|
+
<!-- Chimple Avatar -->
|
|
476
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.344px,portrait.402px" width="landscape.296px,portrait.398px" x="landscape.87%, portrait.28%" y="landscape.67%, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
477
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
478
|
+
</lido-avatar>
|
|
479
|
+
</lido-cell>
|
|
480
|
+
|
|
481
|
+
<!-- Question -->
|
|
482
|
+
<lido-cell layout="row" visible="true" margin="landscape.0px 0px 0px -64px, portrait.-170px 0px 0px 0px" height="348px" width="landscape.95%,portrait.100%" bg-color="transparent" onEntry="this.justifyContent='center';">
|
|
483
|
+
${SelectedQuestionCell}
|
|
484
|
+
</lido-cell>
|
|
485
|
+
|
|
486
|
+
<!-- Options -->
|
|
487
|
+
|
|
488
|
+
${args.options && args.options.length > 0
|
|
489
|
+
? `
|
|
490
|
+
${ImageCellsForShapes}
|
|
491
|
+
`
|
|
492
|
+
: `${SelectedOptions}`}
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
</lido-container>
|
|
496
|
+
</main>
|
|
497
|
+
`;
|
|
498
|
+
}
|
|
499
|
+
export const word_problem = {
|
|
500
|
+
args: {
|
|
501
|
+
question2: 'George went to a store and bought some t-shirts. He went to another store and bought 2 more t-shirts. He bought a total of 15 t-shirts. How many t-shirts did he buy at the first store?',
|
|
502
|
+
answer: '13',
|
|
503
|
+
options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
504
|
+
images: ['https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg'],
|
|
505
|
+
isAllowOnlyCorrect: true,
|
|
506
|
+
isContinueOnCorrect: true,
|
|
507
|
+
},
|
|
508
|
+
render: args => {
|
|
509
|
+
const xml = getContainerXml3(args);
|
|
510
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
511
|
+
},
|
|
512
|
+
};
|
|
513
|
+
export const operations_drag = {
|
|
514
|
+
args: {
|
|
515
|
+
questions: ['100', '+', '30', '='],
|
|
516
|
+
answer: '130',
|
|
517
|
+
options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
518
|
+
isAllowOnlyCorrect: true,
|
|
519
|
+
isContinueOnCorrect: true,
|
|
520
|
+
},
|
|
521
|
+
render: args => {
|
|
522
|
+
const xml = getContainerXml3(args);
|
|
523
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
export const recognize_number = {
|
|
527
|
+
args: {
|
|
528
|
+
questions: [],
|
|
529
|
+
answer: '100',
|
|
530
|
+
options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
531
|
+
isAllowOnlyCorrect: true,
|
|
532
|
+
isContinueOnCorrect: true,
|
|
533
|
+
},
|
|
534
|
+
render: args => {
|
|
535
|
+
const xml = getContainerXml3(args);
|
|
536
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
537
|
+
},
|
|
538
|
+
};
|
|
539
|
+
function getContainerXml3(args) {
|
|
540
|
+
const dragCells = args.options
|
|
541
|
+
.map((digit, i) => `
|
|
542
|
+
<lido-text id="drag${i}" tab-index="${i}" height="landscape.170px, portrait.125px" width="landscape.125px, portrait.90px" visible="true" value="${digit}" string="${digit}" font-family="'Baloo Bhai 2'" font-color="black" type="drag" font-size="104px" bg-color="#FFF4CD" onEntry="this.fontWeight='800'; this.borderRadius='10px'; this.flex-shrink='0';" border-image="">
|
|
543
|
+
</lido-text>
|
|
544
|
+
`)
|
|
545
|
+
.join('\n');
|
|
546
|
+
const questionBlock = args.images && args.images.length > 0
|
|
547
|
+
? `
|
|
548
|
+
<lido-cell id="question11" layout="row" visible="true" margin="" height="landscape.330px,portrait.70%"
|
|
549
|
+
width="landscape.95%,portrait.96%" bg-color="transparent" onEntry="this.justifyContent='center';" onTouch="this.speak='true'">
|
|
550
|
+
<lido-image type="text" margin="landscape.-170px 0px 0px 0px,portrait.-405px 0px 0px 0px" id="speaker" visible="true" src="${args.images}" width="338px" height="230px" onTouch="this.speak='true'">
|
|
551
|
+
</lido-image>
|
|
552
|
+
|
|
553
|
+
<lido-text id="question" tab-index="text1" visible="true" value="${args.answer}" string="${args.question2}" font-family="'Baloo Bhai 2'" font-color="black" font-size="50px" bg-color="transparent" onEntry="this.fontWeight='600';">
|
|
554
|
+
</lido-text>
|
|
555
|
+
</lido-cell>
|
|
556
|
+
`
|
|
557
|
+
: `
|
|
558
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.170px,portrait.125px" width="450px" bg-color="transparent" onEntry="this.justifyContent='center';">
|
|
559
|
+
${args.questions
|
|
560
|
+
.map((q, index) => `
|
|
561
|
+
<lido-text id="question_${index}" tab-index="text_${index}" visible="true" value="${q}" string="${q}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.100px, portrait.84px" bg-color="transparent" onEntry="this.fontWeight='800';this.padding='10px'">
|
|
562
|
+
</lido-text>`)
|
|
563
|
+
.join('')}
|
|
564
|
+
</lido-cell>
|
|
565
|
+
`;
|
|
566
|
+
const objectiveArray = args.answer.split('');
|
|
567
|
+
const dropCells = objectiveArray
|
|
568
|
+
.map((cell, i) => `
|
|
569
|
+
<lido-text id="drop${i}" tab-index="${i}" disable-edit="true" height="landscape.170px, portrait.auto" width="125px" visible="true" value="${cell}" string="?" font-family="'Baloo Bhai 2'" font-color="#FFC805" type="drop" font-size="landscape.130px, portrait.100px" bg-color="transparent" onEntry="this.fontWeight='800'; this.borderRadius='10px';" border-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/sequence-box/card-slot_empty.png">
|
|
570
|
+
</lido-text>
|
|
571
|
+
`)
|
|
572
|
+
.join('\n');
|
|
573
|
+
// ---------------------- FINAL XML ----------------------
|
|
574
|
+
return `
|
|
575
|
+
<main>
|
|
576
|
+
|
|
577
|
+
<lido-container id="lido-container" objective="${args.answer
|
|
578
|
+
.split('')
|
|
579
|
+
.join(',')}" tab-index="" show-drop-border="false" is-continue-on-correct="true" is-allow-only-correct="true" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" height="100%" width="100%" bg-color="transparent" visible="true" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onEntry="" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" drop-action="infinite-drop" show-check="false" custom-style= "#question11, #text12 {
|
|
580
|
+
box-shadow: none !important;
|
|
581
|
+
}">
|
|
582
|
+
|
|
583
|
+
<!-- Chimple Avatar -->
|
|
584
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.344px,portrait.402px" width="landscape.296px,portrait.398px" x="landscape.82%, portrait.28%" y="landscape.36%, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
585
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
586
|
+
</lido-avatar>
|
|
587
|
+
</lido-cell>
|
|
588
|
+
|
|
589
|
+
<!-- question cell -->
|
|
590
|
+
${(Array.isArray(args.questions) && args.questions.length > 0) || args.question2
|
|
591
|
+
? `
|
|
592
|
+
<lido-cell layout="${args.images && args.images.length > 0 ? 'col' : 'row'}" visible="true" margin="landscape.-50px 0px 0px 0px, portrait.-170px 0px 0px 0px" height="landscape.70%,portrait.${args.images && args.images.length > 0 ? '45%' : '30%'}"
|
|
593
|
+
width="landscape.96%,portrait.100%" bg-color="transparent" onEntry="this.justifyContent='center';"
|
|
594
|
+
gap="${args.images && args.images.length > 0 ? 'landscape.0px, portrait.20px' : '0px'}">
|
|
595
|
+
|
|
596
|
+
${questionBlock}
|
|
597
|
+
|
|
598
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.170px,portrait.125px"
|
|
599
|
+
width="380px" bg-color="transparent" onEntry="this.justifyContent='center';">
|
|
600
|
+
${dropCells}
|
|
601
|
+
</lido-cell>
|
|
602
|
+
|
|
603
|
+
</lido-cell>
|
|
604
|
+
`
|
|
605
|
+
: `
|
|
606
|
+
<lido-cell layout="col" visible="true" margin="landscape.22px 0px 0px 0px, portrait.-110px 0px 0px 0px" height="landscape.62%,portrait.40%" width="landscape.96%,portrait.100%" bg-color="transparent" onEntry="this.justifyContent='center';" gap="82px">
|
|
607
|
+
<lido-text id="text12" visible="true" margin="landscape.0px,portrait.0px" onEntry="this.border-radius='14px';" height="177px" width="landscape.236px,portrait.34%" bg-color="" onTouch="this.speak='true';" string="${args.answer}" font-color="white" font-size="1px">
|
|
608
|
+
<lido-image visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg"
|
|
609
|
+
width="100%">
|
|
610
|
+
</lido-image>
|
|
611
|
+
</lido-text>
|
|
612
|
+
|
|
613
|
+
<lido-cell layout="row" id="question11" visible="true" margin="" height="landscape.192px,portrait.40%" width="landscape.84%,portrait.96%" bg-color="transparent" onEntry="this.justifyContent='center';" onTouch="this.speak='true'">
|
|
614
|
+
${dropCells}
|
|
615
|
+
</lido-cell>
|
|
616
|
+
</lido-cell>
|
|
617
|
+
`}
|
|
618
|
+
|
|
619
|
+
<!-- answers drag cell -->
|
|
620
|
+
<lido-cell layout="landscape.wrap, portrait.wrap" aria-hidden="true" visible="true" height="landscape.20%,portrait.18%" width="95%" bg-Color="transparent" margin="landscape.0px,portrait.55px 0px 125px 0px" onEntry="this.z-index='1'; this.grid-template-columns='repeat(auto-fill, minmax(140px, auto))'; this.gridTemplateRows='repeat(auto-fit, 145px)'; this.flexWrap='wrap'; this.justify-content='center';" gap="5px">
|
|
621
|
+
${dragCells}
|
|
622
|
+
</lido-cell>
|
|
623
|
+
</lido-container>
|
|
624
|
+
|
|
625
|
+
</main>
|
|
626
|
+
`;
|
|
627
|
+
}
|
|
628
|
+
export const missing_number_drag = {
|
|
629
|
+
args: {
|
|
630
|
+
questions: ['991', '992', '993', '?'],
|
|
631
|
+
answer: '994',
|
|
632
|
+
options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
633
|
+
isAllowOnlyCorrect: true,
|
|
634
|
+
isContinueOnCorrect: true,
|
|
635
|
+
},
|
|
636
|
+
render: args => {
|
|
637
|
+
const xml = getContainerXml4(args);
|
|
638
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
639
|
+
},
|
|
640
|
+
};
|
|
641
|
+
function getContainerXml4(args) {
|
|
642
|
+
const dragCells = args.options
|
|
643
|
+
.map((digit, i) => `
|
|
644
|
+
<lido-text id="drag${i}" tab-index="${i}" height="landscape.170px, portrait.125px" width="landscape.125px, portrait.90px" visible="true" value="${digit}" string="${digit}" font-family="'Baloo Bhai 2'" font-color="black" type="drag" font-size="104px" bg-color="#FFF4CD" onEntry="this.fontWeight='800'; this.borderRadius='10px'; this.flex-shrink='0';" border-image="">
|
|
645
|
+
</lido-text>
|
|
646
|
+
`)
|
|
647
|
+
.join('\n');
|
|
648
|
+
const dropCells = `
|
|
649
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.54%,portrait.72%" width="landscape.45%,portrait.34%" bg-color="orange" onEntry="this.justifyContent='center'; this.borderRadius='10px';" padding="0px 10px">
|
|
650
|
+
${[...args.answer]
|
|
651
|
+
.map((digit, i) => `
|
|
652
|
+
<lido-text id="drop${i + 1}" tab-index="${i + 3}" disable-edit="true" height="landscape.170px, portrait.125px"
|
|
653
|
+
width="125px"
|
|
654
|
+
visible="true"
|
|
655
|
+
value="${digit}"
|
|
656
|
+
string="?"
|
|
657
|
+
font-family="'Baloo Bhai 2'"
|
|
658
|
+
font-color="black"
|
|
659
|
+
type="drop"
|
|
660
|
+
font-size="landscape.110px, portrait.100px"
|
|
661
|
+
bg-color="transparent"
|
|
662
|
+
onEntry="this.fontWeight='800'; this.borderRadius='10px';"
|
|
663
|
+
border-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/sequence-box/card-slot_empty.png">
|
|
664
|
+
</lido-text>
|
|
665
|
+
`)
|
|
666
|
+
.join('\n')}
|
|
667
|
+
</lido-cell>
|
|
668
|
+
`;
|
|
669
|
+
// ---------------------- FINAL XML ----------------------
|
|
670
|
+
return `
|
|
671
|
+
<main>
|
|
672
|
+
<lido-container id="lido-container" objective="${args.answer
|
|
673
|
+
.split('')
|
|
674
|
+
.join(',')}" tab-index="1" show-drop-border="false" is-continue-on-correct="true" is-allow-only-correct="true" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" height="100%" width="100%" bg-color="transparent" visible="true" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onEntry="" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" drop-action="infinite-drop" show-check="false">
|
|
675
|
+
<!-- Chimple Avatar -->
|
|
676
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.344px,portrait.402px" width="landscape.296px,portrait.398px" x="landscape.41%, portrait.28%" y="landscape.44%, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
677
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
678
|
+
</lido-avatar>
|
|
679
|
+
</lido-cell>
|
|
680
|
+
|
|
681
|
+
<lido-cell layout="landscape.row,portrait.col" visible="true" margin="landscape.100px 0px 30px 0px, portrait.-155px 0px 0px 0px" height="landscape.62%,portrait.50%" width="landscape.100%,portrait.100%" bg-color="transparent" onEntry="this.justifyContent='center';" gap="10px">
|
|
682
|
+
|
|
683
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px'; this.align-items='flex-start';" height="landscape.90%,portrait.44%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
684
|
+
|
|
685
|
+
${args.questions[0] === '?'
|
|
686
|
+
? dropCells
|
|
687
|
+
: `
|
|
688
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.54%,portrait.72%" width="landscape.47%,portrait.34%" bg-color="orange" onEntry="this.justifyContent='center'; this.borderRadius='10px';">
|
|
689
|
+
<lido-text id="drop${args.questions[0]}" tab-index="${args.questions[0] + 2}" disable-edit="true" height="landscape.170px, portrait.125px" width="125px" visible="true" value="${args.questions[0]}" string="${args.questions[0]}"
|
|
690
|
+
font-family="'Baloo Bhai 2'" font-color="black" type="drop" font-size="landscape.110px, portrait.100px"
|
|
691
|
+
bg-color="transparent" onEntry="this.fontWeight='800'; this.borderRadius='10px';">
|
|
692
|
+
</lido-text>
|
|
693
|
+
</lido-cell>
|
|
694
|
+
`}
|
|
695
|
+
|
|
696
|
+
${args.questions[1] === '?'
|
|
697
|
+
? dropCells
|
|
698
|
+
: `
|
|
699
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.54%,portrait.72%" width="landscape.47%,portrait.34%" bg-color="orange" onEntry="this.justifyContent='center'; this.borderRadius='10px';">
|
|
700
|
+
<lido-text id="drop${args.questions[1]}" tab-index="${args.questions[1] + 2}" disable-edit="true" height="landscape.170px, portrait.125px" width="125px" visible="true" value="${args.questions[1]}" string="${args.questions[1]}"
|
|
701
|
+
font-family="'Baloo Bhai 2'" font-color="black" type="drop" font-size="landscape.110px, portrait.100px"
|
|
702
|
+
bg-color="transparent" onEntry="this.fontWeight='800'; this.borderRadius='10px';">
|
|
703
|
+
</lido-text>
|
|
704
|
+
</lido-cell>
|
|
705
|
+
`}
|
|
706
|
+
|
|
707
|
+
</lido-cell>
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px'; this.align-items='flex-start';" height="landscape.90%,portrait.44%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
712
|
+
|
|
713
|
+
${args.questions[2] === '?'
|
|
714
|
+
? dropCells
|
|
715
|
+
: `
|
|
716
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.54%,portrait.72%" width="landscape.47%,portrait.34%" bg-color="orange" onEntry="this.justifyContent='center'; this.borderRadius='10px';">
|
|
717
|
+
<lido-text id="drop${args.questions[2]}" tab-index="${args.questions[2] + 2}" disable-edit="true" height="landscape.170px, portrait.125px" width="125px" visible="true" value="${args.questions[2]}" string="${args.questions[2]}"
|
|
718
|
+
font-family="'Baloo Bhai 2'" font-color="black" type="drop" font-size="landscape.110px, portrait.100px"
|
|
719
|
+
bg-color="transparent" onEntry="this.fontWeight='800'; this.borderRadius='10px';">
|
|
720
|
+
</lido-text>
|
|
721
|
+
</lido-cell>
|
|
722
|
+
`}
|
|
723
|
+
|
|
724
|
+
${args.questions[3] === '?'
|
|
725
|
+
? dropCells
|
|
726
|
+
: `
|
|
727
|
+
<lido-cell layout="row" visible="true" margin="" height="landscape.100%,portrait.96%" width="landscape.47%,portrait.34%" bg-color="orange" onEntry="this.justifyContent='center'; this.borderRadius='10px';">
|
|
728
|
+
<lido-text id="drop${args.questions[3]}" tab-index="${args.questions[3] + 2}" disable-edit="true" height="landscape.170px, portrait.125px" width="125px" visible="true" value="${args.questions[3]}" string="${args.questions[3]}"
|
|
729
|
+
font-family="'Baloo Bhai 2'" font-color="black" type="drop" font-size="landscape.110px, portrait.100px"
|
|
730
|
+
bg-color="transparent" onEntry="this.fontWeight='800'; this.borderRadius='10px';">
|
|
731
|
+
</lido-text>
|
|
732
|
+
</lido-cell>
|
|
733
|
+
`}
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
</lido-cell>
|
|
737
|
+
|
|
738
|
+
</lido-cell>
|
|
739
|
+
|
|
740
|
+
<!-- answers drag cell -->
|
|
741
|
+
<lido-cell layout="landscape.wrap, portrait.wrap" aria-hidden="true" visible="true" height="landscape.20%,portrait.18%" width="95%" bg-Color="transparent" margin="landscape.0px,portrait.-48px 0px 125px 42px" onEntry="this.z-index='1'; this.grid-template-columns='repeat(auto-fill, minmax(140px, auto))'; this.gridTemplateRows='repeat(auto-fit, 145px)'; this.flexWrap='wrap'; this.justify-content='center';" gap="5px">
|
|
742
|
+
${dragCells}
|
|
743
|
+
</lido-cell>
|
|
744
|
+
</lido-container>
|
|
745
|
+
</main>
|
|
746
|
+
`;
|
|
747
|
+
}
|
|
748
|
+
export const custom_number_magnitudes = {
|
|
749
|
+
args: {
|
|
750
|
+
question: 'Order the numbers from smallest to largest.',
|
|
751
|
+
drags: ['200', '100', '300', '900'],
|
|
752
|
+
answers: ['100', '200', '300', '900'],
|
|
753
|
+
isAllowOnlyCorrect: true,
|
|
754
|
+
isContinueOnCorrect: true,
|
|
755
|
+
},
|
|
756
|
+
render: args => {
|
|
757
|
+
const xml = getContainerXml5(args);
|
|
758
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
759
|
+
},
|
|
760
|
+
};
|
|
761
|
+
function getContainerXml5(args) {
|
|
762
|
+
// ---------------------- FINAL XML ----------------------
|
|
763
|
+
return `
|
|
764
|
+
<main>
|
|
765
|
+
<lido-container visible="true" id="lido-container" onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" objective="${args.answers.join(',')}" is-continue-on-correct="${args.isContinueOnCorrect}" is-allow-only-correct="${args.isAllowOnlyCorrect}" custom-style= "#t11 {
|
|
766
|
+
box-shadow: none !important;
|
|
767
|
+
}">
|
|
768
|
+
<!-- Chimple Avatar -->
|
|
769
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.328px,portrait.378px" width="landscape.284px,portrait.382px" x="landscape.85%, portrait.30%" y="landscape.68%, portrait.78%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
770
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
771
|
+
</lido-avatar>
|
|
772
|
+
</lido-cell>
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
<!-- drop cells -->
|
|
776
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.156px 0px 0px -154px,portrait.-168px 0px 0px 0px" onEntry="this.border-radius='26px';" height="landscape.390px,portrait.42%" width="landscape.86%,portrait.100%" bg-color="transparent">
|
|
777
|
+
|
|
778
|
+
<lido-text visible="true" margin="" id="t11" onEntry="this.border-radius='14px';" bg-color="" onTouch="this.speak='true';" string="Order the numbers from smallest to largest." font-color="white" font-size="1px">
|
|
779
|
+
<lido-image type="text" margin="landscape.-244px 0px 0px 0px,portrait.0px 0px 0px 0px" id="" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg" width="100px" height="127px" onTouch="this.speak='true'">
|
|
780
|
+
</lido-image>
|
|
781
|
+
</lido-text>
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px';" height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
785
|
+
<lido-cell layout="row" id="text2" tab-index="2" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="#6D8C87" type="drop" value="${args.answers[0]}" onInCorrect="lido-avatar.avatarAnimate='Fail';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';">
|
|
786
|
+
<lido-text visible="true" value="${args.answers[0]}" string="" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color=""
|
|
787
|
+
onEntry="this.fontWeight='800';">
|
|
788
|
+
</lido-text>
|
|
789
|
+
</lido-cell>
|
|
790
|
+
|
|
791
|
+
<lido-cell layout="row" id="text3" tab-index="3" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="#6D8C87" type="drop" value="${args.answers[1]}" onInCorrect="lido-avatar.avatarAnimate='Fail';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';">
|
|
792
|
+
<lido-text visible="true" value="${args.answers[1]}" string="" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color=""
|
|
793
|
+
onEntry="this.fontWeight='800';">
|
|
794
|
+
</lido-text>
|
|
795
|
+
</lido-cell>
|
|
796
|
+
|
|
797
|
+
</lido-cell>
|
|
798
|
+
|
|
799
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px';" height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
800
|
+
<lido-cell layout="row" id="text4" tab-index="4" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="#6D8C87" type="drop" value="${args.answers[2]}" onInCorrect="lido-avatar.avatarAnimate='Fail';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';">
|
|
801
|
+
<lido-text visible="true" value="${args.answers[2]}" string="" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color=""
|
|
802
|
+
onEntry="this.fontWeight='800';">
|
|
803
|
+
</lido-text>
|
|
804
|
+
</lido-cell>
|
|
805
|
+
|
|
806
|
+
<lido-cell layout="row" id="text5" tab-index="5" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="#6D8C87" type="drop" value="${args.answers[3]}" onInCorrect="lido-avatar.avatarAnimate='Fail';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';">
|
|
807
|
+
<lido-text visible="true" value="${args.answers[3]}" string="" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color=""
|
|
808
|
+
onEntry="this.fontWeight='800';">
|
|
809
|
+
</lido-text>
|
|
810
|
+
</lido-cell>
|
|
811
|
+
</lido-cell>
|
|
812
|
+
|
|
813
|
+
</lido-cell>
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
<!-- drag cells -->
|
|
817
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.-46px 0px 0px -124px,portrait.0" onEntry="this.border-radius='26px';" height="landscape.390px,portrait.35%" width="landscape.86%,portrait.100%" bg-color="transparent">
|
|
818
|
+
|
|
819
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px';" height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
820
|
+
<lido-cell layout="row" id="text6" tab-index="6" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="orange" type="drag" value="${args.drags[0]}">
|
|
821
|
+
<lido-text visible="true" value="${args.drags[0]}" string="${args.drags[0]}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color="orange"
|
|
822
|
+
onEntry="this.fontWeight='800';">
|
|
823
|
+
</lido-text>
|
|
824
|
+
</lido-cell>
|
|
825
|
+
|
|
826
|
+
<lido-cell layout="row" id="text7" tab-index="7" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="orange" type="drag" value="${args.drags[1]}">
|
|
827
|
+
<lido-text visible="true" value="${args.drags[1]}" string="${args.drags[1]}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color="orange"
|
|
828
|
+
onEntry="this.fontWeight='800';">
|
|
829
|
+
</lido-text>
|
|
830
|
+
</lido-cell>
|
|
831
|
+
|
|
832
|
+
</lido-cell>
|
|
833
|
+
|
|
834
|
+
<lido-cell layout="row" visible="true" margin="" onEntry="this.border-radius='26px';" height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">
|
|
835
|
+
<lido-cell layout="row" id="text8" tab-index="8" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="orange" type="drag" value="${args.drags[2]}">
|
|
836
|
+
<lido-text visible="true" value="${args.drags[2]}" string="${args.drags[2]}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color="orange"
|
|
837
|
+
onEntry="this.fontWeight='800';">
|
|
838
|
+
</lido-text>
|
|
839
|
+
</lido-cell>
|
|
840
|
+
|
|
841
|
+
<lido-cell layout="row" id="text9" tab-index="9" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="orange" type="drag" value="${args.drags[3]}">
|
|
842
|
+
<lido-text visible="true" value="${args.drags[3]}" string="${args.drags[3]}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color="orange"
|
|
843
|
+
onEntry="this.fontWeight='800';">
|
|
844
|
+
</lido-text>
|
|
845
|
+
</lido-cell>
|
|
846
|
+
</lido-cell>
|
|
847
|
+
|
|
848
|
+
</lido-cell>
|
|
849
|
+
|
|
850
|
+
</lido-container>
|
|
851
|
+
</main>
|
|
852
|
+
`;
|
|
853
|
+
}
|
|
854
|
+
export const Shapes1 = {
|
|
855
|
+
args: {
|
|
856
|
+
question1: 'What is this shape?',
|
|
857
|
+
options: ['circle', 'cube', 'cylinder', 'pentagon'],
|
|
858
|
+
answer: ["cube"],
|
|
859
|
+
isAllowOnlyCorrect: true,
|
|
860
|
+
isContinueOnCorrect: true,
|
|
861
|
+
},
|
|
862
|
+
render: args => {
|
|
863
|
+
const xml = getContainerXml6(args);
|
|
864
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
865
|
+
},
|
|
866
|
+
};
|
|
867
|
+
function getContainerXml6(args) {
|
|
868
|
+
var _a;
|
|
869
|
+
// FIXED: works for Shapes + Single Digit + Two Digit
|
|
870
|
+
const hasImages = Array.isArray(args.images) && args.images.length > 0;
|
|
871
|
+
// ---------------------- QUESTION CELLS ----------------------
|
|
872
|
+
const answerValue = ((_a = args.answer) === null || _a === void 0 ? void 0 : _a[0]) || '';
|
|
873
|
+
const QuestionCell = `
|
|
874
|
+
<lido-cell layout="col" visible="true" margin="landscape.0, portrait.-26px 0px 0px -126px" height="492px" width="landscape.66%,portrait.82%" bg-color="transparent" onEntry="this.justifyContent='flex-start';">
|
|
875
|
+
<lido-text id="question" tab-index="2" visible="true" value="${answerValue}" string="${args.question1}" font-family="'Baloo Bhai 2'"
|
|
876
|
+
font-color="black" font-size="landscape.90px, portrait.84px" bg-color="transparent" margin="landscape.0px 0px -103px 0px,portrait.0px"
|
|
877
|
+
onEntry="this.fontWeight='800';">
|
|
878
|
+
</lido-text>
|
|
879
|
+
|
|
880
|
+
<lido-shape class="shape" id="${args.answer}" shapeType="lido-${args.answer}" x="landscape.40%,portrait.32%" y="landscape.30%, portrait.19%"
|
|
881
|
+
width="${args.answer === 'cube' ? 'landscape.150px,portrait.150px' : 'landscape.268px,portrait.300px'}"
|
|
882
|
+
height="${args.answer === 'cube' ? 'landscape.1500px,portrait.300px' : 'landscape.268px,portrait.300px'}"
|
|
883
|
+
bgColor="blue" value="${args.answer}" type="click" visible="true"></lido-shape>
|
|
884
|
+
</lido-cell>
|
|
885
|
+
`;
|
|
886
|
+
// ---------------------- SHAPES OPTIONS ----------------------
|
|
887
|
+
const OptionCells = args.options && args.options.length > 0
|
|
888
|
+
? `
|
|
889
|
+
<!-- Landscape layout: single horizontal row -->
|
|
890
|
+
<lido-cell
|
|
891
|
+
layout="landscape.row, portrait.col"
|
|
892
|
+
visible="landscape.true, portrait.false"
|
|
893
|
+
margin="landscape.0px 90px 0px 0px"
|
|
894
|
+
onEntry="this.border-radius='26px';"
|
|
895
|
+
height="landscape.390px,portrait.46%"
|
|
896
|
+
width="landscape.92%,portrait.100%"
|
|
897
|
+
bg-color="transparent"
|
|
898
|
+
>
|
|
899
|
+
|
|
900
|
+
${args.options
|
|
901
|
+
.map(opt => `
|
|
902
|
+
<lido-text
|
|
903
|
+
id="option-${opt}"
|
|
904
|
+
tab-index="2"
|
|
905
|
+
visible="true"
|
|
906
|
+
value="${opt}"
|
|
907
|
+
string="${opt}"
|
|
908
|
+
font-family="'Baloo Bhai 2'"
|
|
909
|
+
font-color="black"
|
|
910
|
+
font-size="landscape.58px, portrait.84px"
|
|
911
|
+
onEntry="this.fontWeight='800'; this.border-radius='10px'"
|
|
912
|
+
height="200px"
|
|
913
|
+
width="landscape.270px,portrait.300px"
|
|
914
|
+
bg-color="orange"
|
|
915
|
+
type="click">
|
|
916
|
+
</lido-text>
|
|
917
|
+
`)
|
|
918
|
+
.join('')}
|
|
919
|
+
</lido-cell>
|
|
920
|
+
|
|
921
|
+
<!-- Portrait layout: 2 items per row -->
|
|
922
|
+
<lido-cell
|
|
923
|
+
layout="landscape.row, portrait.col" margin="68px 0px 0px 0px"
|
|
924
|
+
visible="landscape.false, portrait.true"
|
|
925
|
+
onEntry="this.border-radius='26px';"
|
|
926
|
+
height="landscape.390px,portrait.42%"
|
|
927
|
+
width="landscape.92%,portrait.100%"
|
|
928
|
+
bg-color="transparent"
|
|
929
|
+
>
|
|
930
|
+
|
|
931
|
+
${args.options
|
|
932
|
+
.map((opt, index) => `
|
|
933
|
+
${index % 2 === 0 ? `<lido-cell layout="row" visible="true" height="landcape.100%,portrait.50%" width="landscape.50%,portrait.100%" bg-color="transparent">` : ''}
|
|
934
|
+
|
|
935
|
+
<lido-text
|
|
936
|
+
id="option-${opt}"
|
|
937
|
+
tab-index="2"
|
|
938
|
+
visible="true"
|
|
939
|
+
value="${opt}"
|
|
940
|
+
string="${opt}"
|
|
941
|
+
font-family="'Baloo Bhai 2'"
|
|
942
|
+
font-color="black"
|
|
943
|
+
font-size="landscape.50px, portrait.70px"
|
|
944
|
+
height="200px"
|
|
945
|
+
width="landscape.270px,portrait.326px"
|
|
946
|
+
bg-color="orange"
|
|
947
|
+
type="click"
|
|
948
|
+
onEntry="this.fontWeight='800'; this.border-radius='10px'">
|
|
949
|
+
</lido-text>
|
|
950
|
+
|
|
951
|
+
${index % 2 === 1 || index === args.options.length - 1 ? `</lido-cell>` : ''}
|
|
952
|
+
`)
|
|
953
|
+
.join('')}
|
|
954
|
+
|
|
955
|
+
</lido-cell>
|
|
956
|
+
`
|
|
957
|
+
: '';
|
|
958
|
+
// ---------------------- FINAL XML ----------------------
|
|
959
|
+
return `
|
|
960
|
+
<main>
|
|
961
|
+
<lido-container visible="true" id="lido-container"
|
|
962
|
+
onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';"
|
|
963
|
+
bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Sky.png" objective="${args.answer}" is-continue-on-correct="${args.isContinueOnCorrect}" is-allow-only-correct="${args.isAllowOnlyCorrect}" custom-style= "#text11, .shape {box-shadow: none !important;}">
|
|
964
|
+
|
|
965
|
+
<!-- Chimple Avatar -->
|
|
966
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.344px,portrait.360px" width="landscape.296px,portrait.368px" x="landscape.87%, portrait.30%" y="landscape.67%, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
967
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
968
|
+
</lido-avatar>
|
|
969
|
+
</lido-cell>
|
|
970
|
+
|
|
971
|
+
<!-- Question -->
|
|
972
|
+
<lido-cell layout="row" visible="true" margin="landscape.166px 0px 0px -64px, portrait.-92px 0px 0px 0px" height="348px" width="landscape.95%,portrait.100%" bg-color="transparent" onEntry="this.justifyContent='center';">
|
|
973
|
+
<lido-text visible="true" margin="landscape.-304px 70px 0px -98px,portrait.-46px 0px 0px 0px" id="text11"
|
|
974
|
+
onEntry="this.border-radius='14px';" bg-color="" onTouch="this.speak='true';" string="${args.question1}" font-color="white"
|
|
975
|
+
font-size="1px">
|
|
976
|
+
<lido-image visible="true"
|
|
977
|
+
src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg"
|
|
978
|
+
width="96px">
|
|
979
|
+
</lido-image>
|
|
980
|
+
</lido-text>
|
|
981
|
+
${QuestionCell}
|
|
982
|
+
</lido-cell>
|
|
983
|
+
|
|
984
|
+
<!-- Options -->
|
|
985
|
+
|
|
986
|
+
${OptionCells}
|
|
987
|
+
|
|
988
|
+
</lido-container>
|
|
989
|
+
</main>
|
|
990
|
+
`;
|
|
991
|
+
}
|