@talrace/ngx-noder 19.0.44 → 19.0.46
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 +403 -90
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/editor/components/external-element/external.component.d.ts +1 -0
- package/lib/editor/components/shared/enums/after-close-overlay-actions.enum.d.ts +3 -0
- package/lib/editor/components/table/cell-resizer/cell-resizer.d.ts +2 -1
- package/lib/editor/components/table/components/table.component.d.ts +1 -0
- package/lib/editor/content/display-data/display-data.d.ts +3 -3
- package/lib/editor/content/helpers/link.helper.d.ts +1 -1
- package/lib/editor/content/helpers/paragraph-numbering.helper.d.ts +5 -0
- package/lib/editor/display/layers/grammar-highlight.layer.d.ts +1 -0
- package/lib/editor/display/renderer.d.ts +4 -3
- package/lib/editor/display/virtual.renderer.d.ts +3 -2
- package/lib/editor/execution/edit.session.d.ts +1 -0
- package/lib/editor/execution/editor.d.ts +10 -1
- package/lib/editor/execution/regulator.service.d.ts +2 -0
- package/lib/editor/gadgets/editor-menu/context-menu.component.d.ts +23 -0
- package/lib/editor/gadgets/grammar/grammar-popup/grammar-popup.component.d.ts +0 -1
- package/lib/editor/gadgets/history/operation-history.d.ts +1 -0
- package/lib/editor/gadgets/history/operation.type.d.ts +2 -1
- package/lib/editor/gadgets/numbering/numbering-data.model.d.ts +1 -0
- package/lib/editor/gadgets/numbering/numbering.helper.d.ts +1 -1
- package/lib/editor/gadgets/set-numbering-value/set-numbering-value.component.d.ts +17 -0
- package/lib/editor/interaction/document.handler.d.ts +1 -0
- package/lib/editor/interaction/editor.service.d.ts +12 -0
- package/lib/editor/operations/enums/command-type.enum.d.ts +2 -1
- package/lib/editor/operations/helpers/paragraph-operations.helper.d.ts +1 -0
- package/lib/editor/operations/operations-helper.helper.d.ts +1 -0
- package/lib/editor/operations/save-commands.helper.d.ts +1 -0
- package/lib/models/generated/apply-new-numbering-for-paragraphs.model.d.ts +6 -0
- package/lib/models/generated/command.model.d.ts +2 -0
- package/package.json +1 -1
- package/src/_ngx-noder.theme.scss +8 -0
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.scss +33 -0
- package/src/assets/fonts/nc-iconfont.svg +12 -1
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
- package/src/lib/editor/gadgets/editor-menu/_theme.scss +12 -0
- package/src/lib/editor/gadgets/grammar/grammar-popup/_theme.scss +7 -8
- package/src/lib/editor/gadgets/set-numbering-value/_theme.scss +8 -0
- package/lib/editor/gadgets/grammar/grammar.const.d.ts +0 -1
|
@@ -14,15 +14,15 @@ import * as i5$1 from '@angular/material/tooltip';
|
|
|
14
14
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
15
|
import * as i6 from '@ngx-translate/core';
|
|
16
16
|
import { TranslateModule } from '@ngx-translate/core';
|
|
17
|
-
import * as i3 from '@angular/common';
|
|
18
|
-
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
19
17
|
import * as i2 from '@angular/forms';
|
|
20
|
-
import { FormControl,
|
|
18
|
+
import { FormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
19
|
+
import * as i5$2 from '@angular/material/form-field';
|
|
20
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
21
21
|
import * as i6$1 from '@angular/material/input';
|
|
22
22
|
import { MatInputModule } from '@angular/material/input';
|
|
23
|
+
import * as i3 from '@angular/common';
|
|
24
|
+
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
23
25
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
24
|
-
import * as i5$2 from '@angular/material/form-field';
|
|
25
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
26
26
|
import * as i6$2 from '@angular/cdk/clipboard';
|
|
27
27
|
import * as i1$1 from '@angular/material/dialog';
|
|
28
28
|
import { MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
@@ -636,6 +636,7 @@ class EditorService {
|
|
|
636
636
|
this._displayGrammarError$ = new Subject();
|
|
637
637
|
this._applyGrammarSuggestion$ = new Subject();
|
|
638
638
|
this._ignoreGrammarError$ = new Subject();
|
|
639
|
+
this._toggleGrammarChecks$ = new Subject();
|
|
639
640
|
this._displaySearchBar$ = new Subject();
|
|
640
641
|
this._searchTerm$ = new Subject();
|
|
641
642
|
this._dialogSearchTerm$ = new Subject();
|
|
@@ -718,6 +719,9 @@ class EditorService {
|
|
|
718
719
|
this._setCommentsVisibility$ = new Subject();
|
|
719
720
|
this._getCommentText$ = new Subject();
|
|
720
721
|
this._replaceCommentText$ = new Subject();
|
|
722
|
+
this._startNewList$ = new Subject();
|
|
723
|
+
this._continueNumbering$ = new Subject();
|
|
724
|
+
this._setNumberingValue$ = new Subject();
|
|
721
725
|
}
|
|
722
726
|
set styles(value) {
|
|
723
727
|
this._styles$.next({ ...value });
|
|
@@ -761,6 +765,9 @@ class EditorService {
|
|
|
761
765
|
get ignoreGrammarError$() {
|
|
762
766
|
return this._ignoreGrammarError$.asObservable();
|
|
763
767
|
}
|
|
768
|
+
get toggleGrammarChecks$() {
|
|
769
|
+
return this._toggleGrammarChecks$.asObservable();
|
|
770
|
+
}
|
|
764
771
|
get displaySearchBar$() {
|
|
765
772
|
return this._displaySearchBar$.asObservable();
|
|
766
773
|
}
|
|
@@ -1017,6 +1024,24 @@ class EditorService {
|
|
|
1017
1024
|
get replaceCommentText$() {
|
|
1018
1025
|
return this._replaceCommentText$.asObservable();
|
|
1019
1026
|
}
|
|
1027
|
+
get startNewList$() {
|
|
1028
|
+
return this._startNewList$.asObservable();
|
|
1029
|
+
}
|
|
1030
|
+
get continueNumbering$() {
|
|
1031
|
+
return this._continueNumbering$.asObservable();
|
|
1032
|
+
}
|
|
1033
|
+
get setNumberingValue$() {
|
|
1034
|
+
return this._setNumberingValue$.asObservable();
|
|
1035
|
+
}
|
|
1036
|
+
startNewList() {
|
|
1037
|
+
this._startNewList$.next();
|
|
1038
|
+
}
|
|
1039
|
+
continueNumbering() {
|
|
1040
|
+
this._continueNumbering$.next();
|
|
1041
|
+
}
|
|
1042
|
+
setNumberingValue(value) {
|
|
1043
|
+
this._setNumberingValue$.next(value);
|
|
1044
|
+
}
|
|
1020
1045
|
tabSettings(value) {
|
|
1021
1046
|
this._tabSettings$.next(value);
|
|
1022
1047
|
}
|
|
@@ -1273,6 +1298,9 @@ class EditorService {
|
|
|
1273
1298
|
ignoreGrammarSuggestion(error) {
|
|
1274
1299
|
this._ignoreGrammarError$.next(error);
|
|
1275
1300
|
}
|
|
1301
|
+
toggleGrammarChecks(value) {
|
|
1302
|
+
this._toggleGrammarChecks$.next(value);
|
|
1303
|
+
}
|
|
1276
1304
|
addCommentAtSelection(commentType) {
|
|
1277
1305
|
this._addCommentAtSelection$.next(commentType);
|
|
1278
1306
|
}
|
|
@@ -1383,6 +1411,9 @@ class ExternalComponent extends BaseNoderComponent {
|
|
|
1383
1411
|
getText() {
|
|
1384
1412
|
return '';
|
|
1385
1413
|
}
|
|
1414
|
+
getAdditionalClasses() {
|
|
1415
|
+
return [];
|
|
1416
|
+
}
|
|
1386
1417
|
skipSidenav() {
|
|
1387
1418
|
return this.editorService.isViewOnly;
|
|
1388
1419
|
}
|
|
@@ -1635,6 +1666,7 @@ var CommandType;
|
|
|
1635
1666
|
CommandType[CommandType["AttachComment"] = 38] = "AttachComment";
|
|
1636
1667
|
CommandType[CommandType["RemoveComment"] = 39] = "RemoveComment";
|
|
1637
1668
|
CommandType[CommandType["ApplyNumberingLevels"] = 40] = "ApplyNumberingLevels";
|
|
1669
|
+
CommandType[CommandType["ApplyNewNumberingForParagraphs"] = 41] = "ApplyNewNumberingForParagraphs";
|
|
1638
1670
|
})(CommandType || (CommandType = {}));
|
|
1639
1671
|
|
|
1640
1672
|
class PageNumbersModel {
|
|
@@ -1664,6 +1696,11 @@ class AddNumberingModel {
|
|
|
1664
1696
|
}
|
|
1665
1697
|
}
|
|
1666
1698
|
|
|
1699
|
+
var AfterCloseOverlayActions;
|
|
1700
|
+
(function (AfterCloseOverlayActions) {
|
|
1701
|
+
AfterCloseOverlayActions[AfterCloseOverlayActions["OpenSetNumberingValue"] = 0] = "OpenSetNumberingValue";
|
|
1702
|
+
})(AfterCloseOverlayActions || (AfterCloseOverlayActions = {}));
|
|
1703
|
+
|
|
1667
1704
|
class ApplyDocumentPageFormatModel {
|
|
1668
1705
|
constructor(fields) {
|
|
1669
1706
|
if (fields) {
|
|
@@ -1683,6 +1720,14 @@ class ApplyImageStyleModel {
|
|
|
1683
1720
|
}
|
|
1684
1721
|
}
|
|
1685
1722
|
|
|
1723
|
+
class ApplyNewNumberingForParagraphsModel {
|
|
1724
|
+
constructor(fields) {
|
|
1725
|
+
if (fields) {
|
|
1726
|
+
Object.assign(this, fields);
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1686
1731
|
class ApplyNumberingLevelsModel {
|
|
1687
1732
|
constructor(fields) {
|
|
1688
1733
|
if (fields) {
|
|
@@ -1913,6 +1958,56 @@ class ContentHelper {
|
|
|
1913
1958
|
}
|
|
1914
1959
|
}
|
|
1915
1960
|
|
|
1961
|
+
const CONTEXT_MENU_HEIGHT = 210;
|
|
1962
|
+
const CONTEXT_MENU_WIDTH = 320;
|
|
1963
|
+
class ContextMenuComponent {
|
|
1964
|
+
constructor(editorService, overlayService) {
|
|
1965
|
+
this.editorService = editorService;
|
|
1966
|
+
this.overlayService = overlayService;
|
|
1967
|
+
}
|
|
1968
|
+
ngOnDestroy() {
|
|
1969
|
+
this.overlayService.close();
|
|
1970
|
+
}
|
|
1971
|
+
onCopy() {
|
|
1972
|
+
this.editorService.copySelected();
|
|
1973
|
+
this.overlayService.close();
|
|
1974
|
+
}
|
|
1975
|
+
onPaste() {
|
|
1976
|
+
this.editorService.pasteFromClipboard();
|
|
1977
|
+
this.overlayService.close();
|
|
1978
|
+
}
|
|
1979
|
+
onCut() {
|
|
1980
|
+
this.editorService.cutSelected();
|
|
1981
|
+
this.overlayService.close();
|
|
1982
|
+
}
|
|
1983
|
+
onStartNewList() {
|
|
1984
|
+
this.editorService.startNewList();
|
|
1985
|
+
this.overlayService.close();
|
|
1986
|
+
}
|
|
1987
|
+
onContinueNumbering() {
|
|
1988
|
+
this.editorService.continueNumbering();
|
|
1989
|
+
this.overlayService.close();
|
|
1990
|
+
}
|
|
1991
|
+
onSetNumberingValue() {
|
|
1992
|
+
this.overlayService.close(AfterCloseOverlayActions.OpenSetNumberingValue);
|
|
1993
|
+
}
|
|
1994
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContextMenuComponent, deps: [{ token: EditorService }, { token: OverlayService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1995
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ContextMenuComponent, isStandalone: true, selector: "app-nod-context-menu", inputs: { hasNumbering: "hasNumbering", hasSelection: "hasSelection", disableContinueNumber: "disableContinueNumber" }, host: { properties: { "style.height.px": "210", "style.width.px": "320" } }, ngImport: i0, template: "<button\n mat-button\n (click)=\"onCopy()\"\n [disabled]=\"!hasSelection\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-copy\" />\n {{ 'NODER.LABEL.COPY' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onPaste()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-paste\" />\n {{ 'NODER.LABEL.PASTE' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onCut()\"\n [disabled]=\"!hasSelection\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cut\" />\n {{ 'NODER.LABEL.CUT' | translate }}\n</button>\n<div class=\"separator\"></div>\n<button\n mat-button\n (click)=\"onStartNewList()\"\n [disabled]=\"!hasNumbering\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-restart-numbering\" />\n {{ 'NODER.LABEL.START_NEW_LIST' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onContinueNumbering()\"\n [disabled]=\"!hasNumbering || disableContinueNumber\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-continue-numbering\" />\n {{ 'NODER.LABEL.CONTINUE_NUMBERING' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onSetNumberingValue()\"\n [disabled]=\"!hasNumbering\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-starting-value\" />\n {{ 'NODER.LABEL.SET_NUMBERING_VALUE' | translate }}\n</button>\n", styles: [":host{display:flex;padding:8px 16px;flex-direction:column;align-items:flex-start;gap:4px;border-radius:8px;box-shadow:2px 2px 8px #21212129}.separator{width:288px;height:1px}button{width:100%;justify-content:start;min-height:28px;height:28px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1996
|
+
}
|
|
1997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
1998
|
+
type: Component,
|
|
1999
|
+
args: [{ selector: 'app-nod-context-menu', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, TranslateModule, MatIconModule], host: {
|
|
2000
|
+
'[style.height.px]': `${CONTEXT_MENU_HEIGHT}`,
|
|
2001
|
+
'[style.width.px]': `${CONTEXT_MENU_WIDTH}`
|
|
2002
|
+
}, template: "<button\n mat-button\n (click)=\"onCopy()\"\n [disabled]=\"!hasSelection\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-copy\" />\n {{ 'NODER.LABEL.COPY' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onPaste()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-paste\" />\n {{ 'NODER.LABEL.PASTE' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onCut()\"\n [disabled]=\"!hasSelection\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cut\" />\n {{ 'NODER.LABEL.CUT' | translate }}\n</button>\n<div class=\"separator\"></div>\n<button\n mat-button\n (click)=\"onStartNewList()\"\n [disabled]=\"!hasNumbering\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-restart-numbering\" />\n {{ 'NODER.LABEL.START_NEW_LIST' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onContinueNumbering()\"\n [disabled]=\"!hasNumbering || disableContinueNumber\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-continue-numbering\" />\n {{ 'NODER.LABEL.CONTINUE_NUMBERING' | translate }}\n</button>\n<button\n mat-button\n (click)=\"onSetNumberingValue()\"\n [disabled]=\"!hasNumbering\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-starting-value\" />\n {{ 'NODER.LABEL.SET_NUMBERING_VALUE' | translate }}\n</button>\n", styles: [":host{display:flex;padding:8px 16px;flex-direction:column;align-items:flex-start;gap:4px;border-radius:8px;box-shadow:2px 2px 8px #21212129}.separator{width:288px;height:1px}button{width:100%;justify-content:start;min-height:28px;height:28px}\n"] }]
|
|
2003
|
+
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }], propDecorators: { hasNumbering: [{
|
|
2004
|
+
type: Input
|
|
2005
|
+
}], hasSelection: [{
|
|
2006
|
+
type: Input
|
|
2007
|
+
}], disableContinueNumber: [{
|
|
2008
|
+
type: Input
|
|
2009
|
+
}] } });
|
|
2010
|
+
|
|
1916
2011
|
class CreateEdgesModel {
|
|
1917
2012
|
constructor(fields) {
|
|
1918
2013
|
if (fields) {
|
|
@@ -1964,10 +2059,12 @@ class DocumentHandler extends BaseHandler {
|
|
|
1964
2059
|
constructor(editor) {
|
|
1965
2060
|
super();
|
|
1966
2061
|
this.documentKeyDown$ = fromEvent(document, 'keydown').subscribe((event) => this.onKeyDown(event));
|
|
2062
|
+
this.contextMenu$ = fromEvent(document, 'contextmenu').subscribe(event => event.preventDefault());
|
|
1967
2063
|
this.fillActions(editor);
|
|
1968
2064
|
}
|
|
1969
2065
|
destroy() {
|
|
1970
2066
|
this.documentKeyDown$?.unsubscribe();
|
|
2067
|
+
this.contextMenu$.unsubscribe();
|
|
1971
2068
|
}
|
|
1972
2069
|
onKeyDown(event) {
|
|
1973
2070
|
const keyCombination = this.getKeyCombination(event);
|
|
@@ -2044,7 +2141,7 @@ class FormatHelper {
|
|
|
2044
2141
|
let result = [];
|
|
2045
2142
|
for (const format of formats) {
|
|
2046
2143
|
if (format.startIndex >= startIndex && format.endIndex <= endIndex) {
|
|
2047
|
-
result.push(new FormatModel({ ...format }));
|
|
2144
|
+
result.push(new FormatModel({ ...format, textStyle: new TextStyleModel(format.textStyle) }));
|
|
2048
2145
|
}
|
|
2049
2146
|
else if (format.startIndex < startIndex && format.endIndex > endIndex) {
|
|
2050
2147
|
result.push(new FormatModel({ startIndex, endIndex, textStyle: new TextStyleModel(format.textStyle) }));
|
|
@@ -2066,13 +2163,10 @@ class FormatHelper {
|
|
|
2066
2163
|
}
|
|
2067
2164
|
}
|
|
2068
2165
|
|
|
2069
|
-
const POPUP_HEIGHT = 150;
|
|
2070
|
-
|
|
2071
2166
|
class GrammarPopupComponent {
|
|
2072
2167
|
constructor(editorService, overlayService) {
|
|
2073
2168
|
this.editorService = editorService;
|
|
2074
2169
|
this.overlayService = overlayService;
|
|
2075
|
-
this.hostHeight = `${POPUP_HEIGHT}px`;
|
|
2076
2170
|
}
|
|
2077
2171
|
onSuggestionClick(index) {
|
|
2078
2172
|
this.editorService.applyGrammarSuggestion(this.error, index, this.paragraphIndex);
|
|
@@ -2083,15 +2177,12 @@ class GrammarPopupComponent {
|
|
|
2083
2177
|
this.overlayService.close();
|
|
2084
2178
|
}
|
|
2085
2179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GrammarPopupComponent, deps: [{ token: EditorService }, { token: OverlayService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2086
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: GrammarPopupComponent, isStandalone: true, selector: "app-nod-grammar-popup", inputs: { error: "error", paragraphIndex: "paragraphIndex" },
|
|
2180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: GrammarPopupComponent, isStandalone: true, selector: "app-nod-grammar-popup", inputs: { error: "error", paragraphIndex: "paragraphIndex" }, ngImport: i0, template: "<span class=\"message\">{{ error.message }}</span>\n<div class=\"options\">\n @for (suggestion of error.replacements; track i; let i = $index) {\n <span\n class=\"suggestion\"\n (click)=\"onSuggestionClick(i)\">\n {{ suggestion }}\n </span>\n }\n</div>\n<button\n mat-button\n class=\"ignore\"\n (click)=\"onIgnoreClick()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-ignore\"></mat-icon>\n <span>\n {{ 'NODER.LABEL.IGNORE' | translate }}\n </span>\n</button>\n", styles: [":host{border-radius:8px;display:flex;flex-direction:column;padding:8px;max-width:500px;gap:5px}.message{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px}.options{display:flex;flex-flow:column wrap;justify-content:center;gap:5px;padding:10px 0;border-bottom-width:1px;border-bottom-style:solid}.suggestion{font-weight:600;font-size:14px;cursor:pointer;text-decoration:underline;padding:3px 8px}.ignore{margin-left:auto;font-size:12px;letter-spacing:0;cursor:pointer;height:32px}.ignore mat-icon{margin-right:4px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2087
2181
|
}
|
|
2088
2182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GrammarPopupComponent, decorators: [{
|
|
2089
2183
|
type: Component,
|
|
2090
|
-
args: [{ selector: 'app-nod-grammar-popup', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, TranslateModule], standalone: true, template: "<span
|
|
2091
|
-
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }], propDecorators: {
|
|
2092
|
-
type: HostBinding,
|
|
2093
|
-
args: ['style.height']
|
|
2094
|
-
}], error: [{
|
|
2184
|
+
args: [{ selector: 'app-nod-grammar-popup', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule, TranslateModule], standalone: true, template: "<span class=\"message\">{{ error.message }}</span>\n<div class=\"options\">\n @for (suggestion of error.replacements; track i; let i = $index) {\n <span\n class=\"suggestion\"\n (click)=\"onSuggestionClick(i)\">\n {{ suggestion }}\n </span>\n }\n</div>\n<button\n mat-button\n class=\"ignore\"\n (click)=\"onIgnoreClick()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-ignore\"></mat-icon>\n <span>\n {{ 'NODER.LABEL.IGNORE' | translate }}\n </span>\n</button>\n", styles: [":host{border-radius:8px;display:flex;flex-direction:column;padding:8px;max-width:500px;gap:5px}.message{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px}.options{display:flex;flex-flow:column wrap;justify-content:center;gap:5px;padding:10px 0;border-bottom-width:1px;border-bottom-style:solid}.suggestion{font-weight:600;font-size:14px;cursor:pointer;text-decoration:underline;padding:3px 8px}.ignore{margin-left:auto;font-size:12px;letter-spacing:0;cursor:pointer;height:32px}.ignore mat-icon{margin-right:4px}\n"] }]
|
|
2185
|
+
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }], propDecorators: { error: [{
|
|
2095
2186
|
type: Input
|
|
2096
2187
|
}], paragraphIndex: [{
|
|
2097
2188
|
type: Input
|
|
@@ -2407,11 +2498,7 @@ class LinkHelper {
|
|
|
2407
2498
|
static sliceFormats(links, startIndex, endIndex) {
|
|
2408
2499
|
const result = [];
|
|
2409
2500
|
for (const link of links) {
|
|
2410
|
-
const absoluteFormats = link.formats.map(x => ({
|
|
2411
|
-
...x,
|
|
2412
|
-
startIndex: x.startIndex + link.startIndex,
|
|
2413
|
-
endIndex: x.endIndex + link.startIndex
|
|
2414
|
-
}));
|
|
2501
|
+
const absoluteFormats = link.formats.map(x => new FormatModel({ ...x, startIndex: x.startIndex + link.startIndex, endIndex: x.endIndex + link.startIndex }));
|
|
2415
2502
|
const slicedLinkFormats = FormatHelper.sliceSection(absoluteFormats, startIndex, endIndex);
|
|
2416
2503
|
result.push(...slicedLinkFormats);
|
|
2417
2504
|
}
|
|
@@ -2478,10 +2565,13 @@ class MouseHandler {
|
|
|
2478
2565
|
return;
|
|
2479
2566
|
}
|
|
2480
2567
|
}
|
|
2481
|
-
if (event.button
|
|
2568
|
+
if (event.button === MouseButton.Right) {
|
|
2482
2569
|
editor.onMouseClick(event);
|
|
2483
2570
|
return;
|
|
2484
2571
|
}
|
|
2572
|
+
if (event.button === MouseButton.Middle) {
|
|
2573
|
+
return;
|
|
2574
|
+
}
|
|
2485
2575
|
editor.enableSelection();
|
|
2486
2576
|
this.clicks = event.detail > 1 && this.clicks < 4 ? this.clicks + 1 : 1;
|
|
2487
2577
|
switch (this.clicks) {
|
|
@@ -2509,6 +2599,17 @@ class MoveRangeModel {
|
|
|
2509
2599
|
}
|
|
2510
2600
|
}
|
|
2511
2601
|
|
|
2602
|
+
class NumberingLevelModel {
|
|
2603
|
+
constructor(fields) {
|
|
2604
|
+
if (fields) {
|
|
2605
|
+
if (fields.markerStyle) {
|
|
2606
|
+
fields.markerStyle = new TextStyleModel(fields.markerStyle);
|
|
2607
|
+
}
|
|
2608
|
+
Object.assign(this, fields);
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2512
2613
|
let CellDataModel$1 = class CellDataModel {
|
|
2513
2614
|
constructor(fields) {
|
|
2514
2615
|
if (fields) {
|
|
@@ -2756,6 +2857,11 @@ class OperationHistory {
|
|
|
2756
2857
|
const undoStep = new RestoreNumberingsModel({ paragraphs, numberings });
|
|
2757
2858
|
this.addToHistory(undoStep, redoStep);
|
|
2758
2859
|
}
|
|
2860
|
+
pushApplyNewNumberingForParagraphs(oldParagraphs, levels, oldNumbering, insertIndexes) {
|
|
2861
|
+
const redoStep = new ApplyNewNumberingForParagraphsModel({ insertIndexes, levels });
|
|
2862
|
+
const undoStep = new RestoreNumberingsModel({ paragraphs: oldParagraphs, numberings: [oldNumbering] });
|
|
2863
|
+
this.addToHistory(undoStep, redoStep);
|
|
2864
|
+
}
|
|
2759
2865
|
pushApplyNumbering(numberingId, newLevels, oldLevels) {
|
|
2760
2866
|
const redoStep = new ApplyNumberingLevelsModel({ numberingId, levels: newLevels });
|
|
2761
2867
|
const undoStep = new ApplyNumberingLevelsModel({ numberingId, levels: oldLevels });
|
|
@@ -3420,17 +3526,6 @@ var Alignment;
|
|
|
3420
3526
|
Alignment[Alignment["Justify"] = 3] = "Justify";
|
|
3421
3527
|
})(Alignment || (Alignment = {}));
|
|
3422
3528
|
|
|
3423
|
-
class NumberingLevelModel {
|
|
3424
|
-
constructor(fields) {
|
|
3425
|
-
if (fields) {
|
|
3426
|
-
if (fields.markerStyle) {
|
|
3427
|
-
fields.markerStyle = new TextStyleModel(fields.markerStyle);
|
|
3428
|
-
}
|
|
3429
|
-
Object.assign(this, fields);
|
|
3430
|
-
}
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
|
|
3434
3529
|
var NumberingMarkerType;
|
|
3435
3530
|
(function (NumberingMarkerType) {
|
|
3436
3531
|
NumberingMarkerType[NumberingMarkerType["Bullet"] = 0] = "Bullet";
|
|
@@ -4761,6 +4856,17 @@ class ParagraphOperationsHelper {
|
|
|
4761
4856
|
}
|
|
4762
4857
|
return oldNumberingIds;
|
|
4763
4858
|
}
|
|
4859
|
+
static applyNumberingForParagraphs(paragraphs, insertIndexes, numberingId) {
|
|
4860
|
+
let index = 0;
|
|
4861
|
+
let paragraphIndex = paragraphs.findIndex(x => x.insertIndex == insertIndexes[index]);
|
|
4862
|
+
while (index < insertIndexes.length) {
|
|
4863
|
+
if (paragraphs[paragraphIndex].insertIndex == insertIndexes[index]) {
|
|
4864
|
+
paragraphs[paragraphIndex].paragraphStyle.numberingId = numberingId;
|
|
4865
|
+
index++;
|
|
4866
|
+
}
|
|
4867
|
+
paragraphIndex++;
|
|
4868
|
+
}
|
|
4869
|
+
}
|
|
4764
4870
|
static apply(paragraphs, startIndex, endIndex, style) {
|
|
4765
4871
|
let index = paragraphs.findIndex(x => x.insertIndex >= startIndex);
|
|
4766
4872
|
for (; index < paragraphs.length && paragraphs[index].insertIndex <= endIndex; index++) {
|
|
@@ -5210,7 +5316,7 @@ class TableOperationsHelper {
|
|
|
5210
5316
|
return null;
|
|
5211
5317
|
}
|
|
5212
5318
|
return new ApplyTableCellsStylesModel({
|
|
5213
|
-
cellsData: this.getCellDataFromBorderCells(cellsMap, (oldBorder) => new BordersStyleModel({ ...oldBorder,
|
|
5319
|
+
cellsData: this.getCellDataFromBorderCells(cellsMap, (oldBorder) => new BordersStyleModel({ ...oldBorder, lineStyle: style })),
|
|
5214
5320
|
insertIndex: table.insertIndex
|
|
5215
5321
|
});
|
|
5216
5322
|
}
|
|
@@ -5225,7 +5331,7 @@ class TableOperationsHelper {
|
|
|
5225
5331
|
return null;
|
|
5226
5332
|
}
|
|
5227
5333
|
return new ApplyTableCellsStylesModel({
|
|
5228
|
-
cellsData: this.getCellDataFromBorderCells(cellsMap, (oldBorder) => new BordersStyleModel({ ...oldBorder,
|
|
5334
|
+
cellsData: this.getCellDataFromBorderCells(cellsMap, (oldBorder) => new BordersStyleModel({ ...oldBorder, width })),
|
|
5229
5335
|
insertIndex: table.insertIndex
|
|
5230
5336
|
});
|
|
5231
5337
|
}
|
|
@@ -5515,6 +5621,11 @@ class OperationsHelper {
|
|
|
5515
5621
|
this.insertBreak(document, text, model.insertIndex, model.breakType);
|
|
5516
5622
|
break;
|
|
5517
5623
|
}
|
|
5624
|
+
case CommandType.ApplyNewNumberingForParagraphs: {
|
|
5625
|
+
const model = command.applyNewNumberingForParagraphs;
|
|
5626
|
+
this.applyNewNumberingForParagraphs(contents, document.numberings, model.levels, model.insertIndexes);
|
|
5627
|
+
break;
|
|
5628
|
+
}
|
|
5518
5629
|
case CommandType.AddNumbering: {
|
|
5519
5630
|
const model = command.addNumbering;
|
|
5520
5631
|
this.addNumbering(contents, document.numberings, model.startIndex, model.endIndex, model.levels);
|
|
@@ -5794,6 +5905,11 @@ class OperationsHelper {
|
|
|
5794
5905
|
NumberingOperationsHelper.addNumbering(numberings, newNumberingId, levels);
|
|
5795
5906
|
NumberingOperationsHelper.deleteUnused(numberings, target.paragraphs, oldNumberingIds);
|
|
5796
5907
|
}
|
|
5908
|
+
static applyNewNumberingForParagraphs(target, numberings, levels, insertIndexes) {
|
|
5909
|
+
const newNumberingId = NumberingOperationsHelper.generateNumberingId(numberings);
|
|
5910
|
+
NumberingOperationsHelper.addNumbering(numberings, newNumberingId, levels);
|
|
5911
|
+
ParagraphOperationsHelper.applyNumberingForParagraphs(target.paragraphs, insertIndexes, newNumberingId);
|
|
5912
|
+
}
|
|
5797
5913
|
static applyNumbering(numberings, levels, numberingId) {
|
|
5798
5914
|
NumberingOperationsHelper.apply(numberings, numberingId, levels);
|
|
5799
5915
|
}
|
|
@@ -6042,6 +6158,26 @@ class PageHelper {
|
|
|
6042
6158
|
}
|
|
6043
6159
|
}
|
|
6044
6160
|
|
|
6161
|
+
class ParagraphNumberingHelper {
|
|
6162
|
+
static getNextParagraphsWithNumbering(paragraphs, paragraphIndex, numberingId) {
|
|
6163
|
+
const paragraphsForUpdate = [];
|
|
6164
|
+
for (let i = paragraphIndex; i < paragraphs.length; i++) {
|
|
6165
|
+
if (numberingId === paragraphs[i].paragraphStyle.numberingId) {
|
|
6166
|
+
paragraphsForUpdate.push(paragraphs[i]);
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6169
|
+
return paragraphsForUpdate;
|
|
6170
|
+
}
|
|
6171
|
+
static getPrevNumberingId(paragraphs, paragraphIndex) {
|
|
6172
|
+
for (let i = paragraphIndex - 1; i >= 0; i--) {
|
|
6173
|
+
if (paragraphs[i].paragraphStyle.numberingId) {
|
|
6174
|
+
return paragraphs[i].paragraphStyle.numberingId;
|
|
6175
|
+
}
|
|
6176
|
+
}
|
|
6177
|
+
return null;
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
|
|
6045
6181
|
class NumberingDataModel {
|
|
6046
6182
|
constructor(fields) {
|
|
6047
6183
|
if (!fields) {
|
|
@@ -6100,8 +6236,8 @@ class NumberingHelper {
|
|
|
6100
6236
|
x.needToCalculateFirstMarker = false;
|
|
6101
6237
|
});
|
|
6102
6238
|
}
|
|
6103
|
-
static setAllNumberingIsCalculated(numberingInfo) {
|
|
6104
|
-
for (let numberingId
|
|
6239
|
+
static setAllNumberingIsCalculated(numberingInfo, numberingIds) {
|
|
6240
|
+
for (let numberingId of numberingIds) {
|
|
6105
6241
|
numberingInfo[numberingId].forEach(x => {
|
|
6106
6242
|
x.needToRecalculate = false;
|
|
6107
6243
|
x.needToCalculateFirstMarker = false;
|
|
@@ -6159,7 +6295,7 @@ class NumberingHelper {
|
|
|
6159
6295
|
const level = paragraph.paragraphStyle.numberingLevel;
|
|
6160
6296
|
const numberingLevelModel = this.findNumberingLevels(numberings, numberingId);
|
|
6161
6297
|
const marker = this.getMarker(numberingLevelModel, level, numberingId, numberingInfo);
|
|
6162
|
-
return new NumberingDataModel({ numberingId, level, marker });
|
|
6298
|
+
return new NumberingDataModel({ numberingId, level, marker, markerValue: numberingInfo[numberingId][level].markerIndex });
|
|
6163
6299
|
}
|
|
6164
6300
|
static updateMarkerData(numberings, paragraph, paragraphTextStyle, paragraphStyle) {
|
|
6165
6301
|
const numberingLevel = NumberingHelper.findNumberingLevel(numberings, paragraph.numberingData.numberingId, paragraph.numberingData.level);
|
|
@@ -6592,6 +6728,7 @@ class RenderingHelper {
|
|
|
6592
6728
|
let renderedIndexes = 0;
|
|
6593
6729
|
const style = `max-height:${instance.ascent() + instance.descent()}px;`;
|
|
6594
6730
|
const classes = instance.isFocused ? [CUSTOM_TAG, 'noder-focussed', 'noder-pointing'] : [CUSTOM_TAG, 'noder-pointing'];
|
|
6731
|
+
classes.push(...instance.getAdditionalClasses());
|
|
6595
6732
|
const attributes = [
|
|
6596
6733
|
{ name: 'data-session-id', value: `${instance.sessionId}` },
|
|
6597
6734
|
{ name: 'data-insert-index', value: `${instance.insertIndex}` }
|
|
@@ -7633,6 +7770,9 @@ class CommandModel {
|
|
|
7633
7770
|
if (fields.applyImageStyle) {
|
|
7634
7771
|
fields.applyImageStyle = new ApplyImageStyleModel(fields.applyImageStyle);
|
|
7635
7772
|
}
|
|
7773
|
+
if (fields.applyNewNumberingForParagraphs) {
|
|
7774
|
+
fields.applyNewNumberingForParagraphs = new ApplyNewNumberingForParagraphsModel(fields.applyNewNumberingForParagraphs);
|
|
7775
|
+
}
|
|
7636
7776
|
if (fields.applyNumberingLevels) {
|
|
7637
7777
|
fields.applyNumberingLevels = new ApplyNumberingLevelsModel(fields.applyNumberingLevels);
|
|
7638
7778
|
}
|
|
@@ -7757,6 +7897,10 @@ class SaveCommandsHelper {
|
|
|
7757
7897
|
const addNumbering = new AddNumberingModel({ startIndex, endIndex, levels });
|
|
7758
7898
|
return new CommandModel({ commandType: CommandType.AddNumbering, addNumbering, targets });
|
|
7759
7899
|
}
|
|
7900
|
+
static getApplyNewNumberingForParagraphsCommand(insertIndexes, levels, targets) {
|
|
7901
|
+
const applyNewNumberingForParagraphs = new ApplyNewNumberingForParagraphsModel({ insertIndexes, levels });
|
|
7902
|
+
return new CommandModel({ commandType: CommandType.ApplyNewNumberingForParagraphs, applyNewNumberingForParagraphs, targets });
|
|
7903
|
+
}
|
|
7760
7904
|
static getApplyNumberingCommand(numberingId, levels, targets) {
|
|
7761
7905
|
const applyNumberingLevels = new ApplyNumberingLevelsModel({ numberingId, levels });
|
|
7762
7906
|
return new CommandModel({ commandType: CommandType.ApplyNumberingLevels, applyNumberingLevels, targets });
|
|
@@ -8585,6 +8729,35 @@ class Selection {
|
|
|
8585
8729
|
}
|
|
8586
8730
|
}
|
|
8587
8731
|
|
|
8732
|
+
const SET_NUMBERING_VALUE_HEIGHT = 175;
|
|
8733
|
+
const SET_NUMBERING_VALUE_WIDTH = 280;
|
|
8734
|
+
class SetNumberingValueComponent {
|
|
8735
|
+
constructor(editorService, overlayService) {
|
|
8736
|
+
this.editorService = editorService;
|
|
8737
|
+
this.overlayService = overlayService;
|
|
8738
|
+
this.markerValue = new FormControl(1);
|
|
8739
|
+
}
|
|
8740
|
+
ngOnDestroy() {
|
|
8741
|
+
this.onClose();
|
|
8742
|
+
}
|
|
8743
|
+
onClose() {
|
|
8744
|
+
this.overlayService.close();
|
|
8745
|
+
}
|
|
8746
|
+
onSetNumberingValue() {
|
|
8747
|
+
this.editorService.setNumberingValue(this.markerValue.value);
|
|
8748
|
+
this.onClose();
|
|
8749
|
+
}
|
|
8750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SetNumberingValueComponent, deps: [{ token: EditorService }, { token: OverlayService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SetNumberingValueComponent, isStandalone: true, selector: "app-set-numbering-value", host: { properties: { "style.height.px": "175", "style.width.px": "280" } }, ngImport: i0, template: "<span class=\"title\">{{ 'NODER.LABEL.SET_DEFAULT_VALUE' | translate }}</span>\n<mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.DEFAULT_VALUE' | translate }}</mat-label>\n <input\n matInput\n min=\"1\"\n type=\"number\"\n [formControl]=\"markerValue\" />\n</mat-form-field>\n<div class=\"actions\">\n <button\n mat-stroked-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onSetNumberingValue()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n</div>\n", styles: [":host{display:flex;padding:20px 24px;flex-direction:column;align-items:flex-start;border-radius:6px;box-shadow:2px 2px 8px #21212129}.title{font-size:16px;font-style:normal;font-weight:500;line-height:normal;margin-bottom:20px}.mat-mdc-form-field{width:100%}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}button{display:flex;justify-content:center;align-items:center;min-height:32px;height:32px;min-width:32px;width:32px}.mat-icon{font-size:16px;height:16px;min-width:16px;margin:0}.actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;align-self:stretch}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8752
|
+
}
|
|
8753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SetNumberingValueComponent, decorators: [{
|
|
8754
|
+
type: Component,
|
|
8755
|
+
args: [{ selector: 'app-set-numbering-value', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatInputModule, MatFormFieldModule, ReactiveFormsModule, TranslateModule, MatIconModule], host: {
|
|
8756
|
+
'[style.height.px]': `${SET_NUMBERING_VALUE_HEIGHT}`,
|
|
8757
|
+
'[style.width.px]': `${SET_NUMBERING_VALUE_WIDTH}`
|
|
8758
|
+
}, template: "<span class=\"title\">{{ 'NODER.LABEL.SET_DEFAULT_VALUE' | translate }}</span>\n<mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.DEFAULT_VALUE' | translate }}</mat-label>\n <input\n matInput\n min=\"1\"\n type=\"number\"\n [formControl]=\"markerValue\" />\n</mat-form-field>\n<div class=\"actions\">\n <button\n mat-stroked-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onSetNumberingValue()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n</div>\n", styles: [":host{display:flex;padding:20px 24px;flex-direction:column;align-items:flex-start;border-radius:6px;box-shadow:2px 2px 8px #21212129}.title{font-size:16px;font-style:normal;font-weight:500;line-height:normal;margin-bottom:20px}.mat-mdc-form-field{width:100%}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}button{display:flex;justify-content:center;align-items:center;min-height:32px;height:32px;min-width:32px;width:32px}.mat-icon{font-size:16px;height:16px;min-width:16px;margin:0}.actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;align-self:stretch}\n"] }]
|
|
8759
|
+
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }] });
|
|
8760
|
+
|
|
8588
8761
|
class TextInput {
|
|
8589
8762
|
constructor(parentElement) {
|
|
8590
8763
|
this.lastValue = '';
|
|
@@ -8732,7 +8905,7 @@ class Editor {
|
|
|
8732
8905
|
this.session.applyToolbarStyles();
|
|
8733
8906
|
this.onSetCommentsVisibility(!!this.model.comments.length);
|
|
8734
8907
|
this.search = new Search(editorService);
|
|
8735
|
-
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.clipboardDataSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.replaceByCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.insertTableRowsSubscription(), this.insertTableSubscription(), this.updateTableBorderStyleSubscription(), this.updateTableBorderWidthSubscription(), this.updateTableBordersSubscription(), this.selectSpacingSubscription(), this.selectBeforeSubscription(), this.selectAfterSubscription(), this.insertTextSubscription(), this.pasteFromClipboardSubscription(), this.printSubscription(), this.redoSubscription(), this.removeLeftSubscription(), this.removeNumberingsSubscription(), this.removeRightSubscription(), this.removeSelectedSubscription(), this.removeTableColumnsSubscription(), this.removeTableRowsSubscription(), this.removeTableSubscription(), this.rerenderSubscription(), this.resizeTableColumnsSubscription(), ...this.searchOptionSubscriptions(), ...this.replaceSubscription(), this.grammarReplaceSubscription(), this.ignoreGrammarErrorSubscription(), this.selectAllSubscription(), this.setImageStyleSubscription(), this.setNumberingTemplateTypeSubscription(), this.setParagraphStylesSubscription(), this.setTextStylesSubscription(), this.undoSubscription(), this.updateEdgeSubscription(), this.viewOnlyModeSubscription(), this.applyPageFormatSubscription(), this.applyRightMarginPageFormatSubscription(), this.applyLeftMarginPageFormatSubscription(), this.insertPageFormatSubscription(), this.applyDocumentPageFormatSubscription(), this.dragMoveSubscription(), this.dragDropSubscription(), this.applyFirstLinePositionSubscription(), this.applyRightIndentParagraphSubscription(), this.applyLeftIndentParagraphSubscription(), this.applyTabSettingsSubscription(), this.commandCreatedForEdges(), ...this.commentCreationSubscriptions(), this.
|
|
8908
|
+
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.clipboardDataSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.replaceByCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.insertTableRowsSubscription(), this.insertTableSubscription(), this.updateTableBorderStyleSubscription(), this.updateTableBorderWidthSubscription(), this.updateTableBordersSubscription(), this.selectSpacingSubscription(), this.selectBeforeSubscription(), this.selectAfterSubscription(), this.insertTextSubscription(), this.pasteFromClipboardSubscription(), this.printSubscription(), this.redoSubscription(), this.removeLeftSubscription(), this.removeNumberingsSubscription(), this.removeRightSubscription(), this.removeSelectedSubscription(), this.removeTableColumnsSubscription(), this.removeTableRowsSubscription(), this.removeTableSubscription(), this.rerenderSubscription(), this.resizeTableColumnsSubscription(), ...this.searchOptionSubscriptions(), ...this.replaceSubscription(), this.grammarReplaceSubscription(), this.ignoreGrammarErrorSubscription(), this.toggleGrammarChecksSubscription(), this.selectAllSubscription(), this.setImageStyleSubscription(), this.setNumberingTemplateTypeSubscription(), this.setParagraphStylesSubscription(), this.setTextStylesSubscription(), this.undoSubscription(), this.updateEdgeSubscription(), this.viewOnlyModeSubscription(), this.applyPageFormatSubscription(), this.applyRightMarginPageFormatSubscription(), this.applyLeftMarginPageFormatSubscription(), this.insertPageFormatSubscription(), this.applyDocumentPageFormatSubscription(), this.dragMoveSubscription(), this.dragDropSubscription(), this.applyFirstLinePositionSubscription(), this.applyRightIndentParagraphSubscription(), this.applyLeftIndentParagraphSubscription(), this.applyTabSettingsSubscription(), this.commandCreatedForEdges(), ...this.commentCreationSubscriptions(), this.removeCommentSubscription(), this.rerenderCommentsSubscription(), this.selectCommentSubscription(), this.setComentsVisibilitySubscription(), this.getCommentTextSubscription(), this.replaceCommentTextSubscription(), this.startNewListSubscription(), this.continueNumberingSubscription(), this.setNumberingValueSubscription());
|
|
8736
8909
|
}
|
|
8737
8910
|
destroy() {
|
|
8738
8911
|
this.subscriptions.forEach(s => s?.unsubscribe());
|
|
@@ -9123,6 +9296,37 @@ class Editor {
|
|
|
9123
9296
|
}
|
|
9124
9297
|
this.renderer.updateCursor();
|
|
9125
9298
|
}
|
|
9299
|
+
startNewList(startValue) {
|
|
9300
|
+
const startRow = this.selection.range.start.row;
|
|
9301
|
+
const startParagraph = this.session.model.paragraphs[startRow];
|
|
9302
|
+
const numbering = this.session.generalProperties.numberings.find(x => x.numberingId === startParagraph.paragraphStyle.numberingId);
|
|
9303
|
+
const newNumberingLevels = numbering.levels.map(x => x.level === startParagraph.paragraphStyle.numberingLevel ? new NumberingLevelModel({ ...x, startValue }) : x);
|
|
9304
|
+
const paragraphsForUpdate = ParagraphNumberingHelper.getNextParagraphsWithNumbering(this.session.model.paragraphs, startRow, startParagraph.paragraphStyle.numberingId);
|
|
9305
|
+
const insertIndexes = paragraphsForUpdate.map(x => x.insertIndex);
|
|
9306
|
+
this.saveApplyNewNumberingForParagraphsToHistory(newNumberingLevels, paragraphsForUpdate, numbering, insertIndexes);
|
|
9307
|
+
this.session.applyNewNumberingForParagraphs(newNumberingLevels, insertIndexes);
|
|
9308
|
+
this.renderer.updateCursor();
|
|
9309
|
+
}
|
|
9310
|
+
continueNumbering() {
|
|
9311
|
+
const startRow = this.selection.range.start.row;
|
|
9312
|
+
if (this.session.displayData.paragraphs[startRow].paragraphSettings.numberingData.level !== 0) {
|
|
9313
|
+
return;
|
|
9314
|
+
}
|
|
9315
|
+
const startParagraph = this.session.model.paragraphs[startRow];
|
|
9316
|
+
const prevNumberId = ParagraphNumberingHelper.getPrevNumberingId(this.session.model.paragraphs, startRow);
|
|
9317
|
+
if (!prevNumberId) {
|
|
9318
|
+
return;
|
|
9319
|
+
}
|
|
9320
|
+
const paragraphsForUpdate = ParagraphNumberingHelper.getNextParagraphsWithNumbering(this.session.model.paragraphs, startRow, startParagraph.paragraphStyle.numberingId);
|
|
9321
|
+
const paragraphsDeepCopy = paragraphsForUpdate.map(x => new ParagraphModel({ insertIndex: x.insertIndex, paragraphStyle: new ParagraphStyleModel({ ...x.paragraphStyle }) }));
|
|
9322
|
+
const updatedParagraphs = paragraphsForUpdate.map(x => new ParagraphModel({
|
|
9323
|
+
insertIndex: x.insertIndex,
|
|
9324
|
+
paragraphStyle: new ParagraphStyleModel({ ...x.paragraphStyle, numberingId: prevNumberId })
|
|
9325
|
+
}));
|
|
9326
|
+
this.saveApplyParagraphsToHistory(paragraphsDeepCopy, updatedParagraphs);
|
|
9327
|
+
this.session.applyParagraphs(updatedParagraphs);
|
|
9328
|
+
this.renderer.updateCursor();
|
|
9329
|
+
}
|
|
9126
9330
|
getUniformNumberingLevels(start, end) {
|
|
9127
9331
|
const numberingId = this.session.model.paragraphs[start].paragraphStyle.numberingId;
|
|
9128
9332
|
if (!numberingId) {
|
|
@@ -9432,6 +9636,10 @@ class Editor {
|
|
|
9432
9636
|
this.session.applyNumbering(operation.levels, operation.numberingId);
|
|
9433
9637
|
command = SaveCommandsHelper.getApplyNumberingCommand(operation.numberingId, operation.levels, this.targets);
|
|
9434
9638
|
}
|
|
9639
|
+
else if (operation instanceof ApplyNewNumberingForParagraphsModel) {
|
|
9640
|
+
this.session.applyNewNumberingForParagraphs(operation.levels, operation.insertIndexes);
|
|
9641
|
+
command = SaveCommandsHelper.getApplyNewNumberingForParagraphsCommand(operation.insertIndexes, operation.levels, this.targets);
|
|
9642
|
+
}
|
|
9435
9643
|
else {
|
|
9436
9644
|
throw new Error('Undo/redo is not implemented for the Operation');
|
|
9437
9645
|
}
|
|
@@ -9525,6 +9733,10 @@ class Editor {
|
|
|
9525
9733
|
this.history.pushAddNumbering(startIndex, endIndex, templateLevels, paragraphsDeepCopy, numberings);
|
|
9526
9734
|
this.commandsService.createCommand(SaveCommandsHelper.getAddNumberingCommand(startIndex, endIndex, templateLevels, this.targets));
|
|
9527
9735
|
}
|
|
9736
|
+
saveApplyNewNumberingForParagraphsToHistory(templateLevels, oldParagraphs, oldNumbering, insertIndexes) {
|
|
9737
|
+
this.history.pushApplyNewNumberingForParagraphs(oldParagraphs, templateLevels, oldNumbering, insertIndexes);
|
|
9738
|
+
this.commandsService.createCommand(SaveCommandsHelper.getApplyNewNumberingForParagraphsCommand(insertIndexes, templateLevels, this.targets));
|
|
9739
|
+
}
|
|
9528
9740
|
saveApplyNumberingListsToHistory(newNumberingLevels, oldNumberingLevels, numberingId) {
|
|
9529
9741
|
this.history.pushApplyNumbering(numberingId, newNumberingLevels, oldNumberingLevels);
|
|
9530
9742
|
this.commandsService.createCommand(SaveCommandsHelper.getApplyNumberingCommand(numberingId, newNumberingLevels, this.targets));
|
|
@@ -9803,6 +10015,11 @@ class Editor {
|
|
|
9803
10015
|
}
|
|
9804
10016
|
onMouseClick(event) {
|
|
9805
10017
|
const customElement = this.setCurrentSession(event.target);
|
|
10018
|
+
// todo need to add one logic for the right click for any element in the editor (tables, paragraphs, etc.)
|
|
10019
|
+
if (!customElement) {
|
|
10020
|
+
this.openContextMenu(event);
|
|
10021
|
+
return;
|
|
10022
|
+
}
|
|
9806
10023
|
if (customElement && customElement.tagName !== TABLE_CELL_TAG && customElement.tagName !== EDGE_TAG) {
|
|
9807
10024
|
this.focusCustomComponent(customElement);
|
|
9808
10025
|
}
|
|
@@ -9810,6 +10027,31 @@ class Editor {
|
|
|
9810
10027
|
this.selection.blur();
|
|
9811
10028
|
}
|
|
9812
10029
|
}
|
|
10030
|
+
openContextMenu(event) {
|
|
10031
|
+
const position = this.renderer.screenToParagraph(event.clientX, event.clientY);
|
|
10032
|
+
const selection = this.selection.selectedRange;
|
|
10033
|
+
if (this.selection.isEmpty ||
|
|
10034
|
+
selection.start.row > position.row ||
|
|
10035
|
+
selection.end.row < position.row ||
|
|
10036
|
+
(selection.end.row === position.row && selection.end.column < position.column) ||
|
|
10037
|
+
(selection.start.row === position.row && selection.start.column > position.column)) {
|
|
10038
|
+
this.onShortLeftClick(event);
|
|
10039
|
+
}
|
|
10040
|
+
const topPosition = this.renderer.container.clientHeight < event.clientY + CONTEXT_MENU_HEIGHT
|
|
10041
|
+
? event.clientY - CONTEXT_MENU_HEIGHT
|
|
10042
|
+
: event.clientY;
|
|
10043
|
+
const paragraph = this.session.displayData.paragraphs[this.selection.range.start.row];
|
|
10044
|
+
this.overlayService
|
|
10045
|
+
.open(ContextMenuComponent, {
|
|
10046
|
+
hasNumbering: !!paragraph.paragraphSettings.numberingData.numberingId,
|
|
10047
|
+
hasSelection: !this.selection.isEmpty,
|
|
10048
|
+
disableContinueNumber: paragraph.paragraphSettings.numberingData.markerValue !== 1
|
|
10049
|
+
}, event.clientX, topPosition)
|
|
10050
|
+
.pipe(take(1), filter(x => x === AfterCloseOverlayActions.OpenSetNumberingValue))
|
|
10051
|
+
.subscribe(() => setTimeout(() => this.overlayService.open(SetNumberingValueComponent, {}, event.clientX, event.clientY)));
|
|
10052
|
+
this.selection.blur();
|
|
10053
|
+
event.stopPropagation();
|
|
10054
|
+
}
|
|
9813
10055
|
onLeftClick(event) {
|
|
9814
10056
|
const position = this.renderer.screenToParagraph(event.clientX, event.clientY);
|
|
9815
10057
|
if (!this.selection.isEmpty && this.session.isPositionInRange(position, this.selection.selectedRange)) {
|
|
@@ -9854,8 +10096,8 @@ class Editor {
|
|
|
9854
10096
|
const cursor = PositionHelper.paragraphToPixel(this.session, paragraphPos.row, paragraphPos.column);
|
|
9855
10097
|
const rect = this.renderer.container.getBoundingClientRect();
|
|
9856
10098
|
const hintLeft = rect.left + cursor.pageX;
|
|
9857
|
-
const hintTop = rect.top + cursor.pageY
|
|
9858
|
-
this.overlayService.open(GrammarPopupComponent, { error, paragraphIndex: position.row }, hintLeft
|
|
10099
|
+
const hintTop = rect.top + cursor.pageY + cursor.height + 5;
|
|
10100
|
+
this.overlayService.open(GrammarPopupComponent, { error, paragraphIndex: position.row }, hintLeft, hintTop);
|
|
9859
10101
|
event.stopPropagation();
|
|
9860
10102
|
}
|
|
9861
10103
|
event.preventDefault();
|
|
@@ -10364,6 +10606,9 @@ class Editor {
|
|
|
10364
10606
|
ignoreGrammarErrorSubscription() {
|
|
10365
10607
|
return this.editorService.ignoreGrammarError$.subscribe(x => this.grammarChecker.addErrorToIgnoreList(x));
|
|
10366
10608
|
}
|
|
10609
|
+
toggleGrammarChecksSubscription() {
|
|
10610
|
+
return this.editorService.toggleGrammarChecks$.subscribe(x => this.regulatorService.toggleGrammarChecks(x));
|
|
10611
|
+
}
|
|
10367
10612
|
setTextStylesSubscription() {
|
|
10368
10613
|
return this.editorService.setTextStyles$.subscribe(textStyles => {
|
|
10369
10614
|
this.applyTextStyles(textStyles);
|
|
@@ -10659,7 +10904,7 @@ class Editor {
|
|
|
10659
10904
|
}
|
|
10660
10905
|
});
|
|
10661
10906
|
}
|
|
10662
|
-
|
|
10907
|
+
removeCommentSubscription() {
|
|
10663
10908
|
return this.editorService.removeComment$.subscribe(x => this.onCommentRemoved(x));
|
|
10664
10909
|
}
|
|
10665
10910
|
setComentsVisibilitySubscription() {
|
|
@@ -10671,6 +10916,15 @@ class Editor {
|
|
|
10671
10916
|
replaceCommentTextSubscription() {
|
|
10672
10917
|
return this.editorService.replaceCommentText$.subscribe(x => this.onCommentTextReplace(x.commentId, x.newContent));
|
|
10673
10918
|
}
|
|
10919
|
+
startNewListSubscription() {
|
|
10920
|
+
return this.editorService.startNewList$.subscribe(() => this.startNewList(1));
|
|
10921
|
+
}
|
|
10922
|
+
continueNumberingSubscription() {
|
|
10923
|
+
return this.editorService.continueNumbering$.subscribe(() => this.continueNumbering());
|
|
10924
|
+
}
|
|
10925
|
+
setNumberingValueSubscription() {
|
|
10926
|
+
return this.editorService.setNumberingValue$.subscribe(x => this.startNewList(x));
|
|
10927
|
+
}
|
|
10674
10928
|
recreateMainSession() {
|
|
10675
10929
|
while (this.regulatorService.sessions.length > 0) {
|
|
10676
10930
|
const session = this.regulatorService.sessions[0];
|
|
@@ -11026,11 +11280,12 @@ class CellResizer {
|
|
|
11026
11280
|
this.columnPositionChanged(positionX);
|
|
11027
11281
|
};
|
|
11028
11282
|
}
|
|
11029
|
-
onStartResizing(cellResizerParameters) {
|
|
11283
|
+
onStartResizing(cellResizerParameters, maxExpansionSpace = 0) {
|
|
11030
11284
|
if (this.editorService.isViewOnly) {
|
|
11031
11285
|
return;
|
|
11032
11286
|
}
|
|
11033
11287
|
this.cellResizerParameters = cellResizerParameters;
|
|
11288
|
+
this.maxExpansionSpace = maxExpansionSpace;
|
|
11034
11289
|
switch (this.cellResizerParameters.cellSide) {
|
|
11035
11290
|
case ResizerSide.Left:
|
|
11036
11291
|
this.startResizingFromLeft();
|
|
@@ -11061,9 +11316,13 @@ class CellResizer {
|
|
|
11061
11316
|
this.spaceLeft = this.table.columns[columnIndex].width - this.minCellWidth;
|
|
11062
11317
|
this.spaceRight = 0;
|
|
11063
11318
|
const nextColumnIndex = columnIndex + 1;
|
|
11319
|
+
const isLast = columnIndex === this.table.columns.length - 1;
|
|
11064
11320
|
if (this.table.columns.length > nextColumnIndex) {
|
|
11065
11321
|
this.spaceRight = this.table.columns[nextColumnIndex].width - this.minCellWidth;
|
|
11066
11322
|
}
|
|
11323
|
+
else if (isLast) {
|
|
11324
|
+
this.spaceRight = this.maxExpansionSpace;
|
|
11325
|
+
}
|
|
11067
11326
|
const cellRect = this.tableEl.rows[this.splitRowIndex].cells[this.cellResizerParameters.columnIndex].getBoundingClientRect();
|
|
11068
11327
|
this.startX = this.tableEl.offsetLeft + cellRect.left + cellRect.width - this.resizerBorderSize;
|
|
11069
11328
|
this.columnPositionChanged(this.startX);
|
|
@@ -11274,6 +11533,9 @@ class TableCellHelper {
|
|
|
11274
11533
|
if (border.color && border.color !== 'auto') {
|
|
11275
11534
|
style += ` ${border.color}`;
|
|
11276
11535
|
}
|
|
11536
|
+
else {
|
|
11537
|
+
style += ` #000`;
|
|
11538
|
+
}
|
|
11277
11539
|
return style;
|
|
11278
11540
|
}
|
|
11279
11541
|
static getBorderLineStyle(lineStyle) {
|
|
@@ -11837,11 +12099,12 @@ class NoderTableComponent extends BaseNoderComponent {
|
|
|
11837
12099
|
this.borderSize = 1;
|
|
11838
12100
|
this.startResizing = (cellResizerParameters) => {
|
|
11839
12101
|
const splitRowIndex = this.getSplitRowIndex(cellResizerParameters.rowIndex);
|
|
12102
|
+
const availableTableSpace = this.getAvailableTableSpace();
|
|
11840
12103
|
this.resizer.resizerHeight = this.getRowsHeightBetweenSplits(splitRowIndex);
|
|
11841
12104
|
this.resizer.startY = this.getRowsHeightBefore(splitRowIndex);
|
|
11842
12105
|
this.resizer.splitRowIndex = splitRowIndex;
|
|
11843
12106
|
this.resizer.tableInsertIndex = this.insertIndex;
|
|
11844
|
-
this.resizer.onStartResizing(cellResizerParameters);
|
|
12107
|
+
this.resizer.onStartResizing(cellResizerParameters, availableTableSpace);
|
|
11845
12108
|
};
|
|
11846
12109
|
this.cellHeightChanged = (rowIndex, cellIndex, height) => {
|
|
11847
12110
|
const tableRow = this.table.rows[rowIndex];
|
|
@@ -12199,6 +12462,13 @@ class NoderTableComponent extends BaseNoderComponent {
|
|
|
12199
12462
|
}
|
|
12200
12463
|
return sum;
|
|
12201
12464
|
}
|
|
12465
|
+
getAvailableTableSpace() {
|
|
12466
|
+
const parent = this.el.nativeElement.parentElement;
|
|
12467
|
+
if (!parent || !parent.classList.contains('noder-line')) {
|
|
12468
|
+
return 0;
|
|
12469
|
+
}
|
|
12470
|
+
return Math.max(0, parent.clientWidth - this.tableEl.clientWidth);
|
|
12471
|
+
}
|
|
12202
12472
|
updateCells() {
|
|
12203
12473
|
const rows = this.rowMatrix.length;
|
|
12204
12474
|
const cols = rows > 0 ? this.rowMatrix[0].cells.length : 0;
|
|
@@ -12666,8 +12936,8 @@ class DisplayData extends EventEmitting {
|
|
|
12666
12936
|
});
|
|
12667
12937
|
return max;
|
|
12668
12938
|
}
|
|
12669
|
-
get
|
|
12670
|
-
return this.
|
|
12939
|
+
get paragraphInfoChanges$() {
|
|
12940
|
+
return this.paragraphInfoChanges.asObservable();
|
|
12671
12941
|
}
|
|
12672
12942
|
constructor(model, generalProperties, sessionId, pageFormatModels, pagesSpace, customComponents, customContentService, editorService) {
|
|
12673
12943
|
super();
|
|
@@ -12682,7 +12952,7 @@ class DisplayData extends EventEmitting {
|
|
|
12682
12952
|
this.paragraphs = [];
|
|
12683
12953
|
this.pagesFormat = [];
|
|
12684
12954
|
this.allPagesHeight = 0;
|
|
12685
|
-
this.
|
|
12955
|
+
this.paragraphInfoChanges = new Subject();
|
|
12686
12956
|
this.lastParagraphId = 0;
|
|
12687
12957
|
this.updateDataForModel();
|
|
12688
12958
|
}
|
|
@@ -12707,10 +12977,10 @@ class DisplayData extends EventEmitting {
|
|
|
12707
12977
|
? range.end.column - range.start.column
|
|
12708
12978
|
: this.paragraphs[range.start.row].content.length - range.start.column;
|
|
12709
12979
|
const spliced = this.paragraphs.splice(range.start.row, range.end.row - range.start.row + 1, changedParagraph);
|
|
12710
|
-
this.
|
|
12980
|
+
this.paragraphInfoChanges.next(new ParagraphInfoContentChanged(changedParagraph, range.start.column, removedLength));
|
|
12711
12981
|
const removedParagraphs = spliced.filter(x => x.id !== changedParagraph.id).map(x => x.id);
|
|
12712
12982
|
if (removedParagraphs.length) {
|
|
12713
|
-
this.
|
|
12983
|
+
this.paragraphInfoChanges.next(new ParagraphInfosRemoved(removedParagraphs));
|
|
12714
12984
|
}
|
|
12715
12985
|
this.paragraphs[range.start.row].paragraphSettings = paragraphSettings;
|
|
12716
12986
|
}
|
|
@@ -12963,10 +13233,7 @@ class DisplayData extends EventEmitting {
|
|
|
12963
13233
|
if (numberingId) {
|
|
12964
13234
|
const numberingsLevels = NumberingHelper.findNumberingLevels(this.generalProperties.numberings, numberingId);
|
|
12965
13235
|
NumberingHelper.addValueToNumberingInfo(numberingId, this.generalProperties.numberingInfo, numberingsLevels);
|
|
12966
|
-
let startNumberingParagraphIndex = i;
|
|
12967
|
-
while (this.isSameNumberingId(startNumberingParagraphIndex, numberingId)) {
|
|
12968
|
-
startNumberingParagraphIndex -= 1;
|
|
12969
|
-
}
|
|
13236
|
+
let startNumberingParagraphIndex = this.findFirstNumberingParagraph(updateNumberingFromIndex ?? i, numberingId);
|
|
12970
13237
|
if (updateNumberingFromIndex === null || updateNumberingFromIndex > startNumberingParagraphIndex) {
|
|
12971
13238
|
updateNumberingFromIndex = startNumberingParagraphIndex;
|
|
12972
13239
|
}
|
|
@@ -12990,23 +13257,27 @@ class DisplayData extends EventEmitting {
|
|
|
12990
13257
|
this.updateParagraphLineNumber(firstParagraph);
|
|
12991
13258
|
this.processParagraphsProperties(firstParagraph);
|
|
12992
13259
|
}
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
13260
|
+
findFirstNumberingParagraph(paragraphIndex, numberingId) {
|
|
13261
|
+
for (let i = 0; i <= paragraphIndex; i++) {
|
|
13262
|
+
const startNumberingId = this.model.paragraphs[paragraphIndex].paragraphStyle.numberingId ??
|
|
13263
|
+
this.getParagraphSettings(paragraphIndex)?.numberingData.numberingId;
|
|
13264
|
+
if (numberingId === startNumberingId) {
|
|
13265
|
+
return i;
|
|
13266
|
+
}
|
|
12996
13267
|
}
|
|
12997
|
-
|
|
12998
|
-
this.getParagraphSettings(paragraphIndex)?.numberingData.numberingId;
|
|
12999
|
-
return numberingId === startNumberingId;
|
|
13268
|
+
return paragraphIndex;
|
|
13000
13269
|
}
|
|
13001
13270
|
updateNumberingsDataOnChange(index) {
|
|
13002
13271
|
if (index === null) {
|
|
13003
13272
|
return;
|
|
13004
13273
|
}
|
|
13274
|
+
const updatedNumberingsIds = new Set();
|
|
13005
13275
|
for (let i = index; i < this.paragraphs.length; i++) {
|
|
13006
13276
|
const paragraphStyle = this.model.paragraphs[i].paragraphStyle;
|
|
13007
13277
|
const paragraphSettings = this.getParagraphSettings(i);
|
|
13008
13278
|
if (this.model.paragraphs[i].paragraphStyle.numberingId !== null) {
|
|
13009
13279
|
if (this.generalProperties.numberingInfo[paragraphStyle.numberingId][paragraphStyle.numberingLevel].needToRecalculate) {
|
|
13280
|
+
updatedNumberingsIds.add(paragraphStyle.numberingId);
|
|
13010
13281
|
NumberingHelper.calculateMarkerIndexes(paragraphStyle.numberingId, paragraphStyle.numberingLevel, this.generalProperties.numberingInfo);
|
|
13011
13282
|
paragraphSettings.numberingData = NumberingHelper.createDataModel(this.generalProperties.numberings, this.model.paragraphs, i, this.generalProperties.numberingInfo);
|
|
13012
13283
|
const paragraphFormat = FormatStyleHelper.getFormatAtIndex(this.model.formats, this.model.paragraphs[i].insertIndex);
|
|
@@ -13018,7 +13289,7 @@ class DisplayData extends EventEmitting {
|
|
|
13018
13289
|
table.instance.updateCells();
|
|
13019
13290
|
}
|
|
13020
13291
|
}
|
|
13021
|
-
NumberingHelper.setAllNumberingIsCalculated(this.generalProperties.numberingInfo);
|
|
13292
|
+
NumberingHelper.setAllNumberingIsCalculated(this.generalProperties.numberingInfo, updatedNumberingsIds);
|
|
13022
13293
|
if ('pageType' in this.model) {
|
|
13023
13294
|
this.editorService.updateEdges(this.sessionId);
|
|
13024
13295
|
}
|
|
@@ -13066,8 +13337,11 @@ class DisplayData extends EventEmitting {
|
|
|
13066
13337
|
getParagraphLineTokens(paragraphIndex, paragraphLine) {
|
|
13067
13338
|
const paragraph = this.paragraphs[paragraphIndex];
|
|
13068
13339
|
const isLastParagraph = paragraphIndex === this.paragraphs.length - 1;
|
|
13069
|
-
const
|
|
13070
|
-
const
|
|
13340
|
+
const lines = paragraph.paragraphSettings.textLinesInfo;
|
|
13341
|
+
const line = lines[paragraphLine];
|
|
13342
|
+
const isLastLine = paragraphLine === lines.length - 1;
|
|
13343
|
+
const crucialContentEnd = isLastLine ? paragraph.content.length : lines[paragraphLine + 1].endIndex + 1;
|
|
13344
|
+
const lineContent = paragraph.content.substring(line.startIndex, crucialContentEnd);
|
|
13071
13345
|
const paragraphSymbolIndex = paragraph.paragraphSettings.startInsertIndex + paragraph.content.length;
|
|
13072
13346
|
const tokens = this.getTokens(line.startIndex + paragraph.startIndex, lineContent, paragraphSymbolIndex);
|
|
13073
13347
|
if (line.customTexts && line.customTexts[0].index === line.startIndex) {
|
|
@@ -13079,7 +13353,6 @@ class DisplayData extends EventEmitting {
|
|
|
13079
13353
|
const startWidth = line.indentLeft + line.indentFirstLine - line.indent.hanging || 0;
|
|
13080
13354
|
const last = this.computeWrapToken(tokens, startWidth, maxWidth, paragraphStyle.tabSettings ?? [], isLastParagraph); // tab width correction for tokens according to the tabs complex positioning
|
|
13081
13355
|
tokens.splice(last + 1); // cut additional tokens in case when line ends in the middle of the textual custom component
|
|
13082
|
-
const isLastLine = paragraphLine === paragraph.paragraphSettings.textLinesInfo.length - 1;
|
|
13083
13356
|
const position = { isLastLine, isNumbering: line.isNumbering, isAfterPageBreak: false };
|
|
13084
13357
|
LineInfoHelper.get(tokens, paragraphStyle, line.indent, pageFormat.contentWidth, 0, position); // space width correction for tokens according to the wordSpacing in case of justify alignment
|
|
13085
13358
|
return tokens;
|
|
@@ -13329,9 +13602,9 @@ class DisplayData extends EventEmitting {
|
|
|
13329
13602
|
const change = addedLength
|
|
13330
13603
|
? new ParagraphInfoContentInserted(insertParagraphs[i], position.column, addedLength)
|
|
13331
13604
|
: new ParagraphInfoContentChanged(insertParagraphs[i], position.column, removedLength);
|
|
13332
|
-
this.
|
|
13605
|
+
this.paragraphInfoChanges.next(change);
|
|
13333
13606
|
}
|
|
13334
|
-
this.
|
|
13607
|
+
this.paragraphInfoChanges.next(new ParagraphInfoAdded(insertParagraphs[i]));
|
|
13335
13608
|
}
|
|
13336
13609
|
return new CursorParagraph(position.row + insertParagraphs.length - 1, insertParagraphs[insertParagraphs.length - 1].content.length - right.length);
|
|
13337
13610
|
}
|
|
@@ -14061,7 +14334,7 @@ class EditSession {
|
|
|
14061
14334
|
return this.scrollBar?.element.clientHeight ?? 0; // only main session is scrollable
|
|
14062
14335
|
}
|
|
14063
14336
|
get paragraphInfoChanges$() {
|
|
14064
|
-
return this.displayData.
|
|
14337
|
+
return this.displayData.paragraphInfoChanges$;
|
|
14065
14338
|
}
|
|
14066
14339
|
constructor(displayData, sessionId, customContentService, commentRenderService, model, selection, generalProperties, editorService, customComponents, type, scrollBar, edgeType, pageType) {
|
|
14067
14340
|
this.displayData = displayData;
|
|
@@ -14252,6 +14525,15 @@ class EditSession {
|
|
|
14252
14525
|
this.displayData.updateNextLineIndexes(startParagraph, endParagraph);
|
|
14253
14526
|
this.applyToolbarStyles();
|
|
14254
14527
|
}
|
|
14528
|
+
applyNewNumberingForParagraphs(levels, insertIndexes) {
|
|
14529
|
+
const startIndex = insertIndexes[0];
|
|
14530
|
+
const endIndex = insertIndexes[insertIndexes.length - 1];
|
|
14531
|
+
const startParagraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, startIndex).row;
|
|
14532
|
+
const endParagraph = ContentHelper.documentIndexToParagraphWithOffset(this.displayData.paragraphs, endIndex).row;
|
|
14533
|
+
OperationsHelper.applyNewNumberingForParagraphs(this.model, this.generalProperties.numberings, levels, insertIndexes);
|
|
14534
|
+
this.displayData.updateNextLineIndexes(startParagraph, endParagraph);
|
|
14535
|
+
this.applyToolbarStyles();
|
|
14536
|
+
}
|
|
14255
14537
|
applyNumbering(levels, numberingId) {
|
|
14256
14538
|
const paragraphIndex = this.displayData.paragraphs.findIndex(x => x.paragraphSettings.numberingData.numberingId === numberingId);
|
|
14257
14539
|
OperationsHelper.applyNumbering(this.generalProperties.numberings, levels, numberingId);
|
|
@@ -14703,7 +14985,7 @@ class GrammarChecker {
|
|
|
14703
14985
|
this.sessionMap.set(session.sessionId, session);
|
|
14704
14986
|
const updateSubscription = session.session.paragraphInfoChanges$.subscribe(x => this.processParagraphChange(session, x));
|
|
14705
14987
|
this.sessionSubscriptions.set(session.sessionId, [updateSubscription]);
|
|
14706
|
-
this.visibilitySubscriptions.set(session.sessionId, session.renderer.
|
|
14988
|
+
this.visibilitySubscriptions.set(session.sessionId, session.renderer.paragraphsAppeared$.subscribe(x => {
|
|
14707
14989
|
if (session.session.editorService.isViewOnly) {
|
|
14708
14990
|
return;
|
|
14709
14991
|
}
|
|
@@ -15162,6 +15444,9 @@ class GrammarHighlightLayer extends HighlightLayer {
|
|
|
15162
15444
|
removeParagraphHighlights(paragraphId) {
|
|
15163
15445
|
this.errorsByParagraph.delete(paragraphId);
|
|
15164
15446
|
}
|
|
15447
|
+
clearHighlights() {
|
|
15448
|
+
this.errorsByParagraph.clear();
|
|
15449
|
+
}
|
|
15165
15450
|
}
|
|
15166
15451
|
|
|
15167
15452
|
class RenderChangesModel {
|
|
@@ -15411,8 +15696,8 @@ class SelectionLayer extends HighlightLayer {
|
|
|
15411
15696
|
}
|
|
15412
15697
|
|
|
15413
15698
|
class Renderer extends EventEmitting {
|
|
15414
|
-
get
|
|
15415
|
-
return this.
|
|
15699
|
+
get paragraphsAppeared$() {
|
|
15700
|
+
return this.paragraphsAppeared.asObservable();
|
|
15416
15701
|
}
|
|
15417
15702
|
constructor(parentContainer, commentsService, session) {
|
|
15418
15703
|
super();
|
|
@@ -15439,7 +15724,7 @@ class Renderer extends EventEmitting {
|
|
|
15439
15724
|
};
|
|
15440
15725
|
this.isVisible = false;
|
|
15441
15726
|
this.changes = new RenderChangesModel();
|
|
15442
|
-
this.
|
|
15727
|
+
this.paragraphsAppeared = new Subject();
|
|
15443
15728
|
this.visibilitySubject = new Subject();
|
|
15444
15729
|
this.textareaSize = {
|
|
15445
15730
|
height: 1,
|
|
@@ -15581,6 +15866,18 @@ class Renderer extends EventEmitting {
|
|
|
15581
15866
|
removeGrammarHighlights(paragraphId) {
|
|
15582
15867
|
this.grammarHighlightLayer.removeParagraphHighlights(paragraphId);
|
|
15583
15868
|
}
|
|
15869
|
+
clearGrammarHighlights() {
|
|
15870
|
+
this.grammarHighlightLayer.clearHighlights();
|
|
15871
|
+
this.loop.schedule({ grammar: true });
|
|
15872
|
+
}
|
|
15873
|
+
paragraphsScrolledIntoView() {
|
|
15874
|
+
if (!this.layerConfig.visibleRange) {
|
|
15875
|
+
this.paragraphsAppeared.next(this.session.displayData.paragraphs);
|
|
15876
|
+
return;
|
|
15877
|
+
}
|
|
15878
|
+
const paragraphs = this.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph + 1);
|
|
15879
|
+
this.paragraphsAppeared.next(paragraphs);
|
|
15880
|
+
}
|
|
15584
15881
|
updateDragAndDropSelection(range) {
|
|
15585
15882
|
if (range.isEmpty && this.dragAndDropSelectionLayer.marker) {
|
|
15586
15883
|
this.dragAndDropSelectionLayer.marker = null;
|
|
@@ -15708,14 +16005,6 @@ class Renderer extends EventEmitting {
|
|
|
15708
16005
|
this.container.appendChild(this.content);
|
|
15709
16006
|
}
|
|
15710
16007
|
}
|
|
15711
|
-
paragraphsScrolledIntoView() {
|
|
15712
|
-
if (!this.layerConfig.visibleRange) {
|
|
15713
|
-
this.ParagraphsAppeared.next(this.session.displayData.paragraphs);
|
|
15714
|
-
return;
|
|
15715
|
-
}
|
|
15716
|
-
const paragraphs = this.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph);
|
|
15717
|
-
this.ParagraphsAppeared.next(paragraphs);
|
|
15718
|
-
}
|
|
15719
16008
|
}
|
|
15720
16009
|
|
|
15721
16010
|
/**
|
|
@@ -15947,8 +16236,8 @@ class VirtualRenderer {
|
|
|
15947
16236
|
set layerConfig(val) {
|
|
15948
16237
|
this.renderer.layerConfig = val;
|
|
15949
16238
|
}
|
|
15950
|
-
get
|
|
15951
|
-
return this.renderer.
|
|
16239
|
+
get paragraphsAppeared$() {
|
|
16240
|
+
return this.renderer.paragraphsAppeared.asObservable();
|
|
15952
16241
|
}
|
|
15953
16242
|
constructor(parentContainer, mainSession, commentService, scrollBar) {
|
|
15954
16243
|
this.scrollBar = scrollBar;
|
|
@@ -16197,6 +16486,13 @@ class VirtualRenderer {
|
|
|
16197
16486
|
showStaticCursor() {
|
|
16198
16487
|
this.renderer.showStaticCursor();
|
|
16199
16488
|
}
|
|
16489
|
+
clearGrammarHighlights() {
|
|
16490
|
+
this.renderer.clearGrammarHighlights();
|
|
16491
|
+
}
|
|
16492
|
+
paragraphsScrolledIntoView() {
|
|
16493
|
+
const paragraphs = this.renderer.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph + 1);
|
|
16494
|
+
this.renderer.paragraphsAppeared.next(paragraphs);
|
|
16495
|
+
}
|
|
16200
16496
|
destroy() {
|
|
16201
16497
|
DomHelper.removeElement(this.scrollBar.element);
|
|
16202
16498
|
this.pagesLayer.destroy();
|
|
@@ -16294,10 +16590,6 @@ class VirtualRenderer {
|
|
|
16294
16590
|
renderComments() {
|
|
16295
16591
|
this.renderer.renderComments();
|
|
16296
16592
|
}
|
|
16297
|
-
paragraphsScrolledIntoView() {
|
|
16298
|
-
const paragraphs = this.renderer.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph);
|
|
16299
|
-
this.renderer.ParagraphsAppeared.next(paragraphs);
|
|
16300
|
-
}
|
|
16301
16593
|
}
|
|
16302
16594
|
|
|
16303
16595
|
class CustomContentService {
|
|
@@ -16450,6 +16742,7 @@ class RegulatorService {
|
|
|
16450
16742
|
this.commentRenderService = commentRenderService;
|
|
16451
16743
|
this.sessions = [];
|
|
16452
16744
|
this.sessionIdIncrement = 0;
|
|
16745
|
+
this.grammarEnabled = false;
|
|
16453
16746
|
this.grammarChecker = new GrammarChecker(this.grammarService);
|
|
16454
16747
|
}
|
|
16455
16748
|
addMainSession(model, scalingRatio, container) {
|
|
@@ -16483,7 +16776,9 @@ class RegulatorService {
|
|
|
16483
16776
|
this.sessions.push(this.mainSession);
|
|
16484
16777
|
this.currentSession = this.mainSession;
|
|
16485
16778
|
displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
|
|
16486
|
-
|
|
16779
|
+
if (this.grammarEnabled) {
|
|
16780
|
+
this.grammarChecker.registerSession(this.mainSession);
|
|
16781
|
+
}
|
|
16487
16782
|
}
|
|
16488
16783
|
addCellSession(table, margins, component, properties) {
|
|
16489
16784
|
const sessionId = ++this.sessionIdIncrement;
|
|
@@ -16499,7 +16794,9 @@ class RegulatorService {
|
|
|
16499
16794
|
this.sessions.push(newSession);
|
|
16500
16795
|
displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
|
|
16501
16796
|
newSession.renderer.updateText();
|
|
16502
|
-
this.
|
|
16797
|
+
if (this.grammarEnabled) {
|
|
16798
|
+
this.grammarChecker.registerSession(newSession);
|
|
16799
|
+
}
|
|
16503
16800
|
return newSession;
|
|
16504
16801
|
}
|
|
16505
16802
|
addEdgeSession(component) {
|
|
@@ -16513,7 +16810,9 @@ class RegulatorService {
|
|
|
16513
16810
|
this.sessions.push(newSession);
|
|
16514
16811
|
displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
|
|
16515
16812
|
newSession.renderer.updateText();
|
|
16516
|
-
this.
|
|
16813
|
+
if (this.grammarEnabled) {
|
|
16814
|
+
this.grammarChecker.registerSession(newSession);
|
|
16815
|
+
}
|
|
16517
16816
|
return newSession;
|
|
16518
16817
|
}
|
|
16519
16818
|
removeSession(sessionId) {
|
|
@@ -16687,6 +16986,20 @@ class RegulatorService {
|
|
|
16687
16986
|
}
|
|
16688
16987
|
});
|
|
16689
16988
|
}
|
|
16989
|
+
toggleGrammarChecks(value) {
|
|
16990
|
+
this.grammarEnabled = value;
|
|
16991
|
+
if (this.grammarEnabled) {
|
|
16992
|
+
for (const session of this.sessions) {
|
|
16993
|
+
this.grammarChecker.registerSession(session);
|
|
16994
|
+
session.renderer.paragraphsScrolledIntoView();
|
|
16995
|
+
}
|
|
16996
|
+
return;
|
|
16997
|
+
}
|
|
16998
|
+
for (const session of this.sessions) {
|
|
16999
|
+
this.grammarChecker.unregisterSession(session.sessionId);
|
|
17000
|
+
session.renderer.clearGrammarHighlights();
|
|
17001
|
+
}
|
|
17002
|
+
}
|
|
16690
17003
|
getEdgeSessionId(sessionId) {
|
|
16691
17004
|
let session = this.getSession(sessionId);
|
|
16692
17005
|
while (session && !session.isEdge()) {
|
|
@@ -18450,11 +18763,11 @@ class SpacingComponent {
|
|
|
18450
18763
|
this.selectAfter.emit(value);
|
|
18451
18764
|
}
|
|
18452
18765
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpacingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18453
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpacingComponent, isStandalone: false, selector: "app-nod-spacing", inputs: { isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, before: { classPropertyName: "before", publicName: "before", isSignal: true, isRequired: false, transformFunction: null }, after: { classPropertyName: "after", publicName: "after", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectSpacing: "selectSpacing", selectBefore: "selectBefore", selectAfter: "selectAfter" }, ngImport: i0, template: "<button\n mat-button\n class=\"spacing-button\"\n [matMenuTriggerFor]=\"spacingMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matTooltip]=\"'NODER.TOOLTIP.
|
|
18766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpacingComponent, isStandalone: false, selector: "app-nod-spacing", inputs: { isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, before: { classPropertyName: "before", publicName: "before", isSignal: true, isRequired: false, transformFunction: null }, after: { classPropertyName: "after", publicName: "after", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectSpacing: "selectSpacing", selectBefore: "selectBefore", selectAfter: "selectAfter" }, ngImport: i0, template: "<button\n mat-button\n class=\"spacing-button\"\n [matMenuTriggerFor]=\"spacingMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matTooltip]=\"'NODER.TOOLTIP.LINE_SPACING' | translate\"\n matTooltipPosition=\"below\">\n <div class=\"spacing-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-spacing\"></mat-icon>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\"></mat-icon>\n </div>\n</button>\n<mat-menu\n #spacingMenu=\"matMenu\"\n class=\"noder-modal noder-spacing-modal-menu\">\n <ng-container *ngFor=\"let value of spacings\">\n <button\n mat-menu-item\n class=\"spacing-option\"\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectSpacing(+value)\">\n {{ value }}\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\"\n class=\"hidden\"\n [class.selected]=\"spacing() === +value\"></mat-icon>\n </button>\n </ng-container>\n <span class=\"spacing-label\">{{ 'NODER.LABEL.LINE_SPACING_OPTIONS' | translate }}</span>\n <hr class=\"noder-divider\" />\n @if (before()) {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectBefore(0)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-before\"></mat-icon>\n {{ 'NODER.LABEL.REMOVE_SPACE_BEFORE_PARAGRAPH' | translate }}\n </button>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectBefore(16)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-before\"></mat-icon>\n {{ 'NODER.LABEL.ADD_SPACE_BEFORE_PARAGRAPH' | translate }}\n </button>\n }\n @if (after()) {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectAfter(0)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-after\"></mat-icon>\n {{ 'NODER.LABEL.REMOVE_SPACE_AFTER_PARAGRAPH' | translate }}\n </button>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectAfter(16)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-after\"></mat-icon>\n {{ 'NODER.LABEL.ADD_SPACE_AFTER_PARAGRAPH' | translate }}\n </button>\n }\n</mat-menu>\n", styles: [".spacing-button{height:32px;margin:0 4px}button:not(.spacing-button){padding-left:4px;padding-right:8px}button.spacing-option{padding-left:8px}.spacing-menu{display:flex;justify-content:space-between;align-items:center}mat-icon{align-self:center}mat-icon.hidden:not(.selected){display:none}mat-icon.selected{position:absolute;right:0}.spacing-label{font-size:12px;padding-left:8px;cursor:default}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18454
18767
|
}
|
|
18455
18768
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpacingComponent, decorators: [{
|
|
18456
18769
|
type: Component,
|
|
18457
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-spacing', standalone: false, template: "<button\n mat-button\n class=\"spacing-button\"\n [matMenuTriggerFor]=\"spacingMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matTooltip]=\"'NODER.TOOLTIP.
|
|
18770
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-spacing', standalone: false, template: "<button\n mat-button\n class=\"spacing-button\"\n [matMenuTriggerFor]=\"spacingMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matTooltip]=\"'NODER.TOOLTIP.LINE_SPACING' | translate\"\n matTooltipPosition=\"below\">\n <div class=\"spacing-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-spacing\"></mat-icon>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\"></mat-icon>\n </div>\n</button>\n<mat-menu\n #spacingMenu=\"matMenu\"\n class=\"noder-modal noder-spacing-modal-menu\">\n <ng-container *ngFor=\"let value of spacings\">\n <button\n mat-menu-item\n class=\"spacing-option\"\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectSpacing(+value)\">\n {{ value }}\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\"\n class=\"hidden\"\n [class.selected]=\"spacing() === +value\"></mat-icon>\n </button>\n </ng-container>\n <span class=\"spacing-label\">{{ 'NODER.LABEL.LINE_SPACING_OPTIONS' | translate }}</span>\n <hr class=\"noder-divider\" />\n @if (before()) {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectBefore(0)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-before\"></mat-icon>\n {{ 'NODER.LABEL.REMOVE_SPACE_BEFORE_PARAGRAPH' | translate }}\n </button>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectBefore(16)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-before\"></mat-icon>\n {{ 'NODER.LABEL.ADD_SPACE_BEFORE_PARAGRAPH' | translate }}\n </button>\n }\n @if (after()) {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectAfter(0)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-after\"></mat-icon>\n {{ 'NODER.LABEL.REMOVE_SPACE_AFTER_PARAGRAPH' | translate }}\n </button>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"isDisabled()\"\n (click)=\"onSelectAfter(16)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-space-after\"></mat-icon>\n {{ 'NODER.LABEL.ADD_SPACE_AFTER_PARAGRAPH' | translate }}\n </button>\n }\n</mat-menu>\n", styles: [".spacing-button{height:32px;margin:0 4px}button:not(.spacing-button){padding-left:4px;padding-right:8px}button.spacing-option{padding-left:8px}.spacing-menu{display:flex;justify-content:space-between;align-items:center}mat-icon{align-self:center}mat-icon.hidden:not(.selected){display:none}mat-icon.selected{position:absolute;right:0}.spacing-label{font-size:12px;padding-left:8px;cursor:default}\n"] }]
|
|
18458
18771
|
}] });
|
|
18459
18772
|
|
|
18460
18773
|
class UndoRedoComponent {
|
|
@@ -18523,11 +18836,11 @@ class ToolbarActionsComponent extends BaseToolbarComponent {
|
|
|
18523
18836
|
});
|
|
18524
18837
|
}
|
|
18525
18838
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CustomIconService }, { token: i0.Injector }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ToolbarActionsComponent, isStandalone: false, selector: "app-nod-toolbar-actions", viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print
|
|
18839
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ToolbarActionsComponent, isStandalone: false, selector: "app-nod-toolbar-actions", viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-spacing\n [isDisabled]=\"isViewOnly\"\n [spacing]=\"styles.lineSpacing\"\n [before]=\"styles.spaceBefore\"\n [after]=\"styles.spaceAfter\"\n (selectSpacing)=\"onApplySpacing($event)\"\n (selectBefore)=\"onApplyBefore($event)\"\n (selectAfter)=\"onApplyAfter($event)\" />\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FontComponent, selector: "app-nod-font", inputs: ["isDisabled", "styles"], outputs: ["selectFont"] }, { kind: "component", type: FontSizeComponent, selector: "app-nod-font-size", inputs: ["isDisabled", "fontSize"], outputs: ["selectFontSize"] }, { kind: "component", type: InsertTableComponent, selector: "app-nod-insert-table", outputs: ["selectSizes"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TableBordersComponent, selector: "app-nod-table-borders", inputs: ["isDisabled"], outputs: ["updateTableBorders"] }, { kind: "component", type: TableBorderStyleComponent, selector: "app-nod-table-border-style", inputs: ["isDisabled"], outputs: ["updateTableBorderStyle"] }, { kind: "component", type: TableBorderWidthComponent, selector: "app-nod-table-border-width", inputs: ["isDisabled"], outputs: ["updateTableBorderWidth"] }, { kind: "component", type: FontStyleComponent, selector: "app-nod-font-style", inputs: ["isDisabled", "bold", "italic", "underline", "fontColor", "highlightColor"], outputs: ["toggleBold", "toggleItalic", "toggleUnderline", "selectFontColor", "selectHighlightColor"] }, { kind: "component", type: FormatComponent, selector: "app-nod-format", inputs: ["isDisabled", "alignment"], outputs: ["selectAlignment"] }, { kind: "component", type: NumberingComponent, selector: "app-nod-numbering", inputs: ["isDisabled", "selectedNumberingType", "selectedNumberingTemplate"], outputs: ["selectNumberingTemplate", "removeNumberings"] }, { kind: "component", type: PrintComponent, selector: "app-nod-print", outputs: ["print"] }, { kind: "component", type: SpacingComponent, selector: "app-nod-spacing", inputs: ["isDisabled", "spacing", "before", "after"], outputs: ["selectSpacing", "selectBefore", "selectAfter"] }, { kind: "component", type: UndoRedoComponent, selector: "app-nod-undo-redo", inputs: ["canUndo", "canRedo"], outputs: ["undo", "redo"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18527
18840
|
}
|
|
18528
18841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, decorators: [{
|
|
18529
18842
|
type: Component,
|
|
18530
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-toolbar-actions', standalone: false, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print
|
|
18843
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-toolbar-actions', standalone: false, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-spacing\n [isDisabled]=\"isViewOnly\"\n [spacing]=\"styles.lineSpacing\"\n [before]=\"styles.spaceBefore\"\n [after]=\"styles.spaceAfter\"\n (selectSpacing)=\"onApplySpacing($event)\"\n (selectBefore)=\"onApplyBefore($event)\"\n (selectAfter)=\"onApplyAfter($event)\" />\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"] }]
|
|
18531
18844
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: CustomIconService }, { type: i0.Injector }, { type: EditorService }], propDecorators: { tableInsertMenu: [{
|
|
18532
18845
|
type: ViewChild,
|
|
18533
18846
|
args: ['tableInsert']
|