@everymatrix/bonus-powerups-ingame-list 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/assets/Info-circle.svg +10 -0
- package/dist/assets/clock.svg +3 -0
- package/dist/assets/close.svg +4 -0
- package/dist/assets/double-right.svg +4 -0
- package/dist/assets/energe.svg +9 -0
- package/dist/assets/fire.svg +3 -0
- package/dist/bonus-powerups-ingame-list/app-globals-0f993ce5.js +1 -0
- package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-a8638981.js +3 -0
- package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list.esm.js +1 -0
- package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list_2.entry.js +1 -0
- package/dist/bonus-powerups-ingame-list/index-20f17dc8.js +2 -0
- package/dist/bonus-powerups-ingame-list/index.esm.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-powerups-ingame-list-c9172936.js +6114 -0
- package/dist/cjs/bonus-powerups-ingame-list.cjs.js +25 -0
- package/dist/cjs/bonus-powerups-ingame-list_2.cjs.entry.js +82 -0
- package/dist/cjs/index-f60c43c6.js +1284 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/assets/Info-circle.svg +10 -0
- package/dist/collection/components/assets/clock.svg +3 -0
- package/dist/collection/components/assets/close.svg +4 -0
- package/dist/collection/components/assets/double-right.svg +4 -0
- package/dist/collection/components/assets/energe.svg +9 -0
- package/dist/collection/components/assets/fire.svg +3 -0
- package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.css +208 -0
- package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.js +436 -0
- package/dist/collection/components/bonus-powerups-ingame-list/index.js +1 -0
- package/dist/collection/components/time-count/time-count.js +143 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +44 -0
- package/dist/collection/utils/utils.js +21 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-powerups-ingame-list-a8638981.js +6110 -0
- package/dist/esm/bonus-powerups-ingame-list.js +20 -0
- package/dist/esm/bonus-powerups-ingame-list_2.entry.js +78 -0
- package/dist/esm/index-20f17dc8.js +1257 -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-list/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/libs/common/src/types/casino/powerups.d.ts +60 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/packages/stencil/bonus-powerups-ingame-list/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/packages/stencil/bonus-powerups-ingame-list/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/packages/stencil/bonus-powerups-ingame-list/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/packages/stencil/bonus-powerups-ingame-list/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.d.ts +36 -0
- package/dist/types/components/bonus-powerups-ingame-list/index.d.ts +1 -0
- package/dist/types/components/time-count/time-count.d.ts +16 -0
- package/dist/types/components.d.ts +106 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +14 -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-f60c43c6.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-list.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-list_2.cjs",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"isPowering":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["loadData"],"endpoint":["loadData"],"limit":["loadData"],"language":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"time-count",{"expireTime":[1,"expire-time"],"language":[1],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const bonusPowerupsIngameList = require('./bonus-powerups-ingame-list-c9172936.js');
|
|
6
|
+
const index = require('./index-f60c43c6.js');
|
|
7
|
+
|
|
8
|
+
const TimeCount = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
this.timeCountDownEvent = index.createEvent(this, "powerupTimeCountDown", 7);
|
|
12
|
+
this.expireTime = undefined;
|
|
13
|
+
this.language = 'en';
|
|
14
|
+
this.displayTime = undefined;
|
|
15
|
+
this.isExpireInDay1 = false;
|
|
16
|
+
this.timeLeft = undefined;
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.timer = setInterval(() => this.updateDisplayTime(), 1000);
|
|
20
|
+
this.updateDisplayTime();
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
clearInterval(this.timer);
|
|
24
|
+
}
|
|
25
|
+
timeLeftChanged() {
|
|
26
|
+
if (this.timeLeft > 0) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.timeCountDownEvent.emit({ type: 'powerupTimeCountDown', timeLeft: this.timeLeft });
|
|
30
|
+
}
|
|
31
|
+
startTimeChanged() {
|
|
32
|
+
// Reset the timer and update the display when the input time changes
|
|
33
|
+
clearInterval(this.timer);
|
|
34
|
+
this.timer = setInterval(() => this.updateDisplayTime(), 1000);
|
|
35
|
+
this.updateDisplayTime();
|
|
36
|
+
}
|
|
37
|
+
updateDisplayTime() {
|
|
38
|
+
const now = bonusPowerupsIngameList.hooks();
|
|
39
|
+
const start = bonusPowerupsIngameList.hooks(this.expireTime);
|
|
40
|
+
if (!start.isValid()) {
|
|
41
|
+
this.displayTime = 'Invalid date';
|
|
42
|
+
clearInterval(this.timer);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const duration = bonusPowerupsIngameList.hooks.duration(start.diff(now));
|
|
46
|
+
this.isExpireInDay1 = true; //duration.asDays() > 1;
|
|
47
|
+
this.timeLeft = duration.asMinutes();
|
|
48
|
+
// If the time has already passed
|
|
49
|
+
if (duration.asMilliseconds() <= 0) {
|
|
50
|
+
this.displayTime = '00:00:00';
|
|
51
|
+
clearInterval(this.timer);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const hours = Math.floor(duration.asHours());
|
|
55
|
+
if (hours >= 48) {
|
|
56
|
+
this.displayTime = `${Math.floor(duration.asDays())} ${bonusPowerupsIngameList.translate('days', this.language)}`;
|
|
57
|
+
}
|
|
58
|
+
else if (hours >= 24) {
|
|
59
|
+
this.displayTime = '1 day';
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const h = hours;
|
|
63
|
+
const m = duration.minutes();
|
|
64
|
+
const s = duration.seconds();
|
|
65
|
+
this.displayTime = [h, m, s].map(val => String(val).padStart(2, '0')).join(':');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return [
|
|
70
|
+
this.isExpireInDay1 &&
|
|
71
|
+
index.h("span", { key: '11ec5e6887c3e0b3e3178f8323f9a7937a855651', class: 'Label' }, bonusPowerupsIngameList.translate('expiresIn', this.language), " "),
|
|
72
|
+
index.h("span", { key: 'bbaee9a13552ae932823245d6dc99a5ebd494e46', class: 'TimeCountDown' }, this.displayTime)
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
static get watchers() { return {
|
|
76
|
+
"timeLeft": ["timeLeftChanged"],
|
|
77
|
+
"expireTime": ["startTimeChanged"]
|
|
78
|
+
}; }
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
exports.bonus_powerups_ingame_list = bonusPowerupsIngameList.BonusPowerupsIngameList;
|
|
82
|
+
exports.time_count = TimeCount;
|