UNPKG

@compdfkit_pdf_sdk/react_native

Version:

ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF functionality to Android, iOS, and React Native applications.

46 lines 2.54 kB
"use strict"; /** * Copyright © 2014-2026 PDF Technologies, Inc. All Rights Reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT. * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. * This notice may not be removed from this file. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CPDFReplyAnnotation = exports.CPDFAnnotationReviewState = exports.CPDFAnnotationMarkState = void 0; const CPDFAnnotation_1 = require("./CPDFAnnotation"); Object.defineProperty(exports, "CPDFAnnotationMarkState", { enumerable: true, get: function () { return CPDFAnnotation_1.CPDFAnnotationMarkState; } }); Object.defineProperty(exports, "CPDFAnnotationReviewState", { enumerable: true, get: function () { return CPDFAnnotation_1.CPDFAnnotationReviewState; } }); const CPDFOptions_1 = require("../configuration/CPDFOptions"); const CPDFEnumUtils_1 = require("../util/CPDFEnumUtils"); /** * A reply attached to a PDF annotation. * * The reply model includes the reply content and the current mark/review state * exposed by the native SDK. Native mark/review state reply nodes are still * implementation details and are not exposed through a public replyType field. */ class CPDFReplyAnnotation extends CPDFAnnotation_1.CPDFAnnotation { modifyDate = null; constructor(params) { super({ ...params, type: (0, CPDFEnumUtils_1.safeParseEnumValue)(params.type, Object.values(CPDFOptions_1.CPDFAnnotationType), CPDFOptions_1.CPDFAnnotationType.UNKNOWN), }); this.modifyDate = params.modifyDate != null ? new Date(params.modifyDate) : null; this.markState = (0, CPDFEnumUtils_1.safeParseEnumValue)(params.markState, Object.values(CPDFAnnotation_1.CPDFAnnotationMarkState), CPDFAnnotation_1.CPDFAnnotationMarkState.UNMARKED); this.reviewState = (0, CPDFEnumUtils_1.safeParseEnumValue)(params.reviewState, Object.values(CPDFAnnotation_1.CPDFAnnotationReviewState), CPDFAnnotation_1.CPDFAnnotationReviewState.NONE); } toJSON() { return { ...super.toJSON(), ...(this.modifyDate && { modifyDate: this.modifyDate.getTime() }), markState: this.markState, reviewState: this.reviewState, }; } } exports.CPDFReplyAnnotation = CPDFReplyAnnotation; //# sourceMappingURL=CPDFReplyAnnotation.js.map