@signiphi/page-assembly 0.2.0-beta.4 → 0.2.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1019,8 +1019,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1019
1019
  try {
1020
1020
  const fieldType = typeof field.type === "string" ? field.type : field.type;
1021
1021
  switch (fieldType) {
1022
- case "text" /* TEXT */:
1023
- case "text": {
1022
+ case "text" /* TEXT */: {
1024
1023
  const encodedName = encodeFieldNameWithSigner(uniqueFieldName, field.assignedSignerEmail);
1025
1024
  const textField = form.createTextField(encodedName);
1026
1025
  textField.addToPage(page, {
@@ -1065,8 +1064,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1065
1064
  }
1066
1065
  break;
1067
1066
  }
1068
- case "checkbox" /* CHECKBOX */:
1069
- case "checkbox": {
1067
+ case "checkbox" /* CHECKBOX */: {
1070
1068
  const encodedName = encodeFieldNameWithSigner(uniqueFieldName, field.assignedSignerEmail);
1071
1069
  const checkBox = form.createCheckBox(encodedName);
1072
1070
  checkBox.addToPage(page, {
@@ -1097,8 +1095,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1097
1095
  }
1098
1096
  break;
1099
1097
  }
1100
- case "signature" /* SIGNATURE */:
1101
- case "signature": {
1098
+ case "signature" /* SIGNATURE */: {
1102
1099
  const baseWithSuffix = field.name.endsWith("_signature") ? field.name : `${field.name}_signature`;
1103
1100
  const finalName = conflictingNames.has(field.name) ? `${baseWithSuffix}_p${field.position.page}` : baseWithSuffix;
1104
1101
  const encodedName = encodeFieldNameWithLabelAndSigner(finalName, field.label, field.assignedSignerEmail);
@@ -1120,8 +1117,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1120
1117
  }
1121
1118
  break;
1122
1119
  }
1123
- case "initials" /* INITIALS */:
1124
- case "initials": {
1120
+ case "initials" /* INITIALS */: {
1125
1121
  const baseWithSuffix = field.name.endsWith("_initials") ? field.name : `${field.name}_initials`;
1126
1122
  const finalName = conflictingNames.has(field.name) ? `${baseWithSuffix}_p${field.position.page}` : baseWithSuffix;
1127
1123
  const encodedName = encodeFieldNameWithLabelAndSigner(finalName, field.label, field.assignedSignerEmail);
@@ -1143,8 +1139,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1143
1139
  }
1144
1140
  break;
1145
1141
  }
1146
- case "date" /* DATE */:
1147
- case "date": {
1142
+ case "date" /* DATE */: {
1148
1143
  const baseWithSuffix = field.name.endsWith("_date") ? field.name : `${field.name}_date`;
1149
1144
  const finalName = conflictingNames.has(field.name) ? `${baseWithSuffix}_p${field.position.page}` : baseWithSuffix;
1150
1145
  const encodedName = encodeFieldNameWithLabelAndSigner(finalName, field.label, field.assignedSignerEmail);
@@ -1165,8 +1160,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1165
1160
  }
1166
1161
  break;
1167
1162
  }
1168
- case "dropdown" /* DROPDOWN */:
1169
- case "dropdown": {
1163
+ case "dropdown" /* DROPDOWN */: {
1170
1164
  const encodedName = encodeFieldNameWithSigner(uniqueFieldName, field.assignedSignerEmail);
1171
1165
  const dropdown = form.createDropdown(encodedName);
1172
1166
  dropdown.addToPage(page, {
@@ -1199,8 +1193,7 @@ async function addFormFieldsToPdf(pdfBytes, formFields, options = {}) {
1199
1193
  }
1200
1194
  break;
1201
1195
  }
1202
- case "radio" /* RADIO */:
1203
- case "radio": {
1196
+ case "radio" /* RADIO */: {
1204
1197
  const encodedName = encodeFieldNameWithSigner(uniqueFieldName, field.assignedSignerEmail);
1205
1198
  const radioGroup = form.createRadioGroup(encodedName);
1206
1199
  if (field.options && field.options.length > 0) {
@@ -2642,8 +2635,7 @@ function debounce(func, wait) {
2642
2635
  timeout = setTimeout(() => func(...args), wait);
2643
2636
  });
2644
2637
  }
2645
- var PageAssembler_default = PageAssembler;
2646
2638
 
2647
- export { Button, FormFieldType, PageAssembler, addFormFieldsToPdf, createPdfBlobUrl, PageAssembler_default as default, downloadPdf, extractFieldsFromPdf, getSigniphiMetadata, imageToPdf, mapFieldPositionsAfterAssembly, pdfToImages, setSigniphiMetadata };
2639
+ export { Button, FormFieldType, PageAssembler, addFormFieldsToPdf, createPdfBlobUrl, downloadPdf, extractFieldsFromPdf, getSigniphiMetadata, imageToPdf, mapFieldPositionsAfterAssembly, pdfToImages, setSigniphiMetadata };
2648
2640
  //# sourceMappingURL=index.mjs.map
2649
2641
  //# sourceMappingURL=index.mjs.map