survey-pdf 2.2.2 → 2.2.3
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/fesm/pdf-form-filler-shared.mjs +1 -1
- package/fesm/pdf-form-filler.mjs +1 -1
- package/fesm/pdf-form-filler.node.mjs +1 -1
- package/fesm/survey.pdf.fonts.mjs +1 -1
- package/fesm/survey.pdf.mjs +66 -3
- package/fesm/survey.pdf.mjs.map +1 -1
- package/package.json +2 -2
- package/pdf-form-filler.js +1 -1
- package/pdf-form-filler.js.map +1 -1
- package/pdf-form-filler.min.js.LICENSE.txt +1 -1
- package/pdf-form-filler.node.js +1 -1
- package/pdf-form-filler.node.js.map +1 -1
- package/pdf-form-filler.node.min.js.LICENSE.txt +1 -1
- package/survey.pdf.fonts.js +1 -1
- package/survey.pdf.fonts.js.map +1 -1
- package/survey.pdf.fonts.min.js.LICENSE.txt +1 -1
- package/survey.pdf.js +187 -64
- package/survey.pdf.js.map +1 -1
- package/survey.pdf.min.js +1 -1
- package/survey.pdf.min.js.LICENSE.txt +1 -1
- package/typings/entries/pdf.d.ts +1 -0
- package/typings/flat_layout/flat_slider.d.ts +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-pdf",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "survey.pdf.js is a SurveyJS PDF Library. It is a easy way to export SurveyJS surveys to PDF. It uses JSON for survey metadata.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"typings": "./typings/entries/pdf.d.ts",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"survey-core": "2.2.
|
|
22
|
+
"survey-core": "2.2.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"jspdf": "^2.3.0 || ^3"
|
package/pdf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A;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNmD;AACW;AACH","sources":["webpack://PDFFormFiller/webpack/universalModuleDefinition","webpack://PDFFormFiller/./src/entries/helpers.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdf-lib.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdfjs.ts","webpack://PDFFormFiller/./src/pdf_forms/forms-base.ts","webpack://PDFFormFiller/./src/pdf_forms/forms.ts","webpack://PDFFormFiller/./src/pdf_forms/map.ts","webpack://PDFFormFiller/webpack/bootstrap","webpack://PDFFormFiller/webpack/runtime/define property getters","webpack://PDFFormFiller/webpack/runtime/hasOwnProperty shorthand","webpack://PDFFormFiller/webpack/runtime/make namespace object","webpack://PDFFormFiller/./src/entries/forms.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"PDFFormFiller\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PDFFormFiller\"] = factory();\n\telse\n\t\troot[\"PDFFormFiller\"] = factory();\n})(this, () => {\nreturn ","declare var Reflect: any;\n\nvar extendStatics = function(d: any, b: any): any {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d: any, b: any) {\n if (typeof b !== 'function' && b !== null)\n throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');\n extendStatics(d, b);\n function __() { this.constructor = d; }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = (<any>Object).assign || function __assign(t: any) {\n for (var s: any, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nexport function __rest(s: any, e: any) {\n var t: any = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n for (var i = 0, q = Object.getOwnPropertySymbols(s); i < q.length; i++) {\n if (e.indexOf(q[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, q[i]))\n t[q[i]] = s[q[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators: any, target: any, key: any, desc: any) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);\n // eslint-disable-next-line no-cond-assign\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __awaiter(thisArg: any, _arguments: any, P: any, generator: any) {\n function adopt(value: any) { return value instanceof P ? value : new P(function (resolve: any) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve: any, reject: any) {\n function fulfilled(value: any) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value: any) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }\n function step(result: any) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg: any, body: any) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: <any>[], ops: <any>[] }, f: any, y: any, t: any, g: any;\n return g = { next: verb(0), 'throw': verb(1), 'return': verb(2) }, typeof Symbol === 'function' && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n: any) { return function (v: any) { return step([n, v]); }; }\n function step(op: any) {\n if (f) throw new TypeError('Generator is already executing.');\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { (<any>_) = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport function __spreadArray (to: any, from: any, pack: any) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar: any; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}","import { IPDFFormAdapter } from './adapter';\nexport class PDFLibAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const { PDFDocument, PDFTextField, PDFCheckBox, PDFRadioGroup, PDFDropdown } = this.pdfLibrary;\n const pdfDoc = await PDFDocument.load(template);\n const form = pdfDoc.getForm();\n const fields = form.getFields();\n fields.forEach((field: any) => {\n const fieldName = field.getName();\n const value = data[fieldName];\n if(value === null || value === undefined) return;\n if (field instanceof PDFTextField) {\n field.setText(value);\n }\n else if (field instanceof PDFCheckBox) {\n if (value) field.check(); else field.uncheck();\n }\n else if (field instanceof PDFRadioGroup || field instanceof PDFDropdown) {\n field.select(value.toString());\n }\n });\n\n return await pdfDoc.save();\n }\n}\n","import { IPDFFormAdapter } from './adapter';\nexport class PDFJSAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const pdfjsLib = this.pdfLibrary;\n const doc = await pdfjsLib.getDocument(template).promise;\n const numPages = doc.numPages;\n\n // Process all pages\n for (let pageNum = 1; pageNum <= numPages; pageNum++) {\n const page = await doc.getPage(pageNum);\n const annotations = await page.getAnnotations();\n annotations.forEach((field: any) => {\n if (field.fieldType == undefined) return;\n const value = data[field.fieldName];\n if (value) {\n if(field.radioButton && field.buttonValue != value) {\n return;\n }\n doc.annotationStorage.setValue(field.id, { value });\n }\n });\n }\n\n return await doc.saveDocument();\n }\n}\n","import FormMap from './map';\r\nimport { IPDFFormAdapter } from './adapters/adapter';\r\n\r\n/**\r\n * An object that configures the [`PDFFormFiller`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfformfiller) plugin.\r\n *\r\n * Pass this object to the `PDFFormFiller` constructor:\r\n *\r\n * ```js\r\n * const form = new PDFFormFiller.PDFFormFiller(pdfFormFillerOptions);\r\n *\r\n * // In modular applications:\r\n * import { PDFFormFiller } from \"survey-pdf/pdf-form-filler\";\r\n * const form = new PDFFormFiller(pdfFormFillerOptions);\r\n * ```\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\ninterface IPDFFormFillerOptions {\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n fieldMap?: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n data?: any;\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfTemplate?: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfLibraryAdapter?: IPDFFormAdapter;\r\n}\r\n/**\r\n * A base class for the `PDFFormFiller` plugin.\r\n */\r\nexport abstract class PDFFormFillerBase {\r\n constructor (options?: IPDFFormFillerOptions) {\r\n if(options) {\r\n this.data = options.data;\r\n this.fieldMap = options.fieldMap;\r\n this.pdfTemplate = options.pdfTemplate;\r\n this.pdfLibraryAdapter = options.pdfLibraryAdapter;\r\n }\r\n }\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfTemplate: any;\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public fieldMap: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public data: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfLibraryAdapter?: IPDFFormAdapter;\r\n\r\n protected async getPDFBytes() {\r\n const map = new FormMap(this.fieldMap);\r\n const plainData = map.mapData(this.data);\r\n return await this.pdfLibraryAdapter?.fillForm(this.pdfTemplate, plainData);\r\n }\r\n /**\r\n * An asynchronous method that allows you to get PDF content in different formats.\r\n * @param type *(Optional)* One of `\"blob\"`, `\"bloburl\"`, `\"dataurlstring\"`. Do not specify this parameter if you want to get raw PDF content as a string value.\r\n */\r\n public async raw(type?: 'blob' | 'bloburl' | 'dataurlstring') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if (!type || !pdfBytes) return pdfBytes;\r\n if (type == 'dataurlstring') return 'data:application/pdf;base64,' + btoa(String.fromCharCode.apply(null, pdfBytes));\r\n const blob = new Blob([pdfBytes], { type: 'application/pdf' });\r\n if (type == 'blob') return blob;\r\n if (type == 'bloburl') return URL.createObjectURL(blob);\r\n return pdfBytes;\r\n }\r\n\r\n protected abstract saveToFile(pdfBytes:string, fileName: string): Promise<void>;\r\n /**\r\n * An asynchronous method that starts to download the filled PDF form in the web browser.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"FilledForm.pdf\"`.\r\n */\r\n public async save(fileName: string = 'FilledForm.pdf') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if(!pdfBytes) return;\r\n await this.saveToFile(pdfBytes, fileName);\r\n }\r\n}","import { PDFFormFillerBase } from './forms-base';\n\n/**\n * A plugin that enables you to fill interactive fields in existing PDF forms.\n *\n * This plugin requires a third-party library, such as [`pdf-lib`](https://pdf-lib.js.org/) or [PDF.js](https://mozilla.github.io/pdf.js/):\n *\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\n *\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\n */\nexport class PDFFormFiller extends PDFFormFillerBase {\n protected async saveToFile(pdfBytes: string, fileName: string) {\n const blob = new Blob([pdfBytes], { type: 'application/pdf' });\n const link = document.createElement('a');\n link.href = URL.createObjectURL(blob);\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(link.href);\n }\n}","export default class FormsMap {\n private res: any = {};\n constructor(private map: any) { }\n private mapDataRecursive(data: any, map: any) {\n if(data === undefined || data === null) return;\n if (typeof(data) !== 'object') {\n if(Array.isArray(map)) {\n map.forEach((m) => {\n this.mapDataRecursive(data, m);\n });\n return;\n }\n if (typeof(map) !== 'object') {\n this.res[map] = data;\n } else {\n this.res[map[data].field] = map[data].value;\n }\n return;\n }\n if (Array.isArray(data)) {\n data.forEach((d, i) => {\n this.mapDataRecursive(d, Array.isArray(map) ? map[i] : map);\n });\n return;\n }\n Object.keys(data).forEach(key => {\n this.mapDataRecursive(data[key], map[key]);\n });\n }\n mapData(data: any) {\n this.res = {};\n this.mapDataRecursive(data, this.map);\n return this.res;\n }\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export { PDFFormFiller } from '../pdf_forms/forms';\nexport { PDFLibAdapter } from '../pdf_forms/adapters/pdf-lib';\nexport { PDFJSAdapter } from '../pdf_forms/adapters/pdfjs';\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"pdf-form-filler.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;ACRA,IAAI,aAAa,GAAG,UAAS,CAAM,EAAE,CAAM;IACvC,aAAa,GAAG,MAAM,CAAC,cAAc;QACrC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;YAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClG,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEK,SAAS,SAAS,CAAC,CAAM,EAAE,CAAM;IACpC,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,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I,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACP,CAAC;IACD,0BAAO,GAAP,UAAQ,IAAS;QACb,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IACL,eAAC;AAAD,CAAC;;;;;;;;UClCD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;ACNmD;AACW;AACH","sources":["webpack://PDFFormFiller/webpack/universalModuleDefinition","webpack://PDFFormFiller/./src/entries/helpers.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdf-lib.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdfjs.ts","webpack://PDFFormFiller/./src/pdf_forms/forms-base.ts","webpack://PDFFormFiller/./src/pdf_forms/forms.ts","webpack://PDFFormFiller/./src/pdf_forms/map.ts","webpack://PDFFormFiller/webpack/bootstrap","webpack://PDFFormFiller/webpack/runtime/define property getters","webpack://PDFFormFiller/webpack/runtime/hasOwnProperty shorthand","webpack://PDFFormFiller/webpack/runtime/make namespace object","webpack://PDFFormFiller/./src/entries/forms.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"PDFFormFiller\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PDFFormFiller\"] = factory();\n\telse\n\t\troot[\"PDFFormFiller\"] = factory();\n})(this, () => {\nreturn ","declare var Reflect: any;\n\nvar extendStatics = function(d: any, b: any): any {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d: any, b: any) {\n if (typeof b !== 'function' && b !== null)\n throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');\n extendStatics(d, b);\n function __() { this.constructor = d; }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = (<any>Object).assign || function __assign(t: any) {\n for (var s: any, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nexport function __rest(s: any, e: any) {\n var t: any = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n for (var i = 0, q = Object.getOwnPropertySymbols(s); i < q.length; i++) {\n if (e.indexOf(q[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, q[i]))\n t[q[i]] = s[q[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators: any, target: any, key: any, desc: any) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);\n // eslint-disable-next-line no-cond-assign\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __awaiter(thisArg: any, _arguments: any, P: any, generator: any) {\n function adopt(value: any) { return value instanceof P ? value : new P(function (resolve: any) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve: any, reject: any) {\n function fulfilled(value: any) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value: any) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }\n function step(result: any) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg: any, body: any) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: <any>[], ops: <any>[] }, f: any, y: any, t: any, g: any;\n return g = { next: verb(0), 'throw': verb(1), 'return': verb(2) }, typeof Symbol === 'function' && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n: any) { return function (v: any) { return step([n, v]); }; }\n function step(op: any) {\n if (f) throw new TypeError('Generator is already executing.');\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { (<any>_) = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport function __spreadArray (to: any, from: any, pack: any) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar: any; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}","import { IPDFFormAdapter } from './adapter';\nexport class PDFLibAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const { PDFDocument, PDFTextField, PDFCheckBox, PDFRadioGroup, PDFDropdown } = this.pdfLibrary;\n const pdfDoc = await PDFDocument.load(template);\n const form = pdfDoc.getForm();\n const fields = form.getFields();\n fields.forEach((field: any) => {\n const fieldName = field.getName();\n const value = data[fieldName];\n if(value === null || value === undefined) return;\n if (field instanceof PDFTextField) {\n field.setText(value);\n }\n else if (field instanceof PDFCheckBox) {\n if (value) field.check(); else field.uncheck();\n }\n else if (field instanceof PDFRadioGroup || field instanceof PDFDropdown) {\n field.select(value.toString());\n }\n });\n\n return await pdfDoc.save();\n }\n}\n","import { IPDFFormAdapter } from './adapter';\nexport class PDFJSAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const pdfjsLib = this.pdfLibrary;\n const doc = await pdfjsLib.getDocument(template).promise;\n const numPages = doc.numPages;\n\n // Process all pages\n for (let pageNum = 1; pageNum <= numPages; pageNum++) {\n const page = await doc.getPage(pageNum);\n const annotations = await page.getAnnotations();\n annotations.forEach((field: any) => {\n if (field.fieldType == undefined) return;\n const value = data[field.fieldName];\n if (value) {\n if(field.radioButton && field.buttonValue != value) {\n return;\n }\n doc.annotationStorage.setValue(field.id, { value });\n }\n });\n }\n\n return await doc.saveDocument();\n }\n}\n","import FormMap from './map';\r\nimport { IPDFFormAdapter } from './adapters/adapter';\r\n\r\n/**\r\n * An object that configures the [`PDFFormFiller`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfformfiller) plugin.\r\n *\r\n * Pass this object to the `PDFFormFiller` constructor:\r\n *\r\n * ```js\r\n * const form = new PDFFormFiller.PDFFormFiller(pdfFormFillerOptions);\r\n *\r\n * // In modular applications:\r\n * import { PDFFormFiller } from \"survey-pdf/pdf-form-filler\";\r\n * const form = new PDFFormFiller(pdfFormFillerOptions);\r\n * ```\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\ninterface IPDFFormFillerOptions {\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n fieldMap?: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n data?: any;\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfTemplate?: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfLibraryAdapter?: IPDFFormAdapter;\r\n}\r\n/**\r\n * A base class for the `PDFFormFiller` plugin.\r\n */\r\nexport abstract class PDFFormFillerBase {\r\n constructor (options?: IPDFFormFillerOptions) {\r\n if(options) {\r\n this.data = options.data;\r\n this.fieldMap = options.fieldMap;\r\n this.pdfTemplate = options.pdfTemplate;\r\n this.pdfLibraryAdapter = options.pdfLibraryAdapter;\r\n }\r\n }\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfTemplate: any;\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public fieldMap: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public data: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfLibraryAdapter?: IPDFFormAdapter;\r\n\r\n protected async getPDFBytes() {\r\n const map = new FormMap(this.fieldMap);\r\n const plainData = map.mapData(this.data);\r\n return await this.pdfLibraryAdapter?.fillForm(this.pdfTemplate, plainData);\r\n }\r\n /**\r\n * An asynchronous method that allows you to get PDF content in different formats.\r\n * @param type *(Optional)* One of `\"blob\"`, `\"bloburl\"`, `\"dataurlstring\"`. Do not specify this parameter if you want to get raw PDF content as a string value.\r\n */\r\n public async raw(type?: 'blob' | 'bloburl' | 'dataurlstring') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if (!type || !pdfBytes) return pdfBytes;\r\n if (type == 'dataurlstring') return 'data:application/pdf;base64,' + btoa(String.fromCharCode.apply(null, pdfBytes));\r\n const blob = new Blob([pdfBytes], { type: 'application/pdf' });\r\n if (type == 'blob') return blob;\r\n if (type == 'bloburl') return URL.createObjectURL(blob);\r\n return pdfBytes;\r\n }\r\n\r\n protected abstract saveToFile(pdfBytes:string, fileName: string): Promise<void>;\r\n /**\r\n * An asynchronous method that starts to download the filled PDF form in the web browser.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"FilledForm.pdf\"`.\r\n */\r\n public async save(fileName: string = 'FilledForm.pdf') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if(!pdfBytes) return;\r\n await this.saveToFile(pdfBytes, fileName);\r\n }\r\n}","import { PDFFormFillerBase } from './forms-base';\n\n/**\n * A plugin that enables you to fill interactive fields in existing PDF forms.\n *\n * This plugin requires a third-party library, such as [`pdf-lib`](https://pdf-lib.js.org/) or [PDF.js](https://mozilla.github.io/pdf.js/):\n *\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\n *\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\n */\nexport class PDFFormFiller extends PDFFormFillerBase {\n protected async saveToFile(pdfBytes: string, fileName: string) {\n const blob = new Blob([pdfBytes], { type: 'application/pdf' });\n const link = document.createElement('a');\n link.href = URL.createObjectURL(blob);\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(link.href);\n }\n}","export default class FormsMap {\n private res: any = {};\n constructor(private map: any) { }\n private mapDataRecursive(data: any, map: any) {\n if(data === undefined || data === null) return;\n if (typeof(data) !== 'object') {\n if(Array.isArray(map)) {\n map.forEach((m) => {\n this.mapDataRecursive(data, m);\n });\n return;\n }\n if (typeof(map) !== 'object') {\n this.res[map] = data;\n } else {\n this.res[map[data].field] = map[data].value;\n }\n return;\n }\n if (Array.isArray(data)) {\n data.forEach((d, i) => {\n this.mapDataRecursive(d, Array.isArray(map) ? map[i] : map);\n });\n return;\n }\n Object.keys(data).forEach(key => {\n this.mapDataRecursive(data[key], map[key]);\n });\n }\n mapData(data: any) {\n this.res = {};\n this.mapDataRecursive(data, this.map);\n return this.res;\n }\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export { PDFFormFiller } from '../pdf_forms/forms';\nexport { PDFLibAdapter } from '../pdf_forms/adapters/pdf-lib';\nexport { PDFJSAdapter } from '../pdf_forms/adapters/pdfjs';\n"],"names":[],"sourceRoot":""}
|
package/pdf-form-filler.node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-form-filler.node.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;ACRA,IAAI,aAAa,GAAG,UAAS,CAAM,EAAE,CAAM;IACvC,aAAa,GAAG,MAAM,CAAC,cAAc;QACrC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,C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G,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;YACH,OAAO;QACX,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,aAAG;YACzB,KAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACP,CAAC;IACD,0BAAO,GAAP,UAAQ,IAAS;QACb,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IACL,eAAC;AAAD,CAAC;;;;;;;;;;;;AClCD;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNwD;AACM;AACH","sources":["webpack://PDFFormFiller/webpack/universalModuleDefinition","webpack://PDFFormFiller/./src/entries/helpers.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdf-lib.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdfjs.ts","webpack://PDFFormFiller/./src/pdf_forms/forms-base.ts","webpack://PDFFormFiller/./src/pdf_forms/forms-node.ts","webpack://PDFFormFiller/./src/pdf_forms/map.ts","webpack://PDFFormFiller/external umd \"fs\"","webpack://PDFFormFiller/webpack/bootstrap","webpack://PDFFormFiller/webpack/runtime/compat get default export","webpack://PDFFormFiller/webpack/runtime/define property getters","webpack://PDFFormFiller/webpack/runtime/hasOwnProperty shorthand","webpack://PDFFormFiller/webpack/runtime/make namespace object","webpack://PDFFormFiller/./src/entries/forms-node.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"fs\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"PDFFormFiller\", [\"fs\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PDFFormFiller\"] = factory(require(\"fs\"));\n\telse\n\t\troot[\"PDFFormFiller\"] = factory(root[\"fs\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE_fs__) => {\nreturn ","declare var Reflect: any;\n\nvar extendStatics = function(d: any, b: any): any {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d: any, b: any) {\n if (typeof b !== 'function' && b !== null)\n throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');\n extendStatics(d, b);\n function __() { this.constructor = d; }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = (<any>Object).assign || function __assign(t: any) {\n for (var s: any, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nexport function __rest(s: any, e: any) {\n var t: any = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n for (var i = 0, q = Object.getOwnPropertySymbols(s); i < q.length; i++) {\n if (e.indexOf(q[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, q[i]))\n t[q[i]] = s[q[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators: any, target: any, key: any, desc: any) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);\n // eslint-disable-next-line no-cond-assign\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __awaiter(thisArg: any, _arguments: any, P: any, generator: any) {\n function adopt(value: any) { return value instanceof P ? value : new P(function (resolve: any) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve: any, reject: any) {\n function fulfilled(value: any) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value: any) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }\n function step(result: any) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg: any, body: any) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: <any>[], ops: <any>[] }, f: any, y: any, t: any, g: any;\n return g = { next: verb(0), 'throw': verb(1), 'return': verb(2) }, typeof Symbol === 'function' && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n: any) { return function (v: any) { return step([n, v]); }; }\n function step(op: any) {\n if (f) throw new TypeError('Generator is already executing.');\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { (<any>_) = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport function __spreadArray (to: any, from: any, pack: any) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar: any; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}","import { IPDFFormAdapter } from './adapter';\nexport class PDFLibAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const { PDFDocument, PDFTextField, PDFCheckBox, PDFRadioGroup, PDFDropdown } = this.pdfLibrary;\n const pdfDoc = await PDFDocument.load(template);\n const form = pdfDoc.getForm();\n const fields = form.getFields();\n fields.forEach((field: any) => {\n const fieldName = field.getName();\n const value = data[fieldName];\n if(value === null || value === undefined) return;\n if (field instanceof PDFTextField) {\n field.setText(value);\n }\n else if (field instanceof PDFCheckBox) {\n if (value) field.check(); else field.uncheck();\n }\n else if (field instanceof PDFRadioGroup || field instanceof PDFDropdown) {\n field.select(value.toString());\n }\n });\n\n return await pdfDoc.save();\n }\n}\n","import { IPDFFormAdapter } from './adapter';\nexport class PDFJSAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const pdfjsLib = this.pdfLibrary;\n const doc = await pdfjsLib.getDocument(template).promise;\n const numPages = doc.numPages;\n\n // Process all pages\n for (let pageNum = 1; pageNum <= numPages; pageNum++) {\n const page = await doc.getPage(pageNum);\n const annotations = await page.getAnnotations();\n annotations.forEach((field: any) => {\n if (field.fieldType == undefined) return;\n const value = data[field.fieldName];\n if (value) {\n if(field.radioButton && field.buttonValue != value) {\n return;\n }\n doc.annotationStorage.setValue(field.id, { value });\n }\n });\n }\n\n return await doc.saveDocument();\n }\n}\n","import FormMap from './map';\r\nimport { IPDFFormAdapter } from './adapters/adapter';\r\n\r\n/**\r\n * An object that configures the [`PDFFormFiller`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfformfiller) plugin.\r\n *\r\n * Pass this object to the `PDFFormFiller` constructor:\r\n *\r\n * ```js\r\n * const form = new PDFFormFiller.PDFFormFiller(pdfFormFillerOptions);\r\n *\r\n * // In modular applications:\r\n * import { PDFFormFiller } from \"survey-pdf/pdf-form-filler\";\r\n * const form = new PDFFormFiller(pdfFormFillerOptions);\r\n * ```\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\ninterface IPDFFormFillerOptions {\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n fieldMap?: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n data?: any;\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfTemplate?: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfLibraryAdapter?: IPDFFormAdapter;\r\n}\r\n/**\r\n * A base class for the `PDFFormFiller` plugin.\r\n */\r\nexport abstract class PDFFormFillerBase {\r\n constructor (options?: IPDFFormFillerOptions) {\r\n if(options) {\r\n this.data = options.data;\r\n this.fieldMap = options.fieldMap;\r\n this.pdfTemplate = options.pdfTemplate;\r\n this.pdfLibraryAdapter = options.pdfLibraryAdapter;\r\n }\r\n }\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfTemplate: any;\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public fieldMap: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public data: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfLibraryAdapter?: IPDFFormAdapter;\r\n\r\n protected async getPDFBytes() {\r\n const map = new FormMap(this.fieldMap);\r\n const plainData = map.mapData(this.data);\r\n return await this.pdfLibraryAdapter?.fillForm(this.pdfTemplate, plainData);\r\n }\r\n /**\r\n * An asynchronous method that allows you to get PDF content in different formats.\r\n * @param type *(Optional)* One of `\"blob\"`, `\"bloburl\"`, `\"dataurlstring\"`. Do not specify this parameter if you want to get raw PDF content as a string value.\r\n */\r\n public async raw(type?: 'blob' | 'bloburl' | 'dataurlstring') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if (!type || !pdfBytes) return pdfBytes;\r\n if (type == 'dataurlstring') return 'data:application/pdf;base64,' + btoa(String.fromCharCode.apply(null, pdfBytes));\r\n const blob = new Blob([pdfBytes], { type: 'application/pdf' });\r\n if (type == 'blob') return blob;\r\n if (type == 'bloburl') return URL.createObjectURL(blob);\r\n return pdfBytes;\r\n }\r\n\r\n protected abstract saveToFile(pdfBytes:string, fileName: string): Promise<void>;\r\n /**\r\n * An asynchronous method that starts to download the filled PDF form in the web browser.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"FilledForm.pdf\"`.\r\n */\r\n public async save(fileName: string = 'FilledForm.pdf') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if(!pdfBytes) return;\r\n await this.saveToFile(pdfBytes, fileName);\r\n }\r\n}","import { PDFFormFillerBase } from './forms-base';\r\nimport { writeFile } from 'fs';\r\n\r\nexport class PDFFormFiller extends PDFFormFillerBase {\r\n public async saveToFile(pdfBytes: string, fileName: string) {\r\n return new Promise<void>((resolve, reject) => {\r\n writeFile(fileName, pdfBytes, (err) => {\r\n if (err) reject(err);\r\n else resolve();\r\n });\r\n });\r\n }\r\n}","export default class FormsMap {\n private res: any = {};\n constructor(private map: any) { }\n private mapDataRecursive(data: any, map: any) {\n if(data === undefined || data === null) return;\n if (typeof(data) !== 'object') {\n if(Array.isArray(map)) {\n map.forEach((m) => {\n this.mapDataRecursive(data, m);\n });\n return;\n }\n if (typeof(map) !== 'object') {\n this.res[map] = data;\n } else {\n this.res[map[data].field] = map[data].value;\n }\n return;\n }\n if (Array.isArray(data)) {\n data.forEach((d, i) => {\n this.mapDataRecursive(d, Array.isArray(map) ? map[i] : map);\n });\n return;\n }\n Object.keys(data).forEach(key => {\n this.mapDataRecursive(data[key], map[key]);\n });\n }\n mapData(data: any) {\n this.res = {};\n this.mapDataRecursive(data, this.map);\n return this.res;\n }\n}","module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export { PDFFormFiller } from '../pdf_forms/forms-node';\r\nexport { PDFLibAdapter } from '../pdf_forms/adapters/pdf-lib';\r\nexport { PDFJSAdapter } from '../pdf_forms/adapters/pdfjs';"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"pdf-form-filler.node.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O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,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,UAAC,CAAC,EAAE,CAAC;gBACd,KAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;YACH,OAAO;QACX,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,aAAG;YACzB,KAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACP,CAAC;IACD,0BAAO,GAAP,UAAQ,IAAS;QACb,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IACL,eAAC;AAAD,CAAC;;;;;;;;;;;;AClCD,gD;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;ACNwD;AACM;AACH","sources":["webpack://PDFFormFiller/webpack/universalModuleDefinition","webpack://PDFFormFiller/./src/entries/helpers.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdf-lib.ts","webpack://PDFFormFiller/./src/pdf_forms/adapters/pdfjs.ts","webpack://PDFFormFiller/./src/pdf_forms/forms-base.ts","webpack://PDFFormFiller/./src/pdf_forms/forms-node.ts","webpack://PDFFormFiller/./src/pdf_forms/map.ts","webpack://PDFFormFiller/external umd \"fs\"","webpack://PDFFormFiller/webpack/bootstrap","webpack://PDFFormFiller/webpack/runtime/compat get default export","webpack://PDFFormFiller/webpack/runtime/define property getters","webpack://PDFFormFiller/webpack/runtime/hasOwnProperty shorthand","webpack://PDFFormFiller/webpack/runtime/make namespace object","webpack://PDFFormFiller/./src/entries/forms-node.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"fs\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"PDFFormFiller\", [\"fs\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PDFFormFiller\"] = factory(require(\"fs\"));\n\telse\n\t\troot[\"PDFFormFiller\"] = factory(root[\"fs\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE_fs__) => {\nreturn ","declare var Reflect: any;\n\nvar extendStatics = function(d: any, b: any): any {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d: any, b: any) {\n if (typeof b !== 'function' && b !== null)\n throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');\n extendStatics(d, b);\n function __() { this.constructor = d; }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = (<any>Object).assign || function __assign(t: any) {\n for (var s: any, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nexport function __rest(s: any, e: any) {\n var t: any = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n for (var i = 0, q = Object.getOwnPropertySymbols(s); i < q.length; i++) {\n if (e.indexOf(q[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, q[i]))\n t[q[i]] = s[q[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators: any, target: any, key: any, desc: any) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);\n // eslint-disable-next-line no-cond-assign\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __awaiter(thisArg: any, _arguments: any, P: any, generator: any) {\n function adopt(value: any) { return value instanceof P ? value : new P(function (resolve: any) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve: any, reject: any) {\n function fulfilled(value: any) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value: any) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }\n function step(result: any) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg: any, body: any) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: <any>[], ops: <any>[] }, f: any, y: any, t: any, g: any;\n return g = { next: verb(0), 'throw': verb(1), 'return': verb(2) }, typeof Symbol === 'function' && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n: any) { return function (v: any) { return step([n, v]); }; }\n function step(op: any) {\n if (f) throw new TypeError('Generator is already executing.');\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { (<any>_) = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport function __spreadArray (to: any, from: any, pack: any) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar: any; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}","import { IPDFFormAdapter } from './adapter';\nexport class PDFLibAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const { PDFDocument, PDFTextField, PDFCheckBox, PDFRadioGroup, PDFDropdown } = this.pdfLibrary;\n const pdfDoc = await PDFDocument.load(template);\n const form = pdfDoc.getForm();\n const fields = form.getFields();\n fields.forEach((field: any) => {\n const fieldName = field.getName();\n const value = data[fieldName];\n if(value === null || value === undefined) return;\n if (field instanceof PDFTextField) {\n field.setText(value);\n }\n else if (field instanceof PDFCheckBox) {\n if (value) field.check(); else field.uncheck();\n }\n else if (field instanceof PDFRadioGroup || field instanceof PDFDropdown) {\n field.select(value.toString());\n }\n });\n\n return await pdfDoc.save();\n }\n}\n","import { IPDFFormAdapter } from './adapter';\nexport class PDFJSAdapter implements IPDFFormAdapter {\n constructor (private pdfLibrary: any) { }\n public async fillForm(template: any, data: any) {\n const pdfjsLib = this.pdfLibrary;\n const doc = await pdfjsLib.getDocument(template).promise;\n const numPages = doc.numPages;\n\n // Process all pages\n for (let pageNum = 1; pageNum <= numPages; pageNum++) {\n const page = await doc.getPage(pageNum);\n const annotations = await page.getAnnotations();\n annotations.forEach((field: any) => {\n if (field.fieldType == undefined) return;\n const value = data[field.fieldName];\n if (value) {\n if(field.radioButton && field.buttonValue != value) {\n return;\n }\n doc.annotationStorage.setValue(field.id, { value });\n }\n });\n }\n\n return await doc.saveDocument();\n }\n}\n","import FormMap from './map';\r\nimport { IPDFFormAdapter } from './adapters/adapter';\r\n\r\n/**\r\n * An object that configures the [`PDFFormFiller`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfformfiller) plugin.\r\n *\r\n * Pass this object to the `PDFFormFiller` constructor:\r\n *\r\n * ```js\r\n * const form = new PDFFormFiller.PDFFormFiller(pdfFormFillerOptions);\r\n *\r\n * // In modular applications:\r\n * import { PDFFormFiller } from \"survey-pdf/pdf-form-filler\";\r\n * const form = new PDFFormFiller(pdfFormFillerOptions);\r\n * ```\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\ninterface IPDFFormFillerOptions {\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n fieldMap?: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n data?: any;\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfTemplate?: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n pdfLibraryAdapter?: IPDFFormAdapter;\r\n}\r\n/**\r\n * A base class for the `PDFFormFiller` plugin.\r\n */\r\nexport abstract class PDFFormFillerBase {\r\n constructor (options?: IPDFFormFillerOptions) {\r\n if(options) {\r\n this.data = options.data;\r\n this.fieldMap = options.fieldMap;\r\n this.pdfTemplate = options.pdfTemplate;\r\n this.pdfLibraryAdapter = options.pdfLibraryAdapter;\r\n }\r\n }\r\n /**\r\n * A PDF document with interactive form fields that you want to fill.\r\n *\r\n * Because this document is passed on to a third-party library, the type of accepted values depends on this library.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfTemplate: any;\r\n /**\r\n * An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.\r\n *\r\n * The easiest way to build a field map is to access the data object with respondent answers using the `SurveyModel`'s `data` property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as [Checkboxes](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/), [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/) require a different configuration. Refer to the following demos for code examples.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public fieldMap: any;\r\n /**\r\n * An object with data used to populate the PDF document.\r\n *\r\n * Use the [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)'s [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property to access this data object.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public data: any;\r\n /**\r\n * An adapter that serves as a bridge between the `PDFFormFiller` plugin and a specific third-party library.\r\n *\r\n * SurveyJS PDF Generator provides adapters for [`pdf-lib`](https://pdf-lib.js.org/) and [PDF.js](https://mozilla.github.io/pdf.js/) out of the box. Pass the libraries to the `PDFLibAdapter` or `PDFJSAdapter` constructor and assign the resulting instance to the `pdfLibraryAdapter` property.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n */\r\n public pdfLibraryAdapter?: IPDFFormAdapter;\r\n\r\n protected async getPDFBytes() {\r\n const map = new FormMap(this.fieldMap);\r\n const plainData = map.mapData(this.data);\r\n return await this.pdfLibraryAdapter?.fillForm(this.pdfTemplate, plainData);\r\n }\r\n /**\r\n * An asynchronous method that allows you to get PDF content in different formats.\r\n * @param type *(Optional)* One of `\"blob\"`, `\"bloburl\"`, `\"dataurlstring\"`. Do not specify this parameter if you want to get raw PDF content as a string value.\r\n */\r\n public async raw(type?: 'blob' | 'bloburl' | 'dataurlstring') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if (!type || !pdfBytes) return pdfBytes;\r\n if (type == 'dataurlstring') return 'data:application/pdf;base64,' + btoa(String.fromCharCode.apply(null, pdfBytes));\r\n const blob = new Blob([pdfBytes], { type: 'application/pdf' });\r\n if (type == 'blob') return blob;\r\n if (type == 'bloburl') return URL.createObjectURL(blob);\r\n return pdfBytes;\r\n }\r\n\r\n protected abstract saveToFile(pdfBytes:string, fileName: string): Promise<void>;\r\n /**\r\n * An asynchronous method that starts to download the filled PDF form in the web browser.\r\n *\r\n * [View pdf-lib Demo](https://surveyjs.io/pdf-generator/examples/map-survey-responses-to-pdf-fields-using-pdflib/ (linkStyle))\r\n *\r\n * [View PDF.js Demo](https://surveyjs.io/pdf-generator/examples/fill-in-pdf-form-fields-with-dynamic-survey-data-using-pdfjs/ (linkStyle))\r\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"FilledForm.pdf\"`.\r\n */\r\n public async save(fileName: string = 'FilledForm.pdf') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if(!pdfBytes) return;\r\n await this.saveToFile(pdfBytes, fileName);\r\n }\r\n}","import { PDFFormFillerBase } from './forms-base';\r\nimport { writeFile } from 'fs';\r\n\r\nexport class PDFFormFiller extends PDFFormFillerBase {\r\n public async saveToFile(pdfBytes: string, fileName: string) {\r\n return new Promise<void>((resolve, reject) => {\r\n writeFile(fileName, pdfBytes, (err) => {\r\n if (err) reject(err);\r\n else resolve();\r\n });\r\n });\r\n }\r\n}","export default class FormsMap {\n private res: any = {};\n constructor(private map: any) { }\n private mapDataRecursive(data: any, map: any) {\n if(data === undefined || data === null) return;\n if (typeof(data) !== 'object') {\n if(Array.isArray(map)) {\n map.forEach((m) => {\n this.mapDataRecursive(data, m);\n });\n return;\n }\n if (typeof(map) !== 'object') {\n this.res[map] = data;\n } else {\n this.res[map[data].field] = map[data].value;\n }\n return;\n }\n if (Array.isArray(data)) {\n data.forEach((d, i) => {\n this.mapDataRecursive(d, Array.isArray(map) ? map[i] : map);\n });\n return;\n }\n Object.keys(data).forEach(key => {\n this.mapDataRecursive(data[key], map[key]);\n });\n }\n mapData(data: any) {\n this.res = {};\n this.mapDataRecursive(data, this.map);\n return this.res;\n }\n}","module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export { PDFFormFiller } from '../pdf_forms/forms-node';\r\nexport { PDFLibAdapter } from '../pdf_forms/adapters/pdf-lib';\r\nexport { PDFJSAdapter } from '../pdf_forms/adapters/pdfjs';"],"names":[],"sourceRoot":""}
|
package/survey.pdf.fonts.js
CHANGED