@everymatrix/lottery-ticket-controller 1.32.4 → 1.33.1
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/cjs/helper-accordion_5.cjs.entry.js +755 -0
- package/dist/cjs/index-797fecd9.js +1286 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/lottery-ticket-controller.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +37 -0
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.css +185 -0
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.js +404 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +23 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/helper-accordion.js +6 -0
- package/dist/components/helper-accordion2.js +159 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/lottery-bullet.js +6 -0
- package/dist/components/lottery-bullet2.js +91 -0
- package/dist/components/lottery-grid.js +6 -0
- package/dist/components/lottery-grid2.js +245 -0
- package/dist/components/lottery-ticket-controller.d.ts +11 -0
- package/dist/components/lottery-ticket-controller.js +185 -0
- package/dist/components/lottery-ticket.js +6 -0
- package/dist/components/lottery-ticket2.js +273 -0
- package/dist/esm/helper-accordion_5.entry.js +747 -0
- package/dist/esm/index-c4bda097.js +1260 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/lottery-ticket-controller.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-ticket-controller/index.esm.js +0 -0
- package/dist/lottery-ticket-controller/lottery-ticket-controller.esm.js +1 -0
- package/dist/lottery-ticket-controller/p-1f81b6df.js +1 -0
- package/dist/lottery-ticket-controller/p-e25b2082.entry.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-ticket-controller/.stencil/packages/lottery-ticket-controller/stencil.config.d.ts +2 -0
- package/dist/types/components/lottery-ticket-controller/lottery-ticket-controller.d.ts +73 -0
- package/dist/types/components.d.ts +158 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +2 -3
- package/LICENSE +0 -21
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-797fecd9.js');
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
const patchEsm = () => {
|
|
11
|
+
return index.promiseResolve();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const defineCustomElements = (win, options) => {
|
|
15
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
+
return patchEsm().then(() => {
|
|
17
|
+
return index.bootstrapLazy([["helper-accordion_5.cjs",[[1,"lottery-ticket-controller",{"endpoint":[513],"ticketId":[514,"ticket-id"],"ticketDescription":[513,"ticket-description"],"gameId":[513,"game-id"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"numberOfGrids":[514,"number-of-grids"],"last":[516],"language":[513],"autoPick":[516,"auto-pick"],"resetButton":[516,"reset-button"],"totalControllers":[514,"total-controllers"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[513],"gameId":[513,"game-id"],"numberOfGrids":[514,"number-of-grids"],"multipleDraws":[516,"multiple-draws"],"ticketId":[514,"ticket-id"],"resetButton":[516,"reset-button"],"autoPick":[516,"auto-pick"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]],[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-797fecd9.js');
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
const patchBrowser = () => {
|
|
9
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('lottery-ticket-controller.cjs.js', document.baseURI).href));
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== '') {
|
|
12
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return index.promiseResolve(opts);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
patchBrowser().then(options => {
|
|
18
|
+
return index.bootstrapLazy([["helper-accordion_5.cjs",[[1,"lottery-ticket-controller",{"endpoint":[513],"ticketId":[514,"ticket-id"],"ticketDescription":[513,"ticket-description"],"gameId":[513,"game-id"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"numberOfGrids":[514,"number-of-grids"],"last":[516],"language":[513],"autoPick":[516,"auto-pick"],"resetButton":[516,"reset-button"],"totalControllers":[514,"total-controllers"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[513],"gameId":[513,"game-id"],"numberOfGrids":[514,"number-of-grids"],"multipleDraws":[516,"multiple-draws"],"ticketId":[514,"ticket-id"],"resetButton":[516,"reset-button"],"autoPick":[516,"auto-pick"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]],[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
19
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./components/lottery-ticket-controller/lottery-ticket-controller.js"
|
|
4
|
+
],
|
|
5
|
+
"compiler": {
|
|
6
|
+
"name": "@stencil/core",
|
|
7
|
+
"version": "2.15.2",
|
|
8
|
+
"typescriptVersion": "4.5.4"
|
|
9
|
+
},
|
|
10
|
+
"collections": [
|
|
11
|
+
{
|
|
12
|
+
"name": "@everymatrix/helper-accordion",
|
|
13
|
+
"tags": [
|
|
14
|
+
"helper-accordion"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "@everymatrix/lottery-bullet",
|
|
19
|
+
"tags": [
|
|
20
|
+
"lottery-bullet"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "@everymatrix/lottery-grid",
|
|
25
|
+
"tags": [
|
|
26
|
+
"lottery-grid"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "@everymatrix/lottery-ticket",
|
|
31
|
+
"tags": [
|
|
32
|
+
"lottery-ticket"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"bundles": []
|
|
37
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
3
|
+
font-size: 0.8rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
*,
|
|
7
|
+
*::before,
|
|
8
|
+
*::after {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
list-style: none;
|
|
12
|
+
outline: none;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Chrome, Safari, Edge, Opera */
|
|
17
|
+
input::-webkit-outer-spin-button,
|
|
18
|
+
input::-webkit-inner-spin-button {
|
|
19
|
+
-webkit-appearance: none;
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Firefox */
|
|
24
|
+
input[type=number] {
|
|
25
|
+
-moz-appearance: textfield;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.player-account-gaming-limits-popup-2 {
|
|
29
|
+
background: var(--emfe-w-color-black, #000000);
|
|
30
|
+
color: var(--emfe-w-color-white, #000);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.Title {
|
|
34
|
+
font-weight: 800;
|
|
35
|
+
font-size: 18px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
button {
|
|
39
|
+
display: block;
|
|
40
|
+
font-size: 0.75rem;
|
|
41
|
+
padding: 12px 0;
|
|
42
|
+
border: 0;
|
|
43
|
+
border-radius: 2px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
button.PrimaryButtonStyle {
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
color: #fff;
|
|
49
|
+
background: #7ac317;
|
|
50
|
+
}
|
|
51
|
+
button.SecondaryButtonStyle {
|
|
52
|
+
border: 1px solid #999;
|
|
53
|
+
color: #666;
|
|
54
|
+
background: #fff;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.LinkButton {
|
|
58
|
+
display: inline;
|
|
59
|
+
padding: 0;
|
|
60
|
+
color: #3366CC;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
background-color: rgba(0, 0, 0, 0);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ResultIconWrapper {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
align-items: center;
|
|
69
|
+
margin: 12px 0;
|
|
70
|
+
}
|
|
71
|
+
.ResultIconWrapper svg {
|
|
72
|
+
height: auto;
|
|
73
|
+
width: 60px;
|
|
74
|
+
margin: 12px;
|
|
75
|
+
}
|
|
76
|
+
.ResultIconWrapper p {
|
|
77
|
+
color: #666;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.Overlay {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 100vw;
|
|
85
|
+
height: 100vh;
|
|
86
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ModalContainer {
|
|
93
|
+
position: fixed;
|
|
94
|
+
top: 30vh;
|
|
95
|
+
width: 320px;
|
|
96
|
+
height: auto;
|
|
97
|
+
padding: 18px 14px;
|
|
98
|
+
background: #fff;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.InitialWrapper {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: 12px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.AdditionalInformation {
|
|
109
|
+
margin: 10px 0;
|
|
110
|
+
font-size: 14px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.TermsConditions {
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ExpandButton {
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
background-color: #fff;
|
|
120
|
+
border: 0;
|
|
121
|
+
padding: 0;
|
|
122
|
+
margin-top: -10px;
|
|
123
|
+
color: #999;
|
|
124
|
+
display: flex;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
align-items: center;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
.ExpandButton svg {
|
|
130
|
+
width: 28px;
|
|
131
|
+
height: auto;
|
|
132
|
+
margin-left: -4px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.LeftAlign {
|
|
136
|
+
text-align: left;
|
|
137
|
+
font-size: 16px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.CenterAlign {
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.SetLimitSection {
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 6px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.DepositTextSection {
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: space-between;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.DepositInputSection {
|
|
156
|
+
height: 32px;
|
|
157
|
+
display: flex;
|
|
158
|
+
gap: 4px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.DepositInput {
|
|
162
|
+
flex-grow: 1;
|
|
163
|
+
padding: 0 6px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.SubmitDepositButton {
|
|
167
|
+
flex-grow: 1;
|
|
168
|
+
font-size: 0.75rem;
|
|
169
|
+
padding: 0;
|
|
170
|
+
}
|
|
171
|
+
.SubmitDepositButton[disabled] {
|
|
172
|
+
align-items: center;
|
|
173
|
+
color: #ccc;
|
|
174
|
+
cursor: not-allowed;
|
|
175
|
+
background: #fff;
|
|
176
|
+
border: #ccc 1px solid;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.Hidden {
|
|
180
|
+
display: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.Extended {
|
|
184
|
+
transform: rotate(180deg);
|
|
185
|
+
}
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { Component, h, Listen, Prop, Event, State } from '@stencil/core';
|
|
2
|
+
import '@everymatrix/helper-accordion';
|
|
3
|
+
import '@everymatrix/lottery-ticket';
|
|
4
|
+
import { translate } from '../../utils/locale.utils';
|
|
5
|
+
export class LotteryTicketController {
|
|
6
|
+
constructor() {
|
|
7
|
+
/**
|
|
8
|
+
* Endpoint URL for the source of data (NorWAy standard)
|
|
9
|
+
*/
|
|
10
|
+
this.endpoint = '';
|
|
11
|
+
/**
|
|
12
|
+
* Ticket number
|
|
13
|
+
*/
|
|
14
|
+
this.ticketId = 1;
|
|
15
|
+
/**
|
|
16
|
+
* Activates postMessages as events for actions from the widget
|
|
17
|
+
*/
|
|
18
|
+
this.postMessage = false;
|
|
19
|
+
/**
|
|
20
|
+
* Name of the event emitter by the action button
|
|
21
|
+
*/
|
|
22
|
+
this.eventName = 'deleteTicketAction';
|
|
23
|
+
/**
|
|
24
|
+
* Collapsed
|
|
25
|
+
*/
|
|
26
|
+
this.collapsed = true;
|
|
27
|
+
/**
|
|
28
|
+
* Number of grids?
|
|
29
|
+
*/
|
|
30
|
+
this.numberOfGrids = 1;
|
|
31
|
+
/**
|
|
32
|
+
* This toggles if the last ticket added should be expanded or not
|
|
33
|
+
*/
|
|
34
|
+
this.last = false;
|
|
35
|
+
/**
|
|
36
|
+
* Language
|
|
37
|
+
*/
|
|
38
|
+
this.language = 'en';
|
|
39
|
+
/**
|
|
40
|
+
* Shows the auto-pick button
|
|
41
|
+
*/
|
|
42
|
+
this.autoPick = false;
|
|
43
|
+
/**
|
|
44
|
+
* Shows the reset button
|
|
45
|
+
*/
|
|
46
|
+
this.resetButton = false;
|
|
47
|
+
/**
|
|
48
|
+
* Number of ticket controllers
|
|
49
|
+
*/
|
|
50
|
+
this.totalControllers = 1;
|
|
51
|
+
/**
|
|
52
|
+
* Client custom styling via string
|
|
53
|
+
*/
|
|
54
|
+
this.clientStyling = '';
|
|
55
|
+
/**
|
|
56
|
+
* Client custom styling via url content
|
|
57
|
+
*/
|
|
58
|
+
this.clientStylingUrlContent = '';
|
|
59
|
+
this.limitStylingAppends = false;
|
|
60
|
+
this.setClientStyling = () => {
|
|
61
|
+
let sheet = document.createElement('style');
|
|
62
|
+
sheet.innerHTML = this.clientStyling;
|
|
63
|
+
this.stylingContainer.prepend(sheet);
|
|
64
|
+
};
|
|
65
|
+
this.setClientStylingURL = () => {
|
|
66
|
+
let cssFile = document.createElement('style');
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
69
|
+
this.stylingContainer.prepend(cssFile);
|
|
70
|
+
}, 1);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// @TODO fix the `any` type
|
|
74
|
+
helperAccordionActionHandler() {
|
|
75
|
+
if (this.postMessage) {
|
|
76
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
77
|
+
}
|
|
78
|
+
this.deleteTicketEvent.emit({
|
|
79
|
+
ticketId: this.ticketId
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
componentDidRender() {
|
|
83
|
+
// start custom styling area
|
|
84
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
85
|
+
if (this.clientStyling)
|
|
86
|
+
this.setClientStyling();
|
|
87
|
+
if (this.clientStylingUrlContent)
|
|
88
|
+
this.setClientStylingURL();
|
|
89
|
+
this.limitStylingAppends = true;
|
|
90
|
+
}
|
|
91
|
+
// end custom styling area
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
console.log('ticket id:', this.ticketId);
|
|
95
|
+
return (h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el },
|
|
96
|
+
h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": this.totalControllers !== 1, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
|
|
97
|
+
h("div", { slot: "accordionContent" },
|
|
98
|
+
h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
99
|
+
}
|
|
100
|
+
static get is() { return "lottery-ticket-controller"; }
|
|
101
|
+
static get encapsulation() { return "shadow"; }
|
|
102
|
+
static get originalStyleUrls() { return {
|
|
103
|
+
"$": ["lottery-ticket-controller.scss"]
|
|
104
|
+
}; }
|
|
105
|
+
static get styleUrls() { return {
|
|
106
|
+
"$": ["lottery-ticket-controller.css"]
|
|
107
|
+
}; }
|
|
108
|
+
static get properties() { return {
|
|
109
|
+
"endpoint": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "string",
|
|
114
|
+
"resolved": "string",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Endpoint URL for the source of data (NorWAy standard)"
|
|
122
|
+
},
|
|
123
|
+
"attribute": "endpoint",
|
|
124
|
+
"reflect": true,
|
|
125
|
+
"defaultValue": "''"
|
|
126
|
+
},
|
|
127
|
+
"ticketId": {
|
|
128
|
+
"type": "number",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "number",
|
|
132
|
+
"resolved": "number",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "Ticket number"
|
|
140
|
+
},
|
|
141
|
+
"attribute": "ticket-id",
|
|
142
|
+
"reflect": true,
|
|
143
|
+
"defaultValue": "1"
|
|
144
|
+
},
|
|
145
|
+
"ticketDescription": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"mutable": false,
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "string",
|
|
150
|
+
"resolved": "string",
|
|
151
|
+
"references": {}
|
|
152
|
+
},
|
|
153
|
+
"required": false,
|
|
154
|
+
"optional": false,
|
|
155
|
+
"docs": {
|
|
156
|
+
"tags": [],
|
|
157
|
+
"text": "Ticket header description"
|
|
158
|
+
},
|
|
159
|
+
"attribute": "ticket-description",
|
|
160
|
+
"reflect": true
|
|
161
|
+
},
|
|
162
|
+
"gameId": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "string",
|
|
167
|
+
"resolved": "string",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": false,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": "ID of the lottery game"
|
|
175
|
+
},
|
|
176
|
+
"attribute": "game-id",
|
|
177
|
+
"reflect": true
|
|
178
|
+
},
|
|
179
|
+
"postMessage": {
|
|
180
|
+
"type": "boolean",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "boolean",
|
|
184
|
+
"resolved": "boolean",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": "Activates postMessages as events for actions from the widget"
|
|
192
|
+
},
|
|
193
|
+
"attribute": "post-message",
|
|
194
|
+
"reflect": true,
|
|
195
|
+
"defaultValue": "false"
|
|
196
|
+
},
|
|
197
|
+
"eventName": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"mutable": false,
|
|
200
|
+
"complexType": {
|
|
201
|
+
"original": "string",
|
|
202
|
+
"resolved": "string",
|
|
203
|
+
"references": {}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": "Name of the event emitter by the action button"
|
|
210
|
+
},
|
|
211
|
+
"attribute": "event-name",
|
|
212
|
+
"reflect": true,
|
|
213
|
+
"defaultValue": "'deleteTicketAction'"
|
|
214
|
+
},
|
|
215
|
+
"collapsed": {
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "boolean",
|
|
220
|
+
"resolved": "boolean",
|
|
221
|
+
"references": {}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Collapsed"
|
|
228
|
+
},
|
|
229
|
+
"attribute": "collapsed",
|
|
230
|
+
"reflect": true,
|
|
231
|
+
"defaultValue": "true"
|
|
232
|
+
},
|
|
233
|
+
"numberOfGrids": {
|
|
234
|
+
"type": "number",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "number",
|
|
238
|
+
"resolved": "number",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": "Number of grids?"
|
|
246
|
+
},
|
|
247
|
+
"attribute": "number-of-grids",
|
|
248
|
+
"reflect": true,
|
|
249
|
+
"defaultValue": "1"
|
|
250
|
+
},
|
|
251
|
+
"last": {
|
|
252
|
+
"type": "boolean",
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "boolean",
|
|
256
|
+
"resolved": "boolean",
|
|
257
|
+
"references": {}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": "This toggles if the last ticket added should be expanded or not"
|
|
264
|
+
},
|
|
265
|
+
"attribute": "last",
|
|
266
|
+
"reflect": true,
|
|
267
|
+
"defaultValue": "false"
|
|
268
|
+
},
|
|
269
|
+
"language": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "string",
|
|
274
|
+
"resolved": "string",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "Language"
|
|
282
|
+
},
|
|
283
|
+
"attribute": "language",
|
|
284
|
+
"reflect": true,
|
|
285
|
+
"defaultValue": "'en'"
|
|
286
|
+
},
|
|
287
|
+
"autoPick": {
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "boolean",
|
|
292
|
+
"resolved": "boolean",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Shows the auto-pick button"
|
|
300
|
+
},
|
|
301
|
+
"attribute": "auto-pick",
|
|
302
|
+
"reflect": true,
|
|
303
|
+
"defaultValue": "false"
|
|
304
|
+
},
|
|
305
|
+
"resetButton": {
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "boolean",
|
|
310
|
+
"resolved": "boolean",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "Shows the reset button"
|
|
318
|
+
},
|
|
319
|
+
"attribute": "reset-button",
|
|
320
|
+
"reflect": true,
|
|
321
|
+
"defaultValue": "false"
|
|
322
|
+
},
|
|
323
|
+
"totalControllers": {
|
|
324
|
+
"type": "number",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "number",
|
|
328
|
+
"resolved": "number",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "Number of ticket controllers"
|
|
336
|
+
},
|
|
337
|
+
"attribute": "total-controllers",
|
|
338
|
+
"reflect": true,
|
|
339
|
+
"defaultValue": "1"
|
|
340
|
+
},
|
|
341
|
+
"clientStyling": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"mutable": false,
|
|
344
|
+
"complexType": {
|
|
345
|
+
"original": "string",
|
|
346
|
+
"resolved": "string",
|
|
347
|
+
"references": {}
|
|
348
|
+
},
|
|
349
|
+
"required": false,
|
|
350
|
+
"optional": false,
|
|
351
|
+
"docs": {
|
|
352
|
+
"tags": [],
|
|
353
|
+
"text": "Client custom styling via string"
|
|
354
|
+
},
|
|
355
|
+
"attribute": "client-styling",
|
|
356
|
+
"reflect": true,
|
|
357
|
+
"defaultValue": "''"
|
|
358
|
+
},
|
|
359
|
+
"clientStylingUrlContent": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"mutable": false,
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "string",
|
|
364
|
+
"resolved": "string",
|
|
365
|
+
"references": {}
|
|
366
|
+
},
|
|
367
|
+
"required": false,
|
|
368
|
+
"optional": false,
|
|
369
|
+
"docs": {
|
|
370
|
+
"tags": [],
|
|
371
|
+
"text": "Client custom styling via url content"
|
|
372
|
+
},
|
|
373
|
+
"attribute": "client-styling-url-content",
|
|
374
|
+
"reflect": true,
|
|
375
|
+
"defaultValue": "''"
|
|
376
|
+
}
|
|
377
|
+
}; }
|
|
378
|
+
static get states() { return {
|
|
379
|
+
"limitStylingAppends": {}
|
|
380
|
+
}; }
|
|
381
|
+
static get events() { return [{
|
|
382
|
+
"method": "deleteTicketEvent",
|
|
383
|
+
"name": "deleteTicket",
|
|
384
|
+
"bubbles": true,
|
|
385
|
+
"cancelable": true,
|
|
386
|
+
"composed": true,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": ""
|
|
390
|
+
},
|
|
391
|
+
"complexType": {
|
|
392
|
+
"original": "any",
|
|
393
|
+
"resolved": "any",
|
|
394
|
+
"references": {}
|
|
395
|
+
}
|
|
396
|
+
}]; }
|
|
397
|
+
static get listeners() { return [{
|
|
398
|
+
"name": "helperAccordionAction",
|
|
399
|
+
"method": "helperAccordionActionHandler",
|
|
400
|
+
"target": undefined,
|
|
401
|
+
"capture": false,
|
|
402
|
+
"passive": false
|
|
403
|
+
}]; }
|
|
404
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|