@talrace/ngx-noder 0.0.46 → 19.0.24

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 (54) hide show
  1. package/README.md +650 -649
  2. package/assets/i18n/noder.en.json +11 -0
  3. package/assets/i18n/noder.es.json +11 -0
  4. package/assets/i18n/noder.ru.json +11 -0
  5. package/fesm2022/talrace-ngx-noder.mjs +904 -205
  6. package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
  7. package/lib/apart-components/editor-ruler/editor-ruler.component.d.ts +2 -1
  8. package/lib/apart-components/editor-toolbar/components/base-toolbar.component.d.ts +6 -1
  9. package/lib/apart-components/editor-toolbar/components/buttons/table-border-style/table-border-style.component.d.ts +11 -0
  10. package/lib/apart-components/editor-toolbar/components/buttons/table-border-width/table-border-width.component.d.ts +10 -0
  11. package/lib/apart-components/editor-toolbar/components/buttons/table-borders/table-borders.component.d.ts +11 -0
  12. package/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.d.ts +6 -1
  13. package/lib/apart-components/editor-toolbar/editor-toolbar.module.d.ts +6 -3
  14. package/lib/editor/components/editor.component.d.ts +3 -1
  15. package/lib/editor/components/shared/enums/borders.enum.d.ts +10 -0
  16. package/lib/editor/components/shared/services/overlay.service.d.ts +1 -0
  17. package/lib/editor/components/table/selection/table-selection.d.ts +1 -0
  18. package/lib/editor/content/display-data/display-data.d.ts +0 -1
  19. package/lib/editor/content/display-data/display-token.model.d.ts +2 -0
  20. package/lib/editor/content/display-data/line-info.model.d.ts +2 -0
  21. package/lib/editor/content/display-data/text-line-info.d.ts +3 -0
  22. package/lib/editor/display/renderer.d.ts +7 -0
  23. package/lib/editor/display/virtual.renderer.d.ts +4 -0
  24. package/lib/editor/editor.module.d.ts +6 -0
  25. package/lib/editor/execution/edit.session.d.ts +4 -1
  26. package/lib/editor/execution/editor.d.ts +14 -1
  27. package/lib/editor/execution/targeting/cell-session-source.model.d.ts +2 -2
  28. package/lib/editor/gadgets/grammar/grammar-checker.d.ts +7 -3
  29. package/lib/editor/gadgets/grammar/grammar.service.d.ts +6 -0
  30. package/lib/editor/gadgets/history/operation-history.d.ts +3 -0
  31. package/lib/editor/gadgets/history/operation.type.d.ts +2 -1
  32. package/lib/editor/gadgets/insert-overlays/insert-overlay-component.interface.d.ts +3 -0
  33. package/lib/editor/gadgets/insert-overlays/insert-overlays.d.ts +10 -0
  34. package/lib/editor/interaction/editor.service.d.ts +27 -2
  35. package/lib/editor/operations/enums/command-type.enum.d.ts +2 -1
  36. package/lib/editor/operations/helpers/table-operations.helper.d.ts +13 -0
  37. package/lib/editor/operations/operations-helper.helper.d.ts +2 -0
  38. package/lib/editor/operations/save-commands.helper.d.ts +2 -0
  39. package/lib/editor/positioning/position.helper.d.ts +3 -0
  40. package/lib/editor/positioning/selection.d.ts +3 -0
  41. package/lib/editor/revision.helper.d.ts +1 -2
  42. package/lib/models/generated/apply-table-cells-styles.model.d.ts +6 -0
  43. package/lib/models/generated/cell-data.model.d.ts +7 -0
  44. package/lib/models/generated/command.model.d.ts +2 -0
  45. package/package.json +1 -1
  46. package/public-api.d.ts +1 -0
  47. package/src/assets/fonts/nc-iconfont.eot +0 -0
  48. package/src/assets/fonts/nc-iconfont.scss +35 -2
  49. package/src/assets/fonts/nc-iconfont.svg +13 -2
  50. package/src/assets/fonts/nc-iconfont.ttf +0 -0
  51. package/src/assets/fonts/nc-iconfont.woff +0 -0
  52. package/src/lib/apart-components/editor-ruler/_theme.scss +4 -0
  53. package/src/lib/editor/components/_editor.theme.scss +4 -0
  54. package/src/scss/base-editor.scss +9 -11
@@ -30,7 +30,7 @@ import { marker } from '@biesbjerg/ngx-translate-extract-marker';
30
30
  import * as i7 from '@angular/material/select';
31
31
  import { MatSelectModule } from '@angular/material/select';
32
32
  import * as i3$2 from '@angular/material/core';
33
- import * as i9 from '@angular/material/sidenav';
33
+ import * as i10 from '@angular/material/sidenav';
34
34
  import { MatSidenavModule } from '@angular/material/sidenav';
35
35
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
36
36
  import * as i4$1 from '@angular/material/menu';
@@ -40,11 +40,13 @@ import { MatExpansionModule } from '@angular/material/expansion';
40
40
  import * as i2$1 from '@angular/platform-browser';
41
41
  import * as i2$2 from '@angular/material/autocomplete';
42
42
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
43
+ import * as i2$3 from '@angular/material/divider';
44
+ import { MatDividerModule } from '@angular/material/divider';
43
45
  import * as i5$3 from 'ngx-colors';
44
46
  import { NgxColorsModule } from 'ngx-colors';
45
47
  import * as i3$3 from '@angular/material/button-toggle';
46
48
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
47
- import * as i10 from '@angular/material/checkbox';
49
+ import * as i10$1 from '@angular/material/checkbox';
48
50
  import { MatCheckboxModule } from '@angular/material/checkbox';
49
51
  import * as i12 from '@angular/material/radio';
50
52
  import { MatRadioModule } from '@angular/material/radio';
@@ -559,6 +561,7 @@ class EditorService {
559
561
  this._changeImageStyle$ = new Subject();
560
562
  this._rerender$ = new Subject();
561
563
  this._createCustomComponent$ = new Subject();
564
+ this._replaceByCustomComponent$ = new Subject();
562
565
  this._insertBreak$ = new Subject();
563
566
  this._insertImage$ = new Subject();
564
567
  this._insertLink$ = new Subject();
@@ -576,6 +579,10 @@ class EditorService {
576
579
  this._removeRight$ = new Subject();
577
580
  this._resizeTableColumns$ = new Subject();
578
581
  this._insertTable$ = new Subject();
582
+ this._updateTableBorderStyle$ = new Subject();
583
+ this._updateTableBorderWidth$ = new Subject();
584
+ this._updateTableBorders$ = new Subject();
585
+ this._isTableSelected$ = new BehaviorSubject(false);
579
586
  this._redo$ = new Subject();
580
587
  this._undo$ = new Subject();
581
588
  this._print$ = new Subject();
@@ -601,7 +608,10 @@ class EditorService {
601
608
  this._leftIndentParagraph$ = new Subject();
602
609
  this._tabSettings$ = new Subject();
603
610
  this._rightIndentParagraph$ = new Subject();
604
- this._paragraphStyle$ = new BehaviorSubject(new ParagraphStyleModel());
611
+ this._paragraphStyle$ = new BehaviorSubject({
612
+ paragraphStyle: new ParagraphStyleModel(),
613
+ numberingModel: null
614
+ });
605
615
  }
606
616
  set styles(value) {
607
617
  this._styles$.next({ ...value });
@@ -696,6 +706,9 @@ class EditorService {
696
706
  get createCustomComponent$() {
697
707
  return this._createCustomComponent$.asObservable();
698
708
  }
709
+ get replaceByCustomComponent$() {
710
+ return this._replaceByCustomComponent$.asObservable();
711
+ }
699
712
  get insertBreak$() {
700
713
  return this._insertBreak$.asObservable();
701
714
  }
@@ -747,6 +760,21 @@ class EditorService {
747
760
  get insertTable$() {
748
761
  return this._insertTable$.asObservable();
749
762
  }
763
+ get updateTableBorderStyle$() {
764
+ return this._updateTableBorderStyle$.asObservable();
765
+ }
766
+ get updateTableBorderWidth$() {
767
+ return this._updateTableBorderWidth$.asObservable();
768
+ }
769
+ get updateTableBorders$() {
770
+ return this._updateTableBorders$.asObservable();
771
+ }
772
+ get isTableSelected() {
773
+ return this._isTableSelected$.value;
774
+ }
775
+ get isTableSelected$() {
776
+ return this._isTableSelected$.asObservable();
777
+ }
750
778
  get redo$() {
751
779
  return this._redo$.asObservable();
752
780
  }
@@ -847,8 +875,8 @@ class EditorService {
847
875
  applyRightIndentParagraph(value) {
848
876
  this._rightIndentParagraph$.next(value);
849
877
  }
850
- paragraphStyle(value) {
851
- this._paragraphStyle$.next(value);
878
+ paragraphStyle(value, numbering = null) {
879
+ this._paragraphStyle$.next({ paragraphStyle: value, numberingModel: numbering });
852
880
  }
853
881
  applyRightMarginPageFormat(value) {
854
882
  this._rightMarginPageFormat$.next(value);
@@ -917,6 +945,9 @@ class EditorService {
917
945
  createCustomComponent(model) {
918
946
  this._createCustomComponent$.next(model);
919
947
  }
948
+ replaceByCustomComponent(textKey, model) {
949
+ this._replaceByCustomComponent$.next({ textKey, model });
950
+ }
920
951
  insertBreak(value) {
921
952
  this._insertBreak$.next(value);
922
953
  }
@@ -980,6 +1011,21 @@ class EditorService {
980
1011
  insertTable(tableData) {
981
1012
  this._insertTable$.next(tableData);
982
1013
  }
1014
+ updateTableBorderStyle(style) {
1015
+ this._updateTableBorderStyle$.next(style);
1016
+ }
1017
+ updateTableBorderWidth(width) {
1018
+ this._updateTableBorderWidth$.next(width);
1019
+ }
1020
+ updateTableBorders(borders) {
1021
+ this._updateTableBorders$.next(borders);
1022
+ }
1023
+ setIsTableSelected(value) {
1024
+ if (this.isTableSelected === value) {
1025
+ return;
1026
+ }
1027
+ this._isTableSelected$.next(value);
1028
+ }
983
1029
  undo() {
984
1030
  this._undo$.next();
985
1031
  }
@@ -1199,10 +1245,13 @@ class DefaultImageApiService {
1199
1245
  class GrammarService {
1200
1246
  constructor() {
1201
1247
  this.debounceTime = 3000;
1248
+ this.maxConcurrentRequests = 3;
1202
1249
  this.paragraphSubjects = new Map();
1203
1250
  this.debounceSubscriptions = new Map();
1204
1251
  this.grammarCheckRequests = new Subject();
1205
1252
  this.grammarCheckResults = new Subject();
1253
+ this.requestQueue = [];
1254
+ this.requestsInFlight = 0;
1206
1255
  }
1207
1256
  get grammarCheckRequests$() {
1208
1257
  return this.grammarCheckRequests.asObservable();
@@ -1218,27 +1267,44 @@ class GrammarService {
1218
1267
  subject.next(paragraph);
1219
1268
  }
1220
1269
  removeParagraph(sessionId, paragraphId) {
1221
- const subject = this.paragraphSubjects.get(`${sessionId}-${paragraphId}`);
1222
- const subscription = this.debounceSubscriptions.get(`${sessionId}-${paragraphId}`);
1270
+ const key = `${sessionId}-${paragraphId}`;
1271
+ const subject = this.paragraphSubjects.get(key);
1272
+ const subscription = this.debounceSubscriptions.get(key);
1273
+ this.requestQueue = this.requestQueue.filter(x => x.id !== key);
1223
1274
  if (subject) {
1224
1275
  subject.complete();
1225
- this.paragraphSubjects.delete(`${sessionId}-${paragraphId}`);
1276
+ this.paragraphSubjects.delete(key);
1226
1277
  }
1227
1278
  if (subscription) {
1228
1279
  subscription.unsubscribe();
1229
- this.debounceSubscriptions.delete(`${sessionId}-${paragraphId}`);
1280
+ this.debounceSubscriptions.delete(key);
1230
1281
  }
1231
1282
  }
1232
1283
  publishGrammarCheckResults(paragraphId, errors) {
1233
1284
  this.grammarCheckResults.next({ paragraphId, errors });
1285
+ this.requestsInFlight--;
1286
+ this.processQueue();
1287
+ }
1288
+ enqueueParagraphs(sessionId, paragraphs) {
1289
+ const requests = paragraphs
1290
+ .filter(x => x.content.trim().length > 0 && !this.requestQueue.some(y => y.id === `${sessionId}-${x.id}`))
1291
+ .map(x => ({ id: `${sessionId}-${x.id}`, paragraph: x.content }));
1292
+ this.requestQueue.unshift(...requests);
1293
+ this.processQueue();
1234
1294
  }
1235
1295
  destroy() {
1236
- this.paragraphSubjects.forEach(subject => subject.complete());
1296
+ for (const [, subject] of this.paragraphSubjects) {
1297
+ subject.complete();
1298
+ }
1237
1299
  this.paragraphSubjects.clear();
1238
- this.debounceSubscriptions.forEach(subscription => subscription.unsubscribe());
1300
+ for (const [, subscription] of this.debounceSubscriptions) {
1301
+ subscription.unsubscribe();
1302
+ }
1239
1303
  this.debounceSubscriptions.clear();
1240
1304
  this.grammarCheckRequests.complete();
1241
1305
  this.grammarCheckResults.complete();
1306
+ this.requestQueue = [];
1307
+ this.requestsInFlight = 0;
1242
1308
  }
1243
1309
  registerParagraph(sessionId, paragraph) {
1244
1310
  if (this.paragraphSubjects.has(`${sessionId}-${paragraph.id}`)) {
@@ -1248,9 +1314,22 @@ class GrammarService {
1248
1314
  this.paragraphSubjects.set(`${sessionId}-${paragraph.id}`, subject);
1249
1315
  const subscription = subject
1250
1316
  .pipe(distinctUntilChanged((x, y) => x.content.trim() === y.content.trim()), debounceTime(this.debounceTime), filter(x => x.content.trim().length > 0))
1251
- .subscribe(x => this.grammarCheckRequests.next({ id: `${sessionId}-${x.id}`, paragraph: x.content }));
1317
+ .subscribe(x => this.enqueueGrammarCheck(`${sessionId}-${x.id}`, x.content));
1252
1318
  this.debounceSubscriptions.set(`${sessionId}-${paragraph.id}`, subscription);
1253
1319
  }
1320
+ enqueueGrammarCheck(id, paragraph) {
1321
+ this.requestQueue = this.requestQueue.filter(x => x.id !== id);
1322
+ const request = { id, paragraph };
1323
+ this.requestQueue.unshift(request);
1324
+ this.processQueue();
1325
+ }
1326
+ processQueue() {
1327
+ while (this.requestsInFlight <= this.maxConcurrentRequests && this.requestQueue.length > 0) {
1328
+ const request = this.requestQueue.shift();
1329
+ this.requestsInFlight++;
1330
+ this.grammarCheckRequests.next(request);
1331
+ }
1332
+ }
1254
1333
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GrammarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1255
1334
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GrammarService, providedIn: 'root' }); }
1256
1335
  }
@@ -1300,6 +1379,7 @@ var CommandType;
1300
1379
  CommandType[CommandType["RemoveInsertedPageFormat"] = 34] = "RemoveInsertedPageFormat";
1301
1380
  CommandType[CommandType["RestorePageFormats"] = 35] = "RestorePageFormats";
1302
1381
  CommandType[CommandType["ApplyParagraphs"] = 36] = "ApplyParagraphs";
1382
+ CommandType[CommandType["ApplyTableCellsStyles"] = 37] = "ApplyTableCellsStyles";
1303
1383
  })(CommandType || (CommandType = {}));
1304
1384
 
1305
1385
  class PageNumbersModel {
@@ -1378,6 +1458,14 @@ class ApplyParagraphStyleModel {
1378
1458
  }
1379
1459
  }
1380
1460
 
1461
+ class ApplyTableCellsStylesModel {
1462
+ constructor(fields) {
1463
+ if (fields) {
1464
+ Object.assign(this, fields);
1465
+ }
1466
+ }
1467
+ }
1468
+
1381
1469
  class ApplyTextStyleModel {
1382
1470
  constructor(fields) {
1383
1471
  if (fields) {
@@ -1647,6 +1735,16 @@ class OverlayService {
1647
1735
  getOverlayPosition(xPosition, yPosition) {
1648
1736
  return this.overlay.position().global().left(`${xPosition}px`).top(`${yPosition}px`);
1649
1737
  }
1738
+ scroll(deltaY) {
1739
+ // todo: close overlay when out of visible area
1740
+ if (!this.overlayRef) {
1741
+ return;
1742
+ }
1743
+ const x = this.overlayRef.overlayElement.offsetLeft;
1744
+ const y = this.overlayRef.overlayElement.offsetTop - deltaY;
1745
+ const strategy = this.overlay.position().global().left(`${x}px`).top(`${y}px`);
1746
+ this.overlayRef.updatePositionStrategy(strategy);
1747
+ }
1650
1748
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OverlayService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
1651
1749
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OverlayService }); }
1652
1750
  }
@@ -2087,6 +2185,14 @@ class MoveRangeModel {
2087
2185
  }
2088
2186
  }
2089
2187
 
2188
+ let CellDataModel$1 = class CellDataModel {
2189
+ constructor(fields) {
2190
+ if (fields) {
2191
+ Object.assign(this, fields);
2192
+ }
2193
+ }
2194
+ };
2195
+
2090
2196
  class RemoveEdgesModel {
2091
2197
  constructor(fields) {
2092
2198
  if (fields) {
@@ -2218,6 +2324,19 @@ class OperationHistory {
2218
2324
  const undoStep = new DeleteModel({ startIndex: model.insertIndex, count });
2219
2325
  this.addToHistory(undoStep, model);
2220
2326
  }
2327
+ pushApplyTableCellsStyles(currentTable, model, targets) {
2328
+ const undoStep = new ApplyTableCellsStylesModel({
2329
+ insertIndex: model.insertIndex,
2330
+ cellsData: model.cellsData.map(x => {
2331
+ return new CellDataModel$1({
2332
+ rowIndex: x.rowIndex,
2333
+ cellIndex: x.cellIndex,
2334
+ borders: currentTable.rows[x.rowIndex].cells[x.cellIndex].borders
2335
+ });
2336
+ })
2337
+ });
2338
+ this.addToHistory(undoStep, model, null, targets);
2339
+ }
2221
2340
  pushInsertStyledText(insertIndex, text, style) {
2222
2341
  const redoStep = new InsertStyledTextModel({ insertIndex, text, textStyle: style });
2223
2342
  const undoStep = new DeleteModel({ startIndex: insertIndex, count: text.length });
@@ -4261,6 +4380,18 @@ class ParagraphOperationsHelper {
4261
4380
  }
4262
4381
  }
4263
4382
 
4383
+ var Borders;
4384
+ (function (Borders) {
4385
+ Borders[Borders["Bottom"] = 0] = "Bottom";
4386
+ Borders[Borders["Top"] = 1] = "Top";
4387
+ Borders[Borders["Left"] = 2] = "Left";
4388
+ Borders[Borders["Right"] = 3] = "Right";
4389
+ Borders[Borders["Empty"] = 4] = "Empty";
4390
+ Borders[Borders["All"] = 5] = "All";
4391
+ Borders[Borders["Outside"] = 6] = "Outside";
4392
+ Borders[Borders["Inside"] = 7] = "Inside";
4393
+ })(Borders || (Borders = {}));
4394
+
4264
4395
  class ColumnModel {
4265
4396
  constructor(fields) {
4266
4397
  if (fields) {
@@ -4269,6 +4400,55 @@ class ColumnModel {
4269
4400
  }
4270
4401
  }
4271
4402
 
4403
+ var LineStyles;
4404
+ (function (LineStyles) {
4405
+ LineStyles[LineStyles["SolidLine"] = 0] = "SolidLine";
4406
+ LineStyles[LineStyles["RoundDot"] = 1] = "RoundDot";
4407
+ LineStyles[LineStyles["SquareDot"] = 2] = "SquareDot";
4408
+ LineStyles[LineStyles["Dash"] = 3] = "Dash";
4409
+ LineStyles[LineStyles["DashDot"] = 4] = "DashDot";
4410
+ LineStyles[LineStyles["LongDash"] = 5] = "LongDash";
4411
+ LineStyles[LineStyles["LongDashDot"] = 6] = "LongDashDot";
4412
+ LineStyles[LineStyles["LongDashDotDot"] = 7] = "LongDashDotDot";
4413
+ LineStyles[LineStyles["Single"] = 8] = "Single";
4414
+ LineStyles[LineStyles["Thick"] = 9] = "Thick";
4415
+ LineStyles[LineStyles["Double"] = 10] = "Double";
4416
+ LineStyles[LineStyles["Dotted"] = 11] = "Dotted";
4417
+ LineStyles[LineStyles["Dashed"] = 12] = "Dashed";
4418
+ LineStyles[LineStyles["DotDash"] = 13] = "DotDash";
4419
+ LineStyles[LineStyles["DotDotDash"] = 14] = "DotDotDash";
4420
+ LineStyles[LineStyles["Triple"] = 15] = "Triple";
4421
+ LineStyles[LineStyles["ThinThickSmallGap"] = 16] = "ThinThickSmallGap";
4422
+ LineStyles[LineStyles["ThickThinSmallGap"] = 17] = "ThickThinSmallGap";
4423
+ LineStyles[LineStyles["ThinThickThinSmallGap"] = 18] = "ThinThickThinSmallGap";
4424
+ LineStyles[LineStyles["ThinThickMediumGap"] = 19] = "ThinThickMediumGap";
4425
+ LineStyles[LineStyles["ThickThinMediumGap"] = 20] = "ThickThinMediumGap";
4426
+ LineStyles[LineStyles["ThinThickThinMediumGap"] = 21] = "ThinThickThinMediumGap";
4427
+ LineStyles[LineStyles["ThinThickLargeGap"] = 22] = "ThinThickLargeGap";
4428
+ LineStyles[LineStyles["ThickThinLargeGap"] = 23] = "ThickThinLargeGap";
4429
+ LineStyles[LineStyles["ThinThickThinLargeGap"] = 24] = "ThinThickThinLargeGap";
4430
+ LineStyles[LineStyles["Wave"] = 25] = "Wave";
4431
+ LineStyles[LineStyles["DoubleWave"] = 26] = "DoubleWave";
4432
+ LineStyles[LineStyles["DashSmallGap"] = 27] = "DashSmallGap";
4433
+ LineStyles[LineStyles["DashDotStroked"] = 28] = "DashDotStroked";
4434
+ LineStyles[LineStyles["ThreeDEmboss"] = 29] = "ThreeDEmboss";
4435
+ LineStyles[LineStyles["ThreeDEngrave"] = 30] = "ThreeDEngrave";
4436
+ LineStyles[LineStyles["Outset"] = 31] = "Outset";
4437
+ LineStyles[LineStyles["Inset"] = 32] = "Inset";
4438
+ LineStyles[LineStyles["Nil"] = 33] = "Nil";
4439
+ })(LineStyles || (LineStyles = {}));
4440
+
4441
+ var Positions;
4442
+ (function (Positions) {
4443
+ Positions[Positions["Top"] = 0] = "Top";
4444
+ Positions[Positions["Right"] = 1] = "Right";
4445
+ Positions[Positions["Bottom"] = 2] = "Bottom";
4446
+ Positions[Positions["Left"] = 3] = "Left";
4447
+ Positions[Positions["All"] = 4] = "All";
4448
+ Positions[Positions["InsideHorizontal"] = 5] = "InsideHorizontal";
4449
+ Positions[Positions["InsideVertical"] = 6] = "InsideVertical";
4450
+ })(Positions || (Positions = {}));
4451
+
4272
4452
  var ResizerSide;
4273
4453
  (function (ResizerSide) {
4274
4454
  ResizerSide[ResizerSide["Left"] = 0] = "Left";
@@ -4285,6 +4465,13 @@ class RowModel {
4285
4465
  }
4286
4466
  }
4287
4467
 
4468
+ class SelectionRangeModel {
4469
+ constructor(rowIndexes, cellIndexes) {
4470
+ this.rowIndexes = rowIndexes;
4471
+ this.cellIndexes = cellIndexes;
4472
+ }
4473
+ }
4474
+
4288
4475
  var VerticalMerge;
4289
4476
  (function (VerticalMerge) {
4290
4477
  VerticalMerge["Restart"] = "restart";
@@ -4637,6 +4824,213 @@ class TableOperationsHelper {
4637
4824
  }
4638
4825
  });
4639
4826
  }
4827
+ static applyTableCellsStyles(tables, insertIndex, cellData) {
4828
+ const table = tables.find(x => x.insertIndex === insertIndex);
4829
+ for (const cellDataItem of cellData) {
4830
+ if (cellDataItem.rowIndex < 0 || cellDataItem.rowIndex >= table.rows.length) {
4831
+ continue;
4832
+ }
4833
+ if (cellDataItem.cellIndex < 0 || cellDataItem.cellIndex >= table.rows[cellDataItem.rowIndex].cells.length) {
4834
+ continue;
4835
+ }
4836
+ table.rows[cellDataItem.rowIndex].cells[cellDataItem.cellIndex].borders = cellDataItem.borders?.length
4837
+ ? cellDataItem.borders
4838
+ : null;
4839
+ }
4840
+ }
4841
+ static getApplyTableCellsBordersStyle(style, table, selection) {
4842
+ const cellsMap = this.getApplyBordersStylesCells(table, selection, [
4843
+ Positions.Top,
4844
+ Positions.Bottom,
4845
+ Positions.Right,
4846
+ Positions.Left
4847
+ ]);
4848
+ if (!cellsMap.size) {
4849
+ return null;
4850
+ }
4851
+ return new ApplyTableCellsStylesModel({
4852
+ cellsData: this.getCellDataFromBorderCells(cellsMap, (oldBorder) => new BordersStyleModel({ ...oldBorder, ...new BordersStyleModel({ lineStyle: style }) })),
4853
+ insertIndex: table.insertIndex
4854
+ });
4855
+ }
4856
+ static getApplyTableCellsBordersWidth(width, table, selection) {
4857
+ const cellsMap = this.getApplyBordersStylesCells(table, selection, [
4858
+ Positions.Top,
4859
+ Positions.Bottom,
4860
+ Positions.Right,
4861
+ Positions.Left
4862
+ ]);
4863
+ if (!cellsMap.size) {
4864
+ return null;
4865
+ }
4866
+ return new ApplyTableCellsStylesModel({
4867
+ cellsData: this.getCellDataFromBorderCells(cellsMap, (oldBorder) => new BordersStyleModel({ ...oldBorder, ...new BordersStyleModel({ width }) })),
4868
+ insertIndex: table.insertIndex
4869
+ });
4870
+ }
4871
+ static getApplyTableCellsBorders(border, table, selection) {
4872
+ let cellsMap = new Map();
4873
+ let targetBorderStyle = new BordersStyleModel();
4874
+ switch (border) {
4875
+ case Borders.Top:
4876
+ // Upper border - only for the top row and their upper neighbors
4877
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.startIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Top]);
4878
+ break;
4879
+ case Borders.Bottom:
4880
+ // The bottom border is only for the bottom row and their lower neighbors
4881
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.endIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Bottom]);
4882
+ break;
4883
+ case Borders.Left:
4884
+ // Left border - only for the left column and its left neighbors
4885
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.startIndex }), [Positions.Left]);
4886
+ break;
4887
+ case Borders.Right:
4888
+ // Right border - only for the right column and its right neighbors
4889
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.endIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Right]);
4890
+ break;
4891
+ case Borders.All:
4892
+ // Add all borders from the selected cells
4893
+ cellsMap = this.getApplyBordersStylesCells(table, selection, [
4894
+ Positions.Top,
4895
+ Positions.Bottom,
4896
+ Positions.Right,
4897
+ Positions.Left
4898
+ ]);
4899
+ break;
4900
+ case Borders.Outside: {
4901
+ // Outer borders - combination of Top, Bottom, Left, Right
4902
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.startIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Top]);
4903
+ const bottomCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.endIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Bottom]);
4904
+ this.mergeCellStyles(cellsMap, bottomCells);
4905
+ const leftCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.startIndex }), [Positions.Left]);
4906
+ this.mergeCellStyles(cellsMap, leftCells);
4907
+ const rightCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.endIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Right]);
4908
+ this.mergeCellStyles(cellsMap, rightCells);
4909
+ break;
4910
+ }
4911
+ case Borders.Inside: {
4912
+ // Horizontal inner borders (between lines)
4913
+ for (let rowIndex = selection.rowIndexes.startIndex + 1; rowIndex <= selection.rowIndexes.endIndex; rowIndex++) {
4914
+ const horizontalCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: rowIndex, endIndex: rowIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Top]);
4915
+ this.mergeCellStyles(cellsMap, horizontalCells);
4916
+ }
4917
+ // Vertical inner borders (between columns)
4918
+ for (let cellIndex = selection.cellIndexes.startIndex + 1; cellIndex <= selection.cellIndexes.endIndex; cellIndex++) {
4919
+ const verticalCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: cellIndex, endIndex: cellIndex }), [Positions.Left]);
4920
+ this.mergeCellStyles(cellsMap, verticalCells);
4921
+ }
4922
+ break;
4923
+ }
4924
+ case Borders.Empty:
4925
+ // Remove all borders from the selected cells
4926
+ cellsMap = this.getApplyBordersStylesCells(table, selection, [
4927
+ Positions.Top,
4928
+ Positions.Bottom,
4929
+ Positions.Right,
4930
+ Positions.Left
4931
+ ]);
4932
+ targetBorderStyle = new BordersStyleModel({ lineStyle: LineStyles.Nil });
4933
+ break;
4934
+ }
4935
+ if (!cellsMap.size) {
4936
+ return null;
4937
+ }
4938
+ const getNewBorder = (oldBorder) => {
4939
+ if (!targetBorderStyle.lineStyle) {
4940
+ targetBorderStyle.lineStyle =
4941
+ oldBorder.lineStyle && oldBorder.lineStyle !== LineStyles.Nil ? oldBorder.lineStyle : LineStyles.Single;
4942
+ }
4943
+ return new BordersStyleModel({ ...oldBorder, ...targetBorderStyle });
4944
+ };
4945
+ return new ApplyTableCellsStylesModel({
4946
+ cellsData: this.getCellDataFromBorderCells(cellsMap, getNewBorder),
4947
+ insertIndex: table.insertIndex
4948
+ });
4949
+ }
4950
+ static mergeCellStyles(existingCellsMap, newCellsMap) {
4951
+ for (const [key, newCell] of newCellsMap) {
4952
+ if (existingCellsMap.has(key)) {
4953
+ // Add the position to the existing cell
4954
+ const existingCell = existingCellsMap.get(key);
4955
+ const newPositions = newCell.updatePositions.filter(y => !existingCell.updatePositions.includes(y));
4956
+ existingCell.updatePositions.push(...newPositions);
4957
+ }
4958
+ else {
4959
+ existingCellsMap.set(key, { ...newCell });
4960
+ }
4961
+ }
4962
+ }
4963
+ static getApplyBordersStylesCells(table, selection, defaultPositions) {
4964
+ const result = new Map();
4965
+ for (let rowIndex = selection.rowIndexes.startIndex; rowIndex <= selection.rowIndexes.endIndex; rowIndex++) {
4966
+ for (let cellIndex = selection.cellIndexes.startIndex; cellIndex <= selection.cellIndexes.endIndex; cellIndex++) {
4967
+ // Upper border - add to the current cell and its upper neighbor
4968
+ if (rowIndex === selection.rowIndexes.startIndex && defaultPositions.includes(Positions.Top)) {
4969
+ this.addPositionsToCell(result, table, rowIndex - 1, cellIndex, [Positions.Bottom]);
4970
+ }
4971
+ // Bottom border - add to the current cell and its lower neighbor
4972
+ if (rowIndex === selection.rowIndexes.endIndex && defaultPositions.includes(Positions.Bottom)) {
4973
+ this.addPositionsToCell(result, table, rowIndex + 1, cellIndex, [Positions.Top]);
4974
+ }
4975
+ // Left border - add to the current cell and its left neighbor
4976
+ if (cellIndex === selection.cellIndexes.startIndex && defaultPositions.includes(Positions.Left)) {
4977
+ this.addPositionsToCell(result, table, rowIndex, cellIndex - 1, [Positions.Right]);
4978
+ }
4979
+ // Right border - add to the current cell and its right neighbor
4980
+ if (cellIndex === selection.cellIndexes.endIndex && defaultPositions.includes(Positions.Right)) {
4981
+ this.addPositionsToCell(result, table, rowIndex, cellIndex + 1, [Positions.Left]);
4982
+ }
4983
+ this.addPositionsToCell(result, table, rowIndex, cellIndex, defaultPositions);
4984
+ }
4985
+ }
4986
+ return result;
4987
+ }
4988
+ static addPositionsToCell(cellsMap, table, rowIndex, cellIndex, positions) {
4989
+ if (rowIndex < 0 || rowIndex >= table.rows.length || cellIndex < 0 || cellIndex >= table.rows[rowIndex].cells.length) {
4990
+ return;
4991
+ }
4992
+ const key = `${rowIndex},${cellIndex}`;
4993
+ const cell = table.rows[rowIndex].cells[cellIndex];
4994
+ if (cellsMap.has(key)) {
4995
+ // Combine positions if the cell already exists in the Map
4996
+ const existing = cellsMap.get(key);
4997
+ positions.forEach(x => {
4998
+ if (!existing.updatePositions.includes(x)) {
4999
+ existing.updatePositions.push(x);
5000
+ }
5001
+ });
5002
+ }
5003
+ else {
5004
+ // Add a new cell
5005
+ cellsMap.set(key, { cell, rowIndex, cellIndex, updatePositions: [...positions] });
5006
+ }
5007
+ }
5008
+ static getCellDataFromBorderCells(cellsMap, getNewBorder) {
5009
+ if (!cellsMap.size) {
5010
+ return [];
5011
+ }
5012
+ const cellsData = [];
5013
+ for (const cellData of cellsMap.values()) {
5014
+ const newBorders = [];
5015
+ const existingBorders = cellData.cell.borders ?? [];
5016
+ // Add or update borders with new data
5017
+ cellData.updatePositions.forEach(x => {
5018
+ const border = existingBorders.find(y => y.position === x) ??
5019
+ new BordersStyleModel({ position: x, lineStyle: LineStyles.Single, width: 1 });
5020
+ newBorders.push(getNewBorder(border));
5021
+ });
5022
+ // Add existing borders without updates
5023
+ existingBorders
5024
+ .filter(x => !cellData.updatePositions.includes(x.position))
5025
+ .forEach(x => newBorders.push(new BordersStyleModel({ ...x })));
5026
+ cellsData.push(new CellDataModel$1({
5027
+ rowIndex: cellData.rowIndex,
5028
+ cellIndex: cellData.cellIndex,
5029
+ borders: newBorders.length ? newBorders : null
5030
+ }));
5031
+ }
5032
+ return cellsData;
5033
+ }
4640
5034
  }
4641
5035
 
4642
5036
  class TabOperationsHelper {
@@ -4893,6 +5287,11 @@ class OperationsHelper {
4893
5287
  this.applyParagraphs(contents, model.paragraphs);
4894
5288
  break;
4895
5289
  }
5290
+ case CommandType.ApplyTableCellsStyles: {
5291
+ const model = command.applyTableCellsStyles;
5292
+ this.applyTableCellsStyles(contents, model);
5293
+ break;
5294
+ }
4896
5295
  }
4897
5296
  });
4898
5297
  }
@@ -5082,6 +5481,9 @@ class OperationsHelper {
5082
5481
  }
5083
5482
  return result;
5084
5483
  }
5484
+ static applyTableCellsStyles(document, model) {
5485
+ TableOperationsHelper.applyTableCellsStyles(document.tables, model.insertIndex, model.cellsData);
5486
+ }
5085
5487
  static insertStyledText(document, text, index, style) {
5086
5488
  document.content = ContentOperationsHelper.insertContent(document.content, text, index);
5087
5489
  FormatOperationsHelper.insertStyledContent(document.formats, index, text.length, style);
@@ -5359,8 +5761,9 @@ class PositionHelper {
5359
5761
  const paragraphTop = paragraph.paragraphSettings.distanceFromTop || 0;
5360
5762
  const linePaddingLeft = paragraph.paragraphSettings.textLinesInfo[paragraphInfo.lineIndex].paddingLeft;
5361
5763
  const offsetMargin = paragraph.paragraphSettings.textLinesInfo[paragraphInfo.lineIndex].offsetMargin;
5764
+ const markerWidth = this.getMarkerWidth(paragraph.paragraphSettings, paragraph.paragraphSettings.textLinesInfo[0], paragraphInfo.lineIndex);
5362
5765
  return {
5363
- pageX: lineWidthToPosition + linePaddingLeft + offsetMargin,
5766
+ pageX: lineWidthToPosition + linePaddingLeft + offsetMargin + markerWidth,
5364
5767
  pageY: paragraphTop + paragraphInfo.lineTopOffset - session.scrollTop,
5365
5768
  lineHeight: paragraphInfo.lineHeight,
5366
5769
  sizeCurrent: size,
@@ -5410,7 +5813,8 @@ class PositionHelper {
5410
5813
  return { line, indexInLine: 0 };
5411
5814
  }
5412
5815
  let indexInLine = 0;
5413
- let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin;
5816
+ const markerWidth = this.getMarkerWidth(paragraphSettings, lineInfo, lineIndex);
5817
+ let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin - markerWidth;
5414
5818
  const wordSpacing = lineInfo.wordSpacing ?? 0;
5415
5819
  while (indexInLine < tokens.length) {
5416
5820
  const token = tokens[indexInLine];
@@ -5437,7 +5841,8 @@ class PositionHelper {
5437
5841
  return { line, indexInLine: 0 };
5438
5842
  }
5439
5843
  let indexInLine = 0;
5440
- let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin;
5844
+ const markerWidth = this.getMarkerWidth(paragraphSettings, lineInfo, lineIndex);
5845
+ let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin - markerWidth;
5441
5846
  const wordSpacing = lineInfo.wordSpacing ?? 0;
5442
5847
  while (indexInLine < tokens.length) {
5443
5848
  const token = tokens[indexInLine];
@@ -5475,7 +5880,8 @@ class PositionHelper {
5475
5880
  }
5476
5881
  const textLineInfo = paragraphs[paragraphIndex].paragraphSettings.textLinesInfo[lineIndex];
5477
5882
  const wordSpacing = textLineInfo.wordSpacing ?? 0;
5478
- let width = positionWidth - textLineInfo.paddingLeft - marginLeft - textLineInfo.offsetMargin;
5883
+ const markerWidth = this.getMarkerWidth(paragraphs[paragraphIndex].paragraphSettings, textLineInfo, lineIndex);
5884
+ let width = positionWidth - textLineInfo.paddingLeft - marginLeft - textLineInfo.offsetMargin - markerWidth;
5479
5885
  while (column < tokens.length) {
5480
5886
  const token = tokens[column];
5481
5887
  if (width < token.width) {
@@ -5487,6 +5893,18 @@ class PositionHelper {
5487
5893
  }
5488
5894
  return column;
5489
5895
  }
5896
+ static getMarkerWidth(paragraphSettings, textLineInfo, lineIndex) {
5897
+ const numberingOffsetLeft = paragraphSettings.numberingData.numberingId === null
5898
+ ? 0
5899
+ : paragraphSettings.numberingData.width + paragraphSettings.numberingData.paddingLeft;
5900
+ if (lineIndex === 0 &&
5901
+ (textLineInfo.indentFirstLine ||
5902
+ (numberingOffsetLeft - textLineInfo.indentLeft > 0 &&
5903
+ numberingOffsetLeft - textLineInfo.indentLeft < textLineInfo.markerWidth))) {
5904
+ return textLineInfo.markerWidth;
5905
+ }
5906
+ return 0;
5907
+ }
5490
5908
  }
5491
5909
 
5492
5910
  class DistanceModel {
@@ -5589,7 +6007,13 @@ class RenderingHelper {
5589
6007
  const numberingOffsetLeft = currentParagraph.numberingData.numberingId === null
5590
6008
  ? 0
5591
6009
  : currentParagraph.numberingData.width + currentParagraph.numberingData.paddingLeft;
5592
- let lineEl = RenderingHelper.createLineElement(currentParagraph.textLinesInfo[splitIndex], numberingOffsetLeft, scalingRatio);
6010
+ let markerWidth = 0;
6011
+ if (currentParagraph.textLinesInfo[0].indentFirstLine ||
6012
+ (numberingOffsetLeft - currentParagraph.textLinesInfo[0].indentLeft > 0 &&
6013
+ numberingOffsetLeft - currentParagraph.textLinesInfo[0].indentLeft < currentParagraph.textLinesInfo[0].markerWidth)) {
6014
+ markerWidth = currentParagraph.textLinesInfo[0].markerWidth;
6015
+ }
6016
+ let lineEl = RenderingHelper.createLineElement(currentParagraph.textLinesInfo[splitIndex], numberingOffsetLeft - markerWidth, scalingRatio);
5593
6017
  domContent.parentNode.appendChild(lineEl);
5594
6018
  const valueFragment = DomHelper.createFragment(domContent.currentElement);
5595
6019
  let isLastLineFragment = false;
@@ -6454,11 +6878,17 @@ class TextLayer {
6454
6878
  this.renderingHelper.renderContentWrappedLine({ currentElement: this.element, parentNode: linesContainerElement }, splits, paragraphSettings, combinedFormats, distance, this.session.customContentService, this.session.customComponents, this.session.generalProperties.scalingRatio, this.session.model.breaks);
6455
6879
  }
6456
6880
  else {
6881
+ const markerWidth = paragraphSettings.textLinesInfo[0].indentFirstLine ? paragraphSettings.textLinesInfo[0].markerWidth : 0;
6457
6882
  const numberingOffsetLeft = paragraphSettings.numberingData.numberingId === null
6458
6883
  ? 0
6459
- : paragraphSettings.numberingData.width + paragraphSettings.numberingData.paddingLeft;
6884
+ : paragraphSettings.numberingData.width + paragraphSettings.numberingData.paddingLeft - markerWidth;
6885
+ let offset = 0;
6886
+ if (numberingOffsetLeft - paragraphSettings.textLinesInfo[0].indentLeft > 0 &&
6887
+ numberingOffsetLeft - paragraphSettings.textLinesInfo[0].indentLeft < paragraphSettings.textLinesInfo[0].markerWidth) {
6888
+ offset = paragraphSettings.textLinesInfo[0].markerWidth;
6889
+ }
6460
6890
  const lineInfo = paragraphSettings.textLinesInfo[0];
6461
- const lastLineEl = this.renderingHelper.createLineElement(lineInfo, numberingOffsetLeft, this.session.generalProperties.scalingRatio);
6891
+ const lastLineEl = this.renderingHelper.createLineElement(lineInfo, numberingOffsetLeft - offset, this.session.generalProperties.scalingRatio);
6462
6892
  linesContainerElement.appendChild(lastLineEl);
6463
6893
  const rowDistance = new DistanceModel({ start: startIndex, end: endIndex });
6464
6894
  this.renderingHelper.renderContentSimpleLine({ currentElement: this.element, parentNode: lastLineEl }, combinedFormats, rowDistance, this.session.customContentService, this.session.customComponents, lineInfo, this.session.model.breaks);
@@ -6772,6 +7202,9 @@ class CommandModel {
6772
7202
  if (fields.applyParagraphStyle) {
6773
7203
  fields.applyParagraphStyle = new ApplyParagraphStyleModel(fields.applyParagraphStyle);
6774
7204
  }
7205
+ if (fields.applyTableCellsStyles) {
7206
+ fields.applyTableCellsStyles = new ApplyTableCellsStylesModel(fields.applyTableCellsStyles);
7207
+ }
6775
7208
  if (fields.applyTextStyle) {
6776
7209
  fields.applyTextStyle = new ApplyTextStyleModel(fields.applyTextStyle);
6777
7210
  }
@@ -6924,6 +7357,9 @@ class SaveCommandsHelper {
6924
7357
  static getInsertTableCommand(insertTable, targets) {
6925
7358
  return new CommandModel({ commandType: CommandType.InsertTable, insertTable, targets });
6926
7359
  }
7360
+ static getApplyTableCellsStylesCommand(applyTableCellsStyles, targets) {
7361
+ return new CommandModel({ commandType: CommandType.ApplyTableCellsStyles, applyTableCellsStyles, targets });
7362
+ }
6927
7363
  static getInsertTableColumnsCommand(columnsCount, inheritIndex, insertIndex, targetIndex, targets) {
6928
7364
  const insertTableColumns = new InsertTableColumnsModel({ count: columnsCount, inheritIndex, insertIndex, targetIndex });
6929
7365
  return new CommandModel({ commandType: CommandType.InsertTableColumns, insertTableColumns, targets });
@@ -7336,13 +7772,6 @@ class Search {
7336
7772
  }
7337
7773
 
7338
7774
  class Selection {
7339
- constructor() {
7340
- this.anchor = null;
7341
- this.cursor = new CursorParagraph(0, 0);
7342
- this.isDisabled = false;
7343
- this.focusedComponent = null;
7344
- this.keepLinePositionX = null;
7345
- }
7346
7775
  get isFocused() {
7347
7776
  return !!this.focusedComponent;
7348
7777
  }
@@ -7367,6 +7796,14 @@ class Selection {
7367
7796
  const anchor = new CursorParagraph(this.anchor.row, this.anchor.column);
7368
7797
  return this.isBackwards ? new Range(cursor, anchor) : new Range(anchor, cursor);
7369
7798
  }
7799
+ constructor(overlayService) {
7800
+ this.overlayService = overlayService;
7801
+ this.anchor = null;
7802
+ this.cursor = new CursorParagraph(0, 0);
7803
+ this.isDisabled = false;
7804
+ this.focusedComponent = null;
7805
+ this.keepLinePositionX = null;
7806
+ }
7370
7807
  focus(component, position) {
7371
7808
  if (component === this.focusedComponent) {
7372
7809
  return;
@@ -7383,17 +7820,15 @@ class Selection {
7383
7820
  this.focusedComponent = null;
7384
7821
  }
7385
7822
  placeCursor(cursor) {
7386
- this.cursor = cursor;
7387
7823
  this.anchor = null;
7388
- this.keepLinePositionX = null;
7389
- this.focusedComponent?.instance.blur();
7390
- this.focusedComponent = null;
7824
+ this.moveCursor(cursor);
7391
7825
  }
7392
7826
  moveCursor(cursor) {
7393
7827
  this.cursor = cursor;
7394
7828
  this.keepLinePositionX = null;
7395
7829
  this.focusedComponent?.instance.blur();
7396
7830
  this.focusedComponent = null;
7831
+ this.overlayService.close();
7397
7832
  }
7398
7833
  placeSelection(cursor, anchor) {
7399
7834
  this.cursor = cursor;
@@ -7401,6 +7836,7 @@ class Selection {
7401
7836
  this.keepLinePositionX = null;
7402
7837
  this.focusedComponent?.instance.blur();
7403
7838
  this.focusedComponent = null;
7839
+ this.overlayService.close();
7404
7840
  }
7405
7841
  moveSelection(position) {
7406
7842
  if (!this.anchor) {
@@ -7413,6 +7849,7 @@ class Selection {
7413
7849
  this.keepLinePositionX = null;
7414
7850
  this.focusedComponent?.instance.blur();
7415
7851
  this.focusedComponent = null;
7852
+ this.overlayService.close();
7416
7853
  }
7417
7854
  disableSelection() {
7418
7855
  this.isDisabled = true;
@@ -7787,7 +8224,7 @@ class Editor {
7787
8224
  get grammarChecker() {
7788
8225
  return this.regulatorService.grammarChecker;
7789
8226
  }
7790
- constructor(model, container, editorService, overlayService, regulatorService, commandsService, clipboard, externalElementTagNames, customPageWidth) {
8227
+ constructor(model, container, editorService, overlayService, regulatorService, commandsService, clipboard, externalElementTagNames, insertOverlays, customPageWidth) {
7791
8228
  this.model = model;
7792
8229
  this.container = container;
7793
8230
  this.editorService = editorService;
@@ -7796,6 +8233,7 @@ class Editor {
7796
8233
  this.commandsService = commandsService;
7797
8234
  this.clipboard = clipboard;
7798
8235
  this.externalElementTagNames = externalElementTagNames;
8236
+ this.insertOverlays = insertOverlays;
7799
8237
  this.customPageWidth = customPageWidth;
7800
8238
  this.MAX_COUNT = 999;
7801
8239
  this.parentTagName = 'APP-NOD-EDITOR';
@@ -7817,7 +8255,7 @@ class Editor {
7817
8255
  this.subscriptions.push(this.receiveTextStyleSubscription());
7818
8256
  this.customElementTagNames = [...this.externalElementTagNames, this.imageTagName, this.tableCellTagName, this.edgeElementTagName];
7819
8257
  this.history = new OperationHistory(editorService, regulatorService);
7820
- this.selection = new Selection();
8258
+ this.selection = new Selection(this.overlayService);
7821
8259
  this.regulatorService.setSelection(this.selection);
7822
8260
  this.initMainSession();
7823
8261
  this.textInput = new TextInput(this.mainRenderer.container);
@@ -7831,7 +8269,7 @@ class Editor {
7831
8269
  this.focus();
7832
8270
  this.session.applyToolbarStyles();
7833
8271
  this.search = new Search(editorService);
7834
- 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.grammarReplaceSubscription(), this.ignoreGrammarErrorSubscription(), this.selectAllSubscription(), this.setImageStyleSubscription(), this.setNumberingTemplateTypeSubscription(), this.setParagraphStylesSubscription(), this.setTextStylesSubscription(), this.undoSubscription(), this.updateEdgeSubscription(), this.viewOnlyModeSubscription(), this.applyPageFormatSubscription(), this.applyRightMarginPageFormatSubscription(), this.applyLeftMarginPageFormatSubscription(), this.insertPageFormatSubscription(), this.applyDocumentPageFormatSubscription(), this.dragMoveSubscription(), this.dragDropSubscription(), this.applyFirstLinePositionSubscription(), this.applyRightIndentParagraphSubscription(), this.applyLeftIndentParagraphSubscription(), this.applyTabSettingsSubscription(), this.commandCreatedForEdges());
8272
+ this.subscriptions.push(this.changedEdgeSizeSubscription(), this.changedEdgeSubscription(), this.changedTableSizeSubscription(), this.clipboardDataSubscription(), this.copySelectedSubscription(), this.createCustomComponentSubscription(), this.replaceByCustomComponentSubscription(), this.cutSelectedSubscription(), this.disableSelectionSubscription(), this.endMousePressSubscription(), this.imageLoadedSubscription(), this.insertBreakSubscription(), this.insertImageSubscription(), this.insertLinkSubscription(), this.insertTableColumnsSubscription(), this.insertTableRowsSubscription(), this.insertTableSubscription(), this.updateTableBorderStyleSubscription(), this.updateTableBorderWidthSubscription(), this.updateTableBordersSubscription(), this.insertTextSubscription(), this.pasteFromClipboardSubscription(), this.printSubscription(), this.redoSubscription(), this.removeLeftSubscription(), this.removeNumberingsSubscription(), this.removeRightSubscription(), this.removeSelectedSubscription(), this.removeTableColumnsSubscription(), this.removeTableRowsSubscription(), this.removeTableSubscription(), this.rerenderSubscription(), this.resizeTableColumnsSubscription(), ...this.searchOptionSubscriptions(), ...this.replaceSubscription(), this.grammarReplaceSubscription(), this.ignoreGrammarErrorSubscription(), this.selectAllSubscription(), this.setImageStyleSubscription(), this.setNumberingTemplateTypeSubscription(), this.setParagraphStylesSubscription(), this.setTextStylesSubscription(), this.undoSubscription(), this.updateEdgeSubscription(), this.viewOnlyModeSubscription(), this.applyPageFormatSubscription(), this.applyRightMarginPageFormatSubscription(), this.applyLeftMarginPageFormatSubscription(), this.insertPageFormatSubscription(), this.applyDocumentPageFormatSubscription(), this.dragMoveSubscription(), this.dragDropSubscription(), this.applyFirstLinePositionSubscription(), this.applyRightIndentParagraphSubscription(), this.applyLeftIndentParagraphSubscription(), this.applyTabSettingsSubscription(), this.commandCreatedForEdges());
7835
8273
  }
7836
8274
  destroy() {
7837
8275
  this.subscriptions.forEach(s => s?.unsubscribe());
@@ -7879,6 +8317,17 @@ class Editor {
7879
8317
  this.scrollCursorIntoMainView(0.5);
7880
8318
  this.onSelectionChange();
7881
8319
  }
8320
+ showInsertOverlay(textKey) {
8321
+ const component = this.insertOverlays.getComponent(textKey);
8322
+ if (!component) {
8323
+ return;
8324
+ }
8325
+ const cursor = PositionHelper.documentToPixel(this.session, this.session.selection.cursor);
8326
+ const rect = this.renderer.container.getBoundingClientRect();
8327
+ const x = rect.left + cursor.pageX;
8328
+ const y = rect.top + cursor.pageY + cursor.lineHeight;
8329
+ this.overlayService.open(component, { textKey }, x, y);
8330
+ }
7882
8331
  cut() {
7883
8332
  this.removeSelected();
7884
8333
  }
@@ -7947,6 +8396,7 @@ class Editor {
7947
8396
  this.renderer.updateCursor();
7948
8397
  this.rerenderMarker();
7949
8398
  this.scrollCursorIntoMainView(0.1);
8399
+ this.onContentChange();
7950
8400
  }
7951
8401
  insertTab() {
7952
8402
  const insertIndex = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.start);
@@ -7955,6 +8405,18 @@ class Editor {
7955
8405
  this.replaceBy(new ReplaceModel({ insertTab }));
7956
8406
  return;
7957
8407
  }
8408
+ if (this.selection.range.start.column === 0) {
8409
+ const paragraph = this.session.displayData.paragraphs[this.selection.range.start.row];
8410
+ if (paragraph.paragraphSettings.numberingData.numberingId) {
8411
+ this.applyParagraphStyles(new ParagraphStyleModel({
8412
+ numberingLevel: paragraph.paragraphSettings.numberingData.level + 1,
8413
+ indentLeft: 0,
8414
+ indentFirstLine: 0,
8415
+ indentHanging: 0
8416
+ }));
8417
+ return;
8418
+ }
8419
+ }
7958
8420
  this.saveInsertTabToHistory(insertTab);
7959
8421
  const endPoint = this.session.insertTab(this.selection.cursor);
7960
8422
  this.onDocumentChange(new Range(this.selection.cursor, endPoint));
@@ -7976,6 +8438,7 @@ class Editor {
7976
8438
  this.renderer.updateLines(this.selection.cursor.row, lastRow);
7977
8439
  this.renderer.updateCursor();
7978
8440
  this.rerenderMarker();
8441
+ this.onContentChange();
7979
8442
  }
7980
8443
  insertLink(linkDataModel) {
7981
8444
  const insertIndex = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.start);
@@ -7988,6 +8451,7 @@ class Editor {
7988
8451
  this.session.insertLink(this.selection.cursor, linkDataModel);
7989
8452
  this.renderer.updateCursor();
7990
8453
  this.rerenderMarker();
8454
+ this.onContentChange();
7991
8455
  }
7992
8456
  insertTable(tableData) {
7993
8457
  const start = this.selection.range.start;
@@ -8016,6 +8480,36 @@ class Editor {
8016
8480
  this.onContentChange();
8017
8481
  this.rerenderMarker();
8018
8482
  }
8483
+ applyTableCellsStyles(data, handler) {
8484
+ if (!this.session.isCell()) {
8485
+ return;
8486
+ }
8487
+ const source = this.regulatorService.getSessionModel(this.session.sessionId).source;
8488
+ const tableSession = this.regulatorService.getSession(this.regulatorService.currentSession.parentSessionId);
8489
+ const tableComponent = tableSession.customComponents.tables.find(x => x.instance.sessionId === tableSession.sessionId && x.instance.insertIndex === source.table.insertIndex)?.instance;
8490
+ if (!tableComponent) {
8491
+ return;
8492
+ }
8493
+ const selection = tableComponent.tableSelection.selectionRange
8494
+ ? tableComponent.tableSelection.selectionRange
8495
+ : new SelectionRangeModel({ startIndex: source.cellComponent.rowIndex, endIndex: source.cellComponent.rowIndex }, { startIndex: source.cellComponent.cellIndex, endIndex: source.cellComponent.cellIndex });
8496
+ tableComponent.tableSelection.removeMouseSubscriptions();
8497
+ const applyModel = handler(data, tableComponent.table, selection);
8498
+ if (!applyModel) {
8499
+ return;
8500
+ }
8501
+ const tableSessionModel = this.regulatorService.getSessionModel(tableSession.sessionId);
8502
+ this.saveApplyTableCellsStylesToHistory(tableComponent.table, applyModel, this.regulatorService.getTargets(tableSessionModel));
8503
+ tableSession.applyTableCellsStyles(applyModel);
8504
+ const newCellSession = tableComponent.getCellSession(source.cellComponent.rowIndex, source.cellComponent.cellIndex);
8505
+ this.regulatorService.setCustomSessionAsCurrent(newCellSession.sessionId);
8506
+ this.changedTableSize(applyModel.insertIndex, tableSession.sessionId);
8507
+ // restore table cells selection and highlight
8508
+ this.selection.disableSelection();
8509
+ tableComponent.tableSelection.selectionRange = selection;
8510
+ tableComponent.tableSelection.addDocumentMouseDownSubscriptions();
8511
+ tableComponent.tableSelection.highlightCurrentSelectionCells();
8512
+ }
8019
8513
  replaceBy(model) {
8020
8514
  const partIndexes = ContentHelper.getSelectedPartDocumentIndexes(this.session.displayData.paragraphs, this.selection.range);
8021
8515
  model.delete = new DeleteModel({ startIndex: partIndexes.startIndex, count: partIndexes.endIndex - partIndexes.startIndex + 1 });
@@ -8378,6 +8872,11 @@ class Editor {
8378
8872
  this.session.applyParagraphs(deepCopy.paragraphs);
8379
8873
  command = SaveCommandsHelper.getApplyParagraphsCommand(deepCopy.paragraphs, this.targets);
8380
8874
  }
8875
+ else if (operation instanceof ApplyTableCellsStylesModel) {
8876
+ this.session.applyTableCellsStyles(operation);
8877
+ this.changedTableSize(operation.insertIndex, this.session.sessionId);
8878
+ command = SaveCommandsHelper.getApplyTableCellsStylesCommand(operation, this.targets);
8879
+ }
8381
8880
  else {
8382
8881
  throw new Error('Undo/redo is not implemented for the Operation');
8383
8882
  }
@@ -8435,6 +8934,10 @@ class Editor {
8435
8934
  this.history.pushInsertTable(model);
8436
8935
  this.commandsService.createCommand(SaveCommandsHelper.getInsertTableCommand(model, this.targets));
8437
8936
  }
8937
+ saveApplyTableCellsStylesToHistory(table, model, targets) {
8938
+ this.history.pushApplyTableCellsStyles(table, model, targets);
8939
+ this.commandsService.createCommand(SaveCommandsHelper.getApplyTableCellsStylesCommand(model, targets));
8940
+ }
8438
8941
  saveApplyTextStyleToHistory(startIndex, endIndex, textStyle) {
8439
8942
  const formats = FormatHelper.sliceSection(this.session.model.formats, startIndex, endIndex);
8440
8943
  const linkFormats = LinkHelper.sliceFormats(this.session.model.links, startIndex, endIndex);
@@ -8526,6 +9029,15 @@ class Editor {
8526
9029
  this.onSelectionChange();
8527
9030
  this.onContentChange();
8528
9031
  }
9032
+ replaceByCustomElement(textKey, model) {
9033
+ const index = ContentHelper.paragraphPositionToDocumentIndex(this.session.displayData.paragraphs, this.selection.cursor);
9034
+ const text = this.session.model.content.slice(index - textKey.length, index);
9035
+ if (text === textKey) {
9036
+ const position = new CursorParagraph(this.selection.cursor.row, this.selection.cursor.column - textKey.length);
9037
+ this.selection.moveSelection(position);
9038
+ }
9039
+ this.createCustomElement(model);
9040
+ }
8529
9041
  removeSelected() {
8530
9042
  const range = this.selection.range;
8531
9043
  const isNumbering = this.session.paragraphIsNumbering(range.end.row);
@@ -8587,6 +9099,7 @@ class Editor {
8587
9099
  }
8588
9100
  this.insert(text);
8589
9101
  this.scrollCursorIntoMainView();
9102
+ this.showInsertOverlay(text);
8590
9103
  }
8591
9104
  onCut(event) {
8592
9105
  event.preventDefault();
@@ -8685,16 +9198,13 @@ class Editor {
8685
9198
  this.onSelectionChange();
8686
9199
  const paragraph = this.session.displayData.paragraphs[position.row];
8687
9200
  const error = this.grammarChecker.getError(this.session.sessionId, paragraph.id, position.column);
8688
- if (error && !this.overlayService.overlayRef) {
8689
- const target = event.target;
8690
- const lineEl = target.closest('.noder-line');
8691
- if (lineEl) {
8692
- const lineRect = lineEl.getBoundingClientRect();
8693
- const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
8694
- const hintTop = lineRect.top + scrollTop - POPUP_HEIGHT;
8695
- this.overlayService.open(GrammarPopupComponent, { error, paragraphIndex: position.row }, event.clientX - 100, hintTop);
8696
- event.stopPropagation();
8697
- }
9201
+ if (!this.editorService.isViewOnly && error) {
9202
+ const cursor = PositionHelper.documentToPixel(this.session, this.session.selection.cursor);
9203
+ const rect = this.renderer.container.getBoundingClientRect();
9204
+ const hintLeft = rect.left + cursor.pageX;
9205
+ const hintTop = rect.top + cursor.pageY - POPUP_HEIGHT;
9206
+ this.overlayService.open(GrammarPopupComponent, { error, paragraphIndex: position.row }, hintLeft - 100, hintTop);
9207
+ event.stopPropagation();
8698
9208
  }
8699
9209
  event.preventDefault();
8700
9210
  if (event.ctrlKey) {
@@ -8771,7 +9281,7 @@ class Editor {
8771
9281
  const scrollSpeed = 4;
8772
9282
  const deltaY = event.deltaY * factor * scrollSpeed;
8773
9283
  this.onScroll(deltaY);
8774
- this.overlayService.close();
9284
+ this.overlayService.scroll(deltaY);
8775
9285
  event.stopPropagation();
8776
9286
  event.preventDefault();
8777
9287
  }
@@ -8910,6 +9420,7 @@ class Editor {
8910
9420
  initMainSession() {
8911
9421
  const pageWidth = this.customPageWidth ?? Math.max(...this.model.pageFormats.map(x => x.pageWidth));
8912
9422
  this.container.nativeElement.style.maxWidth = `${pageWidth}px`;
9423
+ this.container.nativeElement.style.width = `${pageWidth}px`;
8913
9424
  const scalingRatio = this.customPageWidth ? ScalingHelper.getRatio(this.customPageWidth, pageWidth) : 1;
8914
9425
  this.editorService.setPageFormat(this.model.pageFormats[0]);
8915
9426
  this.editorService.paragraphStyle(this.model.paragraphs[0].paragraphStyle);
@@ -8925,12 +9436,13 @@ class Editor {
8925
9436
  this.editorService.setHasSelection(!this.selection.isEmpty);
8926
9437
  const position = this.mainSession.displayData.positionToIndex(this.selection.selectedRange.start);
8927
9438
  const pageFormat = this.mainSession.displayData.getPageFormatAtPosition(position);
8928
- this.editorService.paragraphStyle(this.session.model.paragraphs[this.selection.selectedRange.start.row].paragraphStyle);
9439
+ const paragraphStyle = this.session.model.paragraphs[this.selection.selectedRange.start.row].paragraphStyle;
9440
+ const numbering = this.session.generalProperties.numberings.find(x => x.numberingId === paragraphStyle.numberingId) ?? null;
9441
+ this.editorService.paragraphStyle(paragraphStyle, numbering);
8929
9442
  this.editorService.setPageFormat(pageFormat.pageFormatModel);
8930
9443
  this.rerenderMarker();
8931
9444
  }
8932
9445
  onContentChange() {
8933
- this.overlayService.close();
8934
9446
  if (this.search.term) {
8935
9447
  this.find(this.search.term);
8936
9448
  }
@@ -8979,6 +9491,7 @@ class Editor {
8979
9491
  session.displayData.updateNextLineIndexes(paragraph, paragraph);
8980
9492
  session.displayData.updateNumberingsDataOnChange(paragraph + 1);
8981
9493
  this.focus();
9494
+ this.onContentChange();
8982
9495
  }
8983
9496
  insertTableRows(insertIndex, rowsCount, targetIndex, inheritIndex, sessionId) {
8984
9497
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
@@ -8988,6 +9501,7 @@ class Editor {
8988
9501
  this.commandsService.createCommand(SaveCommandsHelper.getInsertTableRowsCommand(rowsCount, inheritIndex, insertIndex, targetIndex, this.targets));
8989
9502
  this.session.insertTableRows(insertIndex, rowsCount, targetIndex, inheritIndex);
8990
9503
  this.changedTableSize(insertIndex, sessionId);
9504
+ this.onContentChange();
8991
9505
  }
8992
9506
  insertTableColumns(insertIndex, columnsCount, targetIndex, inheritIndex, sessionId) {
8993
9507
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
@@ -8997,6 +9511,7 @@ class Editor {
8997
9511
  this.commandsService.createCommand(SaveCommandsHelper.getInsertTableColumnsCommand(columnsCount, inheritIndex, insertIndex, targetIndex, this.targets));
8998
9512
  this.session.insertTableColumns(insertIndex, columnsCount, targetIndex, inheritIndex);
8999
9513
  this.changedTableSize(insertIndex, sessionId);
9514
+ this.onContentChange();
9000
9515
  }
9001
9516
  removeTableRows(insertIndex, startIndex, endIndex, sessionId) {
9002
9517
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
@@ -9006,6 +9521,7 @@ class Editor {
9006
9521
  this.commandsService.createCommand(SaveCommandsHelper.getRemoveTableRowsCommand(startIndex, endIndex, insertIndex, this.targets));
9007
9522
  this.session.removeTableRows(insertIndex, startIndex, endIndex);
9008
9523
  this.changedTableSize(insertIndex, sessionId);
9524
+ this.onContentChange();
9009
9525
  }
9010
9526
  removeTableColumns(insertIndex, startIndex, endIndex, sessionId) {
9011
9527
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
@@ -9015,6 +9531,7 @@ class Editor {
9015
9531
  this.commandsService.createCommand(SaveCommandsHelper.getRemoveTableColumnsCommand(startIndex, endIndex, insertIndex, this.targets));
9016
9532
  this.session.removeTableColumns(insertIndex, startIndex, endIndex);
9017
9533
  this.changedTableSize(insertIndex, sessionId);
9534
+ this.onContentChange();
9018
9535
  }
9019
9536
  resizeTableColumns(resizeTableColumns, sessionId) {
9020
9537
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
@@ -9024,6 +9541,7 @@ class Editor {
9024
9541
  this.commandsService.createCommand(SaveCommandsHelper.getResizeTableColumnsCommand(resizeTableColumns, this.targets));
9025
9542
  this.session.resizeTableColumns(resizeTableColumns);
9026
9543
  this.changedTableSize(resizeTableColumns.insertIndex, sessionId);
9544
+ this.onContentChange();
9027
9545
  }
9028
9546
  onMousePressedMove(event) {
9029
9547
  const position = this.renderer.screenToTextCoordinatesUsingMidpoint(event.clientX, event.clientY);
@@ -9128,6 +9646,7 @@ class Editor {
9128
9646
  viewOnlyModeSubscription() {
9129
9647
  return this.editorService.isViewOnly$.subscribe(() => {
9130
9648
  this.selection?.clearSelection();
9649
+ this.renderer.loop.schedule({ grammar: true });
9131
9650
  });
9132
9651
  }
9133
9652
  applyLeftMarginPageFormatSubscription() {
@@ -9220,6 +9739,12 @@ class Editor {
9220
9739
  this.focus();
9221
9740
  });
9222
9741
  }
9742
+ replaceByCustomComponentSubscription() {
9743
+ return this.editorService.replaceByCustomComponent$.subscribe(data => {
9744
+ this.replaceByCustomElement(data.textKey, data.model);
9745
+ this.focus();
9746
+ });
9747
+ }
9223
9748
  insertBreakSubscription() {
9224
9749
  return this.editorService.insertBreak$.subscribe(breakType => {
9225
9750
  this.insertBreak(breakType);
@@ -9306,14 +9831,22 @@ class Editor {
9306
9831
  });
9307
9832
  }
9308
9833
  insertTableSubscription() {
9309
- return this.editorService.insertTable$.subscribe(data => {
9310
- this.insertTable(data);
9311
- });
9834
+ return this.editorService.insertTable$.subscribe(data => this.insertTable(data));
9835
+ }
9836
+ updateTableBorderStyleSubscription() {
9837
+ return this.editorService.updateTableBorderStyle$.subscribe(x => this.applyTableCellsStyles(x, (data, table, selection) => TableOperationsHelper.getApplyTableCellsBordersStyle(data, table, selection)));
9838
+ }
9839
+ updateTableBorderWidthSubscription() {
9840
+ return this.editorService.updateTableBorderWidth$.subscribe(x => this.applyTableCellsStyles(x, (data, table, selection) => TableOperationsHelper.getApplyTableCellsBordersWidth(data, table, selection)));
9841
+ }
9842
+ updateTableBordersSubscription() {
9843
+ return this.editorService.updateTableBorders$.subscribe(x => this.applyTableCellsStyles(x, (data, table, selection) => TableOperationsHelper.getApplyTableCellsBorders(data, table, selection)));
9312
9844
  }
9313
9845
  insertTextSubscription() {
9314
9846
  return this.editorService.insertText$.subscribe(x => {
9315
9847
  this.insert(x);
9316
9848
  this.focus();
9849
+ this.showInsertOverlay(x);
9317
9850
  });
9318
9851
  }
9319
9852
  undoSubscription() {
@@ -9435,6 +9968,7 @@ class Editor {
9435
9968
  }
9436
9969
  const pageWidth = this.customPageWidth ?? Math.max(...this.model.pageFormats.map(x => x.pageWidth));
9437
9970
  this.container.nativeElement.style.maxWidth = `${pageWidth}px`;
9971
+ this.container.nativeElement.style.width = `${pageWidth}px`;
9438
9972
  const scalingRatio = this.customPageWidth ? ScalingHelper.getRatio(this.customPageWidth, pageWidth) : 1;
9439
9973
  this.model.tables.forEach(table => {
9440
9974
  this.changeColumnsWidth(table.columns, scalingRatio);
@@ -9455,6 +9989,7 @@ class Editor {
9455
9989
  this.initResizeListener();
9456
9990
  this.focus();
9457
9991
  this.session.applyToolbarStyles();
9992
+ this.onContentChange();
9458
9993
  }
9459
9994
  changeColumnsWidth(columns, widthScale) {
9460
9995
  columns.forEach(column => (column.width = Math.round(column.width / widthScale)));
@@ -9691,8 +10226,10 @@ class DisplayTokenHelper {
9691
10226
  offsetBefore: prevToken.indentBefore,
9692
10227
  offsetAfter: prevToken.indentAfter,
9693
10228
  lineSpacing: prevToken.lineSpacing,
10229
+ markerWidth: prevToken.markerWidth,
9694
10230
  isAfterPageBreak,
9695
- isEndedByPageBreak: prevToken.isPageBreak
10231
+ isEndedByPageBreak: prevToken.isPageBreak,
10232
+ isNumbering: prevToken.isNumbering
9696
10233
  });
9697
10234
  if (firstWrapToken) {
9698
10235
  info.align = firstWrapToken.align;
@@ -9704,6 +10241,8 @@ class DisplayTokenHelper {
9704
10241
  info.offsetAfter = firstWrapToken.indentAfter;
9705
10242
  info.lineSpacing = firstWrapToken.lineSpacing;
9706
10243
  info.hasTable = firstWrapToken.isTable;
10244
+ info.isNumbering = firstWrapToken.isNumbering;
10245
+ info.markerWidth = firstWrapToken.markerWidth;
9707
10246
  }
9708
10247
  let fontSize = 0;
9709
10248
  let ascent = 0;
@@ -9947,7 +10486,7 @@ class NoderTableCellComponent {
9947
10486
  this.editorService.disableSelection();
9948
10487
  }
9949
10488
  onStartResizing(event, border) {
9950
- if (this.session.isWithinEdge() && !this.regulatorService.mainSession.session.customComponents.edges.isEdit) {
10489
+ if (this.session.isCellWithinEdge() && !this.regulatorService.mainSession.session.customComponents.edges.isEdit) {
9951
10490
  return;
9952
10491
  }
9953
10492
  event.stopPropagation();
@@ -10017,55 +10556,6 @@ class RowDataModel {
10017
10556
  }
10018
10557
  }
10019
10558
 
10020
- var LineStyles;
10021
- (function (LineStyles) {
10022
- LineStyles[LineStyles["SolidLine"] = 0] = "SolidLine";
10023
- LineStyles[LineStyles["RoundDot"] = 1] = "RoundDot";
10024
- LineStyles[LineStyles["SquareDot"] = 2] = "SquareDot";
10025
- LineStyles[LineStyles["Dash"] = 3] = "Dash";
10026
- LineStyles[LineStyles["DashDot"] = 4] = "DashDot";
10027
- LineStyles[LineStyles["LongDash"] = 5] = "LongDash";
10028
- LineStyles[LineStyles["LongDashDot"] = 6] = "LongDashDot";
10029
- LineStyles[LineStyles["LongDashDotDot"] = 7] = "LongDashDotDot";
10030
- LineStyles[LineStyles["Single"] = 8] = "Single";
10031
- LineStyles[LineStyles["Thick"] = 9] = "Thick";
10032
- LineStyles[LineStyles["Double"] = 10] = "Double";
10033
- LineStyles[LineStyles["Dotted"] = 11] = "Dotted";
10034
- LineStyles[LineStyles["Dashed"] = 12] = "Dashed";
10035
- LineStyles[LineStyles["DotDash"] = 13] = "DotDash";
10036
- LineStyles[LineStyles["DotDotDash"] = 14] = "DotDotDash";
10037
- LineStyles[LineStyles["Triple"] = 15] = "Triple";
10038
- LineStyles[LineStyles["ThinThickSmallGap"] = 16] = "ThinThickSmallGap";
10039
- LineStyles[LineStyles["ThickThinSmallGap"] = 17] = "ThickThinSmallGap";
10040
- LineStyles[LineStyles["ThinThickThinSmallGap"] = 18] = "ThinThickThinSmallGap";
10041
- LineStyles[LineStyles["ThinThickMediumGap"] = 19] = "ThinThickMediumGap";
10042
- LineStyles[LineStyles["ThickThinMediumGap"] = 20] = "ThickThinMediumGap";
10043
- LineStyles[LineStyles["ThinThickThinMediumGap"] = 21] = "ThinThickThinMediumGap";
10044
- LineStyles[LineStyles["ThinThickLargeGap"] = 22] = "ThinThickLargeGap";
10045
- LineStyles[LineStyles["ThickThinLargeGap"] = 23] = "ThickThinLargeGap";
10046
- LineStyles[LineStyles["ThinThickThinLargeGap"] = 24] = "ThinThickThinLargeGap";
10047
- LineStyles[LineStyles["Wave"] = 25] = "Wave";
10048
- LineStyles[LineStyles["DoubleWave"] = 26] = "DoubleWave";
10049
- LineStyles[LineStyles["DashSmallGap"] = 27] = "DashSmallGap";
10050
- LineStyles[LineStyles["DashDotStroked"] = 28] = "DashDotStroked";
10051
- LineStyles[LineStyles["ThreeDEmboss"] = 29] = "ThreeDEmboss";
10052
- LineStyles[LineStyles["ThreeDEngrave"] = 30] = "ThreeDEngrave";
10053
- LineStyles[LineStyles["Outset"] = 31] = "Outset";
10054
- LineStyles[LineStyles["Inset"] = 32] = "Inset";
10055
- LineStyles[LineStyles["Nil"] = 33] = "Nil";
10056
- })(LineStyles || (LineStyles = {}));
10057
-
10058
- var Positions;
10059
- (function (Positions) {
10060
- Positions[Positions["Top"] = 0] = "Top";
10061
- Positions[Positions["Right"] = 1] = "Right";
10062
- Positions[Positions["Bottom"] = 2] = "Bottom";
10063
- Positions[Positions["Left"] = 3] = "Left";
10064
- Positions[Positions["All"] = 4] = "All";
10065
- Positions[Positions["InsideHorizontal"] = 5] = "InsideHorizontal";
10066
- Positions[Positions["InsideVertical"] = 6] = "InsideVertical";
10067
- })(Positions || (Positions = {}));
10068
-
10069
10559
  class TableCellHelper {
10070
10560
  static setCellBorders(cell, borders) {
10071
10561
  if (!borders?.length || !cell) {
@@ -10155,13 +10645,6 @@ class TableCellHelper {
10155
10645
  }
10156
10646
  }
10157
10647
 
10158
- class SelectionRangeModel {
10159
- constructor(rowIndexes, cellIndexes) {
10160
- this.rowIndexes = rowIndexes;
10161
- this.cellIndexes = cellIndexes;
10162
- }
10163
- }
10164
-
10165
10648
  class TableOverlayMenuComponent {
10166
10649
  constructor(editorService, overlayService, translateService) {
10167
10650
  this.editorService = editorService;
@@ -10460,10 +10943,20 @@ class TableSelection {
10460
10943
  };
10461
10944
  const cellIndexes = {
10462
10945
  startIndex: 0,
10463
- endIndex: Math.max(...this.rowMatrix.map(x => x.cells.length))
10946
+ endIndex: Math.max(...this.rowMatrix.map(x => x.cells.length - 1))
10464
10947
  };
10465
10948
  this.selectionRange = new SelectionRangeModel(rowIndexes, cellIndexes);
10466
10949
  }
10950
+ highlightCurrentSelectionCells() {
10951
+ if (!this.selectionRange) {
10952
+ return;
10953
+ }
10954
+ for (let i = this.selectionRange.rowIndexes.startIndex; i <= this.selectionRange.rowIndexes.endIndex; i++) {
10955
+ for (let j = this.selectionRange.cellIndexes.startIndex; j <= this.selectionRange.cellIndexes.endIndex; j++) {
10956
+ this.rowMatrix[i].cells[j].highlightCell();
10957
+ }
10958
+ }
10959
+ }
10467
10960
  clearSelection() {
10468
10961
  if (!this.selectionRange) {
10469
10962
  return;
@@ -11124,8 +11617,15 @@ class NumberingHelper {
11124
11617
  paragraph.numberingData.markerTextStyle = markerTextStyle;
11125
11618
  paragraph.numberingData.width = markerSizes.width;
11126
11619
  paragraph.numberingData.height = markerSizes.height;
11127
- const indentHanging = paragraphStyle.indentHanging ? paragraphStyle.indentHanging : numberingLevel.indentHanging;
11128
- paragraph.numberingData.paddingLeft = numberingLevel.indentLeft - indentHanging;
11620
+ const indentLeft = paragraphStyle.indentLeft ? paragraphStyle.indentLeft : numberingLevel.indentLeft;
11621
+ let indent = 0;
11622
+ if (!paragraphStyle.indentHanging && !paragraphStyle.indentFirstLine) {
11623
+ indent = -numberingLevel.indentHanging;
11624
+ }
11625
+ else {
11626
+ indent = paragraphStyle.indentHanging ? -paragraphStyle.indentHanging : paragraphStyle.indentFirstLine;
11627
+ }
11628
+ paragraph.numberingData.paddingLeft = indentLeft + indent;
11129
11629
  }
11130
11630
  static getMarkerSizes(marker, markerStyle) {
11131
11631
  let width = 0;
@@ -11280,6 +11780,7 @@ class TextLineInfo {
11280
11780
  if (fields) {
11281
11781
  Object.assign(this, fields);
11282
11782
  }
11783
+ this.indentFirstLine = indent.firstLine;
11283
11784
  this.offsetMargin = offsetMargin;
11284
11785
  this.indentLeft = indent.left;
11285
11786
  const diff = contentWidth - this.width;
@@ -11497,11 +11998,6 @@ class DisplayData extends EventEmitting {
11497
11998
  });
11498
11999
  this.pagesFormat = this.pageFormatModels.map(x => new PageFormat(x, this.pagesSpace, this.customComponents));
11499
12000
  }
11500
- emitAllParagraphs() {
11501
- for (const paragraph of this.paragraphs) {
11502
- this.ParagraphInfoChanges.next(new ParagraphInfoAdded(paragraph));
11503
- }
11504
- }
11505
12001
  insertText(position, text) {
11506
12002
  const endPoint = this.insertTextAndReturnEndCursorPosition(text, position);
11507
12003
  return endPoint;
@@ -11859,6 +12355,8 @@ class DisplayData extends EventEmitting {
11859
12355
  lineSpacing: DEFAULT_PARAGRAPH_STYLE.lineSpacing,
11860
12356
  isAfterPageBreak: false,
11861
12357
  isEndedByPageBreak: false,
12358
+ markerWidth: 0,
12359
+ isNumbering: false,
11862
12360
  backgroundColor: DEFAULT_PARAGRAPH_STYLE.backgroundColor
11863
12361
  });
11864
12362
  return { splits: [], rowInfos: [defaultRowInfo] };
@@ -11967,12 +12465,14 @@ class DisplayData extends EventEmitting {
11967
12465
  displayValue,
11968
12466
  align: lineInfo.align,
11969
12467
  indentFirstLine: isFirstCharacter ? lineInfo.indent.firstLine : DEFAULT_PARAGRAPH_STYLE.indentFirstLine,
11970
- indentHanging: isFirstCharacter ? lineInfo.indent.hanging : DEFAULT_PARAGRAPH_STYLE.indentHanging,
12468
+ indentHanging: isFirstCharacter && !lineInfo.isNumbering ? lineInfo.indent.hanging : DEFAULT_PARAGRAPH_STYLE.indentHanging,
11971
12469
  indentLeft: lineInfo.indent.left,
11972
12470
  indentRight: lineInfo.indent.right,
11973
12471
  indentBefore: lineInfo.offsetBefore,
11974
12472
  indentAfter: lineInfo.offsetAfter,
11975
12473
  lineSpacing: lineInfo.lineSpacing,
12474
+ markerWidth: lineInfo.markerWidth,
12475
+ isNumbering: lineInfo.isNumbering,
11976
12476
  isPageBreak: breakType === BreakTypes.Page,
11977
12477
  isLineBreak: breakType === BreakTypes.TextWrapping,
11978
12478
  isTab: false
@@ -12096,15 +12596,17 @@ class DisplayData extends EventEmitting {
12096
12596
  displayValue,
12097
12597
  align: lineInfo.align,
12098
12598
  indentFirstLine: isFirstCharacter ? lineInfo.indent.firstLine : DEFAULT_PARAGRAPH_STYLE.indentFirstLine,
12099
- indentHanging: isFirstCharacter ? lineInfo.indent.hanging : DEFAULT_PARAGRAPH_STYLE.indentHanging,
12599
+ indentHanging: isFirstCharacter && !lineInfo.isNumbering ? lineInfo.indent.hanging : DEFAULT_PARAGRAPH_STYLE.indentHanging,
12100
12600
  indentLeft: lineInfo.indent.left,
12101
12601
  indentRight: lineInfo.indent.right,
12102
12602
  indentBefore: lineInfo.offsetBefore,
12103
12603
  indentAfter: lineInfo.offsetAfter,
12104
12604
  lineSpacing: lineInfo.lineSpacing,
12605
+ markerWidth: lineInfo.markerWidth,
12105
12606
  isPageBreak: breakType === BreakTypes.Page,
12106
12607
  isLineBreak: breakType === BreakTypes.TextWrapping,
12107
- isTab: false
12608
+ isTab: false,
12609
+ isNumbering: lineInfo.isNumbering
12108
12610
  });
12109
12611
  tokens.push(token);
12110
12612
  if (charCode !== prevCharCode ||
@@ -12175,11 +12677,13 @@ class DisplayData extends EventEmitting {
12175
12677
  displayValue: DisplayValue.emptyLine,
12176
12678
  align: lineInfo.align,
12177
12679
  indentFirstLine: lineInfo.indent.firstLine,
12178
- indentHanging: lineInfo.indent.hanging,
12680
+ indentHanging: lineInfo.isNumbering ? 0 : lineInfo.indent.hanging,
12179
12681
  indentLeft: lineInfo.indent.left,
12180
12682
  indentRight: lineInfo.indent.right,
12181
12683
  indentBefore: lineInfo.offsetBefore,
12182
12684
  indentAfter: lineInfo.offsetAfter,
12685
+ markerWidth: lineInfo.markerWidth,
12686
+ isNumbering: lineInfo.isNumbering,
12183
12687
  isPageBreak: false,
12184
12688
  isLineBreak: false,
12185
12689
  isTab: false,
@@ -12198,13 +12702,16 @@ class DisplayData extends EventEmitting {
12198
12702
  lineSpacing: DEFAULT_PARAGRAPH_STYLE.lineSpacing
12199
12703
  });
12200
12704
  }
12201
- const indentLeft = this.getParagraphIndentLeft(model, paragraph);
12202
- return this.getLineInfoModel(paragraph, indentLeft);
12705
+ const { indent, markerWidth } = this.getParagraphIndentLeft(model, paragraph);
12706
+ return this.getLineInfoModel(paragraph, indent, markerWidth);
12203
12707
  }
12204
12708
  getParagraphIndentLeft(model, paragraph) {
12205
12709
  const numberingId = paragraph.paragraphStyle.numberingId;
12206
12710
  if (numberingId === null) {
12207
- return paragraph.paragraphStyle.indentLeft;
12711
+ return {
12712
+ indent: new IndentModel(paragraph.paragraphStyle.indentFirstLine ?? DEFAULT_PARAGRAPH_STYLE.indentFirstLine, paragraph.paragraphStyle.indentHanging ?? DEFAULT_PARAGRAPH_STYLE.indentHanging, paragraph.paragraphStyle.indentLeft ?? DEFAULT_PARAGRAPH_STYLE.indentLeft, paragraph.paragraphStyle.indentRight ?? DEFAULT_PARAGRAPH_STYLE.indentRight),
12713
+ markerWidth: 0
12714
+ };
12208
12715
  }
12209
12716
  const level = paragraph.paragraphStyle.numberingLevel;
12210
12717
  const paragraphIndex = model.paragraphs.indexOf(paragraph);
@@ -12216,23 +12723,35 @@ class DisplayData extends EventEmitting {
12216
12723
  const marker = NumberingHelper.getMarker(levelModel, numberingId, model.paragraphs, paragraphIndex, this.generalProperties.numberingInfo);
12217
12724
  const markerSizes = NumberingHelper.getMarkerSizes(marker, markerTextStyle);
12218
12725
  markerWidth = markerSizes.width;
12219
- const hangingIndent = paragraph.paragraphStyle.indentHanging ? paragraph.paragraphStyle.indentHanging : levelModel.indentHanging;
12220
- let paragraphIndent = levelModel.indentLeft - hangingIndent + markerWidth + markerWidth / marker.length;
12221
- return paragraphIndent;
12726
+ let indentHanging = levelModel.indentHanging;
12727
+ let indentFirstLine = DEFAULT_PARAGRAPH_STYLE.indentFirstLine;
12728
+ if (paragraph.paragraphStyle.indentFirstLine || paragraph.paragraphStyle.indentHanging) {
12729
+ if (paragraph.paragraphStyle.indentFirstLine) {
12730
+ indentFirstLine = paragraph.paragraphStyle.indentFirstLine;
12731
+ indentHanging = 0;
12732
+ }
12733
+ else {
12734
+ indentHanging = paragraph.paragraphStyle.indentHanging ? paragraph.paragraphStyle.indentHanging : levelModel.indentHanging;
12735
+ }
12736
+ }
12737
+ const indent = new IndentModel(indentFirstLine, indentHanging, paragraph.paragraphStyle.indentLeft ? paragraph.paragraphStyle.indentLeft : levelModel.indentLeft, paragraph.paragraphStyle.indentRight ?? DEFAULT_PARAGRAPH_STYLE.indentRight);
12738
+ return { indent, markerWidth: markerWidth + markerWidth / marker.length };
12222
12739
  }
12223
12740
  getLineInfoFromTextLine(index) {
12224
12741
  const paragraph = ParagraphStyleHelper.getParagraphAtIndex(this.model.paragraphs, index);
12225
12742
  const indentLeft = this.getIndentLeftFromTextLine(index);
12226
- return this.getLineInfoModel(paragraph, indentLeft);
12743
+ const indent = new IndentModel(paragraph.paragraphStyle.indentFirstLine ?? DEFAULT_PARAGRAPH_STYLE.indentFirstLine, paragraph.paragraphStyle.indentHanging ?? DEFAULT_PARAGRAPH_STYLE.indentHanging, indentLeft ?? DEFAULT_PARAGRAPH_STYLE.indentLeft, paragraph.paragraphStyle.indentRight ?? DEFAULT_PARAGRAPH_STYLE.indentRight);
12744
+ return this.getLineInfoModel(paragraph, indent, 0);
12227
12745
  }
12228
- getLineInfoModel(paragraph, indentLeft) {
12229
- const indentHanging = paragraph.paragraphStyle.numberingId === null ? paragraph.paragraphStyle.indentHanging : 0;
12746
+ getLineInfoModel(paragraph, indent, markerWidth) {
12230
12747
  return new LineInfoModel({
12231
12748
  align: paragraph.paragraphStyle.alignment ?? DEFAULT_PARAGRAPH_STYLE.alignment,
12232
- indent: new IndentModel(paragraph.paragraphStyle.indentFirstLine ?? DEFAULT_PARAGRAPH_STYLE.indentFirstLine, indentHanging ?? DEFAULT_PARAGRAPH_STYLE.indentHanging, indentLeft ?? DEFAULT_PARAGRAPH_STYLE.indentLeft, paragraph.paragraphStyle.indentRight ?? DEFAULT_PARAGRAPH_STYLE.indentRight),
12749
+ indent,
12233
12750
  offsetBefore: DEFAULT_PARAGRAPH_STYLE.spaceBefore,
12234
12751
  offsetAfter: DEFAULT_PARAGRAPH_STYLE.spaceAfter,
12235
- lineSpacing: paragraph.paragraphStyle.lineSpacing ?? DEFAULT_PARAGRAPH_STYLE.lineSpacing
12752
+ lineSpacing: paragraph.paragraphStyle.lineSpacing ?? DEFAULT_PARAGRAPH_STYLE.lineSpacing,
12753
+ isNumbering: !!markerWidth,
12754
+ markerWidth
12236
12755
  });
12237
12756
  }
12238
12757
  getIndentLeftFromTextLine(insertIndex) {
@@ -13281,12 +13800,15 @@ class EditSession {
13281
13800
  return paragraphContent.substring(startColumn || 0, endColumn || paragraphContent.length);
13282
13801
  }
13283
13802
  isEdgeOrWithinEdge() {
13284
- return this.isEdge() || this.isWithinEdge();
13803
+ return this.isEdge() || this.isCellWithinEdge();
13285
13804
  }
13286
13805
  isEdge() {
13287
13806
  return this.type === 'edge';
13288
13807
  }
13289
- isWithinEdge() {
13808
+ isCell() {
13809
+ return this.type === 'cell' || this.type === 'cellWithinEdge';
13810
+ }
13811
+ isCellWithinEdge() {
13290
13812
  return this.type === 'cellWithinEdge';
13291
13813
  }
13292
13814
  onRendered() {
@@ -13440,7 +13962,9 @@ class EditSession {
13440
13962
  const startParagraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, startIndex).row;
13441
13963
  const endPosition = ContentHelper.documentIndexToParagraphWithOffset(this.displayData.paragraphs, endIndex);
13442
13964
  OperationsHelper.applyParagraphs(this.model, paragraphs);
13965
+ this.displayData.resetAllNumberingInfo(startParagraph);
13443
13966
  this.displayData.updateNextLineIndexes(startParagraph, endPosition.row);
13967
+ this.displayData.updateNumberingsDataOnChange(startParagraph + 1);
13444
13968
  this.applyToolbarStyles();
13445
13969
  }
13446
13970
  setTextStyle(textStyle) {
@@ -13607,6 +14131,11 @@ class EditSession {
13607
14131
  this.selection.placeCursor(endPosition);
13608
14132
  return endPosition;
13609
14133
  }
14134
+ applyTableCellsStyles(model) {
14135
+ const table = this.customComponents.tables.find(x => x.instance.insertIndex === model.insertIndex);
14136
+ OperationsHelper.applyTableCellsStyles(this.model, model);
14137
+ table.instance.updateTable();
14138
+ }
13610
14139
  removeMoveRange(moveModel) {
13611
14140
  const endIndex = moveModel.sourceStartIndex + moveModel.sourceCount - 1;
13612
14141
  const startPosition = this.displayData.indexToPosition(moveModel.sourceStartIndex, 0);
@@ -13833,11 +14362,12 @@ class GrammarChecker {
13833
14362
  constructor(grammarService) {
13834
14363
  this.grammarService = grammarService;
13835
14364
  this.ignoreKey = 'grammar-ignore';
13836
- this.paragraphSessionMap = new Map();
14365
+ this.sessionMap = new Map();
13837
14366
  this.paragraphErrorMap = new Map();
14367
+ this.checkedParagraphs = new Map();
13838
14368
  this.sessionSubscriptions = new Map();
13839
- this.sessions = [];
13840
14369
  this.ignoreList = [];
14370
+ this.visibilitySubscriptions = new Map();
13841
14371
  try {
13842
14372
  const ignoreListJson = sessionStorage.getItem(this.ignoreKey);
13843
14373
  this.ignoreList = JSON.parse(ignoreListJson) ?? [];
@@ -13845,59 +14375,43 @@ class GrammarChecker {
13845
14375
  catch {
13846
14376
  this.ignoreList = [];
13847
14377
  }
13848
- this.checkResultsSubscription = grammarService.grammarCheckResults$.subscribe(result => {
13849
- const session = this.paragraphSessionMap.get(result.paragraphId);
13850
- if (session) {
13851
- const filteredErrors = this.filterErrors(result.errors);
13852
- this.paragraphErrorMap.set(result.paragraphId, filteredErrors);
13853
- const id = +result.paragraphId.split('-')[1];
13854
- session.renderer.updateGrammarHighlights(id, filteredErrors);
13855
- }
13856
- });
14378
+ this.checkResultsSubscription = grammarService.grammarCheckResults$.subscribe(x => this.processGrammarCheckResults(x));
13857
14379
  }
13858
14380
  registerSession(session) {
13859
- if (this.sessions.some(x => x.sessionId === session.sessionId)) {
14381
+ if (this.sessionMap.has(session.sessionId)) {
13860
14382
  return;
13861
14383
  }
13862
- this.sessions.push(session);
13863
- const updateSubscription = session.session.paragraphInfoChanges$.subscribe(x => {
13864
- if (x instanceof ParagraphInfosRemoved) {
13865
- for (const id of x.ids) {
13866
- const errors = this.paragraphErrorMap.get(`${session.sessionId}-${id}`);
13867
- if (errors?.length) {
13868
- session.renderer.removeGrammarHighlights(id);
13869
- }
13870
- this.grammarService.removeParagraph(session.sessionId, id);
13871
- this.paragraphSessionMap.delete(`${session.sessionId}-${id}`);
13872
- this.paragraphErrorMap.delete(`${session.sessionId}-${id}`);
13873
- }
14384
+ this.sessionMap.set(session.sessionId, session);
14385
+ const updateSubscription = session.session.paragraphInfoChanges$.subscribe(x => this.processParagraphChange(session, x));
14386
+ this.sessionSubscriptions.set(session.sessionId, [updateSubscription]);
14387
+ this.visibilitySubscriptions.set(session.sessionId, session.renderer.ParagraphsAppeared$.subscribe(x => {
14388
+ if (session.session.editorService.isViewOnly) {
13874
14389
  return;
13875
14390
  }
13876
- this.adjustHighlights(x, session);
13877
- this.grammarService.updateParagraphContent(session.sessionId, x.paragraph);
13878
- this.paragraphSessionMap.set(`${session.sessionId}-${x.paragraph.id}`, session);
13879
- });
13880
- this.sessionSubscriptions.set(session.sessionId, [updateSubscription]);
14391
+ const filtered = x.filter(y => !this.checkedParagraphs.get(session.sessionId)?.has(y.id));
14392
+ this.grammarService.enqueueParagraphs(session.sessionId, filtered);
14393
+ }));
13881
14394
  }
13882
14395
  unregisterSession(sessionId) {
13883
- const session = this.sessions.find(x => x.sessionId === sessionId);
14396
+ const session = this.sessionMap.get(sessionId);
13884
14397
  if (!session) {
13885
14398
  return;
13886
14399
  }
13887
- this.sessions.splice(this.sessions.indexOf(session), 1);
14400
+ this.sessionMap.delete(sessionId);
13888
14401
  const subscriptions = this.sessionSubscriptions.get(sessionId);
13889
14402
  if (subscriptions?.length) {
13890
14403
  for (const subscription of subscriptions) {
13891
14404
  subscription.unsubscribe();
13892
14405
  }
13893
14406
  }
14407
+ const visibilitySubscription = this.visibilitySubscriptions.get(sessionId);
14408
+ visibilitySubscription?.unsubscribe();
14409
+ this.visibilitySubscriptions.delete(sessionId);
13894
14410
  this.sessionSubscriptions.delete(sessionId);
13895
- for (const [id, mappedSession] of this.paragraphSessionMap.entries()) {
13896
- if (mappedSession.sessionId === sessionId) {
13897
- const paragraphId = +id.split('-')[1];
13898
- this.grammarService.removeParagraph(sessionId, paragraphId);
13899
- this.paragraphSessionMap.delete(id);
13900
- }
14411
+ this.checkedParagraphs.delete(sessionId);
14412
+ for (const paragraph of session.session.displayData.paragraphs) {
14413
+ this.grammarService.removeParagraph(sessionId, paragraph.id);
14414
+ this.paragraphErrorMap.delete(`${sessionId}-${paragraph.id}`);
13901
14415
  }
13902
14416
  }
13903
14417
  getError(sessionId, paragraphId, cursorIndex) {
@@ -13912,16 +14426,13 @@ class GrammarChecker {
13912
14426
  const ignoreJson = JSON.stringify(this.ignoreList);
13913
14427
  sessionStorage.setItem(this.ignoreKey, ignoreJson);
13914
14428
  for (const [key, errors] of this.paragraphErrorMap) {
13915
- const session = this.paragraphSessionMap.get(key);
14429
+ const session = this.sessionMap.get(this.getSessionIdFromKey(key));
13916
14430
  const paragraphId = key.split('-')[1];
13917
14431
  const filteredErrors = this.filterErrors(errors);
13918
14432
  this.paragraphErrorMap.set(key, filteredErrors);
13919
14433
  session.renderer.updateGrammarHighlights(+paragraphId, filteredErrors);
13920
14434
  }
13921
14435
  }
13922
- filterErrors(grammarErrors) {
13923
- return grammarErrors.filter(x => !this.ignoreList.some(y => y.type === x.type && y.text.toLowerCase() === x.text.toLowerCase()));
13924
- }
13925
14436
  destroy() {
13926
14437
  this.checkResultsSubscription.unsubscribe();
13927
14438
  for (const subscriptions of this.sessionSubscriptions.values()) {
@@ -13930,10 +14441,45 @@ class GrammarChecker {
13930
14441
  }
13931
14442
  }
13932
14443
  this.sessionSubscriptions.clear();
13933
- this.paragraphSessionMap.clear();
13934
- this.sessions.length = 0;
14444
+ this.sessionMap.clear();
14445
+ this.checkedParagraphs.clear();
13935
14446
  this.grammarService.destroy();
13936
14447
  }
14448
+ filterErrors(grammarErrors) {
14449
+ return grammarErrors.filter(x => !this.ignoreList.some(y => y.type === x.type && y.text.toLowerCase() === x.text.toLowerCase()));
14450
+ }
14451
+ processGrammarCheckResults(result) {
14452
+ const session = this.sessionMap.get(this.getSessionIdFromKey(result.paragraphId));
14453
+ const paragraphId = +result.paragraphId.split('-')[1];
14454
+ if (session && session.session.displayData.paragraphs.some(x => x.id === paragraphId)) {
14455
+ if (this.checkedParagraphs.has(session.sessionId)) {
14456
+ this.checkedParagraphs.get(session.sessionId).add(paragraphId);
14457
+ }
14458
+ else {
14459
+ this.checkedParagraphs.set(session.sessionId, new Set([paragraphId]));
14460
+ }
14461
+ const filteredErrors = this.filterErrors(result.errors);
14462
+ this.paragraphErrorMap.set(result.paragraphId, filteredErrors);
14463
+ const id = +result.paragraphId.split('-')[1];
14464
+ session.renderer.updateGrammarHighlights(id, filteredErrors);
14465
+ }
14466
+ }
14467
+ processParagraphChange(session, change) {
14468
+ if (change instanceof ParagraphInfosRemoved) {
14469
+ for (const id of change.ids) {
14470
+ const errors = this.paragraphErrorMap.get(`${session.sessionId}-${id}`);
14471
+ if (errors?.length) {
14472
+ session.renderer.removeGrammarHighlights(id);
14473
+ }
14474
+ this.grammarService.removeParagraph(session.sessionId, id);
14475
+ this.paragraphErrorMap.delete(`${session.sessionId}-${id}`);
14476
+ this.checkedParagraphs.get(session.sessionId)?.delete(id);
14477
+ }
14478
+ return;
14479
+ }
14480
+ this.adjustHighlights(change, session);
14481
+ this.grammarService.updateParagraphContent(session.sessionId, change.paragraph);
14482
+ }
13937
14483
  adjustHighlights(changes, session) {
13938
14484
  const errors = this.paragraphErrorMap.get(`${session.sessionId}-${changes.paragraph.id}`);
13939
14485
  if (!errors?.length || changes instanceof ParagraphInfoAdded) {
@@ -13969,6 +14515,10 @@ class GrammarChecker {
13969
14515
  this.paragraphErrorMap.set(`${session.sessionId}-${changes.paragraph.id}`, newErrors);
13970
14516
  session.renderer.updateGrammarHighlights(changes.paragraph.id, newErrors);
13971
14517
  }
14518
+ getSessionIdFromKey(paragraphKey) {
14519
+ const parts = paragraphKey.split('-');
14520
+ return parts.length > 1 ? +parts[0] : null;
14521
+ }
13972
14522
  }
13973
14523
 
13974
14524
  class MainSessionSourceModel {
@@ -14114,7 +14664,9 @@ class HighlightLayer {
14114
14664
  const paragraphs = this.session.displayData.paragraphs;
14115
14665
  const visibleParagraphs = paragraphs.filter(x => x.paragraphSettings.lastScreenLine >= start && x.paragraphSettings.firstScreenLine <= end);
14116
14666
  const textLinesInfo = visibleParagraphs
14117
- .map(x => x.paragraphSettings.textLinesInfo.filter(l => start <= l.screenLine && l.screenLine <= end))
14667
+ .map(x => x.paragraphSettings.textLinesInfo
14668
+ .filter(l => start <= l.screenLine && l.screenLine <= end)
14669
+ .map(y => ({ textLinesInfo: y, paragraphSettings: x.paragraphSettings })))
14118
14670
  .flat();
14119
14671
  const paragraphInfo = PositionHelper.getParagraphInfoByRow(paragraphs, start);
14120
14672
  let top = paragraphs[paragraphInfo.paragraphIndex].paragraphSettings.distanceFromTop +
@@ -14122,12 +14674,22 @@ class HighlightLayer {
14122
14674
  this.session.scrollTop;
14123
14675
  const padding = this.session.displayData.pagesFormat[this.session.displayData.pagesFormat.length - 1].pageFormatModel.marginLeft;
14124
14676
  for (let i = 0; i < textLinesInfo.length; i++) {
14125
- const lineInfo = textLinesInfo[i];
14677
+ const lineInfo = textLinesInfo[i].textLinesInfo;
14678
+ const paragraphLineIndex = textLinesInfo[i].paragraphSettings.textLinesInfo.findIndex(x => x === textLinesInfo[i].textLinesInfo);
14126
14679
  if (i !== 0) {
14127
14680
  top += lineInfo.firstLinePageOffset;
14128
14681
  top += lineInfo.offsetBefore;
14129
14682
  }
14130
- const left = lineInfo.paddingLeft + padding + lineInfo.offsetMargin;
14683
+ let markerWidth = 0;
14684
+ const numberingOffsetLeft = textLinesInfo[i].paragraphSettings.numberingData.numberingId === null
14685
+ ? 0
14686
+ : textLinesInfo[i].paragraphSettings.numberingData.width + textLinesInfo[i].paragraphSettings.numberingData.paddingLeft;
14687
+ if (paragraphLineIndex === 0 &&
14688
+ (lineInfo.indentFirstLine ||
14689
+ (numberingOffsetLeft - lineInfo.indentLeft > 0 && numberingOffsetLeft - lineInfo.indentLeft < lineInfo.markerWidth))) {
14690
+ markerWidth = lineInfo.markerWidth ?? 0;
14691
+ }
14692
+ const left = lineInfo.paddingLeft + padding + lineInfo.offsetMargin + markerWidth;
14131
14693
  let style;
14132
14694
  if (i === 0) {
14133
14695
  const rangeInfo = this.getRangeInfo(this.session, range);
@@ -14190,13 +14752,17 @@ class GrammarHighlightLayer extends HighlightLayer {
14190
14752
  this.errorsByParagraph = new Map();
14191
14753
  }
14192
14754
  update(config) {
14193
- if (!config?.isVisible || !this.errorsByParagraph.size) {
14755
+ if (!config?.isVisible || !this.errorsByParagraph.size || this.session.editorService.isViewOnly) {
14756
+ this.element.innerHTML = '';
14194
14757
  return;
14195
14758
  }
14196
14759
  this.config = config;
14197
14760
  this.selectionIndex = 0;
14198
14761
  for (const [paragraphId, grammarErrors] of this.errorsByParagraph.entries()) {
14199
14762
  const index = this.session.displayData.paragraphs.findIndex(x => x.id === paragraphId);
14763
+ if (index < 0) {
14764
+ continue;
14765
+ }
14200
14766
  for (const error of grammarErrors) {
14201
14767
  const range = new Range(new CursorParagraph(index, error.offset), new CursorParagraph(index, error.offset + error.length)).toScreenRange(this.session);
14202
14768
  if (config.visibleRange &&
@@ -14472,6 +15038,9 @@ class SelectionLayer extends HighlightLayer {
14472
15038
  }
14473
15039
 
14474
15040
  class Renderer extends EventEmitting {
15041
+ get ParagraphsAppeared$() {
15042
+ return this.ParagraphsAppeared.asObservable();
15043
+ }
14475
15044
  constructor(parentContainer, session) {
14476
15045
  super();
14477
15046
  this.session = session;
@@ -14497,6 +15066,8 @@ class Renderer extends EventEmitting {
14497
15066
  };
14498
15067
  this.isVisible = false;
14499
15068
  this.changes = new RenderChangesModel();
15069
+ this.ParagraphsAppeared = new Subject();
15070
+ this.visibilitySubject = new Subject();
14500
15071
  this.textareaSize = {
14501
15072
  height: 1,
14502
15073
  width: 1
@@ -14515,6 +15086,9 @@ class Renderer extends EventEmitting {
14515
15086
  this.dragAndDropSelectionLayer = new SelectionLayer(this.content, 'drag-and-drop-selection', this.session);
14516
15087
  this.loop = new RenderLoop(changes => this.renderChanges(changes));
14517
15088
  this.session.displayData.addEventListener('pagesCountChanged', this.pagesCountChangedHandler);
15089
+ this.visibilitySubscription = this.visibilitySubject
15090
+ .pipe(debounceTime(3000), filter(x => x))
15091
+ .subscribe(() => this.paragraphsScrolledIntoView());
14518
15092
  }
14519
15093
  renderChanges(changes, force) {
14520
15094
  changes.apply(this.changes);
@@ -14562,6 +15136,7 @@ class Renderer extends EventEmitting {
14562
15136
  if (changes.visibilityChanged) {
14563
15137
  this.renderSearchHighlights();
14564
15138
  this.renderGrammarHighlights();
15139
+ this.visibilitySubject.next(this.isVisible);
14565
15140
  }
14566
15141
  this.session.onRendered();
14567
15142
  }
@@ -14694,6 +15269,7 @@ class Renderer extends EventEmitting {
14694
15269
  destroy() {
14695
15270
  this.session.displayData.removeEventListener('pagesCountChanged', this.pagesCountChangedHandler);
14696
15271
  this.textLayer.destroy();
15272
+ this.visibilitySubscription.unsubscribe();
14697
15273
  DomHelper.removeChildren(this.container);
14698
15274
  }
14699
15275
  renderFull() {
@@ -14750,6 +15326,14 @@ class Renderer extends EventEmitting {
14750
15326
  this.container.appendChild(this.content);
14751
15327
  }
14752
15328
  }
15329
+ paragraphsScrolledIntoView() {
15330
+ if (!this.layerConfig.visibleRange) {
15331
+ this.ParagraphsAppeared.next(this.session.displayData.paragraphs);
15332
+ return;
15333
+ }
15334
+ const paragraphs = this.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph);
15335
+ this.ParagraphsAppeared.next(paragraphs);
15336
+ }
14753
15337
  }
14754
15338
 
14755
15339
  /**
@@ -14859,6 +15443,9 @@ class VirtualRenderer {
14859
15443
  set layerConfig(val) {
14860
15444
  this.renderer.layerConfig = val;
14861
15445
  }
15446
+ get ParagraphsAppeared$() {
15447
+ return this.renderer.ParagraphsAppeared.asObservable();
15448
+ }
14862
15449
  constructor(parentContainer, mainSession, scrollBar) {
14863
15450
  this.scrollBar = scrollBar;
14864
15451
  this.changes = new RenderChangesModel();
@@ -14869,6 +15456,7 @@ class VirtualRenderer {
14869
15456
  scrollerWidth: 0,
14870
15457
  dirty: true
14871
15458
  };
15459
+ this.paragraphsScrolledIntoViewSubject = new Subject();
14872
15460
  this.container = parentContainer;
14873
15461
  this.createScroller();
14874
15462
  this.renderer = new Renderer(parentContainer, mainSession);
@@ -14876,6 +15464,9 @@ class VirtualRenderer {
14876
15464
  this.edgesLayer = new EdgesLayer(this.renderer.content, mainSession);
14877
15465
  this.scrollSubscription = this.scrollBar.scrolled$.subscribe(() => this.loop.schedule({ scroll: true }));
14878
15466
  this.createRenderLoop();
15467
+ this.paragraphsScrolledIntoViewSubscription = this.paragraphsScrolledIntoViewSubject
15468
+ .pipe(debounceTime(3000))
15469
+ .subscribe(() => this.paragraphsScrolledIntoView());
14879
15470
  }
14880
15471
  renderChanges(changes, force) {
14881
15472
  changes.apply(this.changes);
@@ -14911,6 +15502,7 @@ class VirtualRenderer {
14911
15502
  // scrolling
14912
15503
  if (changes.scroll) {
14913
15504
  this.renderScroll(changes);
15505
+ this.paragraphsScrolledIntoViewSubject.next();
14914
15506
  }
14915
15507
  if (changes.text) {
14916
15508
  this.renderText();
@@ -15093,6 +15685,7 @@ class VirtualRenderer {
15093
15685
  this.pagesLayer.destroy();
15094
15686
  this.renderer.destroy();
15095
15687
  this.scrollSubscription?.unsubscribe();
15688
+ this.paragraphsScrolledIntoViewSubscription?.unsubscribe();
15096
15689
  }
15097
15690
  computeLayerConfig() {
15098
15691
  const displayData = this.renderer.session.displayData;
@@ -15109,7 +15702,7 @@ class VirtualRenderer {
15109
15702
  }
15110
15703
  const changes = scrollChanged
15111
15704
  ? this.updateCachedSize(true, this.size.width, this.size.height)
15112
- : new RenderChangesModel({ scroll: true });
15705
+ : new RenderChangesModel({ scroll: true }); // TODO: stop triggering scroll for no reason
15113
15706
  const visibleRange = displayData.getVisibleRange(this.scrollBar.scrollTop, this.size.scrollerHeight);
15114
15707
  this.layerConfig = {
15115
15708
  width: this.renderer.textLayer.element.clientWidth,
@@ -15155,6 +15748,7 @@ class VirtualRenderer {
15155
15748
  renderFull() {
15156
15749
  this.pagesLayer.update(this.layerConfig);
15157
15750
  this.edgesLayer.update(this.layerConfig);
15751
+ this.paragraphsScrolledIntoViewSubject.next();
15158
15752
  this.renderer.renderFull();
15159
15753
  }
15160
15754
  renderText() {
@@ -15176,6 +15770,10 @@ class VirtualRenderer {
15176
15770
  renderDragAndDropSelection() {
15177
15771
  this.renderer.renderDragAndDropSelection();
15178
15772
  }
15773
+ paragraphsScrolledIntoView() {
15774
+ const paragraphs = this.renderer.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph);
15775
+ this.renderer.ParagraphsAppeared.next(paragraphs);
15776
+ }
15179
15777
  }
15180
15778
 
15181
15779
  class CustomContentService {
@@ -15262,11 +15860,13 @@ class CustomContentService {
15262
15860
  multiplier: 0,
15263
15861
  align: lineInfo.align,
15264
15862
  indentFirstLine: isFirst ? lineInfo.indent.firstLine : DEFAULT_PARAGRAPH_STYLE.indentFirstLine,
15265
- indentHanging: isFirst ? lineInfo.indent.hanging : DEFAULT_PARAGRAPH_STYLE.indentHanging,
15863
+ indentHanging: isFirst && !lineInfo.isNumbering ? lineInfo.indent.hanging : DEFAULT_PARAGRAPH_STYLE.indentHanging,
15266
15864
  indentLeft: lineInfo.indent.left,
15267
15865
  indentRight: lineInfo.indent.right,
15268
15866
  indentBefore: lineInfo.offsetBefore,
15269
15867
  indentAfter: lineInfo.offsetAfter,
15868
+ markerWidth: lineInfo.markerWidth,
15869
+ isNumbering: lineInfo.isNumbering,
15270
15870
  isPageBreak: false,
15271
15871
  isLineBreak: false,
15272
15872
  displayValue,
@@ -15335,7 +15935,6 @@ class RegulatorService {
15335
15935
  this.currentSession = this.mainSession;
15336
15936
  displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
15337
15937
  this.grammarChecker.registerSession(this.mainSession);
15338
- displayData.emitAllParagraphs();
15339
15938
  }
15340
15939
  addCellSession(table, margins, component, properties) {
15341
15940
  const sessionId = ++this.sessionIdIncrement;
@@ -15352,7 +15951,6 @@ class RegulatorService {
15352
15951
  displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
15353
15952
  newSession.renderer.updateText();
15354
15953
  this.grammarChecker.registerSession(newSession);
15355
- displayData.emitAllParagraphs();
15356
15954
  return newSession;
15357
15955
  }
15358
15956
  addEdgeSession(component) {
@@ -15367,7 +15965,6 @@ class RegulatorService {
15367
15965
  displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
15368
15966
  newSession.renderer.updateText();
15369
15967
  this.grammarChecker.registerSession(newSession);
15370
- displayData.emitAllParagraphs();
15371
15968
  return newSession;
15372
15969
  }
15373
15970
  removeSession(sessionId) {
@@ -15428,6 +16025,7 @@ class RegulatorService {
15428
16025
  this.currentSession.renderer.showCursor();
15429
16026
  this.arrangeEdgesForSessionChange(previous.session, session.session);
15430
16027
  }
16028
+ this.editorService.setIsTableSelected(session.session.isCell());
15431
16029
  }
15432
16030
  updateCursorPosition() {
15433
16031
  if (!this.currentSession.session.isEdge()) {
@@ -15578,6 +16176,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
15578
16176
  type: Injectable
15579
16177
  }] });
15580
16178
 
16179
+ class InsertOverlays {
16180
+ constructor(models = []) {
16181
+ this.componentMap = {};
16182
+ models.forEach(x => (this.componentMap[x.key] = x.component));
16183
+ }
16184
+ getComponent(key) {
16185
+ return this.componentMap[key];
16186
+ }
16187
+ }
16188
+
15581
16189
  class TabSettingModel {
15582
16190
  constructor(fields) {
15583
16191
  if (fields) {
@@ -15653,6 +16261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
15653
16261
  class EditorRulerComponent {
15654
16262
  constructor() {
15655
16263
  this.unit = input.required();
16264
+ this.disabled = input(false);
15656
16265
  this.editorService = inject(EditorService);
15657
16266
  this.dialog = inject(MatDialog);
15658
16267
  this.defaultPaddingCm = 2.5;
@@ -15745,12 +16354,16 @@ class EditorRulerComponent {
15745
16354
  window.removeEventListener('touchend', this.onUp);
15746
16355
  };
15747
16356
  this.editorService.paragraphStyle$
15748
- .pipe(takeUntilDestroyed(), distinctUntilChanged(), filter(x => !!x.tabSettings), map(x => x.tabSettings?.map(y => new TabSettingModel({ alignment: y.alignment, position: y.position })) ?? []))
16357
+ .pipe(takeUntilDestroyed(), distinctUntilChanged(), filter(x => !!x.paragraphStyle.tabSettings), map(x => x.paragraphStyle.tabSettings?.map(y => new TabSettingModel({ alignment: y.alignment, position: y.position })) ?? []))
15749
16358
  .subscribe(x => this.tabSettings.set(x));
15750
- this.editorService.paragraphStyle$.pipe(takeUntilDestroyed()).subscribe(x => {
15751
- this.firstLine.set(x.indentHanging ? -x.indentHanging : x.indentFirstLine);
15752
- this.leftIndent.set(x.indentLeft);
15753
- this.rightIndent.set(x.indentRight);
16359
+ this.editorService.paragraphStyle$.pipe(takeUntilDestroyed()).subscribe(({ paragraphStyle, numberingModel }) => {
16360
+ const numberingIndentLeft = numberingModel?.levels[paragraphStyle.numberingLevel].indentLeft ?? 0;
16361
+ const numberingIndentHanging = numberingModel?.levels[paragraphStyle.numberingLevel].indentHanging ?? 0;
16362
+ const indentLeft = paragraphStyle.indentLeft === 0 ? numberingIndentLeft : paragraphStyle.indentLeft;
16363
+ const firstLine = paragraphStyle.indentHanging ? -paragraphStyle.indentHanging : paragraphStyle.indentFirstLine;
16364
+ this.firstLine.set(firstLine === 0 ? -numberingIndentHanging : firstLine);
16365
+ this.leftIndent.set(indentLeft);
16366
+ this.rightIndent.set(paragraphStyle.indentRight);
15754
16367
  });
15755
16368
  effect(() => (this.unit() === 'inch' ? this.buildTicksInch() : this.buildTicksCm()));
15756
16369
  }
@@ -15939,11 +16552,11 @@ class EditorRulerComponent {
15939
16552
  }
15940
16553
  }
15941
16554
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15942
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: EditorRulerComponent, isStandalone: true, selector: "app-nod-editor-ruler", inputs: { unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "rulerContainer", first: true, predicate: ["rulerContainer"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"ruler-container\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div\n class=\"ruler-track\"\n (mousedown)=\"addTab($event)\"\n (touchstart)=\"addTab($event)\"\n (dblclick)=\"onOpenDialog()\">\n @for (tick of ticks; track tick) {\n <div\n class=\"tick\"\n [style.left.px]=\"tick.position\"\n [class.major]=\"tick.major\"\n [class.half]=\"tick.half\">\n @if (tick.label !== null) {\n <span class=\"label\">\n {{ tick.label }}\n </span>\n }\n </div>\n }\n </div>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"leftIndentPx()\"\n (mousedown)=\"startDrag($event, 'leftIndent')\"\n (touchstart)=\"startDrag($event, 'leftIndent')\" />\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-down\"\n class=\"paragraph-marker\"\n [style.left.px]=\"firstLinePx()\"\n (mousedown)=\"startDrag($event, 'first')\"\n (touchstart)=\"startDrag($event, 'first')\" />\n @for (tabSetting of tabSettings(); track tabSetting; let index = $index) {\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"tabSetting.position + this.leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'tabs', index)\"\n (touchstart)=\"startDrag($event, 'tabs', index)\"\n (dblclick)=\"onOpenDialog()\" />\n }\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightIndentPx()\"\n (mousedown)=\"startDrag($event, 'rightIndent')\"\n (touchstart)=\"startDrag($event, 'rightIndent')\" />\n @if (showGuide()) {\n <div\n class=\"drag-guide\"\n [style.left.px]=\"guideX()\"></div>\n }\n</div>\n", styles: [":host{display:flex;width:100%;height:22px;justify-content:center;align-items:center}.ruler-container{position:relative;height:18px;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;-webkit-user-select:none;user-select:none}.ruler-track{position:absolute;left:0;right:0;bottom:0;height:18px;overflow:hidden}.tick{position:absolute;top:50%;transform:translateY(-50%);width:1px;height:4px}.major{height:0}.half{height:8px}.label{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:10px}mat-icon{position:absolute;width:17px;height:17px;font-size:18px;font-weight:700;cursor:grab;z-index:2;transform:translate(-50%)}.drag-guide{position:absolute;height:2000px;top:10px;width:1px;z-index:9999;pointer-events:none;will-change:left}.paragraph-marker{top:-6px;z-index:2}.page-marker{bottom:-6px;z-index:2}.left-area,.right-area,.separator{position:absolute;height:18px}.separator{width:5px;transform:translate(-50%);background-color:transparent;cursor:ew-resize;z-index:2}.left-area{left:0}.right-area{right:0}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16555
+ 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, 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 [class.disabled]=\"disabled()\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div\n class=\"ruler-track\"\n (mousedown)=\"addTab($event)\"\n (touchstart)=\"addTab($event)\"\n (dblclick)=\"onOpenDialog()\">\n @for (tick of ticks; track tick) {\n <div\n class=\"tick\"\n [style.left.px]=\"tick.position\"\n [class.major]=\"tick.major\"\n [class.half]=\"tick.half\">\n @if (tick.label !== null) {\n <span class=\"label\">\n {{ tick.label }}\n </span>\n }\n </div>\n }\n </div>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"leftIndentPx()\"\n (mousedown)=\"startDrag($event, 'leftIndent')\"\n (touchstart)=\"startDrag($event, 'leftIndent')\" />\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-down\"\n class=\"paragraph-marker\"\n [style.left.px]=\"firstLinePx()\"\n (mousedown)=\"startDrag($event, 'first')\"\n (touchstart)=\"startDrag($event, 'first')\" />\n @for (tabSetting of tabSettings(); track tabSetting; let index = $index) {\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"tabSetting.position + this.leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'tabs', index)\"\n (touchstart)=\"startDrag($event, 'tabs', index)\"\n (dblclick)=\"onOpenDialog()\" />\n }\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightIndentPx()\"\n (mousedown)=\"startDrag($event, 'rightIndent')\"\n (touchstart)=\"startDrag($event, 'rightIndent')\" />\n @if (showGuide()) {\n <div\n class=\"drag-guide\"\n [style.left.px]=\"guideX()\"></div>\n }\n</div>\n", styles: [":host{display:flex;position:relative;z-index:10;width:100%;height:22px;justify-content:center;align-items:center}.disabled{pointer-events:none}.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 }); }
15943
16556
  }
15944
16557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, decorators: [{
15945
16558
  type: Component,
15946
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-ruler', imports: [MatIconModule, AsyncPipe], template: "<div\n class=\"ruler-container\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div\n class=\"ruler-track\"\n (mousedown)=\"addTab($event)\"\n (touchstart)=\"addTab($event)\"\n (dblclick)=\"onOpenDialog()\">\n @for (tick of ticks; track tick) {\n <div\n class=\"tick\"\n [style.left.px]=\"tick.position\"\n [class.major]=\"tick.major\"\n [class.half]=\"tick.half\">\n @if (tick.label !== null) {\n <span class=\"label\">\n {{ tick.label }}\n </span>\n }\n </div>\n }\n </div>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"leftIndentPx()\"\n (mousedown)=\"startDrag($event, 'leftIndent')\"\n (touchstart)=\"startDrag($event, 'leftIndent')\" />\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-down\"\n class=\"paragraph-marker\"\n [style.left.px]=\"firstLinePx()\"\n (mousedown)=\"startDrag($event, 'first')\"\n (touchstart)=\"startDrag($event, 'first')\" />\n @for (tabSetting of tabSettings(); track tabSetting; let index = $index) {\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"tabSetting.position + this.leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'tabs', index)\"\n (touchstart)=\"startDrag($event, 'tabs', index)\"\n (dblclick)=\"onOpenDialog()\" />\n }\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightIndentPx()\"\n (mousedown)=\"startDrag($event, 'rightIndent')\"\n (touchstart)=\"startDrag($event, 'rightIndent')\" />\n @if (showGuide()) {\n <div\n class=\"drag-guide\"\n [style.left.px]=\"guideX()\"></div>\n }\n</div>\n", styles: [":host{display:flex;width:100%;height:22px;justify-content:center;align-items:center}.ruler-container{position:relative;height:18px;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;-webkit-user-select:none;user-select:none}.ruler-track{position:absolute;left:0;right:0;bottom:0;height:18px;overflow:hidden}.tick{position:absolute;top:50%;transform:translateY(-50%);width:1px;height:4px}.major{height:0}.half{height:8px}.label{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:10px}mat-icon{position:absolute;width:17px;height:17px;font-size:18px;font-weight:700;cursor:grab;z-index:2;transform:translate(-50%)}.drag-guide{position:absolute;height:2000px;top:10px;width:1px;z-index:9999;pointer-events:none;will-change:left}.paragraph-marker{top:-6px;z-index:2}.page-marker{bottom:-6px;z-index:2}.left-area,.right-area,.separator{position:absolute;height:18px}.separator{width:5px;transform:translate(-50%);background-color:transparent;cursor:ew-resize;z-index:2}.left-area{left:0}.right-area{right:0}\n"] }]
16559
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-ruler', imports: [MatIconModule, AsyncPipe], template: "<div\n class=\"ruler-container\"\n [class.disabled]=\"disabled()\"\n [style.width.px]=\"pageWidth$ | async\"\n #rulerContainer>\n <div\n class=\"left-area\"\n [style.width.px]=\"leftMarginPageFormatPx()\"></div>\n <div\n class=\"right-area\"\n [style.width.px]=\"containerWidthPx - rightMarginPageFormatPx()\"></div>\n <div\n class=\"separator left-page-format\"\n [style.left.px]=\"leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'leftMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'leftMarginPageFormat')\"></div>\n <div\n class=\"separator right-page-format\"\n [style.left.px]=\"rightMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'rightMarginPageFormat')\"\n (touchstart)=\"startDrag($event, 'rightMarginPageFormat')\"></div>\n\n <div\n class=\"ruler-track\"\n (mousedown)=\"addTab($event)\"\n (touchstart)=\"addTab($event)\"\n (dblclick)=\"onOpenDialog()\">\n @for (tick of ticks; track tick) {\n <div\n class=\"tick\"\n [style.left.px]=\"tick.position\"\n [class.major]=\"tick.major\"\n [class.half]=\"tick.half\">\n @if (tick.label !== null) {\n <span class=\"label\">\n {{ tick.label }}\n </span>\n }\n </div>\n }\n </div>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"leftIndentPx()\"\n (mousedown)=\"startDrag($event, 'leftIndent')\"\n (touchstart)=\"startDrag($event, 'leftIndent')\" />\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-down\"\n class=\"paragraph-marker\"\n [style.left.px]=\"firstLinePx()\"\n (mousedown)=\"startDrag($event, 'first')\"\n (touchstart)=\"startDrag($event, 'first')\" />\n @for (tabSetting of tabSettings(); track tabSetting; let index = $index) {\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"tabSetting.position + this.leftMarginPageFormatPx()\"\n (mousedown)=\"startDrag($event, 'tabs', index)\"\n (touchstart)=\"startDrag($event, 'tabs', index)\"\n (dblclick)=\"onOpenDialog()\" />\n }\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-field-up\"\n class=\"page-marker\"\n [style.left.px]=\"rightIndentPx()\"\n (mousedown)=\"startDrag($event, 'rightIndent')\"\n (touchstart)=\"startDrag($event, 'rightIndent')\" />\n @if (showGuide()) {\n <div\n class=\"drag-guide\"\n [style.left.px]=\"guideX()\"></div>\n }\n</div>\n", styles: [":host{display:flex;position:relative;z-index:10;width:100%;height:22px;justify-content:center;align-items:center}.disabled{pointer-events:none}.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"] }]
15947
16560
  }], ctorParameters: () => [], propDecorators: { rulerContainer: [{
15948
16561
  type: ViewChild,
15949
16562
  args: ['rulerContainer', { static: true }]
@@ -15966,7 +16579,7 @@ class EditorComponent {
15966
16579
  get content() {
15967
16580
  return this._content;
15968
16581
  }
15969
- constructor(cdr, componentService, editorService, overlayService, injector, regulatorService, commandsService, clipboard) {
16582
+ constructor(cdr, componentService, editorService, overlayService, injector, regulatorService, commandsService, clipboard, insertOverlays) {
15970
16583
  this.cdr = cdr;
15971
16584
  this.componentService = componentService;
15972
16585
  this.editorService = editorService;
@@ -15975,6 +16588,7 @@ class EditorComponent {
15975
16588
  this.regulatorService = regulatorService;
15976
16589
  this.commandsService = commandsService;
15977
16590
  this.clipboard = clipboard;
16591
+ this.insertOverlays = insertOverlays;
15978
16592
  this.isMobile = false;
15979
16593
  this.externalElementTagNames = ['APP-NODER-INPUT', 'APP-NODER-SIGNATURE', 'APP-NODER-DATEPICKER'];
15980
16594
  this.rulerUnit = input.required();
@@ -15992,7 +16606,7 @@ class EditorComponent {
15992
16606
  }
15993
16607
  initEditor(content) {
15994
16608
  this.ngOnDestroy();
15995
- this.editor = new Editor(content, this.container, this.editorService, this.overlayService, this.regulatorService, this.commandsService, this.clipboard, this.externalElementTagNames, this.customPageWidth);
16609
+ this.editor = new Editor(content, this.container, this.editorService, this.overlayService, this.regulatorService, this.commandsService, this.clipboard, this.externalElementTagNames, this.insertOverlays, this.customPageWidth);
15996
16610
  this.subscriptions.push(this.toggleSidenavSubscription(), this.searchBarSubscription());
15997
16611
  }
15998
16612
  toggleSidenavSubscription() {
@@ -16040,13 +16654,13 @@ class EditorComponent {
16040
16654
  this.componentService.removeComponent(this.sidenavComponentRef);
16041
16655
  this.sidenavComponentRef = null;
16042
16656
  }
16043
- 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: OverlayService }, { token: i0.Injector }, { token: RegulatorService }, { token: CommandsService }, { token: i6$1.Clipboard }], target: i0.ɵɵFactoryTarget.Component }); }
16044
- 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: i9.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i9.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i9.MatDrawerContent, selector: "mat-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16657
+ 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: OverlayService }, { token: i0.Injector }, { token: RegulatorService }, { token: CommandsService }, { token: i6$1.Clipboard }, { token: InsertOverlays }], target: i0.ɵɵFactoryTarget.Component }); }
16658
+ 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 <div class=\"editor\">\n <app-nod-editor-ruler\n [unit]=\"rulerUnit()\"\n [disabled]=\"isViewOnly$ | async\" />\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 </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:auto hidden;position:initial}.container{display:inline-block;height:100%}.editor{display:inline-block;height:100%;min-width:100%;text-align: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", "disabled"] }, { kind: "component", type: EditorSearchBarComponent, selector: "app-nod-editor-search-bar" }, { kind: "component", type: i10.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i10.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i10.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16045
16659
  }
16046
16660
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorComponent, decorators: [{
16047
16661
  type: Component,
16048
- 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"] }]
16049
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ComponentService }, { type: EditorService }, { type: OverlayService }, { type: i0.Injector }, { type: RegulatorService }, { type: CommandsService }, { type: i6$1.Clipboard }], propDecorators: { isMobile: [{
16662
+ 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 <div class=\"editor\">\n <app-nod-editor-ruler\n [unit]=\"rulerUnit()\"\n [disabled]=\"isViewOnly$ | async\" />\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 </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:auto hidden;position:initial}.container{display:inline-block;height:100%}.editor{display:inline-block;height:100%;min-width:100%;text-align:center}.drawer-container{height:100%}.drawer-mobile{width:100%}app-nod-editor-search-bar{position:absolute;right:15px;top:0;z-index:2}\n"] }]
16663
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ComponentService }, { type: EditorService }, { type: OverlayService }, { type: i0.Injector }, { type: RegulatorService }, { type: CommandsService }, { type: i6$1.Clipboard }, { type: InsertOverlays }], propDecorators: { isMobile: [{
16050
16664
  type: Input
16051
16665
  }], externalElementTagNames: [{
16052
16666
  type: Input
@@ -16093,6 +16707,7 @@ class EditorModule {
16093
16707
  providers: [
16094
16708
  { provide: EXTERNAL_ELEMENT_SIDENAV, useValue: new ExternalSidenavModel(options?.sidenav) },
16095
16709
  { provide: EXTERNAL_ELEMENT_SERVICE, useClass: options?.elementService ?? ExternalElementService },
16710
+ { provide: InsertOverlays, useValue: new InsertOverlays(options?.insertOverlays) },
16096
16711
  { provide: ImageApiService, useClass: options?.imageApiService ?? DefaultImageApiService }
16097
16712
  ]
16098
16713
  };
@@ -16607,6 +17222,9 @@ class BaseToolbarComponent extends DestroyComponent {
16607
17222
  this.insertImage = new EventEmitter();
16608
17223
  this.insertLink = new EventEmitter();
16609
17224
  this.insertTable = new EventEmitter();
17225
+ this.updateTableBorderStyle = new EventEmitter();
17226
+ this.updateTableBorderWidth = new EventEmitter();
17227
+ this.updateTableBorders = new EventEmitter();
16610
17228
  this.elements = this.injector.get(EXTERNAL_ELEMENT_SERVICE).elements;
16611
17229
  this.customIconService.register();
16612
17230
  this.historyInfoSubscription();
@@ -16666,7 +17284,7 @@ class BaseToolbarComponent extends DestroyComponent {
16666
17284
  });
16667
17285
  }
16668
17286
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BaseToolbarComponent, deps: [{ token: CustomIconService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Directive }); }
16669
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: BaseToolbarComponent, isStandalone: true, outputs: { print: "print", redo: "redo", undo: "undo", createElement: "createElement", changeTextStyle: "changeTextStyle", changeParagraphStyle: "changeParagraphStyle", setNumberingTemplateType: "setNumberingTemplateType", removeNumberings: "removeNumberings", insertImage: "insertImage", insertLink: "insertLink", insertTable: "insertTable" }, usesInheritance: true, ngImport: i0 }); }
17287
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: BaseToolbarComponent, isStandalone: true, outputs: { print: "print", redo: "redo", undo: "undo", createElement: "createElement", changeTextStyle: "changeTextStyle", changeParagraphStyle: "changeParagraphStyle", setNumberingTemplateType: "setNumberingTemplateType", removeNumberings: "removeNumberings", insertImage: "insertImage", insertLink: "insertLink", insertTable: "insertTable", updateTableBorderStyle: "updateTableBorderStyle", updateTableBorderWidth: "updateTableBorderWidth", updateTableBorders: "updateTableBorders" }, usesInheritance: true, ngImport: i0 }); }
16670
17288
  }
16671
17289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BaseToolbarComponent, decorators: [{
16672
17290
  type: Directive
@@ -16692,6 +17310,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
16692
17310
  type: Output
16693
17311
  }], insertTable: [{
16694
17312
  type: Output
17313
+ }], updateTableBorderStyle: [{
17314
+ type: Output
17315
+ }], updateTableBorderWidth: [{
17316
+ type: Output
17317
+ }], updateTableBorders: [{
17318
+ type: Output
16695
17319
  }] } });
16696
17320
 
16697
17321
  class InsertTableComponent {
@@ -16963,6 +17587,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
16963
17587
  args: ['auto']
16964
17588
  }] } });
16965
17589
 
17590
+ class TableBordersComponent {
17591
+ constructor() {
17592
+ this.isDisabled = false;
17593
+ this.active = false;
17594
+ this.borders = Borders;
17595
+ this.updateTableBorders = new EventEmitter();
17596
+ }
17597
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBordersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17598
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TableBordersComponent, isStandalone: true, selector: "app-nod-table-borders", inputs: { isDisabled: "isDisabled" }, outputs: { updateTableBorders: "updateTableBorders" }, ngImport: i0, template: "<button\n mat-button\n [disabled]=\"isDisabled\"\n [class.active-button]=\"active\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"active = true\"\n (menuClosed)=\"active = false\"\n [matTooltip]=\"'NODER.LABEL.BORDERS' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-bottom\" />\n</button>\n<mat-menu\n #menu=\"matMenu\"\n yPosition=\"below\">\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Bottom)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-bottom\" />\n <div class=\"label\">{{ 'NODER.LABEL.BOTTOM_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Top)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-top\" />\n <div class=\"label\">{{ 'NODER.LABEL.TOP_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Left)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-left\" />\n <div class=\"label\">{{ 'NODER.LABEL.LEFT_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Right)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-right\" />\n <div class=\"label\">{{ 'NODER.LABEL.RIGHT_BORDER' | translate }}</div>\n </div>\n <mat-divider />\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Empty)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-none\" />\n <div class=\"label\">{{ 'NODER.LABEL.NO_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.All)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-all\" />\n <div class=\"label\">{{ 'NODER.LABEL.ALL_BORDERS' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Outside)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-outside\" />\n <div class=\"label\">{{ 'NODER.LABEL.OUTSIDE_BORDERS' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Inside)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-inside\" />\n <div class=\"label\">{{ 'NODER.LABEL.INSIDE_BORDERS' | translate }}</div>\n </div>\n</mat-menu>\n", styles: [":host{display:flex;align-items:center}.mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.label{font-size:14px;font-style:normal;font-weight:400;line-height:normal}.mat-divider{margin:0 8px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "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: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17599
+ }
17600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBordersComponent, decorators: [{
17601
+ type: Component,
17602
+ args: [{ selector: 'app-nod-table-borders', imports: [MatButtonModule, MatDividerModule, MatIconModule, MatMenuModule, MatTooltipModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n mat-button\n [disabled]=\"isDisabled\"\n [class.active-button]=\"active\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"active = true\"\n (menuClosed)=\"active = false\"\n [matTooltip]=\"'NODER.LABEL.BORDERS' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-bottom\" />\n</button>\n<mat-menu\n #menu=\"matMenu\"\n yPosition=\"below\">\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Bottom)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-bottom\" />\n <div class=\"label\">{{ 'NODER.LABEL.BOTTOM_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Top)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-top\" />\n <div class=\"label\">{{ 'NODER.LABEL.TOP_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Left)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-left\" />\n <div class=\"label\">{{ 'NODER.LABEL.LEFT_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Right)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-right\" />\n <div class=\"label\">{{ 'NODER.LABEL.RIGHT_BORDER' | translate }}</div>\n </div>\n <mat-divider />\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Empty)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-none\" />\n <div class=\"label\">{{ 'NODER.LABEL.NO_BORDER' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.All)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-all\" />\n <div class=\"label\">{{ 'NODER.LABEL.ALL_BORDERS' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Outside)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-outside\" />\n <div class=\"label\">{{ 'NODER.LABEL.OUTSIDE_BORDERS' | translate }}</div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorders.emit(borders.Inside)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-inside\" />\n <div class=\"label\">{{ 'NODER.LABEL.INSIDE_BORDERS' | translate }}</div>\n </div>\n</mat-menu>\n", styles: [":host{display:flex;align-items:center}.mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.label{font-size:14px;font-style:normal;font-weight:400;line-height:normal}.mat-divider{margin:0 8px}\n"] }]
17603
+ }], propDecorators: { isDisabled: [{
17604
+ type: Input
17605
+ }], updateTableBorders: [{
17606
+ type: Output
17607
+ }] } });
17608
+
17609
+ class TableBorderStyleComponent {
17610
+ constructor() {
17611
+ this.isDisabled = false;
17612
+ this.active = false;
17613
+ this.lineStyles = LineStyles;
17614
+ this.updateTableBorderStyle = new EventEmitter();
17615
+ }
17616
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderStyleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17617
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TableBorderStyleComponent, isStandalone: true, selector: "app-nod-table-border-style", inputs: { isDisabled: "isDisabled" }, outputs: { updateTableBorderStyle: "updateTableBorderStyle" }, ngImport: i0, template: "<button\n mat-button\n [disabled]=\"isDisabled\"\n [class.active-button]=\"active\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"active = true\"\n (menuClosed)=\"active = false\"\n [matTooltip]=\"'NODER.TOOLTIP.BORDER_STYLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-dash\" />\n</button>\n<mat-menu\n #menu=\"matMenu\"\n yPosition=\"below\">\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Single)\">\n <div class=\"solid-border\"></div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Dashed)\">\n <div class=\"dashed-border\"></div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Dotted)\">\n <div class=\"dotted-border\"></div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Double)\">\n <div class=\"double-border\"></div>\n </div>\n</mat-menu>\n", styles: [":host{display:flex;align-items:center}.mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.solid-border{border-bottom:1px solid}.dashed-border{border-bottom:1px dashed}.dotted-border{border-bottom:1px dotted}.double-border{border-bottom:4px double}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "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: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17618
+ }
17619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderStyleComponent, decorators: [{
17620
+ type: Component,
17621
+ args: [{ selector: 'app-nod-table-border-style', imports: [MatButtonModule, MatIconModule, MatMenuModule, MatTooltipModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n mat-button\n [disabled]=\"isDisabled\"\n [class.active-button]=\"active\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"active = true\"\n (menuClosed)=\"active = false\"\n [matTooltip]=\"'NODER.TOOLTIP.BORDER_STYLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-dash\" />\n</button>\n<mat-menu\n #menu=\"matMenu\"\n yPosition=\"below\">\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Single)\">\n <div class=\"solid-border\"></div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Dashed)\">\n <div class=\"dashed-border\"></div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Dotted)\">\n <div class=\"dotted-border\"></div>\n </div>\n <div\n mat-menu-item\n class=\"border\"\n (click)=\"updateTableBorderStyle.emit(lineStyles.Double)\">\n <div class=\"double-border\"></div>\n </div>\n</mat-menu>\n", styles: [":host{display:flex;align-items:center}.mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.solid-border{border-bottom:1px solid}.dashed-border{border-bottom:1px dashed}.dotted-border{border-bottom:1px dotted}.double-border{border-bottom:4px double}\n"] }]
17622
+ }], propDecorators: { isDisabled: [{
17623
+ type: Input
17624
+ }], updateTableBorderStyle: [{
17625
+ type: Output
17626
+ }] } });
17627
+
17628
+ class TableBorderWidthComponent {
17629
+ constructor() {
17630
+ this.isDisabled = false;
17631
+ this.active = false;
17632
+ this.widths = [0.5, 1, 1.5, 2, 3];
17633
+ this.updateTableBorderWidth = new EventEmitter();
17634
+ }
17635
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderWidthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17636
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TableBorderWidthComponent, isStandalone: true, selector: "app-nod-table-border-width", inputs: { isDisabled: "isDisabled" }, outputs: { updateTableBorderWidth: "updateTableBorderWidth" }, ngImport: i0, template: "<button\n mat-button\n [disabled]=\"isDisabled\"\n [class.active-button]=\"active\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"active = true\"\n (menuClosed)=\"active = false\"\n [matTooltip]=\"'NODER.TOOLTIP.BORDER_WIDTH' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-width\" />\n</button>\n<mat-menu\n #menu=\"matMenu\"\n yPosition=\"below\">\n @for (width of widths; track $index) {\n <div\n mat-menu-item\n class=\"border-width\"\n (click)=\"updateTableBorderWidth.emit(width)\">\n {{ width }} pt\n </div>\n }\n</mat-menu>\n", styles: [":host{display:flex;align-items:center}.mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.border-width{font-size:14px;font-style:normal;font-weight:400;line-height:normal}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "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: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17637
+ }
17638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderWidthComponent, decorators: [{
17639
+ type: Component,
17640
+ args: [{ selector: 'app-nod-table-border-width', imports: [MatButtonModule, MatIconModule, MatMenuModule, MatTooltipModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n mat-button\n [disabled]=\"isDisabled\"\n [class.active-button]=\"active\"\n [matMenuTriggerRestoreFocus]=\"false\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"active = true\"\n (menuClosed)=\"active = false\"\n [matTooltip]=\"'NODER.TOOLTIP.BORDER_WIDTH' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-border-width\" />\n</button>\n<mat-menu\n #menu=\"matMenu\"\n yPosition=\"below\">\n @for (width of widths; track $index) {\n <div\n mat-menu-item\n class=\"border-width\"\n (click)=\"updateTableBorderWidth.emit(width)\">\n {{ width }} pt\n </div>\n }\n</mat-menu>\n", styles: [":host{display:flex;align-items:center}.mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.border-width{font-size:14px;font-style:normal;font-weight:400;line-height:normal}\n"] }]
17641
+ }], propDecorators: { isDisabled: [{
17642
+ type: Input
17643
+ }], updateTableBorderWidth: [{
17644
+ type: Output
17645
+ }] } });
17646
+
16966
17647
  class ColorPickerComponent {
16967
17648
  constructor() {
16968
17649
  this.colorChange = new EventEmitter();
@@ -17203,11 +17884,11 @@ class ToolbarActionsComponent extends BaseToolbarComponent {
17203
17884
  });
17204
17885
  }
17205
17886
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CustomIconService }, { token: i0.Injector }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
17206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ToolbarActionsComponent, isStandalone: false, selector: "app-nod-toolbar-actions", viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{ isViewOnly: editorService.isViewOnly$ | async } as data\">\n <app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n <app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n <div class=\"separator\"></div>\n <app-nod-font\n [isDisabled]=\"data.isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n <div class=\"separator\"></div>\n <app-nod-font-size\n [isDisabled]=\"data.isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n <div class=\"separator\"></div>\n <app-nod-font-style\n [isDisabled]=\"data.isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n <div class=\"separator\"></div>\n <app-nod-format\n [isDisabled]=\"data.isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n <div class=\"separator\"></div>\n <app-nod-numbering\n [isDisabled]=\"data.isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n <div class=\"separator\"></div>\n <div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"data.isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"data.isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"data.isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n </div>\n <div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n <div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"data.isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n </div>\n</ng-container>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FontComponent, selector: "app-nod-font", inputs: ["isDisabled", "styles"], outputs: ["selectFont"] }, { kind: "component", type: FontSizeComponent, selector: "app-nod-font-size", inputs: ["isDisabled", "fontSize"], outputs: ["selectFontSize"] }, { kind: "component", type: InsertTableComponent, selector: "app-nod-insert-table", outputs: ["selectSizes"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i5$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FontStyleComponent, selector: "app-nod-font-style", inputs: ["isDisabled", "bold", "italic", "underline", "fontColor", "highlightColor"], outputs: ["toggleBold", "toggleItalic", "toggleUnderline", "selectFontColor", "selectHighlightColor"] }, { kind: "component", type: FormatComponent, selector: "app-nod-format", inputs: ["isDisabled", "alignment"], outputs: ["selectAlignment"] }, { kind: "component", type: NumberingComponent, selector: "app-nod-numbering", inputs: ["isDisabled", "selectedNumberingType", "selectedNumberingTemplate"], outputs: ["selectNumberingTemplate", "removeNumberings"] }, { kind: "component", type: PrintComponent, selector: "app-nod-print", outputs: ["print"] }, { kind: "component", type: UndoRedoComponent, selector: "app-nod-undo-redo", inputs: ["canUndo", "canRedo"], outputs: ["undo", "redo"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17887
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ToolbarActionsComponent, isStandalone: false, selector: "app-nod-toolbar-actions", viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FontComponent, selector: "app-nod-font", inputs: ["isDisabled", "styles"], outputs: ["selectFont"] }, { kind: "component", type: FontSizeComponent, selector: "app-nod-font-size", inputs: ["isDisabled", "fontSize"], outputs: ["selectFontSize"] }, { kind: "component", type: InsertTableComponent, selector: "app-nod-insert-table", outputs: ["selectSizes"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i5$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TableBordersComponent, selector: "app-nod-table-borders", inputs: ["isDisabled"], outputs: ["updateTableBorders"] }, { kind: "component", type: TableBorderStyleComponent, selector: "app-nod-table-border-style", inputs: ["isDisabled"], outputs: ["updateTableBorderStyle"] }, { kind: "component", type: TableBorderWidthComponent, selector: "app-nod-table-border-width", inputs: ["isDisabled"], outputs: ["updateTableBorderWidth"] }, { kind: "component", type: FontStyleComponent, selector: "app-nod-font-style", inputs: ["isDisabled", "bold", "italic", "underline", "fontColor", "highlightColor"], outputs: ["toggleBold", "toggleItalic", "toggleUnderline", "selectFontColor", "selectHighlightColor"] }, { kind: "component", type: FormatComponent, selector: "app-nod-format", inputs: ["isDisabled", "alignment"], outputs: ["selectAlignment"] }, { kind: "component", type: NumberingComponent, selector: "app-nod-numbering", inputs: ["isDisabled", "selectedNumberingType", "selectedNumberingTemplate"], outputs: ["selectNumberingTemplate", "removeNumberings"] }, { kind: "component", type: PrintComponent, selector: "app-nod-print", outputs: ["print"] }, { kind: "component", type: UndoRedoComponent, selector: "app-nod-undo-redo", inputs: ["canUndo", "canRedo"], outputs: ["undo", "redo"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17207
17888
  }
17208
17889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, decorators: [{
17209
17890
  type: Component,
17210
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-toolbar-actions', standalone: false, template: "<ng-container *ngIf=\"{ isViewOnly: editorService.isViewOnly$ | async } as data\">\n <app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n <app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n <div class=\"separator\"></div>\n <app-nod-font\n [isDisabled]=\"data.isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n <div class=\"separator\"></div>\n <app-nod-font-size\n [isDisabled]=\"data.isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n <div class=\"separator\"></div>\n <app-nod-font-style\n [isDisabled]=\"data.isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n <div class=\"separator\"></div>\n <app-nod-format\n [isDisabled]=\"data.isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n <div class=\"separator\"></div>\n <app-nod-numbering\n [isDisabled]=\"data.isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n <div class=\"separator\"></div>\n <div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"data.isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"data.isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"data.isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n </div>\n <div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n <div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"data.isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n </div>\n</ng-container>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"] }]
17891
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-toolbar-actions', standalone: false, template: "@let isViewOnly = editorService.isViewOnly$ | async;\n@let isTableSelected = editorService.isTableSelected$ | async;\n<app-nod-undo-redo\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\" />\n<app-nod-print\n class=\"hidden\"\n (print)=\"print.emit()\" />\n<div class=\"separator\"></div>\n<app-nod-font\n [isDisabled]=\"isViewOnly\"\n [styles]=\"styles\"\n (selectFont)=\"onApplyFontFamily($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-size\n [isDisabled]=\"isViewOnly\"\n [fontSize]=\"styles.fontSize\"\n (selectFontSize)=\"onApplyFontSize($event)\" />\n<div class=\"separator\"></div>\n<app-nod-font-style\n [isDisabled]=\"isViewOnly\"\n [bold]=\"styles.bold\"\n [italic]=\"styles.italic\"\n [underline]=\"styles.underline\"\n [fontColor]=\"styles.fontColor\"\n [highlightColor]=\"styles.highlightColor\"\n (selectFontColor)=\"onApplyFontColor($event)\"\n (toggleBold)=\"onApplyBold()\"\n (toggleItalic)=\"onApplyItalic()\"\n (toggleUnderline)=\"onApplyUnderline()\"\n (selectHighlightColor)=\"onApplyHighlightColor($event)\" />\n<div class=\"separator\"></div>\n<app-nod-format\n [isDisabled]=\"isViewOnly\"\n [alignment]=\"styles.alignment\"\n (selectAlignment)=\"onApplyAlignment($event)\" />\n<div class=\"separator\"></div>\n<app-nod-numbering\n [isDisabled]=\"isViewOnly\"\n [selectedNumberingType]=\"numberingType\"\n [selectedNumberingTemplate]=\"numberingTemplateType\"\n (selectNumberingTemplate)=\"onSetNumberingTemplateType($event)\"\n (removeNumberings)=\"removeNumberings.emit()\" />\n<div class=\"separator\"></div>\n<div class=\"insert-buttons\">\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-image\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertImage.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_IMAGE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-table\"\n [class.active-button]=\"showInsertTableMenu\"\n [disabled]=\"isViewOnly\"\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_TABLE' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n </button>\n <button\n mat-button\n id=\"toolbar-actions-menu-item-insert-link\"\n [disabled]=\"isViewOnly\"\n (click)=\"insertLink.emit()\"\n [matTooltip]=\"'NODER.TOOLTIP.INSERT_LINK' | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n </button>\n</div>\n@if (isTableSelected) {\n <div class=\"separator\"></div>\n <app-nod-table-borders\n [isDisabled]=\"isViewOnly\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\" />\n <app-nod-table-border-width\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\" />\n <app-nod-table-border-style\n [isDisabled]=\"isViewOnly\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n}\n<div\n *ngIf=\"elements.length\"\n class=\"separator\"></div>\n<div\n *ngIf=\"elements.length\"\n class=\"custom-elements\">\n <button\n *ngFor=\"let element of elements\"\n mat-button\n [disabled]=\"isViewOnly\"\n (click)=\"onCreateElement(element)\"\n [matTooltip]=\"element.tooltip | translate\"\n matTooltipPosition=\"below\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n </button>\n</div>\n<mat-menu\n #tableInsert=\"matMenu\"\n class=\"insert-table noder-modal\">\n <app-nod-insert-table\n *ngIf=\"showInsertTableMenu\"\n (selectSizes)=\"insertTable.emit($event)\" />\n</mat-menu>\n", styles: [":host::ng-deep mat-button-toggle,:host::ng-deep .mat-button-toggle-button{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}:host::ng-deep mat-button-toggle mat-icon,:host::ng-deep .mat-button-toggle-button mat-icon{font-size:24px;height:24px;width:24px;border-radius:4px}:host::ng-deep mat-button-toggle .mat-button-toggle-label-content,:host::ng-deep .mat-button-toggle-button .mat-button-toggle-label-content{padding:0 2px}.separator{border-left:2px solid;height:24px;margin:0 8px}.mdc-button{width:28px;height:28px;padding:0}.mat-mdc-button>.mat-icon{margin-right:0}.do-action{padding-right:1px;justify-content:center;display:flex}.custom-elements,.insert-buttons{display:flex;align-items:center;height:100%}.custom-elements .mdc-button,.insert-buttons .mdc-button{min-width:32px;min-height:32px;width:32px;height:32px;padding:0}.custom-elements .mdc-button>.mat-icon,.insert-buttons .mdc-button>.mat-icon{margin-right:0;font-size:24px;height:24px;width:24px}.hidden{display:none}\n"] }]
17211
17892
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: CustomIconService }, { type: i0.Injector }, { type: EditorService }], propDecorators: { tableInsertMenu: [{
17212
17893
  type: ViewChild,
17213
17894
  args: ['tableInsert']
@@ -17322,13 +18003,16 @@ class EditorToolbarComponent {
17322
18003
  this.setNumberingTemplateType = new EventEmitter();
17323
18004
  this.removeNumberings = new EventEmitter();
17324
18005
  this.insertTable = new EventEmitter();
18006
+ this.updateTableBorderStyle = new EventEmitter();
18007
+ this.updateTableBorderWidth = new EventEmitter();
18008
+ this.updateTableBorders = new EventEmitter();
17325
18009
  }
17326
18010
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorToolbarComponent, deps: [{ token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
17327
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: EditorToolbarComponent, isStandalone: false, selector: "app-nod-editor-toolbar", outputs: { openFileFromDisk: "openFileFromDisk", addCustomElement: "addCustomElement", saveAs: "saveAs", downloadPdf: "downloadPdf", print: "print", insertPageBreak: "insertPageBreak", createDocument: "createDocument", pageSetup: "pageSetup", insertImage: "insertImage", rename: "rename", delete: "delete", openEditMenu: "openEditMenu", redo: "redo", undo: "undo", cutSelected: "cutSelected", copySelected: "copySelected", pasteClipboardData: "pasteClipboardData", selectAll: "selectAll", removeSelected: "removeSelected", insertLink: "insertLink", createElement: "createElement", changeParagraphStyle: "changeParagraphStyle", changeTextStyle: "changeTextStyle", setNumberingTemplateType: "setNumberingTemplateType", removeNumberings: "removeNumberings", insertTable: "insertTable" }, ngImport: i0, template: "<app-nod-menu-dropdowns\n (openFileFromDisk)=\"openFileFromDisk.emit()\"\n (saveAs)=\"saveAs.emit()\"\n (downloadPdf)=\"downloadPdf.emit()\"\n (print)=\"print.emit()\"\n (insertPageBreak)=\"insertPageBreak.emit()\"\n (createDocument)=\"createDocument.emit()\"\n (pageSetup)=\"pageSetup.emit()\"\n (insertImage)=\"insertImage.emit()\"\n (rename)=\"rename.emit()\"\n (delete)=\"delete.emit()\"\n (openEditMenu)=\"openEditMenu.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (cutSelected)=\"cutSelected.emit()\"\n (copySelected)=\"copySelected.emit()\"\n (pasteClipboardData)=\"pasteClipboardData.emit()\"\n (selectAll)=\"selectAll.emit()\"\n (removeSelected)=\"removeSelected.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (insertTable)=\"insertTable.emit($event)\" />\n<app-nod-toolbar-actions\n *ngIf=\"(editorService.styles$ | async) && (editorService.isViewOnly$ | async) === false\"\n (print)=\"print.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (insertImage)=\"insertImage.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (insertTable)=\"insertTable.emit($event)\" />\n", styles: [":host ::ng-deep{display:flex;position:relative;width:100%;height:32px}app-nod-toolbar-actions{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MenuDropdownsComponent, selector: "app-nod-menu-dropdowns", inputs: ["showFile", "showEdit", "showInsert", "showLayout", "showFormat"], outputs: ["openFileFromDisk", "saveAs", "downloadPdf", "insertPageBreak", "createDocument", "pageSetup", "rename", "delete", "openEditMenu", "cutSelected", "copySelected", "pasteClipboardData", "selectAll", "removeSelected"] }, { kind: "component", type: ToolbarActionsComponent, selector: "app-nod-toolbar-actions" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18011
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: EditorToolbarComponent, isStandalone: false, selector: "app-nod-editor-toolbar", outputs: { openFileFromDisk: "openFileFromDisk", addCustomElement: "addCustomElement", saveAs: "saveAs", downloadPdf: "downloadPdf", print: "print", insertPageBreak: "insertPageBreak", createDocument: "createDocument", pageSetup: "pageSetup", insertImage: "insertImage", rename: "rename", delete: "delete", openEditMenu: "openEditMenu", redo: "redo", undo: "undo", cutSelected: "cutSelected", copySelected: "copySelected", pasteClipboardData: "pasteClipboardData", selectAll: "selectAll", removeSelected: "removeSelected", insertLink: "insertLink", createElement: "createElement", changeParagraphStyle: "changeParagraphStyle", changeTextStyle: "changeTextStyle", setNumberingTemplateType: "setNumberingTemplateType", removeNumberings: "removeNumberings", insertTable: "insertTable", updateTableBorderStyle: "updateTableBorderStyle", updateTableBorderWidth: "updateTableBorderWidth", updateTableBorders: "updateTableBorders" }, ngImport: i0, template: "<app-nod-menu-dropdowns\n (openFileFromDisk)=\"openFileFromDisk.emit()\"\n (saveAs)=\"saveAs.emit()\"\n (downloadPdf)=\"downloadPdf.emit()\"\n (print)=\"print.emit()\"\n (insertPageBreak)=\"insertPageBreak.emit()\"\n (createDocument)=\"createDocument.emit()\"\n (pageSetup)=\"pageSetup.emit()\"\n (insertImage)=\"insertImage.emit()\"\n (rename)=\"rename.emit()\"\n (delete)=\"delete.emit()\"\n (openEditMenu)=\"openEditMenu.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (cutSelected)=\"cutSelected.emit()\"\n (copySelected)=\"copySelected.emit()\"\n (pasteClipboardData)=\"pasteClipboardData.emit()\"\n (selectAll)=\"selectAll.emit()\"\n (removeSelected)=\"removeSelected.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (insertTable)=\"insertTable.emit($event)\" />\n<app-nod-toolbar-actions\n *ngIf=\"(editorService.styles$ | async) && (editorService.isViewOnly$ | async) === false\"\n (print)=\"print.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (insertImage)=\"insertImage.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (insertTable)=\"insertTable.emit($event)\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n", styles: [":host ::ng-deep{display:flex;position:relative;width:100%;height:32px}app-nod-toolbar-actions{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MenuDropdownsComponent, selector: "app-nod-menu-dropdowns", inputs: ["showFile", "showEdit", "showInsert", "showLayout", "showFormat"], outputs: ["openFileFromDisk", "saveAs", "downloadPdf", "insertPageBreak", "createDocument", "pageSetup", "rename", "delete", "openEditMenu", "cutSelected", "copySelected", "pasteClipboardData", "selectAll", "removeSelected"] }, { kind: "component", type: ToolbarActionsComponent, selector: "app-nod-toolbar-actions" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17328
18012
  }
17329
18013
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorToolbarComponent, decorators: [{
17330
18014
  type: Component,
17331
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-toolbar', standalone: false, template: "<app-nod-menu-dropdowns\n (openFileFromDisk)=\"openFileFromDisk.emit()\"\n (saveAs)=\"saveAs.emit()\"\n (downloadPdf)=\"downloadPdf.emit()\"\n (print)=\"print.emit()\"\n (insertPageBreak)=\"insertPageBreak.emit()\"\n (createDocument)=\"createDocument.emit()\"\n (pageSetup)=\"pageSetup.emit()\"\n (insertImage)=\"insertImage.emit()\"\n (rename)=\"rename.emit()\"\n (delete)=\"delete.emit()\"\n (openEditMenu)=\"openEditMenu.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (cutSelected)=\"cutSelected.emit()\"\n (copySelected)=\"copySelected.emit()\"\n (pasteClipboardData)=\"pasteClipboardData.emit()\"\n (selectAll)=\"selectAll.emit()\"\n (removeSelected)=\"removeSelected.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (insertTable)=\"insertTable.emit($event)\" />\n<app-nod-toolbar-actions\n *ngIf=\"(editorService.styles$ | async) && (editorService.isViewOnly$ | async) === false\"\n (print)=\"print.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (insertImage)=\"insertImage.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (insertTable)=\"insertTable.emit($event)\" />\n", styles: [":host ::ng-deep{display:flex;position:relative;width:100%;height:32px}app-nod-toolbar-actions{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%}\n"] }]
18015
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-editor-toolbar', standalone: false, template: "<app-nod-menu-dropdowns\n (openFileFromDisk)=\"openFileFromDisk.emit()\"\n (saveAs)=\"saveAs.emit()\"\n (downloadPdf)=\"downloadPdf.emit()\"\n (print)=\"print.emit()\"\n (insertPageBreak)=\"insertPageBreak.emit()\"\n (createDocument)=\"createDocument.emit()\"\n (pageSetup)=\"pageSetup.emit()\"\n (insertImage)=\"insertImage.emit()\"\n (rename)=\"rename.emit()\"\n (delete)=\"delete.emit()\"\n (openEditMenu)=\"openEditMenu.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (cutSelected)=\"cutSelected.emit()\"\n (copySelected)=\"copySelected.emit()\"\n (pasteClipboardData)=\"pasteClipboardData.emit()\"\n (selectAll)=\"selectAll.emit()\"\n (removeSelected)=\"removeSelected.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (insertTable)=\"insertTable.emit($event)\" />\n<app-nod-toolbar-actions\n *ngIf=\"(editorService.styles$ | async) && (editorService.isViewOnly$ | async) === false\"\n (print)=\"print.emit()\"\n (redo)=\"redo.emit()\"\n (undo)=\"undo.emit()\"\n (changeParagraphStyle)=\"changeParagraphStyle.emit($event)\"\n (changeTextStyle)=\"changeTextStyle.emit($event)\"\n (setNumberingTemplateType)=\"setNumberingTemplateType.emit($event)\"\n (removeNumberings)=\"removeNumberings.emit()\"\n (createElement)=\"createElement.emit($event)\"\n (insertImage)=\"insertImage.emit()\"\n (insertLink)=\"insertLink.emit()\"\n (insertTable)=\"insertTable.emit($event)\"\n (updateTableBorders)=\"updateTableBorders.emit($event)\"\n (updateTableBorderWidth)=\"updateTableBorderWidth.emit($event)\"\n (updateTableBorderStyle)=\"updateTableBorderStyle.emit($event)\" />\n", styles: [":host ::ng-deep{display:flex;position:relative;width:100%;height:32px}app-nod-toolbar-actions{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%}\n"] }]
17332
18016
  }], ctorParameters: () => [{ type: EditorService }], propDecorators: { openFileFromDisk: [{
17333
18017
  type: Output
17334
18018
  }], addCustomElement: [{
@@ -17381,6 +18065,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
17381
18065
  type: Output
17382
18066
  }], insertTable: [{
17383
18067
  type: Output
18068
+ }], updateTableBorderStyle: [{
18069
+ type: Output
18070
+ }], updateTableBorderWidth: [{
18071
+ type: Output
18072
+ }], updateTableBorders: [{
18073
+ type: Output
17384
18074
  }] } });
17385
18075
 
17386
18076
  class EditorToolbarService {
@@ -17672,6 +18362,9 @@ class EditorToolbarModule {
17672
18362
  MatMenuModule,
17673
18363
  MatTooltipModule,
17674
18364
  ReactiveFormsModule,
18365
+ TableBordersComponent,
18366
+ TableBorderStyleComponent,
18367
+ TableBorderWidthComponent,
17675
18368
  TextFormatMobileComponent,
17676
18369
  TranslateModule], exports: [EditorMobileToolbarComponent,
17677
18370
  EditorToolbarComponent,
@@ -17692,6 +18385,9 @@ class EditorToolbarModule {
17692
18385
  MatMenuModule,
17693
18386
  MatTooltipModule,
17694
18387
  ReactiveFormsModule,
18388
+ TableBordersComponent,
18389
+ TableBorderStyleComponent,
18390
+ TableBorderWidthComponent,
17695
18391
  TextFormatMobileComponent,
17696
18392
  TranslateModule] }); }
17697
18393
  }
@@ -17726,6 +18422,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
17726
18422
  MatMenuModule,
17727
18423
  MatTooltipModule,
17728
18424
  ReactiveFormsModule,
18425
+ TableBordersComponent,
18426
+ TableBorderStyleComponent,
18427
+ TableBorderWidthComponent,
17729
18428
  TextFormatMobileComponent,
17730
18429
  TranslateModule
17731
18430
  ],
@@ -18158,7 +18857,7 @@ class PageSetupComponent {
18158
18857
  return customPageSize;
18159
18858
  }
18160
18859
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, deps: [{ token: EditorService }, { token: ToolbarCoreService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
18161
- 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.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i12.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i12.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18860
+ 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.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i10$1.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 }); }
18162
18861
  }
18163
18862
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, decorators: [{
18164
18863
  type: Component,
@@ -18180,10 +18879,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
18180
18879
  }] } });
18181
18880
 
18182
18881
  class RevisionHelper {
18183
- static applyOperationsToRevision(revision, operations) {
18882
+ static applyOperationsToRevision(content, operations) {
18184
18883
  operations.sort((a, b) => a.createTime - b.createTime);
18185
18884
  const actions = operations.map(x => x.command);
18186
- OperationsHelper.applyOperations(revision.content, actions);
18885
+ OperationsHelper.applyOperations(content, actions);
18187
18886
  }
18188
18887
  static fillTablesDefaultStyles(tables) {
18189
18888
  for (const table of tables) {