@acorex/components 20.3.48 → 20.3.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/command/index.d.ts +2 -1
- package/comment/index.d.ts +23 -22
- package/data-table/index.d.ts +13 -1
- package/fesm2022/acorex-components-command.mjs +4 -3
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +75 -72
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +37 -17
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +15 -3
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +4 -4
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/grid-layout-builder/index.d.ts +1 -1
- package/package.json +28 -28
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { AXComponent } from '@acorex/cdk/common';
|
|
2
|
-
import { isPlatformBrowser, AsyncPipe
|
|
2
|
+
import { isPlatformBrowser, AsyncPipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, DOCUMENT, PLATFORM_ID, ViewEncapsulation, Component, contentChild,
|
|
5
|
-
import * as i1 from '@acorex/components/accordion';
|
|
6
|
-
import { AXAccordionModule } from '@acorex/components/accordion';
|
|
4
|
+
import { inject, DOCUMENT, PLATFORM_ID, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChild, input, model, afterNextRender, NgModule } from '@angular/core';
|
|
7
5
|
import { AXAvatarComponent } from '@acorex/components/avatar';
|
|
8
6
|
import { AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
|
|
9
7
|
import { AXDecoratorIconComponent, AXDecoratorGenericComponent, AXDecoratorModule } from '@acorex/components/decorators';
|
|
10
8
|
import { AXButtonModule } from '@acorex/components/button';
|
|
11
|
-
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
12
9
|
import { AXTextAreaModule } from '@acorex/components/text-area';
|
|
13
10
|
import { AXWysiwygModule } from '@acorex/components/wysiwyg';
|
|
14
11
|
|
|
@@ -26,30 +23,23 @@ class AXCommentContainerComponent {
|
|
|
26
23
|
* Scrolls to a specific comment reply by its ID and highlights it temporarily.
|
|
27
24
|
*
|
|
28
25
|
* @param id - The ID of the comment reply to scroll to
|
|
29
|
-
* @returns void
|
|
30
26
|
*/
|
|
31
27
|
scrollToReply(id) {
|
|
32
|
-
if (isPlatformBrowser(this.platformID))
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
content.style.transition = 'background 1s ease-in-out';
|
|
41
|
-
content.style.background = '#e2fffc';
|
|
42
|
-
setTimeout(() => {
|
|
43
|
-
content.style.background = prevBg || 'rgba(0, 0, 0, 0)';
|
|
44
|
-
}, 1000);
|
|
45
|
-
}
|
|
28
|
+
if (!isPlatformBrowser(this.platformID))
|
|
29
|
+
return;
|
|
30
|
+
const el = this.document.querySelector(`ax-comment-item[id="${id}"]`);
|
|
31
|
+
if (!el)
|
|
32
|
+
return;
|
|
33
|
+
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
34
|
+
el.classList.add('ax-state-highlight');
|
|
35
|
+
setTimeout(() => el.classList.remove('ax-state-highlight'), 1500);
|
|
46
36
|
}
|
|
47
37
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXCommentContainerComponent, isStandalone: true, selector: "ax-comment-container", providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }], ngImport: i0, template:
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
49
39
|
}
|
|
50
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentContainerComponent, decorators: [{
|
|
51
41
|
type: Component,
|
|
52
|
-
args: [{ selector: 'ax-comment-container', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }],
|
|
42
|
+
args: [{ selector: 'ax-comment-container', template: '<ng-content />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXCommentContainerComponent }], styles: ["ax-comment-container{display:block;width:100%}\n"] }]
|
|
53
43
|
}] });
|
|
54
44
|
|
|
55
45
|
/**
|
|
@@ -58,43 +48,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
58
48
|
* @category Components
|
|
59
49
|
*/
|
|
60
50
|
class AXCommentItemComponent {
|
|
61
|
-
/**
|
|
62
|
-
* @ignore
|
|
63
|
-
*/
|
|
64
51
|
constructor() {
|
|
65
|
-
/**
|
|
66
|
-
* @ignore
|
|
67
|
-
*/
|
|
68
52
|
this.avatar = contentChild(AXAvatarComponent, ...(ngDevMode ? [{ debugName: "avatar" }] : []));
|
|
69
|
-
this.collapse = viewChild('c', ...(ngDevMode ? [{ debugName: "collapse" }] : []));
|
|
70
53
|
this.replyCount = input(...(ngDevMode ? [undefined, { debugName: "replyCount" }] : []));
|
|
54
|
+
/** Two-way bindable state controlling whether nested replies are visible. */
|
|
55
|
+
this.repliesExpanded = model(false, ...(ngDevMode ? [{ debugName: "repliesExpanded" }] : []));
|
|
71
56
|
afterNextRender(() => {
|
|
72
57
|
this.avatar()?.size?.set(40);
|
|
73
58
|
});
|
|
74
59
|
}
|
|
75
|
-
|
|
76
|
-
this.
|
|
60
|
+
toggleReplies() {
|
|
61
|
+
this.repliesExpanded.update((v) => !v);
|
|
62
|
+
}
|
|
63
|
+
showReplies() {
|
|
64
|
+
this.repliesExpanded.set(true);
|
|
65
|
+
}
|
|
66
|
+
hideReplies() {
|
|
67
|
+
this.repliesExpanded.set(false);
|
|
77
68
|
}
|
|
78
69
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXCommentItemComponent, isStandalone: true, selector: "ax-comment-item", inputs: { replyCount: { classPropertyName: "replyCount", publicName: "replyCount", isSignal: true, isRequired: false, transformFunction: null }
|
|
70
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", 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: ["ax-comment-item{--ax-comp-comment-spacing: 1rem;--ax-comp-comment-header-gap: .5rem;--ax-comp-comment-body-indent: 3rem;--ax-comp-comment-body-font-size: .875rem;--ax-comp-comment-reply-indent: 2.5rem;--ax-comp-comment-highlight-bg: rgba(var(--ax-sys-color-primary-surface), .1);display:block;padding:.25rem;border-radius:.25rem;transition:background 1s ease-in-out}ax-comment-item:not(:last-child){margin-bottom:var(--ax-comp-comment-spacing)}ax-comment-item.ax-state-highlight{background:var(--ax-comp-comment-highlight-bg)}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:var(--ax-comp-comment-header-gap)}ax-comment-item .ax-comment-header .ax-comment-header-start .ax-comment-header-content{display:flex;align-items:baseline;gap:.5rem}ax-comment-item .ax-comment-header ax-title{font-weight:500}ax-comment-item .ax-comment-body{margin-inline-start:var(--ax-comp-comment-body-indent);font-size:var(--ax-comp-comment-body-font-size);color:rgba(var(--ax-sys-color-on-surface));padding-top:.25rem}ax-comment-item .ax-comment-actions{display:flex;align-items:center;gap:1rem;margin-top:.5rem;font-size:var(--ax-comp-comment-body-font-size)}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:var(--ax-comp-comment-reply-indent);margin-top:.5rem}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle{display:inline-flex;align-items:center;gap:.25rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--ax-comp-comment-body-font-size);font-weight:500;color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle:hover{text-decoration:underline}ax-comment-item .ax-comment-replies .ax-comment-replies-content{margin-top:.5rem}ax-comment-item .ax-comment-replies ax-comment-reply-more{cursor:pointer;color:rgba(var(--ax-sys-color-primary-surface));font-weight:500;font-size:var(--ax-comp-comment-body-font-size)}ax-comment-item .ax-comment-replies ax-comment-reply-more:hover{text-decoration:underline}\n"], dependencies: [{ kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
80
71
|
}
|
|
81
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentItemComponent, decorators: [{
|
|
82
73
|
type: Component,
|
|
83
|
-
args: [{ selector: 'ax-comment-item', encapsulation: ViewEncapsulation.None, imports: [
|
|
74
|
+
args: [{ selector: 'ax-comment-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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: ["ax-comment-item{--ax-comp-comment-spacing: 1rem;--ax-comp-comment-header-gap: .5rem;--ax-comp-comment-body-indent: 3rem;--ax-comp-comment-body-font-size: .875rem;--ax-comp-comment-reply-indent: 2.5rem;--ax-comp-comment-highlight-bg: rgba(var(--ax-sys-color-primary-surface), .1);display:block;padding:.25rem;border-radius:.25rem;transition:background 1s ease-in-out}ax-comment-item:not(:last-child){margin-bottom:var(--ax-comp-comment-spacing)}ax-comment-item.ax-state-highlight{background:var(--ax-comp-comment-highlight-bg)}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:var(--ax-comp-comment-header-gap)}ax-comment-item .ax-comment-header .ax-comment-header-start .ax-comment-header-content{display:flex;align-items:baseline;gap:.5rem}ax-comment-item .ax-comment-header ax-title{font-weight:500}ax-comment-item .ax-comment-body{margin-inline-start:var(--ax-comp-comment-body-indent);font-size:var(--ax-comp-comment-body-font-size);color:rgba(var(--ax-sys-color-on-surface));padding-top:.25rem}ax-comment-item .ax-comment-actions{display:flex;align-items:center;gap:1rem;margin-top:.5rem;font-size:var(--ax-comp-comment-body-font-size)}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:var(--ax-comp-comment-reply-indent);margin-top:.5rem}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle{display:inline-flex;align-items:center;gap:.25rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--ax-comp-comment-body-font-size);font-weight:500;color:rgba(var(--ax-sys-color-primary-surface))}ax-comment-item .ax-comment-replies .ax-comment-replies-toggle:hover{text-decoration:underline}ax-comment-item .ax-comment-replies .ax-comment-replies-content{margin-top:.5rem}ax-comment-item .ax-comment-replies ax-comment-reply-more{cursor:pointer;color:rgba(var(--ax-sys-color-primary-surface));font-weight:500;font-size:var(--ax-comp-comment-body-font-size)}ax-comment-item .ax-comment-replies ax-comment-reply-more:hover{text-decoration:underline}\n"] }]
|
|
84
75
|
}], ctorParameters: () => [] });
|
|
85
76
|
|
|
86
77
|
/**
|
|
87
|
-
* A component for displaying
|
|
78
|
+
* A component for displaying date on a comment.
|
|
88
79
|
*
|
|
89
80
|
* @category Components
|
|
90
81
|
*/
|
|
91
82
|
class AXCommentDateComponent {
|
|
92
83
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
93
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXCommentDateComponent, isStandalone: true, selector: "ax-comment-date", providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], ngImport: i0, template:
|
|
84
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXCommentDateComponent, isStandalone: true, selector: "ax-comment-date", providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["ax-comment-date{color:rgb(var(--ax-sys-color-ghost-400));font-size:.8rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
94
85
|
}
|
|
95
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentDateComponent, decorators: [{
|
|
96
87
|
type: Component,
|
|
97
|
-
args: [{ selector: 'ax-comment-date', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }],
|
|
88
|
+
args: [{ selector: 'ax-comment-date', template: '<ng-content />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXCommentDateComponent }], styles: ["ax-comment-date{color:rgb(var(--ax-sys-color-ghost-400));font-size:.8rem}\n"] }]
|
|
98
89
|
}] });
|
|
99
90
|
|
|
100
91
|
/**
|
|
@@ -104,20 +95,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
104
95
|
*/
|
|
105
96
|
class AXCommentLikeComponent {
|
|
106
97
|
constructor() {
|
|
107
|
-
/**
|
|
108
|
-
* Indicates whether the comment is liked.
|
|
109
|
-
*/
|
|
110
98
|
this.like = model.required(...(ngDevMode ? [{ debugName: "like" }] : []));
|
|
111
99
|
}
|
|
112
|
-
|
|
100
|
+
toggleLike() {
|
|
113
101
|
this.like.update((prev) => !prev);
|
|
114
102
|
}
|
|
115
103
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentLikeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.3", 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)=\"
|
|
104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.3", 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: ["ax-comment-like .ax-comment-like-container{display:flex;align-items:center;gap:.25rem;transition:color .2s ease}ax-comment-like .ax-comment-like-container ax-icon{font-size:.938rem;transition:transform .2s ease}ax-comment-like .ax-comment-like-container:hover:not(.ax-state-liked){color:rgba(var(--ax-sys-color-danger-400))}ax-comment-like .ax-comment-like-container.ax-state-liked{color:rgba(var(--ax-sys-color-danger-500))}ax-comment-like .ax-comment-like-container.ax-state-liked ax-icon{font-weight:700}\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 }); }
|
|
117
105
|
}
|
|
118
106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentLikeComponent, decorators: [{
|
|
119
107
|
type: Component,
|
|
120
|
-
args: [{ selector: 'ax-comment-like', imports: [AXDecoratorIconComponent, AXDecoratorGenericComponent], providers: [{ provide: AXComponent, useExisting: AXCommentLikeComponent }], template: "<div class=\"ax-comment-like-container\" [class.ax-state-liked]=\"like()\" (click)=\"
|
|
108
|
+
args: [{ selector: 'ax-comment-like', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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: ["ax-comment-like .ax-comment-like-container{display:flex;align-items:center;gap:.25rem;transition:color .2s ease}ax-comment-like .ax-comment-like-container ax-icon{font-size:.938rem;transition:transform .2s ease}ax-comment-like .ax-comment-like-container:hover:not(.ax-state-liked){color:rgba(var(--ax-sys-color-danger-400))}ax-comment-like .ax-comment-like-container.ax-state-liked{color:rgba(var(--ax-sys-color-danger-500))}ax-comment-like .ax-comment-like-container.ax-state-liked ax-icon{font-weight:700}\n"] }]
|
|
121
109
|
}] });
|
|
122
110
|
|
|
123
111
|
/**
|
|
@@ -127,45 +115,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
127
115
|
*/
|
|
128
116
|
class AXMenuOptionsComponent {
|
|
129
117
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMenuOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXMenuOptionsComponent, isStandalone: true, selector: "ax-comment-menu-options", providers: [{ provide: AXComponent, useExisting: AXMenuOptionsComponent }], ngImport: i0, template:
|
|
118
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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 }); }
|
|
131
119
|
}
|
|
132
120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMenuOptionsComponent, decorators: [{
|
|
133
121
|
type: Component,
|
|
134
|
-
args: [{
|
|
122
|
+
args: [{
|
|
123
|
+
selector: 'ax-comment-menu-options',
|
|
124
|
+
template: '<ng-content />',
|
|
125
|
+
encapsulation: ViewEncapsulation.None,
|
|
126
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
127
|
+
providers: [{ provide: AXComponent, useExisting: AXMenuOptionsComponent }],
|
|
128
|
+
}]
|
|
135
129
|
}] });
|
|
136
130
|
|
|
131
|
+
/**
|
|
132
|
+
* A component for displaying "show more replies" action on a comment.
|
|
133
|
+
*
|
|
134
|
+
* @category Components
|
|
135
|
+
*/
|
|
137
136
|
class AXCommentReplyMoreComponent {
|
|
138
137
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentReplyMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXCommentReplyMoreComponent, isStandalone: true, selector: "ax-comment-reply-more", providers: [{ provide: AXComponent, useExisting: AXCommentReplyMoreComponent }], ngImport: i0, template:
|
|
138
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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 }); }
|
|
140
139
|
}
|
|
141
140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentReplyMoreComponent, decorators: [{
|
|
142
141
|
type: Component,
|
|
143
|
-
args: [{
|
|
142
|
+
args: [{
|
|
143
|
+
selector: 'ax-comment-reply-more',
|
|
144
|
+
template: '<ax-text><ng-content /></ax-text>',
|
|
145
|
+
encapsulation: ViewEncapsulation.None,
|
|
146
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
147
|
+
imports: [AXDecoratorGenericComponent],
|
|
148
|
+
providers: [{ provide: AXComponent, useExisting: AXCommentReplyMoreComponent }],
|
|
149
|
+
}]
|
|
144
150
|
}] });
|
|
145
151
|
|
|
152
|
+
/**
|
|
153
|
+
* A component for displaying the reply action text on a comment.
|
|
154
|
+
*
|
|
155
|
+
* @category Components
|
|
156
|
+
*/
|
|
146
157
|
class AXCommentReplyTextComponent {
|
|
147
158
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentReplyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXCommentReplyTextComponent, isStandalone: true, selector: "ax-comment-reply-text", providers: [{ provide: AXComponent, useExisting: AXCommentReplyTextComponent }], ngImport: i0, template:
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
149
160
|
}
|
|
150
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentReplyTextComponent, decorators: [{
|
|
151
162
|
type: Component,
|
|
152
|
-
args: [{
|
|
163
|
+
args: [{
|
|
164
|
+
selector: 'ax-comment-reply-text',
|
|
165
|
+
template: `<ax-text>{{ '@acorex:comment.reply' | translate | async }}</ax-text>`,
|
|
166
|
+
encapsulation: ViewEncapsulation.None,
|
|
167
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
168
|
+
imports: [AXDecoratorGenericComponent, AXTranslatorPipe, AsyncPipe],
|
|
169
|
+
providers: [{ provide: AXComponent, useExisting: AXCommentReplyTextComponent }],
|
|
170
|
+
}]
|
|
153
171
|
}] });
|
|
154
172
|
|
|
155
173
|
/**
|
|
156
174
|
* A component for viewing comments with their details.
|
|
175
|
+
*
|
|
157
176
|
* @category Components
|
|
158
177
|
*/
|
|
159
178
|
class AXCommentViewComponent {
|
|
160
179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
161
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXCommentViewComponent, isStandalone: true, selector: "ax-comment-view", providers: [{ provide: AXComponent, useExisting: AXCommentViewComponent }], ngImport: i0, template:
|
|
180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
162
181
|
}
|
|
163
182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentViewComponent, decorators: [{
|
|
164
183
|
type: Component,
|
|
165
|
-
args: [{ selector: 'ax-comment-view', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXCommentViewComponent }],
|
|
184
|
+
args: [{ selector: 'ax-comment-view', template: '<ng-content select="ax-comment-item" />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXCommentViewComponent }], styles: ["ax-comment-view{display:block;margin-block-end:1rem}\n"] }]
|
|
166
185
|
}] });
|
|
167
186
|
|
|
168
|
-
const
|
|
187
|
+
const COMPONENTS = [
|
|
169
188
|
AXCommentViewComponent,
|
|
170
189
|
AXCommentContainerComponent,
|
|
171
190
|
AXCommentItemComponent,
|
|
@@ -175,24 +194,10 @@ const COMPONENT = [
|
|
|
175
194
|
AXCommentDateComponent,
|
|
176
195
|
AXCommentReplyMoreComponent,
|
|
177
196
|
];
|
|
178
|
-
const MODULES = [
|
|
179
|
-
AXDecoratorModule,
|
|
180
|
-
AXWysiwygModule,
|
|
181
|
-
AXCollapseModule,
|
|
182
|
-
AXButtonModule,
|
|
183
|
-
AXTextAreaModule,
|
|
184
|
-
AXTranslationModule,
|
|
185
|
-
CommonModule,
|
|
186
|
-
];
|
|
197
|
+
const MODULES = [AXDecoratorModule, AXWysiwygModule, AXButtonModule, AXTextAreaModule, AXTranslationModule];
|
|
187
198
|
class AXCommentModule {
|
|
188
199
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
189
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXCommentModule, imports: [AXDecoratorModule,
|
|
190
|
-
AXWysiwygModule,
|
|
191
|
-
AXCollapseModule,
|
|
192
|
-
AXButtonModule,
|
|
193
|
-
AXTextAreaModule,
|
|
194
|
-
AXTranslationModule,
|
|
195
|
-
CommonModule, AXCommentViewComponent,
|
|
200
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXCommentModule, imports: [AXDecoratorModule, AXWysiwygModule, AXButtonModule, AXTextAreaModule, AXTranslationModule, AXCommentViewComponent,
|
|
196
201
|
AXCommentContainerComponent,
|
|
197
202
|
AXCommentItemComponent,
|
|
198
203
|
AXCommentLikeComponent,
|
|
@@ -207,17 +212,15 @@ class AXCommentModule {
|
|
|
207
212
|
AXCommentReplyTextComponent,
|
|
208
213
|
AXCommentDateComponent,
|
|
209
214
|
AXCommentReplyMoreComponent] }); }
|
|
210
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentModule, imports: [MODULES,
|
|
211
|
-
AXCommentLikeComponent,
|
|
215
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentModule, imports: [MODULES, AXCommentLikeComponent,
|
|
212
216
|
AXCommentReplyTextComponent,
|
|
213
217
|
AXCommentReplyMoreComponent] }); }
|
|
214
218
|
}
|
|
215
219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXCommentModule, decorators: [{
|
|
216
220
|
type: NgModule,
|
|
217
221
|
args: [{
|
|
218
|
-
imports: [...MODULES, ...
|
|
219
|
-
exports: [...
|
|
220
|
-
providers: [],
|
|
222
|
+
imports: [...MODULES, ...COMPONENTS],
|
|
223
|
+
exports: [...COMPONENTS],
|
|
221
224
|
}]
|
|
222
225
|
}] });
|
|
223
226
|
|