@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.cjs.js CHANGED
@@ -30926,6 +30926,19 @@ const lotteryLabel = {
30926
30926
  HOSO: "\u1786\u17D2\u1793\u17C4\u178F HOSO",
30927
30927
  KP: "\u1780\u17C6\u1796\u178F KP"
30928
30928
  };
30929
+ const lotteryCodes = {
30930
+ LEAP: "LMHSB",
30931
+ HOSO: "HOSO",
30932
+ VN4: "VN4",
30933
+ VN3: "VN3",
30934
+ VN2: "MT",
30935
+ VN1: "MC",
30936
+ TN: "TC",
30937
+ KH: "KH",
30938
+ SC: "SC",
30939
+ TH: "TH",
30940
+ KP: "KP"
30941
+ };
30929
30942
  const lotteryLabelKH = {
30930
30943
  LEAP: "\u179B\u17B6\u1797",
30931
30944
  VN2: "\u1798\u17A0\u17B6\u1791\u17C1\u1796",
@@ -60035,7 +60048,9 @@ const MainVn = (props) => {
60035
60048
  win4DKhr = 0,
60036
60049
  win4DUsd = 0,
60037
60050
  winLoseKhr = 0,
60038
- winLoseUsd = 0
60051
+ winLoseUsd = 0,
60052
+ shareAmountKhr = 0,
60053
+ shareAmountUsd = 0
60039
60054
  },
60040
60055
  hasLottery: {
60041
60056
  rebateRate1D = 0,
@@ -60120,6 +60135,7 @@ const MainVn = (props) => {
60120
60135
  });
60121
60136
  const isShow = (value) => !isMix && value;
60122
60137
  const titleColSpan = isShowUsd ? 2 + mergeAll + mergeKhr + mergeUsd : 2 + mergeKhr * 2;
60138
+ let isShare = shareAmountKhr !== winLoseKhr || shareAmountUsd !== winLoseUsd;
60123
60139
  return /* @__PURE__ */ jsxRuntime.jsx("div", { id: "wrap-tb", className: "mb-3 mr-3", children: /* @__PURE__ */ jsxRuntime.jsx("table", { id, className: `table table-hover table-striped ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { className: "pb-5", children: [
60124
60140
  renderReportTitleRows({
60125
60141
  preTitle,
@@ -60207,6 +60223,17 @@ const MainVn = (props) => {
60207
60223
  isShowUsd,
60208
60224
  winLoseKhr,
60209
60225
  winLoseUsd,
60226
+ borderClassName: isShare ? "" : "b-vio-b",
60227
+ khrAfterValue: [{ colSpan: isShowUsd ? getAllLength + 4 : mergeKhr + 8 }],
60228
+ usdAfterValue: [{ colSpan: 7 }]
60229
+ }),
60230
+ isShare && renderWinLoseRow({
60231
+ id,
60232
+ isShowUsd,
60233
+ khrLabel: "\u1780\u17B6\u178F\u17CB Share \u179A\u17BD\u1785",
60234
+ usdLabel: "\u1780\u17B6\u178F\u17CB Share \u179A\u17BD\u1785",
60235
+ winLoseKhr: shareAmountKhr,
60236
+ winLoseUsd: shareAmountUsd,
60210
60237
  khrAfterValue: [{ colSpan: isShowUsd ? getAllLength + 4 : mergeKhr + 8 }],
60211
60238
  usdAfterValue: [{ colSpan: 7 }]
60212
60239
  })
@@ -61306,8 +61333,16 @@ const SummaryImageActions = ({ children, fileName }) => {
61306
61333
  ] }) });
61307
61334
  };
61308
61335
 
61309
- const SummaryRow = ({ id, label, khr, usd, showUsd, className = "", labelClassName = "text-center" }) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "animate-slide-up", children: [
61310
- /* @__PURE__ */ jsxRuntime.jsx(THB, { colSpan: 4, className: labelClassName, children: label }),
61336
+ const SummaryRow = ({ id, label, khr, usd, showUsd, className = "", labelClassName = "text-center", share = 100 }) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "animate-slide-up", children: [
61337
+ /* @__PURE__ */ jsxRuntime.jsxs(THB, { colSpan: 4, className: labelClassName, children: [
61338
+ label,
61339
+ " ",
61340
+ share !== 100 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-info", children: [
61341
+ " (",
61342
+ share,
61343
+ "%)"
61344
+ ] }) : ""
61345
+ ] }),
61311
61346
  /* @__PURE__ */ jsxRuntime.jsx(RenderThWidthB, { colSpan: showUsd ? 3 : 6, className: `${className} t-right`, id, value: khr, currency: "KHR" }),
61312
61347
  showUsd && /* @__PURE__ */ jsxRuntime.jsx(RenderThWidthB, { colSpan: 3, className: `${className} t-right`, id, value: usd, currency: "USD" })
61313
61348
  ] });
@@ -61342,8 +61377,6 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61342
61377
  } = data || {};
61343
61378
  const user = getSummaryUser({ data, filter });
61344
61379
  const totalStyle = { borderBottom: "2px solid black", borderTop: "2px solid black" };
61345
- const summaryValueKhr = (filter == null ? void 0 : filter.isSend) ? winLoseKhr : shareAmountKhr;
61346
- const summaryValueUsd = (filter == null ? void 0 : filter.isSend) ? winLoseUsd : shareAmountUsd;
61347
61380
  return /* @__PURE__ */ jsxRuntime.jsx(SummaryImageActions, { fileName: getSummaryImageFileName("win-lose-summary", filter), children: (actions) => /* @__PURE__ */ jsxRuntime.jsx(
61348
61381
  "table",
61349
61382
  {
@@ -61365,9 +61398,9 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61365
61398
  /* @__PURE__ */ jsxRuntime.jsx(THB, { className: "blue-l-h", colSpan: showUsd ? 3 : 6, children: "(\u179A\u17C0\u179B)" }),
61366
61399
  showUsd && /* @__PURE__ */ jsxRuntime.jsx(THB, { colSpan: 3, className: "green-l-h text-left", children: "(\u178A\u17BB\u179B\u17D2\u179B\u17B6\u179A)" })
61367
61400
  ] }),
61368
- winLoses.map(({ winLoseKhr: winLoseKhr2, winLoseUsd: winLoseUsd2, lotteryType }, index) => {
61401
+ winLoses.map(({ winLoseKhr: winLoseKhr2, winLoseUsd: winLoseUsd2, lotteryType, share }, index) => {
61369
61402
  const lotteryName = lotteryLabelKH[lotteryType] || lotteryType;
61370
- const lotteryCode = lotteryLabel[lotteryType] || lotteryType;
61403
+ const lotteryCode = lotteryCodes[lotteryType] || lotteryType;
61371
61404
  return /* @__PURE__ */ jsxRuntime.jsx(
61372
61405
  SummaryRow,
61373
61406
  {
@@ -61376,6 +61409,7 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61376
61409
  khr: winLoseKhr2,
61377
61410
  usd: winLoseUsd2,
61378
61411
  showUsd,
61412
+ share,
61379
61413
  labelClassName: "t-left"
61380
61414
  },
61381
61415
  `${lotteryType}-${index}`
@@ -61383,8 +61417,8 @@ const WinLoseSummary = ({ data, id, filter, showUsd }) => {
61383
61417
  }),
61384
61418
  /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "animate-slide-up b-vio-b2", children: [
61385
61419
  /* @__PURE__ */ jsxRuntime.jsx(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" }),
61386
- /* @__PURE__ */ jsxRuntime.jsx(RenderThWidthB, { className: "t-right f-bold blue-l-h", colSpan: showUsd ? 3 : 6, id, value: summaryValueKhr, currency: "KHR" }),
61387
- showUsd && /* @__PURE__ */ jsxRuntime.jsx(RenderThWidthB, { colSpan: 3, className: "t-right f-bold green-l-h", id, value: summaryValueUsd, currency: "USD" })
61420
+ /* @__PURE__ */ jsxRuntime.jsx(RenderThWidthB, { className: "t-right f-bold blue-l-h", colSpan: showUsd ? 3 : 6, id, value: shareAmountKhr, currency: "KHR" }),
61421
+ showUsd && /* @__PURE__ */ jsxRuntime.jsx(RenderThWidthB, { colSpan: 3, className: "t-right f-bold green-l-h", id, value: shareAmountUsd, currency: "USD" })
61388
61422
  ] }),
61389
61423
  /* @__PURE__ */ jsxRuntime.jsx(SummaryRow, { id, label: "\u1794\u1789\u17D2\u1787\u17B8\u1785\u17B6\u179F\u17CB", khr: oldKhr, usd: oldUsd, showUsd }),
61390
61424
  /* @__PURE__ */ jsxRuntime.jsx(SummaryRow, { id, label: "\u179B\u17BB\u1799\u179F\u1784", khr: giveKhr, usd: giveUsd, showUsd }),
@@ -61541,6 +61575,7 @@ exports.getS3ImgPrint = getS3ImgPrint;
61541
61575
  exports.getStoredIsRemark = getStoredIsRemark;
61542
61576
  exports.isVNType = isVNType;
61543
61577
  exports.lType = lType;
61578
+ exports.lotteryCodes = lotteryCodes;
61544
61579
  exports.lotteryLabel = lotteryLabel;
61545
61580
  exports.lotteryLabelKH = lotteryLabelKH;
61546
61581
  exports.lotteryLabelOnline = lotteryLabelOnline;