@talrace/ngx-noder 0.0.46 → 0.0.47

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 (45) hide show
  1. package/assets/i18n/noder.en.json +11 -0
  2. package/assets/i18n/noder.es.json +11 -0
  3. package/assets/i18n/noder.ru.json +11 -0
  4. package/fesm2022/talrace-ngx-noder.mjs +738 -167
  5. package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
  6. package/lib/apart-components/editor-ruler/editor-ruler.component.d.ts +2 -1
  7. package/lib/apart-components/editor-toolbar/components/base-toolbar.component.d.ts +6 -1
  8. package/lib/apart-components/editor-toolbar/components/buttons/table-border-style/table-border-style.component.d.ts +11 -0
  9. package/lib/apart-components/editor-toolbar/components/buttons/table-border-width/table-border-width.component.d.ts +10 -0
  10. package/lib/apart-components/editor-toolbar/components/buttons/table-borders/table-borders.component.d.ts +11 -0
  11. package/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.d.ts +6 -1
  12. package/lib/apart-components/editor-toolbar/editor-toolbar.module.d.ts +6 -3
  13. package/lib/editor/components/shared/enums/borders.enum.d.ts +10 -0
  14. package/lib/editor/components/table/selection/table-selection.d.ts +1 -0
  15. package/lib/editor/content/display-data/display-data.d.ts +0 -1
  16. package/lib/editor/content/display-data/display-token.model.d.ts +2 -0
  17. package/lib/editor/content/display-data/line-info.model.d.ts +2 -0
  18. package/lib/editor/content/display-data/text-line-info.d.ts +2 -0
  19. package/lib/editor/display/renderer.d.ts +7 -0
  20. package/lib/editor/display/virtual.renderer.d.ts +4 -0
  21. package/lib/editor/execution/edit.session.d.ts +4 -1
  22. package/lib/editor/execution/editor.d.ts +8 -0
  23. package/lib/editor/execution/targeting/cell-session-source.model.d.ts +2 -2
  24. package/lib/editor/gadgets/grammar/grammar-checker.d.ts +7 -3
  25. package/lib/editor/gadgets/grammar/grammar.service.d.ts +6 -0
  26. package/lib/editor/gadgets/history/operation-history.d.ts +3 -0
  27. package/lib/editor/gadgets/history/operation.type.d.ts +2 -1
  28. package/lib/editor/interaction/editor.service.d.ts +21 -2
  29. package/lib/editor/operations/enums/command-type.enum.d.ts +2 -1
  30. package/lib/editor/operations/helpers/table-operations.helper.d.ts +13 -0
  31. package/lib/editor/operations/operations-helper.helper.d.ts +2 -0
  32. package/lib/editor/operations/save-commands.helper.d.ts +2 -0
  33. package/lib/editor/revision.helper.d.ts +1 -2
  34. package/lib/models/generated/apply-table-cells-styles.model.d.ts +6 -0
  35. package/lib/models/generated/cell-data.model.d.ts +7 -0
  36. package/lib/models/generated/command.model.d.ts +2 -0
  37. package/package.json +1 -1
  38. package/src/assets/fonts/nc-iconfont.eot +0 -0
  39. package/src/assets/fonts/nc-iconfont.scss +35 -2
  40. package/src/assets/fonts/nc-iconfont.svg +13 -2
  41. package/src/assets/fonts/nc-iconfont.ttf +0 -0
  42. package/src/assets/fonts/nc-iconfont.woff +0 -0
  43. package/src/lib/apart-components/editor-ruler/_theme.scss +4 -0
  44. package/src/lib/editor/components/_editor.theme.scss +4 -0
  45. package/src/scss/base-editor.scss +9 -11
@@ -40,6 +40,8 @@ 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';
@@ -576,6 +578,10 @@ class EditorService {
576
578
  this._removeRight$ = new Subject();
577
579
  this._resizeTableColumns$ = new Subject();
578
580
  this._insertTable$ = new Subject();
581
+ this._updateTableBorderStyle$ = new Subject();
582
+ this._updateTableBorderWidth$ = new Subject();
583
+ this._updateTableBorders$ = new Subject();
584
+ this._isTableSelected$ = new BehaviorSubject(false);
579
585
  this._redo$ = new Subject();
580
586
  this._undo$ = new Subject();
581
587
  this._print$ = new Subject();
@@ -601,7 +607,10 @@ class EditorService {
601
607
  this._leftIndentParagraph$ = new Subject();
602
608
  this._tabSettings$ = new Subject();
603
609
  this._rightIndentParagraph$ = new Subject();
604
- this._paragraphStyle$ = new BehaviorSubject(new ParagraphStyleModel());
610
+ this._paragraphStyle$ = new BehaviorSubject({
611
+ paragraphStyle: new ParagraphStyleModel(),
612
+ numberingModel: null
613
+ });
605
614
  }
606
615
  set styles(value) {
607
616
  this._styles$.next({ ...value });
@@ -747,6 +756,21 @@ class EditorService {
747
756
  get insertTable$() {
748
757
  return this._insertTable$.asObservable();
749
758
  }
759
+ get updateTableBorderStyle$() {
760
+ return this._updateTableBorderStyle$.asObservable();
761
+ }
762
+ get updateTableBorderWidth$() {
763
+ return this._updateTableBorderWidth$.asObservable();
764
+ }
765
+ get updateTableBorders$() {
766
+ return this._updateTableBorders$.asObservable();
767
+ }
768
+ get isTableSelected() {
769
+ return this._isTableSelected$.value;
770
+ }
771
+ get isTableSelected$() {
772
+ return this._isTableSelected$.asObservable();
773
+ }
750
774
  get redo$() {
751
775
  return this._redo$.asObservable();
752
776
  }
@@ -847,8 +871,8 @@ class EditorService {
847
871
  applyRightIndentParagraph(value) {
848
872
  this._rightIndentParagraph$.next(value);
849
873
  }
850
- paragraphStyle(value) {
851
- this._paragraphStyle$.next(value);
874
+ paragraphStyle(value, numbering = null) {
875
+ this._paragraphStyle$.next({ paragraphStyle: value, numberingModel: numbering });
852
876
  }
853
877
  applyRightMarginPageFormat(value) {
854
878
  this._rightMarginPageFormat$.next(value);
@@ -980,6 +1004,21 @@ class EditorService {
980
1004
  insertTable(tableData) {
981
1005
  this._insertTable$.next(tableData);
982
1006
  }
1007
+ updateTableBorderStyle(style) {
1008
+ this._updateTableBorderStyle$.next(style);
1009
+ }
1010
+ updateTableBorderWidth(width) {
1011
+ this._updateTableBorderWidth$.next(width);
1012
+ }
1013
+ updateTableBorders(borders) {
1014
+ this._updateTableBorders$.next(borders);
1015
+ }
1016
+ setIsTableSelected(value) {
1017
+ if (this.isTableSelected === value) {
1018
+ return;
1019
+ }
1020
+ this._isTableSelected$.next(value);
1021
+ }
983
1022
  undo() {
984
1023
  this._undo$.next();
985
1024
  }
@@ -1199,10 +1238,13 @@ class DefaultImageApiService {
1199
1238
  class GrammarService {
1200
1239
  constructor() {
1201
1240
  this.debounceTime = 3000;
1241
+ this.maxConcurrentRequests = 3;
1202
1242
  this.paragraphSubjects = new Map();
1203
1243
  this.debounceSubscriptions = new Map();
1204
1244
  this.grammarCheckRequests = new Subject();
1205
1245
  this.grammarCheckResults = new Subject();
1246
+ this.requestQueue = [];
1247
+ this.requestsInFlight = 0;
1206
1248
  }
1207
1249
  get grammarCheckRequests$() {
1208
1250
  return this.grammarCheckRequests.asObservable();
@@ -1218,27 +1260,44 @@ class GrammarService {
1218
1260
  subject.next(paragraph);
1219
1261
  }
1220
1262
  removeParagraph(sessionId, paragraphId) {
1221
- const subject = this.paragraphSubjects.get(`${sessionId}-${paragraphId}`);
1222
- const subscription = this.debounceSubscriptions.get(`${sessionId}-${paragraphId}`);
1263
+ const key = `${sessionId}-${paragraphId}`;
1264
+ const subject = this.paragraphSubjects.get(key);
1265
+ const subscription = this.debounceSubscriptions.get(key);
1266
+ this.requestQueue = this.requestQueue.filter(x => x.id !== key);
1223
1267
  if (subject) {
1224
1268
  subject.complete();
1225
- this.paragraphSubjects.delete(`${sessionId}-${paragraphId}`);
1269
+ this.paragraphSubjects.delete(key);
1226
1270
  }
1227
1271
  if (subscription) {
1228
1272
  subscription.unsubscribe();
1229
- this.debounceSubscriptions.delete(`${sessionId}-${paragraphId}`);
1273
+ this.debounceSubscriptions.delete(key);
1230
1274
  }
1231
1275
  }
1232
1276
  publishGrammarCheckResults(paragraphId, errors) {
1233
1277
  this.grammarCheckResults.next({ paragraphId, errors });
1278
+ this.requestsInFlight--;
1279
+ this.processQueue();
1280
+ }
1281
+ enqueueParagraphs(sessionId, paragraphs) {
1282
+ const requests = paragraphs
1283
+ .filter(x => x.content.trim().length > 0 && !this.requestQueue.some(y => y.id === `${sessionId}-${x.id}`))
1284
+ .map(x => ({ id: `${sessionId}-${x.id}`, paragraph: x.content }));
1285
+ this.requestQueue.unshift(...requests);
1286
+ this.processQueue();
1234
1287
  }
1235
1288
  destroy() {
1236
- this.paragraphSubjects.forEach(subject => subject.complete());
1289
+ for (const [, subject] of this.paragraphSubjects) {
1290
+ subject.complete();
1291
+ }
1237
1292
  this.paragraphSubjects.clear();
1238
- this.debounceSubscriptions.forEach(subscription => subscription.unsubscribe());
1293
+ for (const [, subscription] of this.debounceSubscriptions) {
1294
+ subscription.unsubscribe();
1295
+ }
1239
1296
  this.debounceSubscriptions.clear();
1240
1297
  this.grammarCheckRequests.complete();
1241
1298
  this.grammarCheckResults.complete();
1299
+ this.requestQueue = [];
1300
+ this.requestsInFlight = 0;
1242
1301
  }
1243
1302
  registerParagraph(sessionId, paragraph) {
1244
1303
  if (this.paragraphSubjects.has(`${sessionId}-${paragraph.id}`)) {
@@ -1248,9 +1307,22 @@ class GrammarService {
1248
1307
  this.paragraphSubjects.set(`${sessionId}-${paragraph.id}`, subject);
1249
1308
  const subscription = subject
1250
1309
  .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 }));
1310
+ .subscribe(x => this.enqueueGrammarCheck(`${sessionId}-${x.id}`, x.content));
1252
1311
  this.debounceSubscriptions.set(`${sessionId}-${paragraph.id}`, subscription);
1253
1312
  }
1313
+ enqueueGrammarCheck(id, paragraph) {
1314
+ this.requestQueue = this.requestQueue.filter(x => x.id !== id);
1315
+ const request = { id, paragraph };
1316
+ this.requestQueue.unshift(request);
1317
+ this.processQueue();
1318
+ }
1319
+ processQueue() {
1320
+ while (this.requestsInFlight <= this.maxConcurrentRequests && this.requestQueue.length > 0) {
1321
+ const request = this.requestQueue.shift();
1322
+ this.requestsInFlight++;
1323
+ this.grammarCheckRequests.next(request);
1324
+ }
1325
+ }
1254
1326
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GrammarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1255
1327
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GrammarService, providedIn: 'root' }); }
1256
1328
  }
@@ -1300,6 +1372,7 @@ var CommandType;
1300
1372
  CommandType[CommandType["RemoveInsertedPageFormat"] = 34] = "RemoveInsertedPageFormat";
1301
1373
  CommandType[CommandType["RestorePageFormats"] = 35] = "RestorePageFormats";
1302
1374
  CommandType[CommandType["ApplyParagraphs"] = 36] = "ApplyParagraphs";
1375
+ CommandType[CommandType["ApplyTableCellsStyles"] = 37] = "ApplyTableCellsStyles";
1303
1376
  })(CommandType || (CommandType = {}));
1304
1377
 
1305
1378
  class PageNumbersModel {
@@ -1378,6 +1451,14 @@ class ApplyParagraphStyleModel {
1378
1451
  }
1379
1452
  }
1380
1453
 
1454
+ class ApplyTableCellsStylesModel {
1455
+ constructor(fields) {
1456
+ if (fields) {
1457
+ Object.assign(this, fields);
1458
+ }
1459
+ }
1460
+ }
1461
+
1381
1462
  class ApplyTextStyleModel {
1382
1463
  constructor(fields) {
1383
1464
  if (fields) {
@@ -2087,6 +2168,14 @@ class MoveRangeModel {
2087
2168
  }
2088
2169
  }
2089
2170
 
2171
+ let CellDataModel$1 = class CellDataModel {
2172
+ constructor(fields) {
2173
+ if (fields) {
2174
+ Object.assign(this, fields);
2175
+ }
2176
+ }
2177
+ };
2178
+
2090
2179
  class RemoveEdgesModel {
2091
2180
  constructor(fields) {
2092
2181
  if (fields) {
@@ -2218,6 +2307,19 @@ class OperationHistory {
2218
2307
  const undoStep = new DeleteModel({ startIndex: model.insertIndex, count });
2219
2308
  this.addToHistory(undoStep, model);
2220
2309
  }
2310
+ pushApplyTableCellsStyles(currentTable, model, targets) {
2311
+ const undoStep = new ApplyTableCellsStylesModel({
2312
+ insertIndex: model.insertIndex,
2313
+ cellsData: model.cellsData.map(x => {
2314
+ return new CellDataModel$1({
2315
+ rowIndex: x.rowIndex,
2316
+ cellIndex: x.cellIndex,
2317
+ borders: currentTable.rows[x.rowIndex].cells[x.cellIndex].borders
2318
+ });
2319
+ })
2320
+ });
2321
+ this.addToHistory(undoStep, model, null, targets);
2322
+ }
2221
2323
  pushInsertStyledText(insertIndex, text, style) {
2222
2324
  const redoStep = new InsertStyledTextModel({ insertIndex, text, textStyle: style });
2223
2325
  const undoStep = new DeleteModel({ startIndex: insertIndex, count: text.length });
@@ -4261,6 +4363,18 @@ class ParagraphOperationsHelper {
4261
4363
  }
4262
4364
  }
4263
4365
 
4366
+ var Borders;
4367
+ (function (Borders) {
4368
+ Borders[Borders["Bottom"] = 0] = "Bottom";
4369
+ Borders[Borders["Top"] = 1] = "Top";
4370
+ Borders[Borders["Left"] = 2] = "Left";
4371
+ Borders[Borders["Right"] = 3] = "Right";
4372
+ Borders[Borders["Empty"] = 4] = "Empty";
4373
+ Borders[Borders["All"] = 5] = "All";
4374
+ Borders[Borders["Outside"] = 6] = "Outside";
4375
+ Borders[Borders["Inside"] = 7] = "Inside";
4376
+ })(Borders || (Borders = {}));
4377
+
4264
4378
  class ColumnModel {
4265
4379
  constructor(fields) {
4266
4380
  if (fields) {
@@ -4269,6 +4383,55 @@ class ColumnModel {
4269
4383
  }
4270
4384
  }
4271
4385
 
4386
+ var LineStyles;
4387
+ (function (LineStyles) {
4388
+ LineStyles[LineStyles["SolidLine"] = 0] = "SolidLine";
4389
+ LineStyles[LineStyles["RoundDot"] = 1] = "RoundDot";
4390
+ LineStyles[LineStyles["SquareDot"] = 2] = "SquareDot";
4391
+ LineStyles[LineStyles["Dash"] = 3] = "Dash";
4392
+ LineStyles[LineStyles["DashDot"] = 4] = "DashDot";
4393
+ LineStyles[LineStyles["LongDash"] = 5] = "LongDash";
4394
+ LineStyles[LineStyles["LongDashDot"] = 6] = "LongDashDot";
4395
+ LineStyles[LineStyles["LongDashDotDot"] = 7] = "LongDashDotDot";
4396
+ LineStyles[LineStyles["Single"] = 8] = "Single";
4397
+ LineStyles[LineStyles["Thick"] = 9] = "Thick";
4398
+ LineStyles[LineStyles["Double"] = 10] = "Double";
4399
+ LineStyles[LineStyles["Dotted"] = 11] = "Dotted";
4400
+ LineStyles[LineStyles["Dashed"] = 12] = "Dashed";
4401
+ LineStyles[LineStyles["DotDash"] = 13] = "DotDash";
4402
+ LineStyles[LineStyles["DotDotDash"] = 14] = "DotDotDash";
4403
+ LineStyles[LineStyles["Triple"] = 15] = "Triple";
4404
+ LineStyles[LineStyles["ThinThickSmallGap"] = 16] = "ThinThickSmallGap";
4405
+ LineStyles[LineStyles["ThickThinSmallGap"] = 17] = "ThickThinSmallGap";
4406
+ LineStyles[LineStyles["ThinThickThinSmallGap"] = 18] = "ThinThickThinSmallGap";
4407
+ LineStyles[LineStyles["ThinThickMediumGap"] = 19] = "ThinThickMediumGap";
4408
+ LineStyles[LineStyles["ThickThinMediumGap"] = 20] = "ThickThinMediumGap";
4409
+ LineStyles[LineStyles["ThinThickThinMediumGap"] = 21] = "ThinThickThinMediumGap";
4410
+ LineStyles[LineStyles["ThinThickLargeGap"] = 22] = "ThinThickLargeGap";
4411
+ LineStyles[LineStyles["ThickThinLargeGap"] = 23] = "ThickThinLargeGap";
4412
+ LineStyles[LineStyles["ThinThickThinLargeGap"] = 24] = "ThinThickThinLargeGap";
4413
+ LineStyles[LineStyles["Wave"] = 25] = "Wave";
4414
+ LineStyles[LineStyles["DoubleWave"] = 26] = "DoubleWave";
4415
+ LineStyles[LineStyles["DashSmallGap"] = 27] = "DashSmallGap";
4416
+ LineStyles[LineStyles["DashDotStroked"] = 28] = "DashDotStroked";
4417
+ LineStyles[LineStyles["ThreeDEmboss"] = 29] = "ThreeDEmboss";
4418
+ LineStyles[LineStyles["ThreeDEngrave"] = 30] = "ThreeDEngrave";
4419
+ LineStyles[LineStyles["Outset"] = 31] = "Outset";
4420
+ LineStyles[LineStyles["Inset"] = 32] = "Inset";
4421
+ LineStyles[LineStyles["Nil"] = 33] = "Nil";
4422
+ })(LineStyles || (LineStyles = {}));
4423
+
4424
+ var Positions;
4425
+ (function (Positions) {
4426
+ Positions[Positions["Top"] = 0] = "Top";
4427
+ Positions[Positions["Right"] = 1] = "Right";
4428
+ Positions[Positions["Bottom"] = 2] = "Bottom";
4429
+ Positions[Positions["Left"] = 3] = "Left";
4430
+ Positions[Positions["All"] = 4] = "All";
4431
+ Positions[Positions["InsideHorizontal"] = 5] = "InsideHorizontal";
4432
+ Positions[Positions["InsideVertical"] = 6] = "InsideVertical";
4433
+ })(Positions || (Positions = {}));
4434
+
4272
4435
  var ResizerSide;
4273
4436
  (function (ResizerSide) {
4274
4437
  ResizerSide[ResizerSide["Left"] = 0] = "Left";
@@ -4285,6 +4448,13 @@ class RowModel {
4285
4448
  }
4286
4449
  }
4287
4450
 
4451
+ class SelectionRangeModel {
4452
+ constructor(rowIndexes, cellIndexes) {
4453
+ this.rowIndexes = rowIndexes;
4454
+ this.cellIndexes = cellIndexes;
4455
+ }
4456
+ }
4457
+
4288
4458
  var VerticalMerge;
4289
4459
  (function (VerticalMerge) {
4290
4460
  VerticalMerge["Restart"] = "restart";
@@ -4637,6 +4807,206 @@ class TableOperationsHelper {
4637
4807
  }
4638
4808
  });
4639
4809
  }
4810
+ static applyTableCellsStyles(tables, insertIndex, cellData) {
4811
+ const table = tables.find(x => x.insertIndex === insertIndex);
4812
+ for (const cellDataItem of cellData) {
4813
+ if (cellDataItem.rowIndex < 0 || cellDataItem.rowIndex >= table.rows.length) {
4814
+ continue;
4815
+ }
4816
+ if (cellDataItem.cellIndex < 0 || cellDataItem.cellIndex >= table.rows[cellDataItem.rowIndex].cells.length) {
4817
+ continue;
4818
+ }
4819
+ table.rows[cellDataItem.rowIndex].cells[cellDataItem.cellIndex].borders = cellDataItem.borders?.length
4820
+ ? cellDataItem.borders
4821
+ : null;
4822
+ }
4823
+ }
4824
+ static getApplyTableCellsBordersStyle(style, table, selection) {
4825
+ const cellsMap = this.getApplyBordersStylesCells(table, selection, [
4826
+ Positions.Top,
4827
+ Positions.Bottom,
4828
+ Positions.Right,
4829
+ Positions.Left
4830
+ ]);
4831
+ if (!cellsMap.size) {
4832
+ return null;
4833
+ }
4834
+ return new ApplyTableCellsStylesModel({
4835
+ cellsData: this.getCellDataFromBorderCells(cellsMap, new BordersStyleModel({ lineStyle: style })),
4836
+ insertIndex: table.insertIndex
4837
+ });
4838
+ }
4839
+ static getApplyTableCellsBordersWidth(width, table, selection) {
4840
+ const cellsMap = this.getApplyBordersStylesCells(table, selection, [
4841
+ Positions.Top,
4842
+ Positions.Bottom,
4843
+ Positions.Right,
4844
+ Positions.Left
4845
+ ]);
4846
+ if (!cellsMap.size) {
4847
+ return null;
4848
+ }
4849
+ return new ApplyTableCellsStylesModel({
4850
+ cellsData: this.getCellDataFromBorderCells(cellsMap, new BordersStyleModel({ width })),
4851
+ insertIndex: table.insertIndex
4852
+ });
4853
+ }
4854
+ static getApplyTableCellsBorders(border, table, selection) {
4855
+ let cellsMap = new Map();
4856
+ let targetBorderStyle = new BordersStyleModel({ lineStyle: LineStyles.Single });
4857
+ switch (border) {
4858
+ case Borders.Top:
4859
+ // Upper border - only for the top row and their upper neighbors
4860
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.startIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Top]);
4861
+ break;
4862
+ case Borders.Bottom:
4863
+ // The bottom border is only for the bottom row and their lower neighbors
4864
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.endIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Bottom]);
4865
+ break;
4866
+ case Borders.Left:
4867
+ // Left border - only for the left column and its left neighbors
4868
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.startIndex }), [Positions.Left]);
4869
+ break;
4870
+ case Borders.Right:
4871
+ // Right border - only for the right column and its right neighbors
4872
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: selection.cellIndexes.endIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Right]);
4873
+ break;
4874
+ case Borders.All:
4875
+ // Add all borders from the selected cells
4876
+ cellsMap = this.getApplyBordersStylesCells(table, selection, [
4877
+ Positions.Top,
4878
+ Positions.Bottom,
4879
+ Positions.Right,
4880
+ Positions.Left
4881
+ ]);
4882
+ break;
4883
+ case Borders.Outside: {
4884
+ // Outer borders - combination of Top, Bottom, Left, Right
4885
+ cellsMap = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.startIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Top]);
4886
+ 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]);
4887
+ this.mergeCellStyles(cellsMap, bottomCells);
4888
+ 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]);
4889
+ this.mergeCellStyles(cellsMap, leftCells);
4890
+ 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]);
4891
+ this.mergeCellStyles(cellsMap, rightCells);
4892
+ break;
4893
+ }
4894
+ case Borders.Inside: {
4895
+ // Horizontal inner borders (between lines)
4896
+ for (let rowIndex = selection.rowIndexes.startIndex + 1; rowIndex <= selection.rowIndexes.endIndex; rowIndex++) {
4897
+ const horizontalCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: rowIndex, endIndex: rowIndex }, { startIndex: selection.cellIndexes.startIndex, endIndex: selection.cellIndexes.endIndex }), [Positions.Top]);
4898
+ this.mergeCellStyles(cellsMap, horizontalCells);
4899
+ }
4900
+ // Vertical inner borders (between columns)
4901
+ for (let cellIndex = selection.cellIndexes.startIndex + 1; cellIndex <= selection.cellIndexes.endIndex; cellIndex++) {
4902
+ const verticalCells = this.getApplyBordersStylesCells(table, new SelectionRangeModel({ startIndex: selection.rowIndexes.startIndex, endIndex: selection.rowIndexes.endIndex }, { startIndex: cellIndex, endIndex: cellIndex }), [Positions.Left]);
4903
+ this.mergeCellStyles(cellsMap, verticalCells);
4904
+ }
4905
+ break;
4906
+ }
4907
+ case Borders.Empty:
4908
+ // Remove all borders from the selected cells
4909
+ cellsMap = this.getApplyBordersStylesCells(table, selection, [
4910
+ Positions.Top,
4911
+ Positions.Bottom,
4912
+ Positions.Right,
4913
+ Positions.Left
4914
+ ]);
4915
+ targetBorderStyle = new BordersStyleModel({ lineStyle: LineStyles.Nil });
4916
+ break;
4917
+ }
4918
+ if (!cellsMap.size) {
4919
+ return null;
4920
+ }
4921
+ return new ApplyTableCellsStylesModel({
4922
+ cellsData: this.getCellDataFromBorderCells(cellsMap, targetBorderStyle),
4923
+ insertIndex: table.insertIndex
4924
+ });
4925
+ }
4926
+ static mergeCellStyles(existingCellsMap, newCellsMap) {
4927
+ for (const [key, newCell] of newCellsMap) {
4928
+ if (existingCellsMap.has(key)) {
4929
+ // Add the position to the existing cell
4930
+ const existingCell = existingCellsMap.get(key);
4931
+ const newPositions = newCell.updatePositions.filter(y => !existingCell.updatePositions.includes(y));
4932
+ existingCell.updatePositions.push(...newPositions);
4933
+ }
4934
+ else {
4935
+ existingCellsMap.set(key, { ...newCell });
4936
+ }
4937
+ }
4938
+ }
4939
+ static getApplyBordersStylesCells(table, selection, defaultPositions) {
4940
+ const result = new Map();
4941
+ for (let rowIndex = selection.rowIndexes.startIndex; rowIndex <= selection.rowIndexes.endIndex; rowIndex++) {
4942
+ for (let cellIndex = selection.cellIndexes.startIndex; cellIndex <= selection.cellIndexes.endIndex; cellIndex++) {
4943
+ // Upper border - add to the current cell and its upper neighbor
4944
+ if (rowIndex === selection.rowIndexes.startIndex && defaultPositions.includes(Positions.Top)) {
4945
+ this.addPositionsToCell(result, table, rowIndex - 1, cellIndex, [Positions.Bottom]);
4946
+ }
4947
+ // Bottom border - add to the current cell and its lower neighbor
4948
+ if (rowIndex === selection.rowIndexes.endIndex && defaultPositions.includes(Positions.Bottom)) {
4949
+ this.addPositionsToCell(result, table, rowIndex + 1, cellIndex, [Positions.Top]);
4950
+ }
4951
+ // Left border - add to the current cell and its left neighbor
4952
+ if (cellIndex === selection.cellIndexes.startIndex && defaultPositions.includes(Positions.Left)) {
4953
+ this.addPositionsToCell(result, table, rowIndex, cellIndex - 1, [Positions.Right]);
4954
+ }
4955
+ // Right border - add to the current cell and its right neighbor
4956
+ if (cellIndex === selection.cellIndexes.endIndex && defaultPositions.includes(Positions.Right)) {
4957
+ this.addPositionsToCell(result, table, rowIndex, cellIndex + 1, [Positions.Left]);
4958
+ }
4959
+ this.addPositionsToCell(result, table, rowIndex, cellIndex, defaultPositions);
4960
+ }
4961
+ }
4962
+ return result;
4963
+ }
4964
+ static addPositionsToCell(cellsMap, table, rowIndex, cellIndex, positions) {
4965
+ if (rowIndex < 0 || rowIndex >= table.rows.length || cellIndex < 0 || cellIndex >= table.rows[rowIndex].cells.length) {
4966
+ return;
4967
+ }
4968
+ const key = `${rowIndex},${cellIndex}`;
4969
+ const cell = table.rows[rowIndex].cells[cellIndex];
4970
+ if (cellsMap.has(key)) {
4971
+ // Combine positions if the cell already exists in the Map
4972
+ const existing = cellsMap.get(key);
4973
+ positions.forEach(x => {
4974
+ if (!existing.updatePositions.includes(x)) {
4975
+ existing.updatePositions.push(x);
4976
+ }
4977
+ });
4978
+ }
4979
+ else {
4980
+ // Add a new cell
4981
+ cellsMap.set(key, { cell, rowIndex, cellIndex, updatePositions: [...positions] });
4982
+ }
4983
+ }
4984
+ static getCellDataFromBorderCells(cellsMap, updateBorderData) {
4985
+ if (!cellsMap.size) {
4986
+ return [];
4987
+ }
4988
+ const cellsData = [];
4989
+ for (const cellData of cellsMap.values()) {
4990
+ const newBorders = [];
4991
+ const existingBorders = cellData.cell.borders ?? [];
4992
+ // Add or update borders with new data
4993
+ cellData.updatePositions.forEach(x => {
4994
+ const border = existingBorders.find(y => y.position === x) ??
4995
+ new BordersStyleModel({ position: x, lineStyle: LineStyles.Single, width: 1 });
4996
+ newBorders.push(new BordersStyleModel({ ...border, ...updateBorderData }));
4997
+ });
4998
+ // Add existing borders without updates
4999
+ existingBorders
5000
+ .filter(x => !cellData.updatePositions.includes(x.position))
5001
+ .forEach(x => newBorders.push(new BordersStyleModel({ ...x })));
5002
+ cellsData.push(new CellDataModel$1({
5003
+ rowIndex: cellData.rowIndex,
5004
+ cellIndex: cellData.cellIndex,
5005
+ borders: newBorders.length ? newBorders : null
5006
+ }));
5007
+ }
5008
+ return cellsData;
5009
+ }
4640
5010
  }
4641
5011
 
4642
5012
  class TabOperationsHelper {
@@ -4893,6 +5263,11 @@ class OperationsHelper {
4893
5263
  this.applyParagraphs(contents, model.paragraphs);
4894
5264
  break;
4895
5265
  }
5266
+ case CommandType.ApplyTableCellsStyles: {
5267
+ const model = command.applyTableCellsStyles;
5268
+ this.applyTableCellsStyles(contents, model);
5269
+ break;
5270
+ }
4896
5271
  }
4897
5272
  });
4898
5273
  }
@@ -5082,6 +5457,9 @@ class OperationsHelper {
5082
5457
  }
5083
5458
  return result;
5084
5459
  }
5460
+ static applyTableCellsStyles(document, model) {
5461
+ TableOperationsHelper.applyTableCellsStyles(document.tables, model.insertIndex, model.cellsData);
5462
+ }
5085
5463
  static insertStyledText(document, text, index, style) {
5086
5464
  document.content = ContentOperationsHelper.insertContent(document.content, text, index);
5087
5465
  FormatOperationsHelper.insertStyledContent(document.formats, index, text.length, style);
@@ -5358,9 +5736,10 @@ class PositionHelper {
5358
5736
  const paragraph = paragraphs[paragraphInfo.paragraphIndex];
5359
5737
  const paragraphTop = paragraph.paragraphSettings.distanceFromTop || 0;
5360
5738
  const linePaddingLeft = paragraph.paragraphSettings.textLinesInfo[paragraphInfo.lineIndex].paddingLeft;
5739
+ const markerWidth = paragraphInfo.lineIndex === 0 ? (paragraph.paragraphSettings.textLinesInfo[paragraphInfo.lineIndex].markerWidth ?? 0) : 0;
5361
5740
  const offsetMargin = paragraph.paragraphSettings.textLinesInfo[paragraphInfo.lineIndex].offsetMargin;
5362
5741
  return {
5363
- pageX: lineWidthToPosition + linePaddingLeft + offsetMargin,
5742
+ pageX: lineWidthToPosition + linePaddingLeft + offsetMargin + markerWidth,
5364
5743
  pageY: paragraphTop + paragraphInfo.lineTopOffset - session.scrollTop,
5365
5744
  lineHeight: paragraphInfo.lineHeight,
5366
5745
  sizeCurrent: size,
@@ -5410,7 +5789,8 @@ class PositionHelper {
5410
5789
  return { line, indexInLine: 0 };
5411
5790
  }
5412
5791
  let indexInLine = 0;
5413
- let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin;
5792
+ const markerWidth = lineIndex === 0 ? (lineInfo.markerWidth ?? 0) : 0;
5793
+ let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin - markerWidth;
5414
5794
  const wordSpacing = lineInfo.wordSpacing ?? 0;
5415
5795
  while (indexInLine < tokens.length) {
5416
5796
  const token = tokens[indexInLine];
@@ -5437,7 +5817,8 @@ class PositionHelper {
5437
5817
  return { line, indexInLine: 0 };
5438
5818
  }
5439
5819
  let indexInLine = 0;
5440
- let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin;
5820
+ const markerWidth = lineIndex === 0 ? (lineInfo.markerWidth ?? 0) : 0;
5821
+ let relativeX = xPixel - leftOffset - marginLeft - lineInfo.paddingLeft - lineInfo.offsetMargin - markerWidth;
5441
5822
  const wordSpacing = lineInfo.wordSpacing ?? 0;
5442
5823
  while (indexInLine < tokens.length) {
5443
5824
  const token = tokens[indexInLine];
@@ -5475,7 +5856,8 @@ class PositionHelper {
5475
5856
  }
5476
5857
  const textLineInfo = paragraphs[paragraphIndex].paragraphSettings.textLinesInfo[lineIndex];
5477
5858
  const wordSpacing = textLineInfo.wordSpacing ?? 0;
5478
- let width = positionWidth - textLineInfo.paddingLeft - marginLeft - textLineInfo.offsetMargin;
5859
+ const markerWidth = lineIndex === 0 ? (textLineInfo.markerWidth ?? 0) : 0;
5860
+ let width = positionWidth - textLineInfo.paddingLeft - marginLeft - textLineInfo.offsetMargin - markerWidth;
5479
5861
  while (column < tokens.length) {
5480
5862
  const token = tokens[column];
5481
5863
  if (width < token.width) {
@@ -5589,7 +5971,7 @@ class RenderingHelper {
5589
5971
  const numberingOffsetLeft = currentParagraph.numberingData.numberingId === null
5590
5972
  ? 0
5591
5973
  : currentParagraph.numberingData.width + currentParagraph.numberingData.paddingLeft;
5592
- let lineEl = RenderingHelper.createLineElement(currentParagraph.textLinesInfo[splitIndex], numberingOffsetLeft, scalingRatio);
5974
+ let lineEl = RenderingHelper.createLineElement(currentParagraph.textLinesInfo[splitIndex], numberingOffsetLeft - currentParagraph.textLinesInfo[splitIndex].markerWidth, scalingRatio);
5593
5975
  domContent.parentNode.appendChild(lineEl);
5594
5976
  const valueFragment = DomHelper.createFragment(domContent.currentElement);
5595
5977
  let isLastLineFragment = false;
@@ -6456,7 +6838,9 @@ class TextLayer {
6456
6838
  else {
6457
6839
  const numberingOffsetLeft = paragraphSettings.numberingData.numberingId === null
6458
6840
  ? 0
6459
- : paragraphSettings.numberingData.width + paragraphSettings.numberingData.paddingLeft;
6841
+ : paragraphSettings.numberingData.width +
6842
+ paragraphSettings.numberingData.paddingLeft -
6843
+ paragraphSettings.textLinesInfo[0].markerWidth;
6460
6844
  const lineInfo = paragraphSettings.textLinesInfo[0];
6461
6845
  const lastLineEl = this.renderingHelper.createLineElement(lineInfo, numberingOffsetLeft, this.session.generalProperties.scalingRatio);
6462
6846
  linesContainerElement.appendChild(lastLineEl);
@@ -6772,6 +7156,9 @@ class CommandModel {
6772
7156
  if (fields.applyParagraphStyle) {
6773
7157
  fields.applyParagraphStyle = new ApplyParagraphStyleModel(fields.applyParagraphStyle);
6774
7158
  }
7159
+ if (fields.applyTableCellsStyles) {
7160
+ fields.applyTableCellsStyles = new ApplyTableCellsStylesModel(fields.applyTableCellsStyles);
7161
+ }
6775
7162
  if (fields.applyTextStyle) {
6776
7163
  fields.applyTextStyle = new ApplyTextStyleModel(fields.applyTextStyle);
6777
7164
  }
@@ -6924,6 +7311,9 @@ class SaveCommandsHelper {
6924
7311
  static getInsertTableCommand(insertTable, targets) {
6925
7312
  return new CommandModel({ commandType: CommandType.InsertTable, insertTable, targets });
6926
7313
  }
7314
+ static getApplyTableCellsStylesCommand(applyTableCellsStyles, targets) {
7315
+ return new CommandModel({ commandType: CommandType.ApplyTableCellsStyles, applyTableCellsStyles, targets });
7316
+ }
6927
7317
  static getInsertTableColumnsCommand(columnsCount, inheritIndex, insertIndex, targetIndex, targets) {
6928
7318
  const insertTableColumns = new InsertTableColumnsModel({ count: columnsCount, inheritIndex, insertIndex, targetIndex });
6929
7319
  return new CommandModel({ commandType: CommandType.InsertTableColumns, insertTableColumns, targets });
@@ -7831,7 +8221,7 @@ class Editor {
7831
8221
  this.focus();
7832
8222
  this.session.applyToolbarStyles();
7833
8223
  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());
8224
+ 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.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
8225
  }
7836
8226
  destroy() {
7837
8227
  this.subscriptions.forEach(s => s?.unsubscribe());
@@ -8016,6 +8406,34 @@ class Editor {
8016
8406
  this.onContentChange();
8017
8407
  this.rerenderMarker();
8018
8408
  }
8409
+ applyTableCellsStyles(data, handler) {
8410
+ if (!this.session.isCell()) {
8411
+ return;
8412
+ }
8413
+ const source = this.regulatorService.getSessionModel(this.session.sessionId).source;
8414
+ const tableSession = this.regulatorService.getSession(this.regulatorService.currentSession.parentSessionId);
8415
+ const tableComponent = tableSession.customComponents.tables.find(x => x.instance.sessionId === tableSession.sessionId && x.instance.insertIndex === source.table.insertIndex)?.instance;
8416
+ if (!tableComponent) {
8417
+ return;
8418
+ }
8419
+ const selection = tableComponent.tableSelection.selectionRange
8420
+ ? tableComponent.tableSelection.selectionRange
8421
+ : new SelectionRangeModel({ startIndex: source.cellComponent.rowIndex, endIndex: source.cellComponent.rowIndex }, { startIndex: source.cellComponent.cellIndex, endIndex: source.cellComponent.cellIndex });
8422
+ const applyModel = handler(data, tableComponent.table, selection);
8423
+ if (!applyModel) {
8424
+ return;
8425
+ }
8426
+ const tableSessionModel = this.regulatorService.getSessionModel(tableSession.sessionId);
8427
+ this.saveApplyTableCellsStylesToHistory(tableComponent.table, applyModel, this.regulatorService.getTargets(tableSessionModel));
8428
+ tableSession.applyTableCellsStyles(applyModel);
8429
+ const newCellSession = tableComponent.getCellSession(source.cellComponent.rowIndex, source.cellComponent.cellIndex);
8430
+ this.regulatorService.setCustomSessionAsCurrent(newCellSession.sessionId);
8431
+ this.changedTableSize(applyModel.insertIndex, tableSession.sessionId);
8432
+ // restore table cells selection and highlight
8433
+ this.selection.disableSelection();
8434
+ tableComponent.tableSelection.selectionRange = selection;
8435
+ tableComponent.tableSelection.highlightCurrentSelectionCells();
8436
+ }
8019
8437
  replaceBy(model) {
8020
8438
  const partIndexes = ContentHelper.getSelectedPartDocumentIndexes(this.session.displayData.paragraphs, this.selection.range);
8021
8439
  model.delete = new DeleteModel({ startIndex: partIndexes.startIndex, count: partIndexes.endIndex - partIndexes.startIndex + 1 });
@@ -8378,6 +8796,11 @@ class Editor {
8378
8796
  this.session.applyParagraphs(deepCopy.paragraphs);
8379
8797
  command = SaveCommandsHelper.getApplyParagraphsCommand(deepCopy.paragraphs, this.targets);
8380
8798
  }
8799
+ else if (operation instanceof ApplyTableCellsStylesModel) {
8800
+ this.session.applyTableCellsStyles(operation);
8801
+ this.changedTableSize(operation.insertIndex, this.session.sessionId);
8802
+ command = SaveCommandsHelper.getApplyTableCellsStylesCommand(operation, this.targets);
8803
+ }
8381
8804
  else {
8382
8805
  throw new Error('Undo/redo is not implemented for the Operation');
8383
8806
  }
@@ -8435,6 +8858,10 @@ class Editor {
8435
8858
  this.history.pushInsertTable(model);
8436
8859
  this.commandsService.createCommand(SaveCommandsHelper.getInsertTableCommand(model, this.targets));
8437
8860
  }
8861
+ saveApplyTableCellsStylesToHistory(table, model, targets) {
8862
+ this.history.pushApplyTableCellsStyles(table, model, targets);
8863
+ this.commandsService.createCommand(SaveCommandsHelper.getApplyTableCellsStylesCommand(model, targets));
8864
+ }
8438
8865
  saveApplyTextStyleToHistory(startIndex, endIndex, textStyle) {
8439
8866
  const formats = FormatHelper.sliceSection(this.session.model.formats, startIndex, endIndex);
8440
8867
  const linkFormats = LinkHelper.sliceFormats(this.session.model.links, startIndex, endIndex);
@@ -8685,7 +9112,7 @@ class Editor {
8685
9112
  this.onSelectionChange();
8686
9113
  const paragraph = this.session.displayData.paragraphs[position.row];
8687
9114
  const error = this.grammarChecker.getError(this.session.sessionId, paragraph.id, position.column);
8688
- if (error && !this.overlayService.overlayRef) {
9115
+ if (!this.editorService.isViewOnly && error && !this.overlayService.overlayRef) {
8689
9116
  const target = event.target;
8690
9117
  const lineEl = target.closest('.noder-line');
8691
9118
  if (lineEl) {
@@ -8910,6 +9337,7 @@ class Editor {
8910
9337
  initMainSession() {
8911
9338
  const pageWidth = this.customPageWidth ?? Math.max(...this.model.pageFormats.map(x => x.pageWidth));
8912
9339
  this.container.nativeElement.style.maxWidth = `${pageWidth}px`;
9340
+ this.container.nativeElement.style.width = `${pageWidth}px`;
8913
9341
  const scalingRatio = this.customPageWidth ? ScalingHelper.getRatio(this.customPageWidth, pageWidth) : 1;
8914
9342
  this.editorService.setPageFormat(this.model.pageFormats[0]);
8915
9343
  this.editorService.paragraphStyle(this.model.paragraphs[0].paragraphStyle);
@@ -8925,7 +9353,9 @@ class Editor {
8925
9353
  this.editorService.setHasSelection(!this.selection.isEmpty);
8926
9354
  const position = this.mainSession.displayData.positionToIndex(this.selection.selectedRange.start);
8927
9355
  const pageFormat = this.mainSession.displayData.getPageFormatAtPosition(position);
8928
- this.editorService.paragraphStyle(this.session.model.paragraphs[this.selection.selectedRange.start.row].paragraphStyle);
9356
+ const paragraphStyle = this.session.model.paragraphs[this.selection.selectedRange.start.row].paragraphStyle;
9357
+ const numbering = this.session.generalProperties.numberings.find(x => x.numberingId === paragraphStyle.numberingId) ?? null;
9358
+ this.editorService.paragraphStyle(paragraphStyle, numbering);
8929
9359
  this.editorService.setPageFormat(pageFormat.pageFormatModel);
8930
9360
  this.rerenderMarker();
8931
9361
  }
@@ -9128,6 +9558,7 @@ class Editor {
9128
9558
  viewOnlyModeSubscription() {
9129
9559
  return this.editorService.isViewOnly$.subscribe(() => {
9130
9560
  this.selection?.clearSelection();
9561
+ this.renderer.loop.schedule({ grammar: true });
9131
9562
  });
9132
9563
  }
9133
9564
  applyLeftMarginPageFormatSubscription() {
@@ -9306,9 +9737,16 @@ class Editor {
9306
9737
  });
9307
9738
  }
9308
9739
  insertTableSubscription() {
9309
- return this.editorService.insertTable$.subscribe(data => {
9310
- this.insertTable(data);
9311
- });
9740
+ return this.editorService.insertTable$.subscribe(data => this.insertTable(data));
9741
+ }
9742
+ updateTableBorderStyleSubscription() {
9743
+ return this.editorService.updateTableBorderStyle$.subscribe(x => this.applyTableCellsStyles(x, (data, table, selection) => TableOperationsHelper.getApplyTableCellsBordersStyle(data, table, selection)));
9744
+ }
9745
+ updateTableBorderWidthSubscription() {
9746
+ return this.editorService.updateTableBorderWidth$.subscribe(x => this.applyTableCellsStyles(x, (data, table, selection) => TableOperationsHelper.getApplyTableCellsBordersWidth(data, table, selection)));
9747
+ }
9748
+ updateTableBordersSubscription() {
9749
+ return this.editorService.updateTableBorders$.subscribe(x => this.applyTableCellsStyles(x, (data, table, selection) => TableOperationsHelper.getApplyTableCellsBorders(data, table, selection)));
9312
9750
  }
9313
9751
  insertTextSubscription() {
9314
9752
  return this.editorService.insertText$.subscribe(x => {
@@ -9435,6 +9873,7 @@ class Editor {
9435
9873
  }
9436
9874
  const pageWidth = this.customPageWidth ?? Math.max(...this.model.pageFormats.map(x => x.pageWidth));
9437
9875
  this.container.nativeElement.style.maxWidth = `${pageWidth}px`;
9876
+ this.container.nativeElement.style.width = `${pageWidth}px`;
9438
9877
  const scalingRatio = this.customPageWidth ? ScalingHelper.getRatio(this.customPageWidth, pageWidth) : 1;
9439
9878
  this.model.tables.forEach(table => {
9440
9879
  this.changeColumnsWidth(table.columns, scalingRatio);
@@ -9691,8 +10130,10 @@ class DisplayTokenHelper {
9691
10130
  offsetBefore: prevToken.indentBefore,
9692
10131
  offsetAfter: prevToken.indentAfter,
9693
10132
  lineSpacing: prevToken.lineSpacing,
10133
+ markerWidth: prevToken.markerWidth,
9694
10134
  isAfterPageBreak,
9695
- isEndedByPageBreak: prevToken.isPageBreak
10135
+ isEndedByPageBreak: prevToken.isPageBreak,
10136
+ isNumbering: prevToken.isNumbering
9696
10137
  });
9697
10138
  if (firstWrapToken) {
9698
10139
  info.align = firstWrapToken.align;
@@ -9704,6 +10145,8 @@ class DisplayTokenHelper {
9704
10145
  info.offsetAfter = firstWrapToken.indentAfter;
9705
10146
  info.lineSpacing = firstWrapToken.lineSpacing;
9706
10147
  info.hasTable = firstWrapToken.isTable;
10148
+ info.isNumbering = firstWrapToken.isNumbering;
10149
+ info.markerWidth = firstWrapToken.markerWidth;
9707
10150
  }
9708
10151
  let fontSize = 0;
9709
10152
  let ascent = 0;
@@ -9947,7 +10390,7 @@ class NoderTableCellComponent {
9947
10390
  this.editorService.disableSelection();
9948
10391
  }
9949
10392
  onStartResizing(event, border) {
9950
- if (this.session.isWithinEdge() && !this.regulatorService.mainSession.session.customComponents.edges.isEdit) {
10393
+ if (this.session.isCellWithinEdge() && !this.regulatorService.mainSession.session.customComponents.edges.isEdit) {
9951
10394
  return;
9952
10395
  }
9953
10396
  event.stopPropagation();
@@ -10017,55 +10460,6 @@ class RowDataModel {
10017
10460
  }
10018
10461
  }
10019
10462
 
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
10463
  class TableCellHelper {
10070
10464
  static setCellBorders(cell, borders) {
10071
10465
  if (!borders?.length || !cell) {
@@ -10155,13 +10549,6 @@ class TableCellHelper {
10155
10549
  }
10156
10550
  }
10157
10551
 
10158
- class SelectionRangeModel {
10159
- constructor(rowIndexes, cellIndexes) {
10160
- this.rowIndexes = rowIndexes;
10161
- this.cellIndexes = cellIndexes;
10162
- }
10163
- }
10164
-
10165
10552
  class TableOverlayMenuComponent {
10166
10553
  constructor(editorService, overlayService, translateService) {
10167
10554
  this.editorService = editorService;
@@ -10460,10 +10847,20 @@ class TableSelection {
10460
10847
  };
10461
10848
  const cellIndexes = {
10462
10849
  startIndex: 0,
10463
- endIndex: Math.max(...this.rowMatrix.map(x => x.cells.length))
10850
+ endIndex: Math.max(...this.rowMatrix.map(x => x.cells.length - 1))
10464
10851
  };
10465
10852
  this.selectionRange = new SelectionRangeModel(rowIndexes, cellIndexes);
10466
10853
  }
10854
+ highlightCurrentSelectionCells() {
10855
+ if (!this.selectionRange) {
10856
+ return;
10857
+ }
10858
+ for (let i = this.selectionRange.rowIndexes.startIndex; i <= this.selectionRange.rowIndexes.endIndex; i++) {
10859
+ for (let j = this.selectionRange.cellIndexes.startIndex; j <= this.selectionRange.cellIndexes.endIndex; j++) {
10860
+ this.rowMatrix[i].cells[j].highlightCell();
10861
+ }
10862
+ }
10863
+ }
10467
10864
  clearSelection() {
10468
10865
  if (!this.selectionRange) {
10469
10866
  return;
@@ -11124,8 +11521,15 @@ class NumberingHelper {
11124
11521
  paragraph.numberingData.markerTextStyle = markerTextStyle;
11125
11522
  paragraph.numberingData.width = markerSizes.width;
11126
11523
  paragraph.numberingData.height = markerSizes.height;
11127
- const indentHanging = paragraphStyle.indentHanging ? paragraphStyle.indentHanging : numberingLevel.indentHanging;
11128
- paragraph.numberingData.paddingLeft = numberingLevel.indentLeft - indentHanging;
11524
+ const indentLeft = paragraphStyle.indentLeft ? paragraphStyle.indentLeft : numberingLevel.indentLeft;
11525
+ let indent = 0;
11526
+ if (!paragraphStyle.indentHanging && !paragraphStyle.indentFirstLine) {
11527
+ indent = -numberingLevel.indentHanging;
11528
+ }
11529
+ else {
11530
+ indent = paragraphStyle.indentHanging ? -paragraphStyle.indentHanging : paragraphStyle.indentFirstLine;
11531
+ }
11532
+ paragraph.numberingData.paddingLeft = indentLeft + indent;
11129
11533
  }
11130
11534
  static getMarkerSizes(marker, markerStyle) {
11131
11535
  let width = 0;
@@ -11497,11 +11901,6 @@ class DisplayData extends EventEmitting {
11497
11901
  });
11498
11902
  this.pagesFormat = this.pageFormatModels.map(x => new PageFormat(x, this.pagesSpace, this.customComponents));
11499
11903
  }
11500
- emitAllParagraphs() {
11501
- for (const paragraph of this.paragraphs) {
11502
- this.ParagraphInfoChanges.next(new ParagraphInfoAdded(paragraph));
11503
- }
11504
- }
11505
11904
  insertText(position, text) {
11506
11905
  const endPoint = this.insertTextAndReturnEndCursorPosition(text, position);
11507
11906
  return endPoint;
@@ -11973,6 +12372,8 @@ class DisplayData extends EventEmitting {
11973
12372
  indentBefore: lineInfo.offsetBefore,
11974
12373
  indentAfter: lineInfo.offsetAfter,
11975
12374
  lineSpacing: lineInfo.lineSpacing,
12375
+ markerWidth: lineInfo.markerWidth,
12376
+ isNumbering: lineInfo.isNumbering,
11976
12377
  isPageBreak: breakType === BreakTypes.Page,
11977
12378
  isLineBreak: breakType === BreakTypes.TextWrapping,
11978
12379
  isTab: false
@@ -12102,9 +12503,11 @@ class DisplayData extends EventEmitting {
12102
12503
  indentBefore: lineInfo.offsetBefore,
12103
12504
  indentAfter: lineInfo.offsetAfter,
12104
12505
  lineSpacing: lineInfo.lineSpacing,
12506
+ markerWidth: lineInfo.markerWidth,
12105
12507
  isPageBreak: breakType === BreakTypes.Page,
12106
12508
  isLineBreak: breakType === BreakTypes.TextWrapping,
12107
- isTab: false
12509
+ isTab: false,
12510
+ isNumbering: lineInfo.isNumbering
12108
12511
  });
12109
12512
  tokens.push(token);
12110
12513
  if (charCode !== prevCharCode ||
@@ -12180,6 +12583,8 @@ class DisplayData extends EventEmitting {
12180
12583
  indentRight: lineInfo.indent.right,
12181
12584
  indentBefore: lineInfo.offsetBefore,
12182
12585
  indentAfter: lineInfo.offsetAfter,
12586
+ markerWidth: lineInfo.markerWidth,
12587
+ isNumbering: lineInfo.isNumbering,
12183
12588
  isPageBreak: false,
12184
12589
  isLineBreak: false,
12185
12590
  isTab: false,
@@ -12198,13 +12603,16 @@ class DisplayData extends EventEmitting {
12198
12603
  lineSpacing: DEFAULT_PARAGRAPH_STYLE.lineSpacing
12199
12604
  });
12200
12605
  }
12201
- const indentLeft = this.getParagraphIndentLeft(model, paragraph);
12202
- return this.getLineInfoModel(paragraph, indentLeft);
12606
+ const { indent, markerWidth } = this.getParagraphIndentLeft(model, paragraph);
12607
+ return this.getLineInfoModel(paragraph, indent, markerWidth);
12203
12608
  }
12204
12609
  getParagraphIndentLeft(model, paragraph) {
12205
12610
  const numberingId = paragraph.paragraphStyle.numberingId;
12206
12611
  if (numberingId === null) {
12207
- return paragraph.paragraphStyle.indentLeft;
12612
+ return {
12613
+ 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),
12614
+ markerWidth: 0
12615
+ };
12208
12616
  }
12209
12617
  const level = paragraph.paragraphStyle.numberingLevel;
12210
12618
  const paragraphIndex = model.paragraphs.indexOf(paragraph);
@@ -12216,23 +12624,35 @@ class DisplayData extends EventEmitting {
12216
12624
  const marker = NumberingHelper.getMarker(levelModel, numberingId, model.paragraphs, paragraphIndex, this.generalProperties.numberingInfo);
12217
12625
  const markerSizes = NumberingHelper.getMarkerSizes(marker, markerTextStyle);
12218
12626
  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;
12627
+ let indentHanging = levelModel.indentHanging;
12628
+ let indentFirstLine = DEFAULT_PARAGRAPH_STYLE.indentFirstLine;
12629
+ if (paragraph.paragraphStyle.indentFirstLine || paragraph.paragraphStyle.indentHanging) {
12630
+ if (paragraph.paragraphStyle.indentFirstLine) {
12631
+ indentFirstLine = paragraph.paragraphStyle.indentFirstLine;
12632
+ indentHanging = 0;
12633
+ }
12634
+ else {
12635
+ indentHanging = paragraph.paragraphStyle.indentHanging ? paragraph.paragraphStyle.indentHanging : levelModel.indentHanging;
12636
+ }
12637
+ }
12638
+ const indent = new IndentModel(indentFirstLine, indentHanging, paragraph.paragraphStyle.indentLeft ? paragraph.paragraphStyle.indentLeft : levelModel.indentLeft, paragraph.paragraphStyle.indentRight ?? DEFAULT_PARAGRAPH_STYLE.indentRight);
12639
+ return { indent, markerWidth: markerWidth + markerWidth / marker.length };
12222
12640
  }
12223
12641
  getLineInfoFromTextLine(index) {
12224
12642
  const paragraph = ParagraphStyleHelper.getParagraphAtIndex(this.model.paragraphs, index);
12225
12643
  const indentLeft = this.getIndentLeftFromTextLine(index);
12226
- return this.getLineInfoModel(paragraph, indentLeft);
12644
+ 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);
12645
+ return this.getLineInfoModel(paragraph, indent, 0);
12227
12646
  }
12228
- getLineInfoModel(paragraph, indentLeft) {
12229
- const indentHanging = paragraph.paragraphStyle.numberingId === null ? paragraph.paragraphStyle.indentHanging : 0;
12647
+ getLineInfoModel(paragraph, indent, markerWidth) {
12230
12648
  return new LineInfoModel({
12231
12649
  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),
12650
+ indent,
12233
12651
  offsetBefore: DEFAULT_PARAGRAPH_STYLE.spaceBefore,
12234
12652
  offsetAfter: DEFAULT_PARAGRAPH_STYLE.spaceAfter,
12235
- lineSpacing: paragraph.paragraphStyle.lineSpacing ?? DEFAULT_PARAGRAPH_STYLE.lineSpacing
12653
+ lineSpacing: paragraph.paragraphStyle.lineSpacing ?? DEFAULT_PARAGRAPH_STYLE.lineSpacing,
12654
+ isNumbering: !!markerWidth,
12655
+ markerWidth
12236
12656
  });
12237
12657
  }
12238
12658
  getIndentLeftFromTextLine(insertIndex) {
@@ -13281,12 +13701,15 @@ class EditSession {
13281
13701
  return paragraphContent.substring(startColumn || 0, endColumn || paragraphContent.length);
13282
13702
  }
13283
13703
  isEdgeOrWithinEdge() {
13284
- return this.isEdge() || this.isWithinEdge();
13704
+ return this.isEdge() || this.isCellWithinEdge();
13285
13705
  }
13286
13706
  isEdge() {
13287
13707
  return this.type === 'edge';
13288
13708
  }
13289
- isWithinEdge() {
13709
+ isCell() {
13710
+ return this.type === 'cell' || this.type === 'cellWithinEdge';
13711
+ }
13712
+ isCellWithinEdge() {
13290
13713
  return this.type === 'cellWithinEdge';
13291
13714
  }
13292
13715
  onRendered() {
@@ -13607,6 +14030,11 @@ class EditSession {
13607
14030
  this.selection.placeCursor(endPosition);
13608
14031
  return endPosition;
13609
14032
  }
14033
+ applyTableCellsStyles(model) {
14034
+ const table = this.customComponents.tables.find(x => x.instance.insertIndex === model.insertIndex);
14035
+ OperationsHelper.applyTableCellsStyles(this.model, model);
14036
+ table.instance.updateTable();
14037
+ }
13610
14038
  removeMoveRange(moveModel) {
13611
14039
  const endIndex = moveModel.sourceStartIndex + moveModel.sourceCount - 1;
13612
14040
  const startPosition = this.displayData.indexToPosition(moveModel.sourceStartIndex, 0);
@@ -13833,11 +14261,12 @@ class GrammarChecker {
13833
14261
  constructor(grammarService) {
13834
14262
  this.grammarService = grammarService;
13835
14263
  this.ignoreKey = 'grammar-ignore';
13836
- this.paragraphSessionMap = new Map();
14264
+ this.sessionMap = new Map();
13837
14265
  this.paragraphErrorMap = new Map();
14266
+ this.checkedParagraphs = new Map();
13838
14267
  this.sessionSubscriptions = new Map();
13839
- this.sessions = [];
13840
14268
  this.ignoreList = [];
14269
+ this.visibilitySubscriptions = new Map();
13841
14270
  try {
13842
14271
  const ignoreListJson = sessionStorage.getItem(this.ignoreKey);
13843
14272
  this.ignoreList = JSON.parse(ignoreListJson) ?? [];
@@ -13845,59 +14274,43 @@ class GrammarChecker {
13845
14274
  catch {
13846
14275
  this.ignoreList = [];
13847
14276
  }
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
- });
14277
+ this.checkResultsSubscription = grammarService.grammarCheckResults$.subscribe(x => this.processGrammarCheckResults(x));
13857
14278
  }
13858
14279
  registerSession(session) {
13859
- if (this.sessions.some(x => x.sessionId === session.sessionId)) {
14280
+ if (this.sessionMap.has(session.sessionId)) {
13860
14281
  return;
13861
14282
  }
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
- }
14283
+ this.sessionMap.set(session.sessionId, session);
14284
+ const updateSubscription = session.session.paragraphInfoChanges$.subscribe(x => this.processParagraphChange(session, x));
14285
+ this.sessionSubscriptions.set(session.sessionId, [updateSubscription]);
14286
+ this.visibilitySubscriptions.set(session.sessionId, session.renderer.ParagraphsAppeared$.subscribe(x => {
14287
+ if (session.session.editorService.isViewOnly) {
13874
14288
  return;
13875
14289
  }
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]);
14290
+ const filtered = x.filter(y => !this.checkedParagraphs.get(session.sessionId)?.has(y.id));
14291
+ this.grammarService.enqueueParagraphs(session.sessionId, filtered);
14292
+ }));
13881
14293
  }
13882
14294
  unregisterSession(sessionId) {
13883
- const session = this.sessions.find(x => x.sessionId === sessionId);
14295
+ const session = this.sessionMap.get(sessionId);
13884
14296
  if (!session) {
13885
14297
  return;
13886
14298
  }
13887
- this.sessions.splice(this.sessions.indexOf(session), 1);
14299
+ this.sessionMap.delete(sessionId);
13888
14300
  const subscriptions = this.sessionSubscriptions.get(sessionId);
13889
14301
  if (subscriptions?.length) {
13890
14302
  for (const subscription of subscriptions) {
13891
14303
  subscription.unsubscribe();
13892
14304
  }
13893
14305
  }
14306
+ const visibilitySubscription = this.visibilitySubscriptions.get(sessionId);
14307
+ visibilitySubscription?.unsubscribe();
14308
+ this.visibilitySubscriptions.delete(sessionId);
13894
14309
  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
- }
14310
+ this.checkedParagraphs.delete(sessionId);
14311
+ for (const paragraph of session.session.displayData.paragraphs) {
14312
+ this.grammarService.removeParagraph(sessionId, paragraph.id);
14313
+ this.paragraphErrorMap.delete(`${sessionId}-${paragraph.id}`);
13901
14314
  }
13902
14315
  }
13903
14316
  getError(sessionId, paragraphId, cursorIndex) {
@@ -13912,16 +14325,13 @@ class GrammarChecker {
13912
14325
  const ignoreJson = JSON.stringify(this.ignoreList);
13913
14326
  sessionStorage.setItem(this.ignoreKey, ignoreJson);
13914
14327
  for (const [key, errors] of this.paragraphErrorMap) {
13915
- const session = this.paragraphSessionMap.get(key);
14328
+ const session = this.sessionMap.get(this.getSessionIdFromKey(key));
13916
14329
  const paragraphId = key.split('-')[1];
13917
14330
  const filteredErrors = this.filterErrors(errors);
13918
14331
  this.paragraphErrorMap.set(key, filteredErrors);
13919
14332
  session.renderer.updateGrammarHighlights(+paragraphId, filteredErrors);
13920
14333
  }
13921
14334
  }
13922
- filterErrors(grammarErrors) {
13923
- return grammarErrors.filter(x => !this.ignoreList.some(y => y.type === x.type && y.text.toLowerCase() === x.text.toLowerCase()));
13924
- }
13925
14335
  destroy() {
13926
14336
  this.checkResultsSubscription.unsubscribe();
13927
14337
  for (const subscriptions of this.sessionSubscriptions.values()) {
@@ -13930,10 +14340,45 @@ class GrammarChecker {
13930
14340
  }
13931
14341
  }
13932
14342
  this.sessionSubscriptions.clear();
13933
- this.paragraphSessionMap.clear();
13934
- this.sessions.length = 0;
14343
+ this.sessionMap.clear();
14344
+ this.checkedParagraphs.clear();
13935
14345
  this.grammarService.destroy();
13936
14346
  }
14347
+ filterErrors(grammarErrors) {
14348
+ return grammarErrors.filter(x => !this.ignoreList.some(y => y.type === x.type && y.text.toLowerCase() === x.text.toLowerCase()));
14349
+ }
14350
+ processGrammarCheckResults(result) {
14351
+ const session = this.sessionMap.get(this.getSessionIdFromKey(result.paragraphId));
14352
+ if (session) {
14353
+ const paragraphId = +result.paragraphId.split('-')[1];
14354
+ if (this.checkedParagraphs.has(session.sessionId)) {
14355
+ this.checkedParagraphs.get(session.sessionId).add(paragraphId);
14356
+ }
14357
+ else {
14358
+ this.checkedParagraphs.set(session.sessionId, new Set([paragraphId]));
14359
+ }
14360
+ const filteredErrors = this.filterErrors(result.errors);
14361
+ this.paragraphErrorMap.set(result.paragraphId, filteredErrors);
14362
+ const id = +result.paragraphId.split('-')[1];
14363
+ session.renderer.updateGrammarHighlights(id, filteredErrors);
14364
+ }
14365
+ }
14366
+ processParagraphChange(session, change) {
14367
+ if (change instanceof ParagraphInfosRemoved) {
14368
+ for (const id of change.ids) {
14369
+ const errors = this.paragraphErrorMap.get(`${session.sessionId}-${id}`);
14370
+ if (errors?.length) {
14371
+ session.renderer.removeGrammarHighlights(id);
14372
+ }
14373
+ this.grammarService.removeParagraph(session.sessionId, id);
14374
+ this.paragraphErrorMap.delete(`${session.sessionId}-${id}`);
14375
+ this.checkedParagraphs.get(session.sessionId).delete(id);
14376
+ }
14377
+ return;
14378
+ }
14379
+ this.adjustHighlights(change, session);
14380
+ this.grammarService.updateParagraphContent(session.sessionId, change.paragraph);
14381
+ }
13937
14382
  adjustHighlights(changes, session) {
13938
14383
  const errors = this.paragraphErrorMap.get(`${session.sessionId}-${changes.paragraph.id}`);
13939
14384
  if (!errors?.length || changes instanceof ParagraphInfoAdded) {
@@ -13969,6 +14414,10 @@ class GrammarChecker {
13969
14414
  this.paragraphErrorMap.set(`${session.sessionId}-${changes.paragraph.id}`, newErrors);
13970
14415
  session.renderer.updateGrammarHighlights(changes.paragraph.id, newErrors);
13971
14416
  }
14417
+ getSessionIdFromKey(paragraphKey) {
14418
+ const parts = paragraphKey.split('-');
14419
+ return parts.length > 1 ? +parts[0] : null;
14420
+ }
13972
14421
  }
13973
14422
 
13974
14423
  class MainSessionSourceModel {
@@ -14127,7 +14576,7 @@ class HighlightLayer {
14127
14576
  top += lineInfo.firstLinePageOffset;
14128
14577
  top += lineInfo.offsetBefore;
14129
14578
  }
14130
- const left = lineInfo.paddingLeft + padding + lineInfo.offsetMargin;
14579
+ const left = lineInfo.paddingLeft + padding + lineInfo.offsetMargin + (lineInfo.markerWidth ?? 0);
14131
14580
  let style;
14132
14581
  if (i === 0) {
14133
14582
  const rangeInfo = this.getRangeInfo(this.session, range);
@@ -14190,7 +14639,8 @@ class GrammarHighlightLayer extends HighlightLayer {
14190
14639
  this.errorsByParagraph = new Map();
14191
14640
  }
14192
14641
  update(config) {
14193
- if (!config?.isVisible || !this.errorsByParagraph.size) {
14642
+ if (!config?.isVisible || !this.errorsByParagraph.size || this.session.editorService.isViewOnly) {
14643
+ this.element.innerHTML = '';
14194
14644
  return;
14195
14645
  }
14196
14646
  this.config = config;
@@ -14472,6 +14922,9 @@ class SelectionLayer extends HighlightLayer {
14472
14922
  }
14473
14923
 
14474
14924
  class Renderer extends EventEmitting {
14925
+ get ParagraphsAppeared$() {
14926
+ return this.ParagraphsAppeared.asObservable();
14927
+ }
14475
14928
  constructor(parentContainer, session) {
14476
14929
  super();
14477
14930
  this.session = session;
@@ -14497,6 +14950,8 @@ class Renderer extends EventEmitting {
14497
14950
  };
14498
14951
  this.isVisible = false;
14499
14952
  this.changes = new RenderChangesModel();
14953
+ this.ParagraphsAppeared = new Subject();
14954
+ this.visibilitySubject = new Subject();
14500
14955
  this.textareaSize = {
14501
14956
  height: 1,
14502
14957
  width: 1
@@ -14515,6 +14970,9 @@ class Renderer extends EventEmitting {
14515
14970
  this.dragAndDropSelectionLayer = new SelectionLayer(this.content, 'drag-and-drop-selection', this.session);
14516
14971
  this.loop = new RenderLoop(changes => this.renderChanges(changes));
14517
14972
  this.session.displayData.addEventListener('pagesCountChanged', this.pagesCountChangedHandler);
14973
+ this.visibilitySubscription = this.visibilitySubject
14974
+ .pipe(debounceTime(3000), filter(x => x))
14975
+ .subscribe(() => this.paragraphsScrolledIntoView());
14518
14976
  }
14519
14977
  renderChanges(changes, force) {
14520
14978
  changes.apply(this.changes);
@@ -14562,6 +15020,7 @@ class Renderer extends EventEmitting {
14562
15020
  if (changes.visibilityChanged) {
14563
15021
  this.renderSearchHighlights();
14564
15022
  this.renderGrammarHighlights();
15023
+ this.visibilitySubject.next(this.isVisible);
14565
15024
  }
14566
15025
  this.session.onRendered();
14567
15026
  }
@@ -14694,6 +15153,7 @@ class Renderer extends EventEmitting {
14694
15153
  destroy() {
14695
15154
  this.session.displayData.removeEventListener('pagesCountChanged', this.pagesCountChangedHandler);
14696
15155
  this.textLayer.destroy();
15156
+ this.visibilitySubscription.unsubscribe();
14697
15157
  DomHelper.removeChildren(this.container);
14698
15158
  }
14699
15159
  renderFull() {
@@ -14750,6 +15210,14 @@ class Renderer extends EventEmitting {
14750
15210
  this.container.appendChild(this.content);
14751
15211
  }
14752
15212
  }
15213
+ paragraphsScrolledIntoView() {
15214
+ if (!this.layerConfig.visibleRange) {
15215
+ this.ParagraphsAppeared.next(this.session.displayData.paragraphs);
15216
+ return;
15217
+ }
15218
+ const paragraphs = this.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph);
15219
+ this.ParagraphsAppeared.next(paragraphs);
15220
+ }
14753
15221
  }
14754
15222
 
14755
15223
  /**
@@ -14859,6 +15327,9 @@ class VirtualRenderer {
14859
15327
  set layerConfig(val) {
14860
15328
  this.renderer.layerConfig = val;
14861
15329
  }
15330
+ get ParagraphsAppeared$() {
15331
+ return this.renderer.ParagraphsAppeared.asObservable();
15332
+ }
14862
15333
  constructor(parentContainer, mainSession, scrollBar) {
14863
15334
  this.scrollBar = scrollBar;
14864
15335
  this.changes = new RenderChangesModel();
@@ -14869,6 +15340,7 @@ class VirtualRenderer {
14869
15340
  scrollerWidth: 0,
14870
15341
  dirty: true
14871
15342
  };
15343
+ this.paragraphsScrolledIntoViewSubject = new Subject();
14872
15344
  this.container = parentContainer;
14873
15345
  this.createScroller();
14874
15346
  this.renderer = new Renderer(parentContainer, mainSession);
@@ -14876,6 +15348,9 @@ class VirtualRenderer {
14876
15348
  this.edgesLayer = new EdgesLayer(this.renderer.content, mainSession);
14877
15349
  this.scrollSubscription = this.scrollBar.scrolled$.subscribe(() => this.loop.schedule({ scroll: true }));
14878
15350
  this.createRenderLoop();
15351
+ this.paragraphsScrolledIntoViewSubscription = this.paragraphsScrolledIntoViewSubject
15352
+ .pipe(debounceTime(3000))
15353
+ .subscribe(() => this.paragraphsScrolledIntoView());
14879
15354
  }
14880
15355
  renderChanges(changes, force) {
14881
15356
  changes.apply(this.changes);
@@ -14911,6 +15386,7 @@ class VirtualRenderer {
14911
15386
  // scrolling
14912
15387
  if (changes.scroll) {
14913
15388
  this.renderScroll(changes);
15389
+ this.paragraphsScrolledIntoViewSubject.next();
14914
15390
  }
14915
15391
  if (changes.text) {
14916
15392
  this.renderText();
@@ -15093,6 +15569,7 @@ class VirtualRenderer {
15093
15569
  this.pagesLayer.destroy();
15094
15570
  this.renderer.destroy();
15095
15571
  this.scrollSubscription?.unsubscribe();
15572
+ this.paragraphsScrolledIntoViewSubscription?.unsubscribe();
15096
15573
  }
15097
15574
  computeLayerConfig() {
15098
15575
  const displayData = this.renderer.session.displayData;
@@ -15109,7 +15586,7 @@ class VirtualRenderer {
15109
15586
  }
15110
15587
  const changes = scrollChanged
15111
15588
  ? this.updateCachedSize(true, this.size.width, this.size.height)
15112
- : new RenderChangesModel({ scroll: true });
15589
+ : new RenderChangesModel({ scroll: true }); // TODO: stop triggering scroll for no reason
15113
15590
  const visibleRange = displayData.getVisibleRange(this.scrollBar.scrollTop, this.size.scrollerHeight);
15114
15591
  this.layerConfig = {
15115
15592
  width: this.renderer.textLayer.element.clientWidth,
@@ -15155,6 +15632,7 @@ class VirtualRenderer {
15155
15632
  renderFull() {
15156
15633
  this.pagesLayer.update(this.layerConfig);
15157
15634
  this.edgesLayer.update(this.layerConfig);
15635
+ this.paragraphsScrolledIntoViewSubject.next();
15158
15636
  this.renderer.renderFull();
15159
15637
  }
15160
15638
  renderText() {
@@ -15176,6 +15654,10 @@ class VirtualRenderer {
15176
15654
  renderDragAndDropSelection() {
15177
15655
  this.renderer.renderDragAndDropSelection();
15178
15656
  }
15657
+ paragraphsScrolledIntoView() {
15658
+ const paragraphs = this.renderer.session.displayData.paragraphs.slice(this.layerConfig.visibleRange.startParagraph, this.layerConfig.visibleRange.endParagraph);
15659
+ this.renderer.ParagraphsAppeared.next(paragraphs);
15660
+ }
15179
15661
  }
15180
15662
 
15181
15663
  class CustomContentService {
@@ -15267,6 +15749,8 @@ class CustomContentService {
15267
15749
  indentRight: lineInfo.indent.right,
15268
15750
  indentBefore: lineInfo.offsetBefore,
15269
15751
  indentAfter: lineInfo.offsetAfter,
15752
+ markerWidth: lineInfo.markerWidth,
15753
+ isNumbering: lineInfo.isNumbering,
15270
15754
  isPageBreak: false,
15271
15755
  isLineBreak: false,
15272
15756
  displayValue,
@@ -15335,7 +15819,6 @@ class RegulatorService {
15335
15819
  this.currentSession = this.mainSession;
15336
15820
  displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
15337
15821
  this.grammarChecker.registerSession(this.mainSession);
15338
- displayData.emitAllParagraphs();
15339
15822
  }
15340
15823
  addCellSession(table, margins, component, properties) {
15341
15824
  const sessionId = ++this.sessionIdIncrement;
@@ -15352,7 +15835,6 @@ class RegulatorService {
15352
15835
  displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
15353
15836
  newSession.renderer.updateText();
15354
15837
  this.grammarChecker.registerSession(newSession);
15355
- displayData.emitAllParagraphs();
15356
15838
  return newSession;
15357
15839
  }
15358
15840
  addEdgeSession(component) {
@@ -15367,7 +15849,6 @@ class RegulatorService {
15367
15849
  displayData.updateNextLineIndexes(0, displayData.paragraphs.length - 1);
15368
15850
  newSession.renderer.updateText();
15369
15851
  this.grammarChecker.registerSession(newSession);
15370
- displayData.emitAllParagraphs();
15371
15852
  return newSession;
15372
15853
  }
15373
15854
  removeSession(sessionId) {
@@ -15428,6 +15909,7 @@ class RegulatorService {
15428
15909
  this.currentSession.renderer.showCursor();
15429
15910
  this.arrangeEdgesForSessionChange(previous.session, session.session);
15430
15911
  }
15912
+ this.editorService.setIsTableSelected(session.session.isCell());
15431
15913
  }
15432
15914
  updateCursorPosition() {
15433
15915
  if (!this.currentSession.session.isEdge()) {
@@ -15653,6 +16135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
15653
16135
  class EditorRulerComponent {
15654
16136
  constructor() {
15655
16137
  this.unit = input.required();
16138
+ this.disabled = input(false);
15656
16139
  this.editorService = inject(EditorService);
15657
16140
  this.dialog = inject(MatDialog);
15658
16141
  this.defaultPaddingCm = 2.5;
@@ -15745,12 +16228,16 @@ class EditorRulerComponent {
15745
16228
  window.removeEventListener('touchend', this.onUp);
15746
16229
  };
15747
16230
  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 })) ?? []))
16231
+ .pipe(takeUntilDestroyed(), distinctUntilChanged(), filter(x => !!x.paragraphStyle.tabSettings), map(x => x.paragraphStyle.tabSettings?.map(y => new TabSettingModel({ alignment: y.alignment, position: y.position })) ?? []))
15749
16232
  .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);
16233
+ this.editorService.paragraphStyle$.pipe(takeUntilDestroyed()).subscribe(({ paragraphStyle, numberingModel }) => {
16234
+ const numberingIndentLeft = numberingModel?.levels[paragraphStyle.numberingLevel].indentLeft ?? 0;
16235
+ const numberingIndentHanging = numberingModel?.levels[paragraphStyle.numberingLevel].indentHanging ?? 0;
16236
+ const indentLeft = paragraphStyle.indentLeft === 0 ? numberingIndentLeft : paragraphStyle.indentLeft;
16237
+ const firstLine = paragraphStyle.indentHanging ? -paragraphStyle.indentHanging : paragraphStyle.indentFirstLine;
16238
+ this.firstLine.set(firstLine === 0 ? -numberingIndentHanging : firstLine);
16239
+ this.leftIndent.set(indentLeft);
16240
+ this.rightIndent.set(paragraphStyle.indentRight);
15754
16241
  });
15755
16242
  effect(() => (this.unit() === 'inch' ? this.buildTicksInch() : this.buildTicksCm()));
15756
16243
  }
@@ -15939,11 +16426,11 @@ class EditorRulerComponent {
15939
16426
  }
15940
16427
  }
15941
16428
  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 }); }
16429
+ 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
16430
  }
15944
16431
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorRulerComponent, decorators: [{
15945
16432
  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"] }]
16433
+ 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
16434
  }], ctorParameters: () => [], propDecorators: { rulerContainer: [{
15948
16435
  type: ViewChild,
15949
16436
  args: ['rulerContainer', { static: true }]
@@ -16041,11 +16528,11 @@ class EditorComponent {
16041
16528
  this.sidenavComponentRef = null;
16042
16529
  }
16043
16530
  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 }); }
16531
+ 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: 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" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16045
16532
  }
16046
16533
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorComponent, decorators: [{
16047
16534
  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"] }]
16535
+ 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"] }]
16049
16536
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ComponentService }, { type: EditorService }, { type: OverlayService }, { type: i0.Injector }, { type: RegulatorService }, { type: CommandsService }, { type: i6$1.Clipboard }], propDecorators: { isMobile: [{
16050
16537
  type: Input
16051
16538
  }], externalElementTagNames: [{
@@ -16607,6 +17094,9 @@ class BaseToolbarComponent extends DestroyComponent {
16607
17094
  this.insertImage = new EventEmitter();
16608
17095
  this.insertLink = new EventEmitter();
16609
17096
  this.insertTable = new EventEmitter();
17097
+ this.updateTableBorderStyle = new EventEmitter();
17098
+ this.updateTableBorderWidth = new EventEmitter();
17099
+ this.updateTableBorders = new EventEmitter();
16610
17100
  this.elements = this.injector.get(EXTERNAL_ELEMENT_SERVICE).elements;
16611
17101
  this.customIconService.register();
16612
17102
  this.historyInfoSubscription();
@@ -16666,7 +17156,7 @@ class BaseToolbarComponent extends DestroyComponent {
16666
17156
  });
16667
17157
  }
16668
17158
  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 }); }
17159
+ 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
17160
  }
16671
17161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BaseToolbarComponent, decorators: [{
16672
17162
  type: Directive
@@ -16692,6 +17182,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
16692
17182
  type: Output
16693
17183
  }], insertTable: [{
16694
17184
  type: Output
17185
+ }], updateTableBorderStyle: [{
17186
+ type: Output
17187
+ }], updateTableBorderWidth: [{
17188
+ type: Output
17189
+ }], updateTableBorders: [{
17190
+ type: Output
16695
17191
  }] } });
16696
17192
 
16697
17193
  class InsertTableComponent {
@@ -16963,6 +17459,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
16963
17459
  args: ['auto']
16964
17460
  }] } });
16965
17461
 
17462
+ class TableBordersComponent {
17463
+ constructor() {
17464
+ this.isDisabled = false;
17465
+ this.active = false;
17466
+ this.borders = Borders;
17467
+ this.updateTableBorders = new EventEmitter();
17468
+ }
17469
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBordersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17470
+ 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 }); }
17471
+ }
17472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBordersComponent, decorators: [{
17473
+ type: Component,
17474
+ 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"] }]
17475
+ }], propDecorators: { isDisabled: [{
17476
+ type: Input
17477
+ }], updateTableBorders: [{
17478
+ type: Output
17479
+ }] } });
17480
+
17481
+ class TableBorderStyleComponent {
17482
+ constructor() {
17483
+ this.isDisabled = false;
17484
+ this.active = false;
17485
+ this.lineStyles = LineStyles;
17486
+ this.updateTableBorderStyle = new EventEmitter();
17487
+ }
17488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderStyleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17489
+ 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 }); }
17490
+ }
17491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderStyleComponent, decorators: [{
17492
+ type: Component,
17493
+ 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"] }]
17494
+ }], propDecorators: { isDisabled: [{
17495
+ type: Input
17496
+ }], updateTableBorderStyle: [{
17497
+ type: Output
17498
+ }] } });
17499
+
17500
+ class TableBorderWidthComponent {
17501
+ constructor() {
17502
+ this.isDisabled = false;
17503
+ this.active = false;
17504
+ this.widths = [0.5, 1, 1.5, 2, 3];
17505
+ this.updateTableBorderWidth = new EventEmitter();
17506
+ }
17507
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderWidthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17508
+ 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 }); }
17509
+ }
17510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableBorderWidthComponent, decorators: [{
17511
+ type: Component,
17512
+ 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"] }]
17513
+ }], propDecorators: { isDisabled: [{
17514
+ type: Input
17515
+ }], updateTableBorderWidth: [{
17516
+ type: Output
17517
+ }] } });
17518
+
16966
17519
  class ColorPickerComponent {
16967
17520
  constructor() {
16968
17521
  this.colorChange = new EventEmitter();
@@ -17203,11 +17756,11 @@ class ToolbarActionsComponent extends BaseToolbarComponent {
17203
17756
  });
17204
17757
  }
17205
17758
  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 }); }
17759
+ 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
17760
  }
17208
17761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarActionsComponent, decorators: [{
17209
17762
  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"] }]
17763
+ 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
17764
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: CustomIconService }, { type: i0.Injector }, { type: EditorService }], propDecorators: { tableInsertMenu: [{
17212
17765
  type: ViewChild,
17213
17766
  args: ['tableInsert']
@@ -17322,13 +17875,16 @@ class EditorToolbarComponent {
17322
17875
  this.setNumberingTemplateType = new EventEmitter();
17323
17876
  this.removeNumberings = new EventEmitter();
17324
17877
  this.insertTable = new EventEmitter();
17878
+ this.updateTableBorderStyle = new EventEmitter();
17879
+ this.updateTableBorderWidth = new EventEmitter();
17880
+ this.updateTableBorders = new EventEmitter();
17325
17881
  }
17326
17882
  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 }); }
17883
+ 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
17884
  }
17329
17885
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: EditorToolbarComponent, decorators: [{
17330
17886
  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"] }]
17887
+ 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
17888
  }], ctorParameters: () => [{ type: EditorService }], propDecorators: { openFileFromDisk: [{
17333
17889
  type: Output
17334
17890
  }], addCustomElement: [{
@@ -17381,6 +17937,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
17381
17937
  type: Output
17382
17938
  }], insertTable: [{
17383
17939
  type: Output
17940
+ }], updateTableBorderStyle: [{
17941
+ type: Output
17942
+ }], updateTableBorderWidth: [{
17943
+ type: Output
17944
+ }], updateTableBorders: [{
17945
+ type: Output
17384
17946
  }] } });
17385
17947
 
17386
17948
  class EditorToolbarService {
@@ -17672,6 +18234,9 @@ class EditorToolbarModule {
17672
18234
  MatMenuModule,
17673
18235
  MatTooltipModule,
17674
18236
  ReactiveFormsModule,
18237
+ TableBordersComponent,
18238
+ TableBorderStyleComponent,
18239
+ TableBorderWidthComponent,
17675
18240
  TextFormatMobileComponent,
17676
18241
  TranslateModule], exports: [EditorMobileToolbarComponent,
17677
18242
  EditorToolbarComponent,
@@ -17692,6 +18257,9 @@ class EditorToolbarModule {
17692
18257
  MatMenuModule,
17693
18258
  MatTooltipModule,
17694
18259
  ReactiveFormsModule,
18260
+ TableBordersComponent,
18261
+ TableBorderStyleComponent,
18262
+ TableBorderWidthComponent,
17695
18263
  TextFormatMobileComponent,
17696
18264
  TranslateModule] }); }
17697
18265
  }
@@ -17726,6 +18294,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
17726
18294
  MatMenuModule,
17727
18295
  MatTooltipModule,
17728
18296
  ReactiveFormsModule,
18297
+ TableBordersComponent,
18298
+ TableBorderStyleComponent,
18299
+ TableBorderWidthComponent,
17729
18300
  TextFormatMobileComponent,
17730
18301
  TranslateModule
17731
18302
  ],
@@ -18180,10 +18751,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
18180
18751
  }] } });
18181
18752
 
18182
18753
  class RevisionHelper {
18183
- static applyOperationsToRevision(revision, operations) {
18754
+ static applyOperationsToRevision(content, operations) {
18184
18755
  operations.sort((a, b) => a.createTime - b.createTime);
18185
18756
  const actions = operations.map(x => x.command);
18186
- OperationsHelper.applyOperations(revision.content, actions);
18757
+ OperationsHelper.applyOperations(content, actions);
18187
18758
  }
18188
18759
  static fillTablesDefaultStyles(tables) {
18189
18760
  for (const table of tables) {