@acorex/components 22.4.12 → 22.4.14
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/acorex-components-comment.mjs +771 -73
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +15 -4
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +15 -2
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-text-editor.mjs +28 -9
- package/fesm2022/acorex-components-text-editor.mjs.map +1 -1
- package/package.json +3 -3
- package/types/acorex-components-comment.d.ts +291 -31
- package/types/acorex-components-drawer.d.ts +2 -2
- package/types/acorex-components-lookup.d.ts +2 -0
- package/types/acorex-components-text-editor.d.ts +15 -1
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/components",
|
|
3
|
-
"version": "22.4.
|
|
3
|
+
"version": "22.4.14",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "22.4.
|
|
6
|
-
"@acorex/cdk": "22.4.
|
|
5
|
+
"@acorex/core": "22.4.14",
|
|
6
|
+
"@acorex/cdk": "22.4.14",
|
|
7
7
|
"@angular/aria": ">=22.1.0",
|
|
8
8
|
"polytype": ">=0.17.0",
|
|
9
9
|
"hammerjs": ">=2.0.8",
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { AXEvent, AXStyleColorType, AXItemClickEvent } from '@acorex/cdk/common';
|
|
4
|
+
import { AXMenuItem } from '@acorex/components/menu';
|
|
5
|
+
import * as i4 from '@acorex/components/button';
|
|
6
|
+
import { AXButtonItemListItem, AXButtonItemComponent } from '@acorex/components/button';
|
|
3
7
|
import * as i1 from '@acorex/components/decorators';
|
|
4
8
|
import * as i2 from '@acorex/components/wysiwyg';
|
|
5
|
-
import * as i3 from '@acorex/components/
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
9
|
+
import * as i3 from '@acorex/components/badge';
|
|
10
|
+
import * as i5 from '@acorex/components/text-area';
|
|
11
|
+
import * as i6 from '@acorex/core/translation';
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* A container component for displaying and managing comments.
|
|
@@ -14,14 +18,109 @@ import * as i5 from '@acorex/core/translation';
|
|
|
14
18
|
declare class AXCommentContainerComponent {
|
|
15
19
|
private document;
|
|
16
20
|
private platformID;
|
|
21
|
+
protected readonly projectedHeader: _angular_core.Signal<unknown>;
|
|
22
|
+
protected readonly projectedFooter: _angular_core.Signal<unknown>;
|
|
17
23
|
/**
|
|
18
24
|
* Scrolls to a specific comment reply by its ID and highlights it temporarily.
|
|
19
25
|
*
|
|
20
26
|
* @param id - The ID of the comment reply to scroll to
|
|
21
27
|
*/
|
|
22
28
|
scrollToReply(id: string): void;
|
|
23
|
-
static ɵfac:
|
|
24
|
-
static ɵcmp:
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentContainerComponent, never>;
|
|
30
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentContainerComponent, "ax-comment-container", never, {}, {}, ["projectedHeader", "projectedFooter"], ["ax-header", "*", "ax-footer"], true, never>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Default comment item shape used by `ax-comment-view`.
|
|
35
|
+
*
|
|
36
|
+
* Nested replies can be provided eagerly via `replies`, or loaded lazily when
|
|
37
|
+
* `replyCount` is set and `datasource` is a callback.
|
|
38
|
+
*/
|
|
39
|
+
interface AXCommentItem {
|
|
40
|
+
id: string | number;
|
|
41
|
+
author: string;
|
|
42
|
+
avatar?: string;
|
|
43
|
+
initials?: string;
|
|
44
|
+
color?: AXStyleColorType;
|
|
45
|
+
date?: string;
|
|
46
|
+
content?: string;
|
|
47
|
+
likes?: number;
|
|
48
|
+
liked?: boolean;
|
|
49
|
+
isYou?: boolean;
|
|
50
|
+
repliesExpanded?: boolean;
|
|
51
|
+
replies?: AXCommentItem[];
|
|
52
|
+
replyCount?: number;
|
|
53
|
+
/** Overflow menu items rendered with `ax-menu`, same shape as `AXMenuItem`. */
|
|
54
|
+
actions?: AXMenuItem[];
|
|
55
|
+
data?: unknown;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Lazy-loading callback. Called without an id to load root comments,
|
|
59
|
+
* and with a parent id to load that comment's replies.
|
|
60
|
+
*/
|
|
61
|
+
type AXCommentCallback = (id?: string) => AXCommentItem[] | Promise<AXCommentItem[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Data source — a static array or a lazy-loading function.
|
|
64
|
+
*/
|
|
65
|
+
type AXCommentDataSource = AXCommentItem[] | AXCommentCallback;
|
|
66
|
+
/**
|
|
67
|
+
* Context passed to a custom `itemTemplate` / `ng-template axCommentItem`.
|
|
68
|
+
* If no template is provided, the built-in default layout is used.
|
|
69
|
+
*/
|
|
70
|
+
interface AXCommentItemTemplateContext {
|
|
71
|
+
$implicit: AXCommentItem;
|
|
72
|
+
item: AXCommentItem;
|
|
73
|
+
level: number;
|
|
74
|
+
repliesExpanded: boolean;
|
|
75
|
+
replyCount: number;
|
|
76
|
+
loading: boolean;
|
|
77
|
+
liked: boolean;
|
|
78
|
+
likes: number;
|
|
79
|
+
toggleReplies: () => void;
|
|
80
|
+
toggleLike: () => void;
|
|
81
|
+
reply: (event?: Event) => void;
|
|
82
|
+
}
|
|
83
|
+
interface AXCommentReplyEvent extends AXEvent {
|
|
84
|
+
item: AXCommentItem;
|
|
85
|
+
nativeEvent?: Event;
|
|
86
|
+
}
|
|
87
|
+
interface AXCommentLikeChangeEvent extends AXEvent {
|
|
88
|
+
item: AXCommentItem;
|
|
89
|
+
liked: boolean;
|
|
90
|
+
likes: number;
|
|
91
|
+
}
|
|
92
|
+
interface AXCommentRepliesToggleEvent extends AXEvent {
|
|
93
|
+
item: AXCommentItem;
|
|
94
|
+
expanded: boolean;
|
|
95
|
+
}
|
|
96
|
+
interface AXCommentActionEvent extends AXEvent {
|
|
97
|
+
item: AXCommentItem;
|
|
98
|
+
action: AXMenuItem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Marks an `ng-template` as a custom comment item renderer.
|
|
103
|
+
* When omitted, `ax-comment-view` uses the built-in layout.
|
|
104
|
+
* Like and reply stay in the item actions row either way.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```html
|
|
108
|
+
* <ax-comment-view [datasource]="comments">
|
|
109
|
+
* <ng-template axCommentItem let-item>
|
|
110
|
+
* <ax-avatar [color]="item.color" look="twotone" shape="rounded">
|
|
111
|
+
* <ax-text>{{ item.initials }}</ax-text>
|
|
112
|
+
* </ax-avatar>
|
|
113
|
+
* <ax-title>{{ item.author }}</ax-title>
|
|
114
|
+
* <ax-content>{{ item.content }}</ax-content>
|
|
115
|
+
* </ng-template>
|
|
116
|
+
* </ax-comment-view>
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare class AXCommentItemTemplateDirective {
|
|
120
|
+
readonly template: TemplateRef<AXCommentItemTemplateContext>;
|
|
121
|
+
constructor(template: TemplateRef<AXCommentItemTemplateContext>);
|
|
122
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentItemTemplateDirective, never>;
|
|
123
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXCommentItemTemplateDirective, "ng-template[axCommentItem]", never, {}, {}, never, never, true, never>;
|
|
25
124
|
}
|
|
26
125
|
|
|
27
126
|
/**
|
|
@@ -30,16 +129,55 @@ declare class AXCommentContainerComponent {
|
|
|
30
129
|
* @category Components
|
|
31
130
|
*/
|
|
32
131
|
declare class AXCommentItemComponent {
|
|
33
|
-
|
|
34
|
-
readonly
|
|
132
|
+
private readonly parentComment;
|
|
133
|
+
protected readonly isReply: boolean;
|
|
134
|
+
private readonly projectedAvatar;
|
|
135
|
+
private readonly viewAvatar;
|
|
136
|
+
/** Data item used by `ax-comment-view`. When set, the default layout is rendered internally. */
|
|
137
|
+
readonly item: _angular_core.InputSignal<AXCommentItem>;
|
|
138
|
+
readonly replyCount: _angular_core.InputSignal<number>;
|
|
35
139
|
/** Two-way bindable state controlling whether nested replies are visible. */
|
|
36
|
-
readonly repliesExpanded:
|
|
140
|
+
readonly repliesExpanded: _angular_core.ModelSignal<boolean>;
|
|
141
|
+
/** Whether replies for this item are currently being loaded. */
|
|
142
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
143
|
+
/**
|
|
144
|
+
* Custom renderer for the item body. When omitted, the default layout
|
|
145
|
+
* (or projected slots) is used.
|
|
146
|
+
*/
|
|
147
|
+
readonly itemTemplate: _angular_core.InputSignal<TemplateRef<AXCommentItemTemplateContext>>;
|
|
148
|
+
/** Context passed to `itemTemplate`. */
|
|
149
|
+
readonly itemContext: _angular_core.InputSignal<AXCommentItemTemplateContext>;
|
|
150
|
+
readonly likeChange: _angular_core.OutputEmitterRef<boolean>;
|
|
151
|
+
readonly replyClick: _angular_core.OutputEmitterRef<Event>;
|
|
152
|
+
readonly actionClick: _angular_core.OutputEmitterRef<AXMenuItem>;
|
|
153
|
+
protected readonly avatarSize = 48;
|
|
154
|
+
protected readonly showDefaultDataLayout: _angular_core.Signal<boolean>;
|
|
155
|
+
protected readonly useProjectedSlots: _angular_core.Signal<boolean>;
|
|
156
|
+
protected readonly itemActions: _angular_core.Signal<AXMenuItem[]>;
|
|
157
|
+
protected readonly showOverflowMenu: _angular_core.Signal<boolean>;
|
|
158
|
+
protected readonly overflowItems: _angular_core.Signal<AXButtonItemListItem[]>;
|
|
37
159
|
constructor();
|
|
160
|
+
protected getColor(data: AXCommentItem): AXStyleColorType;
|
|
161
|
+
protected getInitials(data: AXCommentItem): string;
|
|
162
|
+
protected handleLike(liked: boolean): void;
|
|
163
|
+
protected handleReply(event: Event): void;
|
|
164
|
+
protected handleOverflowClick(event: AXItemClickEvent<AXButtonItemComponent>): void;
|
|
165
|
+
private toButtonItems;
|
|
166
|
+
private findAction;
|
|
167
|
+
/**
|
|
168
|
+
* Toggles the collapse state of the comment replies section.
|
|
169
|
+
*/
|
|
38
170
|
toggleReplies(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Expands the nested replies section.
|
|
173
|
+
*/
|
|
39
174
|
showReplies(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Collapses the nested replies section.
|
|
177
|
+
*/
|
|
40
178
|
hideReplies(): void;
|
|
41
|
-
static ɵfac:
|
|
42
|
-
static ɵcmp:
|
|
179
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentItemComponent, never>;
|
|
180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentItemComponent, "ax-comment-item", never, { "item": { "alias": "item"; "required": false; "isSignal": true; }; "replyCount": { "alias": "replyCount"; "required": false; "isSignal": true; }; "repliesExpanded": { "alias": "repliesExpanded"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "itemContext": { "alias": "itemContext"; "required": false; "isSignal": true; }; }, { "repliesExpanded": "repliesExpandedChange"; "likeChange": "likeChange"; "replyClick": "replyClick"; "actionClick": "actionClick"; }, ["projectedAvatar"], ["ax-avatar", "ax-title", "ax-subtitle", "ax-badge", "ax-comment-date", "ax-comment-menu-options", "ax-content", "ax-comment-like", "ax-comment-reply-text", "ax-comment-item", "ax-comment-reply-more", "*"], true, never>;
|
|
43
181
|
}
|
|
44
182
|
|
|
45
183
|
/**
|
|
@@ -48,8 +186,8 @@ declare class AXCommentItemComponent {
|
|
|
48
186
|
* @category Components
|
|
49
187
|
*/
|
|
50
188
|
declare class AXCommentDateComponent {
|
|
51
|
-
static ɵfac:
|
|
52
|
-
static ɵcmp:
|
|
189
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentDateComponent, never>;
|
|
190
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentDateComponent, "ax-comment-date", never, {}, {}, never, ["*"], true, never>;
|
|
53
191
|
}
|
|
54
192
|
|
|
55
193
|
/**
|
|
@@ -58,10 +196,10 @@ declare class AXCommentDateComponent {
|
|
|
58
196
|
* @category Components
|
|
59
197
|
*/
|
|
60
198
|
declare class AXCommentLikeComponent {
|
|
61
|
-
like:
|
|
199
|
+
like: _angular_core.ModelSignal<boolean>;
|
|
62
200
|
protected toggleLike(): void;
|
|
63
|
-
static ɵfac:
|
|
64
|
-
static ɵcmp:
|
|
201
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentLikeComponent, never>;
|
|
202
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentLikeComponent, "ax-comment-like", never, { "like": { "alias": "like"; "required": true; "isSignal": true; }; }, { "like": "likeChange"; }, never, ["*"], true, never>;
|
|
65
203
|
}
|
|
66
204
|
|
|
67
205
|
/**
|
|
@@ -70,8 +208,35 @@ declare class AXCommentLikeComponent {
|
|
|
70
208
|
* @category Components
|
|
71
209
|
*/
|
|
72
210
|
declare class AXMenuOptionsComponent {
|
|
73
|
-
static ɵfac:
|
|
74
|
-
static ɵcmp:
|
|
211
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMenuOptionsComponent, never>;
|
|
212
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMenuOptionsComponent, "ax-comment-menu-options", never, {}, {}, never, ["*"], true, never>;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Composer chrome shown while writing a reply. Projects the editor below a
|
|
217
|
+
* compact reply-context bar; hide the bar by leaving `item` empty.
|
|
218
|
+
*
|
|
219
|
+
* @category Components
|
|
220
|
+
*/
|
|
221
|
+
declare class AXCommentReplyComponent {
|
|
222
|
+
private readonly document;
|
|
223
|
+
private readonly platformId;
|
|
224
|
+
private readonly destroyRef;
|
|
225
|
+
private highlightTimer;
|
|
226
|
+
constructor();
|
|
227
|
+
/** Comment currently being replied to. When null, only the projected composer is shown. */
|
|
228
|
+
readonly item: _angular_core.InputSignal<AXCommentItem>;
|
|
229
|
+
/** Emitted when the close control on the reply banner is clicked. */
|
|
230
|
+
readonly onClose: _angular_core.OutputEmitterRef<void>;
|
|
231
|
+
/** Emitted when the banner is clicked to jump to the target comment. */
|
|
232
|
+
readonly onTargetClick: _angular_core.OutputEmitterRef<string>;
|
|
233
|
+
protected readonly preview: _angular_core.Signal<string>;
|
|
234
|
+
protected close(): void;
|
|
235
|
+
protected revealTarget(): void;
|
|
236
|
+
private scrollToComment;
|
|
237
|
+
private toPreview;
|
|
238
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentReplyComponent, never>;
|
|
239
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentReplyComponent, "ax-comment-reply", never, { "item": { "alias": "item"; "required": false; "isSignal": true; }; }, { "onClose": "onClose"; "onTargetClick": "onTargetClick"; }, never, ["*"], true, never>;
|
|
75
240
|
}
|
|
76
241
|
|
|
77
242
|
/**
|
|
@@ -80,34 +245,129 @@ declare class AXMenuOptionsComponent {
|
|
|
80
245
|
* @category Components
|
|
81
246
|
*/
|
|
82
247
|
declare class AXCommentReplyMoreComponent {
|
|
83
|
-
static ɵfac:
|
|
84
|
-
static ɵcmp:
|
|
248
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentReplyMoreComponent, never>;
|
|
249
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentReplyMoreComponent, "ax-comment-reply-more", never, {}, {}, never, ["*"], true, never>;
|
|
85
250
|
}
|
|
86
251
|
|
|
87
252
|
/**
|
|
88
|
-
* A component for displaying the reply action
|
|
253
|
+
* A component for displaying the reply action on a comment.
|
|
89
254
|
*
|
|
90
255
|
* @category Components
|
|
91
256
|
*/
|
|
92
257
|
declare class AXCommentReplyTextComponent {
|
|
93
|
-
static ɵfac:
|
|
94
|
-
static ɵcmp:
|
|
258
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentReplyTextComponent, never>;
|
|
259
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentReplyTextComponent, "ax-comment-reply-text", never, {}, {}, never, never, true, never>;
|
|
95
260
|
}
|
|
96
261
|
|
|
97
262
|
/**
|
|
98
|
-
*
|
|
263
|
+
* Renders a comment thread from a datasource (array or lazy callback).
|
|
264
|
+
* Provide `itemTemplate` or `<ng-template axCommentItem>` to customize item UI;
|
|
265
|
+
* otherwise the built-in layout is used.
|
|
99
266
|
*
|
|
100
267
|
* @category Components
|
|
101
268
|
*/
|
|
102
269
|
declare class AXCommentViewComponent {
|
|
103
|
-
static
|
|
104
|
-
|
|
270
|
+
/** Comment data — a static array or a lazy-loading function. */
|
|
271
|
+
readonly datasource: _angular_core.ModelSignal<AXCommentDataSource>;
|
|
272
|
+
/**
|
|
273
|
+
* Custom item template. When omitted, the default comment layout is used.
|
|
274
|
+
* You can also project `<ng-template axCommentItem>`.
|
|
275
|
+
*/
|
|
276
|
+
readonly itemTemplate: _angular_core.InputSignal<TemplateRef<AXCommentItemTemplateContext>>;
|
|
277
|
+
readonly onReply: _angular_core.OutputEmitterRef<AXCommentReplyEvent>;
|
|
278
|
+
readonly onLikeChange: _angular_core.OutputEmitterRef<AXCommentLikeChangeEvent>;
|
|
279
|
+
readonly onRepliesToggle: _angular_core.OutputEmitterRef<AXCommentRepliesToggleEvent>;
|
|
280
|
+
readonly onAction: _angular_core.OutputEmitterRef<AXCommentActionEvent>;
|
|
281
|
+
private readonly projectedItemTemplate;
|
|
282
|
+
protected readonly items: _angular_core.WritableSignal<AXCommentItem[]>;
|
|
283
|
+
private readonly loadingIds;
|
|
284
|
+
private readonly _isLoading;
|
|
285
|
+
readonly isLoading: _angular_core.Signal<boolean>;
|
|
286
|
+
private loadGeneration;
|
|
287
|
+
private syncingFromDatasource;
|
|
288
|
+
private readonly isLazyDataSource;
|
|
289
|
+
protected readonly hasDatasource: _angular_core.Signal<boolean>;
|
|
290
|
+
protected readonly resolvedTemplate: _angular_core.Signal<TemplateRef<AXCommentItemTemplateContext>>;
|
|
291
|
+
constructor();
|
|
292
|
+
/**
|
|
293
|
+
* Reloads root comments from the datasource.
|
|
294
|
+
*
|
|
295
|
+
* @returns Promise that resolves when the reload is complete.
|
|
296
|
+
*/
|
|
297
|
+
reloadData(): Promise<void>;
|
|
298
|
+
/**
|
|
299
|
+
* Appends a comment to the current root list.
|
|
300
|
+
*
|
|
301
|
+
* @param item - The comment to append.
|
|
302
|
+
* @returns void
|
|
303
|
+
*/
|
|
304
|
+
appendItem(item: AXCommentItem): void;
|
|
305
|
+
/**
|
|
306
|
+
* Appends a reply under a loaded comment and expands that thread.
|
|
307
|
+
*
|
|
308
|
+
* @param parentId - The parent comment id.
|
|
309
|
+
* @param item - The reply to append.
|
|
310
|
+
* @returns Promise that resolves when any needed lazy load and the append are complete.
|
|
311
|
+
*/
|
|
312
|
+
appendReply(parentId: string, item: AXCommentItem): Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Finds a comment by id in the loaded tree.
|
|
315
|
+
*
|
|
316
|
+
* @param id - The comment id.
|
|
317
|
+
* @returns The matching item, or null if it is not loaded.
|
|
318
|
+
*/
|
|
319
|
+
findItem(id: string): AXCommentItem | null;
|
|
320
|
+
/**
|
|
321
|
+
* Removes a comment from the loaded tree. Nested replies are removed with it.
|
|
322
|
+
*
|
|
323
|
+
* @param id - The comment id.
|
|
324
|
+
* @returns True when the comment was found and removed.
|
|
325
|
+
*/
|
|
326
|
+
removeItem(id: string): boolean;
|
|
327
|
+
/**
|
|
328
|
+
* Patches a loaded comment in place.
|
|
329
|
+
*
|
|
330
|
+
* @param id - The comment id.
|
|
331
|
+
* @param patch - Fields to merge onto the existing item. The original id is kept.
|
|
332
|
+
* @returns The updated item, or null if it is not loaded.
|
|
333
|
+
*/
|
|
334
|
+
updateItem(id: string, patch: Partial<AXCommentItem>): AXCommentItem | null;
|
|
335
|
+
/**
|
|
336
|
+
* Expands or collapses replies for a comment, loading them when needed.
|
|
337
|
+
*
|
|
338
|
+
* @param id - The comment id.
|
|
339
|
+
* @param expanded - Whether replies should be visible.
|
|
340
|
+
* @returns Promise that resolves when expansion and any lazy load are complete.
|
|
341
|
+
*/
|
|
342
|
+
setExpanded(id: string, expanded: boolean): Promise<void>;
|
|
343
|
+
protected getId(item: AXCommentItem): string;
|
|
344
|
+
protected getReplies(item: AXCommentItem): AXCommentItem[];
|
|
345
|
+
protected getReplyCount(item: AXCommentItem): number;
|
|
346
|
+
protected isExpanded(item: AXCommentItem): boolean;
|
|
347
|
+
protected isItemLoading(item: AXCommentItem): boolean;
|
|
348
|
+
protected getTemplateContext(item: AXCommentItem, level: number): AXCommentItemTemplateContext;
|
|
349
|
+
protected onRepliesExpandedChange(item: AXCommentItem, expanded: boolean): Promise<void>;
|
|
350
|
+
protected toggleLike(item: AXCommentItem, liked?: boolean): void;
|
|
351
|
+
protected replyTo(item: AXCommentItem, event?: Event): void;
|
|
352
|
+
protected emitAction(item: AXCommentItem, action: AXMenuItem): void;
|
|
353
|
+
private applyDatasource;
|
|
354
|
+
private loadRootItems;
|
|
355
|
+
private hydrateExpanded;
|
|
356
|
+
private canLazyLoad;
|
|
357
|
+
private setItemExpanded;
|
|
358
|
+
private loadReplies;
|
|
359
|
+
private refreshItems;
|
|
360
|
+
private findInTree;
|
|
361
|
+
private findParent;
|
|
362
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentViewComponent, never>;
|
|
363
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentViewComponent, "ax-comment-view", never, { "datasource": { "alias": "datasource"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "datasource": "datasourceChange"; "onReply": "onReply"; "onLikeChange": "onLikeChange"; "onRepliesToggle": "onRepliesToggle"; "onAction": "onAction"; }, ["projectedItemTemplate"], ["ax-comment-item"], true, never>;
|
|
105
364
|
}
|
|
106
365
|
|
|
107
366
|
declare class AXCommentModule {
|
|
108
|
-
static ɵfac:
|
|
109
|
-
static ɵmod:
|
|
110
|
-
static ɵinj:
|
|
367
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentModule, never>;
|
|
368
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXCommentModule, never, [typeof i1.AXDecoratorModule, typeof i2.AXWysiwygModule, typeof i3.AXBadgeModule, typeof i4.AXButtonModule, typeof i5.AXTextAreaModule, typeof i6.AXTranslationModule, typeof AXCommentViewComponent, typeof AXCommentContainerComponent, typeof AXCommentItemComponent, typeof AXCommentLikeComponent, typeof AXMenuOptionsComponent, typeof AXCommentReplyComponent, typeof AXCommentReplyTextComponent, typeof AXCommentDateComponent, typeof AXCommentReplyMoreComponent, typeof AXCommentItemTemplateDirective], [typeof AXCommentViewComponent, typeof AXCommentContainerComponent, typeof AXCommentItemComponent, typeof AXCommentLikeComponent, typeof AXMenuOptionsComponent, typeof AXCommentReplyComponent, typeof AXCommentReplyTextComponent, typeof AXCommentDateComponent, typeof AXCommentReplyMoreComponent, typeof AXCommentItemTemplateDirective]>;
|
|
369
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXCommentModule>;
|
|
111
370
|
}
|
|
112
371
|
|
|
113
|
-
export { AXCommentContainerComponent, AXCommentDateComponent, AXCommentItemComponent, AXCommentLikeComponent, AXCommentModule, AXCommentReplyMoreComponent, AXCommentReplyTextComponent, AXCommentViewComponent, AXMenuOptionsComponent };
|
|
372
|
+
export { AXCommentContainerComponent, AXCommentDateComponent, AXCommentItemComponent, AXCommentItemTemplateDirective, AXCommentLikeComponent, AXCommentModule, AXCommentReplyComponent, AXCommentReplyMoreComponent, AXCommentReplyTextComponent, AXCommentViewComponent, AXMenuOptionsComponent };
|
|
373
|
+
export type { AXCommentActionEvent, AXCommentCallback, AXCommentDataSource, AXCommentItem, AXCommentItemTemplateContext, AXCommentLikeChangeEvent, AXCommentRepliesToggleEvent, AXCommentReplyEvent };
|
|
@@ -26,7 +26,7 @@ declare class AXDrawerComponent extends MXBaseComponent {
|
|
|
26
26
|
readonly transition: _angular_core.InputSignal<number>;
|
|
27
27
|
readonly closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
28
28
|
readonly backdropClass: _angular_core.InputSignal<string>;
|
|
29
|
-
readonly collapsed: _angular_core.
|
|
29
|
+
readonly collapsed: _angular_core.ModelSignal<boolean>;
|
|
30
30
|
readonly singleOpenMode: _angular_core.InputSignal<boolean>;
|
|
31
31
|
onBackdropClick: _angular_core.OutputEmitterRef<AXClickEvent>;
|
|
32
32
|
collapsedStateChanged: _angular_core.OutputEmitterRef<boolean>;
|
|
@@ -50,7 +50,7 @@ declare class AXDrawerComponent extends MXBaseComponent {
|
|
|
50
50
|
*/
|
|
51
51
|
open(): void;
|
|
52
52
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDrawerComponent, never>;
|
|
53
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXDrawerComponent, "ax-drawer", never, { "location": { "alias": "location"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "singleOpenMode": { "alias": "singleOpenMode"; "required": false; "isSignal": true; }; }, { "onBackdropClick": "onBackdropClick"; "collapsedStateChanged": "collapsedStateChanged"; }, never, ["ax-header", "ax-content"], true, [{ directive: typeof i1.AXDrawerItemDirective; inputs: {}; outputs: {}; }]>;
|
|
53
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXDrawerComponent, "ax-drawer", never, { "location": { "alias": "location"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "singleOpenMode": { "alias": "singleOpenMode"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "onBackdropClick": "onBackdropClick"; "collapsedStateChanged": "collapsedStateChanged"; }, never, ["ax-header", "ax-content"], true, [{ directive: typeof i1.AXDrawerItemDirective; inputs: {}; outputs: {}; }]>;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
declare class AXDrawerModule {
|
|
@@ -617,6 +617,8 @@ declare class AXLookupComponent<T = AXLookupItem> extends NXValueComponent imple
|
|
|
617
617
|
* Removes a single chip from the multi selection.
|
|
618
618
|
*/
|
|
619
619
|
protected removeChip(event: Event, item: AXLookupItem): void;
|
|
620
|
+
/** Clears select-all mode from the trigger chip (same as unchecking the header). */
|
|
621
|
+
protected removeSelectAllChip(event: Event): void;
|
|
620
622
|
/**
|
|
621
623
|
* Seeds the item cache with known items so matching `value` keys resolve without `byKey`.
|
|
622
624
|
* Useful after an async parent-entity load when `valueItems` is not bound.
|
|
@@ -123,7 +123,13 @@ declare class AXTextEditorComponent extends AXTextEditorComponent_base {
|
|
|
123
123
|
private syncingFromEditor;
|
|
124
124
|
readonly placeHolder: _angular_core.InputSignal<string>;
|
|
125
125
|
readonly outputFormat: _angular_core.InputSignal<AXTextEditorOutputFormat>;
|
|
126
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Minimum height of the editable surface, measured in text lines.
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue 6
|
|
130
|
+
*/
|
|
131
|
+
readonly initialLine: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
132
|
+
protected readonly initialLineCss: _angular_core.Signal<string>;
|
|
127
133
|
protected readonly zoomFactor: _angular_core.Signal<number>;
|
|
128
134
|
constructor();
|
|
129
135
|
protected readonly projectedContent: _angular_core.Signal<boolean>;
|
|
@@ -131,6 +137,14 @@ declare class AXTextEditorComponent extends AXTextEditorComponent_base {
|
|
|
131
137
|
getEditorService(): AXTextEditorService;
|
|
132
138
|
focus(): void;
|
|
133
139
|
blur(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Replaces the editor content. Optionally focuses the editor afterward.
|
|
142
|
+
*
|
|
143
|
+
* @param value - HTML, JSON, or null to clear.
|
|
144
|
+
* @param focus - When true, moves the caret into the editor after the content is applied.
|
|
145
|
+
* @returns void
|
|
146
|
+
*/
|
|
147
|
+
setContent(value: AXTextEditorValue, focus?: boolean): void;
|
|
134
148
|
/** @ignore */
|
|
135
149
|
notifyEditorFocus(event?: FocusEvent): void;
|
|
136
150
|
/** @ignore */
|