@phuong-tran-redoc/document-engine-angular 0.1.0 → 0.1.2
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/README.md +95 -233
- package/THIRD-PARTY-NOTICES.txt +67 -0
- package/fesm2022/phuong-tran-redoc-document-engine-angular.mjs +125 -121
- package/fesm2022/phuong-tran-redoc-document-engine-angular.mjs.map +1 -1
- package/index.d.ts +222 -218
- package/package.json +10 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
1
3
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Input, Directive, Injectable, ApplicationRef, createComponent, HostBinding, InjectionToken, Renderer2, ChangeDetectorRef, forwardRef,
|
|
4
|
+
import { inject, ElementRef, Input, Directive, Injectable, ApplicationRef, createComponent, HostBinding, InjectionToken, Renderer2, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, Component, ViewEncapsulation, EventEmitter, Output, HostListener, ContentChildren, ViewChild, ViewChildren, NgZone, ViewContainerRef, EnvironmentInjector, NgModule } from '@angular/core';
|
|
3
5
|
import { Extension, Editor } from '@tiptap/core';
|
|
4
6
|
import Blockquote from '@tiptap/extension-blockquote';
|
|
5
7
|
import Bold from '@tiptap/extension-bold';
|
|
@@ -23,8 +25,6 @@ import Underline from '@tiptap/extension-underline';
|
|
|
23
25
|
import { Dropcursor, Gapcursor, TrailingNode, UndoRedo, CharacterCount, Placeholder } from '@tiptap/extensions';
|
|
24
26
|
import { ResetOnEnter, EditableRegion, RestrictedEditing, CustomOrderedList, StyledTableKit, ImageRef, PageBreak, ResetFormat, Indent, ClearContent, TextCase, NotumHeading, DynamicField, Color, normalizeColor, getActiveMarkRange, getSelectedCells, getCombinedCellAttributeValue, TableDefaultAttributes, getCursorCellInfo, getClosestDomElement } from '@phuong-tran-redoc/document-engine-core';
|
|
25
27
|
import { BubbleMenuPlugin } from '@tiptap/extension-bubble-menu';
|
|
26
|
-
import * as i1 from '@angular/common';
|
|
27
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
28
28
|
import * as i2 from '@angular/forms';
|
|
29
29
|
import { NG_VALUE_ACCESSOR, FormsModule, FormControl, ReactiveFormsModule, FormBuilder, Validators, NonNullableFormBuilder } from '@angular/forms';
|
|
30
30
|
import { FloatingMenuPlugin } from '@tiptap/extension-floating-menu';
|
|
@@ -1034,6 +1034,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
1034
1034
|
type: Input
|
|
1035
1035
|
}] } });
|
|
1036
1036
|
|
|
1037
|
+
/**
|
|
1038
|
+
* Character Count component for document editor footer
|
|
1039
|
+
* Displays character/word count with optional limit and color coding
|
|
1040
|
+
*/
|
|
1041
|
+
class CharacterCountComponent {
|
|
1042
|
+
cdr = inject(ChangeDetectorRef);
|
|
1043
|
+
editor;
|
|
1044
|
+
config;
|
|
1045
|
+
mode = 'characters';
|
|
1046
|
+
count = 0;
|
|
1047
|
+
limit = null;
|
|
1048
|
+
updateCount = () => {
|
|
1049
|
+
if (!this.editor) {
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
// Get count from editor storage if available
|
|
1053
|
+
const characterCountStorage = this.editor.storage.characterCount;
|
|
1054
|
+
if (characterCountStorage) {
|
|
1055
|
+
if (this.mode === 'characters') {
|
|
1056
|
+
this.count = characterCountStorage.characters?.() || 0;
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
this.count = characterCountStorage.words?.() || 0;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
else {
|
|
1063
|
+
// Fallback: calculate from text
|
|
1064
|
+
const text = this.editor.getText();
|
|
1065
|
+
if (this.mode === 'characters') {
|
|
1066
|
+
this.count = text.length;
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
this.count = text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
// Get limit from config
|
|
1073
|
+
const characterCountConfig = this.config?.characterCount;
|
|
1074
|
+
if (characterCountConfig && typeof characterCountConfig === 'object') {
|
|
1075
|
+
this.limit = characterCountConfig.limit || null;
|
|
1076
|
+
}
|
|
1077
|
+
else {
|
|
1078
|
+
this.limit = null;
|
|
1079
|
+
}
|
|
1080
|
+
this.cdr.markForCheck();
|
|
1081
|
+
};
|
|
1082
|
+
ngOnInit() {
|
|
1083
|
+
if (!this.editor) {
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
// Subscribe to update events to keep count in sync
|
|
1087
|
+
this.editor.on('update', this.updateCount);
|
|
1088
|
+
this.editor.on('transaction', this.updateCount);
|
|
1089
|
+
// Initialize count once
|
|
1090
|
+
this.updateCount();
|
|
1091
|
+
}
|
|
1092
|
+
ngOnDestroy() {
|
|
1093
|
+
if (this.editor) {
|
|
1094
|
+
this.editor.off('update', this.updateCount);
|
|
1095
|
+
this.editor.off('transaction', this.updateCount);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
isNearLimit() {
|
|
1099
|
+
if (!this.limit) {
|
|
1100
|
+
return false;
|
|
1101
|
+
}
|
|
1102
|
+
// Consider near limit when >= 90% of limit
|
|
1103
|
+
return this.count >= this.limit * 0.9 && this.count < this.limit;
|
|
1104
|
+
}
|
|
1105
|
+
isOverLimit() {
|
|
1106
|
+
if (!this.limit) {
|
|
1107
|
+
return false;
|
|
1108
|
+
}
|
|
1109
|
+
return this.count > this.limit;
|
|
1110
|
+
}
|
|
1111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: CharacterCountComponent, isStandalone: true, selector: "document-engine-character-count", inputs: { editor: "editor", config: "config", mode: "mode" }, ngImport: i0, template: "<div class=\"document-engine-character-count\">\n <span\n class=\"document-engine-character-count__text\"\n [class.document-engine-character-count__text--muted]=\"!isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--warning]=\"isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--error]=\"isOverLimit()\"\n >\n <ng-container *ngIf=\"mode === 'characters'\">\n <ng-container *ngIf=\"limit; else noLimit\"> {{ count }} / {{ limit }} characters. </ng-container>\n <ng-template #noLimit> {{ count }} {{ count === 1 ? 'character' : 'characters' }}. </ng-template>\n </ng-container>\n <ng-container *ngIf=\"mode === 'words'\"> {{ count }} {{ count === 1 ? 'word' : 'words' }}. </ng-container>\n </span>\n</div>\n", styles: [".document-engine-character-count{display:flex;justify-content:flex-end}.document-engine-character-count__text{font-size:.875rem;transition:color .2s ease-in-out}.document-engine-character-count__text--muted{color:var(--muted-foreground, #6b7280)}.document-engine-character-count__text--warning{color:var(--warning, #d97706)}.document-engine-character-count__text--error{color:var(--destructive, #dc2626)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1113
|
+
}
|
|
1114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, decorators: [{
|
|
1115
|
+
type: Component,
|
|
1116
|
+
args: [{ selector: 'document-engine-character-count', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"document-engine-character-count\">\n <span\n class=\"document-engine-character-count__text\"\n [class.document-engine-character-count__text--muted]=\"!isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--warning]=\"isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--error]=\"isOverLimit()\"\n >\n <ng-container *ngIf=\"mode === 'characters'\">\n <ng-container *ngIf=\"limit; else noLimit\"> {{ count }} / {{ limit }} characters. </ng-container>\n <ng-template #noLimit> {{ count }} {{ count === 1 ? 'character' : 'characters' }}. </ng-template>\n </ng-container>\n <ng-container *ngIf=\"mode === 'words'\"> {{ count }} {{ count === 1 ? 'word' : 'words' }}. </ng-container>\n </span>\n</div>\n", styles: [".document-engine-character-count{display:flex;justify-content:flex-end}.document-engine-character-count__text{font-size:.875rem;transition:color .2s ease-in-out}.document-engine-character-count__text--muted{color:var(--muted-foreground, #6b7280)}.document-engine-character-count__text--warning{color:var(--warning, #d97706)}.document-engine-character-count__text--error{color:var(--destructive, #dc2626)}\n"] }]
|
|
1117
|
+
}], propDecorators: { editor: [{
|
|
1118
|
+
type: Input
|
|
1119
|
+
}], config: [{
|
|
1120
|
+
type: Input
|
|
1121
|
+
}], mode: [{
|
|
1122
|
+
type: Input
|
|
1123
|
+
}] } });
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Footer component for document editor
|
|
1127
|
+
* Container for footer components like character count
|
|
1128
|
+
*/
|
|
1129
|
+
class FooterComponent {
|
|
1130
|
+
editor;
|
|
1131
|
+
config;
|
|
1132
|
+
// @Input() editable = true;
|
|
1133
|
+
hasCharacterCount() {
|
|
1134
|
+
const config = this.config ?? {};
|
|
1135
|
+
return config.characterCount !== false;
|
|
1136
|
+
}
|
|
1137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: FooterComponent, isStandalone: true, selector: "document-engine-footer", inputs: { editor: "editor", config: "config" }, ngImport: i0, template: "<div class=\"document-engine-document-editor__footer\">\n <div class=\"document-engine-document-editor__footer-content\">\n <div class=\"document-engine-document-editor__footer-left\">\n <!-- Additional footer components can be added here -->\n </div>\n\n <div class=\"document-engine-document-editor__footer-right\">\n <document-engine-character-count\n *ngIf=\"hasCharacterCount()\"\n [editor]=\"editor\"\n [config]=\"config\"\n mode=\"characters\"\n ></document-engine-character-count>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CharacterCountComponent, selector: "document-engine-character-count", inputs: ["editor", "config", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1139
|
+
}
|
|
1140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1141
|
+
type: Component,
|
|
1142
|
+
args: [{ selector: 'document-engine-footer', standalone: true, imports: [CommonModule, CharacterCountComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"document-engine-document-editor__footer\">\n <div class=\"document-engine-document-editor__footer-content\">\n <div class=\"document-engine-document-editor__footer-left\">\n <!-- Additional footer components can be added here -->\n </div>\n\n <div class=\"document-engine-document-editor__footer-right\">\n <document-engine-character-count\n *ngIf=\"hasCharacterCount()\"\n [editor]=\"editor\"\n [config]=\"config\"\n mode=\"characters\"\n ></document-engine-character-count>\n </div>\n </div>\n</div>\n" }]
|
|
1143
|
+
}], propDecorators: { editor: [{
|
|
1144
|
+
type: Input
|
|
1145
|
+
}], config: [{
|
|
1146
|
+
type: Input
|
|
1147
|
+
}] } });
|
|
1148
|
+
|
|
1037
1149
|
const COLORS = Color.fromArray([
|
|
1038
1150
|
{ name: 'Black', value: '#000000', type: 'hex' },
|
|
1039
1151
|
{ name: 'Dim gray', value: '#696969', type: 'hex' },
|
|
@@ -6206,118 +6318,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
6206
6318
|
args: ['tableCreateBubbleMenu']
|
|
6207
6319
|
}] } });
|
|
6208
6320
|
|
|
6209
|
-
/**
|
|
6210
|
-
* Character Count component for document editor footer
|
|
6211
|
-
* Displays character/word count with optional limit and color coding
|
|
6212
|
-
*/
|
|
6213
|
-
class CharacterCountComponent {
|
|
6214
|
-
cdr = inject(ChangeDetectorRef);
|
|
6215
|
-
editor;
|
|
6216
|
-
config;
|
|
6217
|
-
mode = 'characters';
|
|
6218
|
-
count = 0;
|
|
6219
|
-
limit = null;
|
|
6220
|
-
updateCount = () => {
|
|
6221
|
-
if (!this.editor) {
|
|
6222
|
-
return;
|
|
6223
|
-
}
|
|
6224
|
-
// Get count from editor storage if available
|
|
6225
|
-
const characterCountStorage = this.editor.storage.characterCount;
|
|
6226
|
-
if (characterCountStorage) {
|
|
6227
|
-
if (this.mode === 'characters') {
|
|
6228
|
-
this.count = characterCountStorage.characters?.() || 0;
|
|
6229
|
-
}
|
|
6230
|
-
else {
|
|
6231
|
-
this.count = characterCountStorage.words?.() || 0;
|
|
6232
|
-
}
|
|
6233
|
-
}
|
|
6234
|
-
else {
|
|
6235
|
-
// Fallback: calculate from text
|
|
6236
|
-
const text = this.editor.getText();
|
|
6237
|
-
if (this.mode === 'characters') {
|
|
6238
|
-
this.count = text.length;
|
|
6239
|
-
}
|
|
6240
|
-
else {
|
|
6241
|
-
this.count = text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
6242
|
-
}
|
|
6243
|
-
}
|
|
6244
|
-
// Get limit from config
|
|
6245
|
-
const characterCountConfig = this.config?.characterCount;
|
|
6246
|
-
if (characterCountConfig && typeof characterCountConfig === 'object') {
|
|
6247
|
-
this.limit = characterCountConfig.limit || null;
|
|
6248
|
-
}
|
|
6249
|
-
else {
|
|
6250
|
-
this.limit = null;
|
|
6251
|
-
}
|
|
6252
|
-
this.cdr.markForCheck();
|
|
6253
|
-
};
|
|
6254
|
-
ngOnInit() {
|
|
6255
|
-
if (!this.editor) {
|
|
6256
|
-
return;
|
|
6257
|
-
}
|
|
6258
|
-
// Subscribe to update events to keep count in sync
|
|
6259
|
-
this.editor.on('update', this.updateCount);
|
|
6260
|
-
this.editor.on('transaction', this.updateCount);
|
|
6261
|
-
// Initialize count once
|
|
6262
|
-
this.updateCount();
|
|
6263
|
-
}
|
|
6264
|
-
ngOnDestroy() {
|
|
6265
|
-
if (this.editor) {
|
|
6266
|
-
this.editor.off('update', this.updateCount);
|
|
6267
|
-
this.editor.off('transaction', this.updateCount);
|
|
6268
|
-
}
|
|
6269
|
-
}
|
|
6270
|
-
isNearLimit() {
|
|
6271
|
-
if (!this.limit) {
|
|
6272
|
-
return false;
|
|
6273
|
-
}
|
|
6274
|
-
// Consider near limit when >= 90% of limit
|
|
6275
|
-
return this.count >= this.limit * 0.9 && this.count < this.limit;
|
|
6276
|
-
}
|
|
6277
|
-
isOverLimit() {
|
|
6278
|
-
if (!this.limit) {
|
|
6279
|
-
return false;
|
|
6280
|
-
}
|
|
6281
|
-
return this.count > this.limit;
|
|
6282
|
-
}
|
|
6283
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6284
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: CharacterCountComponent, isStandalone: true, selector: "document-engine-character-count", inputs: { editor: "editor", config: "config", mode: "mode" }, ngImport: i0, template: "<div class=\"document-engine-character-count\">\n <span\n class=\"document-engine-character-count__text\"\n [class.document-engine-character-count__text--muted]=\"!isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--warning]=\"isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--error]=\"isOverLimit()\"\n >\n <ng-container *ngIf=\"mode === 'characters'\">\n <ng-container *ngIf=\"limit; else noLimit\"> {{ count }} / {{ limit }} characters. </ng-container>\n <ng-template #noLimit> {{ count }} {{ count === 1 ? 'character' : 'characters' }}. </ng-template>\n </ng-container>\n <ng-container *ngIf=\"mode === 'words'\"> {{ count }} {{ count === 1 ? 'word' : 'words' }}. </ng-container>\n </span>\n</div>\n", styles: [".document-engine-character-count{display:flex;justify-content:flex-end}.document-engine-character-count__text{font-size:.875rem;transition:color .2s ease-in-out}.document-engine-character-count__text--muted{color:var(--muted-foreground, #6b7280)}.document-engine-character-count__text--warning{color:var(--warning, #d97706)}.document-engine-character-count__text--error{color:var(--destructive, #dc2626)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6285
|
-
}
|
|
6286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, decorators: [{
|
|
6287
|
-
type: Component,
|
|
6288
|
-
args: [{ selector: 'document-engine-character-count', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"document-engine-character-count\">\n <span\n class=\"document-engine-character-count__text\"\n [class.document-engine-character-count__text--muted]=\"!isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--warning]=\"isNearLimit() && !isOverLimit()\"\n [class.document-engine-character-count__text--error]=\"isOverLimit()\"\n >\n <ng-container *ngIf=\"mode === 'characters'\">\n <ng-container *ngIf=\"limit; else noLimit\"> {{ count }} / {{ limit }} characters. </ng-container>\n <ng-template #noLimit> {{ count }} {{ count === 1 ? 'character' : 'characters' }}. </ng-template>\n </ng-container>\n <ng-container *ngIf=\"mode === 'words'\"> {{ count }} {{ count === 1 ? 'word' : 'words' }}. </ng-container>\n </span>\n</div>\n", styles: [".document-engine-character-count{display:flex;justify-content:flex-end}.document-engine-character-count__text{font-size:.875rem;transition:color .2s ease-in-out}.document-engine-character-count__text--muted{color:var(--muted-foreground, #6b7280)}.document-engine-character-count__text--warning{color:var(--warning, #d97706)}.document-engine-character-count__text--error{color:var(--destructive, #dc2626)}\n"] }]
|
|
6289
|
-
}], propDecorators: { editor: [{
|
|
6290
|
-
type: Input
|
|
6291
|
-
}], config: [{
|
|
6292
|
-
type: Input
|
|
6293
|
-
}], mode: [{
|
|
6294
|
-
type: Input
|
|
6295
|
-
}] } });
|
|
6296
|
-
|
|
6297
|
-
/**
|
|
6298
|
-
* Footer component for document editor
|
|
6299
|
-
* Container for footer components like character count
|
|
6300
|
-
*/
|
|
6301
|
-
class FooterComponent {
|
|
6302
|
-
editor;
|
|
6303
|
-
config;
|
|
6304
|
-
// @Input() editable = true;
|
|
6305
|
-
hasCharacterCount() {
|
|
6306
|
-
const config = this.config ?? {};
|
|
6307
|
-
return config.characterCount !== false;
|
|
6308
|
-
}
|
|
6309
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6310
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: FooterComponent, isStandalone: true, selector: "document-engine-footer", inputs: { editor: "editor", config: "config" }, ngImport: i0, template: "<div class=\"document-engine-document-editor__footer\">\n <div class=\"document-engine-document-editor__footer-content\">\n <div class=\"document-engine-document-editor__footer-left\">\n <!-- Additional footer components can be added here -->\n </div>\n\n <div class=\"document-engine-document-editor__footer-right\">\n <document-engine-character-count\n *ngIf=\"hasCharacterCount()\"\n [editor]=\"editor\"\n [config]=\"config\"\n mode=\"characters\"\n ></document-engine-character-count>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CharacterCountComponent, selector: "document-engine-character-count", inputs: ["editor", "config", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6311
|
-
}
|
|
6312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, decorators: [{
|
|
6313
|
-
type: Component,
|
|
6314
|
-
args: [{ selector: 'document-engine-footer', standalone: true, imports: [CommonModule, CharacterCountComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"document-engine-document-editor__footer\">\n <div class=\"document-engine-document-editor__footer-content\">\n <div class=\"document-engine-document-editor__footer-left\">\n <!-- Additional footer components can be added here -->\n </div>\n\n <div class=\"document-engine-document-editor__footer-right\">\n <document-engine-character-count\n *ngIf=\"hasCharacterCount()\"\n [editor]=\"editor\"\n [config]=\"config\"\n mode=\"characters\"\n ></document-engine-character-count>\n </div>\n </div>\n</div>\n" }]
|
|
6315
|
-
}], propDecorators: { editor: [{
|
|
6316
|
-
type: Input
|
|
6317
|
-
}], config: [{
|
|
6318
|
-
type: Input
|
|
6319
|
-
}] } });
|
|
6320
|
-
|
|
6321
6321
|
/**
|
|
6322
6322
|
* Document Editor Component
|
|
6323
6323
|
* High-level wrapper that encapsulates TiptapEditor and DocumentEngineKit
|
|
@@ -6415,11 +6415,11 @@ class DocumentEditorComponent {
|
|
|
6415
6415
|
return merged;
|
|
6416
6416
|
}
|
|
6417
6417
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6418
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: DocumentEditorComponent, isStandalone:
|
|
6418
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: DocumentEditorComponent, isStandalone: true, selector: "document-engine-editor", inputs: { config: "config" }, outputs: { editorReady: "editorReady" }, host: { classAttribute: "no-twp" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-engine-document-editor\">\n <document-engine-toolbar\n *ngIf=\"mergedConfig.showToolbar\"\n [editor]=\"editor\"\n [capabilities]=\"capabilities\"\n [config]=\"mergedConfig\"\n ></document-engine-toolbar>\n\n <div class=\"document-engine-document-editor__content\">\n <ng-content></ng-content>\n </div>\n\n <document-engine-footer\n *ngIf=\"editor && mergedConfig.showFooter\"\n [editor]=\"editor\"\n [config]=\"mergedConfig\"\n ></document-engine-footer>\n</div>\n", styles: [":is() *,:is() *:before,:is() *:after{box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "document-engine-toolbar", inputs: ["editor", "capabilities", "config"], outputs: ["action"] }, { kind: "component", type: FooterComponent, selector: "document-engine-footer", inputs: ["editor", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6419
6419
|
}
|
|
6420
6420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorComponent, decorators: [{
|
|
6421
6421
|
type: Component,
|
|
6422
|
-
args: [{ selector: 'document-engine-editor',
|
|
6422
|
+
args: [{ selector: 'document-engine-editor', imports: [CommonModule, ToolbarComponent, FooterComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6423
6423
|
class: 'no-twp',
|
|
6424
6424
|
}, template: "<div class=\"document-engine-document-editor\">\n <document-engine-toolbar\n *ngIf=\"mergedConfig.showToolbar\"\n [editor]=\"editor\"\n [capabilities]=\"capabilities\"\n [config]=\"mergedConfig\"\n ></document-engine-toolbar>\n\n <div class=\"document-engine-document-editor__content\">\n <ng-content></ng-content>\n </div>\n\n <document-engine-footer\n *ngIf=\"editor && mergedConfig.showFooter\"\n [editor]=\"editor\"\n [config]=\"mergedConfig\"\n ></document-engine-footer>\n</div>\n", styles: [":is() *,:is() *:before,:is() *:after{box-sizing:border-box}\n"] }]
|
|
6425
6425
|
}], propDecorators: { config: [{
|
|
@@ -6428,16 +6428,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
6428
6428
|
type: Output
|
|
6429
6429
|
}] } });
|
|
6430
6430
|
|
|
6431
|
+
/**
|
|
6432
|
+
* Back-compat shim for NgModule-based consumers. `DocumentEditorComponent` is now
|
|
6433
|
+
* standalone (and `@defer`-friendly); standalone consumers should import it (and
|
|
6434
|
+
* `TiptapEditorDirective`) directly instead of this module.
|
|
6435
|
+
*/
|
|
6431
6436
|
class DocumentEditorModule {
|
|
6432
6437
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6433
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule,
|
|
6434
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, imports: [
|
|
6438
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, imports: [DocumentEditorComponent, TiptapEditorDirective], exports: [DocumentEditorComponent, TiptapEditorDirective] });
|
|
6439
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, imports: [DocumentEditorComponent] });
|
|
6435
6440
|
}
|
|
6436
6441
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, decorators: [{
|
|
6437
6442
|
type: NgModule,
|
|
6438
6443
|
args: [{
|
|
6439
|
-
|
|
6440
|
-
imports: [CommonModule, ToolbarComponent, FooterComponent, TiptapEditorDirective],
|
|
6444
|
+
imports: [DocumentEditorComponent, TiptapEditorDirective],
|
|
6441
6445
|
exports: [DocumentEditorComponent, TiptapEditorDirective],
|
|
6442
6446
|
}]
|
|
6443
6447
|
}] });
|