@everymatrix/lottery-selection-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-bc355d7d.js +1310 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/lottery-button_4.cjs.entry.js +486 -0
- package/dist/cjs/lottery-selection-group-1608b2e2.js +480 -0
- package/dist/cjs/lottery-selection-group.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/lottery-selection-group/index.js +1 -0
- package/dist/collection/components/lottery-selection-group/lottery-selection-group.css +84 -0
- package/dist/collection/components/lottery-selection-group/lottery-selection-group.js +685 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/model/type.js +1 -0
- package/dist/collection/utils/locale.utils.js +74 -0
- package/dist/collection/utils/utils.js +86 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-3a4d6110.js +1282 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/lottery-button_4.entry.js +480 -0
- package/dist/esm/lottery-selection-group-656d6729.js +475 -0
- package/dist/esm/lottery-selection-group.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-selection-group/app-globals-0f993ce5.js +1 -0
- package/dist/lottery-selection-group/index-3a4d6110.js +2 -0
- package/dist/lottery-selection-group/index.esm.js +1 -0
- package/dist/lottery-selection-group/lottery-button_4.entry.js +1 -0
- package/dist/lottery-selection-group/lottery-selection-group-656d6729.js +1 -0
- package/dist/lottery-selection-group/lottery-selection-group.esm.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/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/lottery-selection-group/index.d.ts +1 -0
- package/dist/types/components/lottery-selection-group/lottery-selection-group.d.ts +122 -0
- package/dist/types/components.d.ts +218 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model/type.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +14 -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
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
import "../../../../../lottery-button/dist/types/index";
|
|
2
|
+
import "../../../../../lottery-selection/dist/types/index";
|
|
3
|
+
import "../../../../../lottery-tipping-dialog/dist/types/index";
|
|
4
|
+
import { h } from "@stencil/core";
|
|
5
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
6
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
7
|
+
import { addSelectedBulletTexts, buildSelectedBulletTextsArr, getBulletTextsSet, validateInput } from "../../utils/utils";
|
|
8
|
+
export class LotterySelectionGroup {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.mbSource = undefined;
|
|
11
|
+
this.clientStyling = undefined;
|
|
12
|
+
this.clientStylingUrl = undefined;
|
|
13
|
+
this.language = 'en';
|
|
14
|
+
this.translationUrl = '';
|
|
15
|
+
this.splitToken = ',';
|
|
16
|
+
this.selectionGroupId = undefined;
|
|
17
|
+
this.selectionGroupLabel = undefined;
|
|
18
|
+
this.type = 'bet';
|
|
19
|
+
this.selectedBulletTexts = null;
|
|
20
|
+
this.maxSelectedCount = null;
|
|
21
|
+
this.maxDisplayBulletsCount = 11;
|
|
22
|
+
this.bulletTexts = null;
|
|
23
|
+
this.maxIntegerBulletText = null;
|
|
24
|
+
this.minIntegerBulletText = 0;
|
|
25
|
+
this.bulletTextType = 'integer';
|
|
26
|
+
this.hasBorder = true;
|
|
27
|
+
this.hasBackground = true;
|
|
28
|
+
this.dialogTitle = undefined;
|
|
29
|
+
this.dialogInputPlaceholder = undefined;
|
|
30
|
+
this.dialogConfig = {
|
|
31
|
+
width: '400px',
|
|
32
|
+
visible: false,
|
|
33
|
+
onConfirm: () => this.handleFillInAddMore(),
|
|
34
|
+
onCancel: () => this.handleCloseAddMoreDialog()
|
|
35
|
+
};
|
|
36
|
+
this.inputInfo = { valid: true, errorMessage: '', value: '' };
|
|
37
|
+
}
|
|
38
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
39
|
+
if (newValue != oldValue) {
|
|
40
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
44
|
+
if (newValue != oldValue) {
|
|
45
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
49
|
+
if (newValue != oldValue) {
|
|
50
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
componentWillLoad() {
|
|
54
|
+
if (this.translationUrl) {
|
|
55
|
+
getTranslations(JSON.parse(this.translationUrl));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
componentDidLoad() {
|
|
59
|
+
if (this.stylingContainer) {
|
|
60
|
+
if (this.mbSource)
|
|
61
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
62
|
+
if (this.clientStyling)
|
|
63
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
64
|
+
if (this.clientStylingUrl)
|
|
65
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
70
|
+
}
|
|
71
|
+
lotteryBulletClickHandler(event) {
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
// if it's input type, open the dialog
|
|
74
|
+
if (event.detail.type === 'input') {
|
|
75
|
+
this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: true });
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (['delete', 'toggle'].includes(event.detail.type)) {
|
|
79
|
+
this.bulletGroupUpdateSelectedBulletTexts.emit({
|
|
80
|
+
newSelectedBulletTexts: buildSelectedBulletTextsArr(event.detail, Array.from(this.selectedSet), this.maxSelectedCount).join(this.splitToken),
|
|
81
|
+
selectionGroupId: this.selectionGroupId
|
|
82
|
+
});
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
get selectedSet() {
|
|
87
|
+
return getBulletTextsSet(this.selectedBulletTexts, this.splitToken);
|
|
88
|
+
}
|
|
89
|
+
get bulletTextsSet() {
|
|
90
|
+
if (this.bulletTexts)
|
|
91
|
+
return getBulletTextsSet(this.bulletTexts, this.splitToken);
|
|
92
|
+
if (this.bulletTextType === 'integer' &&
|
|
93
|
+
this.maxIntegerBulletText !== null &&
|
|
94
|
+
this.maxIntegerBulletText !== undefined) {
|
|
95
|
+
return getBulletTextsSet(Array.from({ length: Number(this.lastDisplayBulletText) - this.minIntegerBulletText + 1 }, (_, index) => this.minIntegerBulletText + index).join(this.splitToken), this.splitToken);
|
|
96
|
+
}
|
|
97
|
+
// If neither bulletTexts nor maxIntegerBulletText are provided,
|
|
98
|
+
return new Set();
|
|
99
|
+
}
|
|
100
|
+
// the last bullet text
|
|
101
|
+
get lastDisplayBulletText() {
|
|
102
|
+
if (this.bulletTextType === 'integer') {
|
|
103
|
+
if (this.maxIntegerBulletText !== null && this.maxIntegerBulletText !== undefined) {
|
|
104
|
+
return Math.min(this.maxIntegerBulletText, this.minIntegerBulletText + this.maxDisplayBulletsCount - 1);
|
|
105
|
+
}
|
|
106
|
+
return this.minIntegerBulletText + this.maxDisplayBulletsCount - 1;
|
|
107
|
+
}
|
|
108
|
+
// Text mode: return the text at the max display index if available
|
|
109
|
+
if (this.bulletTextsSet.size > 0) {
|
|
110
|
+
const texts = Array.from(this.bulletTextsSet);
|
|
111
|
+
if (texts.length >= this.maxDisplayBulletsCount) {
|
|
112
|
+
return texts[this.maxDisplayBulletsCount - 1];
|
|
113
|
+
}
|
|
114
|
+
return texts[texts.length - 1]; // If fewer than maxDisplayBulletsCount, return the last one
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
get isSingleSelectionMode() {
|
|
119
|
+
return this.maxSelectedCount === 1;
|
|
120
|
+
}
|
|
121
|
+
getBulletToRender() {
|
|
122
|
+
const allBulletTexts = Array.from(this.bulletTextsSet);
|
|
123
|
+
// Determine which bullets to display based on type and limit
|
|
124
|
+
let bulletsToRender = allBulletTexts;
|
|
125
|
+
let showInputButton = false;
|
|
126
|
+
if (this.bulletTextType === 'text') {
|
|
127
|
+
// For text, if we have more items than the limit, we need an input button.
|
|
128
|
+
// The input button takes one slot, so we show (limit - 1) items.
|
|
129
|
+
if (allBulletTexts.length > this.maxDisplayBulletsCount) {
|
|
130
|
+
showInputButton = true;
|
|
131
|
+
bulletsToRender = allBulletTexts.slice(0, this.maxDisplayBulletsCount - 1);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
bulletsToRender = allBulletTexts;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
// For integer, logic is based on maxIntegerBulletText vs displayed range
|
|
139
|
+
showInputButton =
|
|
140
|
+
this.maxIntegerBulletText !== null &&
|
|
141
|
+
this.maxIntegerBulletText !== undefined &&
|
|
142
|
+
this.maxIntegerBulletText > Number(this.lastDisplayBulletText);
|
|
143
|
+
// Integer bullets generation already respects the count, no slicing needed on the raw set
|
|
144
|
+
bulletsToRender = allBulletTexts;
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
bulletsToRender,
|
|
148
|
+
showInputButton
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
renderBulletGroup() {
|
|
152
|
+
let items = [];
|
|
153
|
+
if (this.type === 'bet') {
|
|
154
|
+
const isMaxSelected = this.maxSelectedCount !== null && this.selectedSet.size >= this.maxSelectedCount;
|
|
155
|
+
const { bulletsToRender, showInputButton } = this.getBulletToRender();
|
|
156
|
+
bulletsToRender.forEach((text, idx) => {
|
|
157
|
+
let bulletType = 'toggle';
|
|
158
|
+
if (!this.selectedSet.has(String(text)) && isMaxSelected && !this.isSingleSelectionMode) {
|
|
159
|
+
bulletType = 'disabled';
|
|
160
|
+
}
|
|
161
|
+
items.push({
|
|
162
|
+
value: this.selectedSet.has(String(text)) ? 1 : 0,
|
|
163
|
+
text: String(text),
|
|
164
|
+
idx,
|
|
165
|
+
type: bulletType
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
if (showInputButton) {
|
|
169
|
+
let inputBulletType = 'input';
|
|
170
|
+
if (isMaxSelected && !this.isSingleSelectionMode) {
|
|
171
|
+
inputBulletType = 'disabled';
|
|
172
|
+
}
|
|
173
|
+
const inputButtonText = this.bulletTextType === 'text' ? '...' : `${this.lastDisplayBulletText}+`;
|
|
174
|
+
const inputButtonIdx = this.bulletTextType === 'text' ? -1 : Number(this.lastDisplayBulletText) + 1;
|
|
175
|
+
// Special handling for integer mode:
|
|
176
|
+
// If the generated set is "full" (size == maxDisplayBulletsCount),
|
|
177
|
+
// we need to remove the last item to make room for the "N+" button
|
|
178
|
+
// so the total visual count remains consistent.
|
|
179
|
+
if (this.bulletTextType === 'integer' && items.length >= this.maxDisplayBulletsCount) {
|
|
180
|
+
items.pop();
|
|
181
|
+
}
|
|
182
|
+
items.push({
|
|
183
|
+
value: 0,
|
|
184
|
+
text: inputButtonText,
|
|
185
|
+
idx: inputButtonIdx,
|
|
186
|
+
type: inputBulletType
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else if (['choice', 'preview'].includes(this.type)) {
|
|
191
|
+
// For choice/preview, also respect the visual limit for text mode
|
|
192
|
+
const { bulletsToRender } = this.getBulletToRender();
|
|
193
|
+
bulletsToRender.forEach((text, idx) => {
|
|
194
|
+
let bulletType = 'toggle';
|
|
195
|
+
if (this.type === 'preview') {
|
|
196
|
+
bulletType = 'readonly';
|
|
197
|
+
}
|
|
198
|
+
else if (this.selectedSet.has(String(text))) {
|
|
199
|
+
bulletType = 'delete';
|
|
200
|
+
}
|
|
201
|
+
items.push({
|
|
202
|
+
value: this.selectedSet.has(String(text)) ? 1 : 0,
|
|
203
|
+
text,
|
|
204
|
+
idx,
|
|
205
|
+
type: bulletType
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return (h("div", { class: "lottery-selection-group__item--right" }, items.map((item) => {
|
|
210
|
+
return (h("lottery-selection", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, mbSource: this.mbSource, text: item.text, idx: item.idx, value: item.value, type: item.type, hasBorder: this.hasBorder, hasBackground: this.hasBackground }));
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
213
|
+
handleCloseAddMoreDialog() {
|
|
214
|
+
this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: false });
|
|
215
|
+
this.inputInfo = { value: '', errorMessage: '', valid: true };
|
|
216
|
+
}
|
|
217
|
+
handleInputChange(e) {
|
|
218
|
+
const inputElement = e.target;
|
|
219
|
+
const value = inputElement.value;
|
|
220
|
+
this.inputInfo = Object.assign(Object.assign({}, this.inputInfo), { value: value });
|
|
221
|
+
this.inputInfo = validateInput({
|
|
222
|
+
value,
|
|
223
|
+
selectedSet: this.selectedSet,
|
|
224
|
+
maxValue: this.maxIntegerBulletText,
|
|
225
|
+
minValue: this.bulletTextType === 'integer' ? Number(this.lastDisplayBulletText) + 1 : undefined,
|
|
226
|
+
language: this.language,
|
|
227
|
+
type: this.bulletTextType
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
handleFillInAddMore() {
|
|
231
|
+
if (this.inputInfo.valid) {
|
|
232
|
+
const { value } = this.inputInfo;
|
|
233
|
+
// Normalize the value (e.g., "05" -> "5") to match validation logic
|
|
234
|
+
let normalizedValue = value;
|
|
235
|
+
if (this.bulletTextType === 'integer') {
|
|
236
|
+
normalizedValue = String(Number(value));
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
normalizedValue = value.trim();
|
|
240
|
+
}
|
|
241
|
+
let newSelectedBulletTexts;
|
|
242
|
+
if (this.isSingleSelectionMode) {
|
|
243
|
+
newSelectedBulletTexts = normalizedValue;
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
newSelectedBulletTexts = addSelectedBulletTexts(normalizedValue, Array.from(this.selectedSet)).join(this.splitToken);
|
|
247
|
+
}
|
|
248
|
+
this.bulletGroupUpdateSelectedBulletTexts.emit({
|
|
249
|
+
newSelectedBulletTexts,
|
|
250
|
+
selectionGroupId: this.selectionGroupId
|
|
251
|
+
});
|
|
252
|
+
this.handleCloseAddMoreDialog();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
render() {
|
|
256
|
+
return (h("div", { key: '66b8e9c63d948eb2f7eb37adb80892dbedd7df9a', class: "lottery-selection-group", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '6562fdcad0f352b5e2d03edcc980a9aeab32277e', class: "lottery-selection-group__item" }, this.selectionGroupLabel && (h("div", { key: '43c2132e4904a2b69b970d9b2074f120ed4d0986', class: "lottery-selection-group__item--left" }, this.selectionGroupLabel)), this.renderBulletGroup()), h("lottery-tipping-dialog", { key: 'cb693d10e6b499628909571021d8508cdebbe29a', visible: this.dialogConfig.visible, width: this.dialogConfig.width, onCancel: this.dialogConfig.onCancel }, h("div", { key: 'dd312634574bbe1b4d3de7e82a9c58f58f846c1a', class: "addSelectionDialog" }, h("div", { key: 'b371b1090598f0219a7c652bab51e9d349703c34', class: "addSelectionDialog-title" }, this.dialogTitle || (this.bulletTextType === 'text'
|
|
257
|
+
? translate('enterValue', this.language)
|
|
258
|
+
: translate('enterScoreUpTo', this.language, {
|
|
259
|
+
maxScore: this.maxIntegerBulletText
|
|
260
|
+
}))), h("input", { key: 'b5f1bb74999246dac8dc20f04e3af893deae6654', type: "text", class: {
|
|
261
|
+
'dialog-input': true,
|
|
262
|
+
invalid: !this.inputInfo.valid
|
|
263
|
+
}, value: this.inputInfo.value, onInput: this.handleInputChange.bind(this), placeholder: this.dialogInputPlaceholder }), h("div", { key: 'f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6', class: "error-message" }, this.inputInfo.errorMessage)), h("div", { key: '4c580dae14b38aff03e17067b2c0b72d01aa4f42', slot: "footer", class: "addSelectionDialog-footer" }, h("lottery-button", { key: '874aa0ffde8fe2d0b08efea0cf951f101ab8dad0', onClick: this.dialogConfig.onCancel, text: translate('cancel', this.language), variant: "outline" }), h("lottery-button", { key: '63a556eb5f9ad1cdd357c017756be274d40ef235', onClick: this.dialogConfig.onConfirm, text: translate('confirm', this.language), variant: "primary", disabled: !this.inputInfo.valid || !this.inputInfo.value })))));
|
|
264
|
+
}
|
|
265
|
+
static get is() { return "lottery-selection-group"; }
|
|
266
|
+
static get encapsulation() { return "shadow"; }
|
|
267
|
+
static get originalStyleUrls() {
|
|
268
|
+
return {
|
|
269
|
+
"$": ["lottery-selection-group.scss"]
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
static get styleUrls() {
|
|
273
|
+
return {
|
|
274
|
+
"$": ["lottery-selection-group.css"]
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
static get properties() {
|
|
278
|
+
return {
|
|
279
|
+
"mbSource": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "string",
|
|
284
|
+
"resolved": "string",
|
|
285
|
+
"references": {}
|
|
286
|
+
},
|
|
287
|
+
"required": false,
|
|
288
|
+
"optional": false,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [],
|
|
291
|
+
"text": "The source for stream styling via a service."
|
|
292
|
+
},
|
|
293
|
+
"attribute": "mb-source",
|
|
294
|
+
"reflect": true
|
|
295
|
+
},
|
|
296
|
+
"clientStyling": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "string",
|
|
301
|
+
"resolved": "string",
|
|
302
|
+
"references": {}
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
306
|
+
"docs": {
|
|
307
|
+
"tags": [],
|
|
308
|
+
"text": "Custom CSS styles to apply to the component."
|
|
309
|
+
},
|
|
310
|
+
"attribute": "client-styling",
|
|
311
|
+
"reflect": true
|
|
312
|
+
},
|
|
313
|
+
"clientStylingUrl": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"mutable": false,
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "string",
|
|
318
|
+
"resolved": "string",
|
|
319
|
+
"references": {}
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": false,
|
|
323
|
+
"docs": {
|
|
324
|
+
"tags": [],
|
|
325
|
+
"text": "URL to a custom CSS file for additional styling."
|
|
326
|
+
},
|
|
327
|
+
"attribute": "client-styling-url",
|
|
328
|
+
"reflect": true
|
|
329
|
+
},
|
|
330
|
+
"language": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "string",
|
|
335
|
+
"resolved": "string",
|
|
336
|
+
"references": {}
|
|
337
|
+
},
|
|
338
|
+
"required": false,
|
|
339
|
+
"optional": false,
|
|
340
|
+
"docs": {
|
|
341
|
+
"tags": [],
|
|
342
|
+
"text": "The language code to use for translations. Defaults to 'en'."
|
|
343
|
+
},
|
|
344
|
+
"attribute": "language",
|
|
345
|
+
"reflect": true,
|
|
346
|
+
"defaultValue": "'en'"
|
|
347
|
+
},
|
|
348
|
+
"translationUrl": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"mutable": false,
|
|
351
|
+
"complexType": {
|
|
352
|
+
"original": "string",
|
|
353
|
+
"resolved": "string",
|
|
354
|
+
"references": {}
|
|
355
|
+
},
|
|
356
|
+
"required": false,
|
|
357
|
+
"optional": false,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [],
|
|
360
|
+
"text": "URL to fetch custom translation data from."
|
|
361
|
+
},
|
|
362
|
+
"attribute": "translation-url",
|
|
363
|
+
"reflect": true,
|
|
364
|
+
"defaultValue": "''"
|
|
365
|
+
},
|
|
366
|
+
"splitToken": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"mutable": false,
|
|
369
|
+
"complexType": {
|
|
370
|
+
"original": "string",
|
|
371
|
+
"resolved": "string",
|
|
372
|
+
"references": {}
|
|
373
|
+
},
|
|
374
|
+
"required": false,
|
|
375
|
+
"optional": false,
|
|
376
|
+
"docs": {
|
|
377
|
+
"tags": [],
|
|
378
|
+
"text": "The delimiter used to split the `bulletTexts` and `selectedBulletTexts` strings into individual items. Defaults to ','."
|
|
379
|
+
},
|
|
380
|
+
"attribute": "split-token",
|
|
381
|
+
"reflect": true,
|
|
382
|
+
"defaultValue": "','"
|
|
383
|
+
},
|
|
384
|
+
"selectionGroupId": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"mutable": false,
|
|
387
|
+
"complexType": {
|
|
388
|
+
"original": "string",
|
|
389
|
+
"resolved": "string",
|
|
390
|
+
"references": {}
|
|
391
|
+
},
|
|
392
|
+
"required": false,
|
|
393
|
+
"optional": false,
|
|
394
|
+
"docs": {
|
|
395
|
+
"tags": [],
|
|
396
|
+
"text": "Required: The ID or index of the group, used to identify the group in the emitted event."
|
|
397
|
+
},
|
|
398
|
+
"attribute": "selection-group-id",
|
|
399
|
+
"reflect": true
|
|
400
|
+
},
|
|
401
|
+
"selectionGroupLabel": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "string",
|
|
406
|
+
"resolved": "string",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": false,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "The label to display for this selection group."
|
|
414
|
+
},
|
|
415
|
+
"attribute": "selection-group-label",
|
|
416
|
+
"reflect": true
|
|
417
|
+
},
|
|
418
|
+
"type": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"mutable": false,
|
|
421
|
+
"complexType": {
|
|
422
|
+
"original": "BetPlacementType",
|
|
423
|
+
"resolved": "\"bet\" | \"choice\" | \"preview\"",
|
|
424
|
+
"references": {
|
|
425
|
+
"BetPlacementType": {
|
|
426
|
+
"location": "import",
|
|
427
|
+
"path": "../../model/type",
|
|
428
|
+
"id": "../../../../packages/stencil/lottery-selection-group/src/model/type.ts::BetPlacementType"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"required": false,
|
|
433
|
+
"optional": false,
|
|
434
|
+
"docs": {
|
|
435
|
+
"tags": [],
|
|
436
|
+
"text": "Defines the behavior and rendering mode of the selection group (e.g., 'bet', 'choice', 'preview'). Defaults to 'bet'."
|
|
437
|
+
},
|
|
438
|
+
"attribute": "type",
|
|
439
|
+
"reflect": true,
|
|
440
|
+
"defaultValue": "'bet'"
|
|
441
|
+
},
|
|
442
|
+
"selectedBulletTexts": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"mutable": false,
|
|
445
|
+
"complexType": {
|
|
446
|
+
"original": "string",
|
|
447
|
+
"resolved": "string",
|
|
448
|
+
"references": {}
|
|
449
|
+
},
|
|
450
|
+
"required": false,
|
|
451
|
+
"optional": false,
|
|
452
|
+
"docs": {
|
|
453
|
+
"tags": [],
|
|
454
|
+
"text": "A [splitToken]-separated string of currently selected bullet texts. e.g., '0,1,2,3'."
|
|
455
|
+
},
|
|
456
|
+
"attribute": "selected-bullet-texts",
|
|
457
|
+
"reflect": true,
|
|
458
|
+
"defaultValue": "null"
|
|
459
|
+
},
|
|
460
|
+
"maxSelectedCount": {
|
|
461
|
+
"type": "number",
|
|
462
|
+
"mutable": false,
|
|
463
|
+
"complexType": {
|
|
464
|
+
"original": "number",
|
|
465
|
+
"resolved": "number",
|
|
466
|
+
"references": {}
|
|
467
|
+
},
|
|
468
|
+
"required": false,
|
|
469
|
+
"optional": false,
|
|
470
|
+
"docs": {
|
|
471
|
+
"tags": [],
|
|
472
|
+
"text": "The maximum number of bullets that can be selected. If null, no limit is enforced."
|
|
473
|
+
},
|
|
474
|
+
"attribute": "max-selected-count",
|
|
475
|
+
"reflect": true,
|
|
476
|
+
"defaultValue": "null"
|
|
477
|
+
},
|
|
478
|
+
"maxDisplayBulletsCount": {
|
|
479
|
+
"type": "number",
|
|
480
|
+
"mutable": false,
|
|
481
|
+
"complexType": {
|
|
482
|
+
"original": "number",
|
|
483
|
+
"resolved": "number",
|
|
484
|
+
"references": {}
|
|
485
|
+
},
|
|
486
|
+
"required": false,
|
|
487
|
+
"optional": false,
|
|
488
|
+
"docs": {
|
|
489
|
+
"tags": [],
|
|
490
|
+
"text": "The maximum number of bullets to display in the group. Defaults to 11."
|
|
491
|
+
},
|
|
492
|
+
"attribute": "max-display-bullets-count",
|
|
493
|
+
"reflect": true,
|
|
494
|
+
"defaultValue": "11"
|
|
495
|
+
},
|
|
496
|
+
"bulletTexts": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"mutable": false,
|
|
499
|
+
"complexType": {
|
|
500
|
+
"original": "string",
|
|
501
|
+
"resolved": "string",
|
|
502
|
+
"references": {}
|
|
503
|
+
},
|
|
504
|
+
"required": false,
|
|
505
|
+
"optional": false,
|
|
506
|
+
"docs": {
|
|
507
|
+
"tags": [],
|
|
508
|
+
"text": "A [splitToken]-separated string of custom bullet texts to display. If not provided, numeric bullets are generated.\nExample: 'H,D,A' or '0,1,2,3,4,5,6,7,8,9'."
|
|
509
|
+
},
|
|
510
|
+
"attribute": "bullet-texts",
|
|
511
|
+
"reflect": true,
|
|
512
|
+
"defaultValue": "null"
|
|
513
|
+
},
|
|
514
|
+
"maxIntegerBulletText": {
|
|
515
|
+
"type": "number",
|
|
516
|
+
"mutable": false,
|
|
517
|
+
"complexType": {
|
|
518
|
+
"original": "number",
|
|
519
|
+
"resolved": "number",
|
|
520
|
+
"references": {}
|
|
521
|
+
},
|
|
522
|
+
"required": false,
|
|
523
|
+
"optional": false,
|
|
524
|
+
"docs": {
|
|
525
|
+
"tags": [],
|
|
526
|
+
"text": "represents the absolute maximum integer value a bullet can have."
|
|
527
|
+
},
|
|
528
|
+
"attribute": "max-integer-bullet-text",
|
|
529
|
+
"reflect": true,
|
|
530
|
+
"defaultValue": "null"
|
|
531
|
+
},
|
|
532
|
+
"minIntegerBulletText": {
|
|
533
|
+
"type": "number",
|
|
534
|
+
"mutable": false,
|
|
535
|
+
"complexType": {
|
|
536
|
+
"original": "number",
|
|
537
|
+
"resolved": "number",
|
|
538
|
+
"references": {}
|
|
539
|
+
},
|
|
540
|
+
"required": false,
|
|
541
|
+
"optional": false,
|
|
542
|
+
"docs": {
|
|
543
|
+
"tags": [],
|
|
544
|
+
"text": "The minimum integer value for generated numeric bullets. Defaults to 0."
|
|
545
|
+
},
|
|
546
|
+
"attribute": "min-integer-bullet-text",
|
|
547
|
+
"reflect": true,
|
|
548
|
+
"defaultValue": "0"
|
|
549
|
+
},
|
|
550
|
+
"bulletTextType": {
|
|
551
|
+
"type": "string",
|
|
552
|
+
"mutable": false,
|
|
553
|
+
"complexType": {
|
|
554
|
+
"original": "'integer' | 'text'",
|
|
555
|
+
"resolved": "\"integer\" | \"text\"",
|
|
556
|
+
"references": {}
|
|
557
|
+
},
|
|
558
|
+
"required": false,
|
|
559
|
+
"optional": false,
|
|
560
|
+
"docs": {
|
|
561
|
+
"tags": [],
|
|
562
|
+
"text": "Defines the expected type of bullet text: 'integer' for numbers, 'text' for any string. Defaults to 'integer'."
|
|
563
|
+
},
|
|
564
|
+
"attribute": "bullet-text-type",
|
|
565
|
+
"reflect": true,
|
|
566
|
+
"defaultValue": "'integer'"
|
|
567
|
+
},
|
|
568
|
+
"hasBorder": {
|
|
569
|
+
"type": "boolean",
|
|
570
|
+
"mutable": false,
|
|
571
|
+
"complexType": {
|
|
572
|
+
"original": "boolean",
|
|
573
|
+
"resolved": "boolean",
|
|
574
|
+
"references": {}
|
|
575
|
+
},
|
|
576
|
+
"required": false,
|
|
577
|
+
"optional": false,
|
|
578
|
+
"docs": {
|
|
579
|
+
"tags": [],
|
|
580
|
+
"text": "Whether the bullet has a border. Defaults to true."
|
|
581
|
+
},
|
|
582
|
+
"attribute": "has-border",
|
|
583
|
+
"reflect": true,
|
|
584
|
+
"defaultValue": "true"
|
|
585
|
+
},
|
|
586
|
+
"hasBackground": {
|
|
587
|
+
"type": "boolean",
|
|
588
|
+
"mutable": false,
|
|
589
|
+
"complexType": {
|
|
590
|
+
"original": "boolean",
|
|
591
|
+
"resolved": "boolean",
|
|
592
|
+
"references": {}
|
|
593
|
+
},
|
|
594
|
+
"required": false,
|
|
595
|
+
"optional": false,
|
|
596
|
+
"docs": {
|
|
597
|
+
"tags": [],
|
|
598
|
+
"text": "Whether the bullet has a background color. Defaults to true."
|
|
599
|
+
},
|
|
600
|
+
"attribute": "has-background",
|
|
601
|
+
"reflect": true,
|
|
602
|
+
"defaultValue": "true"
|
|
603
|
+
},
|
|
604
|
+
"dialogTitle": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"mutable": false,
|
|
607
|
+
"complexType": {
|
|
608
|
+
"original": "string",
|
|
609
|
+
"resolved": "string",
|
|
610
|
+
"references": {}
|
|
611
|
+
},
|
|
612
|
+
"required": false,
|
|
613
|
+
"optional": false,
|
|
614
|
+
"docs": {
|
|
615
|
+
"tags": [],
|
|
616
|
+
"text": "Custom title for the add-more dialog. If not provided, a default translated string is used."
|
|
617
|
+
},
|
|
618
|
+
"attribute": "dialog-title",
|
|
619
|
+
"reflect": true
|
|
620
|
+
},
|
|
621
|
+
"dialogInputPlaceholder": {
|
|
622
|
+
"type": "string",
|
|
623
|
+
"mutable": false,
|
|
624
|
+
"complexType": {
|
|
625
|
+
"original": "string",
|
|
626
|
+
"resolved": "string",
|
|
627
|
+
"references": {}
|
|
628
|
+
},
|
|
629
|
+
"required": false,
|
|
630
|
+
"optional": false,
|
|
631
|
+
"docs": {
|
|
632
|
+
"tags": [],
|
|
633
|
+
"text": "Custom placeholder for the input field in the add-more dialog."
|
|
634
|
+
},
|
|
635
|
+
"attribute": "dialog-input-placeholder",
|
|
636
|
+
"reflect": true
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
static get states() {
|
|
641
|
+
return {
|
|
642
|
+
"dialogConfig": {},
|
|
643
|
+
"inputInfo": {}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
static get events() {
|
|
647
|
+
return [{
|
|
648
|
+
"method": "bulletGroupUpdateSelectedBulletTexts",
|
|
649
|
+
"name": "bulletGroupUpdateSelection",
|
|
650
|
+
"bubbles": true,
|
|
651
|
+
"cancelable": true,
|
|
652
|
+
"composed": true,
|
|
653
|
+
"docs": {
|
|
654
|
+
"tags": [],
|
|
655
|
+
"text": "Emitted when the selection of bullets in the group changes."
|
|
656
|
+
},
|
|
657
|
+
"complexType": {
|
|
658
|
+
"original": "{ newSelectedBulletTexts: string; selectionGroupId: string }",
|
|
659
|
+
"resolved": "{ newSelectedBulletTexts: string; selectionGroupId: string; }",
|
|
660
|
+
"references": {}
|
|
661
|
+
}
|
|
662
|
+
}];
|
|
663
|
+
}
|
|
664
|
+
static get watchers() {
|
|
665
|
+
return [{
|
|
666
|
+
"propName": "clientStyling",
|
|
667
|
+
"methodName": "handleClientStylingChange"
|
|
668
|
+
}, {
|
|
669
|
+
"propName": "clientStylingUrl",
|
|
670
|
+
"methodName": "handleClientStylingUrlChange"
|
|
671
|
+
}, {
|
|
672
|
+
"propName": "mbSource",
|
|
673
|
+
"methodName": "handleMbSourceChange"
|
|
674
|
+
}];
|
|
675
|
+
}
|
|
676
|
+
static get listeners() {
|
|
677
|
+
return [{
|
|
678
|
+
"name": "lotteryBulletClick",
|
|
679
|
+
"method": "lotteryBulletClickHandler",
|
|
680
|
+
"target": undefined,
|
|
681
|
+
"capture": false,
|
|
682
|
+
"passive": false
|
|
683
|
+
}];
|
|
684
|
+
}
|
|
685
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/lottery-selection-group';
|