sales-frontend-utils 0.0.23 → 0.0.25
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 +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -182,6 +182,12 @@ declare const isClient: () => boolean;
|
|
|
182
182
|
* ```
|
|
183
183
|
*/
|
|
184
184
|
declare const isStorybookEnv: () => boolean;
|
|
185
|
+
/**
|
|
186
|
+
* 현재 업무구분 코드 구하기
|
|
187
|
+
* 원칙: pathname의 첫 번째가 업무구분코드를 사용할 경우 해당 값을 반환
|
|
188
|
+
* @returns
|
|
189
|
+
*/
|
|
190
|
+
declare const getBusinessWorkDivisionCode: () => string;
|
|
185
191
|
|
|
186
192
|
/**
|
|
187
193
|
* Message 이벤트 헨들러를 관리하는 클래스입니다. (싱글턴)
|
|
@@ -291,4 +297,4 @@ declare const initASTX2: ({ initSuccess, initFailure, checkServerSuccess, checkS
|
|
|
291
297
|
*/
|
|
292
298
|
declare function getE2EDataIDs(ids: string[], onSuccess: (astx_data: any) => void, onFailure?: () => void): void;
|
|
293
299
|
|
|
294
|
-
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspExecutionEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getSubdomain, hasAstx2, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isSalesPortal, isStorybookEnv, isTablet, isWebView, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
300
|
+
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspExecutionEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getSubdomain, hasAstx2, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isSalesPortal, isStorybookEnv, isTablet, isWebView, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,12 @@ declare const isClient: () => boolean;
|
|
|
182
182
|
* ```
|
|
183
183
|
*/
|
|
184
184
|
declare const isStorybookEnv: () => boolean;
|
|
185
|
+
/**
|
|
186
|
+
* 현재 업무구분 코드 구하기
|
|
187
|
+
* 원칙: pathname의 첫 번째가 업무구분코드를 사용할 경우 해당 값을 반환
|
|
188
|
+
* @returns
|
|
189
|
+
*/
|
|
190
|
+
declare const getBusinessWorkDivisionCode: () => string;
|
|
185
191
|
|
|
186
192
|
/**
|
|
187
193
|
* Message 이벤트 헨들러를 관리하는 클래스입니다. (싱글턴)
|
|
@@ -291,4 +297,4 @@ declare const initASTX2: ({ initSuccess, initFailure, checkServerSuccess, checkS
|
|
|
291
297
|
*/
|
|
292
298
|
declare function getE2EDataIDs(ids: string[], onSuccess: (astx_data: any) => void, onFailure?: () => void): void;
|
|
293
299
|
|
|
294
|
-
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspExecutionEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getSubdomain, hasAstx2, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isSalesPortal, isStorybookEnv, isTablet, isWebView, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
300
|
+
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspExecutionEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getSubdomain, hasAstx2, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isSalesPortal, isStorybookEnv, isTablet, isWebView, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ var getSubdomain = (hostname) => {
|
|
|
49
49
|
};
|
|
50
50
|
var getEnvironmentFromHostname = (hostname) => {
|
|
51
51
|
const subDomain = getSubdomain(hostname);
|
|
52
|
-
if (hostname === "localhost" || hostname === "127.0.0.1" || hostname.startsWith("localhost
|
|
52
|
+
if (hostname === "localhost" || hostname === "127.0.0.1" || hostname.startsWith("localhost")) {
|
|
53
53
|
return "local";
|
|
54
54
|
}
|
|
55
55
|
if (subDomain.includes(`dev`)) {
|
|
@@ -103,6 +103,9 @@ var isStorybookEnv = () => {
|
|
|
103
103
|
return false;
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
+
var getBusinessWorkDivisionCode = () => {
|
|
107
|
+
return location.pathname.split("/")[1] ?? "";
|
|
108
|
+
};
|
|
106
109
|
|
|
107
110
|
// src/utils/user-agent-utils.ts
|
|
108
111
|
var getDspExecutionEnvironment = () => {
|
|
@@ -722,6 +725,6 @@ function getE2EDataIDs(ids, onSuccess, onFailure = () => {
|
|
|
722
725
|
}
|
|
723
726
|
}
|
|
724
727
|
|
|
725
|
-
export { MessageEventManager, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspExecutionEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getSubdomain, hasAstx2, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isSalesPortal, isStorybookEnv, isTablet, isWebView, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
728
|
+
export { MessageEventManager, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspExecutionEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getSubdomain, hasAstx2, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isSalesPortal, isStorybookEnv, isTablet, isWebView, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
726
729
|
//# sourceMappingURL=index.js.map
|
|
727
730
|
//# sourceMappingURL=index.js.map
|