devexpress-richedit 24.1.1-alpha-24085-0102 → 24.1.2-beta
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/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +3 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +1 -0
- package/dist/dx.richedit.d.ts +17 -10
- package/dist/dx.richedit.js +52855 -51531
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/bars/ribbon.js +2 -1
- package/lib/client/bars/rich-edit-ribbon/ribbon-items-data.js +2 -1
- package/lib/client/client-rich-edit.js +2 -1
- package/lib/client/commands/client-command-manager.js +2 -1
- package/lib/client/commands/commands.js +3 -0
- package/lib/client/commands/download-document-command.d.ts +3 -0
- package/lib/client/commands/download-document-command.js +13 -2
- package/lib/client/commands/export-document-command.js +4 -4
- package/lib/client/commands/mail-merge-command.js +7 -4
- package/lib/client/commands/open-document-command.d.ts +2 -1
- package/lib/client/commands/open-document-command.js +17 -12
- package/lib/client/default-localization.js +2 -1
- package/lib/client/dialogs/finish-and-merge-dialog.js +1 -0
- package/lib/client/document-processor/processor.d.ts +9 -2
- package/lib/client/document-processor/processor.js +18 -6
- package/lib/client/formats/docx/export/data.d.ts +4 -0
- package/lib/client/formats/docx/export/data.js +12 -0
- package/lib/client/formats/docx/export/exporter.d.ts +2 -0
- package/lib/client/formats/docx/export/exporter.js +15 -0
- package/lib/client/formats/docx/export/exporters/base/sections.js +5 -0
- package/lib/client/formats/docx/export/exporters/note-properties.d.ts +18 -0
- package/lib/client/formats/docx/export/exporters/note-properties.js +83 -0
- package/lib/client/formats/docx/export/exporters/settings.d.ts +2 -0
- package/lib/client/formats/docx/export/exporters/settings.js +11 -0
- package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.d.ts +15 -1
- package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.js +85 -3
- package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.d.ts +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.js +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/main-sub-document.d.ts +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/main-sub-document.js +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/note-sub-document-exporter.d.ts +37 -0
- package/lib/client/formats/docx/export/exporters/sub-document/note-sub-document-exporter.js +71 -0
- package/lib/client/formats/docx/export/exporters/sub-document/text-box-content-exporter.d.ts +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/text-box-content-exporter.js +2 -2
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-properties-destination.d.ts +16 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-properties-destination.js +48 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-reference-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-reference-destination.js +9 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnotes-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnotes-destination.js +39 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-properties-destination.d.ts +18 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-properties-destination.js +49 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-reference-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-reference-destination.js +9 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnotes-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnotes-destination.js +39 -0
- package/lib/client/formats/docx/import/destination/notes/note-destination.d.ts +18 -0
- package/lib/client/formats/docx/import/destination/notes/note-destination.js +45 -0
- package/lib/client/formats/docx/import/destination/notes/note-properties-destination.d.ts +32 -0
- package/lib/client/formats/docx/import/destination/notes/note-properties-destination.js +81 -0
- package/lib/client/formats/docx/import/destination/notes/note-reference-destination.d.ts +8 -0
- package/lib/client/formats/docx/import/destination/notes/note-reference-destination.js +21 -0
- package/lib/client/formats/docx/import/destination/notes/note-self-reference-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/note-self-reference-destination.js +12 -0
- package/lib/client/formats/docx/import/destination/notes/note-separator-destination.d.ts +8 -0
- package/lib/client/formats/docx/import/destination/notes/note-separator-destination.js +20 -0
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-numbering-reference-destination.js +1 -1
- package/lib/client/formats/docx/import/destination/runs/run-destination.js +11 -5
- package/lib/client/formats/docx/import/destination/section/section-destination.js +5 -2
- package/lib/client/formats/docx/import/destination/settings/settings.js +4 -0
- package/lib/client/formats/docx/import/importer.d.ts +2 -0
- package/lib/client/formats/docx/import/importer.js +26 -0
- package/lib/client/formats/docx/import/importers/character-importer.d.ts +3 -0
- package/lib/client/formats/docx/import/importers/character-importer.js +12 -1
- package/lib/client/formats/docx/import/importers/end-notes-importer.d.ts +3 -4
- package/lib/client/formats/docx/import/importers/end-notes-importer.js +8 -3
- package/lib/client/formats/docx/import/importers/foot-notes-importer.d.ts +3 -5
- package/lib/client/formats/docx/import/importers/foot-notes-importer.js +8 -5
- package/lib/client/formats/docx/import/importers/notes-importer.d.ts +8 -0
- package/lib/client/formats/docx/import/importers/notes-importer.js +7 -0
- package/lib/client/formats/docx/translation-table/translation-tables.d.ts +7 -0
- package/lib/client/formats/docx/translation-table/translation-tables.js +27 -0
- package/lib/client/formats/docx/utils/constants.d.ts +2 -0
- package/lib/client/formats/docx/utils/constants.js +2 -0
- package/lib/client/model-api/formats/enum.d.ts +1 -0
- package/lib/client/model-api/formats/enum.js +1 -0
- package/lib/client/model-api/formats/exporter.d.ts +3 -4
- package/lib/client/model-api/formats/exporter.js +9 -6
- package/lib/client/model-api/formats/importer.js +2 -0
- package/lib/client/model-api/sub-document.d.ts +6 -2
- package/lib/client/model-api/sub-document.js +37 -35
- package/lib/client/model-api/table/table-borders.d.ts +1 -1
- package/lib/client/public/commands/enum.d.ts +1 -0
- package/lib/client/public/commands/enum.js +1 -0
- package/lib/client/public/document-processor.d.ts +3 -1
- package/lib/client/public/document-processor.js +2 -2
- package/lib/client/public/ribbon/item-ids.d.ts +1 -0
- package/lib/client/public/ribbon/item-ids.js +1 -0
- package/lib/client/public/rich-edit.d.ts +2 -1
- package/lib/client/public/rich-edit.js +16 -9
- package/lib/common/canvas/canvas-manager.js +2 -1
- package/lib/common/canvas/picture-renderer.d.ts +1 -1
- package/lib/common/canvas/renderes/common/document-renderer.d.ts +1 -1
- package/lib/common/canvas/renderes/common/document-renderer.js +6 -2
- package/lib/common/canvas/renderes/view-manager.js +3 -1
- package/lib/common/clipboard-content-inserter.js +2 -1
- package/lib/common/commands/client-command.d.ts +3 -1
- package/lib/common/commands/client-command.js +2 -0
- package/lib/common/commands/document/print-document-on-client-command.js +1 -1
- package/lib/common/commands/text/clipboard-commands.js +7 -5
- package/lib/common/document-format.d.ts +2 -0
- package/lib/common/document-format.js +2 -0
- package/lib/common/formats/document-importer-errors.d.ts +3 -1
- package/lib/common/formats/document-importer-errors.js +2 -0
- package/lib/common/formats/file-name-helper.d.ts +1 -0
- package/lib/common/formats/file-name-helper.js +7 -1
- package/lib/common/formats/html/export/get-html.d.ts +4 -0
- package/lib/common/formats/html/export/get-html.js +12 -0
- package/lib/common/formats/html/export/html-builder.d.ts +16 -0
- package/lib/common/formats/html/export/html-builder.js +98 -0
- package/lib/common/formats/html/export/html-document-exporter.d.ts +13 -0
- package/lib/common/formats/html/export/html-document-exporter.js +29 -0
- package/lib/common/formats/html/export/html-export.d.ts +25 -0
- package/lib/common/{html-export.js → formats/html/export/html-export.js} +115 -192
- package/lib/common/formats/html/import/html-document-importer.d.ts +15 -0
- package/lib/common/formats/html/import/html-document-importer.js +84 -0
- package/lib/common/formats/html/import/html-importer.d.ts +1 -0
- package/lib/common/formats/html/import/html-importer.js +13 -1
- package/lib/common/formats/html/import/insert-html.d.ts +4 -0
- package/lib/common/formats/html/import/insert-html.js +5 -0
- package/lib/common/formats/html/import/utils/paragraph-properties-utils.d.ts +1 -0
- package/lib/common/formats/html/import/utils/paragraph-properties-utils.js +17 -4
- package/lib/common/formats/i-document-exporter.d.ts +14 -0
- package/lib/common/formats/rtf/export/exporter.d.ts +1 -1
- package/lib/common/formats/rtf/export/exporter.js +1 -1
- package/lib/common/formats/rtf/importer-in-subdocument.d.ts +1 -1
- package/lib/common/formats/rtf/importer-in-subdocument.js +1 -1
- package/lib/common/formats/txt/txt-exporter.js +2 -1
- package/lib/common/input-controller.d.ts +2 -1
- package/lib/common/input-controller.js +5 -2
- package/lib/common/interfaces/i-rich-edit-core.d.ts +2 -0
- package/lib/common/layout/main-structures/layout-boxes/layout-anchored-picture-box.d.ts +2 -1
- package/lib/common/layout/main-structures/layout-boxes/layout-anchored-picture-box.js +4 -3
- package/lib/common/layout/main-structures/layout-boxes/layout-picture-box.d.ts +2 -1
- package/lib/common/layout/main-structures/layout-boxes/layout-picture-box.js +5 -4
- package/lib/common/layout/main-structures/layout-page.d.ts +1 -0
- package/lib/common/layout/main-structures/layout-page.js +5 -2
- package/lib/common/layout-formatter/box/generator/box-infos-generator.d.ts +1 -0
- package/lib/common/layout-formatter/box/generator/box-infos-generator.js +12 -2
- package/lib/common/layout-formatter/floating/page-anchored-object-holder.d.ts +5 -3
- package/lib/common/layout-formatter/floating/page-anchored-object-holder.js +7 -4
- package/lib/common/layout-formatter/formatter/base-formatter.js +0 -1
- package/lib/common/layout-formatter/formatter/main-formatter.js +1 -0
- package/lib/common/layout-formatter/managers/formatter-manager.d.ts +6 -2
- package/lib/common/layout-formatter/managers/formatter-manager.js +3 -1
- package/lib/common/layout-formatter/row/size-engine/row-sizes-manager.js +20 -4
- package/lib/common/measurer/measurer.js +2 -1
- package/lib/common/model/chunk.d.ts +1 -0
- package/lib/common/model/chunk.js +27 -2
- package/lib/common/model/document-model.d.ts +4 -0
- package/lib/common/model/document-model.js +4 -1
- package/lib/common/model/enums.d.ts +3 -1
- package/lib/common/model/enums.js +2 -0
- package/lib/common/model/footnotes/footnote.d.ts +46 -0
- package/lib/common/model/footnotes/footnote.js +100 -0
- package/lib/common/model/json/importers/sub-document/json-sub-document-importer.js +3 -3
- package/lib/common/model/json/importers/sub-document/run-importers.d.ts +6 -0
- package/lib/common/model/json/importers/sub-document/run-importers.js +9 -0
- package/lib/common/model/model-checks/position.d.ts +2 -1
- package/lib/common/model/model-checks/position.js +11 -2
- package/lib/common/model/numbering-lists/numbering-helper.d.ts +2 -1
- package/lib/common/model/numbering-lists/numbering-helper.js +3 -0
- package/lib/common/model/paragraph/paragraph-style.d.ts +1 -0
- package/lib/common/model/paragraph/paragraph-style.js +6 -2
- package/lib/common/model/properties-merger/paragraph-properties-merger.js +1 -1
- package/lib/common/model/runs/run-base.d.ts +1 -0
- package/lib/common/model/runs/simple-runs.d.ts +8 -2
- package/lib/common/model/runs/simple-runs.js +12 -6
- package/lib/common/model/section/section-properties.d.ts +3 -0
- package/lib/common/model/special-characters.d.ts +3 -0
- package/lib/common/model/special-characters.js +3 -0
- package/lib/common/model/sub-document-infos.d.ts +18 -0
- package/lib/common/model/sub-document-infos.js +39 -0
- package/lib/common/model/sub-document.d.ts +2 -0
- package/lib/common/model/sub-document.js +18 -16
- package/lib/common/mouse-handler/touch-handler/touch-handler-state-base.d.ts +1 -0
- package/lib/common/mouse-handler/touch-handler/touch-handler-state-base.js +21 -13
- package/lib/common/processor.d.ts +2 -0
- package/lib/common/rich-edit-core.d.ts +6 -2
- package/lib/common/rich-edit-core.js +20 -1
- package/lib/common/selection/selection-intervals-info.js +1 -1
- package/lib/common/utils/_license.d.ts +1 -0
- package/lib/common/utils/_license.js +2 -0
- package/lib/common/utils/size-utils.d.ts +3 -0
- package/lib/common/utils/size-utils.js +17 -4
- package/package.json +3 -3
- package/lib/common/html-export.d.ts +0 -32
@@ -34,10 +34,12 @@ import { FindReplaceHelper, FindReplaceState, SearchDirection } from './find-rep
|
|
34
34
|
import { AnchoredPictureRun } from './runs/anchored-picture-run';
|
35
35
|
import { InlinePictureRun } from './runs/inline-picture-run';
|
36
36
|
import { SubDocumentCollection } from './sub-document-collection';
|
37
|
+
import { NotePosition, NoteSeparators } from './footnotes/footnote';
|
37
38
|
export class DocumentModel {
|
38
39
|
constructor(modelOptions, subDocumentsIdCounter = 1) {
|
39
40
|
this.mirrorMargins = false;
|
40
41
|
this.aspxIsDocumentProtectionEnabled = false;
|
42
|
+
this.documentEndNotePosition = NotePosition.EndOfDocument;
|
41
43
|
this.sections = [];
|
42
44
|
this.headers = [];
|
43
45
|
this.footers = [];
|
@@ -52,6 +54,8 @@ export class DocumentModel {
|
|
52
54
|
this.numberingLists = [];
|
53
55
|
this.abstractNumberingListsIdProvider = new AbstractNumberingListIdProvider(this);
|
54
56
|
this.numberingListsIdProvider = new NumberingListIdProvider(this);
|
57
|
+
this.footNoteSeparators = new NoteSeparators(this);
|
58
|
+
this.endNoteSeparators = new NoteSeparators(this);
|
55
59
|
this.repositoryBorderItem = new BorderInfo();
|
56
60
|
this.compatSettings = [];
|
57
61
|
this.subDocumentsIdCounter = -1;
|
@@ -69,7 +73,6 @@ export class DocumentModel {
|
|
69
73
|
this.compatibilitySettings = new CompatibilitySettings();
|
70
74
|
this.docVariables = new DocumentVariables();
|
71
75
|
}
|
72
|
-
;
|
73
76
|
get subDocuments() {
|
74
77
|
return this.subDocumentsCollection.filteredCollection;
|
75
78
|
}
|
@@ -4,4 +4,6 @@ export var SubDocumentInfoType;
|
|
4
4
|
SubDocumentInfoType[SubDocumentInfoType["Header"] = 1] = "Header";
|
5
5
|
SubDocumentInfoType[SubDocumentInfoType["Footer"] = 2] = "Footer";
|
6
6
|
SubDocumentInfoType[SubDocumentInfoType["TextBox"] = 3] = "TextBox";
|
7
|
+
SubDocumentInfoType[SubDocumentInfoType["FootNote"] = 4] = "FootNote";
|
8
|
+
SubDocumentInfoType[SubDocumentInfoType["EndNote"] = 5] = "EndNote";
|
7
9
|
})(SubDocumentInfoType || (SubDocumentInfoType = {}));
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { ICloneable, ISupportCopyFrom } from "@devexpress/utils/lib/types";
|
2
|
+
import { NumberingFormat } from "../numbering-lists/list-level-properties";
|
3
|
+
import { DocumentModel } from "../document-model";
|
4
|
+
import { SubDocument } from "../sub-document";
|
5
|
+
export declare enum NotePosition {
|
6
|
+
BottomOfPage = 0,
|
7
|
+
BelowText = 1,
|
8
|
+
EndOfDocument = 2,
|
9
|
+
EndOfSection = 3
|
10
|
+
}
|
11
|
+
export declare enum NoteType {
|
12
|
+
Separator = 0,
|
13
|
+
ContinuationSeparator = 1,
|
14
|
+
ContinuationNotice = 2,
|
15
|
+
Normal = 3
|
16
|
+
}
|
17
|
+
export declare type NoteSeparatorTypes = NoteType.Separator | NoteType.ContinuationSeparator | NoteType.ContinuationNotice;
|
18
|
+
export declare enum NoteNumberingRestartType {
|
19
|
+
Continuous = 0,
|
20
|
+
NewPage = 1,
|
21
|
+
NewSection = 2
|
22
|
+
}
|
23
|
+
export declare class NoteProperties implements ICloneable<NoteProperties>, ISupportCopyFrom<NoteProperties> {
|
24
|
+
static createDefault(): NoteProperties;
|
25
|
+
position: NotePosition;
|
26
|
+
numberingFormat: NumberingFormat;
|
27
|
+
numberingRestartType: NoteNumberingRestartType;
|
28
|
+
startingNumber: number;
|
29
|
+
columnCount: number;
|
30
|
+
copyFrom(obj: NoteProperties): void;
|
31
|
+
clone(): NoteProperties;
|
32
|
+
equals(other: NoteProperties): boolean;
|
33
|
+
}
|
34
|
+
export declare class NoteSeparators {
|
35
|
+
private model;
|
36
|
+
separatorId: number;
|
37
|
+
continuationSeparatorId: number;
|
38
|
+
continuationNoticeId: number;
|
39
|
+
constructor(model: DocumentModel);
|
40
|
+
get separator(): SubDocument;
|
41
|
+
get continuationSeparator(): SubDocument;
|
42
|
+
get continuationNotice(): SubDocument;
|
43
|
+
setSeparator(sudDocId: number, type: NoteSeparatorTypes): void;
|
44
|
+
getSeparator(type: NoteSeparatorTypes): SubDocument | never;
|
45
|
+
getSeparatos(): IterableIterator<SubDocument>;
|
46
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { NumberingFormat } from "../numbering-lists/list-level-properties";
|
2
|
+
export var NotePosition;
|
3
|
+
(function (NotePosition) {
|
4
|
+
NotePosition[NotePosition["BottomOfPage"] = 0] = "BottomOfPage";
|
5
|
+
NotePosition[NotePosition["BelowText"] = 1] = "BelowText";
|
6
|
+
NotePosition[NotePosition["EndOfDocument"] = 2] = "EndOfDocument";
|
7
|
+
NotePosition[NotePosition["EndOfSection"] = 3] = "EndOfSection";
|
8
|
+
})(NotePosition || (NotePosition = {}));
|
9
|
+
export var NoteType;
|
10
|
+
(function (NoteType) {
|
11
|
+
NoteType[NoteType["Separator"] = 0] = "Separator";
|
12
|
+
NoteType[NoteType["ContinuationSeparator"] = 1] = "ContinuationSeparator";
|
13
|
+
NoteType[NoteType["ContinuationNotice"] = 2] = "ContinuationNotice";
|
14
|
+
NoteType[NoteType["Normal"] = 3] = "Normal";
|
15
|
+
})(NoteType || (NoteType = {}));
|
16
|
+
export var NoteNumberingRestartType;
|
17
|
+
(function (NoteNumberingRestartType) {
|
18
|
+
NoteNumberingRestartType[NoteNumberingRestartType["Continuous"] = 0] = "Continuous";
|
19
|
+
NoteNumberingRestartType[NoteNumberingRestartType["NewPage"] = 1] = "NewPage";
|
20
|
+
NoteNumberingRestartType[NoteNumberingRestartType["NewSection"] = 2] = "NewSection";
|
21
|
+
})(NoteNumberingRestartType || (NoteNumberingRestartType = {}));
|
22
|
+
export class NoteProperties {
|
23
|
+
static createDefault() {
|
24
|
+
const result = new NoteProperties();
|
25
|
+
result.position = NotePosition.BottomOfPage;
|
26
|
+
result.numberingFormat = NumberingFormat.Decimal;
|
27
|
+
result.numberingRestartType = NoteNumberingRestartType.Continuous;
|
28
|
+
result.startingNumber = 1;
|
29
|
+
result.columnCount = 0;
|
30
|
+
return result;
|
31
|
+
}
|
32
|
+
copyFrom(obj) {
|
33
|
+
this.position = obj.position;
|
34
|
+
this.numberingFormat = obj.numberingFormat;
|
35
|
+
this.numberingRestartType = obj.numberingRestartType;
|
36
|
+
this.startingNumber = obj.startingNumber;
|
37
|
+
this.columnCount = obj.columnCount;
|
38
|
+
}
|
39
|
+
clone() {
|
40
|
+
const result = new NoteProperties();
|
41
|
+
result.copyFrom(this);
|
42
|
+
return result;
|
43
|
+
}
|
44
|
+
equals(other) {
|
45
|
+
return this.position === other.position &&
|
46
|
+
this.numberingFormat === other.numberingFormat &&
|
47
|
+
this.numberingRestartType === other.numberingRestartType &&
|
48
|
+
this.startingNumber === other.startingNumber &&
|
49
|
+
this.columnCount === other.columnCount;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
export class NoteSeparators {
|
53
|
+
constructor(model) {
|
54
|
+
this.model = model;
|
55
|
+
}
|
56
|
+
get separator() {
|
57
|
+
return this.model.subDocuments[this.separatorId];
|
58
|
+
}
|
59
|
+
get continuationSeparator() {
|
60
|
+
return this.model.subDocuments[this.continuationSeparatorId];
|
61
|
+
}
|
62
|
+
get continuationNotice() {
|
63
|
+
return this.model.subDocuments[this.continuationNoticeId];
|
64
|
+
}
|
65
|
+
setSeparator(sudDocId, type) {
|
66
|
+
switch (type) {
|
67
|
+
case NoteType.Separator:
|
68
|
+
this.separatorId = sudDocId;
|
69
|
+
break;
|
70
|
+
case NoteType.ContinuationSeparator:
|
71
|
+
this.continuationSeparatorId = sudDocId;
|
72
|
+
break;
|
73
|
+
case NoteType.ContinuationNotice:
|
74
|
+
this.continuationNoticeId = sudDocId;
|
75
|
+
break;
|
76
|
+
default:
|
77
|
+
throw Error("Invalid separator type.");
|
78
|
+
}
|
79
|
+
}
|
80
|
+
getSeparator(type) {
|
81
|
+
switch (type) {
|
82
|
+
case NoteType.Separator:
|
83
|
+
return this.separator;
|
84
|
+
case NoteType.ContinuationSeparator:
|
85
|
+
return this.continuationSeparator;
|
86
|
+
case NoteType.ContinuationNotice:
|
87
|
+
return this.continuationNotice;
|
88
|
+
default:
|
89
|
+
throw Error("Invalid separator type.");
|
90
|
+
}
|
91
|
+
}
|
92
|
+
*getSeparatos() {
|
93
|
+
if (this.separator)
|
94
|
+
yield this.separator;
|
95
|
+
if (this.continuationSeparator)
|
96
|
+
yield this.continuationSeparator;
|
97
|
+
if (this.continuationNotice)
|
98
|
+
yield this.continuationNotice;
|
99
|
+
}
|
100
|
+
}
|
@@ -15,7 +15,7 @@ import { JSONRunBaseProperty } from '../../enums/json-run-enums';
|
|
15
15
|
import { JSONBookmarkProperty, JSONChunkProperty, JSONEnumLoadPieceTable, JSONRangePermissionProperty } from '../../enums/json-sub-document-enums';
|
16
16
|
import { JSONTabConverter } from '../json-tab-converter';
|
17
17
|
import { JSONTableImporter } from '../table/json-table-importer';
|
18
|
-
import { AnchoredPictureRunImporter, AnchoredTextBoxRunImporter, InlinePictureRunImporter, InlineTextBoxRunImporter, SimpleRunImporter, TextRunImporter } from './run-importers';
|
18
|
+
import { AnchoredPictureRunImporter, AnchoredTextBoxRunImporter, InlinePictureRunImporter, InlineTextBoxRunImporter, NoteRunImporter, SimpleRunImporter, TextRunImporter } from './run-importers';
|
19
19
|
export class JSONSubDocumentImporter {
|
20
20
|
static importSubDocument(subDocument, documentProtectionSettings, content, imageCorrespondence) {
|
21
21
|
JSONTableImporter.importTables(subDocument, content[JSONEnumLoadPieceTable.Tables]);
|
@@ -119,8 +119,8 @@ JSONSubDocumentImporter.runTypeToRunImporter = {
|
|
119
119
|
[RunType.InlinePictureRun]: new InlinePictureRunImporter(),
|
120
120
|
[RunType.InlineTextBoxRun]: new InlineTextBoxRunImporter(),
|
121
121
|
[RunType.LayoutDependentRun]: new SimpleRunImporter(LayoutDependentRun),
|
122
|
-
[RunType.FootNoteRun]: new
|
123
|
-
[RunType.EndNoteRun]: new
|
122
|
+
[RunType.FootNoteRun]: new NoteRunImporter(FootNoteRun),
|
123
|
+
[RunType.EndNoteRun]: new NoteRunImporter(EndNoteRun),
|
124
124
|
[RunType.NoteSeparatorRun]: new SimpleRunImporter(NoteSeparatorRun),
|
125
125
|
[RunType.NoteContinuationSeparatorRun]: new SimpleRunImporter(NoteContinuationSeparatorRun),
|
126
126
|
};
|
@@ -5,6 +5,7 @@ import { CharacterStyle } from '../../../character/character-style';
|
|
5
5
|
import { Paragraph } from '../../../paragraph/paragraph';
|
6
6
|
import { RunBase } from '../../../runs/run-base';
|
7
7
|
export declare type SimpleRunConstructor = new (startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle) => RunBase;
|
8
|
+
export declare type NoteRunConstructor = new (startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle, noteDocumentId: number) => RunBase;
|
8
9
|
export declare abstract class BaseRunImporter {
|
9
10
|
private maskedCharacterPropertiesCache;
|
10
11
|
private charStyles;
|
@@ -19,6 +20,11 @@ export declare class SimpleRunImporter extends BaseRunImporter {
|
|
19
20
|
constructor(runConstructor: SimpleRunConstructor);
|
20
21
|
protected makeRun(_jsonRun: any, startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle): RunBase;
|
21
22
|
}
|
23
|
+
export declare class NoteRunImporter extends BaseRunImporter {
|
24
|
+
runConstructor: NoteRunConstructor;
|
25
|
+
constructor(runConstructor: NoteRunConstructor);
|
26
|
+
protected makeRun(_jsonRun: any, startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle): RunBase;
|
27
|
+
}
|
22
28
|
export declare class TextRunImporter extends BaseRunImporter {
|
23
29
|
protected makeRun(jsonRun: any, startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle): RunBase;
|
24
30
|
}
|
@@ -34,6 +34,15 @@ export class SimpleRunImporter extends BaseRunImporter {
|
|
34
34
|
return new this.runConstructor(startOffset, paragraph, charPropsBundle);
|
35
35
|
}
|
36
36
|
}
|
37
|
+
export class NoteRunImporter extends BaseRunImporter {
|
38
|
+
constructor(runConstructor) {
|
39
|
+
super();
|
40
|
+
this.runConstructor = runConstructor;
|
41
|
+
}
|
42
|
+
makeRun(_jsonRun, startOffset, paragraph, charPropsBundle) {
|
43
|
+
return new this.runConstructor(startOffset, paragraph, charPropsBundle, -1);
|
44
|
+
}
|
45
|
+
}
|
37
46
|
export class TextRunImporter extends BaseRunImporter {
|
38
47
|
makeRun(jsonRun, startOffset, paragraph, charPropsBundle) {
|
39
48
|
return new TextRun(startOffset, jsonRun[JSONRunBaseProperty.Length], paragraph, charPropsBundle);
|
@@ -7,7 +7,8 @@ export declare class PositionChecker {
|
|
7
7
|
check(): boolean;
|
8
8
|
compare(poss: Position[], registered: Position[]): boolean;
|
9
9
|
private getNewRegInterval;
|
10
|
-
private
|
10
|
+
private isGreater;
|
11
|
+
private isEqual;
|
11
12
|
private sort;
|
12
13
|
private addSections;
|
13
14
|
private addParagraphs;
|
@@ -27,7 +27,9 @@ export class PositionChecker {
|
|
27
27
|
for (let currPos of poss) {
|
28
28
|
if (prevPos.value != currPos.value)
|
29
29
|
regInterval = this.getNewRegInterval(registered, regInterval);
|
30
|
-
|
30
|
+
while (this.isGreater(currPos, registered, regInterval))
|
31
|
+
regInterval = this.getNewRegInterval(registered, regInterval);
|
32
|
+
if (!this.isEqual(currPos, registered, regInterval))
|
31
33
|
return false;
|
32
34
|
prevPos = currPos;
|
33
35
|
}
|
@@ -43,7 +45,14 @@ export class PositionChecker {
|
|
43
45
|
}
|
44
46
|
return regInterval;
|
45
47
|
}
|
46
|
-
|
48
|
+
isGreater(currPos, registered, regInterval) {
|
49
|
+
for (let i = regInterval.start; i < regInterval.end; i++) {
|
50
|
+
if (registered[i] && currPos.value > registered[i].value)
|
51
|
+
return true;
|
52
|
+
}
|
53
|
+
return false;
|
54
|
+
}
|
55
|
+
isEqual(currPos, registered, regInterval) {
|
47
56
|
for (let i = regInterval.start; i < regInterval.end; i++) {
|
48
57
|
if (currPos === registered[i])
|
49
58
|
return true;
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { IModelManager } from '../../model-manager';
|
2
2
|
import { DocumentModel } from '../document-model';
|
3
3
|
import { SubDocument } from '../sub-document';
|
4
|
-
import { NumberingType } from './numbering-list';
|
4
|
+
import { AbstractNumberingList, NumberingType } from './numbering-list';
|
5
5
|
export declare class NumberingHelper {
|
6
6
|
static templateCodeStart: number;
|
7
7
|
static templateCodeEnd: number;
|
8
8
|
static generateNewTemplateCode(documentModel: DocumentModel): number;
|
9
9
|
static isNewTemplateCode(documentModel: DocumentModel, templateCode: number): boolean;
|
10
10
|
static getNumberingListTemplateIndex(documentModel: DocumentModel, type: NumberingType): number;
|
11
|
+
static getNumberingListTemplate(documentModel: DocumentModel, type: NumberingType): AbstractNumberingList;
|
11
12
|
static deleteNumberingList(modelManager: IModelManager, subDocument: SubDocument, paragraphIndices: number[]): void;
|
12
13
|
private static resetParagraphLeftIndent;
|
13
14
|
private static deleteNumberingListCore;
|
@@ -26,6 +26,9 @@ export class NumberingHelper {
|
|
26
26
|
}
|
27
27
|
return -1;
|
28
28
|
}
|
29
|
+
static getNumberingListTemplate(documentModel, type) {
|
30
|
+
return documentModel.abstractNumberingListTemplates.find(list => list.getListType() === type);
|
31
|
+
}
|
29
32
|
static deleteNumberingList(modelManager, subDocument, paragraphIndices) {
|
30
33
|
for (let i = paragraphIndices.length - 1; i >= 0; i--) {
|
31
34
|
let paragraphIndex = paragraphIndices[i];
|
@@ -24,6 +24,7 @@ export declare class ParagraphStyle extends StyleBase<ParagraphStyle> implements
|
|
24
24
|
getResultTabs(): TabProperties;
|
25
25
|
getMergedParagraphProperties(): ParagraphProperties;
|
26
26
|
isInOwnList(): boolean;
|
27
|
+
isInList(): boolean;
|
27
28
|
getListLevel(model: DocumentModel): IOverrideListLevel;
|
28
29
|
getNumberingList(model: DocumentModel): NumberingList;
|
29
30
|
getNumberingListIndex(): number;
|
@@ -29,6 +29,9 @@ export class ParagraphStyle extends StyleBase {
|
|
29
29
|
isInOwnList() {
|
30
30
|
return this.numberingListIndex >= 0;
|
31
31
|
}
|
32
|
+
isInList() {
|
33
|
+
return this.getNumberingListIndex() >= 0;
|
34
|
+
}
|
32
35
|
getListLevel(model) {
|
33
36
|
return this.getNumberingList(model).levels[this.getListLevelIndex()];
|
34
37
|
}
|
@@ -42,10 +45,11 @@ export class ParagraphStyle extends StyleBase {
|
|
42
45
|
return this.parent.getNumberingListIndex();
|
43
46
|
}
|
44
47
|
getListLevelIndex() {
|
45
|
-
|
48
|
+
var _a, _b;
|
49
|
+
if (this.listLevelIndex >= 0)
|
46
50
|
return this.listLevelIndex;
|
47
51
|
else
|
48
|
-
return this.parent.getListLevelIndex();
|
52
|
+
return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.getListLevelIndex()) !== null && _b !== void 0 ? _b : 0;
|
49
53
|
}
|
50
54
|
clone() {
|
51
55
|
const style = new ParagraphStyle(this.styleName, this.localizedName, this.deleted, this.hidden, this.semihidden, this.isDefault, this.maskedCharacterProperties, this.maskedParagraphProperties, this.tabs.clone(), this.autoUpdate, this.numberingListIndex, this.listLevelIndex, this.base64EncodedImage, this.id);
|
@@ -38,7 +38,7 @@ export class ParagraphPropertiesMerger extends PropertiesMergerBase {
|
|
38
38
|
let currentParagraphStyle = paragraphStyle;
|
39
39
|
while (currentParagraphStyle) {
|
40
40
|
this.merge(currentParagraphStyle.maskedParagraphProperties);
|
41
|
-
if (currentParagraphStyle.
|
41
|
+
if (currentParagraphStyle.isInList())
|
42
42
|
this.merge(currentParagraphStyle.getListLevel(model).getParagraphProperties());
|
43
43
|
currentParagraphStyle = currentParagraphStyle.parent;
|
44
44
|
}
|
@@ -23,6 +23,7 @@ export declare abstract class RunBase implements ICharacterPropertiesContainer,
|
|
23
23
|
paragraph: Paragraph;
|
24
24
|
characterStyle: CharacterStyle;
|
25
25
|
maskedCharacterProperties: MaskedCharacterProperties;
|
26
|
+
noteDocumentId: number;
|
26
27
|
private mergedCharacterProperties;
|
27
28
|
constructor(startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle);
|
28
29
|
abstract getLength(): number;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { ICloneable } from '@devexpress/utils/lib/types';
|
2
|
+
import { MaskedCharacterPropertiesBundle } from '../../rich-utils/properties-bundle';
|
2
3
|
import { SubDocument } from '../sub-document';
|
3
4
|
import { OneCharRun } from './run-base';
|
4
5
|
import { RunType } from './run-type';
|
6
|
+
import { Paragraph } from '../paragraph/paragraph';
|
5
7
|
export declare class SectionRun extends OneCharRun implements ICloneable<SectionRun> {
|
6
8
|
getType(): RunType;
|
7
9
|
isParagraphOrSectionRun(): boolean;
|
@@ -34,12 +36,15 @@ export declare class LayoutDependentRun extends OneCharRun implements ICloneable
|
|
34
36
|
clone(): LayoutDependentRun;
|
35
37
|
cloneToNewSubDocument(subDocument: SubDocument): LayoutDependentRun;
|
36
38
|
}
|
37
|
-
|
39
|
+
declare abstract class NoteRun extends OneCharRun {
|
40
|
+
constructor(startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle, noteDocumentId?: number);
|
41
|
+
}
|
42
|
+
export declare class FootNoteRun extends NoteRun implements ICloneable<FootNoteRun> {
|
38
43
|
getType(): RunType;
|
39
44
|
clone(): FootNoteRun;
|
40
45
|
cloneToNewSubDocument(subDocument: SubDocument): FootNoteRun;
|
41
46
|
}
|
42
|
-
export declare class EndNoteRun extends
|
47
|
+
export declare class EndNoteRun extends NoteRun implements ICloneable<EndNoteRun> {
|
43
48
|
getType(): RunType;
|
44
49
|
clone(): EndNoteRun;
|
45
50
|
cloneToNewSubDocument(subDocument: SubDocument): EndNoteRun;
|
@@ -54,3 +59,4 @@ export declare class NoteContinuationSeparatorRun extends OneCharRun implements
|
|
54
59
|
clone(): NoteContinuationSeparatorRun;
|
55
60
|
cloneToNewSubDocument(subDocument: SubDocument): NoteContinuationSeparatorRun;
|
56
61
|
}
|
62
|
+
export {};
|
@@ -73,26 +73,32 @@ export class LayoutDependentRun extends OneCharRun {
|
|
73
73
|
return new LayoutDependentRun(this.startOffset, subDocument.getParagraphByPosition(this.paragraph.startLogPosition.value), new MaskedCharacterPropertiesBundle(subDocument.documentModel.cache.maskedCharacterPropertiesCache.getItem(this.maskedCharacterProperties), subDocument.documentModel.stylesManager.getCharacterStyleByName(this.characterStyle.styleName)));
|
74
74
|
}
|
75
75
|
}
|
76
|
-
|
76
|
+
class NoteRun extends OneCharRun {
|
77
|
+
constructor(startOffset, paragraph, charPropsBundle, noteDocumentId = -1) {
|
78
|
+
super(startOffset, paragraph, charPropsBundle);
|
79
|
+
this.noteDocumentId = noteDocumentId;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
export class FootNoteRun extends NoteRun {
|
77
83
|
getType() {
|
78
84
|
return RunType.FootNoteRun;
|
79
85
|
}
|
80
86
|
clone() {
|
81
|
-
return new FootNoteRun(this.startOffset, this.paragraph, new MaskedCharacterPropertiesBundle(this.maskedCharacterProperties, this.characterStyle));
|
87
|
+
return new FootNoteRun(this.startOffset, this.paragraph, new MaskedCharacterPropertiesBundle(this.maskedCharacterProperties, this.characterStyle), this.noteDocumentId);
|
82
88
|
}
|
83
89
|
cloneToNewSubDocument(subDocument) {
|
84
|
-
return new FootNoteRun(this.startOffset, subDocument.getParagraphByPosition(this.paragraph.startLogPosition.value), new MaskedCharacterPropertiesBundle(subDocument.documentModel.cache.maskedCharacterPropertiesCache.getItem(this.maskedCharacterProperties), subDocument.documentModel.stylesManager.getCharacterStyleByName(this.characterStyle.styleName)));
|
90
|
+
return new FootNoteRun(this.startOffset, subDocument.getParagraphByPosition(this.paragraph.startLogPosition.value), new MaskedCharacterPropertiesBundle(subDocument.documentModel.cache.maskedCharacterPropertiesCache.getItem(this.maskedCharacterProperties), subDocument.documentModel.stylesManager.getCharacterStyleByName(this.characterStyle.styleName)), this.noteDocumentId);
|
85
91
|
}
|
86
92
|
}
|
87
|
-
export class EndNoteRun extends
|
93
|
+
export class EndNoteRun extends NoteRun {
|
88
94
|
getType() {
|
89
95
|
return RunType.EndNoteRun;
|
90
96
|
}
|
91
97
|
clone() {
|
92
|
-
return new EndNoteRun(this.startOffset, this.paragraph, new MaskedCharacterPropertiesBundle(this.maskedCharacterProperties, this.characterStyle));
|
98
|
+
return new EndNoteRun(this.startOffset, this.paragraph, new MaskedCharacterPropertiesBundle(this.maskedCharacterProperties, this.characterStyle), this.noteDocumentId);
|
93
99
|
}
|
94
100
|
cloneToNewSubDocument(subDocument) {
|
95
|
-
return new EndNoteRun(this.startOffset, subDocument.getParagraphByPosition(this.paragraph.startLogPosition.value), new MaskedCharacterPropertiesBundle(subDocument.documentModel.cache.maskedCharacterPropertiesCache.getItem(this.maskedCharacterProperties), subDocument.documentModel.stylesManager.getCharacterStyleByName(this.characterStyle.styleName)));
|
101
|
+
return new EndNoteRun(this.startOffset, subDocument.getParagraphByPosition(this.paragraph.startLogPosition.value), new MaskedCharacterPropertiesBundle(subDocument.documentModel.cache.maskedCharacterPropertiesCache.getItem(this.maskedCharacterProperties), subDocument.documentModel.stylesManager.getCharacterStyleByName(this.characterStyle.styleName)), this.noteDocumentId);
|
96
102
|
}
|
97
103
|
}
|
98
104
|
export class NoteSeparatorRun extends OneCharRun {
|
@@ -5,6 +5,7 @@ import { SectionStartType } from './enums';
|
|
5
5
|
import { SectionColumnProperties } from './section-column-properties';
|
6
6
|
import { PaperKind } from './paper-kind';
|
7
7
|
import { LineNumberingProperties } from './line-numbering-properties';
|
8
|
+
import { NoteProperties } from '../footnotes/footnote';
|
8
9
|
export declare class SectionProperties implements ICloneable<SectionProperties>, ISupportCopyFrom<SectionProperties> {
|
9
10
|
static createSimpleSectionProperties(width: number, height: number): SectionProperties;
|
10
11
|
margins: Margins;
|
@@ -22,6 +23,8 @@ export declare class SectionProperties implements ICloneable<SectionProperties>,
|
|
22
23
|
firstPageNumber: number;
|
23
24
|
continueNumbering: boolean;
|
24
25
|
lineNumbering: LineNumberingProperties;
|
26
|
+
footNote: NoteProperties;
|
27
|
+
endNote: NoteProperties;
|
25
28
|
get marginLeft(): number;
|
26
29
|
get marginTop(): number;
|
27
30
|
get marginRight(): number;
|
@@ -39,6 +39,7 @@ export declare class SpecialCharacters {
|
|
39
39
|
OpeningDoubleQuotationMark: string;
|
40
40
|
ClosingDoubleQuotationMark: string;
|
41
41
|
SeparatorMark: string;
|
42
|
+
MSWordBulletMark: string;
|
42
43
|
HiddenLineBreak: string;
|
43
44
|
HiddenParagraphMark: string;
|
44
45
|
HiddenSpace: string;
|
@@ -47,5 +48,7 @@ export declare class SpecialCharacters {
|
|
47
48
|
FieldCodeEndRun: string;
|
48
49
|
FieldResultEndRun: string;
|
49
50
|
LayoutDependentText: string;
|
51
|
+
ETX: string;
|
52
|
+
EOT: string;
|
50
53
|
DEBUG_CONVERTER(str: string): string;
|
51
54
|
}
|
@@ -40,6 +40,7 @@ export class SpecialCharacters {
|
|
40
40
|
this.OpeningDoubleQuotationMark = '\u201C';
|
41
41
|
this.ClosingDoubleQuotationMark = '\u201D';
|
42
42
|
this.SeparatorMark = '|';
|
43
|
+
this.MSWordBulletMark = String.fromCharCode(0xF0B7);
|
43
44
|
this.HiddenLineBreak = String.fromCharCode(0x21B2);
|
44
45
|
this.HiddenParagraphMark = String.fromCharCode(0x00B6);
|
45
46
|
this.HiddenSpace = String.fromCharCode(0x00B7);
|
@@ -48,6 +49,8 @@ export class SpecialCharacters {
|
|
48
49
|
this.FieldCodeEndRun = "}";
|
49
50
|
this.FieldResultEndRun = ">";
|
50
51
|
this.LayoutDependentText = "#";
|
52
|
+
this.ETX = '\u0003';
|
53
|
+
this.EOT = '\u0004';
|
51
54
|
}
|
52
55
|
DEBUG_CONVERTER(str) {
|
53
56
|
let result = [];
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { DocumentModel } from './document-model';
|
2
2
|
import { SubDocumentInfoType } from './enums';
|
3
3
|
import { HeaderFooterType } from './section/enums';
|
4
|
+
import { NoteType } from './footnotes/footnote';
|
4
5
|
export declare abstract class SubDocumentInfoBase {
|
5
6
|
subDocumentId: number;
|
6
7
|
isMain: boolean;
|
@@ -28,6 +29,23 @@ export declare class TextBoxSubDocumentInfoBase extends SubDocumentInfoBase {
|
|
28
29
|
getType(): SubDocumentInfoType;
|
29
30
|
clone(): TextBoxSubDocumentInfoBase;
|
30
31
|
}
|
32
|
+
export declare abstract class NoteSubDocumentInfo extends SubDocumentInfoBase {
|
33
|
+
isMain: boolean;
|
34
|
+
isNote: boolean;
|
35
|
+
noteType: NoteType;
|
36
|
+
}
|
37
|
+
export declare class FootNoteSubDocumentInfo extends NoteSubDocumentInfo {
|
38
|
+
isMain: boolean;
|
39
|
+
isFootNote: boolean;
|
40
|
+
getType(): SubDocumentInfoType;
|
41
|
+
clone(): FootNoteSubDocumentInfo;
|
42
|
+
}
|
43
|
+
export declare class EndNoteSubDocumentInfo extends NoteSubDocumentInfo {
|
44
|
+
isMain: boolean;
|
45
|
+
isEndNote: boolean;
|
46
|
+
getType(): SubDocumentInfoType;
|
47
|
+
clone(): EndNoteSubDocumentInfo;
|
48
|
+
}
|
31
49
|
export declare class MainSubDocumentInfo extends SubDocumentInfoBase {
|
32
50
|
constructor();
|
33
51
|
getType(): SubDocumentInfoType;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Errors } from '@devexpress/utils/lib/errors';
|
2
2
|
import { SubDocumentInfoType } from './enums';
|
3
3
|
import { HeaderFooterType } from './section/enums';
|
4
|
+
import { NoteType } from './footnotes/footnote';
|
4
5
|
export class SubDocumentInfoBase {
|
5
6
|
constructor(subDocumentId) {
|
6
7
|
this.isMain = true;
|
@@ -31,6 +32,10 @@ export class SubDocumentInfoBase {
|
|
31
32
|
return new FooterSubDocumentInfo(subDocumentId);
|
32
33
|
case SubDocumentInfoType.TextBox:
|
33
34
|
return new TextBoxSubDocumentInfoBase(subDocumentId, parentSubDocumentId);
|
35
|
+
case SubDocumentInfoType.FootNote:
|
36
|
+
return new FootNoteSubDocumentInfo(subDocumentId);
|
37
|
+
case SubDocumentInfoType.EndNote:
|
38
|
+
return new EndNoteSubDocumentInfo(subDocumentId);
|
34
39
|
}
|
35
40
|
throw new Error(Errors.NotImplemented);
|
36
41
|
}
|
@@ -49,6 +54,40 @@ export class TextBoxSubDocumentInfoBase extends SubDocumentInfoBase {
|
|
49
54
|
return new TextBoxSubDocumentInfoBase(this.subDocumentId, this.parentSubDocumentId);
|
50
55
|
}
|
51
56
|
}
|
57
|
+
export class NoteSubDocumentInfo extends SubDocumentInfoBase {
|
58
|
+
constructor() {
|
59
|
+
super(...arguments);
|
60
|
+
this.isMain = false;
|
61
|
+
this.isNote = true;
|
62
|
+
this.noteType = NoteType.Normal;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
export class FootNoteSubDocumentInfo extends NoteSubDocumentInfo {
|
66
|
+
constructor() {
|
67
|
+
super(...arguments);
|
68
|
+
this.isMain = false;
|
69
|
+
this.isFootNote = true;
|
70
|
+
}
|
71
|
+
getType() {
|
72
|
+
return SubDocumentInfoType.FootNote;
|
73
|
+
}
|
74
|
+
clone() {
|
75
|
+
return new FootNoteSubDocumentInfo(this.subDocumentId);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
export class EndNoteSubDocumentInfo extends NoteSubDocumentInfo {
|
79
|
+
constructor() {
|
80
|
+
super(...arguments);
|
81
|
+
this.isMain = false;
|
82
|
+
this.isEndNote = true;
|
83
|
+
}
|
84
|
+
getType() {
|
85
|
+
return SubDocumentInfoType.EndNote;
|
86
|
+
}
|
87
|
+
clone() {
|
88
|
+
return new EndNoteSubDocumentInfo(this.subDocumentId);
|
89
|
+
}
|
90
|
+
}
|
52
91
|
export class MainSubDocumentInfo extends SubDocumentInfoBase {
|
53
92
|
constructor() {
|
54
93
|
super(0);
|
@@ -40,6 +40,8 @@ export declare class SubDocument {
|
|
40
40
|
get interval(): FixedInterval;
|
41
41
|
getLastChunk(): Chunk;
|
42
42
|
getFirstChunk(): Chunk;
|
43
|
+
getLastParagraph(): Paragraph;
|
44
|
+
getFirstParagraph(): Paragraph;
|
43
45
|
getText(interval?: FixedInterval): string;
|
44
46
|
getSimpleText(interval: ConstInterval): string;
|
45
47
|
splitRun(position: number): void;
|