@acorex/components 22.2.0-next.0 → 22.2.0-next.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.
Files changed (115) hide show
  1. package/comment/README.md +467 -2
  2. package/fesm2022/acorex-components-action-sheet.mjs +2 -2
  3. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  4. package/fesm2022/acorex-components-alert.mjs +2 -2
  5. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  6. package/fesm2022/acorex-components-avatar.mjs +2 -2
  7. package/fesm2022/acorex-components-button.mjs +1 -1
  8. package/fesm2022/acorex-components-button.mjs.map +1 -1
  9. package/fesm2022/acorex-components-calendar.mjs +13 -15
  10. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  11. package/fesm2022/acorex-components-check-box.mjs +2 -2
  12. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  13. package/fesm2022/acorex-components-color-box.mjs +2 -2
  14. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  15. package/fesm2022/acorex-components-combo-box.mjs +44 -2
  16. package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
  17. package/fesm2022/acorex-components-command.mjs +2 -2
  18. package/fesm2022/acorex-components-command.mjs.map +1 -1
  19. package/fesm2022/acorex-components-comment.mjs +905 -69
  20. package/fesm2022/acorex-components-comment.mjs.map +1 -1
  21. package/fesm2022/{acorex-components-conversation-acorex-components-conversation-C1Lf9tAe.mjs → acorex-components-conversation-acorex-components-conversation-pR9sXIuW.mjs} +6 -6
  22. package/fesm2022/{acorex-components-conversation-acorex-components-conversation-C1Lf9tAe.mjs.map → acorex-components-conversation-acorex-components-conversation-pR9sXIuW.mjs.map} +1 -1
  23. package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-DyOC1WEb.mjs → acorex-components-conversation-picker-rename-file-dialog.component-DWIRLLMb.mjs} +2 -2
  24. package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-DyOC1WEb.mjs.map → acorex-components-conversation-picker-rename-file-dialog.component-DWIRLLMb.mjs.map} +1 -1
  25. package/fesm2022/acorex-components-conversation.mjs +1 -1
  26. package/fesm2022/acorex-components-data-list.mjs +1 -1
  27. package/fesm2022/acorex-components-data-list.mjs.map +1 -1
  28. package/fesm2022/acorex-components-data-table.mjs +524 -145
  29. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  30. package/fesm2022/acorex-components-datetime-box.mjs +2 -2
  31. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  32. package/fesm2022/acorex-components-datetime-picker.mjs +2 -2
  33. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  34. package/fesm2022/acorex-components-decorators.mjs +2 -2
  35. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  36. package/fesm2022/acorex-components-drawer.mjs +17 -6
  37. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  38. package/fesm2022/acorex-components-dropdown-button.mjs +16 -11
  39. package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
  40. package/fesm2022/acorex-components-dropdown.mjs +2 -2
  41. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  42. package/fesm2022/acorex-components-fab.mjs +1 -1
  43. package/fesm2022/acorex-components-fab.mjs.map +1 -1
  44. package/fesm2022/acorex-components-file-viewer.mjs +6 -2
  45. package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
  46. package/fesm2022/acorex-components-image-editor.mjs +8 -8
  47. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  48. package/fesm2022/acorex-components-kanban.mjs +108 -5
  49. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  50. package/fesm2022/acorex-components-list.mjs +7 -8
  51. package/fesm2022/acorex-components-list.mjs.map +1 -1
  52. package/fesm2022/acorex-components-loading.mjs +2 -2
  53. package/fesm2022/acorex-components-loading.mjs.map +1 -1
  54. package/fesm2022/acorex-components-lookup.mjs +160 -23
  55. package/fesm2022/acorex-components-lookup.mjs.map +1 -1
  56. package/fesm2022/acorex-components-map.mjs +27 -9
  57. package/fesm2022/acorex-components-map.mjs.map +1 -1
  58. package/fesm2022/acorex-components-media-viewer.mjs +1 -1
  59. package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
  60. package/fesm2022/acorex-components-menu.mjs +30 -8
  61. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  62. package/fesm2022/acorex-components-paint.mjs +1 -1
  63. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  64. package/fesm2022/acorex-components-password-box.mjs +1 -1
  65. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  66. package/fesm2022/acorex-components-popover.mjs +14 -1
  67. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  68. package/fesm2022/acorex-components-reaction.mjs +1 -1
  69. package/fesm2022/acorex-components-reaction.mjs.map +1 -1
  70. package/fesm2022/acorex-components-scheduler.mjs +10 -10
  71. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  72. package/fesm2022/acorex-components-side-menu.mjs +1 -1
  73. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  74. package/fesm2022/acorex-components-sidebar.mjs +2 -2
  75. package/fesm2022/acorex-components-sidebar.mjs.map +1 -1
  76. package/fesm2022/acorex-components-tabs.mjs +4 -2
  77. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  78. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  79. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  80. package/fesm2022/acorex-components-text-editor.mjs +1950 -0
  81. package/fesm2022/acorex-components-text-editor.mjs.map +1 -0
  82. package/fesm2022/acorex-components-time-duration.mjs +59 -19
  83. package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
  84. package/fesm2022/acorex-components-toast.mjs +2 -2
  85. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  86. package/fesm2022/acorex-components-tooltip.mjs +49 -4
  87. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  88. package/fesm2022/acorex-components-tree-view.mjs +1 -1
  89. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  90. package/fesm2022/acorex-components-wysiwyg.mjs +10 -3
  91. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  92. package/package.json +9 -20
  93. package/text-editor/README.md +7 -0
  94. package/types/acorex-components-combo-box.d.ts +5 -0
  95. package/types/acorex-components-comment.d.ts +352 -33
  96. package/types/acorex-components-data-table.d.ts +121 -14
  97. package/types/acorex-components-drawer.d.ts +2 -2
  98. package/types/acorex-components-dropdown-button.d.ts +7 -2
  99. package/types/acorex-components-file-viewer.d.ts +3 -0
  100. package/types/acorex-components-lookup.d.ts +35 -6
  101. package/types/acorex-components-map.d.ts +7 -0
  102. package/types/acorex-components-menu.d.ts +5 -0
  103. package/types/acorex-components-popover.d.ts +5 -1
  104. package/types/acorex-components-text-editor.d.ts +1256 -0
  105. package/types/acorex-components-time-duration.d.ts +17 -3
  106. package/types/acorex-components-tooltip.d.ts +11 -1
  107. package/types/acorex-components-wysiwyg.d.ts +5 -0
  108. package/cron-job/README.md +0 -3
  109. package/editor/README.md +0 -3
  110. package/fesm2022/acorex-components-cron-job.mjs +0 -1309
  111. package/fesm2022/acorex-components-cron-job.mjs.map +0 -1
  112. package/fesm2022/acorex-components-editor.mjs +0 -199
  113. package/fesm2022/acorex-components-editor.mjs.map +0 -1
  114. package/types/acorex-components-cron-job.d.ts +0 -330
  115. package/types/acorex-components-editor.d.ts +0 -79
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "22.2.0-next.0",
3
+ "version": "22.2.0-next.1",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.2.0-next.0",
6
- "@acorex/cdk": "22.2.0-next.0",
5
+ "@acorex/core": "22.2.0-next.1",
6
+ "@acorex/cdk": "22.2.0-next.1",
7
7
  "@angular/aria": ">=22.1.0",
8
8
  "polytype": ">=0.17.0",
9
9
  "hammerjs": ">=2.0.8",
@@ -20,10 +20,12 @@
20
20
  "@tiptap/extension-color": ">=3.31.4",
21
21
  "@tiptap/extension-highlight": ">=3.31.4",
22
22
  "@tiptap/extension-image": ">=3.31.4",
23
+ "@tiptap/extension-table": ">=3.31.4",
23
24
  "@tiptap/extension-text-align": ">=3.31.4",
24
25
  "@tiptap/extension-text-style": ">=3.31.4",
25
26
  "@tiptap/extension-underline": ">=3.31.4",
26
27
  "@tiptap/extensions": ">=3.31.4",
28
+ "@tiptap/pm": ">=3.31.4",
27
29
  "@tiptap/starter-kit": ">=3.31.4",
28
30
  "@codemirror/state": ">=6.4.0",
29
31
  "@codemirror/view": ">=6.30.0",
@@ -42,15 +44,6 @@
42
44
  "@codemirror/lang-sass": ">=6.0.2",
43
45
  "@codemirror/theme-one-dark": ">=6.1.0",
44
46
  "@uiw/codemirror-theme-github": ">=4.21.0",
45
- "@bomdi/codebox": ">=2.0.0",
46
- "@editorjs/editorjs": "2.28.2",
47
- "@editorjs/header": ">=2.8.8",
48
- "@editorjs/list": ">=2.0.8",
49
- "@editorjs/quote": ">=2.7.6",
50
- "@editorjs/raw": ">=2.5.1",
51
- "@editorjs/image": ">=2.10.3",
52
- "@editorjs/underline": ">=1.2.1",
53
- "editorjs-text-color-plugin": ">=2.0.3",
54
47
  "wavesurfer.js": ">=7.7.15"
55
48
  },
56
49
  "peerDependenciesMeta": {},
@@ -164,10 +157,6 @@
164
157
  "types": "./types/acorex-components-conversation.d.ts",
165
158
  "default": "./fesm2022/acorex-components-conversation.mjs"
166
159
  },
167
- "./cron-job": {
168
- "types": "./types/acorex-components-cron-job.d.ts",
169
- "default": "./fesm2022/acorex-components-cron-job.mjs"
170
- },
171
160
  "./data-list": {
172
161
  "types": "./types/acorex-components-data-list.d.ts",
173
162
  "default": "./fesm2022/acorex-components-data-list.mjs"
@@ -212,10 +201,6 @@
212
201
  "types": "./types/acorex-components-dropdown-button.d.ts",
213
202
  "default": "./fesm2022/acorex-components-dropdown-button.mjs"
214
203
  },
215
- "./editor": {
216
- "types": "./types/acorex-components-editor.d.ts",
217
- "default": "./fesm2022/acorex-components-editor.mjs"
218
- },
219
204
  "./emoji": {
220
205
  "types": "./types/acorex-components-emoji.d.ts",
221
206
  "default": "./fesm2022/acorex-components-emoji.mjs"
@@ -472,6 +457,10 @@
472
457
  "types": "./types/acorex-components-text-box.d.ts",
473
458
  "default": "./fesm2022/acorex-components-text-box.mjs"
474
459
  },
460
+ "./text-editor": {
461
+ "types": "./types/acorex-components-text-editor.d.ts",
462
+ "default": "./fesm2022/acorex-components-text-editor.mjs"
463
+ },
475
464
  "./time-duration": {
476
465
  "types": "./types/acorex-components-time-duration.d.ts",
477
466
  "default": "./fesm2022/acorex-components-time-duration.mjs"
@@ -0,0 +1,7 @@
1
+ # Text Editor
2
+
3
+ A lightweight, modular Tiptap wrapper. Project `ax-text-editor-toolbar` and the tools you need; content is created automatically when omitted.
4
+
5
+ Headless API: `@acorex/cdk/text-editor` (`AXTextEditor`, extensions, commands). The `ax-text-editor` component provides `AXTextEditorService` for toolbar tools.
6
+
7
+ Tiptap packages are loaded lazily at runtime. Use `ax-text-editor-media` for image/video inserts via `AXFileService`, and `ax-text-editor-font-size` for explicit pixel sizes (or token sizes `small` / `large` / `huge` via commands).
@@ -246,6 +246,11 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
246
246
  protected onSheetSearchKeydown(e: AXHtmlEvent<KeyboardEvent>): void;
247
247
  /** Blocks typing when the trigger is not editable (keeps Tab / keyboard open working). */
248
248
  protected onBeforeInput(event: Event): void;
249
+ /**
250
+ * On pointer down, select the committed label so the next keystroke replaces it
251
+ * instead of editing character-by-character (single-select searchable trigger).
252
+ */
253
+ protected onTriggerPointerDown(event: PointerEvent): void;
249
254
  /**
250
255
  * Combobox `expanded` two-way binding. On actionsheet with in-sheet search, ignore collapse
251
256
  * so focusing the search field (Aria combobox blur) does not close the popup. Dismiss is owned
@@ -1,10 +1,14 @@
1
- import * as i0 from '@angular/core';
2
- import { AXAvatarComponent } from '@acorex/components/avatar';
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/button';
6
- import * as i4 from '@acorex/components/text-area';
7
- import * as i5 from '@acorex/core/translation';
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,113 @@ 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: i0.ɵɵFactoryDeclaration<AXCommentContainerComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentContainerComponent, "ax-comment-container", never, {}, {}, never, ["*"], true, never>;
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
+ /** When true, shows an “edited” label before the date in the default layout. */
47
+ edited?: boolean;
48
+ /** Optional tooltip on the edited label (for example “Edited 5 minutes ago”). */
49
+ editedAt?: string;
50
+ content?: string;
51
+ likes?: number;
52
+ liked?: boolean;
53
+ isYou?: boolean;
54
+ repliesExpanded?: boolean;
55
+ replies?: AXCommentItem[];
56
+ replyCount?: number;
57
+ /** Overflow menu items rendered with `ax-menu`, same shape as `AXMenuItem`. */
58
+ actions?: AXMenuItem[];
59
+ data?: unknown;
60
+ }
61
+ /**
62
+ * Lazy-loading callback. Called without an id to load root comments,
63
+ * and with a parent id to load that comment's replies.
64
+ */
65
+ type AXCommentCallback = (id?: string) => AXCommentItem[] | Promise<AXCommentItem[]>;
66
+ /**
67
+ * Data source — a static array or a lazy-loading function.
68
+ */
69
+ type AXCommentDataSource = AXCommentItem[] | AXCommentCallback;
70
+ /**
71
+ * Context passed to a custom `itemTemplate` / `ng-template axCommentItem`.
72
+ * If no template is provided, the built-in default layout is used.
73
+ */
74
+ interface AXCommentItemTemplateContext {
75
+ $implicit: AXCommentItem;
76
+ item: AXCommentItem;
77
+ level: number;
78
+ repliesExpanded: boolean;
79
+ replyCount: number;
80
+ loading: boolean;
81
+ liked: boolean;
82
+ likes: number;
83
+ toggleReplies: () => void;
84
+ toggleLike: () => void;
85
+ reply: (event?: Event) => void;
86
+ }
87
+ interface AXCommentReplyEvent extends AXEvent {
88
+ item: AXCommentItem;
89
+ nativeEvent?: Event;
90
+ }
91
+ interface AXCommentLikeChangeEvent extends AXEvent {
92
+ item: AXCommentItem;
93
+ liked: boolean;
94
+ likes: number;
95
+ }
96
+ interface AXCommentRepliesToggleEvent extends AXEvent {
97
+ item: AXCommentItem;
98
+ expanded: boolean;
99
+ }
100
+ interface AXCommentActionEvent extends AXEvent {
101
+ item: AXCommentItem;
102
+ action: AXMenuItem;
103
+ }
104
+
105
+ /**
106
+ * Marks an `ng-template` as a custom comment item renderer.
107
+ * When omitted, `ax-comment-view` uses the built-in layout.
108
+ * Like and reply stay in the item actions row either way.
109
+ *
110
+ * @example
111
+ * ```html
112
+ * <ax-comment-view [datasource]="comments">
113
+ * <ng-template axCommentItem let-item>
114
+ * <ax-avatar [color]="item.color" look="twotone" shape="rounded">
115
+ * <ax-text>{{ item.initials }}</ax-text>
116
+ * </ax-avatar>
117
+ * <ax-title>{{ item.author }}</ax-title>
118
+ * <ax-content>{{ item.content }}</ax-content>
119
+ * </ng-template>
120
+ * </ax-comment-view>
121
+ * ```
122
+ */
123
+ declare class AXCommentItemTemplateDirective {
124
+ readonly template: TemplateRef<AXCommentItemTemplateContext>;
125
+ constructor(template: TemplateRef<AXCommentItemTemplateContext>);
126
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentItemTemplateDirective, never>;
127
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXCommentItemTemplateDirective, "ng-template[axCommentItem]", never, {}, {}, never, never, true, never>;
25
128
  }
26
129
 
27
130
  /**
@@ -30,16 +133,67 @@ declare class AXCommentContainerComponent {
30
133
  * @category Components
31
134
  */
32
135
  declare class AXCommentItemComponent {
33
- protected avatar: i0.Signal<AXAvatarComponent>;
34
- readonly replyCount: i0.InputSignal<number>;
35
- /** Two-way bindable state controlling whether nested replies are visible. */
36
- readonly repliesExpanded: i0.ModelSignal<boolean>;
136
+ private readonly parentComment;
137
+ protected readonly isReply: boolean;
138
+ private readonly projectedAvatar;
139
+ private readonly viewAvatar;
140
+ /** Data item used by `ax-comment-view`. When set, the default layout is rendered internally. */
141
+ readonly item: _angular_core.InputSignal<AXCommentItem>;
142
+ readonly replyCount: _angular_core.InputSignal<number>;
143
+ /** Whether nested replies are visible. A later parent value replaces a local toggle. */
144
+ readonly repliesExpanded: _angular_core.InputSignal<boolean>;
145
+ readonly repliesExpandedChange: _angular_core.OutputEmitterRef<boolean>;
146
+ protected readonly expanded: _angular_core.WritableSignal<boolean>;
147
+ private seenExpanded;
148
+ private hasSeenExpanded;
149
+ /** Whether replies for this item are currently being loaded. */
150
+ readonly loading: _angular_core.InputSignal<boolean>;
151
+ /**
152
+ * Custom renderer for the item body. When omitted, the default layout
153
+ * (or projected slots) is used.
154
+ */
155
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<AXCommentItemTemplateContext>>;
156
+ /** Context passed to `itemTemplate`. */
157
+ readonly itemContext: _angular_core.InputSignal<AXCommentItemTemplateContext>;
158
+ readonly likeChange: _angular_core.OutputEmitterRef<boolean>;
159
+ readonly replyClick: _angular_core.OutputEmitterRef<Event>;
160
+ readonly actionClick: _angular_core.OutputEmitterRef<AXMenuItem>;
161
+ protected readonly avatarSize = 48;
162
+ protected readonly showDefaultDataLayout: _angular_core.Signal<boolean>;
163
+ protected readonly useProjectedSlots: _angular_core.Signal<boolean>;
164
+ protected readonly itemActions: _angular_core.Signal<AXMenuItem[]>;
165
+ protected readonly showOverflowMenu: _angular_core.Signal<boolean>;
166
+ protected readonly overflowItems: _angular_core.Signal<AXButtonItemListItem[]>;
167
+ protected readonly templateContexts: _angular_core.Signal<AXCommentItemTemplateContext[]>;
37
168
  constructor();
169
+ /**
170
+ * Recreates the custom item template when the rendered snapshot changes.
171
+ * The outlet otherwise keeps the first context on screen.
172
+ */
173
+ protected templateContextKey(ctx: AXCommentItemTemplateContext): string;
174
+ protected getColor(data: AXCommentItem): AXStyleColorType;
175
+ protected showEdited(data: AXCommentItem): boolean;
176
+ protected getInitials(data: AXCommentItem): string;
177
+ protected handleLike(liked: boolean): void;
178
+ protected handleReply(event: Event): void;
179
+ protected handleOverflowClick(event: AXItemClickEvent<AXButtonItemComponent>): void;
180
+ private toButtonItems;
181
+ private findAction;
182
+ /**
183
+ * Toggles the collapse state of the comment replies section.
184
+ */
38
185
  toggleReplies(): void;
186
+ /**
187
+ * Expands the nested replies section.
188
+ */
39
189
  showReplies(): void;
190
+ /**
191
+ * Collapses the nested replies section.
192
+ */
40
193
  hideReplies(): void;
41
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentItemComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentItemComponent, "ax-comment-item", never, { "replyCount": { "alias": "replyCount"; "required": false; "isSignal": true; }; "repliesExpanded": { "alias": "repliesExpanded"; "required": false; "isSignal": true; }; }, { "repliesExpanded": "repliesExpandedChange"; }, ["avatar"], ["ax-avatar", "ax-title", "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>;
194
+ private setExpanded;
195
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentItemComponent, never>;
196
+ 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; }; }, { "repliesExpandedChange": "repliesExpandedChange"; "likeChange": "likeChange"; "replyClick": "replyClick"; "actionClick": "actionClick"; }, ["projectedAvatar"], ["ax-avatar", "ax-title", "ax-subtitle", "ax-badge", "ax-comment-edited", "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
197
  }
44
198
 
45
199
  /**
@@ -48,8 +202,20 @@ declare class AXCommentItemComponent {
48
202
  * @category Components
49
203
  */
50
204
  declare class AXCommentDateComponent {
51
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentDateComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentDateComponent, "ax-comment-date", never, {}, {}, never, ["*"], true, never>;
205
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentDateComponent, never>;
206
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentDateComponent, "ax-comment-date", never, {}, {}, never, ["*"], true, never>;
207
+ }
208
+
209
+ /**
210
+ * Muted “edited” label shown next to the comment timestamp.
211
+ *
212
+ * @category Components
213
+ */
214
+ declare class AXCommentEditedComponent {
215
+ /** Optional tooltip (for example the time the comment was last edited). */
216
+ readonly editedAt: _angular_core.InputSignal<string>;
217
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentEditedComponent, never>;
218
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentEditedComponent, "ax-comment-edited", never, { "editedAt": { "alias": "editedAt"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
53
219
  }
54
220
 
55
221
  /**
@@ -58,10 +224,18 @@ declare class AXCommentDateComponent {
58
224
  * @category Components
59
225
  */
60
226
  declare class AXCommentLikeComponent {
61
- like: i0.ModelSignal<boolean>;
227
+ /** Current like state from the parent. Later parent values replace a local toggle. */
228
+ readonly like: _angular_core.InputSignal<boolean>;
229
+ readonly likeChange: _angular_core.OutputEmitterRef<boolean>;
230
+ private readonly optimistic;
231
+ private seenLike;
232
+ private hasSeenLike;
233
+ /** Parent value, unless the user just toggled and the parent has not caught up. */
234
+ protected readonly pressed: _angular_core.Signal<boolean>;
235
+ constructor();
62
236
  protected toggleLike(): void;
63
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentLikeComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentLikeComponent, "ax-comment-like", never, { "like": { "alias": "like"; "required": true; "isSignal": true; }; }, { "like": "likeChange"; }, never, ["*"], true, never>;
237
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentLikeComponent, never>;
238
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentLikeComponent, "ax-comment-like", never, { "like": { "alias": "like"; "required": true; "isSignal": true; }; }, { "likeChange": "likeChange"; }, never, ["*"], true, never>;
65
239
  }
66
240
 
67
241
  /**
@@ -70,8 +244,35 @@ declare class AXCommentLikeComponent {
70
244
  * @category Components
71
245
  */
72
246
  declare class AXMenuOptionsComponent {
73
- static ɵfac: i0.ɵɵFactoryDeclaration<AXMenuOptionsComponent, never>;
74
- static ɵcmp: i0.ɵɵComponentDeclaration<AXMenuOptionsComponent, "ax-comment-menu-options", never, {}, {}, never, ["*"], true, never>;
247
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMenuOptionsComponent, never>;
248
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMenuOptionsComponent, "ax-comment-menu-options", never, {}, {}, never, ["*"], true, never>;
249
+ }
250
+
251
+ /**
252
+ * Composer chrome shown while writing a reply. Projects the editor below a
253
+ * compact reply-context bar; hide the bar by leaving `item` empty.
254
+ *
255
+ * @category Components
256
+ */
257
+ declare class AXCommentReplyComponent {
258
+ private readonly document;
259
+ private readonly platformId;
260
+ private readonly destroyRef;
261
+ private highlightTimer;
262
+ constructor();
263
+ /** Comment currently being replied to. When null, only the projected composer is shown. */
264
+ readonly item: _angular_core.InputSignal<AXCommentItem>;
265
+ /** Emitted when the close control on the reply banner is clicked. */
266
+ readonly onClose: _angular_core.OutputEmitterRef<void>;
267
+ /** Emitted when the banner is clicked to jump to the target comment. */
268
+ readonly onTargetClick: _angular_core.OutputEmitterRef<string>;
269
+ protected readonly preview: _angular_core.Signal<string>;
270
+ protected close(): void;
271
+ protected revealTarget(): void;
272
+ private scrollToComment;
273
+ private toPreview;
274
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentReplyComponent, never>;
275
+ 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
276
  }
76
277
 
77
278
  /**
@@ -80,34 +281,152 @@ declare class AXMenuOptionsComponent {
80
281
  * @category Components
81
282
  */
82
283
  declare class AXCommentReplyMoreComponent {
83
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentReplyMoreComponent, never>;
84
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentReplyMoreComponent, "ax-comment-reply-more", never, {}, {}, never, ["*"], true, never>;
284
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentReplyMoreComponent, never>;
285
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentReplyMoreComponent, "ax-comment-reply-more", never, {}, {}, never, ["*"], true, never>;
85
286
  }
86
287
 
87
288
  /**
88
- * A component for displaying the reply action text on a comment.
289
+ * A component for displaying the reply action on a comment.
89
290
  *
90
291
  * @category Components
91
292
  */
92
293
  declare class AXCommentReplyTextComponent {
93
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentReplyTextComponent, never>;
94
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentReplyTextComponent, "ax-comment-reply-text", never, {}, {}, never, never, true, never>;
294
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentReplyTextComponent, never>;
295
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommentReplyTextComponent, "ax-comment-reply-text", never, {}, {}, never, never, true, never>;
95
296
  }
96
297
 
97
298
  /**
98
- * A component for viewing comments with their details.
299
+ * Callbacks the recursive thread uses from `ax-comment-view`.
300
+ * Kept as a token so the thread component does not import the view class.
301
+ */
302
+ interface AXCommentThreadHost {
303
+ trackItem(item: AXCommentItem): string;
304
+ getId(item: AXCommentItem): string;
305
+ getReplies(item: AXCommentItem): AXCommentItem[];
306
+ getReplyCount(item: AXCommentItem): number;
307
+ isExpanded(item: AXCommentItem): boolean;
308
+ isItemLoading(item: AXCommentItem): boolean;
309
+ getTemplateContext(item: AXCommentItem, level: number): AXCommentItemTemplateContext;
310
+ onRepliesExpandedChange(item: AXCommentItem, expanded: boolean): Promise<void>;
311
+ toggleLike(item: AXCommentItem, liked?: boolean): void;
312
+ replyTo(item: AXCommentItem, event?: Event): void;
313
+ emitAction(item: AXCommentItem, action: AXMenuItem): void;
314
+ }
315
+
316
+ /**
317
+ * Renders a comment thread from a datasource (array or lazy callback).
318
+ * Provide `itemTemplate` or `<ng-template axCommentItem>` to customize item UI;
319
+ * otherwise the built-in layout is used.
99
320
  *
100
321
  * @category Components
101
322
  */
102
- declare class AXCommentViewComponent {
103
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentViewComponent, never>;
104
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCommentViewComponent, "ax-comment-view", never, {}, {}, never, ["ax-comment-item"], true, never>;
323
+ declare class AXCommentViewComponent implements AXCommentThreadHost {
324
+ /** Comment data — a static array or a lazy-loading function. */
325
+ readonly datasource: _angular_core.ModelSignal<AXCommentDataSource>;
326
+ /**
327
+ * Custom item template. When omitted, the default comment layout is used.
328
+ * You can also project `<ng-template axCommentItem>`.
329
+ */
330
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<AXCommentItemTemplateContext>>;
331
+ readonly onReply: _angular_core.OutputEmitterRef<AXCommentReplyEvent>;
332
+ readonly onLikeChange: _angular_core.OutputEmitterRef<AXCommentLikeChangeEvent>;
333
+ readonly onRepliesToggle: _angular_core.OutputEmitterRef<AXCommentRepliesToggleEvent>;
334
+ readonly onAction: _angular_core.OutputEmitterRef<AXCommentActionEvent>;
335
+ private readonly projectedItemTemplate;
336
+ protected readonly items: _angular_core.WritableSignal<AXCommentItem[]>;
337
+ private readonly loadingIds;
338
+ private readonly _isLoading;
339
+ readonly isLoading: _angular_core.Signal<boolean>;
340
+ private loadGeneration;
341
+ private readonly emptyReplies;
342
+ private readonly isLazyDataSource;
343
+ protected readonly hasDatasource: _angular_core.Signal<boolean>;
344
+ protected readonly resolvedTemplate: _angular_core.Signal<TemplateRef<AXCommentItemTemplateContext>>;
345
+ constructor();
346
+ /**
347
+ * Reloads root comments from the datasource.
348
+ *
349
+ * @returns Promise that resolves when the reload is complete.
350
+ */
351
+ reloadData(): Promise<void>;
352
+ /**
353
+ * Appends a comment to the current root list.
354
+ *
355
+ * @param item - The comment to append.
356
+ * @returns void
357
+ */
358
+ appendItem(item: AXCommentItem): void;
359
+ /**
360
+ * Appends a reply under a loaded comment and expands that thread.
361
+ *
362
+ * @param parentId - The parent comment id.
363
+ * @param item - The reply to append.
364
+ * @returns Promise that resolves when any needed lazy load and the append are complete.
365
+ */
366
+ appendReply(parentId: string, item: AXCommentItem): Promise<void>;
367
+ /**
368
+ * Finds a comment by id in the loaded tree.
369
+ *
370
+ * @param id - The comment id.
371
+ * @returns The matching item, or null if it is not loaded.
372
+ */
373
+ findItem(id: string): AXCommentItem | null;
374
+ /**
375
+ * Removes a comment from the loaded tree. Nested replies are removed with it.
376
+ *
377
+ * @param id - The comment id.
378
+ * @returns True when the comment was found and removed.
379
+ */
380
+ removeItem(id: string): boolean;
381
+ /**
382
+ * Patches a loaded comment in place.
383
+ *
384
+ * @param id - The comment id.
385
+ * @param patch - Fields to merge onto the existing item. The original id is kept.
386
+ * @returns The updated item, or null if it is not loaded.
387
+ */
388
+ updateItem(id: string, patch: Partial<AXCommentItem>): AXCommentItem | null;
389
+ /**
390
+ * Expands or collapses replies for a comment, loading them when needed.
391
+ *
392
+ * @param id - The comment id.
393
+ * @param expanded - Whether replies should be visible.
394
+ * @returns Promise that resolves when expansion and any lazy load are complete.
395
+ */
396
+ setExpanded(id: string, expanded: boolean): Promise<void>;
397
+ getId(item: AXCommentItem): string;
398
+ /**
399
+ * Identity includes the fields the row renders. A same-id edit, like, or reply
400
+ * must refresh the row instead of leaving the previous snapshot on screen.
401
+ */
402
+ trackItem(item: AXCommentItem): string;
403
+ getReplies(item: AXCommentItem): AXCommentItem[];
404
+ getReplyCount(item: AXCommentItem): number;
405
+ isExpanded(item: AXCommentItem): boolean;
406
+ isItemLoading(item: AXCommentItem): boolean;
407
+ getTemplateContext(item: AXCommentItem, level: number): AXCommentItemTemplateContext;
408
+ onRepliesExpandedChange(item: AXCommentItem, expanded: boolean): Promise<void>;
409
+ toggleLike(item: AXCommentItem, liked?: boolean): void;
410
+ replyTo(item: AXCommentItem, event?: Event): void;
411
+ emitAction(item: AXCommentItem, action: AXMenuItem): void;
412
+ private applyDatasource;
413
+ private loadRootItems;
414
+ private hydrateExpanded;
415
+ private canLazyLoad;
416
+ private setItemExpanded;
417
+ private loadReplies;
418
+ private refreshItems;
419
+ private findInTree;
420
+ private findParent;
421
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentViewComponent, never>;
422
+ 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
423
  }
106
424
 
107
425
  declare class AXCommentModule {
108
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCommentModule, never>;
109
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXCommentModule, never, [typeof i1.AXDecoratorModule, typeof i2.AXWysiwygModule, typeof i3.AXButtonModule, typeof i4.AXTextAreaModule, typeof i5.AXTranslationModule, typeof AXCommentViewComponent, typeof AXCommentContainerComponent, typeof AXCommentItemComponent, typeof AXCommentLikeComponent, typeof AXMenuOptionsComponent, typeof AXCommentReplyTextComponent, typeof AXCommentDateComponent, typeof AXCommentReplyMoreComponent], [typeof AXCommentViewComponent, typeof AXCommentContainerComponent, typeof AXCommentItemComponent, typeof AXCommentLikeComponent, typeof AXMenuOptionsComponent, typeof AXCommentReplyTextComponent, typeof AXCommentDateComponent, typeof AXCommentReplyMoreComponent]>;
110
- static ɵinj: i0.ɵɵInjectorDeclaration<AXCommentModule>;
426
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommentModule, never>;
427
+ 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 AXCommentEditedComponent, typeof AXCommentReplyMoreComponent, typeof AXCommentItemTemplateDirective], [typeof AXCommentViewComponent, typeof AXCommentContainerComponent, typeof AXCommentItemComponent, typeof AXCommentLikeComponent, typeof AXMenuOptionsComponent, typeof AXCommentReplyComponent, typeof AXCommentReplyTextComponent, typeof AXCommentDateComponent, typeof AXCommentEditedComponent, typeof AXCommentReplyMoreComponent, typeof AXCommentItemTemplateDirective]>;
428
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXCommentModule>;
111
429
  }
112
430
 
113
- export { AXCommentContainerComponent, AXCommentDateComponent, AXCommentItemComponent, AXCommentLikeComponent, AXCommentModule, AXCommentReplyMoreComponent, AXCommentReplyTextComponent, AXCommentViewComponent, AXMenuOptionsComponent };
431
+ export { AXCommentContainerComponent, AXCommentDateComponent, AXCommentEditedComponent, AXCommentItemComponent, AXCommentItemTemplateDirective, AXCommentLikeComponent, AXCommentModule, AXCommentReplyComponent, AXCommentReplyMoreComponent, AXCommentReplyTextComponent, AXCommentViewComponent, AXMenuOptionsComponent };
432
+ export type { AXCommentActionEvent, AXCommentCallback, AXCommentDataSource, AXCommentItem, AXCommentItemTemplateContext, AXCommentLikeChangeEvent, AXCommentRepliesToggleEvent, AXCommentReplyEvent };