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.

47 lines 1.51 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.CPDFUriAction = void 0; const CPDFAction_1 = require("./CPDFAction"); class CPDFUriAction extends CPDFAction_1.CPDFAction { uri; /** * Create an email type URI Action * @param email Email address * @returns CPDFUriAction instance */ static createEmail(email) { return new CPDFUriAction({ actionType: 'uri', uri: `mailto:${email}` }); } /** * Create a web type URI Action * @param url Website address (e.g. https://...) * @returns CPDFUriAction instance */ static createWeb(url) { // Use http/https protocol directly return new CPDFUriAction({ actionType: 'uri', uri: url }); } constructor(params) { super(params); this.uri = params.uri ?? ''; } static fromJson(json) { return new this(json); } toJSON() { return { ...super.toJSON(), uri: this.uri }; } } exports.CPDFUriAction = CPDFUriAction; //# sourceMappingURL=CPDFUriAction.js.map