@talrace/ngx-noder 19.0.53 → 19.0.55
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 +2 -4
- package/assets/i18n/noder.es.json +2 -4
- package/assets/i18n/noder.ru.json +2 -4
- package/fesm2022/talrace-ngx-noder.mjs +41 -78
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-search-bar/editor-search-bar.component.d.ts +2 -2
- package/lib/editor/display/layers/layer.config.d.ts +0 -1
- package/lib/editor/display/render-changes.model.d.ts +0 -1
- package/lib/editor/display/renderer.d.ts +0 -2
- package/lib/editor/display/virtual.renderer.d.ts +0 -1
- package/lib/editor/execution/regulator.service.d.ts +0 -2
- package/package.json +1 -1
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.scss +9 -0
- package/src/assets/fonts/nc-iconfont.svg +4 -1
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
- package/src/lib/apart-components/editor-search-bar/_theme.scss +10 -1
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"INSERT_COLUMNS_TO_THE_RIGHT": "Insert {{ count }} columns to the right",
|
|
6
6
|
"INSERT_ROWS_ABOVE": "Insert {{ count }} rows above",
|
|
7
7
|
"INSERT_ROWS_BELOW": "Insert {{ count }} rows below",
|
|
8
|
-
"OF_COUNTER": "{{ current }} of {{ total }}",
|
|
9
8
|
"REMOVE_COLUMNS": "Remove {{ count }} columns",
|
|
10
9
|
"REMOVE_ROWS": "Remove {{ count }} rows"
|
|
11
10
|
},
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
"NEW": "New",
|
|
79
78
|
"NONE": "None",
|
|
80
79
|
"NO_BORDER": "No border",
|
|
81
|
-
"NO_RESULTS": "No Results",
|
|
82
80
|
"NUMBERED_LIST_MENU": "Numbered List Menu",
|
|
83
81
|
"ODD_PAGES_FOOTER": "Odd Pages Footer",
|
|
84
82
|
"ODD_PAGES_HEADER": "Odd Pages Header",
|
|
@@ -102,14 +100,14 @@
|
|
|
102
100
|
"REMOVE_TABLE": "Remove table",
|
|
103
101
|
"RENAME": "Rename",
|
|
104
102
|
"REPLACE": "Replace",
|
|
105
|
-
"REPLACE_WITH": "Replace with",
|
|
106
103
|
"RIGHT": "Right",
|
|
107
104
|
"RIGHT_BORDER": "Right border",
|
|
108
105
|
"ROWS": "Rows",
|
|
109
106
|
"SAVE": "Save",
|
|
110
107
|
"SAVE_AS": "Save As",
|
|
111
108
|
"SAVE_AS_TEMPLATE": "Save As Template",
|
|
112
|
-
"
|
|
109
|
+
"SEARCH": "Search",
|
|
110
|
+
"SEARCH_AND_REPLACE": "Search & Replace",
|
|
113
111
|
"SELECTED_TEXT": "Selected Text",
|
|
114
112
|
"SELECT_ALL": "Select All",
|
|
115
113
|
"SET_DEFAULT_VALUE": "Setting the initial value",
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"INSERT_COLUMNS_TO_THE_RIGHT": "Inserte {{ count }} columnas a la derecha",
|
|
6
6
|
"INSERT_ROWS_ABOVE": "Inserte {{ count }} filas arriba",
|
|
7
7
|
"INSERT_ROWS_BELOW": "Inserte {{ count }} filas debajo",
|
|
8
|
-
"OF_COUNTER": "{{ current }} de {{ total }}",
|
|
9
8
|
"REMOVE_COLUMNS": "Eliminar columnas {{ count }} ",
|
|
10
9
|
"REMOVE_ROWS": "Eliminar {{ count }} filas"
|
|
11
10
|
},
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
"NEW": "Nuevo",
|
|
79
78
|
"NONE": "Ninguna",
|
|
80
79
|
"NO_BORDER": "Sin fronteras",
|
|
81
|
-
"NO_RESULTS": "No hay resultados",
|
|
82
80
|
"NUMBERED_LIST_MENU": "Menú de Lista Numerada",
|
|
83
81
|
"ODD_PAGES_FOOTER": "Pie de Página de Páginas Impares",
|
|
84
82
|
"ODD_PAGES_HEADER": "Encabezado de Páginas Impares",
|
|
@@ -102,14 +100,14 @@
|
|
|
102
100
|
"REMOVE_TABLE": "Eliminar tabla",
|
|
103
101
|
"RENAME": "Renombrar",
|
|
104
102
|
"REPLACE": "Reemplazar",
|
|
105
|
-
"REPLACE_WITH": "Reemplazar con",
|
|
106
103
|
"RIGHT": "Correcto",
|
|
107
104
|
"RIGHT_BORDER": "Borde derecho",
|
|
108
105
|
"ROWS": "Filas",
|
|
109
106
|
"SAVE": "Guardar",
|
|
110
107
|
"SAVE_AS": "Guardar Como",
|
|
111
108
|
"SAVE_AS_TEMPLATE": "Guardar Como Plantilla",
|
|
112
|
-
"
|
|
109
|
+
"SEARCH": "Buscar",
|
|
110
|
+
"SEARCH_AND_REPLACE": "Buscar y Reemplazar",
|
|
113
111
|
"SELECTED_TEXT": "Texto seleccionado",
|
|
114
112
|
"SELECT_ALL": "Seleccionar Todo",
|
|
115
113
|
"SET_DEFAULT_VALUE": "Valor inicial",
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"INSERT_COLUMNS_TO_THE_RIGHT": "Вставить {{ count }} столбцов справа",
|
|
6
6
|
"INSERT_ROWS_ABOVE": "Вставить {{ count }} строк выше",
|
|
7
7
|
"INSERT_ROWS_BELOW": "Вставить {{ count }} строк ниже",
|
|
8
|
-
"OF_COUNTER": "{{ current }} из {{ total }}",
|
|
9
8
|
"REMOVE_COLUMNS": "Удалить {{ count }} столбцов",
|
|
10
9
|
"REMOVE_ROWS": "Удалить {{ count }} строк"
|
|
11
10
|
},
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
"NEW": "Новый",
|
|
79
78
|
"NONE": "Нет",
|
|
80
79
|
"NO_BORDER": "Нет границы",
|
|
81
|
-
"NO_RESULTS": "Нет Результатов",
|
|
82
80
|
"NUMBERED_LIST_MENU": "Меню нумерованного списка",
|
|
83
81
|
"ODD_PAGES_FOOTER": "Нижний колонтитул нечетных страниц",
|
|
84
82
|
"ODD_PAGES_HEADER": "Верхний колонтитул нечетных страниц",
|
|
@@ -102,14 +100,14 @@
|
|
|
102
100
|
"REMOVE_TABLE": "Удалить таблицу",
|
|
103
101
|
"RENAME": "Переименовать",
|
|
104
102
|
"REPLACE": "Заменить",
|
|
105
|
-
"REPLACE_WITH": "Заменить на",
|
|
106
103
|
"RIGHT": "По правому краю",
|
|
107
104
|
"RIGHT_BORDER": "Правая граница",
|
|
108
105
|
"ROWS": "Строки",
|
|
109
106
|
"SAVE": "Сохранить",
|
|
110
107
|
"SAVE_AS": "Сохранить как",
|
|
111
108
|
"SAVE_AS_TEMPLATE": "Сохранить как шаблон",
|
|
112
|
-
"
|
|
109
|
+
"SEARCH": "Поиск",
|
|
110
|
+
"SEARCH_AND_REPLACE": "Найти и заменить",
|
|
113
111
|
"SELECTED_TEXT": "Выбранный текст",
|
|
114
112
|
"SELECT_ALL": "Выбрать все",
|
|
115
113
|
"SET_DEFAULT_VALUE": "Задание начального значения",
|
|
@@ -10250,7 +10250,7 @@ class CommentHighlightLayer extends HighlightLayer {
|
|
|
10250
10250
|
}
|
|
10251
10251
|
update(config) {
|
|
10252
10252
|
const comments = this.session.model.comments;
|
|
10253
|
-
if (!
|
|
10253
|
+
if (!comments?.length || !this.enabled) {
|
|
10254
10254
|
this.element.innerHTML = '';
|
|
10255
10255
|
return;
|
|
10256
10256
|
}
|
|
@@ -10391,6 +10391,12 @@ class CursorLayer {
|
|
|
10391
10391
|
}
|
|
10392
10392
|
}
|
|
10393
10393
|
|
|
10394
|
+
class CustomElementInfo {
|
|
10395
|
+
constructor(init) {
|
|
10396
|
+
Object.assign(this, init);
|
|
10397
|
+
}
|
|
10398
|
+
}
|
|
10399
|
+
|
|
10394
10400
|
class GrammarHighlightLayer extends HighlightLayer {
|
|
10395
10401
|
constructor(parentEl, cssClass, session) {
|
|
10396
10402
|
super(parentEl, cssClass, session);
|
|
@@ -10398,7 +10404,7 @@ class GrammarHighlightLayer extends HighlightLayer {
|
|
|
10398
10404
|
this.errorsByParagraph = new Map();
|
|
10399
10405
|
}
|
|
10400
10406
|
update(config) {
|
|
10401
|
-
if (!
|
|
10407
|
+
if (!this.errorsByParagraph.size || this.session.editorService.isViewOnly) {
|
|
10402
10408
|
this.element.innerHTML = '';
|
|
10403
10409
|
return;
|
|
10404
10410
|
}
|
|
@@ -10456,8 +10462,7 @@ class RenderChangesModel {
|
|
|
10456
10462
|
this.scroll ||
|
|
10457
10463
|
this.size ||
|
|
10458
10464
|
this.text ||
|
|
10459
|
-
this.dragAndDrop
|
|
10460
|
-
this.visibilityChanged);
|
|
10465
|
+
this.dragAndDrop);
|
|
10461
10466
|
}
|
|
10462
10467
|
constructor(fields) {
|
|
10463
10468
|
this.cursor = false;
|
|
@@ -10473,7 +10478,6 @@ class RenderChangesModel {
|
|
|
10473
10478
|
this.size = false;
|
|
10474
10479
|
this.text = false;
|
|
10475
10480
|
this.dragAndDrop = false;
|
|
10476
|
-
this.visibilityChanged = false;
|
|
10477
10481
|
if (!fields) {
|
|
10478
10482
|
return;
|
|
10479
10483
|
}
|
|
@@ -10486,12 +10490,6 @@ class RenderChangesModel {
|
|
|
10486
10490
|
}
|
|
10487
10491
|
}
|
|
10488
10492
|
|
|
10489
|
-
class CustomElementInfo {
|
|
10490
|
-
constructor(init) {
|
|
10491
|
-
Object.assign(this, init);
|
|
10492
|
-
}
|
|
10493
|
-
}
|
|
10494
|
-
|
|
10495
10493
|
class SearchHighlightLayer extends HighlightLayer {
|
|
10496
10494
|
constructor(parentEl, cssClass, session) {
|
|
10497
10495
|
super(parentEl, cssClass, session);
|
|
@@ -10501,9 +10499,6 @@ class SearchHighlightLayer extends HighlightLayer {
|
|
|
10501
10499
|
this.customElementsRanges = [];
|
|
10502
10500
|
}
|
|
10503
10501
|
update(config) {
|
|
10504
|
-
if (!config?.isVisible) {
|
|
10505
|
-
return;
|
|
10506
|
-
}
|
|
10507
10502
|
this.config = config;
|
|
10508
10503
|
this.selectionIndex = 0;
|
|
10509
10504
|
this.getVisibleCustomElementResults(config);
|
|
@@ -10871,10 +10866,8 @@ class Renderer extends EventEmitting {
|
|
|
10871
10866
|
endLine: 0,
|
|
10872
10867
|
endScreenLine: 0,
|
|
10873
10868
|
endScreenFullLine: 0
|
|
10874
|
-
}
|
|
10875
|
-
isVisible: false
|
|
10869
|
+
}
|
|
10876
10870
|
};
|
|
10877
|
-
this.isVisible = false;
|
|
10878
10871
|
this.changes = new RenderChangesModel();
|
|
10879
10872
|
this.paragraphsAppeared = new Subject();
|
|
10880
10873
|
this.visibilitySubject = new Subject();
|
|
@@ -10916,8 +10909,7 @@ class Renderer extends EventEmitting {
|
|
|
10916
10909
|
changes.scroll ||
|
|
10917
10910
|
changes.search ||
|
|
10918
10911
|
changes.grammar ||
|
|
10919
|
-
changes.commentHighlights
|
|
10920
|
-
changes.visibilityChanged) {
|
|
10912
|
+
changes.commentHighlights) {
|
|
10921
10913
|
changes.apply(this.computeLayerConfig());
|
|
10922
10914
|
DomHelper.translate(this.content, 0, -this.layerConfig.offset);
|
|
10923
10915
|
DomHelper.setStyle(this.content.style, 'width', `${this.layerConfig.width}px`);
|
|
@@ -10949,12 +10941,6 @@ class Renderer extends EventEmitting {
|
|
|
10949
10941
|
if (changes.dragAndDrop) {
|
|
10950
10942
|
this.renderDragAndDropSelection();
|
|
10951
10943
|
}
|
|
10952
|
-
if (changes.visibilityChanged) {
|
|
10953
|
-
this.renderSearchHighlights();
|
|
10954
|
-
this.renderGrammarHighlights();
|
|
10955
|
-
this.renderCommentHighlights();
|
|
10956
|
-
this.visibilitySubject.next(this.isVisible);
|
|
10957
|
-
}
|
|
10958
10944
|
this.session.onRendered();
|
|
10959
10945
|
}
|
|
10960
10946
|
/**
|
|
@@ -11004,10 +10990,22 @@ class Renderer extends EventEmitting {
|
|
|
11004
10990
|
}
|
|
11005
10991
|
}
|
|
11006
10992
|
updateCustomElementHighlights(ranges) {
|
|
11007
|
-
this.searchHighlightLayer.customElementsRanges
|
|
11008
|
-
|
|
10993
|
+
if (this.searchHighlightLayer.customElementsRanges.length !== ranges.length ||
|
|
10994
|
+
!this.searchHighlightLayer.customElementsRanges.every(x => ranges.some(z => x.location.isEqual(z.location)))) {
|
|
10995
|
+
this.searchHighlightLayer.customElementsRanges = ranges;
|
|
10996
|
+
this.scheduleChanges({ search: true });
|
|
10997
|
+
}
|
|
11009
10998
|
}
|
|
11010
10999
|
updateActiveSearchHighlight(active) {
|
|
11000
|
+
if (this.searchHighlightLayer.active === active ||
|
|
11001
|
+
(this.searchHighlightLayer.active instanceof Range &&
|
|
11002
|
+
active instanceof Range &&
|
|
11003
|
+
this.searchHighlightLayer.active.isEqual(active)) ||
|
|
11004
|
+
(this.searchHighlightLayer.active instanceof CustomElementInfo &&
|
|
11005
|
+
active instanceof CustomElementInfo &&
|
|
11006
|
+
this.searchHighlightLayer.active.location.isEqual(active.location))) {
|
|
11007
|
+
return;
|
|
11008
|
+
}
|
|
11011
11009
|
this.searchHighlightLayer.active = active;
|
|
11012
11010
|
this.scheduleChanges({ search: true });
|
|
11013
11011
|
}
|
|
@@ -11047,15 +11045,6 @@ class Renderer extends EventEmitting {
|
|
|
11047
11045
|
this.dragAndDropSelectionLayer.marker = null;
|
|
11048
11046
|
this.scheduleChanges({ dragAndDrop: true });
|
|
11049
11047
|
}
|
|
11050
|
-
setVisibility(isVisible) {
|
|
11051
|
-
if (this.isVisible !== isVisible) {
|
|
11052
|
-
this.isVisible = isVisible;
|
|
11053
|
-
if (!isVisible) {
|
|
11054
|
-
this.commentsLayer.clearSessionComments();
|
|
11055
|
-
}
|
|
11056
|
-
this.scheduleChanges({ visibilityChanged: true });
|
|
11057
|
-
}
|
|
11058
|
-
}
|
|
11059
11048
|
/**
|
|
11060
11049
|
* Triggers a full update of the text, for all the rows.
|
|
11061
11050
|
**/
|
|
@@ -11154,8 +11143,7 @@ class Renderer extends EventEmitting {
|
|
|
11154
11143
|
contentRange: new DistanceModel({ start: 0, end: displayData.paragraphs.filter(x => x.paragraphSettings).length - 1 }),
|
|
11155
11144
|
maxHeight,
|
|
11156
11145
|
offset: 0,
|
|
11157
|
-
scrollTop: this.session.scrollTop
|
|
11158
|
-
isVisible: this.isVisible
|
|
11146
|
+
scrollTop: this.session.scrollTop
|
|
11159
11147
|
};
|
|
11160
11148
|
return changes;
|
|
11161
11149
|
}
|
|
@@ -11626,14 +11614,7 @@ class VirtualRenderer {
|
|
|
11626
11614
|
return;
|
|
11627
11615
|
}
|
|
11628
11616
|
// text, scrolling and resize changes can cause the view port size to change
|
|
11629
|
-
if (changes.full ||
|
|
11630
|
-
changes.size ||
|
|
11631
|
-
changes.text ||
|
|
11632
|
-
changes.lines ||
|
|
11633
|
-
changes.scroll ||
|
|
11634
|
-
changes.search ||
|
|
11635
|
-
changes.grammar ||
|
|
11636
|
-
changes.visibilityChanged) {
|
|
11617
|
+
if (changes.full || changes.size || changes.text || changes.lines || changes.scroll || changes.search || changes.grammar) {
|
|
11637
11618
|
changes.apply(this.computeLayerConfig());
|
|
11638
11619
|
DomHelper.translate(this.renderer.content, 0, -this.layerConfig.offset);
|
|
11639
11620
|
DomHelper.setStyle(this.renderer.content.style, 'width', `${this.layerConfig.width}px`);
|
|
@@ -11674,9 +11655,6 @@ class VirtualRenderer {
|
|
|
11674
11655
|
if (changes.dragAndDrop) {
|
|
11675
11656
|
this.renderDragAndDropSelection();
|
|
11676
11657
|
}
|
|
11677
|
-
if (changes.visibilityChanged) {
|
|
11678
|
-
this.renderSearchHighlights();
|
|
11679
|
-
}
|
|
11680
11658
|
}
|
|
11681
11659
|
/**
|
|
11682
11660
|
* Triggers a resize of the editor
|
|
@@ -11805,9 +11783,6 @@ class VirtualRenderer {
|
|
|
11805
11783
|
updateCursor() {
|
|
11806
11784
|
this.renderer.updateCursor();
|
|
11807
11785
|
}
|
|
11808
|
-
setVisibility(isVisible) {
|
|
11809
|
-
this.renderer.setVisibility(isVisible);
|
|
11810
|
-
}
|
|
11811
11786
|
scheduleChanges(changes) {
|
|
11812
11787
|
this.loop.schedule(0, changes);
|
|
11813
11788
|
}
|
|
@@ -11867,6 +11842,10 @@ class VirtualRenderer {
|
|
|
11867
11842
|
this.renderer.clearGrammarHighlights();
|
|
11868
11843
|
}
|
|
11869
11844
|
paragraphsScrolledIntoView() {
|
|
11845
|
+
if (!this.layerConfig.visibleRange) {
|
|
11846
|
+
this.renderer.paragraphsAppeared.next(this.renderer.session.displayData.paragraphs);
|
|
11847
|
+
return;
|
|
11848
|
+
}
|
|
11870
11849
|
const paragraphs = this.renderer.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph + 1);
|
|
11871
11850
|
this.renderer.paragraphsAppeared.next(paragraphs);
|
|
11872
11851
|
}
|
|
@@ -11904,8 +11883,7 @@ class VirtualRenderer {
|
|
|
11904
11883
|
offset: 0,
|
|
11905
11884
|
visibleRange,
|
|
11906
11885
|
scrollTop: this.scrollBar.scrollTop,
|
|
11907
|
-
pages: visibleRange.pages
|
|
11908
|
-
isVisible: true
|
|
11886
|
+
pages: visibleRange.pages
|
|
11909
11887
|
};
|
|
11910
11888
|
return changes;
|
|
11911
11889
|
}
|
|
@@ -12182,7 +12160,6 @@ class RegulatorService {
|
|
|
12182
12160
|
this.selectedCommentId = null;
|
|
12183
12161
|
this.renderLoop = new RenderLoop();
|
|
12184
12162
|
this.grammarChecker = new GrammarChecker(this.grammarService);
|
|
12185
|
-
this.observer = this.initializeIntersectionObserver();
|
|
12186
12163
|
}
|
|
12187
12164
|
addMainSession(model, scalingRatio, container) {
|
|
12188
12165
|
const sessionId = ++this.sessionIdIncrement;
|
|
@@ -12236,7 +12213,6 @@ class RegulatorService {
|
|
|
12236
12213
|
if (this.grammarEnabled) {
|
|
12237
12214
|
this.grammarChecker.registerSession(newSession);
|
|
12238
12215
|
}
|
|
12239
|
-
this.observer.observe(nativeElement);
|
|
12240
12216
|
return newSession;
|
|
12241
12217
|
}
|
|
12242
12218
|
addEdgeSession(component, nativeElement) {
|
|
@@ -12253,14 +12229,12 @@ class RegulatorService {
|
|
|
12253
12229
|
if (this.grammarEnabled) {
|
|
12254
12230
|
this.grammarChecker.registerSession(newSession);
|
|
12255
12231
|
}
|
|
12256
|
-
this.observer.observe(nativeElement);
|
|
12257
12232
|
return newSession;
|
|
12258
12233
|
}
|
|
12259
12234
|
removeSession(sessionId) {
|
|
12260
12235
|
const index = this.sessions.findIndex(x => x.sessionId === sessionId);
|
|
12261
12236
|
this.sessions[index].session.destroy();
|
|
12262
12237
|
this.sessions[index].renderer.destroy();
|
|
12263
|
-
this.observer.unobserve(this.sessions[index].nativeElement);
|
|
12264
12238
|
this.sessions.splice(index, 1);
|
|
12265
12239
|
this.grammarChecker.unregisterSession(sessionId);
|
|
12266
12240
|
}
|
|
@@ -12518,19 +12492,6 @@ class RegulatorService {
|
|
|
12518
12492
|
})
|
|
12519
12493
|
];
|
|
12520
12494
|
}
|
|
12521
|
-
initializeIntersectionObserver() {
|
|
12522
|
-
const options = {
|
|
12523
|
-
root: null,
|
|
12524
|
-
rootMargin: '50px',
|
|
12525
|
-
threshold: 0.01
|
|
12526
|
-
};
|
|
12527
|
-
return new IntersectionObserver(entries => {
|
|
12528
|
-
entries.forEach(entry => {
|
|
12529
|
-
const sessionId = +entry.target.getAttribute('data-session-id');
|
|
12530
|
-
this.getSessionModel(sessionId)?.renderer.setVisibility(entry.isIntersecting);
|
|
12531
|
-
});
|
|
12532
|
-
}, options);
|
|
12533
|
-
}
|
|
12534
12495
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RegulatorService, deps: [{ token: CustomContentService }, { token: EditorService }, { token: ComponentService }, { token: GrammarService }, { token: CommentRenderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12535
12496
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RegulatorService }); }
|
|
12536
12497
|
}
|
|
@@ -13717,6 +13678,7 @@ class RenderingHelper {
|
|
|
13717
13678
|
const components = customContentService.getComponents(customComponents, fragmentStartIndex, fragmentEndIndex);
|
|
13718
13679
|
for (const component of components) {
|
|
13719
13680
|
const instance = component.instance;
|
|
13681
|
+
const relativeIndex = instance.insertIndex - paragraphStartIndex;
|
|
13720
13682
|
const textBeforeElement = fragmentText.substring(0, instance.insertIndex - fragmentStartIndex);
|
|
13721
13683
|
fragmentText = fragmentText.substring(textBeforeElement.length + 1, fragmentText.length);
|
|
13722
13684
|
this.renderText(fragment, textStyle, textBeforeElement, wordSpacing);
|
|
@@ -13731,7 +13693,7 @@ class RenderingHelper {
|
|
|
13731
13693
|
renderedIndexes++;
|
|
13732
13694
|
}
|
|
13733
13695
|
}
|
|
13734
|
-
else if (instance instanceof ExternalComponent && line.customTexts?.some(x => x.index ===
|
|
13696
|
+
else if (instance instanceof ExternalComponent && line.customTexts?.some(x => x.index === relativeIndex)) {
|
|
13735
13697
|
const tokens = renderedTokensInLine + renderedIndexes + additionalTokens;
|
|
13736
13698
|
const rendered = this.renderExternalText(fragment, textStyle, wordSpacing, instance, line, tokens, paragraphStartIndex);
|
|
13737
13699
|
renderedIndexes += rendered.renderedIndexes;
|
|
@@ -13996,8 +13958,7 @@ class PrintRenderer {
|
|
|
13996
13958
|
maxHeight,
|
|
13997
13959
|
offset: 0,
|
|
13998
13960
|
pages,
|
|
13999
|
-
scrollTop: 0
|
|
14000
|
-
isVisible: true
|
|
13961
|
+
scrollTop: 0
|
|
14001
13962
|
};
|
|
14002
13963
|
}
|
|
14003
13964
|
createContent() {
|
|
@@ -17470,10 +17431,12 @@ class EditorSearchBarComponent {
|
|
|
17470
17431
|
this.searchInput?.nativeElement?.select();
|
|
17471
17432
|
});
|
|
17472
17433
|
}
|
|
17473
|
-
findNext() {
|
|
17434
|
+
findNext(event) {
|
|
17435
|
+
event?.stopPropagation();
|
|
17474
17436
|
this.editorService.goNextSearchResult();
|
|
17475
17437
|
}
|
|
17476
|
-
findPrev() {
|
|
17438
|
+
findPrev(event) {
|
|
17439
|
+
event.stopPropagation();
|
|
17477
17440
|
this.editorService.goPreviousSearchResult();
|
|
17478
17441
|
}
|
|
17479
17442
|
setReplace() {
|
|
@@ -17483,7 +17446,7 @@ class EditorSearchBarComponent {
|
|
|
17483
17446
|
this.editorService.replaceCurrentSearchResult();
|
|
17484
17447
|
}
|
|
17485
17448
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorSearchBarComponent, deps: [{ token: EditorService }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17486
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorSearchBarComponent, isStandalone: true, selector: "app-nod-editor-search-bar", providers: [ExternalElementService], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "@let searchResultCount = searchResultCount$ | async;\n@let searchResultIndex = searchResultIndex$ | async;\n@let isViewOnly = isViewOnly$ | async;\n<div class=\"line search-form\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.
|
|
17449
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorSearchBarComponent, isStandalone: true, selector: "app-nod-editor-search-bar", providers: [ExternalElementService], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "@let searchResultCount = searchResultCount$ | async;\n@let searchResultIndex = searchResultIndex$ | async;\n@let isViewOnly = isViewOnly$ | async;\n<div class=\"header\">\n <span>\n {{ 'NODER.LABEL.SEARCH_AND_REPLACE' | translate }}\n </span>\n <button\n class=\"navigate-button close-button\"\n mat-icon-button\n [matTooltip]=\"'NODER.LABEL.CLOSE' | translate\"\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\"></mat-icon>\n </button>\n</div>\n<div class=\"line search-form\">\n <button\n [disabled]=\"isViewOnly\"\n class=\"navigate-button\"\n mat-icon-button\n matTooltip=\"Toggle Replace Mode\"\n (click)=\"setReplace()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ isReplace ? 'icon-arrow-down' : 'icon-arrow-big' }}\"></mat-icon>\n </button>\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SEARCH' | translate }}</mat-label>\n <input\n matInput\n #searchInput\n [formControl]=\"searchControl\"\n (keydown.enter)=\"findNext()\" />\n <div\n matSuffix\n class=\"input-suffix\">\n <span>{{ searchResultCount ? searchResultIndex : 0 }} / {{ searchResultCount ?? 0 }}</span>\n <div class=\"divider\"></div>\n <div>\n <button\n mat-icon-button\n class=\"navigate-button\"\n (click)=\"findPrev($event)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-up\"></mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"navigate-button\"\n (click)=\"findNext($event)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-down\"></mat-icon>\n </button>\n </div>\n </div>\n </mat-form-field>\n</div>\n@if (isReplace) {\n <div class=\"replace-form\">\n <div class=\"replace-padding\"></div>\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.REPLACE' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"replaceControl\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n (keydown.enter)=\"replace()\" />\n </mat-form-field>\n </div>\n <div class=\"action-buttons\">\n <button\n mat-button\n class=\"action-button\"\n (click)=\"replace()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-replace\"></mat-icon>\n {{ 'NODER.LABEL.REPLACE' | translate }}\n </button>\n </div>\n}\n", styles: [":host{min-height:56px;width:388px;display:flex;flex-direction:column;gap:8px;font-size:10px;border-radius:0 0 8px 8px;border-top:none;padding:16px}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-form-field-flex{height:32px}:host ::ng-deep .mat-mdc-form-field-flex .mat-mdc-form-field-infix{min-height:unset;height:32px;display:flex}:host ::ng-deep .mat-mdc-form-field-flex .mat-mdc-form-field-infix input{font-size:12px;letter-spacing:0}:host ::ng-deep .mat-mdc-form-field-flex .mdc-floating-label.mat-mdc-floating-label:not(.mdc-floating-label--float-above){font-size:14px;top:15px}:host ::ng-deep .mat-mdc-button-persistent-ripple,:host ::ng-deep .mat-mdc-button-ripple,:host ::ng-deep .mat-focus-indicator,:host ::ng-deep .mat-mdc-button-touch-target{width:100%;height:100%}.header{display:flex;justify-content:space-between;align-items:center;font-size:12px}.navigate-button,.replace-padding{width:26px;height:26px;display:flex;justify-content:center;align-items:center;padding:0;font-size:12px;min-width:unset}.navigate-button.close-button,.replace-padding.close-button{width:20px;height:20px}.divider{height:16px;width:1px}.input-suffix{display:flex;align-items:center;gap:6px;margin-right:4px}.input-suffix span{font-size:12px;letter-spacing:0}.input-suffix div{display:flex;align-items:center}.action-buttons{display:flex;justify-content:flex-end;margin-top:8px}.action-button{font-size:12px;font-weight:400;letter-spacing:0;height:32px}.search-form,.replace-form{margin-top:8px;display:flex;align-items:center;gap:8px}mat-form-field{flex:1}.mat-mdc-input-element{font-size:10px}.replace-form .mdc-button{width:80px}mat-icon{font-size:18px;width:18px;height:18px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17487
17450
|
}
|
|
17488
17451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorSearchBarComponent, decorators: [{
|
|
17489
17452
|
type: Component,
|
|
@@ -17496,7 +17459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
17496
17459
|
MatTooltipModule,
|
|
17497
17460
|
ReactiveFormsModule,
|
|
17498
17461
|
TranslateModule
|
|
17499
|
-
], providers: [ExternalElementService], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-search-bar', template: "@let searchResultCount = searchResultCount$ | async;\n@let searchResultIndex = searchResultIndex$ | async;\n@let isViewOnly = isViewOnly$ | async;\n<div class=\"line search-form\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.
|
|
17462
|
+
], providers: [ExternalElementService], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-search-bar', template: "@let searchResultCount = searchResultCount$ | async;\n@let searchResultIndex = searchResultIndex$ | async;\n@let isViewOnly = isViewOnly$ | async;\n<div class=\"header\">\n <span>\n {{ 'NODER.LABEL.SEARCH_AND_REPLACE' | translate }}\n </span>\n <button\n class=\"navigate-button close-button\"\n mat-icon-button\n [matTooltip]=\"'NODER.LABEL.CLOSE' | translate\"\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\"></mat-icon>\n </button>\n</div>\n<div class=\"line search-form\">\n <button\n [disabled]=\"isViewOnly\"\n class=\"navigate-button\"\n mat-icon-button\n matTooltip=\"Toggle Replace Mode\"\n (click)=\"setReplace()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ isReplace ? 'icon-arrow-down' : 'icon-arrow-big' }}\"></mat-icon>\n </button>\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SEARCH' | translate }}</mat-label>\n <input\n matInput\n #searchInput\n [formControl]=\"searchControl\"\n (keydown.enter)=\"findNext()\" />\n <div\n matSuffix\n class=\"input-suffix\">\n <span>{{ searchResultCount ? searchResultIndex : 0 }} / {{ searchResultCount ?? 0 }}</span>\n <div class=\"divider\"></div>\n <div>\n <button\n mat-icon-button\n class=\"navigate-button\"\n (click)=\"findPrev($event)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-up\"></mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"navigate-button\"\n (click)=\"findNext($event)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-down\"></mat-icon>\n </button>\n </div>\n </div>\n </mat-form-field>\n</div>\n@if (isReplace) {\n <div class=\"replace-form\">\n <div class=\"replace-padding\"></div>\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.REPLACE' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"replaceControl\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n (keydown.enter)=\"replace()\" />\n </mat-form-field>\n </div>\n <div class=\"action-buttons\">\n <button\n mat-button\n class=\"action-button\"\n (click)=\"replace()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-replace\"></mat-icon>\n {{ 'NODER.LABEL.REPLACE' | translate }}\n </button>\n </div>\n}\n", styles: [":host{min-height:56px;width:388px;display:flex;flex-direction:column;gap:8px;font-size:10px;border-radius:0 0 8px 8px;border-top:none;padding:16px}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-form-field-flex{height:32px}:host ::ng-deep .mat-mdc-form-field-flex .mat-mdc-form-field-infix{min-height:unset;height:32px;display:flex}:host ::ng-deep .mat-mdc-form-field-flex .mat-mdc-form-field-infix input{font-size:12px;letter-spacing:0}:host ::ng-deep .mat-mdc-form-field-flex .mdc-floating-label.mat-mdc-floating-label:not(.mdc-floating-label--float-above){font-size:14px;top:15px}:host ::ng-deep .mat-mdc-button-persistent-ripple,:host ::ng-deep .mat-mdc-button-ripple,:host ::ng-deep .mat-focus-indicator,:host ::ng-deep .mat-mdc-button-touch-target{width:100%;height:100%}.header{display:flex;justify-content:space-between;align-items:center;font-size:12px}.navigate-button,.replace-padding{width:26px;height:26px;display:flex;justify-content:center;align-items:center;padding:0;font-size:12px;min-width:unset}.navigate-button.close-button,.replace-padding.close-button{width:20px;height:20px}.divider{height:16px;width:1px}.input-suffix{display:flex;align-items:center;gap:6px;margin-right:4px}.input-suffix span{font-size:12px;letter-spacing:0}.input-suffix div{display:flex;align-items:center}.action-buttons{display:flex;justify-content:flex-end;margin-top:8px}.action-button{font-size:12px;font-weight:400;letter-spacing:0;height:32px}.search-form,.replace-form{margin-top:8px;display:flex;align-items:center;gap:8px}mat-form-field{flex:1}.mat-mdc-input-element{font-size:10px}.replace-form .mdc-button{width:80px}mat-icon{font-size:18px;width:18px;height:18px}\n"] }]
|
|
17500
17463
|
}], ctorParameters: () => [{ type: EditorService }, { type: i0.DestroyRef }], propDecorators: { searchInput: [{
|
|
17501
17464
|
type: ViewChild,
|
|
17502
17465
|
args: ['searchInput']
|