@talrace/ngx-noder 0.0.44 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n/noder.en.json +7 -1
- package/assets/i18n/noder.es.json +7 -1
- package/assets/i18n/noder.ru.json +7 -1
- package/fesm2022/talrace-ngx-noder.mjs +271 -83
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-ruler/editor-ruler.component.d.ts +9 -2
- package/lib/apart-components/editor-toolbar/shared/enums/tab-alignment.enum.d.ts +7 -0
- package/lib/apart-components/tab-settings-dialog/tab-settings-dialog.component.d.ts +33 -0
- package/lib/editor/components/external-element/external.component.d.ts +2 -0
- package/lib/editor/components/shared/abstract/base.component.d.ts +2 -2
- package/lib/editor/components/tab/tab.component.d.ts +1 -3
- package/lib/editor/components/tab/tab.helper.d.ts +2 -1
- package/lib/editor/content/display-data/display-data.d.ts +0 -1
- package/lib/editor/execution/editor.d.ts +1 -0
- package/lib/editor/interaction/editor.service.d.ts +7 -2
- package/lib/models/generated/form-interfaces/tab-setting-form.interface.d.ts +5 -0
- package/lib/models/generated/paragraph-style.model.d.ts +2 -0
- package/lib/models/generated/tab-setting.model.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Injectable, inject, ChangeDetectorRef, HostBinding, Input, Component, ChangeDetectionStrategy, ViewChild, InjectionToken, createComponent, EventEmitter, Output, HostListener,
|
|
2
|
+
import { Directive, Injectable, signal, inject, ChangeDetectorRef, HostBinding, Input, Component, ChangeDetectionStrategy, ViewChild, InjectionToken, createComponent, EventEmitter, Output, HostListener, Inject, input, computed, effect, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, BehaviorSubject, fromEvent, throttleTime, take, filter, debounceTime, distinctUntilChanged, startWith, takeUntil, tap, map, catchError } from 'rxjs';
|
|
4
|
-
import * as i1$
|
|
4
|
+
import * as i1$2 from '@angular/common/http';
|
|
5
5
|
import { HttpHeaders } from '@angular/common/http';
|
|
6
6
|
import * as i3 from '@angular/common';
|
|
7
7
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
@@ -24,10 +24,14 @@ import { ComponentPortal } from '@angular/cdk/portal';
|
|
|
24
24
|
import * as i1 from '@angular/cdk/overlay';
|
|
25
25
|
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
26
26
|
import * as i5$3 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
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
30
|
+
import * as i7 from '@angular/material/select';
|
|
31
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
32
|
+
import * as i3$2 from '@angular/material/core';
|
|
27
33
|
import * as i8 from '@angular/material/sidenav';
|
|
28
34
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
29
|
-
import * as i1$2 from '@angular/material/dialog';
|
|
30
|
-
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
31
35
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
32
36
|
import * as i4$1 from '@angular/material/menu';
|
|
33
37
|
import { MatMenuModule } from '@angular/material/menu';
|
|
@@ -36,9 +40,6 @@ import { MatExpansionModule } from '@angular/material/expansion';
|
|
|
36
40
|
import * as i2$1 from '@angular/platform-browser';
|
|
37
41
|
import * as i2$2 from '@angular/material/autocomplete';
|
|
38
42
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
39
|
-
import * as i8$1 from '@angular/material/select';
|
|
40
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
41
|
-
import * as i3$2 from '@angular/material/core';
|
|
42
43
|
import * as i5$4 from 'ngx-colors';
|
|
43
44
|
import { NgxColorsModule } from 'ngx-colors';
|
|
44
45
|
import * as i3$3 from '@angular/material/button-toggle';
|
|
@@ -153,7 +154,8 @@ const DEFAULT_PARAGRAPH_STYLE = new ParagraphStyleModel({
|
|
|
153
154
|
numberingLevel: null,
|
|
154
155
|
contextualSpacing: false,
|
|
155
156
|
beforeAutospacing: false,
|
|
156
|
-
afterAutospacing: false
|
|
157
|
+
afterAutospacing: false,
|
|
158
|
+
tabSettings: []
|
|
157
159
|
});
|
|
158
160
|
const DEFAULT_HEADINGS = [
|
|
159
161
|
new HeadingModel({
|
|
@@ -594,6 +596,7 @@ class EditorService {
|
|
|
594
596
|
this._rightMarginPageFormat$ = new Subject();
|
|
595
597
|
this._firstLinePosition$ = new Subject();
|
|
596
598
|
this._leftIndentParagraph$ = new Subject();
|
|
599
|
+
this._tabSettings$ = new Subject();
|
|
597
600
|
this._rightIndentParagraph$ = new Subject();
|
|
598
601
|
this._paragraphStyle$ = new BehaviorSubject(new ParagraphStyleModel());
|
|
599
602
|
}
|
|
@@ -811,12 +814,18 @@ class EditorService {
|
|
|
811
814
|
get leftIndentParagraph$() {
|
|
812
815
|
return this._leftIndentParagraph$.asObservable();
|
|
813
816
|
}
|
|
817
|
+
get tabSettings$() {
|
|
818
|
+
return this._tabSettings$.asObservable();
|
|
819
|
+
}
|
|
814
820
|
get rightIndentParagraph$() {
|
|
815
821
|
return this._rightIndentParagraph$.asObservable();
|
|
816
822
|
}
|
|
817
823
|
get paragraphStyle$() {
|
|
818
824
|
return this._paragraphStyle$.asObservable();
|
|
819
825
|
}
|
|
826
|
+
tabSettings(value) {
|
|
827
|
+
this._tabSettings$.next(value);
|
|
828
|
+
}
|
|
820
829
|
applyFirstLinePosition(value) {
|
|
821
830
|
this._firstLinePosition$.next(value);
|
|
822
831
|
}
|
|
@@ -911,14 +920,14 @@ class EditorService {
|
|
|
911
920
|
disableSelection() {
|
|
912
921
|
this._disableSelection$.next();
|
|
913
922
|
}
|
|
914
|
-
openElementSidenav(component, model, contentWidth) {
|
|
915
|
-
this._toggleSidenav$.next({ open: true, component, data: { model, contentWidth } });
|
|
923
|
+
openElementSidenav(component, model, contentWidth, focus) {
|
|
924
|
+
this._toggleSidenav$.next({ open: true, component, focus, data: { model, contentWidth } });
|
|
916
925
|
}
|
|
917
|
-
openSidenav(component) {
|
|
918
|
-
this._toggleSidenav$.next({ open: true, component });
|
|
926
|
+
openSidenav(component, focus) {
|
|
927
|
+
this._toggleSidenav$.next({ open: true, component, focus });
|
|
919
928
|
}
|
|
920
929
|
closeSidenav() {
|
|
921
|
-
this._toggleSidenav$.next({ open: false, component: null });
|
|
930
|
+
this._toggleSidenav$.next({ open: false, component: null, focus: false });
|
|
922
931
|
}
|
|
923
932
|
changedTableSize(insertIndex, sessionId) {
|
|
924
933
|
this._changedTableSize$.next({ insertIndex, sessionId });
|
|
@@ -1035,6 +1044,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1035
1044
|
class BaseNoderComponent extends DestroyComponent {
|
|
1036
1045
|
constructor() {
|
|
1037
1046
|
super(...arguments);
|
|
1047
|
+
this.height = signal(0);
|
|
1048
|
+
this.width = signal(0);
|
|
1038
1049
|
this._isFocused = false;
|
|
1039
1050
|
this.cdr = inject(ChangeDetectorRef);
|
|
1040
1051
|
this.editorService = inject(EditorService);
|
|
@@ -1097,16 +1108,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1097
1108
|
}] } });
|
|
1098
1109
|
|
|
1099
1110
|
class ExternalComponent extends BaseNoderComponent {
|
|
1111
|
+
constructor() {
|
|
1112
|
+
super(...arguments);
|
|
1113
|
+
this.focusSidenav = true;
|
|
1114
|
+
}
|
|
1115
|
+
skipSidenav() {
|
|
1116
|
+
return this.editorService.isViewOnly;
|
|
1117
|
+
}
|
|
1100
1118
|
focus() {
|
|
1101
1119
|
super.focus();
|
|
1102
|
-
if (this.
|
|
1120
|
+
if (this.skipSidenav()) {
|
|
1103
1121
|
return;
|
|
1104
1122
|
}
|
|
1105
|
-
this.editorService.openElementSidenav(this.sidenavComponent, this.content, this.contentWidth);
|
|
1123
|
+
this.editorService.openElementSidenav(this.sidenavComponent, this.content, this.contentWidth, this.focusSidenav);
|
|
1106
1124
|
}
|
|
1107
1125
|
blur() {
|
|
1108
1126
|
super.blur();
|
|
1109
|
-
if (this.
|
|
1127
|
+
if (this.skipSidenav()) {
|
|
1110
1128
|
return;
|
|
1111
1129
|
}
|
|
1112
1130
|
this.editorService.closeSidenav();
|
|
@@ -6973,7 +6991,8 @@ class Search {
|
|
|
6973
6991
|
this.allMatches.push(new CustomElementSearchResult({
|
|
6974
6992
|
sessionId: currentSession.sessionId,
|
|
6975
6993
|
range: parentRange,
|
|
6976
|
-
mainSessionPosition: mainSessionPosition ?? new CursorParagraph(i, container.index)
|
|
6994
|
+
mainSessionPosition: mainSessionPosition ?? new CursorParagraph(i, container.index),
|
|
6995
|
+
index: matchIndex
|
|
6977
6996
|
}));
|
|
6978
6997
|
customElementHighlights.push(new CustomElementInfo({ index: matchIndex, parentRange }));
|
|
6979
6998
|
}
|
|
@@ -7642,7 +7661,7 @@ class Editor {
|
|
|
7642
7661
|
this.focus();
|
|
7643
7662
|
this.session.applyToolbarStyles();
|
|
7644
7663
|
this.search = new Search(editorService);
|
|
7645
|
-
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.clipboardDataSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.insertTableRowsSubscription(), this.insertTableSubscription(), 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.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.commandCreatedForEdges());
|
|
7664
|
+
this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.clipboardDataSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.insertTableRowsSubscription(), this.insertTableSubscription(), 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.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());
|
|
7646
7665
|
}
|
|
7647
7666
|
destroy() {
|
|
7648
7667
|
this.subscriptions.forEach(s => s?.unsubscribe());
|
|
@@ -8977,6 +8996,9 @@ class Editor {
|
|
|
8977
8996
|
applyLeftIndentParagraphSubscription() {
|
|
8978
8997
|
return this.editorService.leftIndentParagraph$.subscribe(indentLeft => this.applyParagraphsMargin({ indentLeft }));
|
|
8979
8998
|
}
|
|
8999
|
+
applyTabSettingsSubscription() {
|
|
9000
|
+
return this.editorService.tabSettings$.subscribe(tabSettings => this.applyParagraphsMargin({ tabSettings }));
|
|
9001
|
+
}
|
|
8980
9002
|
setImageStyleSubscription() {
|
|
8981
9003
|
return this.editorService.setImageStyle$.subscribe(image => this.applyImageStyles(image));
|
|
8982
9004
|
}
|
|
@@ -10525,7 +10547,7 @@ class NoderTableComponent extends BaseNoderComponent {
|
|
|
10525
10547
|
const cellWidth = this.getCellWidth(tableRow, cellIndex, absoluteCellIndex);
|
|
10526
10548
|
if (tableRow.cells[cellIndex].widthType === 'pct') {
|
|
10527
10549
|
tableRow.cells[cellIndex].widthType = 'dxa';
|
|
10528
|
-
return (cellWidth * this.width) / 5000; // 5000 is equal to 100% in docx units of measurement
|
|
10550
|
+
return (cellWidth * this.width()) / 5000; // 5000 is equal to 100% in docx units of measurement
|
|
10529
10551
|
}
|
|
10530
10552
|
return ScalingHelper.scale(cellWidth, this.generalProperties.scalingRatio);
|
|
10531
10553
|
}
|
|
@@ -10551,7 +10573,7 @@ class NoderTableComponent extends BaseNoderComponent {
|
|
|
10551
10573
|
this.initialize();
|
|
10552
10574
|
}
|
|
10553
10575
|
insertRows(rowsCount, targetIndex) {
|
|
10554
|
-
this.width
|
|
10576
|
+
this.width.set(this.getTableWidth());
|
|
10555
10577
|
let rowIndex = 0;
|
|
10556
10578
|
while (rowIndex < rowsCount) {
|
|
10557
10579
|
const targetRowIndex = targetIndex + rowIndex;
|
|
@@ -10726,20 +10748,20 @@ class NoderTableComponent extends BaseNoderComponent {
|
|
|
10726
10748
|
bordersHeight += this.borderSize;
|
|
10727
10749
|
}
|
|
10728
10750
|
}
|
|
10729
|
-
this.height
|
|
10751
|
+
this.height.set(rowsHeight + bordersHeight);
|
|
10730
10752
|
}
|
|
10731
10753
|
processSplit(leftSpaceOnPage, spaceBetweenPagesContent, contentHeight) {
|
|
10732
10754
|
this.removeSplits();
|
|
10733
|
-
if (leftSpaceOnPage >= this.height) {
|
|
10734
|
-
return { splitsCount: 0, tableHeight: this.height, leftHeight: 0 };
|
|
10755
|
+
if (leftSpaceOnPage >= this.height()) {
|
|
10756
|
+
return { splitsCount: 0, tableHeight: this.height(), leftHeight: 0 };
|
|
10735
10757
|
}
|
|
10736
10758
|
if (leftSpaceOnPage < this.rowMatrix[0].height) {
|
|
10737
|
-
return { splitsCount: 1, tableHeight: this.height, leftHeight: this.height };
|
|
10759
|
+
return { splitsCount: 1, tableHeight: this.height(), leftHeight: this.height() };
|
|
10738
10760
|
}
|
|
10739
10761
|
return this.splitTable(leftSpaceOnPage, spaceBetweenPagesContent, contentHeight);
|
|
10740
10762
|
}
|
|
10741
10763
|
splitTable(leftSpaceOnPage, spaceBetweenPagesContent, contentHeight) {
|
|
10742
|
-
let leftHeight = 0, tableHeightWithSplits = this.height, rowIndex = 0;
|
|
10764
|
+
let leftHeight = 0, tableHeightWithSplits = this.height(), rowIndex = 0;
|
|
10743
10765
|
while (rowIndex < this.rowMatrix.length) {
|
|
10744
10766
|
let { index, rowsHeight } = this.getRowIndexByHeight(rowIndex, leftSpaceOnPage);
|
|
10745
10767
|
rowIndex = index;
|
|
@@ -11233,9 +11255,20 @@ class ParagraphStyleHelper {
|
|
|
11233
11255
|
}
|
|
11234
11256
|
}
|
|
11235
11257
|
|
|
11258
|
+
var TabAlignment;
|
|
11259
|
+
(function (TabAlignment) {
|
|
11260
|
+
TabAlignment[TabAlignment["Left"] = 0] = "Left";
|
|
11261
|
+
TabAlignment[TabAlignment["Center"] = 1] = "Center";
|
|
11262
|
+
TabAlignment[TabAlignment["Right"] = 2] = "Right";
|
|
11263
|
+
TabAlignment[TabAlignment["Decimal"] = 3] = "Decimal";
|
|
11264
|
+
TabAlignment[TabAlignment["Bar"] = 4] = "Bar";
|
|
11265
|
+
})(TabAlignment || (TabAlignment = {}));
|
|
11266
|
+
|
|
11236
11267
|
class TabHelper {
|
|
11237
|
-
static calculateTabWidth(rowWidth, defaultTabWidth) {
|
|
11238
|
-
|
|
11268
|
+
static calculateTabWidth(rowWidth, defaultTabWidth, tabSettings) {
|
|
11269
|
+
const tabs = tabSettings ?? [];
|
|
11270
|
+
const nextSetting = tabs.find(x => x.position > rowWidth);
|
|
11271
|
+
return nextSetting ? nextSetting.position - rowWidth : defaultTabWidth - (rowWidth % defaultTabWidth);
|
|
11239
11272
|
}
|
|
11240
11273
|
}
|
|
11241
11274
|
|
|
@@ -11269,11 +11302,6 @@ class DisplayData extends EventEmitting {
|
|
|
11269
11302
|
this.paragraphs = this.splitByParagraphs(this.model.content).map(x => new ParagraphInfoModel({ content: x }));
|
|
11270
11303
|
this.pagesFormat = this.pageFormatModels.map(x => new PageFormat(x, this.pagesSpace, this.customComponents));
|
|
11271
11304
|
}
|
|
11272
|
-
recreatePageFormatsNotMainSession(width) {
|
|
11273
|
-
this.pagesFormat = [
|
|
11274
|
-
new PageFormat(new PageFormatModel({ ...this.pagesFormat[0].pageFormatModel, pageWidth: width }), this.pagesSpace, this.customComponents)
|
|
11275
|
-
];
|
|
11276
|
-
}
|
|
11277
11305
|
insertText(position, text) {
|
|
11278
11306
|
const endPoint = this.insertTextAndReturnEndCursorPosition(text, position);
|
|
11279
11307
|
return endPoint;
|
|
@@ -11603,8 +11631,7 @@ class DisplayData extends EventEmitting {
|
|
|
11603
11631
|
}
|
|
11604
11632
|
const startIndex = tabIndex;
|
|
11605
11633
|
while (this.customComponents.tabs[tabIndex] && this.customComponents.tabs[tabIndex].instance.insertIndex <= paragraphLastIndex) {
|
|
11606
|
-
this.customComponents.tabs[tabIndex].instance.width
|
|
11607
|
-
this.customComponents.tabs[tabIndex].instance.height = this.tabTokens[tabIndex - startIndex].font;
|
|
11634
|
+
this.customComponents.tabs[tabIndex].instance.applySize(this.tabTokens[tabIndex - startIndex].width, this.tabTokens[tabIndex - startIndex].font);
|
|
11608
11635
|
tabIndex++;
|
|
11609
11636
|
}
|
|
11610
11637
|
return tabIndex;
|
|
@@ -11639,7 +11666,7 @@ class DisplayData extends EventEmitting {
|
|
|
11639
11666
|
if (!tokens.length) {
|
|
11640
11667
|
tokens.push(...this.getEmptyDisplayTokens(model, this.paragraphs[paragraphIndex].startIndex + index));
|
|
11641
11668
|
}
|
|
11642
|
-
let wrapLimit = this.computeWrapIndex(tokens, pageFormat.contentWidth, this.generalProperties.defaultTabWidth);
|
|
11669
|
+
let wrapLimit = this.computeWrapIndex(tokens, pageFormat.contentWidth, this.generalProperties.defaultTabWidth, model.paragraphs[paragraphIndex].paragraphStyle.tabSettings);
|
|
11643
11670
|
if (tokens[tokens.length - 1].isPageBreak && wrapLimit === tokens.length && this.paragraphs.length > paragraphIndex + 1) {
|
|
11644
11671
|
wrapLimit = 0;
|
|
11645
11672
|
}
|
|
@@ -12042,7 +12069,7 @@ class DisplayData extends EventEmitting {
|
|
|
12042
12069
|
/**
|
|
12043
12070
|
* Computes wrap index based on max row width
|
|
12044
12071
|
*/
|
|
12045
|
-
computeWrapIndex(displayTokens, contentWidth, defaultTabWidth) {
|
|
12072
|
+
computeWrapIndex(displayTokens, contentWidth, defaultTabWidth, tabSettings) {
|
|
12046
12073
|
if (!displayTokens[0]) {
|
|
12047
12074
|
return 0;
|
|
12048
12075
|
}
|
|
@@ -12055,13 +12082,46 @@ class DisplayData extends EventEmitting {
|
|
|
12055
12082
|
displayTokens[0].indentHanging || 0;
|
|
12056
12083
|
const maxRowWidth = contentWidth - indent;
|
|
12057
12084
|
let sum = 0;
|
|
12085
|
+
let prevTabIndex = null;
|
|
12086
|
+
let tabCenter = null;
|
|
12087
|
+
let prevTabAlignment = TabAlignment.Left;
|
|
12058
12088
|
for (let i = 0; i < displayTokens.length; i++) {
|
|
12059
12089
|
const token = displayTokens[i];
|
|
12060
12090
|
const prevToken = i > 0 ? displayTokens[i - 1] : null;
|
|
12061
12091
|
if (token.isTab) {
|
|
12062
|
-
|
|
12092
|
+
const tabs = tabSettings ?? [];
|
|
12093
|
+
const nextSettingIndex = tabs.findIndex(x => x.position > sum);
|
|
12094
|
+
const tokenWidth = TabHelper.calculateTabWidth(sum, defaultTabWidth, tabSettings);
|
|
12095
|
+
if (nextSettingIndex >= 0 && tabs[nextSettingIndex].alignment === TabAlignment.Center) {
|
|
12096
|
+
prevTabAlignment = TabAlignment.Center;
|
|
12097
|
+
tabCenter = { stringWidth: 0, tokenWidth };
|
|
12098
|
+
token.width = tokenWidth;
|
|
12099
|
+
}
|
|
12100
|
+
else {
|
|
12101
|
+
prevTabAlignment = nextSettingIndex >= 0 ? tabs[nextSettingIndex].alignment : TabAlignment.Left;
|
|
12102
|
+
token.width = tokenWidth;
|
|
12103
|
+
tabCenter = null;
|
|
12104
|
+
}
|
|
12105
|
+
prevTabIndex = i;
|
|
12106
|
+
}
|
|
12107
|
+
if (prevTabAlignment === TabAlignment.Center && !token.isTab && tabCenter.stringWidth < tabCenter.tokenWidth) {
|
|
12108
|
+
const tokenWidth = token.width / 2;
|
|
12109
|
+
displayTokens[prevTabIndex].width -= tokenWidth;
|
|
12110
|
+
tabCenter.stringWidth += tokenWidth;
|
|
12111
|
+
sum += tokenWidth;
|
|
12112
|
+
}
|
|
12113
|
+
else if (prevTabAlignment === TabAlignment.Right && !token.isTab && displayTokens[prevTabIndex].width !== 0) {
|
|
12114
|
+
if (displayTokens[prevTabIndex].width - token.width < 0) {
|
|
12115
|
+
sum += token.width - displayTokens[prevTabIndex].width;
|
|
12116
|
+
displayTokens[prevTabIndex].width = 0;
|
|
12117
|
+
}
|
|
12118
|
+
else {
|
|
12119
|
+
displayTokens[prevTabIndex].width -= token.width;
|
|
12120
|
+
}
|
|
12121
|
+
}
|
|
12122
|
+
else {
|
|
12123
|
+
sum += token.width;
|
|
12063
12124
|
}
|
|
12064
|
-
sum += token.width;
|
|
12065
12125
|
if (sum >= maxRowWidth) {
|
|
12066
12126
|
return i > 0 ? i - 1 : 0;
|
|
12067
12127
|
}
|
|
@@ -12766,7 +12826,7 @@ class NoderImageComponent extends BaseNoderComponent {
|
|
|
12766
12826
|
this.content = val;
|
|
12767
12827
|
}
|
|
12768
12828
|
get size() {
|
|
12769
|
-
return { width: this.width, height: this.height };
|
|
12829
|
+
return { width: this.width(), height: this.height() };
|
|
12770
12830
|
}
|
|
12771
12831
|
constructor(elementRef, apiService) {
|
|
12772
12832
|
super();
|
|
@@ -12776,8 +12836,8 @@ class NoderImageComponent extends BaseNoderComponent {
|
|
|
12776
12836
|
}
|
|
12777
12837
|
initialize() {
|
|
12778
12838
|
const url = this.image.content?.replace('/api/', '') ?? '';
|
|
12779
|
-
this.height
|
|
12780
|
-
this.width
|
|
12839
|
+
this.height.set(ScalingHelper.scale(this.image.height, this.generalProperties.scalingRatio));
|
|
12840
|
+
this.width.set(ScalingHelper.scale(this.image.width, this.generalProperties.scalingRatio));
|
|
12781
12841
|
this.apiService.getFile(url).subscribe(x => {
|
|
12782
12842
|
const fileSource = URL.createObjectURL(x);
|
|
12783
12843
|
const image = this.createImage(fileSource);
|
|
@@ -12791,8 +12851,8 @@ class NoderImageComponent extends BaseNoderComponent {
|
|
|
12791
12851
|
this.editorService.changeImageStyle(resizedImage);
|
|
12792
12852
|
}
|
|
12793
12853
|
resize(size) {
|
|
12794
|
-
this.width
|
|
12795
|
-
this.height
|
|
12854
|
+
this.width.set(size.width);
|
|
12855
|
+
this.height.set(size.height);
|
|
12796
12856
|
this.isCanvas ? this.resizeCanvas(size) : this.resizeImage(size);
|
|
12797
12857
|
this.cdr.markForCheck();
|
|
12798
12858
|
}
|
|
@@ -12810,8 +12870,8 @@ class NoderImageComponent extends BaseNoderComponent {
|
|
|
12810
12870
|
}
|
|
12811
12871
|
createImage(fileSource) {
|
|
12812
12872
|
const imageEl = document.createElement('img');
|
|
12813
|
-
imageEl.width = this.width;
|
|
12814
|
-
imageEl.height = this.height;
|
|
12873
|
+
imageEl.width = this.width();
|
|
12874
|
+
imageEl.height = this.height();
|
|
12815
12875
|
imageEl.draggable = false;
|
|
12816
12876
|
imageEl.src = fileSource;
|
|
12817
12877
|
return imageEl;
|
|
@@ -12842,25 +12902,22 @@ class NoderTabComponent extends BaseNoderComponent {
|
|
|
12842
12902
|
this.content = val;
|
|
12843
12903
|
}
|
|
12844
12904
|
initialize() {
|
|
12845
|
-
this.
|
|
12905
|
+
this.applySize(this.tab.width, this.tab.fontSize);
|
|
12846
12906
|
}
|
|
12847
|
-
|
|
12848
|
-
this.height
|
|
12849
|
-
this.width
|
|
12907
|
+
applySize(width, font) {
|
|
12908
|
+
this.height.set(font);
|
|
12909
|
+
this.width.set(ScalingHelper.scale(width, this.generalProperties.scalingRatio));
|
|
12850
12910
|
}
|
|
12851
12911
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
12852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NoderTabComponent, isStandalone: false, selector: "app-nod-tab", host: { properties: { "style.width.px": "
|
|
12912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NoderTabComponent, isStandalone: false, selector: "app-nod-tab", host: { properties: { "style.width.px": "width()", "style.fontSize.pt": "height()" } }, usesInheritance: true, ngImport: i0, template: " \n", styles: [":host{position:relative;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12853
12913
|
}
|
|
12854
12914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTabComponent, decorators: [{
|
|
12855
12915
|
type: Component,
|
|
12856
|
-
args: [{ selector: 'app-nod-tab', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false,
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
type: HostBinding,
|
|
12862
|
-
args: ['style.fontSize.pt']
|
|
12863
|
-
}] } });
|
|
12916
|
+
args: [{ selector: 'app-nod-tab', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, host: {
|
|
12917
|
+
'[style.width.px]': 'width()',
|
|
12918
|
+
'[style.fontSize.pt]': 'height()'
|
|
12919
|
+
}, template: " \n", styles: [":host{position:relative;outline:none}\n"] }]
|
|
12920
|
+
}] });
|
|
12864
12921
|
|
|
12865
12922
|
const CHARS = [
|
|
12866
12923
|
// eslint-disable-next-line prettier/prettier
|
|
@@ -14736,17 +14793,19 @@ class CustomContentService {
|
|
|
14736
14793
|
}
|
|
14737
14794
|
getTokenFromComponent(component, lineInfo, displayValue, isFirst, size) {
|
|
14738
14795
|
let height = size.height;
|
|
14739
|
-
if (component.instance.height > size.height) {
|
|
14796
|
+
if (component.instance.height() > size.height) {
|
|
14740
14797
|
height =
|
|
14741
|
-
component.instance instanceof NoderImageComponent
|
|
14798
|
+
component.instance instanceof NoderImageComponent
|
|
14799
|
+
? component.instance.height() + size.descent
|
|
14800
|
+
: component.instance.height();
|
|
14742
14801
|
}
|
|
14743
14802
|
return new DisplayToken({
|
|
14744
|
-
width: component.instance.width,
|
|
14803
|
+
width: component.instance.width(),
|
|
14745
14804
|
height,
|
|
14746
14805
|
baseline: 0,
|
|
14747
14806
|
content: 0,
|
|
14748
14807
|
font: size.font,
|
|
14749
|
-
ascent: component.instance.height ?? size.height,
|
|
14808
|
+
ascent: component.instance.height() ?? size.height,
|
|
14750
14809
|
descent: 0,
|
|
14751
14810
|
line: 0,
|
|
14752
14811
|
lineSpacing: lineInfo.lineSpacing,
|
|
@@ -15060,10 +15119,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
15060
15119
|
type: Injectable
|
|
15061
15120
|
}] });
|
|
15062
15121
|
|
|
15122
|
+
class TabSettingModel {
|
|
15123
|
+
constructor(fields) {
|
|
15124
|
+
if (fields) {
|
|
15125
|
+
Object.assign(this, fields);
|
|
15126
|
+
}
|
|
15127
|
+
}
|
|
15128
|
+
}
|
|
15129
|
+
|
|
15130
|
+
class TabSettingsDialogComponent {
|
|
15131
|
+
constructor(data, ref, fb) {
|
|
15132
|
+
this.data = data;
|
|
15133
|
+
this.ref = ref;
|
|
15134
|
+
this.fb = fb;
|
|
15135
|
+
this.modal = true;
|
|
15136
|
+
this.alignments = [
|
|
15137
|
+
{ title: marker('NODER.LABEL.LEFT'), type: TabAlignment.Left },
|
|
15138
|
+
{ title: marker('NODER.LABEL.CENTER'), type: TabAlignment.Center },
|
|
15139
|
+
{ title: marker('NODER.LABEL.RIGHT'), type: TabAlignment.Right }
|
|
15140
|
+
];
|
|
15141
|
+
this.form = this.fb.group({
|
|
15142
|
+
tabs: this.fb.array(this.data.tabs.map(x => this.createTabGroup(x)))
|
|
15143
|
+
});
|
|
15144
|
+
}
|
|
15145
|
+
tabsArray() {
|
|
15146
|
+
return this.form.get('tabs');
|
|
15147
|
+
}
|
|
15148
|
+
onRemove(index) {
|
|
15149
|
+
this.tabsArray().removeAt(index);
|
|
15150
|
+
}
|
|
15151
|
+
onClose() {
|
|
15152
|
+
this.ref.close();
|
|
15153
|
+
}
|
|
15154
|
+
onSave() {
|
|
15155
|
+
const result = this.tabsArray()
|
|
15156
|
+
.value.filter(x => x.position !== null)
|
|
15157
|
+
.map(v => new TabSettingModel({ position: v.position, alignment: v.alignment }));
|
|
15158
|
+
this.ref.close(result);
|
|
15159
|
+
}
|
|
15160
|
+
onAddTab() {
|
|
15161
|
+
const group = this.createTabGroup({ position: 0, alignment: TabAlignment.Left });
|
|
15162
|
+
this.tabsArray().push(group);
|
|
15163
|
+
}
|
|
15164
|
+
createTabGroup(tab) {
|
|
15165
|
+
return this.fb.group({
|
|
15166
|
+
position: new FormControl(tab.position, { nonNullable: true, validators: [Validators.required] }),
|
|
15167
|
+
alignment: new FormControl(tab.alignment, { nonNullable: true, validators: [Validators.required] })
|
|
15168
|
+
});
|
|
15169
|
+
}
|
|
15170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TabSettingsDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TabSettingsDialogComponent, isStandalone: true, selector: "app-nod-tab-settings-dialog", host: { properties: { "class.noder-modal": "this.modal" } }, ngImport: i0, template: "<div class=\"columns\">\n <span class=\"position\">{{ 'NODER.LABEL.POSITION' | translate }}</span>\n <span class=\"alignment\">{{ 'NODER.LABEL.ALIGNMENT' | translate }}</span>\n</div>\n<form\n [formGroup]=\"form\"\n class=\"form\">\n <div\n class=\"tabs\"\n formArrayName=\"tabs\">\n @for (tabCtrl of tabsArray().controls; let i = $index; track i) {\n <div\n class=\"item\"\n [formGroupName]=\"i\">\n <div class=\"tab\">\n <mat-form-field class=\"position\">\n <input\n matInput\n type=\"number\"\n formControlName=\"position\" />\n </mat-form-field>\n <mat-form-field class=\"alignment\">\n <mat-select formControlName=\"alignment\">\n @for (alignment of alignments; track alignment) {\n <mat-option [value]=\"alignment.type\">\n {{ alignment.title | translate }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <button\n id=\"tab-setting-dialog-delete-btn\"\n mat-icon-button\n type=\"button\"\n (click)=\"onRemove(i)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n</form>\n<div class=\"tab-actions\">\n <button\n id=\"tab-setting-dialog-add-btn\"\n mat-stroked-button\n (click)=\"onAddTab()\">\n {{ 'NODER.LABEL.ADD' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-clear-all-btn\"\n mat-stroked-button\n (click)=\"tabsArray().clear()\">\n {{ 'NODER.LABEL.CLEAR_ALL' | translate }}\n </button>\n</div>\n<div class=\"actions\">\n <button\n id=\"tab-setting-dialog-cancel-btn\"\n mat-stroked-button\n (click)=\"onClose()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-ok-btn\"\n mat-stroked-button\n (click)=\"onSave()\">\n {{ 'NODER.LABEL.SAVE' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:550px;width:360px;padding:20px 0 20px 20px;gap:20px}.tabs{flex:1;overflow:hidden auto;display:flex;flex-direction:column}.form{height:350px;display:flex}.item{display:flex}.tab{display:flex;flex:1;gap:20px}.mat-mdc-form-field{width:120px}.columns{display:flex;gap:30%}.columns .position,.columns .alignment{font-weight:700}.tab-actions{display:flex;justify-content:start;gap:10px}.actions{display:flex;justify-content:end;gap:10px;margin-right:20px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { 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: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15172
|
+
}
|
|
15173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TabSettingsDialogComponent, decorators: [{
|
|
15174
|
+
type: Component,
|
|
15175
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
15176
|
+
MatDialogModule,
|
|
15177
|
+
MatFormFieldModule,
|
|
15178
|
+
MatButtonModule,
|
|
15179
|
+
MatIconModule,
|
|
15180
|
+
TranslateModule,
|
|
15181
|
+
MatSelectModule,
|
|
15182
|
+
FormsModule,
|
|
15183
|
+
ReactiveFormsModule,
|
|
15184
|
+
MatInputModule
|
|
15185
|
+
], selector: 'app-nod-tab-settings-dialog', template: "<div class=\"columns\">\n <span class=\"position\">{{ 'NODER.LABEL.POSITION' | translate }}</span>\n <span class=\"alignment\">{{ 'NODER.LABEL.ALIGNMENT' | translate }}</span>\n</div>\n<form\n [formGroup]=\"form\"\n class=\"form\">\n <div\n class=\"tabs\"\n formArrayName=\"tabs\">\n @for (tabCtrl of tabsArray().controls; let i = $index; track i) {\n <div\n class=\"item\"\n [formGroupName]=\"i\">\n <div class=\"tab\">\n <mat-form-field class=\"position\">\n <input\n matInput\n type=\"number\"\n formControlName=\"position\" />\n </mat-form-field>\n <mat-form-field class=\"alignment\">\n <mat-select formControlName=\"alignment\">\n @for (alignment of alignments; track alignment) {\n <mat-option [value]=\"alignment.type\">\n {{ alignment.title | translate }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <button\n id=\"tab-setting-dialog-delete-btn\"\n mat-icon-button\n type=\"button\"\n (click)=\"onRemove(i)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n</form>\n<div class=\"tab-actions\">\n <button\n id=\"tab-setting-dialog-add-btn\"\n mat-stroked-button\n (click)=\"onAddTab()\">\n {{ 'NODER.LABEL.ADD' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-clear-all-btn\"\n mat-stroked-button\n (click)=\"tabsArray().clear()\">\n {{ 'NODER.LABEL.CLEAR_ALL' | translate }}\n </button>\n</div>\n<div class=\"actions\">\n <button\n id=\"tab-setting-dialog-cancel-btn\"\n mat-stroked-button\n (click)=\"onClose()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-ok-btn\"\n mat-stroked-button\n (click)=\"onSave()\">\n {{ 'NODER.LABEL.SAVE' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:550px;width:360px;padding:20px 0 20px 20px;gap:20px}.tabs{flex:1;overflow:hidden auto;display:flex;flex-direction:column}.form{height:350px;display:flex}.item{display:flex}.tab{display:flex;flex:1;gap:20px}.mat-mdc-form-field{width:120px}.columns{display:flex;gap:30%}.columns .position,.columns .alignment{font-weight:700}.tab-actions{display:flex;justify-content:start;gap:10px}.actions{display:flex;justify-content:end;gap:10px;margin-right:20px}\n"] }]
|
|
15186
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
15187
|
+
type: Inject,
|
|
15188
|
+
args: [MAT_DIALOG_DATA]
|
|
15189
|
+
}] }, { type: i1$1.MatDialogRef }, { type: i2.FormBuilder }], propDecorators: { modal: [{
|
|
15190
|
+
type: HostBinding,
|
|
15191
|
+
args: ['class.noder-modal']
|
|
15192
|
+
}] } });
|
|
15193
|
+
|
|
15063
15194
|
class EditorRulerComponent {
|
|
15064
15195
|
constructor() {
|
|
15065
15196
|
this.unit = input.required();
|
|
15066
15197
|
this.editorService = inject(EditorService);
|
|
15198
|
+
this.dialog = inject(MatDialog);
|
|
15067
15199
|
this.defaultPaddingCm = 2.5;
|
|
15068
15200
|
this.pageWidth$ = this.editorService.pageFormat$.pipe(distinctUntilChanged(), tap(x => {
|
|
15069
15201
|
this.recalcGeometry(x.pageWidth);
|
|
@@ -15075,26 +15207,27 @@ class EditorRulerComponent {
|
|
|
15075
15207
|
this.snapCm = 0.25;
|
|
15076
15208
|
this.pxPerCm = 37.8; // 96dpi / 2.54
|
|
15077
15209
|
this.pxPerInch = 96;
|
|
15078
|
-
this.firstLine = signal(this.defaultPaddingCm * this.pxPerCm);
|
|
15079
|
-
this.leftIndent = signal(this.defaultPaddingCm * this.pxPerCm);
|
|
15210
|
+
this.firstLine = signal(Math.floor(this.defaultPaddingCm * this.pxPerCm));
|
|
15211
|
+
this.leftIndent = signal(Math.floor(this.defaultPaddingCm * this.pxPerCm));
|
|
15080
15212
|
this.rightIndent = signal(0);
|
|
15081
15213
|
this.leftIndentPx = computed(() => this.leftIndent() + this.leftMarginPageFormatPx());
|
|
15082
15214
|
this.firstLinePx = computed(() => this.firstLine() + this.leftIndentPx());
|
|
15083
15215
|
this.rightIndentPx = computed(() => this.rightMarginPageFormatPx() - this.rightIndent());
|
|
15084
|
-
this.leftMarginPageFormatPx = signal(this.defaultPaddingCm * this.pxPerCm);
|
|
15216
|
+
this.leftMarginPageFormatPx = signal(Math.floor(this.defaultPaddingCm * this.pxPerCm));
|
|
15085
15217
|
this.rightMarginPageFormatPx = signal(0);
|
|
15086
15218
|
this.guideX = signal(0);
|
|
15087
15219
|
this.showGuide = signal(false);
|
|
15220
|
+
this.tabSettings = signal([]);
|
|
15088
15221
|
this.containerWidthPx = 0;
|
|
15089
15222
|
this.ticks = [];
|
|
15090
15223
|
this.dragging = null;
|
|
15091
15224
|
this.dragOffsetX = 0;
|
|
15092
|
-
this.onMove = (
|
|
15225
|
+
this.onMove = (event) => {
|
|
15093
15226
|
if (!this.dragging) {
|
|
15094
15227
|
return;
|
|
15095
15228
|
}
|
|
15096
|
-
|
|
15097
|
-
const pointX = this.getClientX(
|
|
15229
|
+
event.preventDefault();
|
|
15230
|
+
const pointX = this.getClientX(event);
|
|
15098
15231
|
const rect = this.rulerContainer.nativeElement.getBoundingClientRect();
|
|
15099
15232
|
let x = pointX - rect.left - this.dragOffsetX;
|
|
15100
15233
|
if (x < -1 || x > this.containerWidthPx) {
|
|
@@ -15116,6 +15249,9 @@ class EditorRulerComponent {
|
|
|
15116
15249
|
else if (this.dragging === 'rightIndent') {
|
|
15117
15250
|
this.rightIndent.set(this.rightMarginPageFormatPx() - x);
|
|
15118
15251
|
}
|
|
15252
|
+
else if (this.dragging === 'tabs') {
|
|
15253
|
+
this.tabSettings()[this.draggableTabIndex].position = x - this.leftMarginPageFormatPx();
|
|
15254
|
+
}
|
|
15119
15255
|
this.guideX.set(x);
|
|
15120
15256
|
};
|
|
15121
15257
|
this.onUp = () => {
|
|
@@ -15134,6 +15270,14 @@ class EditorRulerComponent {
|
|
|
15134
15270
|
else if (this.dragging === 'rightMarginPageFormat') {
|
|
15135
15271
|
this.editorService.applyRightMarginPageFormat(Math.round(this.containerWidthPx - this.rightMarginPageFormatPx()));
|
|
15136
15272
|
}
|
|
15273
|
+
else if (this.dragging === 'tabs') {
|
|
15274
|
+
this.editorService.tabSettings(this.tabSettings()
|
|
15275
|
+
.sort((a, b) => a.position - b.position)
|
|
15276
|
+
.map(x => new TabSettingModel({
|
|
15277
|
+
alignment: x.alignment,
|
|
15278
|
+
position: Math.floor(x.position)
|
|
15279
|
+
})));
|
|
15280
|
+
}
|
|
15137
15281
|
this.dragging = null;
|
|
15138
15282
|
this.showGuide.set(false);
|
|
15139
15283
|
window.removeEventListener('mousemove', this.onMove);
|
|
@@ -15141,6 +15285,9 @@ class EditorRulerComponent {
|
|
|
15141
15285
|
window.removeEventListener('touchmove', this.onMove);
|
|
15142
15286
|
window.removeEventListener('touchend', this.onUp);
|
|
15143
15287
|
};
|
|
15288
|
+
this.editorService.paragraphStyle$
|
|
15289
|
+
.pipe(takeUntilDestroyed(), distinctUntilChanged(), filter(x => !!x.tabSettings), map(x => x.tabSettings?.map(y => new TabSettingModel({ alignment: y.alignment, position: y.position })) ?? []))
|
|
15290
|
+
.subscribe(x => this.tabSettings.set(x));
|
|
15144
15291
|
this.editorService.paragraphStyle$.pipe(takeUntilDestroyed()).subscribe(x => {
|
|
15145
15292
|
this.firstLine.set(x.indentHanging ? -x.indentHanging : x.indentFirstLine);
|
|
15146
15293
|
this.leftIndent.set(x.indentLeft);
|
|
@@ -15158,6 +15305,31 @@ class EditorRulerComponent {
|
|
|
15158
15305
|
this.recalcGeometry();
|
|
15159
15306
|
this.buildTicksCm();
|
|
15160
15307
|
}
|
|
15308
|
+
onOpenDialog() {
|
|
15309
|
+
const tabs = this.tabSettings().map(x => {
|
|
15310
|
+
const position = this.unit() === 'inch' ? this.pxToInch(x.position) : this.pxToCm(x.position);
|
|
15311
|
+
return new TabSettingModel({ position, alignment: x.alignment });
|
|
15312
|
+
});
|
|
15313
|
+
this.dialog
|
|
15314
|
+
.open(TabSettingsDialogComponent, {
|
|
15315
|
+
autoFocus: false,
|
|
15316
|
+
restoreFocus: false,
|
|
15317
|
+
data: { tabs, unit: this.unit() }
|
|
15318
|
+
})
|
|
15319
|
+
.afterClosed()
|
|
15320
|
+
.pipe(filter(x => !!x))
|
|
15321
|
+
.subscribe((x) => {
|
|
15322
|
+
const convertedTabs = x.map(y => {
|
|
15323
|
+
const position = this.unit() === 'inch' ? this.inchToPx(y.position) : this.cmToPx(y.position);
|
|
15324
|
+
return new TabSettingModel({
|
|
15325
|
+
alignment: y.alignment,
|
|
15326
|
+
position: Math.floor(position)
|
|
15327
|
+
});
|
|
15328
|
+
});
|
|
15329
|
+
this.tabSettings.set(convertedTabs);
|
|
15330
|
+
this.editorService.tabSettings(convertedTabs.sort((a, b) => a.position - b.position));
|
|
15331
|
+
});
|
|
15332
|
+
}
|
|
15161
15333
|
recalcGeometry(width = null) {
|
|
15162
15334
|
this.containerWidthPx = width ?? this.rulerContainer.nativeElement.getBoundingClientRect().width;
|
|
15163
15335
|
}
|
|
@@ -15246,9 +15418,17 @@ class EditorRulerComponent {
|
|
|
15246
15418
|
}
|
|
15247
15419
|
this.ticks = ticks;
|
|
15248
15420
|
}
|
|
15249
|
-
|
|
15250
|
-
|
|
15251
|
-
|
|
15421
|
+
addTab(event) {
|
|
15422
|
+
const position = this.getClientX(event) - this.rulerContainer.nativeElement.getBoundingClientRect().left - this.leftMarginPageFormatPx();
|
|
15423
|
+
this.tabSettings.update(x => {
|
|
15424
|
+
x.push(new TabSettingModel({ alignment: TabAlignment.Left, position }));
|
|
15425
|
+
return x;
|
|
15426
|
+
});
|
|
15427
|
+
this.startDrag(event, 'tabs', this.tabSettings().length - 1);
|
|
15428
|
+
}
|
|
15429
|
+
startDrag(event, target, tabIndex) {
|
|
15430
|
+
event.preventDefault();
|
|
15431
|
+
const pointX = this.getClientX(event);
|
|
15252
15432
|
const rect = this.rulerContainer.nativeElement.getBoundingClientRect();
|
|
15253
15433
|
this.dragging = target;
|
|
15254
15434
|
if (target === 'leftMarginPageFormat') {
|
|
@@ -15266,6 +15446,10 @@ class EditorRulerComponent {
|
|
|
15266
15446
|
else if (target === 'rightIndent') {
|
|
15267
15447
|
this.dragOffsetX = pointX - rect.left - this.rightIndentPx();
|
|
15268
15448
|
}
|
|
15449
|
+
else if (target === 'tabs') {
|
|
15450
|
+
this.draggableTabIndex = tabIndex;
|
|
15451
|
+
this.dragOffsetX = pointX - rect.left - this.tabSettings()[tabIndex].position - this.leftMarginPageFormatPx();
|
|
15452
|
+
}
|
|
15269
15453
|
this.showGuide.set(true);
|
|
15270
15454
|
this.guideX.set(this.getCurrentDraggedPx());
|
|
15271
15455
|
window.addEventListener('mousemove', this.onMove);
|
|
@@ -15291,14 +15475,16 @@ class EditorRulerComponent {
|
|
|
15291
15475
|
return this.leftIndentPx();
|
|
15292
15476
|
case 'rightIndent':
|
|
15293
15477
|
return this.rightIndentPx();
|
|
15478
|
+
case 'tabs':
|
|
15479
|
+
return this.tabSettings()[this.draggableTabIndex].position + this.leftMarginPageFormatPx();
|
|
15294
15480
|
}
|
|
15295
15481
|
}
|
|
15296
15482
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15297
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorRulerComponent, isStandalone: true, selector: "app-nod-editor-ruler", inputs: { unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "rulerContainer", first: true, predicate: ["rulerContainer"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"ruler-container\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div
|
|
15483
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorRulerComponent, isStandalone: true, selector: "app-nod-editor-ruler", inputs: { unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "rulerContainer", first: true, predicate: ["rulerContainer"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"ruler-container\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div\n class=\"ruler-track\"\n (mousedown)=\"addTab($event)\"\n (touchstart)=\"addTab($event)\"\n (dblclick)=\"onOpenDialog()\">\n @for (tick of ticks; track tick) {\n <div\n class=\"tick\"\n [style.left.px]=\"tick.position\"\n [class.major]=\"tick.major\"\n [class.half]=\"tick.half\">\n @if (tick.label !== null) {\n <span class=\"label\">\n {{ tick.label }}\n </span>\n }\n </div>\n }\n </div>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"leftIndentPx()\"\n (mousedown)=\"startDrag($event, 'leftIndent')\"\n (touchstart)=\"startDrag($event, 'leftIndent')\" />\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-down\"\n class=\"paragraph-marker\"\n [style.left.px]=\"firstLinePx()\"\n (mousedown)=\"startDrag($event, 'first')\"\n (touchstart)=\"startDrag($event, 'first')\" />\n @for (tabSetting of tabSettings(); track tabSetting; let index = $index) {\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"tabSetting.position + this.leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'tabs', index)\"\n (touchstart)=\"startDrag($event, 'tabs', index)\"\n (dblclick)=\"onOpenDialog()\" />\n }\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightIndentPx()\"\n (mousedown)=\"startDrag($event, 'rightIndent')\"\n (touchstart)=\"startDrag($event, 'rightIndent')\" />\n @if (showGuide()) {\n <div\n class=\"drag-guide\"\n [style.left.px]=\"guideX()\"></div>\n }\n</div>\n", styles: [":host{display:flex;width:100%;height:22px;justify-content:center;align-items:center}.ruler-container{position:relative;height:18px;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;-webkit-user-select:none;user-select:none}.ruler-track{position:absolute;left:0;right:0;bottom:0;height:18px;overflow:hidden}.tick{position:absolute;top:50%;transform:translateY(-50%);width:1px;height:4px}.major{height:0}.half{height:8px}.label{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:10px}mat-icon{position:absolute;width:17px;height:17px;font-size:18px;font-weight:700;cursor:grab;z-index:2;transform:translate(-50%)}.drag-guide{position:absolute;height:2000px;top:10px;width:1px;z-index:9999;pointer-events:none;will-change:left}.paragraph-marker{top:-6px;z-index:2}.page-marker{bottom:-6px;z-index:2}.left-area,.right-area,.separator{position:absolute;height:18px}.separator{width:5px;transform:translate(-50%);background-color:transparent;cursor:ew-resize;z-index:2}.left-area{left:0}.right-area{right:0}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15298
15484
|
}
|
|
15299
15485
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, decorators: [{
|
|
15300
15486
|
type: Component,
|
|
15301
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-ruler', imports: [MatIconModule, AsyncPipe], template: "<div\n class=\"ruler-container\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div
|
|
15487
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-ruler', imports: [MatIconModule, AsyncPipe], template: "<div\n class=\"ruler-container\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div\n class=\"ruler-track\"\n (mousedown)=\"addTab($event)\"\n (touchstart)=\"addTab($event)\"\n (dblclick)=\"onOpenDialog()\">\n @for (tick of ticks; track tick) {\n <div\n class=\"tick\"\n [style.left.px]=\"tick.position\"\n [class.major]=\"tick.major\"\n [class.half]=\"tick.half\">\n @if (tick.label !== null) {\n <span class=\"label\">\n {{ tick.label }}\n </span>\n }\n </div>\n }\n </div>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"leftIndentPx()\"\n (mousedown)=\"startDrag($event, 'leftIndent')\"\n (touchstart)=\"startDrag($event, 'leftIndent')\" />\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-down\"\n class=\"paragraph-marker\"\n [style.left.px]=\"firstLinePx()\"\n (mousedown)=\"startDrag($event, 'first')\"\n (touchstart)=\"startDrag($event, 'first')\" />\n @for (tabSetting of tabSettings(); track tabSetting; let index = $index) {\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"tabSetting.position + this.leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'tabs', index)\"\n (touchstart)=\"startDrag($event, 'tabs', index)\"\n (dblclick)=\"onOpenDialog()\" />\n }\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightIndentPx()\"\n (mousedown)=\"startDrag($event, 'rightIndent')\"\n (touchstart)=\"startDrag($event, 'rightIndent')\" />\n @if (showGuide()) {\n <div\n class=\"drag-guide\"\n [style.left.px]=\"guideX()\"></div>\n }\n</div>\n", styles: [":host{display:flex;width:100%;height:22px;justify-content:center;align-items:center}.ruler-container{position:relative;height:18px;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;-webkit-user-select:none;user-select:none}.ruler-track{position:absolute;left:0;right:0;bottom:0;height:18px;overflow:hidden}.tick{position:absolute;top:50%;transform:translateY(-50%);width:1px;height:4px}.major{height:0}.half{height:8px}.label{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:10px}mat-icon{position:absolute;width:17px;height:17px;font-size:18px;font-weight:700;cursor:grab;z-index:2;transform:translate(-50%)}.drag-guide{position:absolute;height:2000px;top:10px;width:1px;z-index:9999;pointer-events:none;will-change:left}.paragraph-marker{top:-6px;z-index:2}.page-marker{bottom:-6px;z-index:2}.left-area,.right-area,.separator{position:absolute;height:18px}.separator{width:5px;transform:translate(-50%);background-color:transparent;cursor:ew-resize;z-index:2}.left-area{left:0}.right-area{right:0}\n"] }]
|
|
15302
15488
|
}], ctorParameters: () => [], propDecorators: { rulerContainer: [{
|
|
15303
15489
|
type: ViewChild,
|
|
15304
15490
|
args: ['rulerContainer', { static: true }]
|
|
@@ -15359,6 +15545,7 @@ class EditorComponent {
|
|
|
15359
15545
|
this.sidenavComponentRef = this.componentService.createComponent(data.component, data?.data);
|
|
15360
15546
|
this.componentService.attachComponent(this.sidenavContainer.nativeElement, this.sidenavComponentRef);
|
|
15361
15547
|
if (!this.sidenav.opened) {
|
|
15548
|
+
this.sidenav.autoFocus = data.focus;
|
|
15362
15549
|
this.sidenav.open().catch(() => {
|
|
15363
15550
|
// continue regardless of error
|
|
15364
15551
|
});
|
|
@@ -15513,7 +15700,7 @@ class NoderTranslateLoader extends TranslateHttpLoader {
|
|
|
15513
15700
|
getTranslation(lang) {
|
|
15514
15701
|
return super.getTranslation(lang).pipe(catchError(() => super.getTranslation('en')));
|
|
15515
15702
|
}
|
|
15516
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTranslateLoader, deps: [{ token: i1$
|
|
15703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTranslateLoader, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15517
15704
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTranslateLoader, providedIn: 'root' }); }
|
|
15518
15705
|
}
|
|
15519
15706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTranslateLoader, decorators: [{
|
|
@@ -15521,7 +15708,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
15521
15708
|
args: [{
|
|
15522
15709
|
providedIn: 'root'
|
|
15523
15710
|
}]
|
|
15524
|
-
}], ctorParameters: () => [{ type: i1$
|
|
15711
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }] });
|
|
15525
15712
|
|
|
15526
15713
|
var Mode;
|
|
15527
15714
|
(function (Mode) {
|
|
@@ -15677,7 +15864,7 @@ class ToolbarCoreService {
|
|
|
15677
15864
|
}
|
|
15678
15865
|
openBurgerMenu() {
|
|
15679
15866
|
this.mode = EditorToolbarMode.Menu;
|
|
15680
|
-
this.editorService.openSidenav(MenuDropdownsMobileComponent);
|
|
15867
|
+
this.editorService.openSidenav(MenuDropdownsMobileComponent, true);
|
|
15681
15868
|
}
|
|
15682
15869
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarCoreService, deps: [{ token: EditorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15683
15870
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarCoreService }); }
|
|
@@ -17508,7 +17695,7 @@ class PageSetupComponent {
|
|
|
17508
17695
|
return customPageSize;
|
|
17509
17696
|
}
|
|
17510
17697
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, deps: [{ token: EditorService }, { token: ToolbarCoreService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17511
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: PageSetupComponent, isStandalone: true, selector: "app-nod-page-setup", viewQueries: [{ propertyName: "pageSizeForm", first: true, predicate: ["pageSizeForm"], descendants: true }], ngImport: i0, template: "<div class=\"title\">\n <mat-icon\n fontSet=\"noder-icon\"\n (click)=\"onClose()\"\n fontIcon=\"icon-arrow-forward\" />\n <span>{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n</div>\n<form #pageSizeForm=\"ngForm\">\n <div class=\"content\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.APPLY_TO' | translate }}</mat-label>\n <mat-select [(value)]=\"selectedDocumentArea\">\n <mat-option [value]=\"documentAreas.WholeDocument\">{{ 'NODER.LABEL.WHOLE_DOCUMENT' | translate }}</mat-option>\n <mat-option [value]=\"documentAreas.ThisSection\">{{ 'NODER.LABEL.THIS_SECTION' | translate }}</mat-option>\n @if (hasSelection$ | async) {\n <mat-option [value]=\"documentAreas.SelectedText\">{{ 'NODER.LABEL.SELECTED_TEXT' | translate }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <div class=\"orientation\">\n <div class=\"label\">{{ 'NODER.LABEL.ORIENTATION' | translate }}</div>\n <mat-radio-group\n aria-label=\"Select an option\"\n [(ngModel)]=\"pageSize.orientation\"\n name=\"orientation\"\n (change)=\"onPageOrientationChanged()\">\n <mat-radio-button [value]=\"pageOrientations.Portrait\">\n <span>{{ 'NODER.LABEL.PORTRAIT' | translate }}</span>\n </mat-radio-button>\n <mat-radio-button [value]=\"pageOrientations.Landscape\">\n <span>{{ 'NODER.LABEL.LANDSCAPE' | translate }}</span>\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <div class=\"page-format\">\n <div class=\"page-format-tile\">\n <div class=\"label\">{{ 'NODER.LABEL.PAGE_FORMAT' | translate }}</div>\n <div class=\"checkbox-area\">\n <div class=\"checkbox-label\">{{ 'NODER.LABEL.CUSTOM_SIZE' | translate }}</div>\n <mat-checkbox\n [checked]=\"pageSize.isCustom\"\n (change)=\"toggleCustomSize($event)\" />\n </div>\n </div>\n @if (!pageSize.isCustom) {\n <div class=\"page-size\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SIZE' | translate }}</mat-label>\n <mat-select\n [(value)]=\"pageSizeName\"\n (selectionChange)=\"onPageSizeChange()\">\n @for (option of pageSizes; track option) {\n <mat-option [value]=\"option.name\">\n <div class=\"size-option\">\n <span class=\"option-name\">{{ option.name + ' ' }}</span>\n <span class=\"option-size\">{{ option.size }}</span>\n </div>\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n } @else {\n <div class=\"page-custom-size\">\n <mat-form-field\n appearance=\"outline\"\n class=\"size-unit\">\n <mat-label>{{ 'NODER.LABEL.MEASURE' | translate }}</mat-label>\n <mat-select\n [(ngModel)]=\"pageSize.unit\"\n name=\"unit\"\n (valueChange)=\"onUnitChanged($event)\">\n <mat-option [value]=\"sizeUnits.Millimeters\">{{ 'NODER.LABEL.MILLIMETERS' | translate }}</mat-option>\n <mat-option [value]=\"sizeUnits.Inches\">{{ 'NODER.LABEL.INCHES' | translate }}</mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-width\">\n <mat-label>{{ ('NODER.LABEL.WIDTH' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customWidth\"\n name=\"customWidth\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-height\">\n <mat-label>{{ ('NODER.LABEL.HEIGHT' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customHeight\"\n name=\"customHeight\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n <div class=\"actions\">\n <button\n mat-stroked-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"pageSizeForm.pristine\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n </div>\n</form>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:400px}.title{margin:12px 16px;height:32px;display:flex;align-items:center;gap:8px}.title span{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-style:normal;font-weight:500;line-height:normal}.content{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:8px 16px 0;gap:24px}.actions{display:flex;justify-content:flex-end;margin:0 16px 16px;gap:10px}.actions .mdc-button{width:32px;height:32px;min-width:32px;padding:0}.actions .mdc-button .mat-icon{margin-right:0;margin-left:0}.orientation{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orientation mat-radio-group{display:flex;width:100%;gap:16px}.label{font-size:14px;font-style:normal;font-weight:400;line-height:normal}.page-format{display:flex;flex-direction:column;gap:16px}.page-format-tile{display:flex;align-items:center;justify-content:space-between}.page-format-tile .checkbox-area{display:flex;align-items:center}.checkbox-label{font-size:12px;font-style:normal;font-weight:400;line-height:normal}.custom-width,.custom-height,.size-unit{width:120px}.page-custom-size{display:flex;flex-direction:column}.size-panel{display:flex;gap:10px}.size-panel .mdc-button{width:40px;height:40px;min-width:40px;padding:0}.size-panel .mdc-button .mat-icon{margin-right:0;margin-left:0}.size-option{display:flex;flex-direction:column}.option-name{font-weight:400}.option-size{font-size:12px}form{display:flex;flex-direction:column;flex:1}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { 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: MatFormFieldModule }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i12.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i12.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17698
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: PageSetupComponent, isStandalone: true, selector: "app-nod-page-setup", viewQueries: [{ propertyName: "pageSizeForm", first: true, predicate: ["pageSizeForm"], descendants: true }], ngImport: i0, template: "<div class=\"title\">\n <mat-icon\n fontSet=\"noder-icon\"\n (click)=\"onClose()\"\n fontIcon=\"icon-arrow-forward\" />\n <span>{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n</div>\n<form #pageSizeForm=\"ngForm\">\n <div class=\"content\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.APPLY_TO' | translate }}</mat-label>\n <mat-select [(value)]=\"selectedDocumentArea\">\n <mat-option [value]=\"documentAreas.WholeDocument\">{{ 'NODER.LABEL.WHOLE_DOCUMENT' | translate }}</mat-option>\n <mat-option [value]=\"documentAreas.ThisSection\">{{ 'NODER.LABEL.THIS_SECTION' | translate }}</mat-option>\n @if (hasSelection$ | async) {\n <mat-option [value]=\"documentAreas.SelectedText\">{{ 'NODER.LABEL.SELECTED_TEXT' | translate }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <div class=\"orientation\">\n <div class=\"label\">{{ 'NODER.LABEL.ORIENTATION' | translate }}</div>\n <mat-radio-group\n aria-label=\"Select an option\"\n [(ngModel)]=\"pageSize.orientation\"\n name=\"orientation\"\n (change)=\"onPageOrientationChanged()\">\n <mat-radio-button [value]=\"pageOrientations.Portrait\">\n <span>{{ 'NODER.LABEL.PORTRAIT' | translate }}</span>\n </mat-radio-button>\n <mat-radio-button [value]=\"pageOrientations.Landscape\">\n <span>{{ 'NODER.LABEL.LANDSCAPE' | translate }}</span>\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <div class=\"page-format\">\n <div class=\"page-format-tile\">\n <div class=\"label\">{{ 'NODER.LABEL.PAGE_FORMAT' | translate }}</div>\n <div class=\"checkbox-area\">\n <div class=\"checkbox-label\">{{ 'NODER.LABEL.CUSTOM_SIZE' | translate }}</div>\n <mat-checkbox\n [checked]=\"pageSize.isCustom\"\n (change)=\"toggleCustomSize($event)\" />\n </div>\n </div>\n @if (!pageSize.isCustom) {\n <div class=\"page-size\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SIZE' | translate }}</mat-label>\n <mat-select\n [(value)]=\"pageSizeName\"\n (selectionChange)=\"onPageSizeChange()\">\n @for (option of pageSizes; track option) {\n <mat-option [value]=\"option.name\">\n <div class=\"size-option\">\n <span class=\"option-name\">{{ option.name + ' ' }}</span>\n <span class=\"option-size\">{{ option.size }}</span>\n </div>\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n } @else {\n <div class=\"page-custom-size\">\n <mat-form-field\n appearance=\"outline\"\n class=\"size-unit\">\n <mat-label>{{ 'NODER.LABEL.MEASURE' | translate }}</mat-label>\n <mat-select\n [(ngModel)]=\"pageSize.unit\"\n name=\"unit\"\n (valueChange)=\"onUnitChanged($event)\">\n <mat-option [value]=\"sizeUnits.Millimeters\">{{ 'NODER.LABEL.MILLIMETERS' | translate }}</mat-option>\n <mat-option [value]=\"sizeUnits.Inches\">{{ 'NODER.LABEL.INCHES' | translate }}</mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-width\">\n <mat-label>{{ ('NODER.LABEL.WIDTH' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customWidth\"\n name=\"customWidth\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-height\">\n <mat-label>{{ ('NODER.LABEL.HEIGHT' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customHeight\"\n name=\"customHeight\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n <div class=\"actions\">\n <button\n mat-stroked-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"pageSizeForm.pristine\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n </div>\n</form>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:400px}.title{margin:12px 16px;height:32px;display:flex;align-items:center;gap:8px}.title span{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-style:normal;font-weight:500;line-height:normal}.content{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:8px 16px 0;gap:24px}.actions{display:flex;justify-content:flex-end;margin:0 16px 16px;gap:10px}.actions .mdc-button{width:32px;height:32px;min-width:32px;padding:0}.actions .mdc-button .mat-icon{margin-right:0;margin-left:0}.orientation{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orientation mat-radio-group{display:flex;width:100%;gap:16px}.label{font-size:14px;font-style:normal;font-weight:400;line-height:normal}.page-format{display:flex;flex-direction:column;gap:16px}.page-format-tile{display:flex;align-items:center;justify-content:space-between}.page-format-tile .checkbox-area{display:flex;align-items:center}.checkbox-label{font-size:12px;font-style:normal;font-weight:400;line-height:normal}.custom-width,.custom-height,.size-unit{width:120px}.page-custom-size{display:flex;flex-direction:column}.size-panel{display:flex;gap:10px}.size-panel .mdc-button{width:40px;height:40px;min-width:40px;padding:0}.size-panel .mdc-button .mat-icon{margin-right:0;margin-left:0}.size-option{display:flex;flex-direction:column}.option-name{font-weight:400}.option-size{font-size:12px}form{display:flex;flex-direction:column;flex:1}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { 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: MatFormFieldModule }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i12.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i12.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17512
17699
|
}
|
|
17513
17700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, decorators: [{
|
|
17514
17701
|
type: Component,
|
|
@@ -17578,7 +17765,8 @@ class RevisionHelper {
|
|
|
17578
17765
|
beforeAutospacing: paragraphStyle.beforeAutospacing ?? DEFAULT_PARAGRAPH_STYLE.beforeAutospacing,
|
|
17579
17766
|
afterAutospacing: paragraphStyle.afterAutospacing ?? DEFAULT_PARAGRAPH_STYLE.afterAutospacing,
|
|
17580
17767
|
numberingId: paragraphStyle.numberingId ?? DEFAULT_PARAGRAPH_STYLE.numberingId,
|
|
17581
|
-
numberingLevel: paragraphStyle.numberingLevel ?? DEFAULT_PARAGRAPH_STYLE.numberingLevel
|
|
17768
|
+
numberingLevel: paragraphStyle.numberingLevel ?? DEFAULT_PARAGRAPH_STYLE.numberingLevel,
|
|
17769
|
+
tabSettings: paragraphStyle.tabSettings ?? DEFAULT_PARAGRAPH_STYLE.tabSettings
|
|
17582
17770
|
});
|
|
17583
17771
|
}
|
|
17584
17772
|
static getEmptyDocxModel() {
|
|
@@ -17658,8 +17846,8 @@ class AddLinkDialogComponent {
|
|
|
17658
17846
|
}
|
|
17659
17847
|
this.dialogRef.close({ text: this.form.controls.text.value, link: this.form.controls.link.value });
|
|
17660
17848
|
}
|
|
17661
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkDialogComponent, deps: [{ token: i1$
|
|
17662
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AddLinkDialogComponent, isStandalone: true, selector: "app-nod-add-link-dialog", host: { listeners: { "keydown.esc": "onClose()", "keydown.enter": "onApply()" }, properties: { "class.noder-modal": "this.modal" } }, ngImport: i0, template: "<div mat-dialog-title>{{ 'NODER.LABEL.ADD_LINK' | translate }}</div>\n<div\n mat-dialog-content\n [formGroup]=\"form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.TEXT' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"form.controls.text\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_TEXT_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.LINK' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"form.controls.link\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_LINK_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-raised-button\n color=\"primary\"\n class=\"apply-btn\"\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:300px;width:430px;overflow:hidden}:host ::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: 12px;height:48px}:host ::ng-deep .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:12px}.mat-mdc-dialog-title{font-weight:600;padding-top:5px}mat-form-field{width:100%}.mat-mdc-dialog-content{padding-top:10px!important;padding-bottom:0}.mat-mdc-dialog-actions{display:flex;justify-content:center;padding-top:5px;height:40px;margin-bottom:30px}.mat-mdc-dialog-actions button{width:30%;height:100%;letter-spacing:1px;border-radius:8px;text-transform:uppercase}.mat-mdc-dialog-actions button .apply-btn{font-weight:400}.mat-mdc-dialog-actions button .mat-icon{font-size:24px;height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: MatDialogModule }, { kind: "directive", type: i1$
|
|
17849
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkDialogComponent, deps: [{ token: i1$1.MatDialogRef }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17850
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AddLinkDialogComponent, isStandalone: true, selector: "app-nod-add-link-dialog", host: { listeners: { "keydown.esc": "onClose()", "keydown.enter": "onApply()" }, properties: { "class.noder-modal": "this.modal" } }, ngImport: i0, template: "<div mat-dialog-title>{{ 'NODER.LABEL.ADD_LINK' | translate }}</div>\n<div\n mat-dialog-content\n [formGroup]=\"form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.TEXT' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"form.controls.text\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_TEXT_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.LINK' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"form.controls.link\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_LINK_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-raised-button\n color=\"primary\"\n class=\"apply-btn\"\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:300px;width:430px;overflow:hidden}:host ::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: 12px;height:48px}:host ::ng-deep .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:12px}.mat-mdc-dialog-title{font-weight:600;padding-top:5px}mat-form-field{width:100%}.mat-mdc-dialog-content{padding-top:10px!important;padding-bottom:0}.mat-mdc-dialog-actions{display:flex;justify-content:center;padding-top:5px;height:40px;margin-bottom:30px}.mat-mdc-dialog-actions button{width:30%;height:100%;letter-spacing:1px;border-radius:8px;text-transform:uppercase}.mat-mdc-dialog-actions button .apply-btn{font-weight:400}.mat-mdc-dialog-actions button .mat-icon{font-size:24px;height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: 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: MatFormFieldModule }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17663
17851
|
}
|
|
17664
17852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkDialogComponent, decorators: [{
|
|
17665
17853
|
type: Component,
|
|
@@ -17673,7 +17861,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
17673
17861
|
ReactiveFormsModule,
|
|
17674
17862
|
TranslateModule
|
|
17675
17863
|
], selector: 'app-nod-add-link-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div mat-dialog-title>{{ 'NODER.LABEL.ADD_LINK' | translate }}</div>\n<div\n mat-dialog-content\n [formGroup]=\"form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.TEXT' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"form.controls.text\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_TEXT_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.LINK' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"form.controls.link\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_LINK_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-raised-button\n color=\"primary\"\n class=\"apply-btn\"\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:300px;width:430px;overflow:hidden}:host ::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: 12px;height:48px}:host ::ng-deep .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:12px}.mat-mdc-dialog-title{font-weight:600;padding-top:5px}mat-form-field{width:100%}.mat-mdc-dialog-content{padding-top:10px!important;padding-bottom:0}.mat-mdc-dialog-actions{display:flex;justify-content:center;padding-top:5px;height:40px;margin-bottom:30px}.mat-mdc-dialog-actions button{width:30%;height:100%;letter-spacing:1px;border-radius:8px;text-transform:uppercase}.mat-mdc-dialog-actions button .apply-btn{font-weight:400}.mat-mdc-dialog-actions button .mat-icon{font-size:24px;height:24px}\n"] }]
|
|
17676
|
-
}], ctorParameters: () => [{ type: i1$
|
|
17864
|
+
}], ctorParameters: () => [{ type: i1$1.MatDialogRef }, { type: i2.FormBuilder }], propDecorators: { modal: [{
|
|
17677
17865
|
type: HostBinding,
|
|
17678
17866
|
args: ['class.noder-modal']
|
|
17679
17867
|
}], onClose: [{
|
|
@@ -17724,7 +17912,7 @@ class ConfirmDialogComponent {
|
|
|
17724
17912
|
onClose(status) {
|
|
17725
17913
|
this.ref.close(status);
|
|
17726
17914
|
}
|
|
17727
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$
|
|
17915
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17728
17916
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ConfirmDialogComponent, isStandalone: true, selector: "app-nod-confirm-dialog", host: { properties: { "class.noder-modal": "this.modal" } }, ngImport: i0, template: "<p class=\"title\">{{ data.title ? data.title : ('NODER.LABEL.CONFIRMATION' | translate) }}</p>\n<div class=\"content\">\n <p>{{ data.message }}</p>\n</div>\n<div class=\"actions\">\n <button\n id=\"confirm-dialog-cancel-btn\"\n mat-button\n (click)=\"onClose(false)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\"></mat-icon>\n {{ data.cancel ? data.cancel : ('NODER.LABEL.CANCEL' | translate) }}\n </button>\n <button\n id=\"confirm-dialog-confirm-btn\"\n mat-raised-button\n class=\"delete-btn\"\n color=\"primary\"\n (click)=\"onClose(true)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\"></mat-icon>\n {{ data.confirm ? data.confirm : ('NODER.LABEL.DELETE' | translate) }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-width:400px;max-width:440px;min-height:208px}.title{font-size:18px;font-weight:700;text-transform:capitalize;padding:24px 24px 12px;margin:0;border-bottom-width:1px;border-bottom-style:solid}.content{display:flex;flex:1;font-size:16px;line-height:20px;padding:20px 24px 16px}.content p{margin:0;overflow:hidden;text-overflow:ellipsis}.actions{display:flex;justify-content:center;margin-bottom:24px;gap:8px}.actions button{height:40px;width:120px;text-transform:uppercase}.actions button mat-icon{font-size:24px;height:24px;width:24px}.actions button .mat-button-toggle-label-content{padding:0 2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
|
|
17729
17917
|
}
|
|
17730
17918
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
@@ -17733,7 +17921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
17733
17921
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
17734
17922
|
type: Inject,
|
|
17735
17923
|
args: [MAT_DIALOG_DATA]
|
|
17736
|
-
}] }, { type: i1$
|
|
17924
|
+
}] }, { type: i1$1.MatDialogRef }], propDecorators: { modal: [{
|
|
17737
17925
|
type: HostBinding,
|
|
17738
17926
|
args: ['class.noder-modal']
|
|
17739
17927
|
}] } });
|