sales-frontend-components 0.0.104 → 0.0.105
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 +17 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +18 -18
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -414,6 +414,7 @@ declare function useJobVehicleSearchModal(): {
|
|
|
414
414
|
selectedVehicle: sales_frontend_api_method.VehicleTypeResponseDto | undefined;
|
|
415
415
|
riskGrade: string;
|
|
416
416
|
hospitalizationGrade: string;
|
|
417
|
+
isOpenJobVehicleModal: boolean;
|
|
417
418
|
openJobVehicleModal: () => void;
|
|
418
419
|
closeJobVehicleModal: () => void;
|
|
419
420
|
JobVehicleSearchModalComponent: react_jsx_runtime.JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -8,7 +8,7 @@ import styles from './modal/standard/address-search/select-address.module.scss';
|
|
|
8
8
|
import styles$1 from './modal/standard/bank-stock-search/bank-stock-search-modal.module.scss';
|
|
9
9
|
import styles$2 from './modal/standard/customer-search/customer-search.module.scss';
|
|
10
10
|
import styles$3 from './modal/standard/nationality-search/select-nationality.module.scss';
|
|
11
|
-
import { isClient, MessageEventManager, isFpPlannerApp, getCookie, getDeviceModel, getOSVersion, getOSName, getBrowserVersion, getOrCreateDeviceId, isSalesPortal, getFormFactorFromUserAgent, isWebView } from 'sales-frontend-utils';
|
|
11
|
+
import { isClient, MessageEventManager, isFpPlannerApp, getCookie, getDeviceModel, getOSVersion, getOSName, getBrowserName, getBrowserVersion, getOrCreateDeviceId, isSalesPortal, getFormFactorFromUserAgent, isWebView } from 'sales-frontend-utils';
|
|
12
12
|
import styles$4 from './modal/standard/visa-search/select-visa.module.scss';
|
|
13
13
|
import { useQuery } from '@tanstack/react-query';
|
|
14
14
|
import styles$5 from './modal/pre-standard/dea-customer-search-modal/dea-customer-search-modal.module.scss';
|
|
@@ -2802,6 +2802,7 @@ function useJobVehicleSearchModal() {
|
|
|
2802
2802
|
selectedVehicle,
|
|
2803
2803
|
riskGrade,
|
|
2804
2804
|
hospitalizationGrade,
|
|
2805
|
+
isOpenJobVehicleModal: isOpen,
|
|
2805
2806
|
openJobVehicleModal: openInitModal,
|
|
2806
2807
|
closeJobVehicleModal: closeModal,
|
|
2807
2808
|
JobVehicleSearchModalComponent: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
|
|
@@ -4006,7 +4007,7 @@ const createPureWebClientSession = async () => {
|
|
|
4006
4007
|
acceptLanguage: navigator.language || "ko",
|
|
4007
4008
|
formFactor: getFormFactor(),
|
|
4008
4009
|
deviceId: getOrCreateDeviceId(),
|
|
4009
|
-
appVersion: getBrowserVersion(navigator.userAgent)
|
|
4010
|
+
appVersion: `${getBrowserName(navigator.userAgent)} ${getBrowserVersion(navigator.userAgent)}`,
|
|
4010
4011
|
loginType: "web-login",
|
|
4011
4012
|
platformName: getOSName(navigator.userAgent),
|
|
4012
4013
|
platformVersion: getOSVersion(navigator.userAgent),
|
|
@@ -4015,27 +4016,26 @@ const createPureWebClientSession = async () => {
|
|
|
4015
4016
|
};
|
|
4016
4017
|
};
|
|
4017
4018
|
const createWebviewClientSession = async () => {
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
const
|
|
4025
|
-
const
|
|
4026
|
-
const loginChannel = appInfo?.["X-Channel-LoginChannel"] ?? getCookie("loginChannel") ?? "DSP";
|
|
4019
|
+
const [appInfo, accessToken] = await Promise.allSettled([
|
|
4020
|
+
Bridge.native.getAppInfo(),
|
|
4021
|
+
isFpPlannerApp() ? Promise.resolve(getCookie("accessToken")) : Bridge.native.getAccessToken().then((res) => res.accessToken)
|
|
4022
|
+
]);
|
|
4023
|
+
const appInfoData = appInfo.status === "fulfilled" ? appInfo.value : null;
|
|
4024
|
+
const isLoggedIn = accessToken.status === "fulfilled" ? !!accessToken.value : false;
|
|
4025
|
+
const formFactor = appInfoData?.["X-Channel-FormFactor"]?.toLowerCase() ?? getCookie("formFactor")?.toLowerCase() ?? getFormFactor();
|
|
4026
|
+
const loginChannel = appInfoData?.["X-Channel-LoginChannel"] ?? getCookie("loginChannel") ?? "DSP";
|
|
4027
4027
|
return {
|
|
4028
4028
|
isInitialized: true,
|
|
4029
4029
|
isLoggedIn,
|
|
4030
4030
|
isWebView: true,
|
|
4031
|
-
acceptLanguage:
|
|
4031
|
+
acceptLanguage: appInfoData?.["Accept-Language"] ?? "ko",
|
|
4032
4032
|
formFactor,
|
|
4033
|
-
deviceId:
|
|
4034
|
-
appVersion:
|
|
4035
|
-
loginType:
|
|
4036
|
-
platformName:
|
|
4037
|
-
platformVersion:
|
|
4038
|
-
deviceModel:
|
|
4033
|
+
deviceId: appInfoData?.["X-Channel-DeviceId"] ?? getCookie("deviceId"),
|
|
4034
|
+
appVersion: appInfoData?.["X-Channel-AppVersion"] ?? getCookie("appVersion"),
|
|
4035
|
+
loginType: appInfoData?.["X-Channel-LoginType"] ?? getCookie("loginType"),
|
|
4036
|
+
platformName: appInfoData?.["X-Channel-PlatformName"] ?? getCookie("platformName"),
|
|
4037
|
+
platformVersion: appInfoData?.["X-Channel-PlatformVersion"] ?? getCookie("platformVersion"),
|
|
4038
|
+
deviceModel: appInfoData?.["X-Channel-DeviceModel"] ?? getCookie("deviceModel"),
|
|
4039
4039
|
loginChannel
|
|
4040
4040
|
};
|
|
4041
4041
|
};
|