@jingx/lottery-components-react-jsx 1.0.6 → 1.0.8
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 +64 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +64 -36
- package/dist/index.esm.js.map +1 -1
- package/package.json +47 -47
package/dist/index.esm.js
CHANGED
|
@@ -31551,6 +31551,25 @@ function transformPostCode(posts, postCodeMap) {
|
|
|
31551
31551
|
return resultArray.join(".");
|
|
31552
31552
|
}
|
|
31553
31553
|
|
|
31554
|
+
var __defProp$4 = Object.defineProperty;
|
|
31555
|
+
var __defProps$2 = Object.defineProperties;
|
|
31556
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
31557
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
31558
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
31559
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
31560
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
31561
|
+
var __spreadValues$4 = (a, b) => {
|
|
31562
|
+
for (var prop in b || (b = {}))
|
|
31563
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
31564
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
31565
|
+
if (__getOwnPropSymbols$5)
|
|
31566
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
31567
|
+
if (__propIsEnum$5.call(b, prop))
|
|
31568
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
31569
|
+
}
|
|
31570
|
+
return a;
|
|
31571
|
+
};
|
|
31572
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
31554
31573
|
const KPPostCode = {
|
|
31555
31574
|
A: "\u179B\u17E1",
|
|
31556
31575
|
F: "\u179B\u17E2",
|
|
@@ -31594,6 +31613,10 @@ const lotteryLabelOnline = {
|
|
|
31594
31613
|
TH: "\u1790\u17C3TH",
|
|
31595
31614
|
KP: "\u1780\u17C6\u1796\u178F KP"
|
|
31596
31615
|
};
|
|
31616
|
+
const lotteryLabelVN = __spreadProps$2(__spreadValues$4({}, lotteryLabelOnline), {
|
|
31617
|
+
VN1: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
|
|
31618
|
+
TN: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793"
|
|
31619
|
+
});
|
|
31597
31620
|
const lotteryLabel = {
|
|
31598
31621
|
LEAP: "\u179B\u17B6\u1797\u1798\u17A0\u17B6\u179F\u1798\u17D2\u1794\u178F\u17D2\u178F\u17B7",
|
|
31599
31622
|
VN2: "\u1798\u17A0\u17B6\u1791\u17C1\u1796",
|
|
@@ -31759,31 +31782,22 @@ const TicketPrintBody = (props) => {
|
|
|
31759
31782
|
return is58 ? "h-58-10" : "h-t-10";
|
|
31760
31783
|
}
|
|
31761
31784
|
};
|
|
31762
|
-
const
|
|
31785
|
+
const ExpandedWrapper = ({ children, obj }) => {
|
|
31763
31786
|
let arr = [obj.numberFrom.length, obj.numberTo.length, obj.numberThree.length, obj.numberFour.length];
|
|
31764
31787
|
let ex = Math.max(...arr);
|
|
31765
|
-
|
|
31766
|
-
|
|
31767
|
-
|
|
31768
|
-
|
|
31769
|
-
|
|
31770
|
-
|
|
31771
|
-
|
|
31772
|
-
|
|
31773
|
-
|
|
31774
|
-
|
|
31775
|
-
|
|
31776
|
-
|
|
31777
|
-
|
|
31778
|
-
case 7:
|
|
31779
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "132px" } });
|
|
31780
|
-
case 8:
|
|
31781
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "158px" } });
|
|
31782
|
-
case 9:
|
|
31783
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "182px" } });
|
|
31784
|
-
default:
|
|
31785
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "210px" } });
|
|
31786
|
-
}
|
|
31788
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "d-flex justify-content-center align-items-center w-100 a", style: { height: numToHeight[ex] }, children });
|
|
31789
|
+
};
|
|
31790
|
+
const numToHeight = {
|
|
31791
|
+
1: "6px",
|
|
31792
|
+
2: "6px",
|
|
31793
|
+
3: "28px",
|
|
31794
|
+
4: "54px",
|
|
31795
|
+
5: "80px",
|
|
31796
|
+
6: "105px",
|
|
31797
|
+
7: "132px",
|
|
31798
|
+
8: "158px",
|
|
31799
|
+
9: "182px",
|
|
31800
|
+
10: "210px"
|
|
31787
31801
|
};
|
|
31788
31802
|
const vertLine = (obj) => {
|
|
31789
31803
|
var _a;
|
|
@@ -32019,7 +32033,7 @@ const TicketPrintBody = (props) => {
|
|
|
32019
32033
|
}
|
|
32020
32034
|
)
|
|
32021
32035
|
] }),
|
|
32022
|
-
|
|
32036
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ExpandedWrapper, { obj, children: (obj == null ? void 0 : obj.winQty) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-100 d-flex justify-align-content-center bg-win", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "win-animate p-0 m-1 text-center ml-1 f-15", children: obj == null ? void 0 : obj.winQty }) }) }),
|
|
32023
32037
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "row p-0 m-0", children: [
|
|
32024
32038
|
obj.multiDigit != null && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32025
32039
|
"div",
|
|
@@ -32079,14 +32093,23 @@ const PrintTicket58 = (props) => {
|
|
|
32079
32093
|
}) }) });
|
|
32080
32094
|
};
|
|
32081
32095
|
|
|
32082
|
-
const RenderTitle = ({ lotteryType, className = "", logo }) =>
|
|
32083
|
-
|
|
32084
|
-
{
|
|
32085
|
-
|
|
32086
|
-
className,
|
|
32087
|
-
children: logo ? lotteryLabelOnline[lotteryType] : lotteryLabel[lotteryType]
|
|
32096
|
+
const RenderTitle = ({ lotteryType, className = "", logo, isVN }) => {
|
|
32097
|
+
let title = lotteryLabel[lotteryType];
|
|
32098
|
+
if (logo) {
|
|
32099
|
+
title = lotteryLabelOnline[lotteryType];
|
|
32088
32100
|
}
|
|
32089
|
-
)
|
|
32101
|
+
if (isVN) {
|
|
32102
|
+
title = lotteryLabelVN[lotteryType];
|
|
32103
|
+
}
|
|
32104
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32105
|
+
"td",
|
|
32106
|
+
{
|
|
32107
|
+
colSpan: "3",
|
|
32108
|
+
className,
|
|
32109
|
+
children: title
|
|
32110
|
+
}
|
|
32111
|
+
);
|
|
32112
|
+
};
|
|
32090
32113
|
|
|
32091
32114
|
const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
32092
32115
|
logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
|
|
@@ -37820,7 +37843,7 @@ const RenderRow = ({ children, label, isShow = true }) => {
|
|
|
37820
37843
|
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { style: { fontWeight: 600 }, className: "px-0 text-black w-60", children })
|
|
37821
37844
|
] });
|
|
37822
37845
|
};
|
|
37823
|
-
const Ticket = ({ object, lotteryType, plusCount = 1, logo }) => {
|
|
37846
|
+
const Ticket = ({ object, lotteryType, plusCount = 1, logo, hideWaterAmount = false, isVN = false }) => {
|
|
37824
37847
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
37825
37848
|
const isShowKhr = ((_a = object == null ? void 0 : object.totalKhr) == null ? void 0 : _a.betAmount) !== ((_b = object == null ? void 0 : object.totalKhr) == null ? void 0 : _b.waterAmount) && ((_c = object == null ? void 0 : object.totalKhr) == null ? void 0 : _c.waterAmount) > 0;
|
|
37826
37849
|
const isShowUsd = ((_d = object == null ? void 0 : object.totalUsd) == null ? void 0 : _d.betAmount) !== ((_e = object == null ? void 0 : object.totalUsd) == null ? void 0 : _e.waterAmount) && ((_f = object == null ? void 0 : object.totalUsd) == null ? void 0 : _f.waterAmount) > 0;
|
|
@@ -37829,6 +37852,7 @@ const Ticket = ({ object, lotteryType, plusCount = 1, logo }) => {
|
|
|
37829
37852
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37830
37853
|
RenderTitle,
|
|
37831
37854
|
{
|
|
37855
|
+
isVN,
|
|
37832
37856
|
className: "text-center ticket-logo pt-2 mt-1 p-0",
|
|
37833
37857
|
lotteryType,
|
|
37834
37858
|
logo
|
|
@@ -37848,8 +37872,8 @@ const Ticket = ({ object, lotteryType, plusCount = 1, logo }) => {
|
|
|
37848
37872
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) }),
|
|
37849
37873
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { label: mapLabels.grand_total, children: moneyFormatter((_g = object == null ? void 0 : object.totalKhr) == null ? void 0 : _g.betAmount, "KHR") }),
|
|
37850
37874
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { children: moneyFormatter((_h = object == null ? void 0 : object.totalUsd) == null ? void 0 : _h.betAmount, "USD") }),
|
|
37851
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { isShow: isShowKhr, label: mapLabels.final_total, children: moneyFormatter((_i = object == null ? void 0 : object.totalKhr) == null ? void 0 : _i.waterAmount, "KHR") }),
|
|
37852
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { isShow: isShowUsd, label: !isShowKhr ? mapLabels.final_total : null, children: moneyFormatter((_j = object == null ? void 0 : object.totalUsd) == null ? void 0 : _j.waterAmount, "USD") }),
|
|
37875
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { isShow: isShowKhr && !hideWaterAmount, label: mapLabels.final_total, children: moneyFormatter((_i = object == null ? void 0 : object.totalKhr) == null ? void 0 : _i.waterAmount, "KHR") }),
|
|
37876
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { isShow: isShowUsd && !hideWaterAmount, label: !isShowKhr ? mapLabels.final_total : null, children: moneyFormatter((_j = object == null ? void 0 : object.totalUsd) == null ? void 0 : _j.waterAmount, "USD") }),
|
|
37853
37877
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { isShow: ((_k = object == null ? void 0 : object.totalKhr) == null ? void 0 : _k.winAmount) > 0, label: mapLabels.s_win, children: moneyFormatter((_l = object == null ? void 0 : object.totalKhr) == null ? void 0 : _l.winAmount, "KHR") }),
|
|
37854
37878
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { isShow: ((_m = object == null ? void 0 : object.totalUsd) == null ? void 0 : _m.winAmount) > 0, label: mapLabels.s_win, children: moneyFormatter((_n = object == null ? void 0 : object.totalUsd) == null ? void 0 : _n.winAmount, "USD") }),
|
|
37855
37879
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { style: {
|
|
@@ -46313,7 +46337,7 @@ const LoTable = memo(({ LO = [], columnsCount = 3, showHeader = false }) => {
|
|
|
46313
46337
|
var _a;
|
|
46314
46338
|
if (showHeader) {
|
|
46315
46339
|
const header = (_a = LO == null ? void 0 : LO[0]) != null ? _a : [];
|
|
46316
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { cellPadding: "5", className: "tb-result", style: tableStyle, children: [
|
|
46340
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { cellPadding: "5", className: "tb-result w-100", style: tableStyle, children: [
|
|
46317
46341
|
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: header.map((col, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46318
46342
|
"th",
|
|
46319
46343
|
{
|
|
@@ -46773,6 +46797,8 @@ const RenderSary = ({ object, type }) => {
|
|
|
46773
46797
|
case lType.MT:
|
|
46774
46798
|
case lType.TN:
|
|
46775
46799
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SaryVN, { object });
|
|
46800
|
+
default:
|
|
46801
|
+
return null;
|
|
46776
46802
|
}
|
|
46777
46803
|
};
|
|
46778
46804
|
const SaryLottery = ({ object, type }) => {
|
|
@@ -46817,8 +46843,10 @@ const SaryPrintAll = ({ children, list, type }) => {
|
|
|
46817
46843
|
case lType.MC:
|
|
46818
46844
|
case lType.TN:
|
|
46819
46845
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SaryVNPrintAll, { list, children });
|
|
46846
|
+
default:
|
|
46847
|
+
return null;
|
|
46820
46848
|
}
|
|
46821
46849
|
};
|
|
46822
46850
|
|
|
46823
|
-
export { KPLO, KPPostCode, Printer$1 as Printer, SCPostCode, SaryLottery, SaryPrintAll, THLabel, Ticket, TicketModal, lType, lotteryLabel, lotteryLabelOnline, mapBetTitle, mapLabels, mapStrPost };
|
|
46851
|
+
export { KPLO, KPPostCode, Printer$1 as Printer, SCPostCode, SaryLottery, SaryPrintAll, THLabel, Ticket, TicketModal, lType, lotteryLabel, lotteryLabelOnline, lotteryLabelVN, mapBetTitle, mapLabels, mapStrPost };
|
|
46824
46852
|
//# sourceMappingURL=index.esm.js.map
|