@talrace/ngx-noder 19.0.36 → 19.0.38
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/assets/i18n/noder.en.json +7 -2
- package/assets/i18n/noder.es.json +7 -2
- package/assets/i18n/noder.ru.json +7 -2
- package/fesm2022/talrace-ngx-noder.mjs +932 -1363
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-toolbar/components/base-toolbar.component.d.ts +4 -1
- package/lib/apart-components/editor-toolbar/components/buttons/spacing/spacing.component.d.ts +16 -0
- package/lib/apart-components/editor-toolbar/components/toolbar-actions/toolbar-actions.component.d.ts +3 -0
- package/lib/apart-components/editor-toolbar/editor-toolbar.module.d.ts +24 -23
- package/lib/editor/components/external-element/external.component.d.ts +2 -0
- package/lib/editor/components/shared/services/custom-content.service.d.ts +1 -8
- package/lib/editor/content/constants/display-values.const.d.ts +6 -2
- package/lib/editor/content/display-data/display-data.d.ts +10 -29
- package/lib/editor/content/display-data/display-token.model.d.ts +8 -17
- package/lib/editor/content/display-data/general-properties.model.d.ts +3 -2
- package/lib/editor/content/display-data/indent.model.d.ts +2 -1
- package/lib/editor/content/display-data/line-info.model.d.ts +3 -3
- package/lib/editor/content/display-data/paragraph-info.interface.d.ts +1 -1
- package/lib/editor/content/display-data/text-line-info.d.ts +1 -14
- package/lib/editor/content/display-data/toolbar-styles.interface.d.ts +1 -0
- package/lib/editor/content/helpers/display-token.helper.d.ts +9 -3
- package/lib/editor/content/helpers/line-info.helper.d.ts +10 -0
- package/lib/editor/display/layers/text.layer.d.ts +2 -4
- package/lib/editor/display/rendering.helper.d.ts +4 -13
- package/lib/editor/editor.module.d.ts +3 -1
- package/lib/editor/execution/editor.d.ts +9 -1
- package/lib/editor/execution/regulator.service.d.ts +5 -0
- package/lib/editor/{components → gadgets/comment}/comment-popup/comment-popup.component.d.ts +6 -4
- package/lib/editor/gadgets/comment/comment-popup/comment-type.model.d.ts +6 -0
- package/lib/editor/gadgets/comment/comment-types.const.d.ts +3 -0
- package/lib/editor/gadgets/font-metrics/font-metric-size.interface.d.ts +0 -4
- package/lib/editor/gadgets/numbering/numbering.helper.d.ts +16 -7
- package/lib/editor/gadgets/page-break/break.helper.d.ts +1 -2
- package/lib/editor/interaction/editor.service.d.ts +29 -4
- package/lib/editor/positioning/cursor-position.interface.d.ts +3 -7
- package/lib/editor/positioning/position.helper.d.ts +0 -3
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/_ngx-noder.theme.scss +1 -1
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.scss +24 -12
- package/src/assets/fonts/nc-iconfont.svg +5 -1
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
- package/src/lib/apart-components/editor-toolbar/_theme.scss +2 -0
- package/src/lib/apart-components/editor-toolbar/components/buttons/spacing/_spacing.theme.scss +24 -0
- package/lib/editor/components/tab/tab.helper.d.ts +0 -4
- package/lib/editor/content/display-data/format-ext.model.d.ts +0 -5
- package/lib/editor/display/print/print.rendering.helper.d.ts +0 -6
- package/lib/editor/positioning/line-width.helper.d.ts +0 -5
- /package/src/lib/editor/{components → gadgets/comment}/comment-popup/_theme.scss +0 -0
|
@@ -35,6 +35,9 @@ export declare abstract class BaseToolbarComponent extends DestroyComponent {
|
|
|
35
35
|
updateTableBorderStyle: EventEmitter<LineStyles>;
|
|
36
36
|
updateTableBorderWidth: EventEmitter<number>;
|
|
37
37
|
updateTableBorders: EventEmitter<Borders>;
|
|
38
|
+
selectSpacing: EventEmitter<number>;
|
|
39
|
+
selectBefore: EventEmitter<number>;
|
|
40
|
+
selectAfter: EventEmitter<number>;
|
|
38
41
|
styles: IToolbarStyles;
|
|
39
42
|
canUndo: boolean;
|
|
40
43
|
canRedo: boolean;
|
|
@@ -50,5 +53,5 @@ export declare abstract class BaseToolbarComponent extends DestroyComponent {
|
|
|
50
53
|
private historyInfoSubscription;
|
|
51
54
|
private stylesSubscription;
|
|
52
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseToolbarComponent, never>;
|
|
53
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseToolbarComponent, never, never, {}, { "print": "print"; "redo": "redo"; "undo": "undo"; "createElement": "createElement"; "changeTextStyle": "changeTextStyle"; "changeParagraphStyle": "changeParagraphStyle"; "setNumberingTemplateType": "setNumberingTemplateType"; "removeNumberings": "removeNumberings"; "insertImage": "insertImage"; "insertLink": "insertLink"; "insertTable": "insertTable"; "updateTableBorderStyle": "updateTableBorderStyle"; "updateTableBorderWidth": "updateTableBorderWidth"; "updateTableBorders": "updateTableBorders"; }, never, never, true, never>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseToolbarComponent, never, never, {}, { "print": "print"; "redo": "redo"; "undo": "undo"; "createElement": "createElement"; "changeTextStyle": "changeTextStyle"; "changeParagraphStyle": "changeParagraphStyle"; "setNumberingTemplateType": "setNumberingTemplateType"; "removeNumberings": "removeNumberings"; "insertImage": "insertImage"; "insertLink": "insertLink"; "insertTable": "insertTable"; "updateTableBorderStyle": "updateTableBorderStyle"; "updateTableBorderWidth": "updateTableBorderWidth"; "updateTableBorders": "updateTableBorders"; "selectSpacing": "selectSpacing"; "selectBefore": "selectBefore"; "selectAfter": "selectAfter"; }, never, never, true, never>;
|
|
54
57
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SpacingComponent {
|
|
3
|
+
isDisabled: import("@angular/core").InputSignal<boolean>;
|
|
4
|
+
spacing: import("@angular/core").InputSignal<number>;
|
|
5
|
+
before: import("@angular/core").InputSignal<number>;
|
|
6
|
+
after: import("@angular/core").InputSignal<number>;
|
|
7
|
+
selectSpacing: import("@angular/core").OutputEmitterRef<number>;
|
|
8
|
+
selectBefore: import("@angular/core").OutputEmitterRef<number>;
|
|
9
|
+
selectAfter: import("@angular/core").OutputEmitterRef<number>;
|
|
10
|
+
readonly spacings: string[];
|
|
11
|
+
onSelectSpacing(value: number): void;
|
|
12
|
+
onSelectBefore(value: number): void;
|
|
13
|
+
onSelectAfter(value: number): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpacingComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpacingComponent, "app-nod-spacing", never, { "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "spacing": { "alias": "spacing"; "required": false; "isSignal": true; }; "before": { "alias": "before"; "required": false; "isSignal": true; }; "after": { "alias": "after"; "required": false; "isSignal": true; }; }, { "selectSpacing": "selectSpacing"; "selectBefore": "selectBefore"; "selectAfter": "selectAfter"; }, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -16,6 +16,9 @@ export declare class ToolbarActionsComponent extends BaseToolbarComponent {
|
|
|
16
16
|
onApplyFontColor(color: string): void;
|
|
17
17
|
onApplyHighlightColor(color: string): void;
|
|
18
18
|
onApplyAlignment(alignment: Alignment): void;
|
|
19
|
+
onApplySpacing(value: number): void;
|
|
20
|
+
onApplyBefore(value: number): void;
|
|
21
|
+
onApplyAfter(value: number): void;
|
|
19
22
|
onSetNumberingTemplateType(templateType: NumberingTemplateType): void;
|
|
20
23
|
onTableInsertMenuClosed(): void;
|
|
21
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarActionsComponent, never>;
|
|
@@ -7,30 +7,31 @@ import * as i5 from "./components/menu-dropdowns/menu-dropdowns.component";
|
|
|
7
7
|
import * as i6 from "./components/menu-dropdowns-mobile/menu-dropdowns-mobile.component";
|
|
8
8
|
import * as i7 from "./components/buttons/numbering/numbering.component";
|
|
9
9
|
import * as i8 from "./components/buttons/print/print.component";
|
|
10
|
-
import * as i9 from "./components/
|
|
11
|
-
import * as i10 from "./components/
|
|
12
|
-
import * as i11 from "./components/buttons/
|
|
13
|
-
import * as i12 from "./components/buttons/
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "./components/buttons/font
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "../insert-table
|
|
19
|
-
import * as i18 from "
|
|
20
|
-
import * as i19 from "@angular/material/
|
|
21
|
-
import * as i20 from "@angular/material/button
|
|
22
|
-
import * as i21 from "@angular/material/
|
|
23
|
-
import * as i22 from "@angular/material/
|
|
24
|
-
import * as i23 from "@angular/material/
|
|
25
|
-
import * as i24 from "@angular/material/
|
|
26
|
-
import * as i25 from "@angular/
|
|
27
|
-
import * as i26 from "
|
|
28
|
-
import * as i27 from "./components/buttons/table-
|
|
29
|
-
import * as i28 from "./components/buttons/table-border-
|
|
30
|
-
import * as i29 from "
|
|
31
|
-
import * as i30 from "
|
|
10
|
+
import * as i9 from "./components/buttons/spacing/spacing.component";
|
|
11
|
+
import * as i10 from "./components/toolbar-actions/toolbar-actions.component";
|
|
12
|
+
import * as i11 from "./components/buttons/undo-redo/undo-redo.component";
|
|
13
|
+
import * as i12 from "./components/buttons/zoom/zoom.component";
|
|
14
|
+
import * as i13 from "./components/buttons/color-picker/color-picker.component";
|
|
15
|
+
import * as i14 from "@angular/common";
|
|
16
|
+
import * as i15 from "./components/buttons/font/font.component";
|
|
17
|
+
import * as i16 from "./components/buttons/font-size/font-size.component";
|
|
18
|
+
import * as i17 from "../insert-table/insert-table.component";
|
|
19
|
+
import * as i18 from "../insert-table-mobile/insert-table-mobile.component";
|
|
20
|
+
import * as i19 from "@angular/material/autocomplete";
|
|
21
|
+
import * as i20 from "@angular/material/button";
|
|
22
|
+
import * as i21 from "@angular/material/button-toggle";
|
|
23
|
+
import * as i22 from "@angular/material/expansion";
|
|
24
|
+
import * as i23 from "@angular/material/icon";
|
|
25
|
+
import * as i24 from "@angular/material/menu";
|
|
26
|
+
import * as i25 from "@angular/material/tooltip";
|
|
27
|
+
import * as i26 from "@angular/forms";
|
|
28
|
+
import * as i27 from "./components/buttons/table-borders/table-borders.component";
|
|
29
|
+
import * as i28 from "./components/buttons/table-border-style/table-border-style.component";
|
|
30
|
+
import * as i29 from "./components/buttons/table-border-width/table-border-width.component";
|
|
31
|
+
import * as i30 from "../text-format-mobile/text-format-mobile.component";
|
|
32
|
+
import * as i31 from "@ngx-translate/core";
|
|
32
33
|
export declare class EditorToolbarModule {
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<EditorToolbarModule, never>;
|
|
34
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EditorToolbarModule, [typeof i1.EditorMobileToolbarComponent, typeof i2.EditorToolbarComponent, typeof i3.FontStyleComponent, typeof i4.FormatComponent, typeof i5.MenuDropdownsComponent, typeof i6.MenuDropdownsMobileComponent, typeof i7.NumberingComponent, typeof i8.PrintComponent, typeof i9.
|
|
35
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EditorToolbarModule, [typeof i1.EditorMobileToolbarComponent, typeof i2.EditorToolbarComponent, typeof i3.FontStyleComponent, typeof i4.FormatComponent, typeof i5.MenuDropdownsComponent, typeof i6.MenuDropdownsMobileComponent, typeof i7.NumberingComponent, typeof i8.PrintComponent, typeof i9.SpacingComponent, typeof i10.ToolbarActionsComponent, typeof i11.UndoRedoComponent, typeof i12.ZoomComponent], [typeof i13.ColorPickerComponent, typeof i14.CommonModule, typeof i15.FontComponent, typeof i16.FontSizeComponent, typeof i17.InsertTableComponent, typeof i18.InsertTableMobileComponent, typeof i19.MatAutocompleteModule, typeof i20.MatButtonModule, typeof i21.MatButtonToggleModule, typeof i22.MatExpansionModule, typeof i23.MatIconModule, typeof i24.MatMenuModule, typeof i25.MatTooltipModule, typeof i26.ReactiveFormsModule, typeof i27.TableBordersComponent, typeof i28.TableBorderStyleComponent, typeof i29.TableBorderWidthComponent, typeof i30.TextFormatMobileComponent, typeof i31.TranslateModule], [typeof i1.EditorMobileToolbarComponent, typeof i2.EditorToolbarComponent, typeof i5.MenuDropdownsComponent, typeof i6.MenuDropdownsMobileComponent, typeof i10.ToolbarActionsComponent]>;
|
|
35
36
|
static ɵinj: i0.ɵɵInjectorDeclaration<EditorToolbarModule>;
|
|
36
37
|
}
|
|
@@ -7,6 +7,8 @@ export declare abstract class ExternalComponent extends BaseNoderComponent {
|
|
|
7
7
|
content: ElementModel;
|
|
8
8
|
protected abstract sidenavComponent: Type<ExternalSidenavInterface>;
|
|
9
9
|
protected focusSidenav: boolean;
|
|
10
|
+
isText: boolean;
|
|
11
|
+
getText(): string;
|
|
10
12
|
protected skipSidenav(): boolean;
|
|
11
13
|
focus(): void;
|
|
12
14
|
blur(): void;
|
|
@@ -2,13 +2,9 @@ import { ComponentRef, Injector, Type } from '@angular/core';
|
|
|
2
2
|
import { BaseNoderComponent } from '../abstract/base.component';
|
|
3
3
|
import { ComponentService } from './component.service';
|
|
4
4
|
import { ContentType } from '../../../content/contents.interface';
|
|
5
|
-
import { DisplayToken } from '../../../content/display-data/display-token.model';
|
|
6
|
-
import { DistanceModel } from '../../../execution/distance.model';
|
|
7
5
|
import { ExternalElementModel } from '../../external-element/models/external-element.model';
|
|
8
6
|
import { GeneralPropertiesModel } from '../../../content/display-data/general-properties.model';
|
|
9
7
|
import { ICustomComponents } from '../custom-components.interface';
|
|
10
|
-
import { IFontMetricSize } from '../../../gadgets/font-metrics/font-metric-size.interface';
|
|
11
|
-
import { LineInfoModel } from '../../../content/display-data/line-info.model';
|
|
12
8
|
import * as i0 from "@angular/core";
|
|
13
9
|
export declare class CustomContentService {
|
|
14
10
|
componentService: ComponentService;
|
|
@@ -16,13 +12,10 @@ export declare class CustomContentService {
|
|
|
16
12
|
elements: ExternalElementModel[];
|
|
17
13
|
constructor(componentService: ComponentService, injector: Injector);
|
|
18
14
|
generateComponent(model: ContentType, components: ICustomComponents, sessionId: number, generalProperties: GeneralPropertiesModel, contentWidth: number, charIndex: number): ComponentRef<BaseNoderComponent> | null;
|
|
19
|
-
|
|
20
|
-
getComponents(components: ICustomComponents, distance: DistanceModel): ComponentRef<BaseNoderComponent>[];
|
|
15
|
+
getComponents(components: ICustomComponents, start: number, end: number): ComponentRef<BaseNoderComponent>[];
|
|
21
16
|
getComponent(components: ICustomComponents, char: string, charIndex: number): ComponentRef<BaseNoderComponent>;
|
|
22
|
-
getTokenFromComponent(component: ComponentRef<BaseNoderComponent>, lineInfo: LineInfoModel, displayValue: number, isFirst: boolean, size: IFontMetricSize): DisplayToken;
|
|
23
17
|
findComponentType(type: number): Type<BaseNoderComponent>;
|
|
24
18
|
findComponent<T>(components: ComponentRef<T>[], insertIndex: number): ComponentRef<T>;
|
|
25
|
-
private isFragmentContainComponents;
|
|
26
19
|
isSpecialMarker(char: string): boolean;
|
|
27
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomContentService, never>;
|
|
28
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<CustomContentService>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export declare const DisplayValue: {
|
|
2
2
|
char: number;
|
|
3
3
|
customContent: number;
|
|
4
|
+
table: number;
|
|
5
|
+
pageBreak: number;
|
|
6
|
+
lineBreak: number;
|
|
4
7
|
punctuation: number;
|
|
5
8
|
space: number;
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
tab: number;
|
|
10
|
+
paragraph: number;
|
|
11
|
+
hyphen: number;
|
|
8
12
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ComponentRef } from '@angular/core';
|
|
2
1
|
import { BreakTypes } from '../../gadgets/page-break/break-types.enum';
|
|
3
2
|
import { ContentType } from '../contents.interface';
|
|
4
3
|
import { CursorParagraph } from '../../positioning/cursor-paragraph';
|
|
@@ -9,7 +8,6 @@ import { EventEmitting } from '../../core/event-emitting';
|
|
|
9
8
|
import { GeneralPropertiesModel } from './general-properties.model';
|
|
10
9
|
import { ICustomComponents } from '../../components/shared/custom-components.interface';
|
|
11
10
|
import { LineInfoModel } from './line-info.model';
|
|
12
|
-
import { NoderTableComponent } from '../../components/table/components/table.component';
|
|
13
11
|
import { NumberingDataModel } from '../../gadgets/numbering/numbering-data.model';
|
|
14
12
|
import { PageFormat } from './page-format';
|
|
15
13
|
import { PageFormatModel } from '../../../models/generated/page-format.model';
|
|
@@ -33,7 +31,6 @@ export declare class DisplayData extends EventEmitting {
|
|
|
33
31
|
paragraphs: ParagraphInfoModel[];
|
|
34
32
|
pagesFormat: PageFormat[];
|
|
35
33
|
allPagesHeight: number;
|
|
36
|
-
tabTokens: DisplayToken[];
|
|
37
34
|
get maxPageWidth(): number;
|
|
38
35
|
private readonly ParagraphInfoChanges;
|
|
39
36
|
get ParagraphInfoChanges$(): import("rxjs").Observable<ParagraphInfoAdded | ParagraphInfoContentChanged | ParagraphInfoContentInserted | ParagraphInfosRemoved>;
|
|
@@ -67,38 +64,22 @@ export declare class DisplayData extends EventEmitting {
|
|
|
67
64
|
updateParagraphStartIndex(first: number): void;
|
|
68
65
|
updateParagraphSettingsNumberingData(index: number): void;
|
|
69
66
|
updateNextLineIndexes(firstParagraph: number, lastParagraph: number): void;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
private
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
private fillLineTokens;
|
|
67
|
+
isSameNumberingId(paragraphIndex: number, numberingId: number): boolean;
|
|
68
|
+
private updateNumberingsDataOnChange;
|
|
69
|
+
private splitParagraphByLines;
|
|
70
|
+
private getParagraphTokens;
|
|
71
|
+
getParagraphLineTokens(paragraphIndex: number, lineIndex: number): DisplayToken[];
|
|
72
|
+
getTokens(contentIndex: number, content: string, paragraphSymbolIndex: number): {
|
|
73
|
+
tokens: DisplayToken[];
|
|
74
|
+
paragraphToken: DisplayToken;
|
|
75
|
+
};
|
|
80
76
|
private getOrGenerateComponent;
|
|
81
|
-
private processCharSizes;
|
|
82
77
|
private getPageFormatParagraphs;
|
|
83
78
|
getPageFormatByPageNumber(pageNumber: number): PageFormat;
|
|
84
79
|
getPageFormatAtPosition(startParagraphIndex: number): PageFormat | undefined;
|
|
85
80
|
getPageFormatIndexAtPosition(startParagraphIndex: number): number;
|
|
86
|
-
getLineTokens(model: ContentType, line: string, startIndex: number): DisplayToken[];
|
|
87
|
-
private findSameNumberingIndex;
|
|
88
|
-
private getEmptyDisplayTokens;
|
|
89
|
-
private getEmptyLineTokens;
|
|
90
|
-
private getLineInfoByBreakModifier;
|
|
91
|
-
private getParagraphIndentLeft;
|
|
92
|
-
private getLineInfoFromTextLine;
|
|
93
|
-
private getLineInfoModel;
|
|
94
|
-
private getIndentLeftFromTextLine;
|
|
95
|
-
private computeWrapSplit;
|
|
96
|
-
private calculateSplit;
|
|
97
|
-
private isWhiteSpace;
|
|
98
|
-
/**
|
|
99
|
-
* Computes wrap index based on max row width
|
|
100
|
-
*/
|
|
101
81
|
private computeWrapIndex;
|
|
82
|
+
private adjustLastTab;
|
|
102
83
|
private getPreviousParagraphInfo;
|
|
103
84
|
private getVisiblePages;
|
|
104
85
|
private calculateVisiblePageCount;
|
|
@@ -2,28 +2,19 @@ import { IFontMetricSize } from '../../gadgets/font-metrics/font-metric-size.int
|
|
|
2
2
|
export declare class DisplayToken implements IFontMetricSize {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
|
-
baseline: number;
|
|
6
|
-
content: number;
|
|
7
5
|
font: number;
|
|
8
|
-
line: number;
|
|
9
6
|
lineSpacing: number;
|
|
10
|
-
multiplier: number;
|
|
11
7
|
ascent: number;
|
|
12
8
|
descent: number;
|
|
13
9
|
displayValue: number;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
markerWidth: number;
|
|
22
|
-
isPageBreak: boolean;
|
|
23
|
-
isLineBreak: boolean;
|
|
24
|
-
isTab: boolean;
|
|
25
|
-
isTable: boolean;
|
|
26
|
-
isNumbering: boolean;
|
|
10
|
+
get isSpace(): boolean;
|
|
11
|
+
get isParagraph(): boolean;
|
|
12
|
+
get isPageBreak(): boolean;
|
|
13
|
+
get isLineBreak(): boolean;
|
|
14
|
+
get isTab(): boolean;
|
|
15
|
+
get isTable(): boolean;
|
|
16
|
+
get isWhiteSpace(): boolean;
|
|
27
17
|
get breaksLine(): boolean;
|
|
18
|
+
get breakable(): boolean;
|
|
28
19
|
constructor(fields?: Partial<DisplayToken>);
|
|
29
20
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { NumberingModel } from '../../../models/generated/numbering.model';
|
|
2
2
|
export type NumberingInfo = Record<string, {
|
|
3
3
|
markerIndex: number;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
start: number;
|
|
5
|
+
needToRecalculate: boolean;
|
|
6
|
+
needToCalculateFirstMarker: boolean;
|
|
6
7
|
}[]>;
|
|
7
8
|
export declare class GeneralPropertiesModel {
|
|
8
9
|
defaultTabWidth: number;
|
|
@@ -3,5 +3,6 @@ export declare class IndentModel {
|
|
|
3
3
|
hanging: number;
|
|
4
4
|
left: number;
|
|
5
5
|
right: number;
|
|
6
|
-
|
|
6
|
+
markerWidth: number;
|
|
7
|
+
constructor(firstLine: number, hanging: number, left: number, right: number, markerWidth: number);
|
|
7
8
|
}
|
|
@@ -2,7 +2,7 @@ import { IndentModel } from './indent.model';
|
|
|
2
2
|
export declare class LineInfoModel {
|
|
3
3
|
height: number;
|
|
4
4
|
width: number;
|
|
5
|
-
|
|
5
|
+
ascent: number;
|
|
6
6
|
align: number;
|
|
7
7
|
indent: IndentModel;
|
|
8
8
|
offsetBefore: number;
|
|
@@ -13,8 +13,8 @@ export declare class LineInfoModel {
|
|
|
13
13
|
backgroundColor: string;
|
|
14
14
|
hasTable: boolean;
|
|
15
15
|
isNumbering: boolean;
|
|
16
|
-
markerWidth?: number;
|
|
17
16
|
wordSpacing?: number;
|
|
18
|
-
|
|
17
|
+
wordSpacingStart?: number;
|
|
18
|
+
wordSpacingEnd?: number;
|
|
19
19
|
constructor(fields?: Partial<LineInfoModel>);
|
|
20
20
|
}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
import { IndentModel } from './indent.model';
|
|
2
2
|
import { LineInfoModel } from './line-info.model';
|
|
3
|
-
export declare class TextLineInfo {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
maxAscent: number;
|
|
3
|
+
export declare class TextLineInfo extends LineInfoModel {
|
|
7
4
|
page?: number;
|
|
8
5
|
paddingLeft: number;
|
|
9
6
|
offsetMargin: number;
|
|
10
|
-
offsetBefore: number;
|
|
11
|
-
offsetAfter: number;
|
|
12
7
|
firstLinePageOffset: number;
|
|
13
8
|
endPageOffset: number;
|
|
14
9
|
screenLine: number;
|
|
15
|
-
isAfterPageBreak: boolean;
|
|
16
|
-
isEndedByPageBreak: boolean;
|
|
17
|
-
backgroundColor: string;
|
|
18
|
-
hasTable: boolean;
|
|
19
10
|
splitOffset: number;
|
|
20
11
|
indentLeft: number;
|
|
21
12
|
indentFirstLine: number;
|
|
22
|
-
wordSpacing?: number;
|
|
23
|
-
wordSpacingWidth?: number;
|
|
24
|
-
isNumbering: boolean;
|
|
25
|
-
markerWidth?: number;
|
|
26
13
|
constructor(offsetMargin: number, contentWidth: number, align: number, indent: IndentModel, fields?: Partial<LineInfoModel>);
|
|
27
14
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { ComponentRef } from '@angular/core';
|
|
2
|
+
import { BaseNoderComponent } from '../../components/shared/abstract/base.component';
|
|
3
|
+
import { BreakTypes } from '../../gadgets/page-break/break-types.enum';
|
|
1
4
|
import { DisplayToken } from '../display-data/display-token.model';
|
|
2
|
-
import {
|
|
5
|
+
import { IFontMetricSize } from '../../gadgets/font-metrics/font-metric-size.interface';
|
|
6
|
+
import { TextStyleModel } from '../../../models/generated/text-style.model';
|
|
3
7
|
export declare class DisplayTokenHelper {
|
|
4
|
-
static getDisplayValue(charCode: number): number;
|
|
5
|
-
static
|
|
8
|
+
static getDisplayValue(charCode: number, breakType: BreakTypes | null): number;
|
|
9
|
+
static getParagraphToken(paragraphSymbolStyle: TextStyleModel): DisplayToken;
|
|
10
|
+
static getSymbolToken(code: number, size: IFontMetricSize, breakType: BreakTypes | null): DisplayToken;
|
|
11
|
+
static getComponentToken(component: ComponentRef<BaseNoderComponent>, size: IFontMetricSize): DisplayToken;
|
|
6
12
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContentType } from '../contents.interface';
|
|
2
|
+
import { DisplayToken } from '../display-data/display-token.model';
|
|
3
|
+
import { GeneralPropertiesModel } from '../display-data/general-properties.model';
|
|
4
|
+
import { IndentModel } from '../display-data/indent.model';
|
|
5
|
+
import { LineInfoModel } from '../display-data/line-info.model';
|
|
6
|
+
import { ParagraphStyleModel } from '../../../models/generated/paragraph-style.model';
|
|
7
|
+
export declare class LineInfoHelper {
|
|
8
|
+
static get(tokens: DisplayToken[], isAfterPageBreak: boolean, isLastLine: boolean, style: ParagraphStyleModel, indent: IndentModel, isNumbering: boolean, width: number, defaultHeight: number, defaultAscent: number): LineInfoModel;
|
|
9
|
+
static getFirstLineIndent(model: ContentType, paragraphIndex: number, generalProperties: GeneralPropertiesModel): IndentModel;
|
|
10
|
+
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { EditSession } from '../../execution/edit.session';
|
|
2
2
|
import { ILayerConfig } from './layer.config';
|
|
3
3
|
import { Lines } from '../../content/display-data/lines';
|
|
4
|
-
import { RenderingHelper } from '../rendering.helper';
|
|
5
4
|
export declare class TextLayer {
|
|
6
5
|
private parentElement;
|
|
7
6
|
protected session: EditSession;
|
|
8
|
-
private renderingHelper;
|
|
9
7
|
element: HTMLElement;
|
|
10
8
|
lines: Lines;
|
|
11
9
|
config: ILayerConfig;
|
|
12
|
-
constructor(parentElement: HTMLElement, session: EditSession
|
|
10
|
+
constructor(parentElement: HTMLElement, session: EditSession);
|
|
13
11
|
destroy(): void;
|
|
14
12
|
updateLines(config: ILayerConfig): void;
|
|
15
13
|
scrollLines(config: ILayerConfig): void;
|
|
16
14
|
protected getParagraphTop(row: number): number;
|
|
17
15
|
private renderTextParagraph;
|
|
18
|
-
private
|
|
16
|
+
private renderParagraph;
|
|
19
17
|
private readonly pagesCountChangedHandler;
|
|
20
18
|
}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import { ComponentRef } from '@angular/core';
|
|
2
1
|
import { BreakModel } from '../../models/generated/break.model';
|
|
3
2
|
import { CustomContentService } from '../components/shared/services/custom-content.service';
|
|
4
|
-
import {
|
|
5
|
-
import { FormatExtModel } from '../content/display-data/format-ext.model';
|
|
3
|
+
import { FormatModel } from '../../models/generated/format.model';
|
|
6
4
|
import { ICustomComponents } from '../components/shared/custom-components.interface';
|
|
7
5
|
import { Paragraph } from '../content/display-data/paragraph';
|
|
6
|
+
import { ParagraphInfoModel } from '../content/display-data/models/paragraph-info.model';
|
|
8
7
|
import { TextLineInfo } from '../content/display-data/text-line-info';
|
|
9
8
|
export declare class RenderingHelper {
|
|
10
9
|
static createLineElement(lineInfo: TextLineInfo, numberingOffsetLeft: number, scalingRatio: number): HTMLElement;
|
|
11
|
-
static
|
|
10
|
+
static renderParagraph(domContent: {
|
|
12
11
|
currentElement: HTMLElement;
|
|
13
12
|
parentNode: Node;
|
|
14
|
-
},
|
|
15
|
-
static renderContentWrappedLine(domContent: {
|
|
16
|
-
currentElement: HTMLElement;
|
|
17
|
-
parentNode: Node;
|
|
18
|
-
}, splits: number[], currentParagraph: Paragraph, formatsExt: FormatExtModel[], distance: DistanceModel, customContentService: CustomContentService, customComponents: ICustomComponents, scalingRatio: number, breaks?: BreakModel[]): void;
|
|
13
|
+
}, paragraph: ParagraphInfoModel, formats: FormatModel[], customContentService: CustomContentService, customComponents: ICustomComponents, scalingRatio: number, breaks?: BreakModel[]): void;
|
|
19
14
|
static renderNumberingMarker(paragraph: Paragraph, layerElement: HTMLElement, scalingRatio: number): HTMLElement;
|
|
20
15
|
static createDivContainer(className: string): HTMLDivElement;
|
|
21
16
|
private static renderFormatContent;
|
|
22
|
-
private static renderTextWithCustomContent;
|
|
23
|
-
private static renderTextWithSpacingHandling;
|
|
24
17
|
private static renderText;
|
|
25
|
-
private static getTextIndexLengthForInsert;
|
|
26
|
-
protected static attachComponent(fragment: DocumentFragment, component: ComponentRef<unknown>, customContentService: CustomContentService): void;
|
|
27
18
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/portal';
|
|
2
2
|
import { ModuleWithProviders, Type } from '@angular/core';
|
|
3
3
|
import { BaseCommentComponent } from './gadgets/comment/base-comment.component';
|
|
4
|
+
import { CommentTypeModel } from './gadgets/comment/comment-popup/comment-type.model';
|
|
4
5
|
import { ImageApiService } from './components/image/image-api.service';
|
|
5
6
|
import { ExternalElementInterface } from '../editor/components/external-element/external-element.service';
|
|
6
7
|
import { ExternalSidenavModel } from './components/external-element/models/external-sidenav.model';
|
|
7
8
|
import { InsertOverlayComponentInterface } from './gadgets/insert-overlays/insert-overlay-component.interface';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "./components/editor.component";
|
|
10
|
-
import * as i2 from "./
|
|
11
|
+
import * as i2 from "./gadgets/comment/comment-popup/comment-popup.component";
|
|
11
12
|
import * as i3 from "./components/edges/edge.component";
|
|
12
13
|
import * as i4 from "./components/image/components/image.component";
|
|
13
14
|
import * as i5 from "./components/tab/tab.component";
|
|
@@ -36,6 +37,7 @@ export interface INoderOptions {
|
|
|
36
37
|
}[];
|
|
37
38
|
elementService: Type<ExternalElementInterface>;
|
|
38
39
|
commentComponent?: Type<BaseCommentComponent>;
|
|
40
|
+
commentTypes?: CommentTypeModel[];
|
|
39
41
|
}
|
|
40
42
|
export declare class EditorModule {
|
|
41
43
|
static forRoot(options?: INoderOptions): ModuleWithProviders<EditorModule>;
|
|
@@ -6,6 +6,7 @@ import { BaseNoderComponent } from '../components/shared/abstract/base.component
|
|
|
6
6
|
import { BreakTypes } from '../gadgets/page-break/break-types.enum';
|
|
7
7
|
import { CommandsService } from '../operations/commands.service';
|
|
8
8
|
import { CommentModel } from '../../models/generated/comment.model';
|
|
9
|
+
import { CommentTypeModel } from '../gadgets/comment/comment-popup/comment-type.model';
|
|
9
10
|
import { CreateEdgesModel } from '../../models/generated/create-edges.model';
|
|
10
11
|
import { DocumentHandler } from '../interaction/document.handler';
|
|
11
12
|
import { DocxModel } from '../../models/generated/docx.model';
|
|
@@ -180,9 +181,11 @@ export declare class Editor {
|
|
|
180
181
|
onCut(event: ClipboardEvent): void;
|
|
181
182
|
onCopy(event: ClipboardEvent): void;
|
|
182
183
|
onPaste(event: ClipboardEvent): void;
|
|
183
|
-
onCreateComment(): void;
|
|
184
|
+
onCreateComment(commentType: CommentTypeModel): void;
|
|
184
185
|
onCommentCreated(reqId: number, commentId: number): void;
|
|
185
186
|
onCommentRemoved(id: number): void;
|
|
187
|
+
onCommentTextReplace(commentId: number, newText: string): void;
|
|
188
|
+
onGetCommentText(commentId: number, continueWith: (text: string) => void): void;
|
|
186
189
|
onSetCommentsVisibility(value: boolean): void;
|
|
187
190
|
private initResizeListener;
|
|
188
191
|
private destroyResizeListener;
|
|
@@ -280,6 +283,9 @@ export declare class Editor {
|
|
|
280
283
|
updateTableBorderStyleSubscription(): Subscription;
|
|
281
284
|
updateTableBorderWidthSubscription(): Subscription;
|
|
282
285
|
updateTableBordersSubscription(): Subscription;
|
|
286
|
+
selectSpacingSubscription(): Subscription;
|
|
287
|
+
selectBeforeSubscription(): Subscription;
|
|
288
|
+
selectAfterSubscription(): Subscription;
|
|
283
289
|
insertTextSubscription(): Subscription;
|
|
284
290
|
undoSubscription(): Subscription;
|
|
285
291
|
redoSubscription(): Subscription;
|
|
@@ -302,6 +308,8 @@ export declare class Editor {
|
|
|
302
308
|
private selectCommentSubscription;
|
|
303
309
|
private removeCommentSubscription;
|
|
304
310
|
private setComentsVisibilitySubscription;
|
|
311
|
+
private getCommentTextSubscription;
|
|
312
|
+
private replaceCommentTextSubscription;
|
|
305
313
|
private recreateMainSession;
|
|
306
314
|
private changeColumnsWidth;
|
|
307
315
|
private changeCellsWidth;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { CommentModel } from '../../models/generated/comment.model';
|
|
2
3
|
import { CommentRenderService } from '../gadgets/comment/comment-render.service';
|
|
3
4
|
import { ComponentService } from '../components/shared/services/component.service';
|
|
4
5
|
import { CustomContentService } from '../components/shared/services/custom-content.service';
|
|
@@ -50,6 +51,10 @@ export declare class RegulatorService {
|
|
|
50
51
|
session: SessionModel;
|
|
51
52
|
target: TargetModel;
|
|
52
53
|
} | null;
|
|
54
|
+
getComment(commentId: number): {
|
|
55
|
+
session: SessionModel;
|
|
56
|
+
comment: CommentModel;
|
|
57
|
+
} | null;
|
|
53
58
|
setCommentsVisibility(value: boolean): void;
|
|
54
59
|
isWithinEdge(sessionId: number): boolean;
|
|
55
60
|
arrangeEdgeChange(sessionId: number): void;
|
package/lib/editor/{components → gadgets/comment}/comment-popup/comment-popup.component.d.ts
RENAMED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CommentTypeModel } from './comment-type.model';
|
|
2
|
+
import { EditorService } from '../../../interaction/editor.service';
|
|
3
|
+
import { OverlayService } from '../../../components/shared/services/overlay.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class CommentPopupComponent {
|
|
5
6
|
private editorService;
|
|
6
7
|
private overlayService;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
commentTypes: CommentTypeModel[];
|
|
9
|
+
constructor(editorService: EditorService, overlayService: OverlayService, commentTypes: CommentTypeModel[]);
|
|
10
|
+
addComment(type: CommentTypeModel): void;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentPopupComponent, never>;
|
|
10
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<CommentPopupComponent, "app-nod-comment-popup", never, {}, {}, never, never, false, never>;
|
|
11
13
|
}
|
|
@@ -1,26 +1,35 @@
|
|
|
1
|
-
import { GeneralPropertiesModel, NumberingInfo } from '../../content/display-data/general-properties.model';
|
|
2
1
|
import { NumberingDataModel } from './numbering-data.model';
|
|
2
|
+
import { NumberingInfo } from '../../content/display-data/general-properties.model';
|
|
3
3
|
import { NumberingLevelModel } from '../../../models/generated/numbering-level.model';
|
|
4
4
|
import { NumberingModel } from '../../../models/generated/numbering.model';
|
|
5
5
|
import { NumberingParagraphStyleModel } from './numbering-paragraph-style.model';
|
|
6
6
|
import { Paragraph } from '../../content/display-data/paragraph';
|
|
7
7
|
import { ParagraphModel } from '../../../models/generated/paragraph.model';
|
|
8
8
|
import { ParagraphStyleModel } from '../../../models/generated/paragraph-style.model';
|
|
9
|
+
import { TextLineInfo } from '../../content/display-data/text-line-info';
|
|
9
10
|
import { TextStyleModel } from '../../../models/generated/text-style.model';
|
|
10
11
|
export declare class NumberingHelper {
|
|
12
|
+
static addValueToNumberingInfo(numberingId: number, numberingInfo: NumberingInfo, numberingLevels: NumberingLevelModel[]): void;
|
|
13
|
+
static setNumberingNeedToRecalculate(numberingInfo: NumberingInfo, numberingId: number): void;
|
|
14
|
+
static setAllNumberingIsCalculated(numberingInfo: NumberingInfo): void;
|
|
11
15
|
static getStyles(paragraphStyle: ParagraphStyleModel, numberings: NumberingModel[]): NumberingParagraphStyleModel;
|
|
12
|
-
static
|
|
13
|
-
static
|
|
16
|
+
static findNumberingLevel(numberings: NumberingModel[], id: number, level: number): NumberingLevelModel;
|
|
17
|
+
static findNumberingLevels(numberings: NumberingModel[], id: number): NumberingLevelModel[];
|
|
18
|
+
static calculateNumberingInfo(numberingId: number | null, level: number | null, numberingInfo: NumberingInfo, numberings: NumberingModel[]): void;
|
|
14
19
|
private static calculateMarkerIndexes;
|
|
15
|
-
static getMarker(
|
|
20
|
+
static getMarker(levelModels: NumberingLevelModel[], level: number, numberingId: number, numberingInfo: NumberingInfo): string;
|
|
16
21
|
static createDataModel(numberings: NumberingModel[], paragraphs: ParagraphModel[], paragraphIndex: number, numberingInfo: NumberingInfo): NumberingDataModel;
|
|
17
|
-
static updateMarkerData(
|
|
22
|
+
static updateMarkerData(numberings: NumberingModel[], paragraph: Paragraph, paragraphTextStyle: TextStyleModel, paragraphStyle: ParagraphStyleModel): void;
|
|
18
23
|
static getMarkerSizes(marker: string, markerStyle: TextStyleModel): {
|
|
19
24
|
height: number;
|
|
20
25
|
width: number;
|
|
21
26
|
};
|
|
22
27
|
static updateNumberingInfo(numberingInfo: NumberingInfo, marker: string, numberingId: number, level: number): void;
|
|
23
|
-
private static getLevelIndex;
|
|
24
28
|
private static getLevelInfo;
|
|
25
|
-
static createMarkerString(numberingInfo: NumberingInfo, numberingId: number,
|
|
29
|
+
static createMarkerString(numberingInfo: NumberingInfo, numberingId: number, splittedMarker: string[]): string;
|
|
30
|
+
static getMarkerOffset(paragraphSettings: Paragraph): {
|
|
31
|
+
offset: number;
|
|
32
|
+
markerWidth: number;
|
|
33
|
+
};
|
|
34
|
+
static getOffsetCausedByMarker(numberingData: NumberingDataModel, info: TextLineInfo): number;
|
|
26
35
|
}
|