@ngstarter-ui/components 22.0.6 → 22.1.1
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/ai/component-registry.json +249 -167
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +781 -749
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3689 -0
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -0
- package/package.json +5 -19
- package/styles/_tokens.scss +17 -2
- package/styles/themes/chalk.scss +1 -0
- package/types/ngstarter-ui-components-comment-editor.d.ts +150 -99
- package/types/ngstarter-ui-components-headless-editor.d.ts +795 -0
- package/fesm2022/ngstarter-ui-components-text-editor.mjs +0 -1038
- package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +0 -1
- package/types/ngstarter-ui-components-text-editor.d.ts +0 -192
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngstarter-ui/components",
|
|
3
3
|
"description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
|
|
4
|
-
"version": "22.
|
|
4
|
+
"version": "22.1.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/elementarlabsdev/ngstarter.git"
|
|
@@ -55,20 +55,6 @@
|
|
|
55
55
|
"@ngrx/signals": "^22.0.1",
|
|
56
56
|
"@tailwindcss/postcss": "^4.2.2",
|
|
57
57
|
"@tailwindcss/typography": "^0.5.19",
|
|
58
|
-
"@tiptap/core": "2.10.2",
|
|
59
|
-
"@tiptap/extension-bubble-menu": "2.10.2",
|
|
60
|
-
"@tiptap/extension-code-block": "2.10.2",
|
|
61
|
-
"@tiptap/extension-dropcursor": "2.10.2",
|
|
62
|
-
"@tiptap/extension-floating-menu": "2.10.2",
|
|
63
|
-
"@tiptap/extension-history": "2.10.2",
|
|
64
|
-
"@tiptap/extension-horizontal-rule": "2.10.3",
|
|
65
|
-
"@tiptap/extension-image": "2.10.2",
|
|
66
|
-
"@tiptap/extension-link": "2.10.4",
|
|
67
|
-
"@tiptap/extension-list-item": "2.10.2",
|
|
68
|
-
"@tiptap/extension-ordered-list": "2.10.2",
|
|
69
|
-
"@tiptap/extension-placeholder": "2.10.2",
|
|
70
|
-
"@tiptap/extension-youtube": "2.10.2",
|
|
71
|
-
"@tiptap/pm": "2.10.2",
|
|
72
58
|
"@uiw/codemirror-theme-github": "^4.25.9",
|
|
73
59
|
"@viselect/vanilla": "^3.9.0",
|
|
74
60
|
"autoprefixer": "^10.4.17",
|
|
@@ -303,6 +289,10 @@
|
|
|
303
289
|
"types": "./types/ngstarter-ui-components-guided-tour.d.ts",
|
|
304
290
|
"default": "./fesm2022/ngstarter-ui-components-guided-tour.mjs"
|
|
305
291
|
},
|
|
292
|
+
"./headless-editor": {
|
|
293
|
+
"types": "./types/ngstarter-ui-components-headless-editor.d.ts",
|
|
294
|
+
"default": "./fesm2022/ngstarter-ui-components-headless-editor.mjs"
|
|
295
|
+
},
|
|
306
296
|
"./headless-stepper": {
|
|
307
297
|
"types": "./types/ngstarter-ui-components-headless-stepper.d.ts",
|
|
308
298
|
"default": "./fesm2022/ngstarter-ui-components-headless-stepper.mjs"
|
|
@@ -555,10 +545,6 @@
|
|
|
555
545
|
"types": "./types/ngstarter-ui-components-tabs.d.ts",
|
|
556
546
|
"default": "./fesm2022/ngstarter-ui-components-tabs.mjs"
|
|
557
547
|
},
|
|
558
|
-
"./text-editor": {
|
|
559
|
-
"types": "./types/ngstarter-ui-components-text-editor.d.ts",
|
|
560
|
-
"default": "./fesm2022/ngstarter-ui-components-text-editor.mjs"
|
|
561
|
-
},
|
|
562
548
|
"./thumbnail-maker": {
|
|
563
549
|
"types": "./types/ngstarter-ui-components-thumbnail-maker.d.ts",
|
|
564
550
|
"default": "./fesm2022/ngstarter-ui-components-thumbnail-maker.mjs"
|
package/styles/_tokens.scss
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
// Base tokens are declared on every theme scope, not only on :root. Custom
|
|
2
|
+
// properties that reference other tokens (var(...)) are resolved where they are
|
|
3
|
+
// declared, so a nested [data-ngs-theme='chalk'] scope must re-declare them to
|
|
4
|
+
// pick up its own palette instead of inheriting values resolved for :root.
|
|
1
5
|
:root,
|
|
2
|
-
[data-ngs-theme
|
|
6
|
+
[data-ngs-theme] {
|
|
3
7
|
color-scheme: light;
|
|
4
8
|
--ngs-font-family-base: "DM Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
5
9
|
--ngs-font-size-xs: 0.75rem;
|
|
@@ -222,7 +226,7 @@
|
|
|
222
226
|
--ngs-overlay-backdrop-bg: rgba(18, 32, 59, 0.30);
|
|
223
227
|
--ngs-overlay-backdrop-blur: 3px;
|
|
224
228
|
--ngs-table-bg: var(--ngs-color-surface);
|
|
225
|
-
--ngs-table-border-color:
|
|
229
|
+
--ngs-table-border-color: var(--ngs-color-border);
|
|
226
230
|
--ngs-table-header-color: var(--ngs-color-on-surface-variant);
|
|
227
231
|
--ngs-table-header-bg: var(--ngs-color-surface);
|
|
228
232
|
--ngs-table-row-bg: var(--ngs-color-surface);
|
|
@@ -285,6 +289,17 @@
|
|
|
285
289
|
--ngs-nav-divider-height: 1px;
|
|
286
290
|
--ngs-nav-divider-margin: --spacing(6) 0;
|
|
287
291
|
--ngs-sidebar-width: var(--ngs-sidenav-width, 17.5rem);
|
|
292
|
+
|
|
293
|
+
--ngs-loader-overlay-bg: var(--ngs-color-surface-loading);
|
|
294
|
+
--ngs-chip-radius: var(--ngs-radius-full);
|
|
295
|
+
--ngs-chip-selected-background: var(--ngs-color-primary-container);
|
|
296
|
+
--ngs-chip-selected-color: var(--ngs-color-primary);
|
|
297
|
+
--ngs-segmented-bg: var(--ngs-color-surface-container-high);
|
|
298
|
+
--ngs-segmented-button-selected-bg: var(--ngs-color-surface);
|
|
299
|
+
--ngs-segmented-button-selected-shadow: var(--ngs-shadow-sm);
|
|
300
|
+
--ngs-card-bg: var(--ngs-color-surface);
|
|
301
|
+
--ngs-card-border-color: var(--ngs-color-border);
|
|
302
|
+
--ngs-card-radius: var(--ngs-radius-lg);
|
|
288
303
|
}
|
|
289
304
|
|
|
290
305
|
:root,
|
package/styles/themes/chalk.scss
CHANGED
|
@@ -189,6 +189,7 @@
|
|
|
189
189
|
--ngs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
|
|
190
190
|
--ngs-shadow-md: 0 12px 28px rgba(0, 0, 0, 0.42);
|
|
191
191
|
--ngs-shadow-lg: 0 22px 52px rgba(0, 0, 0, 0.56);
|
|
192
|
+
--ngs-dialog-shadow: var(--ngs-shadow-lg);
|
|
192
193
|
|
|
193
194
|
--ngs-color-primary-seed: #edf16e;
|
|
194
195
|
--ngs-color-primary: #edf16e;
|
|
@@ -1,73 +1,114 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken
|
|
3
|
-
import {
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import { NgsHeadlessEditor, NgsHeadlessEditorDocument, NgsHeadlessEditorMarkAttributes, NgsHeadlessEditorPlugin, NgsHeadlessEditorCommand, NgsHeadlessEditorBlock } from '@ngstarter-ui/components/headless-editor';
|
|
4
4
|
import * as i1 from '@ngstarter-ui/components/upload';
|
|
5
5
|
import { UploadFileSelectedEvent } from '@ngstarter-ui/components/upload';
|
|
6
6
|
|
|
7
7
|
interface CommentEditorInterface {
|
|
8
|
-
api: CommentEditorAPI;
|
|
8
|
+
readonly api: CommentEditorAPI;
|
|
9
9
|
}
|
|
10
10
|
interface CommentEditorAPI {
|
|
11
|
-
isCommandDisabled
|
|
12
|
-
isActive
|
|
13
|
-
runCommand
|
|
14
|
-
editor
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
showToolbar
|
|
19
|
-
hideToolbar
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
isCommandDisabled(command: string): boolean | null;
|
|
12
|
+
isActive(command: string): boolean;
|
|
13
|
+
runCommand(command: string): void;
|
|
14
|
+
editor(): NgsHeadlessEditor;
|
|
15
|
+
document(): NgsHeadlessEditorDocument;
|
|
16
|
+
isToolbarActive(): boolean;
|
|
17
|
+
toggleToolbar(): void;
|
|
18
|
+
showToolbar(): void;
|
|
19
|
+
hideToolbar(): void;
|
|
20
|
+
isEditorActivated(): boolean;
|
|
21
|
+
showFullView(): void;
|
|
22
|
+
hideFullView(): void;
|
|
23
|
+
insertText(text: string): void;
|
|
24
|
+
insertImage(file: File): void;
|
|
25
|
+
insertYoutube(url: string): boolean;
|
|
26
|
+
getMarkAttributes(type: string): NgsHeadlessEditorMarkAttributes | undefined;
|
|
27
|
+
setTextColor(color: string): boolean;
|
|
28
|
+
unsetTextColor(): boolean;
|
|
29
|
+
setBackgroundColor(color: string): boolean;
|
|
30
|
+
unsetBackgroundColor(): boolean;
|
|
31
|
+
setLink(url: string): boolean;
|
|
32
|
+
unsetLink(): boolean;
|
|
33
|
+
clear(): void;
|
|
34
|
+
focus(): void;
|
|
35
|
+
}
|
|
36
|
+
declare const COMMENT_EDITOR: InjectionToken<CommentEditorInterface>;
|
|
26
37
|
declare const COMMENT_EDITOR_BUBBLE_MENU: InjectionToken<unknown>;
|
|
27
38
|
|
|
28
|
-
declare class CommentEditor
|
|
29
|
-
|
|
30
|
-
private
|
|
31
|
-
private
|
|
32
|
-
private
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
declare class CommentEditor {
|
|
40
|
+
readonly editor: NgsHeadlessEditor;
|
|
41
|
+
private readonly host;
|
|
42
|
+
private readonly renderer;
|
|
43
|
+
private readonly documentRef;
|
|
44
|
+
private readonly destroyRef;
|
|
45
|
+
private readonly surface;
|
|
46
|
+
private readonly bubbleMenuLayer;
|
|
47
|
+
private readonly basicPlugin;
|
|
48
|
+
private readonly colorPlugin;
|
|
49
|
+
private readonly commentPlugin;
|
|
50
|
+
private readonly toolbarActive;
|
|
51
|
+
private readonly fullViewActive;
|
|
52
|
+
private bubbleMenuFrame;
|
|
53
|
+
readonly value: i0.ModelSignal<NgsHeadlessEditorDocument>;
|
|
54
|
+
readonly plugins: i0.InputSignal<readonly NgsHeadlessEditorPlugin[]>;
|
|
55
|
+
readonly contentMaxHeight: i0.InputSignal<number | undefined>;
|
|
56
|
+
readonly buttonCancelLabel: i0.InputSignal<string>;
|
|
57
|
+
readonly buttonSendLabel: i0.InputSignal<string>;
|
|
58
|
+
readonly buttonSubmitLabel: i0.InputSignal<string | undefined>;
|
|
59
|
+
readonly placeholder: i0.InputSignal<string>;
|
|
60
|
+
readonly ariaLabel: i0.InputSignal<string>;
|
|
61
|
+
readonly toolbarAlwaysVisible: i0.InputSignalWithTransform<boolean, unknown>;
|
|
62
|
+
readonly fullViewMode: i0.InputSignalWithTransform<boolean, unknown>;
|
|
63
|
+
readonly cancelButtonAlwaysVisible: i0.InputSignalWithTransform<boolean, unknown>;
|
|
64
|
+
readonly allowEmptyContent: i0.InputSignalWithTransform<boolean, unknown>;
|
|
65
|
+
readonly allowEmpty: i0.InputSignalWithTransform<boolean, unknown>;
|
|
66
|
+
readonly autoClear: i0.InputSignalWithTransform<boolean, unknown>;
|
|
67
|
+
readonly loading: i0.InputSignalWithTransform<boolean, unknown>;
|
|
68
|
+
readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
69
|
+
readonly readOnly: i0.InputSignalWithTransform<boolean, unknown>;
|
|
70
|
+
readonly imageUploadFn: i0.InputSignal<((file: Blob) => Promise<string>) | undefined>;
|
|
71
|
+
readonly submitted: i0.OutputEmitterRef<NgsHeadlessEditorDocument>;
|
|
51
72
|
readonly sent: i0.OutputEmitterRef<string>;
|
|
52
73
|
readonly canceled: i0.OutputEmitterRef<void>;
|
|
53
|
-
|
|
54
|
-
|
|
74
|
+
readonly isEditorActivated: i0.Signal<boolean>;
|
|
75
|
+
readonly isToolbarVisible: i0.Signal<boolean>;
|
|
76
|
+
readonly isBubbleMenuVisible: i0.Signal<boolean>;
|
|
77
|
+
readonly isCancelVisible: i0.Signal<boolean>;
|
|
78
|
+
readonly sendLabel: i0.Signal<string>;
|
|
79
|
+
readonly sendDisabled: i0.Signal<boolean>;
|
|
80
|
+
private readonly commands;
|
|
81
|
+
readonly api: CommentEditorAPI;
|
|
82
|
+
constructor();
|
|
55
83
|
insertText(text: string): void;
|
|
56
84
|
isCommandDisabled(command: string): boolean | null;
|
|
57
|
-
|
|
58
|
-
|
|
85
|
+
isActive(command: string): boolean;
|
|
86
|
+
runCommand(command: string): void;
|
|
87
|
+
send(event?: Event): void;
|
|
88
|
+
submit(event?: Event): void;
|
|
89
|
+
cancel(event?: Event): void;
|
|
59
90
|
clear(): void;
|
|
60
|
-
activateFullView(event?:
|
|
91
|
+
activateFullView(event?: Event): void;
|
|
61
92
|
showFullView(): void;
|
|
62
93
|
hideFullView(): void;
|
|
63
94
|
toggleToolbar(): void;
|
|
64
95
|
showToolbar(): void;
|
|
65
96
|
hideToolbar(): void;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
97
|
+
focus(): void;
|
|
98
|
+
setLink(url: string): boolean;
|
|
99
|
+
setTextColor(color: string): boolean;
|
|
100
|
+
unsetTextColor(): boolean;
|
|
101
|
+
setBackgroundColor(color: string): boolean;
|
|
102
|
+
unsetBackgroundColor(): boolean;
|
|
103
|
+
unsetLink(): boolean;
|
|
104
|
+
insertYoutube(url: string): boolean;
|
|
105
|
+
insertImage(file: File): void;
|
|
106
|
+
private currentBlockIsEmpty;
|
|
107
|
+
private readFile;
|
|
108
|
+
private scheduleBubbleMenuPosition;
|
|
109
|
+
private positionBubbleMenu;
|
|
69
110
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditor, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CommentEditor, "ngs-comment-editor", ["ngsCommentEditor"], { "contentMaxHeight": { "alias": "contentMaxHeight"; "required": false; "isSignal": true; }; "buttonCancelLabel": { "alias": "buttonCancelLabel"; "required": false; "isSignal": true; }; "buttonSendLabel": { "alias": "buttonSendLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "toolbarAlwaysVisible": { "alias": "toolbarAlwaysVisible"; "required": false; "isSignal": true; }; "fullViewMode": { "alias": "fullViewMode"; "required": false; "isSignal": true; }; "cancelButtonAlwaysVisible": { "alias": "cancelButtonAlwaysVisible"; "required": false; "isSignal": true; }; "allowEmptyContent": { "alias": "allowEmptyContent"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "imageUploadFn": { "alias": "imageUploadFn"; "required": false; "isSignal": true; }; }, { "sent": "sent"; "canceled": "canceled"; }, never, ["ngs-comment-editor-toolbar", "*", "ngs-comment-editor-footer-bar", "ngs-comment-editor-bubble-menu"], true, never>;
|
|
111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CommentEditor, "ngs-comment-editor", ["ngsCommentEditor"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "plugins": { "alias": "plugins"; "required": false; "isSignal": true; }; "contentMaxHeight": { "alias": "contentMaxHeight"; "required": false; "isSignal": true; }; "buttonCancelLabel": { "alias": "buttonCancelLabel"; "required": false; "isSignal": true; }; "buttonSendLabel": { "alias": "buttonSendLabel"; "required": false; "isSignal": true; }; "buttonSubmitLabel": { "alias": "buttonSubmitLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "toolbarAlwaysVisible": { "alias": "toolbarAlwaysVisible"; "required": false; "isSignal": true; }; "fullViewMode": { "alias": "fullViewMode"; "required": false; "isSignal": true; }; "cancelButtonAlwaysVisible": { "alias": "cancelButtonAlwaysVisible"; "required": false; "isSignal": true; }; "allowEmptyContent": { "alias": "allowEmptyContent"; "required": false; "isSignal": true; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "imageUploadFn": { "alias": "imageUploadFn"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "submitted": "submitted"; "sent": "sent"; "canceled": "canceled"; }, never, ["ngs-comment-editor-toolbar", "*", "ngs-comment-editor-footer-bar", "ngs-comment-editor-bubble-menu"], true, never>;
|
|
71
112
|
}
|
|
72
113
|
|
|
73
114
|
declare class CommentEditorDivider {
|
|
@@ -81,7 +122,7 @@ declare class CommentEditorToolbar {
|
|
|
81
122
|
}
|
|
82
123
|
|
|
83
124
|
declare class CommentEditorBubbleMenu {
|
|
84
|
-
protected commentEditor: CommentEditorInterface;
|
|
125
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
85
126
|
getLinkUrl(): string | null;
|
|
86
127
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorBubbleMenu, never>;
|
|
87
128
|
static ɵcmp: i0.ɵɵComponentDeclaration<CommentEditorBubbleMenu, "ngs-comment-editor-bubble-menu", ["ngsCommentEditorBubbleMenu"], {}, {}, never, ["[ngsCommentEditorCommandEditLink],[ngsCommentEditorCommandUnsetLink]", "[ngsCommentEditorCommand],ngs-comment-editor-divider"], true, never>;
|
|
@@ -97,113 +138,123 @@ declare class CommentEditorCommandDirective {
|
|
|
97
138
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandDirective, "[ngsCommentEditorCommand]", never, {}, {}, never, never, true, never>;
|
|
98
139
|
}
|
|
99
140
|
|
|
100
|
-
declare class
|
|
101
|
-
protected commentEditor: CommentEditorInterface;
|
|
102
|
-
protected
|
|
141
|
+
declare abstract class CommentEditorCommandBase {
|
|
142
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
143
|
+
protected preserveSelection(event: MouseEvent): void;
|
|
144
|
+
protected run(command: string, event?: Event): void;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare class CommentEditorCommandBoldDirective extends CommentEditorCommandBase {
|
|
103
148
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandBoldDirective, never>;
|
|
104
149
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandBoldDirective, "[ngsCommentEditorCommandBold]", ["ngsCommentEditorCommandBold"], {}, {}, never, never, true, never>;
|
|
105
150
|
}
|
|
106
151
|
|
|
107
|
-
declare class CommentEditorCommandItalicDirective {
|
|
108
|
-
protected commentEditor: CommentEditorInterface;
|
|
109
|
-
protected onClick(): void;
|
|
152
|
+
declare class CommentEditorCommandItalicDirective extends CommentEditorCommandBase {
|
|
110
153
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandItalicDirective, never>;
|
|
111
154
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandItalicDirective, "[ngsCommentEditorCommandItalic]", never, {}, {}, never, never, true, never>;
|
|
112
155
|
}
|
|
113
156
|
|
|
114
|
-
declare class CommentEditorCommandStrikeDirective {
|
|
115
|
-
protected commentEditor: CommentEditorInterface;
|
|
116
|
-
protected onClick(): void;
|
|
157
|
+
declare class CommentEditorCommandStrikeDirective extends CommentEditorCommandBase {
|
|
117
158
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandStrikeDirective, never>;
|
|
118
159
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandStrikeDirective, "[ngsCommentEditorCommandStrike]", never, {}, {}, never, never, true, never>;
|
|
119
160
|
}
|
|
120
161
|
|
|
121
|
-
declare class CommentEditorCommandBulletListDirective {
|
|
122
|
-
protected commentEditor: CommentEditorInterface;
|
|
123
|
-
protected onClick(): void;
|
|
162
|
+
declare class CommentEditorCommandBulletListDirective extends CommentEditorCommandBase {
|
|
124
163
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandBulletListDirective, never>;
|
|
125
164
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandBulletListDirective, "[ngsCommentEditorCommandBulletList]", never, {}, {}, never, never, true, never>;
|
|
126
165
|
}
|
|
127
166
|
|
|
128
|
-
declare class CommentEditorCommandOrderedListDirective {
|
|
129
|
-
protected commentEditor: CommentEditorInterface;
|
|
130
|
-
protected onClick(): void;
|
|
167
|
+
declare class CommentEditorCommandOrderedListDirective extends CommentEditorCommandBase {
|
|
131
168
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandOrderedListDirective, never>;
|
|
132
169
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandOrderedListDirective, "[ngsCommentEditorCommandOrderedList]", never, {}, {}, never, never, true, never>;
|
|
133
170
|
}
|
|
134
171
|
|
|
135
|
-
declare class CommentEditorCommandBlockquoteDirective {
|
|
136
|
-
protected commentEditor: CommentEditorInterface;
|
|
137
|
-
protected onClick(): void;
|
|
172
|
+
declare class CommentEditorCommandBlockquoteDirective extends CommentEditorCommandBase {
|
|
138
173
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandBlockquoteDirective, never>;
|
|
139
174
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandBlockquoteDirective, "[ngsCommentEditorCommandBlockquote]", never, {}, {}, never, never, true, never>;
|
|
140
175
|
}
|
|
141
176
|
|
|
142
|
-
declare class CommentEditorCommandCodeBlockDirective {
|
|
143
|
-
protected commentEditor: CommentEditorInterface;
|
|
144
|
-
protected onClick(): void;
|
|
177
|
+
declare class CommentEditorCommandCodeBlockDirective extends CommentEditorCommandBase {
|
|
145
178
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandCodeBlockDirective, never>;
|
|
146
179
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandCodeBlockDirective, "[ngsCommentEditorCommandCodeBlock]", never, {}, {}, never, never, true, never>;
|
|
147
180
|
}
|
|
148
181
|
|
|
149
182
|
declare class CommentEditorCommandImageDirective {
|
|
150
|
-
protected commentEditor: CommentEditorInterface;
|
|
151
|
-
protected
|
|
183
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
184
|
+
protected selectImage(event: UploadFileSelectedEvent): void;
|
|
152
185
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandImageDirective, never>;
|
|
153
186
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandImageDirective, "[ngsCommentEditorCommandImage]", never, {}, {}, never, never, true, [{ directive: typeof i1.UploadTriggerDirective; inputs: {}; outputs: { "fileSelected": "fileSelected"; }; }]>;
|
|
154
187
|
}
|
|
155
188
|
|
|
156
189
|
declare class CommentEditorCommandYoutubeDirective {
|
|
157
|
-
|
|
158
|
-
private
|
|
159
|
-
|
|
160
|
-
protected
|
|
190
|
+
private readonly destroyRef;
|
|
191
|
+
private readonly dialog;
|
|
192
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
193
|
+
protected preserveSelection(event: MouseEvent): void;
|
|
194
|
+
protected open(event: Event): void;
|
|
161
195
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandYoutubeDirective, never>;
|
|
162
196
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandYoutubeDirective, "[ngsCommentEditorCommandYoutube]", never, {}, {}, never, never, true, never>;
|
|
163
197
|
}
|
|
164
198
|
|
|
165
199
|
declare class CommentEditorCommandLinkDirective {
|
|
166
|
-
private
|
|
167
|
-
private
|
|
168
|
-
protected commentEditor: CommentEditorInterface;
|
|
169
|
-
protected
|
|
170
|
-
protected
|
|
171
|
-
private _setLink;
|
|
200
|
+
private readonly destroyRef;
|
|
201
|
+
private readonly dialog;
|
|
202
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
203
|
+
protected preserveSelection(event: MouseEvent): void;
|
|
204
|
+
protected open(event: Event): void;
|
|
172
205
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandLinkDirective, never>;
|
|
173
206
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandLinkDirective, "[ngsCommentEditorCommandLink]", never, {}, {}, never, never, true, never>;
|
|
174
207
|
}
|
|
175
208
|
|
|
176
|
-
declare class CommentEditorCommandCodeDirective {
|
|
177
|
-
protected commentEditor: CommentEditorInterface;
|
|
178
|
-
protected onClick(): void;
|
|
209
|
+
declare class CommentEditorCommandCodeDirective extends CommentEditorCommandBase {
|
|
179
210
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandCodeDirective, never>;
|
|
180
211
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandCodeDirective, "[ngsCommentEditorCommandCode]", never, {}, {}, never, never, true, never>;
|
|
181
212
|
}
|
|
182
213
|
|
|
183
214
|
declare class CommentEditorCommandEditLinkDirective {
|
|
184
|
-
private
|
|
185
|
-
private
|
|
186
|
-
protected commentEditor: CommentEditorInterface;
|
|
187
|
-
protected
|
|
188
|
-
protected
|
|
189
|
-
private _setLink;
|
|
215
|
+
private readonly destroyRef;
|
|
216
|
+
private readonly dialog;
|
|
217
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
218
|
+
protected preserveSelection(event: MouseEvent): void;
|
|
219
|
+
protected open(event: Event): void;
|
|
190
220
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandEditLinkDirective, never>;
|
|
191
221
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandEditLinkDirective, "[ngsCommentEditorCommandEditLink]", never, {}, {}, never, never, true, never>;
|
|
192
222
|
}
|
|
193
223
|
|
|
194
224
|
declare class CommentEditorCommandUnsetLinkDirective {
|
|
195
|
-
protected commentEditor: CommentEditorInterface;
|
|
196
|
-
protected
|
|
225
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
226
|
+
protected preserveSelection(event: MouseEvent): void;
|
|
227
|
+
protected unset(event: Event): void;
|
|
197
228
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandUnsetLinkDirective, never>;
|
|
198
229
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandUnsetLinkDirective, "[ngsCommentEditorCommandUnsetLink]", never, {}, {}, never, never, true, never>;
|
|
199
230
|
}
|
|
200
231
|
|
|
201
232
|
declare class CommentEditorCommandToggleToolbarDirective {
|
|
202
|
-
protected commentEditor: CommentEditorInterface;
|
|
203
|
-
protected
|
|
233
|
+
protected readonly commentEditor: CommentEditorInterface;
|
|
234
|
+
protected preserveSelection(event: MouseEvent): void;
|
|
235
|
+
protected toggle(event: Event): void;
|
|
204
236
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandToggleToolbarDirective, never>;
|
|
205
237
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandToggleToolbarDirective, "[ngsCommentEditorCommandToggleToolbar]", never, {}, {}, never, never, true, never>;
|
|
206
238
|
}
|
|
207
239
|
|
|
208
|
-
|
|
209
|
-
|
|
240
|
+
interface CommentEditorMediaAttributes {
|
|
241
|
+
readonly src: string;
|
|
242
|
+
readonly alt?: string;
|
|
243
|
+
readonly status?: 'uploading' | 'error';
|
|
244
|
+
readonly error?: string;
|
|
245
|
+
}
|
|
246
|
+
declare const NGS_COMMENT_EDITOR_TOGGLE_BLOCKQUOTE: NgsHeadlessEditorCommand<void>;
|
|
247
|
+
declare const NGS_COMMENT_EDITOR_TOGGLE_CODE_BLOCK: NgsHeadlessEditorCommand<void>;
|
|
248
|
+
declare const NGS_COMMENT_EDITOR_TOGGLE_BULLET_LIST: NgsHeadlessEditorCommand<void>;
|
|
249
|
+
declare const NGS_COMMENT_EDITOR_TOGGLE_ORDERED_LIST: NgsHeadlessEditorCommand<void>;
|
|
250
|
+
declare const NGS_COMMENT_EDITOR_SET_LINK: NgsHeadlessEditorCommand<string>;
|
|
251
|
+
declare const NGS_COMMENT_EDITOR_UNSET_LINK: NgsHeadlessEditorCommand<void>;
|
|
252
|
+
declare function commentEditorPlugin(): NgsHeadlessEditorPlugin;
|
|
253
|
+
declare function createCommentEditorMediaBlock(type: 'image' | 'imageUpload' | 'youtube', attrs: CommentEditorMediaAttributes): NgsHeadlessEditorBlock<null>;
|
|
254
|
+
declare function normalizeLinkUrl(value: string): string;
|
|
255
|
+
declare function normalizeYoutubeUrl(value: string): string | null;
|
|
256
|
+
|
|
257
|
+
declare function serializeCommentEditorDocument(document: NgsHeadlessEditorDocument): string;
|
|
258
|
+
|
|
259
|
+
export { COMMENT_EDITOR, COMMENT_EDITOR_BUBBLE_MENU, CommentEditor, CommentEditorBubbleMenu, CommentEditorCommandBlockquoteDirective, CommentEditorCommandBoldDirective, CommentEditorCommandBulletListDirective, CommentEditorCommandCodeBlockDirective, CommentEditorCommandCodeDirective, CommentEditorCommandDirective, CommentEditorCommandEditLinkDirective, CommentEditorCommandImageDirective, CommentEditorCommandItalicDirective, CommentEditorCommandLinkDirective, CommentEditorCommandOrderedListDirective, CommentEditorCommandStrikeDirective, CommentEditorCommandToggleToolbarDirective, CommentEditorCommandUnsetLinkDirective, CommentEditorCommandYoutubeDirective, CommentEditorDivider, CommentEditorFooterBar, CommentEditorToolbar, NGS_COMMENT_EDITOR_SET_LINK, NGS_COMMENT_EDITOR_TOGGLE_BLOCKQUOTE, NGS_COMMENT_EDITOR_TOGGLE_BULLET_LIST, NGS_COMMENT_EDITOR_TOGGLE_CODE_BLOCK, NGS_COMMENT_EDITOR_TOGGLE_ORDERED_LIST, NGS_COMMENT_EDITOR_UNSET_LINK, commentEditorPlugin, createCommentEditorMediaBlock, normalizeLinkUrl, normalizeYoutubeUrl, serializeCommentEditorDocument };
|
|
260
|
+
export type { CommentEditorAPI, CommentEditorInterface, CommentEditorMediaAttributes };
|