@everymatrix/lottery-hakuna-ticket-history 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.
Files changed (64) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-dc95b9af.js +1336 -0
  3. package/dist/cjs/index.cjs.js +10 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/lottery-button_8.cjs.entry.js +1427 -0
  6. package/dist/cjs/lottery-hakuna-ticket-history-84d9a41b.js +2697 -0
  7. package/dist/cjs/lottery-hakuna-ticket-history.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +50 -0
  9. package/dist/collection/components/lottery-hakuna-ticket-history/index.js +1 -0
  10. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.css +74 -0
  11. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.js +589 -0
  12. package/dist/collection/components/lottery-infinite-scroll/lottery-infinite-scroll.css +69 -0
  13. package/dist/collection/components/lottery-infinite-scroll/lottery-infinite-scroll.js +556 -0
  14. package/dist/collection/index.js +1 -0
  15. package/dist/collection/models/index.js +21 -0
  16. package/dist/collection/utils/api.js +149 -0
  17. package/dist/collection/utils/locale.utils.js +42 -0
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/esm/app-globals-0f993ce5.js +3 -0
  20. package/dist/esm/index-50addd47.js +1307 -0
  21. package/dist/esm/index.js +2 -0
  22. package/dist/esm/loader.js +11 -0
  23. package/dist/esm/lottery-button_8.entry.js +1417 -0
  24. package/dist/esm/lottery-hakuna-ticket-history-cdab50d9.js +2691 -0
  25. package/dist/esm/lottery-hakuna-ticket-history.js +20 -0
  26. package/dist/index.cjs.js +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/lottery-hakuna-ticket-history/app-globals-0f993ce5.js +1 -0
  29. package/dist/lottery-hakuna-ticket-history/index-50addd47.js +2 -0
  30. package/dist/lottery-hakuna-ticket-history/index.esm.js +1 -0
  31. package/dist/lottery-hakuna-ticket-history/lottery-button_8.entry.js +1 -0
  32. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history-cdab50d9.js +1 -0
  33. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.esm.js +1 -0
  34. package/dist/stencil.config.dev.js +19 -0
  35. package/dist/stencil.config.js +19 -0
  36. package/dist/storybook/main.js +43 -0
  37. package/dist/storybook/preview.js +9 -0
  38. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  39. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/stencil.config.d.ts +2 -0
  40. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/stencil.config.dev.d.ts +2 -0
  41. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/storybook/main.d.ts +3 -0
  42. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/storybook/preview.d.ts +70 -0
  43. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/index.d.ts +4 -0
  44. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  45. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  46. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  47. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  48. package/dist/types/components/lottery-hakuna-ticket-history/index.d.ts +1 -0
  49. package/dist/types/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.d.ts +131 -0
  50. package/dist/types/components/lottery-infinite-scroll/lottery-infinite-scroll.d.ts +106 -0
  51. package/dist/types/components.d.ts +362 -0
  52. package/dist/types/index.d.ts +1 -0
  53. package/dist/types/models/index.d.ts +199 -0
  54. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  55. package/dist/types/utils/api.d.ts +8 -0
  56. package/dist/types/utils/locale.utils.d.ts +3 -0
  57. package/dist/types/utils/utils.d.ts +1 -0
  58. package/loader/cdn.js +1 -0
  59. package/loader/index.cjs.js +1 -0
  60. package/loader/index.d.ts +24 -0
  61. package/loader/index.es2017.js +1 -0
  62. package/loader/index.js +2 -0
  63. package/loader/package.json +11 -0
  64. package/package.json +27 -0
@@ -0,0 +1,589 @@
1
+ import "../../../../../lottery-hakuna-ticket-history-item/dist/types/index";
2
+ import { h } from "@stencil/core";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
4
+ import { GameType } from "../../models";
5
+ import { fetchTicketList } from "../../utils/api";
6
+ import { resolveTranslationUrl, translate } from "../../utils/locale.utils";
7
+ import { LoadingOutlined } from "@ant-design/icons-svg";
8
+ import { renderIconDefinitionToSVGElement } from "@ant-design/icons-svg/es/helpers";
9
+ const loadingOutLinedSvg = renderIconDefinitionToSVGElement(LoadingOutlined, {
10
+ extraSVGAttrs: { width: '14px', height: '14px', fill: 'currentColor' }
11
+ });
12
+ export class LotteryHakunaTicketHistory {
13
+ constructor() {
14
+ this.page = 0;
15
+ this.vendorGameType = GameType.Lottery;
16
+ this.customStyle = `
17
+ :host {
18
+ --lottery-hakuna-ticket-history-item-container-min-width: ${this.minItemWidth}px;
19
+
20
+ .lottery-hakuna-ticket-history-item__container {
21
+ justify-content: flex-start;
22
+ }
23
+ }
24
+
25
+ .lottery-hakuna-ticket-history-item__container-wrapper {
26
+ height: 100%;
27
+ box-sizing: border-box;
28
+ }
29
+ .lottery-hakuna-ticket-history-item__container {
30
+ height: 100%;
31
+ box-sizing: border-box;
32
+ }
33
+ `;
34
+ this.handleLoadMore = () => {
35
+ if (!this.isLoading && this.hasMore) {
36
+ this.getTicketList(this.page + 1);
37
+ }
38
+ };
39
+ this.handleRefresh = () => {
40
+ if (!this.isRefreshing) {
41
+ this.page = 1; // Reset page number
42
+ this.getTicketList(1, true);
43
+ }
44
+ };
45
+ this.renderSkeleton = () => {
46
+ return (h("lottery-hakuna-ticket-history-item", { "client-styling": this.customStyle + (this.clientStyling || ''), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, translationUrl: this.translationUrl, language: this.language, showSkeleton: true }));
47
+ };
48
+ this.renderItem = (ticket) => {
49
+ return (h("lottery-hakuna-ticket-history-item", { "client-styling": this.customStyle + (this.clientStyling || ''), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, translationUrl: this.translationUrl, language: this.language, key: ticket.id, "history-item-name": ticket.name, "history-item-image-src": ticket.imageSrc, "ticket-id": ticket.id, "total-amount": ticket.totalAmount, date: ticket.date, time: ticket.time, "selected-numbers": ticket.selectedNumbers }));
50
+ };
51
+ this.mbSource = undefined;
52
+ this.clientStyling = undefined;
53
+ this.clientStylingUrl = undefined;
54
+ this.language = 'en';
55
+ this.translationUrl = '';
56
+ this.endpoint = undefined;
57
+ this.gameId = undefined;
58
+ this.playerId = undefined;
59
+ this.sessionId = '';
60
+ this.scrollThreshold = '0px 0px 200px 0px';
61
+ this.scrollItemHeight = 110;
62
+ this.scrollContainerHeight = 500;
63
+ this.ticketHistoryTitle = 'YOUR TICKET';
64
+ this.ticketHistoryItemImageSrc = undefined;
65
+ this.ticketHistoryItemName = undefined;
66
+ this.ticketHistoryItemCurrency = 'R';
67
+ this.listLoadingText = undefined;
68
+ this.listRefreshingText = undefined;
69
+ this.listEndText = undefined;
70
+ this.limit = 10;
71
+ this.visibleTickets = [];
72
+ this.hasMore = false;
73
+ this.isLoading = false;
74
+ this.isRefreshing = false;
75
+ this.errorMessage = undefined;
76
+ this.minItemWidth = 300;
77
+ this.showSkeleton = true;
78
+ }
79
+ handleClientStylingChange(newValue, oldValue) {
80
+ if (newValue != oldValue) {
81
+ setClientStyling(this.stylingContainer, this.clientStyling);
82
+ }
83
+ }
84
+ handleClientStylingUrlChange(newValue, oldValue) {
85
+ if (newValue != oldValue) {
86
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
87
+ }
88
+ }
89
+ handleMbSourceChange(newValue, oldValue) {
90
+ if (newValue != oldValue) {
91
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
92
+ }
93
+ }
94
+ componentWillLoad() {
95
+ resolveTranslationUrl(this.translationUrl);
96
+ this.getTicketList(1);
97
+ }
98
+ async getTicketList(page, isRefresh = false) {
99
+ try {
100
+ if (!this.endpoint || !this.sessionId) {
101
+ return Promise.reject(new Error('Endpoint and sessionId are required'));
102
+ }
103
+ if (page <= 0 || !this.limit)
104
+ return;
105
+ if (isRefresh) {
106
+ this.isRefreshing = true;
107
+ }
108
+ else {
109
+ this.isLoading = true;
110
+ }
111
+ const { items, total } = await fetchTicketList({
112
+ endpoint: this.endpoint,
113
+ filterData: {
114
+ offset: (page - 1) * this.limit,
115
+ limit: this.limit,
116
+ vendorGameType: this.vendorGameType
117
+ },
118
+ sessionId: this.sessionId,
119
+ meta: {
120
+ name: this.ticketHistoryItemName,
121
+ imageSrc: this.ticketHistoryItemImageSrc,
122
+ currency: this.ticketHistoryItemCurrency
123
+ }
124
+ });
125
+ if (isRefresh) {
126
+ this.visibleTickets = [...items];
127
+ }
128
+ else {
129
+ this.visibleTickets = [...this.visibleTickets, ...items];
130
+ }
131
+ this.hasMore = page < Math.ceil(total / this.limit);
132
+ this.page = page;
133
+ this.isLoading = false;
134
+ this.isRefreshing = false;
135
+ this.errorMessage = null;
136
+ }
137
+ catch (err) {
138
+ this.isLoading = false;
139
+ this.isRefreshing = false;
140
+ if (err.status === 401) {
141
+ this.errorMessage = translate('unauthorized', this.language);
142
+ window.postMessage({ type: 'SessionExpired' }, window.location.href);
143
+ return;
144
+ }
145
+ this.errorMessage = translate('failToShowTicketList', this.language);
146
+ }
147
+ }
148
+ componentDidLoad() {
149
+ if (this.stylingContainer) {
150
+ if (this.mbSource)
151
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
152
+ if (this.clientStyling)
153
+ setClientStyling(this.stylingContainer, this.clientStyling);
154
+ if (this.clientStylingUrl)
155
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
156
+ }
157
+ }
158
+ disconnectedCallback() {
159
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
160
+ }
161
+ renderInfoIcon() {
162
+ return (h("svg", { width: "45", height: "45", viewBox: "0 0 45 45", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z" })));
163
+ }
164
+ render() {
165
+ return (h("div", { key: 'f150fbefd3394af032c600f9b939357bc07ef7db', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '67e83eb97dbb358b1d057c1c7948fc8f6e4bc363', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (h("div", { key: 'cae8e46734e5ac71874dbd3d28a861218b5c67eb', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), h("span", { key: '7c8feec0afda57a6546da5ad9ddc5e35d52683ac' }, this.errorMessage))), h("lottery-infinite-scroll", { key: '828de5559807ea0314d05be5e17ce2340b494a5f', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, hasMore: this.hasMore, enableVirtualScroll: true, items: [...this.visibleTickets], estimatedItemHeight: this.scrollItemHeight, minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, h("div", { key: '833b363afc9d355fd6ec1e50a848f759f4f7c1b9', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, h("span", { key: '8cf28988956c1710e4adfc6c169761bf3c833e6a', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), h("div", { key: '9faed4a64236ff2a7ae920499fe236aec3393433', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), h("div", { key: 'b61b6aeaadda6e8e0b48d58e2f9ad7f77e57badf', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
166
+ }
167
+ static get is() { return "lottery-hakuna-ticket-history"; }
168
+ static get encapsulation() { return "shadow"; }
169
+ static get originalStyleUrls() {
170
+ return {
171
+ "$": ["lottery-hakuna-ticket-history.scss"]
172
+ };
173
+ }
174
+ static get styleUrls() {
175
+ return {
176
+ "$": ["lottery-hakuna-ticket-history.css"]
177
+ };
178
+ }
179
+ static get properties() {
180
+ return {
181
+ "mbSource": {
182
+ "type": "string",
183
+ "mutable": false,
184
+ "complexType": {
185
+ "original": "string",
186
+ "resolved": "string",
187
+ "references": {}
188
+ },
189
+ "required": false,
190
+ "optional": false,
191
+ "docs": {
192
+ "tags": [],
193
+ "text": "The source for stream styling via a service."
194
+ },
195
+ "attribute": "mb-source",
196
+ "reflect": true
197
+ },
198
+ "clientStyling": {
199
+ "type": "string",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "string",
203
+ "resolved": "string",
204
+ "references": {}
205
+ },
206
+ "required": false,
207
+ "optional": false,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": "Custom CSS styles to apply to the component."
211
+ },
212
+ "attribute": "client-styling",
213
+ "reflect": true
214
+ },
215
+ "clientStylingUrl": {
216
+ "type": "string",
217
+ "mutable": false,
218
+ "complexType": {
219
+ "original": "string",
220
+ "resolved": "string",
221
+ "references": {}
222
+ },
223
+ "required": false,
224
+ "optional": false,
225
+ "docs": {
226
+ "tags": [],
227
+ "text": "URL to a custom CSS file for additional styling."
228
+ },
229
+ "attribute": "client-styling-url",
230
+ "reflect": true
231
+ },
232
+ "language": {
233
+ "type": "string",
234
+ "mutable": false,
235
+ "complexType": {
236
+ "original": "string",
237
+ "resolved": "string",
238
+ "references": {}
239
+ },
240
+ "required": false,
241
+ "optional": false,
242
+ "docs": {
243
+ "tags": [],
244
+ "text": "The language code to use for translations. Defaults to 'en'."
245
+ },
246
+ "attribute": "language",
247
+ "reflect": true,
248
+ "defaultValue": "'en'"
249
+ },
250
+ "translationUrl": {
251
+ "type": "string",
252
+ "mutable": false,
253
+ "complexType": {
254
+ "original": "string",
255
+ "resolved": "string",
256
+ "references": {}
257
+ },
258
+ "required": false,
259
+ "optional": false,
260
+ "docs": {
261
+ "tags": [],
262
+ "text": "URL to fetch custom translation data from."
263
+ },
264
+ "attribute": "translation-url",
265
+ "reflect": true,
266
+ "defaultValue": "''"
267
+ },
268
+ "endpoint": {
269
+ "type": "string",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "string",
273
+ "resolved": "string",
274
+ "references": {}
275
+ },
276
+ "required": false,
277
+ "optional": false,
278
+ "docs": {
279
+ "tags": [],
280
+ "text": "The API endpoint to fetch ticket data from."
281
+ },
282
+ "attribute": "endpoint",
283
+ "reflect": true
284
+ },
285
+ "gameId": {
286
+ "type": "string",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "string",
290
+ "resolved": "string",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "Game ID of the lottery game."
298
+ },
299
+ "attribute": "game-id",
300
+ "reflect": true
301
+ },
302
+ "playerId": {
303
+ "type": "number",
304
+ "mutable": false,
305
+ "complexType": {
306
+ "original": "number",
307
+ "resolved": "number",
308
+ "references": {}
309
+ },
310
+ "required": false,
311
+ "optional": false,
312
+ "docs": {
313
+ "tags": [],
314
+ "text": "Player ID."
315
+ },
316
+ "attribute": "player-id",
317
+ "reflect": true
318
+ },
319
+ "sessionId": {
320
+ "type": "string",
321
+ "mutable": false,
322
+ "complexType": {
323
+ "original": "string",
324
+ "resolved": "string",
325
+ "references": {}
326
+ },
327
+ "required": false,
328
+ "optional": false,
329
+ "docs": {
330
+ "tags": [],
331
+ "text": "GIC Session."
332
+ },
333
+ "attribute": "session-id",
334
+ "reflect": true,
335
+ "defaultValue": "''"
336
+ },
337
+ "scrollThreshold": {
338
+ "type": "string",
339
+ "mutable": false,
340
+ "complexType": {
341
+ "original": "string",
342
+ "resolved": "string",
343
+ "references": {}
344
+ },
345
+ "required": false,
346
+ "optional": false,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": "Threshold distance from the bottom to trigger loading more items.\nDefault: '0px 0px 200px 0px'"
350
+ },
351
+ "attribute": "scroll-threshold",
352
+ "reflect": false,
353
+ "defaultValue": "'0px 0px 200px 0px'"
354
+ },
355
+ "scrollItemHeight": {
356
+ "type": "number",
357
+ "mutable": false,
358
+ "complexType": {
359
+ "original": "number",
360
+ "resolved": "number",
361
+ "references": {}
362
+ },
363
+ "required": false,
364
+ "optional": false,
365
+ "docs": {
366
+ "tags": [],
367
+ "text": "Estimated height of a single ticket item in pixels."
368
+ },
369
+ "attribute": "scroll-item-height",
370
+ "reflect": false,
371
+ "defaultValue": "110"
372
+ },
373
+ "scrollContainerHeight": {
374
+ "type": "number",
375
+ "mutable": false,
376
+ "complexType": {
377
+ "original": "number",
378
+ "resolved": "number",
379
+ "references": {}
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": "Height of the scrollable container in pixels."
386
+ },
387
+ "attribute": "scroll-container-height",
388
+ "reflect": false,
389
+ "defaultValue": "500"
390
+ },
391
+ "ticketHistoryTitle": {
392
+ "type": "string",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "string",
396
+ "resolved": "string",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": false,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": "Title displayed at the top of the ticket history."
404
+ },
405
+ "attribute": "ticket-history-title",
406
+ "reflect": false,
407
+ "defaultValue": "'YOUR TICKET'"
408
+ },
409
+ "ticketHistoryItemImageSrc": {
410
+ "type": "string",
411
+ "mutable": false,
412
+ "complexType": {
413
+ "original": "string",
414
+ "resolved": "string",
415
+ "references": {}
416
+ },
417
+ "required": false,
418
+ "optional": false,
419
+ "docs": {
420
+ "tags": [],
421
+ "text": "Image Src displayed for each of the ticket history items."
422
+ },
423
+ "attribute": "ticket-history-item-image-src",
424
+ "reflect": false
425
+ },
426
+ "ticketHistoryItemName": {
427
+ "type": "string",
428
+ "mutable": false,
429
+ "complexType": {
430
+ "original": "string",
431
+ "resolved": "string",
432
+ "references": {}
433
+ },
434
+ "required": false,
435
+ "optional": false,
436
+ "docs": {
437
+ "tags": [],
438
+ "text": "Name displayed for each of the ticket history items."
439
+ },
440
+ "attribute": "ticket-history-item-name",
441
+ "reflect": false
442
+ },
443
+ "ticketHistoryItemCurrency": {
444
+ "type": "string",
445
+ "mutable": false,
446
+ "complexType": {
447
+ "original": "string",
448
+ "resolved": "string",
449
+ "references": {}
450
+ },
451
+ "required": false,
452
+ "optional": false,
453
+ "docs": {
454
+ "tags": [],
455
+ "text": "Name displayed for each of the ticket history items."
456
+ },
457
+ "attribute": "ticket-history-item-currency",
458
+ "reflect": false,
459
+ "defaultValue": "'R'"
460
+ },
461
+ "listLoadingText": {
462
+ "type": "string",
463
+ "mutable": false,
464
+ "complexType": {
465
+ "original": "string",
466
+ "resolved": "string",
467
+ "references": {}
468
+ },
469
+ "required": false,
470
+ "optional": false,
471
+ "docs": {
472
+ "tags": [],
473
+ "text": "Custom text to display when loading more items."
474
+ },
475
+ "attribute": "list-loading-text",
476
+ "reflect": false
477
+ },
478
+ "listRefreshingText": {
479
+ "type": "string",
480
+ "mutable": false,
481
+ "complexType": {
482
+ "original": "string",
483
+ "resolved": "string",
484
+ "references": {}
485
+ },
486
+ "required": false,
487
+ "optional": false,
488
+ "docs": {
489
+ "tags": [],
490
+ "text": "Custom text to display when list is refreshing (pull-to-refresh)."
491
+ },
492
+ "attribute": "list-refreshing-text",
493
+ "reflect": false
494
+ },
495
+ "listEndText": {
496
+ "type": "string",
497
+ "mutable": false,
498
+ "complexType": {
499
+ "original": "string",
500
+ "resolved": "string",
501
+ "references": {}
502
+ },
503
+ "required": false,
504
+ "optional": false,
505
+ "docs": {
506
+ "tags": [],
507
+ "text": "Custom text to display when the end of the list is reached."
508
+ },
509
+ "attribute": "list-end-text",
510
+ "reflect": false
511
+ },
512
+ "limit": {
513
+ "type": "number",
514
+ "mutable": false,
515
+ "complexType": {
516
+ "original": "number",
517
+ "resolved": "number",
518
+ "references": {}
519
+ },
520
+ "required": false,
521
+ "optional": false,
522
+ "docs": {
523
+ "tags": [],
524
+ "text": "Number of items to fetch per page."
525
+ },
526
+ "attribute": "limit",
527
+ "reflect": false,
528
+ "defaultValue": "10"
529
+ },
530
+ "minItemWidth": {
531
+ "type": "number",
532
+ "mutable": false,
533
+ "complexType": {
534
+ "original": "number",
535
+ "resolved": "number",
536
+ "references": {}
537
+ },
538
+ "required": false,
539
+ "optional": false,
540
+ "docs": {
541
+ "tags": [],
542
+ "text": "Grid layout configuration: minimum column width\nUsed with CSS Grid to achieve responsiveness: repeat(auto-fill, minmax(minItemWidth, 1fr))"
543
+ },
544
+ "attribute": "min-item-width",
545
+ "reflect": false,
546
+ "defaultValue": "300"
547
+ },
548
+ "showSkeleton": {
549
+ "type": "boolean",
550
+ "mutable": false,
551
+ "complexType": {
552
+ "original": "boolean",
553
+ "resolved": "boolean",
554
+ "references": {}
555
+ },
556
+ "required": false,
557
+ "optional": false,
558
+ "docs": {
559
+ "tags": [],
560
+ "text": "Whether to show skeleton"
561
+ },
562
+ "attribute": "show-skeleton",
563
+ "reflect": false,
564
+ "defaultValue": "true"
565
+ }
566
+ };
567
+ }
568
+ static get states() {
569
+ return {
570
+ "visibleTickets": {},
571
+ "hasMore": {},
572
+ "isLoading": {},
573
+ "isRefreshing": {},
574
+ "errorMessage": {}
575
+ };
576
+ }
577
+ static get watchers() {
578
+ return [{
579
+ "propName": "clientStyling",
580
+ "methodName": "handleClientStylingChange"
581
+ }, {
582
+ "propName": "clientStylingUrl",
583
+ "methodName": "handleClientStylingUrlChange"
584
+ }, {
585
+ "propName": "mbSource",
586
+ "methodName": "handleMbSourceChange"
587
+ }];
588
+ }
589
+ }
@@ -0,0 +1,69 @@
1
+ :host {
2
+ display: block;
3
+ width: 100%;
4
+ }
5
+
6
+ .lottery-infinite-scroll__container {
7
+ display: block;
8
+ width: 100%;
9
+ overflow-x: hidden;
10
+ -webkit-overflow-scrolling: touch;
11
+ padding-right: 10px;
12
+ box-sizing: border-box;
13
+ scrollbar-width: thin;
14
+ scrollbar-color: var(--emw-hakuna-bg-secondary, #120505) var(--lottery-infinite-scroll-scrollbar-track-background, transparent);
15
+ /* Scrollbar styles */
16
+ }
17
+ .lottery-infinite-scroll__container::-webkit-scrollbar {
18
+ width: var(--lottery-infinite-scroll-scrollbar-width, 2px);
19
+ }
20
+ .lottery-infinite-scroll__container::-webkit-scrollbar-track {
21
+ background: var(--lottery-infinite-scroll-scrollbar-track-background, transparent);
22
+ }
23
+ .lottery-infinite-scroll__container::-webkit-scrollbar-thumb {
24
+ background: var(--emw-hakuna-bg-secondary, #120505);
25
+ border-radius: var(--lottery-infinite-scroll-scrollbar-thumb-border-radius, 2px);
26
+ }
27
+
28
+ .lottery-infinite-scroll__sentinel {
29
+ width: 100%;
30
+ display: block;
31
+ text-align: center;
32
+ /* Common styles for sentinel in virtual scroll */
33
+ /* Normal scroll mode sentinel */
34
+ }
35
+ .lottery-infinite-scroll__sentinel.virtual-scroll-sentinel {
36
+ height: 1px; /* Minimal height for detection */
37
+ pointer-events: none; /* Avoid blocking clicks */
38
+ opacity: 0; /* Hidden but present */
39
+ position: absolute;
40
+ width: 100%;
41
+ }
42
+ .lottery-infinite-scroll__sentinel:not(.virtual-scroll-sentinel) {
43
+ height: 1px; /* Ensure it has height for IntersectionObserver */
44
+ }
45
+
46
+ .lottery-infinite-scroll__end-message {
47
+ width: 100%;
48
+ display: block;
49
+ text-align: center;
50
+ /* Common styles for end message in virtual scroll */
51
+ }
52
+ .lottery-infinite-scroll__end-message.virtual-scroll-end-message {
53
+ position: absolute;
54
+ width: 100%;
55
+ }
56
+
57
+ .ptr-indicator {
58
+ height: var(--pull-trigger-distance, 60px); /* Use CSS variable for flexibility */
59
+ margin-top: calc(-1 * var(--pull-trigger-distance, 60px)); /* Hidden above the top by default */
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: center;
63
+ position: absolute;
64
+ top: 0;
65
+ width: 100%;
66
+ z-index: 10;
67
+ font-size: 14px;
68
+ color: #666; /* Keep default if no variable */
69
+ }