@saasquatch/vanilla-components 1.2.3-1 → 1.2.4-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/LICENSE +21 -21
- package/dist/cjs/{WidgetHost-d7b870ce.js → WidgetHost-71b013eb.js} +615 -615
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sqh-close-button.cjs.entry.js +27 -22
- package/dist/cjs/sqh-copy-button_12.cjs.entry.js +1054 -980
- package/dist/cjs/sqh-referral-code.cjs.entry.js +22 -22
- package/dist/cjs/sqh-rewards-actions.cjs.entry.js +26 -11
- package/dist/cjs/widget-components.cjs.js +1 -1
- package/dist/collection/components/close-button/close-button.js +67 -56
- package/dist/collection/components/copy-button/copy-button.js +386 -293
- package/dist/collection/components/copy-link-button/copy-link-button.js +230 -182
- package/dist/collection/components/global-container/global-container.js +169 -126
- package/dist/collection/components/image-component/image-component.js +174 -132
- package/dist/collection/components/partner-stat-component/partner-stat-component.js +185 -155
- package/dist/collection/components/referral-code/referral-code.js +33 -30
- package/dist/collection/components/referral-component/referral-component.js +254 -236
- package/dist/collection/components/referral-list/referral-list.js +929 -671
- package/dist/collection/components/rewards-actions/rewards-actions.js +104 -77
- package/dist/collection/components/share-button/share-button.js +309 -255
- package/dist/collection/components/share-button-container/share-button-container.js +2467 -1534
- package/dist/collection/components/stat-component/stat-component.js +185 -155
- package/dist/collection/components/stats-container/stats-container.js +204 -180
- package/dist/collection/components/text-component/text-component.js +276 -249
- package/dist/collection/entrypoint.js +32 -32
- package/dist/collection/global/global.js +4 -4
- package/dist/collection/services/FormatJs.js +15 -15
- package/dist/collection/services/WidgetHost.js +621 -621
- package/dist/collection/utilities.js +81 -81
- package/dist/esm/{WidgetHost-a27e693d.js → WidgetHost-9c337319.js} +615 -615
- package/dist/esm/loader.mjs +1 -1
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/sqh-close-button.entry.js +27 -22
- package/dist/esm/sqh-copy-button_12.entry.js +1053 -979
- package/dist/esm/sqh-referral-code.entry.js +22 -22
- package/dist/esm/sqh-rewards-actions.entry.js +26 -11
- package/dist/esm/widget-components.mjs +1 -1
- package/dist/esm-es5/{WidgetHost-a27e693d.js → WidgetHost-9c337319.js} +9432 -9432
- package/dist/esm-es5/_commonjsHelpers-1d681858.js +17 -17
- package/dist/esm-es5/css-shim-a659079f.js +122 -122
- package/dist/esm-es5/dom-4061ceba.js +468 -468
- package/dist/esm-es5/en-be593af0.js +1471 -1471
- package/dist/esm-es5/index-8ea8b6d8.js +1758 -1758
- package/dist/esm-es5/loader.mjs +11 -11
- package/dist/esm-es5/sqh-close-button.entry.js +35 -30
- package/dist/esm-es5/sqh-copy-button_12.entry.js +9571 -9485
- package/dist/esm-es5/sqh-referral-code.entry.js +29 -29
- package/dist/esm-es5/sqh-rewards-actions.entry.js +31 -16
- package/dist/esm-es5/widget-components.mjs +6 -6
- package/dist/types/components/close-button/close-button.d.ts +15 -7
- package/dist/types/components/copy-button/copy-button.d.ts +104 -23
- package/dist/types/components/copy-link-button/copy-link-button.d.ts +59 -17
- package/dist/types/components/global-container/global-container.d.ts +46 -9
- package/dist/types/components/image-component/image-component.d.ts +50 -9
- package/dist/types/components/partner-stat-component/partner-stat-component.d.ts +48 -16
- package/dist/types/components/referral-code/referral-code.d.ts +9 -6
- package/dist/types/components/referral-component/referral-component.d.ts +45 -17
- package/dist/types/components/referral-list/referral-list.d.ts +248 -44
- package/dist/types/components/rewards-actions/rewards-actions.d.ts +24 -6
- package/dist/types/components/share-button/share-button.d.ts +81 -17
- package/dist/types/components/share-button-container/share-button-container.d.ts +681 -97
- package/dist/types/components/stat-component/stat-component.d.ts +47 -16
- package/dist/types/components/stats-container/stats-container.d.ts +44 -23
- package/dist/types/components/text-component/text-component.d.ts +77 -16
- package/dist/types/components.d.ts +2050 -2
- package/dist/types/global/global.d.ts +4 -4
- package/dist/types/saasquatch.d.ts +103 -103
- package/dist/types/services/FormatJs.d.ts +7 -7
- package/dist/types/services/WidgetHost.d.ts +45 -45
- package/dist/types/utilities.d.ts +7 -7
- package/dist/widget-components/entrypoint.js +32 -32
- package/dist/widget-components/p-24fc4ba9.js +1 -1
- package/dist/widget-components/{p-d4b27c72.entry.js → p-366f1663.entry.js} +1 -1
- package/dist/widget-components/p-46109683.js +3 -3
- package/dist/widget-components/{p-650d012d.entry.js → p-54ea7a00.entry.js} +1 -1
- package/dist/widget-components/p-58be1132.system.js +1 -1
- package/dist/widget-components/{p-9adc7c50.system.js → p-8e232564.system.js} +0 -0
- package/dist/widget-components/{p-c0cdba77.system.entry.js → p-b17efca4.system.entry.js} +1 -1
- package/dist/widget-components/p-c8bc8c77.system.entry.js +1 -0
- package/dist/widget-components/{p-93574d86.entry.js → p-d416634a.entry.js} +16 -16
- package/dist/widget-components/p-d97c955d.system.entry.js +8 -0
- package/dist/widget-components/{p-9525bf4a.js → p-edd43dbc.js} +0 -0
- package/dist/widget-components/widget-components.esm.js +1 -1
- package/dist/widget-components/widget-components.js +1 -1
- package/docs/raisins.json +1 -0
- package/package.json +96 -89
- package/readme.md +52 -52
- package/dist/widget-components/p-45e253f6.system.entry.js +0 -8
- package/dist/widget-components/p-908068c2.system.entry.js +0 -1
|
@@ -1,249 +1,276 @@
|
|
|
1
|
-
import { h, Component, Prop, Element } from "@stencil/core";
|
|
2
|
-
import { css } from "emotion";
|
|
3
|
-
import marked from "marked";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
render() {
|
|
9
|
-
const regex = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
10
|
-
const textStyle = css `
|
|
11
|
-
font-family: ${this.fontfamily || "inherit"};
|
|
12
|
-
font-size: ${this.fontsize ? this.fontsize + "px" : "inherit"};
|
|
13
|
-
text-align: ${this.textalign};
|
|
14
|
-
color: ${this.color || "inherit"};
|
|
15
|
-
padding-top: ${this.paddingtop ? this.paddingtop + "px" : "inherit"};
|
|
16
|
-
padding-bottom: ${this.paddingbottom
|
|
17
|
-
? this.paddingbottom + "px"
|
|
18
|
-
: "inherit"};
|
|
19
|
-
overflow-wrap: break-word;
|
|
20
|
-
`;
|
|
21
|
-
const divStyle = css `
|
|
22
|
-
background: ${this.background
|
|
23
|
-
? this.background.match(regex)
|
|
24
|
-
? `url(${this.background}) no-repeat center center;`
|
|
25
|
-
: this.background
|
|
26
|
-
: "inherit"};
|
|
27
|
-
height: ${this.height || "inherit"};
|
|
28
|
-
background-size: contain;
|
|
29
|
-
`;
|
|
30
|
-
const content = this.ismarkdown ? (h("div", { innerHTML: marked(this.text) })) : (this.text);
|
|
31
|
-
return (!this.ishidden && (h("div", { class: divStyle },
|
|
32
|
-
h("p", { class: textStyle }, content))));
|
|
33
|
-
}
|
|
34
|
-
static get is() { return "sqh-text-component"; }
|
|
35
|
-
static get originalStyleUrls() { return {
|
|
36
|
-
"$": ["text-component.scss"]
|
|
37
|
-
}; }
|
|
38
|
-
static get styleUrls() { return {
|
|
39
|
-
"$": ["text-component.css"]
|
|
40
|
-
}; }
|
|
41
|
-
static get properties() { return {
|
|
42
|
-
"ishidden": {
|
|
43
|
-
"type": "boolean",
|
|
44
|
-
"mutable": false,
|
|
45
|
-
"complexType": {
|
|
46
|
-
"original": "boolean",
|
|
47
|
-
"resolved": "boolean",
|
|
48
|
-
"references": {}
|
|
49
|
-
},
|
|
50
|
-
"required": false,
|
|
51
|
-
"optional": false,
|
|
52
|
-
"docs": {
|
|
53
|
-
"tags": [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
},
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
"
|
|
211
|
-
"
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"
|
|
232
|
-
"
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
1
|
+
import { h, Component, Prop, Element } from "@stencil/core";
|
|
2
|
+
import { css } from "emotion";
|
|
3
|
+
import marked from "marked";
|
|
4
|
+
/**
|
|
5
|
+
* @uiName Text Component
|
|
6
|
+
*/
|
|
7
|
+
export class TextComponent {
|
|
8
|
+
render() {
|
|
9
|
+
const regex = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
10
|
+
const textStyle = css `
|
|
11
|
+
font-family: ${this.fontfamily || "inherit"};
|
|
12
|
+
font-size: ${this.fontsize ? this.fontsize + "px" : "inherit"};
|
|
13
|
+
text-align: ${this.textalign};
|
|
14
|
+
color: ${this.color || "inherit"};
|
|
15
|
+
padding-top: ${this.paddingtop ? this.paddingtop + "px" : "inherit"};
|
|
16
|
+
padding-bottom: ${this.paddingbottom
|
|
17
|
+
? this.paddingbottom + "px"
|
|
18
|
+
: "inherit"};
|
|
19
|
+
overflow-wrap: break-word;
|
|
20
|
+
`;
|
|
21
|
+
const divStyle = css `
|
|
22
|
+
background: ${this.background
|
|
23
|
+
? this.background.match(regex)
|
|
24
|
+
? `url(${this.background}) no-repeat center center;`
|
|
25
|
+
: this.background
|
|
26
|
+
: "inherit"};
|
|
27
|
+
height: ${this.height || "inherit"};
|
|
28
|
+
background-size: contain;
|
|
29
|
+
`;
|
|
30
|
+
const content = this.ismarkdown ? (h("div", { innerHTML: marked(this.text) })) : (this.text);
|
|
31
|
+
return (!this.ishidden && (h("div", { class: divStyle },
|
|
32
|
+
h("p", { class: textStyle }, content))));
|
|
33
|
+
}
|
|
34
|
+
static get is() { return "sqh-text-component"; }
|
|
35
|
+
static get originalStyleUrls() { return {
|
|
36
|
+
"$": ["text-component.scss"]
|
|
37
|
+
}; }
|
|
38
|
+
static get styleUrls() { return {
|
|
39
|
+
"$": ["text-component.css"]
|
|
40
|
+
}; }
|
|
41
|
+
static get properties() { return {
|
|
42
|
+
"ishidden": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "boolean",
|
|
47
|
+
"resolved": "boolean",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [{
|
|
54
|
+
"text": "Hide Text",
|
|
55
|
+
"name": "uiName"
|
|
56
|
+
}],
|
|
57
|
+
"text": "Hide or show the component"
|
|
58
|
+
},
|
|
59
|
+
"attribute": "ishidden",
|
|
60
|
+
"reflect": false
|
|
61
|
+
},
|
|
62
|
+
"ismarkdown": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "boolean",
|
|
67
|
+
"resolved": "boolean",
|
|
68
|
+
"references": {}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [{
|
|
74
|
+
"text": "Is Markdown",
|
|
75
|
+
"name": "uiName"
|
|
76
|
+
}],
|
|
77
|
+
"text": "Compiles plain text into markdown"
|
|
78
|
+
},
|
|
79
|
+
"attribute": "ismarkdown",
|
|
80
|
+
"reflect": false
|
|
81
|
+
},
|
|
82
|
+
"text": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [{
|
|
94
|
+
"text": "Text",
|
|
95
|
+
"name": "uiName"
|
|
96
|
+
}],
|
|
97
|
+
"text": "The text content"
|
|
98
|
+
},
|
|
99
|
+
"attribute": "text",
|
|
100
|
+
"reflect": false
|
|
101
|
+
},
|
|
102
|
+
"fontfamily": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "string",
|
|
107
|
+
"resolved": "string",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [{
|
|
114
|
+
"text": "Font Family",
|
|
115
|
+
"name": "uiName"
|
|
116
|
+
}],
|
|
117
|
+
"text": "Font family of the text"
|
|
118
|
+
},
|
|
119
|
+
"attribute": "fontfamily",
|
|
120
|
+
"reflect": false
|
|
121
|
+
},
|
|
122
|
+
"color": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string",
|
|
127
|
+
"resolved": "string",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [{
|
|
134
|
+
"text": "Color",
|
|
135
|
+
"name": "uiName"
|
|
136
|
+
}, {
|
|
137
|
+
"text": "color",
|
|
138
|
+
"name": "uiWidget"
|
|
139
|
+
}, {
|
|
140
|
+
"text": "color",
|
|
141
|
+
"name": "format"
|
|
142
|
+
}],
|
|
143
|
+
"text": "Color of the text"
|
|
144
|
+
},
|
|
145
|
+
"attribute": "color",
|
|
146
|
+
"reflect": false
|
|
147
|
+
},
|
|
148
|
+
"fontsize": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "string",
|
|
153
|
+
"resolved": "string",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": false,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [{
|
|
160
|
+
"text": "Font Size",
|
|
161
|
+
"name": "uiName"
|
|
162
|
+
}],
|
|
163
|
+
"text": "Size of the text"
|
|
164
|
+
},
|
|
165
|
+
"attribute": "fontsize",
|
|
166
|
+
"reflect": false
|
|
167
|
+
},
|
|
168
|
+
"paddingtop": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"mutable": false,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "string",
|
|
173
|
+
"resolved": "string",
|
|
174
|
+
"references": {}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [{
|
|
180
|
+
"text": "Padding Top",
|
|
181
|
+
"name": "uiName"
|
|
182
|
+
}],
|
|
183
|
+
"text": "Top padding on text"
|
|
184
|
+
},
|
|
185
|
+
"attribute": "paddingtop",
|
|
186
|
+
"reflect": false
|
|
187
|
+
},
|
|
188
|
+
"paddingbottom": {
|
|
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": "Padding Bottom",
|
|
201
|
+
"name": "uiName"
|
|
202
|
+
}],
|
|
203
|
+
"text": "Bottom padding on text"
|
|
204
|
+
},
|
|
205
|
+
"attribute": "paddingbottom",
|
|
206
|
+
"reflect": false
|
|
207
|
+
},
|
|
208
|
+
"textalign": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"mutable": false,
|
|
211
|
+
"complexType": {
|
|
212
|
+
"original": "string",
|
|
213
|
+
"resolved": "string",
|
|
214
|
+
"references": {}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [{
|
|
220
|
+
"text": "Text Align",
|
|
221
|
+
"name": "uiName"
|
|
222
|
+
}, {
|
|
223
|
+
"text": "[\"left\", \"center\", \"right\"]",
|
|
224
|
+
"name": "uiEnum"
|
|
225
|
+
}, {
|
|
226
|
+
"text": "[\"Left\", \"Center\", \"Right\"]",
|
|
227
|
+
"name": "uiEnumNames"
|
|
228
|
+
}],
|
|
229
|
+
"text": "Text alignment"
|
|
230
|
+
},
|
|
231
|
+
"attribute": "textalign",
|
|
232
|
+
"reflect": false
|
|
233
|
+
},
|
|
234
|
+
"background": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "string",
|
|
239
|
+
"resolved": "string",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [{
|
|
246
|
+
"text": "Background",
|
|
247
|
+
"name": "uiName"
|
|
248
|
+
}],
|
|
249
|
+
"text": "Background the container, color or url"
|
|
250
|
+
},
|
|
251
|
+
"attribute": "background",
|
|
252
|
+
"reflect": false
|
|
253
|
+
},
|
|
254
|
+
"height": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "string",
|
|
259
|
+
"resolved": "string",
|
|
260
|
+
"references": {}
|
|
261
|
+
},
|
|
262
|
+
"required": false,
|
|
263
|
+
"optional": false,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [{
|
|
266
|
+
"text": "Height",
|
|
267
|
+
"name": "uiName"
|
|
268
|
+
}],
|
|
269
|
+
"text": "Height of the container"
|
|
270
|
+
},
|
|
271
|
+
"attribute": "height",
|
|
272
|
+
"reflect": false
|
|
273
|
+
}
|
|
274
|
+
}; }
|
|
275
|
+
static get elementRef() { return "textEl"; }
|
|
276
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
// NOTE(johan): This is a custom loader which will inject script tags for both the ES Modules and non-ES Modules
|
|
2
|
-
// builds. We use this instead of dist/widget-components.js as that is deprecated and actually doesn't work because of
|
|
3
|
-
// its name causing lazy loaded scripts to be loaded from the wrong path in /dist
|
|
4
|
-
(function(doc){
|
|
5
|
-
var isSafari10 = window.navigator.userAgent.indexOf('Safari') > 0 && window.navigator.userAgent.indexOf('Version/10') > 0;
|
|
6
|
-
var scriptElm = doc.scripts[doc.scripts.length - 1];
|
|
7
|
-
|
|
8
|
-
var parts = scriptElm.src.split('/');
|
|
9
|
-
parts.pop();
|
|
10
|
-
var url = parts.join('/');
|
|
11
|
-
|
|
12
|
-
// NOTE(johan): Safari 10 supports type="module" but the build is too new for it, so we only want the ES5 build but
|
|
13
|
-
// without the "nomodule" attribute
|
|
14
|
-
// This may not be necessary in Stencil 1.8.x - https://github.com/ionic-team/stencil/issues/1900
|
|
15
|
-
|
|
16
|
-
if (!isSafari10) {
|
|
17
|
-
var scriptElm = doc.createElement('script');
|
|
18
|
-
scriptElm.setAttribute('type', 'module');
|
|
19
|
-
scriptElm.src = url + '/widget-components.esm.js';
|
|
20
|
-
scriptElm.setAttribute('data-stencil-namespace', 'widget-components');
|
|
21
|
-
doc.head.appendChild(scriptElm);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var scriptElm = doc.createElement('script');
|
|
25
|
-
if (!isSafari10) {
|
|
26
|
-
scriptElm.setAttribute('nomodule', '');
|
|
27
|
-
}
|
|
28
|
-
scriptElm.src = url + '/widget-components.js';
|
|
29
|
-
scriptElm.setAttribute('data-stencil-namespace', 'widget-components');
|
|
30
|
-
doc.head.appendChild(scriptElm)
|
|
31
|
-
})(document);
|
|
32
|
-
|
|
1
|
+
// NOTE(johan): This is a custom loader which will inject script tags for both the ES Modules and non-ES Modules
|
|
2
|
+
// builds. We use this instead of dist/widget-components.js as that is deprecated and actually doesn't work because of
|
|
3
|
+
// its name causing lazy loaded scripts to be loaded from the wrong path in /dist
|
|
4
|
+
(function(doc){
|
|
5
|
+
var isSafari10 = window.navigator.userAgent.indexOf('Safari') > 0 && window.navigator.userAgent.indexOf('Version/10') > 0;
|
|
6
|
+
var scriptElm = doc.scripts[doc.scripts.length - 1];
|
|
7
|
+
|
|
8
|
+
var parts = scriptElm.src.split('/');
|
|
9
|
+
parts.pop();
|
|
10
|
+
var url = parts.join('/');
|
|
11
|
+
|
|
12
|
+
// NOTE(johan): Safari 10 supports type="module" but the build is too new for it, so we only want the ES5 build but
|
|
13
|
+
// without the "nomodule" attribute
|
|
14
|
+
// This may not be necessary in Stencil 1.8.x - https://github.com/ionic-team/stencil/issues/1900
|
|
15
|
+
|
|
16
|
+
if (!isSafari10) {
|
|
17
|
+
var scriptElm = doc.createElement('script');
|
|
18
|
+
scriptElm.setAttribute('type', 'module');
|
|
19
|
+
scriptElm.src = url + '/widget-components.esm.js';
|
|
20
|
+
scriptElm.setAttribute('data-stencil-namespace', 'widget-components');
|
|
21
|
+
doc.head.appendChild(scriptElm);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var scriptElm = doc.createElement('script');
|
|
25
|
+
if (!isSafari10) {
|
|
26
|
+
scriptElm.setAttribute('nomodule', '');
|
|
27
|
+
}
|
|
28
|
+
scriptElm.src = url + '/widget-components.js';
|
|
29
|
+
scriptElm.setAttribute('data-stencil-namespace', 'widget-components');
|
|
30
|
+
doc.head.appendChild(scriptElm)
|
|
31
|
+
})(document);
|
|
32
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "@formatjs/intl-relativetimeformat/polyfill";
|
|
2
|
-
import "@formatjs/intl-relativetimeformat/dist/locale-data/en";
|
|
3
|
-
import "@formatjs/intl-pluralrules/polyfill";
|
|
4
|
-
import "@formatjs/intl-pluralrules/dist/locale-data/en";
|
|
1
|
+
import "@formatjs/intl-relativetimeformat/polyfill";
|
|
2
|
+
import "@formatjs/intl-relativetimeformat/dist/locale-data/en";
|
|
3
|
+
import "@formatjs/intl-pluralrules/polyfill";
|
|
4
|
+
import "@formatjs/intl-pluralrules/dist/locale-data/en";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import IntlMessageFormat from "intl-messageformat";
|
|
2
|
-
import IntRelativeFormat from "intl-relativeformat";
|
|
3
|
-
const FormatJS = {
|
|
4
|
-
format(msg, values, userLocale) {
|
|
5
|
-
var locale = (userLocale || "en-US").replace("_", "-");
|
|
6
|
-
var format = new IntlMessageFormat(msg, locale);
|
|
7
|
-
return format.format(values);
|
|
8
|
-
},
|
|
9
|
-
formatRelative(value, userLocale) {
|
|
10
|
-
var locale = (userLocale || "en-US").replace("_", "-");
|
|
11
|
-
var relative = new IntRelativeFormat(locale);
|
|
12
|
-
return relative.format(value);
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
export default FormatJS;
|
|
1
|
+
import IntlMessageFormat from "intl-messageformat";
|
|
2
|
+
import IntRelativeFormat from "intl-relativeformat";
|
|
3
|
+
const FormatJS = {
|
|
4
|
+
format(msg, values, userLocale) {
|
|
5
|
+
var locale = (userLocale || "en-US").replace("_", "-");
|
|
6
|
+
var format = new IntlMessageFormat(msg, locale);
|
|
7
|
+
return format.format(values);
|
|
8
|
+
},
|
|
9
|
+
formatRelative(value, userLocale) {
|
|
10
|
+
var locale = (userLocale || "en-US").replace("_", "-");
|
|
11
|
+
var relative = new IntRelativeFormat(locale);
|
|
12
|
+
return relative.format(value);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default FormatJS;
|