@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.
Files changed (72) hide show
  1. package/dist/assets/Info-circle.svg +10 -0
  2. package/dist/assets/clock.svg +3 -0
  3. package/dist/assets/close.svg +4 -0
  4. package/dist/assets/double-right.svg +4 -0
  5. package/dist/assets/energe.svg +9 -0
  6. package/dist/assets/fire.svg +3 -0
  7. package/dist/bonus-powerups-ingame-list/app-globals-0f993ce5.js +1 -0
  8. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-a8638981.js +3 -0
  9. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list.esm.js +1 -0
  10. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list_2.entry.js +1 -0
  11. package/dist/bonus-powerups-ingame-list/index-20f17dc8.js +2 -0
  12. package/dist/bonus-powerups-ingame-list/index.esm.js +1 -0
  13. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  14. package/dist/cjs/bonus-powerups-ingame-list-c9172936.js +6114 -0
  15. package/dist/cjs/bonus-powerups-ingame-list.cjs.js +25 -0
  16. package/dist/cjs/bonus-powerups-ingame-list_2.cjs.entry.js +82 -0
  17. package/dist/cjs/index-f60c43c6.js +1284 -0
  18. package/dist/cjs/index.cjs.js +10 -0
  19. package/dist/cjs/loader.cjs.js +15 -0
  20. package/dist/collection/collection-manifest.json +13 -0
  21. package/dist/collection/components/assets/Info-circle.svg +10 -0
  22. package/dist/collection/components/assets/clock.svg +3 -0
  23. package/dist/collection/components/assets/close.svg +4 -0
  24. package/dist/collection/components/assets/double-right.svg +4 -0
  25. package/dist/collection/components/assets/energe.svg +9 -0
  26. package/dist/collection/components/assets/fire.svg +3 -0
  27. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.css +208 -0
  28. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.js +436 -0
  29. package/dist/collection/components/bonus-powerups-ingame-list/index.js +1 -0
  30. package/dist/collection/components/time-count/time-count.js +143 -0
  31. package/dist/collection/index.js +1 -0
  32. package/dist/collection/utils/locale.utils.js +44 -0
  33. package/dist/collection/utils/utils.js +21 -0
  34. package/dist/esm/app-globals-0f993ce5.js +3 -0
  35. package/dist/esm/bonus-powerups-ingame-list-a8638981.js +6110 -0
  36. package/dist/esm/bonus-powerups-ingame-list.js +20 -0
  37. package/dist/esm/bonus-powerups-ingame-list_2.entry.js +78 -0
  38. package/dist/esm/index-20f17dc8.js +1257 -0
  39. package/dist/esm/index.js +2 -0
  40. package/dist/esm/loader.js +11 -0
  41. package/dist/index.cjs.js +1 -0
  42. package/dist/index.js +1 -0
  43. package/dist/stencil.config.dev.js +20 -0
  44. package/dist/stencil.config.js +20 -0
  45. package/dist/storybook/main.js +43 -0
  46. package/dist/storybook/preview.js +9 -0
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/index.d.ts +4 -0
  54. 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
  55. 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
  56. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  57. 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
  58. package/dist/types/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.d.ts +36 -0
  59. package/dist/types/components/bonus-powerups-ingame-list/index.d.ts +1 -0
  60. package/dist/types/components/time-count/time-count.d.ts +16 -0
  61. package/dist/types/components.d.ts +106 -0
  62. package/dist/types/index.d.ts +1 -0
  63. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  64. package/dist/types/utils/locale.utils.d.ts +2 -0
  65. package/dist/types/utils/utils.d.ts +14 -0
  66. package/loader/cdn.js +1 -0
  67. package/loader/index.cjs.js +1 -0
  68. package/loader/index.d.ts +24 -0
  69. package/loader/index.es2017.js +1 -0
  70. package/loader/index.js +2 -0
  71. package/loader/package.json +11 -0
  72. 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;