@talrace/ngx-noder 0.0.41 → 0.0.43

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.
Files changed (37) hide show
  1. package/assets/i18n/noder.en.json +2 -1
  2. package/assets/i18n/noder.es.json +2 -1
  3. package/assets/i18n/noder.ru.json +2 -1
  4. package/fesm2022/talrace-ngx-noder.mjs +705 -467
  5. package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
  6. package/lib/apart-components/editor-ruler/editor-ruler.component.d.ts +23 -10
  7. package/lib/apart-components/editor-search-bar/editor-search-bar.component.d.ts +26 -0
  8. package/lib/editor/components/editor.component.d.ts +7 -1
  9. package/lib/editor/display/layers/highlight.layer.d.ts +16 -0
  10. package/lib/editor/display/layers/search-highlight.layer.d.ts +12 -0
  11. package/lib/editor/display/layers/selection.layer.d.ts +3 -11
  12. package/lib/editor/display/render-changes.interface.d.ts +1 -0
  13. package/lib/editor/display/render-changes.model.d.ts +1 -0
  14. package/lib/editor/display/renderer.d.ts +5 -0
  15. package/lib/editor/display/virtual.renderer.d.ts +4 -1
  16. package/lib/editor/editor.module.d.ts +10 -9
  17. package/lib/editor/execution/edit.session.d.ts +1 -0
  18. package/lib/editor/execution/editor.d.ts +17 -8
  19. package/lib/editor/gadgets/history/operation-history.d.ts +1 -0
  20. package/lib/editor/gadgets/history/operation.type.d.ts +2 -1
  21. package/lib/editor/gadgets/search/search-result.interface.d.ts +5 -0
  22. package/lib/editor/gadgets/search/search.d.ts +14 -30
  23. package/lib/editor/interaction/editor.service.d.ts +40 -18
  24. package/lib/editor/operations/enums/command-type.enum.d.ts +2 -1
  25. package/lib/editor/operations/helpers/paragraph-operations.helper.d.ts +1 -0
  26. package/lib/editor/operations/operations-helper.helper.d.ts +1 -0
  27. package/lib/editor/operations/save-commands.helper.d.ts +1 -0
  28. package/lib/models/generated/apply-paragraphs.model.d.ts +5 -0
  29. package/lib/models/generated/command.model.d.ts +2 -0
  30. package/package.json +1 -1
  31. package/public-api.d.ts +0 -1
  32. package/src/_ngx-noder.theme.scss +2 -0
  33. package/src/lib/apart-components/editor-search-bar/_theme.scss +28 -0
  34. package/src/scss/base-editor.scss +13 -3
  35. package/lib/apart-components/editor-search/editor-search-dialog.component.d.ts +0 -23
  36. package/lib/editor/gadgets/search/replace.interface.d.ts +0 -4
  37. package/lib/editor/gadgets/search/search-iteration.interface.d.ts +0 -4
@@ -1,41 +1,42 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Injectable, inject, ChangeDetectorRef, HostBinding, Input, InjectionToken, createComponent, Component, ChangeDetectionStrategy, ViewChild, EventEmitter, Output, HostListener, signal, NgModule, Inject } from '@angular/core';
3
- import { Subject, BehaviorSubject, fromEvent, throttleTime, take, filter, startWith, takeUntil, distinctUntilChanged, tap, map, catchError, debounceTime } from 'rxjs';
2
+ import { Directive, Injectable, inject, ChangeDetectorRef, HostBinding, Input, Component, ChangeDetectionStrategy, ViewChild, InjectionToken, createComponent, EventEmitter, Output, HostListener, input, signal, computed, effect, NgModule, Inject } from '@angular/core';
3
+ import { Subject, BehaviorSubject, fromEvent, throttleTime, take, filter, debounceTime, distinctUntilChanged, startWith, takeUntil, tap, map, catchError } from 'rxjs';
4
4
  import * as i1$1 from '@angular/common/http';
5
5
  import { HttpHeaders } from '@angular/common/http';
6
6
  import * as i3 from '@angular/common';
7
- import { AsyncPipe, CommonModule } from '@angular/common';
7
+ import { CommonModule, AsyncPipe } from '@angular/common';
8
+ import * as i2 from '@angular/forms';
9
+ import { FormControl, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
10
+ import * as i4 from '@angular/material/button';
11
+ import { MatButtonModule } from '@angular/material/button';
12
+ import * as i5 from '@angular/material/icon';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import * as i6 from '@angular/material/input';
15
+ import { MatInputModule } from '@angular/material/input';
16
+ import * as i5$2 from '@angular/material/tooltip';
17
+ import { MatTooltipModule } from '@angular/material/tooltip';
18
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
19
+ import * as i3$1 from '@ngx-translate/core';
20
+ import { TranslateModule } from '@ngx-translate/core';
21
+ import * as i5$1 from '@angular/material/form-field';
22
+ import { MatFormFieldModule } from '@angular/material/form-field';
8
23
  import { ComponentPortal } from '@angular/cdk/portal';
9
24
  import * as i1 from '@angular/cdk/overlay';
10
25
  import { OverlayConfig } from '@angular/cdk/overlay';
11
- import * as i3$1 from '@ngx-translate/core';
12
- import { TranslateModule } from '@ngx-translate/core';
13
- import * as i5 from '@angular/material/icon';
14
- import { MatIconModule } from '@angular/material/icon';
15
- import * as i5$1 from '@angular/cdk/clipboard';
16
- import * as i7 from '@angular/material/sidenav';
26
+ import * as i5$3 from '@angular/cdk/clipboard';
27
+ import * as i8 from '@angular/material/sidenav';
17
28
  import { MatSidenavModule } from '@angular/material/sidenav';
18
- import * as i4 from '@angular/material/button';
19
- import { MatButtonModule } from '@angular/material/button';
20
29
  import * as i1$2 from '@angular/material/dialog';
21
30
  import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
22
- import * as i5$2 from '@angular/material/tooltip';
23
- import { MatTooltipModule } from '@angular/material/tooltip';
24
- import * as i2 from '@angular/forms';
25
- import { ReactiveFormsModule, FormControl, FormsModule, Validators } from '@angular/forms';
26
31
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
27
32
  import * as i4$1 from '@angular/material/menu';
28
33
  import { MatMenuModule } from '@angular/material/menu';
29
- import * as i6 from '@angular/material/input';
30
- import { MatInputModule } from '@angular/material/input';
31
- import * as i5$3 from '@angular/material/form-field';
32
- import { MatFormFieldModule } from '@angular/material/form-field';
33
34
  import * as i4$2 from '@angular/material/expansion';
34
35
  import { MatExpansionModule } from '@angular/material/expansion';
35
36
  import * as i2$1 from '@angular/platform-browser';
36
37
  import * as i2$2 from '@angular/material/autocomplete';
37
38
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
38
- import * as i8 from '@angular/material/select';
39
+ import * as i8$1 from '@angular/material/select';
39
40
  import { MatSelectModule } from '@angular/material/select';
40
41
  import * as i3$2 from '@angular/material/core';
41
42
  import * as i5$4 from 'ngx-colors';
@@ -53,9 +54,9 @@ const DocumentInfo = {
53
54
  height: 1123,
54
55
  pagesSpace: 8,
55
56
  paddingTop: 96,
56
- paddingRight: 48,
57
+ paddingRight: 96,
57
58
  paddingBottom: 96,
58
- paddingLeft: 48,
59
+ paddingLeft: 96,
59
60
  paddingHeader: 48,
60
61
  paddingFooter: 48
61
62
  };
@@ -449,10 +450,15 @@ class EditorService {
449
450
  this._hasSelection$ = new BehaviorSubject(false);
450
451
  this._historyInfo$ = new BehaviorSubject(new OperationsHistoryInfoModel(-1, -1));
451
452
  this._toggleSidenav$ = new Subject();
452
- this._openSearchDialog$ = new Subject();
453
- this._searchOptions$ = new Subject();
454
- this._searchIteration$ = new Subject();
455
- this._replace$ = new Subject();
453
+ this._displaySearchBar$ = new Subject();
454
+ this._searchTerm$ = new Subject();
455
+ this._dialogSearchTerm$ = new Subject();
456
+ this._replaceTerm$ = new Subject();
457
+ this._searchPrevious$ = new Subject();
458
+ this._searchNext$ = new Subject();
459
+ this._replaceCurrent$ = new Subject();
460
+ this._currentSearchResultIndex$ = new Subject();
461
+ this._searchResultCount$ = new Subject();
456
462
  this._setTextStyles$ = new Subject();
457
463
  this._setParagraphStyles$ = new Subject();
458
464
  this._setNumberingTemplateType$ = new Subject();
@@ -498,7 +504,10 @@ class EditorService {
498
504
  this._pageFormat$ = new BehaviorSubject(new PageFormatModel());
499
505
  this._leftMarginPageFormat$ = new Subject();
500
506
  this._rightMarginPageFormat$ = new Subject();
501
- this._tabParagraph$ = new Subject();
507
+ this._firstLinePosition$ = new Subject();
508
+ this._leftIndentParagraph$ = new Subject();
509
+ this._rightIndentParagraph$ = new Subject();
510
+ this._paragraphStyle$ = new BehaviorSubject(new ParagraphStyleModel());
502
511
  }
503
512
  set styles(value) {
504
513
  this._styles$.next({ ...value });
@@ -533,29 +542,35 @@ class EditorService {
533
542
  get toggleSidenav$() {
534
543
  return this._toggleSidenav$.asObservable();
535
544
  }
536
- set openSearchDialog(value) {
537
- this._openSearchDialog$.next(value);
545
+ get displaySearchBar$() {
546
+ return this._displaySearchBar$.asObservable();
547
+ }
548
+ get searchTerm$() {
549
+ return this._searchTerm$.asObservable();
550
+ }
551
+ get dialogSearchTerm$() {
552
+ return this._dialogSearchTerm$.asObservable();
538
553
  }
539
- get openSearchDialog$() {
540
- return this._openSearchDialog$.asObservable();
554
+ get replaceTerm$() {
555
+ return this._replaceTerm$.asObservable();
541
556
  }
542
- set searchOptions(value) {
543
- this._searchOptions$.next(value);
557
+ get searchPrevious$() {
558
+ return this._searchPrevious$.asObservable();
544
559
  }
545
- get searchOptions$() {
546
- return this._searchOptions$.asObservable();
560
+ get searchNext$() {
561
+ return this._searchNext$.asObservable();
547
562
  }
548
- set searchIteration(value) {
549
- this._searchIteration$.next(value);
563
+ get replaceCurrent$() {
564
+ return this._replaceCurrent$.asObservable();
550
565
  }
551
- get searchIteration$() {
552
- return this._searchIteration$.asObservable();
566
+ get currentSearchResultIndex$() {
567
+ return this._currentSearchResultIndex$.asObservable();
553
568
  }
554
- set replace(value) {
555
- this._replace$.next(value);
569
+ set searchResultCount(value) {
570
+ this._searchResultCount$.next(value);
556
571
  }
557
- get replace$() {
558
- return this._replace$.asObservable();
572
+ get searchResultCount$() {
573
+ return this._searchResultCount$.asObservable();
559
574
  }
560
575
  get setTextStyles$() {
561
576
  return this._setTextStyles$.asObservable();
@@ -702,11 +717,29 @@ class EditorService {
702
717
  get rightMarginPageFormat$() {
703
718
  return this._rightMarginPageFormat$.asObservable();
704
719
  }
705
- get tabParagraph$() {
706
- return this._tabParagraph$.asObservable();
720
+ get firstLinePosition$() {
721
+ return this._firstLinePosition$.asObservable();
707
722
  }
708
- applyTabParagraph(value) {
709
- this._tabParagraph$.next(value);
723
+ get leftIndentParagraph$() {
724
+ return this._leftIndentParagraph$.asObservable();
725
+ }
726
+ get rightIndentParagraph$() {
727
+ return this._rightIndentParagraph$.asObservable();
728
+ }
729
+ get paragraphStyle$() {
730
+ return this._paragraphStyle$.asObservable();
731
+ }
732
+ applyFirstLinePosition(value) {
733
+ this._firstLinePosition$.next(value);
734
+ }
735
+ applyLeftIndentParagraph(value) {
736
+ this._leftIndentParagraph$.next(value);
737
+ }
738
+ applyRightIndentParagraph(value) {
739
+ this._rightIndentParagraph$.next(value);
740
+ }
741
+ paragraphStyle(value) {
742
+ this._paragraphStyle$.next(value);
710
743
  }
711
744
  applyRightMarginPageFormat(value) {
712
745
  this._rightMarginPageFormat$.next(value);
@@ -877,6 +910,33 @@ class EditorService {
877
910
  removeCustomElementsData(elements) {
878
911
  this._removeCustomElementsData$.next(elements);
879
912
  }
913
+ setNewSearchTerm(term) {
914
+ this._searchTerm$.next(term);
915
+ }
916
+ setNewReplaceTerm(term) {
917
+ this._replaceTerm$.next(term);
918
+ }
919
+ setDialogSearchTerm(term) {
920
+ this._dialogSearchTerm$.next(term);
921
+ }
922
+ goNextSearchResult() {
923
+ this._searchNext$.next();
924
+ }
925
+ goPreviousSearchResult() {
926
+ this._searchPrevious$.next();
927
+ }
928
+ replaceCurrentSearchResult() {
929
+ this._replaceCurrent$.next();
930
+ }
931
+ setDisplaySearchBar(show) {
932
+ this._displaySearchBar$.next(show);
933
+ }
934
+ setSearchResultCount(count) {
935
+ this._searchResultCount$.next(count);
936
+ }
937
+ setCurrentSearchResultIndex(index) {
938
+ this._currentSearchResultIndex$.next(index);
939
+ }
880
940
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
881
941
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorService }); }
882
942
  }
@@ -1041,6 +1101,7 @@ var CommandType;
1041
1101
  CommandType[CommandType["InsertPageFormat"] = 33] = "InsertPageFormat";
1042
1102
  CommandType[CommandType["RemoveInsertedPageFormat"] = 34] = "RemoveInsertedPageFormat";
1043
1103
  CommandType[CommandType["RestorePageFormats"] = 35] = "RestorePageFormats";
1104
+ CommandType[CommandType["ApplyParagraphs"] = 36] = "ApplyParagraphs";
1044
1105
  })(CommandType || (CommandType = {}));
1045
1106
 
1046
1107
  class PageNumbersModel {
@@ -1100,6 +1161,14 @@ class ApplyPageFormatModel {
1100
1161
  }
1101
1162
  }
1102
1163
 
1164
+ class ApplyParagraphsModel {
1165
+ constructor(fields) {
1166
+ if (fields) {
1167
+ Object.assign(this, fields);
1168
+ }
1169
+ }
1170
+ }
1171
+
1103
1172
  class ApplyParagraphStyleModel {
1104
1173
  constructor(fields) {
1105
1174
  if (fields) {
@@ -1884,6 +1953,11 @@ class OperationHistory {
1884
1953
  const undoStep = new RestoreParagraphStylesModel({ paragraphs });
1885
1954
  this.addToHistory(undoStep, redoStep);
1886
1955
  }
1956
+ pushApplyParagraphs(oldParagraphs, updatedParagraphs) {
1957
+ const redoStep = new ApplyParagraphsModel({ paragraphs: updatedParagraphs });
1958
+ const undoStep = new ApplyParagraphsModel({ paragraphs: oldParagraphs });
1959
+ this.addToHistory(undoStep, redoStep);
1960
+ }
1887
1961
  pushInsertTableRows(insertIndex, rowsCount, targetIndex, inheritIndex) {
1888
1962
  const redoStep = new InsertTableRowsModel({ insertIndex, count: rowsCount, targetIndex, inheritIndex });
1889
1963
  const undoStep = new RemoveTableRowsModel({ insertIndex, startIndex: targetIndex, endIndex: targetIndex + rowsCount - 1 });
@@ -3882,6 +3956,11 @@ class ParagraphOperationsHelper {
3882
3956
  this.applyParagraphStyles(paragraphs[index].paragraphStyle, style);
3883
3957
  }
3884
3958
  }
3959
+ static applyParagraphs(paragraphs, updatedParagraphs) {
3960
+ for (const paragraph of updatedParagraphs) {
3961
+ this.applySingle(paragraphs, paragraph.insertIndex, paragraph.paragraphStyle);
3962
+ }
3963
+ }
3885
3964
  static applyParagraphStyles(target, value) {
3886
3965
  target.alignment = value.alignment ?? target.alignment;
3887
3966
  target.backgroundColor = value.backgroundColor ?? target.backgroundColor;
@@ -4525,6 +4604,11 @@ class OperationsHelper {
4525
4604
  this.restore(document, model.restore);
4526
4605
  break;
4527
4606
  }
4607
+ case CommandType.ApplyParagraphs: {
4608
+ const model = command.applyParagraphs;
4609
+ this.applyParagraphs(contents, model.paragraphs);
4610
+ break;
4611
+ }
4528
4612
  }
4529
4613
  });
4530
4614
  }
@@ -4802,6 +4886,9 @@ class OperationsHelper {
4802
4886
  static applyParagraphStyle(document, startIndex, endIndex, style) {
4803
4887
  ParagraphOperationsHelper.apply(document.paragraphs, startIndex, endIndex, style);
4804
4888
  }
4889
+ static applyParagraphs(document, paragraphs) {
4890
+ ParagraphOperationsHelper.applyParagraphs(document.paragraphs, paragraphs);
4891
+ }
4805
4892
  static applyImageStyle(document, image) {
4806
4893
  ImageOperationsHelper.apply(document.images, image);
4807
4894
  }
@@ -6208,6 +6295,9 @@ class Range {
6208
6295
  this.end = end;
6209
6296
  }
6210
6297
  isEqual(range) {
6298
+ if (this == null || range == null) {
6299
+ return this == null && range == null;
6300
+ }
6211
6301
  return (this.start.row === range.start.row &&
6212
6302
  this.end.row === range.end.row &&
6213
6303
  this.start.column === range.start.column &&
@@ -6384,6 +6474,9 @@ class CommandModel {
6384
6474
  if (fields.applyPageFormat) {
6385
6475
  fields.applyPageFormat = new ApplyPageFormatModel(fields.applyPageFormat);
6386
6476
  }
6477
+ if (fields.applyParagraphs) {
6478
+ fields.applyParagraphs = new ApplyParagraphsModel(fields.applyParagraphs);
6479
+ }
6387
6480
  if (fields.applyParagraphStyle) {
6388
6481
  fields.applyParagraphStyle = new ApplyParagraphStyleModel(fields.applyParagraphStyle);
6389
6482
  }
@@ -6563,6 +6656,10 @@ class SaveCommandsHelper {
6563
6656
  const restoreParagraphStyles = new RestoreParagraphStylesModel({ paragraphs });
6564
6657
  return new CommandModel({ commandType: CommandType.RestoreParagraphStyles, restoreParagraphStyles, targets });
6565
6658
  }
6659
+ static getApplyParagraphsCommand(paragraphs, targets) {
6660
+ const applyParagraphs = new ApplyParagraphsModel({ paragraphs });
6661
+ return new CommandModel({ commandType: CommandType.ApplyParagraphs, applyParagraphs, targets });
6662
+ }
6566
6663
  static getRestoreCommand(restore, targets) {
6567
6664
  return new CommandModel({ commandType: CommandType.Restore, restore, targets });
6568
6665
  }
@@ -6611,233 +6708,85 @@ class SaveCommandsHelper {
6611
6708
  }
6612
6709
  }
6613
6710
 
6614
- class SearchOptions {
6615
- }
6616
6711
  class Search {
6617
6712
  constructor() {
6618
- this.options = {};
6713
+ this.term = '';
6619
6714
  }
6620
- set(options) {
6621
- this.options = Object.assign({}, options);
6715
+ get currentMatchIndex() {
6716
+ return this.currentIndex + 1;
6622
6717
  }
6623
- find(session) {
6624
- const options = this.options;
6625
- this.setMatchIterator(session, options);
6626
- const iterator = this.forEach;
6627
- if (!iterator) {
6628
- return null;
6629
- }
6630
- let firstRange = null;
6631
- iterator((startRow, startColumn, endRow, endColumn) => {
6632
- firstRange = new Range(new CursorParagraph(startRow, startColumn), new CursorParagraph(endRow, endColumn));
6633
- if (startColumn === endColumn &&
6634
- options.start instanceof Range &&
6635
- options.start.start &&
6636
- options.skipCurrent !== false &&
6637
- firstRange.isEqual(options.start)) {
6638
- firstRange = null;
6639
- return false;
6640
- }
6641
- return true;
6642
- });
6643
- return firstRange;
6718
+ get currentMatch() {
6719
+ return this.currentIndex < 0 ? null : this.allMatches[this.currentIndex];
6644
6720
  }
6645
- assembleRegExp(options) {
6646
- let needle = options.term;
6647
- if (!options.term) {
6648
- options.regex = null;
6649
- return options.regex;
6650
- }
6651
- let modifier = 'gmi';
6652
- options.isMultiLine = /[\n\r]/.test(needle);
6653
- if (options.isMultiLine) {
6654
- options.regex = this.assembleMultilineRegExp(needle, modifier);
6655
- return options.regex;
6721
+ setSearchTerm(term) {
6722
+ this.term = term;
6723
+ }
6724
+ findAll(sessions) {
6725
+ this.allMatches = [];
6726
+ this.assembleRegExp(this.term);
6727
+ if (!this.regex) {
6728
+ return;
6656
6729
  }
6657
- let regular;
6658
- try {
6659
- regular = new RegExp(needle, modifier);
6730
+ for (const { session, sessionId, renderer } of sessions) {
6731
+ const sessionHighlights = [];
6732
+ for (let i = 0; i < session.displayData.paragraphs.length; i++) {
6733
+ const paragraph = session.displayData.paragraphs[i];
6734
+ const matches = paragraph.content.matchAll(this.regex);
6735
+ for (const match of matches) {
6736
+ const range = new Range(new CursorParagraph(i, match.index), new CursorParagraph(i, match.index + match[0].length));
6737
+ this.allMatches.push({ sessionId, range });
6738
+ sessionHighlights.push(range);
6739
+ }
6740
+ }
6741
+ renderer.updateSearchHighlights(sessionHighlights);
6660
6742
  }
6661
- catch {
6662
- regular = null;
6743
+ if (!this.allMatches.length) {
6744
+ this.currentIndex = -1;
6745
+ return;
6663
6746
  }
6664
- options.regex = regular;
6665
- return options.regex;
6747
+ this.currentIndex = this.currentIndex > this.allMatches.length - 1 ? this.allMatches.length - 1 : this.currentIndex;
6666
6748
  }
6667
- assembleMultilineRegExp(needle, modifier) {
6668
- const parts = needle.replace(/\r\n|\r|\n/g, '$\n^').split('\n');
6669
- const regex = [];
6670
- for (const element of parts) {
6671
- try {
6672
- regex.push(new RegExp(element, modifier));
6673
- }
6674
- catch {
6675
- return [];
6676
- }
6749
+ goNext(selection, currentSessionId) {
6750
+ if (!this.allMatches?.length) {
6751
+ return;
6677
6752
  }
6678
- return regex;
6753
+ let newIndex = this.allMatches.findIndex(x => (x.sessionId === currentSessionId &&
6754
+ x.range.start.row === selection.cursor.row &&
6755
+ x.range.start.column > selection.cursor.column) ||
6756
+ (x.sessionId === currentSessionId && x.range.start.row > selection.cursor.row) ||
6757
+ x.sessionId > currentSessionId);
6758
+ this.currentIndex = newIndex < 0 ? 0 : newIndex;
6679
6759
  }
6680
- setMatchIterator(session, options) {
6681
- const regex = this.assembleRegExp(options);
6682
- if (!regex) {
6683
- return null;
6684
- }
6685
- const backwards = options.backwards ?? false;
6686
- const skipCurrent = options.skipCurrent ?? false;
6687
- let start = options.start;
6688
- if (!start) {
6689
- start = session.selection.range;
6690
- }
6691
- let startParagraphPosition;
6692
- if (start instanceof Range && start.start) {
6693
- startParagraphPosition = start[skipCurrent !== backwards ? 'end' : 'start'];
6694
- }
6695
- let firstRow = 0;
6696
- let lastRow = session.displayData.paragraphs.length - 2;
6697
- this.setForEach(backwards, startParagraphPosition, options, firstRow, lastRow);
6698
- const singleRe = regex;
6699
- this.setForEachInLine(regex, options, backwards, session, singleRe);
6700
- }
6701
- setForEach(backwards, startParagraphPosition, options, firstRow, lastRow) {
6702
- if (backwards) {
6703
- this.setForEachForBackwards(startParagraphPosition, options, firstRow, lastRow);
6760
+ goPrevious(selection, currentSessionId) {
6761
+ if (!this.allMatches?.length) {
6704
6762
  return;
6705
6763
  }
6706
- this.setDefaultForEach(startParagraphPosition, options, firstRow, lastRow);
6707
- }
6708
- setDefaultForEach(startParagraphPosition, options, firstRow, lastRow) {
6709
- this.forEach = callback => {
6710
- let row = startParagraphPosition.row;
6711
- if (this.forEachInLine(row, startParagraphPosition.column, callback)) {
6712
- return;
6713
- }
6714
- for (row = row + 1; row <= lastRow; row++) {
6715
- if (this.forEachInLine(row, 0, callback)) {
6716
- return;
6717
- }
6718
- }
6719
- if (options.wrap === false) {
6720
- return;
6721
- }
6722
- for (row = firstRow, lastRow = startParagraphPosition.row; row <= lastRow; row++) {
6723
- if (this.forEachInLine(row, 0, callback)) {
6724
- return;
6725
- }
6726
- }
6727
- };
6728
- }
6729
- setForEachForBackwards(startParagraphPosition, options, firstRow, lastRow) {
6730
- this.forEach = callback => {
6731
- let row = startParagraphPosition.row;
6732
- if (this.forEachInLine(row, startParagraphPosition.column, callback)) {
6733
- return;
6734
- }
6735
- for (row--; row >= firstRow; row--) {
6736
- if (this.forEachInLine(row, Number.MAX_VALUE, callback)) {
6737
- return;
6738
- }
6739
- }
6740
- if (options.wrap === false) {
6741
- return;
6742
- }
6743
- for (row = lastRow, firstRow = startParagraphPosition.row; row >= firstRow; row--) {
6744
- if (this.forEachInLine(row, Number.MAX_VALUE, callback)) {
6745
- return;
6746
- }
6764
+ let prevIndex = -1;
6765
+ for (let i = this.allMatches.length - 1; i >= 0; i--) {
6766
+ const match = this.allMatches[i];
6767
+ if ((match.sessionId === currentSessionId &&
6768
+ match.range.start.row === selection.cursor.row &&
6769
+ match.range.start.column < selection.cursor.column) ||
6770
+ (match.sessionId === currentSessionId && match.range.start.row < selection.cursor.row) ||
6771
+ match.sessionId < currentSessionId) {
6772
+ prevIndex = i;
6773
+ break;
6747
6774
  }
6748
- };
6775
+ }
6776
+ this.currentIndex = prevIndex >= 0 ? prevIndex : this.allMatches.length - 1;
6749
6777
  }
6750
- setForEachInLine(re, options, backwards, session, singleRe) {
6751
- if (Array.isArray(re) && options.isMultiLine) {
6752
- this.setForEachInLineForRegArray(re, backwards, session);
6778
+ assembleRegExp(term) {
6779
+ if (!term) {
6780
+ this.regex = null;
6781
+ return;
6753
6782
  }
6754
- else if (backwards) {
6755
- this.setForEachInLineForBackwards(session, singleRe);
6783
+ try {
6784
+ this.regex = new RegExp(term, 'gmi');
6756
6785
  }
6757
- else {
6758
- this.setDefaultForEachInLine(session, singleRe);
6786
+ catch {
6787
+ this.regex = null;
6759
6788
  }
6760
6789
  }
6761
- setForEachInLineForRegArray(regex, backwards, session) {
6762
- let regularLength = regex.length;
6763
- this.forEachInLine = (row, offset, callback) => {
6764
- let startRow = backwards ? row - regularLength + 1 : row;
6765
- if (startRow < 0) {
6766
- return false;
6767
- }
6768
- let line = session.displayData.getParagraphContent(startRow);
6769
- let startIndex = line.search(regex[0]);
6770
- if ((!backwards && startIndex < offset) || startIndex === -1) {
6771
- return false;
6772
- }
6773
- for (let i = 1; i < regularLength; i++) {
6774
- line = session.displayData.getParagraphContent(startRow + i);
6775
- if (line.search(regex[i]) === -1) {
6776
- return false;
6777
- }
6778
- }
6779
- let endIndex = line.match(regex[regularLength - 1])[0].length;
6780
- if (backwards && endIndex > offset) {
6781
- return false;
6782
- }
6783
- if (callback(startRow, startIndex, startRow + regularLength - 1, endIndex)) {
6784
- return true;
6785
- }
6786
- return false;
6787
- };
6788
- }
6789
- setForEachInLineForBackwards(session, singleRe) {
6790
- this.forEachInLine = (row, endIndex, callback) => {
6791
- let line = session.displayData.getParagraphContent(row);
6792
- let matches = [];
6793
- let regexResult, last = 0;
6794
- singleRe.lastIndex = 0;
6795
- while ((regexResult = singleRe.exec(line))) {
6796
- let length = regexResult[0].length;
6797
- last = regexResult.index;
6798
- if (!length) {
6799
- if (last >= line.length) {
6800
- break;
6801
- }
6802
- singleRe.lastIndex = last + 1;
6803
- }
6804
- if (regexResult.index + length > endIndex) {
6805
- break;
6806
- }
6807
- matches.push(regexResult.index, length);
6808
- }
6809
- for (let i = matches.length - 1; i >= 0; i -= 2) {
6810
- let column = matches[i - 1];
6811
- let length = matches[i];
6812
- if (callback(row, column, row, column + length)) {
6813
- return true;
6814
- }
6815
- }
6816
- return false;
6817
- };
6818
- }
6819
- setDefaultForEachInLine(session, singleRe) {
6820
- this.forEachInLine = (row, startIndex, callback) => {
6821
- let line = session.displayData.getParagraphContent(row);
6822
- let last;
6823
- let regexResult;
6824
- singleRe.lastIndex = startIndex;
6825
- while ((regexResult = singleRe.exec(line))) {
6826
- let length = regexResult[0].length;
6827
- last = regexResult.index;
6828
- if (callback(row, last, row, last + length)) {
6829
- return true;
6830
- }
6831
- if (!length) {
6832
- singleRe.lastIndex = last += 1;
6833
- if (last >= line.length) {
6834
- return false;
6835
- }
6836
- }
6837
- }
6838
- return false;
6839
- };
6840
- }
6841
6790
  }
6842
6791
 
6843
6792
  class Selection {
@@ -7331,8 +7280,7 @@ class Editor {
7331
7280
  this.focus();
7332
7281
  this.session.applyToolbarStyles();
7333
7282
  this.search = new Search();
7334
- this.search.set({ wrap: true });
7335
- 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.replaceSubscription(), this.rerenderSubscription(), this.resizeTableColumnsSubscription(), this.searchOptionSubscription(), 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());
7283
+ 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());
7336
7284
  }
7337
7285
  destroy() {
7338
7286
  this.subscriptions.forEach(s => s?.unsubscribe());
@@ -7404,6 +7352,7 @@ class Editor {
7404
7352
  }
7405
7353
  this.session.insertText(position, text, textStyle);
7406
7354
  this.onSelectionChange();
7355
+ this.onContentChange();
7407
7356
  }
7408
7357
  removeLeft() {
7409
7358
  if (this.selection.isEmpty) {
@@ -7458,6 +7407,7 @@ class Editor {
7458
7407
  const endPoint = this.session.insertTab(this.selection.cursor);
7459
7408
  this.onDocumentChange(new Range(this.selection.cursor, endPoint));
7460
7409
  this.onSelectionChange();
7410
+ this.onContentChange();
7461
7411
  }
7462
7412
  insertImage(imageData) {
7463
7413
  const insertIndex = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.start);
@@ -7521,6 +7471,7 @@ class Editor {
7521
7471
  const endPosition = this.session.replace(model);
7522
7472
  this.onDocumentChange(new Range(this.selection.cursor, endPosition));
7523
7473
  this.onSelectionChange();
7474
+ this.onContentChange();
7524
7475
  }
7525
7476
  removeToLineStart() {
7526
7477
  if (this.selection.isEmpty) {
@@ -7585,6 +7536,20 @@ class Editor {
7585
7536
  this.session.applyParagraphStyle(startIndex, endIndex, paragraphStyle);
7586
7537
  this.renderer.updateCursor();
7587
7538
  }
7539
+ applyParagraphsMargin(value) {
7540
+ const range = this.selection.range;
7541
+ const startIndex = this.session.model.paragraphs[range.start.row].insertIndex;
7542
+ const endIndex = this.session.model.paragraphs[range.end.row].insertIndex;
7543
+ const paragraphs = IndexedElementHelper.sliceSection(this.session.model.paragraphs, startIndex, endIndex);
7544
+ const paragraphsDeepCopy = paragraphs.map(x => new ParagraphModel({ insertIndex: x.insertIndex, paragraphStyle: new ParagraphStyleModel({ ...x.paragraphStyle }) }));
7545
+ const updatedParagraphs = paragraphs.map(x => new ParagraphModel({
7546
+ insertIndex: x.insertIndex,
7547
+ paragraphStyle: new ParagraphStyleModel({ ...x.paragraphStyle, ...value })
7548
+ }));
7549
+ this.saveApplyParagraphsToHistory(paragraphsDeepCopy, updatedParagraphs);
7550
+ this.session.applyParagraphs(updatedParagraphs);
7551
+ this.renderer.updateCursor();
7552
+ }
7588
7553
  setNumberingTemplate(templateLevels) {
7589
7554
  const range = this.selection.range;
7590
7555
  const startIndex = this.session.model.paragraphs[range.start.row].insertIndex;
@@ -7613,74 +7578,74 @@ class Editor {
7613
7578
  }
7614
7579
  }
7615
7580
  openSearch() {
7616
- this.editorService.openSearchDialog = true;
7581
+ this.editorService.setDisplaySearchBar(true);
7582
+ const selectedText = this.getSelectedText();
7583
+ if (selectedText) {
7584
+ setTimeout(() => {
7585
+ this.editorService.setDialogSearchTerm(selectedText);
7586
+ });
7587
+ }
7617
7588
  }
7618
- find(options) {
7619
- let range = this.selection.range;
7620
- if (options.term == null) {
7621
- let term = this.session.displayData.getTextRange(range) || this.search.options.term;
7622
- if (!term) {
7623
- range = this.session.getWordRange(range.start.row, range.start.column);
7624
- term = this.session.displayData.getTextRange(range);
7589
+ find(term, focusNext = false) {
7590
+ this.search.setSearchTerm(term);
7591
+ if (!term?.length) {
7592
+ for (const session of this.regulatorService.sessions) {
7593
+ session.renderer.updateSearchHighlights([]);
7594
+ session.renderer.updateActiveSearchHighlight(null);
7625
7595
  }
7626
- options.term = term;
7596
+ this.editorService.setSearchResultCount(0);
7597
+ return;
7627
7598
  }
7628
- if (!options.start) {
7629
- options.start = range;
7599
+ this.search.findAll(this.regulatorService.sessions);
7600
+ this.editorService.setSearchResultCount(this.search.allMatches.length);
7601
+ if (focusNext && this.search.allMatches?.length) {
7602
+ this.search.goNext(this.selection, this.regulatorService.currentSession.sessionId);
7603
+ this.updateActiveSearchHighlight();
7604
+ this.mainRenderer.scrollCursorIntoView(new CursorParagraph(this.search.currentMatch.range.start.row, this.search.currentMatch.range.start.column));
7630
7605
  }
7631
- this.search.set(options);
7632
- const newRange = this.search.find(this.session);
7633
- if (newRange) {
7634
- this.selection.placeSelection(range.start, range.end);
7635
- this.onSelectionChange();
7636
- if (this.session === this.mainSession) {
7637
- this.mainRenderer.scrollSelectionIntoView(range.start, range.end, 0.5);
7638
- }
7639
- return newRange;
7606
+ else {
7607
+ this.updateActiveSearchHighlight();
7640
7608
  }
7641
- range.end = range.start;
7642
- this.selection.placeCursor(range.start);
7643
- this.onSelectionChange();
7644
- return null;
7645
7609
  }
7646
- updateCounter() {
7647
- const regex = this.search.options.regex;
7648
- let all = 0;
7649
- let current = 0;
7650
- if (!regex) {
7651
- return { current: 0, total: 0 };
7652
- }
7653
- const value = this.session.displayData.getAllParagraphsContent().join('\n');
7654
- let offset = this.session.displayData.positionToIndex(this.selection.range.start);
7655
- regex.lastIndex = 0;
7656
- let regexResult;
7657
- while ((regexResult = regex.exec(value))) {
7658
- all++;
7659
- let last = regexResult.index;
7660
- if (last <= offset) {
7661
- current++;
7662
- }
7663
- if (all > this.MAX_COUNT) {
7664
- break;
7665
- }
7610
+ findNext() {
7611
+ if (!this.search.allMatches?.length) {
7612
+ return;
7666
7613
  }
7667
- return { current: current, total: all > this.MAX_COUNT ? this.MAX_COUNT : all };
7614
+ this.search.goNext(this.selection, this.regulatorService.currentSession.sessionId);
7615
+ this.setCursorAtSearchResult();
7616
+ this.updateActiveSearchHighlight();
7668
7617
  }
7669
- replace(search, replace) {
7670
- if (this.selection.isEmpty) {
7618
+ findPrevious() {
7619
+ if (!this.search.allMatches?.length) {
7671
7620
  return;
7672
7621
  }
7673
- if (search !== replace) {
7674
- if (replace) {
7675
- const insertIndex = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.start);
7676
- const insertText = new InsertTextModel({ insertIndex, text: replace });
7677
- this.replaceBy(new ReplaceModel({ insertText }));
7678
- }
7679
- else {
7680
- this.removeSelected();
7681
- }
7622
+ this.search.goPrevious(this.selection, this.regulatorService.currentSession.sessionId);
7623
+ this.updateActiveSearchHighlight();
7624
+ this.setCursorAtSearchResult();
7625
+ }
7626
+ replace() {
7627
+ if (!this.search.allMatches?.length || this.search.term === this.replaceTerm) {
7628
+ return;
7629
+ }
7630
+ if (this.replaceTerm) {
7631
+ const insertIndex = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.search.currentMatch.range.start);
7632
+ const insertText = new InsertTextModel({ insertIndex, text: this.replaceTerm });
7633
+ const partIndexes = ContentHelper.getSelectedPartDocumentIndexes(this.session.displayData.paragraphs, this.search.currentMatch.range);
7634
+ const deleteModel = new DeleteModel({
7635
+ startIndex: partIndexes.startIndex,
7636
+ count: partIndexes.endIndex - partIndexes.startIndex + 1
7637
+ });
7638
+ const replaceModel = new ReplaceModel({ insertText, delete: deleteModel });
7639
+ this.saveReplaceToHistory(this.search.currentMatch.range, replaceModel);
7640
+ const endPosition = this.session.replace(replaceModel);
7641
+ this.onDocumentChange(new Range(this.search.currentMatch.range.start, endPosition));
7682
7642
  }
7683
- this.find({ term: search, skipCurrent: true, backwards: false });
7643
+ else {
7644
+ const range = this.search.currentMatch.range;
7645
+ this.saveRemoveToHistory(range);
7646
+ this.session.remove(range);
7647
+ }
7648
+ this.find(this.search.term);
7684
7649
  }
7685
7650
  undo() {
7686
7651
  const undo = this.history.popUndoOperation();
@@ -7691,6 +7656,7 @@ class Editor {
7691
7656
  this.applyOperation(undo.operation);
7692
7657
  this.selection.placeSelection(undo.cursor, undo.anchor);
7693
7658
  this.onSelectionChange();
7659
+ this.onContentChange();
7694
7660
  }
7695
7661
  redo() {
7696
7662
  const redo = this.history.popRedoOperation();
@@ -7701,6 +7667,7 @@ class Editor {
7701
7667
  this.selection.placeSelection(redo.cursor, redo.anchor);
7702
7668
  this.applyOperation(redo.operation);
7703
7669
  this.onSelectionChange();
7670
+ this.onContentChange();
7704
7671
  }
7705
7672
  applyOperation(operation) {
7706
7673
  let command = null;
@@ -7868,6 +7835,11 @@ class Editor {
7868
7835
  this.session.replaceByRestore(structuredClone(operation));
7869
7836
  command = SaveCommandsHelper.getReplaceByRestoreCommand(structuredClone(operation), this.targets);
7870
7837
  }
7838
+ else if (operation instanceof ApplyParagraphsModel) {
7839
+ const deepCopy = structuredClone(operation);
7840
+ this.session.applyParagraphs(deepCopy.paragraphs);
7841
+ command = SaveCommandsHelper.getApplyParagraphsCommand(deepCopy.paragraphs, this.targets);
7842
+ }
7871
7843
  else {
7872
7844
  throw new Error('Undo/redo is not implemented for the Operation');
7873
7845
  }
@@ -7931,6 +7903,10 @@ class Editor {
7931
7903
  this.history.pushApplyTextStyle(startIndex, endIndex, textStyle, formats, linkFormats);
7932
7904
  this.commandsService.createCommand(SaveCommandsHelper.getApplyTextStyleCommand(startIndex, endIndex, textStyle, this.targets));
7933
7905
  }
7906
+ saveApplyParagraphsToHistory(oldParagraphs, updatedParagraphs) {
7907
+ this.history.pushApplyParagraphs(oldParagraphs, updatedParagraphs);
7908
+ this.commandsService.createCommand(SaveCommandsHelper.getApplyParagraphsCommand(updatedParagraphs, this.targets));
7909
+ }
7934
7910
  saveApplyParagraphStyleToHistory(startIndex, endIndex, paragraphStyle) {
7935
7911
  const paragraphs = IndexedElementHelper.sliceSection(this.session.model.paragraphs, startIndex, endIndex);
7936
7912
  const paragraphsDeepCopy = paragraphs.map(x => new ParagraphModel({ insertIndex: x.insertIndex, paragraphStyle: new ParagraphStyleModel({ ...x.paragraphStyle }) }));
@@ -8010,6 +7986,7 @@ class Editor {
8010
7986
  const endPoint = this.session.insertElement(this.selection.cursor, data);
8011
7987
  this.onDocumentChange(new Range(this.selection.cursor, endPoint));
8012
7988
  this.onSelectionChange();
7989
+ this.onContentChange();
8013
7990
  }
8014
7991
  removeSelected() {
8015
7992
  const range = this.selection.range;
@@ -8022,6 +7999,7 @@ class Editor {
8022
7999
  this.selection.placeCursor(range.end);
8023
8000
  this.removeNumberingsFromParagraphs();
8024
8001
  this.onSelectionChange();
8002
+ this.onContentChange();
8025
8003
  this.focus();
8026
8004
  return;
8027
8005
  }
@@ -8033,6 +8011,7 @@ class Editor {
8033
8011
  this.removeCustomElementsData();
8034
8012
  this.session.remove(range);
8035
8013
  this.onSelectionChange();
8014
+ this.onContentChange();
8036
8015
  }
8037
8016
  this.focus();
8038
8017
  }
@@ -8053,6 +8032,7 @@ class Editor {
8053
8032
  this.removeCustomElementsData();
8054
8033
  this.session.removeWithParagraph(operation);
8055
8034
  this.onSelectionChange();
8035
+ this.onContentChange();
8056
8036
  }
8057
8037
  removeCustomElementsData() {
8058
8038
  const startIndex = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.start);
@@ -8277,6 +8257,7 @@ class Editor {
8277
8257
  if (sourceSession.sessionId === this.session.sessionId && sourceStartIndex <= targetIndex && sourceEndIndex >= targetIndex) {
8278
8258
  this.selection.placeSelection(sourceRange.start, sourceRange.end);
8279
8259
  this.onSelectionChange();
8260
+ this.onContentChange();
8280
8261
  return;
8281
8262
  }
8282
8263
  const model = new MoveRangeModel({
@@ -8289,6 +8270,7 @@ class Editor {
8289
8270
  this.moveRange(model);
8290
8271
  this.saveMoveRangeToHistory(model, sourceSession, sourceRange);
8291
8272
  this.onSelectionChange();
8273
+ this.onContentChange();
8292
8274
  }
8293
8275
  moveRange(model) {
8294
8276
  this.regulatorService.setTargetedSessionAsCurrent(model.targetTargets);
@@ -8378,6 +8360,7 @@ class Editor {
8378
8360
  this.container.nativeElement.style.maxWidth = `${pageWidth}px`;
8379
8361
  const scalingRatio = this.customPageWidth ? ScalingHelper.getRatio(this.customPageWidth, pageWidth) : 1;
8380
8362
  this.editorService.setPageFormat(this.model.pageFormats[0]);
8363
+ this.editorService.paragraphStyle(this.model.paragraphs[0].paragraphStyle);
8381
8364
  this.regulatorService.addMainSession(this.model, pageWidth, scalingRatio, this.container);
8382
8365
  }
8383
8366
  onSelectionChange() {
@@ -8389,9 +8372,15 @@ class Editor {
8389
8372
  this.editorService.setHasSelection(!this.selection.isEmpty);
8390
8373
  const position = this.mainSession.displayData.positionToIndex(this.selection.selectedRange.start);
8391
8374
  const pageFormat = this.mainSession.displayData.getPageFormatAtPosition(position);
8375
+ this.editorService.paragraphStyle(this.session.model.paragraphs[this.selection.selectedRange.start.row].paragraphStyle);
8392
8376
  this.editorService.setPageFormat(pageFormat.pageFormatModel);
8393
8377
  this.rerenderMarker();
8394
8378
  }
8379
+ onContentChange() {
8380
+ if (this.search.term) {
8381
+ this.find(this.search.term);
8382
+ }
8383
+ }
8395
8384
  enableSelection() {
8396
8385
  if (!this.selection.isDisabled) {
8397
8386
  return;
@@ -8586,17 +8575,18 @@ class Editor {
8586
8575
  applyDocumentPageFormatSubscription() {
8587
8576
  return this.editorService.applyDocumentPageFormat$.subscribe(pageFormat => this.applyDocumentPageFormat(pageFormat));
8588
8577
  }
8589
- searchOptionSubscription() {
8590
- return this.editorService.searchOptions$.subscribe(searchOptions => {
8591
- this.find(searchOptions);
8592
- this.editorService.searchIteration = this.updateCounter();
8593
- });
8578
+ searchOptionSubscriptions() {
8579
+ return [
8580
+ this.editorService.searchTerm$.subscribe(searchTerm => this.find(searchTerm, true)),
8581
+ this.editorService.searchNext$.subscribe(() => this.findNext()),
8582
+ this.editorService.searchPrevious$.subscribe(() => this.findPrevious())
8583
+ ];
8594
8584
  }
8595
8585
  replaceSubscription() {
8596
- return this.editorService.replace$.subscribe(replace => {
8597
- this.replace(replace.searchValue, replace.replaceValue);
8598
- this.editorService.searchIteration = this.updateCounter();
8599
- });
8586
+ return [
8587
+ this.editorService.replaceTerm$.subscribe(x => (this.replaceTerm = x)),
8588
+ this.editorService.replaceCurrent$.subscribe(() => this.replace())
8589
+ ];
8600
8590
  }
8601
8591
  setTextStylesSubscription() {
8602
8592
  return this.editorService.setTextStyles$.subscribe(textStyles => {
@@ -8622,6 +8612,18 @@ class Editor {
8622
8612
  this.focus();
8623
8613
  });
8624
8614
  }
8615
+ applyFirstLinePositionSubscription() {
8616
+ return this.editorService.firstLinePosition$.subscribe(x => {
8617
+ const value = x > 0 ? { indentFirstLine: x, indentHanging: 0 } : { indentHanging: Math.abs(x), indentFirstLine: 0 };
8618
+ this.applyParagraphsMargin(value);
8619
+ });
8620
+ }
8621
+ applyRightIndentParagraphSubscription() {
8622
+ return this.editorService.rightIndentParagraph$.subscribe(indentRight => this.applyParagraphsMargin({ indentRight }));
8623
+ }
8624
+ applyLeftIndentParagraphSubscription() {
8625
+ return this.editorService.leftIndentParagraph$.subscribe(indentLeft => this.applyParagraphsMargin({ indentLeft }));
8626
+ }
8625
8627
  setImageStyleSubscription() {
8626
8628
  return this.editorService.setImageStyle$.subscribe(image => this.applyImageStyles(image));
8627
8629
  }
@@ -8871,10 +8873,97 @@ class Editor {
8871
8873
  changeCellsWidth(rows, widthScale) {
8872
8874
  rows.forEach(row => row.cells.forEach(cell => (cell.width = Math.round(cell.width / widthScale))));
8873
8875
  }
8876
+ updateActiveSearchHighlight() {
8877
+ this.editorService.setCurrentSearchResultIndex(this.search.currentMatchIndex);
8878
+ if (!this.search.currentMatch) {
8879
+ for (const session of this.regulatorService.sessions) {
8880
+ session.renderer.updateActiveSearchHighlight(null);
8881
+ }
8882
+ return;
8883
+ }
8884
+ for (const session of this.regulatorService.sessions) {
8885
+ if (session.sessionId === this.search.currentMatch.sessionId) {
8886
+ session.renderer.updateActiveSearchHighlight(this.search.currentMatch.range);
8887
+ continue;
8888
+ }
8889
+ session.renderer.updateActiveSearchHighlight(null);
8890
+ }
8891
+ }
8892
+ setCursorAtSearchResult() {
8893
+ this.regulatorService.setCurrentSessionById(this.search.currentMatch.sessionId);
8894
+ const resultCursor = new CursorParagraph(this.search.currentMatch.range.start.row, this.search.currentMatch.range.start.column);
8895
+ this.selection.placeCursor(resultCursor);
8896
+ this.mainRenderer.scrollCursorIntoView(resultCursor);
8897
+ }
8874
8898
  }
8875
8899
 
8876
8900
  const EDITOR_VERSION = '2';
8877
8901
 
8902
+ class EditorSearchBarComponent {
8903
+ constructor(editorService, destroyRef) {
8904
+ this.editorService = editorService;
8905
+ this.destroyRef = destroyRef;
8906
+ this.searchControl = new FormControl('');
8907
+ this.replaceControl = new FormControl('');
8908
+ this.isReplace = false;
8909
+ this.searchResultCount$ = editorService.searchResultCount$;
8910
+ this.searchResultIndex$ = editorService.currentSearchResultIndex$;
8911
+ }
8912
+ ngOnInit() {
8913
+ this.searchControl.valueChanges
8914
+ .pipe(debounceTime(300), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
8915
+ .subscribe(() => this.editorService.setNewSearchTerm(this.searchControl.value));
8916
+ this.replaceControl.valueChanges
8917
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
8918
+ .subscribe(() => this.editorService.setNewReplaceTerm(this.replaceControl.value));
8919
+ this.editorService.dialogSearchTerm$
8920
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
8921
+ .subscribe(x => this.searchControl.setValue(x));
8922
+ }
8923
+ ngOnDestroy() {
8924
+ this.editorService.setNewSearchTerm('');
8925
+ }
8926
+ onClose() {
8927
+ this.editorService.setDisplaySearchBar(false);
8928
+ }
8929
+ focusInput() {
8930
+ setTimeout(() => {
8931
+ this.searchInput?.nativeElement?.focus();
8932
+ this.searchInput?.nativeElement?.select();
8933
+ });
8934
+ }
8935
+ findNext() {
8936
+ this.editorService.goNextSearchResult();
8937
+ }
8938
+ findPrev() {
8939
+ this.editorService.goPreviousSearchResult();
8940
+ }
8941
+ setReplace() {
8942
+ this.isReplace = !this.isReplace;
8943
+ }
8944
+ replace() {
8945
+ this.editorService.replaceCurrentSearchResult();
8946
+ }
8947
+ 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 }); }
8948
+ 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<div class=\"line search-form\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SEARCH_FOR' | translate }}</mat-label>\n <input\n matInput\n #searchInput\n [formControl]=\"searchControl\"\n (keydown.enter)=\"findNext()\" />\n </mat-form-field>\n <div>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findPrev()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onleft\"></mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findNext()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onright\"></mat-icon>\n </button>\n </div>\n</div>\n<div\n class=\"replace-form\"\n *ngIf=\"isReplace\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.REPLACE_WITH' | 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 <button\n type=\"button\"\n mat-button\n (click)=\"replace()\">\n {{ 'NODER.LABEL.REPLACE' | translate }}\n </button>\n</div>\n<div class=\"search-options\">\n <button\n type=\"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-up' : 'icon-arrow-down' }}\"></mat-icon>\n </button>\n <div class=\"counter\">\n @if (searchResultCount) {\n <span>\n {{ 'NODER.COMPLEX_LABEL.OF_COUNTER' | translate: { current: searchResultIndex, total: searchResultCount ?? 0 } }}\n </span>\n } @else {\n <span>{{ 'NODER.LABEL.NO_RESULTS' | translate }}</span>\n }\n </div>\n <button\n type=\"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", styles: [":host{min-height:56px;max-width:100%;display:block;font-size:10px;border-style:solid;border-radius:0 0 4px 4px;border-width:1px;border-top:none}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}.close-icon{position:absolute;right:1px;top:1px}.search-form,.replace-form,.search-options{margin:8px 6px 0 0;display:flex;gap:8px}mat-form-field{padding-left:10px}.mdc-button{font-size:12px;padding:0 8px;min-width:unset}.search-options{line-height:40px}.search-options .counter{text-align:center;flex:1}.mat-mdc-input-element{font-size:10px}.replace-form .mdc-button{width:80px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.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$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: MatTooltipModule }, { kind: "directive", type: i5$2.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: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8949
+ }
8950
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorSearchBarComponent, decorators: [{
8951
+ type: Component,
8952
+ args: [{ imports: [
8953
+ CommonModule,
8954
+ FormsModule,
8955
+ MatButtonModule,
8956
+ MatIconModule,
8957
+ MatInputModule,
8958
+ MatTooltipModule,
8959
+ ReactiveFormsModule,
8960
+ TranslateModule
8961
+ ], providers: [ExternalElementService], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-search-bar', template: "@let searchResultCount = searchResultCount$ | async;\n@let searchResultIndex = searchResultIndex$ | 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.SEARCH_FOR' | translate }}</mat-label>\n <input\n matInput\n #searchInput\n [formControl]=\"searchControl\"\n (keydown.enter)=\"findNext()\" />\n </mat-form-field>\n <div>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findPrev()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onleft\"></mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findNext()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onright\"></mat-icon>\n </button>\n </div>\n</div>\n<div\n class=\"replace-form\"\n *ngIf=\"isReplace\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.REPLACE_WITH' | 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 <button\n type=\"button\"\n mat-button\n (click)=\"replace()\">\n {{ 'NODER.LABEL.REPLACE' | translate }}\n </button>\n</div>\n<div class=\"search-options\">\n <button\n type=\"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-up' : 'icon-arrow-down' }}\"></mat-icon>\n </button>\n <div class=\"counter\">\n @if (searchResultCount) {\n <span>\n {{ 'NODER.COMPLEX_LABEL.OF_COUNTER' | translate: { current: searchResultIndex, total: searchResultCount ?? 0 } }}\n </span>\n } @else {\n <span>{{ 'NODER.LABEL.NO_RESULTS' | translate }}</span>\n }\n </div>\n <button\n type=\"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", styles: [":host{min-height:56px;max-width:100%;display:block;font-size:10px;border-style:solid;border-radius:0 0 4px 4px;border-width:1px;border-top:none}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}.close-icon{position:absolute;right:1px;top:1px}.search-form,.replace-form,.search-options{margin:8px 6px 0 0;display:flex;gap:8px}mat-form-field{padding-left:10px}.mdc-button{font-size:12px;padding:0 8px;min-width:unset}.search-options{line-height:40px}.search-options .counter{text-align:center;flex:1}.mat-mdc-input-element{font-size:10px}.replace-form .mdc-button{width:80px}\n"] }]
8962
+ }], ctorParameters: () => [{ type: EditorService }, { type: i0.DestroyRef }], propDecorators: { searchInput: [{
8963
+ type: ViewChild,
8964
+ args: ['searchInput']
8965
+ }] } });
8966
+
8878
8967
  const EXTERNAL_ELEMENT_SIDENAV = new InjectionToken('EXTERNAL_ELEMENT_SIDENAV');
8879
8968
  const EXTERNAL_ELEMENT_SERVICE = new InjectionToken('EXTERNAL_ELEMENT_SERVICE');
8880
8969
 
@@ -10593,7 +10682,7 @@ class TextLineInfo {
10593
10682
  }
10594
10683
  switch (align) {
10595
10684
  case Alignment$1.center:
10596
- this.paddingLeft = indent.left + (diff - indent.left - indent.right) / 2;
10685
+ this.paddingLeft = indent.left + (diff - indent.left - indent.right) / 2 + (indent.hanging - indent.firstLine) / 2;
10597
10686
  break;
10598
10687
  case Alignment$1.right:
10599
10688
  this.paddingLeft = diff - indent.right;
@@ -12617,6 +12706,15 @@ class EditSession {
12617
12706
  this.selection.placeCursor(endPosition);
12618
12707
  this.applyToolbarStyles();
12619
12708
  }
12709
+ applyParagraphs(paragraphs) {
12710
+ const startIndex = paragraphs[0].insertIndex;
12711
+ const endIndex = paragraphs[paragraphs.length - 1].insertIndex;
12712
+ const startParagraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, startIndex).row;
12713
+ const endPosition = ContentHelper.documentIndexToParagraphWithOffset(this.displayData.paragraphs, endIndex);
12714
+ OperationsHelper.applyParagraphs(this.model, paragraphs);
12715
+ this.displayData.updateNextLineIndexes(startParagraph, endPosition.row);
12716
+ this.applyToolbarStyles();
12717
+ }
12620
12718
  setTextStyle(textStyle) {
12621
12719
  const result = { ...this.editorService.styles };
12622
12720
  for (let key of Object.keys(textStyle)) {
@@ -13114,6 +13212,7 @@ class RenderChangesModel {
13114
13212
  this.lines ||
13115
13213
  this.marker ||
13116
13214
  this.selection ||
13215
+ this.search ||
13117
13216
  this.scroll ||
13118
13217
  this.size ||
13119
13218
  this.text ||
@@ -13125,6 +13224,7 @@ class RenderChangesModel {
13125
13224
  this.lines = false;
13126
13225
  this.marker = false;
13127
13226
  this.selection = false;
13227
+ this.search = false;
13128
13228
  this.scroll = false;
13129
13229
  this.size = false;
13130
13230
  this.text = false;
@@ -13183,15 +13283,14 @@ class RenderLoop {
13183
13283
  }
13184
13284
  }
13185
13285
 
13186
- class SelectionLayer {
13286
+ class HighlightLayer {
13187
13287
  constructor(parentEl, cssClass, session) {
13188
13288
  this.session = session;
13189
- this.marker = null;
13190
13289
  this.element = document.createElement('div');
13191
- this.element.className = `noder-layer noder-selection-layer ${cssClass}`;
13290
+ this.element.className = `noder-layer noder-highlight-layer ${cssClass}`;
13192
13291
  parentEl.appendChild(this.element);
13193
13292
  }
13194
- renderSelection(css) {
13293
+ renderHighlight(cssPosition, cssClass) {
13195
13294
  let selectionElement = this.selectionIndex !== -1 ? this.element.childNodes[this.selectionIndex] : null;
13196
13295
  if (!selectionElement) {
13197
13296
  selectionElement = document.createElement('div');
@@ -13201,32 +13300,8 @@ class SelectionLayer {
13201
13300
  else {
13202
13301
  this.selectionIndex++;
13203
13302
  }
13204
- selectionElement.style.cssText = css;
13205
- selectionElement.className = 'noder-selection';
13206
- }
13207
- update(config) {
13208
- if (!config) {
13209
- return;
13210
- }
13211
- this.config = config;
13212
- this.selectionIndex = 0;
13213
- if (this.marker) {
13214
- let range = this.marker.clipRows(config.contentRange.start, config.contentRange.end);
13215
- if (!range.isEmpty) {
13216
- range = range.toScreenRange(this.session);
13217
- if (range.isSingleLine) {
13218
- this.drawSingleLineMarker(range);
13219
- }
13220
- else {
13221
- this.drawMultiLineMarker(range);
13222
- }
13223
- }
13224
- }
13225
- if (this.selectionIndex !== -1) {
13226
- while (this.selectionIndex < this.element.childElementCount) {
13227
- this.element.removeChild(this.element.lastChild);
13228
- }
13229
- }
13303
+ selectionElement.style.cssText = cssPosition;
13304
+ selectionElement.className = cssClass;
13230
13305
  }
13231
13306
  getTop(row) {
13232
13307
  const paragraphs = this.session.displayData.paragraphs;
@@ -13236,7 +13311,7 @@ class SelectionLayer {
13236
13311
  this.session.scrollTop);
13237
13312
  }
13238
13313
  // Draws a multi line marker, where lines span the full width
13239
- drawMultiLineMarker(range) {
13314
+ drawMultiLineMarker(range, cssClass) {
13240
13315
  // from selection start to the end of the line
13241
13316
  const start = range.start.row;
13242
13317
  const end = range.end.row;
@@ -13272,19 +13347,19 @@ class SelectionLayer {
13272
13347
  let width = lineInfo.width + (lineInfo.wordSpacingWidth ?? 0);
13273
13348
  style = this.getMarkerStyle(lineInfo.height, width, top, left);
13274
13349
  }
13275
- this.renderSelection(style);
13350
+ this.renderHighlight(style, cssClass);
13276
13351
  top += lineInfo.height + lineInfo.offsetAfter + lineInfo.endPageOffset;
13277
13352
  }
13278
13353
  }
13279
13354
  // Draws a marker which covers part or whole width of a single screen line
13280
- drawSingleLineMarker(range) {
13355
+ drawSingleLineMarker(range, cssClass) {
13281
13356
  const rangeInfo = this.getRangeInfo(this.session, range);
13282
13357
  const paragraphInfo = PositionHelper.getParagraphInfoByRow(this.session.displayData.paragraphs, range.start.row);
13283
13358
  const height = rangeInfo.screenHeight || paragraphInfo.lineHeight;
13284
13359
  const width = rangeInfo.screenWidth;
13285
13360
  const top = this.getTop(range.start.row);
13286
13361
  const left = rangeInfo.leftPos;
13287
- this.renderSelection(this.getMarkerStyle(height, width, top, left));
13362
+ this.renderHighlight(this.getMarkerStyle(height, width, top, left), cssClass);
13288
13363
  }
13289
13364
  getRangeInfo(session, range) {
13290
13365
  const start = range.start;
@@ -13302,6 +13377,91 @@ class SelectionLayer {
13302
13377
  }
13303
13378
  }
13304
13379
 
13380
+ class SearchHighlightLayer extends HighlightLayer {
13381
+ constructor(parentEl, cssClass, session) {
13382
+ super(parentEl, cssClass, session);
13383
+ this.className = 'noder-highlight';
13384
+ this.selectedClassName = 'noder-selected-highlight';
13385
+ this.markers = [];
13386
+ }
13387
+ update(config) {
13388
+ if (!config) {
13389
+ return;
13390
+ }
13391
+ this.config = config;
13392
+ this.selectionIndex = 0;
13393
+ if (this.active) {
13394
+ const screenRange = this.active.toScreenRange(this.session);
13395
+ if (!screenRange.isEmpty &&
13396
+ (!config.visibleRange ||
13397
+ (screenRange.start.row >= config.visibleRange.startScreenLine &&
13398
+ screenRange.end.row <= config.visibleRange.endScreenLine))) {
13399
+ if (screenRange.isSingleLine) {
13400
+ this.drawSingleLineMarker(screenRange, this.selectedClassName);
13401
+ }
13402
+ else {
13403
+ this.drawMultiLineMarker(screenRange, this.selectedClassName);
13404
+ }
13405
+ }
13406
+ }
13407
+ if (this.markers) {
13408
+ const ranges = this.markers
13409
+ .map(x => x.toScreenRange(this.session))
13410
+ .filter(x => !x.isEmpty &&
13411
+ (!config.visibleRange ||
13412
+ (x.start.row >= config.visibleRange.startScreenLine && x.end.row <= config.visibleRange.endScreenLine)) &&
13413
+ !x.isEqual(this.active));
13414
+ for (const range of ranges) {
13415
+ if (!range.isEmpty) {
13416
+ if (range.isSingleLine) {
13417
+ this.drawSingleLineMarker(range, this.className);
13418
+ }
13419
+ else {
13420
+ this.drawMultiLineMarker(range, this.className);
13421
+ }
13422
+ }
13423
+ }
13424
+ }
13425
+ if (this.selectionIndex !== -1) {
13426
+ while (this.selectionIndex < this.element.childElementCount) {
13427
+ this.element.removeChild(this.element.lastChild);
13428
+ }
13429
+ }
13430
+ }
13431
+ }
13432
+
13433
+ class SelectionLayer extends HighlightLayer {
13434
+ constructor(parentEl, cssClass, session) {
13435
+ super(parentEl, cssClass, session);
13436
+ this.className = 'noder-selection';
13437
+ this.marker = null;
13438
+ }
13439
+ update(config) {
13440
+ if (!config) {
13441
+ return;
13442
+ }
13443
+ this.config = config;
13444
+ this.selectionIndex = 0;
13445
+ if (this.marker) {
13446
+ let range = this.marker.clipRows(config.contentRange.start, config.contentRange.end);
13447
+ if (!range.isEmpty) {
13448
+ range = range.toScreenRange(this.session);
13449
+ if (range.isSingleLine) {
13450
+ this.drawSingleLineMarker(range, this.className);
13451
+ }
13452
+ else {
13453
+ this.drawMultiLineMarker(range, this.className);
13454
+ }
13455
+ }
13456
+ }
13457
+ if (this.selectionIndex !== -1) {
13458
+ while (this.selectionIndex < this.element.childElementCount) {
13459
+ this.element.removeChild(this.element.lastChild);
13460
+ }
13461
+ }
13462
+ }
13463
+ }
13464
+
13305
13465
  class Renderer extends EventEmitting {
13306
13466
  constructor(parentContainer, session) {
13307
13467
  super();
@@ -13338,6 +13498,7 @@ class Renderer extends EventEmitting {
13338
13498
  this.createContentContainer();
13339
13499
  this.textLayer = new TextLayer(this.content, this.session);
13340
13500
  this.selectionLayer = new SelectionLayer(this.content, 'text-selection', this.session);
13501
+ this.searchHighlightLayer = new SearchHighlightLayer(this.content, 'text-search-highlight', this.session);
13341
13502
  this.cursorLayer = new CursorLayer(this.content, this.session);
13342
13503
  this.dragAndDropSelectionLayer = new SelectionLayer(this.content, 'drag-and-drop-selection', this.session);
13343
13504
  this.loop = new RenderLoop(changes => this.renderChanges(changes));
@@ -13371,6 +13532,9 @@ class Renderer extends EventEmitting {
13371
13532
  if (changes.marker || changes.selection) {
13372
13533
  this.renderSelection();
13373
13534
  }
13535
+ if (changes.search) {
13536
+ this.renderSearchHighlights();
13537
+ }
13374
13538
  if (changes.dragAndDrop) {
13375
13539
  this.renderDragAndDropSelection();
13376
13540
  }
@@ -13415,6 +13579,19 @@ class Renderer extends EventEmitting {
13415
13579
  this.loop.schedule({ selection: true });
13416
13580
  }
13417
13581
  }
13582
+ updateSearchHighlights(ranges) {
13583
+ if (this.searchHighlightLayer.markers.length !== ranges.length ||
13584
+ !this.searchHighlightLayer.markers.every(x => ranges.some(y => x.isEqual(y)))) {
13585
+ this.searchHighlightLayer.markers = ranges;
13586
+ this.loop.schedule({ search: true });
13587
+ }
13588
+ }
13589
+ updateActiveSearchHighlight(active) {
13590
+ if (!this.searchHighlightLayer.active?.isEqual(active)) {
13591
+ this.searchHighlightLayer.active = active;
13592
+ this.loop.schedule({ search: true });
13593
+ }
13594
+ }
13418
13595
  updateDragAndDropSelection(range) {
13419
13596
  if (range.isEmpty && this.dragAndDropSelectionLayer.marker) {
13420
13597
  this.dragAndDropSelectionLayer.marker = null;
@@ -13476,6 +13653,7 @@ class Renderer extends EventEmitting {
13476
13653
  renderFull() {
13477
13654
  this.textLayer.updateLines(this.layerConfig);
13478
13655
  this.selectionLayer.update(this.layerConfig);
13656
+ this.searchHighlightLayer.update(this.layerConfig);
13479
13657
  this.cursorLayer.update(this.layerConfig);
13480
13658
  this.moveTextAreaToCursor();
13481
13659
  this.session.onRendered();
@@ -13492,6 +13670,9 @@ class Renderer extends EventEmitting {
13492
13670
  this.selectionLayer.update(this.layerConfig);
13493
13671
  this.cursorLayer.detectVisibility();
13494
13672
  }
13673
+ renderSearchHighlights() {
13674
+ this.searchHighlightLayer.update(this.layerConfig);
13675
+ }
13495
13676
  renderDragAndDropSelection() {
13496
13677
  this.dragAndDropSelectionLayer.update(this.layerConfig);
13497
13678
  }
@@ -13693,6 +13874,9 @@ class VirtualRenderer {
13693
13874
  if (changes.marker || changes.selection) {
13694
13875
  this.renderSelection();
13695
13876
  }
13877
+ if (changes.search) {
13878
+ this.renderSearchHighlights();
13879
+ }
13696
13880
  if (changes.dragAndDrop) {
13697
13881
  this.renderDragAndDropSelection();
13698
13882
  }
@@ -13759,6 +13943,12 @@ class VirtualRenderer {
13759
13943
  updateSelection(range) {
13760
13944
  this.renderer.updateSelection(range);
13761
13945
  }
13946
+ updateSearchHighlights(ranges) {
13947
+ this.renderer.updateSearchHighlights(ranges);
13948
+ }
13949
+ updateActiveSearchHighlight(active) {
13950
+ this.renderer.updateActiveSearchHighlight(active);
13951
+ }
13762
13952
  updateDragAndDropSelection(range) {
13763
13953
  this.renderer.updateDragAndDropSelection(range);
13764
13954
  }
@@ -13882,6 +14072,7 @@ class VirtualRenderer {
13882
14072
  this.renderer.textLayer.scrollLines(this.layerConfig);
13883
14073
  }
13884
14074
  this.renderer.selectionLayer.update(this.layerConfig);
14075
+ this.renderer.searchHighlightLayer.update(this.layerConfig);
13885
14076
  if (!this.renderer.cursorLayer.isVisible) {
13886
14077
  return;
13887
14078
  }
@@ -13903,6 +14094,9 @@ class VirtualRenderer {
13903
14094
  renderSelection() {
13904
14095
  this.renderer.renderSelection();
13905
14096
  }
14097
+ renderSearchHighlights() {
14098
+ this.renderer.renderSearchHighlights();
14099
+ }
13906
14100
  renderDragAndDropSelection() {
13907
14101
  this.renderer.renderDragAndDropSelection();
13908
14102
  }
@@ -14255,23 +14449,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
14255
14449
 
14256
14450
  class EditorRulerComponent {
14257
14451
  constructor() {
14452
+ this.unit = input.required();
14258
14453
  this.editorService = inject(EditorService);
14259
- this.pxPerCm = 37.8; // 96dpi / 2.54
14260
- this.snapCm = 0.25;
14261
14454
  this.defaultPaddingCm = 2.5;
14262
14455
  this.pageWidth$ = this.editorService.pageFormat$.pipe(distinctUntilChanged(), tap(x => {
14263
14456
  this.recalcGeometry(x.pageWidth);
14264
- this.buildTicks();
14265
- this.rightPx.set(x.pageWidth - x.marginRight);
14266
- this.leftPx.set(x.marginLeft);
14457
+ this.unit() === 'inch' ? this.buildTicksInch() : this.buildTicksCm();
14458
+ this.rightMarginPageFormatPx.set(x.pageWidth - x.marginRight);
14459
+ this.leftMarginPageFormatPx.set(x.marginLeft);
14267
14460
  }), map(x => x.pageWidth));
14268
- this.containerWidthPx = 0;
14269
- this.ticks = [];
14270
- this.leftPx = signal(this.defaultPaddingCm * this.pxPerCm);
14271
- this.firstLinePx = signal(this.defaultPaddingCm * this.pxPerCm);
14272
- this.rightPx = signal(0);
14461
+ this.snapInch = 0.125;
14462
+ this.snapCm = 0.25;
14463
+ this.pxPerCm = 37.8; // 96dpi / 2.54
14464
+ this.pxPerInch = 96;
14465
+ this.firstLine = signal(this.defaultPaddingCm * this.pxPerCm);
14466
+ this.leftIndent = signal(this.defaultPaddingCm * this.pxPerCm);
14467
+ this.rightIndent = signal(0);
14468
+ this.leftIndentPx = computed(() => this.leftIndent() + this.leftMarginPageFormatPx());
14469
+ this.firstLinePx = computed(() => this.firstLine() + this.leftIndentPx());
14470
+ this.rightIndentPx = computed(() => this.rightMarginPageFormatPx() - this.rightIndent());
14471
+ this.leftMarginPageFormatPx = signal(this.defaultPaddingCm * this.pxPerCm);
14472
+ this.rightMarginPageFormatPx = signal(0);
14273
14473
  this.guideX = signal(0);
14274
14474
  this.showGuide = signal(false);
14475
+ this.containerWidthPx = 0;
14476
+ this.ticks = [];
14275
14477
  this.dragging = null;
14276
14478
  this.dragOffsetX = 0;
14277
14479
  this.onMove = (ev) => {
@@ -14286,26 +14488,38 @@ class EditorRulerComponent {
14286
14488
  return;
14287
14489
  }
14288
14490
  x = this.snapPx(x);
14289
- if (this.dragging === 'left') {
14290
- this.leftPx.set(x);
14491
+ if (this.dragging === 'leftMarginPageFormat') {
14492
+ this.leftMarginPageFormatPx.set(x);
14291
14493
  }
14292
14494
  else if (this.dragging === 'first') {
14293
- this.firstLinePx.set(x);
14495
+ this.firstLine.set(x - this.leftIndentPx());
14294
14496
  }
14295
- else {
14296
- this.rightPx.set(x);
14497
+ else if (this.dragging === 'rightMarginPageFormat') {
14498
+ this.rightMarginPageFormatPx.set(x);
14499
+ }
14500
+ else if (this.dragging === 'leftIndent') {
14501
+ this.leftIndent.set(x - this.leftMarginPageFormatPx());
14502
+ }
14503
+ else if (this.dragging === 'rightIndent') {
14504
+ this.rightIndent.set(this.rightMarginPageFormatPx() - x);
14297
14505
  }
14298
14506
  this.guideX.set(x);
14299
14507
  };
14300
14508
  this.onUp = () => {
14301
- if (this.dragging === 'left') {
14302
- this.editorService.applyLeftMarginPageFormat(Math.round(this.leftPx()));
14509
+ if (this.dragging === 'leftMarginPageFormat') {
14510
+ this.editorService.applyLeftMarginPageFormat(Math.round(this.leftMarginPageFormatPx()));
14303
14511
  }
14304
14512
  else if (this.dragging === 'first') {
14305
- this.editorService.applyTabParagraph(Math.round(this.firstLinePx()));
14513
+ this.editorService.applyFirstLinePosition(Math.round(this.firstLine()));
14306
14514
  }
14307
- else {
14308
- this.editorService.applyRightMarginPageFormat(Math.round(this.containerWidthPx - this.rightPx()));
14515
+ else if (this.dragging === 'leftIndent') {
14516
+ this.editorService.applyLeftIndentParagraph(Math.round(this.leftIndent()));
14517
+ }
14518
+ else if (this.dragging === 'rightIndent') {
14519
+ this.editorService.applyRightIndentParagraph(Math.round(this.rightIndent()));
14520
+ }
14521
+ else if (this.dragging === 'rightMarginPageFormat') {
14522
+ this.editorService.applyRightMarginPageFormat(Math.round(this.containerWidthPx - this.rightMarginPageFormatPx()));
14309
14523
  }
14310
14524
  this.dragging = null;
14311
14525
  this.showGuide.set(false);
@@ -14314,15 +14528,22 @@ class EditorRulerComponent {
14314
14528
  window.removeEventListener('touchmove', this.onMove);
14315
14529
  window.removeEventListener('touchend', this.onUp);
14316
14530
  };
14531
+ this.editorService.paragraphStyle$.pipe(takeUntilDestroyed()).subscribe(x => {
14532
+ this.firstLine.set(x.indentHanging ? -x.indentHanging : x.indentFirstLine);
14533
+ this.leftIndent.set(x.indentLeft);
14534
+ this.rightIndent.set(x.indentRight);
14535
+ });
14536
+ effect(() => (this.unit() === 'inch' ? this.buildTicksInch() : this.buildTicksCm()));
14317
14537
  }
14318
14538
  afterViewInit() {
14319
14539
  this.recalcGeometry();
14320
- this.buildTicks();
14321
- this.rightPx.set(this.containerWidthPx - this.cmToPx(2.5));
14540
+ this.unit() === 'inch' ? this.buildTicksInch() : this.buildTicksCm();
14541
+ this.rightMarginPageFormatPx.set(this.containerWidthPx - this.cmToPx(2.5));
14542
+ this.rightIndent.set(0);
14322
14543
  }
14323
14544
  onResize() {
14324
14545
  this.recalcGeometry();
14325
- this.buildTicks();
14546
+ this.buildTicksCm();
14326
14547
  }
14327
14548
  recalcGeometry(width = null) {
14328
14549
  this.containerWidthPx = width ?? this.rulerContainer.nativeElement.getBoundingClientRect().width;
@@ -14333,12 +14554,25 @@ class EditorRulerComponent {
14333
14554
  pxToCm(px) {
14334
14555
  return px / this.pxPerCm;
14335
14556
  }
14557
+ inchToPx(cm) {
14558
+ return cm * this.pxPerInch;
14559
+ }
14560
+ pxToInch(px) {
14561
+ return px / this.pxPerInch;
14562
+ }
14336
14563
  snapPx(px) {
14337
- const cm = this.pxToCm(px);
14338
- const snapped = Math.round(cm / this.snapCm) * this.snapCm;
14339
- return this.cmToPx(snapped);
14564
+ if (this.unit() === 'inch') {
14565
+ const inch = this.pxToInch(px);
14566
+ const snapped = Math.round(inch / this.snapInch) * this.snapInch;
14567
+ return this.inchToPx(snapped);
14568
+ }
14569
+ else {
14570
+ const cm = this.pxToCm(px);
14571
+ const snapped = Math.round(cm / this.snapCm) * this.snapCm;
14572
+ return this.cmToPx(snapped);
14573
+ }
14340
14574
  }
14341
- buildTicks() {
14575
+ buildTicksCm() {
14342
14576
  const totalCm = Math.ceil(this.pxToCm(this.containerWidthPx));
14343
14577
  const ticks = [
14344
14578
  {
@@ -14349,7 +14583,7 @@ class EditorRulerComponent {
14349
14583
  originalPaddings: -2.5
14350
14584
  },
14351
14585
  {
14352
- position: this.cmToPx(0.25),
14586
+ position: this.cmToPx(this.snapCm),
14353
14587
  major: false,
14354
14588
  half: false,
14355
14589
  label: null,
@@ -14361,14 +14595,37 @@ class EditorRulerComponent {
14361
14595
  ticks.push({ position, major: true, half: false, label: Math.abs(cm - 3), originalPaddings: cm - 3 }); // -3 because we start the line with 2.5
14362
14596
  if (cm <= totalCm) {
14363
14597
  for (let i = 1; i < 4; i++) {
14364
- const tickPosition = position + this.cmToPx(i * 0.25);
14598
+ const tickPosition = position + this.cmToPx(i * this.snapCm);
14365
14599
  if (tickPosition < this.containerWidthPx) {
14366
14600
  ticks.push({
14367
14601
  position: tickPosition,
14368
14602
  major: false,
14369
14603
  half: i === 2,
14370
14604
  label: null,
14371
- originalPaddings: cm - 3 + i * 0.25
14605
+ originalPaddings: cm - 3 + i * this.snapCm
14606
+ });
14607
+ }
14608
+ }
14609
+ }
14610
+ }
14611
+ this.ticks = ticks;
14612
+ }
14613
+ buildTicksInch() {
14614
+ const totalInch = Math.ceil(this.pxToInch(this.containerWidthPx));
14615
+ const ticks = [];
14616
+ for (let inch = 0; inch <= totalInch; inch++) {
14617
+ const position = this.inchToPx(inch);
14618
+ ticks.push({ position, major: true, half: false, label: Math.abs(inch - 1), originalPaddings: inch - 1 }); // -1
14619
+ if (inch <= totalInch) {
14620
+ for (let i = 1; i < 8; i++) {
14621
+ const tickPosition = position + this.inchToPx(i * this.snapInch);
14622
+ if (tickPosition < this.containerWidthPx) {
14623
+ ticks.push({
14624
+ position: tickPosition,
14625
+ major: false,
14626
+ half: i === 4,
14627
+ label: null,
14628
+ originalPaddings: inch - 1 + i * this.snapInch
14372
14629
  });
14373
14630
  }
14374
14631
  }
@@ -14381,14 +14638,20 @@ class EditorRulerComponent {
14381
14638
  const pointX = this.getClientX(ev);
14382
14639
  const rect = this.rulerContainer.nativeElement.getBoundingClientRect();
14383
14640
  this.dragging = target;
14384
- if (target === 'left') {
14385
- this.dragOffsetX = pointX - rect.left - this.leftPx();
14641
+ if (target === 'leftMarginPageFormat') {
14642
+ this.dragOffsetX = pointX - rect.left - this.leftMarginPageFormatPx();
14386
14643
  }
14387
14644
  else if (target === 'first') {
14388
14645
  this.dragOffsetX = pointX - rect.left - this.firstLinePx();
14389
14646
  }
14390
- else {
14391
- this.dragOffsetX = pointX - rect.left - this.rightPx();
14647
+ else if (target === 'rightMarginPageFormat') {
14648
+ this.dragOffsetX = pointX - rect.left - this.rightMarginPageFormatPx();
14649
+ }
14650
+ else if (target === 'leftIndent') {
14651
+ this.dragOffsetX = pointX - rect.left - this.leftIndentPx();
14652
+ }
14653
+ else if (target === 'rightIndent') {
14654
+ this.dragOffsetX = pointX - rect.left - this.rightIndentPx();
14392
14655
  }
14393
14656
  this.showGuide.set(true);
14394
14657
  this.guideX.set(this.getCurrentDraggedPx());
@@ -14405,21 +14668,25 @@ class EditorRulerComponent {
14405
14668
  }
14406
14669
  getCurrentDraggedPx() {
14407
14670
  switch (this.dragging) {
14408
- case 'left':
14409
- return this.leftPx();
14671
+ case 'leftMarginPageFormat':
14672
+ return this.leftMarginPageFormatPx();
14410
14673
  case 'first':
14411
14674
  return this.firstLinePx();
14412
- case 'right':
14413
- return this.rightPx();
14675
+ case 'rightMarginPageFormat':
14676
+ return this.rightMarginPageFormatPx();
14677
+ case 'leftIndent':
14678
+ return this.leftIndentPx();
14679
+ case 'rightIndent':
14680
+ return this.rightIndentPx();
14414
14681
  }
14415
14682
  }
14416
14683
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14417
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorRulerComponent, isStandalone: true, selector: "app-nod-editor-ruler", 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]=\"defaultPaddingCm * pxPerCm\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"defaultPaddingCm * pxPerCm\"></div>\n <div class=\"ruler-track\">\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]=\"leftPx()\"\n (mousedown)=\"startDrag($event, 'left')\"\n (touchstart)=\"startDrag($event, 'left')\" />\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 <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightPx()\"\n (mousedown)=\"startDrag($event, 'right')\"\n (touchstart)=\"startDrag($event, 'right')\" />\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:ew-resize;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}.page-marker{bottom:-6px}.left-area,.right-area{position:absolute;height:18px}.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 }); }
14684
+ 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 class=\"ruler-track\">\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 <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 }); }
14418
14685
  }
14419
14686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, decorators: [{
14420
14687
  type: Component,
14421
- 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]=\"defaultPaddingCm * pxPerCm\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"defaultPaddingCm * pxPerCm\"></div>\n <div class=\"ruler-track\">\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]=\"leftPx()\"\n (mousedown)=\"startDrag($event, 'left')\"\n (touchstart)=\"startDrag($event, 'left')\" />\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 <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightPx()\"\n (mousedown)=\"startDrag($event, 'right')\"\n (touchstart)=\"startDrag($event, 'right')\" />\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:ew-resize;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}.page-marker{bottom:-6px}.left-area,.right-area{position:absolute;height:18px}.left-area{left:0}.right-area{right:0}\n"] }]
14422
- }], propDecorators: { rulerContainer: [{
14688
+ 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 class=\"ruler-track\">\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 <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"] }]
14689
+ }], ctorParameters: () => [], propDecorators: { rulerContainer: [{
14423
14690
  type: ViewChild,
14424
14691
  args: ['rulerContainer', { static: true }]
14425
14692
  }], onResize: [{
@@ -14451,6 +14718,7 @@ class EditorComponent {
14451
14718
  this.clipboard = clipboard;
14452
14719
  this.isMobile = false;
14453
14720
  this.externalElementTagNames = ['APP-NODER-INPUT', 'APP-NODER-SIGNATURE', 'APP-NODER-DATEPICKER'];
14721
+ this.rulerUnit = input.required();
14454
14722
  this.class = 'base-editor';
14455
14723
  this.subscriptions = [];
14456
14724
  this.sidenavComponentRef = null;
@@ -14466,7 +14734,7 @@ class EditorComponent {
14466
14734
  initEditor(content) {
14467
14735
  this.ngOnDestroy();
14468
14736
  this.editor = new Editor(content, this.container, this.editorService, this.regulatorService, this.commandsService, this.clipboard, this.externalElementTagNames, this.customPageWidth);
14469
- this.subscriptions.push(this.toggleSidenavSubscription());
14737
+ this.subscriptions.push(this.toggleSidenavSubscription(), this.searchBarSubscription());
14470
14738
  }
14471
14739
  toggleSidenavSubscription() {
14472
14740
  return this.editorService.toggleSidenav$.subscribe(data => {
@@ -14491,6 +14759,17 @@ class EditorComponent {
14491
14759
  this.cdr.markForCheck();
14492
14760
  });
14493
14761
  }
14762
+ searchBarSubscription() {
14763
+ return this.editorService.displaySearchBar$.subscribe(x => {
14764
+ this.showSearchBar = x;
14765
+ if (this.showSearchBar) {
14766
+ setTimeout(() => {
14767
+ this.searchBar?.focusInput();
14768
+ });
14769
+ }
14770
+ this.cdr.markForCheck();
14771
+ });
14772
+ }
14494
14773
  removeSidenavComponent() {
14495
14774
  if (!this.sidenavComponentRef) {
14496
14775
  return;
@@ -14498,13 +14777,13 @@ class EditorComponent {
14498
14777
  this.componentService.removeComponent(this.sidenavComponentRef);
14499
14778
  this.sidenavComponentRef = null;
14500
14779
  }
14501
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ComponentService }, { token: EditorService }, { token: i0.Injector }, { token: RegulatorService }, { token: CommandsService }, { token: i5$1.Clipboard }], target: i0.ɵɵFactoryTarget.Component }); }
14502
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: EditorComponent, isStandalone: false, selector: "app-nod-editor", inputs: { isMobile: "isMobile", externalElementTagNames: "externalElementTagNames", customPageWidth: "customPageWidth", content: "content" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }, { propertyName: "sidenavContainer", first: true, predicate: ["drawerContainer"], descendants: true, static: true }, { propertyName: "sidenav", first: true, predicate: ["drawer"], descendants: true, static: true }], ngImport: i0, template: "<mat-drawer-container\n class=\"sidenav-container\"\n [hasBackdrop]=\"sidenavProperties.hasBackdrop\">\n <mat-drawer-content>\n <app-nod-editor-ruler />\n <div class=\"container\">\n <div\n #container\n class=\"edit-container\"></div>\n </div>\n </mat-drawer-content>\n <mat-drawer\n #drawer\n [class.drawer-mobile]=\"isMobile\"\n [autoFocus]=\"sidenavProperties.autoFocus\"\n [position]=\"sidenavProperties.position\"\n [mode]=\"sidenavProperties.mode\">\n <div\n #drawerContainer\n class=\"drawer-container\"></div>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [":host{flex:1;display:flex;position:relative}.sidenav-container{width:100%}.mat-drawer-content{overflow:hidden}.container{height:100%;display:flex;justify-content:center}.drawer-container{height:100%}.drawer-mobile{width:100%}\n"], dependencies: [{ kind: "component", type: EditorRulerComponent, selector: "app-nod-editor-ruler" }, { kind: "component", type: i7.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i7.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i7.MatDrawerContent, selector: "mat-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14780
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ComponentService }, { token: EditorService }, { token: i0.Injector }, { token: RegulatorService }, { token: CommandsService }, { token: i5$3.Clipboard }], target: i0.ɵɵFactoryTarget.Component }); }
14781
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorComponent, isStandalone: false, selector: "app-nod-editor", inputs: { isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: false, isRequired: false, transformFunction: null }, externalElementTagNames: { classPropertyName: "externalElementTagNames", publicName: "externalElementTagNames", isSignal: false, isRequired: false, transformFunction: null }, customPageWidth: { classPropertyName: "customPageWidth", publicName: "customPageWidth", isSignal: false, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: false, isRequired: false, transformFunction: null }, rulerUnit: { classPropertyName: "rulerUnit", publicName: "rulerUnit", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }, { propertyName: "sidenavContainer", first: true, predicate: ["drawerContainer"], descendants: true, static: true }, { propertyName: "sidenav", first: true, predicate: ["drawer"], descendants: true, static: true }, { propertyName: "searchBar", first: true, predicate: EditorSearchBarComponent, descendants: true }], ngImport: i0, template: "<mat-drawer-container\n class=\"sidenav-container\"\n [hasBackdrop]=\"sidenavProperties.hasBackdrop\">\n <mat-drawer-content>\n <app-nod-editor-ruler [unit]=\"rulerUnit()\" />\n @if (showSearchBar) {\n <app-nod-editor-search-bar />\n }\n <div class=\"container\">\n <div\n #container\n class=\"edit-container\"></div>\n </div>\n </mat-drawer-content>\n <mat-drawer\n #drawer\n [class.drawer-mobile]=\"isMobile\"\n [autoFocus]=\"sidenavProperties.autoFocus\"\n [position]=\"sidenavProperties.position\"\n [mode]=\"sidenavProperties.mode\">\n <div\n #drawerContainer\n class=\"drawer-container\"></div>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [":host{flex:1;display:flex;position:relative}.sidenav-container{width:100%}.mat-drawer-content{overflow:hidden}.container{height:100%;display:flex;justify-content:center}.drawer-container{height:100%}.drawer-mobile{width:100%}app-nod-editor-search-bar{position:absolute;right:15px;top:0;z-index:2}\n"], dependencies: [{ kind: "component", type: EditorRulerComponent, selector: "app-nod-editor-ruler", inputs: ["unit"] }, { kind: "component", type: EditorSearchBarComponent, selector: "app-nod-editor-search-bar" }, { kind: "component", type: i8.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i8.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i8.MatDrawerContent, selector: "mat-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14503
14782
  }
14504
14783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorComponent, decorators: [{
14505
14784
  type: Component,
14506
- args: [{ selector: 'app-nod-editor', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-drawer-container\n class=\"sidenav-container\"\n [hasBackdrop]=\"sidenavProperties.hasBackdrop\">\n <mat-drawer-content>\n <app-nod-editor-ruler />\n <div class=\"container\">\n <div\n #container\n class=\"edit-container\"></div>\n </div>\n </mat-drawer-content>\n <mat-drawer\n #drawer\n [class.drawer-mobile]=\"isMobile\"\n [autoFocus]=\"sidenavProperties.autoFocus\"\n [position]=\"sidenavProperties.position\"\n [mode]=\"sidenavProperties.mode\">\n <div\n #drawerContainer\n class=\"drawer-container\"></div>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [":host{flex:1;display:flex;position:relative}.sidenav-container{width:100%}.mat-drawer-content{overflow:hidden}.container{height:100%;display:flex;justify-content:center}.drawer-container{height:100%}.drawer-mobile{width:100%}\n"] }]
14507
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ComponentService }, { type: EditorService }, { type: i0.Injector }, { type: RegulatorService }, { type: CommandsService }, { type: i5$1.Clipboard }], propDecorators: { isMobile: [{
14785
+ args: [{ selector: 'app-nod-editor', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-drawer-container\n class=\"sidenav-container\"\n [hasBackdrop]=\"sidenavProperties.hasBackdrop\">\n <mat-drawer-content>\n <app-nod-editor-ruler [unit]=\"rulerUnit()\" />\n @if (showSearchBar) {\n <app-nod-editor-search-bar />\n }\n <div class=\"container\">\n <div\n #container\n class=\"edit-container\"></div>\n </div>\n </mat-drawer-content>\n <mat-drawer\n #drawer\n [class.drawer-mobile]=\"isMobile\"\n [autoFocus]=\"sidenavProperties.autoFocus\"\n [position]=\"sidenavProperties.position\"\n [mode]=\"sidenavProperties.mode\">\n <div\n #drawerContainer\n class=\"drawer-container\"></div>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [":host{flex:1;display:flex;position:relative}.sidenav-container{width:100%}.mat-drawer-content{overflow:hidden}.container{height:100%;display:flex;justify-content:center}.drawer-container{height:100%}.drawer-mobile{width:100%}app-nod-editor-search-bar{position:absolute;right:15px;top:0;z-index:2}\n"] }]
14786
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ComponentService }, { type: EditorService }, { type: i0.Injector }, { type: RegulatorService }, { type: CommandsService }, { type: i5$3.Clipboard }], propDecorators: { isMobile: [{
14508
14787
  type: Input
14509
14788
  }], externalElementTagNames: [{
14510
14789
  type: Input
@@ -14521,6 +14800,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
14521
14800
  }], sidenav: [{
14522
14801
  type: ViewChild,
14523
14802
  args: ['drawer', { static: true }]
14803
+ }], searchBar: [{
14804
+ type: ViewChild,
14805
+ args: [EditorSearchBarComponent]
14524
14806
  }], class: [{
14525
14807
  type: HostBinding,
14526
14808
  args: ['class']
@@ -14561,19 +14843,21 @@ class EditorModule {
14561
14843
  NoderTableComponent,
14562
14844
  ResizerComponent,
14563
14845
  TableOverlayMenuComponent], imports: [CommonModule,
14846
+ EditorRulerComponent,
14847
+ EditorSearchBarComponent,
14564
14848
  MatButtonModule,
14565
14849
  MatDialogModule,
14566
14850
  MatIconModule,
14567
- EditorRulerComponent,
14568
14851
  MatSidenavModule,
14569
14852
  MatTooltipModule,
14570
14853
  ReactiveFormsModule,
14571
14854
  TranslateModule], exports: [EditorComponent] }); }
14572
14855
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorModule, providers: [ComponentService, CustomContentService, OverlayService, RegulatorService, ExternalElementService, CommandsService], imports: [CommonModule,
14856
+ EditorRulerComponent,
14857
+ EditorSearchBarComponent,
14573
14858
  MatButtonModule,
14574
14859
  MatDialogModule,
14575
14860
  MatIconModule,
14576
- EditorRulerComponent,
14577
14861
  MatSidenavModule,
14578
14862
  MatTooltipModule,
14579
14863
  ReactiveFormsModule,
@@ -14594,10 +14878,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
14594
14878
  ],
14595
14879
  imports: [
14596
14880
  CommonModule,
14881
+ EditorRulerComponent,
14882
+ EditorSearchBarComponent,
14597
14883
  MatButtonModule,
14598
14884
  MatDialogModule,
14599
14885
  MatIconModule,
14600
- EditorRulerComponent,
14601
14886
  MatSidenavModule,
14602
14887
  MatTooltipModule,
14603
14888
  ReactiveFormsModule,
@@ -14723,60 +15008,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
14723
15008
  args: [{ imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule, MatMenuModule, TranslateModule], selector: 'app-nod-editor-title-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"showTitle\"\n class=\"menu-header\">\n <div class=\"file-name\">\n <span\n #titleSpan\n class=\"title\"\n [matTooltip]=\"'NODER.LABEL.DOUBLE_CLICK_TO_RENAME' | translate\"\n (blur)=\"onRenameTitle($event)\"\n (keydown.enter)=\"$event.target.blur()\"\n (click)=\"onFocus($event)\">\n {{ title }}\n </span>\n </div>\n</div>\n<div class=\"editor-mode\">\n <div class=\"circles\">\n <div class=\"circle\"></div>\n <div class=\"circle\"></div>\n <div class=\"circle\"></div>\n </div>\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"modeMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ modeOptions[selectedMode].icon }}\" />\n </button>\n <mat-menu\n #modeMenu=\"matMenu\"\n class=\"noder-editor-title-mobile-menu\"\n yPosition=\"above\">\n <ng-container *ngFor=\"let mode of modeOptions\">\n <button\n *ngIf=\"selectedMode !== mode.id\"\n mat-icon-button\n (click)=\"selectedMode = mode.id; changeMode.emit(mode.id)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ mode.icon }}\" />\n </button>\n </ng-container>\n </mat-menu>\n</div>\n", styles: [":host{display:flex;position:relative;align-items:center;width:100%}.menu-header{width:calc(100% - 48px);line-height:0;z-index:1}.file-name{display:block;margin:0 8px;overflow:hidden}.title{font-size:18px;font-weight:400;line-height:normal;outline:none;display:inline-block;white-space:nowrap;min-width:1px;overflow:hidden;max-width:100%;-webkit-user-select:none;user-select:none}.title:not(:focus){text-overflow:ellipsis}.editor-mode{display:flex;flex-direction:column;position:relative}.circles{display:flex;flex-direction:row;justify-content:center;width:100%;position:absolute;top:-8px}.circle{width:4px;height:4px;border-radius:50%}.circle:not(:last-child){margin-right:5px}.mdc-icon-button{min-width:40px;min-height:40px;width:40px;height:40px;padding:8px}::ng-deep .noder-editor-title-mobile-menu{min-width:auto!important;min-height:auto!important;overflow:hidden!important}::ng-deep .noder-editor-title-mobile-menu .mat-mdc-menu-content{display:flex;flex-direction:column-reverse}::ng-deep .noder-editor-title-mobile-menu .mdc-icon-button{margin-bottom:10px}\n"] }]
14724
15009
  }] });
14725
15010
 
14726
- class EditorSearchDialogComponent extends DestroyComponent {
14727
- constructor(editorService) {
14728
- super();
14729
- this.editorService = editorService;
14730
- this.searchControl = new FormControl('');
14731
- this.replaceControl = new FormControl('');
14732
- this.isReplace = false;
14733
- this.searchIteration$ = this.editorService.searchIteration$;
14734
- }
14735
- ngOnInit() {
14736
- this.searchControl.valueChanges
14737
- .pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.destroy$))
14738
- .subscribe(() => (this.editorService.searchOptions = { term: this.searchControl.value, skipCurrent: false, backwards: false }));
14739
- }
14740
- onClose() {
14741
- this.editorService.openSearchDialog = false;
14742
- }
14743
- findNext() {
14744
- this.editorService.searchOptions = {
14745
- term: this.searchControl.value,
14746
- skipCurrent: true,
14747
- backwards: false
14748
- };
14749
- }
14750
- findPrev() {
14751
- this.editorService.searchOptions = {
14752
- term: this.searchControl.value,
14753
- skipCurrent: true,
14754
- backwards: true
14755
- };
14756
- }
14757
- setReplace() {
14758
- this.isReplace = !this.isReplace;
14759
- }
14760
- replace() {
14761
- this.editorService.replace = { replaceValue: this.replaceControl.value, searchValue: this.searchControl.value };
14762
- }
14763
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorSearchDialogComponent, deps: [{ token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
14764
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: EditorSearchDialogComponent, isStandalone: true, selector: "app-nod-editor-search-dialog", providers: [ExternalElementService], usesInheritance: true, ngImport: i0, template: "<div class=\"line search-form\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SEARCH_FOR' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"searchControl\"\n (keydown.enter)=\"findNext()\" />\n </mat-form-field>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findPrev()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onleft\"></mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findNext()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onright\"></mat-icon>\n </button>\n</div>\n<ng-container *ngIf=\"{ searchIteration: searchIteration$ | async } as data\">\n <div\n class=\"replace-form\"\n *ngIf=\"isReplace\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.REPLACE_WITH' | 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 <button\n type=\"button\"\n mat-button\n (click)=\"replace()\">\n {{ 'NODER.LABEL.REPLACE' | translate }}\n </button>\n </div>\n <div class=\"search-options\">\n <button\n type=\"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-up' : 'icon-arrow-down' }}\"></mat-icon>\n </button>\n <div class=\"counter\">\n <span>\n {{\n 'NODER.COMPLEX_LABEL.OF_COUNTER'\n | translate: { current: data.searchIteration?.current ?? 0, total: data.searchIteration?.total ?? 0 }\n }}\n </span>\n </div>\n <button\n type=\"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</ng-container>\n", styles: [":host{min-height:56px;max-width:100%;display:block;font-size:10px;padding:3px}.close-icon{position:absolute;right:1px;top:1px}.search-form,.replace-form,.search-options{display:flex}mat-form-field{padding-left:10px}.mdc-button{font-size:12px;padding:0 8px;min-width:unset}.search-options{line-height:40px}.search-options .counter{text-align:center;flex:1}.mat-mdc-input-element{font-size:10px}.replace-form .mdc-button{width:80px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.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$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$2.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: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14765
- }
14766
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorSearchDialogComponent, decorators: [{
14767
- type: Component,
14768
- args: [{ imports: [
14769
- CommonModule,
14770
- FormsModule,
14771
- MatButtonModule,
14772
- MatIconModule,
14773
- MatInputModule,
14774
- MatTooltipModule,
14775
- ReactiveFormsModule,
14776
- TranslateModule
14777
- ], providers: [ExternalElementService], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-search-dialog', template: "<div class=\"line search-form\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SEARCH_FOR' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"searchControl\"\n (keydown.enter)=\"findNext()\" />\n </mat-form-field>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findPrev()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onleft\"></mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"findNext()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-onright\"></mat-icon>\n </button>\n</div>\n<ng-container *ngIf=\"{ searchIteration: searchIteration$ | async } as data\">\n <div\n class=\"replace-form\"\n *ngIf=\"isReplace\">\n <mat-form-field\n color=\"accent\"\n floatLabel=\"auto\"\n appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.REPLACE_WITH' | 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 <button\n type=\"button\"\n mat-button\n (click)=\"replace()\">\n {{ 'NODER.LABEL.REPLACE' | translate }}\n </button>\n </div>\n <div class=\"search-options\">\n <button\n type=\"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-up' : 'icon-arrow-down' }}\"></mat-icon>\n </button>\n <div class=\"counter\">\n <span>\n {{\n 'NODER.COMPLEX_LABEL.OF_COUNTER'\n | translate: { current: data.searchIteration?.current ?? 0, total: data.searchIteration?.total ?? 0 }\n }}\n </span>\n </div>\n <button\n type=\"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</ng-container>\n", styles: [":host{min-height:56px;max-width:100%;display:block;font-size:10px;padding:3px}.close-icon{position:absolute;right:1px;top:1px}.search-form,.replace-form,.search-options{display:flex}mat-form-field{padding-left:10px}.mdc-button{font-size:12px;padding:0 8px;min-width:unset}.search-options{line-height:40px}.search-options .counter{text-align:center;flex:1}.mat-mdc-input-element{font-size:10px}.replace-form .mdc-button{width:80px}\n"] }]
14778
- }], ctorParameters: () => [{ type: EditorService }] });
14779
-
14780
15011
  var EditorToolbarMode;
14781
15012
  (function (EditorToolbarMode) {
14782
15013
  EditorToolbarMode[EditorToolbarMode["Base"] = 0] = "Base";
@@ -15973,7 +16204,7 @@ class InsertTableMobileComponent {
15973
16204
  control.setValue(newValue);
15974
16205
  }
15975
16206
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: InsertTableMobileComponent, deps: [{ token: EditorService }, { token: i2.FormBuilder }, { token: ToolbarCoreService }], target: i0.ɵɵFactoryTarget.Component }); }
15976
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: InsertTableMobileComponent, isStandalone: true, selector: "app-nod-insert-table-mobile", ngImport: i0, template: "<div class=\"content\">\n <div class=\"title\">{{ 'NODER.LABEL.TABLE_OPTIONS' | translate }}</div>\n <div\n class=\"inputs\"\n [formGroup]=\"form\">\n <div class=\"rows\">\n <div class=\"input-title\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table-rows\" />\n {{ 'NODER.LABEL.ROWS' | translate }}:\n </div>\n <mat-form-field appearance=\"outline\">\n <button\n mat-fab\n (click)=\"onChangeRows(-1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\" />\n </button>\n <input\n matInput\n required\n type=\"number\"\n [formControl]=\"form.controls.rows\"\n (change)=\"onChangeInputRow()\" />\n <button\n mat-fab\n (click)=\"onChangeRows(1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\" />\n </button>\n <mat-error>{{ 'NODER.LABEL.THE_ROW_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n </div>\n <div class=\"columns\">\n <div class=\"input-title\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table-columns\" />\n {{ 'NODER.LABEL.COLUMNS' | translate }}:\n </div>\n <mat-form-field appearance=\"outline\">\n <button\n mat-fab\n (click)=\"onChangeColumns(-1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\" />\n </button>\n <input\n matInput\n required\n type=\"number\"\n [formControl]=\"form.controls.columns\"\n (change)=\"onChangeInputColumn()\" />\n <button\n mat-fab\n (click)=\"onChangeColumns(1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\" />\n </button>\n <mat-error>{{ 'NODER.LABEL.THE_COLUMN_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n </div>\n </div>\n <div class=\"quick-select\">\n <div class=\"quick-select-header\">\n <div class=\"separator\"></div>\n <div class=\"quick-select-title\">{{ 'NODER.LABEL.QUICK_SELECT' | translate }}</div>\n <div class=\"separator\"></div>\n </div>\n <div class=\"selection\">\n <ng-container *ngFor=\"let row of rows\">\n <div class=\"row\">\n <ng-container *ngFor=\"let column of columns\">\n <div\n class=\"cell-container\"\n (click)=\"onSetTable(row, column)\">\n <div\n class=\"cell\"\n [class.highlighted]=\"row <= form.controls.rows.value && column <= form.controls.columns.value\"></div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n<div class=\"actions\">\n <button\n mat-mini-fab\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-mini-fab\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%;padding:30px;justify-content:space-between;overflow:hidden}.title{font-size:16px;font-weight:500;padding-bottom:10px}.inputs{display:flex;justify-content:space-between;padding-top:10px;padding-bottom:0}.rows,.columns{display:flex;flex-direction:column;width:45%}.input-title{display:flex;align-items:center;font-size:14px;font-weight:400;padding-bottom:10px}.input-title .mat-icon{margin-right:10px}.quick-select{display:flex;flex-direction:column}.quick-select-header{display:flex;padding-bottom:20px}.quick-select-title{padding:0 10px;font-size:10px;font-weight:500;letter-spacing:1px;text-transform:uppercase}.separator{flex:1;align-self:center;border-bottom-width:1px;border-bottom-style:solid}.row{display:flex;flex-direction:row}.cell-container{width:10%;aspect-ratio:1/1;padding:2px}.cell{height:100%;width:100%;border-width:1px;border-style:solid}.mat-mdc-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.mat-mdc-form-field ::ng-deep .mat-mdc-form-field-infix{display:flex;flex-direction:row;padding:0}.mat-mdc-form-field ::ng-deep .mdc-fab{width:48px;height:48px}.mat-mdc-input-element{text-align:center}.actions{text-align:end}.actions .mdc-fab:first-child{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$3.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.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: "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 }); }
16207
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: InsertTableMobileComponent, isStandalone: true, selector: "app-nod-insert-table-mobile", ngImport: i0, template: "<div class=\"content\">\n <div class=\"title\">{{ 'NODER.LABEL.TABLE_OPTIONS' | translate }}</div>\n <div\n class=\"inputs\"\n [formGroup]=\"form\">\n <div class=\"rows\">\n <div class=\"input-title\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table-rows\" />\n {{ 'NODER.LABEL.ROWS' | translate }}:\n </div>\n <mat-form-field appearance=\"outline\">\n <button\n mat-fab\n (click)=\"onChangeRows(-1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\" />\n </button>\n <input\n matInput\n required\n type=\"number\"\n [formControl]=\"form.controls.rows\"\n (change)=\"onChangeInputRow()\" />\n <button\n mat-fab\n (click)=\"onChangeRows(1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\" />\n </button>\n <mat-error>{{ 'NODER.LABEL.THE_ROW_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n </div>\n <div class=\"columns\">\n <div class=\"input-title\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table-columns\" />\n {{ 'NODER.LABEL.COLUMNS' | translate }}:\n </div>\n <mat-form-field appearance=\"outline\">\n <button\n mat-fab\n (click)=\"onChangeColumns(-1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\" />\n </button>\n <input\n matInput\n required\n type=\"number\"\n [formControl]=\"form.controls.columns\"\n (change)=\"onChangeInputColumn()\" />\n <button\n mat-fab\n (click)=\"onChangeColumns(1)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\" />\n </button>\n <mat-error>{{ 'NODER.LABEL.THE_COLUMN_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n </div>\n </div>\n <div class=\"quick-select\">\n <div class=\"quick-select-header\">\n <div class=\"separator\"></div>\n <div class=\"quick-select-title\">{{ 'NODER.LABEL.QUICK_SELECT' | translate }}</div>\n <div class=\"separator\"></div>\n </div>\n <div class=\"selection\">\n <ng-container *ngFor=\"let row of rows\">\n <div class=\"row\">\n <ng-container *ngFor=\"let column of columns\">\n <div\n class=\"cell-container\"\n (click)=\"onSetTable(row, column)\">\n <div\n class=\"cell\"\n [class.highlighted]=\"row <= form.controls.rows.value && column <= form.controls.columns.value\"></div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n<div class=\"actions\">\n <button\n mat-mini-fab\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-mini-fab\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%;padding:30px;justify-content:space-between;overflow:hidden}.title{font-size:16px;font-weight:500;padding-bottom:10px}.inputs{display:flex;justify-content:space-between;padding-top:10px;padding-bottom:0}.rows,.columns{display:flex;flex-direction:column;width:45%}.input-title{display:flex;align-items:center;font-size:14px;font-weight:400;padding-bottom:10px}.input-title .mat-icon{margin-right:10px}.quick-select{display:flex;flex-direction:column}.quick-select-header{display:flex;padding-bottom:20px}.quick-select-title{padding:0 10px;font-size:10px;font-weight:500;letter-spacing:1px;text-transform:uppercase}.separator{flex:1;align-self:center;border-bottom-width:1px;border-bottom-style:solid}.row{display:flex;flex-direction:row}.cell-container{width:10%;aspect-ratio:1/1;padding:2px}.cell{height:100%;width:100%;border-width:1px;border-style:solid}.mat-mdc-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.mat-mdc-form-field ::ng-deep .mat-mdc-form-field-infix{display:flex;flex-direction:row;padding:0}.mat-mdc-form-field ::ng-deep .mdc-fab{width:48px;height:48px}.mat-mdc-input-element{text-align:center}.actions{text-align:end}.actions .mdc-fab:first-child{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], 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.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.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: "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 }); }
15977
16208
  }
15978
16209
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: InsertTableMobileComponent, decorators: [{
15979
16210
  type: Component,
@@ -16615,11 +16846,18 @@ class PageSetupComponent {
16615
16846
  this.pageSize.width = Math.round(this.pageSize.customWidth * rate);
16616
16847
  this.pageSize.height = Math.round(this.pageSize.customHeight * rate);
16617
16848
  }
16849
+ const pageMargin = new MarginModel();
16618
16850
  const pageFormat = new PageFormatModel({
16619
16851
  pageHeight: this.pageSize.orientation == PageOrientations.Portrait ? this.pageSize.height : this.pageSize.width,
16620
16852
  pageWidth: this.pageSize.orientation == PageOrientations.Portrait ? this.pageSize.width : this.pageSize.height,
16621
16853
  unit: this.pageSize.unit,
16622
- pageOrientation: this.pageSize.orientation
16854
+ pageOrientation: this.pageSize.orientation,
16855
+ marginBottom: pageMargin.bottom,
16856
+ marginFooter: pageMargin.footer,
16857
+ marginHeader: pageMargin.header,
16858
+ marginLeft: pageMargin.left,
16859
+ marginRight: pageMargin.right,
16860
+ marginTop: pageMargin.top
16623
16861
  });
16624
16862
  switch (this.selectedDocumentArea) {
16625
16863
  case DocumentAreas.SelectedText:
@@ -16657,7 +16895,7 @@ class PageSetupComponent {
16657
16895
  return customPageSize;
16658
16896
  }
16659
16897
  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 }); }
16660
- 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$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$3.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.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 }); }
16898
+ 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 }); }
16661
16899
  }
16662
16900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, decorators: [{
16663
16901
  type: Component,
@@ -16808,7 +17046,7 @@ class AddLinkDialogComponent {
16808
17046
  this.dialogRef.close({ text: this.form.controls.text.value, link: this.form.controls.link.value });
16809
17047
  }
16810
17048
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
16811
- 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$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5$3.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 }); }
17049
+ 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$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.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 }); }
16812
17050
  }
16813
17051
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkDialogComponent, decorators: [{
16814
17052
  type: Component,
@@ -16857,7 +17095,7 @@ class AddLinkMobileComponent {
16857
17095
  this.onApply();
16858
17096
  }
16859
17097
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkMobileComponent, deps: [{ token: EditorService }, { token: i2.FormBuilder }, { token: ToolbarCoreService }], target: i0.ɵɵFactoryTarget.Component }); }
16860
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AddLinkMobileComponent, isStandalone: true, selector: "app-nod-add-link-mobile", ngImport: i0, template: "<div class=\"content\">\n <div class=\"title\">{{ 'NODER.LABEL.LINK_OPTIONS' | translate }}</div>\n <div\n class=\"inputs\"\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 (keydown.enter)=\"onEnter()\"\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 (keydown.enter)=\"onEnter()\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_LINK_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n </div>\n</div>\n<div class=\"actions\">\n <button\n mat-mini-fab\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-mini-fab\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%;padding:30px;justify-content:space-between;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}.title{font-size:16px;font-weight:500}mat-form-field{width:100%}.inputs{padding-top:10px;padding-bottom:0}.actions{text-align:end}.actions .mdc-fab:first-child{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5$3.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 }); }
17098
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AddLinkMobileComponent, isStandalone: true, selector: "app-nod-add-link-mobile", ngImport: i0, template: "<div class=\"content\">\n <div class=\"title\">{{ 'NODER.LABEL.LINK_OPTIONS' | translate }}</div>\n <div\n class=\"inputs\"\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 (keydown.enter)=\"onEnter()\"\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 (keydown.enter)=\"onEnter()\"\n required />\n <mat-error>{{ 'NODER.LABEL.THE_LINK_IS_REQUIRED' | translate }}.</mat-error>\n </mat-form-field>\n </div>\n</div>\n<div class=\"actions\">\n <button\n mat-mini-fab\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-mini-fab\n [disabled]=\"form.invalid\"\n (click)=\"onApply()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%;padding:30px;justify-content:space-between;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}.title{font-size:16px;font-weight:500}mat-form-field{width:100%}.inputs{padding-top:10px;padding-bottom:0}.actions{text-align:end}.actions .mdc-fab:first-child{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab]", 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: "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 }); }
16861
17099
  }
16862
17100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AddLinkMobileComponent, decorators: [{
16863
17101
  type: Component,
@@ -16948,5 +17186,5 @@ class OperationModel {
16948
17186
  * Generated bundle index. Do not edit.
16949
17187
  */
16950
17188
 
16951
- export { AddLinkDialogComponent, AddLinkMobileComponent, Alignment, BaseNoderComponent, BreakTypes, CommandModel, CommandType, CommandsService, ConfirmDialogComponent, DEFAULT_BACKGROUND_COLOR, DEFAULT_EDGE_MAX_HEIGHT_MULTIPLIER, DEFAULT_FONT_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_HEADINGS, DEFAULT_HEADING_STYLE_ID, DEFAULT_PARAGRAPH_STYLE, DEFAULT_TAB_WIDTH, DEFAULT_TEXT_STYLE, DEFAULT_TOOLBAR_STYLES, DefaultImageApiService, DestroyComponent, DocumentInfo, DocumentModel, DocumentNameModel, DocxModel, DomHelper, EditorComponent, EditorMobileToolbarComponent, EditorModule, EditorSearchDialogComponent, EditorService, EditorTitleComponent, EditorTitleMobileComponent, EditorToolbarComponent, EditorToolbarMode, EditorToolbarModule, EditorToolbarService, ElementDataModel, ElementModel, ExternalComponent, ExternalElementModel, ExternalElementService, FileSourceModel, FormatStyleHelper, HYPERLINK_FONT_COLOR, HYPERLINK_HEADING_STYLE_ID, ImageApiService, ImageDataModel, LastDocumentRevisionModel, MenuDropdownsComponent, MenuDropdownsMobileComponent, Mode, NEW_LINE_MARKUP, NoderTranslateLoader, NumberingLevelModel, OperationModel, OperationsHistoryInfoModel, PageSetupComponent, PageType, ParagraphStyleModel, RevisionHelper, RevisionModel, TextFormatMobileComponent, TextStyleModel, ToolbarActionsComponent };
17189
+ export { AddLinkDialogComponent, AddLinkMobileComponent, Alignment, BaseNoderComponent, BreakTypes, CommandModel, CommandType, CommandsService, ConfirmDialogComponent, DEFAULT_BACKGROUND_COLOR, DEFAULT_EDGE_MAX_HEIGHT_MULTIPLIER, DEFAULT_FONT_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_HEADINGS, DEFAULT_HEADING_STYLE_ID, DEFAULT_PARAGRAPH_STYLE, DEFAULT_TAB_WIDTH, DEFAULT_TEXT_STYLE, DEFAULT_TOOLBAR_STYLES, DefaultImageApiService, DestroyComponent, DocumentInfo, DocumentModel, DocumentNameModel, DocxModel, DomHelper, EditorComponent, EditorMobileToolbarComponent, EditorModule, EditorService, EditorTitleComponent, EditorTitleMobileComponent, EditorToolbarComponent, EditorToolbarMode, EditorToolbarModule, EditorToolbarService, ElementDataModel, ElementModel, ExternalComponent, ExternalElementModel, ExternalElementService, FileSourceModel, FormatStyleHelper, HYPERLINK_FONT_COLOR, HYPERLINK_HEADING_STYLE_ID, ImageApiService, ImageDataModel, LastDocumentRevisionModel, MenuDropdownsComponent, MenuDropdownsMobileComponent, Mode, NEW_LINE_MARKUP, NoderTranslateLoader, NumberingLevelModel, OperationModel, OperationsHistoryInfoModel, PageSetupComponent, PageType, ParagraphStyleModel, RevisionHelper, RevisionModel, TextFormatMobileComponent, TextStyleModel, ToolbarActionsComponent };
16952
17190
  //# sourceMappingURL=talrace-ngx-noder.mjs.map