sales-frontend-oz 0.0.17 → 0.0.19

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.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { CSSProperties } from 'react';
2
1
  import * as sales_frontend_bridge from 'sales-frontend-bridge';
3
2
  import { FormInfo, OzdFile, DownloadOzdOptions } from 'sales-frontend-bridge';
4
3
 
@@ -28,6 +27,18 @@ declare const commonOzParam: string[];
28
27
  */
29
28
  declare const commonPdfExportParam: string[];
30
29
 
30
+ /**
31
+ * documentInfo를 여러가지 형태로 가공해주는 hook
32
+ */
33
+ declare function useDocumentInfo(initialValue: FormInfo[]): {
34
+ documentList: sales_frontend_bridge.OzdFile[];
35
+ documentTemplateMap: Record<string, FormInfo>;
36
+ documentIndexMap: Record<string, number>;
37
+ nameTemplateMap: Record<string, FormInfo>;
38
+ groupIndexes: number[][];
39
+ isAllComplete: boolean;
40
+ };
41
+
31
42
  /**
32
43
  * OZ 뷰어에 관련된 이벤트 목록
33
44
  */
@@ -329,39 +340,6 @@ type ExtraDataType = Record<string, {
329
340
  extraParam?: string[];
330
341
  }>;
331
342
 
332
- declare const wrapperStyle: CSSProperties;
333
- declare const btnStyle: CSSProperties;
334
- /**
335
- * @deprecated 테스트용 하드코딩 문서목록
336
- */
337
- declare const DownloadDocumentList: Array<FormInfo>;
338
- /**
339
- * @deprecated 테스트용 하드코딩 데이터
340
- */
341
- declare const ExtraData: ExtraDataType;
342
- /** @deprecated 테스트용 증번 */
343
- declare const policyNumber = "300034894";
344
- /** @deprecated 테스트용 FP 정보 */
345
- declare const fpInfo: {
346
- uniqNo: string;
347
- };
348
- /** @deprecated 테스트용 청약작성자목록 - 계약 관계자 코드 */
349
- declare const roleCode: string[];
350
- /** @deprecated 테스트용 native에 전달할 X-DUD-Authorization 토큰 */
351
- declare const xdudheaders = "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJXNWRtc1g1MkVWZGV0YThJRy90YmlZY281bnVCdzRZOXhGZjlWakZzdWxnbU00YnkiLCJpYXQiOjE3NjEwNDMyNjgsImV4cCI6MTc2NjI5OTI2OH0.KDnF7ZhkmnEApGCvOcItwcHnLWe5iJu64g93GACT2yo";
352
-
353
- /**
354
- * documentInfo를 여러가지 형태로 가공해주는 hook
355
- */
356
- declare function useDocumentInfo(initialValue: FormInfo[]): {
357
- documentList: sales_frontend_bridge.OzdFile[];
358
- documentTemplateMap: Record<string, FormInfo>;
359
- documentIndexMap: Record<string, number>;
360
- nameTemplateMap: Record<string, FormInfo>;
361
- groupIndexes: number[][];
362
- isAllComplete: boolean;
363
- };
364
-
365
343
  type Props<T, R = void> = {
366
344
  event: OZViewerEvent;
367
345
  handler: (e: CustomEvent<T>) => Promise<R>;
@@ -371,75 +349,6 @@ type Props<T, R = void> = {
371
349
  */
372
350
  declare function useOzEventListener<T, R = void>({ event, handler }: Props<T, R>): void;
373
351
 
374
- /**
375
- * 전체 서식목록의 하위 버튼 클릭 이벤트 핸들러
376
- * - 해당 서식을 누르면 시작 페이지로 이동한다
377
- */
378
- declare function CategoryHandler(documentInfo: FormInfo[], { type, btnID }: CategoryEvent): Promise<void>;
379
-
380
- /**
381
- * 상단 버튼 중 '전체 서식목록'을 제외한 다른 버튼 클릭 이벤트 핸들러
382
- * - 현재는 나가기 버튼밖에 없음
383
- */
384
- declare function TopHandler({ type, btnID }: TopEvent): Promise<void>;
385
-
386
- /**
387
- * 주석 모드 (형광펜 버튼) 클릭 이벤트 핸들러
388
- */
389
- declare function CommentHandler({ type, btnID }: CommentEvent): Promise<void>;
390
- /**
391
- * 현재 모드가 코멘트(형광펜) 모드인지 확인
392
- * - 코멘트 모드일 경우 true
393
- * - 편집 모드 등 다른 모드일 경우 false
394
- */
395
- declare function isCommentMode(): Promise<boolean>;
396
- type commentPenType = "yellow" | "pink" | "green" | "eraser";
397
- /**
398
- * 코멘트 모드를 활성화하며 특정 펜 타입을 적용
399
- *
400
- * @param type 사용할 코멘트 펜 타입
401
- * - `yellow` (기본값)
402
- * - `pink`
403
- * - `green`
404
- * - `eraser` (지우개)
405
- */
406
- declare function setEnableCommentMode(type?: commentPenType): Promise<sales_frontend_bridge.CommonOzBridgetResponseType<number | null>>;
407
- /**
408
- * 코멘트 모드 비활성화 (편집 모드로 전환)
409
- * - 현재 코멘트 모드 상태 여부와 관계없이 항상 편집 모드로 전환함
410
- */
411
- declare function setDisableCommentMode(): Promise<sales_frontend_bridge.CommonOzBridgetResponseType<string>>;
412
-
413
- /**
414
- * PDF 뷰어 내 버튼 클릭 이벤트 핸들러
415
- * - 수정하기 버튼
416
- * - PDF 뷰어를 닫는다
417
- * - 최종 제출하기 버튼
418
- * - PDF 뷰어를 닫는다
419
- * - OZ 뷰어를 닫는다
420
- * - 최종제출 화면으로 route
421
- */
422
- declare function PdfHandler({ type, btnID }: PdfEvent): Promise<void>;
423
-
424
- /**
425
- * 성명, 서명, 덧쓰기 바로가기, 미입력 서명 바로가기, 청약 문서 최종 확인 버튼 클릭 이벤트 핸들러
426
- * - 서명 바로가기 버튼 이벤트 핸들러
427
- * - 미입력된 첫번째서명으로 이동 및 사인패드 오픈
428
- * - 미입력 항목 입력하기 버튼 이벤트 핸들러
429
- * - 미입력된 첫번째서명으로 이동 및 사인패드 오픈
430
- * - 청약문서 최종 확인하기 버튼 이벤트 핸들러
431
- * - 유효성 검사 후 PDF export 및 PDF 뷰어 오픈
432
- */
433
- declare function SignatureHandler({ type, btnID }: SignatureEvent): Promise<void>;
434
- /**
435
- * PDF 저장을 비동기적으로 처리하고, 저장된 파일 경로를 반환하는 함수
436
- */
437
- declare function SaveTotalPdf(): Promise<string>;
438
- /**
439
- * 개별 OZD를 PDF로 저장하는 함수
440
- */
441
- declare function SaveSinglePdf({ startPage, endPage, imageDocumentTypeCode }: OzdFile): Promise<string>;
442
-
443
352
  /**
444
353
  * ### 발생 상황 및 에러 메시지 정리
445
354
  * 1. 비정형에서 OZD 다운로드 시 → 청약문서를 불러오지 못했습니다
@@ -620,6 +529,17 @@ declare const getReportCountMemo: {
620
529
  clearCache(): void;
621
530
  };
622
531
 
532
+ /**
533
+ * PDF 저장을 비동기적으로 처리하고, 저장된 파일 경로를 반환하는 함수
534
+ * - OZD 전체를 하나의 PDF로 저장
535
+ */
536
+ declare function SaveTotalPdf(policyNumber: string, fileName: string): Promise<string>;
537
+ /**
538
+ * PDF 저장을 비동기적으로 처리하고, 저장된 파일 경로를 반환하는 함수
539
+ * - 개별 OZD를 PDF로 저장하는 함수
540
+ */
541
+ declare function SaveSinglePdf(policyNumber: string, { startPage, endPage, docCode: fileName }: OzdFile): Promise<string>;
542
+
623
543
  /**
624
544
  * OZ 서식 검증용 브릿지 유틸
625
545
  */
@@ -703,4 +623,4 @@ declare function getDebouncedValueChangeHandler(docIndex: string, onValueChanged
703
623
  */
704
624
  declare function clearValueChangeDebounceHandlers(): void;
705
625
 
706
- export { AlertDocumentLoadError, AlertTemporaryError, type CategoryEvent, CategoryHandler, type CommentEvent, CommentHandler, CreateOzParam, CreateOzViewer, DownloadDocumentList, ExtraData, type ExtraDataType, MovePage, type OZBtnTouchEvent, type OZEFormInputEvent, type OZExportEvent, OZTriggerExternalEvent, type OZViewerChangeEvent, type OZViewerErrorEvent, OZViewerEvent, type OZViewerPageBindEvent, type OZViewerProgressEvent, type OZViewerUserEvent, type PdfEvent, PdfHandler, PromiseWithResolvers, SaveSinglePdf, SaveTotalPdf, type SignatureEvent, SignatureHandler, type TopEvent, TopHandler, btnStyle, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, ensureArray, extractFileName, fetchDocument, fetchFont, fpInfo, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler, getFileFromDud, getFileListByGlobalIndex, getReportCountMemo, getTotalPageMemo, getTotalPageOnAllDocuments, isCommentMode, policyNumber, postFiletoDud, roleCode, setCheckEform, setDisableCommentMode, setEnableCommentMode, sleep, triggerClickOnAllDocuments, triggerCropImageOnAllDocuments, triggerDraftDataByIndexList, useDocumentInfo, useOzEventListener, validateAllPages, wrapperStyle, xdudheaders };
626
+ 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, PromiseWithResolvers, SaveSinglePdf, SaveTotalPdf, type SignatureEvent, type TopEvent, categorizeByPageRange, checkDocumentsValidityByIndex, checkValidPageMemo, clearValueChangeDebounceHandlers, commentPenEraser, commentPenGreen, commentPenPink, commentPenYellow, commonOzParam, commonPdfExportParam, disableFocusOnValidation, enableFocusOnValidation, ensureArray, extractFileName, fetchDocument, fetchFont, getCurrentPage, getDebouncedValueChangeHandler, getDraftDataHandler, getFileFromDud, getFileListByGlobalIndex, getReportCountMemo, getTotalPageMemo, getTotalPageOnAllDocuments, postFiletoDud, setCheckEform, sleep, triggerClickOnAllDocuments, triggerCropImageOnAllDocuments, triggerDraftDataByIndexList, useDocumentInfo, useOzEventListener, validateAllPages };