lido-player 0.0.2-alpha-57-dev → 0.0.2-alpha-59-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 +94 -34
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-a61cfc6b.js → utils-03573882.js} +160 -124
- package/dist/collection/components/container/lido-container.js +60 -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/matchBox/matchBox2.stories.js +74 -44
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +4 -4
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +2 -2
- 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/order-tractor/order-tractor-ascending-order.stories.js +6 -5
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +6 -6
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +106 -0
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +91 -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/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_word_formation/palEgra_WordFormation.stories.js +73 -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 +16 -13
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +17 -14
- 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/sumTogether/sumTogether.stories.js +11 -10
- 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 +29 -20
- package/dist/collection/utils/utilsHandlers/clickHandler.js +2 -0
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +24 -20
- 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-73e3f0f4.js → p-2bb1f74d.js} +203 -1
- package/dist/components/{p-f3bc4577.js → p-33b83222.js} +1 -1
- package/dist/components/{p-0712a27e.js → p-3513b1f3.js} +159 -125
- package/dist/components/{p-f2b53e8e.js → p-356e56bd.js} +2 -2
- package/dist/components/{p-b9875116.js → p-49ccf573.js} +18 -7
- package/dist/components/{p-330caab8.js → p-4d9462ab.js} +4 -4
- package/dist/components/{p-4d332eab.js → p-5aa24314.js} +2 -2
- package/dist/components/{p-d1b5079b.js → p-5c990168.js} +45 -6
- package/dist/components/{p-21852d55.js → p-5eeaccab.js} +2 -2
- package/dist/components/{p-480f708a.js → p-6819005f.js} +11 -2
- package/dist/components/{p-ffc40642.js → p-6bbad90f.js} +2 -2
- package/dist/components/{p-e1ba0c44.js → p-73e4bb01.js} +41 -33
- package/dist/components/{p-ff801ba1.js → p-84302365.js} +1 -1
- package/dist/components/{p-0a41b2f8.js → p-99fcbae4.js} +1 -1
- package/dist/components/{p-9104d427.js → p-9b35082a.js} +2 -2
- package/dist/components/{p-882b291d.js → p-ad0f335e.js} +2 -2
- package/dist/components/{p-c4739621.js → p-aff68c41.js} +3 -3
- package/dist/components/{p-2829c82c.js → p-d9b17242.js} +2 -2
- package/dist/components/{p-cca36777.js → p-de62d08e.js} +3 -3
- package/dist/components/{p-4e041807.js → p-e8e9250e.js} +2 -2
- package/dist/components/{p-17f84b2f.js → p-f238004e.js} +2 -2
- package/dist/components/{p-eab0ebb7.js → p-f9426cbe.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +94 -34
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-7ed76799.js → utils-3995d2d5.js} +159 -125
- 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-75daccb0.entry.js +1 -0
- package/dist/lido-player/{p-17d93181.js → p-aee89fba.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/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/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_word_formation/palEgra_WordFormation.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-7ab0a273.js +0 -204
- package/dist/lido-player/p-fa9dfdf8.entry.js +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgmaCalculateSum',
|
|
4
|
+
argTypes: {
|
|
5
|
+
number1: { control: 'text', name: 'Number 1' },
|
|
6
|
+
number2: { control: 'text', name: 'Number 2' },
|
|
7
|
+
options: { control: 'object', name: 'options' },
|
|
8
|
+
sign: { control: 'text', name: 'sign', defaultValue: '+' },
|
|
9
|
+
isAllowOnlyCorrect: { control: 'boolean', name: 'isAllowOnlyCorrect' },
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
number1: '3',
|
|
13
|
+
number2: '2',
|
|
14
|
+
sign: '+',
|
|
15
|
+
options: ['1', '7', '5', '9'],
|
|
16
|
+
isAllowOnlyCorrect: true,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
export const PalEgmaMultiOption = {
|
|
21
|
+
render: (args) => {
|
|
22
|
+
const xml = getContainerXml(args);
|
|
23
|
+
return html `<lido-home xml-data="${xml}" xmlData="${xml}"></lido-home>`;
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
function getContainerXml(args) {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
const number1 = args.number1;
|
|
29
|
+
const number2 = args.number2;
|
|
30
|
+
const options = args.options;
|
|
31
|
+
const sign = (_a = args.sign) !== null && _a !== void 0 ? _a : '+';
|
|
32
|
+
const isAllowOnlyCorrect = (_b = args.isAllowOnlyCorrect) !== null && _b !== void 0 ? _b : true;
|
|
33
|
+
const objective = String(Number(number1) + Number(number2));
|
|
34
|
+
const imageCells1 = Array.from({ length: Number(number1) }, (_, i) => i + 1)
|
|
35
|
+
.map((digit, i) => `
|
|
36
|
+
<lido-image id="image1-${digit}" height="landscape.140px, portrait.125px" width="60px" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGMA/Kulfi.png" bg-color="transparent" border-image="">
|
|
37
|
+
</lido-image>
|
|
38
|
+
`)
|
|
39
|
+
.join('\n');
|
|
40
|
+
const imageCells2 = Array.from({ length: Number(number2) }, (_, i) => i + 1)
|
|
41
|
+
.map((digit, i) => `
|
|
42
|
+
<lido-image id="image2-${digit}" height="landscape.140px, portrait.125px" width="60px" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGMA/Kulfi.png" bg-color="transparent" border-image="">
|
|
43
|
+
</lido-image>
|
|
44
|
+
`)
|
|
45
|
+
.join('\n');
|
|
46
|
+
const clickCells = options
|
|
47
|
+
.map((digit, i) => `
|
|
48
|
+
<lido-text id="click-${digit}" tab-index="${50 + i}" height="landscape.212px, 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="#FFAC4C" onEntry="this.fontWeight='800'; this.borderRadius='24px'; this.flex-shrink='0';" border-image="" onCorrect="this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" >
|
|
49
|
+
</lido-text>
|
|
50
|
+
`)
|
|
51
|
+
.join('\n');
|
|
52
|
+
return `
|
|
53
|
+
<main>
|
|
54
|
+
<lido-container id="lido-container" objective="${objective}" tab-index="1" template-id="mcq" 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="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">
|
|
55
|
+
|
|
56
|
+
<!-- Chimple Avatar -->
|
|
57
|
+
<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.418px, portrait.1020px" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="this.flex-shrink='0';">
|
|
58
|
+
<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="">
|
|
59
|
+
</lido-avatar>
|
|
60
|
+
<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}">
|
|
61
|
+
</lido-image>
|
|
62
|
+
</lido-cell>
|
|
63
|
+
|
|
64
|
+
<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 click the correct answer" string="solve the equation and click the correct answer" visible="false" bg-color="transparent" onEntry="">
|
|
65
|
+
</lido-text>
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<!-- question row-->
|
|
69
|
+
<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.35px,portrait.40px">
|
|
70
|
+
<lido-cell layout="col" is-slice="true" visible="true" height="landscape.245px,portrait.41%" width="auto" bg-Color="#FFF5BB" onEntry="this.z-index='1'; this.borderRadius='16px';" onCorrect="">
|
|
71
|
+
<lido-cell layout="row" is-slice="true" visible="true" height="landscape.15%,portrait.41%" width="auto" bg-Color="transparent" onEntry="this.z-index='1';" onCorrect="">
|
|
72
|
+
${imageCells1}
|
|
73
|
+
</lido-cell>
|
|
74
|
+
<lido-cell layout="row" is-slice="true" visible="true" height="landscape.5%,portrait.41%" width="inherit" bg-Color="transparent" onEntry="this.z-index='1';" onCorrect="">
|
|
75
|
+
<lido-text id="num-1" is-slice="true" disable-edit="true" height="landscape.156px, portrait.125px" width="inherit" visible="true" value="${number1}" string="${number1}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.90px, portrait.100px" bg-color="transparent" onEntry="this.fontWeight='700'; this.borderRadius='16px';" border-image="">
|
|
76
|
+
</lido-text>
|
|
77
|
+
</lido-cell>
|
|
78
|
+
</lido-cell>
|
|
79
|
+
<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="">
|
|
80
|
+
</lido-text>
|
|
81
|
+
<lido-cell layout="col" is-slice="true" visible="true" height="landscape.245px,portrait.41%" width="auto" bg-Color="#FFF5BB" onEntry="this.z-index='1'; this.borderRadius='16px';" onCorrect="">
|
|
82
|
+
<lido-cell layout="row" is-slice="true" visible="true" height="landscape.15%,portrait.41%" width="auto" bg-Color="transparent" onEntry="this.z-index='1';" onCorrect="">
|
|
83
|
+
${imageCells2}
|
|
84
|
+
</lido-cell>
|
|
85
|
+
<lido-cell layout="row" is-slice="true" visible="true" height="landscape.5%,portrait.41%" width="inherit" bg-Color="transparent" onEntry="this.z-index='1';" onCorrect="">
|
|
86
|
+
<lido-text id="num-2" is-slice="true" disable-edit="true" height="landscape.156px, portrait.125px" width="inherit" visible="true" value="${number2}" string="${number2}" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.90px, portrait.100px" bg-color="transparent" onEntry="this.fontWeight='700'; this.borderRadius='16px';" border-image="">
|
|
87
|
+
</lido-text>
|
|
88
|
+
</lido-cell>
|
|
89
|
+
</lido-cell>
|
|
90
|
+
<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="">
|
|
91
|
+
</lido-text>
|
|
92
|
+
<lido-text id="drop-answer" disable-edit="true" height="landscape.287px, portrait.125px" width="208px" visible="true" value="5" string="?" font-family="'Baloo Bhai 2'" font-color="black" font-size="landscape.140px, portrait.100px" bg-color="transparent" onEntry="this.fontWeight='700'; this.borderRadius='16px';" border-image="">
|
|
93
|
+
</lido-text>
|
|
94
|
+
</lido-cell>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<!-- answers drag cell -->
|
|
98
|
+
<!-- option row-->
|
|
99
|
+
<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">
|
|
100
|
+
${clickCells}
|
|
101
|
+
</lido-cell>
|
|
102
|
+
</lido-container>
|
|
103
|
+
|
|
104
|
+
</main>
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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-image is-slice="true" height="225px" width="175px" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/sequence-box/card-slot_empty.png" onEntry="this.opacity='1';">
|
|
41
|
+
<lido-text id="drop-${cell}" tab-index="${25 + i}" disable-edit="true" height="landscape.215px, portrait.125px" width="135px" visible="true" value="${cell}" string="?" font-family="'Baloo Bhai 2'" font-color="black" type="drop" font-size="landscape.140px, portrait.100px" bg-color="transparent" onEntry="this.fontWeight='700'; this.borderRadius='16px';" border-image="">
|
|
42
|
+
</lido-text>
|
|
43
|
+
</lido-image>
|
|
44
|
+
`)
|
|
45
|
+
.join('\n');
|
|
46
|
+
const dragCells = options
|
|
47
|
+
.map((digit, i) => `
|
|
48
|
+
<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';">
|
|
49
|
+
</lido-text>
|
|
50
|
+
`)
|
|
51
|
+
.join('\n');
|
|
52
|
+
return `
|
|
53
|
+
<main>
|
|
54
|
+
<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">
|
|
55
|
+
|
|
56
|
+
<!-- Chimple Avatar -->
|
|
57
|
+
<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';">
|
|
58
|
+
<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="">
|
|
59
|
+
</lido-avatar>
|
|
60
|
+
<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}">
|
|
61
|
+
</lido-image>
|
|
62
|
+
</lido-cell>
|
|
63
|
+
|
|
64
|
+
<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="">
|
|
65
|
+
</lido-text>
|
|
66
|
+
|
|
67
|
+
<!-- question row-->
|
|
68
|
+
<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">
|
|
69
|
+
<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="">
|
|
70
|
+
</lido-text>
|
|
71
|
+
<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="">
|
|
72
|
+
</lido-text>
|
|
73
|
+
<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="">
|
|
74
|
+
</lido-text>
|
|
75
|
+
<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="">
|
|
76
|
+
</lido-text>
|
|
77
|
+
<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">
|
|
78
|
+
${dropCells}
|
|
79
|
+
</lido-cell>
|
|
80
|
+
</lido-cell>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<!-- answers drag cell -->
|
|
84
|
+
<!-- option row-->
|
|
85
|
+
<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">
|
|
86
|
+
${dragCells}
|
|
87
|
+
</lido-cell>
|
|
88
|
+
</lido-container>
|
|
89
|
+
</main>
|
|
90
|
+
`;
|
|
91
|
+
}
|
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
|
+
}
|