@everymatrix/mini-games-lobby 1.44.0 → 1.45.0

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 (59) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-85e4b23a.js +1211 -0
  3. package/dist/cjs/loader.cjs.js +7 -13
  4. package/dist/cjs/mini-games-lobby.cjs.entry.js +79 -259
  5. package/dist/cjs/mini-games-lobby.cjs.js +17 -11
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/mini-games-lobby/index.js +1 -0
  8. package/dist/collection/components/mini-games-lobby/mini-games-lobby.js +193 -212
  9. package/dist/collection/decorators/base.decorator.js +9 -9
  10. package/dist/collection/decorators/locale.decorator.js +27 -27
  11. package/dist/collection/decorators/style.decorator.js +21 -21
  12. package/dist/collection/decorators/style.util.js +26 -26
  13. package/dist/collection/renders/GameLauncher.js +5 -12
  14. package/dist/collection/renders/Games.js +6 -12
  15. package/dist/collection/utils/fetch.js +20 -20
  16. package/dist/collection/utils/translation.js +9 -9
  17. package/dist/collection/utils/utils.js +3 -0
  18. package/dist/esm/app-globals-0f993ce5.js +3 -0
  19. package/dist/esm/index-394aa256.js +1183 -0
  20. package/dist/esm/loader.js +7 -13
  21. package/dist/esm/mini-games-lobby.entry.js +79 -259
  22. package/dist/esm/mini-games-lobby.js +14 -11
  23. package/dist/mini-games-lobby/mini-games-lobby.esm.js +1 -1
  24. package/dist/mini-games-lobby/p-77bf5852.js +2 -0
  25. package/dist/mini-games-lobby/p-e1255160.js +1 -0
  26. package/dist/mini-games-lobby/p-e9908e53.entry.js +1 -0
  27. package/dist/stencil.config.dev.js +17 -0
  28. package/dist/stencil.config.js +14 -19
  29. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.d.ts +2 -0
  30. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.dev.d.ts +2 -0
  31. package/dist/types/components/mini-games-lobby/index.d.ts +1 -0
  32. package/dist/types/components/mini-games-lobby/mini-games-lobby.d.ts +47 -47
  33. package/dist/types/renders/GameLauncher.d.ts +2 -2
  34. package/dist/types/renders/Games.d.ts +3 -3
  35. package/dist/types/stencil-public-runtime.d.ts +142 -33
  36. package/dist/types/utils/translation.d.ts +10 -10
  37. package/dist/types/utils/utils.d.ts +1 -0
  38. package/loader/cdn.js +1 -3
  39. package/loader/index.cjs.js +1 -3
  40. package/loader/index.d.ts +13 -1
  41. package/loader/index.es2017.js +1 -3
  42. package/loader/index.js +1 -3
  43. package/loader/package.json +1 -0
  44. package/package.json +8 -5
  45. package/dist/cjs/index-90b83e7e.js +0 -1298
  46. package/dist/components/index.d.ts +0 -26
  47. package/dist/components/index.js +0 -1
  48. package/dist/components/mini-games-lobby.d.ts +0 -11
  49. package/dist/components/mini-games-lobby.js +0 -323
  50. package/dist/esm/index-ced8f413.js +0 -1271
  51. package/dist/esm/polyfills/core-js.js +0 -11
  52. package/dist/esm/polyfills/css-shim.js +0 -1
  53. package/dist/esm/polyfills/dom.js +0 -79
  54. package/dist/esm/polyfills/es5-html-element.js +0 -1
  55. package/dist/esm/polyfills/index.js +0 -34
  56. package/dist/esm/polyfills/system.js +0 -6
  57. package/dist/mini-games-lobby/p-49a0f62e.entry.js +0 -1
  58. package/dist/mini-games-lobby/p-e3451601.js +0 -1
  59. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/mini-games-lobby/.stencil/packages/mini-games-lobby/stencil.config.d.ts +0 -2
@@ -1,15 +1,9 @@
1
1
  import { h } from "@stencil/core";
2
- import HeaderIcon from '../images/HeaderIcon.svg';
2
+ import HeaderIcon from "../images/HeaderIcon.svg";
3
3
  const getProps = (game, onClickGame) => ({
4
- style: {
5
- "background-image": `url(${game.icons['88']})`
6
- },
7
- onClick: () => onClickGame(game.launchUrl),
4
+ style: {
5
+ "background-image": `url(${game.icons['88']})`
6
+ },
7
+ onClick: () => onClickGame(game.launchUrl),
8
8
  });
9
- export const Games = ({ text, games, onClickGame }) => (h("div", { class: "GamesContainer" },
10
- h("div", { id: "GamesHeader" },
11
- h("div", null,
12
- h("img", { src: HeaderIcon }),
13
- h("p", { innerHTML: text }))),
14
- h("div", { id: "Games" }, games.map((game) => h("div", { class: "Game" },
15
- h("div", Object.assign({ class: "GameImg" }, getProps(game, onClickGame))))))));
9
+ export const Games = ({ text, games, onClickGame }) => (h("div", { class: "GamesContainer" }, h("div", { id: "GamesHeader" }, h("div", null, h("img", { src: HeaderIcon }), h("p", { innerHTML: text }))), h("div", { id: "Games" }, games.map((game) => h("div", { class: "Game" }, h("div", Object.assign({ class: "GameImg" }, getProps(game, onClickGame))))))));
@@ -1,28 +1,28 @@
1
1
  export const fetcher = async (url) => {
2
- let res;
3
- try {
4
- res = await fetch(url);
5
- res = await res.json();
6
- }
7
- catch (e) {
8
- console.error(e);
9
- }
10
- return res;
2
+ let res;
3
+ try {
4
+ res = await fetch(url);
5
+ res = await res.json();
6
+ }
7
+ catch (e) {
8
+ console.error(e);
9
+ }
10
+ return res;
11
11
  };
12
12
  export const getUrl = (path, params = {}) => {
13
- return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
13
+ return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
14
14
  };
15
15
  export async function fetchGames() {
16
- const url = getUrl(`${this.endpoint}/v1/casino/games`, {
17
- language: this.language,
18
- filter: this.filter || `categories(id=MINIGAMES),vendor(name=PragmaticPlay)`,
19
- });
20
- const res = await fetcher(url);
21
- return res.items;
16
+ const url = getUrl(`${this.endpoint}/v1/casino/games`, {
17
+ language: this.language,
18
+ filter: this.filter || `categories(id=MINIGAMES),vendor(name=PragmaticPlay)`,
19
+ });
20
+ const res = await fetcher(url);
21
+ return res.items;
22
22
  }
23
23
  export const fetchLaunchUrl = async (link, params) => {
24
- const linkProcessed = getUrl(link.replace('Start', 'StartInfo'), params);
25
- const res = await fetcher(linkProcessed);
26
- const { LaunchParams } = res;
27
- return LaunchParams === null || LaunchParams === void 0 ? void 0 : LaunchParams.launchUrl;
24
+ const linkProcessed = getUrl(link.replace('Start', 'StartInfo'), params);
25
+ const res = await fetcher(linkProcessed);
26
+ const { LaunchParams } = res;
27
+ return LaunchParams === null || LaunchParams === void 0 ? void 0 : LaunchParams.launchUrl;
28
28
  };
@@ -1,11 +1,11 @@
1
1
  export const translation = {
2
- en: {
3
- MiniGames: 'Mini Games',
4
- },
5
- 'zh-hk': {
6
- MiniGames: '小游戲',
7
- },
8
- hr: {
9
- MiniGames: 'Mini igre'
10
- }
2
+ en: {
3
+ MiniGames: 'Mini Games',
4
+ },
5
+ 'zh-hk': {
6
+ MiniGames: '小游戲',
7
+ },
8
+ hr: {
9
+ MiniGames: 'Mini igre'
10
+ }
11
11
  };
@@ -0,0 +1,3 @@
1
+ export function format(first, middle, last) {
2
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
+ }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };