@jingx/lottery-components-react-jsx 1.0.9 → 1.0.11

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
@@ -31633,10 +31633,6 @@ const lotteryLabelOnline = {
31633
31633
  TH: "\u1790\u17C3TH",
31634
31634
  KP: "\u1780\u17C6\u1796\u178F KP"
31635
31635
  };
31636
- const lotteryLabelVN = __spreadProps$2(__spreadValues$4({}, lotteryLabel), {
31637
- VN1: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
31638
- TN: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793"
31639
- });
31640
31636
  const lotteryLabel = {
31641
31637
  LEAP: "\u179B\u17B6\u1797\u1798\u17A0\u17B6\u179F\u1798\u17D2\u1794\u178F\u17D2\u178F\u17B7",
31642
31638
  VN2: "\u1798\u17A0\u17B6\u1791\u17C1\u1796",
@@ -31648,6 +31644,11 @@ const lotteryLabel = {
31648
31644
  HOSO: "\u1786\u17D2\u1793\u17C4\u178F HOSO",
31649
31645
  KP: "\u1780\u17C6\u1796\u178F KP"
31650
31646
  };
31647
+ const lotteryLabelVN = __spreadProps$2(__spreadValues$4({}, lotteryLabel), {
31648
+ VN1: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
31649
+ TN: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
31650
+ KH: "\u1786\u17D2\u1793\u17C4\u178F\u1781\u17D2\u1798\u17C2\u179A"
31651
+ });
31651
31652
  const mapBetTitle = {
31652
31653
  "NORMAL": "\u1792\u1798\u17D2\u1798\u178F\u17B6",
31653
31654
  "NORMAL_MULTIPLE": "\u1782\u17BB\u178E",
@@ -31749,6 +31750,7 @@ const THLabel = {
31749
31750
  A: "3D",
31750
31751
  B: "2D"
31751
31752
  };
31753
+ const isVNType = (lotteryType) => [lType.MC, lType.TN, lType.KH].includes(lotteryType);
31752
31754
 
31753
31755
  const TicketPrintBody = (props) => {
31754
31756
  const { item, bodyClass, is58 } = props;
@@ -32113,31 +32115,6 @@ const PrintTicket58 = (props) => {
32113
32115
  }) }) });
32114
32116
  };
32115
32117
 
32116
- const RenderTitle = ({ lotteryType, className = "", logo, isVN }) => {
32117
- let title = lotteryLabel[lotteryType];
32118
- if (logo) {
32119
- title = lotteryLabelOnline[lotteryType];
32120
- }
32121
- if (isVN) {
32122
- title = lotteryLabelVN[lotteryType];
32123
- }
32124
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
32125
- "td",
32126
- {
32127
- colSpan: "3",
32128
- className,
32129
- children: title
32130
- }
32131
- );
32132
- };
32133
-
32134
- const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
32135
- logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
32136
- width: "50px"
32137
- }, src: logo, alt: "__log__" }),
32138
- logo ? "\u1786\u17D2\u1793\u17C4\u178F\u1782\u17D2\u179A\u1794\u17CB\u1794\u17D2\u179A\u1797\u17C1\u1791" : "\u1786\u17D2\u1793\u17C4\u178F\u1795\u17D2\u179F\u1784\u179F\u17C6\u178E\u17B6\u1784"
32139
- ] });
32140
-
32141
32118
  function commonjsRequire(path) {
32142
32119
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
32143
32120
  }
@@ -37843,6 +37820,35 @@ const getDateHourKey = (date) => {
37843
37820
  const getTime = (date) => {
37844
37821
  return moment(date).format("hh:mm A");
37845
37822
  };
37823
+ const getHH = (date) => Number(moment(date).format("h"));
37824
+
37825
+ const RenderTitle = ({ lotteryType, className = "", logo, isVN, drawAt }) => {
37826
+ let title = lotteryLabel[lotteryType];
37827
+ if (logo) {
37828
+ title = lotteryLabelOnline[lotteryType];
37829
+ }
37830
+ if (isVN) {
37831
+ title = lotteryLabelVN[lotteryType];
37832
+ if (isVNType(lotteryType) && drawAt) {
37833
+ title = `${lotteryLabelVN[lotteryType]} \u1798\u17C9\u17C4\u1784${getHH(drawAt)}`;
37834
+ }
37835
+ }
37836
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
37837
+ "td",
37838
+ {
37839
+ colSpan: "3",
37840
+ className,
37841
+ children: title
37842
+ }
37843
+ );
37844
+ };
37845
+
37846
+ const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
37847
+ logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
37848
+ width: "50px"
37849
+ }, src: logo, alt: "__log__" }),
37850
+ logo ? "\u1786\u17D2\u1793\u17C4\u178F\u1782\u17D2\u179A\u1794\u17CB\u1794\u17D2\u179A\u1797\u17C1\u1791" : "\u1786\u17D2\u1793\u17C4\u178F\u1795\u17D2\u179F\u1784\u179F\u17C6\u178E\u17B6\u1784"
37851
+ ] });
37846
37852
 
37847
37853
  function ScopeHost({ className, children, style }) {
37848
37854
  const ref = React.useRef(null);
@@ -37872,8 +37878,9 @@ const Ticket = ({ object, lotteryType, plusCount = 1, logo, hideWaterAmount = fa
37872
37878
  /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
37873
37879
  RenderTitle,
37874
37880
  {
37875
- isVN,
37876
37881
  className: "text-center ticket-logo pt-2 mt-1 p-0",
37882
+ drawAt: object == null ? void 0 : object.drawAt,
37883
+ isVN,
37877
37884
  lotteryType,
37878
37885
  logo
37879
37886
  }
@@ -46877,6 +46884,7 @@ exports.SaryPrintAll = SaryPrintAll;
46877
46884
  exports.THLabel = THLabel;
46878
46885
  exports.Ticket = Ticket;
46879
46886
  exports.TicketModal = TicketModal;
46887
+ exports.isVNType = isVNType;
46880
46888
  exports.lType = lType;
46881
46889
  exports.lotteryLabel = lotteryLabel;
46882
46890
  exports.lotteryLabelOnline = lotteryLabelOnline;