survey-pdf 2.0.8 → 2.0.9

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdf-form-filler.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,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,IAAI;QACrC,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;IAC9F,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,SAAS,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;IACvC,6DAA6D;IAC7D,aAAa;IACb,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CA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;;;;;;;;;;;;;;;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: string, 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: string, data: any) {\n const pdfjsLib = this.pdfLibrary;\n const doc = await pdfjsLib.getDocument(template).promise;\n const page = await doc.getPage(1);\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 return await doc.saveDocument();\n }\n}\n","import FormMap from './map';\r\nimport { IPDFFormAdapter } from './adapters/adapter';\r\nimport { writeFileSync } from 'fs';\r\n\r\ninterface IPDFFormFillerOptions{\r\n fieldMap: any;\r\n data: any;\r\n pdfTemplate: string;\r\n pdfLibraryAdapter: IPDFFormAdapter;\r\n}\r\nexport abstract class PDFFormFillerBase {\r\n constructor (options: IPDFFormFillerOptions = null) {\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 public pdfTemplate: string;\r\n public fieldMap: any;\r\n public data: any;\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 *\r\n * [View Demo](https://surveyjs.io/pdf-generator/examples/convert-pdf-form-blob-base64-raw-pdf-javascript/ (linkStyle))\r\n *\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 */\r\n public async raw(type?: 'blob' | 'bloburl' | 'dataurlstring') {\r\n const pdfBytes = await this.getPDFBytes();\r\n if (!type) return pdfBytes;\r\n if (type == 'dataurlstring') return 'data:text/plain;base64,' + btoa(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 download of the generated PDF file in the web browser.\r\n *\r\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"survey_result.pdf\"`.\r\n */\r\n public async save(fileName: string = 'survey_result.pdf') {\r\n const pdfBytes = await this.getPDFBytes();\r\n await this.saveToFile(pdfBytes, fileName);\r\n }\r\n}","import { PDFFormFillerBase } from './forms-base';\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":""}
@@ -0,0 +1,2 @@
1
+ /*! For license information please see pdf-form-filler.min.js.LICENSE.txt */
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("PDFFormFiller",[],e):"object"==typeof exports?exports.PDFFormFiller=e():t.PDFFormFiller=e()}(this,(()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{PDFFormFiller:()=>a,PDFJSAdapter:()=>c,PDFLibAdapter:()=>u});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},r(t,e)};function n(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}const i=function(){function t(t){this.map=t,this.res={}}return t.prototype.mapDataRecursive=function(t,e){var r=this;if(null!=t)return"object"!=typeof t?Array.isArray(e)?void e.forEach((function(e){r.mapDataRecursive(t,e)})):void("object"!=typeof e?this.res[e]=t:this.res[e[t].field]=e[t].value):void(Array.isArray(t)?t.forEach((function(t,n){r.mapDataRecursive(t,Array.isArray(e)?e[n]:e)})):Object.keys(t).forEach((function(n){r.mapDataRecursive(t[n],e[n])})))},t.prototype.mapData=function(t){return this.res={},this.mapDataRecursive(t,this.map),this.res},t}();var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.saveToFile=function(t,e){return n(this,void 0,void 0,(function(){var r,n;return o(this,(function(o){return r=new Blob([t],{type:"application/pdf"}),(n=document.createElement("a")).href=URL.createObjectURL(r),n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(n.href),[2]}))}))},e}(function(){function t(t){void 0===t&&(t=null),t&&(this.data=t.data,this.fieldMap=t.fieldMap,this.pdfTemplate=t.pdfTemplate,this.pdfLibraryAdapter=t.pdfLibraryAdapter)}return t.prototype.getPDFBytes=function(){return n(this,void 0,void 0,(function(){var t,e;return o(this,(function(r){switch(r.label){case 0:return t=new i(this.fieldMap),e=t.mapData(this.data),[4,this.pdfLibraryAdapter.fillForm(this.pdfTemplate,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.raw=function(t){return n(this,void 0,void 0,(function(){var e,r;return o(this,(function(n){switch(n.label){case 0:return[4,this.getPDFBytes()];case 1:return e=n.sent(),t?"dataurlstring"==t?[2,"data:text/plain;base64,"+btoa(e)]:(r=new Blob([e],{type:"application/pdf"}),"blob"==t?[2,r]:"bloburl"==t?[2,URL.createObjectURL(r)]:[2,e]):[2,e]}}))}))},t.prototype.save=function(){return n(this,arguments,void 0,(function(t){var e;return void 0===t&&(t="survey_result.pdf"),o(this,(function(r){switch(r.label){case 0:return[4,this.getPDFBytes()];case 1:return e=r.sent(),[4,this.saveToFile(e,t)];case 2:return r.sent(),[2]}}))}))},t}()),u=function(){function t(t){this.pdfLibrary=t}return t.prototype.fillForm=function(t,e){return n(this,void 0,void 0,(function(){var r,n,i,a,u,c,s;return o(this,(function(o){switch(o.label){case 0:return r=this.pdfLibrary,n=r.PDFDocument,i=r.PDFTextField,a=r.PDFCheckBox,u=r.PDFRadioGroup,c=r.PDFDropdown,[4,n.load(t)];case 1:return s=o.sent(),s.getForm().getFields().forEach((function(t){var r=t.getName(),n=e[r];null!=n&&(t instanceof i?t.setText(n):t instanceof a?n?t.check():t.uncheck():(t instanceof u||t instanceof c)&&t.select(n.toString()))})),[4,s.save()];case 2:return[2,o.sent()]}}))}))},t}(),c=function(){function t(t){this.pdfLibrary=t}return t.prototype.fillForm=function(t,e){return n(this,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return[4,this.pdfLibrary.getDocument(t).promise];case 1:return[4,(r=n.sent()).getPage(1)];case 2:return[4,n.sent().getAnnotations()];case 3:return n.sent().forEach((function(t){if(null!=t.fieldType){var n=e[t.fieldName];if(n){if(t.radioButton&&t.buttonValue!=n)return;r.annotationStorage.setValue(t.id,{value:n})}}})),[4,r.saveDocument()];case 4:return[2,n.sent()]}}))}))},t}();return e})()));
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * surveyjs - SurveyJS PDF library v2.0.9
3
+ * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
+ * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
+ */