@everymatrix/lottery-draw-results 0.1.2 → 0.1.6

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 (28) hide show
  1. package/dist/cjs/{index-62f030ff.js → index-33a98fae.js} +1 -73
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/lottery-draw-results.cjs.entry.js +188 -0
  4. package/dist/cjs/lottery-draw-results.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +5 -12
  6. package/dist/collection/components/lottery-draw-results/lottery-draw-results.css +18 -7
  7. package/dist/collection/components/lottery-draw-results/lottery-draw-results.js +169 -56
  8. package/dist/collection/utils/locale.utils.js +14 -2
  9. package/dist/components/lottery-draw-results.js +63 -59
  10. package/dist/esm/{index-98326ddd.js → index-c6e6b7f8.js} +2 -73
  11. package/dist/esm/loader.js +2 -2
  12. package/dist/esm/lottery-draw-results.entry.js +184 -0
  13. package/dist/esm/lottery-draw-results.js +2 -2
  14. package/dist/lottery-draw-results/lottery-draw-results.esm.js +1 -1
  15. package/dist/lottery-draw-results/p-31e0953f.js +1 -0
  16. package/dist/lottery-draw-results/p-d7361a7b.entry.js +1 -0
  17. package/dist/stencil.config.js +3 -0
  18. package/dist/types/components/lottery-draw-results/lottery-draw-results.d.ts +28 -3
  19. package/dist/types/components.d.ts +56 -2
  20. package/package.json +2 -2
  21. package/dist/cjs/lottery-bullet_3.cjs.entry.js +0 -374
  22. package/dist/components/lottery-bullet.js +0 -6
  23. package/dist/components/lottery-bullet2.js +0 -56
  24. package/dist/components/lottery-grid.js +0 -6
  25. package/dist/components/lottery-grid2.js +0 -196
  26. package/dist/esm/lottery-bullet_3.entry.js +0 -368
  27. package/dist/lottery-draw-results/p-2b8529f6.entry.js +0 -1
  28. package/dist/lottery-draw-results/p-bb429486.js +0 -1
@@ -25,40 +25,6 @@ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
25
25
  return false;
26
26
  })()
27
27
  ;
28
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
29
- if (listeners) {
30
- listeners.map(([flags, name, method]) => {
31
- const target = getHostListenerTarget(elm, flags) ;
32
- const handler = hostListenerProxy(hostRef, method);
33
- const opts = hostListenerOpts(flags);
34
- plt.ael(target, name, handler, opts);
35
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
36
- });
37
- }
38
- };
39
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
40
- try {
41
- {
42
- if (hostRef.$flags$ & 256 /* isListenReady */) {
43
- // instance is ready, let's call it's member method for this event
44
- hostRef.$lazyInstance$[methodName](ev);
45
- }
46
- else {
47
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
48
- }
49
- }
50
- }
51
- catch (e) {
52
- consoleError(e);
53
- }
54
- };
55
- const getHostListenerTarget = (elm, flags) => {
56
- if (flags & 4 /* TargetDocument */)
57
- return doc;
58
- return elm;
59
- };
60
- // prettier-ignore
61
- const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
62
28
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
63
29
  const createTime = (fnName, tagName = '') => {
64
30
  {
@@ -535,20 +501,6 @@ const renderVdom = (hostRef, renderFnResults) => {
535
501
  // synchronous patch
536
502
  patch(oldVNode, rootVnode);
537
503
  };
538
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
539
- const createEvent = (ref, name, flags) => {
540
- const elm = getElement(ref);
541
- return {
542
- emit: (detail) => {
543
- return emitEvent(elm, name, {
544
- bubbles: !!(flags & 4 /* Bubbles */),
545
- composed: !!(flags & 2 /* Composed */),
546
- cancelable: !!(flags & 1 /* Cancellable */),
547
- detail,
548
- });
549
- },
550
- };
551
- };
552
504
  /**
553
505
  * Helper function to create & dispatch a custom Event on a provided target
554
506
  * @param elm the target of the Event
@@ -585,15 +537,6 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
585
537
  const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
586
538
  const instance = hostRef.$lazyInstance$ ;
587
539
  let promise;
588
- if (isInitialLoad) {
589
- {
590
- hostRef.$flags$ |= 256 /* isListenReady */;
591
- if (hostRef.$queuedListeners$) {
592
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
593
- hostRef.$queuedListeners$ = null;
594
- }
595
- }
596
- }
597
540
  endSchedule();
598
541
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
599
542
  };
@@ -995,10 +938,6 @@ const connectedCallback = (elm) => {
995
938
  }
996
939
  }
997
940
  else {
998
- // not the first time this has connected
999
- // reattach any event listeners to the host
1000
- // since they would have been removed when disconnected
1001
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1002
941
  // fire off connectedCallback() on component instance
1003
942
  fireConnectedCallback(hostRef.$lazyInstance$);
1004
943
  }
@@ -1007,13 +946,7 @@ const connectedCallback = (elm) => {
1007
946
  };
1008
947
  const disconnectedCallback = (elm) => {
1009
948
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1010
- const hostRef = getHostRef(elm);
1011
- {
1012
- if (hostRef.$rmListeners$) {
1013
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1014
- hostRef.$rmListeners$ = undefined;
1015
- }
1016
- }
949
+ getHostRef(elm);
1017
950
  }
1018
951
  };
1019
952
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -1040,9 +973,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1040
973
  {
1041
974
  cmpMeta.$members$ = compactMeta[2];
1042
975
  }
1043
- {
1044
- cmpMeta.$listeners$ = compactMeta[3];
1045
- }
1046
976
  const tagName = cmpMeta.$tagName$;
1047
977
  const HostElement = class extends HTMLElement {
1048
978
  // StencilLazyHost
@@ -1123,7 +1053,6 @@ const registerHost = (elm, cmpMeta) => {
1123
1053
  elm['s-p'] = [];
1124
1054
  elm['s-rc'] = [];
1125
1055
  }
1126
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1127
1056
  return hostRefs.set(elm, hostRef);
1128
1057
  };
1129
1058
  const isMemberInElement = (elm, memberName) => memberName in elm;
@@ -1192,4 +1121,4 @@ const flush = () => {
1192
1121
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1193
1122
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1194
1123
 
1195
- export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r };
1124
+ export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-98326ddd.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c6e6b7f8.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["lottery-bullet_3",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"multiplier":[32],"ticketData":[32],"isLoading":[32],"drawResults":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32]}],[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
13
+ return bootstrapLazy([["lottery-draw-results",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"multiplier":[32],"isLoading":[32],"drawResults":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -0,0 +1,184 @@
1
+ import { r as registerInstance, h } from './index-c6e6b7f8.js';
2
+ import '@everymatrix/lottery-grid';
3
+
4
+ const DEFAULT_LANGUAGE = 'en';
5
+ const SUPPORTED_LANGUAGES = ['ro', 'en'];
6
+ const TRANSLATIONS = {
7
+ en: {
8
+ drawResultsHeader: 'Last draw results',
9
+ drawId: 'Draw ID',
10
+ drawName: 'Game name',
11
+ drawDate: 'Draw Date',
12
+ drawNumbersGridDraw: 'Draw numbers Grid A',
13
+ drawNumbersGridTicket: 'Draw numbers Grid B',
14
+ ticketResult: 'Ticket result',
15
+ amountWon: 'Amount won',
16
+ numberOfDraws: 'Number of draws',
17
+ multiplier: 'Multiplier:',
18
+ ticketPurchaseDate: 'Ticket Purchase Date',
19
+ ticketStatus: 'Ticket Status',
20
+ ticketId: 'Ticket ID',
21
+ ticketAmount: 'Ticket Amount',
22
+ winUpTo: 'Win up to',
23
+ },
24
+ ro: {
25
+ drawResultsHeader: 'Ultimele rezultate extragere',
26
+ drawId: 'Id extragere',
27
+ drawName: 'Numele jocului',
28
+ drawDate: 'Data extragerii',
29
+ drawNumbersGridDraw: 'Numerele extrase Grid A',
30
+ drawNumbersGridTicket: 'Numerele extrase Grid B',
31
+ ticketResult: 'Rezultatul biletului',
32
+ amountWon: 'Suma castigata',
33
+ numberOfDraws: 'Numarul de extrageri',
34
+ multiplier: 'Multiplicator:',
35
+ ticketPurchaseDate: 'Data achizitionarii biletului',
36
+ ticketStatus: 'Statusul biletului',
37
+ ticketId: 'Id biletul',
38
+ ticketAmount: 'Valoarea biletului',
39
+ winUpTo: 'Poti castiga'
40
+ },
41
+ };
42
+ const translate = (key, customLang) => {
43
+ const lang = customLang;
44
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
45
+ };
46
+
47
+ const lotteryDrawResultsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawMultipler label{display:block;margin:15px 0}.DrawResultsBody{padding:0px 20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody .DrawNumbersGrid{font-size:14px}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:\"\"}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px}.DrawTicketsContainer{margin:30px auto}.ExpandableBoxes{position:relative}.ExpandableBox{line-height:12px;font-weight:lighter;width:100%;height:100%;max-height:70px;float:left;margin:0 0 20px 0;border:1px solid #f1f1f1;background:#fff;border-radius:4px;padding:10px;-webkit-transition:all 0.6s ease-in-out;-moz-transition:all 0.6s ease-in-out;-o-transition:all 0.6s ease-in-out;-ms-transition:all 0.6s ease-in-out;transition:all 0.6s ease-in-out;overflow:hidden;box-shadow:rgba(99, 99, 99, 0.2) 0px 2px 8px 0px}.ExpandableBox.ShowBox{max-height:400px;margin:0px 0px 20p 0px}.ExpandableBox.HideBox{width:0;height:0;overflow:hidden;border:none;padding:0;margin:0;opacity:0}";
48
+
49
+ const LotteryDrawResults = class {
50
+ constructor(hostRef) {
51
+ registerInstance(this, hostRef);
52
+ /**
53
+ * Language of the widget
54
+ */
55
+ this.language = 'en';
56
+ /**
57
+ * Shows only the last draw
58
+ */
59
+ this.drawMode = false;
60
+ /**
61
+ * The drawID (option)
62
+ */
63
+ this.drawId = '';
64
+ /**
65
+ * The game name
66
+ */
67
+ this.gameName = '';
68
+ /**
69
+ * The ticket submission date
70
+ */
71
+ this.ticketDate = '';
72
+ /**
73
+ * The ticket status
74
+ */
75
+ this.ticketStatus = '';
76
+ /**
77
+ * The ticket id
78
+ */
79
+ this.ticketId = '';
80
+ /**
81
+ * The ticket amount
82
+ */
83
+ this.ticketAmount = '';
84
+ /**
85
+ * The ticket multiplier
86
+ */
87
+ this.ticketMultiplier = false;
88
+ /**
89
+ * The ticket draw count
90
+ */
91
+ this.ticketDrawCount = 0;
92
+ this.multiplier = 3;
93
+ this.isLoading = true;
94
+ this.drawResults = [];
95
+ this.rules = {};
96
+ this.toggleDrawer = [false];
97
+ this.hasErrors = false;
98
+ this.errorText = '';
99
+ this.changeBox = (index) => {
100
+ this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
101
+ if (itemIndex == index) {
102
+ return !item;
103
+ }
104
+ return item;
105
+ });
106
+ if (index >= this.toggleDrawer.length) {
107
+ this.toggleDrawer.push(true);
108
+ }
109
+ };
110
+ }
111
+ connectedCallback() {
112
+ let promises = [];
113
+ promises.push(this.getGameData());
114
+ if (this.drawId) {
115
+ promises.push(this.getDrawData());
116
+ }
117
+ Promise.all(promises)
118
+ .then(() => {
119
+ this.isLoading = false;
120
+ });
121
+ }
122
+ getDrawData() {
123
+ return new Promise((resolve, reject) => {
124
+ let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);
125
+ fetch(url.href)
126
+ .then((response) => {
127
+ // @TODO EXCEPTIONS
128
+ return response.json();
129
+ })
130
+ .then((data) => {
131
+ this.drawData = data;
132
+ resolve(true);
133
+ this.isLoading = false;
134
+ })
135
+ .catch((err) => {
136
+ reject(err);
137
+ this.isLoading = false;
138
+ });
139
+ });
140
+ }
141
+ getGameData() {
142
+ return new Promise((resolve, reject) => {
143
+ let url = new URL(`${this.endpoint}/games/${this.gameId}`);
144
+ fetch(url.href)
145
+ .then((response) => {
146
+ return response.json();
147
+ })
148
+ .then((data) => {
149
+ this.rules = {
150
+ maximumAllowed: data.rules.boards[0].maximumAllowed,
151
+ totalNumbers: data.rules.boards[0].totalNumbers
152
+ };
153
+ resolve(true);
154
+ this.isLoading = false;
155
+ this.hasErrors = false;
156
+ })
157
+ .catch((err) => {
158
+ this.isLoading = false;
159
+ this.hasErrors = true;
160
+ this.errorText = err;
161
+ reject(err);
162
+ });
163
+ });
164
+ }
165
+ render() {
166
+ if (this.isLoading) {
167
+ return (h("p", null, "Loading, please wait ..."));
168
+ }
169
+ else if (this.hasErrors) {
170
+ h("p", null, this.errorText);
171
+ }
172
+ else {
173
+ return (h("section", { class: "DrawResultsSection" }, !this.drawMode ?
174
+ h("div", { class: "DrawResultsArea" }, h("div", { class: "TicketInfo" }, h("div", { class: "TicketGameName" }, translate('drawName', this.language), ": ", h("span", null, this.gameName)), h("div", { class: "TicketDate" }, translate('ticketPurchaseDate', this.language), ": ", h("span", null, this.ticketDate.slice(0, 10))), h("div", { class: "TicketStatus" }, translate('ticketStatus', this.language), ": ", h("span", null, this.ticketStatus))), h("div", { class: "DrawResultsBody" }, h("div", { class: "TicketIdContainer" }, h("p", null, translate('ticketId', this.language), ": ", h("span", null, this.ticketId))), h("div", { class: "TicketAmountContainer" }, h("p", null, translate('ticketAmount', this.language), " ", h("span", null, this.ticketAmount))), h("div", { class: "DrawNumbersGrid" }, h("p", null, translate('drawNumbersGridTicket', this.language), ":"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, "selected-numbers": this.selection, selectable: false, "display-selected": true, language: this.language }))), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, translate('winUpTo', this.language), " ", h("span", null, JSON.stringify(this.ticketMultiplier)))), h("div", { class: "NumberOfDrawsContainer" }, h("p", null, translate('numberOfDraws', this.language), ": ", this.ticketDrawCount), h("div", { class: "DrawTicketsContainer" }, this.drawResults.map((item, index) => h("div", { class: "ExpandableBoxes" }, h("div", { class: this.toggleDrawer[index] ? 'ExpandableBox ShowBox' : 'ExpandableBox', onClick: () => this.changeBox(index) }, h("div", { class: "TicketResultContainer" }, h("p", null, translate('ticketResult', this.language), ": ", item.status)), item.state == 'won' &&
175
+ h("div", { class: "AmountWonContainer" }, h("p", null, translate('amountWon', this.language), ": ", Number(item.amount).toLocaleString('en'), " ", item.currency)), h("div", { class: "DrawIdContainer" }, h("p", null, translate('drawId', this.language), ": ", item.drawId)), h("div", { class: "DrawDateContainer" }, h("p", null, translate('drawDate', this.language), ": ", item.updatedAt.slice(0, 10), " | ", item.updatedAt.slice(11, 19))), h("div", { class: "DrawNumbersGrid" }), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, translate('winUpTo', this.language), " ", item.multiplier)))))))))
176
+ :
177
+ h("div", { class: "DrawResultsArea" }, this.drawData &&
178
+ h("div", null, h("div", { class: "DrawResultsHeader" }, h("span", null, translate('drawId', this.language), ": ", this.drawData.id), h("span", null, translate('drawDate', this.language), ": ", this.drawData.date.slice(0, 10))), h("div", { class: "DrawResultsBody" }, h("div", { class: "DrawNumbersGrid" }, h("p", null, translate('drawNumbersGridDraw', this.language), ":"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, selectedNumbers: this.drawData.winningNumbers.join(','), "display-selected": true, selectable: false, language: this.language })), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, translate('multiplier', this.language), " ", this.multiplier))))))));
179
+ }
180
+ }
181
+ };
182
+ LotteryDrawResults.style = lotteryDrawResultsCss;
183
+
184
+ export { LotteryDrawResults as lottery_draw_results };
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-98326ddd.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c6e6b7f8.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["lottery-bullet_3",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"multiplier":[32],"ticketData":[32],"isLoading":[32],"drawResults":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32]}],[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
16
+ return bootstrapLazy([["lottery-draw-results",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"multiplier":[32],"isLoading":[32],"drawResults":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32]}]]]], options);
17
17
  });
@@ -1 +1 @@
1
- import{p as e,b as l}from"./p-bb429486.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((e=>l([["p-2b8529f6",[[1,"lottery-draw-results",{endpoint:[1],gameId:[1,"game-id"],language:[1],playerId:[1,"player-id"],drawMode:[4,"draw-mode"],drawId:[1,"draw-id"],gameName:[1,"game-name"],multiplier:[32],ticketData:[32],isLoading:[32],drawResults:[32],rules:[32],toggleDrawer:[32],hasErrors:[32],errorText:[32]}],[1,"lottery-grid",{ticketId:[2,"ticket-id"],totalNumbers:[2,"total-numbers"],gameId:[1,"game-id"],maximumAllowed:[2,"maximum-allowed"],minimumAllowed:[2,"minimum-allowed"],selectable:[4],selectedNumbers:[1,"selected-numbers"],displaySelected:[4,"display-selected"],language:[1],gridIndex:[2,"grid-index"],numbers:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[1],selectable:[4],isSelected:[4,"is-selected"]}]]]],e)));
1
+ import{p as t,b as e}from"./p-31e0953f.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((t=>e([["p-d7361a7b",[[1,"lottery-draw-results",{endpoint:[1],gameId:[1,"game-id"],language:[1],playerId:[1,"player-id"],drawMode:[4,"draw-mode"],drawId:[1,"draw-id"],gameName:[1,"game-name"],ticketDate:[1,"ticket-date"],ticketStatus:[1,"ticket-status"],ticketId:[1,"ticket-id"],ticketAmount:[1,"ticket-amount"],ticketMultiplier:[4,"ticket-multiplier"],ticketDrawCount:[2,"ticket-draw-count"],multiplier:[32],isLoading:[32],drawResults:[32],rules:[32],toggleDrawer:[32],hasErrors:[32],errorText:[32]}]]]],t)));
@@ -0,0 +1 @@
1
+ let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=d(e,null);return c.u=t,r.length>0&&(c.$=r),c},d=(e,t)=>({t:0,h:e,i:t,p:null,$:null,u:null}),h={},y=(e,t,n,s,r,i)=>{if(n!==s){let c=H(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=m(n),o=m(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):H(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},p=/\s/,m=e=>e?e.split(p):[],b=(e,t,n,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||y(s,l,o[l],void 0,n,t.t);for(l in r)y(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.p=s.createTextNode(i.i);else if(o=i.p=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].p=i,c.insertBefore(i,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.p.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.p=e.p,l=e.$,s=t.$,o=t.i;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(v(c,f),c=t[++o],f=l[++r]):j(u,$)?(v(u,$),u=t[--i],$=l[--a]):j(c,$)?(v(c,$),e.insertBefore(c.p,u.p.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.p,c.p),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.p.parentNode.insertBefore(s,c.p));o>i?S(e,null==l[a+1]?null:l[a+1].p,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},k=(e,t)=>{if(e.t|=16,!(4&e.t))return M(e,e.S),X((()=>C(e,t)));e.t|=512},C=(e,t)=>{const n=e.g;return N(void 0,(()=>O(e,n,t)))},O=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,o=((e,t)=>{let n=u(t),l=B.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);P(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>x(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.M||d(null,null),r=(e=>e&&e.h===h)(l)?l:$(null,null,l);t=s.tagName,r.h=null,r.t|=4,n.M=r,r.p=o.p=s.shadowRoot||s,e=s["s-sc"],v(o,r)})(n,l)}catch(e){V(e,n.j)}return null},x=e=>{const t=e.j,n=e.S;64&e.t||(e.t|=64,T(t),e.k(t),n||E()),e.m&&(e.m(),e.m=void 0),512&e.t&&Q((()=>k(e,!1))),e.t&=-517},E=()=>{T(s.documentElement),Q((()=>(e=>{const t=o.ce("appload",{detail:{namespace:"lottery-draw-results"}});return e.dispatchEvent(t),t})(l)))},N=(e,t)=>e&&e.then?e.then(t):t(),T=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.C){const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>U(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=U(e),o=s.O.get(t),r=s.t,i=s.g;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.C[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.O.set(t,n),i&&2==(18&r)&&k(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},F=e=>{((e,t)=>{if(e&&e[t])try{e[t](void 0)}catch(e){V(e)}})(e,"connectedCallback")},L=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),d=[];let h,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],C:t[2],P:t[3]};l.C=t[2];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),q(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?d.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=U(e),n=t.v,l=()=>{};if(1&t.t)F(t.g);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){M(t,t.S=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(A(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){V(e)}t.t&=-9,e(),F(t.g)}if(s.style){let e=s.style;const t=u(n);if(!B.has(t)){const l=()=>{};((e,t,n)=>{let l=B.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,B.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.S,r=()=>k(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return U(this).N}};l.T=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,A(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),y=!1,d.length?d.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(E,30)))},R=new WeakMap,U=e=>R.get(e),W=(e,t)=>R.set(t.g=e,t),q=(e,t)=>{const n={t:0,j:e,v:t,O:new Map};return n.N=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],R.set(e,n)},H=(e,t)=>t in e,V=(e,t)=>(0,console.error)(e,t),_=new Map,z=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=_.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(_.set(n,e),e[t])),V)},B=new Map,D=[],G=[],I=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Q(K):o.raf(K))},J=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){V(e)}e.length=0},K=()=>{J(D),J(G),(n=D.length>0)&&o.raf(K)},Q=e=>r().then(e),X=I(G,!0);export{L as b,$ as h,r as p,W as r}
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./p-31e0953f.js";import"@everymatrix/lottery-grid";const i=["ro","en"],s={en:{drawResultsHeader:"Last draw results",drawId:"Draw ID",drawName:"Game name",drawDate:"Draw Date",drawNumbersGridDraw:"Draw numbers Grid A",drawNumbersGridTicket:"Draw numbers Grid B",ticketResult:"Ticket result",amountWon:"Amount won",numberOfDraws:"Number of draws",multiplier:"Multiplier:",ticketPurchaseDate:"Ticket Purchase Date",ticketStatus:"Ticket Status",ticketId:"Ticket ID",ticketAmount:"Ticket Amount",winUpTo:"Win up to"},ro:{drawResultsHeader:"Ultimele rezultate extragere",drawId:"Id extragere",drawName:"Numele jocului",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase Grid A",drawNumbersGridTicket:"Numerele extrase Grid B",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplier:"Multiplicator:",ticketPurchaseDate:"Data achizitionarii biletului",ticketStatus:"Statusul biletului",ticketId:"Id biletul",ticketAmount:"Valoarea biletului",winUpTo:"Poti castiga"}},a=(t,e)=>{const a=e;return s[void 0!==a&&i.includes(a)?a:"en"][t]},r=class{constructor(e){t(this,e),this.language="en",this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketAmount="",this.ticketMultiplier=!1,this.ticketDrawCount=0,this.multiplier=3,this.isLoading=!0,this.drawResults=[],this.rules={},this.toggleDrawer=[!1],this.hasErrors=!1,this.errorText="",this.changeBox=t=>{this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}}connectedCallback(){let t=[];t.push(this.getGameData()),this.drawId&&t.push(this.getDrawData()),Promise.all(t).then((()=>{this.isLoading=!1}))}getDrawData(){return new Promise(((t,e)=>{let i=new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);fetch(i.href).then((t=>t.json())).then((e=>{this.drawData=e,t(!0),this.isLoading=!1})).catch((t=>{e(t),this.isLoading=!1}))}))}getGameData(){return new Promise(((t,e)=>{let i=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(i.href).then((t=>t.json())).then((e=>{this.rules={maximumAllowed:e.rules.boards[0].maximumAllowed,totalNumbers:e.rules.boards[0].totalNumbers},t(!0),this.isLoading=!1,this.hasErrors=!1})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,this.errorText=t,e(t)}))}))}render(){return this.isLoading?e("p",null,"Loading, please wait ..."):this.hasErrors?void e("p",null,this.errorText):e("section",{class:"DrawResultsSection"},this.drawMode?e("div",{class:"DrawResultsArea"},this.drawData&&e("div",null,e("div",{class:"DrawResultsHeader"},e("span",null,a("drawId",this.language),": ",this.drawData.id),e("span",null,a("drawDate",this.language),": ",this.drawData.date.slice(0,10))),e("div",{class:"DrawResultsBody"},e("div",{class:"DrawNumbersGrid"},e("p",null,a("drawNumbersGridDraw",this.language),":"),e("div",{class:"BulletContainer"},e("lottery-grid",{"maximum-allowed":this.rules.maximumAllowed,"total-numbers":this.rules.totalNumbers,selectedNumbers:this.drawData.winningNumbers.join(","),"display-selected":!0,selectable:!1,language:this.language})),e("div",{class:"DrawMultipler"},e("label",{class:"Label"},a("multiplier",this.language)," ",this.multiplier)))))):e("div",{class:"DrawResultsArea"},e("div",{class:"TicketInfo"},e("div",{class:"TicketGameName"},a("drawName",this.language),": ",e("span",null,this.gameName)),e("div",{class:"TicketDate"},a("ticketPurchaseDate",this.language),": ",e("span",null,this.ticketDate.slice(0,10))),e("div",{class:"TicketStatus"},a("ticketStatus",this.language),": ",e("span",null,this.ticketStatus))),e("div",{class:"DrawResultsBody"},e("div",{class:"TicketIdContainer"},e("p",null,a("ticketId",this.language),": ",e("span",null,this.ticketId))),e("div",{class:"TicketAmountContainer"},e("p",null,a("ticketAmount",this.language)," ",e("span",null,this.ticketAmount))),e("div",{class:"DrawNumbersGrid"},e("p",null,a("drawNumbersGridTicket",this.language),":"),e("div",{class:"BulletContainer"},e("lottery-grid",{"maximum-allowed":this.rules.maximumAllowed,"total-numbers":this.rules.totalNumbers,"selected-numbers":this.selection,selectable:!1,"display-selected":!0,language:this.language}))),e("div",{class:"DrawMultipler"},e("label",{class:"Label"},a("winUpTo",this.language)," ",e("span",null,JSON.stringify(this.ticketMultiplier)))),e("div",{class:"NumberOfDrawsContainer"},e("p",null,a("numberOfDraws",this.language),": ",this.ticketDrawCount),e("div",{class:"DrawTicketsContainer"},this.drawResults.map(((t,i)=>e("div",{class:"ExpandableBoxes"},e("div",{class:this.toggleDrawer[i]?"ExpandableBox ShowBox":"ExpandableBox",onClick:()=>this.changeBox(i)},e("div",{class:"TicketResultContainer"},e("p",null,a("ticketResult",this.language),": ",t.status)),"won"==t.state&&e("div",{class:"AmountWonContainer"},e("p",null,a("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),e("div",{class:"DrawIdContainer"},e("p",null,a("drawId",this.language),": ",t.drawId)),e("div",{class:"DrawDateContainer"},e("p",null,a("drawDate",this.language),": ",t.updatedAt.slice(0,10)," | ",t.updatedAt.slice(11,19))),e("div",{class:"DrawNumbersGrid"}),e("div",{class:"DrawMultipler"},e("label",{class:"Label"},a("winUpTo",this.language)," ",t.multiplier)))))))))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawMultipler label{display:block;margin:15px 0}.DrawResultsBody{padding:0px 20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody .DrawNumbersGrid{font-size:14px}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px}.DrawTicketsContainer{margin:30px auto}.ExpandableBoxes{position:relative}.ExpandableBox{line-height:12px;font-weight:lighter;width:100%;height:100%;max-height:70px;float:left;margin:0 0 20px 0;border:1px solid #f1f1f1;background:#fff;border-radius:4px;padding:10px;-webkit-transition:all 0.6s ease-in-out;-moz-transition:all 0.6s ease-in-out;-o-transition:all 0.6s ease-in-out;-ms-transition:all 0.6s ease-in-out;transition:all 0.6s ease-in-out;overflow:hidden;box-shadow:rgba(99, 99, 99, 0.2) 0px 2px 8px 0px}.ExpandableBox.ShowBox{max-height:400px;margin:0px 0px 20p 0px}.ExpandableBox.HideBox{width:0;height:0;overflow:hidden;border:none;padding:0;margin:0;opacity:0}';export{r as lottery_draw_results}
@@ -3,12 +3,15 @@ export const config = {
3
3
  namespace: 'lottery-draw-results',
4
4
  taskQueue: 'async',
5
5
  plugins: [sass()],
6
+ bundles: [{ components: ['lottery-draw-results'] }],
6
7
  outputTargets: [
7
8
  {
8
9
  type: 'dist',
9
10
  esmLoaderPath: '../loader',
10
11
  },
11
12
  {
13
+ autoDefineCustomElements: true,
14
+ generateTypeDeclarations: true,
12
15
  type: 'dist-custom-elements',
13
16
  },
14
17
  {
@@ -21,12 +21,38 @@ export declare class LotteryDrawResults {
21
21
  */
22
22
  drawMode: boolean;
23
23
  /**
24
- * Shows results for a specific drawID (option)
24
+ * The drawID (option)
25
25
  */
26
26
  drawId: string;
27
+ /**
28
+ * The game name
29
+ */
27
30
  gameName: string;
31
+ /**
32
+ * The ticket submission date
33
+ */
34
+ ticketDate: string;
35
+ /**
36
+ * The ticket status
37
+ */
38
+ ticketStatus: string;
39
+ /**
40
+ * The ticket id
41
+ */
42
+ ticketId: string;
43
+ /**
44
+ * The ticket amount
45
+ */
46
+ ticketAmount: string;
47
+ /**
48
+ * The ticket multiplier
49
+ */
50
+ ticketMultiplier: boolean;
51
+ /**
52
+ * The ticket draw count
53
+ */
54
+ ticketDrawCount: number;
28
55
  multiplier: number;
29
- ticketData: any;
30
56
  isLoading: boolean;
31
57
  drawResults: any;
32
58
  private rules;
@@ -39,6 +65,5 @@ export declare class LotteryDrawResults {
39
65
  getDrawData(): Promise<boolean>;
40
66
  getGameData(): Promise<boolean>;
41
67
  changeBox: (index: number) => void;
42
- getTicketData(): Promise<boolean>;
43
68
  render(): any;
44
69
  }
@@ -8,7 +8,7 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
9
  interface LotteryDrawResults {
10
10
  /**
11
- * Shows results for a specific drawID (option)
11
+ * The drawID (option)
12
12
  */
13
13
  "drawId": string;
14
14
  /**
@@ -23,6 +23,9 @@ export namespace Components {
23
23
  * GameID of the lottery game
24
24
  */
25
25
  "gameId": string;
26
+ /**
27
+ * The game name
28
+ */
26
29
  "gameName": string;
27
30
  /**
28
31
  * Language of the widget
@@ -32,6 +35,30 @@ export namespace Components {
32
35
  * Player ID
33
36
  */
34
37
  "playerId": string;
38
+ /**
39
+ * The ticket amount
40
+ */
41
+ "ticketAmount": string;
42
+ /**
43
+ * The ticket submission date
44
+ */
45
+ "ticketDate": string;
46
+ /**
47
+ * The ticket draw count
48
+ */
49
+ "ticketDrawCount": number;
50
+ /**
51
+ * The ticket id
52
+ */
53
+ "ticketId": string;
54
+ /**
55
+ * The ticket multiplier
56
+ */
57
+ "ticketMultiplier": boolean;
58
+ /**
59
+ * The ticket status
60
+ */
61
+ "ticketStatus": string;
35
62
  }
36
63
  }
37
64
  declare global {
@@ -48,7 +75,7 @@ declare global {
48
75
  declare namespace LocalJSX {
49
76
  interface LotteryDrawResults {
50
77
  /**
51
- * Shows results for a specific drawID (option)
78
+ * The drawID (option)
52
79
  */
53
80
  "drawId"?: string;
54
81
  /**
@@ -63,6 +90,9 @@ declare namespace LocalJSX {
63
90
  * GameID of the lottery game
64
91
  */
65
92
  "gameId"?: string;
93
+ /**
94
+ * The game name
95
+ */
66
96
  "gameName"?: string;
67
97
  /**
68
98
  * Language of the widget
@@ -72,6 +102,30 @@ declare namespace LocalJSX {
72
102
  * Player ID
73
103
  */
74
104
  "playerId"?: string;
105
+ /**
106
+ * The ticket amount
107
+ */
108
+ "ticketAmount"?: string;
109
+ /**
110
+ * The ticket submission date
111
+ */
112
+ "ticketDate"?: string;
113
+ /**
114
+ * The ticket draw count
115
+ */
116
+ "ticketDrawCount"?: number;
117
+ /**
118
+ * The ticket id
119
+ */
120
+ "ticketId"?: string;
121
+ /**
122
+ * The ticket multiplier
123
+ */
124
+ "ticketMultiplier"?: boolean;
125
+ /**
126
+ * The ticket status
127
+ */
128
+ "ticketStatus"?: string;
75
129
  }
76
130
  interface IntrinsicElements {
77
131
  "lottery-draw-results": LotteryDrawResults;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-draw-results",
3
- "version": "0.1.2",
3
+ "version": "0.1.6",
4
4
  "main": "./dist/index.cjs.js",
5
- "module": "./dist/index.js",
5
+ "module": "./dist/components/lottery-draw-results.js",
6
6
  "es2015": "./dist/esm/index.mjs",
7
7
  "es2017": "./dist/esm/index.mjs",
8
8
  "types": "./dist/types/index.d.ts",