@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.
@@ -2,14 +2,82 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7158b6b0.js');
5
+ const index = require('./index-d6d883c7.js');
6
6
 
7
- const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
7
+ const DEFAULT_LANGUAGE = 'en';
8
+ const SUPPORTED_LANGUAGES = ['en'];
9
+ const TRANSLATIONS = {
10
+ en: {
11
+ numbersFrom: 'Each play includes one set of numbers from',
12
+ to: 'to',
13
+ selectableNumber: 'with a selectable number of',
14
+ minimumSelection: 'and a minimum selection of',
15
+ winnings: 'The winnings are automatically credited to your account.',
16
+ register: 'Register or Login',
17
+ butTickets: 'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',
18
+ 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!",
19
+ odds: 'What are my odds of winning?',
20
+ winGame: 'How can I find out if I’ve won a draw game?',
21
+ claimPrize: 'How do I claim my prize?'
22
+ },
23
+ ro: {
24
+ numbersFrom: 'Each play includes one set of numbers from',
25
+ to: 'to',
26
+ selectableNumber: 'with a selectable number of',
27
+ minimumSelection: 'and a minimum selection of',
28
+ winnings: 'The winnings are automatically credited to your account.'
29
+ },
30
+ fr: {
31
+ numbersFrom: 'Each play includes one set of numbers from',
32
+ to: 'to',
33
+ selectableNumber: 'with a selectable number of',
34
+ minimumSelection: 'and a minimum selection of',
35
+ winnings: 'The winnings are automatically credited to your account.'
36
+ },
37
+ ar: {
38
+ numbersFrom: 'Each play includes one set of numbers from',
39
+ to: 'to',
40
+ selectableNumber: 'with a selectable number of',
41
+ minimumSelection: 'and a minimum selection of',
42
+ winnings: 'The winnings are automatically credited to your account.'
43
+ },
44
+ hr: {
45
+ numbersFrom: 'Each play includes one set of numbers from',
46
+ to: 'to',
47
+ selectableNumber: 'with a selectable number of',
48
+ minimumSelection: 'and a minimum selection of',
49
+ winnings: 'The winnings are automatically credited to your account.'
50
+ }
51
+ };
52
+ const translate = (key, customLang) => {
53
+ const lang = customLang;
54
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
55
+ };
56
+
57
+ const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";
8
58
  const HelperTabStyle0 = helperTabCss;
9
59
 
10
60
  const HelperTab = class {
11
61
  constructor(hostRef) {
12
62
  index.registerInstance(this, hostRef);
63
+ /**
64
+ * Selected index
65
+ */
66
+ this.selectedIndex = 0;
67
+ /**
68
+ * Client custom styling via string
69
+ */
70
+ this.clientStyling = '';
71
+ /**
72
+ * Client custom styling via url content
73
+ */
74
+ this.clientStylingUrlContent = '';
75
+ /**
76
+ * Language of the widget
77
+ */
78
+ this.language = 'en';
79
+ this.tabContent = '';
80
+ this.limitStylingAppends = false;
13
81
  this.setClientStyling = () => {
14
82
  let sheet = document.createElement('style');
15
83
  sheet.innerHTML = this.clientStyling;
@@ -22,17 +90,6 @@ const HelperTab = class {
22
90
  this.stylingContainer.prepend(cssFile);
23
91
  }, 1);
24
92
  };
25
- this.selectedIndex = 0;
26
- this.cmsEndpoint = undefined;
27
- this.clientStyling = '';
28
- this.clientStylingUrlContent = '';
29
- this.tabContent = '';
30
- this.limitStylingAppends = false;
31
- }
32
- connectedCallback() {
33
- /**
34
- * fetch(cmsEndpoint + / + / + selectedIndex)
35
- */
36
93
  }
37
94
  componentDidRender() {
38
95
  // start custom styling area
@@ -46,24 +103,53 @@ const HelperTab = class {
46
103
  // end custom styling area
47
104
  }
48
105
  render() {
49
- this.tabContent = index.h("div", { key: 'd69c61827b4fb6d934c72b0b2d37d72fca307575', class: "TabContent", ref: el => this.stylingContainer = el }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
106
+ this.tabContent = index.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));
50
107
  if (this.selectedIndex + 1 == 2) {
51
- this.tabContent = index.h("div", { key: 'ab912cbb3bc3e88ecf8fe5f8f0e7eb16460100bd', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", { key: '17bed41dffe7d5578452ee13a47b442d10366ce2' }, index.h("li", { key: 'cf0da42f07cf92f5cea9c9f504c8836e528a5708' }, "Register or Login"), index.h("li", { key: '4a0339df365c6b1a37b8a74c5022a56197e870db' }, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), index.h("li", { key: '3f29a9b17c1059493648247868b83eb71241b8bd' }, "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!")));
108
+ this.tabContent = index.h("div", { key: '2950bb6ccdd98761099d12239881ab29da4b2213', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", { key: '0da821f45e855155003809cb4c84eaa8d25f1f2a' }, index.h("li", { key: '15d4f064c62319c6611baa3693f4ef297309c786' }, translate('register', this.language)), index.h("li", { key: '4933c6970d4044aac746abb398f7c255b0484f6a' }, translate('butTickets', this.language)), index.h("li", { key: 'ffe7cef3e53bd281173384756476acd2e0e8f148' }, translate('reviewPurchase', this.language))));
52
109
  }
53
110
  else if (this.selectedIndex + 1 == 3) {
54
- this.tabContent = index.h("div", { key: 'ceac54698e0e5c55a049600f02e8f413a76a1c33', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", { key: '426d89c86a1d44f6d515bc1a7902e43317127939' }, index.h("li", { key: '457a225564399001dcab48097578174a27231ca7' }, "What are my odds of winning?"), index.h("li", { key: 'd35220f2aca215eff391cab54d719f18ef906c77' }, "How can I find out if I\u2019ve won a draw game?"), index.h("li", { key: 'fcd560ee4b6740c319cf0f98a0b98da8fd9e14a4' }, "How do I claim my prize?")));
111
+ this.tabContent = index.h("div", { key: '296c83d55150c67522cea9cb1fc10f3542c72452', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", { key: '3fc772a007d0f73e0692021a2f700bab5807bb85' }, index.h("li", { key: 'fd6e459a0536261d98e42e37a272f229d152dfb7' }, translate('odds', this.language)), index.h("li", { key: 'ae7e5bceb217c9ceb1303145ae83f05fddd7dde6' }, translate('winGame', this.language)), index.h("li", { key: 'a094c7ea0db72683fb134f010d22f02b61f25a4b' }, translate('claimPrize', this.language))));
55
112
  }
56
113
  return (this.tabContent);
57
114
  }
58
115
  };
59
116
  HelperTab.style = HelperTabStyle0;
60
117
 
61
- 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:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}";
118
+ 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))}";
62
119
  const HelperTabsStyle0 = helperTabsCss;
63
120
 
64
121
  const HelperTabs = class {
65
122
  constructor(hostRef) {
66
123
  index.registerInstance(this, hostRef);
124
+ /**
125
+ * Tell me if it is disabled
126
+ */
127
+ this.disabled = false;
128
+ /**
129
+ * Tell me what tab is selected
130
+ */
131
+ this.selected = false;
132
+ /**
133
+ * Default selected index
134
+ */
135
+ this.selectedIndex = 0;
136
+ /**
137
+ * Tabs details
138
+ */
139
+ this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
140
+ /**
141
+ * Client custom styling via string
142
+ */
143
+ this.clientStyling = '';
144
+ /**
145
+ * Client custom styling via url
146
+ */
147
+ this.clientStylingurl = '';
148
+ /**
149
+ * Client custom styling via url content
150
+ */
151
+ this.clientStylingUrlContent = '';
152
+ this.limitStylingAppends = false;
67
153
  this.setClientStyling = () => {
68
154
  let sheet = document.createElement('style');
69
155
  sheet.innerHTML = this.clientStyling;
@@ -76,16 +162,6 @@ const HelperTabs = class {
76
162
  this.stylingContainer.prepend(cssFile);
77
163
  }, 1);
78
164
  };
79
- this.disabled = false;
80
- this.label = undefined;
81
- this.selected = false;
82
- this.cmsEndpoint = undefined;
83
- this.selectedIndex = 0;
84
- this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
85
- this.clientStyling = '';
86
- this.clientStylingurl = '';
87
- this.clientStylingUrlContent = '';
88
- this.limitStylingAppends = false;
89
165
  }
90
166
  connectedCallback() {
91
167
  }
@@ -101,7 +177,7 @@ const HelperTabs = class {
101
177
  // end custom styling area
102
178
  }
103
179
  render() {
104
- return (index.h("div", { key: '841b2a4b84f2ecdaf692b9cab2eac4b3413186e7', ref: el => this.stylingContainer = el }, index.h("div", { key: '4c5d57e669f9f45d204bff8a85ca89a0574c4627', class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", { key: '7ba983dec3b0355f390b19191d0d823914f09037' }, index.h("helper-tab", { key: 'e6c7739d50948582d8d14d530828508b4cb90d6e', selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
180
+ return (index.h("div", { key: 'cb91a99a4d5eb99ce625c276894f8b682159c12c', ref: el => this.stylingContainer = el }, index.h("div", { key: 'c57ea36b3e25c605894b7ddf19e5e456f2fa252d', class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", { key: '41fa20ee2cc713af685f902fc496a702464398d1' }, index.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 }))));
105
181
  }
106
182
  get host() { return index.getElement(this); }
107
183
  };
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7158b6b0.js');
5
+ const index = require('./index-d6d883c7.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('helper-tabs.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["helper-tab_2.cjs",[[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);
22
+ return index.bootstrapLazy([["helper-tab_2.cjs",[[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);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;