sales-frontend-components 0.0.103 → 0.0.104

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
@@ -4015,21 +4015,28 @@ const createPureWebClientSession = async () => {
4015
4015
  };
4016
4016
  };
4017
4017
  const createWebviewClientSession = async () => {
4018
+ let appInfo = null;
4019
+ try {
4020
+ appInfo = await Bridge.native.getAppInfo();
4021
+ } catch (error) {
4022
+ console.warn("[createWebviewClientSession] getAppInfo \uC2E4\uD328, \uCFE0\uD0A4 \uAC12\uC73C\uB85C fallback:", error);
4023
+ }
4018
4024
  const isLoggedIn = isFpPlannerApp() ? !!getCookie("accessToken") : !!(await Bridge.native.getAccessToken()).accessToken;
4025
+ const formFactor = appInfo?.["X-Channel-FormFactor"]?.toLowerCase() ?? getCookie("formFactor")?.toLowerCase() ?? getFormFactor();
4026
+ const loginChannel = appInfo?.["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: getCookie("formFactor")?.toLowerCase() || getFormFactor(),
4025
- deviceId: getCookie("deviceId"),
4026
- //! App
4027
- appVersion: getCookie("appVersion"),
4028
- loginType: getCookie("loginType"),
4029
- platformName: getCookie("platformName"),
4030
- platformVersion: getCookie("platformVersion"),
4031
- deviceModel: getCookie("deviceModel"),
4032
- loginChannel: getCookie("loginChannel") ?? "MSP"
4031
+ acceptLanguage: appInfo?.["Accept-Language"] ?? "ko",
4032
+ formFactor,
4033
+ deviceId: appInfo?.["X-Channel-DeviceId"] ?? getCookie("deviceId"),
4034
+ appVersion: appInfo?.["X-Channel-AppVersion"] ?? getCookie("appVersion"),
4035
+ loginType: appInfo?.["X-Channel-LoginType"] ?? getCookie("loginType"),
4036
+ platformName: appInfo?.["X-Channel-PlatformName"] ?? getCookie("platformName"),
4037
+ platformVersion: appInfo?.["X-Channel-PlatformVersion"] ?? getCookie("platformVersion"),
4038
+ deviceModel: appInfo?.["X-Channel-DeviceModel"] ?? getCookie("deviceModel"),
4039
+ loginChannel
4033
4040
  };
4034
4041
  };
4035
4042
  const getLoginUserInfo = async () => {