@jingx/lottery-components-react-jsx 1.0.23 → 1.0.24

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
@@ -31931,6 +31931,13 @@ const THLabel = {
31931
31931
  };
31932
31932
  const isVNType = (lotteryType) => [lType.MC, lType.TN, lType.KH].includes(lotteryType);
31933
31933
  const s3hostPrint = "https://vnonemedia.s3.ap-southeast-1.amazonaws.com/print-logo/";
31934
+ const proxifyS3AssetOnLocalhost = (url) => {
31935
+ if (typeof window === "undefined") return url;
31936
+ const hostname = window.location.hostname;
31937
+ const isLocalhost = hostname === "localhost" || hostname === "127.0.0.1";
31938
+ if (!isLocalhost) return url;
31939
+ return `/__spx_asset_proxy?url=${encodeURIComponent(url)}`;
31940
+ };
31934
31941
  const getDomain = (platform) => {
31935
31942
  if (platform) return platform;
31936
31943
  let url = window.location.hostname;
@@ -31939,7 +31946,7 @@ const getDomain = (platform) => {
31939
31946
  let dm = items.reverse()[1];
31940
31947
  return dm;
31941
31948
  };
31942
- const getS3ImgPrint = (platform) => s3hostPrint.concat(getDomain(platform)).concat(".png");
31949
+ const getS3ImgPrint = (platform) => proxifyS3AssetOnLocalhost(s3hostPrint.concat(getDomain(platform)).concat(".png"));
31943
31950
 
31944
31951
  const TicketPrintBody = (props) => {
31945
31952
  const { item, bodyClass, is58, showItemCheckbox = false, selectedIds = [], onToggleItem } = props;
@@ -38098,10 +38105,10 @@ const RenderTitle = ({ lotteryType, className = "", logo, isVN, drawAt }) => {
38098
38105
  );
38099
38106
  };
38100
38107
 
38101
- const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
38108
+ const RenderHead$1 = ({ logo, platform }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
38102
38109
  logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
38103
38110
  width: "50px"
38104
- }, src: getS3ImgPrint(), alt: "__log__" }),
38111
+ }, src: getS3ImgPrint(platform), alt: "__log__" }),
38105
38112
  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"
38106
38113
  ] });
38107
38114
 
@@ -38132,7 +38139,7 @@ const Ticket = ({ object, lotteryType, plusCount = 1, hideWaterAmount = false, E
38132
38139
  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;
38133
38140
  const isNight = object == null ? void 0 : object.isNight;
38134
38141
  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: [
38135
- /* @__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 }) }) }) }),
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: isSend ? "\u179B\u17C1\u1781\u179F\u17B6\u1784" : /* @__PURE__ */ jsxRuntimeExports.jsx(RenderHead$1, { platform: Env.REACT_APP_PLATFORM_TYPE, logo }) }) }) }),
38136
38143
  /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
38137
38144
  RenderTitle,
38138
38145
  {