lido-player 0.0.2-alpha-58-dev → 0.0.2-alpha-60-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 +96 -34
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-470fe410.js → utils-28faa755.js} +142 -108
- package/dist/collection/components/container/lido-container.js +62 -3
- package/dist/collection/components/flashCard/lido-flash-card.js +10 -1
- package/dist/collection/components/float/lido-float.js +1 -1
- package/dist/collection/components/home/lido-home.js +22 -12
- package/dist/collection/components/keyboard/lido-keyboard.js +2 -2
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
- package/dist/collection/components/position/lido-pos.js +1 -1
- package/dist/collection/components/random/lido-random.js +1 -1
- package/dist/collection/components/row/lido-row.js +1 -1
- package/dist/collection/components/scale/lido-balance.js +1 -1
- package/dist/collection/components/shape/lido-shape.js +2 -2
- package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
- package/dist/collection/components/text/lido-text.js +1 -1
- package/dist/collection/components/trace/lido-trace.js +18 -7
- package/dist/collection/components/wrap/lido-wrap.js +1 -1
- package/dist/collection/css/animation.css +17 -0
- package/dist/collection/css/index.css +1 -1
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +3 -3
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
- package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +79 -0
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +74 -44
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +4 -4
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +91 -0
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +84 -0
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +0 -2
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +0 -2
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +106 -0
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +89 -0
- package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +86 -0
- package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +131 -0
- package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +61 -0
- package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +87 -0
- package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +98 -0
- package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +72 -0
- package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +61 -0
- package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +60 -0
- package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +78 -0
- package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +78 -0
- package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +73 -0
- package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +35 -0
- package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +88 -0
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +88 -0
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +66 -0
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +1 -1
- package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +7 -7
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +1 -1
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +2 -2
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +2 -2
- package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +111 -0
- package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +70 -0
- package/dist/collection/stories/Templates/total/total.stories.js +2 -0
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +76 -0
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +74 -0
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +1 -1
- package/dist/collection/utils/constants.js +2 -1
- package/dist/collection/utils/utils.js +10 -4
- package/dist/collection/utils/utilsHandlers/clickHandler.js +2 -0
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +25 -21
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +50 -2
- package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +5 -4
- 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 -23
- 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-ee4759de.js → p-06cecca5.js} +2 -2
- package/dist/components/{p-17cdbc3d.js → p-16604098.js} +1 -1
- package/dist/components/{p-6953efe0.js → p-235091a1.js} +141 -109
- package/dist/components/{p-bc7835fc.js → p-32c89979.js} +18 -7
- package/dist/components/{p-822b692a.js → p-354f7b19.js} +2 -2
- package/dist/components/{p-73e3f0f4.js → p-37c86a94.js} +203 -1
- package/dist/components/{p-53a7d4cb.js → p-3acada8c.js} +1 -1
- package/dist/components/{p-984ef5d1.js → p-3acd9a2e.js} +2 -2
- package/dist/components/{p-6f451328.js → p-4d01394c.js} +1 -1
- package/dist/components/{p-c62da3ed.js → p-57400ebc.js} +1 -1
- package/dist/components/{p-cfde157c.js → p-5e7c6afa.js} +2 -2
- package/dist/components/{p-f36d02e9.js → p-74c270d2.js} +4 -4
- package/dist/components/{p-9eb8593c.js → p-8a32f7cb.js} +3 -3
- package/dist/components/{p-0fa0ada9.js → p-8c0667eb.js} +2 -2
- package/dist/components/{p-9c7f08c4.js → p-8f082c62.js} +11 -2
- package/dist/components/{p-8c526c86.js → p-93acfbb2.js} +2 -2
- package/dist/components/{p-97ddbda4.js → p-a182c9a2.js} +2 -2
- package/dist/components/{p-348f95ba.js → p-b151457d.js} +47 -6
- package/dist/components/{p-d0c4d5a7.js → p-b867548e.js} +2 -2
- package/dist/components/{p-6f91a337.js → p-c90d92db.js} +2 -2
- package/dist/components/{p-67d97edc.js → p-db2a05f5.js} +3 -3
- package/dist/components/{p-f729ff82.js → p-de45dcab.js} +41 -33
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +96 -34
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-d0f004f8.js → utils-2edeb213.js} +141 -109
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.css +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-280e3d34.entry.js +1 -0
- package/dist/lido-player/{p-bde62361.js → p-add7f36e.js} +2 -2
- package/dist/types/components/container/lido-container.d.ts +15 -2
- package/dist/types/components/trace/lido-trace.d.ts +3 -3
- package/dist/types/components.d.ts +10 -2
- package/dist/types/stories/Templates/imageMatch/imageMatch.stories.d.ts +4 -0
- package/dist/types/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.d.ts +4 -0
- package/dist/types/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.d.ts +11 -0
- package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.d.ts +12 -0
- package/dist/types/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.d.ts +5 -0
- package/dist/types/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgra_build_word/palEgra_build_word.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palStorytale/palStorytale.stories.d.ts +4 -0
- package/dist/types/stories/Templates/pictureClues/pictureClues.stories.d.ts +4 -0
- package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.d.ts +4 -0
- package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.d.ts +4 -0
- package/dist/types/stories/Templates/substraction/substractionWithimg.stories.d.ts +4 -0
- package/dist/types/stories/Templates/substraction/substractionWithoutImg.stories.d.ts +4 -0
- package/dist/types/stories/Templates/wordBuilding/wordBuildingwithimg.stories.d.ts +4 -0
- package/dist/types/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.d.ts +4 -0
- package/dist/types/utils/constants.d.ts +9 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/types/utils/utilsHandlers/highlightHandler.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-0e645e5b.js +0 -204
- package/dist/lido-player/p-06248bc2.entry.js +0 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgmaCalculateSum',
|
|
4
|
+
argTypes: {
|
|
5
|
+
missingNumber: { control: 'text', name: 'missing number' },
|
|
6
|
+
number1: { control: 'text', name: 'Number 1' },
|
|
7
|
+
number2: { control: 'text', name: 'Number 2' },
|
|
8
|
+
options: { control: 'object', name: 'digits' },
|
|
9
|
+
sign: { control: 'text', name: 'sign', defaultValue: '+' },
|
|
10
|
+
isAllowOnlyCorrect: { control: 'boolean', name: 'isAllowOnlyCorrect' },
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
missingNumber: '60',
|
|
14
|
+
number1: '36',
|
|
15
|
+
number2: '24',
|
|
16
|
+
sign: '+',
|
|
17
|
+
options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
18
|
+
isAllowOnlyCorrect: true,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const PalEgmaSumTogether = {
|
|
23
|
+
render: (args) => {
|
|
24
|
+
const xml = getContainerXml(args);
|
|
25
|
+
return html `<lido-home xml-data="${xml}" xmlData="${xml}"></lido-home>`;
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
function getContainerXml(args) {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const missingNumber = args.missingNumber;
|
|
31
|
+
const number1 = args.number1;
|
|
32
|
+
const number2 = args.number2;
|
|
33
|
+
const options = args.options;
|
|
34
|
+
const sign = (_a = args.sign) !== null && _a !== void 0 ? _a : '+';
|
|
35
|
+
const isAllowOnlyCorrect = (_b = args.isAllowOnlyCorrect) !== null && _b !== void 0 ? _b : true;
|
|
36
|
+
const objectiveString = `${missingNumber.split('').join(',')}`;
|
|
37
|
+
const objectiveArray = missingNumber.split('');
|
|
38
|
+
const dropCells = objectiveArray
|
|
39
|
+
.map((cell, i) => `
|
|
40
|
+
<lido-text visible="true" id="drop-${i}" type="drop" tab-index="${25 + i}" height="212px" width="130px" string="?" font-family="'Baloo Bhai 2'" font-color="black" font-size="140px" bg-color="#FFF5BBB2" value="${cell}" onEntry="this.fontWeight='700';this.border='2px solid #FFB612';this.border-radius='16px';" >
|
|
41
|
+
</lido-text>
|
|
42
|
+
`)
|
|
43
|
+
.join('\n');
|
|
44
|
+
const dragCells = options
|
|
45
|
+
.map((digit, i) => `
|
|
46
|
+
<lido-text id="drag-${digit}" tab-index="${50 + i}" height="landscape.212px, portrait.125px" width="landscape.140px, portrait.90px" visible="true" value="${digit}" string="${digit}" font-family="'Baloo Bhai 2'" font-color="black" type="drag" font-size="104px" bg-color="#FFAC4C" onEntry="this.fontWeight='800'; this.borderRadius='16px'; this.flex-shrink='0';" border-image="" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';">
|
|
47
|
+
</lido-text>
|
|
48
|
+
`)
|
|
49
|
+
.join('\n');
|
|
50
|
+
return `
|
|
51
|
+
<main>
|
|
52
|
+
<lido-container id="lido-container" objective="${objectiveString}" tab-index="1" template-id="dragAndDrop" show-drop-border="false" is-continue-on-correct="true" is-allow-only-correct="${isAllowOnlyCorrect}" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGMA/pal_egma_temp_3.png" height="100%" width="100%" bg-color="transparent" visible="true" onCorrect="this.questionBoxAnimate='true'; lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onEntry="this.justifyContent='space-around'; invisibleText.speak='true';" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" drop-action="infinite-drop" show-check="false">
|
|
53
|
+
|
|
54
|
+
<!-- Chimple Avatar -->
|
|
55
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos1" height="landscape.600px, portrait.700px" width="landscape.393px, portrait.485px" x="landscape.1310px, portrait.450px" y="landscape.100px, portrait.1020px" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="this.flex-shrink='0';">
|
|
56
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="inherit" width="inherit" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" altText="{chimpleCharacterRive}" onEntry="">
|
|
57
|
+
</lido-avatar>
|
|
58
|
+
<lido-image id="image" disable-edit="true" value="image" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/Shadow.png" bg-color="transparent" width="inherit" height="27px" x="landscape.-7px, portrait.-7px" y="landscape.450px, portrait.540px" altText="{shadowImage}">
|
|
59
|
+
</lido-image>
|
|
60
|
+
</lido-cell>
|
|
61
|
+
|
|
62
|
+
<lido-text id="invisibleText" tab-index="2" audio="" width="297px" height="80px" display="flex" font-size="12px" z="1" font-color="black" value="solve the equation and drag the correct answer" string="solve the equation and drag the correct answer" visible="false" bg-color="transparent" onEntry="">
|
|
63
|
+
</lido-text>
|
|
64
|
+
|
|
65
|
+
<!-- question row-->
|
|
66
|
+
<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.215px 0px 30px 0px,portrait.25px 0px -120px 0px" onEntry="this.z-index='1'; this.justify-content='center';" gap="landscape.60px,portrait.40px">
|
|
67
|
+
<lido-text id="num-1" height="215px" width="120px" visible="true" value="${number1}" string="${number1}" font-family="'Baloo Bhai 2'" font-color="black" font-size="140px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='700'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='1';" border-image="">
|
|
68
|
+
</lido-text>
|
|
69
|
+
<lido-text id="operator" height="295px" width="120px" visible="true" value="${sign}" string="${sign}" font-family="'Baloo Bhai 2'" font-color="black" font-size="140px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='700'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='1';" border-image="">
|
|
70
|
+
</lido-text>
|
|
71
|
+
<lido-text id="num-2" height="215px" width="120px" visible="true" value="${number2}" string="${number2}" font-family="'Baloo Bhai 2'" font-color="black" font-size="140px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='700'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='1';" border-image="">
|
|
72
|
+
</lido-text>
|
|
73
|
+
<lido-text id="equal" height="215px" width="120px" visible="true" value="=" string="=" font-family="'Baloo Bhai 2'" font-color="black" font-size="140px" bg-color="transparent" onInCorrect="" onEntry="this.font-weight='700'; this.borderRadius='10px'; this.flex-flow='column-reverse'; this.opacity='1';" border-image="">
|
|
74
|
+
</lido-text>
|
|
75
|
+
<lido-cell layout="row" is-slice="true" visible="true" height="landscape.20%,portrait.41%" width="auto" bg-Color="transparent" onEntry="this.z-index='1';" onCorrect="" gap="landscape.10px,portrait.5px">
|
|
76
|
+
${dropCells}
|
|
77
|
+
</lido-cell>
|
|
78
|
+
</lido-cell>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<!-- answers drag cell -->
|
|
82
|
+
<!-- option row-->
|
|
83
|
+
<lido-cell layout="landscape.row, portrait.wrap" id="option-row" aria-hidden="true" visible="true" height="landscape.15%,portrait.5%" width="landscape.90%, portrait.106%" bg-Color="transparent" margin="landscape.65px 0px 65px 0px,portrait.-160px -65px 500px 0px" onEntry="this.z-index='1'; this.justify-content='center'; this.opacity='1';" gap="landscape.20px,portrait.5px">
|
|
84
|
+
${dragCells}
|
|
85
|
+
</lido-cell>
|
|
86
|
+
</lido-container>
|
|
87
|
+
</main>
|
|
88
|
+
`;
|
|
89
|
+
}
|
package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgmaPatternMatching',
|
|
4
|
+
argTypes: {
|
|
5
|
+
options: { control: 'object' },
|
|
6
|
+
answers: { control: 'object' },
|
|
7
|
+
PracticeMode: { control: 'boolean' },
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const palEgmaPatternMatching = {
|
|
12
|
+
args: {
|
|
13
|
+
question_text: 'Complete the pattern',
|
|
14
|
+
questions: ['975', '976', '@977', '978', '979'],
|
|
15
|
+
options: ['977', '980', '957', '947'],
|
|
16
|
+
PracticeMode: false,
|
|
17
|
+
},
|
|
18
|
+
render: args => {
|
|
19
|
+
const xml = getContainerXml(args);
|
|
20
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
function getContainerXml(args) {
|
|
24
|
+
// ---------------------- FINAL XML ----------------------
|
|
25
|
+
const question_cells = args.questions.map((q, index) => {
|
|
26
|
+
const isHidden = q === null || q === void 0 ? void 0 : q.startsWith('@');
|
|
27
|
+
const actualValue = isHidden ? q.slice(1) : q;
|
|
28
|
+
const questionString = isHidden ? '? ' : q;
|
|
29
|
+
// add comma except for last item
|
|
30
|
+
const comma = index < args.questions.length - 1 ? ' ,' : '';
|
|
31
|
+
return `
|
|
32
|
+
<lido-text
|
|
33
|
+
visible="true" tab-index="${1 + index}"
|
|
34
|
+
value="${actualValue}"
|
|
35
|
+
string="${questionString}${comma}"
|
|
36
|
+
font-family="'Baloo Bhai 2'"
|
|
37
|
+
font-color="#07004E"
|
|
38
|
+
font-size="landscape.130px, portrait.100px"
|
|
39
|
+
bg-color=""
|
|
40
|
+
onEntry="this.fontWeight='800';">
|
|
41
|
+
</lido-text>
|
|
42
|
+
`;
|
|
43
|
+
}).join('');
|
|
44
|
+
const opion_cells = args.options.map((q, index) => {
|
|
45
|
+
return `
|
|
46
|
+
<lido-cell layout="row" id="text${1 + index}" visible="true" margin="" onEntry="this.border-radius='14px';" height="landscape.270px,portrait.244px" width="landscape.270px,portrait.244px" bg-color="orange" type="click" value="${q}">
|
|
47
|
+
<lido-text visible="true" value="${q}" string="${q}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.130px, portrait.100px" bg-color="orange" onEntry="this.fontWeight='800';">
|
|
48
|
+
</lido-text>
|
|
49
|
+
</lido-cell>
|
|
50
|
+
`;
|
|
51
|
+
}).join('');
|
|
52
|
+
return `
|
|
53
|
+
<main>
|
|
54
|
+
<lido-container visible="true" id="lido-container" template-id="mcq" 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/PAL-EGMA/Frame%2051.svg" objective="${(args.questions.find(q => q.startsWith('@')) || '').slice(1)}" is-continue-on-correct="${args.PracticeMode}" is-allow-only-correct="${args.PracticeMode}" custom-style= "#text {
|
|
55
|
+
box-shadow: none !important;
|
|
56
|
+
}" onEntry="questionText.speak='true';">
|
|
57
|
+
<!-- Chimple Avatar -->
|
|
58
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.328px,portrait.378px" width="landscape.284px,portrait.382px" x="landscape.87%, portrait.30%" y="landscape.68%, portrait.78%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
59
|
+
<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}">
|
|
60
|
+
</lido-avatar>
|
|
61
|
+
</lido-cell>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<lido-cell layout="landscape.col, portrait.col" visible="true" margin="landscape.30px 0px 0px 0px,portrait.-168px 0px 0px 0px" onEntry="this.border-radius='26px';" height="landscape.90%,portrait.42%" width="landscape.96%,portrait.100%" bg-color="transparent">
|
|
65
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px 0px 0px 0px,portrait.-168px 0px 0px 0px" onEntry="this.border-radius='26px';" height="landscape.140px,portrait.42%" width="landscape.80%,portrait.100%" bg-color=" transparent">
|
|
66
|
+
<lido-text id="questionText" visible="true" tab-index="112" value="${args.questions[0]}" string="${args.question_text}" font-family="'Baloo Bhai 2'" font-color="#07004E" font-size="landscape.80px, portrait.100px" bg-color="" onEntry="this.fontWeight='800'; this.fontWeight='800';">
|
|
67
|
+
</lido-text>
|
|
68
|
+
</lido-cell>
|
|
69
|
+
|
|
70
|
+
<!-- question cells -->
|
|
71
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px 0px 0px 0px,portrait.-168px 0px 0px 0px" onEntry="this.border-radius='26px'; this.border='5px solid #6D8600'" height="landscape.290px,portrait.42%" width="landscape.90%,portrait.100%" bg-color="#FFFFFF99">
|
|
72
|
+
${question_cells}
|
|
73
|
+
</lido-cell>
|
|
74
|
+
|
|
75
|
+
<!-- options cells -->
|
|
76
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px 38px 0px 0px,portrait.0" onEntry="this.border-radius='26px';" height="landscape.290px,portrait.35%" width="landscape.86%,portrait.100%" bg-color="transparent">
|
|
77
|
+
${opion_cells}
|
|
78
|
+
</lido-cell>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
</lido-cell>
|
|
82
|
+
|
|
83
|
+
</lido-container>
|
|
84
|
+
</main>
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgmaWordProblem',
|
|
4
|
+
argTypes: {
|
|
5
|
+
options: { control: 'object' },
|
|
6
|
+
answers: { control: 'object' },
|
|
7
|
+
PracticeMode: { control: 'boolean' },
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const palEgmaWordProblem1 = {
|
|
12
|
+
args: {
|
|
13
|
+
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?',
|
|
14
|
+
answer: '13',
|
|
15
|
+
options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
16
|
+
PracticeMode: false,
|
|
17
|
+
},
|
|
18
|
+
render: args => {
|
|
19
|
+
const xml = getContainerXml(args);
|
|
20
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
function getContainerXml(args) {
|
|
24
|
+
const dragCells = args.options
|
|
25
|
+
.map((digit, i) => `
|
|
26
|
+
<lido-text id="drag${i}" tab-index="${i}" height="landscape.190px, 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="orange" onEntry="this.fontWeight='800'; this.borderRadius='10px'; this.flex-shrink='0';" border-image="">
|
|
27
|
+
</lido-text>
|
|
28
|
+
`)
|
|
29
|
+
.join('\n');
|
|
30
|
+
const objectiveArray = args.answer.split('');
|
|
31
|
+
const dropCells = objectiveArray
|
|
32
|
+
.map((cell, i) => `
|
|
33
|
+
<lido-text id="drop${i}" tab-index="${i}" disable-edit="true" height="landscape.190px, portrait.auto" width="125px" visible="true" value="${cell}" string="?" font-family="'Baloo Bhai 2'" font-color="black" type="drop" font-size="landscape.130px, portrait.100px" bg-color="white" onEntry="this.fontWeight='800'; this.borderRadius='20px'; this.border='4px solid #f69820'" border-image="">
|
|
34
|
+
</lido-text>
|
|
35
|
+
`)
|
|
36
|
+
.join('\n');
|
|
37
|
+
// ---------------------- FINAL XML ----------------------
|
|
38
|
+
return `
|
|
39
|
+
<main>
|
|
40
|
+
|
|
41
|
+
<lido-container id="lido-container" objective="${args.answer.split('').join(',')}" tab-index="" template-id="dragAndDrop" show-drop-border="false" is-allow-only-correct="${args.PracticeMode}" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGMA/new.svg" 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 {
|
|
42
|
+
box-shadow: none !important;
|
|
43
|
+
}">
|
|
44
|
+
|
|
45
|
+
<!-- Chimple Avatar -->
|
|
46
|
+
<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="">
|
|
47
|
+
<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}">
|
|
48
|
+
</lido-avatar>
|
|
49
|
+
</lido-cell>
|
|
50
|
+
|
|
51
|
+
<lido-cell id="question11" layout="row" visible="true" margin="44px 0px 0px 0px" height="landscape.330px,portrait.70%"
|
|
52
|
+
width="landscape.95%,portrait.96%" bg-color="transparent" onEntry="this.justifyContent='center';" onTouch="this.speak='true'">
|
|
53
|
+
<lido-text id="question" tab-index="111" 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';">
|
|
54
|
+
</lido-text>
|
|
55
|
+
</lido-cell>
|
|
56
|
+
|
|
57
|
+
<!-- answer drop cell -->
|
|
58
|
+
<lido-cell layout="landscape.col, portrait.row" aria-hidden="true" visible="true" height="landscape.50%,portrait.150px" width="landscape.100%, portrait.80%" bg-Color="transparent" margin="landscape.0px,portrait.20px 0px 0px 0px" onEntry="this.z-index='1'; this.justify-content='flex-start'; this.alignItems='center'; this.gap='44px';">
|
|
59
|
+
|
|
60
|
+
<lido-cell layout="landscape.row, portrait.row" aria-hidden="true" visible="true" height="landscape.200px,portrait.150px" width="landscape.60%, portrait.80%" bg-Color="transparent" margin="landscape.0px,portrait.20px 0px 0px 0px" onEntry="this.z-index='1'; this.justify-content='center'; this.alignItems='center'; this.gap='20px';">
|
|
61
|
+
${dropCells}
|
|
62
|
+
</lido-cell>
|
|
63
|
+
|
|
64
|
+
<!-- answers drag cell -->
|
|
65
|
+
<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">
|
|
66
|
+
${dragCells}
|
|
67
|
+
</lido-cell>
|
|
68
|
+
</lido-cell>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</lido-container>
|
|
72
|
+
|
|
73
|
+
</main>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
export const palEgmaWordProblem2 = {
|
|
77
|
+
args: {
|
|
78
|
+
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?',
|
|
79
|
+
answer: '13',
|
|
80
|
+
options: ['10', '15', '12', '13'],
|
|
81
|
+
PracticeMode: false,
|
|
82
|
+
},
|
|
83
|
+
render: args => {
|
|
84
|
+
const xml = getContainerXml1(args);
|
|
85
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
function getContainerXml1(args) {
|
|
89
|
+
const optionCells = args.options
|
|
90
|
+
.map((digit, i) => `
|
|
91
|
+
<lido-text id="drag${i}" tab-index="${i}" height="landscape.270px, portrait.125px" width="landscape.270px, portrait.90px" visible="true" value="${digit}" string="${digit}" font-family="'Baloo Bhai 2'" font-color="black" type="click" font-size="104px" bg-color="orange" onEntry="this.fontWeight='800'; this.borderRadius='10px'; this.flex-shrink='0';" border-image="">
|
|
92
|
+
</lido-text>
|
|
93
|
+
`)
|
|
94
|
+
.join('\n');
|
|
95
|
+
// ---------------------- FINAL XML ----------------------
|
|
96
|
+
return `
|
|
97
|
+
<main>
|
|
98
|
+
|
|
99
|
+
<lido-container id="lido-container" objective="${args.answer}" tab-index="" template-id="mcq" show-drop-border="false" is-continue-on-correct="${args.PracticeMode}" is-allow-only-correct="${args.PracticeMode}" value="mainContainer1" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGMA/new.svg" 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 {
|
|
100
|
+
box-shadow: none !important;
|
|
101
|
+
}">
|
|
102
|
+
|
|
103
|
+
<!-- Chimple Avatar -->
|
|
104
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.344px,portrait.402px" width="landscape.296px,portrait.398px" x="landscape.85%, portrait.28%" y="landscape.30%, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
105
|
+
<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}">
|
|
106
|
+
</lido-avatar>
|
|
107
|
+
</lido-cell>
|
|
108
|
+
|
|
109
|
+
<lido-cell id="question11" layout="col" visible="true" margin="0px 0px 0px 0px" height="landscape.90%,portrait.70%"
|
|
110
|
+
width="landscape.98%,portrait.96%" bg-color="transparent" onEntry="this.justifyContent='center'; this.gap='100px'">
|
|
111
|
+
<lido-cell id="question11" layout="row" visible="true" margin="44px 0px 0px 0px" height="landscape.330px,portrait.70%"
|
|
112
|
+
width="landscape.95%,portrait.96%" bg-color="transparent" onEntry="this.justifyContent='center';" onTouch="this.speak='true'">
|
|
113
|
+
<lido-text id="question" tab-index="111" 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';">
|
|
114
|
+
</lido-text>
|
|
115
|
+
</lido-cell>
|
|
116
|
+
|
|
117
|
+
<lido-cell layout="landscape.row, portrait.row" aria-hidden="true" visible="true" height="landscape.50%,portrait.150px" width="landscape.85%, portrait.80%" bg-Color="transparent" margin="landscape.0px,portrait.20px 0px 0px 0px" onEntry="this.z-index='1'; this.justify-content='center'; this.alignItems='center'; this.gap='44px';">
|
|
118
|
+
|
|
119
|
+
<!-- answers option cell -->
|
|
120
|
+
|
|
121
|
+
${optionCells}
|
|
122
|
+
|
|
123
|
+
</lido-cell>
|
|
124
|
+
</lido-cell>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
</lido-container>
|
|
128
|
+
|
|
129
|
+
</main>
|
|
130
|
+
`;
|
|
131
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/InventedSpelling',
|
|
4
|
+
argTypes: {
|
|
5
|
+
PracticeMode: { control: 'boolean' },
|
|
6
|
+
option1: { control: 'text' },
|
|
7
|
+
option2: { control: 'text' },
|
|
8
|
+
option3: { control: 'text' },
|
|
9
|
+
option4: { control: 'text' },
|
|
10
|
+
option5: { control: 'text' },
|
|
11
|
+
correctAns: { control: 'text' },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: {
|
|
17
|
+
PracticeMode: false,
|
|
18
|
+
option1: 'kot',
|
|
19
|
+
option2: 'loy',
|
|
20
|
+
option3: 'fen',
|
|
21
|
+
option4: 'dob',
|
|
22
|
+
option5: 'vil',
|
|
23
|
+
correctAns: 'toy',
|
|
24
|
+
},
|
|
25
|
+
render: args => {
|
|
26
|
+
const xml = getContainerXml(args);
|
|
27
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
function getContainerXml(args) {
|
|
31
|
+
return `<main>
|
|
32
|
+
<lido-container objective="${(args.correctAns).toLowerCase()}" is-continue-on-correct="${args.PracticeMode}" template-id="mcq" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/background-images/Picture%20meaning.png" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onInCorrect="lido-avatar.avatarAnimate='Fail';" onEntry="inventedAudio.speak='true';">
|
|
33
|
+
<lido-cell visible="true" layout="col" width="80%" height="90%" bg-color="transparent">
|
|
34
|
+
<!-- Chimple Avatar -->
|
|
35
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.300px,portrait.402px" width="landscape.250px,portrait.398px" x="landscape.56%, portrait.28%" y="landscape.200px, portrait.77%" aria-hidden="true" z="1" bg-color="transparent" visible="true">
|
|
36
|
+
<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">
|
|
37
|
+
</lido-avatar>
|
|
38
|
+
<lido-image id="image" disableEdit="true" value="image" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/Shadow.png" bgColor="transparent" width="inherit" height="27px" x="0" y="235px">
|
|
39
|
+
</lido-image>
|
|
40
|
+
</lido-cell>
|
|
41
|
+
|
|
42
|
+
<lido-text visible="true" string="Choose the rhyming word" tab-index="1" font-size="80px" font-color="#07004E" border-radius="16px" bg-color="#FFF5BB" onEntry="this.fontWeight='700'; this.border='#FFB612 2px solid'; this.padding='25px 50px';"></lido-text>
|
|
43
|
+
<lido-text visible="false" id="inventedAudio" string="${args.correctAns}" tab-index="2" font-size="80px" font-color="#07004E" border-radius="16px" bg-color="#FFF5BB" onEntry="this.fontWeight='700'; this.border='#FFB612 2px solid'; this.padding='25px 50px';"></lido-text>
|
|
44
|
+
<lido-cell visible="true" layout="row" width="160px" height="160px" onTouch="inventedAudio.speak='true';" bg-color="white" border-radius="70px" onEntry="this.border='#ffac4c 2px solid';">
|
|
45
|
+
<lido-image visible="true" bg-color="transparent" width="100px" height="100px" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Icons/palAudioIcon.png"></lido-image>
|
|
46
|
+
</lido-cell>
|
|
47
|
+
<lido-cell layout="col" visible="true" width="100%" height="50%" bg-color="transparent" padding="0">
|
|
48
|
+
<lido-cell layout="row" visible="true" width="70%" height="50%" bg-color="transparent">
|
|
49
|
+
<lido-text visible="true" width="400px" height="136px" type="click" value="${(args.option1).toLowerCase()}" string="${args.option1}" font-size="110px" border-radius="20px" font-color="black" onEntry="this.fontWeight='700';"></lido-text>
|
|
50
|
+
<lido-text visible="true" width="400px" height="136px" type="click" value="${(args.option2).toLowerCase()}" string="${args.option2}" font-size="110px" border-radius="20px" font-color="black" onEntry="this.fontWeight='700';"></lido-text>
|
|
51
|
+
</lido-cell>
|
|
52
|
+
<lido-cell layout="row" visible="true" width="100%" height="50%" bg-color="transparent">
|
|
53
|
+
<lido-text visible="true" width="400px" height="136px" type="click" value="${(args.option3).toLowerCase()}" string="${args.option3}" font-size="110px" border-radius="20px" font-color="black" onEntry="this.fontWeight='700';"></lido-text>
|
|
54
|
+
<lido-text visible="true" width="400px" height="136px" type="click" value="${(args.option4).toLowerCase()}" string="${args.option4}" font-size="110px" border-radius="20px" font-color="black" onEntry="this.fontWeight='700';"></lido-text>
|
|
55
|
+
<lido-text visible="true" width="400px" height="136px" type="click" value="${(args.option5).toLowerCase()}" string="${args.option5}" font-size="110px" border-radius="20px" font-color="black" onEntry="this.fontWeight='700';"></lido-text>
|
|
56
|
+
</lido-cell>
|
|
57
|
+
</lido-cell>
|
|
58
|
+
</lido-cell>
|
|
59
|
+
</lido-player>
|
|
60
|
+
</main>`;
|
|
61
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgraMCQWithImage',
|
|
4
|
+
argTypes: {
|
|
5
|
+
question: { control: 'text' },
|
|
6
|
+
option1: { control: 'text' },
|
|
7
|
+
audio1: { control: 'text' },
|
|
8
|
+
optionImg1: { control: 'text' },
|
|
9
|
+
audio2: { control: 'text' },
|
|
10
|
+
option2: { control: 'text' },
|
|
11
|
+
optionImg2: { control: 'text' },
|
|
12
|
+
option3: { control: 'text' },
|
|
13
|
+
audio3: { control: 'text' },
|
|
14
|
+
optionImg3: { control: 'text' },
|
|
15
|
+
option4: { control: 'text' },
|
|
16
|
+
audio4: { control: 'text' },
|
|
17
|
+
optionImg4: { control: 'text' },
|
|
18
|
+
correctAns: { control: 'text' },
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const PalEgraMCQWithImage = {
|
|
23
|
+
args: {
|
|
24
|
+
question: 'हाथी',
|
|
25
|
+
option1: 'ELEPHANT',
|
|
26
|
+
audio1: '',
|
|
27
|
+
optionImg1: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/elephant.png',
|
|
28
|
+
option2: 'TORTOISE',
|
|
29
|
+
audio2: '',
|
|
30
|
+
optionImg2: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/tortoise.png',
|
|
31
|
+
option3: 'RAT',
|
|
32
|
+
audio3: '',
|
|
33
|
+
optionImg3: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/rat.png',
|
|
34
|
+
option4: 'RAT',
|
|
35
|
+
audio4: '',
|
|
36
|
+
optionImg4: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/rat.png',
|
|
37
|
+
correctAns: 'ELEPHANT',
|
|
38
|
+
},
|
|
39
|
+
render: args => {
|
|
40
|
+
const xml = getContainerXml(args);
|
|
41
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
function getContainerXml(args) {
|
|
45
|
+
return `<main>
|
|
46
|
+
<lido-container id="lido-container" value="maincontainer" objective="${args.correctAns}" aria-label="This is a multiple-option question. Select one option from the list." height="100vh" width="100vw" x="0" y="0" z="0" bg-color="transparent" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/palEgraTemplate3.png" visible="true" audio="background1.mp3" onTouch="" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onEntry="" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" show-check="false" is-continue-on-correct="true">
|
|
47
|
+
|
|
48
|
+
<!-- Chimple Avatar -->
|
|
49
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos1" height="350px" width="350px" x="landscape.1228px, portrait.273px" y="landscape.125px, portrait.1200px" aria-hidden="true" z="2" bg-color="transparent" type="" visible="true" audio="" onTouch="" onCorrect="" onEntry="this.animation='leftToPlace 1.5s linear';">
|
|
50
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="350px" width="350px" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp1/chimplecharacter.riv" alt-text="{chimpleCharacterRive}" bg-color="transparent">
|
|
51
|
+
</lido-avatar>
|
|
52
|
+
<lido-image id="image1" disable-edit="true" value="image1" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp1/Shadow.png" bg-color="transparent" width="186px" height="40px" x="77px" y="302px" alt-text="{shadowImgae}">
|
|
53
|
+
</lido-image>
|
|
54
|
+
</lido-cell>
|
|
55
|
+
|
|
56
|
+
<lido-cell visible="true" layout="col" width="100%" height="100%" bg-color="transparent">
|
|
57
|
+
<!-- Question -->
|
|
58
|
+
<lido-cell layout="flex" visible="true" width="518px" height="landscape.198px, portrait.25%" bg-color="#FFF5BB" onEntry="this.justifyContent='center'; this.borderRadius='16px'; this.alignContent='center'; this.animation='topToPlace 0.5s linear';" margin="landscape.75px 0px 0px 0px, portrait.0px 0px 0px 0px">
|
|
59
|
+
<lido-text id="textA" tab-index="1" value="${args.question}" visible="true" width="1000px" height="100px" onEntry="this.boxShadow='unset'; this.fontWeight='700';" string="${args.question}" font-family="'Baloo 2', serif" font-size="90px" font-color="black" bg-color="transparent" z="0" x="25px" y="20px" onTouch="this.speak='true';"></lido-text>
|
|
60
|
+
</lido-cell>
|
|
61
|
+
|
|
62
|
+
<!-- Options -->
|
|
63
|
+
<lido-cell layout="flex" visible="true" width="100%" height="90%" bg-color="transparent" onEntry="this.justifyContent='center'; this.alignContent='center'; this.animation='bottomToPlace 1s linear';" margin="landscape.-60px 0px -210px 0px, portrait.0px 0px 0px 0px">
|
|
64
|
+
<lido-cell visible="true" layout="landscape.row, portrait.wrap" width="landscape.85%, portrait.73%" height="landscape.100%, portrait.auto" bg-color="transparent" gap="landscape.0px, portrait.55px" onEntry="">
|
|
65
|
+
<lido-cell tab-index="2" type="click" visible="true" layout="col" bg-color="transparent" width="landscape.25%, portrait.100%" value="${args.option1}" height="50%" onEntry="this.borderRadius='25px'; this.padding='0';" onCorrect="this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" audio='${args.audio1}' onTouch="this.speak='true';">
|
|
66
|
+
<lido-image visible="true" src="${args.optionImg1}" bg-color="transparent" width="90%" height="auto" border-radius="25px 25px 0 0" onEntry="this.marginTop='10px';"></lido-image>
|
|
67
|
+
</lido-cell>
|
|
68
|
+
<lido-cell tab-index="3" type="click" visible="true" layout="col" bg-color="transparent" width="landscape.25%, portrait.100%" value="${args.option2}" height="50%" onEntry="this.borderRadius='25px'; this.padding='0';" onCorrect="this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" audio='${args.audio2}' onTouch="this.speak='true';">
|
|
69
|
+
<lido-image visible="true" src="${args.optionImg2}" bg-color="transparent" width="90%" height="auto" border-radius="25px 25px 0 0" onEntry="this.marginTop='10px';"></lido-image>
|
|
70
|
+
</lido-cell>
|
|
71
|
+
<lido-cell tab-index="4" type="click" visible="true" layout="col" bg-color="transparent" width="landscape.25%, portrait.100%" value="${args.option3}" height="50%" onEntry="this.borderRadius='25px'; this.padding='0';" margin="landscape.0, portrait.20px 0 0 0" onCorrect="this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" audio='${args.audio3}' onTouch="this.speak='true';">
|
|
72
|
+
<lido-image visible="true" src="${args.optionImg3}" bg-color="transparent" width="90%" height="auto" border-radius="25px 25px 0 0" onEntry="this.marginTop='10px';"></lido-image>
|
|
73
|
+
</lido-cell>
|
|
74
|
+
<lido-cell tab-index="5" type="click" visible="true" layout="col" bg-color="transparent" width="landscape.25%, portrait.100%" value="${args.option4}" height="50%" onEntry="this.borderRadius='25px'; this.padding='0';" margin="landscape.0, portrait.20px 0 0 0" onCorrect="this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" audio='${args.audio4}' onTouch="this.speak='true';">
|
|
75
|
+
<lido-image visible="true" src="${args.optionImg4}" bg-color="transparent" width="90%" height="auto" border-radius="25px 25px 0 0" onEntry="this.marginTop='10px';"></lido-image>
|
|
76
|
+
</lido-cell>
|
|
77
|
+
</lido-cell>
|
|
78
|
+
</lido-cell>
|
|
79
|
+
|
|
80
|
+
<lido-cell layout="flex" height="30%" width="100%" x="landscape.-50px, portrait.100px" y="507px" z="2" bg-color="transparent" type="" visible="landscape.false, portrait.true" audio="" onTouch="" onCorrect="" onEntry="this.justifyContent='center'; this.alignContent='center'; this.animation='leftToPlace 1.5s linear'; ">
|
|
81
|
+
|
|
82
|
+
</lido-cell>
|
|
83
|
+
|
|
84
|
+
</lido-cell>
|
|
85
|
+
</lido-container>
|
|
86
|
+
</main>`;
|
|
87
|
+
}
|
package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgraOptionWithAudio',
|
|
4
|
+
argTypes: {
|
|
5
|
+
option1: { control: 'text' },
|
|
6
|
+
audio1: { control: 'text' },
|
|
7
|
+
audio2: { control: 'text' },
|
|
8
|
+
option2: { control: 'text' },
|
|
9
|
+
option3: { control: 'text' },
|
|
10
|
+
audio3: { control: 'text' },
|
|
11
|
+
option4: { control: 'text' },
|
|
12
|
+
audio4: { control: 'text' },
|
|
13
|
+
audioImage: { control: 'text' },
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const PalEgraOptionWithAudio = {
|
|
18
|
+
args: {
|
|
19
|
+
option1: 'अम्मा',
|
|
20
|
+
audio1: '',
|
|
21
|
+
option2: 'क्या',
|
|
22
|
+
audio2: '',
|
|
23
|
+
option3: 'ख्याल',
|
|
24
|
+
audio3: '',
|
|
25
|
+
option4: 'मख्खी',
|
|
26
|
+
audio4: '',
|
|
27
|
+
audioImage: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/audio.png'
|
|
28
|
+
},
|
|
29
|
+
render: args => {
|
|
30
|
+
const xml = getContainerXml(args);
|
|
31
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
function getContainerXml(args) {
|
|
35
|
+
const objective = `${args.option1.trim()},${args.option2.trim()},${args.option3.trim()},${args.option4.trim()}`;
|
|
36
|
+
return `<main>
|
|
37
|
+
<lido-container id="lido-container" tab-index="1" template-id="dragAndDrop" value="maincontainer" objective="${objective}" aria-label="This is a multiple-option question. Select one option from the list." height="100vh" width="100vw" x="0" y="0" z="0" bg-color="transparent" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/palEgraTemplate9.png" visible="true" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onEntry="" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" show-check="false" is-continue-on-correct="true" is-allow-only-correct="true">
|
|
38
|
+
|
|
39
|
+
<!-- Chimple Avatar -->
|
|
40
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos1" height="350px" width="350px" x="landscape.625px, portrait.273px" y="landscape.40px, portrait.1200px" aria-hidden="true" z="0" bg-color="transparent" type="" visible="true" audio="" onCorrect="" onEntry="this.animation='leftToPlace 1.5s linear';">
|
|
41
|
+
<lido-avatar id="lido-avatar" disable-edit="true" visible="true" height="350px" width="350px" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp1/chimplecharacter.riv" alt-text="{chimpleCharacterRive}" bg-color="transparent">
|
|
42
|
+
</lido-avatar>
|
|
43
|
+
<lido-image id="image1" disable-edit="true" value="image1" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp1/Shadow.png" bg-color="transparent" width="186px" height="40px" x="77px" y="302px" alt-text="{shadowImgae}">
|
|
44
|
+
</lido-image>
|
|
45
|
+
</lido-cell>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
<lido-cell visible="true" layout="col" width="100%" height="100%" bg-color="transparent">
|
|
49
|
+
|
|
50
|
+
<!-- Question -->
|
|
51
|
+
<lido-cell layout="row" visible="true" width="100%" height="landscape.150px, portrait.25%" bg-color="transparent" onEntry="this.justifyContent='center'; this.borderRadius='16px'; this.alignContent='center'; this.animation='topToPlace 0.5s linear';" margin="landscape.125px 0px 60px 0px, portrait.0px 0px 0px 0px" gap="190px">
|
|
52
|
+
<lido-image id="icon1" type="click" is-slice="true" disable-edit="true" value="image1" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/PalEgraTempAudioIcon.png" bg-color="transparent" width="225px" height="240px" x="77px" y="302px" alt-text="" onTouch="text1.speak='true';">
|
|
53
|
+
<lido-text id="text1" tab-index="2" value="${args.option1}" visible="false" width="1000px" height="100px" onEntry="this.boxShadow='unset'; this.fontWeight='700';" string="${args.option1}" font-family="'Baloo 2', serif" font-size="90px" font-color="black" bg-color="transparent" z="0" x="25px" y="20px">
|
|
54
|
+
</lido-text>
|
|
55
|
+
</lido-image>
|
|
56
|
+
<lido-image id="icon2" type="click" is-slice="true" disable-edit="true" value="image2" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/PalEgraTempAudioIcon.png" bg-color="transparent" width="225px" height="240px" x="77px" y="302px" alt-text="" onTouch="text2.speak='true';">
|
|
57
|
+
<lido-text id="text2" tab-index="3" value="${args.option2}" visible="false" width="1000px" height="100px" onEntry="this.boxShadow='unset'; this.fontWeight='700';" string="${args.option2}" font-family="'Baloo 2', serif" font-size="90px" font-color="black" bg-color="transparent" z="0" x="25px" y="20px">
|
|
58
|
+
</lido-text>
|
|
59
|
+
</lido-image>
|
|
60
|
+
<lido-image id="icon3" type="click" is-slice="true" disable-edit="true" value="image3" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/PalEgraTempAudioIcon.png" bg-color="transparent" width="225px" height="240px" x="77px" y="302px" alt-text="" onTouch="text3.speak='true';">
|
|
61
|
+
<lido-text id="text3" tab-index="4" value="${args.option3}" visible="false" width="1000px" height="100px" onEntry="this.boxShadow='unset'; this.fontWeight='700';" string="${args.option3}" font-family="'Baloo 2', serif" font-size="90px" font-color="black" bg-color="transparent" z="0" x="25px" y="20px">
|
|
62
|
+
</lido-text>
|
|
63
|
+
</lido-image>
|
|
64
|
+
<lido-image id="icon4" type="click" is-slice="true" disable-edit="true" value="image4" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/PalEgraTempAudioIcon.png" bg-color="transparent" width="225px" height="240px" x="77px" y="302px" alt-text="" onTouch="text4.speak='true';">
|
|
65
|
+
<lido-text id="text4" tab-index="5" value="${args.option4}" visible="false" width="1000px" height="100px" onEntry="this.boxShadow='unset'; this.fontWeight='700';" string="${args.option4}" font-family="'Baloo 2', serif" font-size="90px" font-color="black" bg-color="transparent" z="0" x="25px" y="20px">
|
|
66
|
+
</lido-text>
|
|
67
|
+
</lido-image>
|
|
68
|
+
</lido-cell>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
<!-- drop boxes -->
|
|
72
|
+
<lido-cell visible="true" layout="landscape.row, portrait.wrap" width="landscape.100%, portrait.90%" height="landscape.100%, portrait.auto" bg-color="transparent" gap="landscape.25px, portrait.55px" onEntry="">
|
|
73
|
+
<lido-text id="drop1" tab-index="6" type="drop" visible="true" bg-color="#FFFFFF;" width="landscape.320px, portrait.100%" value="${args.option1}" height="212px" onEntry="this.borderRadius='25px'; this.padding='0';" onCorrect="lido-avatar.avatarAnimate='Success';" onInCorrect="lido-avatar.avatarAnimate='Fail';">
|
|
74
|
+
</lido-text>
|
|
75
|
+
<lido-text id="drop2" tab-index="7" type="drop" visible="true" bg-color="#FFFFFF;" width="landscape.320px, portrait.100%" value="${args.option2}" height="212px" onEntry="this.borderRadius='25px'; this.padding='0';" onCorrect="lido-avatar.avatarAnimate='Success';" onInCorrect="lido-avatar.avatarAnimate='Fail';">
|
|
76
|
+
</lido-text>
|
|
77
|
+
<lido-text id="drop3" tab-index="8" type="drop" visible="true" bg-color="#FFFFFF;" width="landscape.320px, portrait.100%" value="${args.option3}" height="212px" onEntry="this.borderRadius='25px'; this.padding='0';" onCorrect="lido-avatar.avatarAnimate='Success';" onInCorrect="lido-avatar.avatarAnimate='Fail';">
|
|
78
|
+
</lido-text>
|
|
79
|
+
<lido-text id="drop4" tab-index="9" type="drop" visible="true" bg-color="#FFFFFF;" width="landscape.320px, portrait.100%" value="${args.option4}" height="212px" onEntry="this.borderRadius='25px'; this.padding='0';" onCorrect="lido-avatar.avatarAnimate='Success';" onInCorrect="lido-avatar.avatarAnimate='Fail';">
|
|
80
|
+
</lido-text>
|
|
81
|
+
</lido-cell>
|
|
82
|
+
|
|
83
|
+
<!-- drag Options -->
|
|
84
|
+
<lido-cell visible="true" layout="landscape.row, portrait.wrap" width="landscape.100%, portrait.90%" height="landscape.100%, portrait.auto" bg-color="transparent" gap="landscape.70px, portrait.55px" onEntry="">
|
|
85
|
+
<lido-text id="drag1" tab-index="10" type="drag" visible="true" bg-color="#FFAC4C" width="landscape.320px, portrait.100%" string="${args.option1}" value="${args.option1}" font-size="110px" height="212px" onEntry="this.borderRadius='25px'; this.padding='0'; this.fontWeight='700';">
|
|
86
|
+
</lido-text>
|
|
87
|
+
<lido-text id="drag2" tab-index="11" type="drag" visible="true" bg-color="#FFAC4C" width="landscape.320px, portrait.100%" string="${args.option2}" value="${args.option2}" font-size="110px" height="212px" onEntry="this.borderRadius='25px'; this.padding='0'; this.fontWeight='700';">
|
|
88
|
+
</lido-text>
|
|
89
|
+
<lido-text id="drag3" tab-index="12" type="drag" visible="true" bg-color="#FFAC4C" width="landscape.320px, portrait.100%" string="${args.option3}" value="${args.option3}" font-size="110px" height="212px" onEntry="this.borderRadius='25px'; this.padding='0'; this.fontWeight='700';">
|
|
90
|
+
</lido-text>
|
|
91
|
+
<lido-text id="drag4" tab-index="13" type="drag" visible="true" bg-color="#FFAC4C" width="landscape.320px, portrait.100%" string="${args.option4}" value="${args.option4}" font-size="110px" height="212px" onEntry="this.borderRadius='25px'; this.padding='0'; this.fontWeight='700';">
|
|
92
|
+
</lido-text>
|
|
93
|
+
</lido-cell>
|
|
94
|
+
|
|
95
|
+
</lido-cell>
|
|
96
|
+
</lido-container>
|
|
97
|
+
</main>`;
|
|
98
|
+
}
|