UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

25 lines (24 loc) 692 B
export class IdGenerator { constructor() { this.id = 0; this.documentRelationId = this.calcDocumentRelationId(); } generateImageName(modelImageId) { return 'image' + modelImageId.toString(); } generateImageRelationId(modelImageId) { return 'Image' + modelImageId.toString(); } calcDocumentRelationId() { return `R${this.next().toString(16)}`; } calcCorePropertiesDocumentRelationId() { return 'core' + this.documentRelationId; } calcCustomPropertiesDocumentRelationId() { return 'custom' + this.documentRelationId; } next() { return this.id++; } }