sales-frontend-components 0.0.103 → 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 +19 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +20 -13
- 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,21 +4016,27 @@ const createPureWebClientSession = async () => {
|
|
|
4015
4016
|
};
|
|
4016
4017
|
};
|
|
4017
4018
|
const createWebviewClientSession = async () => {
|
|
4018
|
-
const
|
|
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";
|
|
4019
4027
|
return {
|
|
4020
4028
|
isInitialized: true,
|
|
4021
4029
|
isLoggedIn,
|
|
4022
4030
|
isWebView: true,
|
|
4023
|
-
acceptLanguage: "ko",
|
|
4024
|
-
formFactor
|
|
4025
|
-
deviceId: getCookie("deviceId"),
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
loginChannel: getCookie("loginChannel") ?? "MSP"
|
|
4031
|
+
acceptLanguage: appInfoData?.["Accept-Language"] ?? "ko",
|
|
4032
|
+
formFactor,
|
|
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
|
+
loginChannel
|
|
4033
4040
|
};
|
|
4034
4041
|
};
|
|
4035
4042
|
const getLoginUserInfo = async () => {
|