sales-frontend-utils 0.0.36 → 0.0.38
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 +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.d.cts
CHANGED
|
@@ -216,6 +216,14 @@ declare const getDudApiBasePathFromEnvironment: (hostname?: string) => string;
|
|
|
216
216
|
* @returns
|
|
217
217
|
*/
|
|
218
218
|
declare const getDspApiBasePathFromEnvironment: (serviceCodeTo: string, hostname?: string) => string;
|
|
219
|
+
/**
|
|
220
|
+
* @description
|
|
221
|
+
* 환경에 맞는 NLC 호스트명을 반환합니다.
|
|
222
|
+
* client side에서 사용하는 함수입니다.
|
|
223
|
+
* @param hostname window.location.hostname
|
|
224
|
+
* @returns
|
|
225
|
+
*/
|
|
226
|
+
declare const getNlcHostFromEnvironment: (hostname?: string) => "" | "https://nxl-nlc-stg.hanwhalife.com" | "https://nxl-nlc-dev.hanwhalife.com" | "https://nxl-nlc.hanwhalife.com";
|
|
219
227
|
|
|
220
228
|
/**
|
|
221
229
|
* Message 이벤트 헨들러를 관리하는 클래스입니다. (싱글턴)
|
|
@@ -332,4 +340,4 @@ declare const initASTX2: ({ initSuccess, initFailure, checkServerSuccess, checkS
|
|
|
332
340
|
*/
|
|
333
341
|
declare function getE2EDataIDs(ids: string[], onSuccess: (astx_data: any) => void, onFailure?: () => void): void;
|
|
334
342
|
|
|
335
|
-
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, downloadBlob, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspApiBasePathFromEnvironment, getDspExecutionEnvironment, getDudApiBasePathFromEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getServicePath, getSubdomain, hasAstx2, imageUrlToFile, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isProductionApp, isSalesPortal, isStorybookEnv, isTablet, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
343
|
+
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, downloadBlob, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspApiBasePathFromEnvironment, getDspExecutionEnvironment, getDudApiBasePathFromEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getNlcHostFromEnvironment, getOSName, getOSVersion, getOrCreateDeviceId, getServicePath, getSubdomain, hasAstx2, imageUrlToFile, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isProductionApp, isSalesPortal, isStorybookEnv, isTablet, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
package/dist/index.d.ts
CHANGED
|
@@ -216,6 +216,14 @@ declare const getDudApiBasePathFromEnvironment: (hostname?: string) => string;
|
|
|
216
216
|
* @returns
|
|
217
217
|
*/
|
|
218
218
|
declare const getDspApiBasePathFromEnvironment: (serviceCodeTo: string, hostname?: string) => string;
|
|
219
|
+
/**
|
|
220
|
+
* @description
|
|
221
|
+
* 환경에 맞는 NLC 호스트명을 반환합니다.
|
|
222
|
+
* client side에서 사용하는 함수입니다.
|
|
223
|
+
* @param hostname window.location.hostname
|
|
224
|
+
* @returns
|
|
225
|
+
*/
|
|
226
|
+
declare const getNlcHostFromEnvironment: (hostname?: string) => "" | "https://nxl-nlc-stg.hanwhalife.com" | "https://nxl-nlc-dev.hanwhalife.com" | "https://nxl-nlc.hanwhalife.com";
|
|
219
227
|
|
|
220
228
|
/**
|
|
221
229
|
* Message 이벤트 헨들러를 관리하는 클래스입니다. (싱글턴)
|
|
@@ -332,4 +340,4 @@ declare const initASTX2: ({ initSuccess, initFailure, checkServerSuccess, checkS
|
|
|
332
340
|
*/
|
|
333
341
|
declare function getE2EDataIDs(ids: string[], onSuccess: (astx_data: any) => void, onFailure?: () => void): void;
|
|
334
342
|
|
|
335
|
-
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, downloadBlob, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspApiBasePathFromEnvironment, getDspExecutionEnvironment, getDudApiBasePathFromEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getServicePath, getSubdomain, hasAstx2, imageUrlToFile, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isProductionApp, isSalesPortal, isStorybookEnv, isTablet, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
343
|
+
export { type BrowserName, type ExecutionEnvironment, MessageEventManager, type OSName, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, downloadBlob, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspApiBasePathFromEnvironment, getDspExecutionEnvironment, getDudApiBasePathFromEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getNlcHostFromEnvironment, getOSName, getOSVersion, getOrCreateDeviceId, getServicePath, getSubdomain, hasAstx2, imageUrlToFile, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isProductionApp, isSalesPortal, isStorybookEnv, isTablet, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
package/dist/index.js
CHANGED
|
@@ -215,6 +215,25 @@ var getDspApiBasePathFromEnvironment = (serviceCodeTo, hostname) => {
|
|
|
215
215
|
return "";
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
+
var getNlcHostFromEnvironment = (hostname) => {
|
|
219
|
+
if (!isClient()) {
|
|
220
|
+
return "";
|
|
221
|
+
}
|
|
222
|
+
const environment = getEnvironmentFromHostname(hostname || location.hostname);
|
|
223
|
+
switch (environment) {
|
|
224
|
+
case "local":
|
|
225
|
+
return `https://nxl-nlc-stg.hanwhalife.com`;
|
|
226
|
+
case "dev":
|
|
227
|
+
return `https://nxl-nlc-dev.hanwhalife.com`;
|
|
228
|
+
case "stg":
|
|
229
|
+
return `https://nxl-nlc-stg.hanwhalife.com`;
|
|
230
|
+
case "prd":
|
|
231
|
+
return `https://nxl-nlc.hanwhalife.com`;
|
|
232
|
+
default:
|
|
233
|
+
console.warn("NLC environment is not defined");
|
|
234
|
+
return "";
|
|
235
|
+
}
|
|
236
|
+
};
|
|
218
237
|
|
|
219
238
|
// src/utils/user-agent-utils.ts
|
|
220
239
|
var getDspExecutionEnvironment = () => {
|
|
@@ -821,6 +840,6 @@ function getE2EDataIDs(ids, onSuccess, onFailure = () => {
|
|
|
821
840
|
}
|
|
822
841
|
}
|
|
823
842
|
|
|
824
|
-
export { MessageEventManager, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, downloadBlob, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspApiBasePathFromEnvironment, getDspExecutionEnvironment, getDudApiBasePathFromEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getOSName, getOSVersion, getOrCreateDeviceId, getServicePath, getSubdomain, hasAstx2, imageUrlToFile, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isProductionApp, isSalesPortal, isStorybookEnv, isTablet, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
843
|
+
export { MessageEventManager, addE2EObject, base64ToBlob, base64ToFile, blobToFile, checkUserAgentDspApp, convertTextToImg, debounce, deleteCookie, downloadBlob, drawImageResizeCentered, fileToBase64, getApiHostNameFromEnvironment, getBrowserName, getBrowserVersion, getBusinessWorkDivisionCode, getCdnHostNameFromEnvironment, getCookie, getCurrentBrowserName, getCurrentBrowserVersion, getCurrentOSName, getCurrentOSVersion, getDeviceModel, getDspApiBasePathFromEnvironment, getDspExecutionEnvironment, getDudApiBasePathFromEnvironment, getE2EDataIDs, getEnvironmentFromHostname, getExt, getFormFactorFromUserAgent, getNlcHostFromEnvironment, getOSName, getOSVersion, getOrCreateDeviceId, getServicePath, getSubdomain, hasAstx2, imageUrlToFile, initASTX2, isClient, isDspApp, isFpPlannerApp, isPc, isPhone, isProductionApp, isSalesPortal, isStorybookEnv, isTablet, loadScript, objectUrlToBase64, objectUrlToBlob, setCookie, throttle };
|
|
825
844
|
//# sourceMappingURL=index.js.map
|
|
826
845
|
//# sourceMappingURL=index.js.map
|