lido-player 0.0.2-alpha-59-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 +5 -3
- package/dist/cjs/{utils-03573882.js → utils-28faa755.js} +3 -3
- package/dist/collection/components/container/lido-container.js +4 -2
- package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +79 -0
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +2 -2
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +2 -4
- package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +98 -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/palStorytale/palStorytale.stories.js +35 -0
- package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +2 -2
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +1 -1
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +22 -22
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/{p-5eeaccab.js → p-06cecca5.js} +1 -1
- package/dist/components/{p-84302365.js → p-16604098.js} +1 -1
- package/dist/components/{p-3513b1f3.js → p-235091a1.js} +3 -3
- package/dist/components/{p-49ccf573.js → p-32c89979.js} +1 -1
- package/dist/components/{p-ad0f335e.js → p-354f7b19.js} +2 -2
- package/dist/components/{p-2bb1f74d.js → p-37c86a94.js} +1 -1
- package/dist/components/{p-33b83222.js → p-3acada8c.js} +1 -1
- package/dist/components/{p-d9b17242.js → p-3acd9a2e.js} +1 -1
- package/dist/components/{p-99fcbae4.js → p-4d01394c.js} +1 -1
- package/dist/components/{p-f9426cbe.js → p-57400ebc.js} +1 -1
- package/dist/components/{p-e8e9250e.js → p-5e7c6afa.js} +1 -1
- package/dist/components/{p-4d9462ab.js → p-74c270d2.js} +2 -2
- package/dist/components/{p-de62d08e.js → p-8a32f7cb.js} +1 -1
- package/dist/components/{p-9b35082a.js → p-8c0667eb.js} +1 -1
- package/dist/components/{p-6819005f.js → p-8f082c62.js} +1 -1
- package/dist/components/{p-6bbad90f.js → p-93acfbb2.js} +1 -1
- package/dist/components/{p-356e56bd.js → p-a182c9a2.js} +1 -1
- package/dist/components/{p-5c990168.js → p-b151457d.js} +6 -4
- package/dist/components/{p-f238004e.js → p-b867548e.js} +1 -1
- package/dist/components/{p-5aa24314.js → p-c90d92db.js} +1 -1
- package/dist/components/{p-aff68c41.js → p-db2a05f5.js} +3 -3
- package/dist/components/{p-73e4bb01.js → p-de45dcab.js} +21 -21
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +5 -3
- package/dist/esm/{utils-3995d2d5.js → utils-2edeb213.js} +3 -3
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-75daccb0.entry.js → p-280e3d34.entry.js} +1 -1
- package/dist/lido-player/{p-aee89fba.js → p-add7f36e.js} +1 -1
- package/dist/types/stories/Templates/imageMatch/imageMatch.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.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/palStorytale/palStorytale.stories.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-baff5c15.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-28faa755.js');
|
|
7
7
|
|
|
8
8
|
var rive = {exports: {}};
|
|
9
9
|
|
|
@@ -10077,7 +10077,9 @@ const LidoContainer = class {
|
|
|
10077
10077
|
}
|
|
10078
10078
|
const langToApply = this.resolveLanguage();
|
|
10079
10079
|
this.updateChildTextLanguage(langToApply);
|
|
10080
|
-
|
|
10080
|
+
setTimeout(() => {
|
|
10081
|
+
utils.highlightElement();
|
|
10082
|
+
}, 100);
|
|
10081
10083
|
}
|
|
10082
10084
|
disconnectedCallback() {
|
|
10083
10085
|
window.removeEventListener('resize', () => this.scaleContainer(this.el));
|
|
@@ -10097,7 +10099,7 @@ const LidoContainer = class {
|
|
|
10097
10099
|
userSelect: 'none', // Prevent any field selection
|
|
10098
10100
|
};
|
|
10099
10101
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
10100
|
-
return (index.h(index.Host, { key: '
|
|
10102
|
+
return (index.h(index.Host, { key: 'bdae7c7d24046fc0f726668b9b1bbb84f3ddd3dd', id: "lido-container", locale: this.locale, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio }, index.h("lido-text", { key: 'aa5d73493b429f0d99c5737aed89488c565e1699', visible: "false", id: this.templateId, audio: "", string: this.instructName }), index.h("slot", { key: 'd251b1fed4468aabd66a6f6c14b3de234329ab64' })));
|
|
10101
10103
|
}
|
|
10102
10104
|
get el() { return index.getElement(this); }
|
|
10103
10105
|
static get watchers() { return {
|
|
@@ -700,7 +700,6 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
700
700
|
const dragSelectedData = JSON.stringify(buildDragSelectedMapFromDOM());
|
|
701
701
|
const dropSelectedDataobject = buildDragSelectedMapFromDOM();
|
|
702
702
|
JSON.stringify(dropSelectedDataobject);
|
|
703
|
-
console.log("dragggedddd elem", { value: dragElement.getAttribute("value") });
|
|
704
703
|
let dropHasDrag = buildDropHasDragFromDOM();
|
|
705
704
|
if (!dropElement) {
|
|
706
705
|
handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedValueData, dragSelectedData);
|
|
@@ -933,6 +932,7 @@ function updateDropBorder(element) {
|
|
|
933
932
|
if (dragSelectedElements.length > 0) {
|
|
934
933
|
element.classList.add('filled');
|
|
935
934
|
element.classList.remove('empty');
|
|
935
|
+
element.classList.remove('highlight-element');
|
|
936
936
|
}
|
|
937
937
|
else {
|
|
938
938
|
if (!element.classList.contains('math-matrix')) {
|
|
@@ -1164,7 +1164,7 @@ function highlightElement() {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
// Highlight corresponding drag elements if mistakes are more than 2
|
|
1166
1166
|
const dragElements = container.querySelectorAll(`[type="drag"]`);
|
|
1167
|
-
if (countOfMistakes > 2) {
|
|
1167
|
+
if (countOfMistakes > 2 && container.getAttribute("is-continue-on-correct") === "true") {
|
|
1168
1168
|
dragElements.forEach(dragEl => {
|
|
1169
1169
|
dragEl.classList.remove('highlight-element');
|
|
1170
1170
|
if (dragEl.getAttribute('value') === dropEle.getAttribute('value')) {
|
|
@@ -1181,7 +1181,7 @@ function highlightElement() {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
else {
|
|
1184
|
-
if (countOfMistakes <= 2)
|
|
1184
|
+
if (countOfMistakes <= 2 || container.getAttribute("is-continue-on-correct") === "false")
|
|
1185
1185
|
return;
|
|
1186
1186
|
const clickTemplate = container.querySelectorAll("[type='click']");
|
|
1187
1187
|
clickTemplate.forEach(clickEl => {
|
|
@@ -201,7 +201,9 @@ export class LidoContainer {
|
|
|
201
201
|
}
|
|
202
202
|
const langToApply = this.resolveLanguage();
|
|
203
203
|
this.updateChildTextLanguage(langToApply);
|
|
204
|
-
|
|
204
|
+
setTimeout(() => {
|
|
205
|
+
highlightElement();
|
|
206
|
+
}, 100);
|
|
205
207
|
}
|
|
206
208
|
disconnectedCallback() {
|
|
207
209
|
window.removeEventListener('resize', () => this.scaleContainer(this.el));
|
|
@@ -221,7 +223,7 @@ export class LidoContainer {
|
|
|
221
223
|
userSelect: 'none', // Prevent any field selection
|
|
222
224
|
};
|
|
223
225
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
224
|
-
return (h(Host, { key: '
|
|
226
|
+
return (h(Host, { key: 'bdae7c7d24046fc0f726668b9b1bbb84f3ddd3dd', id: "lido-container", locale: this.locale, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio }, h("lido-text", { key: 'aa5d73493b429f0d99c5737aed89488c565e1699', visible: "false", id: this.templateId, audio: "", string: this.instructName }), h("slot", { key: 'd251b1fed4468aabd66a6f6c14b3de234329ab64' })));
|
|
225
227
|
}
|
|
226
228
|
static get is() { return "lido-container"; }
|
|
227
229
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/imageMatch',
|
|
4
|
+
argTypes: {
|
|
5
|
+
questionText: { control: 'text' },
|
|
6
|
+
option1: { control: 'text' },
|
|
7
|
+
option2: { control: 'text' },
|
|
8
|
+
option3: { control: 'text' },
|
|
9
|
+
option4: { control: 'text' },
|
|
10
|
+
answer: { control: 'text' },
|
|
11
|
+
image: { control: 'file' },
|
|
12
|
+
isAllowOnlyCorrect: { control: 'boolean' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
export const imageMatch = {
|
|
17
|
+
args: {
|
|
18
|
+
isAllowOnlyCorrect: true,
|
|
19
|
+
option1: "रमन के स्कूल में खेल दिवस है।",
|
|
20
|
+
option2: "रमन के स्कूल में खेल दिवस हैं।",
|
|
21
|
+
option3: "रमन की स्कूल में खेल दिवस है।",
|
|
22
|
+
option4: "रमन के स्कूल खेल दिवस है।",
|
|
23
|
+
answer: "रमन के स्कूल में खेल दिवस है।",
|
|
24
|
+
questionText: "रमन के स्कूल में खेल दिवस है। रमन के स्कूल में खेल दिवस है।",
|
|
25
|
+
image: ['https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/palStory/f2.png'],
|
|
26
|
+
},
|
|
27
|
+
render: args => {
|
|
28
|
+
const xml = getContainerXml(args);
|
|
29
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
function getContainerXml(args) {
|
|
33
|
+
let tabCounter = 1;
|
|
34
|
+
const { isAllowOnlyCorrect = true } = args;
|
|
35
|
+
return `<main>
|
|
36
|
+
<lido-container id="lido-container" value="maincontainer" visible="true" objective="${args.answer}" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/background-images/Quiz%20literacy.png" onEntry="" is-allow-only-correct="${isAllowOnlyCorrect}" is-Continue-On-Correct="true" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';">
|
|
37
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos1" height="landscape.415px,portrait.401px" width="landscape.374px,portrait.401px" x="landscape.25%, portrait.24%" y="landscape.52%, portrait.83%" aria-hidden="true" z="2" bg-color="transparent" type="" visible="true" audio="" onTouch="" onCorrect="">
|
|
38
|
+
<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/temp1/chimplecharacter.riv" alt-text="{chimpleCharacterRive}" bg-color="transparent">
|
|
39
|
+
</lido-avatar>
|
|
40
|
+
<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="203px" height="32px" x="landscape.87px,portrait.111px" y="landscape.338px,portrait.344px" alt-text="{shadowImgae}">
|
|
41
|
+
</lido-image>
|
|
42
|
+
</lido-cell>
|
|
43
|
+
<lido-cell layout="col" visible="true" bg-Color="transparent" width="landscape.100%,portrait.90%" height="68%" margin="landscape.0px,portrait.-107px 0px 0px 0px">
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<lido-text id="text1" tab-index="1" disable-edit="true" margin="landscape.0px 0px 0px 27px,portrait.0px 0px 60px 0px" value="text1" visible="true" width="landscape.100%,portrait.90%" height="18%" bg-color="#FFF5BB" font-family="'Baloo 2', serif" font-size="60px" font-color="#000" string="${args.questionText}" y="-13%" onEntry="this.position='relative';this.fontWeight='500';this.padding='20px';this.border='2px solid #FFB612'; this.boxShadow='unset';this.border-radius='16px'; this.textAlign='start'; this.speak='true';">
|
|
48
|
+
</lido-text>
|
|
49
|
+
|
|
50
|
+
<lido-cell layout="landscape.row,portrait.col" visible="true" bg-Color="transparent" width="landscape.130%,portrait.90%" height="68%" margin="landscape.0px,portrait.-107px 0px 0px 0px">
|
|
51
|
+
|
|
52
|
+
<lido-cell visible="true" height="landscape.553px,portrait.62%" width="landscape.553px,portrait.681px" border-radius="7px"
|
|
53
|
+
bg-color="white" margin="landscape.0px 0px 0px 0px, portrait.-149px 0px 25px 0px"
|
|
54
|
+
onEntry="this.display='flex'; this.align-items='center'; this.justifyContent='center';">
|
|
55
|
+
<lido-image visible="true"
|
|
56
|
+
width="landscape.553px,portrait.100%"
|
|
57
|
+
height="landscape.553px,portrait.100%"
|
|
58
|
+
border-radius="7px" bg-color="white"
|
|
59
|
+
src="${args.image}">
|
|
60
|
+
</lido-image>
|
|
61
|
+
</lido-cell>
|
|
62
|
+
|
|
63
|
+
<lido-cell layout="col" visible="true" width="landscape.53%,portrait.108%" height="216px" bg-Color="transparent" margin="landscape.0px 0px 0px 0px,portrait.0px 0px 0px 0px" onEntry="this.align-items='center'; this.justify-content='center'; this.gap='40px';">
|
|
64
|
+
<lido-text visible="true" audio="" onCorrect="this.border='5px solid green';this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" id="option1" font-family="'Baloo Bhai 2'" tab-index="2" font-size="62px" border-radius="12px" font-color="black" height="120px" width="788px" string="${args.option1}" value="${args.option1}" type="click" onEntry="this.font-weight='500';this.padding='0px 64px 0px 64px';">
|
|
65
|
+
</lido-text>
|
|
66
|
+
<lido-text visible="true" audio="" id="option2" onCorrect="this.border='5px solid green';this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" font-family="'Baloo Bhai 2'" tab-index="3" font-size="62px" border-radius="12px" font-color="black" height="120px" width="788px" string="${args.option2}" value="${args.option2}" type="click" onEntry="this.font-weight='500';this.padding='0px 64px 0px 64px';">
|
|
67
|
+
</lido-text>
|
|
68
|
+
<lido-text visible="true" audio="" id="option3" font-family="'Baloo Bhai 2'" tab-index="4" font-size="62px" onCorrect="this.border='5px solid green';this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" border-radius="12px" font-color="black" height="120px" width="788px" string="${args.option3}" value="${args.option3}" type="click" onEntry="this.font-weight='500';this.padding='0px 64px 0px 64px';">
|
|
69
|
+
</lido-text>
|
|
70
|
+
<lido-text visible="true" audio="" id="option4" font-family="'Baloo Bhai 2'" tab-index="5" font-size="62px" border-radius="12px" font-color="black" height="120px" onCorrect="this.border='5px solid green';this.cellBorderAnimate='#65BC46';" onInCorrect="this.vibrate='horizontal-shake';" width="788px" string="${args.option4}" value="${args.option4}" type="click" onEntry="this.font-weight='500';this.padding='0px 64px 0px 64px';">
|
|
71
|
+
</lido-text>
|
|
72
|
+
</lido-cell>
|
|
73
|
+
|
|
74
|
+
</lido-cell>
|
|
75
|
+
</lido-cell>
|
|
76
|
+
|
|
77
|
+
</lido-container>
|
|
78
|
+
</main>`;
|
|
79
|
+
}
|
|
@@ -45,13 +45,13 @@ function getContainerXml(args) {
|
|
|
45
45
|
.join('\n');
|
|
46
46
|
const clickCells = options
|
|
47
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="
|
|
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="" onInCorrect="" >
|
|
49
49
|
</lido-text>
|
|
50
50
|
`)
|
|
51
51
|
.join('\n');
|
|
52
52
|
return `
|
|
53
53
|
<main>
|
|
54
|
-
<lido-container id="lido-container" objective="${objective}" tab-index="1"
|
|
54
|
+
<lido-container id="lido-container" objective="${objective}" tab-index="1" show-drop-border="false" is-continue-on-correct="${isAllowOnlyCorrect}" 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';" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" drop-action="infinite-drop" show-check="false">
|
|
55
55
|
|
|
56
56
|
<!-- Chimple Avatar -->
|
|
57
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';">
|
|
@@ -37,10 +37,8 @@ function getContainerXml(args) {
|
|
|
37
37
|
const objectiveArray = missingNumber.split('');
|
|
38
38
|
const dropCells = objectiveArray
|
|
39
39
|
.map((cell, i) => `
|
|
40
|
-
<lido-
|
|
41
|
-
|
|
42
|
-
</lido-text>
|
|
43
|
-
</lido-image>
|
|
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>
|
|
44
42
|
`)
|
|
45
43
|
.join('\n');
|
|
46
44
|
const dragCells = options
|
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
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgraArrangePictures',
|
|
4
|
+
argTypes: {
|
|
5
|
+
options: { control: 'object' },
|
|
6
|
+
PracticeMode: { control: 'boolean' },
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const palEgraArrangePictures = {
|
|
11
|
+
args: {
|
|
12
|
+
question_text: 'एक बिल्ली मेज के ऊपर बैठी थी। मेज के ऊपर एक गिलास में शरबत था। बिल्ली मेज के ऊपर शरबत पीने चढ़ी। उसने शरबत मेज पर गिरा दिया।',
|
|
13
|
+
images: [{ id: '1', src: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/cat_playing_outside.webp' },
|
|
14
|
+
{ id: '2', src: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/glass_on_table.webp' },
|
|
15
|
+
{ id: '3', src: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/cat_on_table.jpg' },
|
|
16
|
+
{ id: '4', src: 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/juice_on_table_spilled.webp' }],
|
|
17
|
+
PracticeMode: true,
|
|
18
|
+
},
|
|
19
|
+
render: args => {
|
|
20
|
+
const xml = getContainerXml(args);
|
|
21
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
function getContainerXml(args) {
|
|
25
|
+
const drop_cells = args.images.map((img, index) => {
|
|
26
|
+
return `
|
|
27
|
+
<lido-cell layout="landscape.col, portrait.col" visible="true" margin="landscape.0px,portrait.0" onEntry="this.border-radius='16px';" height="landscape.auto,portrait.35%" width="landscape.auto,portrait.100%" bg-color="transparent" padding="0px 13px 0px 17px" gap="12px">
|
|
28
|
+
<lido-text visible="true" id="label${index + 1}" tab-index="" value="" string="${img.id}" font-family="'Baloo Bhai 2'" width="72px" height="72px" font-color="#030028" font-size="landscape.60px, portrait.100px" bg-color="#FFF5BB" onEntry="this.fontWeight='600'; this.border-radius='100%';">
|
|
29
|
+
</lido-text>
|
|
30
|
+
<lido-text visible="true" id="drop${index + 1}" tab-index="${11 + index}" value="${img.id}" string="" font-family="'Baloo Bhai 2'" width="215px" height="215px" font-color="#030028" font-size="landscape.140px, portrait.100px" bg-color="#FFFFFF" type="drop" onEntry="this.fontWeight='700'; this.border-radius='16px';">
|
|
31
|
+
</lido-text>
|
|
32
|
+
</lido-cell>
|
|
33
|
+
`;
|
|
34
|
+
}).join('');
|
|
35
|
+
const shuffledOptions = [...args.images].sort(() => Math.random() - 0.5);
|
|
36
|
+
const drag_cells = shuffledOptions.map((img, index) => {
|
|
37
|
+
return `
|
|
38
|
+
<lido-image visible="true" id="drag${index + 1}" value="${img.id}" bg-color="transparent" width="215px" height="215px" src="${img.src}" type="drag"></lido-image>
|
|
39
|
+
`;
|
|
40
|
+
}).join('');
|
|
41
|
+
// ---------------------- FINAL XML ----------------------
|
|
42
|
+
return `
|
|
43
|
+
<main>
|
|
44
|
+
<lido-container visible="true" id="lido-container" onEntry="lido-question.speak='true';" onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" template-id="dragAndDrop" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/palEgraTemp6_bg.png" objective="${args.images.map(img => img.id).join(',')}" is-continue-on-correct="${args.PracticeMode}" is-allow-only-correct="${args.PracticeMode}" custom-style= "#drop1, #drop2, #drop3, #drop4, #drop5 {
|
|
45
|
+
border: none !important;
|
|
46
|
+
box-shadow:
|
|
47
|
+
inset -10px 10px 10px 0 rgba(0, 0, 0, 0.25);
|
|
48
|
+
}">
|
|
49
|
+
<!-- Chimple Avatar -->
|
|
50
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.330px,portrait.378px" width="landscape.300px,portrait.382px"
|
|
51
|
+
x="landscape.86%, portrait.30%" y="landscape.34%, portrait.78%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
52
|
+
<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}">
|
|
53
|
+
</lido-avatar>
|
|
54
|
+
<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="20px" x="landscape.-1px, portrait.-7px" y="landscape.280px, portrait.535px" altText="{shadowImage}"></lido-image>
|
|
55
|
+
</lido-cell>
|
|
56
|
+
|
|
57
|
+
<lido-cell layout="landscape.col, portrait.row" aria-hidden="true" visible="true" height="landscape.95%,portrait.150px" width="landscape.98%, portrait.80%" bg-Color="transparent" margin="landscape.102px 0px 0px 0px,portrait.20px 0px 0px 0px" onEntry="this.z-index='1'; this.justify-content='center'; this.alignItems='center'; this.gap='12px';">
|
|
58
|
+
<!-- question cell -->
|
|
59
|
+
<lido-text tab-index="111" visible="true" id="lido-question" width="landscape.103%, portrait.80%" height="auto" bg-color="#FFF5BB" string="${args.question_text}" border-radius="16px" onEntry="this.border='2px solid #FFB612'; this.fontWeight='700';" font-size="48px" font-color="#07004E" font-family="'Baloo Bhai 2'" padding="7px 0px 0px 0px">
|
|
60
|
+
</lido-text>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!--drop cells -->
|
|
64
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px 84px 0px 0px,portrait.0" onEntry="this.border-radius='26px';" height="landscape.auto,portrait.35%" width="landscape.auto,portrait.100%" bg-color="transparent">
|
|
65
|
+
${drop_cells}
|
|
66
|
+
</lido-cell>
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px 50px 0px 0px,portrait.0" onEntry="this.border-radius='16px'; this.justify-content='space-evenly';" height="landscape.auto,portrait.35%" width="landscape.100%,portrait.100%" bg-color="transparent">
|
|
70
|
+
${drag_cells}
|
|
71
|
+
</lido-cell>
|
|
72
|
+
|
|
73
|
+
</lido-cell>
|
|
74
|
+
|
|
75
|
+
</lido-container>
|
|
76
|
+
</main>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palEgraBuildWord',
|
|
4
|
+
argTypes: {
|
|
5
|
+
options: { control: 'object' },
|
|
6
|
+
PracticeMode: { control: 'boolean' },
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const palEgraBuildWord = {
|
|
11
|
+
args: {
|
|
12
|
+
question_text: 'Listen to the word and build it with the letters below',
|
|
13
|
+
question_word: ['dance'],
|
|
14
|
+
PracticeMode: true,
|
|
15
|
+
},
|
|
16
|
+
render: args => {
|
|
17
|
+
const xml = getContainerXml(args);
|
|
18
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
function getContainerXml(args) {
|
|
22
|
+
const word = args.question_word[0]; // "dance"
|
|
23
|
+
const letters = [...word]; // ["d", "a", "n", "c", "e"]
|
|
24
|
+
const drop_cells = letters.map((q, index) => {
|
|
25
|
+
return `
|
|
26
|
+
<lido-text visible="true" id="drop${index + 1}" tab-index="${12 + index}" value="${q}" string="?" font-family="'Baloo Bhai 2'" width="172px" height="189px" font-color="#030028" font-size="landscape.140px, portrait.100px" bg-color="#FFFFFF" type="drop" onEntry="this.fontWeight='700'; this.border-radius='16px';">
|
|
27
|
+
</lido-text>
|
|
28
|
+
`;
|
|
29
|
+
}).join('');
|
|
30
|
+
const shuffledOptions = [...letters].sort(() => Math.random() - 0.5);
|
|
31
|
+
const drag_cells = shuffledOptions.map((q, index) => {
|
|
32
|
+
return `
|
|
33
|
+
<lido-text visible="true" id="drag${index + 1}" tab-index="${16 + index}" value="${q}" string="${q}" font-family="'Baloo Bhai 2'" width="173px" height="189px" font-color="#FFFFFF" font-size="landscape.140px, portrait.100px" bg-color="#A05730" type="drag" onEntry="this.fontWeight='700'; this.border-radius='16px'; this.justifyContent='center'; this.alignItems='center';">
|
|
34
|
+
</lido-text>
|
|
35
|
+
`;
|
|
36
|
+
}).join('');
|
|
37
|
+
// ---------------------- FINAL XML ----------------------
|
|
38
|
+
return `
|
|
39
|
+
<main>
|
|
40
|
+
<lido-container visible="true" id="lido-container" onEntry="lido-question.speak='true';" onInCorrect="lido-avatar.avatarAnimate='Fail';this.sleep='2000';" template-id="dragAndDrop" onCorrect="lido-avatar.avatarAnimate='Success';this.sleep='2300';" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/PAL-EGRA/palEgraTemp6_bg.png" objective="${args.question_word.join(',')}" is-continue-on-correct="${args.PracticeMode}" is-allow-only-correct="${args.PracticeMode}" custom-style= "#drop1, #drop2, #drop3, #drop4, #drop5 {
|
|
41
|
+
border: 2px solid #FFB612 !important;
|
|
42
|
+
}">
|
|
43
|
+
<!-- Chimple Avatar -->
|
|
44
|
+
<lido-cell layout="pos" id="pos1" disable-edit="true" value="pos2" height="landscape.330px,portrait.378px" width="landscape.300px,portrait.382px"
|
|
45
|
+
x="landscape.82%, portrait.30%" y="landscape.32%, portrait.78%" aria-hidden="true" z="1" bg-color="transparent" visible="true" onEntry="">
|
|
46
|
+
<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}">
|
|
47
|
+
</lido-avatar>
|
|
48
|
+
<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="20px" x="landscape.-1px, portrait.-7px" y="landscape.280px, portrait.535px" altText="{shadowImage}"></lido-image>
|
|
49
|
+
</lido-cell>
|
|
50
|
+
|
|
51
|
+
<lido-cell layout="landscape.col, portrait.row" aria-hidden="true" visible="true" height="landscape.82%,portrait.150px" width="landscape.98%, portrait.80%" bg-Color="transparent" margin="landscape.94px 0px 0px 0px,portrait.20px 0px 0px 0px" onEntry="this.z-index='1'; this.justify-content='center'; this.alignItems='center'; this.gap='73px';">
|
|
52
|
+
<!-- question cell -->
|
|
53
|
+
<lido-text tab-index="111" visible="true" id="lido-question" width="landscape.93%, portrait.80%" height="60px" bg-color="#FFF5BB" string="${args.question_text}" border-radius="16px" onEntry="this.border='2px solid #FFB612'; this.fontWeight='700'; this.padding='50px';" font-size="60px" font-color="#07004E" font-family="'Baloo Bhai 2'">
|
|
54
|
+
</lido-text>
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
<!-- options cells -->
|
|
58
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.-18px 91px 31px -100px,portrait.0" onEntry="this.border-radius='26px';" height="landscape.auto,portrait.35%" width="landscape.auto,portrait.100%" bg-color="transparent" gap="60px">
|
|
59
|
+
<lido-text layout="landscape.row, portrait.col" visible="true" margin="landscape.0px,portrait.0" onEntry="this.border-radius='100%'; this.border='2px solid #FFB612';" height="landscape.190px,portrait.35%" width="landscape.184px,portrait.100%" bg-color="white" font-size="1px" onTouch="this.speak='true';" string="${word}">
|
|
60
|
+
<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>
|
|
61
|
+
</lido-text>
|
|
62
|
+
|
|
63
|
+
<!-- drop cells -->
|
|
64
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.0px,portrait.0" onEntry="this.border-radius='16px';" height="landscape.239px,portrait.35%" width="landscape.auto,portrait.100%" bg-color="#FFFFFF99" padding="0px 13px 0px 17px" gap="12px">
|
|
65
|
+
${drop_cells}
|
|
66
|
+
</lido-cell>
|
|
67
|
+
</lido-cell>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<lido-cell layout="landscape.row, portrait.col" visible="true" margin="landscape.-46px 0px 0px 0px,portrait.0" onEntry="this.border-radius='16px';" height="landscape.239px,portrait.35%" width="landscape.auto,portrait.100%" bg-color="transparent" gap="23px">
|
|
71
|
+
${drag_cells}
|
|
72
|
+
</lido-cell>
|
|
73
|
+
|
|
74
|
+
</lido-cell>
|
|
75
|
+
</lido-container>
|
|
76
|
+
</main>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Templates/palStorytale',
|
|
4
|
+
};
|
|
5
|
+
export default meta;
|
|
6
|
+
export const AmazingStories = {
|
|
7
|
+
args: {
|
|
8
|
+
content: 'One hot day, a crow was very thirsty.It flew here and there looking for water. At last, it found a pitcher with a little water at the bottom. The crow tried to drink but could not reach the water. Then the crow had an idea. It dropped small stones into the pitcher. Slowly, the water rose up. The crow drank the water and flew away happily.',
|
|
9
|
+
},
|
|
10
|
+
render: args => {
|
|
11
|
+
const xml = getContainerXml(args);
|
|
12
|
+
return html `<lido-home .xmlData="${xml}"></lido-home>`;
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
function getContainerXml(args) {
|
|
16
|
+
return `<main>
|
|
17
|
+
<lido-container show-prev-button="false" show-next-button="true" id="lido-container" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/palStory/bgImage.png" height="1600px" width="900px" value="mainContainer4" objective="" aria-label="" x="0" y="0" z="0" visible="true" audio="" onTouch="" onCorrect="" onEntry="" onInCorrect="lido-avatar.avatarAnimate='Fail'; this.sleep='2000';" show-check="false" is-continue-on-correct="true">
|
|
18
|
+
<lido-cell layout="row" id="cell1" visible="true" margin="82px 203px 0px 0px" value="cell1" width="landscape.100%,portrait.86%" height="landscape.82%,portrait.80%" x="50px" y="50px" bg-color="transparent" onEntry="" >
|
|
19
|
+
|
|
20
|
+
<lido-text id="text1" tab-index="1" value="text1" visible="true" width="landscape.100%,portrait.90%" height="100%" bg-color="#FFF5BB" font-family="Baloo Bhai 2" font-size="60px" font-color="#000" string='${args.content}' onEntry="this.border='2px solid #FFB612'; this.fontWeight='600';this.padding='0px 40px 0px 40px'; this.boxShadow='unset'; this.border-radius='16px'; this.textAlign='start'; this.speak='true';">
|
|
21
|
+
</lido-text>
|
|
22
|
+
</lido-cell>
|
|
23
|
+
|
|
24
|
+
<!-- below is the code for avatar -->
|
|
25
|
+
|
|
26
|
+
<lido-pos id="pos1" disable-edit="true" value="pos1" height="350px" width="350px" x="landscape.91%, portrait.580px" y="landscape.56%, portrait.1350px" aria-hidden="true" z="1" bg-color="transparent" type="" visible="true" audio="col1.mp3" onTouch="" onCorrect="">
|
|
27
|
+
<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/temp2/chimplecharacter.riv" alt-text="{chimpleCharacterRive}">
|
|
28
|
+
</lido-avatar>
|
|
29
|
+
<lido-image id="image1" disable-edit="true" value="image1" visible="true" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/Shadow.png" bg-color="transparent" width="186px" height="20px" x="77px" y="305px" alt-text="{shadowImage}">
|
|
30
|
+
</lido-image>
|
|
31
|
+
</lido-pos>
|
|
32
|
+
</lido-container>
|
|
33
|
+
|
|
34
|
+
</main>`;
|
|
35
|
+
}
|
|
@@ -40,7 +40,7 @@ function renderSentencePart(text, id) {
|
|
|
40
40
|
if (text.startsWith('#')) {
|
|
41
41
|
const value = text.replace('#', '').trim();
|
|
42
42
|
return `
|
|
43
|
-
<lido-text type="drop" drop-attr="stretch" value="${value}" id="${id}" visible="true" height="136px" width="200px" onEntry="this.margin-right='40px';this.border='4px solid #A8B53A';this.border-radius='16px';"></lido-text>
|
|
43
|
+
<lido-text type="drop" drop-attr="stretch" value="${value}" id="${id}" visible="true" height="136px" width="200px" y="19px" onEntry="this.position='relative';this.margin-right='40px';this.border='4px solid #A8B53A';this.border-radius='16px';"></lido-text>
|
|
44
44
|
`;
|
|
45
45
|
}
|
|
46
46
|
// NORMAL TEXT case
|
|
@@ -68,7 +68,7 @@ function getContainerXml(args) {
|
|
|
68
68
|
<lido-image tab-index="8" visible="true" height="auto" width="auto" src="${args.img1}"></lido-image>
|
|
69
69
|
|
|
70
70
|
</lido-cell>
|
|
71
|
-
<lido-cell layout="
|
|
71
|
+
<lido-cell layout="flex" visible="true" height="270px" width="auto" onEntry="this.display='ruby';" bg-color="transparent">
|
|
72
72
|
${sentenceParts
|
|
73
73
|
.map((part, index) => renderSentencePart(part, `sentence-${index}`))
|
|
74
74
|
.join('')}
|
|
@@ -502,7 +502,6 @@ export async function onElementDropComplete(dragElement, dropElement) {
|
|
|
502
502
|
const dragSelectedData = JSON.stringify(buildDragSelectedMapFromDOM());
|
|
503
503
|
const dropSelectedDataobject = buildDragSelectedMapFromDOM();
|
|
504
504
|
const dropSelectedData = JSON.stringify(dropSelectedDataobject);
|
|
505
|
-
console.log("dragggedddd elem", { value: dragElement.getAttribute("value") });
|
|
506
505
|
let dropHasDrag = buildDropHasDragFromDOM();
|
|
507
506
|
if (!dropElement) {
|
|
508
507
|
handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedValueData, dragSelectedData, dropSelectedData);
|
|
@@ -742,6 +741,7 @@ export function updateDropBorder(element) {
|
|
|
742
741
|
if (dragSelectedElements.length > 0) {
|
|
743
742
|
element.classList.add('filled');
|
|
744
743
|
element.classList.remove('empty');
|
|
744
|
+
element.classList.remove('highlight-element');
|
|
745
745
|
}
|
|
746
746
|
else {
|
|
747
747
|
if (!element.classList.contains('math-matrix')) {
|
|
@@ -120,7 +120,7 @@ export function highlightElement() {
|
|
|
120
120
|
}
|
|
121
121
|
// Highlight corresponding drag elements if mistakes are more than 2
|
|
122
122
|
const dragElements = container.querySelectorAll(`[type="drag"]`);
|
|
123
|
-
if (countOfMistakes > 2) {
|
|
123
|
+
if (countOfMistakes > 2 && container.getAttribute("is-continue-on-correct") === "true") {
|
|
124
124
|
dragElements.forEach(dragEl => {
|
|
125
125
|
dragEl.classList.remove('highlight-element');
|
|
126
126
|
if (dragEl.getAttribute('value') === dropEle.getAttribute('value')) {
|
|
@@ -137,7 +137,7 @@ export function highlightElement() {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
if (countOfMistakes <= 2)
|
|
140
|
+
if (countOfMistakes <= 2 || container.getAttribute("is-continue-on-correct") === "false")
|
|
141
141
|
return;
|
|
142
142
|
const clickTemplate = container.querySelectorAll("[type='click']");
|
|
143
143
|
clickTemplate.forEach(clickEl => {
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-
|
|
1
|
+
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-235091a1.js';
|