@talrace/ngx-noder 19.0.34 → 19.0.35
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/fesm2022/talrace-ngx-noder.mjs +11 -11
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-toolbar/components/base-toolbar.component.d.ts +0 -2
- package/lib/editor/content/display-data/line-info.model.d.ts +1 -0
- package/lib/editor/content/display-data/text-line-info.d.ts +1 -0
- package/package.json +1 -1
|
@@ -41,12 +41,12 @@ import { MatExpansionModule } from '@angular/material/expansion';
|
|
|
41
41
|
import * as i2$1 from '@angular/platform-browser';
|
|
42
42
|
import * as i2$2 from '@angular/material/autocomplete';
|
|
43
43
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
44
|
-
import * as i3$3 from '@angular/material/button-toggle';
|
|
45
|
-
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
46
44
|
import * as i2$3 from '@angular/material/divider';
|
|
47
45
|
import { MatDividerModule } from '@angular/material/divider';
|
|
48
46
|
import * as i5$3 from 'ngx-colors';
|
|
49
47
|
import { NgxColorsModule } from 'ngx-colors';
|
|
48
|
+
import * as i3$3 from '@angular/material/button-toggle';
|
|
49
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
50
50
|
import * as i10$1 from '@angular/material/checkbox';
|
|
51
51
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
52
52
|
import * as i12 from '@angular/material/radio';
|
|
@@ -8563,6 +8563,7 @@ class Editor {
|
|
|
8563
8563
|
this.initResizeListener();
|
|
8564
8564
|
this.focus();
|
|
8565
8565
|
this.session.applyToolbarStyles();
|
|
8566
|
+
this.onSetCommentsVisibility(!!this.model.comments.length);
|
|
8566
8567
|
this.search = new Search(editorService);
|
|
8567
8568
|
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.clipboardDataSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.replaceByCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.insertTableRowsSubscription(), this.insertTableSubscription(), this.updateTableBorderStyleSubscription(), this.updateTableBorderWidthSubscription(), this.updateTableBordersSubscription(), this.insertTextSubscription(), this.pasteFromClipboardSubscription(), this.printSubscription(), this.redoSubscription(), this.removeLeftSubscription(), this.removeNumberingsSubscription(), this.removeRightSubscription(), this.removeSelectedSubscription(), this.removeTableColumnsSubscription(), this.removeTableRowsSubscription(), this.removeTableSubscription(), this.rerenderSubscription(), this.resizeTableColumnsSubscription(), ...this.searchOptionSubscriptions(), ...this.replaceSubscription(), this.grammarReplaceSubscription(), this.ignoreGrammarErrorSubscription(), this.selectAllSubscription(), this.setImageStyleSubscription(), this.setNumberingTemplateTypeSubscription(), this.setParagraphStylesSubscription(), this.setTextStylesSubscription(), this.undoSubscription(), this.updateEdgeSubscription(), this.viewOnlyModeSubscription(), this.applyPageFormatSubscription(), this.applyRightMarginPageFormatSubscription(), this.applyLeftMarginPageFormatSubscription(), this.insertPageFormatSubscription(), this.applyDocumentPageFormatSubscription(), this.dragMoveSubscription(), this.dragDropSubscription(), this.applyFirstLinePositionSubscription(), this.applyRightIndentParagraphSubscription(), this.applyLeftIndentParagraphSubscription(), this.applyTabSettingsSubscription(), this.commandCreatedForEdges(), ...this.commentCreationSubscriptions(), this.removeCommentSubscription(), this.rerenderCommentsSubscription(), this.selectCommentSubscription(), this.setComentsVisibilitySubscription());
|
|
8568
8569
|
}
|
|
@@ -10730,6 +10731,7 @@ class DisplayTokenHelper {
|
|
|
10730
10731
|
}
|
|
10731
10732
|
info.width += wrapToken.width;
|
|
10732
10733
|
}
|
|
10734
|
+
info.maxAscent = maxAscent;
|
|
10733
10735
|
info.height = maxAscent + maxDescent;
|
|
10734
10736
|
info.offsetAfter = info.height * (info.lineSpacing - 1);
|
|
10735
10737
|
return info;
|
|
@@ -15125,14 +15127,17 @@ class HighlightLayer {
|
|
|
15125
15127
|
return this.renderHighlight(this.getMarkerStyle(height, width, top, left), cssClass);
|
|
15126
15128
|
}
|
|
15127
15129
|
drawCustomElementHighlight(elementInfo, cssClass, screenParentRange) {
|
|
15128
|
-
const
|
|
15130
|
+
const lineIndex = elementInfo.parentRange.start.row;
|
|
15131
|
+
const paragraph = this.session.displayData.paragraphs[lineIndex];
|
|
15132
|
+
const lineInfo = paragraph.paragraphSettings.textLinesInfo.find(x => x.screenLine === lineIndex);
|
|
15133
|
+
const elementIndex = paragraph.startIndex + elementInfo.parentRange.start.column;
|
|
15129
15134
|
const element = this.session.customComponents.customElements.find(x => x.instance.content.insertIndex === elementIndex);
|
|
15130
15135
|
if (!element) {
|
|
15131
15136
|
return;
|
|
15132
15137
|
}
|
|
15133
15138
|
const top = this.getTop(screenParentRange.start.row);
|
|
15134
15139
|
const info = this.getRangeInfo(this.session, screenParentRange);
|
|
15135
|
-
this.renderHighlight(this.getMarkerStyle(elementInfo.location.height, elementInfo.location.width, top + elementInfo.location.top, info.leftPos + elementInfo.location.left), cssClass);
|
|
15140
|
+
this.renderHighlight(this.getMarkerStyle(elementInfo.location.height, elementInfo.location.width, top + lineInfo.maxAscent - elementInfo.location.height + elementInfo.location.top, info.leftPos + elementInfo.location.left), cssClass);
|
|
15136
15141
|
}
|
|
15137
15142
|
getRangeInfo(session, range) {
|
|
15138
15143
|
const start = range.start;
|
|
@@ -18055,7 +18060,6 @@ class BaseToolbarComponent extends DestroyComponent {
|
|
|
18055
18060
|
this.updateTableBorderStyle = new EventEmitter();
|
|
18056
18061
|
this.updateTableBorderWidth = new EventEmitter();
|
|
18057
18062
|
this.updateTableBorders = new EventEmitter();
|
|
18058
|
-
this.commentsVisibile = false;
|
|
18059
18063
|
this.elements = this.injector.get(EXTERNAL_ELEMENT_SERVICE).elements;
|
|
18060
18064
|
this.customIconService.register();
|
|
18061
18065
|
this.historyInfoSubscription();
|
|
@@ -18073,10 +18077,6 @@ class BaseToolbarComponent extends DestroyComponent {
|
|
|
18073
18077
|
const italic = !this.styles.italic;
|
|
18074
18078
|
this.checkFontLoadedAndApplyStyle(new TextStyleModel({ italic }));
|
|
18075
18079
|
}
|
|
18076
|
-
onSwitchCommentsVisibility() {
|
|
18077
|
-
this.commentsVisibile = !this.commentsVisibile;
|
|
18078
|
-
this.editorService.setCommentsVisibility(this.commentsVisibile);
|
|
18079
|
-
}
|
|
18080
18080
|
async onCreateElement(model) {
|
|
18081
18081
|
const data = await model.factoryMethod();
|
|
18082
18082
|
const element = new ElementDataModel(data.id, data.guid, data.type);
|
|
@@ -18722,11 +18722,11 @@ class ToolbarActionsComponent extends BaseToolbarComponent {
|
|
|
18722
18722
|
});
|
|
18723
18723
|
}
|
|
18724
18724
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CustomIconService }, { token: i0.Injector }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18725
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ToolbarActionsComponent, isStandalone: false, selector: "app-nod-toolbar-actions", viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<
|
|
18725
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ToolbarActionsComponent, isStandalone: false, selector: "app-nod-toolbar-actions", viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FontComponent, selector: "app-nod-font", inputs: ["isDisabled", "styles"], outputs: ["selectFont"] }, { kind: "component", type: FontSizeComponent, selector: "app-nod-font-size", inputs: ["isDisabled", "fontSize"], outputs: ["selectFontSize"] }, { kind: "component", type: InsertTableComponent, selector: "app-nod-insert-table", outputs: ["selectSizes"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i5$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TableBordersComponent, selector: "app-nod-table-borders", inputs: ["isDisabled"], outputs: ["updateTableBorders"] }, { kind: "component", type: TableBorderStyleComponent, selector: "app-nod-table-border-style", inputs: ["isDisabled"], outputs: ["updateTableBorderStyle"] }, { kind: "component", type: TableBorderWidthComponent, selector: "app-nod-table-border-width", inputs: ["isDisabled"], outputs: ["updateTableBorderWidth"] }, { kind: "component", type: FontStyleComponent, selector: "app-nod-font-style", inputs: ["isDisabled", "bold", "italic", "underline", "fontColor", "highlightColor"], outputs: ["toggleBold", "toggleItalic", "toggleUnderline", "selectFontColor", "selectHighlightColor"] }, { kind: "component", type: FormatComponent, selector: "app-nod-format", inputs: ["isDisabled", "alignment"], outputs: ["selectAlignment"] }, { kind: "component", type: NumberingComponent, selector: "app-nod-numbering", inputs: ["isDisabled", "selectedNumberingType", "selectedNumberingTemplate"], outputs: ["selectNumberingTemplate", "removeNumberings"] }, { kind: "component", type: PrintComponent, selector: "app-nod-print", outputs: ["print"] }, { kind: "component", type: UndoRedoComponent, selector: "app-nod-undo-redo", inputs: ["canUndo", "canRedo"], outputs: ["undo", "redo"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18726
18726
|
}
|
|
18727
18727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, decorators: [{
|
|
18728
18728
|
type: Component,
|
|
18729
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-toolbar-actions', standalone: false, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<
|
|
18729
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-toolbar-actions', standalone: false, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"] }]
|
|
18730
18730
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: CustomIconService }, { type: i0.Injector }, { type: EditorService }], propDecorators: { tableInsertMenu: [{
|
|
18731
18731
|
type: ViewChild,
|
|
18732
18732
|
args: ['tableInsert']
|