@jingx/lottery-components-react-jsx 1.0.20 → 1.0.22

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.esm.js CHANGED
@@ -31930,6 +31930,16 @@ const THLabel = {
31930
31930
  B: "2D"
31931
31931
  };
31932
31932
  const isVNType = (lotteryType) => [lType.MC, lType.TN, lType.KH].includes(lotteryType);
31933
+ const s3hostPrint = "https://vnonemedia.s3.ap-southeast-1.amazonaws.com/print-logo/";
31934
+ const getDomain = (platform) => {
31935
+ if (platform) return platform;
31936
+ let url = window.location.hostname;
31937
+ if (url.includes("localhost")) return "p99l";
31938
+ let items = url.split(".");
31939
+ let dm = items.reverse()[1];
31940
+ return dm;
31941
+ };
31942
+ const getS3ImgPrint = (platform) => s3hostPrint.concat(getDomain(platform)).concat(".png");
31933
31943
 
31934
31944
  const TicketPrintBody = (props) => {
31935
31945
  const { item, bodyClass, is58, showItemCheckbox = false, selectedIds = [], onToggleItem } = props;
@@ -38090,7 +38100,7 @@ const RenderTitle = ({ lotteryType, className = "", logo, isVN, drawAt }) => {
38090
38100
  const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
38091
38101
  logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
38092
38102
  width: "50px"
38093
- }, src: logo, alt: "__log__" }),
38103
+ }, src: getS3ImgPrint(), alt: "__log__" }),
38094
38104
  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"
38095
38105
  ] });
38096
38106
 
@@ -38113,8 +38123,10 @@ const RenderRow = ({ children, label, isShow = true }) => {
38113
38123
  /* @__PURE__ */ jsxRuntimeExports.jsx("td", { style: { fontWeight: 600 }, className: "px-0 text-black w-60", children })
38114
38124
  ] });
38115
38125
  };
38116
- const Ticket = ({ object, lotteryType, plusCount = 1, logo, hideWaterAmount = false, isVN = false, isSend = false }) => {
38126
+ const Ticket = ({ object, lotteryType, plusCount = 1, hideWaterAmount = false, Env = {}, isSend = false }) => {
38117
38127
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
38128
+ const logo = Env.REACT_APP_PRINT_LOGO && Env.REACT_APP_PRINT_LOGO !== "";
38129
+ const isVN = Env.REACT_APP_IS_VN && Env.REACT_APP_IS_VN !== "";
38118
38130
  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;
38119
38131
  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;
38120
38132
  const isNight = object == null ? void 0 : object.isNight;
@@ -47165,5 +47177,5 @@ const SaryPrintAll = ({ children, list, type }) => {
47165
47177
  }
47166
47178
  };
47167
47179
 
47168
- export { KPLO, KPPostCode, Printer, SCPostCode, SaryLottery, SaryPrintAll, THLabel, Ticket, TicketModal, TransferTicket, isVNType, lType, lotteryLabel, lotteryLabelOnline, lotteryLabelVN, mapBetTitle, mapLabels, mapStrPost };
47180
+ export { KPLO, KPPostCode, Printer, SCPostCode, SaryLottery, SaryPrintAll, THLabel, Ticket, TicketModal, TransferTicket, getS3ImgPrint, isVNType, lType, lotteryLabel, lotteryLabelOnline, lotteryLabelVN, mapBetTitle, mapLabels, mapStrPost };
47169
47181
  //# sourceMappingURL=index.esm.js.map