@livelike/embet 0.0.10 → 0.0.14
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/CHANGELOG.md +23 -0
- package/README.md +37 -1
- package/embet.cjs.js +271 -208
- package/embet.cjs.min.js +86 -90
- package/embet.esm.js +352 -202
- package/embet.esm.min.js +86 -90
- package/embet.umd.js +271 -208
- package/embet.umd.min.js +88 -92
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## 0.0.14 (November 22, 2021)
|
|
2
|
+
|
|
3
|
+
- Added `widgetWidthPercentage`, `parentContainer, `disableResizing` properties to widget's custom_data
|
|
4
|
+
- Removed dynamic font size setting
|
|
5
|
+
- Moved ResizeObserver from embet-widgets to the individual widget elements to allow for resizing in single tag widgets
|
|
6
|
+
|
|
7
|
+
## 0.0.13 (November 22, 2021)
|
|
8
|
+
|
|
9
|
+
- Removed hard coded livelike-title color
|
|
10
|
+
|
|
11
|
+
## 0.0.12 (November 20, 2021)
|
|
12
|
+
|
|
13
|
+
- Added widget resize observer
|
|
14
|
+
- Added box-sizing to contain progress bar
|
|
15
|
+
- Added CSS scoping to unscoped styles selectors
|
|
16
|
+
- Removed widget animation
|
|
17
|
+
- Removed font-family style from title and footer
|
|
18
|
+
- Removed option center align
|
|
19
|
+
|
|
20
|
+
## 0.0.11 (November 8, 2021)
|
|
21
|
+
|
|
22
|
+
- Added `widgetVariation` property to widget's custom_data to control widget variations
|
|
23
|
+
|
|
1
24
|
## 0.0.10 (November 8, 2021)
|
|
2
25
|
|
|
3
26
|
- Added Live Spread widget layout change
|
package/README.md
CHANGED
|
@@ -85,13 +85,17 @@ options: [{
|
|
|
85
85
|
custom_data: JSON stringified object
|
|
86
86
|
|
|
87
87
|
custom_data: {
|
|
88
|
-
|
|
88
|
+
place_bet_url: string;
|
|
89
89
|
type: 'LIVE SPREAD' | 'LIVE MONEYLINE' | 'LIVE TOTAL';
|
|
90
90
|
sponsors: [{logo_url: string, name: string}];
|
|
91
91
|
betDetails: [{bet: string; description: string;}],
|
|
92
92
|
customCss: string,
|
|
93
93
|
customStyles: string,
|
|
94
94
|
widgetHeight: string | number,
|
|
95
|
+
widgetWidthPercentage: string | number,
|
|
96
|
+
parentContainer: string,
|
|
97
|
+
disableResizing: boolean,
|
|
98
|
+
widgetVariation: 'bar' | 'square' | 'inline'
|
|
95
99
|
theme: {
|
|
96
100
|
widgets: {
|
|
97
101
|
prediction: {
|
|
@@ -152,6 +156,34 @@ widgetHeight = '400px'
|
|
|
152
156
|
widgetHeight = '50%'
|
|
153
157
|
```
|
|
154
158
|
|
|
159
|
+
### About the widgetVariation property
|
|
160
|
+
|
|
161
|
+
The `widgetVariation` property can be used control the layout of the widgets. The three options are `bar`, `square`, and `inline`.
|
|
162
|
+
|
|
163
|
+
### About the parentContainer property
|
|
164
|
+
|
|
165
|
+
The `parentContainer` optional property is the selector of an element that is a parent of a widget. It is used to calculate styles for resizing. If `parentContainer` is not provided, `document.body` will be used instead.
|
|
166
|
+
|
|
167
|
+
`parentContainer: "#parent-container-id"`
|
|
168
|
+
|
|
169
|
+
`parentContainer: ".parent-container-class"`
|
|
170
|
+
|
|
171
|
+
### About the widgetWidthPercentage property
|
|
172
|
+
|
|
173
|
+
The `widgetWidthPercentage is the optional property that is a percentage decimal that works with the `parentContainer` property.
|
|
174
|
+
|
|
175
|
+
For example
|
|
176
|
+
|
|
177
|
+
`widgetWidthPercentage: "0.5"`
|
|
178
|
+
|
|
179
|
+
will set the widget's width at 50% of the parent container.
|
|
180
|
+
|
|
181
|
+
If not provided, the default value is `0.3`.
|
|
182
|
+
|
|
183
|
+
### About the disableResizing property
|
|
184
|
+
|
|
185
|
+
Set `disableResizing` optional property to `true` to prevent the widget from resizing. Default is false.
|
|
186
|
+
|
|
155
187
|
### About the betDetails property
|
|
156
188
|
In the `betDetails` property of the `custom_data` stringified object, the `description` properties must match with your `options` array `description` properties.
|
|
157
189
|
|
|
@@ -199,6 +231,9 @@ The `bet: +120` will match the `options` object with `description: Astros`
|
|
|
199
231
|
custom_data: JSON.stringify({
|
|
200
232
|
place_bet_url: "#",
|
|
201
233
|
type: "LIVE MONEYLINE",
|
|
234
|
+
widgetVariation: "bar",
|
|
235
|
+
parentContainer: ".parent-container-class",
|
|
236
|
+
widgetWidthPercentage: "0.5",
|
|
202
237
|
sponsors: [
|
|
203
238
|
{
|
|
204
239
|
logo_url:
|
|
@@ -260,6 +295,7 @@ The `bet: +120` will match the `options` object with `description: Astros`
|
|
|
260
295
|
custom_data: JSON.stringify({
|
|
261
296
|
place_bet_url: "#",
|
|
262
297
|
type: "LIVE MONEYLINE",
|
|
298
|
+
widgetVariation: "square",
|
|
263
299
|
sponsors: [
|
|
264
300
|
{
|
|
265
301
|
logo_url:
|