@everymatrix/mini-games-lobby 1.56.0 → 1.56.2
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-2c9f83af.js → index-d279ce11.js} +62 -187
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mini-games-lobby.cjs.entry.js +5 -182
- package/dist/cjs/mini-games-lobby.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/mini-games-lobby/mini-games-lobby.js +4 -41
- package/dist/esm/{index-25e6da1e.js → index-cae66e51.js} +62 -187
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mini-games-lobby.entry.js +5 -182
- package/dist/esm/mini-games-lobby.js +3 -3
- package/dist/mini-games-lobby/mini-games-lobby.esm.js +1 -1
- package/dist/mini-games-lobby/p-3ae7300f.entry.js +1 -0
- package/dist/mini-games-lobby/p-7bdde66e.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/mini-games-lobby/p-10aa90b5.entry.js +0 -1
- package/dist/mini-games-lobby/p-14714f4a.js +0 -2
- 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 +0 -2
- 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 +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -2,38 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
|
|
7
|
-
/******************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
|
|
22
|
-
function __decorate(decorators, target, key, desc) {
|
|
23
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
25
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function __metadata(metadataKey, metadataValue) {
|
|
30
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
34
|
-
var e = new Error(message);
|
|
35
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
36
|
-
};
|
|
5
|
+
const index = require('./index-d279ce11.js');
|
|
37
6
|
|
|
38
7
|
const fetcher = async (url) => {
|
|
39
8
|
let res;
|
|
@@ -92,154 +61,20 @@ const Games = ({ text, games, onClickGame }) => (index.h("div", { class: "GamesC
|
|
|
92
61
|
index.h("div", { id: "Games" }, games.map((game) => index.h("div", { class: "Game" },
|
|
93
62
|
index.h("div", Object.assign({ class: "GameImg" }, getProps(game, onClickGame))))))));
|
|
94
63
|
|
|
95
|
-
const apply = (proto, lifecycle, run) => {
|
|
96
|
-
const existLifeCycle = proto[lifecycle];
|
|
97
|
-
if (!existLifeCycle) {
|
|
98
|
-
throw new Error('lifecycle ' + lifecycle + ' not defined');
|
|
99
|
-
}
|
|
100
|
-
proto[lifecycle] = function (...args) {
|
|
101
|
-
run.bind(this, ...args).call();
|
|
102
|
-
if (existLifeCycle) {
|
|
103
|
-
return existLifeCycle.bind(this, ...args).call();
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const translation = {
|
|
109
|
-
en: {
|
|
110
|
-
MiniGames: 'Mini Games',
|
|
111
|
-
},
|
|
112
|
-
'zh-hk': {
|
|
113
|
-
MiniGames: '小游戲',
|
|
114
|
-
},
|
|
115
|
-
hr: {
|
|
116
|
-
MiniGames: 'Mini igre'
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const getLocale = (_translations, language) => {
|
|
121
|
-
return _translations[language] || _translations['en'];
|
|
122
|
-
};
|
|
123
|
-
function setLocale() {
|
|
124
|
-
this.locale = getLocale(this.translation, this.language);
|
|
125
|
-
}
|
|
126
|
-
async function setLocaleByUrl(isInit = true) {
|
|
127
|
-
if (this.translationUrl) {
|
|
128
|
-
this.translation = await fetcher(this.translationUrl);
|
|
129
|
-
setLocale.bind(this).call();
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
if (!isInit) {
|
|
133
|
-
this.translation = translation;
|
|
134
|
-
setLocale.bind(this).call();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
const Locale = () => {
|
|
139
|
-
// @ts-ignore
|
|
140
|
-
return (proto, prop) => {
|
|
141
|
-
apply(proto, 'componentWillLoad', async function () {
|
|
142
|
-
this.translation = translation;
|
|
143
|
-
setLocale.bind(this).call();
|
|
144
|
-
setLocaleByUrl.bind(this, true).call();
|
|
145
|
-
});
|
|
146
|
-
// @ts-ignore
|
|
147
|
-
apply(proto, 'componentShouldUpdate', async function (newValue, oldValue, key) {
|
|
148
|
-
if (key === 'language') {
|
|
149
|
-
setLocale.bind(this).call();
|
|
150
|
-
}
|
|
151
|
-
if (key === 'translationUrl') {
|
|
152
|
-
setLocaleByUrl.bind(this, false).call();
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const fetchText = async (url) => {
|
|
159
|
-
let styleCode;
|
|
160
|
-
try {
|
|
161
|
-
let res = await fetch(url);
|
|
162
|
-
styleCode = await res.text();
|
|
163
|
-
}
|
|
164
|
-
catch (err) {
|
|
165
|
-
console.error('error ', err);
|
|
166
|
-
}
|
|
167
|
-
return styleCode;
|
|
168
|
-
};
|
|
169
|
-
const setStyle = (container, index, styleCode) => {
|
|
170
|
-
const sheet = new CSSStyleSheet();
|
|
171
|
-
styleCode && sheet.insertRule(styleCode);
|
|
172
|
-
try {
|
|
173
|
-
container.adoptedStyleSheets[index] = sheet;
|
|
174
|
-
}
|
|
175
|
-
catch (err) { }
|
|
176
|
-
};
|
|
177
|
-
const getCode = async (url) => {
|
|
178
|
-
let styleCode;
|
|
179
|
-
if (url) {
|
|
180
|
-
styleCode = await fetchText(url);
|
|
181
|
-
}
|
|
182
|
-
return styleCode;
|
|
183
|
-
};
|
|
184
|
-
const setClientStyling = (root, styleCode) => {
|
|
185
|
-
if (!root)
|
|
186
|
-
return;
|
|
187
|
-
setStyle(root, 1, styleCode);
|
|
188
|
-
};
|
|
189
|
-
const setClientStylingUrl = async (root, url) => {
|
|
190
|
-
if (!root)
|
|
191
|
-
return;
|
|
192
|
-
setStyle(root, 2, await getCode(url));
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
const matchStyleProcess = (root, value, key) => {
|
|
196
|
-
switch (key) {
|
|
197
|
-
case 'clientStyling':
|
|
198
|
-
setClientStyling(root, value);
|
|
199
|
-
break;
|
|
200
|
-
case 'clientStylingUrl':
|
|
201
|
-
setClientStylingUrl(root, value);
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
const Style = () => {
|
|
206
|
-
return (proto, prop) => {
|
|
207
|
-
apply(proto, 'componentDidLoad', function () {
|
|
208
|
-
const root = index.getElement(this).shadowRoot;
|
|
209
|
-
matchStyleProcess(root, this[prop], prop);
|
|
210
|
-
});
|
|
211
|
-
// @ts-ignore
|
|
212
|
-
apply(proto, 'componentShouldUpdate', function (newValue, oldValue, key) {
|
|
213
|
-
if (key !== prop)
|
|
214
|
-
return;
|
|
215
|
-
const root = index.getElement(this).shadowRoot;
|
|
216
|
-
matchStyleProcess(root, this[prop], prop);
|
|
217
|
-
});
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
|
|
221
64
|
const miniGamesLobbyCss = ":host{display:block}*{box-sizing:border-box}#LobbyContainer{display:flex;flex-direction:column;flex-grow:1;position:relative}#GameLaunchHeader{align-items:center;display:flex;background:var(--mini-games-header-bg, var(--base-bg, #fff));height:40px;justify-content:space-between;padding:0 15px}#GameLaunchHeader button{border:none;color:inherit;cursor:pointer;outline:0}#GameLaunchHeader .GameIcon--full-screen{margin:0 10px 0 auto}#GameLaunchHeader .GameIcon{background:var(--mini-game-icon-bg, transparent);padding:0}#GamesHeader{align-items:center;display:flex;background:var(--mini-games-header-bg, var(--base-bg, #fff));height:40px;justify-content:space-between;padding:0 15px;color:var(--mini-games-header-color, var(--text, #000))}#GamesHeader button{border:none;color:inherit;cursor:pointer;outline:0}#GamesHeader>div{align-items:center;display:flex}#GamesHeader p{font-weight:600;margin:0 5px}@media (min-width: 340px){#Games{gap:15px;justify-content:center}}#Games{display:inline-flex;flex-wrap:wrap;justify-content:space-between;gap:4px;padding:15px 15px 54px}.Game{width:68px;height:68px;border-radius:50%;box-shadow:0 4px 12px 0 rgba(13, 19, 29, 0.3);cursor:pointer}.GameImg{width:68px;height:68px;background-position:center center;background-size:cover;transition:0.3s}.GameImg:hover{transform:scale(1.5)}";
|
|
222
65
|
const MiniGamesLobbyStyle0 = miniGamesLobbyCss;
|
|
223
66
|
|
|
224
67
|
const MiniGamesLobby = class {
|
|
225
68
|
constructor(hostRef) {
|
|
226
69
|
index.registerInstance(this, hostRef);
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
70
|
+
this.filter = undefined;
|
|
71
|
+
this.session = undefined;
|
|
72
|
+
this.endpoint = undefined;
|
|
230
73
|
this.language = 'en';
|
|
231
|
-
/**
|
|
232
|
-
* Client custom styling via string
|
|
233
|
-
*/
|
|
234
74
|
this.clientStyling = '';
|
|
235
|
-
/**
|
|
236
|
-
* Client custom styling via url
|
|
237
|
-
*/
|
|
238
75
|
this.clientStylingUrl = '';
|
|
239
|
-
/**
|
|
240
|
-
* translation via url
|
|
241
|
-
*/
|
|
242
76
|
this.translationUrl = '';
|
|
77
|
+
this.locale = undefined;
|
|
243
78
|
this.launchUrl = undefined;
|
|
244
79
|
this.games = [];
|
|
245
80
|
}
|
|
@@ -278,18 +113,6 @@ const MiniGamesLobby = class {
|
|
|
278
113
|
"language": ["updateGames"]
|
|
279
114
|
}; }
|
|
280
115
|
};
|
|
281
|
-
__decorate([
|
|
282
|
-
Locale(),
|
|
283
|
-
__metadata("design:type", String)
|
|
284
|
-
], MiniGamesLobby.prototype, "language", void 0);
|
|
285
|
-
__decorate([
|
|
286
|
-
Style(),
|
|
287
|
-
__metadata("design:type", String)
|
|
288
|
-
], MiniGamesLobby.prototype, "clientStyling", void 0);
|
|
289
|
-
__decorate([
|
|
290
|
-
Style(),
|
|
291
|
-
__metadata("design:type", String)
|
|
292
|
-
], MiniGamesLobby.prototype, "clientStylingUrl", void 0);
|
|
293
116
|
MiniGamesLobby.style = MiniGamesLobbyStyle0;
|
|
294
117
|
|
|
295
118
|
exports.mini_games_lobby = MiniGamesLobby;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d279ce11.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mini-games-lobby.cjs.js', document.baseURI).href));
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
1
|
import { h } from "@stencil/core";
|
|
3
2
|
import { fetchGames, getUrl } from "../../utils/fetch";
|
|
4
3
|
import { Games, GameLauncher } from "../../renders";
|
|
5
|
-
import { Locale } from "../../decorators/locale.decorator";
|
|
6
|
-
import { Style } from "../../decorators/style.decorator";
|
|
7
4
|
export class MiniGamesLobby {
|
|
8
5
|
constructor() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
this.filter = undefined;
|
|
7
|
+
this.session = undefined;
|
|
8
|
+
this.endpoint = undefined;
|
|
12
9
|
this.language = 'en';
|
|
13
|
-
/**
|
|
14
|
-
* Client custom styling via string
|
|
15
|
-
*/
|
|
16
10
|
this.clientStyling = '';
|
|
17
|
-
/**
|
|
18
|
-
* Client custom styling via url
|
|
19
|
-
*/
|
|
20
11
|
this.clientStylingUrl = '';
|
|
21
|
-
/**
|
|
22
|
-
* translation via url
|
|
23
|
-
*/
|
|
24
12
|
this.translationUrl = '';
|
|
13
|
+
this.locale = undefined;
|
|
25
14
|
this.launchUrl = undefined;
|
|
26
15
|
this.games = [];
|
|
27
16
|
}
|
|
@@ -82,8 +71,6 @@ export class MiniGamesLobby {
|
|
|
82
71
|
"tags": [],
|
|
83
72
|
"text": "filter for interface /casino/games"
|
|
84
73
|
},
|
|
85
|
-
"getter": false,
|
|
86
|
-
"setter": false,
|
|
87
74
|
"attribute": "filter",
|
|
88
75
|
"reflect": false
|
|
89
76
|
},
|
|
@@ -101,8 +88,6 @@ export class MiniGamesLobby {
|
|
|
101
88
|
"tags": [],
|
|
102
89
|
"text": "User Session"
|
|
103
90
|
},
|
|
104
|
-
"getter": false,
|
|
105
|
-
"setter": false,
|
|
106
91
|
"attribute": "session",
|
|
107
92
|
"reflect": false
|
|
108
93
|
},
|
|
@@ -120,8 +105,6 @@ export class MiniGamesLobby {
|
|
|
120
105
|
"tags": [],
|
|
121
106
|
"text": "Endpoint URL for the source of data"
|
|
122
107
|
},
|
|
123
|
-
"getter": false,
|
|
124
|
-
"setter": false,
|
|
125
108
|
"attribute": "endpoint",
|
|
126
109
|
"reflect": false
|
|
127
110
|
},
|
|
@@ -139,8 +122,6 @@ export class MiniGamesLobby {
|
|
|
139
122
|
"tags": [],
|
|
140
123
|
"text": "Language of the widget"
|
|
141
124
|
},
|
|
142
|
-
"getter": false,
|
|
143
|
-
"setter": false,
|
|
144
125
|
"attribute": "language",
|
|
145
126
|
"reflect": false,
|
|
146
127
|
"defaultValue": "'en'"
|
|
@@ -159,8 +140,6 @@ export class MiniGamesLobby {
|
|
|
159
140
|
"tags": [],
|
|
160
141
|
"text": "Client custom styling via string"
|
|
161
142
|
},
|
|
162
|
-
"getter": false,
|
|
163
|
-
"setter": false,
|
|
164
143
|
"attribute": "client-styling",
|
|
165
144
|
"reflect": false,
|
|
166
145
|
"defaultValue": "''"
|
|
@@ -179,8 +158,6 @@ export class MiniGamesLobby {
|
|
|
179
158
|
"tags": [],
|
|
180
159
|
"text": "Client custom styling via url"
|
|
181
160
|
},
|
|
182
|
-
"getter": false,
|
|
183
|
-
"setter": false,
|
|
184
161
|
"attribute": "client-styling-url",
|
|
185
162
|
"reflect": false,
|
|
186
163
|
"defaultValue": "''"
|
|
@@ -199,8 +176,6 @@ export class MiniGamesLobby {
|
|
|
199
176
|
"tags": [],
|
|
200
177
|
"text": "translation via url"
|
|
201
178
|
},
|
|
202
|
-
"getter": false,
|
|
203
|
-
"setter": false,
|
|
204
179
|
"attribute": "translation-url",
|
|
205
180
|
"reflect": false,
|
|
206
181
|
"defaultValue": "''"
|
|
@@ -225,15 +200,3 @@ export class MiniGamesLobby {
|
|
|
225
200
|
}];
|
|
226
201
|
}
|
|
227
202
|
}
|
|
228
|
-
__decorate([
|
|
229
|
-
Locale(),
|
|
230
|
-
__metadata("design:type", String)
|
|
231
|
-
], MiniGamesLobby.prototype, "language", void 0);
|
|
232
|
-
__decorate([
|
|
233
|
-
Style(),
|
|
234
|
-
__metadata("design:type", String)
|
|
235
|
-
], MiniGamesLobby.prototype, "clientStyling", void 0);
|
|
236
|
-
__decorate([
|
|
237
|
-
Style(),
|
|
238
|
-
__metadata("design:type", String)
|
|
239
|
-
], MiniGamesLobby.prototype, "clientStylingUrl", void 0);
|