@talrace/ngx-noder 19.0.63 → 19.0.65
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 +4 -0
- package/assets/i18n/noder.es.json +4 -0
- package/assets/i18n/noder.ru.json +4 -0
- package/fesm2022/talrace-ngx-noder.mjs +476 -76
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.d.ts +1 -1
- package/lib/editor/components/table/overlay-menu/overlay-menu.component.d.ts +8 -2
- package/lib/editor/components/table/overlay-menu/split-cell-dialog/split-cell-dialog.component.d.ts +10 -0
- package/lib/editor/components/table/selection/table-selection.d.ts +1 -0
- package/lib/editor/content/contents.interface.d.ts +2 -1
- package/lib/editor/execution/edit.session.d.ts +2 -0
- package/lib/editor/execution/editor.d.ts +4 -0
- package/lib/editor/gadgets/editor-menu/context-menu.component.d.ts +1 -1
- package/lib/editor/gadgets/history/operation-history.d.ts +2 -0
- package/lib/editor/gadgets/history/operation.type.d.ts +3 -1
- package/lib/editor/interaction/editor.service.d.ts +20 -0
- package/lib/editor/operations/enums/command-type.enum.d.ts +3 -1
- package/lib/editor/operations/helpers/contents-operations.helper.d.ts +2 -2
- package/lib/editor/operations/helpers/table-operations.helper.d.ts +7 -0
- package/lib/editor/operations/operations-helper.helper.d.ts +4 -2
- package/lib/editor/operations/save-commands.helper.d.ts +2 -0
- package/lib/models/generated/command.model.d.ts +4 -0
- package/lib/models/generated/merge-table-cells.model.d.ts +8 -0
- package/lib/models/generated/split-table-cells.model.d.ts +8 -0
- package/package.json +1 -1
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.scss +9 -0
- package/src/assets/fonts/nc-iconfont.svg +4 -1
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
|
@@ -17,15 +17,15 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
17
17
|
import * as i3 from '@angular/common';
|
|
18
18
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
19
19
|
import * as i2 from '@angular/forms';
|
|
20
|
-
import { FormControl, ReactiveFormsModule,
|
|
21
|
-
import * as
|
|
22
|
-
import {
|
|
20
|
+
import { FormsModule, FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
21
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
22
|
+
import { MatDialogRef, MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
23
23
|
import * as i6$1 from '@angular/material/input';
|
|
24
24
|
import { MatInputModule } from '@angular/material/input';
|
|
25
|
+
import * as i5$2 from '@angular/material/form-field';
|
|
26
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
25
27
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
26
28
|
import * as i6$2 from '@angular/cdk/clipboard';
|
|
27
|
-
import * as i1$1 from '@angular/material/dialog';
|
|
28
|
-
import { MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
29
29
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
30
30
|
import * as i7 from '@angular/material/select';
|
|
31
31
|
import { MatSelectModule } from '@angular/material/select';
|
|
@@ -673,6 +673,8 @@ class EditorService {
|
|
|
673
673
|
this._addCommentAtSelection$ = new Subject();
|
|
674
674
|
this._insertTableRows$ = new Subject();
|
|
675
675
|
this._insertTableColumns$ = new Subject();
|
|
676
|
+
this._mergeTableCells$ = new Subject();
|
|
677
|
+
this._splitTableCells$ = new Subject();
|
|
676
678
|
this._removeTableRows$ = new Subject();
|
|
677
679
|
this._removeTableColumns$ = new Subject();
|
|
678
680
|
this._removeTable$ = new Subject();
|
|
@@ -874,6 +876,12 @@ class EditorService {
|
|
|
874
876
|
get insertTableColumns$() {
|
|
875
877
|
return this._insertTableColumns$.asObservable();
|
|
876
878
|
}
|
|
879
|
+
get mergeTableCells$() {
|
|
880
|
+
return this._mergeTableCells$.asObservable();
|
|
881
|
+
}
|
|
882
|
+
get splitTableCells$() {
|
|
883
|
+
return this._splitTableCells$.asObservable();
|
|
884
|
+
}
|
|
877
885
|
get removeTableRows$() {
|
|
878
886
|
return this._removeTableRows$.asObservable();
|
|
879
887
|
}
|
|
@@ -1212,6 +1220,12 @@ class EditorService {
|
|
|
1212
1220
|
insertTableColumns(insertIndex, columnsCount, targetIndex, inheritIndex, sessionId) {
|
|
1213
1221
|
this._insertTableColumns$.next({ insertIndex, columnsCount, targetIndex, inheritIndex, sessionId });
|
|
1214
1222
|
}
|
|
1223
|
+
mergeTableCells(insertIndex, rowStartIndex, rowEndIndex, columnStartIndex, columnEndIndex, sessionId) {
|
|
1224
|
+
this._mergeTableCells$.next({ insertIndex, rowStartIndex, rowEndIndex, columnStartIndex, columnEndIndex, sessionId });
|
|
1225
|
+
}
|
|
1226
|
+
splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, sessionId) {
|
|
1227
|
+
this._splitTableCells$.next({ insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, sessionId });
|
|
1228
|
+
}
|
|
1215
1229
|
removeTableRows(insertIndex, startIndex, endIndex, sessionId) {
|
|
1216
1230
|
this._removeTableRows$.next({ insertIndex, startIndex, endIndex, sessionId });
|
|
1217
1231
|
}
|
|
@@ -1711,6 +1725,8 @@ var CommandType;
|
|
|
1711
1725
|
CommandType[CommandType["ApplyNewNumberingForParagraphs"] = 41] = "ApplyNewNumberingForParagraphs";
|
|
1712
1726
|
CommandType[CommandType["InsertContents"] = 42] = "InsertContents";
|
|
1713
1727
|
CommandType[CommandType["ReplaceByContents"] = 43] = "ReplaceByContents";
|
|
1728
|
+
CommandType[CommandType["MergeTableCells"] = 44] = "MergeTableCells";
|
|
1729
|
+
CommandType[CommandType["SplitTableCells"] = 45] = "SplitTableCells";
|
|
1714
1730
|
})(CommandType || (CommandType = {}));
|
|
1715
1731
|
|
|
1716
1732
|
class PageNumbersModel {
|
|
@@ -2392,7 +2408,7 @@ class TabModel {
|
|
|
2392
2408
|
}
|
|
2393
2409
|
|
|
2394
2410
|
class ContentsOperationsHelper {
|
|
2395
|
-
static
|
|
2411
|
+
static getRestoreFromSlice(contents, startIndex, count) {
|
|
2396
2412
|
const text = ContentOperationsHelper.sliceContent(contents.content, startIndex, count);
|
|
2397
2413
|
const endIndex = startIndex + count - 1;
|
|
2398
2414
|
const formats = FormatHelper.sliceSection(contents.formats, startIndex, endIndex);
|
|
@@ -2420,7 +2436,7 @@ class ContentsOperationsHelper {
|
|
|
2420
2436
|
comments
|
|
2421
2437
|
});
|
|
2422
2438
|
}
|
|
2423
|
-
static
|
|
2439
|
+
static getRelativeContentSlice(contents, documentNumberings, startIndex, count) {
|
|
2424
2440
|
const content = ContentOperationsHelper.sliceContent(contents.content, startIndex, count);
|
|
2425
2441
|
const endIndex = startIndex + count - 1;
|
|
2426
2442
|
const formats = FormatHelper.sliceSection(contents.formats, startIndex, endIndex).map(x => new FormatModel(x));
|
|
@@ -2493,14 +2509,14 @@ class ContextMenuComponent {
|
|
|
2493
2509
|
this.overlayService.close(AfterCloseOverlayActions.OpenSetNumberingValue);
|
|
2494
2510
|
}
|
|
2495
2511
|
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 }); }
|
|
2496
|
-
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
|
|
2512
|
+
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 [disabled]=\"!hasSelection || editorService.isViewOnly\"\n (click)=\"onCopy()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-copy\" />\n {{ 'NODER.LABEL.COPY' | translate }}\n <span class=\"shortcut\">Ctrl+C</span>\n</button>\n<button\n mat-button\n [disabled]=\"editorService.isViewOnly\"\n (click)=\"onPaste()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-paste\" />\n {{ 'NODER.LABEL.PASTE' | translate }}\n <span class=\"shortcut\">Ctrl+V</span>\n</button>\n<button\n mat-button\n [disabled]=\"!hasSelection || editorService.isViewOnly\"\n (click)=\"onCut()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cut\" />\n {{ 'NODER.LABEL.CUT' | translate }}\n <span class=\"shortcut\">Ctrl+X</span>\n</button>\n<div class=\"separator\"></div>\n<button\n mat-button\n [disabled]=\"!hasNumbering\"\n (click)=\"onStartNewList()\">\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 [disabled]=\"!hasNumbering || disableContinueNumber\"\n (click)=\"onContinueNumbering()\">\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 [disabled]=\"!hasNumbering\"\n (click)=\"onSetNumberingValue()\">\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}button ::ng-deep .mdc-button__label{display:flex;flex-direction:row;width:100%;margin-left:3px;font-weight:400}.shortcut{margin-left:auto;opacity:.5}\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 }); }
|
|
2497
2513
|
}
|
|
2498
2514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
2499
2515
|
type: Component,
|
|
2500
2516
|
args: [{ selector: 'app-nod-context-menu', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, TranslateModule, MatIconModule], host: {
|
|
2501
2517
|
'[style.height.px]': `${CONTEXT_MENU_HEIGHT}`,
|
|
2502
2518
|
'[style.width.px]': `${CONTEXT_MENU_WIDTH}`
|
|
2503
|
-
}, template: "<button\n mat-button\n
|
|
2519
|
+
}, template: "<button\n mat-button\n [disabled]=\"!hasSelection || editorService.isViewOnly\"\n (click)=\"onCopy()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-copy\" />\n {{ 'NODER.LABEL.COPY' | translate }}\n <span class=\"shortcut\">Ctrl+C</span>\n</button>\n<button\n mat-button\n [disabled]=\"editorService.isViewOnly\"\n (click)=\"onPaste()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-paste\" />\n {{ 'NODER.LABEL.PASTE' | translate }}\n <span class=\"shortcut\">Ctrl+V</span>\n</button>\n<button\n mat-button\n [disabled]=\"!hasSelection || editorService.isViewOnly\"\n (click)=\"onCut()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cut\" />\n {{ 'NODER.LABEL.CUT' | translate }}\n <span class=\"shortcut\">Ctrl+X</span>\n</button>\n<div class=\"separator\"></div>\n<button\n mat-button\n [disabled]=\"!hasNumbering\"\n (click)=\"onStartNewList()\">\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 [disabled]=\"!hasNumbering || disableContinueNumber\"\n (click)=\"onContinueNumbering()\">\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 [disabled]=\"!hasNumbering\"\n (click)=\"onSetNumberingValue()\">\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}button ::ng-deep .mdc-button__label{display:flex;flex-direction:row;width:100%;margin-left:3px;font-weight:400}.shortcut{margin-left:auto;opacity:.5}\n"] }]
|
|
2504
2520
|
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }], propDecorators: { hasNumbering: [{
|
|
2505
2521
|
type: Input
|
|
2506
2522
|
}], hasSelection: [{
|
|
@@ -2943,6 +2959,14 @@ class InsertTextModel {
|
|
|
2943
2959
|
}
|
|
2944
2960
|
}
|
|
2945
2961
|
|
|
2962
|
+
class MergeTableCellsModel {
|
|
2963
|
+
constructor(fields) {
|
|
2964
|
+
if (fields) {
|
|
2965
|
+
Object.assign(this, fields);
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2946
2970
|
var MouseButton;
|
|
2947
2971
|
(function (MouseButton) {
|
|
2948
2972
|
MouseButton[MouseButton["Left"] = 0] = "Left";
|
|
@@ -3121,6 +3145,14 @@ class RestoreTextStylesModel {
|
|
|
3121
3145
|
}
|
|
3122
3146
|
}
|
|
3123
3147
|
|
|
3148
|
+
class SplitTableCellsModel {
|
|
3149
|
+
constructor(fields) {
|
|
3150
|
+
if (fields) {
|
|
3151
|
+
Object.assign(this, fields);
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3124
3156
|
class OperationHistory {
|
|
3125
3157
|
constructor(editorService, regulatorService) {
|
|
3126
3158
|
this.editorService = editorService;
|
|
@@ -3223,6 +3255,28 @@ class OperationHistory {
|
|
|
3223
3255
|
const undoStep = new RemoveTableColumnsModel({ insertIndex, startIndex: targetIndex, endIndex: targetIndex + columnsCount - 1 });
|
|
3224
3256
|
this.addToHistory(undoStep, redoStep);
|
|
3225
3257
|
}
|
|
3258
|
+
pushMergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount) {
|
|
3259
|
+
const redoStep = new MergeTableCellsModel({ insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount });
|
|
3260
|
+
const undoStep = new SplitTableCellsModel({
|
|
3261
|
+
insertIndex,
|
|
3262
|
+
rowIndex: rowStartIndex,
|
|
3263
|
+
columnIndex: columnStartIndex,
|
|
3264
|
+
targetRowsCount: rowsCount,
|
|
3265
|
+
targetColumnsCount: columnCount
|
|
3266
|
+
});
|
|
3267
|
+
this.addToHistory(undoStep, redoStep);
|
|
3268
|
+
}
|
|
3269
|
+
pushSplitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount) {
|
|
3270
|
+
const redoStep = new SplitTableCellsModel({ insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount });
|
|
3271
|
+
const undoStep = new MergeTableCellsModel({
|
|
3272
|
+
insertIndex,
|
|
3273
|
+
rowStartIndex: rowIndex,
|
|
3274
|
+
rowsCount: targetRowsCount,
|
|
3275
|
+
columnStartIndex: columnIndex,
|
|
3276
|
+
columnCount: targetColumnsCount
|
|
3277
|
+
});
|
|
3278
|
+
this.addToHistory(undoStep, redoStep);
|
|
3279
|
+
}
|
|
3226
3280
|
pushRemoveTableRows(insertIndex, startIndex, endIndex) {
|
|
3227
3281
|
const redoStep = new RemoveTableRowsModel({ insertIndex, startIndex, endIndex });
|
|
3228
3282
|
const count = endIndex - startIndex + 1;
|
|
@@ -5243,21 +5297,7 @@ class TableOperationsHelper {
|
|
|
5243
5297
|
for (let i = 0; i < rowsCount; i++) {
|
|
5244
5298
|
let cells = [];
|
|
5245
5299
|
for (let j = 0; j < columnsCount; j++) {
|
|
5246
|
-
|
|
5247
|
-
breaks: [],
|
|
5248
|
-
content: '',
|
|
5249
|
-
elements: [],
|
|
5250
|
-
formats: [new FormatModel({ startIndex: 0, endIndex: 0, textStyle: DEFAULT_TEXT_STYLE })],
|
|
5251
|
-
images: [],
|
|
5252
|
-
paragraphs: [new ParagraphModel({ insertIndex: 0, paragraphStyle: DEFAULT_PARAGRAPH_STYLE })],
|
|
5253
|
-
tables: [],
|
|
5254
|
-
tabs: [],
|
|
5255
|
-
links: [],
|
|
5256
|
-
comments: [],
|
|
5257
|
-
width: columnWidth,
|
|
5258
|
-
widthType: 'dxa'
|
|
5259
|
-
});
|
|
5260
|
-
cells.push(cell);
|
|
5300
|
+
cells.push(this.createEmptyCell(columnWidth));
|
|
5261
5301
|
}
|
|
5262
5302
|
rows.push(new RowModel({ cells: cells }));
|
|
5263
5303
|
}
|
|
@@ -5711,6 +5751,114 @@ class TableOperationsHelper {
|
|
|
5711
5751
|
insertIndex: table.insertIndex
|
|
5712
5752
|
});
|
|
5713
5753
|
}
|
|
5754
|
+
static unmergeCellToBaseGrid(table, matrix, startRow, startCol, rowCount, colCount) {
|
|
5755
|
+
const anchorCell = matrix[startRow].cells[startCol];
|
|
5756
|
+
for (let i = startRow; i < startRow + rowCount; i++) {
|
|
5757
|
+
const row = table.rows[i];
|
|
5758
|
+
const rowAnchorCell = matrix[i].cells[startCol];
|
|
5759
|
+
rowAnchorCell.horizontalMerge = null;
|
|
5760
|
+
rowAnchorCell.verticalMerge = null;
|
|
5761
|
+
rowAnchorCell.width = table.columns[startCol].width ?? 0;
|
|
5762
|
+
let cellInsertIndex = row.cells.indexOf(rowAnchorCell) + 1;
|
|
5763
|
+
for (let j = startCol + 1; j < startCol + colCount; j++) {
|
|
5764
|
+
const columnWidth = table.columns[j].width ?? 0;
|
|
5765
|
+
const restoredCell = this.createEmptyCell(columnWidth);
|
|
5766
|
+
restoredCell.backgroundColor = anchorCell.backgroundColor;
|
|
5767
|
+
restoredCell.borders = this.cloneBorders(anchorCell.borders);
|
|
5768
|
+
restoredCell.verticalAlign = anchorCell.verticalAlign;
|
|
5769
|
+
row.cells.splice(cellInsertIndex, 0, restoredCell);
|
|
5770
|
+
cellInsertIndex++;
|
|
5771
|
+
}
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
static splitGridColumns(table, matrix, startRow, startColumn, anchorCellRows, anchorCellColumns, columnsToAdd) {
|
|
5775
|
+
const insertColumnIndex = startColumn + anchorCellColumns;
|
|
5776
|
+
const originalWidth = table.columns[insertColumnIndex - 1].width ?? 0;
|
|
5777
|
+
const newColumns = [];
|
|
5778
|
+
const newColumnWidth = originalWidth / (columnsToAdd + 1);
|
|
5779
|
+
table.columns[insertColumnIndex - 1].width = newColumnWidth;
|
|
5780
|
+
for (let i = 0; i < columnsToAdd; i++) {
|
|
5781
|
+
newColumns.push(new ColumnModel({ width: newColumnWidth }));
|
|
5782
|
+
}
|
|
5783
|
+
table.columns.splice(insertColumnIndex, 0, ...newColumns);
|
|
5784
|
+
const alreadySplitCells = new Set();
|
|
5785
|
+
for (let i = 0; i < table.rows.length; i++) {
|
|
5786
|
+
const row = table.rows[i];
|
|
5787
|
+
const isTargetRow = i >= startRow && i < startRow + anchorCellRows;
|
|
5788
|
+
if (isTargetRow) {
|
|
5789
|
+
const anchorColumnCell = matrix[i].cells[insertColumnIndex - 1];
|
|
5790
|
+
let insertCellIndex = row.cells.indexOf(anchorColumnCell) + 1;
|
|
5791
|
+
for (let j = 0; j < columnsToAdd; j++) {
|
|
5792
|
+
const newCell = this.createEmptyCell(newColumnWidth);
|
|
5793
|
+
newCell.backgroundColor = anchorColumnCell.backgroundColor;
|
|
5794
|
+
newCell.borders = this.cloneBorders(anchorColumnCell.borders);
|
|
5795
|
+
row.cells.splice(insertCellIndex, 0, newCell);
|
|
5796
|
+
insertCellIndex++;
|
|
5797
|
+
}
|
|
5798
|
+
}
|
|
5799
|
+
else {
|
|
5800
|
+
const columnCell = matrix[i].cells[insertColumnIndex - 1];
|
|
5801
|
+
if (!alreadySplitCells.has(columnCell)) {
|
|
5802
|
+
alreadySplitCells.add(columnCell);
|
|
5803
|
+
columnCell.horizontalMerge = (columnCell.horizontalMerge ?? 1) + columnsToAdd;
|
|
5804
|
+
}
|
|
5805
|
+
}
|
|
5806
|
+
}
|
|
5807
|
+
}
|
|
5808
|
+
static splitGridRows(table, matrix, startRow, startColumn, anchorCellRows, anchorColumnsCount, rowsToAdd) {
|
|
5809
|
+
const insertRowIndex = startRow + anchorCellRows;
|
|
5810
|
+
for (let i = 0; i < rowsToAdd; i++) {
|
|
5811
|
+
const newRow = new RowModel();
|
|
5812
|
+
newRow.cells ??= [];
|
|
5813
|
+
for (let j = 0; j < table.columns.length; j++) {
|
|
5814
|
+
const cellAbove = matrix[insertRowIndex - 1].cells[j];
|
|
5815
|
+
if (j > 0 && cellAbove === matrix[insertRowIndex - 1].cells[j - 1]) {
|
|
5816
|
+
continue;
|
|
5817
|
+
}
|
|
5818
|
+
const isTargetColumn = j >= startColumn && j < startColumn + anchorColumnsCount;
|
|
5819
|
+
if (isTargetColumn) {
|
|
5820
|
+
const newCell = this.createEmptyCell(cellAbove.width);
|
|
5821
|
+
newCell.horizontalMerge = cellAbove.horizontalMerge;
|
|
5822
|
+
newCell.backgroundColor = cellAbove.backgroundColor;
|
|
5823
|
+
newCell.borders = this.cloneBorders(cellAbove.borders);
|
|
5824
|
+
newCell.verticalAlign = cellAbove.verticalAlign;
|
|
5825
|
+
newRow.cells.push(newCell);
|
|
5826
|
+
}
|
|
5827
|
+
else {
|
|
5828
|
+
cellAbove.verticalMerge ??= VerticalMerge.Restart;
|
|
5829
|
+
const newCell = this.createEmptyCell(cellAbove.width);
|
|
5830
|
+
newCell.verticalMerge = VerticalMerge.Merge;
|
|
5831
|
+
newCell.horizontalMerge = cellAbove.horizontalMerge;
|
|
5832
|
+
newCell.backgroundColor = cellAbove.backgroundColor;
|
|
5833
|
+
newCell.borders = this.cloneBorders(cellAbove.borders);
|
|
5834
|
+
newCell.verticalAlign = cellAbove.verticalAlign;
|
|
5835
|
+
newRow.cells.push(newCell);
|
|
5836
|
+
}
|
|
5837
|
+
}
|
|
5838
|
+
table.rows.splice(insertRowIndex + i, 0, newRow);
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
static getVerticalSize(table, matrix, rowIndex, columnIndex) {
|
|
5842
|
+
const anchor = matrix[rowIndex].cells[columnIndex];
|
|
5843
|
+
if (anchor.verticalMerge !== VerticalMerge.Restart.toString()) {
|
|
5844
|
+
return 1;
|
|
5845
|
+
}
|
|
5846
|
+
let count = 1;
|
|
5847
|
+
for (let i = rowIndex + 1; i < table.rows.length; i++) {
|
|
5848
|
+
const cell = matrix[i].cells[columnIndex];
|
|
5849
|
+
if (cell.verticalMerge !== VerticalMerge.Merge.toString()) {
|
|
5850
|
+
break;
|
|
5851
|
+
}
|
|
5852
|
+
count++;
|
|
5853
|
+
}
|
|
5854
|
+
return count;
|
|
5855
|
+
}
|
|
5856
|
+
static cloneBorders(borders) {
|
|
5857
|
+
if (!borders) {
|
|
5858
|
+
return null;
|
|
5859
|
+
}
|
|
5860
|
+
return borders.map(x => structuredClone(x));
|
|
5861
|
+
}
|
|
5714
5862
|
static mergeCellStyles(existingCellsMap, newCellsMap) {
|
|
5715
5863
|
for (const [key, newCell] of newCellsMap) {
|
|
5716
5864
|
if (existingCellsMap.has(key)) {
|
|
@@ -5795,6 +5943,31 @@ class TableOperationsHelper {
|
|
|
5795
5943
|
}
|
|
5796
5944
|
return cellsData;
|
|
5797
5945
|
}
|
|
5946
|
+
static getDefaultCellBorders() {
|
|
5947
|
+
return [
|
|
5948
|
+
new BordersStyleModel({ position: Positions.Top, width: 1, lineStyle: LineStyles.Single }),
|
|
5949
|
+
new BordersStyleModel({ position: Positions.Bottom, width: 1, lineStyle: LineStyles.Single }),
|
|
5950
|
+
new BordersStyleModel({ position: Positions.Left, width: 1, lineStyle: LineStyles.Single }),
|
|
5951
|
+
new BordersStyleModel({ position: Positions.Right, width: 1, lineStyle: LineStyles.Single })
|
|
5952
|
+
];
|
|
5953
|
+
}
|
|
5954
|
+
static createEmptyCell(columnWidth) {
|
|
5955
|
+
return new CellModel({
|
|
5956
|
+
breaks: [],
|
|
5957
|
+
borders: this.getDefaultCellBorders(),
|
|
5958
|
+
content: '',
|
|
5959
|
+
elements: [],
|
|
5960
|
+
formats: [new FormatModel({ startIndex: 0, endIndex: 0, textStyle: DEFAULT_TEXT_STYLE })],
|
|
5961
|
+
images: [],
|
|
5962
|
+
paragraphs: [new ParagraphModel({ insertIndex: 0, paragraphStyle: DEFAULT_PARAGRAPH_STYLE })],
|
|
5963
|
+
tables: [],
|
|
5964
|
+
tabs: [],
|
|
5965
|
+
links: [],
|
|
5966
|
+
comments: [],
|
|
5967
|
+
width: columnWidth,
|
|
5968
|
+
widthType: 'dxa'
|
|
5969
|
+
});
|
|
5970
|
+
}
|
|
5798
5971
|
}
|
|
5799
5972
|
|
|
5800
5973
|
class TabOperationsHelper {
|
|
@@ -6073,13 +6246,23 @@ class OperationsHelper {
|
|
|
6073
6246
|
}
|
|
6074
6247
|
case CommandType.InsertContents: {
|
|
6075
6248
|
const model = command.insertContents;
|
|
6076
|
-
this.insertContents(contents,
|
|
6249
|
+
this.insertContents(contents, model.contents, model.insertIndex, document.numberings, model.contents.numberings);
|
|
6077
6250
|
break;
|
|
6078
6251
|
}
|
|
6079
6252
|
case CommandType.ReplaceByContents: {
|
|
6080
6253
|
const model = command.replaceByContents;
|
|
6081
6254
|
this.delete(contents, model.startIndex, model.count);
|
|
6082
|
-
this.insertContents(contents,
|
|
6255
|
+
this.insertContents(contents, model.contents, model.startIndex, document.numberings, model.contents.numberings);
|
|
6256
|
+
break;
|
|
6257
|
+
}
|
|
6258
|
+
case CommandType.MergeTableCells: {
|
|
6259
|
+
const { insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount } = command.mergeTableCells;
|
|
6260
|
+
this.mergeTableCells(contents, insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount);
|
|
6261
|
+
break;
|
|
6262
|
+
}
|
|
6263
|
+
case CommandType.SplitTableCells: {
|
|
6264
|
+
const { insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount } = command.splitTableCells;
|
|
6265
|
+
this.splitTableCells(contents, insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
|
|
6083
6266
|
break;
|
|
6084
6267
|
}
|
|
6085
6268
|
}
|
|
@@ -6092,7 +6275,7 @@ class OperationsHelper {
|
|
|
6092
6275
|
this.restoreMoveRange(targetContents, model, restore);
|
|
6093
6276
|
}
|
|
6094
6277
|
static removeMoveRange(sourceContents, model) {
|
|
6095
|
-
const restore = ContentsOperationsHelper.
|
|
6278
|
+
const restore = ContentsOperationsHelper.getRestoreFromSlice(sourceContents, model.sourceStartIndex, model.sourceCount);
|
|
6096
6279
|
this.delete(sourceContents, model.sourceStartIndex, model.sourceCount);
|
|
6097
6280
|
return restore;
|
|
6098
6281
|
}
|
|
@@ -6337,12 +6520,12 @@ class OperationsHelper {
|
|
|
6337
6520
|
document.comments = document.comments.filter(x => x.commentId !== commentId);
|
|
6338
6521
|
return comment;
|
|
6339
6522
|
}
|
|
6340
|
-
static insertContents(contents,
|
|
6523
|
+
static insertContents(contents, insertContents, insertIndex, numberings = null, insertNumberings = null) {
|
|
6341
6524
|
const contentLength = insertContents.content.length;
|
|
6342
6525
|
contents.content = ContentOperationsHelper.insertContent(contents.content, insertContents.content, insertIndex);
|
|
6343
|
-
if (
|
|
6526
|
+
if (numberings && insertNumberings && insertNumberings.length > 0) {
|
|
6344
6527
|
const insertNumberingId = NumberingOperationsHelper.generateNumberingId(numberings);
|
|
6345
|
-
NumberingOperationsHelper.insertRelative(numberings, insertNumberingId,
|
|
6528
|
+
NumberingOperationsHelper.insertRelative(numberings, insertNumberingId, insertNumberings, insertContents.paragraphs);
|
|
6346
6529
|
}
|
|
6347
6530
|
IndexedElementOperationsHelper.insertRelative(contents.paragraphs, insertIndex, contentLength, insertContents.paragraphs);
|
|
6348
6531
|
IndexedElementOperationsHelper.insertRelative(contents.images, insertIndex, contentLength, insertContents.images);
|
|
@@ -6410,6 +6593,74 @@ class OperationsHelper {
|
|
|
6410
6593
|
static insertTableColumns(document, insertIndex, columnsCount, targetIndex, inheritIndex, contentWidth) {
|
|
6411
6594
|
TableOperationsHelper.insertTableColumns(document.tables, insertIndex, columnsCount, targetIndex, inheritIndex, contentWidth);
|
|
6412
6595
|
}
|
|
6596
|
+
static mergeTableCells(document, insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount) {
|
|
6597
|
+
const table = document.tables.find(x => x.insertIndex === insertIndex);
|
|
6598
|
+
const matrix = TableOperationsHelper.getMatrix(table);
|
|
6599
|
+
const anchorCell = matrix[rowStartIndex].cells[columnStartIndex];
|
|
6600
|
+
anchorCell.horizontalMerge = columnsCount > 1 ? columnsCount : null;
|
|
6601
|
+
if (rowsCount > 1) {
|
|
6602
|
+
anchorCell.verticalMerge = VerticalMerge.Restart;
|
|
6603
|
+
}
|
|
6604
|
+
anchorCell.width = 0;
|
|
6605
|
+
for (let i = columnStartIndex + 1; i < columnStartIndex + columnsCount; i++) {
|
|
6606
|
+
anchorCell.width += table.columns[i].width || 0;
|
|
6607
|
+
}
|
|
6608
|
+
const visitedCells = new Set([anchorCell]);
|
|
6609
|
+
for (let i = rowStartIndex; i < rowStartIndex + rowsCount; i++) {
|
|
6610
|
+
const row = table.rows[i];
|
|
6611
|
+
const rowAnchorCell = i === rowStartIndex ? anchorCell : matrix[i].cells[columnStartIndex];
|
|
6612
|
+
if (i > rowStartIndex) {
|
|
6613
|
+
rowAnchorCell.horizontalMerge = columnsCount > 1 ? columnsCount : null;
|
|
6614
|
+
rowAnchorCell.verticalMerge = VerticalMerge.Merge;
|
|
6615
|
+
rowAnchorCell.width = anchorCell.width;
|
|
6616
|
+
rowAnchorCell.borders = anchorCell.borders;
|
|
6617
|
+
rowAnchorCell.backgroundColor = anchorCell.backgroundColor;
|
|
6618
|
+
visitedCells.add(rowAnchorCell);
|
|
6619
|
+
}
|
|
6620
|
+
this.mergeAndCleanupRowCells(row, matrix[i], rowAnchorCell, anchorCell, visitedCells, columnStartIndex, columnsCount);
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
static mergeAndCleanupRowCells(row, matrixRow, rowAnchorCell, anchorCell, visitedCells, columnStartIndex, columnsCount) {
|
|
6624
|
+
for (let i = columnStartIndex; i < columnStartIndex + columnsCount; i++) {
|
|
6625
|
+
const rowCell = matrixRow.cells[i];
|
|
6626
|
+
if (rowCell === rowAnchorCell) {
|
|
6627
|
+
continue;
|
|
6628
|
+
}
|
|
6629
|
+
if (!visitedCells.has(rowCell)) {
|
|
6630
|
+
visitedCells.add(rowCell);
|
|
6631
|
+
if (rowCell.content) {
|
|
6632
|
+
this.insertText(anchorCell, '\n', anchorCell.content.length);
|
|
6633
|
+
this.insertContents(anchorCell, rowCell, anchorCell.content.length);
|
|
6634
|
+
}
|
|
6635
|
+
}
|
|
6636
|
+
const cellIndex = row.cells.indexOf(rowCell);
|
|
6637
|
+
if (cellIndex > -1) {
|
|
6638
|
+
row.cells.splice(cellIndex, 1);
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
static splitTableCells(document, insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount) {
|
|
6643
|
+
const table = document.tables.find(x => x.insertIndex === insertIndex);
|
|
6644
|
+
let matrix = TableOperationsHelper.getMatrix(table);
|
|
6645
|
+
const anchorCell = matrix[rowIndex].cells[columnIndex];
|
|
6646
|
+
let anchorCellColumns = anchorCell.horizontalMerge ?? 1;
|
|
6647
|
+
const anchorCellRows = TableOperationsHelper.getVerticalSize(table, matrix, rowIndex, columnIndex);
|
|
6648
|
+
if (targetRowsCount === 1 && targetColumnsCount === 1 && anchorCellColumns === 1 && anchorCellRows === 1) {
|
|
6649
|
+
return;
|
|
6650
|
+
}
|
|
6651
|
+
TableOperationsHelper.unmergeCellToBaseGrid(table, matrix, rowIndex, columnIndex, anchorCellRows, anchorCellColumns);
|
|
6652
|
+
matrix = TableOperationsHelper.getMatrix(table);
|
|
6653
|
+
if (targetColumnsCount > anchorCellColumns) {
|
|
6654
|
+
const columnsToAdd = targetColumnsCount - anchorCellColumns;
|
|
6655
|
+
TableOperationsHelper.splitGridColumns(table, matrix, rowIndex, columnIndex, anchorCellRows, anchorCellColumns, columnsToAdd);
|
|
6656
|
+
anchorCellColumns = targetColumnsCount;
|
|
6657
|
+
}
|
|
6658
|
+
matrix = TableOperationsHelper.getMatrix(table);
|
|
6659
|
+
if (targetRowsCount > anchorCellRows) {
|
|
6660
|
+
const rowsToAdd = targetRowsCount - anchorCellRows;
|
|
6661
|
+
TableOperationsHelper.splitGridRows(table, matrix, rowIndex, columnIndex, anchorCellRows, anchorCellColumns, rowsToAdd);
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6413
6664
|
static removeTableRows(document, insertIndex, startIndex, endIndex) {
|
|
6414
6665
|
TableOperationsHelper.removeTableRows(document.tables, insertIndex, startIndex, endIndex);
|
|
6415
6666
|
}
|
|
@@ -8000,8 +8251,7 @@ class DisplayData extends EventEmitting {
|
|
|
8000
8251
|
this.pagesFormat = this.pageFormatModels.map(x => new PageFormat(x, this.pagesSpace, this.customComponents));
|
|
8001
8252
|
}
|
|
8002
8253
|
insertText(position, text) {
|
|
8003
|
-
|
|
8004
|
-
return endPoint;
|
|
8254
|
+
return this.insertTextAndReturnEndCursorPosition(text, position);
|
|
8005
8255
|
}
|
|
8006
8256
|
removeRange(range) {
|
|
8007
8257
|
const paragraphText = this.paragraphs[range.start.row].content.slice(0, range.start.column) +
|
|
@@ -9790,7 +10040,7 @@ class EditSession {
|
|
|
9790
10040
|
table.instance.updateTable();
|
|
9791
10041
|
}
|
|
9792
10042
|
insertContents(insertIndex, contents) {
|
|
9793
|
-
OperationsHelper.insertContents(this.model, this.generalProperties.numberings,
|
|
10043
|
+
OperationsHelper.insertContents(this.model, contents, insertIndex, this.generalProperties.numberings, contents.numberings);
|
|
9794
10044
|
const endIndex = insertIndex + contents.content.length - 1;
|
|
9795
10045
|
this.insertComponents(this.model.tables, this.customComponents.tables, NoderTableComponent, insertIndex, endIndex);
|
|
9796
10046
|
this.insertComponents(this.model.images, this.customComponents.images, NoderImageComponent, insertIndex, endIndex);
|
|
@@ -9848,13 +10098,13 @@ class EditSession {
|
|
|
9848
10098
|
const startIndex = ContentHelper.paragraphPositionToDocumentIndex(this.displayData.paragraphs, start);
|
|
9849
10099
|
const endIndex = ContentHelper.paragraphPositionToDocumentIndex(this.displayData.paragraphs, end) - 1;
|
|
9850
10100
|
const count = endIndex - startIndex + 1;
|
|
9851
|
-
return ContentsOperationsHelper.
|
|
10101
|
+
return ContentsOperationsHelper.getRelativeContentSlice(this.model, this.generalProperties.numberings, startIndex, count);
|
|
9852
10102
|
}
|
|
9853
10103
|
createRestoreFromSlice(start, end) {
|
|
9854
10104
|
const startIndex = ContentHelper.paragraphToDocumentIndex(this.displayData.paragraphs, start.row, start.column);
|
|
9855
10105
|
const endIndex = ContentHelper.paragraphToDocumentIndex(this.displayData.paragraphs, end.row, end.column) - 1;
|
|
9856
10106
|
const count = endIndex - startIndex + 1;
|
|
9857
|
-
return ContentsOperationsHelper.
|
|
10107
|
+
return ContentsOperationsHelper.getRestoreFromSlice(this.model, startIndex, count);
|
|
9858
10108
|
}
|
|
9859
10109
|
addComponent(customElements, model, componentType) {
|
|
9860
10110
|
const pageFormat = this.displayData.getPageFormatAtPosition(model.insertIndex);
|
|
@@ -9970,6 +10220,16 @@ class EditSession {
|
|
|
9970
10220
|
OperationsHelper.insertTableColumns(this.model, insertIndex, columnsCount, targetIndex, inheritIndex, pageFormat.contentWidth);
|
|
9971
10221
|
table.instance.updateTable();
|
|
9972
10222
|
}
|
|
10223
|
+
mergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount) {
|
|
10224
|
+
const table = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex);
|
|
10225
|
+
OperationsHelper.mergeTableCells(this.model, insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount);
|
|
10226
|
+
table.instance.updateTable();
|
|
10227
|
+
}
|
|
10228
|
+
splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount) {
|
|
10229
|
+
const table = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex);
|
|
10230
|
+
OperationsHelper.splitTableCells(this.model, insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
|
|
10231
|
+
table.instance.updateTable();
|
|
10232
|
+
}
|
|
9973
10233
|
removeTableRows(insertIndex, startIndex, endIndex) {
|
|
9974
10234
|
const table = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex);
|
|
9975
10235
|
OperationsHelper.removeTableRows(this.model, insertIndex, startIndex, endIndex);
|
|
@@ -12755,11 +13015,34 @@ class TableCellHelper {
|
|
|
12755
13015
|
}
|
|
12756
13016
|
}
|
|
12757
13017
|
|
|
13018
|
+
class SplitCellDialogComponent {
|
|
13019
|
+
constructor() {
|
|
13020
|
+
this.dialogRef = inject((MatDialogRef));
|
|
13021
|
+
this.columns = signal(2);
|
|
13022
|
+
this.rows = signal(1);
|
|
13023
|
+
}
|
|
13024
|
+
onApply() {
|
|
13025
|
+
const columns = this.columns();
|
|
13026
|
+
const rows = this.rows();
|
|
13027
|
+
this.dialogRef.close({ columns, rows });
|
|
13028
|
+
}
|
|
13029
|
+
onCancel() {
|
|
13030
|
+
this.dialogRef.close();
|
|
13031
|
+
}
|
|
13032
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SplitCellDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13033
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SplitCellDialogComponent, isStandalone: true, selector: "app-nod-split-cell-dialog", ngImport: i0, template: "<h2 mat-dialog-title>{{ 'NODER.LABEL.SPLIT_CELLS' | translate }}</h2>\n\n<mat-dialog-content>\n <div class=\"split-dialog-container\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_COLUMNS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"columns\" />\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"rows\" />\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button\n mat-button\n (click)=\"onCancel()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"columns() < 1 || rows() < 1\">\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".split-dialog-container{display:flex;flex-direction:column;gap:16px;margin-top:4px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
13034
|
+
}
|
|
13035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SplitCellDialogComponent, decorators: [{
|
|
13036
|
+
type: Component,
|
|
13037
|
+
args: [{ selector: 'app-nod-split-cell-dialog', standalone: true, imports: [MatDialogModule, MatButtonModule, MatInputModule, FormsModule, TranslateModule], template: "<h2 mat-dialog-title>{{ 'NODER.LABEL.SPLIT_CELLS' | translate }}</h2>\n\n<mat-dialog-content>\n <div class=\"split-dialog-container\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_COLUMNS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"columns\" />\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"rows\" />\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button\n mat-button\n (click)=\"onCancel()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"columns() < 1 || rows() < 1\">\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".split-dialog-container{display:flex;flex-direction:column;gap:16px;margin-top:4px}\n"] }]
|
|
13038
|
+
}] });
|
|
13039
|
+
|
|
12758
13040
|
class TableOverlayMenuComponent {
|
|
12759
|
-
constructor(editorService, overlayService, translateService) {
|
|
13041
|
+
constructor(editorService, overlayService, translateService, dialog) {
|
|
12760
13042
|
this.editorService = editorService;
|
|
12761
13043
|
this.overlayService = overlayService;
|
|
12762
13044
|
this.translateService = translateService;
|
|
13045
|
+
this.dialog = dialog;
|
|
12763
13046
|
}
|
|
12764
13047
|
ngOnInit() {
|
|
12765
13048
|
this.selectedRowsCount = this.selectionRange.rowIndexes.endIndex - this.selectionRange.rowIndexes.startIndex + 1;
|
|
@@ -12805,6 +13088,23 @@ class TableOverlayMenuComponent {
|
|
|
12805
13088
|
this.editorService.insertTableColumns(this.tableInsertIndex, this.selectedColumnsCount, this.targets.cellIndexes.endIndex, this.selectionRange.cellIndexes.endIndex, this.sessionId);
|
|
12806
13089
|
this.overlayService.close();
|
|
12807
13090
|
}
|
|
13091
|
+
onMergeCells() {
|
|
13092
|
+
this.editorService.mergeTableCells(this.tableInsertIndex, this.targets.rowIndexes.startIndex, this.targets.rowIndexes.endIndex, this.targets.cellIndexes.startIndex, this.targets.cellIndexes.endIndex, this.sessionId);
|
|
13093
|
+
this.overlayService.close();
|
|
13094
|
+
}
|
|
13095
|
+
onSplitCells() {
|
|
13096
|
+
this.overlayService.close();
|
|
13097
|
+
const dialogRef = this.dialog.open(SplitCellDialogComponent, {
|
|
13098
|
+
width: '320px',
|
|
13099
|
+
disableClose: true
|
|
13100
|
+
});
|
|
13101
|
+
dialogRef
|
|
13102
|
+
.afterClosed()
|
|
13103
|
+
.pipe(filter(result => !!result))
|
|
13104
|
+
.subscribe((result) => {
|
|
13105
|
+
this.editorService.splitTableCells(this.tableInsertIndex, this.targets.rowIndexes.startIndex, this.targets.cellIndexes.startIndex, result.rows, result.columns, this.sessionId);
|
|
13106
|
+
});
|
|
13107
|
+
}
|
|
12808
13108
|
onRemoveRows() {
|
|
12809
13109
|
this.editorService.removeTableRows(this.tableInsertIndex, this.selectionRange.rowIndexes.startIndex, this.selectionRange.rowIndexes.endIndex, this.sessionId);
|
|
12810
13110
|
this.overlayService.close();
|
|
@@ -12817,13 +13117,13 @@ class TableOverlayMenuComponent {
|
|
|
12817
13117
|
this.editorService.removeTable(this.tableInsertIndex, this.sessionId);
|
|
12818
13118
|
this.overlayService.close();
|
|
12819
13119
|
}
|
|
12820
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableOverlayMenuComponent, deps: [{ token: EditorService }, { token: OverlayService }, { token: i6.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12821
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
13120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableOverlayMenuComponent, deps: [{ token: EditorService }, { token: OverlayService }, { token: i6.TranslateService }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13121
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TableOverlayMenuComponent, isStandalone: false, selector: "app-nod-table-overlay-menu", inputs: { selectionRange: "selectionRange", targets: "targets", canRemoveRows: "canRemoveRows", canRemoveColumns: "canRemoveColumns", canMergeCells: "canMergeCells", canSplitCells: "canSplitCells", tableInsertIndex: "tableInsertIndex", sessionId: "sessionId" }, ngImport: i0, template: "<div\n class=\"menu-item\"\n (click)=\"onInsertRowsAbove()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsAboveMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertRowsBelow()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsBelowMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsLeft()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsLeftMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsRight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsRightMessage }}\n</div>\n@if (canSplitCells || canMergeCells) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canMergeCells) {\n <div\n class=\"menu-item\"\n (click)=\"onMergeCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-merge-cells\"></mat-icon>\n {{ 'NODER.LABEL.MERGE_CELLS' | translate }}\n </div>\n } @else if (canSplitCells) {\n <div\n class=\"menu-item\"\n (click)=\"onSplitCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-split-cells\"></mat-icon>\n {{ 'NODER.LABEL.SPLIT_CELLS' | translate }}\n </div>\n }\n}\n@if (canRemoveRows || canRemoveColumns) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canRemoveRows) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveRows()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeRowsMessage }}\n </div>\n }\n @if (canRemoveColumns) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveColumns()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeColumnsMessage }}\n </div>\n }\n <div\n class=\"menu-item\"\n (click)=\"onRemoveTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeTableMessage }}\n </div>\n}\n", styles: [":host{position:absolute;border:1px solid transparent;border-radius:4px;box-shadow:0 2px 6px 2px #3c404326;overflow-y:auto;background:#fff;cursor:default;font-size:13px;margin:0;padding:6px 0}.menu-item{display:flex;flex-direction:row;align-items:center;cursor:pointer;min-height:20px;color:#202124;font-size:16px;letter-spacing:.2px;line-height:20px;padding:6px}.menu-item:hover{background-color:#0000001a}.mat-icon{margin-right:6px;width:20px;height:20px;font-size:20px}.menu-separator{-webkit-user-select:none;user-select:none}.menu-separator .menu-separator-top{padding:4px}.menu-separator .menu-separator-bottom{border-top:1px solid #dadce0;padding:4px}\n"], dependencies: [{ kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12822
13122
|
}
|
|
12823
13123
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableOverlayMenuComponent, decorators: [{
|
|
12824
13124
|
type: Component,
|
|
12825
|
-
args: [{ selector: 'app-nod-table-overlay-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"menu-item\"\n (click)=\"onInsertRowsAbove()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsAboveMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertRowsBelow()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsBelowMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsLeft()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsLeftMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsRight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsRightMessage }}\n</div>\n
|
|
12826
|
-
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }, { type: i6.TranslateService }], propDecorators: { selectionRange: [{
|
|
13125
|
+
args: [{ selector: 'app-nod-table-overlay-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"menu-item\"\n (click)=\"onInsertRowsAbove()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsAboveMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertRowsBelow()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsBelowMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsLeft()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsLeftMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsRight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsRightMessage }}\n</div>\n@if (canSplitCells || canMergeCells) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canMergeCells) {\n <div\n class=\"menu-item\"\n (click)=\"onMergeCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-merge-cells\"></mat-icon>\n {{ 'NODER.LABEL.MERGE_CELLS' | translate }}\n </div>\n } @else if (canSplitCells) {\n <div\n class=\"menu-item\"\n (click)=\"onSplitCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-split-cells\"></mat-icon>\n {{ 'NODER.LABEL.SPLIT_CELLS' | translate }}\n </div>\n }\n}\n@if (canRemoveRows || canRemoveColumns) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canRemoveRows) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveRows()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeRowsMessage }}\n </div>\n }\n @if (canRemoveColumns) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveColumns()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeColumnsMessage }}\n </div>\n }\n <div\n class=\"menu-item\"\n (click)=\"onRemoveTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeTableMessage }}\n </div>\n}\n", styles: [":host{position:absolute;border:1px solid transparent;border-radius:4px;box-shadow:0 2px 6px 2px #3c404326;overflow-y:auto;background:#fff;cursor:default;font-size:13px;margin:0;padding:6px 0}.menu-item{display:flex;flex-direction:row;align-items:center;cursor:pointer;min-height:20px;color:#202124;font-size:16px;letter-spacing:.2px;line-height:20px;padding:6px}.menu-item:hover{background-color:#0000001a}.mat-icon{margin-right:6px;width:20px;height:20px;font-size:20px}.menu-separator{-webkit-user-select:none;user-select:none}.menu-separator .menu-separator-top{padding:4px}.menu-separator .menu-separator-bottom{border-top:1px solid #dadce0;padding:4px}\n"] }]
|
|
13126
|
+
}], ctorParameters: () => [{ type: EditorService }, { type: OverlayService }, { type: i6.TranslateService }, { type: i1$1.MatDialog }], propDecorators: { selectionRange: [{
|
|
12827
13127
|
type: Input
|
|
12828
13128
|
}], targets: [{
|
|
12829
13129
|
type: Input
|
|
@@ -12831,6 +13131,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
12831
13131
|
type: Input
|
|
12832
13132
|
}], canRemoveColumns: [{
|
|
12833
13133
|
type: Input
|
|
13134
|
+
}], canMergeCells: [{
|
|
13135
|
+
type: Input
|
|
13136
|
+
}], canSplitCells: [{
|
|
13137
|
+
type: Input
|
|
12834
13138
|
}], tableInsertIndex: [{
|
|
12835
13139
|
type: Input
|
|
12836
13140
|
}], sessionId: [{
|
|
@@ -12877,19 +13181,49 @@ class TableSelection {
|
|
|
12877
13181
|
return;
|
|
12878
13182
|
}
|
|
12879
13183
|
const targets = this.getTargetsForMenuOverlay(selectionRange);
|
|
12880
|
-
const
|
|
12881
|
-
const
|
|
13184
|
+
const { canMergeCells, canSplitCells } = this.canMergeAndSplitCells(selectionRange, targets);
|
|
13185
|
+
const selectedRowsCount = targets.rowIndexes.endIndex - targets.rowIndexes.startIndex;
|
|
13186
|
+
const selectedColumnsCount = targets.cellIndexes.endIndex - targets.cellIndexes.startIndex;
|
|
13187
|
+
const canRemoveRows = selectedRowsCount < this.rowMatrix.length;
|
|
13188
|
+
const canRemoveColumns = selectedColumnsCount < this.rowMatrix[0].cells.length;
|
|
12882
13189
|
const data = {
|
|
12883
13190
|
selectionRange,
|
|
12884
13191
|
targets,
|
|
12885
13192
|
canRemoveRows,
|
|
12886
13193
|
canRemoveColumns,
|
|
13194
|
+
canSplitCells,
|
|
13195
|
+
canMergeCells,
|
|
12887
13196
|
tableInsertIndex: this.table.insertIndex,
|
|
12888
13197
|
sessionId: this.session.sessionId
|
|
12889
13198
|
};
|
|
12890
13199
|
this.overlayService.open(TableOverlayMenuComponent, data, event.x, event.y);
|
|
12891
13200
|
});
|
|
12892
13201
|
}
|
|
13202
|
+
canMergeAndSplitCells(selectionRange, targets) {
|
|
13203
|
+
const uniqueCells = new Set();
|
|
13204
|
+
for (let i = selectionRange.rowIndexes.startIndex; i <= selectionRange.rowIndexes.endIndex; i++) {
|
|
13205
|
+
for (let j = selectionRange.cellIndexes.startIndex; j <= selectionRange.cellIndexes.endIndex; j++) {
|
|
13206
|
+
const cellData = this.rowMatrix[i]?.cells[j];
|
|
13207
|
+
if (cellData && cellData.cell) {
|
|
13208
|
+
uniqueCells.add(cellData.cell);
|
|
13209
|
+
}
|
|
13210
|
+
}
|
|
13211
|
+
}
|
|
13212
|
+
if (uniqueCells.size <= 1) {
|
|
13213
|
+
return { canMergeCells: false, canSplitCells: true };
|
|
13214
|
+
}
|
|
13215
|
+
let selectedCellsArea = 0;
|
|
13216
|
+
uniqueCells.forEach(htmlCell => {
|
|
13217
|
+
const rowSpan = htmlCell.rowSpan || 1;
|
|
13218
|
+
const colSpan = htmlCell.colSpan || 1;
|
|
13219
|
+
selectedCellsArea += rowSpan * colSpan;
|
|
13220
|
+
});
|
|
13221
|
+
const targetArea = (targets.rowIndexes.endIndex - targets.rowIndexes.startIndex) * (targets.cellIndexes.endIndex - targets.cellIndexes.startIndex);
|
|
13222
|
+
if (selectedCellsArea !== targetArea) {
|
|
13223
|
+
return { canMergeCells: false, canSplitCells: false };
|
|
13224
|
+
}
|
|
13225
|
+
return { canMergeCells: true, canSplitCells: false };
|
|
13226
|
+
}
|
|
12893
13227
|
addTableMouseDownSubscriptions() {
|
|
12894
13228
|
this.tableMouseDown$ = fromEvent(this.tableEl, 'mousedown').subscribe((event) => {
|
|
12895
13229
|
if (this.session.isEdgeOrWithinEdge() && !this.regulatorService.mainSession.session.customComponents.edges.isEdit) {
|
|
@@ -13167,67 +13501,68 @@ class TableSelection {
|
|
|
13167
13501
|
if (!mergedRowCells.length) {
|
|
13168
13502
|
return startIndex;
|
|
13169
13503
|
}
|
|
13170
|
-
const
|
|
13504
|
+
const uniqHtmlCells = new Set(mergedRowCells.map(x => x.cell));
|
|
13171
13505
|
let index = startIndex;
|
|
13172
|
-
|
|
13506
|
+
while (index >= 0) {
|
|
13173
13507
|
const cells = this.rowMatrix[index].cells;
|
|
13174
|
-
if (!cells.some(
|
|
13175
|
-
index++;
|
|
13508
|
+
if (!cells.some(c => uniqHtmlCells.has(c.cell))) {
|
|
13176
13509
|
break;
|
|
13177
13510
|
}
|
|
13178
13511
|
index--;
|
|
13179
|
-
}
|
|
13180
|
-
return index;
|
|
13512
|
+
}
|
|
13513
|
+
return index + 1;
|
|
13181
13514
|
}
|
|
13182
13515
|
getTargetRowEndIndex(endIndex) {
|
|
13183
13516
|
const mergedRowCells = this.rowMatrix[endIndex].cells.filter(x => x.cell.rowSpan > 1 && x.componentRef.instance.cell.verticalMerge);
|
|
13184
13517
|
if (!mergedRowCells.length) {
|
|
13185
13518
|
return endIndex + 1;
|
|
13186
13519
|
}
|
|
13187
|
-
const
|
|
13520
|
+
const uniqHtmlCells = new Set(mergedRowCells.map(x => x.cell));
|
|
13188
13521
|
let index = endIndex;
|
|
13189
|
-
|
|
13190
|
-
const cells = this.rowMatrix[index]
|
|
13191
|
-
if (!cells
|
|
13522
|
+
while (index < this.rowMatrix.length) {
|
|
13523
|
+
const cells = this.rowMatrix[index].cells;
|
|
13524
|
+
if (!cells.some(c => uniqHtmlCells.has(c.cell))) {
|
|
13192
13525
|
break;
|
|
13193
13526
|
}
|
|
13194
13527
|
index++;
|
|
13195
|
-
}
|
|
13528
|
+
}
|
|
13196
13529
|
return index;
|
|
13197
13530
|
}
|
|
13198
13531
|
getTargetColumnStartIndex(rowStartIndex, rowEndIndex, cellStartIndex) {
|
|
13199
|
-
let
|
|
13532
|
+
let minColumnIndex = cellStartIndex;
|
|
13200
13533
|
for (let i = rowStartIndex; i <= rowEndIndex; i++) {
|
|
13534
|
+
const cellInfo = this.rowMatrix[i].cells[cellStartIndex];
|
|
13201
13535
|
if (this.rowMatrix[i].cells[cellStartIndex].cell.colSpan > 1) {
|
|
13202
13536
|
let cellIndex = cellStartIndex;
|
|
13203
|
-
|
|
13204
|
-
|
|
13537
|
+
while (cellIndex >= 0) {
|
|
13538
|
+
const currentCell = this.rowMatrix[i].cells[cellIndex];
|
|
13539
|
+
if (!currentCell || currentCell.cell !== cellInfo.cell) {
|
|
13205
13540
|
break;
|
|
13206
13541
|
}
|
|
13207
|
-
const newIndex = cellIndex;
|
|
13208
|
-
index = index < newIndex ? index : newIndex;
|
|
13209
13542
|
cellIndex--;
|
|
13210
|
-
}
|
|
13543
|
+
}
|
|
13544
|
+
minColumnIndex = Math.min(minColumnIndex, cellIndex + 1);
|
|
13211
13545
|
}
|
|
13212
13546
|
}
|
|
13213
|
-
return
|
|
13547
|
+
return minColumnIndex;
|
|
13214
13548
|
}
|
|
13215
13549
|
getTargetColumnEndIndex(rowStartIndex, rowEndIndex, cellEndIndex) {
|
|
13216
|
-
let
|
|
13550
|
+
let maxColumnIndex = cellEndIndex + 1;
|
|
13217
13551
|
for (let i = rowEndIndex; i >= rowStartIndex; i--) {
|
|
13552
|
+
const cellInfo = this.rowMatrix[i].cells[cellEndIndex];
|
|
13218
13553
|
if (this.rowMatrix[i].cells[cellEndIndex].cell.colSpan > 1) {
|
|
13219
13554
|
let cellIndex = cellEndIndex;
|
|
13220
|
-
|
|
13221
|
-
|
|
13555
|
+
while (cellIndex < this.rowMatrix[i].cells.length) {
|
|
13556
|
+
const currentCell = this.rowMatrix[i].cells[cellIndex];
|
|
13557
|
+
if (!currentCell || currentCell.cell !== cellInfo.cell) {
|
|
13222
13558
|
break;
|
|
13223
13559
|
}
|
|
13224
|
-
const newIndex = cellIndex + 1;
|
|
13225
|
-
index = index > newIndex ? index : newIndex;
|
|
13226
13560
|
cellIndex++;
|
|
13227
|
-
}
|
|
13561
|
+
}
|
|
13562
|
+
maxColumnIndex = Math.max(maxColumnIndex, cellIndex);
|
|
13228
13563
|
}
|
|
13229
13564
|
}
|
|
13230
|
-
return
|
|
13565
|
+
return maxColumnIndex;
|
|
13231
13566
|
}
|
|
13232
13567
|
}
|
|
13233
13568
|
|
|
@@ -13641,11 +13976,11 @@ class NoderTableComponent extends BaseNoderComponent {
|
|
|
13641
13976
|
}
|
|
13642
13977
|
}
|
|
13643
13978
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTableComponent, deps: [{ token: ComponentService }, { token: i0.ElementRef }, { token: OverlayService }, { token: RegulatorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13644
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NoderTableComponent, isStandalone: false, selector: "app-nod-table", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{position:relative}:host::ng-deep table{position:relative;border-collapse:collapse;background:transparent;empty-cells:show;border-spacing:0;overflow:visible;table-layout:fixed}:host::ng-deep td{position:relative;vertical-align:top;
|
|
13979
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NoderTableComponent, isStandalone: false, selector: "app-nod-table", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{position:relative}:host::ng-deep table{position:relative;border-collapse:collapse;background:transparent;empty-cells:show;border-spacing:0;overflow:visible;table-layout:fixed}:host::ng-deep td{position:relative;vertical-align:top;margin:0;padding:0;height:inherit}:host::ng-deep .hidden-cell{display:none;cursor:not-allowed}:host::ng-deep .resizer-border{position:absolute;border:solid .5px blue;z-index:1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13645
13980
|
}
|
|
13646
13981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTableComponent, decorators: [{
|
|
13647
13982
|
type: Component,
|
|
13648
|
-
args: [{ selector: 'app-nod-table', template: '', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{position:relative}:host::ng-deep table{position:relative;border-collapse:collapse;background:transparent;empty-cells:show;border-spacing:0;overflow:visible;table-layout:fixed}:host::ng-deep td{position:relative;vertical-align:top;
|
|
13983
|
+
args: [{ selector: 'app-nod-table', template: '', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{position:relative}:host::ng-deep table{position:relative;border-collapse:collapse;background:transparent;empty-cells:show;border-spacing:0;overflow:visible;table-layout:fixed}:host::ng-deep td{position:relative;vertical-align:top;margin:0;padding:0;height:inherit}:host::ng-deep .hidden-cell{display:none;cursor:not-allowed}:host::ng-deep .resizer-border{position:absolute;border:solid .5px blue;z-index:1}\n"] }]
|
|
13649
13984
|
}], ctorParameters: () => [{ type: ComponentService }, { type: i0.ElementRef }, { type: OverlayService }, { type: RegulatorService }] });
|
|
13650
13985
|
|
|
13651
13986
|
class RenderingHelper {
|
|
@@ -14259,6 +14594,9 @@ class CommandModel {
|
|
|
14259
14594
|
if (fields.insertText) {
|
|
14260
14595
|
fields.insertText = new InsertTextModel(fields.insertText);
|
|
14261
14596
|
}
|
|
14597
|
+
if (fields.mergeTableCells) {
|
|
14598
|
+
fields.mergeTableCells = new MergeTableCellsModel(fields.mergeTableCells);
|
|
14599
|
+
}
|
|
14262
14600
|
if (fields.moveRange) {
|
|
14263
14601
|
fields.moveRange = new MoveRangeModel(fields.moveRange);
|
|
14264
14602
|
}
|
|
@@ -14313,6 +14651,9 @@ class CommandModel {
|
|
|
14313
14651
|
if (fields.restoreWithParagraph) {
|
|
14314
14652
|
fields.restoreWithParagraph = new RestoreWithParagraphModel(fields.restoreWithParagraph);
|
|
14315
14653
|
}
|
|
14654
|
+
if (fields.splitTableCells) {
|
|
14655
|
+
fields.splitTableCells = new SplitTableCellsModel(fields.splitTableCells);
|
|
14656
|
+
}
|
|
14316
14657
|
Object.assign(this, fields);
|
|
14317
14658
|
}
|
|
14318
14659
|
}
|
|
@@ -14387,6 +14728,14 @@ class SaveCommandsHelper {
|
|
|
14387
14728
|
const insertTableColumns = new InsertTableColumnsModel({ count: columnsCount, inheritIndex, insertIndex, targetIndex });
|
|
14388
14729
|
return new CommandModel({ commandType: CommandType.InsertTableColumns, insertTableColumns, targets });
|
|
14389
14730
|
}
|
|
14731
|
+
static getMergeTableCellsCommand(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount, targets) {
|
|
14732
|
+
const mergeTableCells = new MergeTableCellsModel({ insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount });
|
|
14733
|
+
return new CommandModel({ commandType: CommandType.MergeTableCells, mergeTableCells, targets });
|
|
14734
|
+
}
|
|
14735
|
+
static getSplitTableCellsCommand(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, targets) {
|
|
14736
|
+
const splitTableCells = new SplitTableCellsModel({ insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount });
|
|
14737
|
+
return new CommandModel({ commandType: CommandType.SplitTableCells, splitTableCells, targets });
|
|
14738
|
+
}
|
|
14390
14739
|
static getInsertTableRowsCommand(rowsCount, inheritIndex, insertIndex, targetIndex, targets) {
|
|
14391
14740
|
const insertTableRows = new InsertTableRowsModel({ count: rowsCount, inheritIndex, insertIndex, targetIndex });
|
|
14392
14741
|
return new CommandModel({ commandType: CommandType.InsertTableRows, insertTableRows, targets });
|
|
@@ -15322,7 +15671,7 @@ class Editor {
|
|
|
15322
15671
|
this.session.applyToolbarStyles();
|
|
15323
15672
|
this.onSetCommentsVisibility(!!this.model.comments.length);
|
|
15324
15673
|
this.search = new Search(editorService);
|
|
15325
|
-
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), 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(), this.insertContentsSubscription(), this.insertNextElementSubscription());
|
|
15674
|
+
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.replaceByCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.mergeTableCellsSubscription(), this.splitTableCellsSubscription(), 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(), this.insertContentsSubscription(), this.insertNextElementSubscription());
|
|
15326
15675
|
}
|
|
15327
15676
|
destroy() {
|
|
15328
15677
|
this.subscriptions.forEach(s => s?.unsubscribe());
|
|
@@ -16091,6 +16440,16 @@ class Editor {
|
|
|
16091
16440
|
this.session.replaceByContents(operation.startIndex, operation.count, deepCopy);
|
|
16092
16441
|
command = SaveCommandsHelper.getReplaceByContentsModel(operation, this.targets);
|
|
16093
16442
|
}
|
|
16443
|
+
else if (operation instanceof MergeTableCellsModel) {
|
|
16444
|
+
this.session.mergeTableCells(operation.insertIndex, operation.rowStartIndex, operation.rowsCount, operation.columnStartIndex, operation.columnCount);
|
|
16445
|
+
this.changedTableSize(operation.insertIndex, this.session.sessionId);
|
|
16446
|
+
command = SaveCommandsHelper.getMergeTableCellsCommand(operation.insertIndex, operation.rowStartIndex, operation.rowsCount, operation.columnStartIndex, operation.columnCount, this.targets);
|
|
16447
|
+
}
|
|
16448
|
+
else if (operation instanceof SplitTableCellsModel) {
|
|
16449
|
+
this.session.splitTableCells(operation.insertIndex, operation.rowIndex, operation.columnIndex, operation.targetRowsCount, operation.targetColumnsCount);
|
|
16450
|
+
this.changedTableSize(operation.insertIndex, this.session.sessionId);
|
|
16451
|
+
command = SaveCommandsHelper.getSplitTableCellsCommand(operation.insertIndex, operation.rowIndex, operation.columnIndex, operation.targetRowsCount, operation.targetColumnsCount, this.targets);
|
|
16452
|
+
}
|
|
16094
16453
|
else {
|
|
16095
16454
|
throw new Error('Undo/redo is not implemented for the Operation');
|
|
16096
16455
|
}
|
|
@@ -16228,7 +16587,7 @@ class Editor {
|
|
|
16228
16587
|
this.commandsService.createCommand(SaveCommandsHelper.getInsertContentsCommand(redoModel, this.targets));
|
|
16229
16588
|
}
|
|
16230
16589
|
saveReplaceByContentsToHistory(redoModel) {
|
|
16231
|
-
const undoSlice = ContentsOperationsHelper.
|
|
16590
|
+
const undoSlice = ContentsOperationsHelper.getRelativeContentSlice(this.session.model, this.session.generalProperties.numberings, redoModel.startIndex, redoModel.count);
|
|
16232
16591
|
const undoModel = new ReplaceByContentsModel({
|
|
16233
16592
|
startIndex: redoModel.startIndex,
|
|
16234
16593
|
contents: undoSlice,
|
|
@@ -16391,6 +16750,9 @@ class Editor {
|
|
|
16391
16750
|
this.showInsertOverlay(text);
|
|
16392
16751
|
}
|
|
16393
16752
|
onCut(event) {
|
|
16753
|
+
if (this.editorService.isViewOnly) {
|
|
16754
|
+
return;
|
|
16755
|
+
}
|
|
16394
16756
|
const text = this.getSelectedText();
|
|
16395
16757
|
const slice = this.getSelectedSlice();
|
|
16396
16758
|
if (!text && !slice) {
|
|
@@ -16402,6 +16764,9 @@ class Editor {
|
|
|
16402
16764
|
this.editorService.setClipboardData(text);
|
|
16403
16765
|
}
|
|
16404
16766
|
onCopy(event) {
|
|
16767
|
+
if (this.editorService.isViewOnly) {
|
|
16768
|
+
return;
|
|
16769
|
+
}
|
|
16405
16770
|
const text = this.getSelectedText();
|
|
16406
16771
|
const slice = this.getSelectedSlice();
|
|
16407
16772
|
if (!text && !slice) {
|
|
@@ -16411,6 +16776,9 @@ class Editor {
|
|
|
16411
16776
|
this.editorService.setClipboardData(text);
|
|
16412
16777
|
}
|
|
16413
16778
|
onPaste(event) {
|
|
16779
|
+
if (this.editorService.isViewOnly) {
|
|
16780
|
+
return;
|
|
16781
|
+
}
|
|
16414
16782
|
const { text, sliceData } = this.clipboardHandler.readEvent(event);
|
|
16415
16783
|
if (sliceData) {
|
|
16416
16784
|
this.pasteData(text, sliceData);
|
|
@@ -16968,6 +17336,28 @@ class Editor {
|
|
|
16968
17336
|
this.changedTableSize(insertIndex, sessionId);
|
|
16969
17337
|
this.onContentChange();
|
|
16970
17338
|
}
|
|
17339
|
+
mergeTableCells(insertIndex, rowStartIndex, rowEndIndex, columnStartIndex, columnEndIndex, sessionId) {
|
|
17340
|
+
this.regulatorService.setCustomSessionAsCurrent(sessionId);
|
|
17341
|
+
const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
|
|
17342
|
+
this.selection.placeCursor(beforeTable);
|
|
17343
|
+
const rowsCount = rowEndIndex - rowStartIndex;
|
|
17344
|
+
const columnsCount = columnEndIndex - columnStartIndex;
|
|
17345
|
+
this.history.pushMergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount);
|
|
17346
|
+
this.commandsService.createCommand(SaveCommandsHelper.getMergeTableCellsCommand(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount, this.targets));
|
|
17347
|
+
this.session.mergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount);
|
|
17348
|
+
this.changedTableSize(insertIndex, sessionId);
|
|
17349
|
+
this.onContentChange();
|
|
17350
|
+
}
|
|
17351
|
+
splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, sessionId) {
|
|
17352
|
+
this.regulatorService.setCustomSessionAsCurrent(sessionId);
|
|
17353
|
+
const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
|
|
17354
|
+
this.selection.placeCursor(beforeTable);
|
|
17355
|
+
this.history.pushSplitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
|
|
17356
|
+
this.commandsService.createCommand(SaveCommandsHelper.getSplitTableCellsCommand(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, this.targets));
|
|
17357
|
+
this.session.splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
|
|
17358
|
+
this.changedTableSize(insertIndex, sessionId);
|
|
17359
|
+
this.onContentChange();
|
|
17360
|
+
}
|
|
16971
17361
|
removeTableRows(insertIndex, startIndex, endIndex, sessionId) {
|
|
16972
17362
|
this.regulatorService.setCustomSessionAsCurrent(sessionId);
|
|
16973
17363
|
const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
|
|
@@ -17265,6 +17655,16 @@ class Editor {
|
|
|
17265
17655
|
this.insertTableColumns(data.insertIndex, data.columnsCount, data.targetIndex, data.inheritIndex, data.sessionId);
|
|
17266
17656
|
});
|
|
17267
17657
|
}
|
|
17658
|
+
mergeTableCellsSubscription() {
|
|
17659
|
+
return this.editorService.mergeTableCells$.subscribe(data => {
|
|
17660
|
+
this.mergeTableCells(data.insertIndex, data.rowStartIndex, data.rowEndIndex, data.columnStartIndex, data.columnEndIndex, data.sessionId);
|
|
17661
|
+
});
|
|
17662
|
+
}
|
|
17663
|
+
splitTableCellsSubscription() {
|
|
17664
|
+
return this.editorService.splitTableCells$.subscribe(data => {
|
|
17665
|
+
this.splitTableCells(data.insertIndex, data.rowIndex, data.columnIndex, data.targetRowsCount, data.targetColumnsCount, data.sessionId);
|
|
17666
|
+
});
|
|
17667
|
+
}
|
|
17268
17668
|
removeTableRowsSubscription() {
|
|
17269
17669
|
return this.editorService.removeTableRows$.subscribe(data => {
|
|
17270
17670
|
this.removeTableRows(data.insertIndex, data.startIndex, data.endIndex, data.sessionId);
|
|
@@ -17346,7 +17746,7 @@ class Editor {
|
|
|
17346
17746
|
return this.editorService.print$.subscribe(() => this.onPrint());
|
|
17347
17747
|
}
|
|
17348
17748
|
cutSelectedSubscription() {
|
|
17349
|
-
return this.editorService.cutSelected$.subscribe(() => {
|
|
17749
|
+
return this.editorService.cutSelected$.pipe(filter(() => !this.editorService.isViewOnly)).subscribe(() => {
|
|
17350
17750
|
const text = this.getSelectedText();
|
|
17351
17751
|
const slice = this.getSelectedSlice();
|
|
17352
17752
|
if (!text && !slice) {
|
|
@@ -17359,7 +17759,7 @@ class Editor {
|
|
|
17359
17759
|
});
|
|
17360
17760
|
}
|
|
17361
17761
|
copySelectedSubscription() {
|
|
17362
|
-
return this.editorService.copySelected$.subscribe(() => {
|
|
17762
|
+
return this.editorService.copySelected$.pipe(filter(() => !this.editorService.isViewOnly)).subscribe(() => {
|
|
17363
17763
|
const text = this.getSelectedText();
|
|
17364
17764
|
const slice = this.getSelectedSlice();
|
|
17365
17765
|
if (!text && !slice) {
|
|
@@ -17371,7 +17771,7 @@ class Editor {
|
|
|
17371
17771
|
}
|
|
17372
17772
|
pasteFromClipboardSubscription() {
|
|
17373
17773
|
return this.editorService.pasteFromClipboard$
|
|
17374
|
-
.pipe(switchMap(() => from(this.clipboardHandler.readAsync())))
|
|
17774
|
+
.pipe(filter(() => !this.editorService.isViewOnly), switchMap(() => from(this.clipboardHandler.readAsync())))
|
|
17375
17775
|
.subscribe(({ text, sliceData }) => {
|
|
17376
17776
|
this.pasteData(text, sliceData);
|
|
17377
17777
|
});
|
|
@@ -18916,11 +19316,11 @@ class MenuDropdownsComponent extends BaseToolbarComponent {
|
|
|
18916
19316
|
});
|
|
18917
19317
|
}
|
|
18918
19318
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: MenuDropdownsComponent, deps: [{ token: CustomIconService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18919
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: MenuDropdownsComponent, isStandalone: false, selector: "app-nod-menu-dropdowns", inputs: { showFile: { classPropertyName: "showFile", publicName: "showFile", isSignal: false, isRequired: false, transformFunction: null }, showEdit: { classPropertyName: "showEdit", publicName: "showEdit", isSignal: false, isRequired: false, transformFunction: null }, showInsert: { classPropertyName: "showInsert", publicName: "showInsert", isSignal: false, isRequired: false, transformFunction: null }, showLayout: { classPropertyName: "showLayout", publicName: "showLayout", isSignal: false, isRequired: false, transformFunction: null }, showFormat: { classPropertyName: "showFormat", publicName: "showFormat", isSignal: false, isRequired: false, transformFunction: null }, isTemplate: { classPropertyName: "isTemplate", publicName: "isTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openFileFromDisk: "openFileFromDisk", saveAs: "saveAs", saveAsTemplate: "saveAsTemplate", saveAsDocument: "saveAsDocument", downloadPdf: "downloadPdf", insertPageBreak: "insertPageBreak", createDocument: "createDocument", pageSetup: "pageSetup", rename: "rename", delete: "delete", openEditMenu: "openEditMenu", cutSelected: "cutSelected", copySelected: "copySelected", pasteClipboardData: "pasteClipboardData", selectAll: "selectAll", removeSelected: "removeSelected" }, viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n *ngIf=\"showFile\"\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FILE' | translate }}\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"createDocument.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NEW' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-page-setup\"\n mat-menu-item\n (click)=\"pageSetup.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-system-file\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"openFileFromDisk.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.OPEN_FROM' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n *ngIf=\"saveAs.observed\"\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS' | translate }}</span>\n </div>\n </button>\n @if (saveAsTemplate.observed && !isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-template\"\n mat-menu-item\n (click)=\"saveAsTemplate.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_TEMPLATE' | translate }}</span>\n </div>\n </button>\n }\n @if (saveAsDocument.observed && isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-document\"\n mat-menu-item\n (click)=\"saveAsDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_DOCUMENT' | translate }}</span>\n </div>\n </button>\n }\n <button\n *ngIf=\"downloadPdf.observed\"\n id=\"menu-dropdowns-menu-item-download-pdf\"\n mat-menu-item\n (click)=\"downloadPdf.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DOWNLOAD_PDF' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"rename.observed\"\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RENAME' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"print.observed\"\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PRINT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n *ngIf=\"delete.observed\"\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showEdit\"\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n {{ 'NODER.LABEL.EDIT' | translate }}\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"undo.observed\"\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n *ngIf=\"redo.observed\"\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.REDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"cutSelected.observed\"\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CUT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n *ngIf=\"copySelected.observed\"\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.COPY' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n *ngIf=\"pasteClipboardData.observed\"\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"!data.clipboardData?.length\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PASTE' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"selectAll.observed\"\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SELECT_ALL' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n *ngIf=\"removeSelected.observed\"\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showInsert && !data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.INSERT' | translate }}\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertImage.observed\"\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.IMAGE' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n {{ 'NODER.LABEL.TABLE' | translate }}\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"insertLink.observed\"\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LINK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.nameId }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.nameTranslate | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADER' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.FOOTER' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"showLayout && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.LAYOUT' | translate }}\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertPageBreak.observed\"\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_BREAK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showFormat && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FORMAT' | translate }}\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ALIGN' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LEFT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CENTER' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RIGHT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLETS_AND_NUMBERING' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLET_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NUMBERED_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.TEXT' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BOLD' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ITALIC' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDERLINED' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n </mat-menu>\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</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}button.mat-mdc-button{letter-spacing:0}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\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: 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: "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: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19319
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: MenuDropdownsComponent, isStandalone: false, selector: "app-nod-menu-dropdowns", inputs: { showFile: { classPropertyName: "showFile", publicName: "showFile", isSignal: false, isRequired: false, transformFunction: null }, showEdit: { classPropertyName: "showEdit", publicName: "showEdit", isSignal: false, isRequired: false, transformFunction: null }, showInsert: { classPropertyName: "showInsert", publicName: "showInsert", isSignal: false, isRequired: false, transformFunction: null }, showLayout: { classPropertyName: "showLayout", publicName: "showLayout", isSignal: false, isRequired: false, transformFunction: null }, showFormat: { classPropertyName: "showFormat", publicName: "showFormat", isSignal: false, isRequired: false, transformFunction: null }, isTemplate: { classPropertyName: "isTemplate", publicName: "isTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openFileFromDisk: "openFileFromDisk", saveAs: "saveAs", saveAsTemplate: "saveAsTemplate", saveAsDocument: "saveAsDocument", downloadPdf: "downloadPdf", insertPageBreak: "insertPageBreak", createDocument: "createDocument", pageSetup: "pageSetup", rename: "rename", delete: "delete", openEditMenu: "openEditMenu", cutSelected: "cutSelected", copySelected: "copySelected", pasteClipboardData: "pasteClipboardData", selectAll: "selectAll", removeSelected: "removeSelected" }, viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n *ngIf=\"showFile\"\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FILE' | translate }}\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"createDocument.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NEW' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-page-setup\"\n mat-menu-item\n (click)=\"pageSetup.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-system-file\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"openFileFromDisk.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.OPEN_FROM' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n *ngIf=\"saveAs.observed\"\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS' | translate }}</span>\n </div>\n </button>\n @if (saveAsTemplate.observed && !isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-template\"\n mat-menu-item\n (click)=\"saveAsTemplate.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_TEMPLATE' | translate }}</span>\n </div>\n </button>\n }\n @if (saveAsDocument.observed && isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-document\"\n mat-menu-item\n (click)=\"saveAsDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_DOCUMENT' | translate }}</span>\n </div>\n </button>\n }\n <button\n *ngIf=\"downloadPdf.observed\"\n id=\"menu-dropdowns-menu-item-download-pdf\"\n mat-menu-item\n (click)=\"downloadPdf.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DOWNLOAD_PDF' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"rename.observed\"\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RENAME' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"print.observed\"\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PRINT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n *ngIf=\"delete.observed\"\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showEdit\"\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n {{ 'NODER.LABEL.EDIT' | translate }}\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"undo.observed\"\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n *ngIf=\"redo.observed\"\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.REDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"cutSelected.observed\"\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection || editorService.isViewOnly\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CUT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n *ngIf=\"copySelected.observed\"\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection || editorService.isViewOnly\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.COPY' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n *ngIf=\"pasteClipboardData.observed\"\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"editorService.isViewOnly\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PASTE' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"selectAll.observed\"\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SELECT_ALL' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n *ngIf=\"removeSelected.observed\"\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showInsert && !data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.INSERT' | translate }}\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertImage.observed\"\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.IMAGE' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n {{ 'NODER.LABEL.TABLE' | translate }}\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"insertLink.observed\"\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LINK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.nameId }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.nameTranslate | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADER' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.FOOTER' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"showLayout && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.LAYOUT' | translate }}\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertPageBreak.observed\"\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_BREAK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showFormat && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FORMAT' | translate }}\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ALIGN' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LEFT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CENTER' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RIGHT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLETS_AND_NUMBERING' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLET_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NUMBERED_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.TEXT' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BOLD' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ITALIC' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDERLINED' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n @if (showInsertTableMenu) {\n <app-nod-insert-table (selectSizes)=\"insertTable.emit($event)\" />\n }\n </mat-menu>\n</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}button.mat-mdc-button{letter-spacing:0}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\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: 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: "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: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18920
19320
|
}
|
|
18921
19321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: MenuDropdownsComponent, decorators: [{
|
|
18922
19322
|
type: Component,
|
|
18923
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-menu-dropdowns', standalone: false, template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n *ngIf=\"showFile\"\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FILE' | translate }}\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"createDocument.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NEW' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-page-setup\"\n mat-menu-item\n (click)=\"pageSetup.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-system-file\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"openFileFromDisk.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.OPEN_FROM' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n *ngIf=\"saveAs.observed\"\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS' | translate }}</span>\n </div>\n </button>\n @if (saveAsTemplate.observed && !isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-template\"\n mat-menu-item\n (click)=\"saveAsTemplate.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_TEMPLATE' | translate }}</span>\n </div>\n </button>\n }\n @if (saveAsDocument.observed && isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-document\"\n mat-menu-item\n (click)=\"saveAsDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_DOCUMENT' | translate }}</span>\n </div>\n </button>\n }\n <button\n *ngIf=\"downloadPdf.observed\"\n id=\"menu-dropdowns-menu-item-download-pdf\"\n mat-menu-item\n (click)=\"downloadPdf.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DOWNLOAD_PDF' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"rename.observed\"\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RENAME' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"print.observed\"\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PRINT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n *ngIf=\"delete.observed\"\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showEdit\"\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n {{ 'NODER.LABEL.EDIT' | translate }}\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"undo.observed\"\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n *ngIf=\"redo.observed\"\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.REDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"cutSelected.observed\"\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CUT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n *ngIf=\"copySelected.observed\"\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.COPY' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n *ngIf=\"pasteClipboardData.observed\"\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"!data.clipboardData?.length\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PASTE' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"selectAll.observed\"\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SELECT_ALL' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n *ngIf=\"removeSelected.observed\"\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showInsert && !data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.INSERT' | translate }}\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertImage.observed\"\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.IMAGE' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n {{ 'NODER.LABEL.TABLE' | translate }}\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"insertLink.observed\"\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LINK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.nameId }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.nameTranslate | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADER' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.FOOTER' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"showLayout && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.LAYOUT' | translate }}\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertPageBreak.observed\"\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_BREAK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showFormat && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FORMAT' | translate }}\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ALIGN' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LEFT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CENTER' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RIGHT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLETS_AND_NUMBERING' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLET_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NUMBERED_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.TEXT' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BOLD' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ITALIC' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDERLINED' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n </mat-menu>\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</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}button.mat-mdc-button{letter-spacing:0}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\n"] }]
|
|
19323
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-menu-dropdowns', standalone: false, template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n *ngIf=\"showFile\"\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FILE' | translate }}\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"createDocument.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NEW' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-page-setup\"\n mat-menu-item\n (click)=\"pageSetup.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-system-file\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"openFileFromDisk.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.OPEN_FROM' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n *ngIf=\"saveAs.observed\"\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS' | translate }}</span>\n </div>\n </button>\n @if (saveAsTemplate.observed && !isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-template\"\n mat-menu-item\n (click)=\"saveAsTemplate.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_TEMPLATE' | translate }}</span>\n </div>\n </button>\n }\n @if (saveAsDocument.observed && isTemplate()) {\n <button\n id=\"menu-dropdowns-menu-item-save-as-document\"\n mat-menu-item\n (click)=\"saveAsDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SAVE_AS_DOCUMENT' | translate }}</span>\n </div>\n </button>\n }\n <button\n *ngIf=\"downloadPdf.observed\"\n id=\"menu-dropdowns-menu-item-download-pdf\"\n mat-menu-item\n (click)=\"downloadPdf.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DOWNLOAD_PDF' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"rename.observed\"\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RENAME' | translate }}</span>\n </div>\n </button>\n <button\n *ngIf=\"print.observed\"\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PRINT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n *ngIf=\"delete.observed\"\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showEdit\"\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n {{ 'NODER.LABEL.EDIT' | translate }}\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"undo.observed\"\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n *ngIf=\"redo.observed\"\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.REDO' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"cutSelected.observed\"\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection || editorService.isViewOnly\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CUT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n *ngIf=\"copySelected.observed\"\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection || editorService.isViewOnly\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.COPY' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n *ngIf=\"pasteClipboardData.observed\"\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"editorService.isViewOnly\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PASTE' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"selectAll.observed\"\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.SELECT_ALL' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n *ngIf=\"removeSelected.observed\"\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.DELETE' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showInsert && !data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.INSERT' | translate }}\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertImage.observed\"\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.IMAGE' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n {{ 'NODER.LABEL.TABLE' | translate }}\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"insertLink.observed\"\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LINK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.nameId }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.nameTranslate | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADER' | translate }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.FOOTER' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"showLayout && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.LAYOUT' | translate }}\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertPageBreak.observed\"\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.PAGE_BREAK' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showFormat && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n {{ 'NODER.LABEL.FORMAT' | translate }}\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ALIGN' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.LEFT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.CENTER' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.RIGHT' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLETS_AND_NUMBERING' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BULLET_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.NUMBERED_LIST_MENU' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.TEXT' | translate }}</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.BOLD' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.ITALIC' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.UNDERLINED' | translate }}</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">{{ 'NODER.LABEL.HEADERS_AND_FOOTERS' | translate }}</span>\n </div>\n </button>\n </mat-menu>\n <mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n @if (showInsertTableMenu) {\n <app-nod-insert-table (selectSizes)=\"insertTable.emit($event)\" />\n }\n </mat-menu>\n</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}button.mat-mdc-button{letter-spacing:0}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\n"] }]
|
|
18924
19324
|
}], ctorParameters: () => [{ type: CustomIconService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: EditorService }], propDecorators: { showFile: [{
|
|
18925
19325
|
type: Input
|
|
18926
19326
|
}], showEdit: [{
|