lido-player 0.0.2-alpha-8 → 0.0.2-alpha-10
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_13.cjs.entry.js +220 -76
- package/dist/cjs/lido-avatar_13.cjs.entry.js.map +1 -1
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-1697a6b5.js → utils-5b00f27b.js} +108 -51
- package/dist/cjs/utils-5b00f27b.js.map +1 -0
- package/dist/collection/components/column/lido-col.js +106 -11
- package/dist/collection/components/column/lido-col.js.map +1 -1
- package/dist/collection/components/container/lido-container.js +59 -10
- package/dist/collection/components/container/lido-container.js.map +1 -1
- package/dist/collection/components/image/lido-image.js +32 -11
- package/dist/collection/components/image/lido-image.js.map +1 -1
- package/dist/collection/components/position/lido-pos.js +35 -14
- package/dist/collection/components/position/lido-pos.js.map +1 -1
- package/dist/collection/components/root/assets/xmlData.xml +95 -89
- package/dist/collection/components/row/lido-row.css +1 -1
- package/dist/collection/components/row/lido-row.js +106 -11
- package/dist/collection/components/row/lido-row.js.map +1 -1
- package/dist/collection/components/text/lido-text.js +39 -18
- package/dist/collection/components/text/lido-text.js.map +1 -1
- package/dist/collection/components/wrap/lido-wrap.js +87 -11
- package/dist/collection/components/wrap/lido-wrap.js.map +1 -1
- package/dist/collection/index.css +4 -0
- package/dist/collection/utils/audioPlayer.js +65 -0
- package/dist/collection/utils/audioPlayer.js.map +1 -0
- package/dist/collection/utils/utils.js +44 -52
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-root.js +11 -11
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.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-e60bca47.js → p-185d3021.js} +2 -2
- package/dist/components/{p-e60bca47.js.map → p-185d3021.js.map} +1 -1
- package/dist/components/{p-e6122599.js → p-21c7365d.js} +31 -14
- package/dist/components/p-21c7365d.js.map +1 -0
- package/dist/components/p-24527345.js +114 -0
- package/dist/components/p-24527345.js.map +1 -0
- package/dist/components/{p-39529ce4.js → p-2c6af93f.js} +40 -13
- package/dist/components/p-2c6af93f.js.map +1 -0
- package/dist/components/{p-d00a96d0.js → p-3230edf7.js} +2 -2
- package/dist/components/{p-d00a96d0.js.map → p-3230edf7.js.map} +1 -1
- package/dist/components/{p-ca70ca24.js → p-3bf3a2f8.js} +35 -18
- package/dist/components/p-3bf3a2f8.js.map +1 -0
- package/dist/components/{p-9770a2f4.js → p-5465821b.js} +37 -13
- package/dist/components/p-5465821b.js.map +1 -0
- package/dist/components/{p-3bc100c1.js → p-7b4c4606.js} +107 -52
- package/dist/components/p-7b4c4606.js.map +1 -0
- package/dist/components/{p-3480a7c0.js → p-95cfda5b.js} +30 -13
- package/dist/components/p-95cfda5b.js.map +1 -0
- package/dist/components/{p-e1f46793.js → p-a88c0bb4.js} +44 -11
- package/dist/components/p-a88c0bb4.js.map +1 -0
- package/dist/components/{p-c6e1e344.js → p-b8564fe1.js} +13 -13
- package/dist/components/p-b8564fe1.js.map +1 -0
- package/dist/components/{p-478edfe0.js → p-e90137c1.js} +2 -2
- package/dist/components/{p-478edfe0.js.map → p-e90137c1.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_13.entry.js +220 -76
- package/dist/esm/lido-avatar_13.entry.js.map +1 -1
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-4f7c3168.js → utils-6f3eee22.js} +107 -52
- package/dist/esm/utils-6f3eee22.js.map +1 -0
- package/dist/lido-player/assets/xmlData.xml +95 -89
- 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/lido-player.esm.js.map +1 -1
- package/dist/lido-player/p-2a7789d3.js +2 -0
- package/dist/lido-player/p-2a7789d3.js.map +1 -0
- package/dist/lido-player/p-6c9941bc.entry.js +2 -0
- package/dist/lido-player/p-6c9941bc.entry.js.map +1 -0
- package/dist/types/components/column/lido-col.d.ts +32 -0
- package/dist/types/components/container/lido-container.d.ts +6 -0
- package/dist/types/components/image/lido-image.d.ts +13 -0
- package/dist/types/components/position/lido-pos.d.ts +14 -1
- package/dist/types/components/row/lido-row.d.ts +32 -0
- package/dist/types/components/text/lido-text.d.ts +14 -1
- package/dist/types/components/wrap/lido-wrap.d.ts +28 -0
- package/dist/types/components.d.ts +100 -4
- package/dist/types/utils/audioPlayer.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +5 -1
- package/package.json +1 -1
- package/dist/cjs/utils-1697a6b5.js.map +0 -1
- package/dist/components/p-3480a7c0.js.map +0 -1
- package/dist/components/p-39529ce4.js.map +0 -1
- package/dist/components/p-3bc100c1.js.map +0 -1
- package/dist/components/p-9770a2f4.js.map +0 -1
- package/dist/components/p-c6e1e344.js.map +0 -1
- package/dist/components/p-ca70ca24.js.map +0 -1
- package/dist/components/p-ce503b4f.js +0 -87
- package/dist/components/p-ce503b4f.js.map +0 -1
- package/dist/components/p-e1f46793.js.map +0 -1
- package/dist/components/p-e6122599.js.map +0 -1
- package/dist/esm/utils-4f7c3168.js.map +0 -1
- package/dist/lido-player/p-c35ed209.js +0 -2
- package/dist/lido-player/p-c35ed209.js.map +0 -1
- package/dist/lido-player/p-fc5b9e28.entry.js +0 -2
- package/dist/lido-player/p-fc5b9e28.entry.js.map +0 -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-0d28e716.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-5b00f27b.js');
|
|
7
7
|
|
|
8
8
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
9
|
|
|
@@ -6619,6 +6619,11 @@ const LidoCol = class {
|
|
|
6619
6619
|
this.onInCorrect = undefined;
|
|
6620
6620
|
this.onCorrect = undefined;
|
|
6621
6621
|
this.onEntry = undefined;
|
|
6622
|
+
this.childElementsLength = undefined;
|
|
6623
|
+
this.minLength = undefined;
|
|
6624
|
+
this.maxLength = undefined;
|
|
6625
|
+
this.direction = undefined;
|
|
6626
|
+
this.style = {};
|
|
6622
6627
|
}
|
|
6623
6628
|
/**
|
|
6624
6629
|
* This lifecycle hook is called after the component is rendered in the DOM.
|
|
@@ -6626,19 +6631,36 @@ const LidoCol = class {
|
|
|
6626
6631
|
*/
|
|
6627
6632
|
componentDidLoad() {
|
|
6628
6633
|
utils.initEventsForElement(this.el, this.type);
|
|
6634
|
+
utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'flex');
|
|
6629
6635
|
}
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6636
|
+
/**
|
|
6637
|
+
* Lifecycle method that runs before the component is rendered.
|
|
6638
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
6639
|
+
*/
|
|
6640
|
+
componentWillLoad() {
|
|
6641
|
+
this.updateStyles();
|
|
6642
|
+
window.addEventListener('resize', this.updateStyles.bind(this));
|
|
6643
|
+
window.addEventListener('load', this.updateStyles.bind(this));
|
|
6644
|
+
}
|
|
6645
|
+
disconnectedCallback() {
|
|
6646
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
6647
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
6648
|
+
}
|
|
6649
|
+
updateStyles() {
|
|
6650
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
6651
|
+
this.style = {
|
|
6652
|
+
height: utils.parseProp(this.height, orientation),
|
|
6653
|
+
width: utils.parseProp(this.width, orientation),
|
|
6654
|
+
backgroundColor: utils.parseProp(this.bgColor, orientation),
|
|
6655
|
+
top: utils.parseProp(this.y, orientation),
|
|
6656
|
+
left: utils.parseProp(this.x, orientation),
|
|
6639
6657
|
zIndex: this.z,
|
|
6658
|
+
display: this.visible ? 'flex' : 'none', // Toggle visibility
|
|
6659
|
+
flexDirection: !this.direction ? 'column' : utils.parseProp(this.direction, orientation),
|
|
6640
6660
|
};
|
|
6641
|
-
|
|
6661
|
+
}
|
|
6662
|
+
render() {
|
|
6663
|
+
return (index.h(index.Host, { key: '0599d6f5fffdbd11b278ba25d7eb8e6d63f66709', id: this.id, class: "lido-col", type: this.type, tabindex: this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '898ed8cc2829a5c6b30387de49c46ffe3398631a' })));
|
|
6642
6664
|
}
|
|
6643
6665
|
get el() { return index.getElement(this); }
|
|
6644
6666
|
};
|
|
@@ -6662,6 +6684,7 @@ const LidoContainer = class {
|
|
|
6662
6684
|
this.y = undefined;
|
|
6663
6685
|
this.z = undefined;
|
|
6664
6686
|
this.bgColor = undefined;
|
|
6687
|
+
this.bgImage = undefined;
|
|
6665
6688
|
this.type = undefined;
|
|
6666
6689
|
this.tabIndex = undefined;
|
|
6667
6690
|
this.visible = undefined;
|
|
@@ -6702,18 +6725,43 @@ const LidoContainer = class {
|
|
|
6702
6725
|
scaleContainer(container) {
|
|
6703
6726
|
var _a;
|
|
6704
6727
|
const widths = [window.innerWidth];
|
|
6705
|
-
|
|
6728
|
+
const heights = [window.innerHeight];
|
|
6706
6729
|
if ((_a = window.screen) === null || _a === void 0 ? void 0 : _a.width) {
|
|
6707
6730
|
widths.push(window.screen.width);
|
|
6708
|
-
|
|
6731
|
+
heights.push(window.screen.height);
|
|
6709
6732
|
}
|
|
6710
6733
|
const width = Math.min(...widths);
|
|
6711
|
-
const height =
|
|
6712
|
-
const
|
|
6713
|
-
|
|
6714
|
-
|
|
6734
|
+
const height = Math.min(...heights); // Get the smallest height
|
|
6735
|
+
const isPortrait = height > width; // Check if the device is in portrait mode
|
|
6736
|
+
let scaleX;
|
|
6737
|
+
let scaleY;
|
|
6738
|
+
if (isPortrait) {
|
|
6739
|
+
// Portrait Mode: Scale based on portrait reference size (e.g., 900x1600)
|
|
6740
|
+
scaleX = width / 900;
|
|
6741
|
+
scaleY = height / 1600;
|
|
6742
|
+
}
|
|
6743
|
+
else {
|
|
6744
|
+
// Landscape Mode: Scale based on landscape reference size (e.g., 1600x900)
|
|
6745
|
+
scaleX = width / 1600;
|
|
6746
|
+
scaleY = height / 900;
|
|
6747
|
+
}
|
|
6748
|
+
const scale = Math.min(scaleX, scaleY); // Ensure uniform scaling
|
|
6715
6749
|
// Center the container and apply scaling
|
|
6716
6750
|
container.style.transform = `translate(-50%, -50%) scale(${scale})`;
|
|
6751
|
+
container.style.left = '50%';
|
|
6752
|
+
container.style.top = '50%';
|
|
6753
|
+
container.style.position = 'absolute'; // Ensure proper positioning
|
|
6754
|
+
this.screenOrientation();
|
|
6755
|
+
}
|
|
6756
|
+
screenOrientation() {
|
|
6757
|
+
if (window.innerHeight > window.innerWidth) {
|
|
6758
|
+
this.el.style.height = '1600px';
|
|
6759
|
+
this.el.style.width = '900px';
|
|
6760
|
+
}
|
|
6761
|
+
else {
|
|
6762
|
+
this.el.style.height = '900px';
|
|
6763
|
+
this.el.style.width = '1600px';
|
|
6764
|
+
}
|
|
6717
6765
|
}
|
|
6718
6766
|
/**
|
|
6719
6767
|
* Lifecycle hook that runs after the component is loaded.
|
|
@@ -6723,7 +6771,9 @@ const LidoContainer = class {
|
|
|
6723
6771
|
*/
|
|
6724
6772
|
componentDidLoad() {
|
|
6725
6773
|
this.scaleContainer(this.el);
|
|
6774
|
+
const backGroundImage = this.bgImage ? utils.convertUrlToRelative(this.bgImage) : '';
|
|
6726
6775
|
document.body.style.backgroundColor = this.bgColor;
|
|
6776
|
+
document.body.style.backgroundImage = `url(${backGroundImage})`;
|
|
6727
6777
|
// Re-scale the container on window resize or load events
|
|
6728
6778
|
window.addEventListener('resize', () => this.scaleContainer(this.el));
|
|
6729
6779
|
window.addEventListener('load', () => this.scaleContainer(this.el));
|
|
@@ -6734,25 +6784,29 @@ const LidoContainer = class {
|
|
|
6734
6784
|
document.head.appendChild(styleElement);
|
|
6735
6785
|
}
|
|
6736
6786
|
}
|
|
6787
|
+
disconnectedCallback() {
|
|
6788
|
+
window.removeEventListener('resize', () => this.scaleContainer(this.el));
|
|
6789
|
+
window.removeEventListener('load', () => this.scaleContainer(this.el));
|
|
6790
|
+
document.body.style.backgroundColor = '';
|
|
6791
|
+
document.body.style.backgroundImage = '';
|
|
6792
|
+
}
|
|
6737
6793
|
render() {
|
|
6738
6794
|
// Define the styles for the container element
|
|
6739
6795
|
const style = {
|
|
6740
6796
|
backgroundColor: this.bgColor,
|
|
6741
|
-
width: '1600px', // Fixed width of the container
|
|
6742
|
-
height: '900px', // Fixed height of the container
|
|
6743
6797
|
position: 'absolute',
|
|
6744
6798
|
top: '50%',
|
|
6745
6799
|
left: '50%',
|
|
6746
6800
|
transform: 'translate(-50%, -50%)', // Centering the container
|
|
6747
6801
|
};
|
|
6748
6802
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
6749
|
-
return (index.h(index.Host, { key: '
|
|
6803
|
+
return (index.h(index.Host, { key: '851efc3f3b6a305b11bfe925bf51c68e76b21dc6', id: "lido-container", tabindex: 0, class: "lido-container", objective: this.objective, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, showCheck: `${this.showCheck}`, isContinueOnCorrect: `${this.isContinueOnCorrect}`, isAllowOnlyCorrect: `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}` }, index.h("slot", { key: 'ba028100b8a97ff1496d8dc650111efa8e93447b' })));
|
|
6750
6804
|
}
|
|
6751
6805
|
get el() { return index.getElement(this); }
|
|
6752
6806
|
};
|
|
6753
6807
|
LidoContainer.style = LidoContainerStyle0;
|
|
6754
6808
|
|
|
6755
|
-
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); body{overflow:hidden}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}";
|
|
6809
|
+
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}";
|
|
6756
6810
|
const LidoHomeStyle0 = indexCss;
|
|
6757
6811
|
|
|
6758
6812
|
const animationCss = "@keyframes rightToPlace{from{transform:translateX(2000px)}to{transform:translateX(0)}}@keyframes topToPlace{from{transform:translateY(-1000px)}to{transform:translateY(0)}}@keyframes bottomToPlace{from{transform:translateY(1000px)}to{transform:translateY(0)}}@keyframes placeToLeft{from{}to{transform:translateX(-2000px)}}@keyframes leftToPlace{from{transform:translateX(-2000px)}to{transform:translateX(0)}}@keyframes shake{0%{transform:translateX(0)}10%{transform:translateX(-5px)}20%{transform:translateX(5px)}30%{transform:translateX(-5px)}40%{transform:translateX(5px)}50%{transform:translateX(-5px)}60%{transform:translateX(5px)}70%{transform:translateX(-5px)}80%{transform:translateX(5px)}90%{transform:translateX(-5px)}100%{transform:translateX(0)}}@keyframes fallAndBounce{0%{transform:translateY(-1000px)}25%{transform:translateY(0px)}50%{transform:translateY(-200px)}75%{transform:translateY(0)}90%{transform:translateY(-100px)}100%{transform:translateY(0)}}@keyframes placeToDown{0%{transform:translateY(0)}100%{transform:translateY(1000px)}}";
|
|
@@ -6972,6 +7026,7 @@ const LidoImage = class {
|
|
|
6972
7026
|
this.onCorrect = undefined;
|
|
6973
7027
|
this.onEntry = undefined;
|
|
6974
7028
|
this.src = undefined;
|
|
7029
|
+
this.style = undefined;
|
|
6975
7030
|
}
|
|
6976
7031
|
/**
|
|
6977
7032
|
* Lifecycle method that runs after the component has been loaded into the DOM.
|
|
@@ -6980,20 +7035,35 @@ const LidoImage = class {
|
|
|
6980
7035
|
componentDidLoad() {
|
|
6981
7036
|
utils.initEventsForElement(this.el, this.type);
|
|
6982
7037
|
}
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
7038
|
+
/**
|
|
7039
|
+
* Lifecycle method that runs before the component is rendered.
|
|
7040
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
7041
|
+
*/
|
|
7042
|
+
componentWillLoad() {
|
|
7043
|
+
this.updateStyles();
|
|
7044
|
+
window.addEventListener('resize', this.updateStyles.bind(this)); // Update on screen rotation
|
|
7045
|
+
window.addEventListener('load', this.updateStyles.bind(this)); // Update on screen rotation
|
|
7046
|
+
}
|
|
7047
|
+
disconnectedCallback() {
|
|
7048
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
7049
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
7050
|
+
}
|
|
7051
|
+
updateStyles() {
|
|
7052
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
7053
|
+
this.style = {
|
|
7054
|
+
height: utils.parseProp(this.height, orientation),
|
|
7055
|
+
width: utils.parseProp(this.width, orientation),
|
|
7056
|
+
backgroundColor: utils.parseProp(this.bgColor, orientation),
|
|
7057
|
+
top: utils.parseProp(this.y, orientation),
|
|
7058
|
+
left: utils.parseProp(this.x, orientation),
|
|
6991
7059
|
zIndex: this.z,
|
|
6992
|
-
display: this.visible ? 'flex' : 'none',
|
|
7060
|
+
display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'flex' : 'none', // Toggle visibility
|
|
6993
7061
|
alignItems: 'center', // Vertically center the image
|
|
6994
7062
|
justifyContent: 'center', // Horizontally center the image
|
|
6995
7063
|
};
|
|
6996
|
-
|
|
7064
|
+
}
|
|
7065
|
+
render() {
|
|
7066
|
+
return (index.h(index.Host, { key: '430e4b71153836e73fb4611f2b5b0630a39624a2', type: this.type, tabindex: this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("img", { key: '35709cfa8a2975e1f0cd326c5d7acc0f5a4ea711', class: "lido-image", src: utils.convertUrlToRelative(this.src), alt: "", style: this.style })));
|
|
6997
7067
|
}
|
|
6998
7068
|
get el() { return index.getElement(this); }
|
|
6999
7069
|
};
|
|
@@ -7023,6 +7093,7 @@ const LidoPos = class {
|
|
|
7023
7093
|
this.onInCorrect = undefined;
|
|
7024
7094
|
this.onCorrect = undefined;
|
|
7025
7095
|
this.onEntry = undefined;
|
|
7096
|
+
this.style = undefined;
|
|
7026
7097
|
}
|
|
7027
7098
|
/**
|
|
7028
7099
|
* Lifecycle hook that is called after the component has been rendered in the DOM.
|
|
@@ -7031,18 +7102,33 @@ const LidoPos = class {
|
|
|
7031
7102
|
componentDidLoad() {
|
|
7032
7103
|
utils.initEventsForElement(this.el, this.type);
|
|
7033
7104
|
}
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7105
|
+
/**
|
|
7106
|
+
* Lifecycle method that runs before the component is rendered.
|
|
7107
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
7108
|
+
*/
|
|
7109
|
+
componentWillLoad() {
|
|
7110
|
+
this.updateStyles();
|
|
7111
|
+
window.addEventListener('resize', this.updateStyles.bind(this)); // Update on screen rotation
|
|
7112
|
+
window.addEventListener('load', this.updateStyles.bind(this)); // Update on screen rotation
|
|
7113
|
+
}
|
|
7114
|
+
disconnectedCallback() {
|
|
7115
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
7116
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
7117
|
+
}
|
|
7118
|
+
updateStyles() {
|
|
7119
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
7120
|
+
this.style = {
|
|
7121
|
+
height: utils.parseProp(this.height, orientation),
|
|
7122
|
+
width: utils.parseProp(this.width, orientation),
|
|
7123
|
+
backgroundColor: utils.parseProp(this.bgColor, orientation),
|
|
7124
|
+
top: utils.parseProp(this.y, orientation),
|
|
7125
|
+
left: utils.parseProp(this.x, orientation),
|
|
7042
7126
|
zIndex: this.z,
|
|
7043
|
-
display: this.visible ? 'block' : 'none', // Toggle visibility
|
|
7127
|
+
display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'block' : 'none', // Toggle visibility
|
|
7044
7128
|
};
|
|
7045
|
-
|
|
7129
|
+
}
|
|
7130
|
+
render() {
|
|
7131
|
+
return (index.h(index.Host, { key: '26efb5dae4a9b1de11909d09b70045cf53069221', id: this.id, class: "lido-pos", type: this.type, tabindex: this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '069bac1f8b83b603f6c5fef9c584a788f5e61d82' })));
|
|
7046
7132
|
}
|
|
7047
7133
|
get el() { return index.getElement(this); }
|
|
7048
7134
|
};
|
|
@@ -7162,7 +7248,7 @@ const LidoRoot = class {
|
|
|
7162
7248
|
static get assetsDirs() { return ["assets"]; }
|
|
7163
7249
|
};
|
|
7164
7250
|
|
|
7165
|
-
const lidoRowCss = ".lido-row{display:flex;justify-content:space-
|
|
7251
|
+
const lidoRowCss = ".lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}";
|
|
7166
7252
|
const LidoRowStyle0 = lidoRowCss;
|
|
7167
7253
|
|
|
7168
7254
|
const LidoRow = class {
|
|
@@ -7185,6 +7271,11 @@ const LidoRow = class {
|
|
|
7185
7271
|
this.onInCorrect = undefined;
|
|
7186
7272
|
this.onCorrect = undefined;
|
|
7187
7273
|
this.onEntry = undefined;
|
|
7274
|
+
this.childElementsLength = undefined;
|
|
7275
|
+
this.minLength = undefined;
|
|
7276
|
+
this.maxLength = undefined;
|
|
7277
|
+
this.direction = undefined;
|
|
7278
|
+
this.style = {};
|
|
7188
7279
|
}
|
|
7189
7280
|
/**
|
|
7190
7281
|
* Lifecycle hook that runs after the component is loaded into the DOM.
|
|
@@ -7192,19 +7283,36 @@ const LidoRow = class {
|
|
|
7192
7283
|
*/
|
|
7193
7284
|
componentDidLoad() {
|
|
7194
7285
|
utils.initEventsForElement(this.el, this.type);
|
|
7286
|
+
utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'flex');
|
|
7195
7287
|
}
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7288
|
+
/**
|
|
7289
|
+
* Lifecycle method that runs before the component is rendered.
|
|
7290
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
7291
|
+
*/
|
|
7292
|
+
componentWillLoad() {
|
|
7293
|
+
this.updateStyles();
|
|
7294
|
+
window.addEventListener('resize', this.updateStyles.bind(this));
|
|
7295
|
+
window.addEventListener('load', this.updateStyles.bind(this));
|
|
7296
|
+
}
|
|
7297
|
+
disconnectedCallback() {
|
|
7298
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
7299
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
7300
|
+
}
|
|
7301
|
+
updateStyles() {
|
|
7302
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
7303
|
+
this.style = {
|
|
7304
|
+
height: utils.parseProp(this.height, orientation),
|
|
7305
|
+
width: utils.parseProp(this.width, orientation),
|
|
7306
|
+
backgroundColor: utils.parseProp(this.bgColor, orientation),
|
|
7307
|
+
top: utils.parseProp(this.y, orientation),
|
|
7308
|
+
left: utils.parseProp(this.x, orientation),
|
|
7204
7309
|
zIndex: this.z,
|
|
7205
|
-
|
|
7310
|
+
display: this.visible ? 'flex' : 'none', // Toggle visibility
|
|
7311
|
+
flexDirection: !this.direction ? 'row' : utils.parseProp(this.direction, orientation),
|
|
7206
7312
|
};
|
|
7207
|
-
|
|
7313
|
+
}
|
|
7314
|
+
render() {
|
|
7315
|
+
return (index.h(index.Host, { key: 'f8b0bdf59e07c2247a0369a0078f8142f09c404b', class: "lido-row", type: this.type, tabindex: this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: 'bce3362f3c323be80ac5973f31f9bbd0d1afceca' })));
|
|
7208
7316
|
}
|
|
7209
7317
|
get el() { return index.getElement(this); }
|
|
7210
7318
|
};
|
|
@@ -7291,6 +7399,7 @@ const LidoText = class {
|
|
|
7291
7399
|
this.onCorrect = undefined;
|
|
7292
7400
|
this.onEntry = undefined;
|
|
7293
7401
|
this.isAllowOnlyOneDrop = false;
|
|
7402
|
+
this.style = {};
|
|
7294
7403
|
}
|
|
7295
7404
|
/**
|
|
7296
7405
|
* Lifecycle hook that runs after the component is rendered in the DOM.
|
|
@@ -7299,23 +7408,38 @@ const LidoText = class {
|
|
|
7299
7408
|
componentDidLoad() {
|
|
7300
7409
|
utils.initEventsForElement(this.el, this.type);
|
|
7301
7410
|
}
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7411
|
+
/**
|
|
7412
|
+
* Lifecycle method that runs before the component is rendered.
|
|
7413
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
7414
|
+
*/
|
|
7415
|
+
componentWillLoad() {
|
|
7416
|
+
this.updateStyles();
|
|
7417
|
+
window.addEventListener('resize', this.updateStyles.bind(this));
|
|
7418
|
+
window.addEventListener('load', this.updateStyles.bind(this));
|
|
7419
|
+
}
|
|
7420
|
+
disconnectedCallback() {
|
|
7421
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
7422
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
7423
|
+
}
|
|
7424
|
+
updateStyles() {
|
|
7425
|
+
const backgroundImg = this.bgImage ? utils.convertUrlToRelative(this.bgImage) : '';
|
|
7426
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
7427
|
+
this.style = {
|
|
7428
|
+
height: utils.parseProp(this.height, orientation),
|
|
7429
|
+
width: utils.parseProp(this.width, orientation),
|
|
7430
|
+
backgroundColor: utils.parseProp(this.bgColor, orientation),
|
|
7431
|
+
top: utils.parseProp(this.y, orientation),
|
|
7432
|
+
left: utils.parseProp(this.x, orientation),
|
|
7311
7433
|
zIndex: this.z,
|
|
7312
|
-
fontSize: this.fontSize,
|
|
7434
|
+
fontSize: utils.parseProp(this.fontSize, orientation),
|
|
7313
7435
|
fontFamily: this.font,
|
|
7314
|
-
color: this.fontColor,
|
|
7315
|
-
display: this.visible ? 'flex' : 'none', //
|
|
7316
|
-
backgroundImage: `url(${backgroundImg})
|
|
7436
|
+
color: utils.parseProp(this.fontColor, orientation),
|
|
7437
|
+
display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'flex' : 'none', // Toggle visibility
|
|
7438
|
+
backgroundImage: `url(${utils.parseProp(backgroundImg, orientation)})`,
|
|
7317
7439
|
};
|
|
7318
|
-
|
|
7440
|
+
}
|
|
7441
|
+
render() {
|
|
7442
|
+
return (index.h(index.Host, { key: '84c017e4c232307fda917a9da133629dbccf443c', class: "lido-text", value: this.value, type: this.type, tabindex: this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, isAllowOnlyOneDrop: `${this.isAllowOnlyOneDrop}` }, this.string));
|
|
7319
7443
|
}
|
|
7320
7444
|
get el() { return index.getElement(this); }
|
|
7321
7445
|
};
|
|
@@ -7827,6 +7951,10 @@ const LidoWrap = class {
|
|
|
7827
7951
|
this.onInCorrect = undefined;
|
|
7828
7952
|
this.onCorrect = undefined;
|
|
7829
7953
|
this.onEntry = undefined;
|
|
7954
|
+
this.childElementsLength = undefined;
|
|
7955
|
+
this.minLength = undefined;
|
|
7956
|
+
this.maxLength = undefined;
|
|
7957
|
+
this.style = undefined;
|
|
7830
7958
|
}
|
|
7831
7959
|
/**
|
|
7832
7960
|
* Lifecycle hook that runs after the component is rendered in the DOM.
|
|
@@ -7834,19 +7962,35 @@ const LidoWrap = class {
|
|
|
7834
7962
|
*/
|
|
7835
7963
|
componentDidLoad() {
|
|
7836
7964
|
utils.initEventsForElement(this.el, this.type);
|
|
7965
|
+
utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'grid');
|
|
7837
7966
|
}
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7967
|
+
/**
|
|
7968
|
+
* Lifecycle method that runs before the component is rendered.
|
|
7969
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
7970
|
+
*/
|
|
7971
|
+
componentWillLoad() {
|
|
7972
|
+
this.updateStyles();
|
|
7973
|
+
window.addEventListener('resize', this.updateStyles.bind(this)); // Update on screen rotation
|
|
7974
|
+
window.addEventListener('load', this.updateStyles.bind(this)); // Update on screen rotation
|
|
7975
|
+
}
|
|
7976
|
+
disconnectedCallback() {
|
|
7977
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
7978
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
7979
|
+
}
|
|
7980
|
+
updateStyles() {
|
|
7981
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
7982
|
+
this.style = {
|
|
7983
|
+
height: utils.parseProp(this.height, orientation),
|
|
7984
|
+
width: utils.parseProp(this.width, orientation),
|
|
7985
|
+
backgroundColor: utils.parseProp(this.bgColor, orientation),
|
|
7986
|
+
top: utils.parseProp(this.y, orientation),
|
|
7987
|
+
left: utils.parseProp(this.x, orientation),
|
|
7846
7988
|
zIndex: this.z,
|
|
7847
|
-
|
|
7989
|
+
display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'grid' : 'none', // Toggle visibility
|
|
7848
7990
|
};
|
|
7849
|
-
|
|
7991
|
+
}
|
|
7992
|
+
render() {
|
|
7993
|
+
return (index.h(index.Host, { key: '743df51a1d832b87cd17ad840e9b2497b48d9b72', class: "lido-wrap", value: this.value, type: this.type, tabindex: this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '527bd48b5d85bf8e51133c2e6d29db541d82ae48' })));
|
|
7850
7994
|
}
|
|
7851
7995
|
get el() { return index.getElement(this); }
|
|
7852
7996
|
};
|