From dc24ae3631403a47af979fec9d6ec8fea06cf2ab Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 31 Oct 2023 09:05:24 +0100 Subject: [PATCH] 31-10-2023 --- .../Entities/EnvelopeReceiver.vb | 11 +- EnvelopeGenerator.Common/Helpers.vb | 13 +- .../Models/EnvelopeModel.vb | 5 +- .../Models/ReceiverModel.vb | 5 +- EnvelopeGenerator.Web/Handler/FileHandler.cs | 51 ++- EnvelopeGenerator.Web/Pages/Index.razor | 18 +- EnvelopeGenerator.Web/Scripts/app.ts | 106 +++-- EnvelopeGenerator.Web/Scripts/index.d.ts | 382 +++++++++--------- EnvelopeGenerator.Web/wwwroot/js/app.js | 104 ++++- EnvelopeGenerator.Web/wwwroot/js/app.js.map | 2 +- 10 files changed, 434 insertions(+), 263 deletions(-) diff --git a/EnvelopeGenerator.Common/Entities/EnvelopeReceiver.vb b/EnvelopeGenerator.Common/Entities/EnvelopeReceiver.vb index e1fd94ca..e64e29f8 100644 --- a/EnvelopeGenerator.Common/Entities/EnvelopeReceiver.vb +++ b/EnvelopeGenerator.Common/Entities/EnvelopeReceiver.vb @@ -3,17 +3,14 @@ Public Class EnvelopeReceiver Public Property Id As Integer Public Property UserId As Integer + Public Property Signature As String Public Property Name As String Public Property Company As String = "" Public Property JobTitle As String = "" Public Property Email As String - Public ReadOnly Property Signature As String - Get - Return StringEx.GetChecksum(Email.ToUpper) - End Get - End Property + Public ReadOnly Property HasId As Boolean Get Return Id > 0 @@ -23,4 +20,8 @@ Public Class EnvelopeReceiver Public Property Sequence As Integer = 0 Public Property PrivateMessage As String = "" Public Property AccessCode As String = "" + + Public Function GetSignature() As String + Return StringEx.GetChecksum(Email.ToUpper) + End Function End Class diff --git a/EnvelopeGenerator.Common/Helpers.vb b/EnvelopeGenerator.Common/Helpers.vb index d5290ad5..9d5fc5c5 100644 --- a/EnvelopeGenerator.Common/Helpers.vb +++ b/EnvelopeGenerator.Common/Helpers.vb @@ -8,8 +8,10 @@ ''' The EnvelopeKey Public Shared Function EncodeEnvelopeReceiverId(pEnvelopeUuid As String, pReceiverSignature As String) As String Dim oString = $"{pEnvelopeUuid}::{pReceiverSignature}" - 'TODO: Verschlüsseln - Return oString + Dim oBytes = Text.Encoding.UTF8.GetBytes(oString) + Dim oBase64String = Convert.ToBase64String(oBytes) + + Return oBase64String End Function ''' @@ -18,13 +20,14 @@ ''' The EnvelopeKey ''' A tuple containing EnvelopeUUID and Receiver Signature Public Shared Function DecodeEnvelopeReceiverId(pEnvelopeReceiverId As String) As Tuple(Of String, String) - Dim oSplit = pEnvelopeReceiverId.Split(New String() {"::"}, StringSplitOptions.None) - 'TODO: Entschlüsseln + Dim oBytes = Convert.FromBase64String(pEnvelopeReceiverId) + Dim oString = Text.Encoding.UTF8.GetString(oBytes) + Dim oSplit = oString.Split(New String() {"::"}, StringSplitOptions.None) + Return New Tuple(Of String, String)(oSplit(0), oSplit(1)) End Function Public Shared Function GetEnvelopeURL(pHost As String, pEnvelopeUuid As String, pReceiverSignature As String) As String - Dim oEnvelopeUserReference As String = EncodeEnvelopeReceiverId(pEnvelopeUuid, pReceiverSignature) Dim oURL As String = String.Format("{0}/EnvelopeKey/{1}", pHost.Trim(), oEnvelopeUserReference) Return oURL diff --git a/EnvelopeGenerator.Common/Models/EnvelopeModel.vb b/EnvelopeGenerator.Common/Models/EnvelopeModel.vb index 446de19f..17ebfd34 100644 --- a/EnvelopeGenerator.Common/Models/EnvelopeModel.vb +++ b/EnvelopeGenerator.Common/Models/EnvelopeModel.vb @@ -6,12 +6,14 @@ Imports DigitalData.Modules.Logging Public Class EnvelopeModel Inherits BaseModel - Private UserModel As UserModel + Private ReadOnly UserModel As UserModel + Private ReadOnly ReceiverModel As ReceiverModel Public Sub New(pState As State) MyBase.New(pState) UserModel = New UserModel(pState) + ReceiverModel = New ReceiverModel(pState) End Sub Private Function ToEnvelope(pRow As DataRow) As Envelope @@ -29,6 +31,7 @@ Public Class EnvelopeModel } oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId) + oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id) Return oEnvelope End Function diff --git a/EnvelopeGenerator.Common/Models/ReceiverModel.vb b/EnvelopeGenerator.Common/Models/ReceiverModel.vb index bae5ba29..eca2b3cf 100644 --- a/EnvelopeGenerator.Common/Models/ReceiverModel.vb +++ b/EnvelopeGenerator.Common/Models/ReceiverModel.vb @@ -14,7 +14,8 @@ Public Class ReceiverModel .Id = pRow.ItemEx("GUID", 0), .Email = pRow.ItemEx("EMAIL_ADDRESS", ""), .Name = pRow.ItemEx("NAME", ""), - .Sequence = pRow.ItemEx("SEQUENCE", 0) + .Sequence = pRow.ItemEx("SEQUENCE", 0), + .Signature = pRow.ItemEx("SIGNATURE", "") } End Function @@ -40,7 +41,7 @@ Public Class ReceiverModel Dim oCommand = New SqlCommand(oSql) oCommand.Parameters.Add("EMAIL", SqlDbType.NVarChar).Value = pReceiver.Email - oCommand.Parameters.Add("SIGNATURE", SqlDbType.NVarChar).Value = pReceiver.Signature + oCommand.Parameters.Add("SIGNATURE", SqlDbType.NVarChar).Value = pReceiver.GetSignature() Dim oResult = Database.ExecuteNonQuery(oCommand) If oResult = True Then diff --git a/EnvelopeGenerator.Web/Handler/FileHandler.cs b/EnvelopeGenerator.Web/Handler/FileHandler.cs index 7b5bab5a..3d80c62c 100644 --- a/EnvelopeGenerator.Web/Handler/FileHandler.cs +++ b/EnvelopeGenerator.Web/Handler/FileHandler.cs @@ -12,6 +12,31 @@ namespace EnvelopeGenerator.Web.Handler { public class FileHandler { + public class PostResult + { + readonly bool Ok = true; + readonly string ErrorMessage = ""; + readonly ErrorType ErrorType = ErrorType.None; + + public PostResult() + { + Ok = true; + } + + public PostResult(ErrorType errorType, string errorMessage) + { + Ok = false; + ErrorType = errorType; + ErrorMessage = errorMessage; + } + } + + public enum ErrorType + { + None, + ServerError + } + /// /// URL: GET /api/envelope/{envelopeKey} /// @@ -76,7 +101,10 @@ namespace EnvelopeGenerator.Web.Handler { // Better error handling & reporting logger.Error(e); - return Results.Problem(); + return Results.Problem( + statusCode: 500, + detail: e.Message, + type: ErrorType.ServerError.ToString()); } } @@ -91,11 +119,11 @@ namespace EnvelopeGenerator.Web.Handler // Load Envelope from EnvelopeKey string envelopeKey = EnsureValidEnvelopeKey(logger, ctx.Request); - EnvelopeResponse r = database.LoadEnvelope(envelopeKey); + EnvelopeResponse response = database.LoadEnvelope(envelopeKey); // Get the document Index int documentId = EnsureValidDocumentIndex(logger, ctx.Request); - var document = GetDocument(r.Envelope, documentId); + var document = GetDocument(response.Envelope, documentId); using FileStream fs = new(document.Filepath, FileMode.Open); await ctx.Request.Body.CopyToAsync(fs); @@ -107,7 +135,10 @@ namespace EnvelopeGenerator.Web.Handler { // Better error handling & reporting logger.Error(e); - return Results.Problem(); + return Results.Problem( + statusCode: 500, + detail: e.Message, + type: ErrorType.ServerError.ToString()); } } @@ -151,10 +182,17 @@ namespace EnvelopeGenerator.Web.Handler { // Better error handling & reporting logger.Error(e); - return Results.Problem(); + return Results.Problem( + statusCode: 500, + detail: e.Message, + type: ErrorType.ServerError.ToString()); } + } + #region Private + + private State GetState(LogConfig LogConfig, MSSQLServer Database) { return new State @@ -235,5 +273,8 @@ namespace EnvelopeGenerator.Web.Handler return document; } + #endregion } + + } diff --git a/EnvelopeGenerator.Web/Pages/Index.razor b/EnvelopeGenerator.Web/Pages/Index.razor index fe38ccb5..8eba6f50 100644 --- a/EnvelopeGenerator.Web/Pages/Index.razor +++ b/EnvelopeGenerator.Web/Pages/Index.razor @@ -8,17 +8,31 @@ @code { public List envelopes = new(); + // List envelopes delivered to j.jenne@digitaldata.works + public int receiverId = 11; + + string? getReceiverSignature(Envelope envelope) + { + var receiver = envelope.Receivers.Where(r => r.Id == receiverId).SingleOrDefault(); + return receiver?.Signature; + } + + string getEnvelopeKey(Envelope envelope) + { + return Helpers.EncodeEnvelopeReceiverId(envelope.Uuid, getReceiverSignature(envelope)); + } + protected override void OnInitialized() { // Test - envelopes = Database.LoadEnvelopes(11); + envelopes = Database.LoadEnvelopes(receiverId); } diff --git a/EnvelopeGenerator.Web/Scripts/app.ts b/EnvelopeGenerator.Web/Scripts/app.ts index 37a005e4..6d30741e 100644 --- a/EnvelopeGenerator.Web/Scripts/app.ts +++ b/EnvelopeGenerator.Web/Scripts/app.ts @@ -59,42 +59,82 @@ export class App { } public static async handleClick(eventType: string) { + let result = false; + switch (eventType) { case "RESET": - await App.handleReset(null) + result = await App.handleReset(null) + + if (result == true) { + alert("Dokument zurückgesetzt!"); + } else { + alert("Fehler beim Zurücksetzen des Dokuments!") + } + break; case "FINISH": - await App.handleFinish(null) + result = await App.handleFinish(null) + + if (result == true) { + // TODO: Redirect to success page + alert("Dokument erfolgreich signiert!") + } else { + alert("Fehler beim Abschließen des Dokuments!") + } + break; } } - public static async handleFinish(event: any) { + public static async handleFinish(event: any): Promise { - await App.Instance.save(); + // Save changes before doing anything + try { + await App.Instance.save(); + } catch (e) { + console.error(e); + return false; + } // Export annotation data and save to database - const json = await App.Instance.exportInstantJSON() - console.log(json); - console.log(JSON.stringify(json)); - const result: boolean = await App.Network.postEnvelope(App.envelopeKey, App.currentDocument.id, JSON.stringify(json)) + try { + const json = await App.Instance.exportInstantJSON() + const postEnvelopeResult: boolean = await App.Network.postEnvelope(App.envelopeKey, App.currentDocument.id, JSON.stringify(json)) - if (result == true) { - alert("Dokument erfolgreich signiert!") - } + if (postEnvelopeResult === false) { + return false; + } + + } catch (e) { + console.error(e); + return false; + } + + // Flatten the annotations and save the document to disk + try { + const buffer = await App.Instance.exportPDF({ flatten: true }); + const postDocumentResult: boolean = await App.Network.postDocument(App.envelopeKey, App.currentDocument.id, buffer); + + if (postDocumentResult === false) { + return false; + } + + } catch (e) { + console.error(e); + return false; + } + + return true; - // Flatten the annotations and save the document to disk - /* - const buffer = await App.Instance.exportPDF({ flatten: true }); - const result = await App.Network.postDocument(App.envelopeKey, App.currentDocument.id, buffer); - console.log(result) - */ } - public static async handleReset(event: any) { + public static async handleReset(event: any): Promise { if (confirm("Wollen Sie das Dokument und alle erstellten Signaturen zurücksetzen?")) { const result = App.Annotation.deleteAnnotations(App.Instance) + return true; + } else { + return true; } } @@ -202,18 +242,34 @@ class Network { } public postDocument(envelopeKey: string, documentId: number, buffer: ArrayBuffer): Promise { - return fetch(`/api/document/${envelopeKey}/${documentId}`, { credentials: "include", method: "POST", body: buffer }) - .then(res => res.json()); + const url = `/api/document/${envelopeKey}/${documentId}`; + const options: RequestInit = { + credentials: "include", + method: "POST", + body: buffer + } + + console.debug("PostDocument/Calling url: " + url) + return fetch(url, options) + .then(this.handleResponse) + .then((res: Response) => { + if (!res.ok) { + return false; + }; + return true; + }); } public postEnvelope(envelopeKey: string, documentId: number, jsonString: string): Promise { + const url = `/api/envelope/${envelopeKey}?index=${documentId}`; const options: RequestInit = { credentials: "include", method: "POST", body: jsonString } - return fetch(`/api/envelope/${envelopeKey}?index=${documentId}`, options) + console.debug("PostEnvelope/Calling url: " + url) + return fetch(url, options) .then(this.handleResponse) .then((res: Response) => { if (!res.ok) { @@ -297,18 +353,20 @@ class UI { { type: "custom", id: "button-reset", + className: "button-reset", title: "Zurücksetzen", onPress() { callback("RESET") }, icon: ` - - - ` + + + ` }, { type: "custom", id: "button-finish", + className: "button-finish", title: "Abschließen", onPress() { callback("FINISH") diff --git a/EnvelopeGenerator.Web/Scripts/index.d.ts b/EnvelopeGenerator.Web/Scripts/index.d.ts index b2be715a..9611aff3 100644 --- a/EnvelopeGenerator.Web/Scripts/index.d.ts +++ b/EnvelopeGenerator.Web/Scripts/index.d.ts @@ -5103,6 +5103,7 @@ interface IImageAnnotation extends AnnotationProperties { imageAttachmentId: string | null; isSignature: boolean; xfdfAppearanceStream: string | null; + xfdfAppearanceStreamOriginalPageRotation: number | null; } declare class ImageAnnotation extends Annotation { description: null | string; @@ -5111,6 +5112,7 @@ declare class ImageAnnotation ext imageAttachmentId: string; isSignature: boolean; xfdfAppearanceStream: null | string; + xfdfAppearanceStreamOriginalPageRotation: null | number; static defaultValues: IObject; static readableName: string; } @@ -6067,197 +6069,6 @@ type SerializedAdditionalActionsType = { }; }; -type Glyph = { - c: string; - rect: Rect; -}; - -declare const SearchType: { - readonly TEXT: "text"; - readonly PRESET: "preset"; - readonly REGEX: "regex"; -}; -type ISearchType = (typeof SearchType)[keyof typeof SearchType]; - -declare function toJSON(bookmark: Bookmark): BookmarkJSON; - -type ID$1 = string; -type BookmarkProps = { - id: ID$1 | null; - pdfBookmarkId: ID$1 | null; - name: string | null; - sortKey: number | null; - action: Action | null; -}; -declare const Bookmark_base: Record$1.Factory; -declare class Bookmark extends Bookmark_base { - id: ID$1; - action: Action; - static toSerializableObject: typeof toJSON; - static fromSerializableObject: (bookmark: BookmarkJSON) => Bookmark; -} - -type Rotation$1 = 0 | 90 | 180 | 270; -type AddPageConfiguration = { - backgroundColor: Color; - pageWidth: number; - pageHeight: number; - rotateBy: Rotation$1; - insets?: Rect; -}; -type OperationAttachment = string | File | Blob; -type min = number; -type max = number; -type Range = [min, max]; -type ImportPageIndex = Array; -type DocumentMetadata = { - title?: string; - author?: string; -}; -type NonSerializableDocumentOperations = { - type: 'removePages'; - pageIndexes: Array; -} | { - type: 'duplicatePages'; - pageIndexes: Array; -} | { - type: 'movePages'; - pageIndexes: Array; - afterPageIndex: number; -} | { - type: 'movePages'; - pageIndexes: Array; - beforePageIndex: number; -} | { - type: 'rotatePages'; - pageIndexes: Array; - rotateBy: Rotation$1; -} | { - type: 'keepPages'; - pageIndexes: Array; -} | { - type: 'importDocument'; - afterPageIndex: number; - treatImportedDocumentAsOnePage?: boolean; - document: OperationAttachment; - importedPageIndexes?: ImportPageIndex; -} | { - type: 'importDocument'; - beforePageIndex: number; - treatImportedDocumentAsOnePage?: boolean; - document: OperationAttachment; - importedPageIndexes?: ImportPageIndex; -} | { - type: 'applyInstantJson'; - instantJson: Record; - dataFilePath: OperationAttachment; -} | { - type: 'applyXfdf'; - xfdf: string; - ignorePageRotation?: boolean; - dataFilePath: OperationAttachment; -} | { - type: 'flattenAnnotations'; - pageIndexes?: Array; - annotationIds?: string[]; -} | { - type: 'setPageLabel'; - pageIndexes?: Array; - pageLabel?: string; -} | { - type: 'performOcr'; - pageIndexes?: Array | 'all'; - language: string; -} | { - type: 'applyRedactions'; -} | { - type: 'updateMetadata'; - metadata: DocumentMetadata; -}; -type DocumentOperation = (AddPageConfiguration & { - type: 'addPage'; - afterPageIndex: number; -}) | (AddPageConfiguration & { - type: 'addPage'; - beforePageIndex: number; -}) | { - type: 'cropPages'; - pageIndexes?: Array; - cropBox: Rect; -} | NonSerializableDocumentOperations; - -type BaseFormFieldJSON = { - v: 1; - pdfObjectId?: number | null; - annotationIds: Array; - name: string; - label: string; - flags?: FormFieldFlags; - id: string; - additionalActions?: SerializedAdditionalActionsType; - group?: IGroup; - permissions?: IPermissions; -}; -type ChoiceFormFieldJSON = BaseFormFieldJSON & { - type: 'pspdfkit/form-field/listbox' | 'pspdfkit/form-field/combobox'; - options: Array; - multiSelect: boolean; - commitOnChange: boolean; - defaultValues: Array; -}; -type ListBoxFormFieldJSON = ChoiceFormFieldJSON & { - type: 'pspdfkit/form-field/listbox'; -}; -type DoNotSpellCheckPropertyPair = XOR, Record<'doNotSpellcheck', boolean>>; -type ComboBoxFormFieldJSON = ChoiceFormFieldJSON & { - type: 'pspdfkit/form-field/combobox'; - edit: boolean; -} & DoNotSpellCheckPropertyPair; -type CheckBoxFormFieldJSON = BaseFormFieldJSON & { - type: 'pspdfkit/form-field/checkbox'; - options: Array; - defaultValues: Array; -}; -type RadioButtonFormFieldJSON = BaseFormFieldJSON & { - type: 'pspdfkit/form-field/radio'; - options: Array; - noToggleToOff: boolean; - radiosInUnison: boolean; - defaultValue: string; -}; -type TextFormFieldJSON = BaseFormFieldJSON & { - type: 'pspdfkit/form-field/text'; - password: boolean; - maxLength?: number | null; - doNotScroll: boolean; - multiLine: boolean; - defaultValue: string; - comb: boolean; -} & DoNotSpellCheckPropertyPair; -type ButtonFormFieldJSON = BaseFormFieldJSON & { - type: 'pspdfkit/form-field/button'; - buttonLabel: string | null; -}; -type SignatureFormFieldJSON = BaseFormFieldJSON & { - type: 'pspdfkit/form-field/signature'; -}; -type FormFieldJSON = ListBoxFormFieldJSON | ComboBoxFormFieldJSON | RadioButtonFormFieldJSON | CheckBoxFormFieldJSON | TextFormFieldJSON | ButtonFormFieldJSON | SignatureFormFieldJSON; - -type OCGLayer = { - name: string; - ocgId: number; - radioGroup?: number; -}; -type OCGCollection = { - name?: string; - ocgId?: number; - layers: OCGLayer[]; -}; -type OCG = OCGLayer | OCGCollection; -type OCGVisibilityState = { - visibleOCGIds: number[]; -}; - type IRectJSON = [left: number, top: number, width: number, height: number]; type BaseAnnotationJSON = { @@ -6294,6 +6105,7 @@ type ImageAnnotationJSON = Omit & { rotation: number; isSignature?: boolean; xfdfAppearanceStream?: string; + xfdfAppearanceStreamOriginalPageRotation?: number; }; type ShapeAnnotationJSON = Omit & { strokeWidth: number; @@ -6403,6 +6215,7 @@ type StampAnnotationJSON = Omit & { subtitle: string | null; rotation: number | null; xfdfAppearanceStream?: string; + xfdfAppearanceStreamOriginalPageRotation?: number; kind?: StampKind; }; type TextAnnotationJSON = Omit & { @@ -6458,6 +6271,63 @@ type CommentMarkerAnnotationJSON = Omit & { }; type AnnotationJSONUnion = TextMarkupAnnotationJSON | TextAnnotationJSON | WidgetAnnotationJSON | RedactionAnnotationJSON | StampAnnotationJSON | NoteAnnotationJSON | LinkAnnotationJSON | InkAnnotationJSON | RectangleAnnotationJSON | PolylineAnnotationJSON | PolygonAnnotationJSON | LineAnnotationJSON | EllipseAnnotationJSON | ImageAnnotationJSON | UnknownAnnotationJSON | MediaAnnotationJSON | CommentMarkerAnnotationJSON; +type BaseFormFieldJSON = { + v: 1; + pdfObjectId?: number | null; + annotationIds: Array; + name: string; + label: string; + flags?: FormFieldFlags; + id: string; + additionalActions?: SerializedAdditionalActionsType; + group?: IGroup; + permissions?: IPermissions; +}; +type ChoiceFormFieldJSON = BaseFormFieldJSON & { + type: 'pspdfkit/form-field/listbox' | 'pspdfkit/form-field/combobox'; + options: Array; + multiSelect: boolean; + commitOnChange: boolean; + defaultValues: Array; +}; +type ListBoxFormFieldJSON = ChoiceFormFieldJSON & { + type: 'pspdfkit/form-field/listbox'; +}; +type DoNotSpellCheckPropertyPair = XOR, Record<'doNotSpellcheck', boolean>>; +type ComboBoxFormFieldJSON = ChoiceFormFieldJSON & { + type: 'pspdfkit/form-field/combobox'; + edit: boolean; +} & DoNotSpellCheckPropertyPair; +type CheckBoxFormFieldJSON = BaseFormFieldJSON & { + type: 'pspdfkit/form-field/checkbox'; + options: Array; + defaultValues: Array; +}; +type RadioButtonFormFieldJSON = BaseFormFieldJSON & { + type: 'pspdfkit/form-field/radio'; + options: Array; + noToggleToOff: boolean; + radiosInUnison: boolean; + defaultValue: string; +}; +type TextFormFieldJSON = BaseFormFieldJSON & { + type: 'pspdfkit/form-field/text'; + password: boolean; + maxLength?: number | null; + doNotScroll: boolean; + multiLine: boolean; + defaultValue: string; + comb: boolean; +} & DoNotSpellCheckPropertyPair; +type ButtonFormFieldJSON = BaseFormFieldJSON & { + type: 'pspdfkit/form-field/button'; + buttonLabel: string | null; +}; +type SignatureFormFieldJSON = BaseFormFieldJSON & { + type: 'pspdfkit/form-field/signature'; +}; +type FormFieldJSON = ListBoxFormFieldJSON | ComboBoxFormFieldJSON | RadioButtonFormFieldJSON | CheckBoxFormFieldJSON | TextFormFieldJSON | ButtonFormFieldJSON | SignatureFormFieldJSON; + type SerializedJSON = { skippedPdfObjectIds?: number[]; annotations?: AnnotationJSONUnion[]; @@ -6479,6 +6349,113 @@ type InstantJSON = SerializedJSON & { }; }; +type Rotation$1 = 0 | 90 | 180 | 270; +type AddPageConfiguration = { + backgroundColor: Color; + pageWidth: number; + pageHeight: number; + rotateBy: Rotation$1; + insets?: Rect; +}; +type OperationAttachment = string | File | Blob; +type min = number; +type max = number; +type Range = [min, max]; +type ImportPageIndex = Array; +type DocumentMetadata = { + title?: string; + author?: string; +}; +type NonSerializableDocumentOperations = { + type: 'removePages'; + pageIndexes: Array; +} | { + type: 'duplicatePages'; + pageIndexes: Array; +} | { + type: 'movePages'; + pageIndexes: Array; + afterPageIndex: number; +} | { + type: 'movePages'; + pageIndexes: Array; + beforePageIndex: number; +} | { + type: 'rotatePages'; + pageIndexes: Array; + rotateBy: Rotation$1; +} | { + type: 'keepPages'; + pageIndexes: Array; +} | { + type: 'importDocument'; + afterPageIndex: number; + treatImportedDocumentAsOnePage?: boolean; + document: OperationAttachment; + importedPageIndexes?: ImportPageIndex; +} | { + type: 'importDocument'; + beforePageIndex: number; + treatImportedDocumentAsOnePage?: boolean; + document: OperationAttachment; + importedPageIndexes?: ImportPageIndex; +} | { + type: 'applyInstantJson'; + instantJson: Record; + dataFilePath: OperationAttachment; +} | { + type: 'applyXfdf'; + xfdf: string; + ignorePageRotation?: boolean; + dataFilePath: OperationAttachment; +} | { + type: 'flattenAnnotations'; + pageIndexes?: Array; + annotationIds?: string[]; +} | { + type: 'setPageLabel'; + pageIndexes?: Array; + pageLabel?: string; +} | { + type: 'performOcr'; + pageIndexes?: Array | 'all'; + language: string; +} | { + type: 'applyRedactions'; +} | { + type: 'updateMetadata'; + metadata: DocumentMetadata; +}; +type DocumentOperation = (AddPageConfiguration & { + type: 'addPage'; + afterPageIndex: number; +}) | (AddPageConfiguration & { + type: 'addPage'; + beforePageIndex: number; +}) | { + type: 'cropPages'; + pageIndexes?: Array; + cropBox: Rect; +} | NonSerializableDocumentOperations; + +declare function toJSON(bookmark: Bookmark): BookmarkJSON; + +type ID$1 = string; +type BookmarkProps = { + id: ID$1 | null; + pdfBookmarkId: ID$1 | null; + name: string | null; + sortKey: number | null; + action: Action | null; +}; +declare const Bookmark_base: Record$1.Factory; +declare class Bookmark extends Bookmark_base { + id: ID$1; + action: Action; + static toSerializableObject: typeof toJSON; + static fromSerializableObject: (bookmark: BookmarkJSON) => Bookmark; +} + declare const SearchPattern: { readonly CREDIT_CARD_NUMBER: "credit_card_number"; readonly DATE: "date"; @@ -6496,6 +6473,13 @@ declare const SearchPattern: { }; type ISearchPattern = (typeof SearchPattern)[keyof typeof SearchPattern]; +declare const SearchType: { + readonly TEXT: "text"; + readonly PRESET: "preset"; + readonly REGEX: "regex"; +}; +type ISearchType = (typeof SearchType)[keyof typeof SearchType]; + declare const ProductId: { SharePoint: string; Salesforce: string; @@ -6546,6 +6530,11 @@ type SignatureAppearance = { watermarkImage?: Blob | File; }; +type Glyph = { + c: string; + rect: Rect; +}; + declare const TextLineElementKind: { P: string; TH: string; @@ -7114,7 +7103,7 @@ declare class InstantClient { userId: string | null | undefined; } -declare const allowedToolbarTypes: ("distance" | "note" | "comment" | "text" | "zoom-in" | "zoom-out" | "link" | "search" | "ellipse" | "image" | "line" | "polygon" | "polyline" | "spacer" | "arrow" | "highlighter" | "undo" | "redo" | "callout" | "debug" | "signature" | "custom" | "print" | "rectangle" | "ink" | "stamp" | "cloudy-rectangle" | "dashed-rectangle" | "cloudy-ellipse" | "dashed-ellipse" | "cloudy-polygon" | "dashed-polygon" | "text-highlighter" | "perimeter" | "ellipse-area" | "rectangle-area" | "polygon-area" | "sidebar-thumbnails" | "sidebar-document-outline" | "sidebar-annotations" | "sidebar-bookmarks" | "pager" | "multi-annotations-selection" | "pan" | "zoom-mode" | "annotate" | "ink-eraser" | "document-editor" | "document-crop" | "export-pdf" | "layout-config" | "marquee-zoom" | "responsive-group" | "redact-text-highlighter" | "redact-rectangle" | "document-comparison" | "measure" | "form-creator" | "content-editor")[]; +declare const allowedToolbarTypes: ("distance" | "note" | "comment" | "text" | "zoom-in" | "zoom-out" | "link" | "search" | "ellipse" | "image" | "line" | "polygon" | "polyline" | "spacer" | "arrow" | "highlighter" | "undo" | "redo" | "callout" | "custom" | "print" | "rectangle" | "ink" | "stamp" | "cloudy-rectangle" | "dashed-rectangle" | "cloudy-ellipse" | "dashed-ellipse" | "cloudy-polygon" | "dashed-polygon" | "text-highlighter" | "perimeter" | "ellipse-area" | "rectangle-area" | "polygon-area" | "sidebar-thumbnails" | "sidebar-document-outline" | "sidebar-annotations" | "sidebar-bookmarks" | "pager" | "multi-annotations-selection" | "pan" | "zoom-mode" | "annotate" | "ink-eraser" | "signature" | "document-editor" | "document-crop" | "export-pdf" | "debug" | "layout-config" | "marquee-zoom" | "responsive-group" | "redact-text-highlighter" | "redact-rectangle" | "document-comparison" | "measure" | "form-creator" | "content-editor")[]; type ToolbarItemType = ToolItemType | (typeof allowedToolbarTypes)[number]; type ToolbarItem = Omit & { @@ -7494,7 +7483,6 @@ declare class Instance { textLinesForPageIndex: (pageIndex: number) => Promise>; getMarkupAnnotationText: (annotation: TextMarkupAnnotationsUnion) => Promise; getTextFromRects: (pageIndex: number, rects: List) => Promise; - getDocumentPermissions: () => Promise>; currentZoomLevel: number; maximumZoomLevel: number; minimumZoomLevel: number; @@ -7535,9 +7523,6 @@ declare class Instance { setAnnotationCreatorName: (annotationCreatorName?: string | null) => void; setOnWidgetAnnotationCreationStart: (callback: OnWidgetAnnotationCreationStartCallback) => void; setOnCommentCreationStart: (callback: OnCommentCreationStartCallback) => void; - getOCGs: () => Promise; - getOCGVisibilityState: () => Promise; - setOCGVisibilityState: (visibilityState: OCGVisibilityState) => Promise; contentWindow: Window; contentDocument: Document; readonly viewState: ViewState; @@ -7603,7 +7588,7 @@ declare class Instance { setDocumentEditorFooterItems: (stateOrFunction: DocumentEditorFooterItem[] | SetDocumentEditorFooterFunction) => void; setDocumentEditorToolbarItems: (stateOrFunction: DocumentEditorToolbarItem[] | SetDocumentEditorToolbarFunction) => void; getSignaturesInfo: () => Promise; - signDocument: (arg0: SignatureCreationData | null, arg1?: TwoStepSignatureCallback | SigningServiceData) => Promise; + signDocument: (arg0: SignatureCreationData | null | undefined, arg1: TwoStepSignatureCallback | SigningServiceData | undefined) => Promise; applyOperations: (operations: Array) => Promise; exportPDFWithOperations: (arg0: Array) => Promise; applyRedactions: () => Promise; @@ -7787,7 +7772,6 @@ type StandaloneConfiguration = SharedConfiguration & { isSalesforce?: boolean; productId?: IProductId; processorEngine?: IProcessorEngine; - dynamicFonts?: string; }; type Configuration = ServerConfiguration | StandaloneConfiguration; @@ -8079,6 +8063,7 @@ interface IStampAnnotation extends AnnotationProperties { subtitle: string | null; color: Color | null; xfdfAppearanceStream: string | null; + xfdfAppearanceStreamOriginalPageRotation: number | null; } declare class StampAnnotation extends Annotation { stampType: StampKind; @@ -8086,6 +8071,7 @@ declare class StampAnnotation ext subtitle: null | string; color: null | Color; xfdfAppearanceStream: null | string; + xfdfAppearanceStreamOriginalPageRotation: null | number; static defaultValues: IObject; static readableName: string; } diff --git a/EnvelopeGenerator.Web/wwwroot/js/app.js b/EnvelopeGenerator.Web/wwwroot/js/app.js index f49fc88d..b70aae6c 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/app.js +++ b/EnvelopeGenerator.Web/wwwroot/js/app.js @@ -97,10 +97,11 @@ var App = /** @class */ (function () { }; App.handleClick = function (eventType) { return __awaiter(this, void 0, void 0, function () { - var _a; + var result, _a; return __generator(this, function (_b) { switch (_b.label) { case 0: + result = false; _a = eventType; switch (_a) { case "RESET": return [3 /*break*/, 1]; @@ -109,11 +110,24 @@ var App = /** @class */ (function () { return [3 /*break*/, 5]; case 1: return [4 /*yield*/, App.handleReset(null)]; case 2: - _b.sent(); + result = _b.sent(); + if (result == true) { + alert("Dokument zurückgesetzt!"); + } + else { + alert("Fehler beim Zurücksetzen des Dokuments!"); + } return [3 /*break*/, 5]; case 3: return [4 /*yield*/, App.handleFinish(null)]; case 4: - _b.sent(); + result = _b.sent(); + if (result == true) { + // TODO: Redirect to success page + alert("Dokument erfolgreich signiert!"); + } + else { + alert("Fehler beim Abschließen des Dokuments!"); + } return [3 /*break*/, 5]; case 5: return [2 /*return*/]; } @@ -122,24 +136,52 @@ var App = /** @class */ (function () { }; App.handleFinish = function (event) { return __awaiter(this, void 0, void 0, function () { - var json, result; + var e_2, json, postEnvelopeResult, e_3, buffer, postDocumentResult, e_4; return __generator(this, function (_a) { switch (_a.label) { - case 0: return [4 /*yield*/, App.Instance.save()]; + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, App.Instance.save()]; case 1: _a.sent(); - return [4 /*yield*/, App.Instance.exportInstantJSON()]; + return [3 /*break*/, 3]; case 2: + e_2 = _a.sent(); + console.error(e_2); + return [2 /*return*/, false]; + case 3: + _a.trys.push([3, 6, , 7]); + return [4 /*yield*/, App.Instance.exportInstantJSON()]; + case 4: json = _a.sent(); - console.log(json); - console.log(JSON.stringify(json)); return [4 /*yield*/, App.Network.postEnvelope(App.envelopeKey, App.currentDocument.id, JSON.stringify(json))]; - case 3: - result = _a.sent(); - if (result == true) { - alert("Dokument erfolgreich signiert!"); + case 5: + postEnvelopeResult = _a.sent(); + if (postEnvelopeResult === false) { + return [2 /*return*/, false]; } - return [2 /*return*/]; + return [3 /*break*/, 7]; + case 6: + e_3 = _a.sent(); + console.error(e_3); + return [2 /*return*/, false]; + case 7: + _a.trys.push([7, 10, , 11]); + return [4 /*yield*/, App.Instance.exportPDF({ flatten: true })]; + case 8: + buffer = _a.sent(); + return [4 /*yield*/, App.Network.postDocument(App.envelopeKey, App.currentDocument.id, buffer)]; + case 9: + postDocumentResult = _a.sent(); + if (postDocumentResult === false) { + return [2 /*return*/, false]; + } + return [3 /*break*/, 11]; + case 10: + e_4 = _a.sent(); + console.error(e_4); + return [2 /*return*/, false]; + case 11: return [2 /*return*/, true]; } }); }); @@ -148,8 +190,12 @@ var App = /** @class */ (function () { return __awaiter(this, void 0, void 0, function () { var result; return __generator(this, function (_a) { - if (confirm("Wollen Sie das Dokument und alle erstellten Signaturen zur�cksetzen?")) { + if (confirm("Wollen Sie das Dokument und alle erstellten Signaturen zurücksetzen?")) { result = App.Annotation.deleteAnnotations(App.Instance); + return [2 /*return*/, true]; + } + else { + return [2 /*return*/, true]; } return [2 /*return*/]; }); @@ -272,16 +318,32 @@ var Network = /** @class */ (function () { .then(function (res) { return res.arrayBuffer(); }); }; Network.prototype.postDocument = function (envelopeKey, documentId, buffer) { - return fetch("/api/document/".concat(envelopeKey, "/").concat(documentId), { credentials: "include", method: "POST", body: buffer }) - .then(function (res) { return res.json(); }); + var url = "/api/document/".concat(envelopeKey, "/").concat(documentId); + var options = { + credentials: "include", + method: "POST", + body: buffer + }; + console.debug("PostDocument/Calling url: " + url); + return fetch(url, options) + .then(this.handleResponse) + .then(function (res) { + if (!res.ok) { + return false; + } + ; + return true; + }); }; Network.prototype.postEnvelope = function (envelopeKey, documentId, jsonString) { + var url = "/api/envelope/".concat(envelopeKey, "?index=").concat(documentId); var options = { credentials: "include", method: "POST", body: jsonString }; - return fetch("/api/envelope/".concat(envelopeKey, "?index=").concat(documentId), options) + console.debug("PostEnvelope/Calling url: " + url); + return fetch(url, options) .then(this.handleResponse) .then(function (res) { if (!res.ok) { @@ -321,16 +383,18 @@ var UI = /** @class */ (function () { { type: "custom", id: "button-reset", - title: "Zur�cksetzen", + className: "button-reset", + title: "Zurücksetzen", onPress: function () { callback("RESET"); }, - icon: "\n \n \n " + icon: "\n \n \n " }, { type: "custom", id: "button-finish", - title: "Abschlie�en", + className: "button-finish", + title: "Abschließen", onPress: function () { callback("FINISH"); }, diff --git a/EnvelopeGenerator.Web/wwwroot/js/app.js.map b/EnvelopeGenerator.Web/wwwroot/js/app.js.map index 0b8a61d1..f15f42b7 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/app.js.map +++ b/EnvelopeGenerator.Web/wwwroot/js/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../../Scripts/app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMQ,IAAA,IAAI,GAAK,QAAQ,CAAC,SAAS,KAAvB,CAAwB;AAC5B,IAAA,IAAI,GAAK,QAAQ,CAAC,QAAQ,KAAtB,CAAuB;AAC3B,IAAA,kBAAkB,GAAK,QAAQ,CAAC,UAAU,mBAAxB,CAAyB;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