sales-frontend-components 0.0.97 → 0.0.98

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
@@ -2616,6 +2616,7 @@ function useNxlOne({ bizCode, tmplCode, ncsrInfoUuid, nlcCtfnId, t }) {
2616
2616
  return;
2617
2617
  }
2618
2618
  const handleMessage = (event) => {
2619
+ console.log("popup message event", event.origin, new URL(targetUrl).origin);
2619
2620
  if (event.origin !== new URL(targetUrl).origin) {
2620
2621
  return;
2621
2622
  }
@@ -2812,12 +2813,21 @@ function useNxlOneModal({
2812
2813
  }) {
2813
2814
  const { isOpen, openModal, closeModal } = useModalState();
2814
2815
  const { bizCode, tmplCode } = CODES[step][env];
2815
- const { Iframe } = useNxlOne({
2816
+ const { Iframe, open } = useNxlOne({
2816
2817
  bizCode,
2817
2818
  tmplCode
2818
2819
  });
2819
2820
  return {
2820
- openNxlOneModal: openModal,
2821
+ openNxlOneModal: () => {
2822
+ const type = isClient() ? window.location.hostname : "";
2823
+ if (type.includes("localhost") || type.includes("local.hanwhalife.com")) {
2824
+ open({ popupWidth: 500, popupHeight: 500 }).then((result) => {
2825
+ onSuccess(result);
2826
+ });
2827
+ } else {
2828
+ openModal();
2829
+ }
2830
+ },
2821
2831
  closeNxlOneModal: closeModal,
2822
2832
  isNxlOneModalOpen: isOpen,
2823
2833
  NxlModalComponent: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose: closeModal, modalSize, children: [