@talrace/ngx-noder 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/apart-components/editor-title/editor-title.component.mjs +6 -3
- package/esm2022/lib/apart-components/editor-title-mobile/editor-title-mobile.component.mjs +3 -3
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font/font.component.mjs +2 -2
- package/esm2022/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.mjs +20 -5
- package/esm2022/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.mjs +1 -1
- package/esm2022/lib/apart-components/editor-toolbar/editor-toolbar.module.mjs +13 -3
- package/esm2022/lib/editor/components/shared/abstract/base.component.mjs +3 -3
- package/esm2022/lib/editor/display/layers/text.layer.mjs +4 -3
- package/esm2022/lib/editor/execution/edit.session.mjs +3 -3
- package/esm2022/lib/editor/execution/editor.mjs +44 -13
- package/esm2022/lib/editor/execution/regulator.service.mjs +6 -5
- package/esm2022/lib/editor/gadgets/history/operation-history.mjs +17 -18
- package/esm2022/lib/editor/interaction/editor.service.mjs +8 -1
- package/esm2022/lib/editor/operations/helpers/content-operations.helper.mjs +4 -4
- package/esm2022/lib/editor/operations/operations-helper.helper.mjs +7 -6
- package/esm2022/lib/editor/operations/save-commands.helper.mjs +4 -4
- package/esm2022/lib/models/generated/delete.model.mjs +1 -1
- package/esm2022/lib/models/generated/link-data.model.mjs +1 -1
- package/esm2022/lib/models/generated/link.model.mjs +1 -1
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/talrace-ngx-noder.mjs +338 -272
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-title/editor-title.component.d.ts +2 -1
- package/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.d.ts +6 -1
- package/lib/apart-components/editor-toolbar/editor-toolbar.module.d.ts +1 -1
- package/lib/editor/execution/editor.d.ts +3 -1
- package/lib/editor/gadgets/history/operation-history.d.ts +2 -2
- package/lib/editor/interaction/editor.service.d.ts +3 -0
- package/lib/editor/operations/helpers/content-operations.helper.d.ts +1 -1
- package/lib/editor/operations/operations-helper.helper.d.ts +1 -1
- package/lib/editor/operations/save-commands.helper.d.ts +1 -1
- package/lib/models/generated/delete.model.d.ts +1 -1
- package/lib/models/generated/link-data.model.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.scss +183 -0
- package/src/assets/fonts/nc-iconfont.svg +1 -53
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
- package/src/assets/fonts/nc-iconfont.css +0 -339
|
@@ -26,6 +26,8 @@ import * as i6$1 from '@angular/material/input';
|
|
|
26
26
|
import { MatInputModule } from '@angular/material/input';
|
|
27
27
|
import * as i4$3 from '@angular/material/form-field';
|
|
28
28
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
29
|
+
import * as i4$4 from '@angular/material/expansion';
|
|
30
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
29
31
|
import * as i2$1 from '@angular/platform-browser';
|
|
30
32
|
import * as i2$2 from '@angular/material/autocomplete';
|
|
31
33
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
@@ -35,8 +37,6 @@ import * as i5$1 from 'ngx-colors';
|
|
|
35
37
|
import { NgxColorsModule } from 'ngx-colors';
|
|
36
38
|
import * as i3$3 from '@angular/material/button-toggle';
|
|
37
39
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
38
|
-
import * as i4$4 from '@angular/material/expansion';
|
|
39
|
-
import { MatExpansionModule } from '@angular/material/expansion';
|
|
40
40
|
|
|
41
41
|
const DocumentInfo = {
|
|
42
42
|
width: 794,
|
|
@@ -441,11 +441,11 @@ class BaseNoderComponent extends DestroyComponent {
|
|
|
441
441
|
}
|
|
442
442
|
focus() {
|
|
443
443
|
this._isFocused = true;
|
|
444
|
-
this.cdr.
|
|
444
|
+
this.cdr.detectChanges();
|
|
445
445
|
}
|
|
446
446
|
blur() {
|
|
447
447
|
this._isFocused = false;
|
|
448
|
-
this.cdr.
|
|
448
|
+
this.cdr.detectChanges();
|
|
449
449
|
}
|
|
450
450
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseNoderComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
451
451
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: BaseNoderComponent, inputs: { content: "content", sessionId: "sessionId", contentWidth: "contentWidth", generalProperties: "generalProperties" }, host: { properties: { "class.focused": "this.focused", "attr.data-session-id": "this.sessionId", "attr.data-insert-index": "this.insertIndex" } }, usesInheritance: true, ngImport: i0 }); }
|
|
@@ -526,6 +526,7 @@ class EditorService {
|
|
|
526
526
|
this._updateEdges$ = new Subject();
|
|
527
527
|
this._insertText$ = new Subject();
|
|
528
528
|
this._blurCustomComponent$ = new Subject();
|
|
529
|
+
this._removeCustomElementsData$ = new Subject();
|
|
529
530
|
}
|
|
530
531
|
set styles(value) {
|
|
531
532
|
this._styles$.next({ ...value });
|
|
@@ -686,6 +687,9 @@ class EditorService {
|
|
|
686
687
|
get blurCustomComponent$() {
|
|
687
688
|
return this._blurCustomComponent$.asObservable();
|
|
688
689
|
}
|
|
690
|
+
get removeCustomElementsData$() {
|
|
691
|
+
return this._removeCustomElementsData$.asObservable();
|
|
692
|
+
}
|
|
689
693
|
setIsViewOnly(value) {
|
|
690
694
|
this._isViewOnly = value;
|
|
691
695
|
this._isViewOnly$.next(value);
|
|
@@ -813,6 +817,9 @@ class EditorService {
|
|
|
813
817
|
blurCustomComponent() {
|
|
814
818
|
this._blurCustomComponent$.next();
|
|
815
819
|
}
|
|
820
|
+
removeCustomElementsData(elements) {
|
|
821
|
+
this._removeCustomElementsData$.next(elements);
|
|
822
|
+
}
|
|
816
823
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
817
824
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorService }); }
|
|
818
825
|
}
|
|
@@ -1622,10 +1629,10 @@ class OperationHistory {
|
|
|
1622
1629
|
}
|
|
1623
1630
|
pushInsertText(insertIndex, text) {
|
|
1624
1631
|
const redoStep = new InsertTextModel({ insertIndex, text });
|
|
1625
|
-
const undoStep = new DeleteModel({ startIndex: insertIndex,
|
|
1632
|
+
const undoStep = new DeleteModel({ startIndex: insertIndex, count: text.length });
|
|
1626
1633
|
this.addToHistory(undoStep, redoStep);
|
|
1627
1634
|
}
|
|
1628
|
-
pushInsertParagraph(model, paragraphs) {
|
|
1635
|
+
pushInsertParagraph(content, model, paragraphs) {
|
|
1629
1636
|
const currentParagraph = paragraphs
|
|
1630
1637
|
.slice()
|
|
1631
1638
|
.sort((a, b) => a.insertIndex - b.insertIndex)
|
|
@@ -1635,52 +1642,50 @@ class OperationHistory {
|
|
|
1635
1642
|
.sort((a, b) => b.insertIndex - a.insertIndex)
|
|
1636
1643
|
.find(x => x.insertIndex < currentParagraph.insertIndex);
|
|
1637
1644
|
let startIndex = model.insertIndex;
|
|
1638
|
-
let
|
|
1645
|
+
let count = content.length;
|
|
1639
1646
|
if (model.insertIndex === 0 || previousParagraph?.insertIndex === model.insertIndex - 1) {
|
|
1640
|
-
|
|
1647
|
+
count++;
|
|
1641
1648
|
}
|
|
1642
1649
|
else if (currentParagraph.insertIndex === model.insertIndex) {
|
|
1643
1650
|
startIndex++;
|
|
1644
|
-
endIndex++;
|
|
1645
1651
|
}
|
|
1646
1652
|
else {
|
|
1647
|
-
|
|
1653
|
+
count = count + 2;
|
|
1648
1654
|
}
|
|
1649
|
-
|
|
1650
|
-
const undoStep = new DeleteModel({ startIndex, endIndex });
|
|
1655
|
+
const undoStep = new DeleteModel({ startIndex, count });
|
|
1651
1656
|
this.addToHistory(undoStep, model);
|
|
1652
1657
|
}
|
|
1653
1658
|
pushInsertElement(model) {
|
|
1654
|
-
const undoStep = new DeleteModel({ startIndex: model.element.insertIndex,
|
|
1659
|
+
const undoStep = new DeleteModel({ startIndex: model.element.insertIndex, count: CUSTOM_ELEMENT_MARKER.length });
|
|
1655
1660
|
this.addToHistory(undoStep, model);
|
|
1656
1661
|
}
|
|
1657
|
-
pushInsertBreak(model,
|
|
1658
|
-
const undoStep = new DeleteModel({ startIndex: model.insertIndex,
|
|
1662
|
+
pushInsertBreak(model, count) {
|
|
1663
|
+
const undoStep = new DeleteModel({ startIndex: model.insertIndex, count });
|
|
1659
1664
|
this.addToHistory(undoStep, model);
|
|
1660
1665
|
}
|
|
1661
1666
|
pushInsertTab(model) {
|
|
1662
|
-
const undoStep = new DeleteModel({ startIndex: model.insertIndex,
|
|
1667
|
+
const undoStep = new DeleteModel({ startIndex: model.insertIndex, count: CUSTOM_ELEMENT_MARKER.length });
|
|
1663
1668
|
this.addToHistory(undoStep, model);
|
|
1664
1669
|
}
|
|
1665
1670
|
pushInsertImage(model) {
|
|
1666
|
-
const undoStep = new DeleteModel({ startIndex: model.insertIndex,
|
|
1671
|
+
const undoStep = new DeleteModel({ startIndex: model.insertIndex, count: CUSTOM_ELEMENT_MARKER.length });
|
|
1667
1672
|
this.addToHistory(undoStep, model);
|
|
1668
1673
|
}
|
|
1669
1674
|
pushInsertLink(model) {
|
|
1670
|
-
const undoStep = new DeleteModel({ startIndex: model.insertIndex,
|
|
1675
|
+
const undoStep = new DeleteModel({ startIndex: model.insertIndex, count: model.linkDataModel.text.length });
|
|
1671
1676
|
this.addToHistory(undoStep, model);
|
|
1672
1677
|
}
|
|
1673
1678
|
pushInsertTable(model) {
|
|
1674
|
-
const undoStep = new DeleteModel({ startIndex: model.insertIndex,
|
|
1679
|
+
const undoStep = new DeleteModel({ startIndex: model.insertIndex, count: model.content.length });
|
|
1675
1680
|
this.addToHistory(undoStep, model);
|
|
1676
1681
|
}
|
|
1677
1682
|
pushInsertStyledText(insertIndex, text, style) {
|
|
1678
1683
|
const redoStep = new InsertStyledTextModel({ insertIndex, text, textStyle: style });
|
|
1679
|
-
const undoStep = new DeleteModel({ startIndex: insertIndex,
|
|
1684
|
+
const undoStep = new DeleteModel({ startIndex: insertIndex, count: text.length });
|
|
1680
1685
|
this.addToHistory(undoStep, redoStep);
|
|
1681
1686
|
}
|
|
1682
1687
|
pushDelete(model) {
|
|
1683
|
-
const redoStep = new DeleteModel({ startIndex: model.startIndex,
|
|
1688
|
+
const redoStep = new DeleteModel({ startIndex: model.startIndex, count: model.text.length });
|
|
1684
1689
|
this.addToHistory(model, redoStep);
|
|
1685
1690
|
}
|
|
1686
1691
|
pushApplyTextStyle(startIndex, endIndex, style, formats) {
|
|
@@ -2714,9 +2719,10 @@ class TextLayer {
|
|
|
2714
2719
|
this.renderPagesEdgeComponents(config.pages);
|
|
2715
2720
|
}
|
|
2716
2721
|
edgeEditingPageUpdated(page) {
|
|
2722
|
+
const oldEditingPage = this.edgeEditingPage;
|
|
2717
2723
|
this.edgeEditingPage = page;
|
|
2718
|
-
this.removeEdgeComponents([page]);
|
|
2719
|
-
this.renderPagesEdgeComponents([page]);
|
|
2724
|
+
this.removeEdgeComponents([page ?? oldEditingPage]);
|
|
2725
|
+
this.renderPagesEdgeComponents([page ?? oldEditingPage]);
|
|
2720
2726
|
}
|
|
2721
2727
|
updateEdgeByLocation(updatedPageType) {
|
|
2722
2728
|
DomHelper.translate(this.element, 0, -this.config.scrollTop);
|
|
@@ -3228,7 +3234,7 @@ class SaveCommandsHelper {
|
|
|
3228
3234
|
return new CommandModel({ commandType: CommandType.RemoveNumberings, removeNumberings, targets });
|
|
3229
3235
|
}
|
|
3230
3236
|
static getRestoreNumberingsCommand(restoreNumberings, targets) {
|
|
3231
|
-
return new CommandModel({ commandType: CommandType.
|
|
3237
|
+
return new CommandModel({ commandType: CommandType.RestoreNumberings, restoreNumberings, targets });
|
|
3232
3238
|
}
|
|
3233
3239
|
static getApplyImageStyleCommand(height, width, insertIndex, targets) {
|
|
3234
3240
|
const applyImageStyle = new ApplyImageStyleModel({ height, width, insertIndex });
|
|
@@ -3242,8 +3248,8 @@ class SaveCommandsHelper {
|
|
|
3242
3248
|
const applyTextStyle = new ApplyTextStyleModel({ startIndex, endIndex, textStyle });
|
|
3243
3249
|
return new CommandModel({ commandType: CommandType.ApplyTextStyle, applyTextStyle, targets });
|
|
3244
3250
|
}
|
|
3245
|
-
static getDeleteCommand(startIndex,
|
|
3246
|
-
const deleteModel = new DeleteModel({ startIndex,
|
|
3251
|
+
static getDeleteCommand(startIndex, count, targets) {
|
|
3252
|
+
const deleteModel = new DeleteModel({ startIndex, count });
|
|
3247
3253
|
return new CommandModel({ commandType: CommandType.Delete, delete: deleteModel, targets });
|
|
3248
3254
|
}
|
|
3249
3255
|
static getInsertTextCommand(text, insertIndex, targets) {
|
|
@@ -4153,7 +4159,7 @@ class Editor {
|
|
|
4153
4159
|
this.replaceBy(new ReplaceModel({ insertParagraph }));
|
|
4154
4160
|
return;
|
|
4155
4161
|
}
|
|
4156
|
-
this.saveInsertParagraphToHistory(insertParagraph);
|
|
4162
|
+
this.saveInsertParagraphToHistory(insertTable.content, insertParagraph);
|
|
4157
4163
|
const endPoint = this.session.insertParagraph(this.selection.cursor, insertParagraph);
|
|
4158
4164
|
let lastRow = this.selection.cursor.row === endPoint.row ? endPoint.row : Infinity;
|
|
4159
4165
|
this.renderer.updateLines(this.selection.cursor.row, lastRow);
|
|
@@ -4174,8 +4180,9 @@ class Editor {
|
|
|
4174
4180
|
}
|
|
4175
4181
|
replaceBy(model) {
|
|
4176
4182
|
const partIndexes = ContentHelper.getSelectedPartDocumentIndexes(this.session.displayData.paragraphs, this.selection.range);
|
|
4177
|
-
model.delete = new DeleteModel({ startIndex: partIndexes.startIndex,
|
|
4183
|
+
model.delete = new DeleteModel({ startIndex: partIndexes.startIndex, count: partIndexes.endIndex - partIndexes.startIndex + 1 });
|
|
4178
4184
|
this.saveReplaceToHistory(this.selection.range, model);
|
|
4185
|
+
this.removeCustomElementsData();
|
|
4179
4186
|
const endPosition = this.session.replace(model);
|
|
4180
4187
|
this.onDocumentChange(new Range(this.selection.cursor, endPosition));
|
|
4181
4188
|
this.onSelectionChange();
|
|
@@ -4374,8 +4381,8 @@ class Editor {
|
|
|
4374
4381
|
command = SaveCommandsHelper.getInsertParagraphCommand(operation, this.targets);
|
|
4375
4382
|
}
|
|
4376
4383
|
else if (operation instanceof DeleteModel) {
|
|
4377
|
-
this.session.removeByDocumentIndexes(operation.startIndex, operation.
|
|
4378
|
-
command = SaveCommandsHelper.getDeleteCommand(operation.startIndex, operation.
|
|
4384
|
+
this.session.removeByDocumentIndexes(operation.startIndex, operation.startIndex + operation.count);
|
|
4385
|
+
command = SaveCommandsHelper.getDeleteCommand(operation.startIndex, operation.count, this.targets);
|
|
4379
4386
|
}
|
|
4380
4387
|
else if (operation instanceof InsertStyledTextModel) {
|
|
4381
4388
|
this.session.insertTextByDocumentIndex(operation.insertIndex, operation.text, new TextStyleModel(operation.textStyle));
|
|
@@ -4497,18 +4504,18 @@ class Editor {
|
|
|
4497
4504
|
}
|
|
4498
4505
|
saveRemoveToHistory(range) {
|
|
4499
4506
|
const restoreModel = this.createRestoreFromSlice(range.start.row, range.start.column, range.end.row, range.end.column);
|
|
4500
|
-
const
|
|
4507
|
+
const count = restoreModel.endIndex - restoreModel.startIndex + 1;
|
|
4501
4508
|
restoreModel.endIndex = restoreModel.startIndex; // this is to restore in position without deleting/replacing anything in range
|
|
4502
4509
|
this.history.pushDelete(restoreModel);
|
|
4503
|
-
this.commandsService.createCommand(SaveCommandsHelper.getDeleteCommand(restoreModel.startIndex,
|
|
4510
|
+
this.commandsService.createCommand(SaveCommandsHelper.getDeleteCommand(restoreModel.startIndex, count, this.targets));
|
|
4504
4511
|
}
|
|
4505
4512
|
saveInsertTextToHistory(paragraph, indexInParagraph, text) {
|
|
4506
4513
|
const index = ContentHelper.paragraphToDocumentIndex(this.session.displayData.paragraphs, paragraph, indexInParagraph);
|
|
4507
4514
|
this.history.pushInsertText(index, text);
|
|
4508
4515
|
this.commandsService.createCommand(SaveCommandsHelper.getInsertTextCommand(text, index, this.targets));
|
|
4509
4516
|
}
|
|
4510
|
-
saveInsertParagraphToHistory(model) {
|
|
4511
|
-
this.history.pushInsertParagraph(model, this.session.model.paragraphs);
|
|
4517
|
+
saveInsertParagraphToHistory(content, model) {
|
|
4518
|
+
this.history.pushInsertParagraph(content, model, this.session.model.paragraphs);
|
|
4512
4519
|
this.commandsService.createCommand(SaveCommandsHelper.getInsertParagraphCommand(model, this.targets));
|
|
4513
4520
|
}
|
|
4514
4521
|
saveInsertStyledTextToHistory(paragraph, indexInParagraph, text, style) {
|
|
@@ -4524,8 +4531,8 @@ class Editor {
|
|
|
4524
4531
|
model.isOnNewParagraph =
|
|
4525
4532
|
model.breakType === BreakTypes.Page &&
|
|
4526
4533
|
BreakHelper.getBreakType(this.session.model, CUSTOM_ELEMENT_MARKER, model.insertIndex - 1) !== BreakTypes.Page;
|
|
4527
|
-
const
|
|
4528
|
-
this.history.pushInsertBreak(model,
|
|
4534
|
+
const count = model.isOnNewParagraph ? NEW_LINE_MARKUP.length + 1 : 1;
|
|
4535
|
+
this.history.pushInsertBreak(model, count);
|
|
4529
4536
|
this.commandsService.createCommand(SaveCommandsHelper.getInsertBreakCommand(model, this.targets));
|
|
4530
4537
|
}
|
|
4531
4538
|
saveInsertTabToHistory(model) {
|
|
@@ -4595,7 +4602,7 @@ class Editor {
|
|
|
4595
4602
|
const paragraphs = IndexedElementHelper.sliceSection(this.session.model.paragraphs, startIndex, endIndex).map(x => new ParagraphModel(x));
|
|
4596
4603
|
const images = IndexedElementHelper.sliceSection(this.session.model.images, startIndex, endIndex).map(x => new ImageModel(x));
|
|
4597
4604
|
const tables = IndexedElementHelper.sliceSection(this.session.model.tables, startIndex, endIndex).map(x => new TableModel(x));
|
|
4598
|
-
const elements = IndexedElementHelper.sliceSection(this.session.model.elements, startIndex, endIndex).map(x => new ElementModel(x));
|
|
4605
|
+
const elements = IndexedElementHelper.sliceSection(this.session.model.elements, startIndex, endIndex).map(x => new ElementModel({ ...x, id: 0, guid: '' }));
|
|
4599
4606
|
const breaks = IndexedElementHelper.sliceSection(this.session.model.breaks, startIndex, endIndex).map(x => new BreakModel(x));
|
|
4600
4607
|
const tabs = IndexedElementHelper.sliceSection(this.session.model.tabs, startIndex, endIndex).map(x => new TabModel(x));
|
|
4601
4608
|
const links = LinkHelper.sliceSection(this.session.model.links, startIndex, endIndex).map(x => new LinkModel(x));
|
|
@@ -4618,9 +4625,18 @@ class Editor {
|
|
|
4618
4625
|
return;
|
|
4619
4626
|
}
|
|
4620
4627
|
this.saveRemoveToHistory(this.selection.range);
|
|
4628
|
+
this.removeCustomElementsData();
|
|
4621
4629
|
this.session.remove(this.selection.range);
|
|
4622
4630
|
this.onSelectionChange();
|
|
4623
4631
|
}
|
|
4632
|
+
removeCustomElementsData() {
|
|
4633
|
+
const startIndex = ContentHelper.paragraphToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.start.row, this.selection.range.start.column);
|
|
4634
|
+
const endIndex = ContentHelper.paragraphToDocumentIndex(this.session.displayData.paragraphs, this.selection.range.end.row, this.selection.range.end.column) - 1;
|
|
4635
|
+
const elements = IndexedElementHelper.sliceSection(this.session.model.elements, startIndex, endIndex).slice();
|
|
4636
|
+
if (elements.length) {
|
|
4637
|
+
this.editorService.removeCustomElementsData(elements);
|
|
4638
|
+
}
|
|
4639
|
+
}
|
|
4624
4640
|
onInput() {
|
|
4625
4641
|
const text = this.textInput.getInsertText();
|
|
4626
4642
|
if (!text) {
|
|
@@ -4792,6 +4808,7 @@ class Editor {
|
|
|
4792
4808
|
}
|
|
4793
4809
|
setCurrentSession(clickPositionY, element) {
|
|
4794
4810
|
const customElement = this.getCustomElement(element);
|
|
4811
|
+
this.blurEdgeCustomComponents(customElement);
|
|
4795
4812
|
if (!customElement) {
|
|
4796
4813
|
this.regulatorService.setMainSessionAsCurrent();
|
|
4797
4814
|
}
|
|
@@ -4928,6 +4945,25 @@ class Editor {
|
|
|
4928
4945
|
this.focusedComponent = null;
|
|
4929
4946
|
}
|
|
4930
4947
|
}
|
|
4948
|
+
blurEdgeCustomComponents(customElement) {
|
|
4949
|
+
if (!this.regulatorService.edgeEditingPage || !this.focusedComponent) {
|
|
4950
|
+
return;
|
|
4951
|
+
}
|
|
4952
|
+
if (!customElement ||
|
|
4953
|
+
customElement.tagName === this.tableCellTagName ||
|
|
4954
|
+
customElement.tagName === this.edgeElementTagName ||
|
|
4955
|
+
+customElement.attributes.getNamedItem('data-session-id').value !== this.focusedComponent.instance.sessionId) {
|
|
4956
|
+
this.blurCustomComponent();
|
|
4957
|
+
return;
|
|
4958
|
+
}
|
|
4959
|
+
const index = +customElement.attributes.getNamedItem('data-insert-index').value;
|
|
4960
|
+
const component = this.session.customComponents.images.find(x => x.instance.insertIndex === index) ??
|
|
4961
|
+
this.session.customComponents.tables.find(x => x.instance.insertIndex === index) ??
|
|
4962
|
+
this.session.customComponents.customElements.find(x => x.instance.insertIndex === index);
|
|
4963
|
+
if (this.focusedComponent !== component) {
|
|
4964
|
+
this.blurCustomComponent();
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4931
4967
|
isEmptyNumberingParagraph(paragraphIndex) {
|
|
4932
4968
|
const currentLine = this.session.displayData.getParagraphContent(paragraphIndex);
|
|
4933
4969
|
return currentLine.length === 0 && this.session.model.paragraphs[paragraphIndex].paragraphStyle.numberingId !== null;
|
|
@@ -5072,7 +5108,7 @@ class Editor {
|
|
|
5072
5108
|
}
|
|
5073
5109
|
insertLinkSubscription() {
|
|
5074
5110
|
return this.editorService.insertLink$.subscribe(linkData => {
|
|
5075
|
-
this.insertLink(linkData);
|
|
5111
|
+
this.insertLink(new LinkDataModel({ link: linkData.link, text: linkData.text }));
|
|
5076
5112
|
this.focus();
|
|
5077
5113
|
});
|
|
5078
5114
|
}
|
|
@@ -8576,8 +8612,8 @@ class CellModel {
|
|
|
8576
8612
|
}
|
|
8577
8613
|
|
|
8578
8614
|
class ContentOperationsHelper {
|
|
8579
|
-
static removeContent(content, startIndex,
|
|
8580
|
-
return `${content.slice(0, startIndex)}${content.slice(
|
|
8615
|
+
static removeContent(content, startIndex, count) {
|
|
8616
|
+
return `${content.slice(0, startIndex)}${content.slice(startIndex + count, content.length)}`;
|
|
8581
8617
|
}
|
|
8582
8618
|
static insertContent(content, text, index) {
|
|
8583
8619
|
const before = content.slice(0, index);
|
|
@@ -8585,7 +8621,7 @@ class ContentOperationsHelper {
|
|
|
8585
8621
|
return `${before}${text}${after}`;
|
|
8586
8622
|
}
|
|
8587
8623
|
static replaceContent(content, startIndex, endIndex, text) {
|
|
8588
|
-
const reduced = this.removeContent(content, startIndex, endIndex);
|
|
8624
|
+
const reduced = this.removeContent(content, startIndex, endIndex - startIndex + 1);
|
|
8589
8625
|
return this.insertContent(reduced, text, startIndex);
|
|
8590
8626
|
}
|
|
8591
8627
|
}
|
|
@@ -9373,7 +9409,7 @@ class OperationsHelper {
|
|
|
9373
9409
|
this.deleteRestore(contents, command.restore);
|
|
9374
9410
|
break;
|
|
9375
9411
|
case CommandType.Delete:
|
|
9376
|
-
this.delete(contents, command.delete.startIndex, command.delete.
|
|
9412
|
+
this.delete(contents, command.delete.startIndex, command.delete.count);
|
|
9377
9413
|
break;
|
|
9378
9414
|
case CommandType.ReplaceByText: {
|
|
9379
9415
|
const model = command.replaceByText;
|
|
@@ -9661,7 +9697,7 @@ class OperationsHelper {
|
|
|
9661
9697
|
}
|
|
9662
9698
|
static deleteRestore(document, model) {
|
|
9663
9699
|
if (model.startIndex !== model.endIndex) {
|
|
9664
|
-
this.delete(document, model.startIndex, model.endIndex);
|
|
9700
|
+
this.delete(document, model.startIndex, model.endIndex - model.startIndex + 1);
|
|
9665
9701
|
}
|
|
9666
9702
|
this.restore(document, model);
|
|
9667
9703
|
}
|
|
@@ -9677,9 +9713,10 @@ class OperationsHelper {
|
|
|
9677
9713
|
IndexedElementOperationsHelper.restore(document.tabs, model.startIndex, model.text.length, model.tabs);
|
|
9678
9714
|
LinkOperationsHelper.restore(document.links, model.startIndex, model.text.length, model.links);
|
|
9679
9715
|
}
|
|
9680
|
-
static delete(document, startIndex,
|
|
9681
|
-
document.content = ContentOperationsHelper.removeContent(document.content, startIndex,
|
|
9716
|
+
static delete(document, startIndex, count) {
|
|
9717
|
+
document.content = ContentOperationsHelper.removeContent(document.content, startIndex, count);
|
|
9682
9718
|
document.contentLength = document.content.length;
|
|
9719
|
+
const endIndex = startIndex + count - 1;
|
|
9683
9720
|
FormatOperationsHelper.removeContent(document.formats, startIndex, endIndex);
|
|
9684
9721
|
IndexedElementOperationsHelper.removeContent(document.paragraphs, startIndex, endIndex);
|
|
9685
9722
|
IndexedElementOperationsHelper.removeContent(document.images, startIndex, endIndex);
|
|
@@ -9702,7 +9739,7 @@ class OperationsHelper {
|
|
|
9702
9739
|
LinkOperationsHelper.replaceContent(document.links, startIndex, endIndex, text.length);
|
|
9703
9740
|
}
|
|
9704
9741
|
static replace(document, model, contentWidth) {
|
|
9705
|
-
this.delete(document, model.delete.startIndex, model.delete.
|
|
9742
|
+
this.delete(document, model.delete.startIndex, model.delete.count);
|
|
9706
9743
|
if (model.insertText) {
|
|
9707
9744
|
this.insertText(document, model.insertText.text, model.insertText.insertIndex);
|
|
9708
9745
|
}
|
|
@@ -10041,7 +10078,7 @@ class EditSession {
|
|
|
10041
10078
|
CustomComponentHelper.applyRemovingComponents(this.customComponents.images, partIndexes.startIndex, partIndexes.endIndex);
|
|
10042
10079
|
CustomComponentHelper.applyRemovingComponents(this.customComponents.customElements, partIndexes.startIndex, partIndexes.endIndex);
|
|
10043
10080
|
CustomComponentHelper.applyRemovingComponents(this.customComponents.tabs, partIndexes.startIndex, partIndexes.endIndex);
|
|
10044
|
-
OperationsHelper.delete(this.model, partIndexes.startIndex, partIndexes.endIndex);
|
|
10081
|
+
OperationsHelper.delete(this.model, partIndexes.startIndex, partIndexes.endIndex - partIndexes.startIndex + 1);
|
|
10045
10082
|
this.selection.placeCursor(range.start);
|
|
10046
10083
|
this.displayData.resetAllNumberingInfo(range.start.row);
|
|
10047
10084
|
this.displayData.updateNextLineIndexes(range.start.row, range.start.row);
|
|
@@ -10051,7 +10088,7 @@ class EditSession {
|
|
|
10051
10088
|
this.applyToolbarStyles();
|
|
10052
10089
|
}
|
|
10053
10090
|
replace(model) {
|
|
10054
|
-
this.removeByDocumentIndexes(model.delete.startIndex, model.delete.
|
|
10091
|
+
this.removeByDocumentIndexes(model.delete.startIndex, model.delete.startIndex + model.delete.count);
|
|
10055
10092
|
let endPoint;
|
|
10056
10093
|
if (model.insertText) {
|
|
10057
10094
|
endPoint = this.insertTextByDocumentIndex(model.insertText.insertIndex, model.insertText.text);
|
|
@@ -11366,7 +11403,8 @@ class RegulatorService {
|
|
|
11366
11403
|
header: model.marginHeader > 0 ? model.marginHeader : 0,
|
|
11367
11404
|
footer: model.marginFooter > 0 ? model.marginFooter : 0
|
|
11368
11405
|
});
|
|
11369
|
-
const
|
|
11406
|
+
const edgesMargins = new MarginModel({ ...pageMargin, top: pageMargin.header, bottom: pageMargin.footer });
|
|
11407
|
+
const edges = new Edges(this.componentService, model.headers, model.footers, edgesMargins, pageWidth, sessionId, properties);
|
|
11370
11408
|
properties.numberingInfo = {};
|
|
11371
11409
|
const customComponents = { images: [], tables: [], tabs: [], customElements: [], edges: edges };
|
|
11372
11410
|
const displayData = new DisplayData(model, properties, sessionId, pageMargin, DocumentInfo.pagesSpace, pageWidth, model.pageHeight, customComponents, this.customContentService, this.editorService);
|
|
@@ -11419,7 +11457,7 @@ class RegulatorService {
|
|
|
11419
11457
|
this.setCurrentSession(this.mainSession);
|
|
11420
11458
|
}
|
|
11421
11459
|
setCustomSessionAsCurrent(sessionId, edgeEditingPage = null) {
|
|
11422
|
-
if (sessionId === this.currentSession.sessionId) {
|
|
11460
|
+
if (sessionId === this.currentSession.sessionId && this.currentSession.source.edgeEditPage !== edgeEditingPage) {
|
|
11423
11461
|
this.currentSession.source.edgeEditPage = edgeEditingPage;
|
|
11424
11462
|
this.mainSession.renderer.renderer.textLayer.edgeEditingPageUpdated(edgeEditingPage);
|
|
11425
11463
|
return;
|
|
@@ -11511,10 +11549,10 @@ class RegulatorService {
|
|
|
11511
11549
|
return result;
|
|
11512
11550
|
}
|
|
11513
11551
|
toggleEdgeEditMode(edgeEditingPage = null) {
|
|
11514
|
-
this.edgeEditingPage
|
|
11515
|
-
if (!this.mainSession.session.customComponents.edges) {
|
|
11552
|
+
if (!this.mainSession.session.customComponents.edges || this.edgeEditingPage === edgeEditingPage) {
|
|
11516
11553
|
return;
|
|
11517
11554
|
}
|
|
11555
|
+
this.edgeEditingPage = edgeEditingPage;
|
|
11518
11556
|
this.mainSession.session.customComponents.edges.toggleEditMode(!!this.edgeEditingPage);
|
|
11519
11557
|
this.mainSession.renderer.renderer.textLayer.edgeEditingPageUpdated(edgeEditingPage);
|
|
11520
11558
|
}
|
|
@@ -11711,6 +11749,7 @@ class EditorTitleComponent {
|
|
|
11711
11749
|
constructor(cdr) {
|
|
11712
11750
|
this.cdr = cdr;
|
|
11713
11751
|
this.selectedMode = Mode.Edit;
|
|
11752
|
+
this.showTitle = true;
|
|
11714
11753
|
this.defaultFileName = 'Untitled document';
|
|
11715
11754
|
this.changeMode = new EventEmitter();
|
|
11716
11755
|
this.renameDocumentTitle = new EventEmitter();
|
|
@@ -11760,13 +11799,15 @@ class EditorTitleComponent {
|
|
|
11760
11799
|
element.focus();
|
|
11761
11800
|
}
|
|
11762
11801
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorTitleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11763
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditorTitleComponent, isStandalone: true, selector: "app-nod-editor-title", inputs: { selectedMode: "selectedMode", title: "title", defaultFileName: "defaultFileName", rename$: "rename$" }, outputs: { changeMode: "changeMode", renameDocumentTitle: "renameDocumentTitle" }, viewQueries: [{ propertyName: "titleSpan", first: true, predicate: ["titleSpan"], descendants: true, static: true }], ngImport: i0, template: "<div
|
|
11802
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditorTitleComponent, isStandalone: true, selector: "app-nod-editor-title", inputs: { selectedMode: "selectedMode", showTitle: "showTitle", title: "title", defaultFileName: "defaultFileName", rename$: "rename$" }, outputs: { changeMode: "changeMode", renameDocumentTitle: "renameDocumentTitle" }, viewQueries: [{ propertyName: "titleSpan", first: true, predicate: ["titleSpan"], descendants: true, static: true }], ngImport: i0, template: "<div\n *ngIf=\"showTitle\"\n class=\"menu-header\">\n <div class=\"file-name\">\n <span\n #titleSpan\n class=\"title\"\n matTooltip=\"Double click to rename\"\n (blur)=\"onRenameTitle($event)\"\n (keydown.enter)=\"$event.target.blur()\"\n (dblclick)=\"onFocus($event)\">\n {{ title }}\n </span>\n </div>\n</div>\n<div class=\"editor-mode\">\n <button\n *ngFor=\"let mode of modeOptions\"\n mat-icon-button\n [class.selected-mode]=\"selectedMode === mode.id\"\n [matTooltip]=\"mode.text\"\n (click)=\"selectedMode = mode.id; changeMode.emit(mode.id)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ mode.icon }}\" />\n </button>\n</div>\n", styles: [":host{display:flex;position:relative;align-items:center;width:100%}.menu-header{width:35%;line-height:0;z-index:1}.file-name{display:block;margin:0 8px;overflow:hidden}.title{font-size:18px;font-weight:400;line-height:normal;outline:none;display:inline-block;white-space:nowrap;min-width:1px;overflow:hidden;max-width:100%;-webkit-user-select:none;user-select:none}.title:not(:focus){text-overflow:ellipsis}.editor-mode{display:flex;position:absolute;justify-content:center;width:100%}.mdc-icon-button{min-width:40px;min-height:40px;width:40px;height:40px;padding:8px}.mdc-icon-button:not(:first-child){margin-left:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11764
11803
|
}
|
|
11765
11804
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorTitleComponent, decorators: [{
|
|
11766
11805
|
type: Component,
|
|
11767
|
-
args: [{ standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule], selector: 'app-nod-editor-title', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div
|
|
11806
|
+
args: [{ standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule], selector: 'app-nod-editor-title', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"showTitle\"\n class=\"menu-header\">\n <div class=\"file-name\">\n <span\n #titleSpan\n class=\"title\"\n matTooltip=\"Double click to rename\"\n (blur)=\"onRenameTitle($event)\"\n (keydown.enter)=\"$event.target.blur()\"\n (dblclick)=\"onFocus($event)\">\n {{ title }}\n </span>\n </div>\n</div>\n<div class=\"editor-mode\">\n <button\n *ngFor=\"let mode of modeOptions\"\n mat-icon-button\n [class.selected-mode]=\"selectedMode === mode.id\"\n [matTooltip]=\"mode.text\"\n (click)=\"selectedMode = mode.id; changeMode.emit(mode.id)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ mode.icon }}\" />\n </button>\n</div>\n", styles: [":host{display:flex;position:relative;align-items:center;width:100%}.menu-header{width:35%;line-height:0;z-index:1}.file-name{display:block;margin:0 8px;overflow:hidden}.title{font-size:18px;font-weight:400;line-height:normal;outline:none;display:inline-block;white-space:nowrap;min-width:1px;overflow:hidden;max-width:100%;-webkit-user-select:none;user-select:none}.title:not(:focus){text-overflow:ellipsis}.editor-mode{display:flex;position:absolute;justify-content:center;width:100%}.mdc-icon-button{min-width:40px;min-height:40px;width:40px;height:40px;padding:8px}.mdc-icon-button:not(:first-child){margin-left:10px}\n"] }]
|
|
11768
11807
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { selectedMode: [{
|
|
11769
11808
|
type: Input
|
|
11809
|
+
}], showTitle: [{
|
|
11810
|
+
type: Input
|
|
11770
11811
|
}], title: [{
|
|
11771
11812
|
type: Input
|
|
11772
11813
|
}], defaultFileName: [{
|
|
@@ -11784,11 +11825,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
11784
11825
|
|
|
11785
11826
|
class EditorTitleMobileComponent extends EditorTitleComponent {
|
|
11786
11827
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorTitleMobileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11787
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditorTitleMobileComponent, isStandalone: true, selector: "app-nod-editor-title-mobile", usesInheritance: true, ngImport: i0, template: "<div
|
|
11828
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditorTitleMobileComponent, isStandalone: true, selector: "app-nod-editor-title-mobile", usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"showTitle\"\n class=\"menu-header\">\n <div class=\"file-name\">\n <span\n #titleSpan\n class=\"title\"\n matTooltip=\"Double click to rename\"\n (blur)=\"onRenameTitle($event)\"\n (keydown.enter)=\"$event.target.blur()\"\n (click)=\"onFocus($event)\">\n {{ title }}\n </span>\n </div>\n</div>\n<div class=\"editor-mode\">\n <div class=\"circles\">\n <div class=\"circle\"></div>\n <div class=\"circle\"></div>\n <div class=\"circle\"></div>\n </div>\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"modeMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ modeOptions[selectedMode].icon }}\" />\n </button>\n <mat-menu\n #modeMenu=\"matMenu\"\n class=\"noder-editor-title-mobile-menu\"\n yPosition=\"above\">\n <ng-container *ngFor=\"let mode of modeOptions\">\n <button\n *ngIf=\"selectedMode !== mode.id\"\n mat-icon-button\n (click)=\"selectedMode = mode.id; changeMode.emit(mode.id)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ mode.icon }}\" />\n </button>\n </ng-container>\n </mat-menu>\n</div>\n", styles: [":host{display:flex;position:relative;align-items:center;width:100%}.menu-header{width:calc(100% - 48px);line-height:0;z-index:1}.file-name{display:block;margin:0 8px;overflow:hidden}.title{font-size:18px;font-weight:400;line-height:normal;outline:none;display:inline-block;white-space:nowrap;min-width:1px;overflow:hidden;max-width:100%;-webkit-user-select:none;user-select:none}.title:not(:focus){text-overflow:ellipsis}.editor-mode{display:flex;flex-direction:column;position:relative}.circles{display:flex;flex-direction:row;justify-content:center;width:100%;position:absolute;top:-8px}.circle{width:4px;height:4px;border-radius:50%}.circle:not(:last-child){margin-right:5px}.mdc-icon-button{min-width:40px;min-height:40px;width:40px;height:40px;padding:8px}::ng-deep .noder-editor-title-mobile-menu{min-width:auto!important;min-height:auto!important;overflow:hidden!important}::ng-deep .noder-editor-title-mobile-menu .mat-mdc-menu-content{display:flex;flex-direction:column-reverse}::ng-deep .noder-editor-title-mobile-menu .mdc-icon-button{margin-bottom:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$2.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$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11788
11829
|
}
|
|
11789
11830
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorTitleMobileComponent, decorators: [{
|
|
11790
11831
|
type: Component,
|
|
11791
|
-
args: [{ standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule, MatMenuModule], selector: 'app-nod-editor-title-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div
|
|
11832
|
+
args: [{ standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule, MatMenuModule], selector: 'app-nod-editor-title-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"showTitle\"\n class=\"menu-header\">\n <div class=\"file-name\">\n <span\n #titleSpan\n class=\"title\"\n matTooltip=\"Double click to rename\"\n (blur)=\"onRenameTitle($event)\"\n (keydown.enter)=\"$event.target.blur()\"\n (click)=\"onFocus($event)\">\n {{ title }}\n </span>\n </div>\n</div>\n<div class=\"editor-mode\">\n <div class=\"circles\">\n <div class=\"circle\"></div>\n <div class=\"circle\"></div>\n <div class=\"circle\"></div>\n </div>\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"modeMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ modeOptions[selectedMode].icon }}\" />\n </button>\n <mat-menu\n #modeMenu=\"matMenu\"\n class=\"noder-editor-title-mobile-menu\"\n yPosition=\"above\">\n <ng-container *ngFor=\"let mode of modeOptions\">\n <button\n *ngIf=\"selectedMode !== mode.id\"\n mat-icon-button\n (click)=\"selectedMode = mode.id; changeMode.emit(mode.id)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ mode.icon }}\" />\n </button>\n </ng-container>\n </mat-menu>\n</div>\n", styles: [":host{display:flex;position:relative;align-items:center;width:100%}.menu-header{width:calc(100% - 48px);line-height:0;z-index:1}.file-name{display:block;margin:0 8px;overflow:hidden}.title{font-size:18px;font-weight:400;line-height:normal;outline:none;display:inline-block;white-space:nowrap;min-width:1px;overflow:hidden;max-width:100%;-webkit-user-select:none;user-select:none}.title:not(:focus){text-overflow:ellipsis}.editor-mode{display:flex;flex-direction:column;position:relative}.circles{display:flex;flex-direction:row;justify-content:center;width:100%;position:absolute;top:-8px}.circle{width:4px;height:4px;border-radius:50%}.circle:not(:last-child){margin-right:5px}.mdc-icon-button{min-width:40px;min-height:40px;width:40px;height:40px;padding:8px}::ng-deep .noder-editor-title-mobile-menu{min-width:auto!important;min-height:auto!important;overflow:hidden!important}::ng-deep .noder-editor-title-mobile-menu .mat-mdc-menu-content{display:flex;flex-direction:column-reverse}::ng-deep .noder-editor-title-mobile-menu .mdc-icon-button{margin-bottom:10px}\n"] }]
|
|
11792
11833
|
}] });
|
|
11793
11834
|
|
|
11794
11835
|
class EditorSearchDialogComponent extends DestroyComponent {
|
|
@@ -11847,12 +11888,82 @@ var EditorToolbarMode;
|
|
|
11847
11888
|
EditorToolbarMode[EditorToolbarMode["ExternalComponent"] = 6] = "ExternalComponent";
|
|
11848
11889
|
})(EditorToolbarMode || (EditorToolbarMode = {}));
|
|
11849
11890
|
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11891
|
+
class ToolbarCoreService {
|
|
11892
|
+
set mode(value) {
|
|
11893
|
+
this._mode$.next(value);
|
|
11894
|
+
}
|
|
11895
|
+
get mode$() {
|
|
11896
|
+
return this._mode$.asObservable();
|
|
11897
|
+
}
|
|
11898
|
+
set actions(value) {
|
|
11899
|
+
this._actions = value;
|
|
11900
|
+
}
|
|
11901
|
+
get actions() {
|
|
11902
|
+
return this._actions;
|
|
11903
|
+
}
|
|
11904
|
+
set backTitle(value) {
|
|
11905
|
+
this._backTitle = value;
|
|
11906
|
+
}
|
|
11907
|
+
get backTitle() {
|
|
11908
|
+
const currentMode = this.getMode();
|
|
11909
|
+
return currentMode === EditorToolbarMode.Insert || currentMode === EditorToolbarMode.ExternalComponent ? this._backTitle : '';
|
|
11910
|
+
}
|
|
11911
|
+
constructor(editorService) {
|
|
11912
|
+
this.editorService = editorService;
|
|
11913
|
+
this._mode$ = new BehaviorSubject(EditorToolbarMode.Base);
|
|
11914
|
+
}
|
|
11915
|
+
getMode() {
|
|
11916
|
+
return this._mode$.value;
|
|
11917
|
+
}
|
|
11918
|
+
back() {
|
|
11919
|
+
const currentMode = this.getMode();
|
|
11920
|
+
if (currentMode === EditorToolbarMode.Menu || currentMode === EditorToolbarMode.ExternalComponent) {
|
|
11921
|
+
this.reset();
|
|
11922
|
+
}
|
|
11923
|
+
else if (currentMode === EditorToolbarMode.Insert) {
|
|
11924
|
+
this.openBurgerMenu();
|
|
11925
|
+
}
|
|
11926
|
+
else {
|
|
11927
|
+
this._mode$.next(EditorToolbarMode.Base);
|
|
11928
|
+
}
|
|
11929
|
+
}
|
|
11930
|
+
reset() {
|
|
11931
|
+
this.editorService.closeSidenav();
|
|
11932
|
+
this._mode$.next(EditorToolbarMode.Base);
|
|
11933
|
+
}
|
|
11934
|
+
openBurgerMenu() {
|
|
11935
|
+
this.mode = EditorToolbarMode.Menu;
|
|
11936
|
+
this.editorService.openSidenav(MenuDropdownsMobileComponent);
|
|
11937
|
+
}
|
|
11938
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarCoreService, deps: [{ token: EditorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11939
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarCoreService }); }
|
|
11940
|
+
}
|
|
11941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarCoreService, decorators: [{
|
|
11942
|
+
type: Injectable
|
|
11943
|
+
}], ctorParameters: () => [{ type: EditorService }] });
|
|
11944
|
+
|
|
11945
|
+
class MenuDropdownsMobileComponent {
|
|
11946
|
+
constructor(injector, editorService, toolbarCoreService) {
|
|
11947
|
+
this.injector = injector;
|
|
11948
|
+
this.editorService = editorService;
|
|
11949
|
+
this.toolbarCoreService = toolbarCoreService;
|
|
11950
|
+
this.elements = this.injector.get(EXTERNAL_ELEMENT_SERVICE).elements;
|
|
11951
|
+
}
|
|
11952
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsMobileComponent, deps: [{ token: i0.Injector }, { token: EditorService }, { token: ToolbarCoreService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11953
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuDropdownsMobileComponent, selector: "app-nod-menu-dropdowns-mobile", ngImport: i0, template: "<ng-container\n *ngIf=\"{\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <mat-accordion>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>File</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-new\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.new(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\" />\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-open-from\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.openFrom(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\" />\n <span class=\"menu-item-text\">Open From</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-save-as\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.saveAs(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\" />\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-rename\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.rename(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\" />\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-print\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.print(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\" />\n <span class=\"menu-item-text\">Print</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-delete\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.delete(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\" />\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <ng-container *ngIf=\"!data.isViewOnly\">\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Insert</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-image\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertImage(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-table\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n Table\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-link\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertLink()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n <span class=\"menu-item-text\">Link</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-mobile-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertCustomElement(element); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\" />\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-item-headers-footers\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Layout</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-page-break\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertPageBreak(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\" />\n <span class=\"menu-item-text\">Page Break</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Format</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-text-format\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.textFormat()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-text\" />\n <span class=\"menu-item-text\">Text Format</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-header-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n </div>\n </mat-expansion-panel>\n </ng-container>\n </mat-accordion>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;padding:25px}mat-expansion-panel.mat-expansion-panel ::ng-deep{box-shadow:none;border-bottom-width:1px;border-bottom-style:solid}mat-expansion-panel.mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0 18px}mat-panel-description{margin:0;justify-content:flex-end}.mat-expansion-panel-spacing{margin:0}.mat-expansion-panel-header,.mat-expansion-panel-header.mat-expanded{height:48px;padding-right:10px}.mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-description .mat-icon{transform:rotate(180deg)}.heading-menu{display:inline-flex;width:100%}.menu-item-text{white-space:nowrap;align-self:center}.composition-button{display:flex;flex-direction:row;align-items:center;position:relative}.composition-icon{position:absolute;right:0;transform:rotate(270deg)}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$4.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i4$4.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i4$4.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i4$4.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i4$4.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11954
|
+
}
|
|
11955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsMobileComponent, decorators: [{
|
|
11956
|
+
type: Component,
|
|
11957
|
+
args: [{ selector: 'app-nod-menu-dropdowns-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n *ngIf=\"{\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <mat-accordion>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>File</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-new\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.new(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\" />\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-open-from\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.openFrom(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\" />\n <span class=\"menu-item-text\">Open From</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-save-as\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.saveAs(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\" />\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-rename\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.rename(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\" />\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-print\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.print(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\" />\n <span class=\"menu-item-text\">Print</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-delete\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.delete(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\" />\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <ng-container *ngIf=\"!data.isViewOnly\">\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Insert</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-image\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertImage(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-table\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n Table\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-link\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertLink()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n <span class=\"menu-item-text\">Link</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-mobile-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertCustomElement(element); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\" />\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-item-headers-footers\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Layout</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-page-break\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertPageBreak(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\" />\n <span class=\"menu-item-text\">Page Break</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Format</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-text-format\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.textFormat()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-text\" />\n <span class=\"menu-item-text\">Text Format</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-header-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n </div>\n </mat-expansion-panel>\n </ng-container>\n </mat-accordion>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;padding:25px}mat-expansion-panel.mat-expansion-panel ::ng-deep{box-shadow:none;border-bottom-width:1px;border-bottom-style:solid}mat-expansion-panel.mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0 18px}mat-panel-description{margin:0;justify-content:flex-end}.mat-expansion-panel-spacing{margin:0}.mat-expansion-panel-header,.mat-expansion-panel-header.mat-expanded{height:48px;padding-right:10px}.mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-description .mat-icon{transform:rotate(180deg)}.heading-menu{display:inline-flex;width:100%}.menu-item-text{white-space:nowrap;align-self:center}.composition-button{display:flex;flex-direction:row;align-items:center;position:relative}.composition-icon{position:absolute;right:0;transform:rotate(270deg)}.hidden{display:none}\n"] }]
|
|
11958
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: EditorService }, { type: ToolbarCoreService }] });
|
|
11959
|
+
|
|
11960
|
+
var Alignment;
|
|
11961
|
+
(function (Alignment) {
|
|
11962
|
+
Alignment[Alignment["Left"] = 0] = "Left";
|
|
11963
|
+
Alignment[Alignment["Center"] = 1] = "Center";
|
|
11964
|
+
Alignment[Alignment["Right"] = 2] = "Right";
|
|
11965
|
+
Alignment[Alignment["Justify"] = 3] = "Justify";
|
|
11966
|
+
})(Alignment || (Alignment = {}));
|
|
11856
11967
|
|
|
11857
11968
|
var NumberingType;
|
|
11858
11969
|
(function (NumberingType) {
|
|
@@ -12213,14 +12324,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
12213
12324
|
type: Output
|
|
12214
12325
|
}] } });
|
|
12215
12326
|
|
|
12216
|
-
var Alignment;
|
|
12217
|
-
(function (Alignment) {
|
|
12218
|
-
Alignment[Alignment["Left"] = 0] = "Left";
|
|
12219
|
-
Alignment[Alignment["Center"] = 1] = "Center";
|
|
12220
|
-
Alignment[Alignment["Right"] = 2] = "Right";
|
|
12221
|
-
Alignment[Alignment["Justify"] = 3] = "Justify";
|
|
12222
|
-
})(Alignment || (Alignment = {}));
|
|
12223
|
-
|
|
12224
12327
|
class NumberingLevelModel {
|
|
12225
12328
|
constructor(fields) {
|
|
12226
12329
|
if (fields) {
|
|
@@ -13375,11 +13478,155 @@ const NumberingTemplates = [
|
|
|
13375
13478
|
}
|
|
13376
13479
|
];
|
|
13377
13480
|
|
|
13481
|
+
class InsertTableComponent {
|
|
13482
|
+
constructor() {
|
|
13483
|
+
this.selectSizes = new EventEmitter();
|
|
13484
|
+
this.maxRows = 20;
|
|
13485
|
+
this.minRows = 5;
|
|
13486
|
+
this.maxColumns = 20;
|
|
13487
|
+
this.minColumns = 10;
|
|
13488
|
+
this.rows = Array(this.minRows)
|
|
13489
|
+
.fill(undefined)
|
|
13490
|
+
.map((_, i) => i + 1);
|
|
13491
|
+
this.columns = Array(this.minColumns)
|
|
13492
|
+
.fill(undefined)
|
|
13493
|
+
.map((_, i) => i + 1);
|
|
13494
|
+
this.currentRow = 1;
|
|
13495
|
+
this.currentColumn = 1;
|
|
13496
|
+
}
|
|
13497
|
+
onCreateTable(rows, columns) {
|
|
13498
|
+
this.selectSizes.emit({ rows, columns });
|
|
13499
|
+
}
|
|
13500
|
+
onCellHover(row, column) {
|
|
13501
|
+
this.currentRow = row;
|
|
13502
|
+
this.currentColumn = column;
|
|
13503
|
+
this.rows = this.calculateArray(row, this.rows, this.minRows, this.maxRows);
|
|
13504
|
+
this.columns = this.calculateArray(column, this.columns, this.minColumns, this.maxColumns);
|
|
13505
|
+
}
|
|
13506
|
+
calculateArray(currentValue, arrayValues, minValue, maxValue) {
|
|
13507
|
+
if (currentValue >= arrayValues.length && currentValue <= maxValue) {
|
|
13508
|
+
const count = currentValue >= maxValue ? maxValue : arrayValues.length + 1;
|
|
13509
|
+
return Array(count)
|
|
13510
|
+
.fill(undefined)
|
|
13511
|
+
.map((_, i) => i + 1);
|
|
13512
|
+
}
|
|
13513
|
+
else if (currentValue < arrayValues.length && arrayValues.length > minValue) {
|
|
13514
|
+
const count = currentValue <= minValue ? minValue + 1 : arrayValues.length - (arrayValues.length - currentValue) + 1;
|
|
13515
|
+
return Array(count)
|
|
13516
|
+
.fill(undefined)
|
|
13517
|
+
.map((_, i) => i + 1);
|
|
13518
|
+
}
|
|
13519
|
+
return arrayValues;
|
|
13520
|
+
}
|
|
13521
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InsertTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13522
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InsertTableComponent, isStandalone: true, selector: "app-nod-insert-table", outputs: { selectSizes: "selectSizes" }, ngImport: i0, template: "<div class=\"table-size-container\">\n <ng-container *ngFor=\"let row of rows\">\n <div class=\"row\">\n <ng-container *ngFor=\"let column of columns\">\n <div\n class=\"cell-container\"\n (mouseenter)=\"onCellHover(row, column)\"\n (click)=\"onCreateTable(row, column)\">\n <div\n class=\"cell\"\n [class.highlighted]=\"row <= currentRow && column <= currentColumn\"></div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"table-size\">{{ currentColumn }} x {{ currentRow }}</div>\n</div>\n", styles: [":host{border-radius:4px}.table-size-container{padding:14px 10px 8px}.row{display:flex;flex-direction:row}.cell-container{padding:2px}.cell{height:16px;width:16px}.table-size{display:flex;justify-content:center;padding-top:14px;font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13523
|
+
}
|
|
13524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InsertTableComponent, decorators: [{
|
|
13525
|
+
type: Component,
|
|
13526
|
+
args: [{ standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-insert-table', template: "<div class=\"table-size-container\">\n <ng-container *ngFor=\"let row of rows\">\n <div class=\"row\">\n <ng-container *ngFor=\"let column of columns\">\n <div\n class=\"cell-container\"\n (mouseenter)=\"onCellHover(row, column)\"\n (click)=\"onCreateTable(row, column)\">\n <div\n class=\"cell\"\n [class.highlighted]=\"row <= currentRow && column <= currentColumn\"></div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"table-size\">{{ currentColumn }} x {{ currentRow }}</div>\n</div>\n", styles: [":host{border-radius:4px}.table-size-container{padding:14px 10px 8px}.row{display:flex;flex-direction:row}.cell-container{padding:2px}.cell{height:16px;width:16px}.table-size{display:flex;justify-content:center;padding-top:14px;font-size:14px}\n"] }]
|
|
13527
|
+
}], propDecorators: { selectSizes: [{
|
|
13528
|
+
type: Output
|
|
13529
|
+
}] } });
|
|
13530
|
+
|
|
13531
|
+
class MenuDropdownsComponent extends BaseToolbarComponent {
|
|
13532
|
+
constructor(customIconService, injector, cdr, editorService) {
|
|
13533
|
+
super(customIconService, injector, cdr, editorService);
|
|
13534
|
+
this.cdr = cdr;
|
|
13535
|
+
this.editorService = editorService;
|
|
13536
|
+
this.showFile = true;
|
|
13537
|
+
this.showEdit = true;
|
|
13538
|
+
this.showInsert = true;
|
|
13539
|
+
this.showLayout = true;
|
|
13540
|
+
this.showFormat = true;
|
|
13541
|
+
this.openFileFromDisk = new EventEmitter();
|
|
13542
|
+
this.addCustomElement = new EventEmitter();
|
|
13543
|
+
this.saveAs = new EventEmitter();
|
|
13544
|
+
this.insertPageBreak = new EventEmitter();
|
|
13545
|
+
this.createDocument = new EventEmitter();
|
|
13546
|
+
this.rename = new EventEmitter();
|
|
13547
|
+
this.delete = new EventEmitter();
|
|
13548
|
+
this.openEditMenu = new EventEmitter();
|
|
13549
|
+
this.cutSelected = new EventEmitter();
|
|
13550
|
+
this.copySelected = new EventEmitter();
|
|
13551
|
+
this.pasteClipboardData = new EventEmitter();
|
|
13552
|
+
this.selectAll = new EventEmitter();
|
|
13553
|
+
this.removeSelected = new EventEmitter();
|
|
13554
|
+
this.showInsertTableMenu = false;
|
|
13555
|
+
this.numberingTemplateTypes = NumberingTemplateType;
|
|
13556
|
+
this.alignments = Alignment;
|
|
13557
|
+
}
|
|
13558
|
+
onSelectFormat(alignment) {
|
|
13559
|
+
this.changeParagraphStyle.emit(new ParagraphStyleModel({ alignment }));
|
|
13560
|
+
}
|
|
13561
|
+
onSelectNumberingTemplate(numberingTemplateType) {
|
|
13562
|
+
if (this.numberingTemplateType === numberingTemplateType) {
|
|
13563
|
+
this.removeNumberings.emit();
|
|
13564
|
+
}
|
|
13565
|
+
else {
|
|
13566
|
+
const templateLevels = NumberingTemplates.find(x => x.templateType === numberingTemplateType).levels;
|
|
13567
|
+
this.setNumberingTemplateType.emit(templateLevels);
|
|
13568
|
+
}
|
|
13569
|
+
}
|
|
13570
|
+
onTableInsertMenuClosed() {
|
|
13571
|
+
this.tableInsertMenu._animationDone
|
|
13572
|
+
.pipe(filter(x => x.toState === 'void'), take(1))
|
|
13573
|
+
.subscribe(() => {
|
|
13574
|
+
this.showInsertTableMenu = false;
|
|
13575
|
+
this.cdr.markForCheck();
|
|
13576
|
+
});
|
|
13577
|
+
}
|
|
13578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsComponent, deps: [{ token: CustomIconService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13579
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuDropdownsComponent, selector: "app-nod-menu-dropdowns", inputs: { showFile: "showFile", showEdit: "showEdit", showInsert: "showInsert", showLayout: "showLayout", showFormat: "showFormat" }, outputs: { openFileFromDisk: "openFileFromDisk", addCustomElement: "addCustomElement", saveAs: "saveAs", insertPageBreak: "insertPageBreak", createDocument: "createDocument", rename: "rename", delete: "delete", openEditMenu: "openEditMenu", cutSelected: "cutSelected", copySelected: "copySelected", pasteClipboardData: "pasteClipboardData", selectAll: "selectAll", removeSelected: "removeSelected" }, viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n *ngIf=\"showFile\"\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n File\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"createDocument.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"openFileFromDisk.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">Open From</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n *ngIf=\"saveAs.observed\"\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n *ngIf=\"rename.observed\"\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n *ngIf=\"print.observed\"\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">Print</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n *ngIf=\"delete.observed\"\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showEdit\"\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n Edit\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"undo.observed\"\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">Undo</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n *ngIf=\"redo.observed\"\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">Redo</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"cutSelected.observed\"\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">Cut</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n *ngIf=\"copySelected.observed\"\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">Copy</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n *ngIf=\"pasteClipboardData.observed\"\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"!data.clipboardData?.length\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">Paste</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"selectAll.observed\"\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">Select All</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n *ngIf=\"removeSelected.observed\"\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showInsert && !data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Insert\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertImage.observed\"\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n Table\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"insertLink.observed\"\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">Link</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">Header</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">Footer</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"showLayout && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Layout\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertPageBreak.observed\"\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">Page Break</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showFormat && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Format\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Align</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Left</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">Center</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">Right</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullets & Numbering</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullet List Menu</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">Numbered List Menu</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Text</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Bold</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">Italic</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">Underlined</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n </mat-menu>\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</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.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$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13580
|
+
}
|
|
13581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsComponent, decorators: [{
|
|
13582
|
+
type: Component,
|
|
13583
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-menu-dropdowns', template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n *ngIf=\"showFile\"\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n File\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"createDocument.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"openFileFromDisk.observed && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">Open From</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n *ngIf=\"saveAs.observed\"\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n *ngIf=\"rename.observed\"\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n *ngIf=\"print.observed\"\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">Print</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n *ngIf=\"delete.observed\"\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showEdit\"\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n Edit\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"undo.observed\"\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">Undo</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n *ngIf=\"redo.observed\"\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">Redo</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"cutSelected.observed\"\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">Cut</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n *ngIf=\"copySelected.observed\"\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">Copy</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n *ngIf=\"pasteClipboardData.observed\"\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"!data.clipboardData?.length\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">Paste</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"selectAll.observed\"\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">Select All</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n *ngIf=\"removeSelected.observed\"\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showInsert && !data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Insert\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertImage.observed\"\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n Table\n </button>\n <hr class=\"noder-divider\" />\n <button\n *ngIf=\"insertLink.observed\"\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">Link</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">Header</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">Footer</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"showLayout && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Layout\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"insertPageBreak.observed\"\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">Page Break</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"showFormat && !data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Format\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Align</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Left</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">Center</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">Right</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullets & Numbering</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullet List Menu</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">Numbered List Menu</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Text</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Bold</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">Italic</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">Underlined</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n </mat-menu>\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</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\n"] }]
|
|
13584
|
+
}], ctorParameters: () => [{ type: CustomIconService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: EditorService }], propDecorators: { showFile: [{
|
|
13585
|
+
type: Input
|
|
13586
|
+
}], showEdit: [{
|
|
13587
|
+
type: Input
|
|
13588
|
+
}], showInsert: [{
|
|
13589
|
+
type: Input
|
|
13590
|
+
}], showLayout: [{
|
|
13591
|
+
type: Input
|
|
13592
|
+
}], showFormat: [{
|
|
13593
|
+
type: Input
|
|
13594
|
+
}], openFileFromDisk: [{
|
|
13595
|
+
type: Output
|
|
13596
|
+
}], addCustomElement: [{
|
|
13597
|
+
type: Output
|
|
13598
|
+
}], saveAs: [{
|
|
13599
|
+
type: Output
|
|
13600
|
+
}], insertPageBreak: [{
|
|
13601
|
+
type: Output
|
|
13602
|
+
}], createDocument: [{
|
|
13603
|
+
type: Output
|
|
13604
|
+
}], rename: [{
|
|
13605
|
+
type: Output
|
|
13606
|
+
}], delete: [{
|
|
13607
|
+
type: Output
|
|
13608
|
+
}], openEditMenu: [{
|
|
13609
|
+
type: Output
|
|
13610
|
+
}], cutSelected: [{
|
|
13611
|
+
type: Output
|
|
13612
|
+
}], copySelected: [{
|
|
13613
|
+
type: Output
|
|
13614
|
+
}], pasteClipboardData: [{
|
|
13615
|
+
type: Output
|
|
13616
|
+
}], selectAll: [{
|
|
13617
|
+
type: Output
|
|
13618
|
+
}], removeSelected: [{
|
|
13619
|
+
type: Output
|
|
13620
|
+
}], tableInsertMenu: [{
|
|
13621
|
+
type: ViewChild,
|
|
13622
|
+
args: ['tableInsert']
|
|
13623
|
+
}] } });
|
|
13624
|
+
|
|
13378
13625
|
class FontComponent {
|
|
13379
13626
|
constructor() {
|
|
13380
13627
|
this.isDisabled = false;
|
|
13381
13628
|
this.selectFont = new EventEmitter();
|
|
13382
|
-
this.fonts = [
|
|
13629
|
+
this.fonts = ['Arial', DEFAULT_FONT_FAMILY, 'Times New Roman', 'Verdana'];
|
|
13383
13630
|
this.font = DEFAULT_FONT_FAMILY;
|
|
13384
13631
|
}
|
|
13385
13632
|
set styles(value) {
|
|
@@ -13488,56 +13735,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
13488
13735
|
args: ['auto']
|
|
13489
13736
|
}] } });
|
|
13490
13737
|
|
|
13491
|
-
class InsertTableComponent {
|
|
13492
|
-
constructor() {
|
|
13493
|
-
this.selectSizes = new EventEmitter();
|
|
13494
|
-
this.maxRows = 20;
|
|
13495
|
-
this.minRows = 5;
|
|
13496
|
-
this.maxColumns = 20;
|
|
13497
|
-
this.minColumns = 10;
|
|
13498
|
-
this.rows = Array(this.minRows)
|
|
13499
|
-
.fill(undefined)
|
|
13500
|
-
.map((_, i) => i + 1);
|
|
13501
|
-
this.columns = Array(this.minColumns)
|
|
13502
|
-
.fill(undefined)
|
|
13503
|
-
.map((_, i) => i + 1);
|
|
13504
|
-
this.currentRow = 1;
|
|
13505
|
-
this.currentColumn = 1;
|
|
13506
|
-
}
|
|
13507
|
-
onCreateTable(rows, columns) {
|
|
13508
|
-
this.selectSizes.emit({ rows, columns });
|
|
13509
|
-
}
|
|
13510
|
-
onCellHover(row, column) {
|
|
13511
|
-
this.currentRow = row;
|
|
13512
|
-
this.currentColumn = column;
|
|
13513
|
-
this.rows = this.calculateArray(row, this.rows, this.minRows, this.maxRows);
|
|
13514
|
-
this.columns = this.calculateArray(column, this.columns, this.minColumns, this.maxColumns);
|
|
13515
|
-
}
|
|
13516
|
-
calculateArray(currentValue, arrayValues, minValue, maxValue) {
|
|
13517
|
-
if (currentValue >= arrayValues.length && currentValue <= maxValue) {
|
|
13518
|
-
const count = currentValue >= maxValue ? maxValue : arrayValues.length + 1;
|
|
13519
|
-
return Array(count)
|
|
13520
|
-
.fill(undefined)
|
|
13521
|
-
.map((_, i) => i + 1);
|
|
13522
|
-
}
|
|
13523
|
-
else if (currentValue < arrayValues.length && arrayValues.length > minValue) {
|
|
13524
|
-
const count = currentValue <= minValue ? minValue + 1 : arrayValues.length - (arrayValues.length - currentValue) + 1;
|
|
13525
|
-
return Array(count)
|
|
13526
|
-
.fill(undefined)
|
|
13527
|
-
.map((_, i) => i + 1);
|
|
13528
|
-
}
|
|
13529
|
-
return arrayValues;
|
|
13530
|
-
}
|
|
13531
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InsertTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13532
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InsertTableComponent, isStandalone: true, selector: "app-nod-insert-table", outputs: { selectSizes: "selectSizes" }, ngImport: i0, template: "<div class=\"table-size-container\">\n <ng-container *ngFor=\"let row of rows\">\n <div class=\"row\">\n <ng-container *ngFor=\"let column of columns\">\n <div\n class=\"cell-container\"\n (mouseenter)=\"onCellHover(row, column)\"\n (click)=\"onCreateTable(row, column)\">\n <div\n class=\"cell\"\n [class.highlighted]=\"row <= currentRow && column <= currentColumn\"></div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"table-size\">{{ currentColumn }} x {{ currentRow }}</div>\n</div>\n", styles: [":host{border-radius:4px}.table-size-container{padding:14px 10px 8px}.row{display:flex;flex-direction:row}.cell-container{padding:2px}.cell{height:16px;width:16px}.table-size{display:flex;justify-content:center;padding-top:14px;font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13533
|
-
}
|
|
13534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InsertTableComponent, decorators: [{
|
|
13535
|
-
type: Component,
|
|
13536
|
-
args: [{ standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-insert-table', template: "<div class=\"table-size-container\">\n <ng-container *ngFor=\"let row of rows\">\n <div class=\"row\">\n <ng-container *ngFor=\"let column of columns\">\n <div\n class=\"cell-container\"\n (mouseenter)=\"onCellHover(row, column)\"\n (click)=\"onCreateTable(row, column)\">\n <div\n class=\"cell\"\n [class.highlighted]=\"row <= currentRow && column <= currentColumn\"></div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"table-size\">{{ currentColumn }} x {{ currentRow }}</div>\n</div>\n", styles: [":host{border-radius:4px}.table-size-container{padding:14px 10px 8px}.row{display:flex;flex-direction:row}.cell-container{padding:2px}.cell{height:16px;width:16px}.table-size{display:flex;justify-content:center;padding-top:14px;font-size:14px}\n"] }]
|
|
13537
|
-
}], propDecorators: { selectSizes: [{
|
|
13538
|
-
type: Output
|
|
13539
|
-
}] } });
|
|
13540
|
-
|
|
13541
13738
|
class ColorPickerComponent {
|
|
13542
13739
|
constructor() {
|
|
13543
13740
|
this.colorChange = new EventEmitter();
|
|
@@ -13786,74 +13983,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
13786
13983
|
args: ['tableInsert']
|
|
13787
13984
|
}] } });
|
|
13788
13985
|
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
|
|
13795
|
-
}
|
|
13796
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsMobileComponent, deps: [{ token: i0.Injector }, { token: EditorService }, { token: ToolbarCoreService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13797
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuDropdownsMobileComponent, selector: "app-nod-menu-dropdowns-mobile", ngImport: i0, template: "<ng-container\n *ngIf=\"{\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <mat-accordion>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>File</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-new\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.new(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\" />\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-open-from\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.openFrom(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\" />\n <span class=\"menu-item-text\">Open From</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-save-as\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.saveAs(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\" />\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-rename\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.rename(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\" />\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-print\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.print(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\" />\n <span class=\"menu-item-text\">Print</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-delete\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.delete(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\" />\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <ng-container *ngIf=\"!data.isViewOnly\">\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Insert</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-image\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertImage(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-table\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n Table\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-link\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertLink()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n <span class=\"menu-item-text\">Link</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-mobile-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertCustomElement(element); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\" />\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-item-headers-footers\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Layout</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-page-break\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertPageBreak(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\" />\n <span class=\"menu-item-text\">Page Break</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Format</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-text-format\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.textFormat()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-text\" />\n <span class=\"menu-item-text\">Text Format</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-header-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n </div>\n </mat-expansion-panel>\n </ng-container>\n </mat-accordion>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;padding:25px}mat-expansion-panel.mat-expansion-panel ::ng-deep{box-shadow:none;border-bottom-width:1px;border-bottom-style:solid}mat-expansion-panel.mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0 18px}mat-panel-description{margin:0;justify-content:flex-end}.mat-expansion-panel-spacing{margin:0}.mat-expansion-panel-header,.mat-expansion-panel-header.mat-expanded{height:48px;padding-right:10px}.mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-description .mat-icon{transform:rotate(180deg)}.heading-menu{display:inline-flex;width:100%}.menu-item-text{white-space:nowrap;align-self:center}.composition-button{display:flex;flex-direction:row;align-items:center;position:relative}.composition-icon{position:absolute;right:0;transform:rotate(270deg)}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$4.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i4$4.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i4$4.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i4$4.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i4$4.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13798
|
-
}
|
|
13799
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsMobileComponent, decorators: [{
|
|
13800
|
-
type: Component,
|
|
13801
|
-
args: [{ selector: 'app-nod-menu-dropdowns-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n *ngIf=\"{\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <mat-accordion>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>File</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-new\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.new(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\" />\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-mobile-item-open-from\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.openFrom(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\" />\n <span class=\"menu-item-text\">Open From</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-save-as\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.saveAs(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\" />\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-rename\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.rename(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\" />\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-print\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.print(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\" />\n <span class=\"menu-item-text\">Print</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-mobile-item-delete\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.delete(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\" />\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <ng-container *ngIf=\"!data.isViewOnly\">\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Insert</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-image\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertImage(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\" />\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-table\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\" />\n Table\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-item-link\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertLink()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\" />\n <span class=\"menu-item-text\">Link</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-mobile-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertCustomElement(element); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\" />\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-item-headers-footers\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </div>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Layout</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <button\n id=\"menu-dropdowns-mobile-item-page-break\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.insertPageBreak(); toolbarCoreService.reset()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\" />\n <span class=\"menu-item-text\">Page Break</span>\n </div>\n </button>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel hideToggle>\n <mat-expansion-panel-header>\n <mat-panel-title>Format</mat-panel-title>\n <mat-panel-description>\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </mat-panel-description>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-content\">\n <div class=\"composition-button\">\n <button\n id=\"menu-dropdowns-mobile-text-format\"\n mat-menu-item\n (click)=\"toolbarCoreService.actions.textFormat()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-text\" />\n <span class=\"menu-item-text\">Text Format</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n <div class=\"composition-button hidden\">\n <button\n id=\"menu-dropdowns-mobile-header-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\" />\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n <mat-icon\n class=\"composition-icon\"\n fontSet=\"noder-icon\"\n fontIcon=\"icon-arrow-dropdown\" />\n </button>\n </div>\n </div>\n </mat-expansion-panel>\n </ng-container>\n </mat-accordion>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;padding:25px}mat-expansion-panel.mat-expansion-panel ::ng-deep{box-shadow:none;border-bottom-width:1px;border-bottom-style:solid}mat-expansion-panel.mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0 18px}mat-panel-description{margin:0;justify-content:flex-end}.mat-expansion-panel-spacing{margin:0}.mat-expansion-panel-header,.mat-expansion-panel-header.mat-expanded{height:48px;padding-right:10px}.mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-description .mat-icon{transform:rotate(180deg)}.heading-menu{display:inline-flex;width:100%}.menu-item-text{white-space:nowrap;align-self:center}.composition-button{display:flex;flex-direction:row;align-items:center;position:relative}.composition-icon{position:absolute;right:0;transform:rotate(270deg)}.hidden{display:none}\n"] }]
|
|
13802
|
-
}], ctorParameters: () => [{ type: i0.Injector }, { type: EditorService }, { type: ToolbarCoreService }] });
|
|
13803
|
-
|
|
13804
|
-
class ToolbarCoreService {
|
|
13805
|
-
set mode(value) {
|
|
13806
|
-
this._mode$.next(value);
|
|
13807
|
-
}
|
|
13808
|
-
get mode$() {
|
|
13809
|
-
return this._mode$.asObservable();
|
|
13810
|
-
}
|
|
13811
|
-
set actions(value) {
|
|
13812
|
-
this._actions = value;
|
|
13813
|
-
}
|
|
13814
|
-
get actions() {
|
|
13815
|
-
return this._actions;
|
|
13816
|
-
}
|
|
13817
|
-
set backTitle(value) {
|
|
13818
|
-
this._backTitle = value;
|
|
13819
|
-
}
|
|
13820
|
-
get backTitle() {
|
|
13821
|
-
const currentMode = this.getMode();
|
|
13822
|
-
return currentMode === EditorToolbarMode.Insert || currentMode === EditorToolbarMode.ExternalComponent ? this._backTitle : '';
|
|
13823
|
-
}
|
|
13824
|
-
constructor(editorService) {
|
|
13825
|
-
this.editorService = editorService;
|
|
13826
|
-
this._mode$ = new BehaviorSubject(EditorToolbarMode.Base);
|
|
13827
|
-
}
|
|
13828
|
-
getMode() {
|
|
13829
|
-
return this._mode$.value;
|
|
13830
|
-
}
|
|
13831
|
-
back() {
|
|
13832
|
-
const currentMode = this.getMode();
|
|
13833
|
-
if (currentMode === EditorToolbarMode.Menu || currentMode === EditorToolbarMode.ExternalComponent) {
|
|
13834
|
-
this.reset();
|
|
13835
|
-
}
|
|
13836
|
-
else if (currentMode === EditorToolbarMode.Insert) {
|
|
13837
|
-
this.openBurgerMenu();
|
|
13838
|
-
}
|
|
13839
|
-
else {
|
|
13840
|
-
this._mode$.next(EditorToolbarMode.Base);
|
|
13841
|
-
}
|
|
13842
|
-
}
|
|
13843
|
-
reset() {
|
|
13844
|
-
this.editorService.closeSidenav();
|
|
13845
|
-
this._mode$.next(EditorToolbarMode.Base);
|
|
13846
|
-
}
|
|
13847
|
-
openBurgerMenu() {
|
|
13848
|
-
this.mode = EditorToolbarMode.Menu;
|
|
13849
|
-
this.editorService.openSidenav(MenuDropdownsMobileComponent);
|
|
13850
|
-
}
|
|
13851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarCoreService, deps: [{ token: EditorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13852
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarCoreService }); }
|
|
13853
|
-
}
|
|
13854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarCoreService, decorators: [{
|
|
13855
|
-
type: Injectable
|
|
13856
|
-
}], ctorParameters: () => [{ type: EditorService }] });
|
|
13986
|
+
const ACTIONS_MENU_MODS = [
|
|
13987
|
+
EditorToolbarMode.Base,
|
|
13988
|
+
EditorToolbarMode.AlignFormat,
|
|
13989
|
+
EditorToolbarMode.StyleFormat,
|
|
13990
|
+
EditorToolbarMode.TextFormat
|
|
13991
|
+
];
|
|
13857
13992
|
|
|
13858
13993
|
class EditorMobileToolbarComponent extends ToolbarActionsComponent {
|
|
13859
13994
|
constructor(cdr, customIconService, editorService, injector, toolbarCoreService) {
|
|
@@ -13923,85 +14058,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
13923
14058
|
type: Output
|
|
13924
14059
|
}] } });
|
|
13925
14060
|
|
|
13926
|
-
class MenuDropdownsComponent extends BaseToolbarComponent {
|
|
13927
|
-
constructor(customIconService, injector, cdr, editorService) {
|
|
13928
|
-
super(customIconService, injector, cdr, editorService);
|
|
13929
|
-
this.cdr = cdr;
|
|
13930
|
-
this.editorService = editorService;
|
|
13931
|
-
this.openFileFromDisk = new EventEmitter();
|
|
13932
|
-
this.addCustomElement = new EventEmitter();
|
|
13933
|
-
this.saveAs = new EventEmitter();
|
|
13934
|
-
this.insertPageBreak = new EventEmitter();
|
|
13935
|
-
this.createDocument = new EventEmitter();
|
|
13936
|
-
this.rename = new EventEmitter();
|
|
13937
|
-
this.delete = new EventEmitter();
|
|
13938
|
-
this.openEditMenu = new EventEmitter();
|
|
13939
|
-
this.cutSelected = new EventEmitter();
|
|
13940
|
-
this.copySelected = new EventEmitter();
|
|
13941
|
-
this.pasteClipboardData = new EventEmitter();
|
|
13942
|
-
this.selectAll = new EventEmitter();
|
|
13943
|
-
this.removeSelected = new EventEmitter();
|
|
13944
|
-
this.showInsertTableMenu = false;
|
|
13945
|
-
this.numberingTemplateTypes = NumberingTemplateType;
|
|
13946
|
-
this.alignments = Alignment;
|
|
13947
|
-
}
|
|
13948
|
-
onSelectFormat(alignment) {
|
|
13949
|
-
this.changeParagraphStyle.emit(new ParagraphStyleModel({ alignment }));
|
|
13950
|
-
}
|
|
13951
|
-
onSelectNumberingTemplate(numberingTemplateType) {
|
|
13952
|
-
if (this.numberingTemplateType === numberingTemplateType) {
|
|
13953
|
-
this.removeNumberings.emit();
|
|
13954
|
-
}
|
|
13955
|
-
else {
|
|
13956
|
-
const templateLevels = NumberingTemplates.find(x => x.templateType === numberingTemplateType).levels;
|
|
13957
|
-
this.setNumberingTemplateType.emit(templateLevels);
|
|
13958
|
-
}
|
|
13959
|
-
}
|
|
13960
|
-
onTableInsertMenuClosed() {
|
|
13961
|
-
this.tableInsertMenu._animationDone
|
|
13962
|
-
.pipe(filter(x => x.toState === 'void'), take(1))
|
|
13963
|
-
.subscribe(() => {
|
|
13964
|
-
this.showInsertTableMenu = false;
|
|
13965
|
-
this.cdr.markForCheck();
|
|
13966
|
-
});
|
|
13967
|
-
}
|
|
13968
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsComponent, deps: [{ token: CustomIconService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13969
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuDropdownsComponent, selector: "app-nod-menu-dropdowns", outputs: { openFileFromDisk: "openFileFromDisk", addCustomElement: "addCustomElement", saveAs: "saveAs", insertPageBreak: "insertPageBreak", createDocument: "createDocument", rename: "rename", delete: "delete", openEditMenu: "openEditMenu", cutSelected: "cutSelected", copySelected: "copySelected", pasteClipboardData: "pasteClipboardData", selectAll: "selectAll", removeSelected: "removeSelected" }, viewQueries: [{ propertyName: "tableInsertMenu", first: true, predicate: ["tableInsert"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n File\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">Open From</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">Print</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n Edit\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">Undo</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">Redo</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">Cut</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">Copy</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"!data.clipboardData?.length\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">Paste</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">Select All</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"!data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Insert\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n Table\n </button>\n <hr class=\"noder-divider\" />\n <button\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">Link</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">Header</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">Footer</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Layout\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">Page Break</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Format\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Align</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Left</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">Center</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">Right</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullets & Numbering</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullet List Menu</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">Numbered List Menu</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Text</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Bold</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">Italic</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">Underlined</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n </mat-menu>\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</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.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$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13970
|
-
}
|
|
13971
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDropdownsComponent, decorators: [{
|
|
13972
|
-
type: Component,
|
|
13973
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-nod-menu-dropdowns', template: "<ng-container\n *ngIf=\"{\n clipboardData: editorService.clipboardData$ | async,\n hasSelection: editorService.hasSelection$ | async,\n isViewOnly: editorService.isViewOnly$ | async\n } as data\">\n <button\n id=\"menu-dropdowns-menu-file\"\n mat-button\n [matMenuTriggerFor]=\"fileMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n File\n </button>\n <mat-menu\n #fileMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-new\"\n mat-menu-item\n (click)=\"createDocument.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add-new\"></mat-icon>\n <span class=\"menu-item-text\">New</span>\n </div>\n </button>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-item-open-from\"\n mat-menu-item\n (click)=\"openFileFromDisk.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-open-from\"></mat-icon>\n <span class=\"menu-item-text\">Open From</span>\n <span class=\"hot-keys\">Ctrl+O</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-save-as\"\n mat-menu-item\n (click)=\"saveAs.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-save\"></mat-icon>\n <span class=\"menu-item-text\">Save As</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-rename\"\n mat-menu-item\n (click)=\"rename.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-rename\"></mat-icon>\n <span class=\"menu-item-text\">Rename</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-print\"\n mat-menu-item\n (click)=\"print.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-print\"></mat-icon>\n <span class=\"menu-item-text\">Print</span>\n <span class=\"hot-keys\">Ctrl+P</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-delete\"\n mat-menu-item\n (click)=\"delete.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-edit\"\n mat-button\n [matMenuTriggerFor]=\"editMenu\"\n [matMenuTriggerRestoreFocus]=\"false\"\n (menuOpened)=\"openEditMenu.emit()\">\n Edit\n </button>\n <mat-menu\n #editMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-undo\"\n mat-menu-item\n [disabled]=\"!canUndo\"\n (click)=\"undo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-undo\"></mat-icon>\n <span class=\"menu-item-text\">Undo</span>\n <span class=\"hot-keys\">Ctrl+Z</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-redo\"\n mat-menu-item\n [disabled]=\"!canRedo\"\n (click)=\"redo.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-redo\"></mat-icon>\n <span class=\"menu-item-text\">Redo</span>\n <span class=\"hot-keys\">Ctrl+Y</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n id=\"menu-dropdowns-menu-item-cut\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"cutSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-cut\"></mat-icon>\n <span class=\"menu-item-text\">Cut</span>\n <span class=\"hot-keys\">Ctrl+X</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-copy\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"copySelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-file-copy\"></mat-icon>\n <span class=\"menu-item-text\">Copy</span>\n <span class=\"hot-keys\">Ctrl+C</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-paste\"\n mat-menu-item\n [disabled]=\"!data.clipboardData?.length\"\n (click)=\"pasteClipboardData.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-content-paste\"></mat-icon>\n <span class=\"menu-item-text\">Paste</span>\n <span class=\"hot-keys\">Ctrl+V</span>\n </div>\n </button>\n <hr class=\"noder-divider\" />\n <button\n id=\"menu-dropdowns-menu-item-select-all\"\n mat-menu-item\n (click)=\"selectAll.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-select-all\"></mat-icon>\n <span class=\"menu-item-text\">Select All</span>\n <span class=\"hot-keys\">Ctrl+A</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-delete-text\"\n mat-menu-item\n [disabled]=\"!data.hasSelection\"\n (click)=\"removeSelected.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n <span class=\"menu-item-text\">Delete</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"!data.isViewOnly\"\n #insertMenuTrigger=\"matMenuTrigger\"\n id=\"menu-dropdowns-menu-insert\"\n mat-button\n [matMenuTriggerFor]=\"insertMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Insert\n </button>\n <mat-menu\n #insertMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-image\"\n mat-menu-item\n (click)=\"insertImage.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-image\"></mat-icon>\n <span class=\"menu-item-text\">Image</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-table\"\n mat-menu-item\n [matMenuTriggerFor]=\"tableInsert\"\n (menuOpened)=\"showInsertTableMenu = true\"\n (menuClosed)=\"onTableInsertMenuClosed()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-table\"></mat-icon>\n Table\n </button>\n <hr class=\"noder-divider\" />\n <button\n id=\"menu-dropdowns-menu-item-link\"\n mat-menu-item\n (click)=\"insertLink.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-link-on\"></mat-icon>\n <span class=\"menu-item-text\">Link</span>\n <span class=\"hot-keys\">Ctrl+K</span>\n </div>\n </button>\n <button\n *ngFor=\"let element of elements\"\n id=\"menu-dropdowns-menu-item-{{ element.title }}\"\n mat-menu-item\n (click)=\"onCreateElement(element)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"{{ element.icon }}\"></mat-icon>\n <span class=\"menu-item-text\">{{ element.name }}</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-headers-footers\"\n mat-menu-item\n class=\"hidden\"\n [matMenuTriggerFor]=\"listHeadersFootersMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n <mat-menu\n #listHeadersFootersMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-header\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-header\"></mat-icon>\n <span class=\"menu-item-text\">Header</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-footer\"\n mat-menu-item>\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-bottom\"></mat-icon>\n <span class=\"menu-item-text\">Footer</span>\n </div>\n </button>\n </mat-menu>\n </mat-menu>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-layout\"\n mat-button\n [matMenuTriggerFor]=\"layoutMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Layout\n </button>\n <mat-menu\n #layoutMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-page-break\"\n mat-menu-item\n (click)=\"insertPageBreak.emit()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-page-break\"></mat-icon>\n <span class=\"menu-item-text\">Page Break</span>\n <span class=\"hot-keys\">Ctrl+Enter</span>\n </div>\n </button>\n </mat-menu>\n <button\n *ngIf=\"!data.isViewOnly\"\n id=\"menu-dropdowns-menu-format\"\n mat-button\n [matMenuTriggerFor]=\"formatMenu\"\n [matMenuTriggerRestoreFocus]=\"false\">\n Format\n </button>\n <mat-menu\n #formatMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align\"\n mat-menu-item\n [matMenuTriggerFor]=\"listAlignMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Align</span>\n </div>\n </button>\n <mat-menu\n #listAlignMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-align-left\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Left)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignleft\"></mat-icon>\n <span class=\"menu-item-text\">Left</span>\n <span class=\"hot-keys\">Ctrl+L</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-center\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Center)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-aligncenter\"></mat-icon>\n <span class=\"menu-item-text\">Center</span>\n <span class=\"hot-keys\">Ctrl+E</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-align-right\"\n mat-menu-item\n (click)=\"onSelectFormat(alignments.Right)\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-alignright\"></mat-icon>\n <span class=\"menu-item-text\">Right</span>\n <span class=\"hot-keys\">Ctrl+R</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-bullets-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletsNumberingMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullets & Numbering</span>\n </div>\n </button>\n <mat-menu\n #listBulletsNumberingMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bullets\"\n mat-menu-item\n [matMenuTriggerFor]=\"listBulletedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bulleted\"></mat-icon>\n <span class=\"menu-item-text\">Bullet List Menu</span>\n </div>\n </button>\n <mat-menu\n #listBulletedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-marker\">\n <mat-icon\n svgIcon=\"marker-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"marker-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.BulletList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.BulletList6)\"></mat-icon>\n </div>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-numbering\"\n mat-menu-item\n [matMenuTriggerFor]=\"listNumberedMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-numbered\"></mat-icon>\n <span class=\"menu-item-text\">Numbered List Menu</span>\n </div>\n </button>\n <mat-menu\n #listNumberedMenu=\"matMenu\"\n class=\"dropdown-numbering-overlay noder-modal\"\n yPosition=\"below\">\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-1\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList1\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList1)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-2\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList2\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList2)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-3\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList3\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList3)\"></mat-icon>\n </div>\n <div class=\"list-icon list-number\">\n <mat-icon\n svgIcon=\"number-4\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList4\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList4)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-5\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList5\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList5)\"></mat-icon>\n <mat-icon\n svgIcon=\"number-6\"\n [class.selected]=\"numberingTemplateType === numberingTemplateTypes.NumberList6\"\n (click)=\"onSelectNumberingTemplate(numberingTemplateTypes.NumberList6)\"></mat-icon>\n </div>\n </mat-menu>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-text\"\n mat-menu-item\n [matMenuTriggerFor]=\"listTextMenu\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Text</span>\n </div>\n </button>\n <mat-menu\n #listTextMenu=\"matMenu\"\n class=\"noder-modal\">\n <button\n id=\"menu-dropdowns-menu-item-bold\"\n mat-menu-item\n (click)=\"onApplyBold()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-bold\"></mat-icon>\n <span class=\"menu-item-text\">Bold</span>\n <span class=\"hot-keys\">Ctrl+B</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-italic\"\n mat-menu-item\n (click)=\"onApplyItalic()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-italic\"></mat-icon>\n <span class=\"menu-item-text\">Italic</span>\n <span class=\"hot-keys\">Ctrl+I</span>\n </div>\n </button>\n <button\n id=\"menu-dropdowns-menu-item-underlined\"\n mat-menu-item\n (click)=\"onApplyUnderline()\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-format-underlined\"></mat-icon>\n <span class=\"menu-item-text\">Underlined</span>\n <span class=\"hot-keys\">Ctrl+U</span>\n </div>\n </button>\n </mat-menu>\n <button\n id=\"menu-dropdowns-menu-item-header-footer\"\n mat-menu-item\n class=\"hidden\">\n <div class=\"heading-menu\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-headers-footers\"></mat-icon>\n <span class=\"menu-item-text\">Headers & Footers</span>\n </div>\n </button>\n </mat-menu>\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</ng-container>\n", styles: [":host{display:flex;align-items:center;height:100%}.menu-buttons mat-icon{width:24px;height:24px;font-size:24px}.heading-menu{display:inline-flex;width:210px}.hot-keys{text-align:end;width:auto}.menu-item-text{white-space:nowrap;width:64%}.mat-mdc-menu-item .mat-icon{margin-right:4px;width:28px}.hidden{display:none}.list-marker,.list-number{margin:0 5px}.list-marker mat-icon,.list-number mat-icon{width:70px;height:80px;margin:0 5px}.list-marker mat-icon:hover,.list-number mat-icon:hover{border:none}.list-icon .selected,.list-icon .selected:hover,.list-number .selected,.list-number .selected:hover{border-width:2px;border-style:solid}\n"] }]
|
|
13974
|
-
}], ctorParameters: () => [{ type: CustomIconService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: EditorService }], propDecorators: { openFileFromDisk: [{
|
|
13975
|
-
type: Output
|
|
13976
|
-
}], addCustomElement: [{
|
|
13977
|
-
type: Output
|
|
13978
|
-
}], saveAs: [{
|
|
13979
|
-
type: Output
|
|
13980
|
-
}], insertPageBreak: [{
|
|
13981
|
-
type: Output
|
|
13982
|
-
}], createDocument: [{
|
|
13983
|
-
type: Output
|
|
13984
|
-
}], rename: [{
|
|
13985
|
-
type: Output
|
|
13986
|
-
}], delete: [{
|
|
13987
|
-
type: Output
|
|
13988
|
-
}], openEditMenu: [{
|
|
13989
|
-
type: Output
|
|
13990
|
-
}], cutSelected: [{
|
|
13991
|
-
type: Output
|
|
13992
|
-
}], copySelected: [{
|
|
13993
|
-
type: Output
|
|
13994
|
-
}], pasteClipboardData: [{
|
|
13995
|
-
type: Output
|
|
13996
|
-
}], selectAll: [{
|
|
13997
|
-
type: Output
|
|
13998
|
-
}], removeSelected: [{
|
|
13999
|
-
type: Output
|
|
14000
|
-
}], tableInsertMenu: [{
|
|
14001
|
-
type: ViewChild,
|
|
14002
|
-
args: ['tableInsert']
|
|
14003
|
-
}] } });
|
|
14004
|
-
|
|
14005
14061
|
class EditorToolbarComponent {
|
|
14006
14062
|
constructor(editorService) {
|
|
14007
14063
|
this.editorService = editorService;
|
|
@@ -14031,7 +14087,7 @@ class EditorToolbarComponent {
|
|
|
14031
14087
|
this.insertTable = new EventEmitter();
|
|
14032
14088
|
}
|
|
14033
14089
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorToolbarComponent, deps: [{ token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14034
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditorToolbarComponent, selector: "app-nod-editor-toolbar", outputs: { openFileFromDisk: "openFileFromDisk", addCustomElement: "addCustomElement", saveAs: "saveAs", print: "print", insertPageBreak: "insertPageBreak", createDocument: "createDocument", 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 (addCustomElement)=\"addCustomElement.emit($event)\"\n (saveAs)=\"saveAs.emit()\"\n (print)=\"print.emit()\"\n (insertPageBreak)=\"insertPageBreak.emit()\"\n (createDocument)=\"createDocument.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MenuDropdownsComponent, selector: "app-nod-menu-dropdowns", outputs: ["openFileFromDisk", "addCustomElement", "saveAs", "insertPageBreak", "createDocument", "rename", "delete", "openEditMenu", "cutSelected", "copySelected", "pasteClipboardData", "selectAll", "removeSelected"] }, { kind: "component", type: ToolbarActionsComponent, selector: "app-nod-toolbar-actions" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14090
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EditorToolbarComponent, selector: "app-nod-editor-toolbar", outputs: { openFileFromDisk: "openFileFromDisk", addCustomElement: "addCustomElement", saveAs: "saveAs", print: "print", insertPageBreak: "insertPageBreak", createDocument: "createDocument", 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 (addCustomElement)=\"addCustomElement.emit($event)\"\n (saveAs)=\"saveAs.emit()\"\n (print)=\"print.emit()\"\n (insertPageBreak)=\"insertPageBreak.emit()\"\n (createDocument)=\"createDocument.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MenuDropdownsComponent, selector: "app-nod-menu-dropdowns", inputs: ["showFile", "showEdit", "showInsert", "showLayout", "showFormat"], outputs: ["openFileFromDisk", "addCustomElement", "saveAs", "insertPageBreak", "createDocument", "rename", "delete", "openEditMenu", "cutSelected", "copySelected", "pasteClipboardData", "selectAll", "removeSelected"] }, { kind: "component", type: ToolbarActionsComponent, selector: "app-nod-toolbar-actions" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14035
14091
|
}
|
|
14036
14092
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorToolbarComponent, decorators: [{
|
|
14037
14093
|
type: Component,
|
|
@@ -14385,7 +14441,11 @@ class EditorToolbarModule {
|
|
|
14385
14441
|
MatIconModule,
|
|
14386
14442
|
MatMenuModule,
|
|
14387
14443
|
ReactiveFormsModule,
|
|
14388
|
-
TextFormatMobileComponent], exports: [EditorMobileToolbarComponent,
|
|
14444
|
+
TextFormatMobileComponent], exports: [EditorMobileToolbarComponent,
|
|
14445
|
+
EditorToolbarComponent,
|
|
14446
|
+
MenuDropdownsComponent,
|
|
14447
|
+
MenuDropdownsMobileComponent,
|
|
14448
|
+
ToolbarActionsComponent] }); }
|
|
14389
14449
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EditorToolbarModule, providers: [CustomIconService, EditorToolbarService, ToolbarCoreService], imports: [ColorPickerComponent,
|
|
14390
14450
|
CommonModule,
|
|
14391
14451
|
FontComponent,
|
|
@@ -14438,7 +14498,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
14438
14498
|
TextFormatMobileComponent
|
|
14439
14499
|
],
|
|
14440
14500
|
providers: [CustomIconService, EditorToolbarService, ToolbarCoreService],
|
|
14441
|
-
exports: [
|
|
14501
|
+
exports: [
|
|
14502
|
+
EditorMobileToolbarComponent,
|
|
14503
|
+
EditorToolbarComponent,
|
|
14504
|
+
MenuDropdownsComponent,
|
|
14505
|
+
MenuDropdownsMobileComponent,
|
|
14506
|
+
ToolbarActionsComponent
|
|
14507
|
+
]
|
|
14442
14508
|
}]
|
|
14443
14509
|
}] });
|
|
14444
14510
|
|
|
@@ -14704,5 +14770,5 @@ class OperationModel {
|
|
|
14704
14770
|
* Generated bundle index. Do not edit.
|
|
14705
14771
|
*/
|
|
14706
14772
|
|
|
14707
|
-
export { AddLinkDialogComponent, AddLinkDialogOptions, AddLinkMobileComponent, Alignment, BaseNoderComponent, BreakTypes, CommandModel, CommandType, CommandsService, ConfirmDialogComponent, DEFAULT_BACKGROUND_COLOR, DEFAULT_EDGE_MAX_HEIGHT_MULTIPLIER, DEFAULT_FONT_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_HEADINGS, DEFAULT_HEADING_STYLE_ID, DEFAULT_PARAGRAPH_STYLE, DEFAULT_TAB_WIDTH, DEFAULT_TEXT_STYLE, DEFAULT_TOOLBAR_STYLES, DefaultImageApiService, DestroyComponent, DocumentInfo, DocumentModel, DocumentNameModel, DocxModel, DomHelper, EditorComponent, EditorMobileToolbarComponent, EditorModule, EditorSearchDialogComponent, EditorService, EditorTitleComponent, EditorTitleMobileComponent, EditorToolbarComponent, EditorToolbarMode, EditorToolbarModule, EditorToolbarService, ElementDataModel, ElementModel, ExternalComponent, ExternalElementModel, ExternalElementService, FileSourceModel, FormatStyleHelper, HYPERLINK_FONT_COLOR, HYPERLINK_HEADING_STYLE_ID, ImageApiService, ImageDataModel, LastDocumentRevisionModel, Mode, NEW_LINE_MARKUP, NumberingLevelModel, OperationModel, OperationsHistoryInfoModel, PageType, ParagraphStyleModel, RevisionHelper, RevisionModel, TextFormatMobileComponent, TextStyleModel };
|
|
14773
|
+
export { AddLinkDialogComponent, AddLinkDialogOptions, AddLinkMobileComponent, Alignment, BaseNoderComponent, BreakTypes, CommandModel, CommandType, CommandsService, ConfirmDialogComponent, DEFAULT_BACKGROUND_COLOR, DEFAULT_EDGE_MAX_HEIGHT_MULTIPLIER, DEFAULT_FONT_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_HEADINGS, DEFAULT_HEADING_STYLE_ID, DEFAULT_PARAGRAPH_STYLE, DEFAULT_TAB_WIDTH, DEFAULT_TEXT_STYLE, DEFAULT_TOOLBAR_STYLES, DefaultImageApiService, DestroyComponent, DocumentInfo, DocumentModel, DocumentNameModel, DocxModel, DomHelper, EditorComponent, EditorMobileToolbarComponent, EditorModule, EditorSearchDialogComponent, EditorService, EditorTitleComponent, EditorTitleMobileComponent, EditorToolbarComponent, EditorToolbarMode, EditorToolbarModule, EditorToolbarService, ElementDataModel, ElementModel, ExternalComponent, ExternalElementModel, ExternalElementService, FileSourceModel, FormatStyleHelper, HYPERLINK_FONT_COLOR, HYPERLINK_HEADING_STYLE_ID, ImageApiService, ImageDataModel, LastDocumentRevisionModel, MenuDropdownsComponent, MenuDropdownsMobileComponent, Mode, NEW_LINE_MARKUP, NumberingLevelModel, OperationModel, OperationsHistoryInfoModel, PageType, ParagraphStyleModel, RevisionHelper, RevisionModel, TextFormatMobileComponent, TextStyleModel, ToolbarActionsComponent };
|
|
14708
14774
|
//# sourceMappingURL=talrace-ngx-noder.mjs.map
|