@phuong-tran-redoc/document-engine-angular 0.0.20 → 0.0.22
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.
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
2
|
+
import { HostBinding, Input, Directive, inject, Injectable, ChangeDetectorRef, ElementRef, ViewEncapsulation, ChangeDetectionStrategy, Component, EventEmitter, Output, InjectionToken, HostListener, forwardRef, ContentChildren, ViewChild, ViewChildren, ViewContainerRef, EnvironmentInjector, NgZone, NgModule, ApplicationRef, createComponent, Renderer2 } from '@angular/core';
|
|
5
3
|
import { Extension, Editor } from '@tiptap/core';
|
|
6
4
|
import Blockquote from '@tiptap/extension-blockquote';
|
|
7
5
|
import Bold from '@tiptap/extension-bold';
|
|
@@ -24,6 +22,8 @@ import { TextStyleKit } from '@tiptap/extension-text-style';
|
|
|
24
22
|
import Underline from '@tiptap/extension-underline';
|
|
25
23
|
import { Dropcursor, Gapcursor, TrailingNode, UndoRedo, CharacterCount, Placeholder } from '@tiptap/extensions';
|
|
26
24
|
import { ResetOnEnter, EditableRegion, RestrictedEditing, CustomOrderedList, StyledTableKit, PageBreak, ResetFormat, Indent, ClearContent, TextCase, NotumHeading, DynamicField, Color, normalizeColor, getActiveMarkRange, getSelectedCells, getCombinedCellAttributeValue, TableDefaultAttributes, getCursorCellInfo, getClosestDomElement } from '@phuong-tran-redoc/document-engine-core';
|
|
25
|
+
import * as i1 from '@angular/common';
|
|
26
|
+
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
27
27
|
import { throttle } from 'lodash-es';
|
|
28
28
|
import * as i2 from '@angular/forms';
|
|
29
29
|
import { FormsModule, FormControl, ReactiveFormsModule, FormBuilder, Validators, NG_VALUE_ACCESSOR, NonNullableFormBuilder } from '@angular/forms';
|
|
@@ -269,118 +269,6 @@ const DefaultEditorConfig = {
|
|
|
269
269
|
showPrintButton: false,
|
|
270
270
|
};
|
|
271
271
|
|
|
272
|
-
/**
|
|
273
|
-
* Character Count component for document editor footer
|
|
274
|
-
* Displays character/word count with optional limit and color coding
|
|
275
|
-
*/
|
|
276
|
-
class CharacterCountComponent {
|
|
277
|
-
cdr = inject(ChangeDetectorRef);
|
|
278
|
-
editor;
|
|
279
|
-
config;
|
|
280
|
-
mode = 'characters';
|
|
281
|
-
count = 0;
|
|
282
|
-
limit = null;
|
|
283
|
-
updateCount = () => {
|
|
284
|
-
if (!this.editor) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
// Get count from editor storage if available
|
|
288
|
-
const characterCountStorage = this.editor.storage.characterCount;
|
|
289
|
-
if (characterCountStorage) {
|
|
290
|
-
if (this.mode === 'characters') {
|
|
291
|
-
this.count = characterCountStorage.characters?.() || 0;
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
this.count = characterCountStorage.words?.() || 0;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
else {
|
|
298
|
-
// Fallback: calculate from text
|
|
299
|
-
const text = this.editor.getText();
|
|
300
|
-
if (this.mode === 'characters') {
|
|
301
|
-
this.count = text.length;
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
this.count = text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
// Get limit from config
|
|
308
|
-
const characterCountConfig = this.config?.characterCount;
|
|
309
|
-
if (characterCountConfig && typeof characterCountConfig === 'object') {
|
|
310
|
-
this.limit = characterCountConfig.limit || null;
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
this.limit = null;
|
|
314
|
-
}
|
|
315
|
-
this.cdr.markForCheck();
|
|
316
|
-
};
|
|
317
|
-
ngOnInit() {
|
|
318
|
-
if (!this.editor) {
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
// Subscribe to update events to keep count in sync
|
|
322
|
-
this.editor.on('update', this.updateCount);
|
|
323
|
-
this.editor.on('transaction', this.updateCount);
|
|
324
|
-
// Initialize count once
|
|
325
|
-
this.updateCount();
|
|
326
|
-
}
|
|
327
|
-
ngOnDestroy() {
|
|
328
|
-
if (this.editor) {
|
|
329
|
-
this.editor.off('update', this.updateCount);
|
|
330
|
-
this.editor.off('transaction', this.updateCount);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
isNearLimit() {
|
|
334
|
-
if (!this.limit) {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
// Consider near limit when >= 90% of limit
|
|
338
|
-
return this.count >= this.limit * 0.9 && this.count < this.limit;
|
|
339
|
-
}
|
|
340
|
-
isOverLimit() {
|
|
341
|
-
if (!this.limit) {
|
|
342
|
-
return false;
|
|
343
|
-
}
|
|
344
|
-
return this.count > this.limit;
|
|
345
|
-
}
|
|
346
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
347
|
-
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 });
|
|
348
|
-
}
|
|
349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, decorators: [{
|
|
350
|
-
type: Component,
|
|
351
|
-
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"] }]
|
|
352
|
-
}], propDecorators: { editor: [{
|
|
353
|
-
type: Input
|
|
354
|
-
}], config: [{
|
|
355
|
-
type: Input
|
|
356
|
-
}], mode: [{
|
|
357
|
-
type: Input
|
|
358
|
-
}] } });
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Footer component for document editor
|
|
362
|
-
* Container for footer components like character count
|
|
363
|
-
*/
|
|
364
|
-
class FooterComponent {
|
|
365
|
-
editor;
|
|
366
|
-
config;
|
|
367
|
-
// @Input() editable = true;
|
|
368
|
-
hasCharacterCount() {
|
|
369
|
-
const config = this.config ?? {};
|
|
370
|
-
return config.characterCount !== false;
|
|
371
|
-
}
|
|
372
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
373
|
-
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 });
|
|
374
|
-
}
|
|
375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, decorators: [{
|
|
376
|
-
type: Component,
|
|
377
|
-
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" }]
|
|
378
|
-
}], propDecorators: { editor: [{
|
|
379
|
-
type: Input
|
|
380
|
-
}], config: [{
|
|
381
|
-
type: Input
|
|
382
|
-
}] } });
|
|
383
|
-
|
|
384
272
|
const COLORS = Color.fromArray([
|
|
385
273
|
{ name: 'Black', value: '#000000', type: 'hex' },
|
|
386
274
|
{ name: 'Dim gray', value: '#696969', type: 'hex' },
|
|
@@ -2756,11 +2644,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
2756
2644
|
},
|
|
2757
2645
|
}]
|
|
2758
2646
|
}], propDecorators: { popover: [{
|
|
2759
|
-
type: Input
|
|
2760
|
-
args: [{ required: true }]
|
|
2647
|
+
type: Input
|
|
2761
2648
|
}], isOpen: [{
|
|
2762
|
-
type: Input
|
|
2763
|
-
args: [{ required: true }]
|
|
2649
|
+
type: Input
|
|
2764
2650
|
}], placement: [{
|
|
2765
2651
|
type: Input
|
|
2766
2652
|
}], offset: [{
|
|
@@ -5917,6 +5803,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
5917
5803
|
args: ['tableCreateBubbleMenu']
|
|
5918
5804
|
}] } });
|
|
5919
5805
|
|
|
5806
|
+
/**
|
|
5807
|
+
* Character Count component for document editor footer
|
|
5808
|
+
* Displays character/word count with optional limit and color coding
|
|
5809
|
+
*/
|
|
5810
|
+
class CharacterCountComponent {
|
|
5811
|
+
cdr = inject(ChangeDetectorRef);
|
|
5812
|
+
editor;
|
|
5813
|
+
config;
|
|
5814
|
+
mode = 'characters';
|
|
5815
|
+
count = 0;
|
|
5816
|
+
limit = null;
|
|
5817
|
+
updateCount = () => {
|
|
5818
|
+
if (!this.editor) {
|
|
5819
|
+
return;
|
|
5820
|
+
}
|
|
5821
|
+
// Get count from editor storage if available
|
|
5822
|
+
const characterCountStorage = this.editor.storage.characterCount;
|
|
5823
|
+
if (characterCountStorage) {
|
|
5824
|
+
if (this.mode === 'characters') {
|
|
5825
|
+
this.count = characterCountStorage.characters?.() || 0;
|
|
5826
|
+
}
|
|
5827
|
+
else {
|
|
5828
|
+
this.count = characterCountStorage.words?.() || 0;
|
|
5829
|
+
}
|
|
5830
|
+
}
|
|
5831
|
+
else {
|
|
5832
|
+
// Fallback: calculate from text
|
|
5833
|
+
const text = this.editor.getText();
|
|
5834
|
+
if (this.mode === 'characters') {
|
|
5835
|
+
this.count = text.length;
|
|
5836
|
+
}
|
|
5837
|
+
else {
|
|
5838
|
+
this.count = text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
// Get limit from config
|
|
5842
|
+
const characterCountConfig = this.config?.characterCount;
|
|
5843
|
+
if (characterCountConfig && typeof characterCountConfig === 'object') {
|
|
5844
|
+
this.limit = characterCountConfig.limit || null;
|
|
5845
|
+
}
|
|
5846
|
+
else {
|
|
5847
|
+
this.limit = null;
|
|
5848
|
+
}
|
|
5849
|
+
this.cdr.markForCheck();
|
|
5850
|
+
};
|
|
5851
|
+
ngOnInit() {
|
|
5852
|
+
if (!this.editor) {
|
|
5853
|
+
return;
|
|
5854
|
+
}
|
|
5855
|
+
// Subscribe to update events to keep count in sync
|
|
5856
|
+
this.editor.on('update', this.updateCount);
|
|
5857
|
+
this.editor.on('transaction', this.updateCount);
|
|
5858
|
+
// Initialize count once
|
|
5859
|
+
this.updateCount();
|
|
5860
|
+
}
|
|
5861
|
+
ngOnDestroy() {
|
|
5862
|
+
if (this.editor) {
|
|
5863
|
+
this.editor.off('update', this.updateCount);
|
|
5864
|
+
this.editor.off('transaction', this.updateCount);
|
|
5865
|
+
}
|
|
5866
|
+
}
|
|
5867
|
+
isNearLimit() {
|
|
5868
|
+
if (!this.limit) {
|
|
5869
|
+
return false;
|
|
5870
|
+
}
|
|
5871
|
+
// Consider near limit when >= 90% of limit
|
|
5872
|
+
return this.count >= this.limit * 0.9 && this.count < this.limit;
|
|
5873
|
+
}
|
|
5874
|
+
isOverLimit() {
|
|
5875
|
+
if (!this.limit) {
|
|
5876
|
+
return false;
|
|
5877
|
+
}
|
|
5878
|
+
return this.count > this.limit;
|
|
5879
|
+
}
|
|
5880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5881
|
+
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 });
|
|
5882
|
+
}
|
|
5883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CharacterCountComponent, decorators: [{
|
|
5884
|
+
type: Component,
|
|
5885
|
+
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"] }]
|
|
5886
|
+
}], propDecorators: { editor: [{
|
|
5887
|
+
type: Input
|
|
5888
|
+
}], config: [{
|
|
5889
|
+
type: Input
|
|
5890
|
+
}], mode: [{
|
|
5891
|
+
type: Input
|
|
5892
|
+
}] } });
|
|
5893
|
+
|
|
5894
|
+
/**
|
|
5895
|
+
* Footer component for document editor
|
|
5896
|
+
* Container for footer components like character count
|
|
5897
|
+
*/
|
|
5898
|
+
class FooterComponent {
|
|
5899
|
+
editor;
|
|
5900
|
+
config;
|
|
5901
|
+
// @Input() editable = true;
|
|
5902
|
+
hasCharacterCount() {
|
|
5903
|
+
const config = this.config ?? {};
|
|
5904
|
+
return config.characterCount !== false;
|
|
5905
|
+
}
|
|
5906
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5907
|
+
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 });
|
|
5908
|
+
}
|
|
5909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: FooterComponent, decorators: [{
|
|
5910
|
+
type: Component,
|
|
5911
|
+
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" }]
|
|
5912
|
+
}], propDecorators: { editor: [{
|
|
5913
|
+
type: Input
|
|
5914
|
+
}], config: [{
|
|
5915
|
+
type: Input
|
|
5916
|
+
}] } });
|
|
5917
|
+
|
|
5920
5918
|
/**
|
|
5921
5919
|
* Document Editor Component
|
|
5922
5920
|
* High-level wrapper that encapsulates TiptapEditor and DocumentEngineKit
|
|
@@ -6012,11 +6010,11 @@ class DocumentEditorComponent {
|
|
|
6012
6010
|
return merged;
|
|
6013
6011
|
}
|
|
6014
6012
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6015
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: DocumentEditorComponent, isStandalone:
|
|
6013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: DocumentEditorComponent, isStandalone: false, 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: "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 });
|
|
6016
6014
|
}
|
|
6017
6015
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorComponent, decorators: [{
|
|
6018
6016
|
type: Component,
|
|
6019
|
-
args: [{ selector: 'document-engine-editor', standalone:
|
|
6017
|
+
args: [{ selector: 'document-engine-editor', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6020
6018
|
class: 'no-twp',
|
|
6021
6019
|
}, 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"] }]
|
|
6022
6020
|
}], propDecorators: { config: [{
|
|
@@ -6025,6 +6023,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
6025
6023
|
type: Output
|
|
6026
6024
|
}] } });
|
|
6027
6025
|
|
|
6026
|
+
class DocumentEditorModule {
|
|
6027
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6028
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, declarations: [DocumentEditorComponent], imports: [CommonModule, ToolbarComponent, FooterComponent], exports: [DocumentEditorComponent] });
|
|
6029
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, imports: [CommonModule, ToolbarComponent, FooterComponent] });
|
|
6030
|
+
}
|
|
6031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DocumentEditorModule, decorators: [{
|
|
6032
|
+
type: NgModule,
|
|
6033
|
+
args: [{
|
|
6034
|
+
declarations: [DocumentEditorComponent],
|
|
6035
|
+
imports: [CommonModule, ToolbarComponent, FooterComponent],
|
|
6036
|
+
exports: [DocumentEditorComponent],
|
|
6037
|
+
}]
|
|
6038
|
+
}] });
|
|
6039
|
+
|
|
6028
6040
|
class AngularRenderer {
|
|
6029
6041
|
applicationRef;
|
|
6030
6042
|
componentRef;
|
|
@@ -6264,5 +6276,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
6264
6276
|
* Generated bundle index. Do not edit.
|
|
6265
6277
|
*/
|
|
6266
6278
|
|
|
6267
|
-
export { ARCHIVE, ARROW_DROP_DOWN, AngularRenderer, ButtonDirective, CHECK, CLEAR_ALL, CLOSE, CODE, CharacterCountComponent, CheckboxComponent, ColorPickerComponent, ColorPickerViewComponent, DEFAULT, DEFAULT_TOOLBAR_STATE, DESCRIPTION, DYNAMIC_FORM, DocumentEditorComponent, DocumentEngineKit, DynamicFieldsViewComponent, EDIT, EditorBubbleMenuComponent, EditorCapabilities, ErrorMessageComponent, EventManager, FORMAT_ALIGN_CENTER, FORMAT_ALIGN_JUSTIFY, FORMAT_ALIGN_LEFT, FORMAT_ALIGN_RIGHT, FORMAT_BOLD, FORMAT_CLEAR, FORMAT_COLOR_FILL, FORMAT_COLOR_TEXT, FORMAT_INDENT_DECREASE, FORMAT_INDENT_INCREASE, FORMAT_ITALIC, FORMAT_LINE_SPACING, FORMAT_LIST_BULLETED, FORMAT_LIST_NUMBERED, FORMAT_QUOTE, FORMAT_SIZE, FORMAT_STRIKETHROUGH, FORMAT_UNDERLINE, FocusTrapService, FooterComponent, INSERT_PAGE_BREAK, IconComponent, IconRegistryService, ImageInsertViewComponent, InputDirective, LINK, LINK_OFF, LabelDirective, LinkEditViewComponent, LinkMainViewComponent, LinkPropertiesViewComponent, MARKDOWN, MATCH_CASE, PHOTO, PRINT, PopoverDirective, REDO, RESTRICT_EDIT, SEARCH, SEARCH_OFF, SETTINGS, SPECIAL_CHARACTER, SUBSCRIPT, SUPERSCRIPT, SelectComponent, SelectLabelDirective, SelectOptionDirective, SpecialCharactersViewComponent, TABLE_CELL_PROPERTY, TABLE_COLUMN, TABLE_MERGE_CELL, TABLE_PROPERTY, TABLE_ROW, TABLE_ROWS, TableCellStyleViewComponent, TableCreateViewComponent, TableMainViewComponent, TableStyleViewComponent, TemplateViewComponent, TiptapBubbleMenuDirective, TiptapDraggableDirective, TiptapEditorDirective, TiptapFloatingMenuDirective, ToggleGroupComponent, ToggleOptionDirective, ToolbarBubbleMenuComponent, ToolbarComponent, ToolbarService, UNDO, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_CENTER, VERTICAL_ALIGN_TOP, buildToolbarState, selectionChangeHandler, shouldShowFnFactory, urlValidator };
|
|
6279
|
+
export { ARCHIVE, ARROW_DROP_DOWN, AngularRenderer, ButtonDirective, CHECK, CLEAR_ALL, CLOSE, CODE, CharacterCountComponent, CheckboxComponent, ColorPickerComponent, ColorPickerViewComponent, DEFAULT, DEFAULT_TOOLBAR_STATE, DESCRIPTION, DYNAMIC_FORM, DocumentEditorComponent, DocumentEditorModule, DocumentEngineKit, DynamicFieldsViewComponent, EDIT, EditorBubbleMenuComponent, EditorCapabilities, ErrorMessageComponent, EventManager, FORMAT_ALIGN_CENTER, FORMAT_ALIGN_JUSTIFY, FORMAT_ALIGN_LEFT, FORMAT_ALIGN_RIGHT, FORMAT_BOLD, FORMAT_CLEAR, FORMAT_COLOR_FILL, FORMAT_COLOR_TEXT, FORMAT_INDENT_DECREASE, FORMAT_INDENT_INCREASE, FORMAT_ITALIC, FORMAT_LINE_SPACING, FORMAT_LIST_BULLETED, FORMAT_LIST_NUMBERED, FORMAT_QUOTE, FORMAT_SIZE, FORMAT_STRIKETHROUGH, FORMAT_UNDERLINE, FocusTrapService, FooterComponent, INSERT_PAGE_BREAK, IconComponent, IconRegistryService, ImageInsertViewComponent, InputDirective, LINK, LINK_OFF, LabelDirective, LinkEditViewComponent, LinkMainViewComponent, LinkPropertiesViewComponent, MARKDOWN, MATCH_CASE, PHOTO, PRINT, PopoverDirective, REDO, RESTRICT_EDIT, SEARCH, SEARCH_OFF, SETTINGS, SPECIAL_CHARACTER, SUBSCRIPT, SUPERSCRIPT, SelectComponent, SelectLabelDirective, SelectOptionDirective, SpecialCharactersViewComponent, TABLE_CELL_PROPERTY, TABLE_COLUMN, TABLE_MERGE_CELL, TABLE_PROPERTY, TABLE_ROW, TABLE_ROWS, TableCellStyleViewComponent, TableCreateViewComponent, TableMainViewComponent, TableStyleViewComponent, TemplateViewComponent, TiptapBubbleMenuDirective, TiptapDraggableDirective, TiptapEditorDirective, TiptapFloatingMenuDirective, ToggleGroupComponent, ToggleOptionDirective, ToolbarBubbleMenuComponent, ToolbarComponent, ToolbarService, UNDO, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_CENTER, VERTICAL_ALIGN_TOP, buildToolbarState, selectionChangeHandler, shouldShowFnFactory, urlValidator };
|
|
6268
6280
|
//# sourceMappingURL=phuong-tran-redoc-document-engine-angular.mjs.map
|