@everymatrix/bonus-powerups-ingame-detail 0.0.1
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/bonus-powerups-ingame-detail/app-globals-0f993ce5.js +1 -0
- package/dist/bonus-powerups-ingame-detail/bonus-powerups-ingame-detail-78a50d3f.js +11 -0
- package/dist/bonus-powerups-ingame-detail/bonus-powerups-ingame-detail.esm.js +1 -0
- package/dist/bonus-powerups-ingame-detail/bonus-powerups-ingame-detail_5.entry.js +1 -0
- package/dist/bonus-powerups-ingame-detail/index-334a1114.js +2 -0
- package/dist/bonus-powerups-ingame-detail/index.esm.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-powerups-ingame-detail-33f5b380.js +11826 -0
- package/dist/cjs/bonus-powerups-ingame-detail.cjs.js +25 -0
- package/dist/cjs/bonus-powerups-ingame-detail_5.cjs.entry.js +334 -0
- package/dist/cjs/index-956ad213.js +1306 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/assets/Arrow Curve Left.svg +11 -0
- package/dist/collection/assets/double-right.svg +4 -0
- package/dist/collection/assets/gotoPage.svg +3 -0
- package/dist/collection/assets/return.svg +15 -0
- package/dist/collection/collection-manifest.json +27 -0
- package/dist/collection/components/bonus-powerups-ingame-detail/bonus-powerups-ingame-detail.css +304 -0
- package/dist/collection/components/bonus-powerups-ingame-detail/bonus-powerups-ingame-detail.js +483 -0
- package/dist/collection/components/bonus-powerups-ingame-detail/index.js +1 -0
- package/dist/collection/components/smart-loader/smart-loader.css +84 -0
- package/dist/collection/components/smart-loader/smart-loader.js +17 -0
- package/dist/collection/components/time-count/time-count.js +159 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/constants.js +10 -0
- package/dist/collection/utils/locale.utils.js +46 -0
- package/dist/collection/utils/utils.js +11 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-powerups-ingame-detail-78a50d3f.js +11822 -0
- package/dist/esm/bonus-powerups-ingame-detail.js +20 -0
- package/dist/esm/bonus-powerups-ingame-detail_5.entry.js +327 -0
- package/dist/esm/index-334a1114.js +1277 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +20 -0
- package/dist/stencil.config.js +20 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/libs/common/src/types/casino/powerups.d.ts +60 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/packages/stencil/bonus-powerups-ingame-detail/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/packages/stencil/bonus-powerups-ingame-detail/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/packages/stencil/bonus-powerups-ingame-detail/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/packages/stencil/bonus-powerups-ingame-detail/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-detail/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/bonus-powerups-ingame-detail/bonus-powerups-ingame-detail.d.ts +40 -0
- package/dist/types/components/bonus-powerups-ingame-detail/index.d.ts +1 -0
- package/dist/types/components/smart-loader/smart-loader.d.ts +3 -0
- package/dist/types/components/time-count/time-count.d.ts +17 -0
- package/dist/types/components.d.ts +123 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/constants.d.ts +9 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-956ad213.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('bonus-powerups-ingame-detail.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["bonus-powerups-ingame-detail_5.cjs",[[1,"bonus-powerups-ingame-detail",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"pid":[513],"powerupId":[514,"powerup-id"],"isPowering":[516,"is-powering"],"powerUp":[32],"powerUpGames":[32],"isLoading":[32],"isLoadingGames":[32],"limit":[32]},[[0,"showPowerupDetails","showPowerupDetailsHandler"]],{"session":["loadPowerUpById"],"endpoint":["loadPowerUpById"],"language":["loadPowerUpById"],"pid":["loadPowerUpById"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"smart-loader"],[0,"time-count-detail",{"expireTime":[1,"expire-time"],"language":[1],"pid":[520],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"expireTime":["startTimeChanged"],"timeLeft":["timeLeftChanged"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const bonusPowerupsIngameDetail = require('./bonus-powerups-ingame-detail-33f5b380.js');
|
|
6
|
+
const index = require('./index-956ad213.js');
|
|
7
|
+
|
|
8
|
+
const smartLoaderCss = "@keyframes smart-animate1{0%{opacity:0.15;transform:translateX(0px)}35%{opacity:1;transform:translateX(36px)}75%{opacity:1;transform:translateX(0px)}100%{opacity:0.15;transform:translateX(0px)}}@keyframes smart-animate2{0%{opacity:1}35%{opacity:0.15}75%{opacity:0.5}100%{opacity:1}}@keyframes smart-animate3{0%{opacity:0.5;transform:translateX(0px)}35%{opacity:0.15;transform:translateX(-36px)}75%{opacity:0.15;transform:translateX(0px)}100%{opacity:0.5;transform:translateX(0px)}}.smart-loader{margin:50px auto;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100px;gap:10px}.smart-loader .smart-item{width:3px;height:20px;opacity:0.15;animation-delay:200ms;animation-duration:1000ms;animation-timing-function:ease-out;animation-fill-mode:forwards;padding:1px;margin:5px 0;background:#00FA5A;border-radius:4px;animation-iteration-count:infinite;animation-direction:normal}.smart-loader .smart-item:nth-child(1){animation-name:smart-animate1}.smart-loader .smart-item:nth-child(2){animation-name:smart-animate2;height:36px}.smart-loader .smart-item:nth-child(3){animation-name:smart-animate3}";
|
|
9
|
+
const SmartLoaderStyle0 = smartLoaderCss;
|
|
10
|
+
|
|
11
|
+
const SmartLoader = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return index.h("div", { key: 'b7d81127872a349887c76133eb8a7bcd3ab8d29e', class: 'smart-loader' }, index.h("div", { key: '21dfb7d7fe1fd3e0660603bc2d2464e057328228', class: "smart-item" }), index.h("div", { key: 'fa22f3e3e5283b27fe3256669a0d67a2f85e135a', class: "smart-item" }), index.h("div", { key: '9fc3be4eb58ccebfa1803b12bf526e4cd2c9e013', class: "smart-item" }));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
SmartLoader.style = SmartLoaderStyle0;
|
|
20
|
+
|
|
21
|
+
const TimeCount = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
index.registerInstance(this, hostRef);
|
|
24
|
+
this.timeCountDownEvent = index.createEvent(this, "powerupTimeCountDown", 7);
|
|
25
|
+
this.expireTime = undefined;
|
|
26
|
+
this.language = 'en';
|
|
27
|
+
this.pid = undefined;
|
|
28
|
+
this.displayTime = undefined;
|
|
29
|
+
this.isExpireInDay1 = false;
|
|
30
|
+
this.timeLeft = undefined;
|
|
31
|
+
}
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
this.timer = setInterval(() => this.updateDisplayTime(), 1000);
|
|
34
|
+
this.updateDisplayTime();
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
clearInterval(this.timer);
|
|
38
|
+
}
|
|
39
|
+
startTimeChanged() {
|
|
40
|
+
// Reset the timer and update the display when the input time changes
|
|
41
|
+
clearInterval(this.timer);
|
|
42
|
+
this.timer = setInterval(() => this.updateDisplayTime(), 1000);
|
|
43
|
+
this.updateDisplayTime();
|
|
44
|
+
}
|
|
45
|
+
timeLeftChanged() {
|
|
46
|
+
this.timeCountDownEvent.emit({ type: 'powerupTimeCountDown', timeLeft: this.timeLeft, pid: this.pid });
|
|
47
|
+
}
|
|
48
|
+
updateDisplayTime() {
|
|
49
|
+
const now = bonusPowerupsIngameDetail.hooks();
|
|
50
|
+
const start = bonusPowerupsIngameDetail.hooks(this.expireTime);
|
|
51
|
+
if (!start.isValid()) {
|
|
52
|
+
this.displayTime = 'Invalid date';
|
|
53
|
+
clearInterval(this.timer);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const duration = bonusPowerupsIngameDetail.hooks.duration(start.diff(now));
|
|
57
|
+
this.isExpireInDay1 = true; //duration.asDays() > 1
|
|
58
|
+
this.timeLeft = duration.asMinutes();
|
|
59
|
+
// If the time has already passed
|
|
60
|
+
if (duration.asMilliseconds() <= 0) {
|
|
61
|
+
this.displayTime = '00:00:00';
|
|
62
|
+
clearInterval(this.timer);
|
|
63
|
+
this.timeCountDownEvent.emit({ type: 'powerupTimeCountDown', timeLeft: 0, pid: this.pid });
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const hours = Math.floor(duration.asHours());
|
|
67
|
+
if (hours >= 48) {
|
|
68
|
+
this.displayTime = `${Math.floor(duration.asDays())} ${bonusPowerupsIngameDetail.translate('days', this.language)}`;
|
|
69
|
+
}
|
|
70
|
+
else if (hours >= 24) {
|
|
71
|
+
this.displayTime = '1 day';
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const h = hours;
|
|
75
|
+
const m = duration.minutes();
|
|
76
|
+
const s = duration.seconds();
|
|
77
|
+
this.displayTime = [h, m, s].map(val => String(val).padStart(2, '0')).join(':');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
return [
|
|
82
|
+
this.isExpireInDay1 &&
|
|
83
|
+
index.h("span", { key: '832c9d6dce83414d8d0fac874c2dfd7c0d0742bd', class: 'Label' }, bonusPowerupsIngameDetail.translate('expiresIn', this.language), " "),
|
|
84
|
+
index.h("span", { key: '3f68f1ddc0f710cded68ba52305f44fc95603e1d', class: 'TimeCountDown' }, this.displayTime)
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
static get watchers() { return {
|
|
88
|
+
"expireTime": ["startTimeChanged"],
|
|
89
|
+
"timeLeft": ["timeLeftChanged"]
|
|
90
|
+
}; }
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const uiImageCss = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";
|
|
94
|
+
const UiImageStyle0 = uiImageCss;
|
|
95
|
+
|
|
96
|
+
const UiImage = class {
|
|
97
|
+
constructor(hostRef) {
|
|
98
|
+
index.registerInstance(this, hostRef);
|
|
99
|
+
this.src = undefined;
|
|
100
|
+
this.width = undefined;
|
|
101
|
+
this.height = undefined;
|
|
102
|
+
this.alt = undefined;
|
|
103
|
+
this.styles = undefined;
|
|
104
|
+
this.detectDistance = '200px';
|
|
105
|
+
this.imgLoaded = false;
|
|
106
|
+
this.shouldLoad = false;
|
|
107
|
+
}
|
|
108
|
+
handleSrc() {
|
|
109
|
+
if (!this.shouldLoad) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const preloadedImage = new Image();
|
|
113
|
+
preloadedImage.onload = () => {
|
|
114
|
+
if (this.image) {
|
|
115
|
+
this.image.src = this.src;
|
|
116
|
+
this.imgLoaded = true;
|
|
117
|
+
preloadedImage.onload = null;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
preloadedImage.src = this.src;
|
|
121
|
+
}
|
|
122
|
+
componentDidLoad() {
|
|
123
|
+
if ('IntersectionObserver' in window) {
|
|
124
|
+
this.el.__uxComponent = this;
|
|
125
|
+
if (!window.EMUxObserver) {
|
|
126
|
+
window.EMUxObserver = new IntersectionObserver((entries) => {
|
|
127
|
+
entries.forEach(entry => {
|
|
128
|
+
if (entry.isIntersecting) {
|
|
129
|
+
const comp = entry.target.__uxComponent;
|
|
130
|
+
if (comp) {
|
|
131
|
+
comp.shouldLoad = true;
|
|
132
|
+
comp.handleSrc();
|
|
133
|
+
}
|
|
134
|
+
window.EMUxObserver.unobserve(entry.target);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}, { rootMargin: this.detectDistance });
|
|
138
|
+
}
|
|
139
|
+
window.EMUxObserver.observe(this.el);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
this.shouldLoad = true;
|
|
143
|
+
this.handleSrc();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
render() {
|
|
147
|
+
return (index.h(index.Host, { key: 'f506ba73852f257ad80bf59ca177d2065a5f365e', class: "HostContainer" }, !this.imgLoaded && (index.h("ui-skeleton", { key: '564ebfab701f827ddc2debccb7615926dbc9e876', class: "UiContainer", structure: "image", width: "100%", height: "100%" })), index.h("img", { key: '2188ca4494c10587f064acc5459ffc468948f497', ref: (el) => (this.image = el), src: this.shouldLoad ? this.src : undefined, onLoad: () => (this.imgLoaded = true), style: this.styles, class: `UiContainer ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" })));
|
|
148
|
+
}
|
|
149
|
+
get el() { return index.getElement(this); }
|
|
150
|
+
static get watchers() { return {
|
|
151
|
+
"src": ["handleSrc"]
|
|
152
|
+
}; }
|
|
153
|
+
};
|
|
154
|
+
UiImage.style = UiImageStyle0;
|
|
155
|
+
|
|
156
|
+
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
|
157
|
+
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
158
|
+
|
|
159
|
+
const UiSkeleton = class {
|
|
160
|
+
constructor(hostRef) {
|
|
161
|
+
index.registerInstance(this, hostRef);
|
|
162
|
+
this.stylingValue = {
|
|
163
|
+
width: this.handleStylingProps(this.width),
|
|
164
|
+
height: this.handleStylingProps(this.height),
|
|
165
|
+
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
166
|
+
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
167
|
+
marginTop: this.handleStylingProps(this.marginTop),
|
|
168
|
+
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
169
|
+
marginRight: this.handleStylingProps(this.marginRight),
|
|
170
|
+
size: this.handleStylingProps(this.size),
|
|
171
|
+
};
|
|
172
|
+
this.structure = undefined;
|
|
173
|
+
this.width = 'unset';
|
|
174
|
+
this.height = 'unset';
|
|
175
|
+
this.borderRadius = 'unset';
|
|
176
|
+
this.marginBottom = 'unset';
|
|
177
|
+
this.marginTop = 'unset';
|
|
178
|
+
this.marginLeft = 'unset';
|
|
179
|
+
this.marginRight = 'unset';
|
|
180
|
+
this.animation = true;
|
|
181
|
+
this.rows = 0;
|
|
182
|
+
this.size = '100%';
|
|
183
|
+
}
|
|
184
|
+
handleStructureChange(newValue, oldValue) {
|
|
185
|
+
if (oldValue !== newValue) {
|
|
186
|
+
this.handleStructure(newValue);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
handleStylingProps(value) {
|
|
190
|
+
switch (typeof value) {
|
|
191
|
+
case 'number':
|
|
192
|
+
return value === 0 ? 0 : `${value}px`;
|
|
193
|
+
case 'undefined':
|
|
194
|
+
return 'unset';
|
|
195
|
+
case 'string':
|
|
196
|
+
if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
|
|
197
|
+
value.endsWith('px') ||
|
|
198
|
+
value.endsWith('%')) {
|
|
199
|
+
return value;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
return 'unset';
|
|
203
|
+
}
|
|
204
|
+
default:
|
|
205
|
+
return 'unset';
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
handleStructure(structure) {
|
|
209
|
+
switch (structure) {
|
|
210
|
+
case 'logo':
|
|
211
|
+
return this.renderLogo();
|
|
212
|
+
case 'image':
|
|
213
|
+
return this.renderImage();
|
|
214
|
+
case 'title':
|
|
215
|
+
return this.renderTitle();
|
|
216
|
+
case 'text':
|
|
217
|
+
return this.renderText();
|
|
218
|
+
case 'rectangle':
|
|
219
|
+
return this.renderRectangle();
|
|
220
|
+
case 'circle':
|
|
221
|
+
return this.renderCircle();
|
|
222
|
+
default:
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
renderLogo() {
|
|
227
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
|
|
228
|
+
}
|
|
229
|
+
renderImage() {
|
|
230
|
+
return index.h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
|
|
231
|
+
}
|
|
232
|
+
renderTitle() {
|
|
233
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
|
|
234
|
+
}
|
|
235
|
+
renderText() {
|
|
236
|
+
return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
|
|
237
|
+
}
|
|
238
|
+
renderRectangle() {
|
|
239
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
240
|
+
}
|
|
241
|
+
renderCircle() {
|
|
242
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
|
|
243
|
+
}
|
|
244
|
+
render() {
|
|
245
|
+
let styleBlock = '';
|
|
246
|
+
switch (this.structure) {
|
|
247
|
+
case 'logo':
|
|
248
|
+
styleBlock = `
|
|
249
|
+
:host {
|
|
250
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
251
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
252
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
253
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
254
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
255
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
256
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
259
|
+
break;
|
|
260
|
+
case 'image':
|
|
261
|
+
styleBlock = `
|
|
262
|
+
:host {
|
|
263
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
264
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
265
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
266
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
267
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
268
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
269
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
270
|
+
}
|
|
271
|
+
`;
|
|
272
|
+
break;
|
|
273
|
+
case 'title':
|
|
274
|
+
styleBlock = `
|
|
275
|
+
:host {
|
|
276
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
277
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
278
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
279
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
280
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
281
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
282
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
283
|
+
}
|
|
284
|
+
`;
|
|
285
|
+
break;
|
|
286
|
+
case 'text':
|
|
287
|
+
styleBlock = `
|
|
288
|
+
:host {
|
|
289
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
290
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
291
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
292
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
293
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
294
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
295
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
296
|
+
}
|
|
297
|
+
`;
|
|
298
|
+
break;
|
|
299
|
+
case 'rectangle':
|
|
300
|
+
styleBlock = `
|
|
301
|
+
:host {
|
|
302
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
303
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
304
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
305
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
306
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
307
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
308
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
309
|
+
}
|
|
310
|
+
`;
|
|
311
|
+
break;
|
|
312
|
+
case 'circle':
|
|
313
|
+
styleBlock = `
|
|
314
|
+
:host {
|
|
315
|
+
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
316
|
+
}
|
|
317
|
+
`;
|
|
318
|
+
break;
|
|
319
|
+
default:
|
|
320
|
+
styleBlock = '';
|
|
321
|
+
}
|
|
322
|
+
return (index.h(index.Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, index.h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
|
|
323
|
+
}
|
|
324
|
+
static get watchers() { return {
|
|
325
|
+
"structure": ["handleStructureChange"]
|
|
326
|
+
}; }
|
|
327
|
+
};
|
|
328
|
+
UiSkeleton.style = UiSkeletonStyle0;
|
|
329
|
+
|
|
330
|
+
exports.bonus_powerups_ingame_detail = bonusPowerupsIngameDetail.BonusPowerupsIngameDetail;
|
|
331
|
+
exports.smart_loader = SmartLoader;
|
|
332
|
+
exports.time_count_detail = TimeCount;
|
|
333
|
+
exports.ui_image = UiImage;
|
|
334
|
+
exports.ui_skeleton = UiSkeleton;
|