@everymatrix/lottery-program-wof 1.43.4 → 1.45.3
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/es2015/lottery-program-wof.cjs +1 -0
- package/es2015/lottery-program-wof.js +16 -0
- package/package.json +14 -37
- package/CHANGELOG.md +0 -12
- package/README.md +0 -30
- package/babel.config.js +0 -6
- package/dist/lottery-program-wof.js +0 -11886
- package/dist/lottery-program-wof.js.map +0 -1
- package/index.html +0 -42
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -61
- package/src/LotteryProgramWof.svelte +0 -214
- package/src/api/api.ts +0 -2016
- package/src/api/configuration.ts +0 -65
- package/src/api/custom.d.ts +0 -2
- package/src/api/index.ts +0 -15
- package/src/business.partition.ts +0 -98
- package/src/business.ts +0 -186
- package/src/calc.point.ts +0 -67
- package/src/calc.temp.ts +0 -29
- package/src/calc.ts +0 -28
- package/src/class.process.ts +0 -130
- package/src/class.spinable.ts +0 -60
- package/src/class.spinable.util.ts +0 -10
- package/src/class.spinner.ts +0 -176
- package/src/class.spinner.util.ts +0 -92
- package/src/class.svgcalc.ts +0 -249
- package/src/i18n.ts +0 -38
- package/src/images/Thankyou_1.svg +0 -100
- package/src/images/Thankyou_2.svg +0 -112
- package/src/images/Thankyou_3.svg +0 -87
- package/src/images/Thankyou_4.svg +0 -114
- package/src/images/gift.svg +0 -964
- package/src/images/theme.bg.blackring.svg +0 -10
- package/src/images/theme.bg.halo.svg +0 -27
- package/src/images/theme1Bg3.svg +0 -15
- package/src/images/theme2Arrow.svg +0 -24
- package/src/images/theme2Bg3.svg +0 -11
- package/src/images/theme2Center.svg +0 -36
- package/src/images/theme3Arrow.svg +0 -25
- package/src/images/theme3Bg1.svg +0 -29
- package/src/images/theme3Bg2.svg +0 -19
- package/src/images/theme3Center.svg +0 -77
- package/src/images/theme7Arrow.svg +0 -67
- package/src/images/theme7Bg1.svg +0 -786
- package/src/images/theme7Bg2.svg +0 -40
- package/src/images/theme7Bg3.svg +0 -26
- package/src/images/theme7Center.svg +0 -72
- package/src/images/theme7Light.svg +0 -17
- package/src/images/themeCenter1.svg +0 -76
- package/src/images/themeCenter2.svg +0 -58
- package/src/images/themePartitionLight.svg +0 -19
- package/src/images/themePointerArea.svg +0 -44
- package/src/images/themeShadow.svg +0 -27
- package/src/index.ts +0 -4
- package/src/message.ts +0 -28
- package/src/private.item.svelte +0 -172
- package/src/private.item.svg.scss +0 -302
- package/src/private.item.svg.svelte +0 -356
- package/src/private.loader.svelte +0 -61
- package/src/private.message.svelte +0 -236
- package/src/private.outcomes.svelte +0 -203
- package/src/private.tabs.svelte +0 -106
- package/src/themes.image.center.ts +0 -68
- package/src/themes.ts +0 -52
- package/src/translations.js +0 -218
- package/src/types.business.ts +0 -20
- package/src/types.ts +0 -79
- package/src/util.ts +0 -90
- package/src/widget.ts +0 -27
- package/stories/LotteryProgramWof.stories.js +0 -13
- package/svelte.config.js +0 -7
- package/tsconfig.json +0 -11
package/index.html
DELETED
|
@@ -1,42 +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
|
-
lottery-program-wof
|
|
9
|
-
</title>
|
|
10
|
-
<link rel="stylesheet" href="public/reset.css">
|
|
11
|
-
<script src='dist/lottery-program-wof.js'></script>
|
|
12
|
-
</head>
|
|
13
|
-
|
|
14
|
-
<body>
|
|
15
|
-
<style>
|
|
16
|
-
html,body { margin: 0; padding: 0; height: 100%; font-family: "Helvetica Neue", "Helvetica", sans-serif; }
|
|
17
|
-
.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); }
|
|
18
|
-
.header__logo svg { height: 50px; width: 50px; margin-right: 5px; }
|
|
19
|
-
.header__name { color: #fff; }
|
|
20
|
-
.header__name span { margin-right: 10px; font-weight: bold; }
|
|
21
|
-
.webcomponent { padding: 10px 20px; }
|
|
22
|
-
</style>
|
|
23
|
-
<header class="header">
|
|
24
|
-
<div class="header__logo">
|
|
25
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="161" height="132" viewBox="0 0 161 132"><defs><linearGradient x1="0%" y1="50%" y2="50%" id="a"><stop stop-color="#2A3B8F" offset="0%"/><stop stop-color="#29ABE2" offset="100%"/></linearGradient><linearGradient x1="100%" y1="50%" x2="0%" y2="50%" id="c"><stop stop-color="#B4D44E" offset="0%"/><stop stop-color="#E7F716" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="#166DA5" d="M160.6 65.9l-17.4 29.3-24.4-29.7 24.4-28.9z"/><path fill="#8FDB69" d="M141.3 100.2l-26.5-31.7-15.9 26.6 24.7 36.1z"/><path fill="#166DA5" d="M141 31.4l-26.2 31.8-15.9-26.6L123.6.9z"/><path fill="url(#a)" opacity=".95" d="M61.1 31.4H141L123.4.7H78.7z M114.8 63.3H159l-15.9-26.8H98.8"/><path fill="url(#c)" opacity=".95" d="M141.3 100.3H61l17.6 30.5h45z M114.8 68.4H159l-15.9 26.8H98.8"/><path fill="#010101" d="M78.6 130.8L41 65.8 79.1.8H37.9L.4 65.8l37.5 65z"/></g></svg>
|
|
26
|
-
</div>
|
|
27
|
-
<h1 class="header__name">
|
|
28
|
-
<span>WEBCOMPONENT:</span> lottery-program-wof
|
|
29
|
-
</h1>
|
|
30
|
-
</header>
|
|
31
|
-
|
|
32
|
-
<div class="webcomponent">
|
|
33
|
-
<lottery-program-wof
|
|
34
|
-
endpoint="http://jetbull.wofapi.stage.everymatrix.local/v1"
|
|
35
|
-
session="1b0e37c6-7234-47fb-8602-8422094faa8e"
|
|
36
|
-
spinduration="3"
|
|
37
|
-
spinrotation="3"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './dist/lottery-program-wof.js';
|
package/public/favicon.png
DELETED
|
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,61 +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 image from '@rollup/plugin-image';
|
|
10
|
-
const production = process.env.NODE_ENV === 'production';
|
|
11
|
-
const dev = process.env.NODE_ENV === 'development';
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
input: 'src/index.ts',
|
|
15
|
-
output: {
|
|
16
|
-
sourcemap: true,
|
|
17
|
-
format: 'umd',
|
|
18
|
-
name: 'app',
|
|
19
|
-
file: 'dist/lottery-program-wof.js'
|
|
20
|
-
},
|
|
21
|
-
plugins: [
|
|
22
|
-
svelte({
|
|
23
|
-
preprocess: sveltePreprocess(),
|
|
24
|
-
compilerOptions: {
|
|
25
|
-
// enable run-time checks when not in production
|
|
26
|
-
customElement: true,
|
|
27
|
-
dev: !production
|
|
28
|
-
}
|
|
29
|
-
}),
|
|
30
|
-
image(),
|
|
31
|
-
commonjs(),
|
|
32
|
-
resolve({
|
|
33
|
-
browser: true,
|
|
34
|
-
dedupe: ['svelte']
|
|
35
|
-
}),
|
|
36
|
-
dev && serve({
|
|
37
|
-
open: true,
|
|
38
|
-
verbose: true,
|
|
39
|
-
allowCrossOrigin: true,
|
|
40
|
-
historyApiFallback: false,
|
|
41
|
-
host: 'localhost',
|
|
42
|
-
port: 5050,
|
|
43
|
-
}),
|
|
44
|
-
dev && livereload({ watch: ['', 'dist'] }),
|
|
45
|
-
typescript({
|
|
46
|
-
sourceMap: !production,
|
|
47
|
-
inlineSources: !production,
|
|
48
|
-
}),
|
|
49
|
-
// If we're building for production (npm run build
|
|
50
|
-
// instead of npm run dev), minify
|
|
51
|
-
production &&
|
|
52
|
-
terser({
|
|
53
|
-
output: {
|
|
54
|
-
comments: "all"
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
],
|
|
58
|
-
watch: {
|
|
59
|
-
clearScreen: false
|
|
60
|
-
}
|
|
61
|
-
};
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import './private.message.svelte'
|
|
5
|
-
import './private.tabs.svelte'
|
|
6
|
-
import './private.outcomes.svelte'
|
|
7
|
-
import './private.item.svelte'
|
|
8
|
-
import './private.loader.svelte'
|
|
9
|
-
|
|
10
|
-
import { onMount } from 'svelte';
|
|
11
|
-
import { _, setLocale, setLocaleWhenInit } from './i18n';
|
|
12
|
-
|
|
13
|
-
// types
|
|
14
|
-
import { ContentDirection, Lang } from './types';
|
|
15
|
-
import { api, isBonusInvalid } from './business';
|
|
16
|
-
|
|
17
|
-
import { _postMessage, onMountMessageLifeCycle } from './message';
|
|
18
|
-
import { CurrentInfo, LotteryProgramForPlayer } from './types.business';
|
|
19
|
-
import { setClientStyling, setClientStylingURL, setTranslationUrl } from './widget';
|
|
20
|
-
|
|
21
|
-
// properties
|
|
22
|
-
export let lang: Lang = Lang.en
|
|
23
|
-
export let endpoint: string = ''
|
|
24
|
-
export let session: string = ''
|
|
25
|
-
export let clientstyling: string = ''
|
|
26
|
-
export let clientstylingurl: string = ''
|
|
27
|
-
export let translationurl: string = ''
|
|
28
|
-
export let programid: string = ''
|
|
29
|
-
export let loginevent: string = ''
|
|
30
|
-
export let loginurl: string = ''
|
|
31
|
-
export let currentinfo: CurrentInfo = CurrentInfo.RemainingTimes
|
|
32
|
-
export let giftimagesrc: string = ''
|
|
33
|
-
export let isshowhistory: string = 'true'
|
|
34
|
-
export let contentdirection: keyof typeof ContentDirection = 'anticlockwise'
|
|
35
|
-
|
|
36
|
-
let rootContainer: HTMLElement
|
|
37
|
-
$: clientstyling && rootContainer && setClientStyling(rootContainer, clientstyling);
|
|
38
|
-
$: clientstylingurl && rootContainer && setClientStylingURL(clientstylingurl, (_clientstyling) => clientstyling = _clientstyling);
|
|
39
|
-
$: translationurl && setTranslationUrl(translationurl);
|
|
40
|
-
|
|
41
|
-
$: commonProps = {
|
|
42
|
-
endpoint,
|
|
43
|
-
lang,
|
|
44
|
-
session,
|
|
45
|
-
clientstyling,
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let isMounted = false
|
|
49
|
-
$: isMounted && init()
|
|
50
|
-
onMount(() => {
|
|
51
|
-
isMounted = true
|
|
52
|
-
return () => isMounted = false
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
setLocaleWhenInit()
|
|
56
|
-
|
|
57
|
-
let bonuses: LotteryProgramForPlayer[] = []
|
|
58
|
-
let loading: boolean = true;
|
|
59
|
-
|
|
60
|
-
$: hasSession = session && session !== 'false'
|
|
61
|
-
|
|
62
|
-
const init = async () => {
|
|
63
|
-
loading = true
|
|
64
|
-
if(!hasSession) {
|
|
65
|
-
loginAction(loginevent, loginurl)
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if(!isMounted || !lang || !session || !endpoint) return;
|
|
70
|
-
|
|
71
|
-
loading = true
|
|
72
|
-
await fetcher()
|
|
73
|
-
loading = false
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const fetcher = async () => {
|
|
77
|
-
const _bonuses = await api.lotteries(endpoint, session)
|
|
78
|
-
|
|
79
|
-
_postMessage({ type: 'wof-private-bonuses-outcomes', bonuses: _bonuses })
|
|
80
|
-
|
|
81
|
-
bonuses =
|
|
82
|
-
_bonuses
|
|
83
|
-
.map(_bonus => {
|
|
84
|
-
if(!isBonusInvalid(_bonus)){
|
|
85
|
-
return _bonus
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
.filter(_bonus => _bonus)
|
|
89
|
-
|
|
90
|
-
_postMessage({ type: 'WofStatus', avaliable: bonuses.length > 0 })
|
|
91
|
-
_postMessage({ type: 'wof-private-bonuses', bonuses })
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const loginAction = (loginevent, loginurl) => {
|
|
95
|
-
if (loginevent) {
|
|
96
|
-
window.postMessage({ type: loginevent, transition: 'Login' }, window.location.href);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (loginurl) {
|
|
100
|
-
window.location = loginurl;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const setLangReactive = () => {
|
|
105
|
-
setLocale(lang)
|
|
106
|
-
init()
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
onMountMessageLifeCycle({
|
|
110
|
-
'wof-private-checking': (data) => {
|
|
111
|
-
if(isBonusInvalid(data.bonus)){
|
|
112
|
-
bonuses = bonuses.map(_bonus => {
|
|
113
|
-
if(_bonus.program.id === data.id){
|
|
114
|
-
return {..._bonus, hidden: true}
|
|
115
|
-
}else{
|
|
116
|
-
return _bonus
|
|
117
|
-
}
|
|
118
|
-
})
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let hidden = true
|
|
122
|
-
bonuses.map(_bonus => {
|
|
123
|
-
if(_bonus.hidden !== true){
|
|
124
|
-
hidden = false
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
if(hidden){
|
|
129
|
-
bonuses = []
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
$: session && init()
|
|
135
|
-
$: endpoint && init()
|
|
136
|
-
$: lang && setLangReactive()
|
|
137
|
-
|
|
138
|
-
</script>
|
|
139
|
-
|
|
140
|
-
<div class="WofContainer" bind:this={rootContainer}>
|
|
141
|
-
<lottery-program-wof-private-tabs {...commonProps} {isshowhistory}>
|
|
142
|
-
<div slot="tab-Program">
|
|
143
|
-
<div class="CommonContainer">
|
|
144
|
-
{#if loading}
|
|
145
|
-
<wof-loader />
|
|
146
|
-
{:else}
|
|
147
|
-
{#if bonuses.length}
|
|
148
|
-
{#each bonuses as bonus}
|
|
149
|
-
<lottery-program-wof-private-item {...{
|
|
150
|
-
...commonProps,
|
|
151
|
-
id: bonus.program.id,
|
|
152
|
-
currentinfo,
|
|
153
|
-
giftimagesrc,
|
|
154
|
-
contentdirection,
|
|
155
|
-
}} />
|
|
156
|
-
{/each}
|
|
157
|
-
{:else}
|
|
158
|
-
<div class="NoContent">
|
|
159
|
-
<p>{$_('wof.NoContent')}</p>
|
|
160
|
-
</div>
|
|
161
|
-
{/if}
|
|
162
|
-
{/if}
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
<div slot="tab-History">
|
|
166
|
-
<lottery-program-wof-private-outcomes {...{
|
|
167
|
-
...commonProps,
|
|
168
|
-
id: bonuses.find(_bonus => _bonus.program.id === programid)?.program.id,
|
|
169
|
-
}} />
|
|
170
|
-
</div>
|
|
171
|
-
</lottery-program-wof-private-tabs>
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<style lang="scss">
|
|
176
|
-
|
|
177
|
-
lottery-program-wof-private-item {
|
|
178
|
-
display: inline-block;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
*,
|
|
182
|
-
*::before,
|
|
183
|
-
*::after {
|
|
184
|
-
margin: 0;
|
|
185
|
-
padding: 0;
|
|
186
|
-
list-style: none;
|
|
187
|
-
text-decoration: none;
|
|
188
|
-
outline: none;
|
|
189
|
-
box-sizing: border-box;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.WofContainer {
|
|
193
|
-
display: flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
flex-direction: column;
|
|
196
|
-
padding: 20px 0;
|
|
197
|
-
background: var(--emfe-w-color-contrast, #07072A);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.NoContent {
|
|
201
|
-
color: rgb(255, 255, 255);
|
|
202
|
-
min-height: 300px;
|
|
203
|
-
display: flex;
|
|
204
|
-
justify-content: center;
|
|
205
|
-
align-items: center;
|
|
206
|
-
font-size: 16px;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.CommonContainer {
|
|
210
|
-
display: flex;
|
|
211
|
-
flex-wrap: wrap;
|
|
212
|
-
justify-content: center;
|
|
213
|
-
}
|
|
214
|
-
</style>
|