@everymatrix/lottery-ticket 1.77.0 → 1.77.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/dist/cjs/{index-d6e1a914.js → index-9501923d.js} +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-bullet_3.cjs.entry.js +151 -75
- package/dist/cjs/lottery-ticket.cjs.js +2 -2
- package/dist/collection/components/lottery-ticket/lottery-ticket.js +55 -27
- package/dist/esm/{index-09f8a089.js → index-51501594.js} +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottery-bullet_3.entry.js +151 -75
- package/dist/esm/lottery-ticket.js +3 -3
- package/dist/lottery-ticket/{index-09f8a089.js → index-51501594.js} +2 -2
- package/dist/lottery-ticket/lottery-bullet_3.entry.js +241 -241
- package/dist/lottery-ticket/lottery-ticket.esm.js +1 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-ticket/.stencil/tools/plugins/index.d.ts +1 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-ticket/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/components/lottery-ticket/lottery-ticket.d.ts +10 -5
- package/dist/types/components.d.ts +10 -2
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'lottery-ticket';
|
|
24
|
-
const BUILD = /* lottery-ticket */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad:
|
|
24
|
+
const BUILD = /* lottery-ticket */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -852,14 +852,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
852
852
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
853
853
|
const instance = hostRef.$lazyInstance$ ;
|
|
854
854
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
855
|
-
{
|
|
856
|
-
safeCall(instance, "componentDidRender");
|
|
857
|
-
}
|
|
858
855
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
859
856
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
860
857
|
{
|
|
861
858
|
addHydratedFlag(elm);
|
|
862
859
|
}
|
|
860
|
+
{
|
|
861
|
+
safeCall(instance, "componentDidLoad");
|
|
862
|
+
}
|
|
863
863
|
endPostUpdate();
|
|
864
864
|
{
|
|
865
865
|
hostRef.$onReadyResolve$(elm);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9501923d.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[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"],"
|
|
11
|
+
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[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"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[520,"translation-url"],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"stakeMultiplier":[32],"lineMultiplier":[32],"isCustomSelectStake":[32],"isCustomSelectDraw":[32],"isCustomSelectLine":[32],"drawMultiplier":[32],"secondarySelectionAllowed":[32],"partialQuickpickAvailable":[32],"boardsAllowed":[32],"tabIndex":[32],"groupType":[32],"playType":[32],"selectedPlayTypeId":[32],"maximumAllowed":[32],"numberRange":[32],"secondaryNumberRange":[32],"secondaryMaximumAllowed":[32],"minimumAllowed":[32],"secondaryMinimumAllowed":[32],"quickPicks":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"],[0,"gridClearAllEvent","handleGridClearAllEvent"]],{"lineMultiplier":["handleLineMultiplierChange"],"tabIndex":["handleTabIndexChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"numberRange":[513,"number-range"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"secondaryNumbers":[513,"secondary-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"highNumber":[514,"high-number"],"lowNumber":[514,"low-number"],"selectionType":[513,"selection-type"],"partialQuickpickAvailable":[516,"partial-quickpick-available"],"numbers":[32],"bonusNumbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"isBonus":[516,"is-bonus"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -2,7 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9501923d.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @name setClientStyling
|
|
9
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
10
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
11
|
+
* @param {string} clientStyling The style content
|
|
12
|
+
*/
|
|
13
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
14
|
+
if (stylingContainer) {
|
|
15
|
+
const sheet = document.createElement('style');
|
|
16
|
+
sheet.innerHTML = clientStyling;
|
|
17
|
+
stylingContainer.appendChild(sheet);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @name setClientStylingURL
|
|
23
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
24
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
25
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
26
|
+
*/
|
|
27
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
28
|
+
const url = new URL(clientStylingUrl);
|
|
29
|
+
|
|
30
|
+
fetch(url.href)
|
|
31
|
+
.then((res) => res.text())
|
|
32
|
+
.then((data) => {
|
|
33
|
+
const cssFile = document.createElement('style');
|
|
34
|
+
cssFile.innerHTML = data;
|
|
35
|
+
if (stylingContainer) {
|
|
36
|
+
stylingContainer.appendChild(cssFile);
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
.catch((err) => {
|
|
40
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @name setStreamLibrary
|
|
46
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
47
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
48
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
49
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
50
|
+
*/
|
|
51
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
52
|
+
if (window.emMessageBus) {
|
|
53
|
+
const sheet = document.createElement('style');
|
|
54
|
+
|
|
55
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
56
|
+
sheet.innerHTML = data;
|
|
57
|
+
if (stylingContainer) {
|
|
58
|
+
stylingContainer.appendChild(sheet);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
6
63
|
|
|
7
64
|
const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}";
|
|
8
65
|
const LotteryBulletStyle0 = lotteryBulletCss;
|
|
@@ -20,40 +77,47 @@ const LotteryBullet = class {
|
|
|
20
77
|
});
|
|
21
78
|
}
|
|
22
79
|
};
|
|
23
|
-
this.setClientStyling = () => {
|
|
24
|
-
let sheet = document.createElement('style');
|
|
25
|
-
sheet.innerHTML = this.clientStyling;
|
|
26
|
-
this.stylingContainer.prepend(sheet);
|
|
27
|
-
};
|
|
28
|
-
this.setClientStylingURL = () => {
|
|
29
|
-
let cssFile = document.createElement('style');
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
32
|
-
this.stylingContainer.prepend(cssFile);
|
|
33
|
-
}, 1);
|
|
34
|
-
};
|
|
35
80
|
this.value = '0';
|
|
36
81
|
this.selectable = true;
|
|
37
82
|
this.isSelected = false;
|
|
38
83
|
this.isBonus = false;
|
|
39
84
|
this.clientStyling = '';
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
85
|
+
this.clientStylingUrl = '';
|
|
86
|
+
this.mbSource = undefined;
|
|
87
|
+
}
|
|
88
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
89
|
+
if (newValue != oldValue) {
|
|
90
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
91
|
+
}
|
|
42
92
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
93
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
94
|
+
if (newValue != oldValue) {
|
|
95
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
99
|
+
if (newValue != oldValue) {
|
|
100
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
componentDidLoad() {
|
|
104
|
+
if (this.stylingContainer) {
|
|
105
|
+
if (this.mbSource)
|
|
106
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
46
107
|
if (this.clientStyling)
|
|
47
|
-
this.
|
|
48
|
-
if (this.
|
|
49
|
-
this.
|
|
50
|
-
this.limitStylingAppends = true;
|
|
108
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
109
|
+
if (this.clientStylingUrl)
|
|
110
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
51
111
|
}
|
|
52
|
-
// end custom styling area
|
|
53
112
|
}
|
|
54
113
|
render() {
|
|
55
|
-
return (index.h("div", { key: '
|
|
114
|
+
return (index.h("div", { key: '2cfab600728d3aa72f9f87e4e07a968ea030e415', class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : '') + (this.isBonus ? ' Bonus' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));
|
|
56
115
|
}
|
|
116
|
+
static get watchers() { return {
|
|
117
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
118
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
119
|
+
"mbSource": ["handleMbSourceChange"]
|
|
120
|
+
}; }
|
|
57
121
|
};
|
|
58
122
|
LotteryBullet.style = LotteryBulletStyle0;
|
|
59
123
|
|
|
@@ -67,18 +131,6 @@ const LotteryGrid = class {
|
|
|
67
131
|
this.gridDirtyEvent = index.createEvent(this, "gridDirty", 7);
|
|
68
132
|
this.gridClearAllEvent = index.createEvent(this, "gridClearAllEvent", 7);
|
|
69
133
|
this.selectedCounter = 0;
|
|
70
|
-
this.setClientStyling = () => {
|
|
71
|
-
let sheet = document.createElement('style');
|
|
72
|
-
sheet.innerHTML = this.clientStyling;
|
|
73
|
-
this.stylingContainer.prepend(sheet);
|
|
74
|
-
};
|
|
75
|
-
this.setClientStylingURL = () => {
|
|
76
|
-
let cssFile = document.createElement('style');
|
|
77
|
-
setTimeout(() => {
|
|
78
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
79
|
-
this.stylingContainer.prepend(cssFile);
|
|
80
|
-
}, 1);
|
|
81
|
-
};
|
|
82
134
|
this.ticketId = undefined;
|
|
83
135
|
this.totalNumbers = 0;
|
|
84
136
|
this.gameId = undefined;
|
|
@@ -93,14 +145,39 @@ const LotteryGrid = class {
|
|
|
93
145
|
this.gridIndex = undefined;
|
|
94
146
|
this.gridType = '';
|
|
95
147
|
this.clientStyling = '';
|
|
96
|
-
this.
|
|
148
|
+
this.clientStylingUrl = '';
|
|
149
|
+
this.mbSource = undefined;
|
|
97
150
|
this.highNumber = 47;
|
|
98
151
|
this.lowNumber = 1;
|
|
99
152
|
this.selectionType = 'mainSelection';
|
|
100
153
|
this.partialQuickpickAvailable = false;
|
|
101
154
|
this.numbers = [];
|
|
102
155
|
this.bonusNumbers = [];
|
|
103
|
-
|
|
156
|
+
}
|
|
157
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
158
|
+
if (newValue != oldValue) {
|
|
159
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
163
|
+
if (newValue != oldValue) {
|
|
164
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
168
|
+
if (newValue != oldValue) {
|
|
169
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
componentDidLoad() {
|
|
173
|
+
if (this.stylingContainer) {
|
|
174
|
+
if (this.mbSource)
|
|
175
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
176
|
+
if (this.clientStyling)
|
|
177
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
178
|
+
if (this.clientStylingUrl)
|
|
179
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
180
|
+
}
|
|
104
181
|
}
|
|
105
182
|
connectedCallback() {
|
|
106
183
|
let selected = [];
|
|
@@ -137,17 +214,6 @@ const LotteryGrid = class {
|
|
|
137
214
|
});
|
|
138
215
|
}
|
|
139
216
|
}
|
|
140
|
-
componentDidRender() {
|
|
141
|
-
// start custom styling area
|
|
142
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
143
|
-
if (this.clientStyling)
|
|
144
|
-
this.setClientStyling();
|
|
145
|
-
if (this.clientStylingUrlContent)
|
|
146
|
-
this.setClientStylingURL();
|
|
147
|
-
this.limitStylingAppends = true;
|
|
148
|
-
}
|
|
149
|
-
// end custom styling area
|
|
150
|
-
}
|
|
151
217
|
// wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
|
|
152
218
|
shuffleArray(array) {
|
|
153
219
|
const result = [];
|
|
@@ -273,8 +339,13 @@ const LotteryGrid = class {
|
|
|
273
339
|
}
|
|
274
340
|
}
|
|
275
341
|
render() {
|
|
276
|
-
return (index.h("div", { key: '
|
|
342
|
+
return (index.h("div", { key: 'f62b5b1e5a6cf7bcaa13ce2c8a281bc93fa439f7', class: "GridContainer", ref: el => this.stylingContainer = el }, index.h("div", { key: 'e381adbfff57e2cc343188c46037eb45ab798cac', class: this.gridType === 'ticket' ? 'Grid TicketGrid' : 'Grid' }, this.numbers.map((item) => index.h("div", null, index.h("lottery-bullet", { value: item.number, selectable: item.selectable, "is-selected": item.selected, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource }))), this.bonusNumbers.length ? this.bonusNumbers.map((item) => index.h("div", null, index.h("lottery-bullet", { value: item.number, selectable: item.selectable, "is-selected": item.selected, "is-bonus": true, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource }))) : '')));
|
|
277
343
|
}
|
|
344
|
+
static get watchers() { return {
|
|
345
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
346
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
347
|
+
"mbSource": ["handleMbSourceChange"]
|
|
348
|
+
}; }
|
|
278
349
|
};
|
|
279
350
|
LotteryGrid.style = LotteryGridStyle0;
|
|
280
351
|
|
|
@@ -7027,18 +7098,6 @@ const LotteryTicket = class {
|
|
|
7027
7098
|
this.drawMultiplierChange = index.createEvent(this, "drawMultiplierChange", 7);
|
|
7028
7099
|
this.lineMultiplierChange = index.createEvent(this, "lineMultiplierChange", 7);
|
|
7029
7100
|
this.betTypeChange = index.createEvent(this, "betTypeChange", 7);
|
|
7030
|
-
this.setClientStyling = () => {
|
|
7031
|
-
let sheet = document.createElement('style');
|
|
7032
|
-
sheet.innerHTML = this.clientStyling;
|
|
7033
|
-
this.stylingContainer.prepend(sheet);
|
|
7034
|
-
};
|
|
7035
|
-
this.setClientStylingURL = () => {
|
|
7036
|
-
let cssFile = document.createElement('style');
|
|
7037
|
-
setTimeout(() => {
|
|
7038
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
7039
|
-
this.stylingContainer.prepend(cssFile);
|
|
7040
|
-
}, 1);
|
|
7041
|
-
};
|
|
7042
7101
|
this.endpoint = undefined;
|
|
7043
7102
|
this.gameId = undefined;
|
|
7044
7103
|
this.numberOfGrids = 1;
|
|
@@ -7048,14 +7107,14 @@ const LotteryTicket = class {
|
|
|
7048
7107
|
this.autoPick = false;
|
|
7049
7108
|
this.language = 'en';
|
|
7050
7109
|
this.clientStyling = '';
|
|
7051
|
-
this.
|
|
7110
|
+
this.clientStylingUrl = '';
|
|
7111
|
+
this.mbSource = undefined;
|
|
7052
7112
|
this.translationUrl = undefined;
|
|
7053
7113
|
this.isLoading = true;
|
|
7054
7114
|
this.hasErrors = false;
|
|
7055
7115
|
this.ticketDone = [];
|
|
7056
7116
|
this.isCustomSelect = false;
|
|
7057
7117
|
this.amountInfo = {};
|
|
7058
|
-
this.limitStylingAppends = false;
|
|
7059
7118
|
this.stakeMultiplier = '1';
|
|
7060
7119
|
this.lineMultiplier = 0;
|
|
7061
7120
|
this.isCustomSelectStake = false;
|
|
@@ -7114,6 +7173,21 @@ const LotteryTicket = class {
|
|
|
7114
7173
|
betType: this.playType[0]
|
|
7115
7174
|
});
|
|
7116
7175
|
}
|
|
7176
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
7177
|
+
if (newValue != oldValue) {
|
|
7178
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
7179
|
+
}
|
|
7180
|
+
}
|
|
7181
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
7182
|
+
if (newValue != oldValue) {
|
|
7183
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7186
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
7187
|
+
if (newValue != oldValue) {
|
|
7188
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
7189
|
+
}
|
|
7190
|
+
}
|
|
7117
7191
|
checkForClickOutside(ev) {
|
|
7118
7192
|
if (this.selectRef && !this.selectRef.contains(ev.composedPath()[0])) {
|
|
7119
7193
|
this.isCustomSelect = false;
|
|
@@ -7195,16 +7269,15 @@ const LotteryTicket = class {
|
|
|
7195
7269
|
getTranslations(JSON.parse(this.translationUrl));
|
|
7196
7270
|
}
|
|
7197
7271
|
}
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7272
|
+
componentDidLoad() {
|
|
7273
|
+
if (this.stylingContainer) {
|
|
7274
|
+
if (this.mbSource)
|
|
7275
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
7201
7276
|
if (this.clientStyling)
|
|
7202
|
-
this.
|
|
7203
|
-
if (this.
|
|
7204
|
-
this.
|
|
7205
|
-
this.limitStylingAppends = true;
|
|
7277
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
7278
|
+
if (this.clientStylingUrl)
|
|
7279
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
7206
7280
|
}
|
|
7207
|
-
// end custom styling area
|
|
7208
7281
|
}
|
|
7209
7282
|
gridFilledHandler(event) {
|
|
7210
7283
|
this.ticket = Object.assign(Object.assign({}, event.detail), { drawCount: this.drawMultiplier, multiplierNum: Number(this.stakeMultiplier), multiplier: this.gameData.rules.stakeMultiplierAvailable, quickPicks: this.quickPicks, betName: this.playType.length > 1 ? this.playType.find((item) => item.value === this.selectedPlayTypeId).label : this.groupType[this.tabIndex].groupName });
|
|
@@ -7333,8 +7406,8 @@ const LotteryTicket = class {
|
|
|
7333
7406
|
index.h("div", null, index.h("label", { class: "Label" }, translate('playType', this.language), ": "), index.h("vaadin-select", { style: { 'width': '160px' }, items: this.playType, value: this.selectedPlayTypeId, "on-value-changed": (e) => this.handlePlayTypeChange(e.detail.value) })), this.boardsAllowed.length > 1 &&
|
|
7334
7407
|
index.h("div", null, index.h("label", { class: "Label" }, translate('lines', this.language), ": "), index.h("div", { class: "WagerInput" }, index.h("div", { ref: el => this.selectLineRef = el, class: this.isCustomSelectLine ? "SelectWrapper SelectActive" : "SelectWrapper" }, index.h("div", { class: "SelectButton", onClick: () => this.toggleLineSelection() }, index.h("span", null, this.lineMultiplier), index.h("span", { class: "SelectExpand" }, "\u25BC")), index.h("div", { class: "SelectContent" }, index.h("ul", { class: "SelectOptions" }, this.boardsAllowed.map((item) => index.h("li", { class: this.lineMultiplier == item ? 'SelectedValue' : '', value: item, onClick: () => this.setLineMultiplier(item) }, item))))))), this.grids.map((_, index$1) => index.h("div", null, index.h("div", { class: "TicketGridHeader" }, index.h("div", null, translate('lineName', this.language), index$1 + 1), this.resetButton && this.ticketDone[index$1] &&
|
|
7335
7408
|
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection(index$1) }, translate('resetButton', this.language))), this.autoPick && !this.ticketDone[index$1] &&
|
|
7336
|
-
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection(index$1) }, translate('autoButton', this.language)))), index.h("div", { class: "TicketGridBullets" }, index.h("p", { class: "TicketGridTitle" }, rules.boards[0].selectionName), index.h("lottery-grid", { "grid-index": index$1, "maximum-allowed": this.maximumAllowed, "minimum-allowed": this.minimumAllowed, "number-range": JSON.stringify(this.numberRange), "high-number": rules.boards[0].highNumber, "low-number": rules.boards[0].lowNumber, "total-numbers": rules.boards[0].highNumber - rules.boards[0].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'mainSelection', "client-styling": this.clientStyling, "client-styling-url-
|
|
7337
|
-
index.h("div", { class: "SecondarySelectionWrapper" }, index.h("div", { class: "TicketGridBullets" }, index.h("p", { class: "TicketGridTitle" }, rules.boards[0].secondarySelectionName), index.h("lottery-grid", { "grid-index": index$1, "maximum-allowed": this.secondaryMaximumAllowed, "minimum-allowed": this.secondaryMinimumAllowed, "number-range": JSON.stringify(this.secondaryNumberRange), "high-number": rules.boards[0].secondaryHighNumber, "low-number": rules.boards[0].secondaryLowNumber, "total-numbers": rules.boards[0].secondaryHighNumber - rules.boards[0].secondaryLowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'secondarySelection', "client-styling": this.clientStyling, "client-styling-url-
|
|
7409
|
+
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection(index$1) }, translate('autoButton', this.language)))), index.h("div", { class: "TicketGridBullets" }, index.h("p", { class: "TicketGridTitle" }, rules.boards[0].selectionName), index.h("lottery-grid", { "grid-index": index$1, "maximum-allowed": this.maximumAllowed, "minimum-allowed": this.minimumAllowed, "number-range": JSON.stringify(this.numberRange), "high-number": rules.boards[0].highNumber, "low-number": rules.boards[0].lowNumber, "total-numbers": rules.boards[0].highNumber - rules.boards[0].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'mainSelection', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource })), this.secondarySelectionAllowed &&
|
|
7410
|
+
index.h("div", { class: "SecondarySelectionWrapper" }, index.h("div", { class: "TicketGridBullets" }, index.h("p", { class: "TicketGridTitle" }, rules.boards[0].secondarySelectionName), index.h("lottery-grid", { "grid-index": index$1, "maximum-allowed": this.secondaryMaximumAllowed, "minimum-allowed": this.secondaryMinimumAllowed, "number-range": JSON.stringify(this.secondaryNumberRange), "high-number": rules.boards[0].secondaryHighNumber, "low-number": rules.boards[0].secondaryLowNumber, "total-numbers": rules.boards[0].secondaryHighNumber - rules.boards[0].secondaryLowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'secondarySelection', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource }))))), rules.stakeMultiplierAvailable &&
|
|
7338
7411
|
index.h("div", null, index.h("label", { class: "Label" }, translate('multiplier', this.language), ": "), index.h("div", { class: "WagerInput" }, rules.stakeMultipliers.length > 1 ?
|
|
7339
7412
|
(index.h("div", { ref: el => this.selectStakeRef = el, class: this.isCustomSelectStake ? "SelectWrapper SelectActive" : "SelectWrapper" }, index.h("div", { class: "SelectButton", onClick: () => this.toggleSelection() }, index.h("span", null, this.stakeMultiplier), index.h("span", { class: "SelectExpand" }, "\u25BC")), index.h("div", { class: "SelectContent" }, index.h("ul", { class: "SelectOptions" }, rules.stakeMultipliers.map((item) => index.h("li", { class: this.stakeMultiplier == item ? 'SelectedValue' : '', value: item, onClick: () => this.setStakeMultiplier(item) }, item)))))) : (index.h("div", null, index.h("input", { min: "1", value: rules.stakeMultipliers[0] || 1, type: "number", disabled: true }))))), rules.drawMultiplierAvailable &&
|
|
7340
7413
|
index.h("div", null, index.h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), index.h("div", { class: "WagerInput" }, rules.durations.length > 1 ?
|
|
@@ -7345,7 +7418,10 @@ const LotteryTicket = class {
|
|
|
7345
7418
|
}
|
|
7346
7419
|
static get watchers() { return {
|
|
7347
7420
|
"lineMultiplier": ["handleLineMultiplierChange"],
|
|
7348
|
-
"tabIndex": ["handleTabIndexChange"]
|
|
7421
|
+
"tabIndex": ["handleTabIndexChange"],
|
|
7422
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
7423
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
7424
|
+
"mbSource": ["handleMbSourceChange"]
|
|
7349
7425
|
}; }
|
|
7350
7426
|
};
|
|
7351
7427
|
LotteryTicket.style = LotteryTicketStyle0;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9501923d.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[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"],"
|
|
22
|
+
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[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"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[520,"translation-url"],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"stakeMultiplier":[32],"lineMultiplier":[32],"isCustomSelectStake":[32],"isCustomSelectDraw":[32],"isCustomSelectLine":[32],"drawMultiplier":[32],"secondarySelectionAllowed":[32],"partialQuickpickAvailable":[32],"boardsAllowed":[32],"tabIndex":[32],"groupType":[32],"playType":[32],"selectedPlayTypeId":[32],"maximumAllowed":[32],"numberRange":[32],"secondaryNumberRange":[32],"secondaryMaximumAllowed":[32],"minimumAllowed":[32],"secondaryMinimumAllowed":[32],"quickPicks":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"],[0,"gridClearAllEvent","handleGridClearAllEvent"]],{"lineMultiplier":["handleLineMultiplierChange"],"tabIndex":["handleTabIndexChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"numberRange":[513,"number-range"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"secondaryNumbers":[513,"secondary-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"highNumber":[514,"high-number"],"lowNumber":[514,"low-number"],"selectionType":[513,"selection-type"],"partialQuickpickAvailable":[516,"partial-quickpick-available"],"numbers":[32],"bonusNumbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"isBonus":[516,"is-bonus"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
2
3
|
import { translate, getTranslations } from "../../utils/locale.utils";
|
|
3
4
|
import "../../../../../lottery-grid/dist/types/index";
|
|
4
5
|
import "../../../../../../../libs/vaadin-facade/index";
|
|
5
6
|
export class LotteryTicket {
|
|
6
7
|
constructor() {
|
|
7
|
-
this.setClientStyling = () => {
|
|
8
|
-
let sheet = document.createElement('style');
|
|
9
|
-
sheet.innerHTML = this.clientStyling;
|
|
10
|
-
this.stylingContainer.prepend(sheet);
|
|
11
|
-
};
|
|
12
|
-
this.setClientStylingURL = () => {
|
|
13
|
-
let cssFile = document.createElement('style');
|
|
14
|
-
setTimeout(() => {
|
|
15
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
16
|
-
this.stylingContainer.prepend(cssFile);
|
|
17
|
-
}, 1);
|
|
18
|
-
};
|
|
19
8
|
this.endpoint = undefined;
|
|
20
9
|
this.gameId = undefined;
|
|
21
10
|
this.numberOfGrids = 1;
|
|
@@ -25,14 +14,14 @@ export class LotteryTicket {
|
|
|
25
14
|
this.autoPick = false;
|
|
26
15
|
this.language = 'en';
|
|
27
16
|
this.clientStyling = '';
|
|
28
|
-
this.
|
|
17
|
+
this.clientStylingUrl = '';
|
|
18
|
+
this.mbSource = undefined;
|
|
29
19
|
this.translationUrl = undefined;
|
|
30
20
|
this.isLoading = true;
|
|
31
21
|
this.hasErrors = false;
|
|
32
22
|
this.ticketDone = [];
|
|
33
23
|
this.isCustomSelect = false;
|
|
34
24
|
this.amountInfo = {};
|
|
35
|
-
this.limitStylingAppends = false;
|
|
36
25
|
this.stakeMultiplier = '1';
|
|
37
26
|
this.lineMultiplier = 0;
|
|
38
27
|
this.isCustomSelectStake = false;
|
|
@@ -91,6 +80,21 @@ export class LotteryTicket {
|
|
|
91
80
|
betType: this.playType[0]
|
|
92
81
|
});
|
|
93
82
|
}
|
|
83
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
84
|
+
if (newValue != oldValue) {
|
|
85
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
89
|
+
if (newValue != oldValue) {
|
|
90
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
94
|
+
if (newValue != oldValue) {
|
|
95
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
94
98
|
checkForClickOutside(ev) {
|
|
95
99
|
if (this.selectRef && !this.selectRef.contains(ev.composedPath()[0])) {
|
|
96
100
|
this.isCustomSelect = false;
|
|
@@ -172,16 +176,15 @@ export class LotteryTicket {
|
|
|
172
176
|
getTranslations(JSON.parse(this.translationUrl));
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
179
|
+
componentDidLoad() {
|
|
180
|
+
if (this.stylingContainer) {
|
|
181
|
+
if (this.mbSource)
|
|
182
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
178
183
|
if (this.clientStyling)
|
|
179
|
-
this.
|
|
180
|
-
if (this.
|
|
181
|
-
this.
|
|
182
|
-
this.limitStylingAppends = true;
|
|
184
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
185
|
+
if (this.clientStylingUrl)
|
|
186
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
183
187
|
}
|
|
184
|
-
// end custom styling area
|
|
185
188
|
}
|
|
186
189
|
gridFilledHandler(event) {
|
|
187
190
|
this.ticket = Object.assign(Object.assign({}, event.detail), { drawCount: this.drawMultiplier, multiplierNum: Number(this.stakeMultiplier), multiplier: this.gameData.rules.stakeMultiplierAvailable, quickPicks: this.quickPicks, betName: this.playType.length > 1 ? this.playType.find((item) => item.value === this.selectedPlayTypeId).label : this.groupType[this.tabIndex].groupName });
|
|
@@ -310,8 +313,8 @@ export class LotteryTicket {
|
|
|
310
313
|
h("div", null, h("label", { class: "Label" }, translate('playType', this.language), ": "), h("vaadin-select", { style: { 'width': '160px' }, items: this.playType, value: this.selectedPlayTypeId, "on-value-changed": (e) => this.handlePlayTypeChange(e.detail.value) })), this.boardsAllowed.length > 1 &&
|
|
311
314
|
h("div", null, h("label", { class: "Label" }, translate('lines', this.language), ": "), h("div", { class: "WagerInput" }, h("div", { ref: el => this.selectLineRef = el, class: this.isCustomSelectLine ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { class: "SelectButton", onClick: () => this.toggleLineSelection() }, h("span", null, this.lineMultiplier), h("span", { class: "SelectExpand" }, "\u25BC")), h("div", { class: "SelectContent" }, h("ul", { class: "SelectOptions" }, this.boardsAllowed.map((item) => h("li", { class: this.lineMultiplier == item ? 'SelectedValue' : '', value: item, onClick: () => this.setLineMultiplier(item) }, item))))))), this.grids.map((_, index) => h("div", null, h("div", { class: "TicketGridHeader" }, h("div", null, translate('lineName', this.language), index + 1), this.resetButton && this.ticketDone[index] &&
|
|
312
315
|
h("div", { class: "ButtonContainer" }, h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection(index) }, translate('resetButton', this.language))), this.autoPick && !this.ticketDone[index] &&
|
|
313
|
-
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection(index) }, translate('autoButton', this.language)))), h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, rules.boards[0].selectionName), h("lottery-grid", { "grid-index": index, "maximum-allowed": this.maximumAllowed, "minimum-allowed": this.minimumAllowed, "number-range": JSON.stringify(this.numberRange), "high-number": rules.boards[0].highNumber, "low-number": rules.boards[0].lowNumber, "total-numbers": rules.boards[0].highNumber - rules.boards[0].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'mainSelection', "client-styling": this.clientStyling, "client-styling-url-
|
|
314
|
-
h("div", { class: "SecondarySelectionWrapper" }, h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, rules.boards[0].secondarySelectionName), h("lottery-grid", { "grid-index": index, "maximum-allowed": this.secondaryMaximumAllowed, "minimum-allowed": this.secondaryMinimumAllowed, "number-range": JSON.stringify(this.secondaryNumberRange), "high-number": rules.boards[0].secondaryHighNumber, "low-number": rules.boards[0].secondaryLowNumber, "total-numbers": rules.boards[0].secondaryHighNumber - rules.boards[0].secondaryLowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'secondarySelection', "client-styling": this.clientStyling, "client-styling-url-
|
|
316
|
+
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection(index) }, translate('autoButton', this.language)))), h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, rules.boards[0].selectionName), h("lottery-grid", { "grid-index": index, "maximum-allowed": this.maximumAllowed, "minimum-allowed": this.minimumAllowed, "number-range": JSON.stringify(this.numberRange), "high-number": rules.boards[0].highNumber, "low-number": rules.boards[0].lowNumber, "total-numbers": rules.boards[0].highNumber - rules.boards[0].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'mainSelection', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource })), this.secondarySelectionAllowed &&
|
|
317
|
+
h("div", { class: "SecondarySelectionWrapper" }, h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, rules.boards[0].secondarySelectionName), h("lottery-grid", { "grid-index": index, "maximum-allowed": this.secondaryMaximumAllowed, "minimum-allowed": this.secondaryMinimumAllowed, "number-range": JSON.stringify(this.secondaryNumberRange), "high-number": rules.boards[0].secondaryHighNumber, "low-number": rules.boards[0].secondaryLowNumber, "total-numbers": rules.boards[0].secondaryHighNumber - rules.boards[0].secondaryLowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, "partial-quickpick-available": this.partialQuickpickAvailable, language: this.language, "translation-url": this.translationUrl, "selection-type": 'secondarySelection', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource }))))), rules.stakeMultiplierAvailable &&
|
|
315
318
|
h("div", null, h("label", { class: "Label" }, translate('multiplier', this.language), ": "), h("div", { class: "WagerInput" }, rules.stakeMultipliers.length > 1 ?
|
|
316
319
|
(h("div", { ref: el => this.selectStakeRef = el, class: this.isCustomSelectStake ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { class: "SelectButton", onClick: () => this.toggleSelection() }, h("span", null, this.stakeMultiplier), h("span", { class: "SelectExpand" }, "\u25BC")), h("div", { class: "SelectContent" }, h("ul", { class: "SelectOptions" }, rules.stakeMultipliers.map((item) => h("li", { class: this.stakeMultiplier == item ? 'SelectedValue' : '', value: item, onClick: () => this.setStakeMultiplier(item) }, item)))))) : (h("div", null, h("input", { min: "1", value: rules.stakeMultipliers[0] || 1, type: "number", disabled: true }))))), rules.drawMultiplierAvailable &&
|
|
317
320
|
h("div", null, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), h("div", { class: "WagerInput" }, rules.durations.length > 1 ?
|
|
@@ -493,7 +496,7 @@ export class LotteryTicket {
|
|
|
493
496
|
"reflect": true,
|
|
494
497
|
"defaultValue": "''"
|
|
495
498
|
},
|
|
496
|
-
"
|
|
499
|
+
"clientStylingUrl": {
|
|
497
500
|
"type": "string",
|
|
498
501
|
"mutable": false,
|
|
499
502
|
"complexType": {
|
|
@@ -507,10 +510,27 @@ export class LotteryTicket {
|
|
|
507
510
|
"tags": [],
|
|
508
511
|
"text": "Client custom styling via url content"
|
|
509
512
|
},
|
|
510
|
-
"attribute": "client-styling-url
|
|
513
|
+
"attribute": "client-styling-url",
|
|
511
514
|
"reflect": true,
|
|
512
515
|
"defaultValue": "''"
|
|
513
516
|
},
|
|
517
|
+
"mbSource": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"mutable": false,
|
|
520
|
+
"complexType": {
|
|
521
|
+
"original": "string",
|
|
522
|
+
"resolved": "string",
|
|
523
|
+
"references": {}
|
|
524
|
+
},
|
|
525
|
+
"required": false,
|
|
526
|
+
"optional": false,
|
|
527
|
+
"docs": {
|
|
528
|
+
"tags": [],
|
|
529
|
+
"text": "Client custom styling via message bus"
|
|
530
|
+
},
|
|
531
|
+
"attribute": "mb-source",
|
|
532
|
+
"reflect": true
|
|
533
|
+
},
|
|
514
534
|
"translationUrl": {
|
|
515
535
|
"type": "any",
|
|
516
536
|
"mutable": false,
|
|
@@ -537,7 +557,6 @@ export class LotteryTicket {
|
|
|
537
557
|
"ticketDone": {},
|
|
538
558
|
"isCustomSelect": {},
|
|
539
559
|
"amountInfo": {},
|
|
540
|
-
"limitStylingAppends": {},
|
|
541
560
|
"stakeMultiplier": {},
|
|
542
561
|
"lineMultiplier": {},
|
|
543
562
|
"isCustomSelectStake": {},
|
|
@@ -693,6 +712,15 @@ export class LotteryTicket {
|
|
|
693
712
|
}, {
|
|
694
713
|
"propName": "tabIndex",
|
|
695
714
|
"methodName": "handleTabIndexChange"
|
|
715
|
+
}, {
|
|
716
|
+
"propName": "clientStyling",
|
|
717
|
+
"methodName": "handleClientStylingChange"
|
|
718
|
+
}, {
|
|
719
|
+
"propName": "clientStylingUrl",
|
|
720
|
+
"methodName": "handleClientStylingUrlChange"
|
|
721
|
+
}, {
|
|
722
|
+
"propName": "mbSource",
|
|
723
|
+
"methodName": "handleMbSourceChange"
|
|
696
724
|
}];
|
|
697
725
|
}
|
|
698
726
|
static get listeners() {
|