@everymatrix/helper-tabs 1.44.0 → 1.45.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.
Files changed (52) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/helper-tab_2.cjs.entry.js +90 -115
  3. package/dist/cjs/helper-tabs.cjs.js +16 -10
  4. package/dist/cjs/index-e6be4b2d.js +1192 -0
  5. package/dist/cjs/loader.cjs.js +6 -12
  6. package/dist/collection/collection-manifest.json +4 -4
  7. package/dist/collection/components/helper-tab/helper-tab.js +136 -144
  8. package/dist/collection/components/helper-tabs/helper-tabs.js +229 -241
  9. package/dist/collection/components/helper-tabs/index.js +1 -0
  10. package/dist/collection/utils/utils.js +15 -15
  11. package/dist/esm/app-globals-0f993ce5.js +3 -0
  12. package/dist/esm/helper-tab_2.entry.js +90 -115
  13. package/dist/esm/helper-tabs.js +13 -10
  14. package/dist/esm/index-53eb88db.js +1165 -0
  15. package/dist/esm/loader.js +6 -12
  16. package/dist/helper-tabs/helper-tabs.esm.js +1 -1
  17. package/dist/helper-tabs/p-7202b7a8.entry.js +1 -0
  18. package/dist/helper-tabs/p-94c9f3ff.js +2 -0
  19. package/dist/helper-tabs/p-e1255160.js +1 -0
  20. package/dist/stencil.config.dev.js +17 -0
  21. package/dist/stencil.config.js +14 -19
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-tabs/.stencil/packages/stencil/helper-tabs/stencil.config.d.ts +2 -0
  23. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-tabs/.stencil/packages/stencil/helper-tabs/stencil.config.dev.d.ts +2 -0
  24. package/dist/types/components/helper-tab/helper-tab.d.ts +24 -24
  25. package/dist/types/components/helper-tabs/helper-tabs.d.ts +42 -42
  26. package/dist/types/components/helper-tabs/index.d.ts +1 -0
  27. package/dist/types/stencil-public-runtime.d.ts +142 -33
  28. package/loader/cdn.js +1 -3
  29. package/loader/index.cjs.js +1 -3
  30. package/loader/index.d.ts +13 -1
  31. package/loader/index.es2017.js +1 -3
  32. package/loader/index.js +1 -3
  33. package/loader/package.json +1 -0
  34. package/package.json +8 -1
  35. package/dist/cjs/index-c1f39e41.js +0 -1179
  36. package/dist/components/helper-tab.d.ts +0 -11
  37. package/dist/components/helper-tab.js +0 -6
  38. package/dist/components/helper-tab2.js +0 -86
  39. package/dist/components/helper-tabs.d.ts +0 -11
  40. package/dist/components/helper-tabs.js +0 -105
  41. package/dist/components/index.d.ts +0 -26
  42. package/dist/components/index.js +0 -1
  43. package/dist/esm/index-77d38aa8.js +0 -1153
  44. package/dist/esm/polyfills/core-js.js +0 -11
  45. package/dist/esm/polyfills/css-shim.js +0 -1
  46. package/dist/esm/polyfills/dom.js +0 -79
  47. package/dist/esm/polyfills/es5-html-element.js +0 -1
  48. package/dist/esm/polyfills/index.js +0 -34
  49. package/dist/esm/polyfills/system.js +0 -6
  50. package/dist/helper-tabs/p-b489f120.js +0 -1
  51. package/dist/helper-tabs/p-db41ef75.entry.js +0 -1
  52. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-tabs/.stencil/packages/helper-tabs/stencil.config.d.ts +0 -2
@@ -1,247 +1,235 @@
1
- import { Component, Prop, Element, h, State } from '@stencil/core';
1
+ import { h } from "@stencil/core";
2
2
  export class HelperTabs {
3
- constructor() {
4
- /**
5
- * Tell me if it is disabled
6
- */
7
- this.disabled = false;
8
- /**
9
- * Tell me what tab is selected
10
- */
11
- this.selected = false;
12
- /**
13
- * Default selected index
14
- */
15
- this.selectedIndex = 0;
16
- /**
17
- * Tabs details
18
- */
19
- this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
20
- /**
21
- * Client custom styling via string
22
- */
23
- this.clientStyling = '';
24
- /**
25
- * Client custom styling via url
26
- */
27
- this.clientStylingurl = '';
28
- /**
29
- * Client custom styling via url content
30
- */
31
- this.clientStylingUrlContent = '';
32
- this.limitStylingAppends = false;
33
- this.setClientStyling = () => {
34
- let sheet = document.createElement('style');
35
- sheet.innerHTML = this.clientStyling;
36
- this.stylingContainer.prepend(sheet);
37
- };
38
- this.setClientStylingURL = () => {
39
- let cssFile = document.createElement('style');
40
- setTimeout(() => {
41
- cssFile.innerHTML = this.clientStylingUrlContent;
42
- this.stylingContainer.prepend(cssFile);
43
- }, 1);
44
- };
45
- }
46
- connectedCallback() {
47
- if (this.tabs.length == 0) {
48
- // fetch CMS data
3
+ constructor() {
4
+ this.setClientStyling = () => {
5
+ let sheet = document.createElement('style');
6
+ sheet.innerHTML = this.clientStyling;
7
+ this.stylingContainer.prepend(sheet);
8
+ };
9
+ this.setClientStylingURL = () => {
10
+ let cssFile = document.createElement('style');
11
+ setTimeout(() => {
12
+ cssFile.innerHTML = this.clientStylingUrlContent;
13
+ this.stylingContainer.prepend(cssFile);
14
+ }, 1);
15
+ };
16
+ this.disabled = false;
17
+ this.label = undefined;
18
+ this.selected = false;
19
+ this.cmsEndpoint = undefined;
20
+ this.selectedIndex = 0;
21
+ this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
22
+ this.clientStyling = '';
23
+ this.clientStylingurl = '';
24
+ this.clientStylingUrlContent = '';
25
+ this.limitStylingAppends = false;
49
26
  }
50
- }
51
- componentDidRender() {
52
- // start custom styling area
53
- if (!this.limitStylingAppends && this.stylingContainer) {
54
- this.setClientStyling();
55
- if (this.clientStylingUrlContent) {
56
- this.setClientStylingURL();
57
- }
58
- this.limitStylingAppends = true;
27
+ connectedCallback() {
28
+ if (this.tabs.length == 0) {
29
+ // fetch CMS data
30
+ }
59
31
  }
60
- // end custom styling area
61
- }
62
- render() {
63
- return (h("div", { ref: el => this.stylingContainer = el },
64
- h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))),
65
- h("div", null,
66
- h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
67
- }
68
- static get is() { return "helper-tabs"; }
69
- static get encapsulation() { return "shadow"; }
70
- static get originalStyleUrls() { return {
71
- "$": ["helper-tabs.scss"]
72
- }; }
73
- static get styleUrls() { return {
74
- "$": ["helper-tabs.css"]
75
- }; }
76
- static get properties() { return {
77
- "disabled": {
78
- "type": "boolean",
79
- "mutable": false,
80
- "complexType": {
81
- "original": "boolean",
82
- "resolved": "boolean",
83
- "references": {}
84
- },
85
- "required": false,
86
- "optional": false,
87
- "docs": {
88
- "tags": [],
89
- "text": "Tell me if it is disabled"
90
- },
91
- "attribute": "disabled",
92
- "reflect": true,
93
- "defaultValue": "false"
94
- },
95
- "label": {
96
- "type": "string",
97
- "mutable": false,
98
- "complexType": {
99
- "original": "string",
100
- "resolved": "string",
101
- "references": {}
102
- },
103
- "required": false,
104
- "optional": false,
105
- "docs": {
106
- "tags": [],
107
- "text": "Gimme names or you die"
108
- },
109
- "attribute": "label",
110
- "reflect": true
111
- },
112
- "selected": {
113
- "type": "boolean",
114
- "mutable": false,
115
- "complexType": {
116
- "original": "boolean",
117
- "resolved": "boolean",
118
- "references": {}
119
- },
120
- "required": false,
121
- "optional": false,
122
- "docs": {
123
- "tags": [],
124
- "text": "Tell me what tab is selected"
125
- },
126
- "attribute": "selected",
127
- "reflect": true,
128
- "defaultValue": "false"
129
- },
130
- "cmsEndpoint": {
131
- "type": "string",
132
- "mutable": false,
133
- "complexType": {
134
- "original": "string",
135
- "resolved": "string",
136
- "references": {}
137
- },
138
- "required": false,
139
- "optional": false,
140
- "docs": {
141
- "tags": [],
142
- "text": "Endpoing for CMS"
143
- },
144
- "attribute": "cms-endpoint",
145
- "reflect": true
146
- },
147
- "selectedIndex": {
148
- "type": "number",
149
- "mutable": true,
150
- "complexType": {
151
- "original": "number",
152
- "resolved": "number",
153
- "references": {}
154
- },
155
- "required": false,
156
- "optional": false,
157
- "docs": {
158
- "tags": [],
159
- "text": "Default selected index"
160
- },
161
- "attribute": "selected-index",
162
- "reflect": true,
163
- "defaultValue": "0"
164
- },
165
- "tabs": {
166
- "type": "unknown",
167
- "mutable": false,
168
- "complexType": {
169
- "original": "Array<Object>",
170
- "resolved": "Object[]",
171
- "references": {
172
- "Array": {
173
- "location": "global"
174
- },
175
- "Object": {
176
- "location": "global"
177
- }
32
+ componentDidRender() {
33
+ // start custom styling area
34
+ if (!this.limitStylingAppends && this.stylingContainer) {
35
+ this.setClientStyling();
36
+ if (this.clientStylingUrlContent) {
37
+ this.setClientStylingURL();
38
+ }
39
+ this.limitStylingAppends = true;
178
40
  }
179
- },
180
- "required": false,
181
- "optional": false,
182
- "docs": {
183
- "tags": [],
184
- "text": "Tabs details"
185
- },
186
- "defaultValue": "[{label: 'How to Play'}, {label: 'About'}, {label: 'FAQs'}]"
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": "Client custom styling via string"
201
- },
202
- "attribute": "client-styling",
203
- "reflect": true,
204
- "defaultValue": "''"
205
- },
206
- "clientStylingurl": {
207
- "type": "string",
208
- "mutable": false,
209
- "complexType": {
210
- "original": "string",
211
- "resolved": "string",
212
- "references": {}
213
- },
214
- "required": false,
215
- "optional": false,
216
- "docs": {
217
- "tags": [],
218
- "text": "Client custom styling via url"
219
- },
220
- "attribute": "client-stylingurl",
221
- "reflect": true,
222
- "defaultValue": "''"
223
- },
224
- "clientStylingUrlContent": {
225
- "type": "string",
226
- "mutable": false,
227
- "complexType": {
228
- "original": "string",
229
- "resolved": "string",
230
- "references": {}
231
- },
232
- "required": false,
233
- "optional": false,
234
- "docs": {
235
- "tags": [],
236
- "text": "Client custom styling via url content"
237
- },
238
- "attribute": "client-styling-url-content",
239
- "reflect": true,
240
- "defaultValue": "''"
41
+ // end custom styling area
42
+ }
43
+ render() {
44
+ return (h("div", { key: '841b2a4b84f2ecdaf692b9cab2eac4b3413186e7', ref: el => this.stylingContainer = el }, h("div", { key: '4c5d57e669f9f45d204bff8a85ca89a0574c4627', class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", { key: '7ba983dec3b0355f390b19191d0d823914f09037' }, h("helper-tab", { key: 'e6c7739d50948582d8d14d530828508b4cb90d6e', selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
45
+ }
46
+ static get is() { return "helper-tabs"; }
47
+ static get encapsulation() { return "shadow"; }
48
+ static get originalStyleUrls() {
49
+ return {
50
+ "$": ["helper-tabs.scss"]
51
+ };
52
+ }
53
+ static get styleUrls() {
54
+ return {
55
+ "$": ["helper-tabs.css"]
56
+ };
57
+ }
58
+ static get properties() {
59
+ return {
60
+ "disabled": {
61
+ "type": "boolean",
62
+ "mutable": false,
63
+ "complexType": {
64
+ "original": "boolean",
65
+ "resolved": "boolean",
66
+ "references": {}
67
+ },
68
+ "required": false,
69
+ "optional": false,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": "Tell me if it is disabled"
73
+ },
74
+ "attribute": "disabled",
75
+ "reflect": true,
76
+ "defaultValue": "false"
77
+ },
78
+ "label": {
79
+ "type": "string",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "string",
83
+ "resolved": "string",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "Gimme names or you die"
91
+ },
92
+ "attribute": "label",
93
+ "reflect": true
94
+ },
95
+ "selected": {
96
+ "type": "boolean",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "boolean",
100
+ "resolved": "boolean",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "Tell me what tab is selected"
108
+ },
109
+ "attribute": "selected",
110
+ "reflect": true,
111
+ "defaultValue": "false"
112
+ },
113
+ "cmsEndpoint": {
114
+ "type": "string",
115
+ "mutable": false,
116
+ "complexType": {
117
+ "original": "string",
118
+ "resolved": "string",
119
+ "references": {}
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": "Endpoing for CMS"
126
+ },
127
+ "attribute": "cms-endpoint",
128
+ "reflect": true
129
+ },
130
+ "selectedIndex": {
131
+ "type": "number",
132
+ "mutable": true,
133
+ "complexType": {
134
+ "original": "number",
135
+ "resolved": "number",
136
+ "references": {}
137
+ },
138
+ "required": false,
139
+ "optional": false,
140
+ "docs": {
141
+ "tags": [],
142
+ "text": "Default selected index"
143
+ },
144
+ "attribute": "selected-index",
145
+ "reflect": true,
146
+ "defaultValue": "0"
147
+ },
148
+ "tabs": {
149
+ "type": "unknown",
150
+ "mutable": false,
151
+ "complexType": {
152
+ "original": "Array<Object>",
153
+ "resolved": "Object[]",
154
+ "references": {
155
+ "Array": {
156
+ "location": "global",
157
+ "id": "global::Array"
158
+ },
159
+ "Object": {
160
+ "location": "global",
161
+ "id": "global::Object"
162
+ }
163
+ }
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "Tabs details"
170
+ },
171
+ "defaultValue": "[{label: 'How to Play'}, {label: 'About'}, {label: 'FAQs'}]"
172
+ },
173
+ "clientStyling": {
174
+ "type": "string",
175
+ "mutable": false,
176
+ "complexType": {
177
+ "original": "string",
178
+ "resolved": "string",
179
+ "references": {}
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": "Client custom styling via string"
186
+ },
187
+ "attribute": "client-styling",
188
+ "reflect": true,
189
+ "defaultValue": "''"
190
+ },
191
+ "clientStylingurl": {
192
+ "type": "string",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "string",
196
+ "resolved": "string",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": "Client custom styling via url"
204
+ },
205
+ "attribute": "client-stylingurl",
206
+ "reflect": true,
207
+ "defaultValue": "''"
208
+ },
209
+ "clientStylingUrlContent": {
210
+ "type": "string",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": false,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": "Client custom styling via url content"
222
+ },
223
+ "attribute": "client-styling-url-content",
224
+ "reflect": true,
225
+ "defaultValue": "''"
226
+ }
227
+ };
228
+ }
229
+ static get states() {
230
+ return {
231
+ "limitStylingAppends": {}
232
+ };
241
233
  }
242
- }; }
243
- static get states() { return {
244
- "limitStylingAppends": {}
245
- }; }
246
- static get elementRef() { return "host"; }
234
+ static get elementRef() { return "host"; }
247
235
  }
@@ -0,0 +1 @@
1
+ export { HelperTabs } from './helper-tabs';
@@ -1,5 +1,5 @@
1
1
  export function format(first, middle, last) {
2
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
2
+ return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
3
  }
4
4
  /**
5
5
  * @name isMobile
@@ -8,10 +8,10 @@ export function format(first, middle, last) {
8
8
  * @returns {Boolean} true or false
9
9
  */
10
10
  export const isMobile = (userAgent) => {
11
- return !!(userAgent.toLowerCase().match(/android/i) ||
12
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
13
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
14
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
11
+ return !!(userAgent.toLowerCase().match(/android/i) ||
12
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
13
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
14
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
15
15
  };
16
16
  /**
17
17
  * @name getDevice
@@ -20,14 +20,14 @@ export const isMobile = (userAgent) => {
20
20
  * @returns {String} Android/iPhone/iPad/PC
21
21
  */
22
22
  export const getDevice = (userAgent) => {
23
- if (userAgent.toLowerCase().match(/android/i)) {
24
- return 'Android';
25
- }
26
- if (userAgent.toLowerCase().match(/iphone/i)) {
27
- return 'iPhone';
28
- }
29
- if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
30
- return 'iPad';
31
- }
32
- return 'PC';
23
+ if (userAgent.toLowerCase().match(/android/i)) {
24
+ return 'Android';
25
+ }
26
+ if (userAgent.toLowerCase().match(/iphone/i)) {
27
+ return 'iPhone';
28
+ }
29
+ if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
30
+ return 'iPad';
31
+ }
32
+ return 'PC';
33
33
  };
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };