@leanix/components 0.4.587 → 0.4.588
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/fesm2022/leanix-components.mjs +1922 -427
- package/fesm2022/leanix-components.mjs.map +1 -1
- package/index.d.ts +10 -0
- package/lib/forms-ui/components/rich-text-editor/components/rich-text-editor/rich-text-editor.component.d.ts +29 -0
- package/lib/forms-ui/components/rich-text-editor/components/rich-text-editor-toolbar/rich-text-editor-toolbar.component.d.ts +23 -0
- package/lib/forms-ui/components/rich-text-editor/directives/focus-editor.directive.d.ts +8 -0
- package/lib/forms-ui/components/rich-text-editor/directives/tiptap-editor.directive.d.ts +23 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/highlight-term/highlight-term-state.plugin.d.ts +8 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/highlight-term/highlight-term.directive.d.ts +8 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/highlight-term/highlight-term.extension.d.ts +9 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/highlight-term/highlight-term.plugin.d.ts +5 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/link/components/link-modal/link-modal.component.d.ts +18 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/link/link.extension.d.ts +8 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/link/link.plugin.d.ts +10 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/link/url-validator.directive.d.ts +7 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/table/index.d.ts +2 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/table/table-bubble-menu/table-bubble-menu.component.d.ts +13 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/table/table-extensions.d.ts +4 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/table/utils.d.ts +28 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/tracking/tracking.directive.d.ts +8 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/tracking/tracking.extension.d.ts +10 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/tracking/tracking.plugin.d.ts +4 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/truncate/index.d.ts +2 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/truncate/truncate-button.component.d.ts +22 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/truncate/truncate.directive.d.ts +9 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/truncate/truncate.extension.d.ts +6 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/truncate/truncate.plugin.d.ts +10 -0
- package/lib/forms-ui/components/rich-text-editor/ngx-tiptap/AngularRenderer.d.ts +12 -0
- package/lib/forms-ui/components/rich-text-editor/ngx-tiptap/NodeViewRenderer.d.ts +18 -0
- package/lib/forms-ui/components/rich-text-editor/ngx-tiptap/editor.directive.d.ts +24 -0
- package/lib/forms-ui/components/rich-text-editor/ngx-tiptap/node-view.component.d.ts +14 -0
- package/lib/forms-ui/components/rich-text-editor/pipes/extension-enabled.pipe.d.ts +8 -0
- package/lib/forms-ui/components/rich-text-editor/pipes/remove-markdown.pipe.d.ts +14 -0
- package/lib/forms-ui/components/rich-text-editor/utils/extensions-builder.d.ts +13 -0
- package/lib/forms-ui/components/rich-text-editor/utils/features.d.ts +3 -0
- package/package.json +30 -1
package/index.d.ts
CHANGED
@@ -84,6 +84,16 @@ export * from './lib/forms-ui/components/single-select/single-select.component';
|
|
84
84
|
export * from './lib/forms-ui/components/sorting-dropdown-trigger/sorting-dropdown-trigger.component';
|
85
85
|
export * from './lib/forms-ui/components/sorting-dropdown/sorting-dropdown.component';
|
86
86
|
export * from './lib/forms-ui/components/switch/switch.component';
|
87
|
+
export * from './lib/forms-ui/components/rich-text-editor/components/rich-text-editor/rich-text-editor.component';
|
88
|
+
export * from './lib/forms-ui/components/rich-text-editor/directives/focus-editor.directive';
|
89
|
+
export * from './lib/forms-ui/components/rich-text-editor/directives/tiptap-editor.directive';
|
90
|
+
export * from './lib/forms-ui/components/rich-text-editor/extensions/highlight-term/highlight-term.directive';
|
91
|
+
export * from './lib/forms-ui/components/rich-text-editor/extensions/tracking/tracking.directive';
|
92
|
+
export * from './lib/forms-ui/components/rich-text-editor/extensions/truncate/truncate.directive';
|
93
|
+
export * from './lib/forms-ui/components/rich-text-editor/ngx-tiptap/node-view.component';
|
94
|
+
export * from './lib/forms-ui/components/rich-text-editor/ngx-tiptap/NodeViewRenderer';
|
95
|
+
export * from './lib/forms-ui/components/rich-text-editor/pipes/remove-markdown.pipe';
|
96
|
+
export { ExtensionFactory } from './lib/forms-ui/components/rich-text-editor/utils/extensions-builder';
|
87
97
|
export * from './lib/forms-ui/components/keyboard-select.directive';
|
88
98
|
export * from './lib/forms-ui/components/picker/picker-trigger.directive';
|
89
99
|
export * from './lib/forms-ui/directives/contenteditable.directive';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import { JSONContent } from '@tiptap/core';
|
4
|
+
import { ExtensionFactory } from '../../utils/extensions-builder';
|
5
|
+
import { OutputFormat, RichTextEditorFeature } from '../../utils/features';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
import * as i1 from "../../directives/tiptap-editor.directive";
|
8
|
+
import * as i2 from "../../extensions/tracking/tracking.directive";
|
9
|
+
export declare class RichTextEditorComponent implements OnDestroy, ControlValueAccessor {
|
10
|
+
readonly mode: import("@angular/core").InputSignal<"edit" | "view">;
|
11
|
+
readonly outputFormat: import("@angular/core").InputSignal<OutputFormat>;
|
12
|
+
readonly additionalFeatures: import("@angular/core").InputSignal<RichTextEditorFeature[]>;
|
13
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<string | null>;
|
14
|
+
readonly maxHeight: import("@angular/core").InputSignal<string | null>;
|
15
|
+
readonly customExtensions: import("@angular/core").InputSignal<ExtensionFactory[]>;
|
16
|
+
readonly blur: import("@angular/core").OutputEmitterRef<void>;
|
17
|
+
value: JSONContent | string | null;
|
18
|
+
disabled: boolean;
|
19
|
+
editor: import("@angular/core").Signal<import("@tiptap/core").Editor>;
|
20
|
+
onChange: (_value: JSONContent | string | null) => void;
|
21
|
+
onTouched: () => void;
|
22
|
+
ngOnDestroy(): void;
|
23
|
+
writeValue(value: JSONContent | string | null): void;
|
24
|
+
registerOnChange(fn: any): void;
|
25
|
+
registerOnTouched(fn: any): void;
|
26
|
+
setDisabledState(isDisabled: boolean): void;
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RichTextEditorComponent, never>;
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RichTextEditorComponent, "lx-rich-text-editor", never, { "mode": { "alias": "mode"; "required": true; "isSignal": true; }; "outputFormat": { "alias": "outputFormat"; "required": true; "isSignal": true; }; "additionalFeatures": { "alias": "additionalFeatures"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "customExtensions": { "alias": "customExtensions"; "required": false; "isSignal": true; }; }, { "blur": "blur"; }, never, [".diagram-btn", "*"], true, [{ directive: typeof i1.TipTapEditorDirective; inputs: { "outputFormat": "outputFormat"; "additionalFeatures": "additionalFeatures"; "ariaLabelledBy": "ariaLabelledBy"; "customExtensions": "customExtensions"; "mode": "mode"; }; outputs: {}; }, { directive: typeof i2.TrackingDirective; inputs: {}; outputs: { "trackEvent": "trackEvent"; }; }]>;
|
29
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
2
|
+
import { Editor } from '@tiptap/core';
|
3
|
+
import type { Level } from '@tiptap/extension-heading';
|
4
|
+
import { Transaction } from '@tiptap/pm/state';
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export declare class RichTextEditorToolbarComponent implements OnInit, OnDestroy {
|
8
|
+
NAME: string;
|
9
|
+
editor: Editor;
|
10
|
+
headingLevels: Level[];
|
11
|
+
readonly cd: ChangeDetectorRef;
|
12
|
+
readonly isLinkModalOpen$: BehaviorSubject<boolean>;
|
13
|
+
ngOnInit(): void;
|
14
|
+
ngOnDestroy(): void;
|
15
|
+
detectChanges: () => void;
|
16
|
+
update: (event: {
|
17
|
+
editor: Editor;
|
18
|
+
transaction: Transaction;
|
19
|
+
}) => void;
|
20
|
+
insertTable(): void;
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RichTextEditorToolbarComponent, never>;
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RichTextEditorToolbarComponent, "lx-rich-text-editor-toolbar", never, { "editor": { "alias": "editor"; "required": true; }; }, {}, never, [".diagram-btn"], true, never>;
|
23
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { OnInit } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class FocusEditorDirective implements OnInit {
|
4
|
+
editor: import("@angular/core").Signal<import("@tiptap/core").Editor>;
|
5
|
+
ngOnInit(): void;
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FocusEditorDirective, never>;
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusEditorDirective, "lx-rich-text-editor[lxFocusEditor]", never, {}, {}, never, never, true, never>;
|
8
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
2
|
+
import { ExtensionFactory, ExtensionsBuilder } from '../utils/extensions-builder';
|
3
|
+
import { OutputFormat, RichTextEditorFeature } from '../utils/features';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class TipTapEditorDirective {
|
6
|
+
readonly NAME = "TipTapEditorDirective";
|
7
|
+
readonly outputFormat: import("@angular/core").InputSignal<OutputFormat>;
|
8
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<string | null>;
|
9
|
+
readonly additionalFeatures: import("@angular/core").InputSignal<RichTextEditorFeature[]>;
|
10
|
+
readonly customExtensions: import("@angular/core").InputSignal<ExtensionFactory[]>;
|
11
|
+
readonly mode: import("@angular/core").InputSignal<"edit" | "view">;
|
12
|
+
features: import("@angular/core").Signal<RichTextEditorFeature[]>;
|
13
|
+
attributes: import("@angular/core").Signal<{
|
14
|
+
[name: string]: string;
|
15
|
+
} | ((state: import("prosemirror-state").EditorState) => {
|
16
|
+
[name: string]: string;
|
17
|
+
}) | undefined>;
|
18
|
+
editor: import("@angular/core").Signal<Editor>;
|
19
|
+
extensionsBuilder: ExtensionsBuilder;
|
20
|
+
constructor();
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TipTapEditorDirective, never>;
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TipTapEditorDirective, "lx-rich-text-editor[lxEditor]", never, { "outputFormat": { "alias": "outputFormat"; "required": true; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "additionalFeatures": { "alias": "additionalFeatures"; "required": false; "isSignal": true; }; "customExtensions": { "alias": "customExtensions"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
23
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
2
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
3
|
+
export declare const highlightTermStatePluginKey: PluginKey<{
|
4
|
+
term: string | null;
|
5
|
+
}>;
|
6
|
+
export declare function highlightTermState(_editor: Editor): Plugin<{
|
7
|
+
term: null;
|
8
|
+
}>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class HighlightTermDirective {
|
3
|
+
lxHighlightTerm: import("@angular/core").InputSignal<string | null | undefined>;
|
4
|
+
editor: import("@angular/core").Signal<import("@tiptap/core").Editor>;
|
5
|
+
constructor();
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightTermDirective, never>;
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HighlightTermDirective, "lx-rich-text-editor[lxHighlightTerm]", never, { "lxHighlightTerm": { "alias": "lxHighlightTerm"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
8
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
2
|
+
export interface HighlightTermOptions {
|
3
|
+
exactMatch: boolean;
|
4
|
+
}
|
5
|
+
/**
|
6
|
+
* This extension replicates the search term highlight mechanism
|
7
|
+
* implemented by highlight-term.pipe.ts for tiptap editor.
|
8
|
+
*/
|
9
|
+
export declare const HighlightTerm: Extension<HighlightTermOptions, any>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
2
|
+
import { Plugin } from '@tiptap/pm/state';
|
3
|
+
import { DecorationSet } from '@tiptap/pm/view';
|
4
|
+
import { HighlightTermOptions } from './highlight-term.extension';
|
5
|
+
export declare function highlightTerm(_editor: Editor, options: HighlightTermOptions): Plugin<DecorationSet>;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
2
|
+
import { NgForm } from '@angular/forms';
|
3
|
+
import { Editor } from '@tiptap/core';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class LinkModalComponent {
|
6
|
+
readonly NAME = "LinkModalComponent";
|
7
|
+
editor: Editor;
|
8
|
+
readonly ngForm: import("@angular/core").Signal<NgForm>;
|
9
|
+
readonly cd: ChangeDetectorRef;
|
10
|
+
get open(): any;
|
11
|
+
get text(): any;
|
12
|
+
get url(): any;
|
13
|
+
removeLink(): void;
|
14
|
+
saveLink(): void;
|
15
|
+
closeModal(): void;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkModalComponent, never>;
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LinkModalComponent, "lx-link-modal", never, { "editor": { "alias": "editor"; "required": true; }; }, {}, never, never, true, never>;
|
18
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
2
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
3
|
+
export interface LinkPluginState {
|
4
|
+
open: boolean;
|
5
|
+
text: string | null;
|
6
|
+
url: string | null;
|
7
|
+
}
|
8
|
+
export declare const linkPluginKey: PluginKey<any>;
|
9
|
+
export declare function linkPlugin(): Plugin<LinkPluginState>;
|
10
|
+
export declare function dispatchLinkState(editor: Editor, props: LinkPluginState): void;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class UrlValidatorDirective implements Validator {
|
4
|
+
validate(control: AbstractControl<string | null>): ValidationErrors | null;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UrlValidatorDirective, never>;
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UrlValidatorDirective, "[lxUrl][ngModel]", never, {}, {}, never, never, true, never>;
|
7
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { AfterViewInit, ElementRef } from '@angular/core';
|
2
|
+
import { Editor } from '@tiptap/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class TableBubbleMenuComponent implements AfterViewInit {
|
5
|
+
NAME: string;
|
6
|
+
editor: Editor;
|
7
|
+
bubbleMenuRowRef: ElementRef;
|
8
|
+
bubbleMenuColumnRef: ElementRef;
|
9
|
+
bubbleMenuTableRef: ElementRef;
|
10
|
+
ngAfterViewInit(): void;
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableBubbleMenuComponent, never>;
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableBubbleMenuComponent, "lx-table-bubble-menu", never, { "editor": { "alias": "editor"; "required": true; }; }, {}, never, never, true, never>;
|
13
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const CustomTable: import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any>;
|
2
|
+
export declare const CustomTableRow: import("@tiptap/core").Node<import("@tiptap/extension-table-row").TableRowOptions, any>;
|
3
|
+
export declare const CustomTableCell: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>;
|
4
|
+
export declare const CustomTableHeader: import("@tiptap/core").Node<import("@tiptap/extension-table-header").TableHeaderOptions, any>;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
2
|
+
import { EditorState, Selection, Transaction } from '@tiptap/pm/state';
|
3
|
+
import { EditorView } from '@tiptap/pm/view';
|
4
|
+
export declare const isColumnSelected: (columnIndex: number, selection: Selection) => boolean;
|
5
|
+
export declare const isRowSelected: (rowIndex: number, selection: Selection) => boolean;
|
6
|
+
export declare const isTableSelected: (selection: Selection) => boolean;
|
7
|
+
export declare const getCellsInColumn: (columnIndex: number | number[], selection: Selection) => {
|
8
|
+
pos: number;
|
9
|
+
start: number;
|
10
|
+
node: import("prosemirror-model").Node | null;
|
11
|
+
}[] | null;
|
12
|
+
export declare const getCellsInRow: (rowIndex: number | number[], selection: Selection) => {
|
13
|
+
pos: number;
|
14
|
+
start: number;
|
15
|
+
node: import("prosemirror-model").Node | null;
|
16
|
+
}[] | null;
|
17
|
+
export declare const selectColumn: (index: number, tr: Transaction) => Transaction;
|
18
|
+
export declare const selectRow: (index: number, tr: Transaction) => Transaction;
|
19
|
+
type SelectorCheckParams = {
|
20
|
+
editor: Editor;
|
21
|
+
view: EditorView;
|
22
|
+
state: EditorState;
|
23
|
+
from: number;
|
24
|
+
selectorType: 'selector-column' | 'selector-row';
|
25
|
+
};
|
26
|
+
export declare const isColumnSelectorActive: (params: Omit<SelectorCheckParams, "selectorType">) => boolean;
|
27
|
+
export declare const isRowSelectorActive: (params: Omit<SelectorCheckParams, "selectorType">) => boolean;
|
28
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class TrackingDirective {
|
3
|
+
trackEvent: import("@angular/core").OutputEmitterRef<"INSERT_TABLE">;
|
4
|
+
editor: import("@angular/core").Signal<import("@tiptap/core").Editor>;
|
5
|
+
constructor();
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TrackingDirective, never>;
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TrackingDirective, "lx-rich-text-editor[lxTracking]", never, {}, { "trackEvent": "trackEvent"; }, never, never, true, never>;
|
8
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
2
|
+
import { TrackingEvent } from './tracking.plugin';
|
3
|
+
declare module '@tiptap/core' {
|
4
|
+
interface Commands<ReturnType> {
|
5
|
+
tracking: {
|
6
|
+
track: (trackingEvent: TrackingEvent) => ReturnType;
|
7
|
+
};
|
8
|
+
}
|
9
|
+
}
|
10
|
+
export declare const Tracking: Extension<any, any>;
|
package/lib/forms-ui/components/rich-text-editor/extensions/truncate/truncate-button.component.d.ts
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
2
|
+
import { Editor } from '@tiptap/core';
|
3
|
+
import { Transaction } from '@tiptap/pm/state';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class TruncateButtonComponent implements OnInit, OnDestroy {
|
6
|
+
readonly NAME = "TruncateButtonComponent";
|
7
|
+
editor: Editor;
|
8
|
+
private readonly cdr;
|
9
|
+
get collapsed(): any;
|
10
|
+
get key(): ".showMore" | ".showLess";
|
11
|
+
get activated(): any;
|
12
|
+
get showToggleButton(): any;
|
13
|
+
ngOnInit(): void;
|
14
|
+
ngOnDestroy(): void;
|
15
|
+
update: (event: {
|
16
|
+
editor: Editor;
|
17
|
+
transaction: Transaction;
|
18
|
+
}) => void;
|
19
|
+
onClick(event: Event): void;
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TruncateButtonComponent, never>;
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TruncateButtonComponent, "lx-truncate-button", never, { "editor": { "alias": "editor"; "required": true; }; }, {}, never, never, true, never>;
|
22
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { TruncateOptions } from './truncate.extension';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class TruncateDirective {
|
4
|
+
lxTruncate: import("@angular/core").InputSignal<TruncateOptions | undefined>;
|
5
|
+
editor: import("@angular/core").Signal<import("@tiptap/core").Editor>;
|
6
|
+
constructor();
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TruncateDirective, never>;
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TruncateDirective, "lx-rich-text-editor[lxTruncate]", never, { "lxTruncate": { "alias": "lxTruncate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
9
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
2
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
3
|
+
export declare const truncatePluginKey: PluginKey<any>;
|
4
|
+
export interface TruncatePluginState {
|
5
|
+
collapsed?: boolean;
|
6
|
+
activated?: boolean;
|
7
|
+
showToggleButton?: boolean;
|
8
|
+
maxLines?: number;
|
9
|
+
}
|
10
|
+
export declare function truncate(editor: Editor): Plugin<TruncatePluginState>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { ElementRef, Injector, Type } from '@angular/core';
|
2
|
+
export declare class AngularRenderer<C, P> {
|
3
|
+
private applicationRef;
|
4
|
+
private componentRef;
|
5
|
+
constructor(ViewComponent: Type<C>, injector: Injector, props: Partial<P>);
|
6
|
+
get instance(): C;
|
7
|
+
get elementRef(): ElementRef;
|
8
|
+
get dom(): HTMLElement;
|
9
|
+
updateProps<T extends P>(props: Partial<T>): void;
|
10
|
+
detectChanges(): void;
|
11
|
+
destroy(): void;
|
12
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Injector, Type } from '@angular/core';
|
2
|
+
import { NodeViewRenderer, NodeViewRendererOptions } from '@tiptap/core';
|
3
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
4
|
+
import type { Decoration } from '@tiptap/pm/view';
|
5
|
+
import { AngularNodeViewComponent } from './node-view.component';
|
6
|
+
interface RendererUpdateProps {
|
7
|
+
oldNode: ProseMirrorNode;
|
8
|
+
oldDecorations: Decoration[];
|
9
|
+
newNode: ProseMirrorNode;
|
10
|
+
newDecorations: Decoration[];
|
11
|
+
updateProps: () => void;
|
12
|
+
}
|
13
|
+
interface AngularNodeViewRendererOptions extends NodeViewRendererOptions {
|
14
|
+
update?: ((props: RendererUpdateProps) => boolean) | null;
|
15
|
+
injector: Injector;
|
16
|
+
}
|
17
|
+
export declare const AngularNodeViewRenderer: (ViewComponent: Type<AngularNodeViewComponent>, options: Partial<AngularNodeViewRendererOptions>) => NodeViewRenderer;
|
18
|
+
export {};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import { Content, Editor, type EditorEvents } from '@tiptap/core';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class EditorDirective implements OnInit, AfterViewInit, ControlValueAccessor {
|
6
|
+
protected elRef: ElementRef<HTMLElement>;
|
7
|
+
protected renderer: Renderer2;
|
8
|
+
protected changeDetectorRef: ChangeDetectorRef;
|
9
|
+
editor: Editor;
|
10
|
+
outputFormat: 'json' | 'markdown';
|
11
|
+
blur: EventEmitter<any>;
|
12
|
+
constructor(elRef: ElementRef<HTMLElement>, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
|
13
|
+
protected onChange: (value: Content) => void;
|
14
|
+
protected onTouched: () => void;
|
15
|
+
writeValue(value: Content): void;
|
16
|
+
registerOnChange(fn: () => void): void;
|
17
|
+
registerOnTouched(fn: () => void): void;
|
18
|
+
setDisabledState(isDisabled: boolean): void;
|
19
|
+
protected handleChange: ({ editor, transaction }: EditorEvents["transaction"]) => void;
|
20
|
+
ngOnInit(): void;
|
21
|
+
ngAfterViewInit(): void;
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditorDirective, never>;
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditorDirective, "tiptap-editor[editor]", never, { "editor": { "alias": "editor"; "required": true; }; "outputFormat": { "alias": "outputFormat"; "required": true; }; }, { "blur": "blur"; }, never, never, true, never>;
|
24
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class AngularNodeViewComponent implements NodeViewProps {
|
4
|
+
editor: NodeViewProps['editor'];
|
5
|
+
node: NodeViewProps['node'];
|
6
|
+
decorations: NodeViewProps['decorations'];
|
7
|
+
selected: NodeViewProps['selected'];
|
8
|
+
extension: NodeViewProps['extension'];
|
9
|
+
getPos: NodeViewProps['getPos'];
|
10
|
+
updateAttributes: NodeViewProps['updateAttributes'];
|
11
|
+
deleteNode: NodeViewProps['deleteNode'];
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularNodeViewComponent, never>;
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularNodeViewComponent, "ng-component", never, { "editor": { "alias": "editor"; "required": false; }; "node": { "alias": "node"; "required": false; }; "decorations": { "alias": "decorations"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "extension": { "alias": "extension"; "required": false; }; "getPos": { "alias": "getPos"; "required": false; }; "updateAttributes": { "alias": "updateAttributes"; "required": false; }; "deleteNode": { "alias": "deleteNode"; "required": false; }; }, {}, never, never, false, never>;
|
14
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import { Editor } from '@tiptap/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class ExtensionEnabledPipe implements PipeTransform {
|
5
|
+
transform(name: string, editor: Editor): boolean;
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExtensionEnabledPipe, never>;
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ExtensionEnabledPipe, "lxExtensionEnabled", true>;
|
8
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* Removes markdown syntax from text.
|
5
|
+
* e.g '### This is a heading' will become 'This is a heading'
|
6
|
+
*
|
7
|
+
* It does not remove links. Links can be post processed by LxLinkifyPipe or LxUnLinkifyPipe
|
8
|
+
*/
|
9
|
+
export declare class RemoveMarkdownPipe implements PipeTransform {
|
10
|
+
transform(markdown: string): string;
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoveMarkdownPipe, never>;
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<RemoveMarkdownPipe, "lxRemoveMarkdown", true>;
|
13
|
+
}
|
14
|
+
export declare function markdownToText(md: string): string;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Injector } from '@angular/core';
|
2
|
+
import { Extension, Extensions, Node } from '@tiptap/core';
|
3
|
+
import { OutputFormat, RichTextEditorFeature } from './features';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export type ExtensionFactory = (injector: Injector) => Node | Extension;
|
6
|
+
export declare class ExtensionsBuilder {
|
7
|
+
injector: Injector;
|
8
|
+
build(features: RichTextEditorFeature[], output: OutputFormat): Extensions;
|
9
|
+
buildCustomExtensions(extensionFactories: ExtensionFactory[]): Extensions;
|
10
|
+
private pluginRegistry;
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExtensionsBuilder, never>;
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExtensionsBuilder>;
|
13
|
+
}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export type OutputFormat = 'json' | 'markdown';
|
2
|
+
export type RichTextEditorFeature = 'Heading' | 'Bold' | 'Italic' | 'Underline' | 'Strike' | 'List' | 'TextAlign' | 'Code' | 'Link' | 'Table' | 'Truncate' | 'HighlightTerm';
|
3
|
+
export declare const EDITOR_FEATURES: Record<OutputFormat, RichTextEditorFeature[]>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@leanix/components",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.588",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"author": "LeanIX GmbH",
|
6
6
|
"repository": {
|
@@ -23,6 +23,35 @@
|
|
23
23
|
"ngx-infinite-scroll": "19.0.0",
|
24
24
|
"lodash": "4.17.21",
|
25
25
|
"lodash-es": "4.17.21",
|
26
|
+
"@tiptap/core": "2.6.6",
|
27
|
+
"@tiptap/extension-heading": "2.12.0",
|
28
|
+
"@tiptap/pm": "2.6.6",
|
29
|
+
"@tiptap/extension-link": "2.6.6",
|
30
|
+
"@tiptap/extension-bubble-menu": "2.6.6",
|
31
|
+
"@tiptap/extension-table": "2.6.6",
|
32
|
+
"@tiptap/extension-table-cell": "2.6.6",
|
33
|
+
"@tiptap/extension-table-header": "2.6.6",
|
34
|
+
"@tiptap/extension-table-row": "2.6.6",
|
35
|
+
"@tiptap/extension-floating-menu": "2.6.6",
|
36
|
+
"@tiptap/extension-bold": "2.12.0",
|
37
|
+
"@tiptap/extension-bullet-list": "2.12.0",
|
38
|
+
"@tiptap/extension-code": "2.12.0",
|
39
|
+
"@tiptap/extension-code-block": "2.6.6",
|
40
|
+
"@tiptap/extension-document": "2.12.0",
|
41
|
+
"@tiptap/extension-dropcursor": "2.12.0",
|
42
|
+
"@tiptap/extension-gapcursor": "2.12.0",
|
43
|
+
"@tiptap/extension-hard-break": "2.12.0",
|
44
|
+
"@tiptap/extension-history": "2.12.0",
|
45
|
+
"@tiptap/extension-horizontal-rule": "2.12.0",
|
46
|
+
"@tiptap/extension-italic": "2.12.0",
|
47
|
+
"@tiptap/extension-list-item": "2.12.0",
|
48
|
+
"@tiptap/extension-ordered-list": "2.12.0",
|
49
|
+
"@tiptap/extension-paragraph": "2.12.0",
|
50
|
+
"@tiptap/extension-strike": "2.12.0",
|
51
|
+
"@tiptap/extension-text": "2.12.0",
|
52
|
+
"@tiptap/extension-text-align": "2.6.6",
|
53
|
+
"@tiptap/extension-underline": "2.6.6",
|
54
|
+
"tiptap-markdown": "0.8.10",
|
26
55
|
"tslib": "^2.3.0"
|
27
56
|
},
|
28
57
|
"peerDependencies": {
|