@everymatrix/casino-header-controller 1.44.0 → 1.45.2

Sign up to get free protection for your applications and to get access to all the features.
package/documentation.md DELETED
@@ -1,146 +0,0 @@
1
- # Casino Header widget Documentation
2
- ## About the Casino Header widget
3
- ### Intro to the Casino Header
4
- The Casino Header widget is a collection of web components designed and developed to offer a complete and functional casino header. This widget offers ease of installation without compromising on the features a casino header should have.
5
-
6
- The widget is agnostic about the framework, library or programming language your current product is built on, while at the same time offering ease of integration for developers, and a sleek gateway to your site for your users.
7
-
8
- ### Progressive
9
- We like to call our Casino Header widget a "progressive" one since it can grow with your needs. If you just want a simple implementation our architecture and documentation will be there to help you achieve it in mere minutes.
10
-
11
- If you are looking for a bigger implementation into a much more mature product the Casino Header widget gives you a set of robust tools for using player sessions and more.
12
-
13
- ### Scalability
14
- The Casino Header widget scales with you. Although the scalability is mainly accomplished by your main product (the one you integrate this widget into) and by your architecture we took all the necessary steps and precautions to ensure the uninterrupted functionality of this product.
15
-
16
- ### Stateless
17
- In the development of this widget we considered that the widget should not care about any kind of state a container product (the product this widget is integrated into) might have nor that the widget itself should have any kind of state management.
18
-
19
- We took this decision in order to ensure maximum integration compatibility as well as infinite scalability. By not sharing or having a state our widgets can be used as a main widget (like the Casino Lobby) or as singular components (such as the Casino Header) wherever you want to place them.
20
-
21
- The Casino Header makes use of the following sub-widgets:
22
- - Casino Slider component
23
- - Banner component
24
-
25
- These components can also be used on their own, and they still can communicate to each other even if they are structurally placed in separate parts of your application (they still need to be on the same page).
26
-
27
- For the first component, the Casino Header widget passes on the `sliderdata` attribute part of the data retrived from the `cmsmenuurl` (the one corresponding to the main menu). The Banner component still needs to be integrated.
28
- ---
29
-
30
- ## Pre-requisites needed
31
-
32
- For the Casino Header Widget to be able to work, the parent website needs to integrated with the EM platform.
33
-
34
- Supported integrations:
35
- - NorWAy Integration
36
- - CE Integration
37
-
38
- For further information on how to proceed with your current integration please contact your assigned Integration Manager.
39
-
40
- ## Setup the widget on your website.
41
-
42
- To install the latest version released for the widget, which will be automatically updated once a new release is made, add the following script tag, in the root page of your application.
43
-
44
- The script can be added either in the <head> or in the <body>. We recommend adding it in the footer of the page for better performance of the entire website.
45
-
46
- ```javascript
47
- <script src="https://unpkg.com/@everymatrix/casino-header-controller/dist/casino-header-controller.js"></script>
48
- ```
49
-
50
- For a specific version, the script tag looks like this:
51
- ```javascript
52
- <script src="https://unpkg.com/@everymatrix/casino-header-controller@1.0.0/dist/casino-header-controller.js"></script>
53
- ```
54
- ## Usage
55
-
56
- Adding the Casino Header Widget is straight forward, with the mention that there are a multitude of options and configurations available.
57
-
58
- If the user is `not logged in`, inside your page you need to add the webcomponent tag for the `Casino Header Widget`.
59
-
60
- ```html
61
- <casino-header-controller
62
- cmsmenuurl="cmsURL"
63
- cmshamburgermenuurl="cmsHamburgerMenuURL"
64
- lang="en"
65
- ></casino-header-controller>
66
- ```
67
-
68
- Once the user is `logged in`, there are 2 options to render the widget:
69
- 1. The tag can be updated as the following:
70
- ```html
71
- <casino-header-controller
72
- session="{SESSION_ID}"
73
- userid="{USER_ID}"
74
- cmsmenuurl="cmsURL"
75
- cmshamburgermenuurl="cmsHamburgerMenuURL"
76
- lang="en"
77
- ></casino-header-controller>
78
- ```
79
-
80
- 2. The widget can be notified via `window.postMessage()` method (more details here - https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage):
81
- ```javascript
82
- window.postMessage({
83
- type: 'UserSessionID',
84
- session: {SESSION_ID},
85
- userid: {USER_ID}
86
- });
87
- ```
88
-
89
- Full example below for `not logged in user`:
90
-
91
- ```html
92
- <!doctype html>
93
- <html lang="en">
94
- <head>
95
- <meta charset="UTF-8">
96
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
97
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
98
- <title>EM Widgets | Casino Header Widget Demo</title>
99
-
100
- <script src="https://unpkg.com/@everymatrix/casino-header-controller/dist/casino-header-controller.js"></script>
101
-
102
- </head>
103
- <body>
104
- <div class="container">
105
- <casino-header-controller
106
- cmsmenuurl="cmsURL"
107
- cmshamburgermenuurl="cmsHamburgerMenuURL"
108
- lang="en"
109
- loginevent="OpenLoginRegisterModal"
110
- registerevent="OpenLoginRegisterModal"
111
- depositevent="OpenDepositModal"
112
- favorites="true"
113
- mostplayed="true"
114
- ></casino-header-controller>
115
- </div>
116
- </body>
117
- </html>
118
- ```
119
- > **_PLEASE NOTE:_** The given example is a fully working HTML page and demo credentials are used for ```endpoint``` field. For development and productions purposes you will need to use your own provided credentials.
120
-
121
- ## Communication between widgets
122
- |Type|Message data|Comment|
123
- |---------|---------|-----|
124
- |UserSessionID|playerID, sessionID|receives the login credentials|
125
- |LogoutSuccessfull|no extra data received|receives the trigger to switch content for the logout state|
126
- |OpenHamburgerMenuModal|no extra data sent|triggers the displaying of the `Hamburger Menu`|
127
- |CloseHamburgerMenu|no extra data received|switches back to the `Casino Header` widget|
128
- |PlayerAccountMenuActive|no extra data sent|triggers the displaying of the `Player Account Controller`|
129
- |OpenLoginRegisterModal|login|sends a postmessage containing a boolean based on which it opens the login/register modal - either on the login or register tab|
130
- |LanguageChanged|selectedLanguage|sends a postmessage containing the new language preference|
131
-
132
- ## API Reference
133
- |Parameter|Mandatory|Comment|
134
- |---------|---------|-------|
135
- |cmsmenuurl|yes|menu items CMS endpoint|
136
- |cmshamburgermenuurl|no|hamburger menu items CMS endpoint|
137
- |lang|yes|Language of the website|
138
- |session|no|EM SessionID of the logged in user|
139
- |opsession|no|Operator SessionID of the logged in user|
140
- |userid|no|EM UserID of the logged in user|
141
-
142
- ## Releases
143
-
144
- |Release Version|Value |Scope|Status|Completed Date|
145
- |---------------|----- |-----|------|--------------|
146
- |`0.0.42` |Initial release| - |*DONE*|`04 Aug 2021` |
package/index.html DELETED
@@ -1,48 +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>
8
- casino-header-controller
9
- </title>
10
- <link rel="stylesheet" href="public/reset.css">
11
-
12
- <script src='dist/casino-header-controller.js'></script>
13
- </head>
14
-
15
- <body>
16
- <style>
17
- html,body { margin: 0; padding: 0; height: 100%; font-family: "Helvetica Neue", "Helvetica", sans-serif; }
18
- .header { display: flex; justify-content: center; align-items: center; padding: 10px 20px; margin-bottom: 20px; background: #42a3e2; box-shadow: 3px 4px 5px 0px rgba(0,0,0, .2); }
19
- .header__logo svg { height: 50px; width: 50px; margin-right: 5px; }
20
- .header__name { color: #fff; }
21
- .header__name span { margin-right: 10px; font-weight: bold; }
22
- </style>
23
-
24
- <div class="webcomponent">
25
- <casino-header-controller _ngcontent-mup-c29="" session="01347826-ed6c-4305-80c7-1dab6b2fc151" userid="3920216"
26
- userroles="everyone,loggedIn,TestDemoCosmin" cmsendpoint="https://wt1-stage.everymatrix.com/apijson" env="stage"
27
- lang="en" languageslist="es,en,ro" endpoint="https://demo-api.stage.norway.everymatrix.com/v1"
28
- actionevent="HeaderMenuItemClicked" activecategory="/casino/RNG$new-sub-category$new-sub-category-1" clientstyling="
29
- .HeaderWrapper{
30
- position: fixed;
31
- top: 0;
32
- left: 0;
33
- right: 0;
34
- z-index: 99;
35
- }
36
-
37
- .HeaderMobileWrapper {
38
- .HeaderContainer {
39
- height: 55px;
40
- }
41
- }
42
- " currencyseparator="." currencydecimal="," currencyprecision="2" gmversion="gmcore"
43
- countryflagheader="true" countryflaghamburger='true'customlocaleidentifier=""></casino-header-controller>
44
-
45
- </div>
46
-
47
- </body>
48
- </html>
package/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/casino-header-controller.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,67 +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
- import uglify from 'rollup-plugin-uglify';
10
- import image from '@rollup/plugin-image';
11
-
12
- const production = process.env.NODE_ENV == 'production';
13
- const dev = process.env.NODE_ENV == 'development';
14
-
15
- export default {
16
- input: 'src/index.ts',
17
- output: {
18
- sourcemap: true,
19
- format: 'umd',
20
- name: 'app',
21
- file: 'dist/casino-header-controller.js',
22
- },
23
- plugins: [
24
- svelte({
25
- preprocess: sveltePreprocess(),
26
- compilerOptions: {
27
- // @TODO check generate and hydratable
28
- // generate: 'ssr',
29
- // hydratable: true,
30
- // enable run-time checks when not in production
31
- customElement: true,
32
- dev: !production
33
- }
34
- }),
35
- image(),
36
- commonjs(),
37
- resolve({
38
- browser: true,
39
- dedupe: ['svelte']
40
- }),
41
- dev && serve({
42
- open: true,
43
- verbose: true,
44
- allowCrossOrigin: true,
45
- historyApiFallback: false,
46
- host: 'localhost',
47
- port: 5050,
48
- }),
49
- dev && livereload({ watch: ['', 'dist'] }),
50
- typescript({
51
- sourceMap: !production,
52
- inlineSources: !production,
53
- }),
54
- // If we're building for production (npm run build
55
- // instead of npm run dev), minify
56
- production &&
57
- terser({
58
- output: {
59
- comments: "all"
60
- },
61
- }),
62
- production && uglify.uglify()
63
- ],
64
- watch: {
65
- clearScreen: false
66
- }
67
- };