31-10-2023

This commit is contained in:
Jonathan Jenne
2023-10-31 09:05:24 +01:00
parent b5e0908149
commit dc24ae3631
10 changed files with 435 additions and 264 deletions

View File

@@ -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<75>ckgesetzt!");
} else {
alert("Fehler beim Zur<75>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<69>en des Dokuments!")
}
break;
}
}
public static async handleFinish(event: any) {
public static async handleFinish(event: any): Promise<boolean> {
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<boolean> {
if (confirm("Wollen Sie das Dokument und alle erstellten Signaturen zur<75>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<any> {
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<boolean> {
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<75>cksetzen",
onPress() {
callback("RESET")
},
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z"/>
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z"/>
</svg>`
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z"/>
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z"/>
</svg>`
},
{
type: "custom",
id: "button-finish",
className: "button-finish",
title: "Abschlie<69>en",
onPress() {
callback("FINISH")

View File

@@ -5103,6 +5103,7 @@ interface IImageAnnotation extends AnnotationProperties {
imageAttachmentId: string | null;
isSignature: boolean;
xfdfAppearanceStream: string | null;
xfdfAppearanceStreamOriginalPageRotation: number | null;
}
declare class ImageAnnotation<T extends IImageAnnotation = IImageAnnotation> extends Annotation<T> {
description: null | string;
@@ -5111,6 +5112,7 @@ declare class ImageAnnotation<T extends IImageAnnotation = IImageAnnotation> 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<BookmarkProps>;
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<number | Range>;
type DocumentMetadata = {
title?: string;
author?: string;
};
type NonSerializableDocumentOperations = {
type: 'removePages';
pageIndexes: Array<number>;
} | {
type: 'duplicatePages';
pageIndexes: Array<number>;
} | {
type: 'movePages';
pageIndexes: Array<number>;
afterPageIndex: number;
} | {
type: 'movePages';
pageIndexes: Array<number>;
beforePageIndex: number;
} | {
type: 'rotatePages';
pageIndexes: Array<number>;
rotateBy: Rotation$1;
} | {
type: 'keepPages';
pageIndexes: Array<number>;
} | {
type: 'importDocument';
afterPageIndex: number;
treatImportedDocumentAsOnePage?: boolean;
document: OperationAttachment;
importedPageIndexes?: ImportPageIndex;
} | {
type: 'importDocument';
beforePageIndex: number;
treatImportedDocumentAsOnePage?: boolean;
document: OperationAttachment;
importedPageIndexes?: ImportPageIndex;
} | {
type: 'applyInstantJson';
instantJson: Record<string, any>;
dataFilePath: OperationAttachment;
} | {
type: 'applyXfdf';
xfdf: string;
ignorePageRotation?: boolean;
dataFilePath: OperationAttachment;
} | {
type: 'flattenAnnotations';
pageIndexes?: Array<number>;
annotationIds?: string[];
} | {
type: 'setPageLabel';
pageIndexes?: Array<number>;
pageLabel?: string;
} | {
type: 'performOcr';
pageIndexes?: Array<number> | '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<number>;
cropBox: Rect;
} | NonSerializableDocumentOperations;
type BaseFormFieldJSON = {
v: 1;
pdfObjectId?: number | null;
annotationIds: Array<string>;
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<FormOptionJSON>;
multiSelect: boolean;
commitOnChange: boolean;
defaultValues: Array<string>;
};
type ListBoxFormFieldJSON = ChoiceFormFieldJSON & {
type: 'pspdfkit/form-field/listbox';
};
type DoNotSpellCheckPropertyPair = XOR<Record<'doNotSpellCheck', boolean>, Record<'doNotSpellcheck', boolean>>;
type ComboBoxFormFieldJSON = ChoiceFormFieldJSON & {
type: 'pspdfkit/form-field/combobox';
edit: boolean;
} & DoNotSpellCheckPropertyPair;
type CheckBoxFormFieldJSON = BaseFormFieldJSON & {
type: 'pspdfkit/form-field/checkbox';
options: Array<FormOptionJSON>;
defaultValues: Array<string>;
};
type RadioButtonFormFieldJSON = BaseFormFieldJSON & {
type: 'pspdfkit/form-field/radio';
options: Array<FormOptionJSON>;
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<BaseAnnotationJSON, 'type'> & {
rotation: number;
isSignature?: boolean;
xfdfAppearanceStream?: string;
xfdfAppearanceStreamOriginalPageRotation?: number;
};
type ShapeAnnotationJSON = Omit<BaseAnnotationJSON, 'type'> & {
strokeWidth: number;
@@ -6403,6 +6215,7 @@ type StampAnnotationJSON = Omit<BaseAnnotationJSON, 'type'> & {
subtitle: string | null;
rotation: number | null;
xfdfAppearanceStream?: string;
xfdfAppearanceStreamOriginalPageRotation?: number;
kind?: StampKind;
};
type TextAnnotationJSON = Omit<BaseAnnotationJSON, 'type'> & {
@@ -6458,6 +6271,63 @@ type CommentMarkerAnnotationJSON = Omit<BaseAnnotationJSON, 'type'> & {
};
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<string>;
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<FormOptionJSON>;
multiSelect: boolean;
commitOnChange: boolean;
defaultValues: Array<string>;
};
type ListBoxFormFieldJSON = ChoiceFormFieldJSON & {
type: 'pspdfkit/form-field/listbox';
};
type DoNotSpellCheckPropertyPair = XOR<Record<'doNotSpellCheck', boolean>, Record<'doNotSpellcheck', boolean>>;
type ComboBoxFormFieldJSON = ChoiceFormFieldJSON & {
type: 'pspdfkit/form-field/combobox';
edit: boolean;
} & DoNotSpellCheckPropertyPair;
type CheckBoxFormFieldJSON = BaseFormFieldJSON & {
type: 'pspdfkit/form-field/checkbox';
options: Array<FormOptionJSON>;
defaultValues: Array<string>;
};
type RadioButtonFormFieldJSON = BaseFormFieldJSON & {
type: 'pspdfkit/form-field/radio';
options: Array<FormOptionJSON>;
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<number | Range>;
type DocumentMetadata = {
title?: string;
author?: string;
};
type NonSerializableDocumentOperations = {
type: 'removePages';
pageIndexes: Array<number>;
} | {
type: 'duplicatePages';
pageIndexes: Array<number>;
} | {
type: 'movePages';
pageIndexes: Array<number>;
afterPageIndex: number;
} | {
type: 'movePages';
pageIndexes: Array<number>;
beforePageIndex: number;
} | {
type: 'rotatePages';
pageIndexes: Array<number>;
rotateBy: Rotation$1;
} | {
type: 'keepPages';
pageIndexes: Array<number>;
} | {
type: 'importDocument';
afterPageIndex: number;
treatImportedDocumentAsOnePage?: boolean;
document: OperationAttachment;
importedPageIndexes?: ImportPageIndex;
} | {
type: 'importDocument';
beforePageIndex: number;
treatImportedDocumentAsOnePage?: boolean;
document: OperationAttachment;
importedPageIndexes?: ImportPageIndex;
} | {
type: 'applyInstantJson';
instantJson: Record<string, any>;
dataFilePath: OperationAttachment;
} | {
type: 'applyXfdf';
xfdf: string;
ignorePageRotation?: boolean;
dataFilePath: OperationAttachment;
} | {
type: 'flattenAnnotations';
pageIndexes?: Array<number>;
annotationIds?: string[];
} | {
type: 'setPageLabel';
pageIndexes?: Array<number>;
pageLabel?: string;
} | {
type: 'performOcr';
pageIndexes?: Array<number> | '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<number>;
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<BookmarkProps>;
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<ToolItem, 'type'> & {
@@ -7494,7 +7483,6 @@ declare class Instance {
textLinesForPageIndex: (pageIndex: number) => Promise<List<TextLine>>;
getMarkupAnnotationText: (annotation: TextMarkupAnnotationsUnion) => Promise<string>;
getTextFromRects: (pageIndex: number, rects: List<Rect>) => Promise<string>;
getDocumentPermissions: () => Promise<Record<IDocumentPermissions, boolean>>;
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<OCG[]>;
getOCGVisibilityState: () => Promise<OCGVisibilityState>;
setOCGVisibilityState: (visibilityState: OCGVisibilityState) => Promise<void>;
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<SignaturesInfo>;
signDocument: (arg0: SignatureCreationData | null, arg1?: TwoStepSignatureCallback | SigningServiceData) => Promise<void>;
signDocument: (arg0: SignatureCreationData | null | undefined, arg1: TwoStepSignatureCallback | SigningServiceData | undefined) => Promise<void>;
applyOperations: (operations: Array<DocumentOperation>) => Promise<void>;
exportPDFWithOperations: (arg0: Array<DocumentOperation>) => Promise<ArrayBuffer>;
applyRedactions: () => Promise<void>;
@@ -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<T extends IStampAnnotation = IStampAnnotation> extends Annotation<T> {
stampType: StampKind;
@@ -8086,6 +8071,7 @@ declare class StampAnnotation<T extends IStampAnnotation = IStampAnnotation> ext
subtitle: null | string;
color: null | Color;
xfdfAppearanceStream: null | string;
xfdfAppearanceStreamOriginalPageRotation: null | number;
static defaultValues: IObject;
static readableName: string;
}