@jingx/lottery-components-react-jsx 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -30906,6 +30906,19 @@ const lotteryLabel = {
30906
30906
  HOSO: "\u1786\u17D2\u1793\u17C4\u178F HOSO",
30907
30907
  KP: "\u1780\u17C6\u1796\u178F KP"
30908
30908
  };
30909
+ const lotteryCodes = {
30910
+ LEAP: "LMHSB",
30911
+ HOSO: "HOSO",
30912
+ VN4: "VN4",
30913
+ VN3: "VN3",
30914
+ VN2: "MT",
30915
+ VN1: "MC",
30916
+ TN: "TC",
30917
+ KH: "KH",
30918
+ SC: "SC",
30919
+ TH: "TH",
30920
+ KP: "KP"
30921
+ };
30909
30922
  const lotteryLabelKH = {
30910
30923
  LEAP: "\u179B\u17B6\u1797",
30911
30924
  VN2: "\u1798\u17A0\u17B6\u1791\u17C1\u1796",
@@ -60015,7 +60028,9 @@ const MainVn = (props) => {
60015
60028
  win4DKhr = 0,
60016
60029
  win4DUsd = 0,
60017
60030
  winLoseKhr = 0,
60018
- winLoseUsd = 0
60031
+ winLoseUsd = 0,
60032
+ shareAmountKhr = 0,
60033
+ shareAmountUsd = 0
60019
60034
  },
60020
60035
  hasLottery: {
60021
60036
  rebateRate1D = 0,
@@ -60100,6 +60115,7 @@ const MainVn = (props) => {
60100
60115
  });
60101
60116
  const isShow = (value) => !isMix && value;
60102
60117
  const titleColSpan = isShowUsd ? 2 + mergeAll + mergeKhr + mergeUsd : 2 + mergeKhr * 2;
60118
+ let isShare = shareAmountKhr !== winLoseKhr || shareAmountUsd !== winLoseUsd;
60103
60119
  return /* @__PURE__ */ jsx$1("div", { id: "wrap-tb", className: "mb-3 mr-3", children: /* @__PURE__ */ jsx$1("table", { id, className: `table table-hover table-striped ${className}`, children: /* @__PURE__ */ jsxs("tbody", { className: "pb-5", children: [
60104
60120
  renderReportTitleRows({
60105
60121
  preTitle,
@@ -60187,6 +60203,17 @@ const MainVn = (props) => {
60187
60203
  isShowUsd,
60188
60204
  winLoseKhr,
60189
60205
  winLoseUsd,
60206
+ borderClassName: isShare ? "" : "b-vio-b",
60207
+ khrAfterValue: [{ colSpan: isShowUsd ? getAllLength + 4 : mergeKhr + 8 }],
60208
+ usdAfterValue: [{ colSpan: 7 }]
60209
+ }),
60210
+ isShare && renderWinLoseRow({
60211
+ id,
60212
+ isShowUsd,
60213
+ khrLabel: "\u1780\u17B6\u178F\u17CB Share \u179A\u17BD\u1785",
60214
+ usdLabel: "\u1780\u17B6\u178F\u17CB Share \u179A\u17BD\u1785",
60215
+ winLoseKhr: shareAmountKhr,
60216
+ winLoseUsd: shareAmountUsd,
60190
60217
  khrAfterValue: [{ colSpan: isShowUsd ? getAllLength + 4 : mergeKhr + 8 }],
60191
60218
  usdAfterValue: [{ colSpan: 7 }]
60192
60219
  })
@@ -61286,8 +61313,16 @@ const SummaryImageActions = ({ children, fileName }) => {
61286
61313
  ] }) });
61287
61314
  };
61288
61315
 
61289
- const SummaryRow = ({ id, label, khr, usd, showUsd, className = "", labelClassName = "text-center" }) => /* @__PURE__ */ jsxs("tr", { className: "animate-slide-up", children: [
61290
- /* @__PURE__ */ jsx$1(THB, { colSpan: 4, className: labelClassName, children: label }),
61316
+ const SummaryRow = ({ id, label, khr, usd, showUsd, className = "", labelClassName = "text-center", share = 100 }) => /* @__PURE__ */ jsxs("tr", { className: "animate-slide-up", children: [
61317
+ /* @__PURE__ */ jsxs(THB, { colSpan: 4, className: labelClassName, children: [
61318
+ label,
61319
+ " ",
61320
+ share !== 100 ? /* @__PURE__ */ jsxs("span", { className: "text-info", children: [
61321
+ " (",
61322
+ share,
61323
+ "%)"
61324
+ ] }) : ""
61325
+ ] }),
61291
61326
  /* @__PURE__ */ jsx$1(RenderThWidthB, { colSpan: showUsd ? 3 : 6, className: `${className} t-right`, id, value: khr, currency: "KHR" }),
61292
61327
  showUsd && /* @__PURE__ */ jsx$1(RenderThWidthB, { colSpan: 3, className: `${className} t-right`, id, value: usd, currency: "USD" })
61293
61328
  ] });
@@ -61322,8 +61357,6 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61322
61357
  } = data || {};
61323
61358
  const user = getSummaryUser({ data, filter });
61324
61359
  const totalStyle = { borderBottom: "2px solid black", borderTop: "2px solid black" };
61325
- const summaryValueKhr = (filter == null ? void 0 : filter.isSend) ? winLoseKhr : shareAmountKhr;
61326
- const summaryValueUsd = (filter == null ? void 0 : filter.isSend) ? winLoseUsd : shareAmountUsd;
61327
61360
  return /* @__PURE__ */ jsx$1(SummaryImageActions, { fileName: getSummaryImageFileName("win-lose-summary", filter), children: (actions) => /* @__PURE__ */ jsx$1(
61328
61361
  "table",
61329
61362
  {
@@ -61345,9 +61378,9 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61345
61378
  /* @__PURE__ */ jsx$1(THB, { className: "blue-l-h", colSpan: showUsd ? 3 : 6, children: "(\u179A\u17C0\u179B)" }),
61346
61379
  showUsd && /* @__PURE__ */ jsx$1(THB, { colSpan: 3, className: "green-l-h text-left", children: "(\u178A\u17BB\u179B\u17D2\u179B\u17B6\u179A)" })
61347
61380
  ] }),
61348
- winLoses.map(({ winLoseKhr: winLoseKhr2, winLoseUsd: winLoseUsd2, lotteryType }, index) => {
61381
+ winLoses.map(({ winLoseKhr: winLoseKhr2, winLoseUsd: winLoseUsd2, lotteryType, share }, index) => {
61349
61382
  const lotteryName = lotteryLabelKH[lotteryType] || lotteryType;
61350
- const lotteryCode = lotteryLabel[lotteryType] || lotteryType;
61383
+ const lotteryCode = lotteryCodes[lotteryType] || lotteryType;
61351
61384
  return /* @__PURE__ */ jsx$1(
61352
61385
  SummaryRow,
61353
61386
  {
@@ -61356,6 +61389,7 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61356
61389
  khr: winLoseKhr2,
61357
61390
  usd: winLoseUsd2,
61358
61391
  showUsd,
61392
+ share,
61359
61393
  labelClassName: "t-left"
61360
61394
  },
61361
61395
  `${lotteryType}-${index}`
@@ -61363,8 +61397,8 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61363
61397
  }),
61364
61398
  /* @__PURE__ */ jsxs("tr", { className: "animate-slide-up b-vio-b2", children: [
61365
61399
  /* @__PURE__ */ jsx$1(THB, { colSpan: 4, className: "t-left f-bold blue-l-h", children: "\u179F\u179A\u17BB\u1794\u179F\u17BB\u17B8\u1781\u17B6\u178F\u1794\u17D2\u179A\u1785\u17B6\u17C6\u1790\u17D2\u1784\u17C3" }),
61366
- /* @__PURE__ */ jsx$1(RenderThWidthB, { className: "t-right f-bold blue-l-h", colSpan: showUsd ? 3 : 6, id, value: summaryValueKhr, currency: "KHR" }),
61367
- showUsd && /* @__PURE__ */ jsx$1(RenderThWidthB, { colSpan: 3, className: "t-right f-bold green-l-h", id, value: summaryValueUsd, currency: "USD" })
61400
+ /* @__PURE__ */ jsx$1(RenderThWidthB, { className: "t-right f-bold blue-l-h", colSpan: showUsd ? 3 : 6, id, value: shareAmountKhr, currency: "KHR" }),
61401
+ showUsd && /* @__PURE__ */ jsx$1(RenderThWidthB, { colSpan: 3, className: "t-right f-bold green-l-h", id, value: shareAmountUsd, currency: "USD" })
61368
61402
  ] }),
61369
61403
  /* @__PURE__ */ jsx$1(SummaryRow, { id, label: "\u1794\u1789\u17D2\u1787\u17B8\u1785\u17B6\u179F\u17CB", khr: oldKhr, usd: oldUsd, showUsd }),
61370
61404
  /* @__PURE__ */ jsx$1(SummaryRow, { id, label: "\u179B\u17BB\u1799\u179F\u1784", khr: giveKhr, usd: giveUsd, showUsd }),
@@ -61492,5 +61526,5 @@ class MainTableWrapExcel extends Component {
61492
61526
  }
61493
61527
  }
61494
61528
 
61495
- export { DeleteModal, DeleteTicketButton, MoreMenu as DropdownMenu, KPLO, KPPostCode, MainTableWrap as MixDailyReport, MainTableWrapExcel as MixDailyReportExcel, Printer, ProtestButton, ProtestModal, ProtestTicket, RemarkConfigToggle, RemarkModal, RemarkModalShowOnly, SCPostCode, SaryLottery, SaryPrintAll, THLabel, Ticket, TicketModal, TransferModal, TransferTicket, clickRemarkBtn, formatUsd, getMemberName, getS3ImgPrint, getStoredIsRemark, isVNType, lType, lotteryLabel, lotteryLabelKH, lotteryLabelOnline, lotteryLabelVN, lotteryReportLabel, mapBetTitle, mapLabels, mapStrPost, widthLength };
61529
+ export { DeleteModal, DeleteTicketButton, MoreMenu as DropdownMenu, KPLO, KPPostCode, MainTableWrap as MixDailyReport, MainTableWrapExcel as MixDailyReportExcel, Printer, ProtestButton, ProtestModal, ProtestTicket, RemarkConfigToggle, RemarkModal, RemarkModalShowOnly, SCPostCode, SaryLottery, SaryPrintAll, THLabel, Ticket, TicketModal, TransferModal, TransferTicket, clickRemarkBtn, formatUsd, getMemberName, getS3ImgPrint, getStoredIsRemark, isVNType, lType, lotteryCodes, lotteryLabel, lotteryLabelKH, lotteryLabelOnline, lotteryLabelVN, lotteryReportLabel, mapBetTitle, mapLabels, mapStrPost, widthLength };
61496
61530
  //# sourceMappingURL=index.esm.js.map