@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
@@ -1,11 +1,15 @@
1
1
  import { AXComponent } from '@acorex/cdk/common';
2
- import { isPlatformBrowser, AsyncPipe } from '@angular/common';
2
+ import { isPlatformBrowser, AsyncPipe, NgTemplateOutlet } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, DOCUMENT, PLATFORM_ID, ViewEncapsulation, Component, contentChild, input, model, afterNextRender, NgModule } from '@angular/core';
4
+ import { inject, DOCUMENT, PLATFORM_ID, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, input, output, signal, computed, effect, untracked, viewChild, afterNextRender, DestroyRef, InjectionToken, model, NgModule } from '@angular/core';
5
5
  import { AXAvatarComponent } from '@acorex/components/avatar';
6
- import { AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
6
+ import { AXBadgeComponent, AXBadgeModule } from '@acorex/components/badge';
7
+ import { AXButtonItemListComponent, AXButtonModule } from '@acorex/components/button';
7
8
  import { AXDecoratorIconComponent, AXDecoratorGenericComponent, AXDecoratorModule } from '@acorex/components/decorators';
8
- import { AXButtonModule } from '@acorex/components/button';
9
+ import { AXDropdownButtonComponent } from '@acorex/components/dropdown-button';
10
+ import { AXImageComponent } from '@acorex/components/image';
11
+ import { AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
12
+ import { AXSkeletonComponent } from '@acorex/components/skeleton';
9
13
  import { AXTextAreaModule } from '@acorex/components/text-area';
10
14
  import { AXWysiwygModule } from '@acorex/components/wysiwyg';
11
15
 
@@ -18,6 +22,10 @@ class AXCommentContainerComponent {
18
22
  constructor() {
19
23
  this.document = inject(DOCUMENT);
20
24
  this.platformID = inject(PLATFORM_ID);
25
+ this.projectedHeader = contentChild('ax-header', /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "projectedHeader" }] : /* istanbul ignore next */ []));
27
+ this.projectedFooter = contentChild('ax-footer', /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "projectedFooter" }] : /* istanbul ignore next */ []));
21
29
  }
22
30
  /**
23
31
  * Scrolls to a specific comment reply by its ID and highlights it temporarily.
@@ -27,7 +35,9 @@ class AXCommentContainerComponent {
27
35
  scrollToReply(id) {
28
36
  if (!isPlatformBrowser(this.platformID))
29
37
  return;
30
- const el = this.document.querySelector(`ax-comment-item[id="${id}"]`);
38
+ const key = String(id);
39
+ const el = this.document.querySelector(`ax-comment-item[id="${key}"]`) ??
40
+ this.document.querySelector(`ax-comment-item[id="comment-${key}"]`);
31
41
  if (!el)
32
42
  return;
33
43
  el.scrollIntoView({ behavior: 'smooth', block: 'center' });
@@ -35,47 +45,55 @@ class AXCommentContainerComponent {
35
45
  setTimeout(() => el.classList.remove('ax-state-highlight'), 1500);
36
46
  }
37
47
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentContainerComponent, isStandalone: true, selector: "ax-comment-container", providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["ax-comment-container{display:block;width:100%}\n"], encapsulation: i0.ViewEncapsulation.None }); }
48
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: AXCommentContainerComponent, isStandalone: true, selector: "ax-comment-container", host: { properties: { "class.ax-has-header": "!!projectedHeader()", "class.ax-has-footer": "!!projectedFooter()" } }, providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }], queries: [{ propertyName: "projectedHeader", first: true, predicate: ["ax-header"], descendants: true, isSignal: true }, { propertyName: "projectedFooter", first: true, predicate: ["ax-footer"], descendants: true, isSignal: true }], ngImport: i0, template: `
49
+ <ng-content select="ax-header" />
50
+ <ng-content />
51
+ <ng-content select="ax-footer" />
52
+ `, isInline: true, styles: ["@layer components{ax-comment-container{--ax-comp-comment-padding-x: 0px;--ax-comp-comment-padding-y: 8px;--ax-comp-comment-gap: 8px;--ax-comp-comment-avatar-size: 32px;--ax-comp-comment-reply-avatar-size: 28px;display:block;width:100%;min-width:calc(var(--spacing, .25rem) * 0)}ax-comment-container>ax-header,ax-comment-container>ax-footer{display:none;width:100%;min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;align-items:stretch;justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 2);padding-block:16px}ax-comment-container.ax-has-header>ax-header,ax-comment-container.ax-has-footer>ax-footer{display:flex}ax-comment-container.ax-has-header>ax-header>*,ax-comment-container.ax-has-footer>ax-footer>*{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
39
53
  }
40
54
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentContainerComponent, decorators: [{
41
55
  type: Component,
42
- args: [{ selector: 'ax-comment-container', template: '<ng-content />', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }], styles: ["ax-comment-container{display:block;width:100%}\n"] }]
43
- }] });
56
+ args: [{ selector: 'ax-comment-container', template: `
57
+ <ng-content select="ax-header" />
58
+ <ng-content />
59
+ <ng-content select="ax-footer" />
60
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }], host: {
61
+ '[class.ax-has-header]': '!!projectedHeader()',
62
+ '[class.ax-has-footer]': '!!projectedFooter()',
63
+ }, styles: ["@layer components{ax-comment-container{--ax-comp-comment-padding-x: 0px;--ax-comp-comment-padding-y: 8px;--ax-comp-comment-gap: 8px;--ax-comp-comment-avatar-size: 32px;--ax-comp-comment-reply-avatar-size: 28px;display:block;width:100%;min-width:calc(var(--spacing, .25rem) * 0)}ax-comment-container>ax-header,ax-comment-container>ax-footer{display:none;width:100%;min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;align-items:stretch;justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 2);padding-block:16px}ax-comment-container.ax-has-header>ax-header,ax-comment-container.ax-has-footer>ax-footer{display:flex}ax-comment-container.ax-has-header>ax-header>*,ax-comment-container.ax-has-footer>ax-footer>*{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
64
+ }], propDecorators: { projectedHeader: [{ type: i0.ContentChild, args: ['ax-header', { isSignal: true }] }], projectedFooter: [{ type: i0.ContentChild, args: ['ax-footer', { isSignal: true }] }] } });
44
65
 
45
66
  /**
46
- * A component that represents an individual comment item in the comment system.
67
+ * Marks an `ng-template` as a custom comment item renderer.
68
+ * When omitted, `ax-comment-view` uses the built-in layout.
69
+ * Like and reply stay in the item actions row either way.
47
70
  *
48
- * @category Components
71
+ * @example
72
+ * ```html
73
+ * <ax-comment-view [datasource]="comments">
74
+ * <ng-template axCommentItem let-item>
75
+ * <ax-avatar [color]="item.color" look="twotone" shape="rounded">
76
+ * <ax-text>{{ item.initials }}</ax-text>
77
+ * </ax-avatar>
78
+ * <ax-title>{{ item.author }}</ax-title>
79
+ * <ax-content>{{ item.content }}</ax-content>
80
+ * </ng-template>
81
+ * </ax-comment-view>
82
+ * ```
49
83
  */
50
- class AXCommentItemComponent {
51
- constructor() {
52
- this.avatar = contentChild(AXAvatarComponent, /* @ts-ignore */
53
- ...(ngDevMode ? [{ debugName: "avatar" }] : /* istanbul ignore next */ []));
54
- this.replyCount = input(/* @ts-ignore */
55
- ...(ngDevMode ? [undefined, { debugName: "replyCount" }] : /* istanbul ignore next */ []));
56
- /** Two-way bindable state controlling whether nested replies are visible. */
57
- this.repliesExpanded = model(false, /* @ts-ignore */
58
- ...(ngDevMode ? [{ debugName: "repliesExpanded" }] : /* istanbul ignore next */ []));
59
- afterNextRender(() => {
60
- this.avatar()?.size?.set(40);
61
- });
84
+ class AXCommentItemTemplateDirective {
85
+ constructor(template) {
86
+ this.template = template;
62
87
  }
63
- toggleReplies() {
64
- this.repliesExpanded.update((v) => !v);
65
- }
66
- showReplies() {
67
- this.repliesExpanded.set(true);
68
- }
69
- hideReplies() {
70
- this.repliesExpanded.set(false);
71
- }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
73
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXCommentItemComponent, isStandalone: true, selector: "ax-comment-item", inputs: { replyCount: { classPropertyName: "replyCount", publicName: "replyCount", isSignal: true, isRequired: false, transformFunction: null }, repliesExpanded: { classPropertyName: "repliesExpanded", publicName: "repliesExpanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { repliesExpanded: "repliesExpandedChange" }, providers: [{ provide: AXComponent, useExisting: AXCommentItemComponent }], queries: [{ propertyName: "avatar", first: true, predicate: AXAvatarComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-comment-header\">\n <div class=\"ax-comment-header-start\">\n <ng-content select=\"ax-avatar\" />\n <div class=\"ax-comment-header-content\">\n <ng-content select=\"ax-title\" />\n <ng-content select=\"ax-comment-date\" />\n </div>\n </div>\n <ng-content select=\"ax-comment-menu-options\" />\n</div>\n\n<div class=\"ax-comment-body\">\n <ng-content select=\"ax-content\" />\n <div class=\"ax-comment-actions\">\n <ng-content select=\"ax-comment-like\" />\n <ng-content select=\"ax-comment-reply-text\" />\n </div>\n</div>\n\n@if (replyCount()) {\n <div class=\"ax-comment-replies\">\n <span class=\"ax-comment-replies-toggle\" (click)=\"toggleReplies()\">\n {{ (repliesExpanded() ? '@acorex:comment.hide' : '@acorex:comment.view') | translate | async }}\n {{ replyCount() }}\n {{ (replyCount() > 1 ? '@acorex:comment.replies' : '@acorex:comment.reply') | translate | async }}\n </span>\n @if (repliesExpanded()) {\n <div class=\"ax-comment-replies-content\">\n <ng-content select=\"ax-comment-item\" />\n <ng-content select=\"ax-comment-reply-more\" />\n </div>\n }\n </div>\n}\n", styles: ["@layer properties;@layer components{ax-comment-item{display:block;border-radius:.25rem;padding:calc(var(--spacing, .25rem) * 1);transition-property:background;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: 1s;transition-duration:1s;--tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));transition-timing-function:var(--ease-in-out, cubic-bezier(.4, 0, .2, 1))}ax-comment-item:not(:last-child){margin-bottom:calc(var(--spacing, .25rem) * 4)}ax-comment-item.ax-state-highlight{background-color:rgba(var(--ax-sys-color-primary-surface),.1)}ax-comment-item .ax-comment-header{display:flex;align-items:center;justify-content:space-between}ax-comment-item .ax-comment-header .ax-comment-header-start{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-header .ax-comment-header-start .ax-comment-header-content{display:flex;align-items:baseline;gap:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-header ax-title{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-comment-item .ax-comment-body{margin-inline-start:calc(var(--spacing, .25rem) * 12);padding-top:calc(var(--spacing, .25rem) * 1);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}ax-comment-item .ax-comment-actions{margin-top:calc(var(--spacing, .25rem) * 2);display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 4);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}ax-comment-item .ax-comment-actions ax-comment-like,ax-comment-item .ax-comment-actions ax-comment-reply-text{cursor:pointer;-webkit-user-select:none;user-select:none}ax-comment-item .ax-comment-replies{margin-inline-start:calc(var(--spacing, .25rem) * 10);margin-top:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle{display:inline-flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface));-webkit-user-select:none;user-select:none}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle:hover{text-decoration-line:underline}ax-comment-item .ax-comment-replies .ax-comment-replies-content{margin-top:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-replies ax-comment-reply-more{cursor:pointer;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item .ax-comment-replies ax-comment-reply-more:hover{text-decoration-line:underline}}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-ease{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentItemTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
89
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentItemTemplateDirective, isStandalone: true, selector: "ng-template[axCommentItem]", ngImport: i0 }); }
74
90
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentItemComponent, decorators: [{
76
- type: Component,
77
- args: [{ selector: 'ax-comment-item', encapsulation: ViewEncapsulation.None, imports: [AXTranslatorPipe, AsyncPipe], providers: [{ provide: AXComponent, useExisting: AXCommentItemComponent }], template: "<div class=\"ax-comment-header\">\n <div class=\"ax-comment-header-start\">\n <ng-content select=\"ax-avatar\" />\n <div class=\"ax-comment-header-content\">\n <ng-content select=\"ax-title\" />\n <ng-content select=\"ax-comment-date\" />\n </div>\n </div>\n <ng-content select=\"ax-comment-menu-options\" />\n</div>\n\n<div class=\"ax-comment-body\">\n <ng-content select=\"ax-content\" />\n <div class=\"ax-comment-actions\">\n <ng-content select=\"ax-comment-like\" />\n <ng-content select=\"ax-comment-reply-text\" />\n </div>\n</div>\n\n@if (replyCount()) {\n <div class=\"ax-comment-replies\">\n <span class=\"ax-comment-replies-toggle\" (click)=\"toggleReplies()\">\n {{ (repliesExpanded() ? '@acorex:comment.hide' : '@acorex:comment.view') | translate | async }}\n {{ replyCount() }}\n {{ (replyCount() > 1 ? '@acorex:comment.replies' : '@acorex:comment.reply') | translate | async }}\n </span>\n @if (repliesExpanded()) {\n <div class=\"ax-comment-replies-content\">\n <ng-content select=\"ax-comment-item\" />\n <ng-content select=\"ax-comment-reply-more\" />\n </div>\n }\n </div>\n}\n", styles: ["@layer properties;@layer components{ax-comment-item{display:block;border-radius:.25rem;padding:calc(var(--spacing, .25rem) * 1);transition-property:background;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: 1s;transition-duration:1s;--tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));transition-timing-function:var(--ease-in-out, cubic-bezier(.4, 0, .2, 1))}ax-comment-item:not(:last-child){margin-bottom:calc(var(--spacing, .25rem) * 4)}ax-comment-item.ax-state-highlight{background-color:rgba(var(--ax-sys-color-primary-surface),.1)}ax-comment-item .ax-comment-header{display:flex;align-items:center;justify-content:space-between}ax-comment-item .ax-comment-header .ax-comment-header-start{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-header .ax-comment-header-start .ax-comment-header-content{display:flex;align-items:baseline;gap:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-header ax-title{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-comment-item .ax-comment-body{margin-inline-start:calc(var(--spacing, .25rem) * 12);padding-top:calc(var(--spacing, .25rem) * 1);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}ax-comment-item .ax-comment-actions{margin-top:calc(var(--spacing, .25rem) * 2);display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 4);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}ax-comment-item .ax-comment-actions ax-comment-like,ax-comment-item .ax-comment-actions ax-comment-reply-text{cursor:pointer;-webkit-user-select:none;user-select:none}ax-comment-item .ax-comment-replies{margin-inline-start:calc(var(--spacing, .25rem) * 10);margin-top:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle{display:inline-flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface));-webkit-user-select:none;user-select:none}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle:hover{text-decoration-line:underline}ax-comment-item .ax-comment-replies .ax-comment-replies-content{margin-top:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-replies ax-comment-reply-more{cursor:pointer;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item .ax-comment-replies ax-comment-reply-more:hover{text-decoration-line:underline}}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-ease{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
78
- }], ctorParameters: () => [], propDecorators: { avatar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXAvatarComponent), { isSignal: true }] }], replyCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "replyCount", required: false }] }], repliesExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "repliesExpanded", required: false }] }, { type: i0.Output, args: ["repliesExpandedChange"] }] } });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentItemTemplateDirective, decorators: [{
92
+ type: Directive,
93
+ args: [{
94
+ selector: 'ng-template[axCommentItem]',
95
+ }]
96
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
79
97
 
80
98
  /**
81
99
  * A component for displaying date on a comment.
@@ -84,13 +102,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
84
102
  */
85
103
  class AXCommentDateComponent {
86
104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentDateComponent, isStandalone: true, selector: "ax-comment-date", providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@layer components{ax-comment-date{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], encapsulation: i0.ViewEncapsulation.None }); }
105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentDateComponent, isStandalone: true, selector: "ax-comment-date", providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@layer properties;@layer components{ax-comment-date{display:inline-flex;align-items:center;font-size:12px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-date{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 55%,transparent)}}ax-comment-date:before{content:\"\\b7\";margin-inline:.4rem .35rem;opacity:.7}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
88
106
  }
89
107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentDateComponent, decorators: [{
90
108
  type: Component,
91
- args: [{ selector: 'ax-comment-date', template: '<ng-content />', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], styles: ["@layer components{ax-comment-date{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
109
+ args: [{ selector: 'ax-comment-date', template: '<ng-content />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], styles: ["@layer properties;@layer components{ax-comment-date{display:inline-flex;align-items:center;font-size:12px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-date{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 55%,transparent)}}ax-comment-date:before{content:\"\\b7\";margin-inline:.4rem .35rem;opacity:.7}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
92
110
  }] });
93
111
 
112
+ /**
113
+ * Muted “edited” label shown next to the comment timestamp.
114
+ *
115
+ * @category Components
116
+ */
117
+ class AXCommentEditedComponent {
118
+ constructor() {
119
+ /** Optional tooltip (for example the time the comment was last edited). */
120
+ this.editedAt = input(/* @ts-ignore */
121
+ ...(ngDevMode ? [undefined, { debugName: "editedAt" }] : /* istanbul ignore next */ []));
122
+ }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentEditedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
124
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AXCommentEditedComponent, isStandalone: true, selector: "ax-comment-edited", inputs: { editedAt: { classPropertyName: "editedAt", publicName: "editedAt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.title": "editedAt() || null", "attr.aria-label": "editedAt() || null" }, classAttribute: "ax-comment-edited" }, providers: [{ provide: AXComponent, useExisting: AXCommentEditedComponent }], ngImport: i0, template: `{{ '@acorex:comment.edited' | translate | async }}`, isInline: true, styles: ["@layer properties;@layer components{ax-comment-edited{display:inline-flex;align-items:center;font-size:11px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-edited{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 45%,transparent)}}ax-comment-edited:before{content:\"\\b7\";margin-inline:.4rem .35rem;opacity:.7}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-tracking{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
125
+ }
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentEditedComponent, decorators: [{
127
+ type: Component,
128
+ args: [{ selector: 'ax-comment-edited', template: `{{ '@acorex:comment.edited' | translate | async }}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
129
+ class: 'ax-comment-edited',
130
+ '[attr.title]': 'editedAt() || null',
131
+ '[attr.aria-label]': 'editedAt() || null',
132
+ }, imports: [AXTranslatorPipe, AsyncPipe], providers: [{ provide: AXComponent, useExisting: AXCommentEditedComponent }], styles: ["@layer properties;@layer components{ax-comment-edited{display:inline-flex;align-items:center;font-size:11px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-edited{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 45%,transparent)}}ax-comment-edited:before{content:\"\\b7\";margin-inline:.4rem .35rem;opacity:.7}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-tracking{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
133
+ }], propDecorators: { editedAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "editedAt", required: false }] }] } });
134
+
94
135
  /**
95
136
  * A component for displaying and managing likes on a comment.
96
137
  *
@@ -98,19 +139,258 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
98
139
  */
99
140
  class AXCommentLikeComponent {
100
141
  constructor() {
101
- this.like = model.required(/* @ts-ignore */
142
+ /** Current like state from the parent. Later parent values replace a local toggle. */
143
+ this.like = input.required(/* @ts-ignore */
102
144
  ...(ngDevMode ? [{ debugName: "like" }] : /* istanbul ignore next */ []));
145
+ this.likeChange = output();
146
+ this.optimistic = signal(null, /* @ts-ignore */
147
+ ...(ngDevMode ? [{ debugName: "optimistic" }] : /* istanbul ignore next */ []));
148
+ this.seenLike = false;
149
+ this.hasSeenLike = false;
150
+ /** Parent value, unless the user just toggled and the parent has not caught up. */
151
+ this.pressed = computed(() => this.optimistic() ?? this.like(), /* @ts-ignore */
152
+ ...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
153
+ effect(() => {
154
+ const incoming = this.like();
155
+ untracked(() => {
156
+ if (!this.hasSeenLike || incoming !== this.seenLike) {
157
+ this.hasSeenLike = true;
158
+ this.seenLike = incoming;
159
+ this.optimistic.set(null);
160
+ }
161
+ });
162
+ });
103
163
  }
104
164
  toggleLike() {
105
- this.like.update((prev) => !prev);
165
+ const next = !this.pressed();
166
+ this.optimistic.set(next);
167
+ this.likeChange.emit(next);
106
168
  }
107
169
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentLikeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
108
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AXCommentLikeComponent, isStandalone: true, selector: "ax-comment-like", inputs: { like: { classPropertyName: "like", publicName: "like", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { like: "likeChange" }, providers: [{ provide: AXComponent, useExisting: AXCommentLikeComponent }], ngImport: i0, template: "<div class=\"ax-comment-like-container\" [class.ax-state-liked]=\"like()\" (click)=\"toggleLike()\">\n <ax-icon class=\"ax-icon ax-icon-heart\"></ax-icon>\n <ax-text><ng-content /></ax-text>\n</div>\n", styles: ["@layer properties;@layer components{.ax-comment-like-container{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.ax-comment-like-container ax-icon{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.ax-comment-like-container:hover:not(.ax-state-liked){color:rgba(var(--ax-sys-color-danger-400))}.ax-comment-like-container.ax-state-liked{color:rgba(var(--ax-sys-color-danger-surface))}.ax-comment-like-container.ax-state-liked ax-icon{--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }], encapsulation: i0.ViewEncapsulation.None }); }
170
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AXCommentLikeComponent, isStandalone: true, selector: "ax-comment-like", inputs: { like: { classPropertyName: "like", publicName: "like", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { likeChange: "likeChange" }, providers: [{ provide: AXComponent, useExisting: AXCommentLikeComponent }], ngImport: i0, template: "<button\n type=\"button\"\n class=\"ax-comment-like-button\"\n [class.ax-state-liked]=\"pressed()\"\n [attr.aria-pressed]=\"pressed()\"\n (click)=\"toggleLike()\"\n>\n <ax-icon [icon]=\"pressed() ? 'ax-icon ax-icon-solid ax-icon-heart' : 'ax-icon ax-icon-heart'\"></ax-icon>\n <ax-text><ng-content /></ax-text>\n</button>\n", styles: ["@layer properties;@layer components{ax-comment-like{display:inline-flex}.ax-comment-like-button{display:inline-flex;min-height:calc(var(--spacing, .25rem) * 7);cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1.5);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);font-size:12.5px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}@supports (color: color-mix(in lab,red,red)){.ax-comment-like-button{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 70%,transparent)}}.ax-comment-like-button ax-icon{font-size:14px;--tw-leading: 1;line-height:1}.ax-comment-like-button:hover:not(.ax-state-liked){color:rgba(var(--ax-sys-color-danger-400))}.ax-comment-like-button.ax-state-liked{color:rgba(var(--ax-sys-color-danger-surface))}.ax-comment-like-button:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
109
171
  }
110
172
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentLikeComponent, decorators: [{
111
173
  type: Component,
112
- args: [{ selector: 'ax-comment-like', encapsulation: ViewEncapsulation.None, imports: [AXDecoratorIconComponent, AXDecoratorGenericComponent], providers: [{ provide: AXComponent, useExisting: AXCommentLikeComponent }], template: "<div class=\"ax-comment-like-container\" [class.ax-state-liked]=\"like()\" (click)=\"toggleLike()\">\n <ax-icon class=\"ax-icon ax-icon-heart\"></ax-icon>\n <ax-text><ng-content /></ax-text>\n</div>\n", styles: ["@layer properties;@layer components{.ax-comment-like-container{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.ax-comment-like-container ax-icon{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.ax-comment-like-container:hover:not(.ax-state-liked){color:rgba(var(--ax-sys-color-danger-400))}.ax-comment-like-container.ax-state-liked{color:rgba(var(--ax-sys-color-danger-surface))}.ax-comment-like-container.ax-state-liked ax-icon{--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
113
- }], propDecorators: { like: [{ type: i0.Input, args: [{ isSignal: true, alias: "like", required: true }] }, { type: i0.Output, args: ["likeChange"] }] } });
174
+ args: [{ selector: 'ax-comment-like', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorIconComponent, AXDecoratorGenericComponent], providers: [{ provide: AXComponent, useExisting: AXCommentLikeComponent }], template: "<button\n type=\"button\"\n class=\"ax-comment-like-button\"\n [class.ax-state-liked]=\"pressed()\"\n [attr.aria-pressed]=\"pressed()\"\n (click)=\"toggleLike()\"\n>\n <ax-icon [icon]=\"pressed() ? 'ax-icon ax-icon-solid ax-icon-heart' : 'ax-icon ax-icon-heart'\"></ax-icon>\n <ax-text><ng-content /></ax-text>\n</button>\n", styles: ["@layer properties;@layer components{ax-comment-like{display:inline-flex}.ax-comment-like-button{display:inline-flex;min-height:calc(var(--spacing, .25rem) * 7);cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1.5);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);font-size:12.5px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}@supports (color: color-mix(in lab,red,red)){.ax-comment-like-button{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 70%,transparent)}}.ax-comment-like-button ax-icon{font-size:14px;--tw-leading: 1;line-height:1}.ax-comment-like-button:hover:not(.ax-state-liked){color:rgba(var(--ax-sys-color-danger-400))}.ax-comment-like-button.ax-state-liked{color:rgba(var(--ax-sys-color-danger-surface))}.ax-comment-like-button:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
175
+ }], ctorParameters: () => [], propDecorators: { like: [{ type: i0.Input, args: [{ isSignal: true, alias: "like", required: true }] }], likeChange: [{ type: i0.Output, args: ["likeChange"] }] } });
176
+
177
+ /**
178
+ * A component for displaying the reply action on a comment.
179
+ *
180
+ * @category Components
181
+ */
182
+ class AXCommentReplyTextComponent {
183
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
184
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentReplyTextComponent, isStandalone: true, selector: "ax-comment-reply-text", providers: [{ provide: AXComponent, useExisting: AXCommentReplyTextComponent }], ngImport: i0, template: `
185
+ <button type="button" class="ax-comment-reply-button">
186
+ <ax-icon icon="ax-icon ax-icon-arrow-turn-left"></ax-icon>
187
+ <ax-text>{{ '@acorex:comment.reply' | translate | async }}</ax-text>
188
+ </button>
189
+ `, isInline: true, styles: ["@layer properties;@layer components{ax-comment-reply-text{display:inline-flex}.ax-comment-reply-button{display:inline-flex;min-height:calc(var(--spacing, .25rem) * 7);cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);font-size:12.5px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-button{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-comment-reply-button ax-icon{font-size:13px;--tw-leading: 1;line-height:1}.ax-comment-reply-button:hover{color:rgba(var(--ax-sys-color-on-surface))}.ax-comment-reply-button:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
190
+ }
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyTextComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'ax-comment-reply-text', template: `
194
+ <button type="button" class="ax-comment-reply-button">
195
+ <ax-icon icon="ax-icon ax-icon-arrow-turn-left"></ax-icon>
196
+ <ax-text>{{ '@acorex:comment.reply' | translate | async }}</ax-text>
197
+ </button>
198
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorGenericComponent, AXDecoratorIconComponent, AXTranslatorPipe, AsyncPipe], providers: [{ provide: AXComponent, useExisting: AXCommentReplyTextComponent }], styles: ["@layer properties;@layer components{ax-comment-reply-text{display:inline-flex}.ax-comment-reply-button{display:inline-flex;min-height:calc(var(--spacing, .25rem) * 7);cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);font-size:12.5px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-button{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-comment-reply-button ax-icon{font-size:13px;--tw-leading: 1;line-height:1}.ax-comment-reply-button:hover{color:rgba(var(--ax-sys-color-on-surface))}.ax-comment-reply-button:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
199
+ }] });
200
+
201
+ /**
202
+ * A component that represents an individual comment item in the comment system.
203
+ *
204
+ * @category Components
205
+ */
206
+ class AXCommentItemComponent {
207
+ constructor() {
208
+ this.parentComment = inject(AXCommentItemComponent, { optional: true, skipSelf: true });
209
+ this.isReply = this.parentComment != null;
210
+ this.projectedAvatar = contentChild(AXAvatarComponent, /* @ts-ignore */
211
+ ...(ngDevMode ? [{ debugName: "projectedAvatar" }] : /* istanbul ignore next */ []));
212
+ this.viewAvatar = viewChild(AXAvatarComponent, /* @ts-ignore */
213
+ ...(ngDevMode ? [{ debugName: "viewAvatar" }] : /* istanbul ignore next */ []));
214
+ /** Data item used by `ax-comment-view`. When set, the default layout is rendered internally. */
215
+ this.item = input(null, /* @ts-ignore */
216
+ ...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
217
+ this.replyCount = input(/* @ts-ignore */
218
+ ...(ngDevMode ? [undefined, { debugName: "replyCount" }] : /* istanbul ignore next */ []));
219
+ /** Whether nested replies are visible. A later parent value replaces a local toggle. */
220
+ this.repliesExpanded = input(false, /* @ts-ignore */
221
+ ...(ngDevMode ? [{ debugName: "repliesExpanded" }] : /* istanbul ignore next */ []));
222
+ this.repliesExpandedChange = output();
223
+ this.expanded = signal(false, /* @ts-ignore */
224
+ ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
225
+ this.seenExpanded = false;
226
+ this.hasSeenExpanded = false;
227
+ /** Whether replies for this item are currently being loaded. */
228
+ this.loading = input(false, /* @ts-ignore */
229
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
230
+ /**
231
+ * Custom renderer for the item body. When omitted, the default layout
232
+ * (or projected slots) is used.
233
+ */
234
+ this.itemTemplate = input(null, /* @ts-ignore */
235
+ ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
236
+ /** Context passed to `itemTemplate`. */
237
+ this.itemContext = input(null, /* @ts-ignore */
238
+ ...(ngDevMode ? [{ debugName: "itemContext" }] : /* istanbul ignore next */ []));
239
+ this.likeChange = output();
240
+ this.replyClick = output();
241
+ this.actionClick = output();
242
+ this.avatarSize = 48;
243
+ this.showDefaultDataLayout = computed(() => !!this.item() && !this.itemTemplate(), /* @ts-ignore */
244
+ ...(ngDevMode ? [{ debugName: "showDefaultDataLayout" }] : /* istanbul ignore next */ []));
245
+ this.useProjectedSlots = computed(() => !this.item() && !this.itemTemplate(), /* @ts-ignore */
246
+ ...(ngDevMode ? [{ debugName: "useProjectedSlots" }] : /* istanbul ignore next */ []));
247
+ this.itemActions = computed(() => this.item()?.actions ?? [], /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "itemActions" }] : /* istanbul ignore next */ []));
249
+ this.showOverflowMenu = computed(() => this.showDefaultDataLayout() && this.itemActions().length > 0, /* @ts-ignore */
250
+ ...(ngDevMode ? [{ debugName: "showOverflowMenu" }] : /* istanbul ignore next */ []));
251
+ this.overflowItems = computed(() => this.toButtonItems(this.itemActions()), /* @ts-ignore */
252
+ ...(ngDevMode ? [{ debugName: "overflowItems" }] : /* istanbul ignore next */ []));
253
+ this.templateContexts = computed(() => {
254
+ const ctx = this.itemContext();
255
+ return ctx ? [ctx] : [];
256
+ }, /* @ts-ignore */
257
+ ...(ngDevMode ? [{ debugName: "templateContexts" }] : /* istanbul ignore next */ []));
258
+ effect(() => {
259
+ const incoming = this.repliesExpanded();
260
+ untracked(() => {
261
+ if (!this.hasSeenExpanded || incoming !== this.seenExpanded) {
262
+ this.hasSeenExpanded = true;
263
+ this.seenExpanded = incoming;
264
+ this.expanded.set(incoming);
265
+ }
266
+ });
267
+ });
268
+ afterNextRender(() => {
269
+ if (this.itemTemplate())
270
+ return;
271
+ (this.projectedAvatar() ?? this.viewAvatar())?.size?.set(this.avatarSize);
272
+ });
273
+ }
274
+ /**
275
+ * Recreates the custom item template when the rendered snapshot changes.
276
+ * The outlet otherwise keeps the first context on screen.
277
+ */
278
+ templateContextKey(ctx) {
279
+ const item = ctx.item;
280
+ return [
281
+ item.id,
282
+ item.author,
283
+ item.content ?? '',
284
+ item.date ?? '',
285
+ item.edited ? 1 : 0,
286
+ item.editedAt ?? '',
287
+ ctx.likes,
288
+ ctx.liked ? 1 : 0,
289
+ ctx.replyCount,
290
+ ctx.repliesExpanded ? 1 : 0,
291
+ ].join('|');
292
+ }
293
+ getColor(data) {
294
+ return data.color ?? 'default';
295
+ }
296
+ showEdited(data) {
297
+ return data.edited === true;
298
+ }
299
+ getInitials(data) {
300
+ if (data.initials)
301
+ return data.initials;
302
+ return (data.author || '')
303
+ .split(/\s+/)
304
+ .filter(Boolean)
305
+ .map((part) => part[0])
306
+ .join('')
307
+ .slice(0, 2)
308
+ .toUpperCase();
309
+ }
310
+ handleLike(liked) {
311
+ this.likeChange.emit(liked);
312
+ }
313
+ handleReply(event) {
314
+ this.replyClick.emit(event);
315
+ }
316
+ handleOverflowClick(event) {
317
+ const action = this.findAction(this.itemActions(), event.name) ?? {
318
+ text: event.item?.text ?? event.name ?? '',
319
+ name: event.name,
320
+ data: event.data,
321
+ };
322
+ this.actionClick.emit(action);
323
+ }
324
+ toButtonItems(items) {
325
+ return items.map((item) => ({
326
+ name: item.name ?? item.text,
327
+ text: item.text,
328
+ icon: item.icon ?? '',
329
+ color: item.color,
330
+ disabled: item.disabled,
331
+ divided: item.break,
332
+ items: item.items?.length ? this.toButtonItems(item.items) : undefined,
333
+ }));
334
+ }
335
+ findAction(items, name) {
336
+ if (name == null)
337
+ return undefined;
338
+ for (const item of items) {
339
+ if ((item.name ?? item.text) === name)
340
+ return item;
341
+ const nested = item.items?.length ? this.findAction(item.items, name) : undefined;
342
+ if (nested)
343
+ return nested;
344
+ }
345
+ return undefined;
346
+ }
347
+ /**
348
+ * Toggles the collapse state of the comment replies section.
349
+ */
350
+ toggleReplies() {
351
+ this.setExpanded(!this.expanded());
352
+ }
353
+ /**
354
+ * Expands the nested replies section.
355
+ */
356
+ showReplies() {
357
+ this.setExpanded(true);
358
+ }
359
+ /**
360
+ * Collapses the nested replies section.
361
+ */
362
+ hideReplies() {
363
+ this.setExpanded(false);
364
+ }
365
+ setExpanded(expanded) {
366
+ this.expanded.set(expanded);
367
+ this.repliesExpandedChange.emit(expanded);
368
+ }
369
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
370
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXCommentItemComponent, isStandalone: true, selector: "ax-comment-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, replyCount: { classPropertyName: "replyCount", publicName: "replyCount", isSignal: true, isRequired: false, transformFunction: null }, repliesExpanded: { classPropertyName: "repliesExpanded", publicName: "repliesExpanded", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemContext: { classPropertyName: "itemContext", publicName: "itemContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { repliesExpandedChange: "repliesExpandedChange", likeChange: "likeChange", replyClick: "replyClick", actionClick: "actionClick" }, host: { properties: { "class.ax-comment-item-reply": "isReply", "class.ax-comment-item-custom": "!!itemTemplate()" } }, providers: [{ provide: AXComponent, useExisting: AXCommentItemComponent }], queries: [{ propertyName: "projectedAvatar", first: true, predicate: AXAvatarComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "viewAvatar", first: true, predicate: AXAvatarComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-comment-layout\">\n @if (showDefaultDataLayout()) {\n @if (item(); as data) {\n <ax-avatar [color]=\"getColor(data)\" [size]=\"avatarSize\" look=\"twotone\" shape=\"rounded\">\n @if (data.avatar) {\n <ax-image [src]=\"data.avatar\"></ax-image>\n } @else {\n <ax-text>{{ getInitials(data) }}</ax-text>\n }\n </ax-avatar>\n }\n }\n <ng-content select=\"ax-avatar\" />\n\n <div class=\"ax-comment-main\">\n @if (itemTemplate(); as tpl) {\n @for (ctx of templateContexts(); track templateContextKey(ctx)) {\n <div class=\"ax-comment-custom-body\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"ctx\" />\n </div>\n }\n } @else if (showDefaultDataLayout()) {\n @if (item(); as data) {\n <div class=\"ax-comment-header\">\n <div class=\"ax-comment-header-meta\">\n <ax-title>{{ data.author }}</ax-title>\n @if (data.isYou) {\n <ax-badge\n class=\"ax-sm ax-pill ax-comment-you-badge\"\n look=\"twotone\"\n color=\"primary\"\n [text]=\"('@acorex:comment.you' | translate | async) ?? 'You'\"\n ></ax-badge>\n }\n @if (showEdited(data)) {\n <ax-comment-edited [editedAt]=\"data.editedAt\" />\n }\n @if (data.date) {\n <ax-comment-date>{{ data.date }}</ax-comment-date>\n }\n </div>\n @if (showOverflowMenu()) {\n <ax-dropdown-button\n class=\"ax-sm ax-comment-menu-trigger\"\n mode=\"dropdown\"\n look=\"blank\"\n [iconOnly]=\"true\"\n text=\"More\"\n >\n <ax-prefix>\n <ax-icon icon=\"ax-icon ax-icon-more-horizontal\"></ax-icon>\n </ax-prefix>\n <ax-button-item-list [items]=\"overflowItems()\" (onItemClick)=\"handleOverflowClick($event)\">\n </ax-button-item-list>\n </ax-dropdown-button>\n }\n </div>\n <div class=\"ax-comment-body\">\n <ax-content>\n <div [innerHTML]=\"data.content\"></div>\n </ax-content>\n </div>\n }\n }\n\n <div class=\"ax-comment-default\" [hidden]=\"!useProjectedSlots()\">\n <div class=\"ax-comment-header\">\n <div class=\"ax-comment-header-meta\">\n <ng-content select=\"ax-title\" />\n <ng-content select=\"ax-subtitle\" />\n <ng-content select=\"ax-badge\" />\n <ng-content select=\"ax-comment-edited\" />\n <ng-content select=\"ax-comment-date\" />\n </div>\n <ng-content select=\"ax-comment-menu-options\" />\n </div>\n <div class=\"ax-comment-body\">\n <ng-content select=\"ax-content\" />\n </div>\n </div>\n\n <div class=\"ax-comment-actions\">\n @if (item(); as data) {\n <ax-comment-like [like]=\"!!data.liked\" (likeChange)=\"handleLike($event)\">\n {{ data.likes ?? 0 }}\n </ax-comment-like>\n <ax-comment-reply-text (click)=\"handleReply($event)\"></ax-comment-reply-text>\n }\n <ng-content select=\"ax-comment-like\" />\n <ng-content select=\"ax-comment-reply-text\" />\n @if (replyCount()) {\n <button\n type=\"button\"\n class=\"ax-comment-replies-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-busy]=\"loading()\"\n [disabled]=\"loading()\"\n (click)=\"toggleReplies()\"\n >\n <ax-icon\n [icon]=\"\n loading()\n ? 'ax-icon ax-icon-reload'\n : expanded()\n ? 'ax-icon ax-icon-chevron-up'\n : 'ax-icon ax-icon-chevron-down'\n \"\n [class.ax-comment-loading-icon]=\"loading()\"\n ></ax-icon>\n <span>\n {{ replyCount() }}\n {{ ((replyCount() ?? 0) > 1 ? '@acorex:comment.replies' : '@acorex:comment.reply') | translate | async }}\n </span>\n </button>\n }\n </div>\n\n <div class=\"ax-comment-replies\" [hidden]=\"!(replyCount() && expanded())\">\n @if (loading()) {\n <div class=\"ax-comment-replies-loading\">\n <ax-icon icon=\"ax-icon ax-icon-reload\" class=\"ax-comment-loading-icon\"></ax-icon>\n </div>\n }\n <ng-content select=\"ax-comment-item\" />\n <ng-content select=\"ax-comment-reply-more\" />\n <ng-content />\n </div>\n </div>\n</div>\n", styles: ["@layer properties;@layer components{ax-comment-item{display:block;transition-property:background-color;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .7s;transition-duration:.7s;--tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));transition-timing-function:var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));padding-block:var(--ax-comp-comment-padding-y, 12px)}ax-comment-item.ax-state-highlight{background-color:color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 8%,transparent);border-radius:8px}@supports (color: color-mix(in lab,red,red)){ax-comment-item.ax-state-highlight{background-color:color-mix(in srgb,var(--color-primary) 8%,transparent)}}ax-comment-item .ax-comment-layout{display:flex;min-width:calc(var(--spacing, .25rem) * 0);align-items:flex-start;gap:var(--ax-comp-comment-gap, .5rem)}ax-comment-item .ax-comment-layout>ax-avatar{flex-shrink:0}ax-comment-item .ax-comment-main{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column}ax-comment-item .ax-comment-default[hidden]{display:none}ax-comment-item .ax-comment-header{display:flex;min-width:calc(var(--spacing, .25rem) * 0);align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-custom-body{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}ax-comment-item .ax-comment-menu-trigger{flex-shrink:0}@media(hover:hover){ax-comment-item .ax-comment-menu-trigger{opacity:0%;transition:opacity .15s ease}ax-comment-item .ax-comment-layout:has(>ax-avatar:hover)>.ax-comment-main>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-main:has(>.ax-comment-header:hover)>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-main:has(>.ax-comment-body:hover)>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-main:has(>.ax-comment-actions:hover)>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-header:focus-within>.ax-comment-menu-trigger{opacity:100%}}ax-comment-item .ax-comment-header-meta{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex-wrap:wrap;align-items:center}ax-comment-item ax-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface))}ax-comment-item ax-subtitle{margin-inline-start:calc(var(--spacing, .25rem) * 1.5);font-size:11px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-item ax-subtitle{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 55%,transparent)}}ax-comment-item .ax-comment-you-badge{margin-inline-start:calc(var(--spacing, .25rem) * 1.5);flex-shrink:0}ax-comment-item .ax-comment-body{margin-top:calc(var(--spacing, .25rem) * 1)}ax-comment-item ax-content{display:block;font-size:13.5px;overflow-wrap:break-word;color:rgba(var(--ax-sys-color-on-surface));line-height:1.6}ax-comment-item ax-content a,ax-comment-item ax-content .ax-mention{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface));text-decoration-line:none}ax-comment-item ax-content a:hover,ax-comment-item ax-content .ax-mention:hover{text-decoration-line:underline}ax-comment-item ax-content ul,ax-comment-item ax-content ol{margin-top:calc(var(--spacing, .25rem) * 1);margin-bottom:calc(var(--spacing, .25rem) * 0);padding-inline-start:calc(var(--spacing, .25rem) * 5)}ax-comment-item ax-content li{margin-block:calc(var(--spacing, .25rem) * .5)}ax-comment-item ax-content p{margin:calc(var(--spacing, .25rem) * 0)}ax-comment-item .ax-comment-actions{margin-top:calc(var(--spacing, .25rem) * 1);display:flex;min-height:calc(var(--spacing, .25rem) * 7);flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 5)}ax-comment-item ax-comment-like,ax-comment-item ax-comment-reply-text,ax-comment-item .ax-comment-replies-toggle{-webkit-user-select:none;user-select:none}ax-comment-item .ax-comment-replies-toggle{display:inline-flex;min-height:calc(var(--spacing, .25rem) * 7);cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);font-size:12.5px;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item .ax-comment-replies-toggle ax-icon{font-size:11px;--tw-leading: 1;line-height:1}ax-comment-item .ax-comment-replies-toggle:hover:not(:disabled){text-decoration-line:underline}ax-comment-item .ax-comment-replies-toggle:disabled{cursor:wait;opacity:70%}ax-comment-item .ax-comment-replies-toggle:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}ax-comment-item .ax-comment-loading-icon{animation:var(--animate-spin, spin 1s linear infinite)}ax-comment-item .ax-comment-replies-loading{display:flex;min-height:calc(var(--spacing, .25rem) * 8);align-items:center;padding-block:calc(var(--spacing, .25rem) * 1);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-item .ax-comment-replies-loading{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 40%,transparent)}}ax-comment-item .ax-comment-replies{margin-top:calc(var(--spacing, .25rem) * 3);display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column}ax-comment-item .ax-comment-replies[hidden]{display:none}ax-comment-item ax-comment-reply-more{margin-top:calc(var(--spacing, .25rem) * 1);cursor:pointer;font-size:12.5px;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item ax-comment-reply-more:hover{text-decoration-line:underline}ax-comment-item ax-comment-menu-options{margin-inline-end:calc(var(--spacing, .25rem) * -1);margin-top:calc(var(--spacing, .25rem) * -1);flex-shrink:0}ax-comment-item.ax-comment-item-reply{padding-block:10px}ax-comment-item.ax-comment-item-custom .ax-comment-actions{margin-top:calc(var(--spacing, .25rem) * 2)}ax-comment-item.ax-comment-item-custom .ax-comment-replies{margin-inline-start:.5rem;padding-inline-start:1.25rem;border-inline-start:2px solid color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 35%,transparent)}@supports (color: color-mix(in lab,red,red)){ax-comment-item.ax-comment-item-custom .ax-comment-replies{border-inline-start:2px solid color-mix(in srgb,var(--color-primary) 35%,transparent)}}ax-comment-item.ax-comment-item-custom.ax-comment-item-reply{padding-block:8px}}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-ease{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "shape", "look"], outputs: ["sizeChange"] }, { kind: "component", type: AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: AXImageComponent, selector: "ax-image", inputs: ["width", "height", "overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "component", type: AXCommentDateComponent, selector: "ax-comment-date" }, { kind: "component", type: AXCommentEditedComponent, selector: "ax-comment-edited", inputs: ["editedAt"] }, { kind: "component", type: AXCommentLikeComponent, selector: "ax-comment-like", inputs: ["like"], outputs: ["likeChange"] }, { kind: "component", type: AXCommentReplyTextComponent, selector: "ax-comment-reply-text" }, { kind: "component", type: AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "text", "selected", "color", "look", "type", "mode", "iconOnly"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "component", type: AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
371
+ }
372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentItemComponent, decorators: [{
373
+ type: Component,
374
+ args: [{ selector: 'ax-comment-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
375
+ AXTranslatorPipe,
376
+ AsyncPipe,
377
+ AXDecoratorIconComponent,
378
+ AXDecoratorGenericComponent,
379
+ NgTemplateOutlet,
380
+ AXAvatarComponent,
381
+ AXBadgeComponent,
382
+ AXImageComponent,
383
+ AXCommentDateComponent,
384
+ AXCommentEditedComponent,
385
+ AXCommentLikeComponent,
386
+ AXCommentReplyTextComponent,
387
+ AXDropdownButtonComponent,
388
+ AXButtonItemListComponent,
389
+ ], providers: [{ provide: AXComponent, useExisting: AXCommentItemComponent }], host: {
390
+ '[class.ax-comment-item-reply]': 'isReply',
391
+ '[class.ax-comment-item-custom]': '!!itemTemplate()',
392
+ }, template: "<div class=\"ax-comment-layout\">\n @if (showDefaultDataLayout()) {\n @if (item(); as data) {\n <ax-avatar [color]=\"getColor(data)\" [size]=\"avatarSize\" look=\"twotone\" shape=\"rounded\">\n @if (data.avatar) {\n <ax-image [src]=\"data.avatar\"></ax-image>\n } @else {\n <ax-text>{{ getInitials(data) }}</ax-text>\n }\n </ax-avatar>\n }\n }\n <ng-content select=\"ax-avatar\" />\n\n <div class=\"ax-comment-main\">\n @if (itemTemplate(); as tpl) {\n @for (ctx of templateContexts(); track templateContextKey(ctx)) {\n <div class=\"ax-comment-custom-body\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"ctx\" />\n </div>\n }\n } @else if (showDefaultDataLayout()) {\n @if (item(); as data) {\n <div class=\"ax-comment-header\">\n <div class=\"ax-comment-header-meta\">\n <ax-title>{{ data.author }}</ax-title>\n @if (data.isYou) {\n <ax-badge\n class=\"ax-sm ax-pill ax-comment-you-badge\"\n look=\"twotone\"\n color=\"primary\"\n [text]=\"('@acorex:comment.you' | translate | async) ?? 'You'\"\n ></ax-badge>\n }\n @if (showEdited(data)) {\n <ax-comment-edited [editedAt]=\"data.editedAt\" />\n }\n @if (data.date) {\n <ax-comment-date>{{ data.date }}</ax-comment-date>\n }\n </div>\n @if (showOverflowMenu()) {\n <ax-dropdown-button\n class=\"ax-sm ax-comment-menu-trigger\"\n mode=\"dropdown\"\n look=\"blank\"\n [iconOnly]=\"true\"\n text=\"More\"\n >\n <ax-prefix>\n <ax-icon icon=\"ax-icon ax-icon-more-horizontal\"></ax-icon>\n </ax-prefix>\n <ax-button-item-list [items]=\"overflowItems()\" (onItemClick)=\"handleOverflowClick($event)\">\n </ax-button-item-list>\n </ax-dropdown-button>\n }\n </div>\n <div class=\"ax-comment-body\">\n <ax-content>\n <div [innerHTML]=\"data.content\"></div>\n </ax-content>\n </div>\n }\n }\n\n <div class=\"ax-comment-default\" [hidden]=\"!useProjectedSlots()\">\n <div class=\"ax-comment-header\">\n <div class=\"ax-comment-header-meta\">\n <ng-content select=\"ax-title\" />\n <ng-content select=\"ax-subtitle\" />\n <ng-content select=\"ax-badge\" />\n <ng-content select=\"ax-comment-edited\" />\n <ng-content select=\"ax-comment-date\" />\n </div>\n <ng-content select=\"ax-comment-menu-options\" />\n </div>\n <div class=\"ax-comment-body\">\n <ng-content select=\"ax-content\" />\n </div>\n </div>\n\n <div class=\"ax-comment-actions\">\n @if (item(); as data) {\n <ax-comment-like [like]=\"!!data.liked\" (likeChange)=\"handleLike($event)\">\n {{ data.likes ?? 0 }}\n </ax-comment-like>\n <ax-comment-reply-text (click)=\"handleReply($event)\"></ax-comment-reply-text>\n }\n <ng-content select=\"ax-comment-like\" />\n <ng-content select=\"ax-comment-reply-text\" />\n @if (replyCount()) {\n <button\n type=\"button\"\n class=\"ax-comment-replies-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-busy]=\"loading()\"\n [disabled]=\"loading()\"\n (click)=\"toggleReplies()\"\n >\n <ax-icon\n [icon]=\"\n loading()\n ? 'ax-icon ax-icon-reload'\n : expanded()\n ? 'ax-icon ax-icon-chevron-up'\n : 'ax-icon ax-icon-chevron-down'\n \"\n [class.ax-comment-loading-icon]=\"loading()\"\n ></ax-icon>\n <span>\n {{ replyCount() }}\n {{ ((replyCount() ?? 0) > 1 ? '@acorex:comment.replies' : '@acorex:comment.reply') | translate | async }}\n </span>\n </button>\n }\n </div>\n\n <div class=\"ax-comment-replies\" [hidden]=\"!(replyCount() && expanded())\">\n @if (loading()) {\n <div class=\"ax-comment-replies-loading\">\n <ax-icon icon=\"ax-icon ax-icon-reload\" class=\"ax-comment-loading-icon\"></ax-icon>\n </div>\n }\n <ng-content select=\"ax-comment-item\" />\n <ng-content select=\"ax-comment-reply-more\" />\n <ng-content />\n </div>\n </div>\n</div>\n", styles: ["@layer properties;@layer components{ax-comment-item{display:block;transition-property:background-color;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .7s;transition-duration:.7s;--tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));transition-timing-function:var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));padding-block:var(--ax-comp-comment-padding-y, 12px)}ax-comment-item.ax-state-highlight{background-color:color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 8%,transparent);border-radius:8px}@supports (color: color-mix(in lab,red,red)){ax-comment-item.ax-state-highlight{background-color:color-mix(in srgb,var(--color-primary) 8%,transparent)}}ax-comment-item .ax-comment-layout{display:flex;min-width:calc(var(--spacing, .25rem) * 0);align-items:flex-start;gap:var(--ax-comp-comment-gap, .5rem)}ax-comment-item .ax-comment-layout>ax-avatar{flex-shrink:0}ax-comment-item .ax-comment-main{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column}ax-comment-item .ax-comment-default[hidden]{display:none}ax-comment-item .ax-comment-header{display:flex;min-width:calc(var(--spacing, .25rem) * 0);align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}ax-comment-item .ax-comment-custom-body{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}ax-comment-item .ax-comment-menu-trigger{flex-shrink:0}@media(hover:hover){ax-comment-item .ax-comment-menu-trigger{opacity:0%;transition:opacity .15s ease}ax-comment-item .ax-comment-layout:has(>ax-avatar:hover)>.ax-comment-main>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-main:has(>.ax-comment-header:hover)>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-main:has(>.ax-comment-body:hover)>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-main:has(>.ax-comment-actions:hover)>.ax-comment-header>.ax-comment-menu-trigger,ax-comment-item .ax-comment-header:focus-within>.ax-comment-menu-trigger{opacity:100%}}ax-comment-item .ax-comment-header-meta{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex-wrap:wrap;align-items:center}ax-comment-item ax-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface))}ax-comment-item ax-subtitle{margin-inline-start:calc(var(--spacing, .25rem) * 1.5);font-size:11px;--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-item ax-subtitle{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 55%,transparent)}}ax-comment-item .ax-comment-you-badge{margin-inline-start:calc(var(--spacing, .25rem) * 1.5);flex-shrink:0}ax-comment-item .ax-comment-body{margin-top:calc(var(--spacing, .25rem) * 1)}ax-comment-item ax-content{display:block;font-size:13.5px;overflow-wrap:break-word;color:rgba(var(--ax-sys-color-on-surface));line-height:1.6}ax-comment-item ax-content a,ax-comment-item ax-content .ax-mention{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface));text-decoration-line:none}ax-comment-item ax-content a:hover,ax-comment-item ax-content .ax-mention:hover{text-decoration-line:underline}ax-comment-item ax-content ul,ax-comment-item ax-content ol{margin-top:calc(var(--spacing, .25rem) * 1);margin-bottom:calc(var(--spacing, .25rem) * 0);padding-inline-start:calc(var(--spacing, .25rem) * 5)}ax-comment-item ax-content li{margin-block:calc(var(--spacing, .25rem) * .5)}ax-comment-item ax-content p{margin:calc(var(--spacing, .25rem) * 0)}ax-comment-item .ax-comment-actions{margin-top:calc(var(--spacing, .25rem) * 1);display:flex;min-height:calc(var(--spacing, .25rem) * 7);flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 5)}ax-comment-item ax-comment-like,ax-comment-item ax-comment-reply-text,ax-comment-item .ax-comment-replies-toggle{-webkit-user-select:none;user-select:none}ax-comment-item .ax-comment-replies-toggle{display:inline-flex;min-height:calc(var(--spacing, .25rem) * 7);cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 1);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);font-size:12.5px;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item .ax-comment-replies-toggle ax-icon{font-size:11px;--tw-leading: 1;line-height:1}ax-comment-item .ax-comment-replies-toggle:hover:not(:disabled){text-decoration-line:underline}ax-comment-item .ax-comment-replies-toggle:disabled{cursor:wait;opacity:70%}ax-comment-item .ax-comment-replies-toggle:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}ax-comment-item .ax-comment-loading-icon{animation:var(--animate-spin, spin 1s linear infinite)}ax-comment-item .ax-comment-replies-loading{display:flex;min-height:calc(var(--spacing, .25rem) * 8);align-items:center;padding-block:calc(var(--spacing, .25rem) * 1);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-comment-item .ax-comment-replies-loading{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 40%,transparent)}}ax-comment-item .ax-comment-replies{margin-top:calc(var(--spacing, .25rem) * 3);display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column}ax-comment-item .ax-comment-replies[hidden]{display:none}ax-comment-item ax-comment-reply-more{margin-top:calc(var(--spacing, .25rem) * 1);cursor:pointer;font-size:12.5px;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item ax-comment-reply-more:hover{text-decoration-line:underline}ax-comment-item ax-comment-menu-options{margin-inline-end:calc(var(--spacing, .25rem) * -1);margin-top:calc(var(--spacing, .25rem) * -1);flex-shrink:0}ax-comment-item.ax-comment-item-reply{padding-block:10px}ax-comment-item.ax-comment-item-custom .ax-comment-actions{margin-top:calc(var(--spacing, .25rem) * 2)}ax-comment-item.ax-comment-item-custom .ax-comment-replies{margin-inline-start:.5rem;padding-inline-start:1.25rem;border-inline-start:2px solid color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 35%,transparent)}@supports (color: color-mix(in lab,red,red)){ax-comment-item.ax-comment-item-custom .ax-comment-replies{border-inline-start:2px solid color-mix(in srgb,var(--color-primary) 35%,transparent)}}ax-comment-item.ax-comment-item-custom.ax-comment-item-reply{padding-block:8px}}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-ease{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
393
+ }], ctorParameters: () => [], propDecorators: { projectedAvatar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXAvatarComponent), { isSignal: true }] }], viewAvatar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXAvatarComponent), { isSignal: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], replyCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "replyCount", required: false }] }], repliesExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "repliesExpanded", required: false }] }], repliesExpandedChange: [{ type: i0.Output, args: ["repliesExpandedChange"] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], itemContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemContext", required: false }] }], likeChange: [{ type: i0.Output, args: ["likeChange"] }], replyClick: [{ type: i0.Output, args: ["replyClick"] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }] } });
114
394
 
115
395
  /**
116
396
  * A component for displaying and managing menu options on a comment.
@@ -119,7 +399,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
119
399
  */
120
400
  class AXMenuOptionsComponent {
121
401
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXMenuOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
122
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXMenuOptionsComponent, isStandalone: true, selector: "ax-comment-menu-options", providers: [{ provide: AXComponent, useExisting: AXMenuOptionsComponent }], ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
402
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXMenuOptionsComponent, isStandalone: true, selector: "ax-comment-menu-options", providers: [{ provide: AXComponent, useExisting: AXMenuOptionsComponent }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
123
403
  }
124
404
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXMenuOptionsComponent, decorators: [{
125
405
  type: Component,
@@ -127,10 +407,163 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
127
407
  selector: 'ax-comment-menu-options',
128
408
  template: '<ng-content />',
129
409
  encapsulation: ViewEncapsulation.None,
410
+ changeDetection: ChangeDetectionStrategy.OnPush,
130
411
  providers: [{ provide: AXComponent, useExisting: AXMenuOptionsComponent }],
131
412
  }]
132
413
  }] });
133
414
 
415
+ /**
416
+ * Composer chrome shown while writing a reply. Projects the editor below a
417
+ * compact reply-context bar; hide the bar by leaving `item` empty.
418
+ *
419
+ * @category Components
420
+ */
421
+ class AXCommentReplyComponent {
422
+ constructor() {
423
+ this.document = inject(DOCUMENT);
424
+ this.platformId = inject(PLATFORM_ID);
425
+ this.destroyRef = inject(DestroyRef);
426
+ this.highlightTimer = null;
427
+ /** Comment currently being replied to. When null, only the projected composer is shown. */
428
+ this.item = input(null, /* @ts-ignore */
429
+ ...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
430
+ /** Emitted when the close control on the reply banner is clicked. */
431
+ this.onClose = output();
432
+ /** Emitted when the banner is clicked to jump to the target comment. */
433
+ this.onTargetClick = output();
434
+ this.preview = computed(() => this.toPreview(this.item()?.content), /* @ts-ignore */
435
+ ...(ngDevMode ? [{ debugName: "preview" }] : /* istanbul ignore next */ []));
436
+ this.destroyRef.onDestroy(() => {
437
+ if (this.highlightTimer)
438
+ clearTimeout(this.highlightTimer);
439
+ });
440
+ }
441
+ close() {
442
+ this.onClose.emit();
443
+ }
444
+ revealTarget() {
445
+ const item = this.item();
446
+ if (!item)
447
+ return;
448
+ const id = String(item.id);
449
+ this.onTargetClick.emit(id);
450
+ this.scrollToComment(id);
451
+ }
452
+ scrollToComment(id) {
453
+ if (!isPlatformBrowser(this.platformId))
454
+ return;
455
+ const el = this.document.querySelector(`ax-comment-item[id="${id}"]`) ??
456
+ this.document.querySelector(`ax-comment-item[id="comment-${id}"]`);
457
+ if (!el)
458
+ return;
459
+ el.scrollIntoView({ behavior: 'smooth', block: 'center' });
460
+ el.classList.add('ax-state-highlight');
461
+ if (this.highlightTimer)
462
+ clearTimeout(this.highlightTimer);
463
+ this.highlightTimer = setTimeout(() => {
464
+ el.classList.remove('ax-state-highlight');
465
+ this.highlightTimer = null;
466
+ }, 1500);
467
+ }
468
+ toPreview(content) {
469
+ return String(content ?? '')
470
+ .replace(/<[^>]+>/g, ' ')
471
+ .replace(/&nbsp;|&#160;/gi, ' ')
472
+ .replace(/&amp;/gi, '&')
473
+ .replace(/&lt;/gi, '<')
474
+ .replace(/&gt;/gi, '>')
475
+ .replace(/&quot;/gi, '"')
476
+ .replace(/&#39;|&apos;/gi, "'")
477
+ .replace(/\s+/g, ' ')
478
+ .trim();
479
+ }
480
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
481
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXCommentReplyComponent, isStandalone: true, selector: "ax-comment-reply", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClose: "onClose", onTargetClick: "onTargetClick" }, host: { properties: { "class.ax-comment-reply-open": "!!item()" }, classAttribute: "ax-comment-reply" }, providers: [{ provide: AXComponent, useExisting: AXCommentReplyComponent }], ngImport: i0, template: `
482
+ @if (item(); as target) {
483
+ <div class="ax-comment-reply-banner">
484
+ <button type="button" class="ax-comment-reply-target" (click)="revealTarget()">
485
+ <ax-icon
486
+ class="ax-comment-reply-lead-icon"
487
+ icon="ax-icon ax-icon-arrow-turn-left"
488
+ aria-hidden="true"
489
+ ></ax-icon>
490
+ <span class="ax-comment-reply-copy">
491
+ <span class="ax-comment-reply-label">
492
+ {{ '@acorex:comment.replying-to' | translate | async }}
493
+ <span class="ax-comment-reply-author">
494
+ @if (target.isYou) {
495
+ {{ '@acorex:comment.you' | translate | async }}
496
+ } @else {
497
+ {{ target.author }}
498
+ }
499
+ </span>
500
+ </span>
501
+ @if (preview(); as excerpt) {
502
+ <span class="ax-comment-reply-preview" [title]="excerpt">{{ excerpt }}</span>
503
+ }
504
+ </span>
505
+ </button>
506
+ <button
507
+ type="button"
508
+ class="ax-comment-reply-close"
509
+ [attr.aria-label]="'@acorex:common.general.close' | translate | async"
510
+ (click)="close()"
511
+ >
512
+ <ax-icon icon="ax-icon ax-icon-close" aria-hidden="true"></ax-icon>
513
+ </button>
514
+ </div>
515
+ }
516
+ <div class="ax-comment-reply-composer">
517
+ <ng-content />
518
+ </div>
519
+ `, isInline: true, styles: ["@layer properties;@layer components{ax-comment-reply{--ax-comp-comment-reply-bar-bg-color: var(--color-primary-lightest);--ax-comp-comment-reply-bar-border-color: var(--color-primary-lighter);--ax-comp-comment-reply-bar-accent-color: var(--color-primary);--ax-comp-comment-reply-bar-radius: 6px;--ax-comp-comment-reply-bar-gap: 8px;display:flex;width:100%;min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;gap:var(--ax-comp-comment-reply-bar-gap)}.ax-comment-reply-banner{display:flex;min-width:calc(var(--spacing, .25rem) * 0);align-items:flex-start;gap:calc(var(--spacing, .25rem) * 2);padding:8px 12px;border-radius:var(--ax-comp-comment-reply-bar-radius);background:var(--ax-comp-comment-reply-bar-bg-color);border:1px solid var(--ax-comp-comment-reply-bar-border-color);border-inline-start-width:2px;border-inline-start-color:var(--ax-comp-comment-reply-bar-accent-color)}.ax-comment-reply-target{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;cursor:pointer;align-items:flex-start;gap:calc(var(--spacing, .25rem) * 2);overflow:hidden;border-radius:var(--radius-sm, .25rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);text-align:start}.ax-comment-reply-target:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}.ax-comment-reply-lead-icon{margin-top:calc(var(--spacing, .25rem) * .5);flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: 1;line-height:1;color:rgba(var(--ax-sys-color-primary-surface))}.ax-comment-reply-copy{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}.ax-comment-reply-label{flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-label{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 70%,transparent)}}.ax-comment-reply-author{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface))}.ax-comment-reply-preview{min-width:calc(var(--spacing, .25rem) * 0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-preview{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}.ax-comment-reply-close{display:inline-flex;width:calc(var(--spacing, .25rem) * 7);height:calc(var(--spacing, .25rem) * 7);flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;align-self:flex-start;border-radius:var(--radius-sm, .25rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-close{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 45%,transparent)}}.ax-comment-reply-close ax-icon{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: 1;line-height:1}.ax-comment-reply-close:hover{color:rgba(var(--ax-sys-color-on-surface));background:color-mix(in srgb,rgba(var(--ax-sys-color-on-surface)) 6%,transparent)}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-close:hover{background:color-mix(in srgb,var(--color-on-surface) 6%,transparent)}}.ax-comment-reply-close:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}.ax-comment-reply-composer{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
520
+ }
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyComponent, decorators: [{
522
+ type: Component,
523
+ args: [{ selector: 'ax-comment-reply', template: `
524
+ @if (item(); as target) {
525
+ <div class="ax-comment-reply-banner">
526
+ <button type="button" class="ax-comment-reply-target" (click)="revealTarget()">
527
+ <ax-icon
528
+ class="ax-comment-reply-lead-icon"
529
+ icon="ax-icon ax-icon-arrow-turn-left"
530
+ aria-hidden="true"
531
+ ></ax-icon>
532
+ <span class="ax-comment-reply-copy">
533
+ <span class="ax-comment-reply-label">
534
+ {{ '@acorex:comment.replying-to' | translate | async }}
535
+ <span class="ax-comment-reply-author">
536
+ @if (target.isYou) {
537
+ {{ '@acorex:comment.you' | translate | async }}
538
+ } @else {
539
+ {{ target.author }}
540
+ }
541
+ </span>
542
+ </span>
543
+ @if (preview(); as excerpt) {
544
+ <span class="ax-comment-reply-preview" [title]="excerpt">{{ excerpt }}</span>
545
+ }
546
+ </span>
547
+ </button>
548
+ <button
549
+ type="button"
550
+ class="ax-comment-reply-close"
551
+ [attr.aria-label]="'@acorex:common.general.close' | translate | async"
552
+ (click)="close()"
553
+ >
554
+ <ax-icon icon="ax-icon ax-icon-close" aria-hidden="true"></ax-icon>
555
+ </button>
556
+ </div>
557
+ }
558
+ <div class="ax-comment-reply-composer">
559
+ <ng-content />
560
+ </div>
561
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorIconComponent, AXTranslatorPipe, AsyncPipe], providers: [{ provide: AXComponent, useExisting: AXCommentReplyComponent }], host: {
562
+ class: 'ax-comment-reply',
563
+ '[class.ax-comment-reply-open]': '!!item()',
564
+ }, styles: ["@layer properties;@layer components{ax-comment-reply{--ax-comp-comment-reply-bar-bg-color: var(--color-primary-lightest);--ax-comp-comment-reply-bar-border-color: var(--color-primary-lighter);--ax-comp-comment-reply-bar-accent-color: var(--color-primary);--ax-comp-comment-reply-bar-radius: 6px;--ax-comp-comment-reply-bar-gap: 8px;display:flex;width:100%;min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;gap:var(--ax-comp-comment-reply-bar-gap)}.ax-comment-reply-banner{display:flex;min-width:calc(var(--spacing, .25rem) * 0);align-items:flex-start;gap:calc(var(--spacing, .25rem) * 2);padding:8px 12px;border-radius:var(--ax-comp-comment-reply-bar-radius);background:var(--ax-comp-comment-reply-bar-bg-color);border:1px solid var(--ax-comp-comment-reply-bar-border-color);border-inline-start-width:2px;border-inline-start-color:var(--ax-comp-comment-reply-bar-accent-color)}.ax-comment-reply-target{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;cursor:pointer;align-items:flex-start;gap:calc(var(--spacing, .25rem) * 2);overflow:hidden;border-radius:var(--radius-sm, .25rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);text-align:start}.ax-comment-reply-target:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}.ax-comment-reply-lead-icon{margin-top:calc(var(--spacing, .25rem) * .5);flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: 1;line-height:1;color:rgba(var(--ax-sys-color-primary-surface))}.ax-comment-reply-copy{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}.ax-comment-reply-label{flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-label{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 70%,transparent)}}.ax-comment-reply-author{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgba(var(--ax-sys-color-on-surface))}.ax-comment-reply-preview{min-width:calc(var(--spacing, .25rem) * 0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-preview{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}.ax-comment-reply-close{display:inline-flex;width:calc(var(--spacing, .25rem) * 7);height:calc(var(--spacing, .25rem) * 7);flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;align-self:flex-start;border-radius:var(--radius-sm, .25rem);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-close{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 45%,transparent)}}.ax-comment-reply-close ax-icon{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: 1;line-height:1}.ax-comment-reply-close:hover{color:rgba(var(--ax-sys-color-on-surface));background:color-mix(in srgb,rgba(var(--ax-sys-color-on-surface)) 6%,transparent)}@supports (color: color-mix(in lab,red,red)){.ax-comment-reply-close:hover{background:color-mix(in srgb,var(--color-on-surface) 6%,transparent)}}.ax-comment-reply-close:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color: rgba(var(--ax-sys-color-primary-surface));--tw-ring-offset-width: 2px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style: none;outline-style:none}.ax-comment-reply-composer{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
565
+ }], ctorParameters: () => [], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], onClose: [{ type: i0.Output, args: ["onClose"] }], onTargetClick: [{ type: i0.Output, args: ["onTargetClick"] }] } });
566
+
134
567
  /**
135
568
  * A component for displaying "show more replies" action on a comment.
136
569
  *
@@ -138,7 +571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
138
571
  */
139
572
  class AXCommentReplyMoreComponent {
140
573
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentReplyMoreComponent, isStandalone: true, selector: "ax-comment-reply-more", providers: [{ provide: AXComponent, useExisting: AXCommentReplyMoreComponent }], ngImport: i0, template: '<ax-text><ng-content /></ax-text>', isInline: true, dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }], encapsulation: i0.ViewEncapsulation.None }); }
574
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentReplyMoreComponent, isStandalone: true, selector: "ax-comment-reply-more", providers: [{ provide: AXComponent, useExisting: AXCommentReplyMoreComponent }], ngImport: i0, template: '<ax-text><ng-content /></ax-text>', isInline: true, dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
142
575
  }
143
576
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyMoreComponent, decorators: [{
144
577
  type: Component,
@@ -146,44 +579,423 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
146
579
  selector: 'ax-comment-reply-more',
147
580
  template: '<ax-text><ng-content /></ax-text>',
148
581
  encapsulation: ViewEncapsulation.None,
582
+ changeDetection: ChangeDetectionStrategy.OnPush,
149
583
  imports: [AXDecoratorGenericComponent],
150
584
  providers: [{ provide: AXComponent, useExisting: AXCommentReplyMoreComponent }],
151
585
  }]
152
586
  }] });
153
587
 
588
+ const AX_COMMENT_THREAD_HOST = new InjectionToken('AX_COMMENT_THREAD_HOST');
589
+
154
590
  /**
155
- * A component for displaying the reply action text on a comment.
591
+ * Renders one level of the comment tree.
592
+ * A real component input (instead of `ngTemplateOutlet`) so OnPush checks this
593
+ * level again whenever the parent replaces the items array.
156
594
  *
157
595
  * @category Components
158
596
  */
159
- class AXCommentReplyTextComponent {
160
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
161
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentReplyTextComponent, isStandalone: true, selector: "ax-comment-reply-text", providers: [{ provide: AXComponent, useExisting: AXCommentReplyTextComponent }], ngImport: i0, template: `<ax-text>{{ '@acorex:comment.reply' | translate | async }}</ax-text>`, isInline: true, dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
597
+ class AXCommentThreadComponent {
598
+ constructor() {
599
+ this.host = inject(AX_COMMENT_THREAD_HOST);
600
+ this.items = input.required(/* @ts-ignore */
601
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
602
+ this.level = input(0, /* @ts-ignore */
603
+ ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
604
+ this.itemTemplate = input(null, /* @ts-ignore */
605
+ ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
606
+ }
607
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentThreadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
608
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXCommentThreadComponent, isStandalone: true, selector: "ax-comment-thread", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: "@for (item of items(); track host.trackItem(item)) {\n <ax-comment-item\n [attr.id]=\"'comment-' + host.getId(item)\"\n [item]=\"item\"\n [replyCount]=\"host.getReplyCount(item)\"\n [repliesExpanded]=\"host.isExpanded(item)\"\n [loading]=\"host.isItemLoading(item)\"\n [itemTemplate]=\"itemTemplate()\"\n [itemContext]=\"itemTemplate() ? host.getTemplateContext(item, level()) : null\"\n (repliesExpandedChange)=\"host.onRepliesExpandedChange(item, $event)\"\n (likeChange)=\"host.toggleLike(item, $event)\"\n (replyClick)=\"host.replyTo(item, $event)\"\n (actionClick)=\"host.emitAction(item, $event)\"\n >\n <ax-comment-thread [items]=\"host.getReplies(item)\" [level]=\"level() + 1\" [itemTemplate]=\"itemTemplate()\" />\n </ax-comment-item>\n}\n", dependencies: [{ kind: "component", type: AXCommentThreadComponent, selector: "ax-comment-thread", inputs: ["items", "level", "itemTemplate"] }, { kind: "component", type: AXCommentItemComponent, selector: "ax-comment-item", inputs: ["item", "replyCount", "repliesExpanded", "loading", "itemTemplate", "itemContext"], outputs: ["repliesExpandedChange", "likeChange", "replyClick", "actionClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
162
609
  }
163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentReplyTextComponent, decorators: [{
610
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentThreadComponent, decorators: [{
164
611
  type: Component,
165
- args: [{
166
- selector: 'ax-comment-reply-text',
167
- template: `<ax-text>{{ '@acorex:comment.reply' | translate | async }}</ax-text>`,
168
- encapsulation: ViewEncapsulation.None,
169
- imports: [AXDecoratorGenericComponent, AXTranslatorPipe, AsyncPipe],
170
- providers: [{ provide: AXComponent, useExisting: AXCommentReplyTextComponent }],
171
- }]
172
- }] });
612
+ args: [{ selector: 'ax-comment-thread', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXCommentItemComponent, AXCommentThreadComponent], host: {
613
+ style: 'display: contents',
614
+ }, template: "@for (item of items(); track host.trackItem(item)) {\n <ax-comment-item\n [attr.id]=\"'comment-' + host.getId(item)\"\n [item]=\"item\"\n [replyCount]=\"host.getReplyCount(item)\"\n [repliesExpanded]=\"host.isExpanded(item)\"\n [loading]=\"host.isItemLoading(item)\"\n [itemTemplate]=\"itemTemplate()\"\n [itemContext]=\"itemTemplate() ? host.getTemplateContext(item, level()) : null\"\n (repliesExpandedChange)=\"host.onRepliesExpandedChange(item, $event)\"\n (likeChange)=\"host.toggleLike(item, $event)\"\n (replyClick)=\"host.replyTo(item, $event)\"\n (actionClick)=\"host.emitAction(item, $event)\"\n >\n <ax-comment-thread [items]=\"host.getReplies(item)\" [level]=\"level() + 1\" [itemTemplate]=\"itemTemplate()\" />\n </ax-comment-item>\n}\n" }]
615
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }] } });
173
616
 
174
617
  /**
175
- * A component for viewing comments with their details.
618
+ * Renders a comment thread from a datasource (array or lazy callback).
619
+ * Provide `itemTemplate` or `<ng-template axCommentItem>` to customize item UI;
620
+ * otherwise the built-in layout is used.
176
621
  *
177
622
  * @category Components
178
623
  */
179
624
  class AXCommentViewComponent {
625
+ constructor() {
626
+ /** Comment data — a static array or a lazy-loading function. */
627
+ this.datasource = model(null, /* @ts-ignore */
628
+ ...(ngDevMode ? [{ debugName: "datasource" }] : /* istanbul ignore next */ []));
629
+ /**
630
+ * Custom item template. When omitted, the default comment layout is used.
631
+ * You can also project `<ng-template axCommentItem>`.
632
+ */
633
+ this.itemTemplate = input(/* @ts-ignore */
634
+ ...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
635
+ this.onReply = output();
636
+ this.onLikeChange = output();
637
+ this.onRepliesToggle = output();
638
+ this.onAction = output();
639
+ this.projectedItemTemplate = contentChild(AXCommentItemTemplateDirective, /* @ts-ignore */
640
+ ...(ngDevMode ? [{ debugName: "projectedItemTemplate" }] : /* istanbul ignore next */ []));
641
+ this.items = signal([], /* @ts-ignore */
642
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
643
+ this.loadingIds = signal(new Set(), /* @ts-ignore */
644
+ ...(ngDevMode ? [{ debugName: "loadingIds" }] : /* istanbul ignore next */ []));
645
+ this._isLoading = signal(false, /* @ts-ignore */
646
+ ...(ngDevMode ? [{ debugName: "_isLoading" }] : /* istanbul ignore next */ []));
647
+ this.isLoading = this._isLoading.asReadonly();
648
+ this.loadGeneration = 0;
649
+ this.emptyReplies = [];
650
+ this.isLazyDataSource = computed(() => typeof this.datasource() === 'function', /* @ts-ignore */
651
+ ...(ngDevMode ? [{ debugName: "isLazyDataSource" }] : /* istanbul ignore next */ []));
652
+ this.hasDatasource = computed(() => this.datasource() != null, /* @ts-ignore */
653
+ ...(ngDevMode ? [{ debugName: "hasDatasource" }] : /* istanbul ignore next */ []));
654
+ this.resolvedTemplate = computed(() => this.itemTemplate() ?? this.projectedItemTemplate()?.template ?? null, /* @ts-ignore */
655
+ ...(ngDevMode ? [{ debugName: "resolvedTemplate" }] : /* istanbul ignore next */ []));
656
+ effect(() => {
657
+ const ds = this.datasource();
658
+ untracked(() => void this.applyDatasource(ds));
659
+ });
660
+ }
661
+ /**
662
+ * Reloads root comments from the datasource.
663
+ *
664
+ * @returns Promise that resolves when the reload is complete.
665
+ */
666
+ async reloadData() {
667
+ await this.applyDatasource(this.datasource());
668
+ }
669
+ /**
670
+ * Appends a comment to the current root list.
671
+ *
672
+ * @param item - The comment to append.
673
+ * @returns void
674
+ */
675
+ appendItem(item) {
676
+ this.items.update((list) => [...list, item]);
677
+ }
678
+ /**
679
+ * Appends a reply under a loaded comment and expands that thread.
680
+ *
681
+ * @param parentId - The parent comment id.
682
+ * @param item - The reply to append.
683
+ * @returns Promise that resolves when any needed lazy load and the append are complete.
684
+ */
685
+ async appendReply(parentId, item) {
686
+ const parent = this.findItem(parentId);
687
+ if (!parent)
688
+ return;
689
+ if (this.canLazyLoad(parent)) {
690
+ await this.loadReplies(parent);
691
+ }
692
+ parent.replies = [...(parent.replies ?? []), item];
693
+ parent.replyCount = parent.replies.length;
694
+ parent.repliesExpanded = true;
695
+ this.refreshItems();
696
+ }
697
+ /**
698
+ * Finds a comment by id in the loaded tree.
699
+ *
700
+ * @param id - The comment id.
701
+ * @returns The matching item, or null if it is not loaded.
702
+ */
703
+ findItem(id) {
704
+ return this.findInTree(this.items(), id);
705
+ }
706
+ /**
707
+ * Removes a comment from the loaded tree. Nested replies are removed with it.
708
+ *
709
+ * @param id - The comment id.
710
+ * @returns True when the comment was found and removed.
711
+ */
712
+ removeItem(id) {
713
+ const key = String(id);
714
+ const roots = this.items();
715
+ if (roots.some((item) => this.getId(item) === key)) {
716
+ this.items.set(roots.filter((item) => this.getId(item) !== key));
717
+ this.refreshItems();
718
+ return true;
719
+ }
720
+ const parent = this.findParent(roots, key);
721
+ if (!parent?.replies?.length)
722
+ return false;
723
+ const before = parent.replies.length;
724
+ parent.replies = parent.replies.filter((child) => this.getId(child) !== key);
725
+ const removed = before - parent.replies.length;
726
+ if (!removed)
727
+ return false;
728
+ parent.replyCount = Math.max(0, (parent.replyCount ?? before) - removed);
729
+ this.refreshItems();
730
+ return true;
731
+ }
732
+ /**
733
+ * Patches a loaded comment in place.
734
+ *
735
+ * @param id - The comment id.
736
+ * @param patch - Fields to merge onto the existing item. The original id is kept.
737
+ * @returns The updated item, or null if it is not loaded.
738
+ */
739
+ updateItem(id, patch) {
740
+ const key = String(id);
741
+ let updated = null;
742
+ const apply = (items) => {
743
+ const index = items.findIndex((item) => this.getId(item) === key);
744
+ if (index >= 0) {
745
+ const current = items[index];
746
+ if (!current)
747
+ return null;
748
+ const nextItem = { ...current, ...patch, id: current.id };
749
+ updated = nextItem;
750
+ const next = items.slice();
751
+ next[index] = nextItem;
752
+ return next;
753
+ }
754
+ for (let i = 0; i < items.length; i++) {
755
+ const item = items[i];
756
+ if (!item.replies?.length)
757
+ continue;
758
+ const replies = apply(item.replies);
759
+ if (!replies)
760
+ continue;
761
+ const next = items.slice();
762
+ next[i] = { ...item, replies };
763
+ return next;
764
+ }
765
+ return null;
766
+ };
767
+ const next = apply(this.items());
768
+ if (!next || !updated)
769
+ return null;
770
+ this.items.set(next);
771
+ this.refreshItems();
772
+ return updated;
773
+ }
774
+ /**
775
+ * Expands or collapses replies for a comment, loading them when needed.
776
+ *
777
+ * @param id - The comment id.
778
+ * @param expanded - Whether replies should be visible.
779
+ * @returns Promise that resolves when expansion and any lazy load are complete.
780
+ */
781
+ async setExpanded(id, expanded) {
782
+ const item = this.findItem(id);
783
+ if (!item)
784
+ return;
785
+ await this.setItemExpanded(item, expanded);
786
+ }
787
+ getId(item) {
788
+ return String(item.id);
789
+ }
790
+ /**
791
+ * Identity includes the fields the row renders. A same-id edit, like, or reply
792
+ * must refresh the row instead of leaving the previous snapshot on screen.
793
+ */
794
+ trackItem(item) {
795
+ const replies = (item.replies ?? []).map((reply) => this.trackItem(reply)).join(',');
796
+ return [
797
+ this.getId(item),
798
+ item.content ?? '',
799
+ item.likes ?? 0,
800
+ item.liked ? 1 : 0,
801
+ item.edited ? 1 : 0,
802
+ item.editedAt ?? '',
803
+ item.replyCount ?? item.replies?.length ?? 0,
804
+ item.repliesExpanded ? 1 : 0,
805
+ replies,
806
+ ].join(':');
807
+ }
808
+ getReplies(item) {
809
+ return item.replies?.length ? item.replies : this.emptyReplies;
810
+ }
811
+ getReplyCount(item) {
812
+ return item.replyCount ?? item.replies?.length ?? 0;
813
+ }
814
+ isExpanded(item) {
815
+ return !!item.repliesExpanded;
816
+ }
817
+ isItemLoading(item) {
818
+ return this.loadingIds().has(this.getId(item));
819
+ }
820
+ getTemplateContext(item, level) {
821
+ return {
822
+ $implicit: item,
823
+ item,
824
+ level,
825
+ repliesExpanded: this.isExpanded(item),
826
+ replyCount: this.getReplyCount(item),
827
+ loading: this.isItemLoading(item),
828
+ liked: !!item.liked,
829
+ likes: item.likes ?? 0,
830
+ toggleReplies: () => void this.setItemExpanded(item, !this.isExpanded(item)),
831
+ toggleLike: () => this.toggleLike(item),
832
+ reply: (event) => this.replyTo(item, event),
833
+ };
834
+ }
835
+ async onRepliesExpandedChange(item, expanded) {
836
+ await this.setItemExpanded(item, expanded);
837
+ }
838
+ toggleLike(item, liked = !item.liked) {
839
+ const next = liked;
840
+ const current = !!item.liked;
841
+ if (next === current) {
842
+ this.refreshItems();
843
+ return;
844
+ }
845
+ item.liked = next;
846
+ item.likes = Math.max(0, (item.likes ?? 0) + (next ? 1 : -1));
847
+ this.refreshItems();
848
+ this.onLikeChange.emit({
849
+ component: this,
850
+ item,
851
+ liked: next,
852
+ likes: item.likes ?? 0,
853
+ isUserInteraction: true,
854
+ });
855
+ }
856
+ replyTo(item, event) {
857
+ this.onReply.emit({
858
+ component: this,
859
+ item,
860
+ nativeEvent: event,
861
+ isUserInteraction: true,
862
+ });
863
+ }
864
+ emitAction(item, action) {
865
+ this.onAction.emit({
866
+ component: this,
867
+ item,
868
+ action,
869
+ isUserInteraction: true,
870
+ });
871
+ }
872
+ async applyDatasource(ds) {
873
+ if (ds == null) {
874
+ this.items.set([]);
875
+ this._isLoading.set(false);
876
+ return;
877
+ }
878
+ if (Array.isArray(ds)) {
879
+ this.items.set(ds.slice());
880
+ return;
881
+ }
882
+ await this.loadRootItems(ds);
883
+ }
884
+ async loadRootItems(loadFn) {
885
+ const generation = ++this.loadGeneration;
886
+ this._isLoading.set(true);
887
+ try {
888
+ const result = loadFn();
889
+ const roots = result instanceof Promise ? await result : result;
890
+ if (generation !== this.loadGeneration)
891
+ return;
892
+ this.items.set(roots);
893
+ await this.hydrateExpanded(roots);
894
+ }
895
+ catch {
896
+ if (generation !== this.loadGeneration)
897
+ return;
898
+ this.items.set([]);
899
+ }
900
+ finally {
901
+ if (generation === this.loadGeneration) {
902
+ this._isLoading.set(false);
903
+ }
904
+ }
905
+ }
906
+ async hydrateExpanded(items) {
907
+ for (const item of items) {
908
+ if (item.repliesExpanded && this.canLazyLoad(item)) {
909
+ await this.loadReplies(item);
910
+ }
911
+ const replies = this.getReplies(item);
912
+ if (replies.length) {
913
+ await this.hydrateExpanded(replies);
914
+ }
915
+ }
916
+ }
917
+ canLazyLoad(item) {
918
+ return this.isLazyDataSource() && this.getReplyCount(item) > 0 && this.getReplies(item).length === 0;
919
+ }
920
+ async setItemExpanded(item, expanded) {
921
+ item.repliesExpanded = expanded;
922
+ if (expanded && this.canLazyLoad(item)) {
923
+ await this.loadReplies(item);
924
+ }
925
+ this.refreshItems();
926
+ this.onRepliesToggle.emit({
927
+ component: this,
928
+ item,
929
+ expanded,
930
+ isUserInteraction: true,
931
+ });
932
+ }
933
+ async loadReplies(item) {
934
+ const ds = this.datasource();
935
+ if (typeof ds !== 'function')
936
+ return;
937
+ const id = this.getId(item);
938
+ if (this.loadingIds().has(id) || this.getReplies(item).length > 0)
939
+ return;
940
+ this.loadingIds.update((set) => new Set(set).add(id));
941
+ this.refreshItems();
942
+ try {
943
+ const result = ds(id);
944
+ const replies = result instanceof Promise ? await result : result;
945
+ item.replies = replies;
946
+ item.replyCount = replies.length;
947
+ }
948
+ catch {
949
+ item.replyCount = 0;
950
+ }
951
+ finally {
952
+ this.loadingIds.update((set) => {
953
+ const next = new Set(set);
954
+ next.delete(id);
955
+ return next;
956
+ });
957
+ this.refreshItems();
958
+ }
959
+ }
960
+ refreshItems() {
961
+ // Keep the parent datasource as the source of truth. Writing it back here
962
+ // used to drop the next array the parent pushed in.
963
+ this.items.set(this.items().slice());
964
+ }
965
+ findInTree(items, id) {
966
+ for (const item of items) {
967
+ if (this.getId(item) === id)
968
+ return item;
969
+ const found = this.findInTree(this.getReplies(item), id);
970
+ if (found)
971
+ return found;
972
+ }
973
+ return null;
974
+ }
975
+ findParent(items, id) {
976
+ for (const item of items) {
977
+ const replies = this.getReplies(item);
978
+ if (replies.some((child) => this.getId(child) === id))
979
+ return item;
980
+ const nested = this.findParent(replies, id);
981
+ if (nested)
982
+ return nested;
983
+ }
984
+ return null;
985
+ }
180
986
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
181
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXCommentViewComponent, isStandalone: true, selector: "ax-comment-view", providers: [{ provide: AXComponent, useExisting: AXCommentViewComponent }], ngImport: i0, template: '<ng-content select="ax-comment-item" />', isInline: true, styles: ["ax-comment-view{display:block;margin-block-end:1rem}\n"], encapsulation: i0.ViewEncapsulation.None }); }
987
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXCommentViewComponent, isStandalone: true, selector: "ax-comment-view", inputs: { datasource: { classPropertyName: "datasource", publicName: "datasource", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { datasource: "datasourceChange", onReply: "onReply", onLikeChange: "onLikeChange", onRepliesToggle: "onRepliesToggle", onAction: "onAction" }, providers: [
988
+ { provide: AXComponent, useExisting: AXCommentViewComponent },
989
+ { provide: AX_COMMENT_THREAD_HOST, useExisting: AXCommentViewComponent },
990
+ ], queries: [{ propertyName: "projectedItemTemplate", first: true, predicate: AXCommentItemTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasDatasource()) {\n @if (isLoading()) {\n <div class=\"ax-comment-view-skeleton\">\n @for (row of [1, 2, 3]; track row) {\n <div class=\"ax-comment-skeleton-row\">\n <ax-skeleton class=\"ax-comment-skeleton-avatar\"></ax-skeleton>\n <div class=\"ax-comment-skeleton-main\">\n <ax-skeleton class=\"ax-comment-skeleton-title\"></ax-skeleton>\n <ax-skeleton class=\"ax-comment-skeleton-body\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n } @else {\n <ax-comment-thread [items]=\"items()\" [level]=\"0\" [itemTemplate]=\"resolvedTemplate()\" />\n }\n} @else {\n <ng-content select=\"ax-comment-item\" />\n}\n", styles: ["@layer components{ax-comment-view{display:block}ax-comment-view>ax-comment-thread>ax-comment-item:not(:last-child){border-bottom:1px solid color-mix(in srgb,rgba(var(--ax-sys-color-on-surface)) 8%,transparent)}@supports (color: color-mix(in lab,red,red)){ax-comment-view>ax-comment-thread>ax-comment-item:not(:last-child){border-bottom:1px solid color-mix(in srgb,var(--color-on-surface) 8%,transparent)}}.ax-comment-view-skeleton{display:flex;flex-direction:column}.ax-comment-skeleton-row{display:flex;align-items:flex-start;gap:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 3)}.ax-comment-skeleton-avatar{width:calc(var(--spacing, .25rem) * 12);height:calc(var(--spacing, .25rem) * 12);flex-shrink:0;border-radius:calc(infinity * 1px)}.ax-comment-skeleton-main{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.ax-comment-skeleton-title{height:calc(var(--spacing, .25rem) * 3);width:calc(var(--spacing, .25rem) * 32);border-radius:.25rem}.ax-comment-skeleton-body{height:calc(var(--spacing, .25rem) * 3);width:100%;max-width:var(--container-md, 28rem);border-radius:.25rem}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXCommentThreadComponent, selector: "ax-comment-thread", inputs: ["items", "level", "itemTemplate"] }, { kind: "component", type: AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
182
991
  }
183
992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentViewComponent, decorators: [{
184
993
  type: Component,
185
- args: [{ selector: 'ax-comment-view', template: '<ng-content select="ax-comment-item" />', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXCommentViewComponent }], styles: ["ax-comment-view{display:block;margin-block-end:1rem}\n"] }]
186
- }] });
994
+ args: [{ selector: 'ax-comment-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXCommentThreadComponent, AXSkeletonComponent], providers: [
995
+ { provide: AXComponent, useExisting: AXCommentViewComponent },
996
+ { provide: AX_COMMENT_THREAD_HOST, useExisting: AXCommentViewComponent },
997
+ ], template: "@if (hasDatasource()) {\n @if (isLoading()) {\n <div class=\"ax-comment-view-skeleton\">\n @for (row of [1, 2, 3]; track row) {\n <div class=\"ax-comment-skeleton-row\">\n <ax-skeleton class=\"ax-comment-skeleton-avatar\"></ax-skeleton>\n <div class=\"ax-comment-skeleton-main\">\n <ax-skeleton class=\"ax-comment-skeleton-title\"></ax-skeleton>\n <ax-skeleton class=\"ax-comment-skeleton-body\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n } @else {\n <ax-comment-thread [items]=\"items()\" [level]=\"0\" [itemTemplate]=\"resolvedTemplate()\" />\n }\n} @else {\n <ng-content select=\"ax-comment-item\" />\n}\n", styles: ["@layer components{ax-comment-view{display:block}ax-comment-view>ax-comment-thread>ax-comment-item:not(:last-child){border-bottom:1px solid color-mix(in srgb,rgba(var(--ax-sys-color-on-surface)) 8%,transparent)}@supports (color: color-mix(in lab,red,red)){ax-comment-view>ax-comment-thread>ax-comment-item:not(:last-child){border-bottom:1px solid color-mix(in srgb,var(--color-on-surface) 8%,transparent)}}.ax-comment-view-skeleton{display:flex;flex-direction:column}.ax-comment-skeleton-row{display:flex;align-items:flex-start;gap:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 3)}.ax-comment-skeleton-avatar{width:calc(var(--spacing, .25rem) * 12);height:calc(var(--spacing, .25rem) * 12);flex-shrink:0;border-radius:calc(infinity * 1px)}.ax-comment-skeleton-main{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.ax-comment-skeleton-title{height:calc(var(--spacing, .25rem) * 3);width:calc(var(--spacing, .25rem) * 32);border-radius:.25rem}.ax-comment-skeleton-body{height:calc(var(--spacing, .25rem) * 3);width:100%;max-width:var(--container-md, 28rem);border-radius:.25rem}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
998
+ }], ctorParameters: () => [], propDecorators: { datasource: [{ type: i0.Input, args: [{ isSignal: true, alias: "datasource", required: false }] }, { type: i0.Output, args: ["datasourceChange"] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], onReply: [{ type: i0.Output, args: ["onReply"] }], onLikeChange: [{ type: i0.Output, args: ["onLikeChange"] }], onRepliesToggle: [{ type: i0.Output, args: ["onRepliesToggle"] }], onAction: [{ type: i0.Output, args: ["onAction"] }], projectedItemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXCommentItemTemplateDirective), { isSignal: true }] }] } });
187
999
 
188
1000
  const COMPONENTS = [
189
1001
  AXCommentViewComponent,
@@ -191,29 +1003,53 @@ const COMPONENTS = [
191
1003
  AXCommentItemComponent,
192
1004
  AXCommentLikeComponent,
193
1005
  AXMenuOptionsComponent,
1006
+ AXCommentReplyComponent,
194
1007
  AXCommentReplyTextComponent,
195
1008
  AXCommentDateComponent,
1009
+ AXCommentEditedComponent,
196
1010
  AXCommentReplyMoreComponent,
1011
+ AXCommentItemTemplateDirective,
1012
+ ];
1013
+ const MODULES = [
1014
+ AXDecoratorModule,
1015
+ AXWysiwygModule,
1016
+ AXBadgeModule,
1017
+ AXButtonModule,
1018
+ AXTextAreaModule,
1019
+ AXTranslationModule,
197
1020
  ];
198
- const MODULES = [AXDecoratorModule, AXWysiwygModule, AXButtonModule, AXTextAreaModule, AXTranslationModule];
199
1021
  class AXCommentModule {
200
1022
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
201
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXCommentModule, imports: [AXDecoratorModule, AXWysiwygModule, AXButtonModule, AXTextAreaModule, AXTranslationModule, AXCommentViewComponent,
1023
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXCommentModule, imports: [AXDecoratorModule,
1024
+ AXWysiwygModule,
1025
+ AXBadgeModule,
1026
+ AXButtonModule,
1027
+ AXTextAreaModule,
1028
+ AXTranslationModule, AXCommentViewComponent,
202
1029
  AXCommentContainerComponent,
203
1030
  AXCommentItemComponent,
204
1031
  AXCommentLikeComponent,
205
1032
  AXMenuOptionsComponent,
1033
+ AXCommentReplyComponent,
206
1034
  AXCommentReplyTextComponent,
207
1035
  AXCommentDateComponent,
208
- AXCommentReplyMoreComponent], exports: [AXCommentViewComponent,
1036
+ AXCommentEditedComponent,
1037
+ AXCommentReplyMoreComponent,
1038
+ AXCommentItemTemplateDirective], exports: [AXCommentViewComponent,
209
1039
  AXCommentContainerComponent,
210
1040
  AXCommentItemComponent,
211
1041
  AXCommentLikeComponent,
212
1042
  AXMenuOptionsComponent,
1043
+ AXCommentReplyComponent,
213
1044
  AXCommentReplyTextComponent,
214
1045
  AXCommentDateComponent,
215
- AXCommentReplyMoreComponent] }); }
216
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentModule, imports: [MODULES, AXCommentLikeComponent,
1046
+ AXCommentEditedComponent,
1047
+ AXCommentReplyMoreComponent,
1048
+ AXCommentItemTemplateDirective] }); }
1049
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCommentModule, imports: [MODULES, AXCommentViewComponent,
1050
+ AXCommentItemComponent,
1051
+ AXCommentLikeComponent,
1052
+ AXCommentReplyComponent,
217
1053
  AXCommentReplyTextComponent,
218
1054
  AXCommentReplyMoreComponent] }); }
219
1055
  }
@@ -229,5 +1065,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
229
1065
  * Generated bundle index. Do not edit.
230
1066
  */
231
1067
 
232
- export { AXCommentContainerComponent, AXCommentDateComponent, AXCommentItemComponent, AXCommentLikeComponent, AXCommentModule, AXCommentReplyMoreComponent, AXCommentReplyTextComponent, AXCommentViewComponent, AXMenuOptionsComponent };
1068
+ export { AXCommentContainerComponent, AXCommentDateComponent, AXCommentEditedComponent, AXCommentItemComponent, AXCommentItemTemplateDirective, AXCommentLikeComponent, AXCommentModule, AXCommentReplyComponent, AXCommentReplyMoreComponent, AXCommentReplyTextComponent, AXCommentViewComponent, AXMenuOptionsComponent };
233
1069
  //# sourceMappingURL=acorex-components-comment.mjs.map