@everymatrix/lottery-oddsbom-ticket-bet 0.0.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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-b8e9c8e4.js +1327 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/lottery-oddsbom-bullet_9.cjs.entry.js +1064 -0
- package/dist/cjs/lottery-oddsbom-ticket-bet-402dc005.js +10038 -0
- package/dist/cjs/lottery-oddsbom-ticket-bet.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +36 -0
- package/dist/collection/components/lottery-oddsbom-oddschart/lottery-oddsbom-oddschart.css +221 -0
- package/dist/collection/components/lottery-oddsbom-oddschart/lottery-oddsbom-oddschart.js +609 -0
- package/dist/collection/components/lottery-oddsbom-oddschart-input/lottery-oddsbom-oddschart-input.css +40 -0
- package/dist/collection/components/lottery-oddsbom-oddschart-input/lottery-oddsbom-oddschart-input.js +213 -0
- package/dist/collection/components/lottery-oddsbom-ticket-bet/index.js +1 -0
- package/dist/collection/components/lottery-oddsbom-ticket-bet/lottery-oddsbom-ticket-bet.css +193 -0
- package/dist/collection/components/lottery-oddsbom-ticket-bet/lottery-oddsbom-ticket-bet.js +782 -0
- package/dist/collection/components/lottery-oddsbom-ticket-board/lottery-oddsbom-ticket-board.css +82 -0
- package/dist/collection/components/lottery-oddsbom-ticket-board/lottery-oddsbom-ticket-board.js +350 -0
- package/dist/collection/components/lottery-oddsbom-ticket-button/lottery-oddsbom-ticket-button.css +168 -0
- package/dist/collection/components/lottery-oddsbom-ticket-button/lottery-oddsbom-ticket-button.js +299 -0
- package/dist/collection/components/lottery-oddsbom-ticket-selection/lottery-oddsbom-ticket-selection.css +104 -0
- package/dist/collection/components/lottery-oddsbom-ticket-selection/lottery-oddsbom-ticket-selection.js +233 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/model/index.type.js +1 -0
- package/dist/collection/utils/api.js +10 -0
- package/dist/collection/utils/locale.utils.js +73 -0
- package/dist/collection/utils/utils.js +200 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-9dee9d86.js +1299 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/lottery-oddsbom-bullet_9.entry.js +1053 -0
- package/dist/esm/lottery-oddsbom-ticket-bet-e46dbb50.js +10026 -0
- package/dist/esm/lottery-oddsbom-ticket-bet.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-oddsbom-ticket-bet/app-globals-0f993ce5.js +1 -0
- package/dist/lottery-oddsbom-ticket-bet/index-9dee9d86.js +2 -0
- package/dist/lottery-oddsbom-ticket-bet/index.esm.js +1 -0
- package/dist/lottery-oddsbom-ticket-bet/lottery-oddsbom-bullet_9.entry.js +1 -0
- package/dist/lottery-oddsbom-ticket-bet/lottery-oddsbom-ticket-bet-e46dbb50.js +6657 -0
- package/dist/lottery-oddsbom-ticket-bet/lottery-oddsbom-ticket-bet.esm.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/packages/stencil/lottery-oddsbom-ticket-bet/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/packages/stencil/lottery-oddsbom-ticket-bet/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/packages/stencil/lottery-oddsbom-ticket-bet/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/packages/stencil/lottery-oddsbom-ticket-bet/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-ticket-bet/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/lottery-oddsbom-oddschart/lottery-oddsbom-oddschart.d.ts +51 -0
- package/dist/types/components/lottery-oddsbom-oddschart-input/lottery-oddsbom-oddschart-input.d.ts +21 -0
- package/dist/types/components/lottery-oddsbom-ticket-bet/index.d.ts +1 -0
- package/dist/types/components/lottery-oddsbom-ticket-bet/lottery-oddsbom-ticket-bet.d.ts +95 -0
- package/dist/types/components/lottery-oddsbom-ticket-board/lottery-oddsbom-ticket-board.d.ts +51 -0
- package/dist/types/components/lottery-oddsbom-ticket-button/lottery-oddsbom-ticket-button.d.ts +40 -0
- package/dist/types/components/lottery-oddsbom-ticket-selection/lottery-oddsbom-ticket-selection.d.ts +25 -0
- package/dist/types/components.d.ts +298 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model/index.type.d.ts +198 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/api.d.ts +6 -0
- package/dist/types/utils/locale.utils.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +17 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
package/dist/collection/components/lottery-oddsbom-ticket-board/lottery-oddsbom-ticket-board.css
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.oddsbomTicketBoard {
|
|
2
|
+
border: 1px solid var(--emw--color-gray-100, #e6e6e6);
|
|
3
|
+
border-radius: 4px;
|
|
4
|
+
container-type: inline-size;
|
|
5
|
+
min-height: 220px;
|
|
6
|
+
}
|
|
7
|
+
.oddsbomTicketBoard-noData {
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
height: 200px;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
.oddsbomTicketBoard-btn {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
margin: 16px;
|
|
17
|
+
margin-bottom: unset;
|
|
18
|
+
}
|
|
19
|
+
.oddsbomTicketBoard-item {
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: 16px;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
padding: 24px;
|
|
24
|
+
}
|
|
25
|
+
.oddsbomTicketBoard-item:not(:last-child) {
|
|
26
|
+
border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);
|
|
27
|
+
}
|
|
28
|
+
.oddsbomTicketBoard-item-header {
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
color: var(--emw--color-typography, #000);
|
|
31
|
+
}
|
|
32
|
+
.oddsbomTicketBoard-item-match {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
.oddsbomTicketBoard-item-match--left {
|
|
37
|
+
width: 130px;
|
|
38
|
+
color: var(--emw--color-typography, #000);
|
|
39
|
+
}
|
|
40
|
+
.oddsbomTicketBoard-item-match--right {
|
|
41
|
+
flex: 1;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
justify-content: space-evenly;
|
|
46
|
+
}
|
|
47
|
+
@container (max-width: 320px) {
|
|
48
|
+
.oddsbomTicketBoard-item-match--left {
|
|
49
|
+
width: 100px;
|
|
50
|
+
max-width: 100px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dialog-input {
|
|
55
|
+
width: 100%;
|
|
56
|
+
padding: 8px;
|
|
57
|
+
border: 1px solid var(--emw--color-gray-100, #e6e6e6);
|
|
58
|
+
border-radius: 4px;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
margin-top: 10px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dialog-input.invalid,
|
|
64
|
+
.dialog-input.invalid:focus {
|
|
65
|
+
border-color: var(--emw--color-error, #ff3d00);
|
|
66
|
+
outline-color: var(--emw--color-error, #ff3d00);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.error-message {
|
|
70
|
+
color: var(--emw--color-error, #ff3d00);
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
margin-top: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.addSelectionDialog-title {
|
|
76
|
+
color: var(--emw--color-typography, #000);
|
|
77
|
+
}
|
|
78
|
+
.addSelectionDialog-footer {
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: flex-end;
|
|
81
|
+
gap: 18px;
|
|
82
|
+
}
|
package/dist/collection/components/lottery-oddsbom-ticket-board/lottery-oddsbom-ticket-board.js
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
3
|
+
import "../../../../../lottery-oddsbom-bullet-group/dist/types/index";
|
|
4
|
+
import "../../../../../lottery-oddsbom-bullet/dist/types/index";
|
|
5
|
+
import "../../../../../lottery-tipping-dialog/dist/types/index";
|
|
6
|
+
import { showNotification } from "../../utils/utils";
|
|
7
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
8
|
+
import { MAX_DISPLAY_OPTION_NUM } from "../../model/index.type";
|
|
9
|
+
export class LotteryOddsbomTicketBoard {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.ticketBoardInfo = undefined;
|
|
12
|
+
this.mbSource = undefined;
|
|
13
|
+
this.clientStyling = undefined;
|
|
14
|
+
this.clientStylingUrl = undefined;
|
|
15
|
+
this.language = 'en';
|
|
16
|
+
this.translationUrl = '';
|
|
17
|
+
this.addSelectionConfig = undefined;
|
|
18
|
+
this.bulletsConfig = undefined;
|
|
19
|
+
this.isInputInvalid = false;
|
|
20
|
+
this.errorMessage = '';
|
|
21
|
+
this.dialogConfig = {
|
|
22
|
+
width: '400px',
|
|
23
|
+
visible: false,
|
|
24
|
+
onConfirm: () => this.handleFillInAddMore(),
|
|
25
|
+
onCancel: () => this.handleCloseAddMoreDialog()
|
|
26
|
+
};
|
|
27
|
+
this.curAddMoreInfo = { matchIdx: 0, selectionIdx: 0, value: '' };
|
|
28
|
+
}
|
|
29
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
30
|
+
if (newValue != oldValue) {
|
|
31
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
35
|
+
if (newValue != oldValue) {
|
|
36
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
40
|
+
if (newValue != oldValue) {
|
|
41
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
if (this.translationUrl) {
|
|
46
|
+
getTranslations(JSON.parse(this.translationUrl));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
handleOddsbomBulletGroupToggle(event) {
|
|
50
|
+
const { bulletConfigArr } = event.detail;
|
|
51
|
+
this.bulletsConfig = bulletConfigArr;
|
|
52
|
+
}
|
|
53
|
+
handleOddsbomBulletCallDialogFromGroup(event) {
|
|
54
|
+
const { matchIdx, selectionIdx } = event.detail;
|
|
55
|
+
this.curAddMoreInfo = Object.assign(Object.assign({}, this.curAddMoreInfo), { matchIdx, selectionIdx });
|
|
56
|
+
this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: true });
|
|
57
|
+
}
|
|
58
|
+
handleFillInAddMore() {
|
|
59
|
+
if (this.isInputInvalid) {
|
|
60
|
+
this.handleCloseAddMoreDialog();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const { matchIdx, selectionIdx, value } = this.curAddMoreInfo;
|
|
64
|
+
this.oddsbomAddMoreToMatchEvent.emit({ matchIdx, selectionIdx, value });
|
|
65
|
+
this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: false });
|
|
66
|
+
this.curAddMoreInfo = Object.assign(Object.assign({}, this.curAddMoreInfo), { value: '' });
|
|
67
|
+
}
|
|
68
|
+
handleCloseAddMoreDialog() {
|
|
69
|
+
this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: false });
|
|
70
|
+
this.curAddMoreInfo = Object.assign(Object.assign({}, this.curAddMoreInfo), { value: '' });
|
|
71
|
+
this.isInputInvalid = false;
|
|
72
|
+
this.errorMessage = '';
|
|
73
|
+
}
|
|
74
|
+
handleClearAllSelection() {
|
|
75
|
+
this.oddsbomBoardClearEvent.emit();
|
|
76
|
+
showNotification({ message: translate('selectionCleared', this.language) });
|
|
77
|
+
}
|
|
78
|
+
validateInput(value) {
|
|
79
|
+
const numValue = Number(value);
|
|
80
|
+
if (isNaN(numValue)) {
|
|
81
|
+
this.isInputInvalid = true;
|
|
82
|
+
this.errorMessage = translate('enterValidNumber', this.language);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (numValue < MAX_DISPLAY_OPTION_NUM || numValue > this.addSelectionConfig.maxScore) {
|
|
86
|
+
this.isInputInvalid = true;
|
|
87
|
+
this.errorMessage = translate('enterNumberBetween', this.language, {
|
|
88
|
+
min: MAX_DISPLAY_OPTION_NUM,
|
|
89
|
+
max: this.addSelectionConfig.maxScore
|
|
90
|
+
});
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const { matchIdx, selectionIdx } = this.curAddMoreInfo;
|
|
94
|
+
const selections = this.ticketBoardInfo[matchIdx].addSelections[selectionIdx];
|
|
95
|
+
if (selections.some((s) => Number(s) === Number(value))) {
|
|
96
|
+
this.isInputInvalid = true;
|
|
97
|
+
this.errorMessage = translate('numberAlreadySelected', this.language);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.isInputInvalid = false;
|
|
101
|
+
this.errorMessage = '';
|
|
102
|
+
}
|
|
103
|
+
handleInputChange(e) {
|
|
104
|
+
const inputElement = e.target;
|
|
105
|
+
const value = inputElement.value;
|
|
106
|
+
this.curAddMoreInfo = Object.assign(Object.assign({}, this.curAddMoreInfo), { value: value });
|
|
107
|
+
this.validateInput(value);
|
|
108
|
+
}
|
|
109
|
+
componentDidLoad() {
|
|
110
|
+
if (this.stylingContainer) {
|
|
111
|
+
if (this.mbSource)
|
|
112
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
113
|
+
if (this.clientStyling)
|
|
114
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
115
|
+
if (this.clientStylingUrl)
|
|
116
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
disconnectedCallback() {
|
|
120
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
return (h("div", { key: '7cacb40559ce42eed5c03326d830461c9dbd2708', class: "oddsbomTicketBoard", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'b1c7f38a621320949049f26745232d2a34d644e8', class: "oddsbomTicketBoard-btn" }, h("lottery-oddsbom-ticket-button", { key: 'ff6c51b5a115cf46e4fc6df5b725a8233a55fa0f', onClick: this.handleClearAllSelection.bind(this), text: translate('clearAll', this.language), variant: "outline" })), this.ticketBoardInfo.length ? (h("div", { class: "oddsbomTicketBoard-list" }, this.ticketBoardInfo.map((item, idx) => {
|
|
124
|
+
return (h("div", { class: "oddsbomTicketBoard-item" }, h("div", { class: "oddsbomTicketBoard-item-header" }, `${idx + 1}. ${item.matchName}`), h("div", { class: "oddsbomTicketBoard-item-match" }, h("div", { class: "oddsbomTicketBoard-item-match--left" }, item.matchName.split('vs')[0]), h("div", { class: "oddsbomTicketBoard-item-match--right" }, h("lottery-oddsbom-bullet-group", { bulletConfigs: item.selections[0], selectionIdx: 0, matchIdx: idx, addSelectionConfig: this.addSelectionConfig }))), h("div", { class: "oddsbomTicketBoard-item-match" }, h("div", { class: "oddsbomTicketBoard-item-match--left" }, item.matchName.split('vs')[1]), h("div", { class: "oddsbomTicketBoard-item-match--right" }, h("lottery-oddsbom-bullet-group", { bulletConfigs: item.selections[1], selectionIdx: 1, matchIdx: idx, addSelectionConfig: this.addSelectionConfig })))));
|
|
125
|
+
}))) : (h("div", { class: "oddsbomTicketBoard-noData" }, translate('noTicketBoard', this.language))), h("lottery-tipping-dialog", { key: 'dbaf34154fcf9a16d3210f03345d80c4a5354125', visible: this.dialogConfig.visible, width: this.dialogConfig.width, onCancel: this.handleCloseAddMoreDialog.bind(this) }, h("div", { key: '93370ed84ff6e3483214307e45cb46f767712343', class: "addSelectionDialog" }, h("div", { key: 'ec774960c7f0bc25dc2d2e55d7b185d520dbbe27', class: "addSelectionDialog-title" }, translate('enterScoreUpTo', this.language, {
|
|
126
|
+
maxScore: this.addSelectionConfig.maxScore
|
|
127
|
+
})), h("input", { key: 'd21da9e15f671a9790b343674af722394c5599ce', type: "text", class: {
|
|
128
|
+
'dialog-input': true,
|
|
129
|
+
invalid: this.isInputInvalid
|
|
130
|
+
}, value: this.curAddMoreInfo.value, onInput: this.handleInputChange.bind(this) }), h("div", { key: 'ebe2c70cd8a5ba10bdfdc99178356677cd076621', class: "error-message" }, this.errorMessage)), h("div", { key: '31ff21b79c853c9f46fc8e8ba0f33b39bf2cda4f', slot: "footer", class: "addSelectionDialog-footer" }, h("lottery-oddsbom-ticket-button", { key: '34a4edbfae9233b0ee47ffd929901ad7fe991ffe', onClick: this.dialogConfig.onCancel, text: translate('cancel', this.language), variant: "outline" }), h("lottery-oddsbom-ticket-button", { key: 'd0ff9fb20917bd30d88b2aaa87cb863069a88328', onClick: this.dialogConfig.onConfirm, text: translate('confirm', this.language), variant: "primary", disabled: !this.curAddMoreInfo.value })))));
|
|
131
|
+
}
|
|
132
|
+
static get is() { return "lottery-oddsbom-ticket-board"; }
|
|
133
|
+
static get encapsulation() { return "shadow"; }
|
|
134
|
+
static get originalStyleUrls() {
|
|
135
|
+
return {
|
|
136
|
+
"$": ["lottery-oddsbom-ticket-board.scss"]
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static get styleUrls() {
|
|
140
|
+
return {
|
|
141
|
+
"$": ["lottery-oddsbom-ticket-board.css"]
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static get properties() {
|
|
145
|
+
return {
|
|
146
|
+
"ticketBoardInfo": {
|
|
147
|
+
"type": "unknown",
|
|
148
|
+
"mutable": false,
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "Array<TicketBoardItem>",
|
|
151
|
+
"resolved": "TicketBoardItem[]",
|
|
152
|
+
"references": {
|
|
153
|
+
"Array": {
|
|
154
|
+
"location": "global",
|
|
155
|
+
"id": "global::Array"
|
|
156
|
+
},
|
|
157
|
+
"TicketBoardItem": {
|
|
158
|
+
"location": "import",
|
|
159
|
+
"path": "../../model/index.type",
|
|
160
|
+
"id": "../../../../packages/stencil/lottery-oddsbom-ticket-bet/src/model/index.type.ts::TicketBoardItem"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": false,
|
|
165
|
+
"optional": false,
|
|
166
|
+
"docs": {
|
|
167
|
+
"tags": [],
|
|
168
|
+
"text": ""
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"mbSource": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "string",
|
|
176
|
+
"resolved": "string",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": ""
|
|
184
|
+
},
|
|
185
|
+
"attribute": "mb-source",
|
|
186
|
+
"reflect": true
|
|
187
|
+
},
|
|
188
|
+
"clientStyling": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"mutable": false,
|
|
191
|
+
"complexType": {
|
|
192
|
+
"original": "string",
|
|
193
|
+
"resolved": "string",
|
|
194
|
+
"references": {}
|
|
195
|
+
},
|
|
196
|
+
"required": false,
|
|
197
|
+
"optional": false,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [],
|
|
200
|
+
"text": ""
|
|
201
|
+
},
|
|
202
|
+
"attribute": "client-styling",
|
|
203
|
+
"reflect": true
|
|
204
|
+
},
|
|
205
|
+
"clientStylingUrl": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"mutable": false,
|
|
208
|
+
"complexType": {
|
|
209
|
+
"original": "string",
|
|
210
|
+
"resolved": "string",
|
|
211
|
+
"references": {}
|
|
212
|
+
},
|
|
213
|
+
"required": false,
|
|
214
|
+
"optional": false,
|
|
215
|
+
"docs": {
|
|
216
|
+
"tags": [],
|
|
217
|
+
"text": ""
|
|
218
|
+
},
|
|
219
|
+
"attribute": "client-styling-url",
|
|
220
|
+
"reflect": true
|
|
221
|
+
},
|
|
222
|
+
"language": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "string",
|
|
227
|
+
"resolved": "string",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": ""
|
|
235
|
+
},
|
|
236
|
+
"attribute": "language",
|
|
237
|
+
"reflect": true,
|
|
238
|
+
"defaultValue": "'en'"
|
|
239
|
+
},
|
|
240
|
+
"translationUrl": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"mutable": false,
|
|
243
|
+
"complexType": {
|
|
244
|
+
"original": "string",
|
|
245
|
+
"resolved": "string",
|
|
246
|
+
"references": {}
|
|
247
|
+
},
|
|
248
|
+
"required": false,
|
|
249
|
+
"optional": false,
|
|
250
|
+
"docs": {
|
|
251
|
+
"tags": [],
|
|
252
|
+
"text": ""
|
|
253
|
+
},
|
|
254
|
+
"attribute": "translation-url",
|
|
255
|
+
"reflect": true,
|
|
256
|
+
"defaultValue": "''"
|
|
257
|
+
},
|
|
258
|
+
"addSelectionConfig": {
|
|
259
|
+
"type": "unknown",
|
|
260
|
+
"mutable": false,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "AddSelectionConfig",
|
|
263
|
+
"resolved": "AddSelectionConfig",
|
|
264
|
+
"references": {
|
|
265
|
+
"AddSelectionConfig": {
|
|
266
|
+
"location": "import",
|
|
267
|
+
"path": "../../model/index.type",
|
|
268
|
+
"id": "../../../../packages/stencil/lottery-oddsbom-ticket-bet/src/model/index.type.ts::AddSelectionConfig"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": false,
|
|
273
|
+
"optional": false,
|
|
274
|
+
"docs": {
|
|
275
|
+
"tags": [],
|
|
276
|
+
"text": ""
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
static get states() {
|
|
282
|
+
return {
|
|
283
|
+
"bulletsConfig": {},
|
|
284
|
+
"isInputInvalid": {},
|
|
285
|
+
"errorMessage": {},
|
|
286
|
+
"dialogConfig": {},
|
|
287
|
+
"curAddMoreInfo": {}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
static get events() {
|
|
291
|
+
return [{
|
|
292
|
+
"method": "oddsbomBoardClearEvent",
|
|
293
|
+
"name": "oddsbomBoardClear",
|
|
294
|
+
"bubbles": true,
|
|
295
|
+
"cancelable": true,
|
|
296
|
+
"composed": true,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": ""
|
|
300
|
+
},
|
|
301
|
+
"complexType": {
|
|
302
|
+
"original": "void",
|
|
303
|
+
"resolved": "void",
|
|
304
|
+
"references": {}
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
"method": "oddsbomAddMoreToMatchEvent",
|
|
308
|
+
"name": "oddsbomAddMoreToMatch",
|
|
309
|
+
"bubbles": true,
|
|
310
|
+
"cancelable": true,
|
|
311
|
+
"composed": true,
|
|
312
|
+
"docs": {
|
|
313
|
+
"tags": [],
|
|
314
|
+
"text": ""
|
|
315
|
+
},
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "{\n matchIdx: number;\n selectionIdx: number;\n value: string;\n }",
|
|
318
|
+
"resolved": "{ matchIdx: number; selectionIdx: number; value: string; }",
|
|
319
|
+
"references": {}
|
|
320
|
+
}
|
|
321
|
+
}];
|
|
322
|
+
}
|
|
323
|
+
static get watchers() {
|
|
324
|
+
return [{
|
|
325
|
+
"propName": "clientStyling",
|
|
326
|
+
"methodName": "handleClientStylingChange"
|
|
327
|
+
}, {
|
|
328
|
+
"propName": "clientStylingUrl",
|
|
329
|
+
"methodName": "handleClientStylingUrlChange"
|
|
330
|
+
}, {
|
|
331
|
+
"propName": "mbSource",
|
|
332
|
+
"methodName": "handleMbSourceChange"
|
|
333
|
+
}];
|
|
334
|
+
}
|
|
335
|
+
static get listeners() {
|
|
336
|
+
return [{
|
|
337
|
+
"name": "oddsbomBulletGroupToggle",
|
|
338
|
+
"method": "handleOddsbomBulletGroupToggle",
|
|
339
|
+
"target": undefined,
|
|
340
|
+
"capture": false,
|
|
341
|
+
"passive": false
|
|
342
|
+
}, {
|
|
343
|
+
"name": "oddsbomBulletCallDialogFromGroup",
|
|
344
|
+
"method": "handleOddsbomBulletCallDialogFromGroup",
|
|
345
|
+
"target": undefined,
|
|
346
|
+
"capture": false,
|
|
347
|
+
"passive": false
|
|
348
|
+
}];
|
|
349
|
+
}
|
|
350
|
+
}
|
package/dist/collection/components/lottery-oddsbom-ticket-button/lottery-oddsbom-ticket-button.css
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.btn {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
border: 1px solid transparent;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
outline: none;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
transition: background-color 0.2s, border-color 0.2s, color 0.2s;
|
|
18
|
+
user-select: none;
|
|
19
|
+
-webkit-tap-highlight-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
.btn .content {
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
.btn:disabled {
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
}
|
|
28
|
+
.btn .loading-container {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
.btn--loading {
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
.btn .spinner {
|
|
36
|
+
display: inline-block;
|
|
37
|
+
width: 1em;
|
|
38
|
+
height: 1em;
|
|
39
|
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
border-top-color: white;
|
|
42
|
+
animation: spin 1s ease-in-out infinite;
|
|
43
|
+
margin-left: 0.5em;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
}
|
|
46
|
+
.btn--small .spinner {
|
|
47
|
+
width: 0.8em;
|
|
48
|
+
height: 0.8em;
|
|
49
|
+
}
|
|
50
|
+
.btn--large .spinner {
|
|
51
|
+
width: 1.2em;
|
|
52
|
+
height: 1.2em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes spin {
|
|
56
|
+
to {
|
|
57
|
+
transform: rotate(360deg);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/* Primary Variant */
|
|
61
|
+
.btn--primary {
|
|
62
|
+
background-color: var(--emw--color-primary, #0d196e);
|
|
63
|
+
color: var(--emw--color-typography-inverse, #fff);
|
|
64
|
+
}
|
|
65
|
+
.btn--primary:hover:not(:disabled) {
|
|
66
|
+
background-color: var(--emw--color-primary-variant, #1367e7);
|
|
67
|
+
}
|
|
68
|
+
.btn--primary:active:not(:disabled) {
|
|
69
|
+
background-color: #08104a;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.btn--outline .spinner,
|
|
73
|
+
.btn--dashed .spinner,
|
|
74
|
+
.btn--text .spinner {
|
|
75
|
+
border-top-color: currentColor;
|
|
76
|
+
border-color: rgba(0, 0, 0, 0.2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Outline Variant */
|
|
80
|
+
.btn--outline {
|
|
81
|
+
background-color: var(--emw--color-background, #fff);
|
|
82
|
+
border-color: #dcdcdc;
|
|
83
|
+
color: var(--emw--color-typography, #000);
|
|
84
|
+
}
|
|
85
|
+
.btn--outline:hover:not(:disabled) {
|
|
86
|
+
background-color: var(--emw--color-background-tertiary, #ccc);
|
|
87
|
+
border-color: #a6a6a6;
|
|
88
|
+
}
|
|
89
|
+
.btn--outline:active:not(:disabled) {
|
|
90
|
+
background-color: #e6e6e6;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Dashed Variant */
|
|
94
|
+
.btn--dashed {
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
border-style: dashed;
|
|
97
|
+
border-color: #dcdcdc;
|
|
98
|
+
color: #333;
|
|
99
|
+
}
|
|
100
|
+
.btn--dashed:hover:not(:disabled) {
|
|
101
|
+
border-color: #a6a6a6;
|
|
102
|
+
color: #0052d9;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Text Variant */
|
|
106
|
+
.btn--text {
|
|
107
|
+
background-color: transparent;
|
|
108
|
+
color: #0052d9;
|
|
109
|
+
border-color: transparent;
|
|
110
|
+
}
|
|
111
|
+
.btn--text:hover:not(:disabled) {
|
|
112
|
+
background-color: #f2f2f2;
|
|
113
|
+
}
|
|
114
|
+
.btn--text:active:not(:disabled) {
|
|
115
|
+
background-color: #e6e6e6;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Size Variants */
|
|
119
|
+
.btn--small {
|
|
120
|
+
height: 28px;
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
padding: 0 12px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.btn--medium {
|
|
126
|
+
height: 34px;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
padding: 0 18px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.btn--large {
|
|
132
|
+
height: 40px;
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
padding: 0 24px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Ripple Effect */
|
|
138
|
+
.ripple-container {
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: 0;
|
|
141
|
+
left: 0;
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: 100%;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
pointer-events: none;
|
|
146
|
+
border-radius: inherit;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ripple {
|
|
150
|
+
position: absolute;
|
|
151
|
+
border-radius: 50%;
|
|
152
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
153
|
+
transform: scale(0);
|
|
154
|
+
animation: ripple-animation 600ms linear;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.btn--outline .ripple,
|
|
158
|
+
.btn--dashed .ripple,
|
|
159
|
+
.btn--text .ripple {
|
|
160
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes ripple-animation {
|
|
164
|
+
to {
|
|
165
|
+
transform: scale(4);
|
|
166
|
+
opacity: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|