@jingx/lottery-components-react-jsx 1.0.7 → 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 +59 -34
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +59 -35
- package/dist/index.esm.js.map +1 -1
- package/package.json +47 -47
package/dist/index.cjs.js
CHANGED
|
@@ -31571,6 +31571,25 @@ function transformPostCode(posts, postCodeMap) {
|
|
|
31571
31571
|
return resultArray.join(".");
|
|
31572
31572
|
}
|
|
31573
31573
|
|
|
31574
|
+
var __defProp$4 = Object.defineProperty;
|
|
31575
|
+
var __defProps$2 = Object.defineProperties;
|
|
31576
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
31577
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
31578
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
31579
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
31580
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
31581
|
+
var __spreadValues$4 = (a, b) => {
|
|
31582
|
+
for (var prop in b || (b = {}))
|
|
31583
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
31584
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
31585
|
+
if (__getOwnPropSymbols$5)
|
|
31586
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
31587
|
+
if (__propIsEnum$5.call(b, prop))
|
|
31588
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
31589
|
+
}
|
|
31590
|
+
return a;
|
|
31591
|
+
};
|
|
31592
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
31574
31593
|
const KPPostCode = {
|
|
31575
31594
|
A: "\u179B\u17E1",
|
|
31576
31595
|
F: "\u179B\u17E2",
|
|
@@ -31614,6 +31633,10 @@ const lotteryLabelOnline = {
|
|
|
31614
31633
|
TH: "\u1790\u17C3TH",
|
|
31615
31634
|
KP: "\u1780\u17C6\u1796\u178F KP"
|
|
31616
31635
|
};
|
|
31636
|
+
const lotteryLabelVN = __spreadProps$2(__spreadValues$4({}, lotteryLabelOnline), {
|
|
31637
|
+
VN1: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
|
|
31638
|
+
TN: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793"
|
|
31639
|
+
});
|
|
31617
31640
|
const lotteryLabel = {
|
|
31618
31641
|
LEAP: "\u179B\u17B6\u1797\u1798\u17A0\u17B6\u179F\u1798\u17D2\u1794\u178F\u17D2\u178F\u17B7",
|
|
31619
31642
|
VN2: "\u1798\u17A0\u17B6\u1791\u17C1\u1796",
|
|
@@ -31779,31 +31802,22 @@ const TicketPrintBody = (props) => {
|
|
|
31779
31802
|
return is58 ? "h-58-10" : "h-t-10";
|
|
31780
31803
|
}
|
|
31781
31804
|
};
|
|
31782
|
-
const
|
|
31805
|
+
const ExpandedWrapper = ({ children, obj }) => {
|
|
31783
31806
|
let arr = [obj.numberFrom.length, obj.numberTo.length, obj.numberThree.length, obj.numberFour.length];
|
|
31784
31807
|
let ex = Math.max(...arr);
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
|
|
31788
|
-
|
|
31789
|
-
|
|
31790
|
-
|
|
31791
|
-
|
|
31792
|
-
|
|
31793
|
-
|
|
31794
|
-
|
|
31795
|
-
|
|
31796
|
-
|
|
31797
|
-
|
|
31798
|
-
case 7:
|
|
31799
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "132px" } });
|
|
31800
|
-
case 8:
|
|
31801
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "158px" } });
|
|
31802
|
-
case 9:
|
|
31803
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "182px" } });
|
|
31804
|
-
default:
|
|
31805
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "210px" } });
|
|
31806
|
-
}
|
|
31808
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "d-flex justify-content-center align-items-center w-100 a", style: { height: numToHeight[ex] }, children });
|
|
31809
|
+
};
|
|
31810
|
+
const numToHeight = {
|
|
31811
|
+
1: "6px",
|
|
31812
|
+
2: "6px",
|
|
31813
|
+
3: "28px",
|
|
31814
|
+
4: "54px",
|
|
31815
|
+
5: "80px",
|
|
31816
|
+
6: "105px",
|
|
31817
|
+
7: "132px",
|
|
31818
|
+
8: "158px",
|
|
31819
|
+
9: "182px",
|
|
31820
|
+
10: "210px"
|
|
31807
31821
|
};
|
|
31808
31822
|
const vertLine = (obj) => {
|
|
31809
31823
|
var _a;
|
|
@@ -32039,7 +32053,7 @@ const TicketPrintBody = (props) => {
|
|
|
32039
32053
|
}
|
|
32040
32054
|
)
|
|
32041
32055
|
] }),
|
|
32042
|
-
|
|
32056
|
+
/* @__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 }) }) }),
|
|
32043
32057
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "row p-0 m-0", children: [
|
|
32044
32058
|
obj.multiDigit != null && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32045
32059
|
"div",
|
|
@@ -32099,14 +32113,23 @@ const PrintTicket58 = (props) => {
|
|
|
32099
32113
|
}) }) });
|
|
32100
32114
|
};
|
|
32101
32115
|
|
|
32102
|
-
const RenderTitle = ({ lotteryType, className = "", logo }) =>
|
|
32103
|
-
|
|
32104
|
-
{
|
|
32105
|
-
|
|
32106
|
-
className,
|
|
32107
|
-
children: logo ? lotteryLabelOnline[lotteryType] : lotteryLabel[lotteryType]
|
|
32116
|
+
const RenderTitle = ({ lotteryType, className = "", logo, isVN }) => {
|
|
32117
|
+
let title = lotteryLabel[lotteryType];
|
|
32118
|
+
if (logo) {
|
|
32119
|
+
title = lotteryLabelOnline[lotteryType];
|
|
32108
32120
|
}
|
|
32109
|
-
)
|
|
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
|
+
};
|
|
32110
32133
|
|
|
32111
32134
|
const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
32112
32135
|
logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
|
|
@@ -37840,7 +37863,7 @@ const RenderRow = ({ children, label, isShow = true }) => {
|
|
|
37840
37863
|
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { style: { fontWeight: 600 }, className: "px-0 text-black w-60", children })
|
|
37841
37864
|
] });
|
|
37842
37865
|
};
|
|
37843
|
-
const Ticket = ({ object, lotteryType, plusCount = 1, logo }) => {
|
|
37866
|
+
const Ticket = ({ object, lotteryType, plusCount = 1, logo, hideWaterAmount = false, isVN = false }) => {
|
|
37844
37867
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
37845
37868
|
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;
|
|
37846
37869
|
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;
|
|
@@ -37849,6 +37872,7 @@ const Ticket = ({ object, lotteryType, plusCount = 1, logo }) => {
|
|
|
37849
37872
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37850
37873
|
RenderTitle,
|
|
37851
37874
|
{
|
|
37875
|
+
isVN,
|
|
37852
37876
|
className: "text-center ticket-logo pt-2 mt-1 p-0",
|
|
37853
37877
|
lotteryType,
|
|
37854
37878
|
logo
|
|
@@ -37868,8 +37892,8 @@ const Ticket = ({ object, lotteryType, plusCount = 1, logo }) => {
|
|
|
37868
37892
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) }),
|
|
37869
37893
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { label: mapLabels.grand_total, children: moneyFormatter((_g = object == null ? void 0 : object.totalKhr) == null ? void 0 : _g.betAmount, "KHR") }),
|
|
37870
37894
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RenderRow, { children: moneyFormatter((_h = object == null ? void 0 : object.totalUsd) == null ? void 0 : _h.betAmount, "USD") }),
|
|
37871
|
-
/* @__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") }),
|
|
37872
|
-
/* @__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") }),
|
|
37895
|
+
/* @__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") }),
|
|
37896
|
+
/* @__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") }),
|
|
37873
37897
|
/* @__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") }),
|
|
37874
37898
|
/* @__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") }),
|
|
37875
37899
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { style: {
|
|
@@ -46856,6 +46880,7 @@ exports.TicketModal = TicketModal;
|
|
|
46856
46880
|
exports.lType = lType;
|
|
46857
46881
|
exports.lotteryLabel = lotteryLabel;
|
|
46858
46882
|
exports.lotteryLabelOnline = lotteryLabelOnline;
|
|
46883
|
+
exports.lotteryLabelVN = lotteryLabelVN;
|
|
46859
46884
|
exports.mapBetTitle = mapBetTitle;
|
|
46860
46885
|
exports.mapLabels = mapLabels;
|
|
46861
46886
|
exports.mapStrPost = mapStrPost;
|