@everymatrix/helper-tabs 1.52.6 → 1.53.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-tab_2.cjs.entry.js +104 -28
- package/dist/cjs/helper-tabs.cjs.js +3 -3
- package/dist/cjs/{index-7158b6b0.js → index-d6d883c7.js} +164 -69
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/helper-tab/helper-tab.css +1 -1
- package/dist/collection/components/helper-tab/helper-tab.js +126 -14
- package/dist/collection/components/helper-tabs/helper-tabs.css +7 -7
- package/dist/collection/components/helper-tabs/helper-tabs.js +124 -11
- package/dist/collection/utils/locale.utils.js +49 -0
- package/dist/esm/helper-tab_2.entry.js +104 -28
- package/dist/esm/helper-tabs.js +4 -4
- package/dist/esm/{index-93aaed58.js → index-308251f5.js} +164 -69
- package/dist/esm/loader.js +3 -3
- package/dist/helper-tabs/helper-tabs.esm.js +1 -1
- package/dist/helper-tabs/p-a87ee1cf.entry.js +1 -0
- package/dist/helper-tabs/p-aac7c96a.js +2 -0
- package/dist/types/components/helper-tab/helper-tab.d.ts +20 -1
- package/dist/types/components/helper-tabs/helper-tabs.d.ts +16 -0
- package/dist/types/components.d.ts +72 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/helper-tabs/p-34cddd95.entry.js +0 -1
- package/dist/helper-tabs/p-8be01f9b.js +0 -2
|
@@ -1,11 +1,79 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-308251f5.js';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['en'];
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
numbersFrom: 'Each play includes one set of numbers from',
|
|
8
|
+
to: 'to',
|
|
9
|
+
selectableNumber: 'with a selectable number of',
|
|
10
|
+
minimumSelection: 'and a minimum selection of',
|
|
11
|
+
winnings: 'The winnings are automatically credited to your account.',
|
|
12
|
+
register: 'Register or Login',
|
|
13
|
+
butTickets: 'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',
|
|
14
|
+
reviewPurchase: "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",
|
|
15
|
+
odds: 'What are my odds of winning?',
|
|
16
|
+
winGame: 'How can I find out if I’ve won a draw game?',
|
|
17
|
+
claimPrize: 'How do I claim my prize?'
|
|
18
|
+
},
|
|
19
|
+
ro: {
|
|
20
|
+
numbersFrom: 'Each play includes one set of numbers from',
|
|
21
|
+
to: 'to',
|
|
22
|
+
selectableNumber: 'with a selectable number of',
|
|
23
|
+
minimumSelection: 'and a minimum selection of',
|
|
24
|
+
winnings: 'The winnings are automatically credited to your account.'
|
|
25
|
+
},
|
|
26
|
+
fr: {
|
|
27
|
+
numbersFrom: 'Each play includes one set of numbers from',
|
|
28
|
+
to: 'to',
|
|
29
|
+
selectableNumber: 'with a selectable number of',
|
|
30
|
+
minimumSelection: 'and a minimum selection of',
|
|
31
|
+
winnings: 'The winnings are automatically credited to your account.'
|
|
32
|
+
},
|
|
33
|
+
ar: {
|
|
34
|
+
numbersFrom: 'Each play includes one set of numbers from',
|
|
35
|
+
to: 'to',
|
|
36
|
+
selectableNumber: 'with a selectable number of',
|
|
37
|
+
minimumSelection: 'and a minimum selection of',
|
|
38
|
+
winnings: 'The winnings are automatically credited to your account.'
|
|
39
|
+
},
|
|
40
|
+
hr: {
|
|
41
|
+
numbersFrom: 'Each play includes one set of numbers from',
|
|
42
|
+
to: 'to',
|
|
43
|
+
selectableNumber: 'with a selectable number of',
|
|
44
|
+
minimumSelection: 'and a minimum selection of',
|
|
45
|
+
winnings: 'The winnings are automatically credited to your account.'
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const translate = (key, customLang) => {
|
|
49
|
+
const lang = customLang;
|
|
50
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";
|
|
4
54
|
const HelperTabStyle0 = helperTabCss;
|
|
5
55
|
|
|
6
56
|
const HelperTab = class {
|
|
7
57
|
constructor(hostRef) {
|
|
8
58
|
registerInstance(this, hostRef);
|
|
59
|
+
/**
|
|
60
|
+
* Selected index
|
|
61
|
+
*/
|
|
62
|
+
this.selectedIndex = 0;
|
|
63
|
+
/**
|
|
64
|
+
* Client custom styling via string
|
|
65
|
+
*/
|
|
66
|
+
this.clientStyling = '';
|
|
67
|
+
/**
|
|
68
|
+
* Client custom styling via url content
|
|
69
|
+
*/
|
|
70
|
+
this.clientStylingUrlContent = '';
|
|
71
|
+
/**
|
|
72
|
+
* Language of the widget
|
|
73
|
+
*/
|
|
74
|
+
this.language = 'en';
|
|
75
|
+
this.tabContent = '';
|
|
76
|
+
this.limitStylingAppends = false;
|
|
9
77
|
this.setClientStyling = () => {
|
|
10
78
|
let sheet = document.createElement('style');
|
|
11
79
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -18,17 +86,6 @@ const HelperTab = class {
|
|
|
18
86
|
this.stylingContainer.prepend(cssFile);
|
|
19
87
|
}, 1);
|
|
20
88
|
};
|
|
21
|
-
this.selectedIndex = 0;
|
|
22
|
-
this.cmsEndpoint = undefined;
|
|
23
|
-
this.clientStyling = '';
|
|
24
|
-
this.clientStylingUrlContent = '';
|
|
25
|
-
this.tabContent = '';
|
|
26
|
-
this.limitStylingAppends = false;
|
|
27
|
-
}
|
|
28
|
-
connectedCallback() {
|
|
29
|
-
/**
|
|
30
|
-
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
31
|
-
*/
|
|
32
89
|
}
|
|
33
90
|
componentDidRender() {
|
|
34
91
|
// start custom styling area
|
|
@@ -42,24 +99,53 @@ const HelperTab = class {
|
|
|
42
99
|
// end custom styling area
|
|
43
100
|
}
|
|
44
101
|
render() {
|
|
45
|
-
this.tabContent = h("div", { key: '
|
|
102
|
+
this.tabContent = h("div", { key: '8c2b3f0f34ccda482fd187218840f9a622698b1f', class: "TabContent", ref: el => this.stylingContainer = el }, translate('numbersFrom', this.language), " ", this.lowNumber, " ", translate('to', this.language), " ", this.highNumber, " ", translate('selectableNumber', this.language), " ", this.maxinumAllowed, " ", translate('minimumSelection', this.language), " ", this.minimumAllowed, ". ", translate('winnings', this.language));
|
|
46
103
|
if (this.selectedIndex + 1 == 2) {
|
|
47
|
-
this.tabContent = h("div", { key: '
|
|
104
|
+
this.tabContent = h("div", { key: '2950bb6ccdd98761099d12239881ab29da4b2213', class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", { key: '0da821f45e855155003809cb4c84eaa8d25f1f2a' }, h("li", { key: '15d4f064c62319c6611baa3693f4ef297309c786' }, translate('register', this.language)), h("li", { key: '4933c6970d4044aac746abb398f7c255b0484f6a' }, translate('butTickets', this.language)), h("li", { key: 'ffe7cef3e53bd281173384756476acd2e0e8f148' }, translate('reviewPurchase', this.language))));
|
|
48
105
|
}
|
|
49
106
|
else if (this.selectedIndex + 1 == 3) {
|
|
50
|
-
this.tabContent = h("div", { key: '
|
|
107
|
+
this.tabContent = h("div", { key: '296c83d55150c67522cea9cb1fc10f3542c72452', class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", { key: '3fc772a007d0f73e0692021a2f700bab5807bb85' }, h("li", { key: 'fd6e459a0536261d98e42e37a272f229d152dfb7' }, translate('odds', this.language)), h("li", { key: 'ae7e5bceb217c9ceb1303145ae83f05fddd7dde6' }, translate('winGame', this.language)), h("li", { key: 'a094c7ea0db72683fb134f010d22f02b61f25a4b' }, translate('claimPrize', this.language))));
|
|
51
108
|
}
|
|
52
109
|
return (this.tabContent);
|
|
53
110
|
}
|
|
54
111
|
};
|
|
55
112
|
HelperTab.style = HelperTabStyle0;
|
|
56
113
|
|
|
57
|
-
const helperTabsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background
|
|
114
|
+
const helperTabsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-typography, #009993);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-gray-50, #F1F1F1)}.TabButton.Active{background:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}";
|
|
58
115
|
const HelperTabsStyle0 = helperTabsCss;
|
|
59
116
|
|
|
60
117
|
const HelperTabs = class {
|
|
61
118
|
constructor(hostRef) {
|
|
62
119
|
registerInstance(this, hostRef);
|
|
120
|
+
/**
|
|
121
|
+
* Tell me if it is disabled
|
|
122
|
+
*/
|
|
123
|
+
this.disabled = false;
|
|
124
|
+
/**
|
|
125
|
+
* Tell me what tab is selected
|
|
126
|
+
*/
|
|
127
|
+
this.selected = false;
|
|
128
|
+
/**
|
|
129
|
+
* Default selected index
|
|
130
|
+
*/
|
|
131
|
+
this.selectedIndex = 0;
|
|
132
|
+
/**
|
|
133
|
+
* Tabs details
|
|
134
|
+
*/
|
|
135
|
+
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
136
|
+
/**
|
|
137
|
+
* Client custom styling via string
|
|
138
|
+
*/
|
|
139
|
+
this.clientStyling = '';
|
|
140
|
+
/**
|
|
141
|
+
* Client custom styling via url
|
|
142
|
+
*/
|
|
143
|
+
this.clientStylingurl = '';
|
|
144
|
+
/**
|
|
145
|
+
* Client custom styling via url content
|
|
146
|
+
*/
|
|
147
|
+
this.clientStylingUrlContent = '';
|
|
148
|
+
this.limitStylingAppends = false;
|
|
63
149
|
this.setClientStyling = () => {
|
|
64
150
|
let sheet = document.createElement('style');
|
|
65
151
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -72,16 +158,6 @@ const HelperTabs = class {
|
|
|
72
158
|
this.stylingContainer.prepend(cssFile);
|
|
73
159
|
}, 1);
|
|
74
160
|
};
|
|
75
|
-
this.disabled = false;
|
|
76
|
-
this.label = undefined;
|
|
77
|
-
this.selected = false;
|
|
78
|
-
this.cmsEndpoint = undefined;
|
|
79
|
-
this.selectedIndex = 0;
|
|
80
|
-
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
81
|
-
this.clientStyling = '';
|
|
82
|
-
this.clientStylingurl = '';
|
|
83
|
-
this.clientStylingUrlContent = '';
|
|
84
|
-
this.limitStylingAppends = false;
|
|
85
161
|
}
|
|
86
162
|
connectedCallback() {
|
|
87
163
|
}
|
|
@@ -97,7 +173,7 @@ const HelperTabs = class {
|
|
|
97
173
|
// end custom styling area
|
|
98
174
|
}
|
|
99
175
|
render() {
|
|
100
|
-
return (h("div", { key: '
|
|
176
|
+
return (h("div", { key: 'cb91a99a4d5eb99ce625c276894f8b682159c12c', ref: el => this.stylingContainer = el }, h("div", { key: 'c57ea36b3e25c605894b7ddf19e5e456f2fa252d', class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", { key: '41fa20ee2cc713af685f902fc496a702464398d1' }, h("helper-tab", { key: 'fded6e290107cbc06909aee2e2c97e1c1dd76db3', "low-number": this.lowNumber, "high-number": this.highNumber, "minimum-allowed": this.minimumAllowed, "maxinum-allowed": this.maxinumAllowed, selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
|
|
101
177
|
}
|
|
102
178
|
get host() { return getElement(this); }
|
|
103
179
|
};
|
package/dist/esm/helper-tabs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-308251f5.js';
|
|
2
|
+
export { s as setNonce } from './index-308251f5.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["helper-tab_2",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"clientStylingurl":[513,"client-stylingurl"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[514,"selected-index"],"cmsEndpoint":[513,"cms-endpoint"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["helper-tab_2",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"clientStylingurl":[513,"client-stylingurl"],"clientStylingUrlContent":[513,"client-styling-url-content"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[514,"selected-index"],"cmsEndpoint":[513,"cms-endpoint"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
20
20
|
});
|