sales-frontend-oz 0.0.64 → 0.0.65
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 +12 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -11
- package/dist/index.d.ts +5 -11
- package/dist/index.js +14 -73
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -4,9 +4,13 @@ import { FormInfo, OzdFile, DownloadOzdOptions } from 'sales-frontend-bridge';
|
|
|
4
4
|
/**
|
|
5
5
|
* 형광펜 편집 관련 상수
|
|
6
6
|
*/
|
|
7
|
+
/** 노란색 형광펜 설정 */
|
|
7
8
|
declare const commentPenYellow: string[];
|
|
9
|
+
/** 분홍색 형광펜 설정 */
|
|
8
10
|
declare const commentPenPink: string[];
|
|
11
|
+
/** 초록색 형광펜 설정 */
|
|
9
12
|
declare const commentPenGreen: string[];
|
|
13
|
+
/** 지우개 설정 */
|
|
10
14
|
declare const commentPenEraser: string[];
|
|
11
15
|
|
|
12
16
|
/**
|
|
@@ -457,16 +461,6 @@ declare function fetchDocument(args: DownloadOzdOptions): Promise<{
|
|
|
457
461
|
* App에 설치된 폰트를 Oz Param 형식으로 불러오는 브릿지
|
|
458
462
|
*/
|
|
459
463
|
declare function fetchFont(): Promise<string[]>;
|
|
460
|
-
/**
|
|
461
|
-
* 비정형 서버에 성명,서명, 덧쓰기 이미지를 업로드한다
|
|
462
|
-
* @deprecated 테스트페이지에서만 사용하는 API
|
|
463
|
-
*/
|
|
464
|
-
declare function postFiletoDud(imageStr: string): Promise<any>;
|
|
465
|
-
/**
|
|
466
|
-
* 비정형에서 중간저장해놓은 서명이미지를 다운받는다
|
|
467
|
-
* @deprecated 테스트페이지에서만 사용하는 API
|
|
468
|
-
*/
|
|
469
|
-
declare function getFileFromDud(fileMgmtId: string): Promise<string>;
|
|
470
464
|
|
|
471
465
|
/**
|
|
472
466
|
* OZ에서 getDraftData 요청 시 반환할 데이터를 생성하는 함수
|
|
@@ -602,4 +596,4 @@ declare function getDebouncedValueChangeHandler(docIndex: string, onValueChanged
|
|
|
602
596
|
*/
|
|
603
597
|
declare function clearValueChangeDebounceHandlers(): void;
|
|
604
598
|
|
|
605
|
-
export { AlertDocumentLoadError, AlertTemporaryError, type CategoryEvent, type CommentEvent, CreateOzParam, CreateOzViewer, type ExtraDataType, MovePage, type OZBtnTouchEvent, type OZEFormInputEvent, type OZExportEvent, OZTriggerExternalEvent, type OZViewerChangeEvent, type OZViewerErrorEvent, OZViewerEvent, type OZViewerPageBindEvent, type OZViewerProgressEvent, type OZViewerUserEvent, type PdfEvent, SaveSinglePdf, SaveTotalPdf, type SignatureEvent, type TopEvent, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler,
|
|
599
|
+
export { AlertDocumentLoadError, AlertTemporaryError, type CategoryEvent, type CommentEvent, CreateOzParam, CreateOzViewer, type ExtraDataType, MovePage, type OZBtnTouchEvent, type OZEFormInputEvent, type OZExportEvent, OZTriggerExternalEvent, type OZViewerChangeEvent, type OZViewerErrorEvent, OZViewerEvent, type OZViewerPageBindEvent, type OZViewerProgressEvent, type OZViewerUserEvent, type PdfEvent, SaveSinglePdf, SaveTotalPdf, type SignatureEvent, type TopEvent, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler, getReportCountMemo, getTotalPageMemo, getTotalPageOnAllDocuments, setCheckEform, triggerClickOnAllDocuments, triggerCropImageOnAllDocuments, triggerDraftDataByIndexList, useDocumentInfo, useOzEventListener, validateAllPages };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,13 @@ import { FormInfo, OzdFile, DownloadOzdOptions } from 'sales-frontend-bridge';
|
|
|
4
4
|
/**
|
|
5
5
|
* 형광펜 편집 관련 상수
|
|
6
6
|
*/
|
|
7
|
+
/** 노란색 형광펜 설정 */
|
|
7
8
|
declare const commentPenYellow: string[];
|
|
9
|
+
/** 분홍색 형광펜 설정 */
|
|
8
10
|
declare const commentPenPink: string[];
|
|
11
|
+
/** 초록색 형광펜 설정 */
|
|
9
12
|
declare const commentPenGreen: string[];
|
|
13
|
+
/** 지우개 설정 */
|
|
10
14
|
declare const commentPenEraser: string[];
|
|
11
15
|
|
|
12
16
|
/**
|
|
@@ -457,16 +461,6 @@ declare function fetchDocument(args: DownloadOzdOptions): Promise<{
|
|
|
457
461
|
* App에 설치된 폰트를 Oz Param 형식으로 불러오는 브릿지
|
|
458
462
|
*/
|
|
459
463
|
declare function fetchFont(): Promise<string[]>;
|
|
460
|
-
/**
|
|
461
|
-
* 비정형 서버에 성명,서명, 덧쓰기 이미지를 업로드한다
|
|
462
|
-
* @deprecated 테스트페이지에서만 사용하는 API
|
|
463
|
-
*/
|
|
464
|
-
declare function postFiletoDud(imageStr: string): Promise<any>;
|
|
465
|
-
/**
|
|
466
|
-
* 비정형에서 중간저장해놓은 서명이미지를 다운받는다
|
|
467
|
-
* @deprecated 테스트페이지에서만 사용하는 API
|
|
468
|
-
*/
|
|
469
|
-
declare function getFileFromDud(fileMgmtId: string): Promise<string>;
|
|
470
464
|
|
|
471
465
|
/**
|
|
472
466
|
* OZ에서 getDraftData 요청 시 반환할 데이터를 생성하는 함수
|
|
@@ -602,4 +596,4 @@ declare function getDebouncedValueChangeHandler(docIndex: string, onValueChanged
|
|
|
602
596
|
*/
|
|
603
597
|
declare function clearValueChangeDebounceHandlers(): void;
|
|
604
598
|
|
|
605
|
-
export { AlertDocumentLoadError, AlertTemporaryError, type CategoryEvent, type CommentEvent, CreateOzParam, CreateOzViewer, type ExtraDataType, MovePage, type OZBtnTouchEvent, type OZEFormInputEvent, type OZExportEvent, OZTriggerExternalEvent, type OZViewerChangeEvent, type OZViewerErrorEvent, OZViewerEvent, type OZViewerPageBindEvent, type OZViewerProgressEvent, type OZViewerUserEvent, type PdfEvent, SaveSinglePdf, SaveTotalPdf, type SignatureEvent, type TopEvent, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler,
|
|
599
|
+
export { AlertDocumentLoadError, AlertTemporaryError, type CategoryEvent, type CommentEvent, CreateOzParam, CreateOzViewer, type ExtraDataType, MovePage, type OZBtnTouchEvent, type OZEFormInputEvent, type OZExportEvent, OZTriggerExternalEvent, type OZViewerChangeEvent, type OZViewerErrorEvent, OZViewerEvent, type OZViewerPageBindEvent, type OZViewerProgressEvent, type OZViewerUserEvent, type PdfEvent, SaveSinglePdf, SaveTotalPdf, type SignatureEvent, type TopEvent, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler, getReportCountMemo, getTotalPageMemo, getTotalPageOnAllDocuments, setCheckEform, triggerClickOnAllDocuments, triggerCropImageOnAllDocuments, triggerDraftDataByIndexList, useDocumentInfo, useOzEventListener, validateAllPages };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo, useCallback, useEffect } from 'react';
|
|
2
2
|
import { Bridge } from 'sales-frontend-bridge';
|
|
3
|
-
import {
|
|
3
|
+
import { debounce } from 'sales-frontend-utils';
|
|
4
4
|
|
|
5
5
|
// src/oz/constant/comment-pen-param.ts
|
|
6
6
|
var commentPenDefaultParam = [
|
|
@@ -241,23 +241,18 @@ async function AlertDocumentLoadError() {
|
|
|
241
241
|
|
|
242
242
|
// src/internal/const/test-data.ts
|
|
243
243
|
[
|
|
244
|
-
{ name: "
|
|
245
|
-
{ name: "
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
// { name: '[C1200]대면설명확인서', doc: [{ docCode: 'C1200', fileID: 't7yFAoCPgay4RKkAA' }] },
|
|
257
|
-
// { name: '[C1300]계약체결고지의무확인서', doc: [{ docCode: 'C1300', fileID: 'WdUzi6CPgaccbKkAA' }] },
|
|
258
|
-
// { name: '[C1400]보험상품비교설명확인서', doc: [{ docCode: 'C1400', fileID: 'kgoT28CPgaf4YKkAA' }] },
|
|
259
|
-
// // C0200은 스크립트 작업이 안되어있어서 서명테스트 안됨
|
|
260
|
-
// { name: '[C0200]고객거래확인서', doc: [{ docCode: 'C0200', fileID: '5QJ3eSCPlEDWDKkAA' }] },
|
|
244
|
+
{ "name": "\uAC1C\uC778(\uC2E0\uC6A9)\uC815\uBCF4\uC81C\uACF5 \uB3D9\uC758\uC11C", "doc": [{ "docCode": "C0400", "fileID": "07Ccx0CTiLNQXKkAA" }] },
|
|
245
|
+
{ "name": "\uC0C1\uD488\uC18C\uAC1C\uB3D9\uC758\uC11C(\uC0C1\uC138)", "doc": [{ "docCode": "C0401", "fileID": "WH8CfHCTiLNQWKkAA" }] },
|
|
246
|
+
{ "name": "\uACE0\uAC1D\uAD8C\uB9AC \uC548\uB0B4\uBB38", "doc": [{ "docCode": "C0100", "fileID": "XvfJ76CTiLKCsKkAA" }] },
|
|
247
|
+
{ "name": "\uC804\uC790\uC11C\uBA85\uC5D0 \uC758\uD55C \uBCF4\uD5D8\uACC4\uC57D\uCCB4\uACB0 \uB3D9\uC758\uC11C", "doc": [{ "docCode": "B0101", "fileID": "vvOxRSCTiLNT_KkAI" }] },
|
|
248
|
+
{ "name": "\uBCF4\uD5D8\uACC4\uC57D\uB300\uCD9C \uC815\uBCF4\uB3D9\uC758\uC11C", "doc": [{ "docCode": "A2215", "fileID": "P0gdb3CTiLNQUKkAA" }] },
|
|
249
|
+
{ "name": "\uC0C1\uD488\uC124\uBA85\uC11C \uD68C\uC0AC\uBCF4\uAD00\uC6A9", "doc": [{ "docCode": "A0900", "fileID": "jAfVbYCTiLMmFKkAA" }] },
|
|
250
|
+
{ "name": "\uCCAD\uC57D\uC11C", "doc": [{ "docCode": "A0010", "fileID": "ubBaPyCTiLLUYKkAA" }] },
|
|
251
|
+
{ "name": "\uACC4\uC57D\uC804\uC54C\uB9B4\uC758\uBB34\uC0AC\uD56D (\uC77C\uBC18+ \uD0DC\uC544\uACE0\uC9C0\uC6A9)", "doc": [{ "docCode": "A2832", "fileID": "8LUd3MCTiLL-AKkAA" }] },
|
|
252
|
+
{ "name": "\uAE08\uC735\uC18C\uBE44\uC790\uBCF4\uD638\uB97C \uC704\uD55C \uACC4\uC57D\uCCB4\uACB0 \uACE0\uC9C0\uC758\uBB34 \uD655\uC778\uC11C", "doc": [{ "docCode": "C1300", "fileID": "jR3ATWCTiLKnxKkAA" }] },
|
|
253
|
+
{ "name": "\uCCAD\uC57D\uBD80\uC18D\uC815\uBCF4\uD655\uC778\uC11C", "doc": [{ "docCode": "A1500", "fileID": "W4KUwOCTiLKqJKkAI" }] },
|
|
254
|
+
{ "name": "\uB300\uBA74\uC124\uBA85 \uD655\uC778\uC11C", "doc": [{ "docCode": "C1200", "fileID": "PMiXBQCTiLKrSKkAI" }] },
|
|
255
|
+
{ "name": "\uC644\uC804\uD310\uB9E4\uC548\uB0B4 \uD655\uC778\uC11C", "doc": [{ "docCode": "C1100", "fileID": "Ecc4ikCTiLKqkKkAA" }] }
|
|
261
256
|
].map((i) => ({
|
|
262
257
|
...i,
|
|
263
258
|
// 모든 서명 입력이 완료되었는지 여부 (클라이언트에서 상태로 관리)
|
|
@@ -305,60 +300,6 @@ async function fetchFont() {
|
|
|
305
300
|
const fontParms = Object.keys(fontMap).map((i) => `font.${i}=${fontMap[i]}`);
|
|
306
301
|
return fontParms;
|
|
307
302
|
}
|
|
308
|
-
async function postFiletoDud(imageStr) {
|
|
309
|
-
const formData = new FormData();
|
|
310
|
-
formData.append("data", base64ToFile(imageStr, "test.png"));
|
|
311
|
-
formData.append("fileIdentifierValue", "string");
|
|
312
|
-
formData.append("fileExtendContent1", "string");
|
|
313
|
-
formData.append("fileExtendContent2", "string");
|
|
314
|
-
formData.append("preservationTerm", "1");
|
|
315
|
-
formData.append("fileType", "png");
|
|
316
|
-
const response = await fetch("/api/v1/post/file", {
|
|
317
|
-
headers: {
|
|
318
|
-
"x-channel-appversion": "3.1",
|
|
319
|
-
"x-channel-carriername": "SK",
|
|
320
|
-
"x-channel-deviceid": "deviceid",
|
|
321
|
-
"x-channel-devicemodel": "iPHONE13",
|
|
322
|
-
"x-channel-formfactor": "Phone",
|
|
323
|
-
"x-channel-loginchannel": "DSP",
|
|
324
|
-
"x-channel-logintype": "ONPA_PIN",
|
|
325
|
-
"x-channel-networktype": "LTE",
|
|
326
|
-
"x-channel-platformversion": "15.4.1",
|
|
327
|
-
"x-channel-screenid": "ScreenId",
|
|
328
|
-
"x-dud-authorization": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJXNWRtc1g1MkVWZGV0YThJRy90YmlZY281bnVCdzRZOXhGZjlWakZzdWxnbU00YnkiLCJpYXQiOjE3NjEwNDMyNjgsImV4cCI6MTc2NjI5OTI2OH0.KDnF7ZhkmnEApGCvOcItwcHnLWe5iJu64g93GACT2yo",
|
|
329
|
-
"x-x-channel-platformname": "IOS"
|
|
330
|
-
},
|
|
331
|
-
method: "POST",
|
|
332
|
-
body: formData
|
|
333
|
-
});
|
|
334
|
-
const json = await response.json();
|
|
335
|
-
return json;
|
|
336
|
-
}
|
|
337
|
-
async function getFileFromDud(fileMgmtId) {
|
|
338
|
-
const outputType = "binary";
|
|
339
|
-
const response = await fetch("/api/v1/get/file", {
|
|
340
|
-
headers: {
|
|
341
|
-
"content-type": "application/json",
|
|
342
|
-
"x-channel-appversion": "3.1",
|
|
343
|
-
"x-channel-carriername": "SK",
|
|
344
|
-
"x-channel-deviceid": "deviceid",
|
|
345
|
-
"x-channel-devicemodel": "iPHONE13",
|
|
346
|
-
"x-channel-formfactor": "Phone",
|
|
347
|
-
"x-channel-loginchannel": "DSP",
|
|
348
|
-
"x-channel-logintype": "ONPA_PIN",
|
|
349
|
-
"x-channel-networktype": "LTE",
|
|
350
|
-
"x-channel-platformversion": "15.4.1",
|
|
351
|
-
"x-channel-screenid": "ScreenId",
|
|
352
|
-
"x-dud-authorization": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJXNWRtc1g1MkVWZGV0YThJRy90YmlZY281bnVCdzRZOXhGZjlWakZzdWxnbU00YnkiLCJpYXQiOjE3NjEwNDMyNjgsImV4cCI6MTc2NjI5OTI2OH0.KDnF7ZhkmnEApGCvOcItwcHnLWe5iJu64g93GACT2yo",
|
|
353
|
-
"x-x-channel-platformname": "IOS"
|
|
354
|
-
},
|
|
355
|
-
method: "POST",
|
|
356
|
-
body: JSON.stringify({ fileMgmtId, outputType })
|
|
357
|
-
});
|
|
358
|
-
const blob = await response.blob();
|
|
359
|
-
const base64String = await fileToBase64(blob);
|
|
360
|
-
return base64String;
|
|
361
|
-
}
|
|
362
303
|
async function CreateOzViewer(ozParam) {
|
|
363
304
|
const { promise, resolve, reject } = PromiseWithResolvers();
|
|
364
305
|
const handleTimeout = () => {
|
|
@@ -688,6 +629,6 @@ function clearValueChangeDebounceHandlers() {
|
|
|
688
629
|
valueChangeDebounceMap.clear();
|
|
689
630
|
}
|
|
690
631
|
|
|
691
|
-
export { AlertDocumentLoadError, AlertTemporaryError, CreateOzParam, CreateOzViewer, MovePage, OZTriggerExternalEvent, OZViewerEvent, SaveSinglePdf, SaveTotalPdf, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler,
|
|
632
|
+
export { AlertDocumentLoadError, AlertTemporaryError, CreateOzParam, CreateOzViewer, MovePage, OZTriggerExternalEvent, OZViewerEvent, SaveSinglePdf, SaveTotalPdf, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler, getReportCountMemo, getTotalPageMemo, getTotalPageOnAllDocuments, setCheckEform, triggerClickOnAllDocuments, triggerCropImageOnAllDocuments, triggerDraftDataByIndexList, useDocumentInfo, useOzEventListener, validateAllPages };
|
|
692
633
|
//# sourceMappingURL=index.js.map
|
|
693
634
|
//# sourceMappingURL=index.js.map
|