@acorex/components 21.0.3-next.40 → 21.0.3-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs → acorex-components-conversation-open-composer-picker-for-files-Duvap4M4.mjs} +2 -3
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map → acorex-components-conversation-open-composer-picker-for-files-Duvap4M4.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +22456 -1
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/package.json +3 -3
- package/types/acorex-components-conversation.d.ts +1228 -48
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs +0 -13711
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs +0 -119
- package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs +0 -59
- package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs +0 -432
- package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs +0 -177
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs +0 -54
- package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs +0 -100
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs +0 -121
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs +0 -84
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs +0 -238
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs +0 -1080
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs +0 -102
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs +0 -90
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs +0 -44
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs +0 -64
- package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs +0 -468
- package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs +0 -125
- package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs +0 -50
- package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +0 -21
- package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs +0 -77
- package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs +0 -407
- package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs +0 -83
- package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs +0 -184
- package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs +0 -266
- package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs +0 -149
- package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs +0 -118
- package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +0 -17
- package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs +0 -140
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs +0 -33
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs +0 -172
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs +0 -81
- package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs +0 -91
- package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs +0 -537
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +0 -163
- package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs +0 -68
- package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +0 -95
- package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs +0 -187
- package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs +0 -170
- package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs +0 -750
- package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs +0 -103
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs +0 -55
- package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs +0 -109
- package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs +0 -105
- package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs +0 -62
- package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs +0 -446
- package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs +0 -181
- package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs +0 -54
- package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +0 -17
- package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs +0 -344
- package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs +0 -270
- package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs.map +0 -1
package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { AXButtonComponent } from '@acorex/components/button';
|
|
2
|
-
import * as i3 from '@acorex/core/translation';
|
|
3
|
-
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
4
|
-
import * as i2 from '@angular/common';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import * as i0 from '@angular/core';
|
|
7
|
-
import { inject, input, output, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
|
-
import { A as AXConversationService, e as AXConversationMessageUtilsService } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
|
|
9
|
-
|
|
10
|
-
function isMessageDeliveryPending(status) {
|
|
11
|
-
return status === 'sending';
|
|
12
|
-
}
|
|
13
|
-
function canShowRendererContentError(status, contentState) {
|
|
14
|
-
return contentState === 'error' && !isMessageDeliveryPending(status);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Shared UI for message bubble bodies: failed delivery (with retry) and content load errors.
|
|
19
|
-
* Sending state is shown in the message-list footer only — not here (avoids layout glitch in media bubbles).
|
|
20
|
-
*/
|
|
21
|
-
class AXConversationMessageRendererStateComponent {
|
|
22
|
-
constructor() {
|
|
23
|
-
this.conversation = inject(AXConversationService, { optional: true });
|
|
24
|
-
this.translation = inject(AXTranslationService);
|
|
25
|
-
this.rendererState = input.required(...(ngDevMode ? [{ debugName: "rendererState" }] : /* istanbul ignore next */ []));
|
|
26
|
-
this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
27
|
-
this.contentErrorLabel = input(undefined, ...(ngDevMode ? [{ debugName: "contentErrorLabel" }] : /* istanbul ignore next */ []));
|
|
28
|
-
this.deliveryFailedLabel = input(undefined, ...(ngDevMode ? [{ debugName: "deliveryFailedLabel" }] : /* istanbul ignore next */ []));
|
|
29
|
-
this.showContentErrorChrome = input(true, ...(ngDevMode ? [{ debugName: "showContentErrorChrome" }] : /* istanbul ignore next */ []));
|
|
30
|
-
this.contentErrorStyle = input('banner', ...(ngDevMode ? [{ debugName: "contentErrorStyle" }] : /* istanbul ignore next */ []));
|
|
31
|
-
this.contentErrorIconClass = input(undefined, ...(ngDevMode ? [{ debugName: "contentErrorIconClass" }] : /* istanbul ignore next */ []));
|
|
32
|
-
this.placement = input('above', ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
33
|
-
this.contentRetryEnabled = input(false, ...(ngDevMode ? [{ debugName: "contentRetryEnabled" }] : /* istanbul ignore next */ []));
|
|
34
|
-
this.contentRetry = output();
|
|
35
|
-
this.retryBusy = signal(false, ...(ngDevMode ? [{ debugName: "retryBusy" }] : /* istanbul ignore next */ []));
|
|
36
|
-
this.currentUser = computed(() => this.conversation?.currentUser(), ...(ngDevMode ? [{ debugName: "currentUser" }] : /* istanbul ignore next */ []));
|
|
37
|
-
this.isOwn = computed(() => {
|
|
38
|
-
const msg = this.message();
|
|
39
|
-
const user = this.currentUser();
|
|
40
|
-
if (!user) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return AXConversationMessageUtilsService.isOwnMessage(msg, user.id);
|
|
44
|
-
}, ...(ngDevMode ? [{ debugName: "isOwn" }] : /* istanbul ignore next */ []));
|
|
45
|
-
this.showFailed = computed(() => this.rendererState().deliveryStatus === 'failed' && this.isOwn(), ...(ngDevMode ? [{ debugName: "showFailed" }] : /* istanbul ignore next */ []));
|
|
46
|
-
this.showContentError = computed(() => {
|
|
47
|
-
const { contentState } = this.rendererState();
|
|
48
|
-
return (this.showContentErrorChrome() &&
|
|
49
|
-
canShowRendererContentError(this.message().status, contentState));
|
|
50
|
-
}, ...(ngDevMode ? [{ debugName: "showContentError" }] : /* istanbul ignore next */ []));
|
|
51
|
-
this.hasVisibleChrome = computed(() => this.showFailed() || this.showContentError(), ...(ngDevMode ? [{ debugName: "hasVisibleChrome" }] : /* istanbul ignore next */ []));
|
|
52
|
-
this.contentErrorText = computed(() => this.contentErrorLabel() ?? this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-content'), ...(ngDevMode ? [{ debugName: "contentErrorText" }] : /* istanbul ignore next */ []));
|
|
53
|
-
this.deliveryFailedText = computed(() => this.deliveryFailedLabel() ??
|
|
54
|
-
this.translation.translateSync('@acorex:chat.renderer-state.could-not-send-message'), ...(ngDevMode ? [{ debugName: "deliveryFailedText" }] : /* istanbul ignore next */ []));
|
|
55
|
-
}
|
|
56
|
-
async onRetry() {
|
|
57
|
-
const msg = this.message();
|
|
58
|
-
if (!this.conversation) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
this.retryBusy.set(true);
|
|
62
|
-
try {
|
|
63
|
-
await this.conversation.retryFailedMessage(msg.id);
|
|
64
|
-
}
|
|
65
|
-
finally {
|
|
66
|
-
this.retryBusy.set(false);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationMessageRendererStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXConversationMessageRendererStateComponent, isStandalone: true, selector: "ax-conversation-message-renderer-state", inputs: { rendererState: { classPropertyName: "rendererState", publicName: "rendererState", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, contentErrorLabel: { classPropertyName: "contentErrorLabel", publicName: "contentErrorLabel", isSignal: true, isRequired: false, transformFunction: null }, deliveryFailedLabel: { classPropertyName: "deliveryFailedLabel", publicName: "deliveryFailedLabel", isSignal: true, isRequired: false, transformFunction: null }, showContentErrorChrome: { classPropertyName: "showContentErrorChrome", publicName: "showContentErrorChrome", isSignal: true, isRequired: false, transformFunction: null }, contentErrorStyle: { classPropertyName: "contentErrorStyle", publicName: "contentErrorStyle", isSignal: true, isRequired: false, transformFunction: null }, contentErrorIconClass: { classPropertyName: "contentErrorIconClass", publicName: "contentErrorIconClass", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, contentRetryEnabled: { classPropertyName: "contentRetryEnabled", publicName: "contentRetryEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contentRetry: "contentRetry" }, ngImport: i0, template: `
|
|
71
|
-
@if (hasVisibleChrome()) {
|
|
72
|
-
<div
|
|
73
|
-
class="ax-conversation-renderer-state"
|
|
74
|
-
[class.ax-conversation-renderer-state--below]="placement() === 'below'"
|
|
75
|
-
role="region"
|
|
76
|
-
[attr.aria-label]="'@acorex:chat.renderer-state.message-status' | translate | async"
|
|
77
|
-
>
|
|
78
|
-
@if (showFailed()) {
|
|
79
|
-
<div class="ax-conversation-renderer-state__row ax-conversation-renderer-state__row--danger" role="alert">
|
|
80
|
-
<i class="fa-light fa-triangle-exclamation ax-conversation-renderer-state__ico" aria-hidden="true"></i>
|
|
81
|
-
<span class="ax-conversation-renderer-state__msg">{{ deliveryFailedText() }}</span>
|
|
82
|
-
<ax-button
|
|
83
|
-
class="ax-conversation-renderer-state__retry"
|
|
84
|
-
[text]="translation.translateSync('@acorex:chat.renderer-state.retry')"
|
|
85
|
-
[look]="'outline'"
|
|
86
|
-
[size]="'sm'"
|
|
87
|
-
[disabled]="retryBusy()"
|
|
88
|
-
(onClick)="onRetry()"
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
}
|
|
92
|
-
@if (showContentError()) {
|
|
93
|
-
<div
|
|
94
|
-
class="ax-conversation-renderer-state__content-err"
|
|
95
|
-
[class.ax-conversation-renderer-state__content-err--inline]="contentErrorStyle() === 'inline'"
|
|
96
|
-
[class.ax-conversation-renderer-state__row]="contentErrorStyle() === 'banner'"
|
|
97
|
-
[class.ax-conversation-renderer-state__row--warn]="contentErrorStyle() === 'banner'"
|
|
98
|
-
role="alert"
|
|
99
|
-
>
|
|
100
|
-
@if (contentErrorIconClass(); as iconClass) {
|
|
101
|
-
<i [class]="iconClass + ' ax-conversation-renderer-state__ico'" aria-hidden="true"></i>
|
|
102
|
-
}
|
|
103
|
-
<span class="ax-conversation-renderer-state__msg">{{ contentErrorText() }}</span>
|
|
104
|
-
@if (contentRetryEnabled()) {
|
|
105
|
-
<ax-button
|
|
106
|
-
class="ax-conversation-renderer-state__retry"
|
|
107
|
-
[text]="translation.translateSync('@acorex:chat.renderer-state.try-again')"
|
|
108
|
-
[look]="'outline'"
|
|
109
|
-
[size]="'sm'"
|
|
110
|
-
(onClick)="contentRetry.emit()"
|
|
111
|
-
/>
|
|
112
|
-
}
|
|
113
|
-
</div>
|
|
114
|
-
}
|
|
115
|
-
</div>
|
|
116
|
-
}
|
|
117
|
-
`, isInline: true, styles: [":host{display:block}.ax-conversation-renderer-state{display:flex;flex-direction:column;gap:.375rem;margin-block:.25rem 0}.ax-conversation-renderer-state--below{margin-top:.375rem;margin-bottom:0}.ax-conversation-renderer-state__content-err--inline{display:flex;align-items:center;gap:.375rem;font-size:.75rem;color:rgb(var(--ax-sys-color-danger-600));padding:.125rem .25rem}.ax-conversation-renderer-state__row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.375rem .5rem;border-radius:var(--ax-sys-border-radius);font-size:.8125rem;line-height:1.35}.ax-conversation-renderer-state__row--danger{background:rgb(var(--ax-sys-color-danger-lightest-surface));color:rgb(var(--ax-sys-color-danger-700))}.ax-conversation-renderer-state__row--warn{background:rgb(var(--ax-sys-color-warning-lightest-surface));color:rgb(var(--ax-sys-color-warning-800))}.ax-conversation-renderer-state__ico{flex-shrink:0;font-size:.875rem;opacity:.9}.ax-conversation-renderer-state__msg{flex:1;min-width:0}.ax-conversation-renderer-state__retry{flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
118
|
-
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationMessageRendererStateComponent, decorators: [{
|
|
120
|
-
type: Component,
|
|
121
|
-
args: [{ selector: 'ax-conversation-message-renderer-state', imports: [CommonModule, AXButtonComponent, AXTranslationModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
122
|
-
@if (hasVisibleChrome()) {
|
|
123
|
-
<div
|
|
124
|
-
class="ax-conversation-renderer-state"
|
|
125
|
-
[class.ax-conversation-renderer-state--below]="placement() === 'below'"
|
|
126
|
-
role="region"
|
|
127
|
-
[attr.aria-label]="'@acorex:chat.renderer-state.message-status' | translate | async"
|
|
128
|
-
>
|
|
129
|
-
@if (showFailed()) {
|
|
130
|
-
<div class="ax-conversation-renderer-state__row ax-conversation-renderer-state__row--danger" role="alert">
|
|
131
|
-
<i class="fa-light fa-triangle-exclamation ax-conversation-renderer-state__ico" aria-hidden="true"></i>
|
|
132
|
-
<span class="ax-conversation-renderer-state__msg">{{ deliveryFailedText() }}</span>
|
|
133
|
-
<ax-button
|
|
134
|
-
class="ax-conversation-renderer-state__retry"
|
|
135
|
-
[text]="translation.translateSync('@acorex:chat.renderer-state.retry')"
|
|
136
|
-
[look]="'outline'"
|
|
137
|
-
[size]="'sm'"
|
|
138
|
-
[disabled]="retryBusy()"
|
|
139
|
-
(onClick)="onRetry()"
|
|
140
|
-
/>
|
|
141
|
-
</div>
|
|
142
|
-
}
|
|
143
|
-
@if (showContentError()) {
|
|
144
|
-
<div
|
|
145
|
-
class="ax-conversation-renderer-state__content-err"
|
|
146
|
-
[class.ax-conversation-renderer-state__content-err--inline]="contentErrorStyle() === 'inline'"
|
|
147
|
-
[class.ax-conversation-renderer-state__row]="contentErrorStyle() === 'banner'"
|
|
148
|
-
[class.ax-conversation-renderer-state__row--warn]="contentErrorStyle() === 'banner'"
|
|
149
|
-
role="alert"
|
|
150
|
-
>
|
|
151
|
-
@if (contentErrorIconClass(); as iconClass) {
|
|
152
|
-
<i [class]="iconClass + ' ax-conversation-renderer-state__ico'" aria-hidden="true"></i>
|
|
153
|
-
}
|
|
154
|
-
<span class="ax-conversation-renderer-state__msg">{{ contentErrorText() }}</span>
|
|
155
|
-
@if (contentRetryEnabled()) {
|
|
156
|
-
<ax-button
|
|
157
|
-
class="ax-conversation-renderer-state__retry"
|
|
158
|
-
[text]="translation.translateSync('@acorex:chat.renderer-state.try-again')"
|
|
159
|
-
[look]="'outline'"
|
|
160
|
-
[size]="'sm'"
|
|
161
|
-
(onClick)="contentRetry.emit()"
|
|
162
|
-
/>
|
|
163
|
-
}
|
|
164
|
-
</div>
|
|
165
|
-
}
|
|
166
|
-
</div>
|
|
167
|
-
}
|
|
168
|
-
`, styles: [":host{display:block}.ax-conversation-renderer-state{display:flex;flex-direction:column;gap:.375rem;margin-block:.25rem 0}.ax-conversation-renderer-state--below{margin-top:.375rem;margin-bottom:0}.ax-conversation-renderer-state__content-err--inline{display:flex;align-items:center;gap:.375rem;font-size:.75rem;color:rgb(var(--ax-sys-color-danger-600));padding:.125rem .25rem}.ax-conversation-renderer-state__row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.375rem .5rem;border-radius:var(--ax-sys-border-radius);font-size:.8125rem;line-height:1.35}.ax-conversation-renderer-state__row--danger{background:rgb(var(--ax-sys-color-danger-lightest-surface));color:rgb(var(--ax-sys-color-danger-700))}.ax-conversation-renderer-state__row--warn{background:rgb(var(--ax-sys-color-warning-lightest-surface));color:rgb(var(--ax-sys-color-warning-800))}.ax-conversation-renderer-state__ico{flex-shrink:0;font-size:.875rem;opacity:.9}.ax-conversation-renderer-state__msg{flex:1;min-width:0}.ax-conversation-renderer-state__retry{flex-shrink:0}\n"] }]
|
|
169
|
-
}], propDecorators: { rendererState: [{ type: i0.Input, args: [{ isSignal: true, alias: "rendererState", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], contentErrorLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentErrorLabel", required: false }] }], deliveryFailedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "deliveryFailedLabel", required: false }] }], showContentErrorChrome: [{ type: i0.Input, args: [{ isSignal: true, alias: "showContentErrorChrome", required: false }] }], contentErrorStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentErrorStyle", required: false }] }], contentErrorIconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentErrorIconClass", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], contentRetryEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentRetryEnabled", required: false }] }], contentRetry: [{ type: i0.Output, args: ["contentRetry"] }] } });
|
|
170
|
-
|
|
171
|
-
export { AXConversationMessageRendererStateComponent as A, isMessageDeliveryPending as i };
|
|
172
|
-
//# sourceMappingURL=acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map
|
package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/shared/message-renderer-state.helpers.ts","../../../../packages/components/conversation/src/lib/plugins/message-list/components/shared/message-renderer-state.component.ts"],"sourcesContent":["import type { AXConversationMessageStatus } from '../../../../models';\nimport type { AXConversationMessageRendererContentState } from '../../../../registries/message-renderer.registry';\n\nexport function isMessageDeliveryPending(status: AXConversationMessageStatus): boolean {\n return status === 'sending';\n}\n\nexport function canShowRendererContentError(\n status: AXConversationMessageStatus,\n contentState: AXConversationMessageRendererContentState,\n): boolean {\n return contentState === 'error' && !isMessageDeliveryPending(status);\n}\n","import { AXButtonComponent } from '@acorex/components/button';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, output, signal } from '@angular/core';\nimport type { AXConversationMessage } from '../../../../models';\nimport type { AXConversationMessageRendererState } from '../../../../registries/message-renderer.registry';\nimport { AXConversationService } from '../../../../services';\nimport { AXConversationMessageUtilsService } from '../../../../utils/message-utils.service';\nimport { canShowRendererContentError } from './message-renderer-state.helpers';\n\n/**\n * Shared UI for message bubble bodies: failed delivery (with retry) and content load errors.\n * Sending state is shown in the message-list footer only — not here (avoids layout glitch in media bubbles).\n */\n@Component({\n selector: 'ax-conversation-message-renderer-state',\n imports: [CommonModule, AXButtonComponent, AXTranslationModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (hasVisibleChrome()) {\n <div\n class=\"ax-conversation-renderer-state\"\n [class.ax-conversation-renderer-state--below]=\"placement() === 'below'\"\n role=\"region\"\n [attr.aria-label]=\"'@acorex:chat.renderer-state.message-status' | translate | async\"\n >\n @if (showFailed()) {\n <div class=\"ax-conversation-renderer-state__row ax-conversation-renderer-state__row--danger\" role=\"alert\">\n <i class=\"fa-light fa-triangle-exclamation ax-conversation-renderer-state__ico\" aria-hidden=\"true\"></i>\n <span class=\"ax-conversation-renderer-state__msg\">{{ deliveryFailedText() }}</span>\n <ax-button\n class=\"ax-conversation-renderer-state__retry\"\n [text]=\"translation.translateSync('@acorex:chat.renderer-state.retry')\"\n [look]=\"'outline'\"\n [size]=\"'sm'\"\n [disabled]=\"retryBusy()\"\n (onClick)=\"onRetry()\"\n />\n </div>\n }\n @if (showContentError()) {\n <div\n class=\"ax-conversation-renderer-state__content-err\"\n [class.ax-conversation-renderer-state__content-err--inline]=\"contentErrorStyle() === 'inline'\"\n [class.ax-conversation-renderer-state__row]=\"contentErrorStyle() === 'banner'\"\n [class.ax-conversation-renderer-state__row--warn]=\"contentErrorStyle() === 'banner'\"\n role=\"alert\"\n >\n @if (contentErrorIconClass(); as iconClass) {\n <i [class]=\"iconClass + ' ax-conversation-renderer-state__ico'\" aria-hidden=\"true\"></i>\n }\n <span class=\"ax-conversation-renderer-state__msg\">{{ contentErrorText() }}</span>\n @if (contentRetryEnabled()) {\n <ax-button\n class=\"ax-conversation-renderer-state__retry\"\n [text]=\"translation.translateSync('@acorex:chat.renderer-state.try-again')\"\n [look]=\"'outline'\"\n [size]=\"'sm'\"\n (onClick)=\"contentRetry.emit()\"\n />\n }\n </div>\n }\n </div>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n .ax-conversation-renderer-state {\n display: flex;\n flex-direction: column;\n gap: 0.375rem;\n margin-block: 0.25rem 0;\n }\n\n .ax-conversation-renderer-state--below {\n margin-top: 0.375rem;\n margin-bottom: 0;\n }\n\n .ax-conversation-renderer-state__content-err--inline {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n font-size: 0.75rem;\n color: rgb(var(--ax-sys-color-danger-600));\n padding: 0.125rem 0.25rem;\n }\n\n .ax-conversation-renderer-state__row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.5rem;\n border-radius: var(--ax-sys-border-radius);\n font-size: 0.8125rem;\n line-height: 1.35;\n }\n\n .ax-conversation-renderer-state__row--danger {\n background: rgb(var(--ax-sys-color-danger-lightest-surface));\n color: rgb(var(--ax-sys-color-danger-700));\n }\n\n .ax-conversation-renderer-state__row--warn {\n background: rgb(var(--ax-sys-color-warning-lightest-surface));\n color: rgb(var(--ax-sys-color-warning-800));\n }\n\n .ax-conversation-renderer-state__ico {\n flex-shrink: 0;\n font-size: 0.875rem;\n opacity: 0.9;\n }\n\n .ax-conversation-renderer-state__msg {\n flex: 1;\n min-width: 0;\n }\n\n .ax-conversation-renderer-state__retry {\n flex-shrink: 0;\n }\n `,\n ],\n})\nexport class AXConversationMessageRendererStateComponent {\n private readonly conversation = inject(AXConversationService, { optional: true });\n readonly translation = inject(AXTranslationService);\n\n readonly rendererState = input.required<AXConversationMessageRendererState>();\n readonly message = input.required<AXConversationMessage>();\n\n readonly contentErrorLabel = input<string | undefined>(undefined);\n readonly deliveryFailedLabel = input<string | undefined>(undefined);\n readonly showContentErrorChrome = input(true);\n readonly contentErrorStyle = input<'banner' | 'inline'>('banner');\n readonly contentErrorIconClass = input<string | undefined>(undefined);\n readonly placement = input<'above' | 'below'>('above');\n\n readonly contentRetryEnabled = input(false);\n readonly contentRetry = output<void>();\n\n readonly retryBusy = signal(false);\n\n private readonly currentUser = computed(() => this.conversation?.currentUser());\n\n private readonly isOwn = computed(() => {\n const msg = this.message();\n const user = this.currentUser();\n if (!user) {\n return false;\n }\n return AXConversationMessageUtilsService.isOwnMessage(msg, user.id);\n });\n\n readonly showFailed = computed(\n () => this.rendererState().deliveryStatus === 'failed' && this.isOwn(),\n );\n\n readonly showContentError = computed(() => {\n const { contentState } = this.rendererState();\n return (\n this.showContentErrorChrome() &&\n canShowRendererContentError(this.message().status, contentState)\n );\n });\n\n readonly hasVisibleChrome = computed(() => this.showFailed() || this.showContentError());\n\n readonly contentErrorText = computed(\n () =>\n this.contentErrorLabel() ?? this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-content'),\n );\n\n readonly deliveryFailedText = computed(\n () =>\n this.deliveryFailedLabel() ??\n this.translation.translateSync('@acorex:chat.renderer-state.could-not-send-message'),\n );\n\n async onRetry(): Promise<void> {\n const msg = this.message();\n if (!this.conversation) {\n return;\n }\n this.retryBusy.set(true);\n try {\n await this.conversation.retryFailedMessage(msg.id);\n } finally {\n this.retryBusy.set(false);\n }\n }\n}\n"],"names":["i1","i2"],"mappings":";;;;;;;;;AAGM,SAAU,wBAAwB,CAAC,MAAmC,EAAA;IAC1E,OAAO,MAAM,KAAK,SAAS;AAC7B;AAEM,SAAU,2BAA2B,CACzC,MAAmC,EACnC,YAAuD,EAAA;IAEvD,OAAO,YAAY,KAAK,OAAO,IA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,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAmHnD,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBArHvD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wCAAwC,EAAA,OAAA,EACzC,CAAC,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAC9C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,+hCAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { k as axConversationSharedStorage, i as axConversationIndexedDbStorage, j as registerChatMessage } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Extra seed data so sidebar and message-list pagination can be exercised in the demo.
|
|
5
|
-
*/
|
|
6
|
-
const AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION = 200;
|
|
7
|
-
const AX_CONVERSATION_MIN_MESSAGES_CONV_1 = 500;
|
|
8
|
-
/**
|
|
9
|
-
* Append demo chats/messages when the DB is too small for default page sizes (30 / 50).
|
|
10
|
-
*/
|
|
11
|
-
async function ensurePaginationDemoData() {
|
|
12
|
-
const conversationCount = axConversationSharedStorage.conversations.size;
|
|
13
|
-
const conv1Messages = axConversationSharedStorage.messagesByConversation.get('conv-1')?.length ?? 0;
|
|
14
|
-
if (conversationCount >= AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION && conv1Messages >= AX_CONVERSATION_MIN_MESSAGES_CONV_1) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const participants = Array.from(axConversationSharedStorage.participants.values());
|
|
18
|
-
const currentUser = axConversationSharedStorage.participants.get(axConversationSharedStorage.currentUserId);
|
|
19
|
-
if (!currentUser || participants.length < 2) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const now = Date.now();
|
|
23
|
-
if (conversationCount < AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION) {
|
|
24
|
-
const toCreate = AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION - conversationCount;
|
|
25
|
-
for (let i = 0; i < toCreate; i++) {
|
|
26
|
-
const peer = participants[(i % (participants.length - 1)) + 1];
|
|
27
|
-
const conversation = {
|
|
28
|
-
id: `conv-pag-${i}`,
|
|
29
|
-
type: 'private',
|
|
30
|
-
title: `Demo Chat ${i + 1} — ${peer.name}`,
|
|
31
|
-
participants: [currentUser, { ...peer, role: 'member' }],
|
|
32
|
-
lastMessageAt: new Date(now - i * 60_000),
|
|
33
|
-
unreadCount: 0,
|
|
34
|
-
pinned: i === 0,
|
|
35
|
-
status: { isTyping: false, typingUsers: [] },
|
|
36
|
-
settings: { notifications: true, showPreview: true },
|
|
37
|
-
archived: false,
|
|
38
|
-
metadata: { profile: { tags: ['demo', 'pagination'] } },
|
|
39
|
-
createdAt: new Date(now - i * 86_400_000),
|
|
40
|
-
updatedAt: new Date(now - i * 60_000),
|
|
41
|
-
};
|
|
42
|
-
axConversationSharedStorage.conversations.set(conversation.id, conversation);
|
|
43
|
-
await axConversationIndexedDbStorage.putConversation(conversation);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (conv1Messages < AX_CONVERSATION_MIN_MESSAGES_CONV_1) {
|
|
47
|
-
const existing = conv1Messages;
|
|
48
|
-
const toCreate = AX_CONVERSATION_MIN_MESSAGES_CONV_1 - existing;
|
|
49
|
-
let lastMessage;
|
|
50
|
-
for (let i = 0; i < toCreate; i++) {
|
|
51
|
-
const isOwn = i % 2 === 0;
|
|
52
|
-
const message = {
|
|
53
|
-
id: `msg-1-pag-${existing + i}`,
|
|
54
|
-
conversationId: 'conv-1',
|
|
55
|
-
senderId: isOwn ? 'current-user' : 'user-2',
|
|
56
|
-
type: 'text',
|
|
57
|
-
timestamp: new Date(now - (existing + i + 1) * 45_000),
|
|
58
|
-
payload: {
|
|
59
|
-
type: 'text',
|
|
60
|
-
text: `Pagination demo message #${existing + i + 1} — scroll up to load older history.`,
|
|
61
|
-
},
|
|
62
|
-
status: 'read',
|
|
63
|
-
reactions: [],
|
|
64
|
-
metadata: {},
|
|
65
|
-
};
|
|
66
|
-
registerChatMessage(message);
|
|
67
|
-
await axConversationIndexedDbStorage.putMessage(message);
|
|
68
|
-
lastMessage = message;
|
|
69
|
-
}
|
|
70
|
-
const conv = axConversationSharedStorage.conversations.get('conv-1');
|
|
71
|
-
if (conv && lastMessage) {
|
|
72
|
-
conv.lastMessage = lastMessage;
|
|
73
|
-
conv.lastMessageAt = lastMessage.timestamp;
|
|
74
|
-
axConversationSharedStorage.conversations.set(conv.id, conv);
|
|
75
|
-
await axConversationIndexedDbStorage.putConversation(conv);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { ensurePaginationDemoData };
|
|
81
|
-
//# sourceMappingURL=acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/apis/pagination-demo-data.ts"],"sourcesContent":["/**\n * Extra seed data so sidebar and message-list pagination can be exercised in the demo.\n */\n\nimport type { AXConversation, AXConversationMessage } from '../../models';\nimport { registerChatMessage } from './chat-storage.helpers';\nimport { axConversationIndexedDbStorage } from './indexeddb-storage';\nimport { axConversationSharedStorage } from './shared-storage';\n\nconst AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION = 200;\nconst AX_CONVERSATION_MIN_MESSAGES_CONV_1 = 500;\n\n/**\n * Append demo chats/messages when the DB is too small for default page sizes (30 / 50).\n */\nexport async function ensurePaginationDemoData(): Promise<void> {\n const conversationCount = axConversationSharedStorage.conversations.size;\n const conv1Messages = axConversationSharedStorage.messagesByConversation.get('conv-1')?.length ?? 0;\n\n if (conversationCount >= AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION && conv1Messages >= AX_CONVERSATION_MIN_MESSAGES_CONV_1) {\n return;\n }\n\n const participants = Array.from(axConversationSharedStorage.participants.values());\n const currentUser = axConversationSharedStorage.participants.get(axConversationSharedStorage.currentUserId);\n if (!currentUser || participants.length < 2) {\n return;\n }\n\n const now = Date.now();\n\n if (conversationCount < AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION) {\n const toCreate = AX_CONVERSATION_MIN_CONVERSATIONS_FOR_PAGINATION - conversationCount;\n for (let i = 0; i < toCreate; i++) {\n const peer = participants[(i % (participants.length - 1)) + 1];\n const conversation: AXConversation = {\n id: `conv-pag-${i}`,\n type: 'private',\n title: `Demo Chat ${i + 1} — ${peer.name}`,\n participants: [currentUser, { ...peer, role: 'member' }],\n lastMessageAt: new Date(now - i * 60_000),\n unreadCount: 0,\n pinned: i === 0,\n status: { isTyping: false, typingUsers: [] },\n settings: { notifications: true, showPreview: true },\n archived: false,\n metadata: { profile: { tags: ['demo', 'pagination'] } },\n createdAt: new Date(now - i * 86_400_000),\n updatedAt: new Date(now - i * 60_000),\n };\n axConversationSharedStorage.conversations.set(conversation.id, conversation);\n await axConversationIndexedDbStorage.putConversation(conversation);\n }\n }\n\n if (conv1Messages < AX_CONVERSATION_MIN_MESSAGES_CONV_1) {\n const existing = conv1Messages;\n const toCreate = AX_CONVERSATION_MIN_MESSAGES_CONV_1 - existing;\n let lastMessage: AXConversationMessage | undefined;\n\n for (let i = 0; i < toCreate; i++) {\n const isOwn = i % 2 === 0;\n const message: AXConversationMessage = {\n id: `msg-1-pag-${existing + i}`,\n conversationId: 'conv-1',\n senderId: isOwn ? 'current-user' : 'user-2',\n type: 'text',\n timestamp: new Date(now - (existing + i + 1) * 45_000),\n payload: {\n type: 'text',\n text: `Pagination demo message #${existing + i + 1} — scroll up to load older history.`,\n },\n status: 'read',\n reactions: [],\n metadata: {},\n };\n registerChatMessage(message);\n await axConversationIndexedDbStorage.putMessage(message);\n lastMessage = message;\n }\n\n const conv = axConversationSharedStorage.conversations.get('conv-1');\n if (conv && lastMessage) {\n conv.lastMessage = lastMessage;\n conv.lastMessageAt = lastMessage.timestamp;\n axConversationSharedStorage.conversations.set(conv.id, conv);\n await axConversationIndexedDbStorage.putConversation(conv);\n }\n }\n}\n"],"names":[],"mappings":";;AAAA;;AAEG;AAOH,MAAM,gDAAgD,GAAG,GAAG;AAC5D,MAAM,mCAAmC,GAAG,GAAG;AAE/C;;AAEG;AACI,eAAe,wBAAwB,GAAA;AAC5C,IAAA,MAAM,iBAAiB,GAAG,2BAA2B,CAAC,aAAa,CAAC,IAAI;AACxE,IAAA,MAAM,aAAa,GAAG,2BAA2B,CAAC,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnG,IAAI,iBAAiB,IAAI,gDAAgD,IAAI,aAAa,IAAI,mCAAmC,EAAE;QACjI;IACF;AAEA,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;AAClF,IAAA,MAAM,WAAW,GAAG,2BAA2B,CAAC,YAAY,CAAC,GAAG,CAAC,2BAA2B,CAAC,aAAa,CAAC;IAC3G,IAAI,CAAC,WAAW,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;Q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,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC;AACpE,QAAA,IAAI,IAAI,IAAI,WAAW,EAAE;AACvB,YAAA,IAAI,CAAC,WAAW,GAAG,WAAW;AAC9B,YAAA,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,SAAS;YAC1C,2BAA2B,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC;AAC5D,YAAA,MAAM,8BAA8B,CAAC,eAAe,CAAC,IAAI,CAAC;QAC5D;IACF;AACF;;;;"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { AXButtonComponent } from '@acorex/components/button';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import * as i3 from '@acorex/core/translation';
|
|
5
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
|
6
|
-
import { AsyncPipe } from '@angular/common';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Picker Footer Component
|
|
10
|
-
* Reusable footer for all picker components
|
|
11
|
-
*/
|
|
12
|
-
class AXConversationPickerFooterComponent {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.sendText = input.required(...(ngDevMode ? [{ debugName: "sendText" }] : /* istanbul ignore next */ []));
|
|
15
|
-
this.sendDisabled = input(false, ...(ngDevMode ? [{ debugName: "sendDisabled" }] : /* istanbul ignore next */ []));
|
|
16
|
-
this.onCancel = output();
|
|
17
|
-
this.onSend = output();
|
|
18
|
-
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationPickerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXConversationPickerFooterComponent, isStandalone: true, selector: "ax-conversation-picker-footer", inputs: { sendText: { classPropertyName: "sendText", publicName: "sendText", isSignal: true, isRequired: true, transformFunction: null }, sendDisabled: { classPropertyName: "sendDisabled", publicName: "sendDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCancel: "onCancel", onSend: "onSend" }, ngImport: i0, template: `
|
|
21
|
-
<div class="ax-conversation-picker-footer">
|
|
22
|
-
<ax-button text="Cancel" look="solid" color="danger" (onClick)="onCancel.emit()" />
|
|
23
|
-
<ax-button
|
|
24
|
-
[text]="sendText()"
|
|
25
|
-
look="outline"
|
|
26
|
-
color="primary"
|
|
27
|
-
[disabled]="sendDisabled()"
|
|
28
|
-
(onClick)="onSend.emit()"
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
`, isInline: true, styles: [".ax-conversation-picker-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.5rem;padding:.625rem .75rem;padding-bottom:calc(.625rem + env(safe-area-inset-bottom,0px));border-top:1px solid rgb(var(--ax-sys-color-border-light-surface));flex-shrink:0;background:rgb(var(--ax-sys-color-lightest-surface))}@container picker (max-width: 480px){.ax-conversation-picker-footer{flex-direction:column-reverse;align-items:stretch;gap:.375rem;padding-inline:.5rem}.ax-conversation-picker-footer ax-button{width:100%}}\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
32
|
-
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationPickerFooterComponent, decorators: [{
|
|
34
|
-
type: Component,
|
|
35
|
-
args: [{ selector: 'ax-conversation-picker-footer', imports: [AXButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
36
|
-
<div class="ax-conversation-picker-footer">
|
|
37
|
-
<ax-button text="Cancel" look="solid" color="danger" (onClick)="onCancel.emit()" />
|
|
38
|
-
<ax-button
|
|
39
|
-
[text]="sendText()"
|
|
40
|
-
look="outline"
|
|
41
|
-
color="primary"
|
|
42
|
-
[disabled]="sendDisabled()"
|
|
43
|
-
(onClick)="onSend.emit()"
|
|
44
|
-
/>
|
|
45
|
-
</div>
|
|
46
|
-
`, styles: [".ax-conversation-picker-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.5rem;padding:.625rem .75rem;padding-bottom:calc(.625rem + env(safe-area-inset-bottom,0px));border-top:1px solid rgb(var(--ax-sys-color-border-light-surface));flex-shrink:0;background:rgb(var(--ax-sys-color-lightest-surface))}@container picker (max-width: 480px){.ax-conversation-picker-footer{flex-direction:column-reverse;align-items:stretch;gap:.375rem;padding-inline:.5rem}.ax-conversation-picker-footer ax-button{width:100%}}\n"] }]
|
|
47
|
-
}], propDecorators: { sendText: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendText", required: true }] }], sendDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendDisabled", required: false }] }], onCancel: [{ type: i0.Output, args: ["onCancel"] }], onSend: [{ type: i0.Output, args: ["onSend"] }] } });
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Picker Header Component
|
|
51
|
-
* Reusable header for all picker components
|
|
52
|
-
*/
|
|
53
|
-
class AXConversationPickerHeaderComponent {
|
|
54
|
-
constructor() {
|
|
55
|
-
this.title = input.required(...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
56
|
-
this.onClose = output();
|
|
57
|
-
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationPickerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXConversationPickerHeaderComponent, isStandalone: true, selector: "ax-conversation-picker-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onClose: "onClose" }, ngImport: i0, template: `
|
|
60
|
-
<div class="ax-conversation-picker-header">
|
|
61
|
-
<span class="ax-conversation-picker-header__title">{{ title() }}</span>
|
|
62
|
-
<button
|
|
63
|
-
type="button"
|
|
64
|
-
class="ax-conversation-picker-header__close"
|
|
65
|
-
(click)="onClose.emit()"
|
|
66
|
-
[attr.aria-label]="'@acorex:chat.actions.close' | translate | async"
|
|
67
|
-
>
|
|
68
|
-
<i class="fa-light fa-xmark"></i>
|
|
69
|
-
</button>
|
|
70
|
-
</div>
|
|
71
|
-
`, isInline: true, styles: [".ax-conversation-picker-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.625rem .75rem;border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface));flex-shrink:0}.ax-conversation-picker-header__title{font-size:.8125rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.ax-conversation-picker-header__close{display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin:-.375rem -.5rem -.375rem 0;border:none;border-radius:var(--ax-sys-border-radius, .25rem);background:transparent;color:rgba(var(--ax-sys-color-on-surface),.55);font-size:1.125rem;cursor:pointer;touch-action:manipulation;transition:background-color .15s ease,color .15s ease}.ax-conversation-picker-header__close:hover,.ax-conversation-picker-header__close:focus-visible{background:rgba(var(--ax-sys-color-danger-500),.1);color:rgb(var(--ax-sys-color-danger-500));outline:none}\n"], dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
72
|
-
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationPickerHeaderComponent, decorators: [{
|
|
74
|
-
type: Component,
|
|
75
|
-
args: [{ selector: 'ax-conversation-picker-header', imports: [AXTranslationModule, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
76
|
-
<div class="ax-conversation-picker-header">
|
|
77
|
-
<span class="ax-conversation-picker-header__title">{{ title() }}</span>
|
|
78
|
-
<button
|
|
79
|
-
type="button"
|
|
80
|
-
class="ax-conversation-picker-header__close"
|
|
81
|
-
(click)="onClose.emit()"
|
|
82
|
-
[attr.aria-label]="'@acorex:chat.actions.close' | translate | async"
|
|
83
|
-
>
|
|
84
|
-
<i class="fa-light fa-xmark"></i>
|
|
85
|
-
</button>
|
|
86
|
-
</div>
|
|
87
|
-
`, styles: [".ax-conversation-picker-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.625rem .75rem;border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface));flex-shrink:0}.ax-conversation-picker-header__title{font-size:.8125rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.ax-conversation-picker-header__close{display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin:-.375rem -.5rem -.375rem 0;border:none;border-radius:var(--ax-sys-border-radius, .25rem);background:transparent;color:rgba(var(--ax-sys-color-on-surface),.55);font-size:1.125rem;cursor:pointer;touch-action:manipulation;transition:background-color .15s ease,color .15s ease}.ax-conversation-picker-header__close:hover,.ax-conversation-picker-header__close:focus-visible{background:rgba(var(--ax-sys-color-danger-500),.1);color:rgb(var(--ax-sys-color-danger-500));outline:none}\n"] }]
|
|
88
|
-
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], onClose: [{ type: i0.Output, args: ["onClose"] }] } });
|
|
89
|
-
|
|
90
|
-
export { AXConversationPickerHeaderComponent as A, AXConversationPickerFooterComponent as a };
|
|
91
|
-
//# sourceMappingURL=acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-conversation-picker-header.component-BneIFjXq.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/picker-footer/picker-footer.component.ts","../../../../packages/components/conversation/src/lib/plugins/composer/components/picker-header/picker-header.component.ts"],"sourcesContent":["/**\n * Picker Footer Component\n * Reusable footer for all picker components\n */\n\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\n\n@Component({\n selector: 'ax-conversation-picker-footer',\n imports: [AXButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-picker-footer\">\n <ax-button text=\"Cancel\" look=\"solid\" color=\"danger\" (onClick)=\"onCancel.emit()\" />\n <ax-button\n [text]=\"sendText()\"\n look=\"outline\"\n color=\"primary\"\n [disabled]=\"sendDisabled()\"\n (onClick)=\"onSend.emit()\"\n />\n </div>\n `,\n styles: [\n `\n .ax-conversation-picker-footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: 0.5rem;\n padding: 0.625rem 0.75rem;\n padding-bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px));\n border-top: 1px solid rgb(var(--ax-sys-color-border-light-surface));\n flex-shrink: 0;\n background: rgb(var(--ax-sys-color-lightest-surface));\n }\n\n @container picker (max-width: 480px) {\n .ax-conversation-picker-footer {\n flex-direction: column-reverse;\n align-items: stretch;\n gap: 0.375rem;\n padding-inline: 0.5rem;\n }\n\n .ax-conversation-picker-footer ax-button {\n width: 100%;\n }\n }\n `,\n ],\n})\nexport class AXConversationPickerFooterComponent {\n readonly sendText = input.required<string>();\n readonly sendDisabled = input<boolean>(false);\n readonly onCancel = output<void>();\n readonly onSend = output<void>();\n}\n","/**\n * Picker Header Component\n * Reusable header for all picker components\n */\n\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\n\n@Component({\n selector: 'ax-conversation-picker-header',\n imports: [AXTranslationModule, AsyncPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-picker-header\">\n <span class=\"ax-conversation-picker-header__title\">{{ title() }}</span>\n <button\n type=\"button\"\n class=\"ax-conversation-picker-header__close\"\n (click)=\"onClose.emit()\"\n [attr.aria-label]=\"'@acorex:chat.actions.close' | translate | async\"\n >\n <i class=\"fa-light fa-xmark\"></i>\n </button>\n </div>\n `,\n styles: [\n `\n .ax-conversation-picker-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 0.625rem 0.75rem;\n border-bottom: 1px solid rgb(var(--ax-sys-color-border-light-surface));\n flex-shrink: 0;\n }\n\n .ax-conversation-picker-header__title {\n font-size: 0.8125rem;\n font-weight: 600;\n color: rgb(var(--ax-sys-color-on-surface));\n }\n\n .ax-conversation-picker-header__close {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2.75rem;\n height: 2.75rem;\n margin: -0.375rem -0.5rem -0.375rem 0;\n border: none;\n border-radius: var(--ax-sys-border-radius, 0.25rem);\n background: transparent;\n color: rgba(var(--ax-sys-color-on-surface), 0.55);\n font-size: 1.125rem;\n cursor: pointer;\n touch-action: manipulation;\n transition: background-color 0.15s ease, color 0.15s ease;\n }\n\n .ax-conversation-picker-header__close:hover,\n .ax-conversation-picker-header__close:focus-visible {\n background: rgba(var(--ax-sys-color-danger-500), 0.1);\n color: rgb(var(--ax-sys-color-danger-500));\n outline: none;\n }\n `,\n ],\n})\nexport class AXConversationPickerHeaderComponent {\n readonly title = input.required<string>();\n readonly onClose = output<void>();\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MAmDU,mCAAmC,CAAA;AA9ChD,IAAA,WAAA,GAAA;AA+CW,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,8EAAU;AACnC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAU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