@everymatrix/casino-filter-page 1.0.3 → 1.0.8
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/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
export let lang:String = ''; // Language
|
|
12
12
|
export let session:String = ''; // Value for sessionID
|
|
13
13
|
export let userid:String = '';
|
|
14
|
-
export let clientstyling:
|
|
15
|
-
export let clientstylingurl:
|
|
14
|
+
export let clientstyling:string = '';
|
|
15
|
+
export let clientstylingurl:string = '';
|
|
16
16
|
|
|
17
17
|
let vendorsArray:Array<Object> = [];
|
|
18
18
|
let mobileView:Boolean = false;
|
|
@@ -252,23 +252,23 @@
|
|
|
252
252
|
window.postMessage({ type: "ApplyFilters"}, window.location.href);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
const setClientStyling = () => {
|
|
255
|
+
const setClientStyling = ():void => {
|
|
256
256
|
let sheet = document.createElement('style');
|
|
257
|
-
|
|
258
257
|
sheet.innerHTML = clientstyling;
|
|
259
258
|
customStylingContainer.appendChild(sheet);
|
|
260
259
|
}
|
|
261
260
|
|
|
262
|
-
const setClientStylingURL = () => {
|
|
261
|
+
const setClientStylingURL = ():void => {
|
|
262
|
+
let url:URL = new URL(clientstylingurl);
|
|
263
263
|
let cssFile:HTMLElement = document.createElement('style');
|
|
264
264
|
|
|
265
|
-
fetch(
|
|
265
|
+
fetch(url.href)
|
|
266
266
|
.then((res:any) => res.text())
|
|
267
267
|
.then((data:any) => {
|
|
268
268
|
cssFile.innerHTML = data
|
|
269
269
|
|
|
270
270
|
if (customStylingContainer) {
|
|
271
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile)
|
|
271
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
}
|
|
@@ -285,8 +285,8 @@
|
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
287
|
|
|
288
|
-
$: clientstyling && setClientStyling();
|
|
289
|
-
$: clientstylingurl && setClientStylingURL();
|
|
288
|
+
$: clientstyling && customStylingContainer && setClientStyling();
|
|
289
|
+
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
290
290
|
</script>
|
|
291
291
|
|
|
292
292
|
<div bind:this={customStylingContainer} part="CustomStylingContainer">
|