@everymatrix/casino-categories-providers 1.44.0 → 1.45.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/index.html DELETED
@@ -1,99 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width,initial-scale=1" />
6
-
7
- <title>casino-categories-providers</title>
8
- <link rel="stylesheet" href="public/reset.css" />
9
- <script src="dist/casino-categories-providers.js"></script>
10
- </head>
11
-
12
- <body>
13
- <style>
14
- html,
15
- body {
16
- margin: 0;
17
- padding: 0;
18
- height: 100%;
19
- font-family: "Helvetica Neue", "Helvetica", sans-serif;
20
- }
21
- .header {
22
- display: flex;
23
- justify-content: center;
24
- align-items: center;
25
- padding: 10px 20px;
26
- margin-bottom: 20px;
27
- background: #42a3e2;
28
- box-shadow: 3px 4px 5px 0px rgba(0, 0, 0, 0.2);
29
- }
30
- .header__logo svg {
31
- height: 50px;
32
- width: 50px;
33
- margin-right: 5px;
34
- }
35
- .header__name {
36
- color: #fff;
37
- }
38
- .header__name span {
39
- margin-right: 10px;
40
- font-weight: bold;
41
- }
42
- </style>
43
- <header class="header">
44
- <div class="header__logo">
45
- <svg
46
- xmlns="http://www.w3.org/2000/svg"
47
- width="161"
48
- height="132"
49
- viewBox="0 0 161 132"
50
- >
51
- <defs>
52
- <linearGradient x1="0%" y1="50%" y2="50%" id="a">
53
- <stop stop-color="#2A3B8F" offset="0%" />
54
- <stop stop-color="#29ABE2" offset="100%" />
55
- </linearGradient>
56
- <linearGradient x1="100%" y1="50%" x2="0%" y2="50%" id="c">
57
- <stop stop-color="#B4D44E" offset="0%" />
58
- <stop stop-color="#E7F716" offset="100%" />
59
- </linearGradient>
60
- </defs>
61
- <g fill="none" fill-rule="evenodd">
62
- <path
63
- fill="#166DA5"
64
- d="M160.6 65.9l-17.4 29.3-24.4-29.7 24.4-28.9z"
65
- />
66
- <path
67
- fill="#8FDB69"
68
- d="M141.3 100.2l-26.5-31.7-15.9 26.6 24.7 36.1z"
69
- />
70
- <path fill="#166DA5" d="M141 31.4l-26.2 31.8-15.9-26.6L123.6.9z" />
71
- <path
72
- fill="url(#a)"
73
- opacity=".95"
74
- d="M61.1 31.4H141L123.4.7H78.7z M114.8 63.3H159l-15.9-26.8H98.8"
75
- />
76
- <path
77
- fill="url(#c)"
78
- opacity=".95"
79
- d="M141.3 100.3H61l17.6 30.5h45z M114.8 68.4H159l-15.9 26.8H98.8"
80
- />
81
- <path
82
- fill="#010101"
83
- d="M78.6 130.8L41 65.8 79.1.8H37.9L.4 65.8l37.5 65z"
84
- />
85
- </g>
86
- </svg>
87
- </div>
88
- <h1 class="header__name">
89
- <span>WEBCOMPONENT:</span> casino-categories-providers
90
- </h1>
91
- </header>
92
-
93
- <casino-categories-providers
94
- endpointcategories="https://demo-api.stage.norway.everymatrix.com/v2/casino/groups/"
95
- datasourcecategories="RNG"
96
- activecategory="RNG$popular-games"
97
- ></casino-categories-providers>
98
- </body>
99
- </html>
package/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/casino-categories-providers.js';
Binary file
package/public/reset.css DELETED
@@ -1,48 +0,0 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- v2.0 | 20110126
3
- License: none (public domain)
4
- */
5
-
6
- html, body, div, span, applet, object, iframe,
7
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8
- a, abbr, acronym, address, big, cite, code,
9
- del, dfn, em, img, ins, kbd, q, s, samp,
10
- small, strike, strong, sub, sup, tt, var,
11
- b, u, i, center,
12
- dl, dt, dd, ol, ul, li,
13
- fieldset, form, label, legend,
14
- table, caption, tbody, tfoot, thead, tr, th, td,
15
- article, aside, canvas, details, embed,
16
- figure, figcaption, footer, header, hgroup,
17
- menu, nav, output, ruby, section, summary,
18
- time, mark, audio, video {
19
- margin: 0;
20
- padding: 0;
21
- border: 0;
22
- font-size: 100%;
23
- font: inherit;
24
- vertical-align: baseline;
25
- }
26
- /* HTML5 display-role reset for older browsers */
27
- article, aside, details, figcaption, figure,
28
- footer, header, hgroup, menu, nav, section {
29
- display: block;
30
- }
31
- body {
32
- line-height: 1;
33
- }
34
- ol, ul {
35
- list-style: none;
36
- }
37
- blockquote, q {
38
- quotes: none;
39
- }
40
- blockquote:before, blockquote:after,
41
- q:before, q:after {
42
- content: '';
43
- content: none;
44
- }
45
- table {
46
- border-collapse: collapse;
47
- border-spacing: 0;
48
- }
package/rollup.config.js DELETED
@@ -1,59 +0,0 @@
1
- import svelte from 'rollup-plugin-svelte';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import resolve from '@rollup/plugin-node-resolve';
4
- import serve from 'rollup-plugin-dev-server';
5
- import livereload from 'rollup-plugin-livereload';
6
- import { terser } from 'rollup-plugin-terser';
7
- import sveltePreprocess from 'svelte-preprocess';
8
- import typescript from '@rollup/plugin-typescript';
9
- const production = process.env.NODE_ENV === 'production';
10
- const dev = process.env.NODE_ENV === 'development';
11
-
12
- export default {
13
- input: 'src/index.ts',
14
- output: {
15
- sourcemap: true,
16
- format: 'umd',
17
- name: 'app',
18
- file: 'dist/casino-categories-providers.js'
19
- },
20
- plugins: [
21
- svelte({
22
- preprocess: sveltePreprocess(),
23
- compilerOptions: {
24
- // enable run-time checks when not in production
25
- customElement: true,
26
- dev: !production
27
- }
28
- }),
29
- commonjs(),
30
- resolve({
31
- browser: true,
32
- dedupe: ['svelte']
33
- }),
34
- dev && serve({
35
- open: true,
36
- verbose: true,
37
- allowCrossOrigin: true,
38
- historyApiFallback: false,
39
- host: 'localhost',
40
- port: 5050,
41
- }),
42
- dev && livereload({ watch: ['', 'dist'] }),
43
- typescript({
44
- sourceMap: !production,
45
- inlineSources: !production,
46
- }),
47
- // If we're building for production (npm run build
48
- // instead of npm run dev), minify
49
- production &&
50
- terser({
51
- output: {
52
- comments: "all"
53
- },
54
- })
55
- ],
56
- watch: {
57
- clearScreen: false
58
- }
59
- };
@@ -1,166 +0,0 @@
1
- <svelte:options tag={null} />
2
- <script lang="ts">
3
-
4
- import { _, addNewMessages, setLocale } from './i18n';
5
- import { TRANSLATIONS } from './translations';
6
- import '@everymatrix/casino-categories';
7
- import '@everymatrix/casino-providers';
8
-
9
- export let endpointcategories:string = '';
10
- export let datasourcecategories:string = '';
11
- export let activecategory:string = '';
12
- export let endpointproviders:string = '';
13
- export let datasourceproviders:string = '';
14
- export let excludedflags:string = '';
15
- export let lang:string = 'en';
16
- export let clientstyling:string = '';
17
- export let clientstylingurl:string = '';
18
- export let translationurl:string = '';
19
-
20
- let activeTab:string='categories';
21
- let customStylingContainer:HTMLElement;
22
- let displayNone:boolean = false;
23
-
24
- const setTranslationUrl = ():void => {
25
- let url:string = translationurl;
26
-
27
- fetch(url).then((res:any) => res.json())
28
- .then((res) => {
29
- Object.keys(res).forEach((item:any):void => {
30
- addNewMessages(item, res[item]);
31
- });
32
- }).catch((err:any) => {
33
- console.log(err);
34
- });
35
- }
36
-
37
- Object.keys(TRANSLATIONS).forEach((item:any):void => {
38
- addNewMessages(item, TRANSLATIONS[item]);
39
- });
40
-
41
- const toggleTab = (type:string):void => {
42
- if(activeTab === type) return;
43
- activeTab = type;
44
- }
45
-
46
- const setActiveLanguage = ():void => {
47
- setLocale(lang);
48
- }
49
-
50
- const setClientStyling = ():void => {
51
- let sheet = document.createElement('style');
52
- sheet.innerHTML = clientstyling;
53
- customStylingContainer.appendChild(sheet);
54
- }
55
-
56
- const setClientStylingURL = ():void => {
57
- displayNone = true;
58
-
59
- let url:URL = new URL(clientstylingurl);
60
- let cssFile:HTMLElement = document.createElement('style');
61
-
62
- fetch(url.href)
63
- .then((res:any) => res.text())
64
- .then((data:any) => {
65
- cssFile.innerHTML = data;
66
-
67
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
68
- setTimeout(() => { displayNone = false; }, 500);
69
- });
70
- }
71
-
72
- $: translationurl && setTranslationUrl();
73
- $: lang && setActiveLanguage();
74
- $: clientstyling && customStylingContainer && setClientStyling();
75
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
76
- </script>
77
-
78
- <div bind:this={customStylingContainer}>
79
- <div class="CasinoCategoriesProviders">
80
- <div class="Header">
81
- <button on:click={() => toggleTab('categories')} class="HeaderButton {activeTab === 'categories' ? 'Active': ''}">
82
- {$_('categories')}
83
- </button>
84
- <button on:click={() => toggleTab('providers')} class="HeaderButton {activeTab === 'providers' ? 'Active': ''}">
85
- {$_('providers')}
86
- </button>
87
- </div>
88
-
89
- <div class="{activeTab === 'providers' ? 'NotVisible': ''}">
90
- <casino-categories
91
- endpoint={endpointcategories}
92
- datasource={datasourcecategories}
93
- activecategory={activecategory}
94
- {excludedflags}
95
- lang={lang}
96
- {clientstyling}
97
- {clientstylingurl}
98
- ></casino-categories>
99
- </div>
100
- <div class="{activeTab === 'categories' ? 'NotVisible': ''}">
101
- <casino-providers
102
- endpoint={endpointproviders}
103
- datasource={datasourceproviders}
104
- lang={lang}
105
- {clientstyling}
106
- {clientstylingurl}
107
- ></casino-providers>
108
- </div>
109
- </div>
110
- </div>
111
-
112
- <style lang="scss">
113
- *,
114
- *::before,
115
- *::after {
116
- margin: 0;
117
- padding: 0;
118
- box-sizing: border-box;
119
- }
120
-
121
- .NotVisible {
122
- display: none;
123
- }
124
-
125
- .CasinoCategoriesProviders {
126
- background-color: var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));
127
- }
128
-
129
- .Header {
130
- display: flex;
131
- max-width: 100%;
132
- min-width: 320px;
133
- margin-bottom: 14px;
134
- font-size: 18px;
135
- background-color: var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));
136
-
137
- &Button {
138
- flex: 1 2 0;
139
- min-height: 48px;
140
- margin: 0;
141
- border: none;
142
- color: var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF));
143
- background-color: var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));
144
- box-shadow: 1px 2px 2px rgba(var(--emfe-w-color-gray-150, #828282), 0.1);
145
-
146
- &.Active{
147
- box-shadow: none;
148
- border-bottom: 2px solid var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
149
- color: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
150
- }
151
- }
152
- }
153
-
154
-
155
- // .HeaderButton {
156
- // background-color: #07072A;
157
- // color: #58586B;
158
- //
159
- // }
160
-
161
- // .HeaderButton.Active {
162
- // border-bottom: 2px solid #D0046C;
163
- // color: #D0046C;
164
- // }
165
-
166
- </style>
package/src/i18n.js DELETED
@@ -1,27 +0,0 @@
1
- import {
2
- dictionary,
3
- locale,
4
- addMessages,
5
- _
6
- } from 'svelte-i18n';
7
-
8
- function setupI18n({ withLocale: _locale, translations }) {
9
- locale.subscribe((data) => {
10
- if (data == null) {
11
- dictionary.set(translations);
12
- locale.set(_locale);
13
- }
14
- }); // maybe we will need this to make sure that the i18n is set up only once
15
- /*dictionary.set(translations);
16
- locale.set(_locale);*/
17
- }
18
-
19
- function addNewMessages(lang, dict) {
20
- addMessages(lang, dict);
21
- }
22
-
23
- function setLocale(_locale) {
24
- locale.set(_locale);
25
- }
26
-
27
- export { _, setupI18n, addNewMessages, setLocale };
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import CasinoCategoriesProviders from './CasinoCategoriesProviders.svelte';
2
-
3
- !customElements.get('casino-categories-providers') && customElements.define('casino-categories-providers', CasinoCategoriesProviders);
4
- export default CasinoCategoriesProviders;
@@ -1,70 +0,0 @@
1
- export const TRANSLATIONS = {
2
- "en": {
3
- "categories": "Categories",
4
- "providers": "Suppliers"
5
- },
6
- "zh-hk": {
7
- "categories": "类别",
8
- "providers": "供应商"
9
- },
10
- "de": {
11
- "categories": "Kategorien",
12
- "providers": "Anbieter"
13
- },
14
- "it": {
15
- "categories": "Categories",
16
- "providers": "Suppliers"
17
- },
18
- "fr": {
19
- "categories": "Catégories",
20
- "providers": "Fournisseurs"
21
- },
22
- "es": {
23
- "categories": "Categorias",
24
- "providers": "Proveedores"
25
- },
26
- "tr": {
27
- "categories": "Kategoriler",
28
- "providers": "Tedarikçiler"
29
- },
30
- "ru": {
31
- "categories": "Categories",
32
- "providers": "Suppliers"
33
- },
34
- "ro": {
35
- "categories": "Categorii",
36
- "providers": "Furnizori"
37
- },
38
- "hr": {
39
- "categories": "Kategorije",
40
- "providers": "Provideri"
41
- },
42
- "hu": {
43
- "categories": "Categories",
44
- "providers": "Suppliers"
45
- },
46
- "pl": {
47
- "categories": "Categories",
48
- "providers": "Suppliers"
49
- },
50
- "pt": {
51
- "categories": "Categories",
52
- "providers": "Suppliers"
53
- },
54
- "sl": {
55
- "categories": "Categories",
56
- "providers": "Suppliers"
57
- },
58
- "sr": {
59
- "categories": "Categories",
60
- "providers": "Suppliers"
61
- },
62
- "pt-br": {
63
- "categories": "Categorias",
64
- "providers": "Provedores"
65
- },
66
- "es-mx": {
67
- "categories": "Categorias",
68
- "providers": "Proveedores"
69
- }
70
- }
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import CasinoCategoriesProviders from '../src/CasinoCategoriesProviders';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'CasinoCategoriesProviders',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const CasinoCategoriesProviders = ({ aProperty }) => html`<casino-categories-providers></casino-categories-providers>`;
12
-
13
- export const FirstStory = CasinoCategoriesProviders.bind({});
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "@tsconfig/svelte/tsconfig.json",
3
-
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
6
- }