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