@everymatrix/casino-search 0.0.345 → 0.0.347
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/casino-search.js +199 -100
- package/dist/casino-search.js.map +1 -1
- package/package.json +2 -2
- package/src/CasinoSearch.svelte +31 -18
- package/src/translations.js +41 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-search",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.347",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "442a3c22302f7e8a4c7bd9e735f560f5438e32f2"
|
|
40
40
|
}
|
package/src/CasinoSearch.svelte
CHANGED
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
sendSearchStatus(searchActive);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
const getGames = (url:URL):Promise<any> => {
|
|
@@ -153,6 +154,8 @@
|
|
|
153
154
|
isLoading = false;
|
|
154
155
|
searchArray = [];
|
|
155
156
|
searchActive = false;
|
|
157
|
+
|
|
158
|
+
sendSearchStatus(searchActive);
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
const clearSearch = ():void => {
|
|
@@ -160,6 +163,12 @@
|
|
|
160
163
|
searchElement.focus();
|
|
161
164
|
}
|
|
162
165
|
|
|
166
|
+
// --- Communication with other widgets
|
|
167
|
+
|
|
168
|
+
const sendSearchStatus = (searchStatus):void => {
|
|
169
|
+
window.postMessage({ type: searchStatus === true ? 'searchActive' : 'searchCancelled', searchStatus});
|
|
170
|
+
};
|
|
171
|
+
|
|
163
172
|
const setActiveLanguage = ():void => {
|
|
164
173
|
setLocale(lang);
|
|
165
174
|
}
|
|
@@ -244,10 +253,15 @@
|
|
|
244
253
|
{:else}
|
|
245
254
|
{#if searchActive == true && searchValue.length < 2}
|
|
246
255
|
<p class="SearchMessage">{$_('Translations.recentSearch')}</p>
|
|
256
|
+
{#if searchArray.length == 0}
|
|
257
|
+
<div class="ResultsContainerError">
|
|
258
|
+
<p class="SearchMessage">{$_('Translations.noRecentSearches')}</p>
|
|
259
|
+
</div>
|
|
260
|
+
{/if}
|
|
247
261
|
{:else if searchArray.length != 0}
|
|
248
262
|
<p class="SearchMessage">{$_('Translations.searchResult')}</p>
|
|
249
263
|
{/if}
|
|
250
|
-
<div class="SearchResultsContainer">
|
|
264
|
+
<div class="SearchResultsContainer {searchActive == true ? '': 'NotVisible'}">
|
|
251
265
|
{#if searchCancelled === false}
|
|
252
266
|
{#each searchArray as game}
|
|
253
267
|
<casino-game-thumbnail
|
|
@@ -299,10 +313,6 @@
|
|
|
299
313
|
box-sizing: border-box;
|
|
300
314
|
}
|
|
301
315
|
|
|
302
|
-
.NotVisible {
|
|
303
|
-
display: none;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
316
|
.CasinoSearch {
|
|
307
317
|
margin: 16px;
|
|
308
318
|
}
|
|
@@ -385,18 +395,21 @@
|
|
|
385
395
|
grid-auto-columns: $grid-cell-size;
|
|
386
396
|
grid-auto-flow: row dense;
|
|
387
397
|
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.ResultsContainerError {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.ResultsContainerError {
|
|
401
|
+
text-align: center;
|
|
402
|
+
width: 300px;
|
|
403
|
+
color: $color-grey;
|
|
404
|
+
font-weight: 300;
|
|
405
|
+
position: absolute;
|
|
406
|
+
top: 50%;
|
|
407
|
+
left: 50%;
|
|
408
|
+
transform: translate(-50%, -50%);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.NotVisible {
|
|
412
|
+
display: none;
|
|
413
|
+
}
|
|
401
414
|
|
|
402
415
|
</style>
|
package/src/translations.js
CHANGED
|
@@ -2,84 +2,91 @@ export const Translations = {
|
|
|
2
2
|
en: {
|
|
3
3
|
Translations: {
|
|
4
4
|
recentSearch: "Recent search",
|
|
5
|
-
loading:
|
|
5
|
+
loading: "Loading, please wait",
|
|
6
6
|
searchResult: "Search result",
|
|
7
7
|
cancel: "Cancel",
|
|
8
8
|
notFound: "Game not found!",
|
|
9
9
|
notFoundText:
|
|
10
10
|
"Please type the correct name of the game to start to play.",
|
|
11
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
11
12
|
},
|
|
12
13
|
},
|
|
13
14
|
de: {
|
|
14
15
|
Translations: {
|
|
15
|
-
recentSearch: "
|
|
16
|
-
loading:
|
|
17
|
-
searchResult: "
|
|
18
|
-
cancel: "
|
|
19
|
-
notFound: "
|
|
20
|
-
notFoundText:
|
|
21
|
-
|
|
16
|
+
recentSearch: "Kürzlich gesucht",
|
|
17
|
+
loading: "Es lädt, bitte warten...",
|
|
18
|
+
searchResult: "Suchresultat",
|
|
19
|
+
cancel: "Verwerfen",
|
|
20
|
+
notFound: "Spiel wurde nicht gefunden!",
|
|
21
|
+
notFoundText: "Bitte den korrekten Spielnamen eingeben um zu spielen",
|
|
22
|
+
noRecentSearches:
|
|
23
|
+
"Suche ohne Ergebnisse. Bitte erneut nach einem unserer Spiele suchen.",
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
26
|
it: {
|
|
25
27
|
Translations: {
|
|
26
28
|
recentSearch: "Recent search",
|
|
27
|
-
loading:
|
|
29
|
+
loading: "Loading, please wait",
|
|
28
30
|
searchResult: "Search result",
|
|
29
31
|
cancel: "Cancel",
|
|
30
32
|
notFound: "Game not found!",
|
|
31
33
|
notFoundText:
|
|
32
34
|
"Please type the correct name of the game to start to play.",
|
|
35
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
33
36
|
},
|
|
34
37
|
},
|
|
35
38
|
fr: {
|
|
36
39
|
Translations: {
|
|
37
40
|
recentSearch: "Recent search",
|
|
38
|
-
loading:
|
|
41
|
+
loading: "Loading, please wait",
|
|
39
42
|
searchResult: "Search result",
|
|
40
43
|
cancel: "Cancel",
|
|
41
44
|
notFound: "Game not found!",
|
|
42
45
|
notFoundText:
|
|
43
46
|
"Please type the correct name of the game to start to play.",
|
|
47
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
44
48
|
},
|
|
45
49
|
},
|
|
46
50
|
es: {
|
|
47
51
|
Translations: {
|
|
48
52
|
recentSearch: "Recent search",
|
|
49
|
-
loading:
|
|
53
|
+
loading: "Loading, please wait",
|
|
50
54
|
searchResult: "Search result",
|
|
51
55
|
cancel: "Cancel",
|
|
52
56
|
notFound: "Game not found!",
|
|
53
57
|
notFoundText:
|
|
54
58
|
"Please type the correct name of the game to start to play.",
|
|
59
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
55
60
|
},
|
|
56
61
|
},
|
|
57
62
|
gr: {
|
|
58
63
|
Translations: {
|
|
59
64
|
recentSearch: "Recent search",
|
|
60
|
-
loading:
|
|
65
|
+
loading: "Loading, please wait",
|
|
61
66
|
searchResult: "Search result",
|
|
62
67
|
cancel: "Cancel",
|
|
63
68
|
notFound: "Game not found!",
|
|
64
69
|
notFoundText:
|
|
65
70
|
"Please type the correct name of the game to start to play.",
|
|
71
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
66
72
|
},
|
|
67
73
|
},
|
|
68
74
|
tr: {
|
|
69
75
|
Translations: {
|
|
70
76
|
recentSearch: "Recent search",
|
|
71
|
-
loading:
|
|
77
|
+
loading: "Loading, please wait",
|
|
72
78
|
searchResult: "Search result",
|
|
73
79
|
cancel: "Cancel",
|
|
74
80
|
notFound: "Game not found!",
|
|
75
81
|
notFoundText:
|
|
76
82
|
"Please type the correct name of the game to start to play.",
|
|
83
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
77
84
|
},
|
|
78
85
|
},
|
|
79
86
|
ru: {
|
|
80
87
|
Translations: {
|
|
81
88
|
recentSearch: "Recent search",
|
|
82
|
-
loading:
|
|
89
|
+
loading: "Loading, please wait",
|
|
83
90
|
searchResult: "Search result",
|
|
84
91
|
cancel: "Cancel",
|
|
85
92
|
notFound: "Game not found!",
|
|
@@ -89,79 +96,86 @@ export const Translations = {
|
|
|
89
96
|
},
|
|
90
97
|
ro: {
|
|
91
98
|
Translations: {
|
|
92
|
-
recentSearch: "
|
|
93
|
-
loading:
|
|
94
|
-
searchResult: "
|
|
95
|
-
cancel: "
|
|
96
|
-
notFound: "
|
|
97
|
-
notFoundText:
|
|
98
|
-
|
|
99
|
+
recentSearch: "Cautari recente",
|
|
100
|
+
loading: "Se incarca, te rugam asteapta…",
|
|
101
|
+
searchResult: "Rezultat cautare",
|
|
102
|
+
cancel: "Anuleaza",
|
|
103
|
+
notFound: "Nu am gasit niciun rezultat!",
|
|
104
|
+
notFoundText: "Te rugam sa introduci corect numele jocului. ",
|
|
105
|
+
noRecentSearches:
|
|
106
|
+
"Nu sunt cautari recente. Cauta oricare din jocurile noastre.",
|
|
99
107
|
},
|
|
100
108
|
},
|
|
101
109
|
hr: {
|
|
102
110
|
Translations: {
|
|
103
111
|
recentSearch: "Recent search",
|
|
104
|
-
loading:
|
|
112
|
+
loading: "Loading, please wait",
|
|
105
113
|
searchResult: "Search result",
|
|
106
114
|
cancel: "Cancel",
|
|
107
115
|
notFound: "Game not found!",
|
|
108
116
|
notFoundText:
|
|
109
117
|
"Please type the correct name of the game to start to play.",
|
|
118
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
110
119
|
},
|
|
111
120
|
},
|
|
112
121
|
hu: {
|
|
113
122
|
Translations: {
|
|
114
123
|
recentSearch: "Recent search",
|
|
115
|
-
loading:
|
|
124
|
+
loading: "Loading, please wait",
|
|
116
125
|
searchResult: "Search result",
|
|
117
126
|
cancel: "Cancel",
|
|
118
127
|
notFound: "Game not found!",
|
|
119
128
|
notFoundText:
|
|
120
129
|
"Please type the correct name of the game to start to play.",
|
|
130
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
121
131
|
},
|
|
122
132
|
},
|
|
123
133
|
pl: {
|
|
124
134
|
Translations: {
|
|
125
135
|
recentSearch: "Recent search",
|
|
126
|
-
loading:
|
|
136
|
+
loading: "Loading, please wait",
|
|
127
137
|
searchResult: "Search result",
|
|
128
138
|
cancel: "Cancel",
|
|
129
139
|
notFound: "Game not found!",
|
|
130
140
|
notFoundText:
|
|
131
141
|
"Please type the correct name of the game to start to play.",
|
|
142
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
132
143
|
},
|
|
133
144
|
},
|
|
134
145
|
pt: {
|
|
135
146
|
Translations: {
|
|
136
147
|
recentSearch: "Recent search",
|
|
137
|
-
loading:
|
|
148
|
+
loading: "Loading, please wait",
|
|
138
149
|
searchResult: "Search result",
|
|
139
150
|
cancel: "Cancel",
|
|
140
151
|
notFound: "Game not found!",
|
|
141
152
|
notFoundText:
|
|
142
153
|
"Please type the correct name of the game to start to play.",
|
|
154
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
143
155
|
},
|
|
144
156
|
},
|
|
145
157
|
sl: {
|
|
146
158
|
Translations: {
|
|
147
159
|
recentSearch: "Recent search",
|
|
148
|
-
loading:
|
|
160
|
+
loading: "Loading, please wait",
|
|
149
161
|
searchResult: "Search result",
|
|
150
162
|
cancel: "Cancel",
|
|
151
163
|
notFound: "Game not found!",
|
|
152
164
|
notFoundText:
|
|
153
165
|
"Please type the correct name of the game to start to play.",
|
|
166
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
154
167
|
},
|
|
155
168
|
},
|
|
156
169
|
sr: {
|
|
157
170
|
Translations: {
|
|
158
171
|
recentSearch: "Recent search",
|
|
159
|
-
loading:
|
|
172
|
+
loading: "Loading, please wait",
|
|
160
173
|
searchResult: "Search result",
|
|
161
174
|
cancel: "Cancel",
|
|
162
175
|
notFound: "Game not found!",
|
|
163
176
|
notFoundText:
|
|
164
177
|
"Please type the correct name of the game to start to play.",
|
|
178
|
+
noRecentSearches: "No recent searches yet. Search for any of our games.",
|
|
165
179
|
},
|
|
166
180
|
},
|
|
167
181
|
};
|