@everymatrix/lottery-tipping-ticket-controller 1.85.14 → 1.85.16

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 (27) hide show
  1. package/dist/cjs/general-tooltip_7.cjs.entry.js +1136 -0
  2. package/dist/cjs/index-3e1fe885.js +2 -2
  3. package/dist/cjs/index.cjs.js +1 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{general-tooltip_6.cjs.entry.js → lottery-tipping-ticket-controller-1e79780d.js} +7366 -5190
  6. package/dist/cjs/lottery-tipping-ticket-controller.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +6 -0
  8. package/dist/collection/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.js +41 -9
  9. package/dist/collection/utils/locale.utils.js +2 -1
  10. package/dist/collection/utils/utils.js +1 -0
  11. package/dist/esm/general-tooltip_7.entry.js +1127 -0
  12. package/dist/esm/index-e3ec645c.js +2 -2
  13. package/dist/esm/index.js +1 -2
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/{general-tooltip_6.entry.js → lottery-tipping-ticket-controller-e914932b.js} +7220 -5047
  16. package/dist/esm/lottery-tipping-ticket-controller.js +1 -1
  17. package/dist/lottery-tipping-ticket-controller/general-tooltip_7.entry.js +1 -0
  18. package/dist/lottery-tipping-ticket-controller/index.esm.js +1 -1
  19. package/dist/lottery-tipping-ticket-controller/{general-tooltip_6.entry.js → lottery-tipping-ticket-controller-e914932b.js} +242 -242
  20. package/dist/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.esm.js +1 -1
  21. package/dist/types/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.d.ts +8 -3
  22. package/dist/types/models/index.d.ts +5 -0
  23. package/dist/types/utils/utils.d.ts +1 -0
  24. package/package.json +1 -1
  25. package/dist/cjs/lottery-tipping-ticket-controller-b89883ee.js +0 -3141
  26. package/dist/esm/lottery-tipping-ticket-controller-12ffe9b9.js +0 -3130
  27. package/dist/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller-12ffe9b9.js +0 -1
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["general-tooltip_6.cjs",[[1,"lottery-tipping-ticket-controller",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"logoUrl":[513,"logo-url"],"endpoint":[513],"endpointLotteryBe":[513,"endpoint-lottery-be"],"endpointTicket":[513,"endpoint-ticket"],"sessionId":[513,"session-id"],"gameId":[513,"game-id"],"playerId":[513,"player-id"],"drawId":[513,"draw-id"],"isLoading":[32],"bettingTypeOptions":[32],"playingModeOptions":[32],"selectedBettingType":[32],"selectedPlayingMode":[32],"hasSelectBullet":[32],"hasSelectAllBullet":[32],"totalLineCombination":[32],"submitLoading":[32],"rawData":[32],"saleStatisticsInfo":[32],"dialogConfig":[32]},[[0,"lotteryTippingBulletBetSelect","lotteryTippingBulletGroupSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"totalPages":[1538,"total-pages"],"minTotalPages":[514,"min-total-pages"],"maxTotalPages":[514,"max-total-pages"],"mode":[513],"readPretty":[516,"read-pretty"],"defaultBulletConfigLineGroup":[513,"default-bullet-config-line-group"],"translationData":[32],"clientStylingUrlContent":[32],"bulletConfigLineGroup":[32],"currentPage":[32],"isLoading":[32],"hasErrors":[32],"dialogConfig":[32],"ticketDataSource":[32],"resetBulletConfig":[64],"getData":[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"sessionId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultBulletConfigLineGroup":["fetchMatchData"],"currentPage":["handleCurrentPageChange"]}],[1,"lottery-tipping-ticket-banner",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"logoUrl":[513,"logo-url"],"stopTime":[1,"stop-time"],"period":[1],"formattedTurnover":[1,"formatted-turnover"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[513,"position-idx"],"theme":[513],"mode":[513],"bulletConfigContent":[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"general-tooltip",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"position":[1],"delay":[2],"isVisible":[32],"_tooltipId":[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[514,"position-idx"],"theme":[513],"value":[513],"disabled":[516],"isSelected":[516,"is-selected"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
22
+ return index.bootstrapLazy([["general-tooltip_7.cjs",[[1,"lottery-tipping-ticket-controller",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"logoUrl":[513,"logo-url"],"endpoint":[513],"endpointLotteryBe":[513,"endpoint-lottery-be"],"endpointTicket":[513,"endpoint-ticket"],"sessionId":[513,"session-id"],"gameId":[513,"game-id"],"playerId":[513,"player-id"],"drawId":[513,"draw-id"],"isLoading":[32],"bettingTypeOptions":[32],"playingModeOptions":[32],"selectedBettingType":[32],"selectedPlayingMode":[32],"hasSelectBullet":[32],"hasSelectAllBullet":[32],"totalLineCombination":[32],"submitLoading":[32],"rawData":[32],"saleStatisticsInfo":[32],"currentStake":[32],"dialogConfig":[32]},[[0,"lotteryTippingBulletBetSelect","lotteryTippingBulletGroupSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"totalPages":[1538,"total-pages"],"minTotalPages":[514,"min-total-pages"],"maxTotalPages":[514,"max-total-pages"],"mode":[513],"readPretty":[516,"read-pretty"],"defaultBulletConfigLineGroup":[513,"default-bullet-config-line-group"],"translationData":[32],"clientStylingUrlContent":[32],"bulletConfigLineGroup":[32],"currentPage":[32],"isLoading":[32],"hasErrors":[32],"dialogConfig":[32],"ticketDataSource":[32],"resetBulletConfig":[64],"getData":[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"sessionId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultBulletConfigLineGroup":["fetchMatchData"],"currentPage":["handleCurrentPageChange"]}],[1,"lottery-button",{"variant":[513],"size":[513],"disabled":[516],"loading":[516],"text":[513],"mbSource":[513,"mb-source"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"ripples":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-banner",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"logoUrl":[513,"logo-url"],"stopTime":[1,"stop-time"],"period":[1],"formattedTurnover":[1,"formatted-turnover"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[513,"position-idx"],"theme":[513],"mode":[513],"bulletConfigContent":[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"general-tooltip",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"position":[1],"delay":[2],"isVisible":[32],"_tooltipId":[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[514,"position-idx"],"theme":[513],"value":[513],"disabled":[516],"isSelected":[516,"is-selected"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -9,6 +9,12 @@
9
9
  "typescriptVersion": "5.4.5"
10
10
  },
11
11
  "collections": [
12
+ {
13
+ "name": "@everymatrix/lottery-button",
14
+ "tags": [
15
+ "lottery-button"
16
+ ]
17
+ },
12
18
  {
13
19
  "name": "@everymatrix/lottery-tipping-bullet-group",
14
20
  "tags": [
@@ -1,15 +1,19 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
- import "@everymatrix/lottery-button";
3
+ import "../../../../../../../libs/vaadin-facade/index";
4
+ import "../../../../../lottery-button/dist/types/index";
4
5
  import "../../../../../lottery-tipping-ticket-bet/dist/types/index";
5
6
  import { BettingTypeEnum, PlayModeEnum } from "../../models";
6
7
  import { resolveTranslationUrl, translate } from "../../utils/locale.utils";
7
- import { calculatePlayingModeOptions, fetchRequest, formatResultsToWinningNumbers, getCheckedCountForEachLineAndEachMatch, getDefaultType, getEnableOptions, getPlayTypeConfig, showNotification, thousandSeparator } from "../../utils/utils";
8
+ import { calculatePlayingModeOptions, fetchRequest, formatResultsToWinningNumbers, getCheckedCountForEachLineAndEachMatch, getDefaultType, getEnableOptions, getPlayTypeConfig, showNotification, thousandSeparator, getMinValue } from "../../utils/utils";
8
9
  import { doSubmitTicket, fetchSaleStatistics, TICKET_INVALID_TOKEN } from "../../utils/api";
9
10
  // value:
10
11
  export class LotteryTippingTicketController {
11
12
  constructor() {
12
13
  this.bothBettingTypeMultiplier = 2;
14
+ this.onStakeChange = (e) => {
15
+ this.currentStake = this.getCurrentStakeByValue(e.detail.value);
16
+ };
13
17
  this.mbSource = undefined;
14
18
  this.clientStyling = undefined;
15
19
  this.clientStylingUrl = undefined;
@@ -34,6 +38,7 @@ export class LotteryTippingTicketController {
34
38
  this.submitLoading = undefined;
35
39
  this.rawData = {};
36
40
  this.saleStatisticsInfo = {};
41
+ this.currentStake = undefined;
37
42
  this.dialogConfig = { visible: false };
38
43
  }
39
44
  async getLotteryTippingBulletResults() {
@@ -61,9 +66,28 @@ export class LotteryTippingTicketController {
61
66
  get isBothBettingType() {
62
67
  return this.selectedBettingType === BettingTypeEnum.Both;
63
68
  }
64
- get currentStake() {
69
+ get stakeOptions() {
65
70
  var _a, _b, _c;
66
- return (_c = (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.stakes) === null || _c === void 0 ? void 0 : _c[0];
71
+ return (_c = (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.stakes) === null || _c === void 0 ? void 0 : _c.map((item) => {
72
+ var _a;
73
+ return { value: (_a = item.value) === null || _a === void 0 ? void 0 : _a.toString(), label: item.value, currency: item.currency };
74
+ });
75
+ }
76
+ getCurrentStakeByValue(value) {
77
+ var _a;
78
+ return (_a = this.stakeOptions) === null || _a === void 0 ? void 0 : _a.find((item) => +item.value === +value);
79
+ }
80
+ initiateCurrentStake() {
81
+ var _a, _b;
82
+ // if only one option, default to the first one
83
+ if (((_a = this.stakeOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
84
+ this.currentStake = this.stakeOptions[0];
85
+ }
86
+ else {
87
+ // otherwise, default to the smallest stake option from the config
88
+ const minValue = getMinValue(((_b = this.stakeOptions) === null || _b === void 0 ? void 0 : _b.map((i) => i.value)) || []);
89
+ this.currentStake = this.getCurrentStakeByValue(minValue);
90
+ }
67
91
  }
68
92
  handleBettingTypeChange(type) {
69
93
  var _a, _b, _c, _d;
@@ -131,7 +155,7 @@ export class LotteryTippingTicketController {
131
155
  if (!stake) {
132
156
  return 0;
133
157
  }
134
- let totalAmount = stake.value * this.totalLineCombination;
158
+ let totalAmount = +stake.value * this.totalLineCombination;
135
159
  if (this.isBothBettingType)
136
160
  totalAmount = this.bothBettingTypeMultiplier * totalAmount;
137
161
  return totalAmount;
@@ -210,6 +234,7 @@ export class LotteryTippingTicketController {
210
234
  this.rawData = res;
211
235
  this.bettingTypeOptions = getEnableOptions(((_b = (_a = res === null || res === void 0 ? void 0 : res.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.bettingTypes) || []);
212
236
  this.playingModeOptions = getEnableOptions(((_d = (_c = res === null || res === void 0 ? void 0 : res.rules) === null || _c === void 0 ? void 0 : _c.poolGame) === null || _d === void 0 ? void 0 : _d.playModes) || []);
237
+ this.initiateCurrentStake();
213
238
  // default: select the first one
214
239
  const { bettingType, playMode } = getDefaultType({
215
240
  playTypeConfig: (_f = (_e = res === null || res === void 0 ? void 0 : res.rules) === null || _e === void 0 ? void 0 : _e.poolGame) === null || _f === void 0 ? void 0 : _f.playTypes,
@@ -254,7 +279,7 @@ export class LotteryTippingTicketController {
254
279
  tickets: []
255
280
  };
256
281
  const selections = formatResultsToWinningNumbers(rawResults);
257
- const stake = this.currentStake || {};
282
+ const stake = (this.currentStake || {});
258
283
  body.tickets.push({
259
284
  startingDrawId: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.id,
260
285
  amount: this.calculateTotalAmount().toString(),
@@ -303,6 +328,7 @@ export class LotteryTippingTicketController {
303
328
  return _ + ' ' + unit;
304
329
  }
305
330
  renderBettingControls() {
331
+ var _a;
306
332
  const renderSkeleton = () => (h("div", { class: "skeleton-content" }, h("div", { class: "skeleton-item skeleton-animated" })));
307
333
  const renderBettingTypeOptions = () => (h("div", { class: "LotteryTippingTicketController__segmented-control" }, this.bettingTypeOptions.map((item) => (h("button", { class: {
308
334
  LotteryTippingTicketController__segment: true,
@@ -312,10 +338,15 @@ export class LotteryTippingTicketController {
312
338
  LotteryTippingTicketController__segment: true,
313
339
  'LotteryTippingTicketController__segment--active': this.selectedPlayingMode === item.code
314
340
  }, onClick: this.handlePlayingModeChange.bind(this, item.code) }, item.name)))));
315
- return (h("div", { class: "LotteryTippingTicketController__top" }, h("div", { class: "LotteryTippingTicketController__row" }, h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate('bettingType', this.language)), !!this.bettingTypeOptions.length ? renderBettingTypeOptions() : renderSkeleton()), h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate('playingMode', this.language)), !!this.playingModeOptions.length ? renderPlayingModeOptions() : renderSkeleton()))));
341
+ const renderingStakeOptions = () => {
342
+ var _a;
343
+ return (h("div", null, h("vaadin-select", { items: this.stakeOptions || [], value: ((_a = this.currentStake) === null || _a === void 0 ? void 0 : _a.value) || '', "on-value-changed": this.onStakeChange.bind(this), "no-vertical-overlap": true })));
344
+ };
345
+ return (h("div", { class: "LotteryTippingTicketController__top" }, h("div", { class: "LotteryTippingTicketController__row" }, h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate('bettingType', this.language)), !!this.bettingTypeOptions.length ? renderBettingTypeOptions() : renderSkeleton()), h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate('playingMode', this.language)), !!this.playingModeOptions.length ? renderPlayingModeOptions() : renderSkeleton()), ((_a = this.stakeOptions) === null || _a === void 0 ? void 0 : _a.length) > 1 && (h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate('stakePerLine', this.language)), renderingStakeOptions())))));
316
346
  }
317
347
  renderOrderSummary() {
318
- return (h("div", { class: "LotteryTippingTicketController__main--right order-summary" }, h("h3", { class: "order-summary__title" }, translate('orderSummaryTitle', this.language)), h("div", { class: "order-summary__ticket-info" }, h("div", { class: "order-summary__ticket" }, translate('orderSummaryTickets', this.language), ":"), h("div", { class: "order-summary__details" }, h("span", { class: "order-summary__line-count" }, this.lineCountRender), h("div", null, this.currentStake && h("span", { class: "order-summary__multiplier" }, "x"), h("span", { class: "order-summary__stake" }, this.currentStakeFormatted)), this.isBothBettingType && (h("div", null, h("span", { class: "order-summary__multiplier" }, "x"), h("span", { class: "order-summary__stake" }, this.bothBettingTypeMultiplier))))), h("hr", { class: "order-summary__divider" }), h("div", { class: "order-summary__ticket-info" }, h("div", { class: "order-summary__ticket" }, translate('orderSummaryTotal', this.language), ":"), h("span", { class: "order-summary__details" }, this.totalAmountFormatted)), h("div", { class: "order-summary__button-wrapper" }, h("lottery-button", { onClick: this.handleSubmit.bind(this), loading: this.submitLoading, disabled: !this.hasSelectAllBullet || this.submitLoading, text: translate('orderSummarySubmit', this.language) }))));
348
+ var _a;
349
+ return (h("div", { class: "LotteryTippingTicketController__main--right order-summary" }, h("h3", { class: "order-summary__title" }, translate('orderSummaryTitle', this.language)), h("div", { class: "order-summary__ticket-info" }, h("div", { class: "order-summary__ticket" }, translate('orderSummaryTickets', this.language), ":"), h("div", { class: "order-summary__details" }, h("span", { class: "order-summary__line-count" }, this.lineCountRender), h("div", null, this.currentStake && h("span", { class: "order-summary__multiplier" }, "x"), h("span", { class: "order-summary__stake" }, this.currentStakeFormatted)), this.isBothBettingType && (h("div", null, h("span", { class: "order-summary__multiplier" }, "x"), h("span", { class: "order-summary__stake" }, this.bothBettingTypeMultiplier))))), h("hr", { class: "order-summary__divider" }), h("div", { class: "order-summary__ticket-info" }, h("div", { class: "order-summary__ticket" }, translate('orderSummaryTotal', this.language), ":"), h("span", { class: "order-summary__details" }, this.totalAmountFormatted)), h("div", { class: "order-summary__button-wrapper" }, h("lottery-button", { onClick: this.handleSubmit.bind(this), loading: this.submitLoading, disabled: !this.hasSelectAllBullet || this.submitLoading || ((_a = this.currentStake) === null || _a === void 0 ? void 0 : _a.value) === undefined, text: translate('orderSummarySubmit', this.language) }))));
319
350
  }
320
351
  get formattedTurnover() {
321
352
  var _a, _b;
@@ -327,7 +358,7 @@ export class LotteryTippingTicketController {
327
358
  }
328
359
  render() {
329
360
  var _a, _b, _c, _d, _e, _f, _g;
330
- return (h("div", { key: 'a849624b0fe5fae436bec3e42836d4dc30074539', class: "lottery-tipping-ticket-controller__container", ref: (el) => (this.stylingContainer = el) }, h("lottery-tipping-ticket-banner", { key: 'dde87c0980564b39eb882121911125f630994369', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl, stopTime: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.wagerCloseTime, period: (_d = (_c = this.rawData) === null || _c === void 0 ? void 0 : _c.currentDraw) === null || _d === void 0 ? void 0 : _d.date, "formatted-turnover": this.formattedTurnover, language: this.language, "translation-url": this.translationUrl, "logo-url": this.logoUrl }), this.renderBettingControls(), h("div", { key: 'b8cfcea8d213bd0275ab9f1a3a164ebcaa629f71', class: "flex flex-wrap LotteryTippingTicketController__main" }, h("div", { key: '9fec0554e90804ae4b261d5facc28de4d242524d', class: "LotteryTippingTicketController__main--left" }, h("lottery-tipping-ticket-bet", { key: '7d36a1095dba6541b480a989e6b1661b576963bb', ref: (el) => (this.childRef = el), endpoint: this.endpoint, "session-id": this.sessionId, "game-id": (_e = this.rawData) === null || _e === void 0 ? void 0 : _e.type, "draw-id": this.drawId, language: this.language, "translation-url": this.translationUrl, "max-total-pages": this.lineNumberRange.maxLineNumber, "min-total-pages": this.lineNumberRange.minLineNumber, "total-pages": this.lineNumberRange.defaultBoards, mode: this.selectedPlayingMode === PlayModeEnum.SingleBet ? 'single' : 'multi', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl })), this.renderOrderSummary()), this.dialogConfig.visible && (h("vaadin-confirm-dialog", { key: 'c7935460a02c65697f30dd3da5e2886cec75f3fb', rejectButtonVisible: true, rejectText: translate('cancel', this.language), confirmText: translate('confirm', this.language), opened: (_f = this.dialogConfig) === null || _f === void 0 ? void 0 : _f.visible, onConfirm: this.dialogConfig.onConfirm, onReject: this.dialogConfig.onCancel }, (_g = this.dialogConfig) === null || _g === void 0 ? void 0 : _g.content))));
361
+ return (h("div", { key: 'bc9858c6923707b9d5e4fca7b57e272143f895aa', class: "lottery-tipping-ticket-controller__container", ref: (el) => (this.stylingContainer = el) }, h("lottery-tipping-ticket-banner", { key: '2a220d90a4ab73f220d9d47db47e10749cb33cdd', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl, stopTime: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.wagerCloseTime, period: (_d = (_c = this.rawData) === null || _c === void 0 ? void 0 : _c.currentDraw) === null || _d === void 0 ? void 0 : _d.date, "formatted-turnover": this.formattedTurnover, language: this.language, "translation-url": this.translationUrl, "logo-url": this.logoUrl }), this.renderBettingControls(), h("div", { key: '9d548c6d3d01ee4ed2e68481a00f4667e50a418b', class: "flex flex-wrap LotteryTippingTicketController__main" }, h("div", { key: '647ff830980982139f270f12a5286eb80a2f7b9e', class: "LotteryTippingTicketController__main--left" }, h("lottery-tipping-ticket-bet", { key: '0151d3830fcec76574016a97a953a12817450280', ref: (el) => (this.childRef = el), endpoint: this.endpoint, "session-id": this.sessionId, "game-id": (_e = this.rawData) === null || _e === void 0 ? void 0 : _e.type, "draw-id": this.drawId, language: this.language, "translation-url": this.translationUrl, "max-total-pages": this.lineNumberRange.maxLineNumber, "min-total-pages": this.lineNumberRange.minLineNumber, "total-pages": this.lineNumberRange.defaultBoards, mode: this.selectedPlayingMode === PlayModeEnum.SingleBet ? 'single' : 'multi', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl })), this.renderOrderSummary()), this.dialogConfig.visible && (h("vaadin-confirm-dialog", { key: '5153f04448556bca403aeadfca6b573e0dc9b832', rejectButtonVisible: true, rejectText: translate('cancel', this.language), confirmText: translate('confirm', this.language), opened: (_f = this.dialogConfig) === null || _f === void 0 ? void 0 : _f.visible, onConfirm: this.dialogConfig.onConfirm, onReject: this.dialogConfig.onCancel }, (_g = this.dialogConfig) === null || _g === void 0 ? void 0 : _g.content))));
331
362
  }
332
363
  static get is() { return "lottery-tipping-ticket-controller"; }
333
364
  static get encapsulation() { return "shadow"; }
@@ -585,6 +616,7 @@ export class LotteryTippingTicketController {
585
616
  "submitLoading": {},
586
617
  "rawData": {},
587
618
  "saleStatisticsInfo": {},
619
+ "currentStake": {},
588
620
  "dialogConfig": {}
589
621
  };
590
622
  }
@@ -17,7 +17,8 @@ const TRANSLATIONS = {
17
17
  orderSummaryTotal: 'Total',
18
18
  orderSummarySubmit: 'Submit',
19
19
  cancel: 'Cancel',
20
- confirm: 'Confirm'
20
+ confirm: 'Confirm',
21
+ stakePerLine: 'Stake per Line:'
21
22
  },
22
23
  ro: {
23
24
  selectionCleared: 'Selecția dvs. va fi ștearsă.',
@@ -146,3 +146,4 @@ export const getPlayTypeConfig = ({ rawData, selectedBettingType, selectedPlayin
146
146
  const betType = (_f = (_e = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _e === void 0 ? void 0 : _e.betTypes) === null || _f === void 0 ? void 0 : _f.find((i) => i.id === betTypeId);
147
147
  return { betTypeId, betType };
148
148
  };
149
+ export const getMinValue = (arr) => (arr.length ? Math.min.apply(null, arr) : undefined);