@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.cjs.js CHANGED
@@ -31951,6 +31951,13 @@ const THLabel = {
31951
31951
  };
31952
31952
  const isVNType = (lotteryType) => [lType.MC, lType.TN, lType.KH].includes(lotteryType);
31953
31953
  const s3hostPrint = "https://vnonemedia.s3.ap-southeast-1.amazonaws.com/print-logo/";
31954
+ const proxifyS3AssetOnLocalhost = (url) => {
31955
+ if (typeof window === "undefined") return url;
31956
+ const hostname = window.location.hostname;
31957
+ const isLocalhost = hostname === "localhost" || hostname === "127.0.0.1";
31958
+ if (!isLocalhost) return url;
31959
+ return `/__spx_asset_proxy?url=${encodeURIComponent(url)}`;
31960
+ };
31954
31961
  const getDomain = (platform) => {
31955
31962
  if (platform) return platform;
31956
31963
  let url = window.location.hostname;
@@ -31959,7 +31966,7 @@ const getDomain = (platform) => {
31959
31966
  let dm = items.reverse()[1];
31960
31967
  return dm;
31961
31968
  };
31962
- const getS3ImgPrint = (platform) => s3hostPrint.concat(getDomain(platform)).concat(".png");
31969
+ const getS3ImgPrint = (platform) => proxifyS3AssetOnLocalhost(s3hostPrint.concat(getDomain(platform)).concat(".png"));
31963
31970
 
31964
31971
  const TicketPrintBody = (props) => {
31965
31972
  const { item, bodyClass, is58, showItemCheckbox = false, selectedIds = [], onToggleItem } = props;
@@ -38118,10 +38125,10 @@ const RenderTitle = ({ lotteryType, className = "", logo, isVN, drawAt }) => {
38118
38125
  );
38119
38126
  };
38120
38127
 
38121
- const RenderHead$1 = ({ logo }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
38128
+ const RenderHead$1 = ({ logo, platform }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
38122
38129
  logo && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "mr-2", style: {
38123
38130
  width: "50px"
38124
- }, src: getS3ImgPrint(), alt: "__log__" }),
38131
+ }, src: getS3ImgPrint(platform), alt: "__log__" }),
38125
38132
  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"
38126
38133
  ] });
38127
38134
 
@@ -38152,7 +38159,7 @@ const Ticket = ({ object, lotteryType, plusCount = 1, hideWaterAmount = false, E
38152
38159
  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;
38153
38160
  const isNight = object == null ? void 0 : object.isNight;
38154
38161
  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: [
38155
- /* @__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 }) }) }) }),
38162
+ /* @__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 }) }) }) }),
38156
38163
  /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
38157
38164
  RenderTitle,
38158
38165
  {