@everymatrix/lottery-tipping-ticket-controller 1.87.27 → 1.87.29

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.
Files changed (30) hide show
  1. package/dist/cjs/general-tooltip_7.cjs.entry.js +380 -118
  2. package/dist/cjs/index.cjs.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{lottery-tipping-ticket-controller-38883843.js → lottery-tipping-ticket-controller-90ba14f0.js} +45 -15
  5. package/dist/cjs/lottery-tipping-ticket-controller.cjs.js +1 -1
  6. package/dist/collection/collection-manifest.json +7 -2
  7. package/dist/collection/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.js +13 -12
  8. package/dist/collection/models/index.js +10 -0
  9. package/dist/collection/utils/api.js +11 -1
  10. package/dist/collection/utils/locale.utils.js +1 -1
  11. package/dist/collection/utils/utils.js +14 -0
  12. package/dist/esm/general-tooltip_7.entry.js +381 -119
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/{lottery-tipping-ticket-controller-7714da55.js → lottery-tipping-ticket-controller-f46b8ced.js} +46 -14
  16. package/dist/esm/lottery-tipping-ticket-controller.js +1 -1
  17. package/dist/lottery-tipping-ticket-controller/general-tooltip_7.entry.js +1 -1
  18. package/dist/lottery-tipping-ticket-controller/index.esm.js +1 -1
  19. package/dist/lottery-tipping-ticket-controller/{lottery-tipping-ticket-controller-7714da55.js → lottery-tipping-ticket-controller-f46b8ced.js} +1 -1
  20. package/dist/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.esm.js +1 -1
  21. package/dist/types/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.d.ts +3 -1
  22. package/dist/types/components.d.ts +0 -55
  23. package/dist/types/models/index.d.ts +181 -0
  24. package/dist/types/utils/utils.d.ts +2 -0
  25. package/package.json +1 -1
  26. package/dist/collection/components/lottery-tipping-ticket-banner/locale.utils.js +0 -36
  27. package/dist/collection/components/lottery-tipping-ticket-banner/lottery-tipping-ticket-banner.css +0 -73
  28. package/dist/collection/components/lottery-tipping-ticket-banner/lottery-tipping-ticket-banner.js +0 -259
  29. package/dist/types/components/lottery-tipping-ticket-banner/locale.utils.d.ts +0 -2
  30. package/dist/types/components/lottery-tipping-ticket-banner/lottery-tipping-ticket-banner.d.ts +0 -28
@@ -1,36 +0,0 @@
1
- const DEFAULT_LANGUAGE = 'en';
2
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
3
- const TRANSLATIONS = {
4
- en: {
5
- stop: 'Stop',
6
- at: 'at',
7
- turnover: 'Turnover: '
8
- },
9
- ro: {
10
- stop: 'Oprește',
11
- at: 'la'
12
- },
13
- fr: {
14
- stop: 'Arrêtez',
15
- at: 'à'
16
- },
17
- ar: {
18
- stop: 'توقف',
19
- at: 'في'
20
- },
21
- hr: {
22
- stop: 'Stop',
23
- at: 'u'
24
- }
25
- };
26
- export const translate = (key, customLang) => {
27
- const lang = customLang;
28
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
29
- };
30
- export const getTranslations = (data) => {
31
- Object.keys(data).forEach((item) => {
32
- for (let key in data[item]) {
33
- TRANSLATIONS[item][key] = data[item][key];
34
- }
35
- });
36
- };
@@ -1,73 +0,0 @@
1
- .lottery-tipping-ticket-banner__container {
2
- font-family: system-ui, sans-serif;
3
- font-size: 14px;
4
- container-type: inline-size;
5
- }
6
-
7
- .banner {
8
- display: flex;
9
- flex-wrap: wrap;
10
- align-items: center;
11
- justify-content: space-between;
12
- padding: 0 1rem;
13
- background: var(--emw--color-primary, #fed275);
14
- border-top: 2px solid var(--emw--color-primary, #fed275);
15
- border-bottom: 2px solid var(--emw--color-primary, #fed275);
16
- gap: 0.5rem;
17
- white-space: nowrap;
18
- position: relative;
19
- height: 46px;
20
- }
21
-
22
- .left {
23
- flex: 1;
24
- gap: 0.4rem;
25
- }
26
- .left .logo {
27
- width: 216px;
28
- position: absolute;
29
- top: -7px;
30
- }
31
-
32
- .brand {
33
- font-weight: 700;
34
- color: var(--emw--color-typography, #000);
35
- }
36
-
37
- .mid {
38
- flex: 1;
39
- font-size: 1.5rem;
40
- font-weight: 800;
41
- font-style: italic;
42
- letter-spacing: 0.04em;
43
- color: var(--emw--color-typography, #000);
44
- text-align: center;
45
- }
46
-
47
- .right {
48
- flex: 1;
49
- display: flex;
50
- gap: 0.4rem;
51
- flex-wrap: wrap;
52
- justify-content: flex-end;
53
- }
54
-
55
- @container (max-width: 420px) {
56
- .mid {
57
- text-align: right;
58
- }
59
- .right {
60
- justify-content: center;
61
- }
62
- }
63
- .pill {
64
- padding: 0.25rem 0.7rem;
65
- font-size: 0.9rem;
66
- color: var(--emw--color-gray-400, #000);
67
- display: inline-flex;
68
- align-items: baseline;
69
- }
70
-
71
- .pill > strong {
72
- font-weight: 700;
73
- }
@@ -1,259 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
- import { isToday } from "date-fns";
4
- import { resolveTranslationUrl } from "../../utils/locale.utils";
5
- import { formatDate } from "../../utils/utils";
6
- import { translate } from "./locale.utils";
7
- export class LotteryTippingTicketBanner {
8
- constructor() {
9
- this.mbSource = undefined;
10
- this.clientStyling = undefined;
11
- this.clientStylingUrl = undefined;
12
- this.language = 'en';
13
- this.translationUrl = '';
14
- this.logoUrl = undefined;
15
- this.stopTime = '';
16
- this.period = undefined;
17
- this.formattedTurnover = undefined;
18
- }
19
- get formattedStopTime() {
20
- let _temp = '';
21
- if (!this.stopTime) {
22
- return _temp;
23
- }
24
- _temp = formatDate({ date: this.stopTime, format: 'dd/MM/yyyy HH:mm' });
25
- if (isToday(new Date(this.stopTime))) {
26
- _temp = formatDate({ date: this.stopTime, format: 'HH:mm' });
27
- }
28
- return _temp;
29
- }
30
- get formattedPeriod() {
31
- let _temp = '';
32
- _temp = formatDate({ date: this.period, format: 'EEEE' });
33
- if (_temp.toLowerCase() === 'wednesday') {
34
- _temp = 'MIDWEEK';
35
- }
36
- return _temp.toUpperCase();
37
- }
38
- handleClientStylingChange(newValue, oldValue) {
39
- if (newValue != oldValue) {
40
- setClientStyling(this.stylingContainer, this.clientStyling);
41
- }
42
- }
43
- handleClientStylingUrlChange(newValue, oldValue) {
44
- if (newValue != oldValue) {
45
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
46
- }
47
- }
48
- handleMbSourceChange(newValue, oldValue) {
49
- if (newValue != oldValue) {
50
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
51
- }
52
- }
53
- async componentWillLoad() {
54
- if (this.translationUrl) {
55
- resolveTranslationUrl(this.translationUrl);
56
- }
57
- }
58
- componentDidLoad() {
59
- if (this.stylingContainer) {
60
- if (this.mbSource)
61
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
62
- if (this.clientStyling)
63
- setClientStyling(this.stylingContainer, this.clientStyling);
64
- if (this.clientStylingUrl)
65
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
66
- }
67
- }
68
- disconnectedCallback() {
69
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
70
- }
71
- render() {
72
- return (h("div", { key: 'e9286d0a6a9433698703b9c04d6d50892a7b3168', ref: (el) => (this.stylingContainer = el), class: "lottery-tipping-ticket-banner__container" }, h("section", { key: 'd787e64156f76cf6d12bd552513971301534860c', class: "banner" }, h("div", { key: '027baf0c88733d1430801c96b5b338f79f92f22c', class: "left" }, this.logoUrl && h("img", { key: '7b41d5635a2121ccf394aca19de48e10e9a93357', alt: "Betting", src: this.logoUrl, class: "logo" })), h("div", { key: '73e6c3ffa336b020a3819a72b71117b8084381b1', class: "mid period" }, this.formattedPeriod), h("div", { key: '922ae894814157f68aa8f0774c8aa5ca06e1e7cd', class: "right" }, h("span", { key: 'efaf79b1ff5617f2ba92cfef464232041cd87fbf', class: "pill" }, h("strong", { key: 'c842562b15a13407038933da9d1cc7c6fafa0b76' }, translate('stop', this.language)), "\u00A0", translate('at', this.language), "\u00A0", this.formattedStopTime), h("span", { key: '3e79a5ec17cbcf0896d58196286fa0b637988f69', class: "pill" }, h("strong", { key: '1158b00abffb1c6bf04e9eec10b4c996d04f118e' }, translate('turnover', this.language)), "\u00A0", this.formattedTurnover)))));
73
- }
74
- static get is() { return "lottery-tipping-ticket-banner"; }
75
- static get encapsulation() { return "shadow"; }
76
- static get originalStyleUrls() {
77
- return {
78
- "$": ["lottery-tipping-ticket-banner.scss"]
79
- };
80
- }
81
- static get styleUrls() {
82
- return {
83
- "$": ["lottery-tipping-ticket-banner.css"]
84
- };
85
- }
86
- static get assetsDirs() { return ["../static"]; }
87
- static get properties() {
88
- return {
89
- "mbSource": {
90
- "type": "string",
91
- "mutable": false,
92
- "complexType": {
93
- "original": "string",
94
- "resolved": "string",
95
- "references": {}
96
- },
97
- "required": false,
98
- "optional": false,
99
- "docs": {
100
- "tags": [],
101
- "text": ""
102
- },
103
- "attribute": "mb-source",
104
- "reflect": true
105
- },
106
- "clientStyling": {
107
- "type": "string",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "string",
111
- "resolved": "string",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": false,
116
- "docs": {
117
- "tags": [],
118
- "text": ""
119
- },
120
- "attribute": "client-styling",
121
- "reflect": true
122
- },
123
- "clientStylingUrl": {
124
- "type": "string",
125
- "mutable": false,
126
- "complexType": {
127
- "original": "string",
128
- "resolved": "string",
129
- "references": {}
130
- },
131
- "required": false,
132
- "optional": false,
133
- "docs": {
134
- "tags": [],
135
- "text": ""
136
- },
137
- "attribute": "client-styling-url",
138
- "reflect": true
139
- },
140
- "language": {
141
- "type": "string",
142
- "mutable": false,
143
- "complexType": {
144
- "original": "string",
145
- "resolved": "string",
146
- "references": {}
147
- },
148
- "required": false,
149
- "optional": false,
150
- "docs": {
151
- "tags": [],
152
- "text": ""
153
- },
154
- "attribute": "language",
155
- "reflect": true,
156
- "defaultValue": "'en'"
157
- },
158
- "translationUrl": {
159
- "type": "string",
160
- "mutable": false,
161
- "complexType": {
162
- "original": "string",
163
- "resolved": "string",
164
- "references": {}
165
- },
166
- "required": false,
167
- "optional": false,
168
- "docs": {
169
- "tags": [],
170
- "text": ""
171
- },
172
- "attribute": "translation-url",
173
- "reflect": true,
174
- "defaultValue": "''"
175
- },
176
- "logoUrl": {
177
- "type": "string",
178
- "mutable": false,
179
- "complexType": {
180
- "original": "string",
181
- "resolved": "string",
182
- "references": {}
183
- },
184
- "required": false,
185
- "optional": false,
186
- "docs": {
187
- "tags": [],
188
- "text": "logo image URL for the header section"
189
- },
190
- "attribute": "logo-url",
191
- "reflect": true
192
- },
193
- "stopTime": {
194
- "type": "string",
195
- "mutable": false,
196
- "complexType": {
197
- "original": "string",
198
- "resolved": "string",
199
- "references": {}
200
- },
201
- "required": false,
202
- "optional": false,
203
- "docs": {
204
- "tags": [],
205
- "text": "draw stop time"
206
- },
207
- "attribute": "stop-time",
208
- "reflect": false,
209
- "defaultValue": "''"
210
- },
211
- "period": {
212
- "type": "string",
213
- "mutable": false,
214
- "complexType": {
215
- "original": "string",
216
- "resolved": "string",
217
- "references": {}
218
- },
219
- "required": false,
220
- "optional": false,
221
- "docs": {
222
- "tags": [],
223
- "text": "draw period"
224
- },
225
- "attribute": "period",
226
- "reflect": false
227
- },
228
- "formattedTurnover": {
229
- "type": "string",
230
- "mutable": false,
231
- "complexType": {
232
- "original": "string",
233
- "resolved": "string",
234
- "references": {}
235
- },
236
- "required": false,
237
- "optional": false,
238
- "docs": {
239
- "tags": [],
240
- "text": "turnover formatted with unit and thousand separator"
241
- },
242
- "attribute": "formatted-turnover",
243
- "reflect": false
244
- }
245
- };
246
- }
247
- static get watchers() {
248
- return [{
249
- "propName": "clientStyling",
250
- "methodName": "handleClientStylingChange"
251
- }, {
252
- "propName": "clientStylingUrl",
253
- "methodName": "handleClientStylingUrlChange"
254
- }, {
255
- "propName": "mbSource",
256
- "methodName": "handleMbSourceChange"
257
- }];
258
- }
259
- }
@@ -1,2 +0,0 @@
1
- export declare const translate: (key: string, customLang?: any) => string;
2
- export declare const getTranslations: (data: any) => void;
@@ -1,28 +0,0 @@
1
- export declare class LotteryTippingTicketBanner {
2
- mbSource: string;
3
- clientStyling: string;
4
- clientStylingUrl: string;
5
- language: string;
6
- translationUrl: string;
7
- /**
8
- * logo image URL for the header section
9
- */
10
- logoUrl: string;
11
- private stylingContainer;
12
- private stylingSubscription;
13
- /** draw stop time */
14
- stopTime: string;
15
- /** draw period */
16
- period: string;
17
- /** turnover formatted with unit and thousand separator */
18
- formattedTurnover: string;
19
- get formattedStopTime(): string;
20
- get formattedPeriod(): string;
21
- handleClientStylingChange(newValue: any, oldValue: any): void;
22
- handleClientStylingUrlChange(newValue: any, oldValue: any): void;
23
- handleMbSourceChange(newValue: any, oldValue: any): void;
24
- componentWillLoad(): Promise<void>;
25
- componentDidLoad(): void;
26
- disconnectedCallback(): void;
27
- render(): any;
28
- }