@everymatrix/lottery-tipping-bullet-group 0.0.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/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-42492779.js +1301 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/lottery-tipping-bullet-group-16fbbd7f.js +167 -0
- package/dist/cjs/lottery-tipping-bullet-group.cjs.js +25 -0
- package/dist/cjs/lottery-tipping-bullet_2.cjs.entry.js +76 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/lottery-tipping-bullet/index.js +1 -0
- package/dist/collection/components/lottery-tipping-bullet/lottery-tipping-bullet.css +64 -0
- package/dist/collection/components/lottery-tipping-bullet/lottery-tipping-bullet.js +249 -0
- package/dist/collection/components/lottery-tipping-bullet-group/index.js +1 -0
- package/dist/collection/components/lottery-tipping-bullet-group/lottery-tipping-bullet-group.css +0 -0
- package/dist/collection/components/lottery-tipping-bullet-group/lottery-tipping-bullet-group.js +275 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/models/index.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-1483af1f.js +1274 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/lottery-tipping-bullet-group-0e61f537.js +162 -0
- package/dist/esm/lottery-tipping-bullet-group.js +20 -0
- package/dist/esm/lottery-tipping-bullet_2.entry.js +72 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-tipping-bullet-group/app-globals-0f993ce5.js +1 -0
- package/dist/lottery-tipping-bullet-group/index-1483af1f.js +2 -0
- package/dist/lottery-tipping-bullet-group/index.esm.js +1 -0
- package/dist/lottery-tipping-bullet-group/lottery-tipping-bullet-group-0e61f537.js +1 -0
- package/dist/lottery-tipping-bullet-group/lottery-tipping-bullet-group.esm.js +1 -0
- package/dist/lottery-tipping-bullet-group/lottery-tipping-bullet_2.entry.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/packages/stencil/lottery-tipping-bullet-group/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/packages/stencil/lottery-tipping-bullet-group/stencil.config.dev.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/packages/stencil/lottery-tipping-bullet-group/storybook/main.d.ts +3 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/packages/stencil/lottery-tipping-bullet-group/storybook/preview.d.ts +70 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/tools/plugins/index.d.ts +3 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/lottery-tipping-bullet-group/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/lottery-tipping-bullet/index.d.ts +1 -0
- package/dist/types/components/lottery-tipping-bullet/lottery-tipping-bullet.d.ts +44 -0
- package/dist/types/components/lottery-tipping-bullet-group/index.d.ts +1 -0
- package/dist/types/components/lottery-tipping-bullet-group/lottery-tipping-bullet-group.d.ts +26 -0
- package/dist/types/components.d.ts +159 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/index.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
package/dist/collection/components/lottery-tipping-bullet-group/lottery-tipping-bullet-group.js
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
3
|
+
export class LotteryTippingBulletGroup {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.mbSource = undefined;
|
|
6
|
+
this.clientStyling = undefined;
|
|
7
|
+
this.clientStylingUrl = undefined;
|
|
8
|
+
this.positionIdx = undefined;
|
|
9
|
+
this.theme = 'default';
|
|
10
|
+
this.mode = 'single';
|
|
11
|
+
this.bulletConfigContent = '';
|
|
12
|
+
}
|
|
13
|
+
get bulletConfigArr() {
|
|
14
|
+
const defaultConfig = [
|
|
15
|
+
{
|
|
16
|
+
value: '1'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: 'X'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: '2'
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
if (typeof this.bulletConfigContent === 'string' && this.bulletConfigContent) {
|
|
26
|
+
try {
|
|
27
|
+
const _temp = JSON.parse(this.bulletConfigContent);
|
|
28
|
+
return _temp;
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
console.error('Error parsing bulletConfigContent:', e);
|
|
32
|
+
return defaultConfig;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return defaultConfig;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
40
|
+
if (newValue != oldValue) {
|
|
41
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
45
|
+
if (newValue != oldValue) {
|
|
46
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
50
|
+
if (newValue != oldValue) {
|
|
51
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
if (this.stylingContainer) {
|
|
56
|
+
if (this.mbSource)
|
|
57
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
58
|
+
if (this.clientStyling)
|
|
59
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
60
|
+
if (this.clientStylingUrl)
|
|
61
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
disconnectedCallback() {
|
|
65
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
66
|
+
}
|
|
67
|
+
lotteryTippingBulletSelectionHandler(event) {
|
|
68
|
+
const { positionIdx } = event.detail;
|
|
69
|
+
this.handleToggle(positionIdx);
|
|
70
|
+
}
|
|
71
|
+
handleToggle(index) {
|
|
72
|
+
let newConfigArr = [...this.bulletConfigArr];
|
|
73
|
+
if (this.mode === 'single') {
|
|
74
|
+
// single mode: only one button can be selected
|
|
75
|
+
newConfigArr = newConfigArr.map((item) => (Object.assign(Object.assign({}, item), { isSelected: false })));
|
|
76
|
+
newConfigArr[index].isSelected = true;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// multi mode: multiple buttons can be selected
|
|
80
|
+
newConfigArr = newConfigArr.map((item) => (Object.assign({}, item)));
|
|
81
|
+
newConfigArr[index].isSelected = !newConfigArr[index].isSelected;
|
|
82
|
+
}
|
|
83
|
+
this.lotteryTippingBulletGroupToggleEvent.emit({
|
|
84
|
+
bulletConfigArr: newConfigArr,
|
|
85
|
+
positionIdx: this.positionIdx + '-' + index
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
var _a;
|
|
90
|
+
return (h("div", { ref: (el) => (this.stylingContainer = el), key: this.positionIdx }, h("div", { key: '68223022eed831932c571378164be913206d98e9', style: { display: 'flex', flexDirection: 'row', gap: '10px' } }, (_a = this.bulletConfigArr) === null || _a === void 0 ? void 0 : _a.map((item, index) => (h("div", { key: index }, h("lottery-tipping-bullet", { value: item.value, isSelected: item.isSelected, "position-idx": index, disabled: item.disabled, theme: this.theme, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, mbSource: this.mbSource })))))));
|
|
91
|
+
}
|
|
92
|
+
static get is() { return "lottery-tipping-bullet-group"; }
|
|
93
|
+
static get encapsulation() { return "shadow"; }
|
|
94
|
+
static get originalStyleUrls() {
|
|
95
|
+
return {
|
|
96
|
+
"$": ["lottery-tipping-bullet-group.scss"]
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get styleUrls() {
|
|
100
|
+
return {
|
|
101
|
+
"$": ["lottery-tipping-bullet-group.css"]
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
static get properties() {
|
|
105
|
+
return {
|
|
106
|
+
"mbSource": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "string",
|
|
111
|
+
"resolved": "string",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": ""
|
|
119
|
+
},
|
|
120
|
+
"attribute": "mb-source",
|
|
121
|
+
"reflect": true
|
|
122
|
+
},
|
|
123
|
+
"clientStyling": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "string",
|
|
128
|
+
"resolved": "string",
|
|
129
|
+
"references": {}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"attribute": "client-styling",
|
|
138
|
+
"reflect": true
|
|
139
|
+
},
|
|
140
|
+
"clientStylingUrl": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"mutable": false,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "string",
|
|
145
|
+
"resolved": "string",
|
|
146
|
+
"references": {}
|
|
147
|
+
},
|
|
148
|
+
"required": false,
|
|
149
|
+
"optional": false,
|
|
150
|
+
"docs": {
|
|
151
|
+
"tags": [],
|
|
152
|
+
"text": ""
|
|
153
|
+
},
|
|
154
|
+
"attribute": "client-styling-url",
|
|
155
|
+
"reflect": true
|
|
156
|
+
},
|
|
157
|
+
"positionIdx": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "string",
|
|
162
|
+
"resolved": "string",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": ""
|
|
170
|
+
},
|
|
171
|
+
"attribute": "position-idx",
|
|
172
|
+
"reflect": true
|
|
173
|
+
},
|
|
174
|
+
"theme": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "'default' | 'text'",
|
|
179
|
+
"resolved": "\"default\" | \"text\"",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": ""
|
|
187
|
+
},
|
|
188
|
+
"attribute": "theme",
|
|
189
|
+
"reflect": true,
|
|
190
|
+
"defaultValue": "'default'"
|
|
191
|
+
},
|
|
192
|
+
"mode": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"mutable": false,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "'single' | 'multi'",
|
|
197
|
+
"resolved": "\"multi\" | \"single\"",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": false,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": ""
|
|
205
|
+
},
|
|
206
|
+
"attribute": "mode",
|
|
207
|
+
"reflect": true,
|
|
208
|
+
"defaultValue": "'single'"
|
|
209
|
+
},
|
|
210
|
+
"bulletConfigContent": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "string",
|
|
215
|
+
"resolved": "string",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": ""
|
|
223
|
+
},
|
|
224
|
+
"attribute": "bullet-config-content",
|
|
225
|
+
"reflect": true,
|
|
226
|
+
"defaultValue": "''"
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
static get events() {
|
|
231
|
+
return [{
|
|
232
|
+
"method": "lotteryTippingBulletGroupToggleEvent",
|
|
233
|
+
"name": "lotteryTippingBulletGroupToggle",
|
|
234
|
+
"bubbles": true,
|
|
235
|
+
"cancelable": true,
|
|
236
|
+
"composed": true,
|
|
237
|
+
"docs": {
|
|
238
|
+
"tags": [],
|
|
239
|
+
"text": ""
|
|
240
|
+
},
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "{\n bulletConfigArr: BulletConfigType[];\n positionIdx: string;\n }",
|
|
243
|
+
"resolved": "{ bulletConfigArr: BulletConfigType[]; positionIdx: string; }",
|
|
244
|
+
"references": {
|
|
245
|
+
"BulletConfigType": {
|
|
246
|
+
"location": "import",
|
|
247
|
+
"path": "../../models",
|
|
248
|
+
"id": "../../../../packages/stencil/lottery-tipping-bullet-group/src/models/index.ts::BulletConfigType"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}];
|
|
253
|
+
}
|
|
254
|
+
static get watchers() {
|
|
255
|
+
return [{
|
|
256
|
+
"propName": "clientStyling",
|
|
257
|
+
"methodName": "handleClientStylingChange"
|
|
258
|
+
}, {
|
|
259
|
+
"propName": "clientStylingUrl",
|
|
260
|
+
"methodName": "handleClientStylingUrlChange"
|
|
261
|
+
}, {
|
|
262
|
+
"propName": "mbSource",
|
|
263
|
+
"methodName": "handleMbSourceChange"
|
|
264
|
+
}];
|
|
265
|
+
}
|
|
266
|
+
static get listeners() {
|
|
267
|
+
return [{
|
|
268
|
+
"name": "lotteryTippingBulletToggle",
|
|
269
|
+
"method": "lotteryTippingBulletSelectionHandler",
|
|
270
|
+
"target": undefined,
|
|
271
|
+
"capture": false,
|
|
272
|
+
"passive": false
|
|
273
|
+
}];
|
|
274
|
+
}
|
|
275
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/lottery-tipping-bullet-group';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|