@jingx/lottery-components-react-jsx 1.0.19 → 1.0.21

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
@@ -31950,6 +31950,16 @@ const THLabel = {
31950
31950
  B: "2D"
31951
31951
  };
31952
31952
  const isVNType = (lotteryType) => [lType.MC, lType.TN, lType.KH].includes(lotteryType);
31953
+ const s3hostPrint = "https://vnonemedia.s3.ap-southeast-1.amazonaws.com/print-logo/";
31954
+ const getDomain = (platform) => {
31955
+ if (platform) return platform;
31956
+ let url = window.location.hostname;
31957
+ if (url.includes("localhost")) return "p99l";
31958
+ let items = url.split(".");
31959
+ let dm = items.reverse()[1];
31960
+ return dm;
31961
+ };
31962
+ const getS3ImgPrint = (platform) => s3hostPrint.concat(getDomain(platform)).concat(".png");
31953
31963
 
31954
31964
  const TicketPrintBody = (props) => {
31955
31965
  const { item, bodyClass, is58, showItemCheckbox = false, selectedIds = [], onToggleItem } = props;
@@ -38110,7 +38120,7 @@ const RenderTitle = ({ lotteryType, className = "", logo, isVN, drawAt }) => {
38110
38120
  const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
38111
38121
  logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
38112
38122
  width: "50px"
38113
- }, src: logo, alt: "__log__" }),
38123
+ }, src: getS3ImgPrint(), alt: "__log__" }),
38114
38124
  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"
38115
38125
  ] });
38116
38126
 
@@ -38133,13 +38143,13 @@ const RenderRow = ({ children, label, isShow = true }) => {
38133
38143
  /* @__PURE__ */ jsxRuntimeExports.jsx("td", { style: { fontWeight: 600 }, className: "px-0 text-black w-60", children })
38134
38144
  ] });
38135
38145
  };
38136
- const Ticket = ({ object, lotteryType, plusCount = 1, logo, hideWaterAmount = false, isVN = false }) => {
38146
+ const Ticket = ({ object, lotteryType, plusCount = 1, logo, hideWaterAmount = false, isVN = false, isSend = false }) => {
38137
38147
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
38138
38148
  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;
38139
38149
  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;
38140
38150
  const isNight = object == null ? void 0 : object.isNight;
38141
38151
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ScopeHost, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("table", { id: "print-t-58", className: "print-tb-58-1", cellPadding: "7px", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
38142
- /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, style: { borderBottom: "2px solid black" }, className: "w-100 text-center pt-0 pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "m-0 f-30 text-black font-weight-bold ff-p-head", children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderHead$1, { logo }) }) }) }),
38152
+ /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, style: { borderBottom: "2px solid black" }, className: "w-100 text-center pt-0 pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "m-0 f-30 text-black font-weight-bold ff-p-head", children: isSend ? "\u179B\u17C1\u1781\u179F\u17B6\u1784" : /* @__PURE__ */ jsxRuntimeExports.jsx(RenderHead$1, { logo }) }) }) }),
38143
38153
  /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
38144
38154
  RenderTitle,
38145
38155
  {
@@ -47195,6 +47205,7 @@ exports.THLabel = THLabel;
47195
47205
  exports.Ticket = Ticket;
47196
47206
  exports.TicketModal = TicketModal;
47197
47207
  exports.TransferTicket = TransferTicket;
47208
+ exports.getS3ImgPrint = getS3ImgPrint;
47198
47209
  exports.isVNType = isVNType;
47199
47210
  exports.lType = lType;
47200
47211
  exports.lotteryLabel = lotteryLabel;