sales-frontend-components 0.0.96 → 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 +13 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +13 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -9
package/dist/index.esm.js
CHANGED
|
@@ -2570,7 +2570,7 @@ const useNationalityComponent = () => {
|
|
|
2570
2570
|
|
|
2571
2571
|
const url = (() => {
|
|
2572
2572
|
const type = isClient() ? window.location.hostname : "";
|
|
2573
|
-
if (type.includes("localhost")) {
|
|
2573
|
+
if (type.includes("localhost") || type.includes("local.hanwhalife.com")) {
|
|
2574
2574
|
return "https://nxl-nlc-stg.hanwhalife.com";
|
|
2575
2575
|
}
|
|
2576
2576
|
if (type.includes("dev")) {
|
|
@@ -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:
|
|
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: [
|